@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260320074145 → 0.8.1-dev.20260323055150

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.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
 
@@ -1384,7 +1387,7 @@ var SelectWithSearchPanel = (props) => {
1384
1387
  const containerRef = useRef2(null);
1385
1388
  const [isCreateOpen, setIsCreateOpen] = useState5(false);
1386
1389
  const [formData, setFormData] = useState5({});
1387
- const getNestedValue = (obj, path) => {
1390
+ const getNestedValue2 = (obj, path) => {
1388
1391
  return path.split(".").reduce((acc, key) => acc?.[key], obj);
1389
1392
  };
1390
1393
  useEffect4(() => {
@@ -1422,7 +1425,7 @@ var SelectWithSearchPanel = (props) => {
1422
1425
  props.dataSourceDependsOn
1423
1426
  ]);
1424
1427
  const filteredItems = list?.filter((item) => {
1425
- const value = getNestedValue(item, props.dataTextFieldName);
1428
+ const value = getNestedValue2(item, props.dataTextFieldName);
1426
1429
  return value?.toLowerCase().includes(searchTerm?.toLowerCase());
1427
1430
  });
1428
1431
  const playBeep = () => {
@@ -1453,7 +1456,7 @@ var SelectWithSearchPanel = (props) => {
1453
1456
  }, [searchTerm]);
1454
1457
  const handleSelect = (event, item) => {
1455
1458
  event.preventDefault();
1456
- setSearchTerm(getNestedValue(item, props.dataTextFieldName));
1459
+ setSearchTerm(getNestedValue2(item, props.dataTextFieldName));
1457
1460
  if (props.callback) {
1458
1461
  const val = {};
1459
1462
  props.callback({
@@ -1600,7 +1603,7 @@ var SelectWithSearchPanel = (props) => {
1600
1603
  role: "option",
1601
1604
  tabIndex: -1,
1602
1605
  onMouseEnter: () => setHighlightedIndex(index),
1603
- children: /* @__PURE__ */ jsx27("span", { children: getNestedValue(item, props.dataTextFieldName) })
1606
+ children: /* @__PURE__ */ jsx27("span", { children: getNestedValue2(item, props.dataTextFieldName) })
1604
1607
  }
1605
1608
  ) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx27("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
1606
1609
  }
@@ -1902,51 +1905,146 @@ var OdataBuilder = class {
1902
1905
  this.baseUrl = url;
1903
1906
  this.top = Constants.pagesize.toString();
1904
1907
  this.skip = "0";
1908
+ this.keyword = "";
1905
1909
  this.filterBy = "";
1906
1910
  this.orderBy = "";
1907
1911
  }
1912
+ // parseSearchParams(ReadonlyUrlSearchParams): DataQuery {
1913
+ // this.top = top;
1914
+ // return this;
1915
+ // }
1908
1916
  setQuery(odata) {
1909
- if (!odata) return this;
1910
- if (odata["$skip"]) this.skip = odata["$skip"];
1911
- if (odata["$top"]) this.top = odata["$top"];
1912
- if (odata["$filter"]) this.filterBy = odata["$filter"];
1913
- if (odata["$orderby"]) this.orderBy = odata["$orderby"];
1917
+ if (odata) {
1918
+ for (const key in odata) {
1919
+ if (odata[key] != null && odata[key] != "") {
1920
+ if (key == "$skip") {
1921
+ this.setSkip(odata[key]);
1922
+ }
1923
+ if (key == "$filter") {
1924
+ this.setFilter(odata[key]);
1925
+ }
1926
+ if (key == "$top") {
1927
+ this.setTop(odata[key]);
1928
+ }
1929
+ if (key == "$orderby") {
1930
+ this.setOrderBy(odata[key]);
1931
+ }
1932
+ }
1933
+ }
1934
+ }
1935
+ return this;
1936
+ }
1937
+ // parseKeyValuePairs(inputString: string): { [key: string]: string } {
1938
+ // return inputString.split('$')
1939
+ // .map((pair) => pair.split('='))
1940
+ // .reduce((result: { [key: string]: string }, [key, value]) => {
1941
+ // if (key && value) {
1942
+ // result[key.trim()] = value.trim();
1943
+ // }
1944
+ // return result;
1945
+ // }, {});
1946
+ // }
1947
+ static getOdataQueryString(obj, defaultOrder) {
1948
+ let queryString = "";
1949
+ let skip = (obj && obj["$skip"]) ?? "0";
1950
+ let top = (obj && obj["$top"]) ?? Constants.pagesize.toString();
1951
+ queryString = `$skip=${skip}&$top=${top}&$count=true`;
1952
+ if (obj) {
1953
+ if (obj["$filter"] && obj["$filter"] !== null && obj["$filter"] !== "") {
1954
+ queryString = queryString + `&$filter=${encodeURIComponent(obj["$filter"])}`;
1955
+ }
1956
+ if (obj["$orderby"] && obj["$orderby"] !== null && obj["$orderby"] !== "") {
1957
+ queryString = queryString + `&$orderby=${encodeURIComponent(obj["$orderby"])}`;
1958
+ } else if (defaultOrder) {
1959
+ queryString = queryString + `&$orderby=${encodeURIComponent(defaultOrder)}`;
1960
+ }
1961
+ } else {
1962
+ if (defaultOrder) {
1963
+ queryString = queryString + `&$orderby=${encodeURIComponent(defaultOrder)}`;
1964
+ }
1965
+ }
1966
+ return queryString;
1967
+ }
1968
+ setTop(top) {
1969
+ this.top = top;
1970
+ return this;
1971
+ }
1972
+ setSkip(skip) {
1973
+ this.skip = skip;
1974
+ return this;
1975
+ }
1976
+ setKeyword(keyword) {
1977
+ this.keyword = keyword;
1978
+ return this;
1979
+ }
1980
+ setFilter(filterBy) {
1981
+ this.filterBy = filterBy;
1982
+ return this;
1983
+ }
1984
+ setOrderBy(orderBy) {
1985
+ this.orderBy = orderBy;
1914
1986
  return this;
1915
1987
  }
1916
1988
  getPageNumber(pageSize) {
1917
- const skip = parseInt(this.skip);
1918
- const top = parseInt(this.top);
1919
- if (!isNaN(skip) && !isNaN(top)) {
1920
- return skip / pageSize + 1;
1989
+ let pageNumber = 1;
1990
+ if (this.skip && this.top) {
1991
+ const skip = parseInt(this.skip);
1992
+ const top = parseInt(this.top);
1993
+ if (!isNaN(skip) && !isNaN(top)) {
1994
+ pageNumber = skip / pageSize + 1;
1995
+ }
1921
1996
  }
1922
- return 1;
1997
+ return pageNumber;
1998
+ }
1999
+ getUrl() {
2000
+ let url = `${this.baseUrl}?$skip=${this.skip}&$top=${this.top}&$count=true`;
2001
+ if (this.filterBy !== null && this.filterBy !== "") {
2002
+ url = url + `&$filter=${encodeURIComponent(this.filterBy)}`;
2003
+ }
2004
+ if (this.orderBy !== null && this.orderBy !== "") {
2005
+ url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
2006
+ }
2007
+ console.log(url);
2008
+ return url;
1923
2009
  }
1924
2010
  getNewOrderByUrl(orderBy) {
1925
- let url = `${this.baseUrl}?$skip=0&$top=${this.top}&$count=true`;
1926
- if (this.filterBy) {
1927
- url += `&$filter=${encodeURIComponent(this.filterBy)}`;
2011
+ let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
2012
+ if (this.filterBy !== null && this.filterBy !== "") {
2013
+ url = url + `&$filter=${encodeURIComponent(this.filterBy)}`;
1928
2014
  }
1929
- url += `&$orderby=${encodeURIComponent(orderBy)}`;
2015
+ url = url + `&$orderby=${encodeURIComponent(orderBy)}`;
1930
2016
  return url;
1931
2017
  }
1932
2018
  getNewFilterUrl(filterBy) {
1933
- let url = `${this.baseUrl}?$skip=0&$top=${this.top}&$count=true`;
1934
- if (filterBy) {
1935
- url += `&$filter=${encodeURIComponent(filterBy)}`;
2019
+ let url = `${this.baseUrl}?$skip=${0}&$top=${this.top}&$count=true`;
2020
+ if (filterBy !== null && filterBy !== "") {
2021
+ url = url + `&$filter=${encodeURIComponent(filterBy)}`;
1936
2022
  }
1937
- if (this.orderBy) {
1938
- url += `&$orderby=${encodeURIComponent(this.orderBy)}`;
2023
+ if (this.orderBy !== null && this.orderBy !== "") {
2024
+ url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
1939
2025
  }
1940
2026
  return url;
1941
2027
  }
1942
2028
  getNewPageUrl(page) {
1943
- const skip = page * Constants.pagesize - Constants.pagesize;
2029
+ let skip = page * Constants.pagesize - Constants.pagesize;
1944
2030
  let url = `${this.baseUrl}?$skip=${skip}&$top=${this.top}&$count=true`;
1945
- if (this.filterBy) {
1946
- url += `&$filter=${encodeURIComponent(this.filterBy)}`;
2031
+ if (this.filterBy !== null && this.filterBy !== "") {
2032
+ url = url + `&$filter=${encodeURIComponent(this.filterBy)}`;
1947
2033
  }
1948
- if (this.orderBy) {
1949
- url += `&$orderby=${encodeURIComponent(this.orderBy)}`;
2034
+ if (this.orderBy !== null && this.orderBy !== "") {
2035
+ url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
2036
+ }
2037
+ return url;
2038
+ }
2039
+ getNewPageSizeUrl(pageSize) {
2040
+ const currentPage = this.getPageNumber(parseInt(this.top || Constants.pagesize.toString()));
2041
+ const skip = (currentPage - 1) * pageSize;
2042
+ let url = `${this.baseUrl}?$skip=${skip}&$top=${pageSize}&$count=true`;
2043
+ if (this.filterBy !== null && this.filterBy !== "") {
2044
+ url = url + `&$filter=${encodeURIComponent(this.filterBy)}`;
2045
+ }
2046
+ if (this.orderBy !== null && this.orderBy !== "") {
2047
+ url = url + `&$orderby=${encodeURIComponent(this.orderBy)}`;
1950
2048
  }
1951
2049
  return url;
1952
2050
  }
@@ -2502,7 +2600,7 @@ var DataList = (props) => {
2502
2600
  var DataList_default = DataList;
2503
2601
 
2504
2602
  // src/components/pageRenderingEngine/PageBodyRenderer.tsx
2505
- import React51 from "react";
2603
+ import React54 from "react";
2506
2604
 
2507
2605
  // src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
2508
2606
  import React37 from "react";
@@ -2528,17 +2626,17 @@ var TextNode = (props) => {
2528
2626
  }
2529
2627
  return styleObject;
2530
2628
  }
2531
- function toCamelCase(str) {
2629
+ function toCamelCase2(str) {
2532
2630
  return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
2533
2631
  }
2534
- function convertKeysToCamelCase(obj) {
2632
+ function convertKeysToCamelCase2(obj) {
2535
2633
  if (Array.isArray(obj)) {
2536
- return obj.map(convertKeysToCamelCase);
2634
+ return obj.map(convertKeysToCamelCase2);
2537
2635
  } else if (obj !== null && typeof obj === "object") {
2538
2636
  return Object.fromEntries(
2539
2637
  Object.entries(obj).filter(([_, value]) => value !== "").map(([key, value]) => [
2540
- toCamelCase(key),
2541
- convertKeysToCamelCase(value)
2638
+ toCamelCase2(key),
2639
+ convertKeysToCamelCase2(value)
2542
2640
  ])
2543
2641
  );
2544
2642
  }
@@ -2558,7 +2656,7 @@ var TextNode = (props) => {
2558
2656
  if (format === 1024) classes.push("capitalize");
2559
2657
  return classes.join(" ");
2560
2658
  }
2561
- const styles = convertKeysToCamelCase(cssStringToJson(props.node.style));
2659
+ const styles = convertKeysToCamelCase2(cssStringToJson(props.node.style));
2562
2660
  function replacePlaceholders(template, dataItem) {
2563
2661
  return template.replace(/{(\w+)}/g, (_, key) => {
2564
2662
  return key in dataItem ? dataItem[key] : `{${key}}`;
@@ -2679,13 +2777,13 @@ var DatafieldNode = (props) => {
2679
2777
  }
2680
2778
  return styleObject;
2681
2779
  }
2682
- function toCamelCase(str) {
2780
+ function toCamelCase2(str) {
2683
2781
  return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
2684
2782
  }
2685
- function convertKeysToCamelCase(obj) {
2783
+ function convertKeysToCamelCase2(obj) {
2686
2784
  if (!obj || typeof obj !== "object") return obj;
2687
2785
  return Object.fromEntries(
2688
- Object.entries(obj).map(([key, value2]) => [toCamelCase(key), value2])
2786
+ Object.entries(obj).map(([key, value2]) => [toCamelCase2(key), value2])
2689
2787
  );
2690
2788
  }
2691
2789
  const Formats = [
@@ -2702,7 +2800,7 @@ var DatafieldNode = (props) => {
2702
2800
  "italic underline",
2703
2801
  "italic underline font-medium"
2704
2802
  ];
2705
- const styles = convertKeysToCamelCase(cssStringToJson(props.node.style));
2803
+ const styles = convertKeysToCamelCase2(cssStringToJson(props.node.style));
2706
2804
  const fieldName = props.node.fieldName;
2707
2805
  const value = props.dataitem ? getNestedProperty(props.dataitem, fieldName) : null;
2708
2806
  console.log(fieldName, value, "haha");
@@ -2912,7 +3010,60 @@ var QuoteNode_default = QuoteNode;
2912
3010
 
2913
3011
  // src/components/pageRenderingEngine/nodes/CodeNode.tsx
2914
3012
  import React42 from "react";
2915
- import { jsx as jsx52 } from "react/jsx-runtime";
3013
+
3014
+ // src/components/CopyButton.tsx
3015
+ import { useState as useState8, useRef as useRef3, useEffect as useEffect7 } from "react";
3016
+ import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
3017
+ function CopyButton({ text }) {
3018
+ const [copied, setCopied] = useState8(false);
3019
+ const timeoutRef = useRef3(null);
3020
+ useEffect7(() => {
3021
+ return () => {
3022
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
3023
+ };
3024
+ }, []);
3025
+ const handleCopy = async () => {
3026
+ try {
3027
+ await navigator.clipboard.writeText(text);
3028
+ setCopied(true);
3029
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
3030
+ timeoutRef.current = setTimeout(() => setCopied(false), 2e3);
3031
+ } catch (err) {
3032
+ console.error("Failed to copy: ", err);
3033
+ }
3034
+ };
3035
+ return /* @__PURE__ */ jsxs26(
3036
+ "button",
3037
+ {
3038
+ onClick: handleCopy,
3039
+ className: "flex gap-1 items-center hover:text-white transition",
3040
+ children: [
3041
+ /* @__PURE__ */ jsx52(
3042
+ "svg",
3043
+ {
3044
+ width: "16",
3045
+ height: "16",
3046
+ viewBox: "0 0 24 24",
3047
+ className: "w-4 h-4",
3048
+ fill: "currentColor",
3049
+ children: /* @__PURE__ */ jsx52(
3050
+ "path",
3051
+ {
3052
+ fillRule: "evenodd",
3053
+ clipRule: "evenodd",
3054
+ 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"
3055
+ }
3056
+ )
3057
+ }
3058
+ ),
3059
+ copied ? "Copied!" : "Copy code"
3060
+ ]
3061
+ }
3062
+ );
3063
+ }
3064
+
3065
+ // src/components/pageRenderingEngine/nodes/CodeNode.tsx
3066
+ import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
2916
3067
  var CodeNode = (props) => {
2917
3068
  const NodeTypes2 = {
2918
3069
  ["text"]: TextNode_default,
@@ -2925,17 +3076,23 @@ var CodeNode = (props) => {
2925
3076
  if (node.type === "link") return node.text || node.url || "";
2926
3077
  return "";
2927
3078
  }).join("") ?? "";
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
- }) }) });
3079
+ return /* @__PURE__ */ jsxs27("div", { className: "code-block", children: [
3080
+ /* @__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: [
3081
+ /* @__PURE__ */ jsx53("span", { children: "Code Snippet" }),
3082
+ /* @__PURE__ */ jsx53(CopyButton, { text: textContent })
3083
+ ] }),
3084
+ /* @__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) => {
3085
+ const SelectedNode = NodeTypes2[node.type];
3086
+ return /* @__PURE__ */ jsx53(React42.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx53(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
3087
+ }) })
3088
+ ] });
2932
3089
  };
2933
3090
  var CodeNode_default = CodeNode;
2934
3091
 
2935
3092
  // src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
2936
- import { jsx as jsx53 } from "react/jsx-runtime";
3093
+ import { jsx as jsx54 } from "react/jsx-runtime";
2937
3094
  var HorizontalRuleNode = (props) => {
2938
- return /* @__PURE__ */ jsx53("hr", {});
3095
+ return /* @__PURE__ */ jsx54("hr", {});
2939
3096
  };
2940
3097
  var HorizontalRuleNode_default = HorizontalRuleNode;
2941
3098
 
@@ -2944,11 +3101,11 @@ import React48 from "react";
2944
3101
 
2945
3102
  // src/components/pageRenderingEngine/nodes/ImageNode.tsx
2946
3103
  import React43 from "react";
2947
- import { jsx as jsx54 } from "react/jsx-runtime";
3104
+ import { jsx as jsx55 } from "react/jsx-runtime";
2948
3105
  var ImageNode = (props) => {
2949
3106
  const { node, apiBaseUrl = "" } = props;
2950
3107
  let imageUrl = node.imageUrl.startsWith("http") ? node.imageUrl : `${apiBaseUrl}/digitalassets/storefront/${node.imageUrl}`;
2951
- return /* @__PURE__ */ jsx54(React43.Fragment, { children: node.width ? /* @__PURE__ */ jsx54("div", { style: { width: node.width }, children: /* @__PURE__ */ jsx54(
3108
+ return /* @__PURE__ */ jsx55(React43.Fragment, { children: node.width ? /* @__PURE__ */ jsx55("div", { style: { width: node.width }, children: /* @__PURE__ */ jsx55(
2952
3109
  "img",
2953
3110
  {
2954
3111
  loading: "lazy",
@@ -2958,7 +3115,7 @@ var ImageNode = (props) => {
2958
3115
  height: node.intrinsicHeight,
2959
3116
  alt: node.title
2960
3117
  }
2961
- ) }) : /* @__PURE__ */ jsx54(
3118
+ ) }) : /* @__PURE__ */ jsx55(
2962
3119
  "img",
2963
3120
  {
2964
3121
  loading: "lazy",
@@ -2974,7 +3131,7 @@ var ImageNode_default = ImageNode;
2974
3131
 
2975
3132
  // src/components/pageRenderingEngine/nodes/WidgetNode.tsx
2976
3133
  import { Suspense } from "react";
2977
- import { Fragment as Fragment5, jsx as jsx55, jsxs as jsxs26 } from "react/jsx-runtime";
3134
+ import { Fragment as Fragment5, jsx as jsx56, jsxs as jsxs28 } from "react/jsx-runtime";
2978
3135
  var WidgetNode = (props) => {
2979
3136
  const getWidgetParameters = () => {
2980
3137
  const widgetInputParameters = { ...props.routeParameters ?? {} };
@@ -3029,12 +3186,12 @@ var WidgetNode = (props) => {
3029
3186
  const SelectedWidget = props.widgetRegistry?.[props.node.widgetCode];
3030
3187
  if (!SelectedWidget) {
3031
3188
  console.warn("Widget not found:", props.node.widgetCode);
3032
- return /* @__PURE__ */ jsxs26(Fragment5, { children: [
3189
+ return /* @__PURE__ */ jsxs28(Fragment5, { children: [
3033
3190
  "Widget not found: ",
3034
3191
  props.node.widgetCode
3035
3192
  ] });
3036
3193
  }
3037
- return /* @__PURE__ */ jsx55(Suspense, { fallback: /* @__PURE__ */ jsx55("div", { className: "container mt-2", children: "..." }), children: /* @__PURE__ */ jsx55(
3194
+ return /* @__PURE__ */ jsx56(Suspense, { fallback: /* @__PURE__ */ jsx56("div", { className: "container mt-2", children: "..." }), children: /* @__PURE__ */ jsx56(
3038
3195
  SelectedWidget,
3039
3196
  {
3040
3197
  params: getWidgetParameters(),
@@ -3049,42 +3206,42 @@ var WidgetNode = (props) => {
3049
3206
  var WidgetNode_default = WidgetNode;
3050
3207
 
3051
3208
  // src/components/pageRenderingEngine/nodes/IframeClient.tsx
3052
- import React46, { useEffect as useEffect7, useRef as useRef3, useState as useState8 } from "react";
3209
+ import React46, { useEffect as useEffect8, useRef as useRef4, useState as useState9 } from "react";
3053
3210
 
3054
3211
  // src/components/IFrameLoaderView.tsx
3055
3212
  import React45 from "react";
3056
- import { jsx as jsx56, jsxs as jsxs27 } from "react/jsx-runtime";
3213
+ import { jsx as jsx57, jsxs as jsxs29 } from "react/jsx-runtime";
3057
3214
  var IFrameLoaderView = (props) => {
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" })
3215
+ return /* @__PURE__ */ jsxs29(React45.Fragment, { children: [
3216
+ props.isDataFound == null && /* @__PURE__ */ jsx57("div", { className: "", children: /* @__PURE__ */ jsxs29("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
3217
+ /* @__PURE__ */ jsxs29("div", { className: "flex items-center mb-4", children: [
3218
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
3219
+ /* @__PURE__ */ jsxs29("div", { className: "ml-2", children: [
3220
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
3221
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
3065
3222
  ] })
3066
3223
  ] }),
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" })
3224
+ /* @__PURE__ */ jsxs29("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
3225
+ /* @__PURE__ */ jsxs29("div", { className: "animate-pulse", children: [
3226
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
3227
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
3228
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
3229
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
3230
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
3074
3231
  ] }),
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" })
3232
+ /* @__PURE__ */ jsxs29("div", { className: "animate-pulse", children: [
3233
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
3234
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
3235
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
3236
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
3237
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
3081
3238
  ] }),
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" })
3239
+ /* @__PURE__ */ jsxs29("div", { className: "animate-pulse", children: [
3240
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
3241
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
3242
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
3243
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
3244
+ /* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
3088
3245
  ] })
3089
3246
  ] })
3090
3247
  ] }) }),
@@ -3094,12 +3251,12 @@ var IFrameLoaderView = (props) => {
3094
3251
  var IFrameLoaderView_default = IFrameLoaderView;
3095
3252
 
3096
3253
  // src/components/pageRenderingEngine/nodes/IframeClient.tsx
3097
- import { jsx as jsx57 } from "react/jsx-runtime";
3254
+ import { jsx as jsx58 } from "react/jsx-runtime";
3098
3255
  var IframeClient = ({ src }) => {
3099
- const iframeRef = useRef3(null);
3100
- const [iframeHeight, setIframeHeight] = useState8("100%");
3101
- const [isDataFound, setIsDataFound] = useState8(null);
3102
- useEffect7(() => {
3256
+ const iframeRef = useRef4(null);
3257
+ const [iframeHeight, setIframeHeight] = useState9("100%");
3258
+ const [isDataFound, setIsDataFound] = useState9(null);
3259
+ useEffect8(() => {
3103
3260
  const handleReceiveMessage = (event) => {
3104
3261
  const eventName = event?.data?.eventName;
3105
3262
  const payload = event?.data?.payload;
@@ -3114,7 +3271,7 @@ var IframeClient = ({ src }) => {
3114
3271
  window.addEventListener("message", handleReceiveMessage);
3115
3272
  return () => window.removeEventListener("message", handleReceiveMessage);
3116
3273
  }, []);
3117
- useEffect7(() => {
3274
+ useEffect8(() => {
3118
3275
  const handleResize = () => {
3119
3276
  if (iframeRef.current) {
3120
3277
  iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
@@ -3126,7 +3283,7 @@ var IframeClient = ({ src }) => {
3126
3283
  const handleIframeLoad = () => {
3127
3284
  setIsDataFound(true);
3128
3285
  };
3129
- return /* @__PURE__ */ jsx57(React46.Fragment, { children: /* @__PURE__ */ jsx57(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ jsx57(
3286
+ return /* @__PURE__ */ jsx58(React46.Fragment, { children: /* @__PURE__ */ jsx58(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ jsx58(
3130
3287
  "iframe",
3131
3288
  {
3132
3289
  ref: iframeRef,
@@ -3140,7 +3297,7 @@ var IframeClient = ({ src }) => {
3140
3297
  var IframeClient_default = IframeClient;
3141
3298
 
3142
3299
  // src/components/pageRenderingEngine/nodes/EmbedNode.tsx
3143
- import { jsx as jsx58 } from "react/jsx-runtime";
3300
+ import { jsx as jsx59 } from "react/jsx-runtime";
3144
3301
  var EmbedNode = (props) => {
3145
3302
  let src;
3146
3303
  if (props.node.provider == "youtube") {
@@ -3150,13 +3307,13 @@ var EmbedNode = (props) => {
3150
3307
  } else {
3151
3308
  src = props.node.embedSrc;
3152
3309
  }
3153
- return /* @__PURE__ */ jsx58("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx58(IframeClient_default, { src }) });
3310
+ return /* @__PURE__ */ jsx59("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx59(IframeClient_default, { src }) });
3154
3311
  };
3155
3312
  var EmbedNode_default = EmbedNode;
3156
3313
 
3157
3314
  // src/components/pageRenderingEngine/nodes/VideoNode.tsx
3158
3315
  import React47 from "react";
3159
- import { jsx as jsx59 } from "react/jsx-runtime";
3316
+ import { jsx as jsx60 } from "react/jsx-runtime";
3160
3317
  var VideoNode = (props) => {
3161
3318
  let src;
3162
3319
  if (props.node.provider == "youtube") {
@@ -3164,12 +3321,12 @@ var VideoNode = (props) => {
3164
3321
  } else if (props.node.provider == "bunny") {
3165
3322
  src = `https://iframe.mediadelivery.net/embed/${props.node.videoId}?autoplay=false&loop=false&muted=false&preload=true&responsive=true`;
3166
3323
  }
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 }) });
3324
+ 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
3325
  };
3169
3326
  var VideoNode_default = VideoNode;
3170
3327
 
3171
3328
  // src/components/pageRenderingEngine/nodes/LayoutItemNode.tsx
3172
- import { jsx as jsx60 } from "react/jsx-runtime";
3329
+ import { jsx as jsx61 } from "react/jsx-runtime";
3173
3330
  var LayoutItemNode = (props) => {
3174
3331
  const NodeTypes2 = {
3175
3332
  ["paragraph"]: ParagraphNode_default,
@@ -3230,11 +3387,11 @@ var LayoutItemNode = (props) => {
3230
3387
  } else {
3231
3388
  updatedLayout = removeParagraphsAtStartAndEnd(props.node);
3232
3389
  }
3233
- return /* @__PURE__ */ jsx60(React48.Fragment, { children: /* @__PURE__ */ jsx60("div", { className: "layout-item " + cssClasses, style: { ...styles }, children: updatedLayout.children.map((node, index) => {
3390
+ return /* @__PURE__ */ jsx61(React48.Fragment, { children: /* @__PURE__ */ jsx61("div", { className: "layout-item " + cssClasses, style: { ...styles }, children: updatedLayout.children.map((node, index) => {
3234
3391
  {
3235
3392
  }
3236
3393
  const SelectedNode = NodeTypes2[node.type];
3237
- return /* @__PURE__ */ jsx60(React48.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx60(
3394
+ return /* @__PURE__ */ jsx61(React48.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx61(
3238
3395
  SelectedNode,
3239
3396
  {
3240
3397
  node,
@@ -3264,7 +3421,7 @@ var AssetUtility = class {
3264
3421
  var AssetUtility_default = AssetUtility;
3265
3422
 
3266
3423
  // src/components/pageRenderingEngine/nodes/LayoutContainerNode.tsx
3267
- import { Fragment as Fragment6, jsx as jsx61, jsxs as jsxs28 } from "react/jsx-runtime";
3424
+ import { Fragment as Fragment6, jsx as jsx62, jsxs as jsxs30 } from "react/jsx-runtime";
3268
3425
  var LayoutContainerNode = (props) => {
3269
3426
  const VERTICAL_ALIGNMENT_CLASSES = {
3270
3427
  start: "items-start",
@@ -3334,7 +3491,7 @@ var LayoutContainerNode = (props) => {
3334
3491
  if (backgroundLayers.length) {
3335
3492
  styles.background = backgroundLayers.join(", ");
3336
3493
  }
3337
- const renderChildren = () => props.node.children?.map((node, index) => /* @__PURE__ */ jsx61(
3494
+ const renderChildren = () => props.node.children?.map((node, index) => /* @__PURE__ */ jsx62(
3338
3495
  LayoutItemNode_default,
3339
3496
  {
3340
3497
  node,
@@ -3348,8 +3505,8 @@ var LayoutContainerNode = (props) => {
3348
3505
  },
3349
3506
  index
3350
3507
  ));
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(
3508
+ return /* @__PURE__ */ jsxs30(Fragment6, { children: [
3509
+ sectionWidth === "mixed" && /* @__PURE__ */ jsx62("div", { className: cssClasses, style: styles, children: /* @__PURE__ */ jsx62("div", { className: "container", children: /* @__PURE__ */ jsx62(
3353
3510
  "div",
3354
3511
  {
3355
3512
  className: `grid gap-y-4 lg:gap-y-0 ${gridCssClasses} ${addPadding ? "py-8 lg:py-6" : ""}`,
@@ -3357,7 +3514,7 @@ var LayoutContainerNode = (props) => {
3357
3514
  children: renderChildren()
3358
3515
  }
3359
3516
  ) }) }),
3360
- sectionWidth === "full" && /* @__PURE__ */ jsx61(
3517
+ sectionWidth === "full" && /* @__PURE__ */ jsx62(
3361
3518
  "div",
3362
3519
  {
3363
3520
  className: `grid gap-y-4 lg:gap-y-0 ${cssClasses} ${gridCssClasses} ${addPadding ? "p-8 lg:p-0" : ""}`,
@@ -3365,7 +3522,7 @@ var LayoutContainerNode = (props) => {
3365
3522
  children: renderChildren()
3366
3523
  }
3367
3524
  ),
3368
- sectionWidth === "fixed" && /* @__PURE__ */ jsx61("div", { className: "container", children: /* @__PURE__ */ jsx61(
3525
+ sectionWidth === "fixed" && /* @__PURE__ */ jsx62("div", { className: "container", children: /* @__PURE__ */ jsx62(
3369
3526
  "div",
3370
3527
  {
3371
3528
  className: `grid gap-y-4 lg:gap-y-0 ${cssClasses} ${gridCssClasses} ${addPadding ? "px-8 py-6 lg:px-6 lg:py-6" : ""}`,
@@ -3378,12 +3535,12 @@ var LayoutContainerNode = (props) => {
3378
3535
  var LayoutContainerNode_default = LayoutContainerNode;
3379
3536
 
3380
3537
  // src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
3381
- import React49, { useRef as useRef4, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect8 } from "react";
3538
+ import React49, { useRef as useRef5, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect9 } from "react";
3382
3539
 
3383
3540
  // src/components/pageRenderingEngine/nodes/InputControlNode.tsx
3384
- import { jsx as jsx62 } from "react/jsx-runtime";
3541
+ import { jsx as jsx63 } from "react/jsx-runtime";
3385
3542
  var InputControlNode = (props) => {
3386
- return /* @__PURE__ */ jsx62("div", { children: /* @__PURE__ */ jsx62(
3543
+ return /* @__PURE__ */ jsx63("div", { children: /* @__PURE__ */ jsx63(
3387
3544
  InputControl_default,
3388
3545
  {
3389
3546
  name: props.node.name,
@@ -3412,13 +3569,13 @@ var InputControlNode = (props) => {
3412
3569
  var InputControlNode_default = InputControlNode;
3413
3570
 
3414
3571
  // src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
3415
- import { jsx as jsx63, jsxs as jsxs29 } from "react/jsx-runtime";
3572
+ import { jsx as jsx64, jsxs as jsxs31 } from "react/jsx-runtime";
3416
3573
  var FormContainerNode = (props) => {
3417
3574
  const NodeTypes2 = {
3418
3575
  ["input-control"]: InputControlNode_default
3419
3576
  };
3420
3577
  const { node } = props;
3421
- const formRef = useRef4(null);
3578
+ const formRef = useRef5(null);
3422
3579
  const initialState = {
3423
3580
  inputValues: {},
3424
3581
  lastPropertyChanged: ""
@@ -3435,7 +3592,7 @@ var FormContainerNode = (props) => {
3435
3592
  return true;
3436
3593
  }
3437
3594
  };
3438
- useEffect8(() => {
3595
+ useEffect9(() => {
3439
3596
  const fetchInitialData = async () => {
3440
3597
  if (!props.fetchData || !node.dataFetchApi) return;
3441
3598
  const response = await props.fetchData(
@@ -3452,12 +3609,12 @@ var FormContainerNode = (props) => {
3452
3609
  };
3453
3610
  fetchInitialData();
3454
3611
  }, [props.fetchData, node.dataFetchApi, props.routeParameters]);
3455
- return /* @__PURE__ */ jsxs29("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
3612
+ return /* @__PURE__ */ jsxs31("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
3456
3613
  node.children && node.children.map((node2, index) => {
3457
3614
  {
3458
3615
  }
3459
3616
  const SelectedNode = NodeTypes2[node2.type];
3460
- return /* @__PURE__ */ jsx63(React49.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx63(
3617
+ return /* @__PURE__ */ jsx64(React49.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx64(
3461
3618
  InputControlNode_default,
3462
3619
  {
3463
3620
  value: formState.inputValues[node2.name],
@@ -3466,74 +3623,823 @@ var FormContainerNode = (props) => {
3466
3623
  }
3467
3624
  ) }, index);
3468
3625
  }),
3469
- node.children.length == 0 && /* @__PURE__ */ jsx63("div", { className: "py-0.5 lg:py-1.5" })
3626
+ node.children.length == 0 && /* @__PURE__ */ jsx64("div", { className: "py-0.5 lg:py-1.5" })
3470
3627
  ] });
3471
3628
  };
3472
3629
  var FormContainerNode_default = FormContainerNode;
3473
3630
 
3474
3631
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
3475
- import React50 from "react";
3476
- import Link3 from "next/link";
3477
- import { jsx as jsx64, jsxs as jsxs30 } from "react/jsx-runtime";
3478
- var DivContainer = (props) => {
3479
- const { cssProperties: styles, hoverCssProperties: hoverStyles, mobileCssProperties: mobileStyles } = props.node;
3480
- const updatedStyles = convertKeysToCamelCase(styles);
3481
- const NodeTypes2 = {
3482
- ["paragraph"]: ParagraphNode_default,
3483
- ["heading"]: HeadingNode_default,
3484
- ["list"]: ListNode_default,
3485
- ["quote"]: QuoteNode_default,
3486
- ["code"]: CodeNode_default,
3487
- ["image"]: ImageNode_default,
3488
- ["horizontalrule"]: HorizontalRuleNode_default,
3489
- ["layout-container"]: LayoutContainerNode_default,
3490
- ["widget"]: WidgetNode_default,
3491
- ["embed"]: EmbedNode_default,
3492
- ["div-container"]: DivContainer,
3493
- ["text"]: TextNode_default,
3494
- ["datafield"]: DatafieldNode_default,
3495
- ["svg-icon"]: SVGIconNode_default
3632
+ import React53 from "react";
3633
+
3634
+ // src/components/utilities/AnimationUtility.tsx
3635
+ var AnimationUtility = class {
3636
+ static generateAnimationCSS(config, guid) {
3637
+ const {
3638
+ duration = 700,
3639
+ delay = 0,
3640
+ easing = "ease-out",
3641
+ distance = 30,
3642
+ scaleStart = 1,
3643
+ scaleEnd = 1.2,
3644
+ repeat = 1,
3645
+ intensity = 20,
3646
+ speedPerChar = 100,
3647
+ cursor = true,
3648
+ mode = "enter",
3649
+ direction = "left"
3650
+ // Default direction
3651
+ } = config;
3652
+ let base = "", visible = "", keyframes = "";
3653
+ switch (config.animation) {
3654
+ case "Fade":
3655
+ base = `opacity:0; transition:opacity ${duration}ms ${easing} ${delay}ms;`;
3656
+ visible = `opacity:1;`;
3657
+ break;
3658
+ case "FadeInUp":
3659
+ base = `opacity:0; transform:translateY(${distance}px); transition:all ${duration}ms ${easing} ${delay}ms;`;
3660
+ visible = `opacity:1; transform:translateY(0);`;
3661
+ break;
3662
+ case "Slide":
3663
+ const slideTransform = this.getSlideTransform(direction, distance);
3664
+ base = `opacity:0; transform:${slideTransform.start}; transition:all ${duration}ms ${easing} ${delay}ms; will-change: transform, opacity;`;
3665
+ visible = `opacity:1; transform:${slideTransform.end}; will-change: unset;`;
3666
+ break;
3667
+ case "ZoomIn":
3668
+ if (mode === "enter") {
3669
+ base = `opacity:0; transform:scale(${scaleStart}); transition:all ${duration}ms ${easing} ${delay}ms;`;
3670
+ visible = `opacity:1; transform:scale(${scaleEnd});`;
3671
+ } else {
3672
+ base = `transform:scale(${scaleStart}); transition:transform ${duration / 1e3}s ${easing} ${delay / 1e3}s;`;
3673
+ visible = `transform:scale(${scaleEnd});`;
3674
+ }
3675
+ break;
3676
+ case "Bounce":
3677
+ keyframes = `
3678
+ @keyframes bounce {
3679
+ 0%,20%,50%,80%,100% { transform: translateY(0); }
3680
+ 40% { transform: translateY(-${intensity}px); }
3681
+ 60% { transform: translateY(-${intensity / 2}px); }
3682
+ }
3683
+ `;
3684
+ if (mode === "enter") {
3685
+ base = `opacity:0;`;
3686
+ visible = `opacity:1; animation:bounce ${duration}ms ${easing} ${delay}ms ${repeat};`;
3687
+ } else {
3688
+ base = ``;
3689
+ visible = `animation:bounce ${duration / 1e3}s ${easing} ${delay / 1e3}s ${repeat};`;
3690
+ }
3691
+ break;
3692
+ case "Typewriter":
3693
+ keyframes = `
3694
+ @keyframes typewriter { from { width: 0 } to { width: 100% } }
3695
+ @keyframes blink { 50% { border-color: transparent } }
3696
+ `;
3697
+ base = `
3698
+ overflow:hidden;
3699
+ border-right:${cursor ? "2px solid black" : "none"};
3700
+ white-space:nowrap;
3701
+ width:0;
3702
+ margin:0 auto;
3703
+ `;
3704
+ visible = `
3705
+ animation:typewriter ${speedPerChar * 30}ms steps(30,end) ${delay}ms forwards
3706
+ ${cursor ? ", blink .75s step-end infinite" : ""};
3707
+ `;
3708
+ break;
3709
+ }
3710
+ if (mode === "hover") {
3711
+ return `
3712
+ ${keyframes}
3713
+ ${guid} { ${base} }
3714
+ ${guid}:hover { ${visible} }
3715
+ `;
3716
+ } else {
3717
+ return `
3718
+ ${keyframes}
3719
+ ${guid} { ${base} }
3720
+ ${guid}.visible { ${visible} }
3721
+ `;
3722
+ }
3723
+ }
3724
+ // Helper method to generate slide transforms based on direction
3725
+ static getSlideTransform(direction, distance) {
3726
+ switch (direction) {
3727
+ case "left":
3728
+ return { start: `translateX(${distance}px)`, end: `translateX(0)` };
3729
+ case "right":
3730
+ return { start: `translateX(-${distance}px)`, end: `translateX(0)` };
3731
+ case "up":
3732
+ return { start: `translateY(${distance}px)`, end: `translateY(0)` };
3733
+ case "down":
3734
+ return { start: `translateY(-${distance}px)`, end: `translateY(0)` };
3735
+ default:
3736
+ return { start: `translateX(${distance}px)`, end: `translateX(0)` };
3737
+ }
3738
+ }
3739
+ };
3740
+ var AnimationUtility_default = AnimationUtility;
3741
+
3742
+ // src/components/Pagination.tsx
3743
+ import { useMemo } from "react";
3744
+ import { jsx as jsx65, jsxs as jsxs32 } from "react/jsx-runtime";
3745
+ var Pagination = (props) => {
3746
+ const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
3747
+ const builder = useMemo(() => {
3748
+ const b = new OdataBuilder(path);
3749
+ if (query) b.setQuery(query);
3750
+ return b;
3751
+ }, [path, query]);
3752
+ const activePageNumber = builder.getPageNumber(Constants.pagesize);
3753
+ const totalItems = dataset?.count || 0;
3754
+ const itemsPerPage = parseInt(builder.top || Constants.pagesize.toString());
3755
+ const totalPages = Math.ceil(totalItems / itemsPerPage);
3756
+ const startItem = totalItems > 0 ? (activePageNumber - 1) * itemsPerPage + 1 : 0;
3757
+ const endItem = Math.min(activePageNumber * itemsPerPage, totalItems);
3758
+ const getPaginationRange = () => {
3759
+ const delta = 1;
3760
+ const range = [];
3761
+ if (totalPages <= 7) {
3762
+ return Array.from({ length: totalPages }, (_, i) => i + 1);
3763
+ }
3764
+ range.push(1);
3765
+ let start = Math.max(2, activePageNumber - delta);
3766
+ let end = Math.min(totalPages - 1, activePageNumber + delta);
3767
+ if (activePageNumber - delta <= 2) {
3768
+ end = Math.min(totalPages - 1, 4);
3769
+ }
3770
+ if (activePageNumber + delta >= totalPages - 1) {
3771
+ start = Math.max(2, totalPages - 4);
3772
+ }
3773
+ if (start > 2) {
3774
+ range.push("...");
3775
+ }
3776
+ for (let i = start; i <= end; i++) {
3777
+ range.push(i);
3778
+ }
3779
+ if (end < totalPages - 1) {
3780
+ range.push("...");
3781
+ }
3782
+ if (totalPages > 1) {
3783
+ range.push(totalPages);
3784
+ }
3785
+ return range;
3496
3786
  };
3497
- function toCamelCase(str) {
3498
- return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
3787
+ const paginationRange = getPaginationRange();
3788
+ const PageButton = ({ page, children }) => /* @__PURE__ */ jsx65(
3789
+ Hyperlink,
3790
+ {
3791
+ linkType: "Link" /* Link */,
3792
+ className: `
3793
+ min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2.5 md:px-3
3794
+ border text-sm font-medium transition-colors duration-150
3795
+ ${activePageNumber === page ? "bg-primary-base font-semibold" : ""}
3796
+ `,
3797
+ href: builder.getNewPageUrl(page),
3798
+ children
3799
+ }
3800
+ );
3801
+ const NavigationButton = ({ page, disabled, children }) => {
3802
+ if (disabled) {
3803
+ return /* @__PURE__ */ jsx65("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 });
3804
+ }
3805
+ return /* @__PURE__ */ jsx65(
3806
+ Hyperlink,
3807
+ {
3808
+ 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",
3809
+ href: builder.getNewPageUrl(page),
3810
+ children
3811
+ }
3812
+ );
3813
+ };
3814
+ if (totalPages <= 1 && totalItems === 0) return null;
3815
+ return /* @__PURE__ */ jsxs32("div", { className: "py-6 border-t bg-default", children: [
3816
+ /* @__PURE__ */ jsxs32("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
3817
+ /* @__PURE__ */ jsxs32("div", { className: "text-sm", children: [
3818
+ "Showing ",
3819
+ /* @__PURE__ */ jsxs32("span", { className: "font-semibold", children: [
3820
+ startItem,
3821
+ "-",
3822
+ endItem
3823
+ ] }),
3824
+ " ",
3825
+ "out of ",
3826
+ /* @__PURE__ */ jsx65("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
3827
+ " results"
3828
+ ] }),
3829
+ totalPages > 1 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-1", children: [
3830
+ /* @__PURE__ */ jsxs32(
3831
+ NavigationButton,
3832
+ {
3833
+ page: activePageNumber - 1,
3834
+ disabled: activePageNumber === 1,
3835
+ children: [
3836
+ /* @__PURE__ */ jsx65("span", { children: /* @__PURE__ */ jsx65(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
3837
+ /* @__PURE__ */ jsx65("span", { className: "text-sm", children: "Prev" })
3838
+ ]
3839
+ }
3840
+ ),
3841
+ paginationRange.map((item, index) => {
3842
+ if (item === "...") {
3843
+ return /* @__PURE__ */ jsx65(
3844
+ "span",
3845
+ {
3846
+ className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
3847
+ children: "..."
3848
+ },
3849
+ `ellipsis-${index}`
3850
+ );
3851
+ }
3852
+ const page = item;
3853
+ return /* @__PURE__ */ jsx65(PageButton, { page, children: page }, page);
3854
+ }),
3855
+ /* @__PURE__ */ jsxs32(
3856
+ NavigationButton,
3857
+ {
3858
+ page: activePageNumber + 1,
3859
+ disabled: activePageNumber === totalPages,
3860
+ children: [
3861
+ /* @__PURE__ */ jsx65("span", { className: "text-sm", children: "Next" }),
3862
+ /* @__PURE__ */ jsx65("span", { children: /* @__PURE__ */ jsx65(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
3863
+ ]
3864
+ }
3865
+ )
3866
+ ] }),
3867
+ showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
3868
+ /* @__PURE__ */ jsx65("span", { className: "text-sm", children: "Go to:" }),
3869
+ /* @__PURE__ */ jsx65("div", { className: "relative", children: /* @__PURE__ */ jsx65(
3870
+ "input",
3871
+ {
3872
+ type: "number",
3873
+ min: "1",
3874
+ max: totalPages,
3875
+ defaultValue: activePageNumber,
3876
+ className: "w-20 h-10 px-3 border rounded text-sm focus:outline-none focus:ring-2 focus:border-transparent",
3877
+ onKeyDown: (e) => {
3878
+ if (e.key === "Enter") {
3879
+ const input = e.target;
3880
+ const page = parseInt(input.value);
3881
+ if (page >= 1 && page <= totalPages && page !== activePageNumber) {
3882
+ window.location.href = builder.getNewPageUrl(page);
3883
+ }
3884
+ }
3885
+ }
3886
+ }
3887
+ ) })
3888
+ ] })
3889
+ ] }),
3890
+ showPageSizeSelector && /* @__PURE__ */ jsx65("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-center space-x-2", children: [
3891
+ /* @__PURE__ */ jsx65("span", { className: "text-sm", children: "Show:" }),
3892
+ /* @__PURE__ */ jsx65("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx65(
3893
+ Hyperlink,
3894
+ {
3895
+ className: `
3896
+ px-3 py-1 text-sm rounded border transition-colors duration-150
3897
+ ${itemsPerPage === size ? "bg-primary-base font-medium" : "bg-neutral-weak"}
3898
+ `,
3899
+ href: builder.getNewPageSizeUrl(size),
3900
+ children: size
3901
+ },
3902
+ size
3903
+ )) }),
3904
+ /* @__PURE__ */ jsx65("span", { className: "text-sm", children: "per page" })
3905
+ ] }) })
3906
+ ] });
3907
+ };
3908
+ var Pagination_default = Pagination;
3909
+
3910
+ // src/components/utilities/PathUtility.tsx
3911
+ var PathUtility = class {
3912
+ constructor() {
3499
3913
  }
3500
- function convertKeysToCamelCase(obj) {
3501
- if (!obj || typeof obj !== "object") return obj;
3502
- if (Array.isArray(obj)) {
3503
- return obj.map(convertKeysToCamelCase);
3914
+ normalizePath(path) {
3915
+ if (path == null) {
3916
+ return "/";
3504
3917
  }
3505
- return Object.fromEntries(
3506
- Object.entries(obj).filter(([_, value]) => value !== "" && value !== void 0).map(([key, value]) => [
3507
- toCamelCase(key),
3508
- convertKeysToCamelCase(value)
3509
- // Recursively convert nested objects
3510
- ])
3918
+ const trimmedPath = path.replace(/^\/|\/$/g, "");
3919
+ return trimmedPath === "" ? "/" : "/" + trimmedPath + "/";
3920
+ }
3921
+ joinAndNormalizePaths(path1, path2) {
3922
+ path1 = path1.replace(/\/$/, "");
3923
+ path2 = path2.replace(/^\//, "");
3924
+ const joinedPath = `${path1}/${path2}`;
3925
+ const normalizedPath = joinedPath.replace(/\/{2,}/g, "/");
3926
+ return normalizedPath === "" ? "/" : "/" + normalizedPath;
3927
+ }
3928
+ removeLeadingAndTrailingSlashes(path) {
3929
+ if (path == null) {
3930
+ return "/";
3931
+ }
3932
+ const trimmedPath = path.replace(/^\/|\/$/g, "");
3933
+ return trimmedPath;
3934
+ }
3935
+ removeTrailingSlash(path) {
3936
+ if (path == null) {
3937
+ return "/";
3938
+ }
3939
+ const trimmedPath = path.replace(/\/$/, "");
3940
+ return trimmedPath;
3941
+ }
3942
+ joinPaths(path1, path2) {
3943
+ if (!path1.endsWith("/") && !path2.startsWith("/")) {
3944
+ return `${path1}/${path2}`;
3945
+ } else if (path1.endsWith("/") && path2.startsWith("/")) {
3946
+ return `${path1}${path2.substr(1)}`;
3947
+ } else {
3948
+ return `${path1}${path2}`;
3949
+ }
3950
+ }
3951
+ getFirstSegment(path) {
3952
+ if (!path || path === "/") {
3953
+ return "";
3954
+ }
3955
+ const segments = path.split("/").filter(Boolean);
3956
+ return segments.length > 0 ? segments[0] : "";
3957
+ }
3958
+ };
3959
+ var PathUtility_default = new PathUtility();
3960
+
3961
+ // src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
3962
+ import React51, { useEffect as useEffect10, useRef as useRef6 } from "react";
3963
+ import { Fragment as Fragment7, jsx as jsx66 } from "react/jsx-runtime";
3964
+ function EnterAnimationClient({ hasEnterAnimation, children }) {
3965
+ const ref = useRef6(null);
3966
+ useEffect10(() => {
3967
+ if (!hasEnterAnimation || !ref.current) return;
3968
+ const observer = new IntersectionObserver(
3969
+ (entries) => {
3970
+ entries.forEach((entry) => {
3971
+ if (entry.isIntersecting) {
3972
+ entry.target.classList.add("visible");
3973
+ observer.unobserve(entry.target);
3974
+ }
3975
+ });
3976
+ },
3977
+ { threshold: 0.1 }
3978
+ );
3979
+ observer.observe(ref.current);
3980
+ return () => observer.disconnect();
3981
+ }, [hasEnterAnimation]);
3982
+ return /* @__PURE__ */ jsx66(Fragment7, { children: children && // enforce passing the ref to Wrapper
3983
+ //@ts-ignore
3984
+ React51.cloneElement(children, { ref }) });
3985
+ }
3986
+
3987
+ // src/components/Slider.tsx
3988
+ import { useState as useState11, useEffect as useEffect11, Children, cloneElement } from "react";
3989
+ import { Fragment as Fragment8, jsx as jsx67, jsxs as jsxs33 } from "react/jsx-runtime";
3990
+ var Slider = ({
3991
+ children,
3992
+ slidesToShow = 4,
3993
+ infinite_scroll = false,
3994
+ autoplay = false,
3995
+ autoplay_speed = 3e3,
3996
+ show_arrows = false,
3997
+ show_dots = false,
3998
+ scaleOnHover = false,
3999
+ className = "",
4000
+ arrowClassName = "bg-black/50 hover:bg-black/80 text-white rounded-full w-10 h-10 flex items-center justify-center",
4001
+ dotActiveClassName = "bg-gray-300",
4002
+ dotInactiveClassName = "bg-gray-600",
4003
+ gap,
4004
+ pillStyle = "cumulative",
4005
+ progressPosition = "bottom"
4006
+ }) => {
4007
+ const [currentSlide, setCurrentSlide] = useState11(0);
4008
+ const [transition, setTransition] = useState11(true);
4009
+ const [slidesToShowState, setSlidesToShowState] = useState11(
4010
+ typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
4011
+ );
4012
+ const [isPlaying, setIsPlaying] = useState11(autoplay);
4013
+ useEffect11(() => {
4014
+ if (typeof slidesToShow === "number") return;
4015
+ const handleResize = () => {
4016
+ if (window.innerWidth >= 1024) {
4017
+ setSlidesToShowState(slidesToShow.large);
4018
+ } else if (window.innerWidth >= 768) {
4019
+ setSlidesToShowState(slidesToShow.medium);
4020
+ } else {
4021
+ setSlidesToShowState(slidesToShow.small);
4022
+ }
4023
+ };
4024
+ handleResize();
4025
+ window.addEventListener("resize", handleResize);
4026
+ return () => window.removeEventListener("resize", handleResize);
4027
+ }, [slidesToShow]);
4028
+ useEffect11(() => {
4029
+ if (!autoplay) return;
4030
+ const timer = setInterval(() => {
4031
+ if (isPlaying) {
4032
+ nextSlide();
4033
+ }
4034
+ }, autoplay_speed);
4035
+ return () => clearInterval(timer);
4036
+ }, [autoplay, autoplay_speed, currentSlide, isPlaying]);
4037
+ const totalSlides = Children.count(children);
4038
+ const maxSlide = totalSlides - slidesToShowState;
4039
+ const nextSlide = () => {
4040
+ if (currentSlide >= maxSlide) {
4041
+ if (infinite_scroll) {
4042
+ setTransition(true);
4043
+ setCurrentSlide(0);
4044
+ }
4045
+ } else {
4046
+ setTransition(true);
4047
+ setCurrentSlide(currentSlide + 1);
4048
+ }
4049
+ };
4050
+ const prevSlide = () => {
4051
+ if (currentSlide <= 0) {
4052
+ if (infinite_scroll) {
4053
+ setTransition(true);
4054
+ setCurrentSlide(maxSlide);
4055
+ }
4056
+ } else {
4057
+ setTransition(true);
4058
+ setCurrentSlide(currentSlide - 1);
4059
+ }
4060
+ };
4061
+ const goToSlide = (index) => {
4062
+ setTransition(true);
4063
+ setCurrentSlide(index);
4064
+ };
4065
+ const handlePillClick = (index) => {
4066
+ goToSlide(index);
4067
+ if (autoplay) {
4068
+ setIsPlaying(true);
4069
+ }
4070
+ };
4071
+ const handleMouseEnter = () => {
4072
+ if (autoplay) {
4073
+ setIsPlaying(false);
4074
+ }
4075
+ };
4076
+ const handleMouseLeave = () => {
4077
+ if (autoplay) {
4078
+ setIsPlaying(true);
4079
+ }
4080
+ };
4081
+ const translateX = -currentSlide * (100 / slidesToShowState);
4082
+ const slides = Children.map(children, (child, index) => {
4083
+ return /* @__PURE__ */ jsx67(
4084
+ "div",
4085
+ {
4086
+ className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
4087
+ style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
4088
+ children: cloneElement(child, {
4089
+ className: `w-full`
4090
+ })
4091
+ },
4092
+ index
3511
4093
  );
4094
+ });
4095
+ const getProgressPositionClass = () => {
4096
+ switch (progressPosition) {
4097
+ case "top":
4098
+ return "top-4";
4099
+ case "bottom-outside":
4100
+ return "bottom-4 translate-y-full mt-4";
4101
+ case "bottom":
4102
+ default:
4103
+ return "bottom-4";
4104
+ }
4105
+ };
4106
+ return /* @__PURE__ */ jsxs33(
4107
+ "div",
4108
+ {
4109
+ className: `relative w-full overflow-hidden ${className}`,
4110
+ onMouseEnter: handleMouseEnter,
4111
+ onMouseLeave: handleMouseLeave,
4112
+ children: [
4113
+ /* @__PURE__ */ jsx67(
4114
+ "div",
4115
+ {
4116
+ className: "flex h-full",
4117
+ style: {
4118
+ transition: transition ? "transform 0.5s ease" : "none",
4119
+ transform: `translateX(${translateX}%)`
4120
+ },
4121
+ children: slides
4122
+ }
4123
+ ),
4124
+ show_arrows && /* @__PURE__ */ jsxs33(Fragment8, { children: [
4125
+ /* @__PURE__ */ jsx67(
4126
+ ArrowButton,
4127
+ {
4128
+ direction: "left",
4129
+ onClick: prevSlide,
4130
+ visible: infinite_scroll || currentSlide > 0,
4131
+ className: arrowClassName,
4132
+ children: /* @__PURE__ */ jsx67("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__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
4133
+ }
4134
+ ),
4135
+ /* @__PURE__ */ jsxs33(
4136
+ ArrowButton,
4137
+ {
4138
+ direction: "right",
4139
+ onClick: nextSlide,
4140
+ visible: infinite_scroll || currentSlide < maxSlide,
4141
+ className: arrowClassName,
4142
+ children: [
4143
+ /* @__PURE__ */ jsx67("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__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
4144
+ " "
4145
+ ]
4146
+ }
4147
+ )
4148
+ ] }),
4149
+ show_dots && /* @__PURE__ */ jsx67("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__ */ jsx67(
4150
+ ProgressPill,
4151
+ {
4152
+ active: index === currentSlide,
4153
+ duration: autoplay_speed,
4154
+ index,
4155
+ onClick: () => handlePillClick(index),
4156
+ isPlaying: isPlaying && index === currentSlide && autoplay,
4157
+ style: pillStyle,
4158
+ activeClassName: dotActiveClassName,
4159
+ inactiveClassName: dotInactiveClassName,
4160
+ currentSlide,
4161
+ totalSlides
4162
+ },
4163
+ index
4164
+ )) })
4165
+ ]
4166
+ }
4167
+ );
4168
+ };
4169
+ var ArrowButton = ({
4170
+ direction,
4171
+ onClick,
4172
+ visible,
4173
+ children,
4174
+ className = ""
4175
+ }) => /* @__PURE__ */ jsx67(
4176
+ "button",
4177
+ {
4178
+ className: `
4179
+ absolute top-1/2 -translate-y-1/2 z-10
4180
+ ${direction === "left" ? "left-2.5" : "right-2.5"}
4181
+ ${!visible && "hidden"}
4182
+ ${className}
4183
+ `,
4184
+ onClick,
4185
+ "aria-label": direction === "left" ? "Previous slide" : "Next slide",
4186
+ children
3512
4187
  }
3513
- function generateCompleteBackgroundString(layers) {
3514
- if (!layers || !Array.isArray(layers)) return "";
3515
- return layers.filter((layer) => layer && layer.type && layer.value).map((layer) => {
3516
- if (layer.type === "image" && layer.value && typeof layer.value === "object") {
3517
- const imageValue = layer.value;
3518
- if (!imageValue.assetUrl) return "";
3519
- const url = `url('${AssetUtility_default.resolveUrl("/api/images", imageValue.assetUrl)}')`;
3520
- const repeat = layer.repeat || "no-repeat";
3521
- const position = layer.position || "center";
3522
- const size = layer.size || "auto";
3523
- const attachment = layer.attachment || "scroll";
3524
- return `${url} ${position} / ${size} ${repeat} ${attachment}`;
3525
- }
3526
- if (layer.type === "gradient" && layer.value && typeof layer.value === "object") {
3527
- const gradient = layer.value;
3528
- if (!gradient.colors || !gradient.direction) return "";
3529
- const colors = gradient.colors.map(
3530
- (colorStop) => `color-mix(in srgb, ${colorStop.color}, transparent ${colorStop.transparency ?? 0}%) ${colorStop.start || "0%"}`
3531
- ).join(", ");
3532
- return `linear-gradient(${gradient.direction}, ${colors})`;
4188
+ );
4189
+ var ProgressPill = ({
4190
+ active,
4191
+ duration,
4192
+ index,
4193
+ onClick,
4194
+ isPlaying,
4195
+ style = "modern",
4196
+ activeClassName = "",
4197
+ inactiveClassName = "",
4198
+ currentSlide,
4199
+ totalSlides
4200
+ }) => {
4201
+ const [progress, setProgress] = useState11(0);
4202
+ useEffect11(() => {
4203
+ if (active) {
4204
+ setProgress(0);
4205
+ }
4206
+ }, [active, index]);
4207
+ useEffect11(() => {
4208
+ if (!active || !isPlaying) {
4209
+ if (!active) {
4210
+ setProgress(0);
3533
4211
  }
3534
- return "";
3535
- }).filter((bg) => bg.trim() !== "").join(", ");
4212
+ return;
4213
+ }
4214
+ const startTime = Date.now();
4215
+ const interval = setInterval(() => {
4216
+ const elapsed = Date.now() - startTime;
4217
+ const newProgress = elapsed / duration * 100;
4218
+ if (newProgress >= 100) {
4219
+ setProgress(100);
4220
+ clearInterval(interval);
4221
+ } else {
4222
+ setProgress(newProgress);
4223
+ }
4224
+ }, 50);
4225
+ return () => clearInterval(interval);
4226
+ }, [active, isPlaying, duration, index]);
4227
+ const isFilled = index < currentSlide;
4228
+ const isActive = index === currentSlide;
4229
+ const shouldShowProgress = isActive || style === "cumulative" && isFilled;
4230
+ const baseClasses = "cursor-pointer transition-all duration-300 ease-out";
4231
+ const getStyleClasses = () => {
4232
+ switch (style) {
4233
+ case "minimal":
4234
+ return `
4235
+ ${isActive ? "w-8" : "w-2"} h-2 rounded-full
4236
+ ${isActive ? activeClassName || "bg-white" : inactiveClassName || "bg-white/50"}
4237
+ hover:scale-110
4238
+ `;
4239
+ case "cumulative":
4240
+ return `
4241
+ w-4 h-1 rounded-full overflow-hidden relative
4242
+ ${isFilled ? activeClassName || "bg-white" : inactiveClassName || "bg-white/30"}
4243
+ `;
4244
+ case "modern":
4245
+ return `
4246
+ w-8 h-1.5 rounded-full overflow-hidden relative
4247
+ ${isActive ? inactiveClassName || "bg-white/30" : inactiveClassName || "bg-white/30"}
4248
+ hover:h-2
4249
+ `;
4250
+ case "default":
4251
+ default:
4252
+ return `
4253
+ w-6 h-1.5 rounded-full
4254
+ ${isActive ? activeClassName || "bg-white" : inactiveClassName || "bg-white/50"}
4255
+ hover:w-8
4256
+ `;
4257
+ }
4258
+ };
4259
+ const renderProgressBar = () => {
4260
+ if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
4261
+ const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
4262
+ return /* @__PURE__ */ jsx67(
4263
+ "div",
4264
+ {
4265
+ 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`,
4266
+ style: { width: `${displayProgress}%` }
4267
+ }
4268
+ );
4269
+ }
4270
+ return null;
4271
+ };
4272
+ const renderCumulativeFill = () => {
4273
+ if (style === "cumulative" && isFilled && !isActive) {
4274
+ return /* @__PURE__ */ jsx67(
4275
+ "div",
4276
+ {
4277
+ className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
4278
+ style: { width: "100%" }
4279
+ }
4280
+ );
4281
+ }
4282
+ return null;
4283
+ };
4284
+ return /* @__PURE__ */ jsxs33(
4285
+ "button",
4286
+ {
4287
+ className: `${baseClasses} ${getStyleClasses()}`,
4288
+ onClick,
4289
+ "aria-label": `Go to slide ${index + 1}`,
4290
+ "aria-current": isActive ? "true" : "false",
4291
+ children: [
4292
+ renderProgressBar(),
4293
+ renderCumulativeFill()
4294
+ ]
4295
+ }
4296
+ );
4297
+ };
4298
+ var Slider_default = Slider;
4299
+
4300
+ // src/components/NoDataFound.tsx
4301
+ import { jsx as jsx68, jsxs as jsxs34 } from "react/jsx-runtime";
4302
+ var NoDataFound = () => {
4303
+ return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
4304
+ /* @__PURE__ */ jsx68("div", { className: "mb-5", children: /* @__PURE__ */ jsx68("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx68(
4305
+ "svg",
4306
+ {
4307
+ className: "w-10 h-10",
4308
+ fill: "none",
4309
+ stroke: "currentColor",
4310
+ viewBox: "0 0 24 24",
4311
+ xmlns: "http://www.w3.org/2000/svg",
4312
+ children: /* @__PURE__ */ jsx68(
4313
+ "path",
4314
+ {
4315
+ strokeLinecap: "round",
4316
+ strokeLinejoin: "round",
4317
+ strokeWidth: "1.5",
4318
+ d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"
4319
+ }
4320
+ )
4321
+ }
4322
+ ) }) }),
4323
+ /* @__PURE__ */ jsx68("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
4324
+ /* @__PURE__ */ jsx68("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
4325
+ ] });
4326
+ };
4327
+ var NoDataFound_default = NoDataFound;
4328
+
4329
+ // src/components/pageRenderingEngine/nodes/DivContainer.tsx
4330
+ import { jsx as jsx69, jsxs as jsxs35 } from "react/jsx-runtime";
4331
+ function toCamelCase(str) {
4332
+ return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
4333
+ }
4334
+ function convertKeysToCamelCase(obj) {
4335
+ if (!obj || typeof obj !== "object") return obj;
4336
+ if (Array.isArray(obj)) return obj.map(convertKeysToCamelCase);
4337
+ return Object.fromEntries(
4338
+ Object.entries(obj).filter(([_, value]) => value !== "" && value !== void 0).map(([key, value]) => [
4339
+ toCamelCase(key),
4340
+ convertKeysToCamelCase(value)
4341
+ ])
4342
+ );
4343
+ }
4344
+ var getNestedValue = (obj, path) => {
4345
+ if (!obj || !path) return void 0;
4346
+ return path.split(".").reduce((current, key) => {
4347
+ return current && current[key] !== void 0 ? current[key] : void 0;
4348
+ }, obj);
4349
+ };
4350
+ function generateCompleteBackgroundString(layers) {
4351
+ if (!layers || !Array.isArray(layers)) return "";
4352
+ return layers.filter((layer) => layer && layer.type && layer.value).map((layer) => {
4353
+ if (layer.type === "image" && typeof layer.value === "object") {
4354
+ const imageValue = layer.value;
4355
+ if (!imageValue.assetUrl) return "";
4356
+ const url = `url('${AssetUtility_default.resolveUrl(
4357
+ ApiPathServerUtility.getApiPath(),
4358
+ imageValue.assetUrl
4359
+ )}')`;
4360
+ const repeat = layer.repeat || "no-repeat";
4361
+ const position = layer.position || "center";
4362
+ const size = layer.size || "auto";
4363
+ const attachment = layer.attachment || "scroll";
4364
+ return `${url} ${position} / ${size} ${repeat} ${attachment}`;
4365
+ }
4366
+ if (layer.type === "gradient" && typeof layer.value === "object") {
4367
+ const gradient = layer.value;
4368
+ if (!gradient.colors || !gradient.direction) return "";
4369
+ const colors = gradient.colors.map(
4370
+ (colorStop) => `color-mix(in srgb, ${colorStop.color}, transparent ${colorStop.transparency ?? 0}%) ${colorStop.start || "0%"}`
4371
+ ).join(", ");
4372
+ return `linear-gradient(${gradient.direction}, ${colors})`;
4373
+ }
4374
+ return "";
4375
+ }).filter((bg) => bg.trim() !== "").join(", ");
4376
+ }
4377
+ var generateCssString = (guid, stylesObject, mobileStylesObject) => {
4378
+ let gridColumns = stylesObject.gridTemplateColumns ? stylesObject.gridTemplateColumns.match(/\d+/g) : [];
4379
+ let hasGridProperties = gridColumns.length > 0;
4380
+ let largeCols = hasGridProperties ? parseInt(gridColumns[0]) : 4;
4381
+ let tabletColumns = hasGridProperties ? Math.ceil(parseInt(gridColumns[0]) / 2) : 2;
4382
+ let mobileColumns = 1;
4383
+ let cssRules = Object.entries(stylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4384
+ const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
4385
+ return `${cssKey}: ${value};`;
4386
+ });
4387
+ let css = `#${guid} {
4388
+ ${cssRules.join(
4389
+ "\n"
4390
+ )}
4391
+ transition: all 0.3s ease-in-out; }`;
4392
+ if (mobileStylesObject) {
4393
+ let mobileCssRules = Object.entries(mobileStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4394
+ const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
4395
+ return `${cssKey}: ${value};`;
4396
+ });
4397
+ if (mobileCssRules.length > 0) {
4398
+ css += `
4399
+ @media (max-width: 480px) { #${guid} {
4400
+ ${mobileCssRules.join(
4401
+ "\n"
4402
+ )}
4403
+ } }`;
4404
+ }
3536
4405
  }
4406
+ if (hasGridProperties) {
4407
+ css += `
4408
+ @media (max-width: 1279px) { #${guid} { grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr)); } }`;
4409
+ css += `
4410
+ @media (max-width: 768px) { #${guid} { grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr)); } }`;
4411
+ css += `
4412
+ @media (max-width: 480px) { #${guid} { grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr)); } }`;
4413
+ }
4414
+ const output = {
4415
+ css,
4416
+ gridColsLarge: largeCols,
4417
+ gridColsMedium: tabletColumns,
4418
+ gridColsSmall: mobileColumns
4419
+ };
4420
+ return output;
4421
+ };
4422
+ var DivContainer = async (props) => {
4423
+ const NodeTypes2 = {
4424
+ paragraph: ParagraphNode_default,
4425
+ heading: HeadingNode_default,
4426
+ list: ListNode_default,
4427
+ quote: QuoteNode_default,
4428
+ code: CodeNode_default,
4429
+ image: ImageNode_default,
4430
+ horizontalrule: HorizontalRuleNode_default,
4431
+ "layout-container": LayoutContainerNode_default,
4432
+ widget: WidgetNode_default,
4433
+ embed: EmbedNode_default,
4434
+ "div-container": DivContainer,
4435
+ text: TextNode_default,
4436
+ datafield: DatafieldNode_default,
4437
+ "svg-icon": SVGIconNode_default
4438
+ };
4439
+ const styles = props.node.cssProperties;
4440
+ const mobileStyles = props.node.mobileCssProperties;
4441
+ const dataBindingProperties = props.node.dataBinding;
4442
+ const updatedStyles = convertKeysToCamelCase(styles);
3537
4443
  var background = generateCompleteBackgroundString(props.node.backgroundLayers);
3538
4444
  let containerPaddingClass = "";
3539
4445
  if (props.node.containerPadding == "small") {
@@ -3543,103 +4449,183 @@ var DivContainer = (props) => {
3543
4449
  }
3544
4450
  const updatedStyle = { ...updatedStyles };
3545
4451
  const backgroundStyle = background && background !== "" ? { background } : {};
4452
+ const combinedStyles = {
4453
+ ...backgroundStyle
4454
+ };
4455
+ if (props.node.enableBackgroundClipText) {
4456
+ combinedStyles.WebkitBackgroundClip = "text";
4457
+ combinedStyles.backgroundClip = "text";
4458
+ }
3546
4459
  const guid = "css" + crypto.randomUUID().toLocaleLowerCase();
3547
- const generateCssString = (stylesObject, hoverStylesObject, mobileStylesObject) => {
3548
- let gridColumns = stylesObject.gridTemplateColumns ? stylesObject.gridTemplateColumns.match(/\d+/g) : [];
3549
- let hasGridProperties = gridColumns.length > 0;
3550
- let tabletColumns = hasGridProperties ? Math.ceil(parseInt(gridColumns[0]) / 2) : 2;
3551
- let mobileColumns = 1;
3552
- let cssRules = Object.entries(stylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
3553
- const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
3554
- return `${cssKey}: ${value};`;
4460
+ const { enterAnimation, exitAnimation, hoverAnimation } = props.node;
4461
+ let animationCSS = "";
4462
+ if (enterAnimation?.name) {
4463
+ animationCSS += AnimationUtility_default.generateAnimationCSS(
4464
+ { animation: enterAnimation.name, mode: "enter", ...enterAnimation.properties },
4465
+ `#${guid}`
4466
+ );
4467
+ }
4468
+ if (hoverAnimation?.name) {
4469
+ animationCSS += AnimationUtility_default.generateAnimationCSS(
4470
+ { animation: hoverAnimation.name, mode: "hover", ...hoverAnimation.properties },
4471
+ `#${guid}`
4472
+ );
4473
+ }
4474
+ const shouldHideContainer = () => {
4475
+ if (!props.node.fieldVisibleOnTrue) return false;
4476
+ const fieldValue = getNestedValue(props.dataitem, props.node.fieldVisibleOnTrue);
4477
+ return fieldValue !== void 0 && fieldValue === false;
4478
+ };
4479
+ const isHidden = shouldHideContainer();
4480
+ let odataString = void 0;
4481
+ let endpoint = void 0;
4482
+ let result = null;
4483
+ let response = null;
4484
+ let childCollectionData = null;
4485
+ if (dataBindingProperties) {
4486
+ const serviceClient = new ServiceClient(props.apiBaseUrl, props.session);
4487
+ endpoint = dataBindingProperties.dataSource;
4488
+ endpoint = endpoint.replace(/\{(\w+)\}/g, (_, key) => {
4489
+ return props.routeParameters?.[key] ?? `{${key}}`;
3555
4490
  });
3556
- let css2 = `#${guid} {
3557
- ${cssRules.join("\n")}
3558
-
3559
- transition: all 0.3s ease-in-out;
3560
- }`;
3561
- if (hoverStylesObject) {
3562
- let hoverCssRules = Object.entries(hoverStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
3563
- const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
3564
- return `${cssKey}: ${value};`;
3565
- });
3566
- if (hoverCssRules.length > 0) {
3567
- css2 += `
3568
- #${guid}:hover {
3569
- ${hoverCssRules.join("\n")}
3570
- }`;
4491
+ if (dataBindingProperties.applyODataParams) {
4492
+ odataString = OdataBuilder.getOdataQueryString(props.query);
4493
+ if (odataString) {
4494
+ const separator = endpoint.includes("?") ? "&" : "?";
4495
+ endpoint += separator + odataString;
3571
4496
  }
3572
4497
  }
3573
- if (mobileStylesObject) {
3574
- let mobileCssRules = Object.entries(mobileStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
3575
- const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
3576
- return `${cssKey}: ${value};`;
3577
- });
3578
- if (mobileCssRules.length > 0) {
3579
- css2 += `
3580
- @media (max-width: 480px) { #${guid} {
3581
- ${mobileCssRules.join("\n")}
3582
- } }`;
4498
+ response = await serviceClient.get(endpoint);
4499
+ result = response?.result;
4500
+ if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
4501
+ return /* @__PURE__ */ jsx69(NoDataFound_default, {});
4502
+ }
4503
+ if (dataBindingProperties.childCollectionName && props.dataitem) {
4504
+ childCollectionData = getNestedValue(props.dataitem, dataBindingProperties.childCollectionName);
4505
+ }
4506
+ }
4507
+ const cssResult = generateCssString(guid, updatedStyle, mobileStyles);
4508
+ function renderNode(node, props2, dataitem, key, href) {
4509
+ const SelectedNode = NodeTypes2[node.type];
4510
+ if (!SelectedNode) return null;
4511
+ return /* @__PURE__ */ jsx69(React53.Fragment, { children: /* @__PURE__ */ jsx69(
4512
+ SelectedNode,
4513
+ {
4514
+ node,
4515
+ parentTag: Wrapper,
4516
+ routeParameters: props2.routeParameters,
4517
+ query: props2.query,
4518
+ session: props2.session,
4519
+ host: props2.host,
4520
+ path: props2.path,
4521
+ apiBaseUrl: props2.apiBaseUrl,
4522
+ breadcrumb: props2.breadcrumb,
4523
+ dataitem,
4524
+ href
4525
+ }
4526
+ ) }, key);
4527
+ }
4528
+ function renderChildren(nodes, props2, data, key, href) {
4529
+ if (!nodes) return null;
4530
+ const childNodes = nodes.map((node, index) => {
4531
+ if (node.type === "div-container" && node.dataBinding?.childCollectionName && data) {
4532
+ return renderNode(node, props2, data, index, href);
3583
4533
  }
4534
+ return renderNode(node, props2, data, index, href);
4535
+ });
4536
+ return childNodes;
4537
+ }
4538
+ function queryObjectToString(query) {
4539
+ if (!query) return "";
4540
+ return Object.entries(query).map(
4541
+ ([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`
4542
+ ).join("&");
4543
+ }
4544
+ function resolveHrefTemplate(template, dataItem) {
4545
+ return template.replace(/\{([^}]+)\}/g, (match, key) => {
4546
+ return dataItem[key] !== void 0 ? dataItem[key] : match;
4547
+ });
4548
+ }
4549
+ const dataToRender = (() => {
4550
+ if (childCollectionData && Array.isArray(childCollectionData)) {
4551
+ return childCollectionData;
3584
4552
  }
3585
- if (hasGridProperties) {
3586
- css2 += `
3587
- @media (max-width: 1279px) { #${guid} { grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr)); } }`;
3588
- css2 += `
3589
- @media (max-width: 768px) { #${guid} { grid-template-columns: repeat(${tabletColumns}, minmax(0, 1fr)); } }`;
3590
- css2 += `
3591
- @media (max-width: 480px) { #${guid} { grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr)); } }`;
4553
+ if (result && props.node.dataBinding?.responseType === "array") {
4554
+ return result;
3592
4555
  }
3593
- return css2;
3594
- };
3595
- const css = generateCssString(updatedStyle, hoverStyles, mobileStyles);
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(
3599
- "div",
4556
+ if (result && props.node.dataBinding?.responseType === "object") {
4557
+ return [result];
4558
+ }
4559
+ return [props.dataitem];
4560
+ })();
4561
+ const renderLink = result && props.node.dataBinding?.responseType === "array" ? true : false;
4562
+ let Wrapper;
4563
+ let wrapperProps;
4564
+ switch (true) {
4565
+ case props.node.componentProperties?.type === "slider":
4566
+ Wrapper = Slider_default;
4567
+ const largeCols = props.node.componentProperties?.columns || 4;
4568
+ const slidesToShow = {
4569
+ large: largeCols,
4570
+ medium: Math.ceil(largeCols / 2),
4571
+ small: 1
4572
+ };
4573
+ wrapperProps = { ...props.node.componentProperties, "slidesToShow": slidesToShow };
4574
+ break;
4575
+ case !!(props.node.href || props.href):
4576
+ Wrapper = "a";
4577
+ let href = props.node.href || props.href;
4578
+ if (href?.includes("{")) {
4579
+ href = resolveHrefTemplate(href, props.dataitem);
4580
+ }
4581
+ const currentPath = decodeURIComponent(PathUtility_default.removeTrailingSlash(props.path) + "?" + queryObjectToString(props.query));
4582
+ const resolvedHref = decodeURIComponent(href || "");
4583
+ const isSelected = currentPath === resolvedHref;
4584
+ wrapperProps = { href, "data-isSelected": isSelected, "data-path": currentPath, "data-href": resolvedHref, class: "no-link-color" };
4585
+ break;
4586
+ default: {
4587
+ const replacementTag = props.node.replaceDivTagWith;
4588
+ const allowedTags = ["div", "section", "article", "details", "summary"];
4589
+ if (replacementTag && allowedTags.includes(replacementTag)) {
4590
+ Wrapper = replacementTag;
4591
+ } else {
4592
+ Wrapper = "div";
4593
+ }
4594
+ wrapperProps = {};
4595
+ break;
4596
+ }
4597
+ }
4598
+ if (isHidden) {
4599
+ return null;
4600
+ }
4601
+ const classNames = [
4602
+ containerPaddingClass,
4603
+ props.node.autoFormat && "auto-format",
4604
+ props.node.bgClass
4605
+ ].filter(Boolean).join(" ");
4606
+ return /* @__PURE__ */ jsxs35(React53.Fragment, { children: [
4607
+ /* @__PURE__ */ jsx69("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
4608
+ /* @__PURE__ */ jsx69(EnterAnimationClient, { hasEnterAnimation: !!props.node.enterAnimation, children: /* @__PURE__ */ jsx69(React53.Fragment, { children: /* @__PURE__ */ jsx69(
4609
+ Wrapper,
3600
4610
  {
3601
4611
  id: guid,
3602
- style: { ...backgroundStyle, display: "block" },
3603
- className: containerPaddingClass,
3604
- children: props.node.children?.map((node, index) => {
3605
- const SelectedNode = NodeTypes2[node.type];
3606
- return /* @__PURE__ */ jsx64(React50.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx64(
3607
- SelectedNode,
3608
- {
3609
- node,
3610
- routeParameters: props.routeParameters,
3611
- query: props.query,
3612
- session: props.session,
3613
- host: props.host,
3614
- path: props.path,
3615
- apiBaseUrl: props.apiBaseUrl,
3616
- breadcrumb: props.breadcrumb
3617
- }
3618
- ) }, index);
3619
- })
4612
+ style: combinedStyles,
4613
+ className: classNames || void 0,
4614
+ ...wrapperProps,
4615
+ children: dataToRender.map(
4616
+ (item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
4617
+ (child, i) => /* @__PURE__ */ jsx69(React53.Fragment, { children: child }, i)
4618
+ ) : renderChildren(props.node.children, props, item, idx)
4619
+ )
3620
4620
  }
3621
- ) }) : /* @__PURE__ */ jsx64("div", { id: guid, style: { ...backgroundStyle }, className: containerPaddingClass, children: props.node.children && props.node.children.map((node, index) => {
3622
- const SelectedNode = NodeTypes2[node.type];
3623
- return /* @__PURE__ */ jsx64(React50.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx64(
3624
- SelectedNode,
3625
- {
3626
- node,
3627
- routeParameters: props.routeParameters,
3628
- query: props.query,
3629
- session: props.session,
3630
- host: props.host,
3631
- path: props.path,
3632
- apiBaseUrl: props.apiBaseUrl,
3633
- breadcrumb: props.breadcrumb
3634
- }
3635
- ) }, index);
3636
- }) })
4621
+ ) }) }),
4622
+ dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx69("div", { children: /* @__PURE__ */ jsx69(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
3637
4623
  ] });
3638
4624
  };
3639
4625
  var DivContainer_default = DivContainer;
3640
4626
 
3641
4627
  // src/components/pageRenderingEngine/PageBodyRenderer.tsx
3642
- import { jsx as jsx65 } from "react/jsx-runtime";
4628
+ import { jsx as jsx70 } from "react/jsx-runtime";
3643
4629
  var NodeTypes = {
3644
4630
  ["paragraph"]: ParagraphNode_default,
3645
4631
  ["heading"]: HeadingNode_default,
@@ -3667,11 +4653,11 @@ var PageBodyRenderer = (props) => {
3667
4653
  if (pageBodyTree && pageBodyTree.root) {
3668
4654
  rootNode = pageBodyTree.root;
3669
4655
  }
3670
- return /* @__PURE__ */ jsx65(React51.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
4656
+ return /* @__PURE__ */ jsx70(React54.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
3671
4657
  {
3672
4658
  }
3673
4659
  const SelectedNode = NodeTypes[node.type];
3674
- return /* @__PURE__ */ jsx65(React51.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx65(React51.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx65(React51.Fragment, { children: /* @__PURE__ */ jsx65(
4660
+ return /* @__PURE__ */ jsx70(React54.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx70(React54.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx70(React54.Fragment, { children: /* @__PURE__ */ jsx70(
3675
4661
  SelectedNode,
3676
4662
  {
3677
4663
  node,
@@ -3684,7 +4670,7 @@ var PageBodyRenderer = (props) => {
3684
4670
  apiBaseUrl: props.apiBaseUrl,
3685
4671
  widgetRegistry: props.widgetRegistry
3686
4672
  }
3687
- ) }) : /* @__PURE__ */ jsx65(React51.Fragment, { children: /* @__PURE__ */ jsx65(
4673
+ ) }) : /* @__PURE__ */ jsx70(React54.Fragment, { children: /* @__PURE__ */ jsx70(
3688
4674
  SelectedNode,
3689
4675
  {
3690
4676
  node,
@@ -3708,4 +4694,3 @@ export {
3708
4694
  ViewControl_default as ViewControl,
3709
4695
  ViewControlTypes_default as ViewControlTypes
3710
4696
  };
3711
- //# sourceMappingURL=index.mjs.map