@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260323130039 → 0.8.1-dev.20260324072940

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 CHANGED
@@ -79,6 +79,8 @@ var DateView = (props) => {
79
79
  let timezone;
80
80
  try {
81
81
  const val = props.value && props.value.toString().includes("Z") ? props.value : props.value + "Z";
82
+ {
83
+ }
82
84
  const parsedDate = new Date(val);
83
85
  const timezoneOffset = parsedDate.getTimezoneOffset();
84
86
  timezone = import_moment_timezone.default.tz.zone(import_moment_timezone.default.tz.guess())?.abbr(timezoneOffset);
@@ -196,6 +198,8 @@ var StatusView_default = Status;
196
198
  var import_react8 = __toESM(require("react"));
197
199
  var import_jsx_runtime8 = require("react/jsx-runtime");
198
200
  var Money = (props) => {
201
+ {
202
+ }
199
203
  const parsedNumber = parseFloat(props.value);
200
204
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react8.default.Fragment, { children: !Number.isNaN(parsedNumber) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: parsedNumber < 0 ? "text-alert" : "", children: [
201
205
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "mr-0.5", children: "\u20B9" }),
@@ -208,6 +212,8 @@ var MoneyView_default = Money;
208
212
  var import_react9 = __toESM(require("react"));
209
213
  var import_jsx_runtime9 = require("react/jsx-runtime");
210
214
  var MultilineTextBullets = (props) => {
215
+ {
216
+ }
211
217
  const lines = props.value?.split("\\n");
212
218
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react9.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ul", { className: "list-disc", children: lines && lines.map((line, index) => {
213
219
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: line }, index);
@@ -240,7 +246,7 @@ var ViewControl = import_react11.default.forwardRef(
240
246
  [ViewControlTypes_default.booleanView]: BooleanView_default
241
247
  // [ViewControlTypes.booleanView]: BooleanView
242
248
  };
243
- const SelectedControlComponent = ControlComponents[props.controlType];
249
+ const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
244
250
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react11.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectedControlComponent, { ...props }) : "Control not found" });
245
251
  }
246
252
  );
@@ -2541,17 +2547,17 @@ var DataList = (props) => {
2541
2547
  var DataList_default = DataList;
2542
2548
 
2543
2549
  // src/components/pageRenderingEngine/PageBodyRenderer.tsx
2544
- var import_react53 = __toESM(require("react"));
2550
+ var import_react51 = __toESM(require("react"));
2545
2551
 
2546
2552
  // src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
2547
2553
  var import_react36 = __toESM(require("react"));
2548
2554
 
2549
2555
  // src/components/pageRenderingEngine/nodes/TextNode.tsx
2550
- var import_jsx_runtime41 = require("react/jsx-runtime");
2556
+ var import_jsx_runtime41 = (
2557
+ // @ts-expect-error custom code
2558
+ require("react/jsx-runtime")
2559
+ );
2551
2560
  var TextNode = (props) => {
2552
- const NodeTypes2 = {
2553
- ["text"]: TextNode
2554
- };
2555
2561
  function cssStringToJson(cssString) {
2556
2562
  const styleObject = {};
2557
2563
  const matches = cssString?.match(/([\w-]+)\s*:\s*([^;]+)\s*;/g);
@@ -2599,7 +2605,11 @@ var TextNode = (props) => {
2599
2605
  }
2600
2606
  const styles = convertKeysToCamelCase2(cssStringToJson(props.node.style));
2601
2607
  function replacePlaceholders(template, dataItem) {
2608
+ {
2609
+ }
2602
2610
  return template.replace(/{(\w+)}/g, (_, key) => {
2611
+ {
2612
+ }
2603
2613
  return key in dataItem ? dataItem[key] : `{${key}}`;
2604
2614
  });
2605
2615
  }
@@ -2610,7 +2620,7 @@ var TextNode_default = TextNode;
2610
2620
 
2611
2621
  // src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
2612
2622
  var import_jsx_runtime42 = require("react/jsx-runtime");
2613
- var LineBreakNode = (props) => {
2623
+ var LineBreakNode = () => {
2614
2624
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "py-0.5 lg:py-1.5" });
2615
2625
  };
2616
2626
  var LineBreakNode_default = LineBreakNode;
@@ -2695,12 +2705,18 @@ var import_jsx_runtime46 = require("react/jsx-runtime");
2695
2705
  function getNestedProperty(obj, path) {
2696
2706
  if (!obj || !path) return null;
2697
2707
  if (path.includes(".")) {
2698
- return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
2699
- } else if (Array.isArray(obj[path])) {
2700
- return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: item }, index));
2701
- } else {
2702
- return obj[path];
2708
+ return path.split(".").reduce((prev, curr) => {
2709
+ if (prev && typeof prev === "object") {
2710
+ return prev[curr];
2711
+ }
2712
+ return null;
2713
+ }, obj);
2714
+ }
2715
+ const value = obj[path];
2716
+ if (Array.isArray(value)) {
2717
+ return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: String(item) }, index));
2703
2718
  }
2719
+ return value;
2704
2720
  }
2705
2721
  var DatafieldNode = (props) => {
2706
2722
  function cssStringToJson(cssString) {
@@ -2710,9 +2726,7 @@ var DatafieldNode = (props) => {
2710
2726
  matches.forEach((match) => {
2711
2727
  const parts = match.match(/([\w-]+)\s*:\s*([^;]+)\s*;/);
2712
2728
  if (parts && parts.length === 3) {
2713
- const property = parts[1].trim();
2714
- const value2 = parts[2].trim();
2715
- styleObject[property] = value2;
2729
+ styleObject[parts[1].trim()] = parts[2].trim();
2716
2730
  }
2717
2731
  });
2718
2732
  }
@@ -2722,9 +2736,11 @@ var DatafieldNode = (props) => {
2722
2736
  return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
2723
2737
  }
2724
2738
  function convertKeysToCamelCase2(obj) {
2725
- if (!obj || typeof obj !== "object") return obj;
2726
2739
  return Object.fromEntries(
2727
- Object.entries(obj).map(([key, value2]) => [toCamelCase2(key), value2])
2740
+ Object.entries(obj).map(([key, value2]) => [
2741
+ toCamelCase2(key),
2742
+ value2
2743
+ ])
2728
2744
  );
2729
2745
  }
2730
2746
  const Formats = [
@@ -2741,11 +2757,12 @@ var DatafieldNode = (props) => {
2741
2757
  "italic underline",
2742
2758
  "italic underline font-medium"
2743
2759
  ];
2744
- const styles = convertKeysToCamelCase2(cssStringToJson(props.node.style));
2745
- const fieldName = props.node.fieldName;
2760
+ const styles = convertKeysToCamelCase2(
2761
+ cssStringToJson(props.node.style)
2762
+ );
2763
+ const fieldName = props.node.fieldName ?? "";
2746
2764
  const value = props.dataitem ? getNestedProperty(props.dataitem, fieldName) : null;
2747
- console.log(fieldName, value, "haha");
2748
- const isEmptyValue = value === null || value === void 0 || value === "" || Array.isArray(value) && value.length === 0 || typeof value === "object" && Object.keys(value).length === 0;
2765
+ const isEmptyValue = value === null || value === void 0 || value === "" || Array.isArray(value) && value.length === 0 || typeof value === "object" && value !== null && Object.keys(value).length === 0;
2749
2766
  const maxLines = props.node.maxLines;
2750
2767
  if (maxLines && Number(maxLines) > 0) {
2751
2768
  Object.assign(styles, {
@@ -2756,14 +2773,12 @@ var DatafieldNode = (props) => {
2756
2773
  });
2757
2774
  }
2758
2775
  const dataType = props.node.dataType;
2759
- if (isEmptyValue) {
2760
- return null;
2761
- }
2762
- if (dataType == "rawContent") {
2776
+ if (isEmptyValue) return null;
2777
+ if (dataType === "rawContent") {
2763
2778
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2764
2779
  PageBodyRenderer_default,
2765
2780
  {
2766
- rawBody: value ?? `@databound[${fieldName}]`,
2781
+ rawBody: String(value ?? `@databound[${fieldName}]`),
2767
2782
  routeParameters: props.routeParameters,
2768
2783
  query: props.query,
2769
2784
  session: props.session,
@@ -2780,7 +2795,13 @@ var DatafieldNode = (props) => {
2780
2795
  {
2781
2796
  className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
2782
2797
  style: styles,
2783
- children: String(value)
2798
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2799
+ ViewControl_default,
2800
+ {
2801
+ controlType: dataType,
2802
+ value: value ?? `@databound[${fieldName}]`
2803
+ }
2804
+ )
2784
2805
  }
2785
2806
  );
2786
2807
  };
@@ -2803,7 +2824,7 @@ var ParagraphNode = (props) => {
2803
2824
  };
2804
2825
  {
2805
2826
  }
2806
- let formatClasses = FormatClass[props.node.format] || "";
2827
+ const formatClasses = FormatClass[props.node.format] || "";
2807
2828
  const isInlineOnlyParent = props.parentTag === "summary";
2808
2829
  const hasChildren = props.node.children && props.node.children.length > 0;
2809
2830
  if (isInlineOnlyParent) {
@@ -2848,7 +2869,6 @@ var HeadingNode = (props) => {
2848
2869
  ["text"]: TextNode_default,
2849
2870
  ["link"]: LinkNode_default,
2850
2871
  ["svg-icon"]: SVGIconNode_default,
2851
- // ["linebreak"]: LineBreakNodeNew,
2852
2872
  ["datafield"]: DatafieldNode_default
2853
2873
  };
2854
2874
  const HeadingTag = `${props.node.tag}`;
@@ -2857,7 +2877,7 @@ var HeadingNode = (props) => {
2857
2877
  };
2858
2878
  {
2859
2879
  }
2860
- let formatClasses = FormatClass[props.node.format] || "";
2880
+ const formatClasses = FormatClass[props.node.format] || "";
2861
2881
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: import_react37.default.createElement(
2862
2882
  HeadingTag,
2863
2883
  { className: formatClasses },
@@ -3001,8 +3021,10 @@ function CopyButton({ text }) {
3001
3021
  var import_jsx_runtime53 = require("react/jsx-runtime");
3002
3022
  var CodeNode = (props) => {
3003
3023
  const NodeTypes2 = {
3024
+ // @ts-expect-error custom code
3004
3025
  ["text"]: TextNode_default,
3005
3026
  ["linebreak"]: LineBreakNode_default,
3027
+ // @ts-expect-error custom code
3006
3028
  ["link"]: LinkNode_default
3007
3029
  };
3008
3030
  const textContent = props.node?.children?.map((node) => {
@@ -3026,14 +3048,11 @@ var CodeNode_default = CodeNode;
3026
3048
 
3027
3049
  // src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
3028
3050
  var import_jsx_runtime54 = require("react/jsx-runtime");
3029
- var HorizontalRuleNode = (props) => {
3051
+ var HorizontalRuleNode = () => {
3030
3052
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("hr", {});
3031
3053
  };
3032
3054
  var HorizontalRuleNode_default = HorizontalRuleNode;
3033
3055
 
3034
- // src/components/pageRenderingEngine/nodes/LayoutItemNode.tsx
3035
- var import_react47 = __toESM(require("react"));
3036
-
3037
3056
  // src/components/pageRenderingEngine/nodes/ImageNode.tsx
3038
3057
  var import_jsx_runtime55 = require("react/jsx-runtime");
3039
3058
  var ImageNode = (props) => {
@@ -3070,21 +3089,37 @@ var ImageNode = (props) => {
3070
3089
  var ImageNode_default = ImageNode;
3071
3090
 
3072
3091
  // src/components/pageRenderingEngine/nodes/WidgetNode.tsx
3073
- var import_react43 = require("react");
3092
+ var import_react43 = __toESM(require("react"));
3093
+
3094
+ // src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
3095
+ var registry = {};
3096
+ var getWidget = (code) => {
3097
+ return registry[code];
3098
+ };
3099
+
3100
+ // src/components/pageRenderingEngine/nodes/WidgetNode.tsx
3074
3101
  var import_jsx_runtime56 = require("react/jsx-runtime");
3102
+ function resolveWidget(code) {
3103
+ return getWidget(code);
3104
+ }
3075
3105
  var WidgetNode = (props) => {
3076
3106
  const getWidgetParameters = () => {
3077
- const widgetInputParameters = { ...props.routeParameters ?? {} };
3078
- const rawWidgetParams = props.node?.widgetParameters ?? props.node?.widgetParams;
3107
+ const widgetInputParameters = {
3108
+ ...props.routeParameters ?? {}
3109
+ };
3110
+ const rawWidgetParams = props.node.widgetParameters ?? props.node.widgetParams;
3079
3111
  let widgetParameters = {};
3080
3112
  const isJSON = (str) => {
3081
- if (typeof str !== "string") return false;
3082
- str = str.trim();
3083
- return str.startsWith("{") && str.endsWith("}") || str.startsWith("[") && str.endsWith("]");
3113
+ const s = str.trim();
3114
+ return s.startsWith("{") && s.endsWith("}") || s.startsWith("[") && s.endsWith("]");
3084
3115
  };
3085
3116
  if (rawWidgetParams) {
3086
3117
  if (typeof rawWidgetParams === "string" && isJSON(rawWidgetParams)) {
3087
- widgetParameters = JSON.parse(rawWidgetParams);
3118
+ try {
3119
+ widgetParameters = JSON.parse(rawWidgetParams);
3120
+ } catch {
3121
+ widgetParameters = {};
3122
+ }
3088
3123
  } else if (typeof rawWidgetParams === "object") {
3089
3124
  widgetParameters = rawWidgetParams;
3090
3125
  }
@@ -3097,9 +3132,11 @@ var WidgetNode = (props) => {
3097
3132
  return props.routeParameters?.[actualKey] ?? val;
3098
3133
  }
3099
3134
  return val;
3100
- } else if (Array.isArray(val)) {
3135
+ }
3136
+ if (Array.isArray(val)) {
3101
3137
  return val.map(resolveValue);
3102
- } else if (val && typeof val === "object") {
3138
+ }
3139
+ if (val && typeof val === "object") {
3103
3140
  const out = {};
3104
3141
  for (const k of Object.keys(val)) {
3105
3142
  out[k] = resolveValue(val[k]);
@@ -3108,80 +3145,366 @@ var WidgetNode = (props) => {
3108
3145
  }
3109
3146
  return val;
3110
3147
  };
3111
- Object.keys(widgetParameters).forEach((key) => {
3148
+ for (const key of Object.keys(widgetParameters)) {
3112
3149
  const rawVal = widgetParameters[key];
3113
3150
  if (rawVal === "route") {
3114
- if (key === "itemPath") {
3115
- widgetInputParameters[key] = props.path;
3116
- } else {
3117
- widgetInputParameters[key] = widgetInputParameters[key] ?? null;
3118
- }
3151
+ widgetInputParameters[key] = key === "itemPath" ? props.path : widgetInputParameters[key] ?? null;
3119
3152
  } else {
3120
3153
  widgetInputParameters[key] = resolveValue(rawVal);
3121
3154
  }
3122
- });
3123
- widgetInputParameters["widgetTitle"] = props.node?.widgetTitle;
3155
+ }
3156
+ widgetInputParameters["widgetTitle"] = props.node.widgetTitle;
3124
3157
  return widgetInputParameters;
3125
3158
  };
3126
- const SelectedWidget = props.widgetRegistry?.[props.node.widgetCode];
3159
+ const widgetCode = props.node.widgetCode;
3160
+ const SelectedWidget = resolveWidget(widgetCode);
3127
3161
  if (!SelectedWidget) {
3128
- console.warn("Widget not found:", props.node.widgetCode);
3162
+ console.warn("Widget not found:", widgetCode);
3129
3163
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
3130
3164
  "Widget not found: ",
3131
- props.node.widgetCode
3165
+ widgetCode
3132
3166
  ] });
3133
3167
  }
3134
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react43.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "container mt-2", children: "..." }), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3135
- SelectedWidget,
3168
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react43.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "container mt-2", children: "..." }), children: import_react43.default.createElement(SelectedWidget, {
3169
+ params: getWidgetParameters(),
3170
+ query: props.query,
3171
+ session: props.session,
3172
+ host: props.host,
3173
+ path: props.path,
3174
+ apiBaseUrl: props.apiBaseUrl
3175
+ }) });
3176
+ };
3177
+ var WidgetNode_default = WidgetNode;
3178
+
3179
+ // src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
3180
+ var import_react44 = __toESM(require("react"));
3181
+
3182
+ // src/components/pageRenderingEngine/nodes/InputControlNode.tsx
3183
+ var import_jsx_runtime57 = require("react/jsx-runtime");
3184
+ var InputControlNode = (props) => {
3185
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3186
+ InputControl_default,
3136
3187
  {
3137
- params: getWidgetParameters(),
3138
- query: props.query,
3139
- session: props.session,
3140
- host: props.host,
3141
- path: props.path,
3142
- apiBaseUrl: props.apiBaseUrl
3188
+ name: props.node.name,
3189
+ controlType: "lineTextInput",
3190
+ value: props.value,
3191
+ callback: props.callback,
3192
+ attributes: {
3193
+ pattern: props.node.pattern,
3194
+ maxLength: props.node.maxLength,
3195
+ minLength: props.node.minLength,
3196
+ //maxValue:props.node.maxV,
3197
+ //minValue?: number,
3198
+ readOnly: props.node.readOnly,
3199
+ label: "name",
3200
+ //props.node.label,
3201
+ hintText: props.node.hintText,
3202
+ placeholder: props.node.placeholder,
3203
+ required: props.node.required,
3204
+ errorMessage: props.node.errorMessage,
3205
+ helpText: props.node.helpText,
3206
+ autoFocus: props.node.autoFocus
3207
+ }
3143
3208
  }
3144
3209
  ) });
3145
3210
  };
3146
- var WidgetNode_default = WidgetNode;
3211
+ var InputControlNode_default = InputControlNode;
3212
+
3213
+ // src/clients/CacheManage.tsx
3214
+ var import_node_cache = __toESM(require("node-cache"));
3215
+ var CacheManager = class _CacheManager {
3216
+ constructor() {
3217
+ this.maxCacheSize = 1e3;
3218
+ this.cache = new import_node_cache.default({ stdTTL: 0, checkperiod: 300 });
3219
+ }
3220
+ static getInstance() {
3221
+ if (!_CacheManager.instance) {
3222
+ _CacheManager.instance = new _CacheManager();
3223
+ }
3224
+ return _CacheManager.instance;
3225
+ }
3226
+ get(key) {
3227
+ return null;
3228
+ }
3229
+ set(key, data, ttl) {
3230
+ }
3231
+ clear() {
3232
+ this.cache.flushAll();
3233
+ }
3234
+ size() {
3235
+ return this.cache.keys().length;
3236
+ }
3237
+ destroy() {
3238
+ this.cache.close();
3239
+ }
3240
+ };
3241
+
3242
+ // src/clients/ServiceClient.tsx
3243
+ var ServerApiError = class extends Error {
3244
+ constructor(data, status) {
3245
+ super(data.message || "---");
3246
+ this.status = status;
3247
+ this.data = data;
3248
+ this.data.isSuccessful = false;
3249
+ }
3250
+ };
3251
+ var ServiceClient = class {
3252
+ constructor(apiBaseUrl, session) {
3253
+ this.cacheManager = CacheManager.getInstance();
3254
+ this.baseUrl = apiBaseUrl;
3255
+ this.session = session;
3256
+ }
3257
+ buildFullPath(path, params) {
3258
+ let updatedPath = path;
3259
+ if (params) {
3260
+ Object.keys(params).forEach((key) => {
3261
+ updatedPath = updatedPath.replace(
3262
+ `{${key}}`,
3263
+ String(params[key])
3264
+ );
3265
+ });
3266
+ }
3267
+ return this.baseUrl + updatedPath;
3268
+ }
3269
+ getConfig() {
3270
+ const config = { headers: {} };
3271
+ if (this.session) {
3272
+ if (this.session.oAuthToken) {
3273
+ config.headers["Authorization"] = "Bearer " + this.session.oAuthToken;
3274
+ }
3275
+ config.headers["cid"] = this.session.cid || "";
3276
+ config.headers["UserCurrencyCode"] = this.session.userCurrencyCode || "INR";
3277
+ config.headers["MarketCode"] = this.session?.marketCode || "IND";
3278
+ }
3279
+ return config;
3280
+ }
3281
+ handleFetchError(error) {
3282
+ console.log(error);
3283
+ const serverApiError = error;
3284
+ if (serverApiError) {
3285
+ return serverApiError.data;
3286
+ }
3287
+ return {
3288
+ message: "There is some error. Please try after sometime.",
3289
+ isSuccessful: false
3290
+ };
3291
+ }
3292
+ async fetchJsonWithCache(fullPath, config) {
3293
+ const cacheKey = fullPath + "--" + (this.session?.marketCode || "IND");
3294
+ const cachedData = this.cacheManager.get(cacheKey);
3295
+ if (cachedData) {
3296
+ return cachedData;
3297
+ }
3298
+ console.log("*****************CALLING API:", cacheKey, (/* @__PURE__ */ new Date()).toISOString());
3299
+ const response = await fetch(fullPath, { headers: config.headers });
3300
+ if (!response.ok) {
3301
+ const apiErrorData = await response.json();
3302
+ throw new ServerApiError(apiErrorData, response.status);
3303
+ }
3304
+ const cacheControl = response.headers.get("Cache-Control");
3305
+ let revalidate = null;
3306
+ if (cacheControl) {
3307
+ const maxAgeMatch = cacheControl.match(/max-age=(\d+)/);
3308
+ if (maxAgeMatch && maxAgeMatch[1]) {
3309
+ const maxAge = parseInt(maxAgeMatch[1], 10);
3310
+ revalidate = maxAge * 1e3;
3311
+ }
3312
+ }
3313
+ const data = await response.json();
3314
+ data.isSuccessful = true;
3315
+ if (revalidate !== null && revalidate > 0) {
3316
+ console.log("revalidate............I am caching:" + revalidate);
3317
+ this.cacheManager.set(cacheKey, data, revalidate);
3318
+ }
3319
+ return data;
3320
+ }
3321
+ // private async refreshToken(): Promise<void> {
3322
+ // console.log("*******************calling refresh token***********************");
3323
+ // try {
3324
+ // const response = await fetch(this.baseUrl + "/auth/storefront/login/refreshToken", {
3325
+ // method: 'POST',
3326
+ // headers: {
3327
+ // 'Content-Type': 'application/json'
3328
+ // },
3329
+ // body: JSON.stringify({ refreshToken: this.session.refreshToken })
3330
+ // });
3331
+ // if (!response.ok) {
3332
+ // throw new Error("Failed to refresh token");
3333
+ // }
3334
+ // const responseData = await response.json();
3335
+ // this.session.oAuthToken = responseData.result.accessToken;
3336
+ // if (typeof window === "undefined") {
3337
+ // // Running on the server
3338
+ // } else {
3339
+ // await fetch("/api/login", {
3340
+ // method: "post",
3341
+ // headers: {
3342
+ // "Content-Type": "application/json",
3343
+ // },
3344
+ // body: JSON.stringify({ session: this.session }),
3345
+ // });
3346
+ // }
3347
+ // } catch (error: any) {
3348
+ // throw new Error("Failed to refresh token");
3349
+ // }
3350
+ // }
3351
+ async handleRequest(request) {
3352
+ try {
3353
+ return await request();
3354
+ } catch (error) {
3355
+ throw error;
3356
+ }
3357
+ }
3358
+ async post(path, data) {
3359
+ const request = async () => {
3360
+ const fullPath = this.baseUrl + path;
3361
+ const config = this.getConfig();
3362
+ const response = await fetch(fullPath, {
3363
+ method: "POST",
3364
+ headers: {
3365
+ ...config.headers,
3366
+ "Content-Type": "application/json"
3367
+ },
3368
+ body: JSON.stringify(data)
3369
+ });
3370
+ if (!response.ok) {
3371
+ const apiErrorData = await response.json();
3372
+ throw new ServerApiError(apiErrorData, response.status);
3373
+ }
3374
+ const responseData = await response.json();
3375
+ responseData.isSuccessful = true;
3376
+ return responseData;
3377
+ };
3378
+ try {
3379
+ return await this.handleRequest(request);
3380
+ } catch (error) {
3381
+ return this.handleFetchError(error);
3382
+ }
3383
+ }
3384
+ async getSingle(path, params) {
3385
+ const request = async () => {
3386
+ const sanitizedParams = params ? Object.fromEntries(
3387
+ Object.entries(params).map(([k, v]) => [k, String(v)])
3388
+ ) : void 0;
3389
+ const fullPath = this.buildFullPath(path, sanitizedParams);
3390
+ const config = this.getConfig();
3391
+ return await this.fetchJsonWithCache(fullPath, config);
3392
+ };
3393
+ try {
3394
+ return await this.handleRequest(request);
3395
+ } catch (error) {
3396
+ return this.handleFetchError(error);
3397
+ }
3398
+ }
3399
+ async get(path, params) {
3400
+ const request = async () => {
3401
+ const sanitizedParams = params ? Object.fromEntries(
3402
+ Object.entries(params).map(([k, v]) => [k, String(v)])
3403
+ ) : void 0;
3404
+ const fullPath = this.buildFullPath(path, sanitizedParams);
3405
+ const config = this.getConfig();
3406
+ console.log(fullPath);
3407
+ return await this.fetchJsonWithCache(fullPath, config);
3408
+ };
3409
+ try {
3410
+ return await this.handleRequest(request);
3411
+ } catch (error) {
3412
+ return this.handleFetchError(error);
3413
+ }
3414
+ }
3415
+ };
3416
+ var ServiceClient_default = ServiceClient;
3417
+
3418
+ // src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
3419
+ var import_jsx_runtime58 = require("react/jsx-runtime");
3420
+ var FormContainerNode = (props) => {
3421
+ const NodeTypes2 = {
3422
+ ["input-control"]: InputControlNode_default
3423
+ };
3424
+ const { node } = props;
3425
+ const formRef = (0, import_react44.useRef)(null);
3426
+ const initialState = {
3427
+ inputValues: {},
3428
+ lastPropertyChanged: ""
3429
+ };
3430
+ const [formState, dispatch] = (0, import_react44.useReducer)(FormReducer_default, initialState);
3431
+ const handleInputChange = (0, import_react44.useCallback)((updatedValues) => {
3432
+ dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
3433
+ }, [dispatch]);
3434
+ (0, import_react44.useEffect)(() => {
3435
+ const fetchInitialData = async () => {
3436
+ const client = new ServiceClient_default(props.apiBaseUrl, props.session);
3437
+ const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
3438
+ if (response.isSuccessful) {
3439
+ dispatch({
3440
+ type: FORM_INITIAL_UPDATE,
3441
+ values: response.result,
3442
+ // @ts-expect-error custom code
3443
+ name: "all"
3444
+ });
3445
+ }
3446
+ };
3447
+ fetchInitialData();
3448
+ }, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
3449
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
3450
+ node.children && node.children.map((node2, index) => {
3451
+ {
3452
+ }
3453
+ const SelectedNode = NodeTypes2[node2.type];
3454
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react44.default.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3455
+ InputControlNode_default,
3456
+ {
3457
+ value: formState.inputValues[node2.name],
3458
+ callback: handleInputChange,
3459
+ node: node2
3460
+ }
3461
+ ) }, index);
3462
+ }),
3463
+ node.children.length == 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "py-0.5 lg:py-1.5" })
3464
+ ] });
3465
+ };
3466
+ var FormContainerNode_default = FormContainerNode;
3467
+
3468
+ // src/components/pageRenderingEngine/nodes/DivContainer.tsx
3469
+ var import_react50 = __toESM(require("react"));
3147
3470
 
3148
3471
  // src/components/pageRenderingEngine/nodes/IframeClient.tsx
3149
- var import_react45 = __toESM(require("react"));
3472
+ var import_react46 = __toESM(require("react"));
3150
3473
 
3151
3474
  // src/components/IFrameLoaderView.tsx
3152
- var import_react44 = __toESM(require("react"));
3153
- var import_jsx_runtime57 = require("react/jsx-runtime");
3475
+ var import_react45 = __toESM(require("react"));
3476
+ var import_jsx_runtime59 = require("react/jsx-runtime");
3154
3477
  var IFrameLoaderView = (props) => {
3155
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react44.default.Fragment, { children: [
3156
- props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
3157
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center mb-4", children: [
3158
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
3159
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ml-2", children: [
3160
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
3161
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
3478
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react45.default.Fragment, { children: [
3479
+ props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
3480
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center mb-4", children: [
3481
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
3482
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ml-2", children: [
3483
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
3484
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
3162
3485
  ] })
3163
3486
  ] }),
3164
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
3165
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "animate-pulse", children: [
3166
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
3167
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
3168
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
3169
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
3170
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
3487
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
3488
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "animate-pulse", children: [
3489
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
3490
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
3491
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
3492
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
3493
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
3171
3494
  ] }),
3172
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "animate-pulse", children: [
3173
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
3174
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
3175
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
3176
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
3177
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
3495
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "animate-pulse", children: [
3496
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
3497
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
3498
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
3499
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
3500
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
3178
3501
  ] }),
3179
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "animate-pulse", children: [
3180
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
3181
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
3182
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
3183
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
3184
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
3502
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "animate-pulse", children: [
3503
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
3504
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
3505
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
3506
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
3507
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
3185
3508
  ] })
3186
3509
  ] })
3187
3510
  ] }) }),
@@ -3191,12 +3514,12 @@ var IFrameLoaderView = (props) => {
3191
3514
  var IFrameLoaderView_default = IFrameLoaderView;
3192
3515
 
3193
3516
  // src/components/pageRenderingEngine/nodes/IframeClient.tsx
3194
- var import_jsx_runtime58 = require("react/jsx-runtime");
3517
+ var import_jsx_runtime60 = require("react/jsx-runtime");
3195
3518
  var IframeClient = ({ src }) => {
3196
- const iframeRef = (0, import_react45.useRef)(null);
3197
- const [iframeHeight, setIframeHeight] = (0, import_react45.useState)("100%");
3198
- const [isDataFound, setIsDataFound] = (0, import_react45.useState)(null);
3199
- (0, import_react45.useEffect)(() => {
3519
+ const iframeRef = (0, import_react46.useRef)(null);
3520
+ const [iframeHeight, setIframeHeight] = (0, import_react46.useState)("100%");
3521
+ const [isDataFound, setIsDataFound] = (0, import_react46.useState)(null);
3522
+ (0, import_react46.useEffect)(() => {
3200
3523
  const handleReceiveMessage = (event) => {
3201
3524
  const eventName = event?.data?.eventName;
3202
3525
  const payload = event?.data?.payload;
@@ -3211,7 +3534,7 @@ var IframeClient = ({ src }) => {
3211
3534
  window.addEventListener("message", handleReceiveMessage);
3212
3535
  return () => window.removeEventListener("message", handleReceiveMessage);
3213
3536
  }, []);
3214
- (0, import_react45.useEffect)(() => {
3537
+ (0, import_react46.useEffect)(() => {
3215
3538
  const handleResize = () => {
3216
3539
  if (iframeRef.current) {
3217
3540
  iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
@@ -3223,13 +3546,14 @@ var IframeClient = ({ src }) => {
3223
3546
  const handleIframeLoad = () => {
3224
3547
  setIsDataFound(true);
3225
3548
  };
3226
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react45.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3549
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react46.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
3227
3550
  "iframe",
3228
3551
  {
3229
3552
  ref: iframeRef,
3230
3553
  src,
3231
3554
  className: "w-full h-full border-none",
3232
3555
  scrolling: "no",
3556
+ style: { height: iframeHeight },
3233
3557
  onLoad: handleIframeLoad
3234
3558
  }
3235
3559
  ) }) });
@@ -3237,7 +3561,7 @@ var IframeClient = ({ src }) => {
3237
3561
  var IframeClient_default = IframeClient;
3238
3562
 
3239
3563
  // src/components/pageRenderingEngine/nodes/EmbedNode.tsx
3240
- var import_jsx_runtime59 = require("react/jsx-runtime");
3564
+ var import_jsx_runtime61 = require("react/jsx-runtime");
3241
3565
  var EmbedNode = (props) => {
3242
3566
  let src;
3243
3567
  if (props.node.provider == "youtube") {
@@ -3247,106 +3571,10 @@ var EmbedNode = (props) => {
3247
3571
  } else {
3248
3572
  src = props.node.embedSrc;
3249
3573
  }
3250
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IframeClient_default, { src }) });
3574
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(IframeClient_default, { src }) });
3251
3575
  };
3252
3576
  var EmbedNode_default = EmbedNode;
3253
3577
 
3254
- // src/components/pageRenderingEngine/nodes/VideoNode.tsx
3255
- var import_react46 = __toESM(require("react"));
3256
- var import_jsx_runtime60 = require("react/jsx-runtime");
3257
- var VideoNode = (props) => {
3258
- let src;
3259
- if (props.node.provider == "youtube") {
3260
- src = `https://www.youtube-nocookie.com/embed/${props.node.videoId}`;
3261
- } else if (props.node.provider == "bunny") {
3262
- src = `https://iframe.mediadelivery.net/embed/${props.node.videoId}?autoplay=false&loop=false&muted=false&preload=true&responsive=true`;
3263
- }
3264
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react46.default.Fragment, { children: src && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("iframe", { className: "w-full aspect-video rounded", src, loading: "lazy", allow: "accelerometer;gyroscope;autoplay;encrypted-media;picture-in-picture;", allowFullScreen: true }) });
3265
- };
3266
- var VideoNode_default = VideoNode;
3267
-
3268
- // src/components/pageRenderingEngine/nodes/LayoutItemNode.tsx
3269
- var import_jsx_runtime61 = require("react/jsx-runtime");
3270
- var LayoutItemNode = (props) => {
3271
- const NodeTypes2 = {
3272
- ["paragraph"]: ParagraphNode_default,
3273
- ["heading"]: HeadingNode_default,
3274
- ["list"]: ListNode_default,
3275
- ["quote"]: QuoteNode_default,
3276
- ["code"]: CodeNode_default,
3277
- ["horizontalrule"]: HorizontalRuleNode_default,
3278
- ["image"]: ImageNode_default,
3279
- ["layout-container"]: LayoutContainerNode_default,
3280
- ["link"]: LinkNode_default,
3281
- ["widget"]: WidgetNode_default,
3282
- ["youtube"]: VideoNode_default,
3283
- ["video"]: VideoNode_default,
3284
- ["embed"]: EmbedNode_default
3285
- };
3286
- let cssClasses = "";
3287
- if (props.order) {
3288
- cssClasses = "order-" + props.order + " lg:order-1";
3289
- }
3290
- if (props.node.itemBoxShadow) {
3291
- {
3292
- }
3293
- cssClasses = cssClasses + " " + (props.node.itemBoxShadow || "");
3294
- }
3295
- const styles = {};
3296
- if (props.node.itemBorderWidth) {
3297
- styles.borderWidth = props.node.itemBorderWidth;
3298
- cssClasses = cssClasses + " px-4 py-2";
3299
- }
3300
- if (props.node.itemBorderRadius) {
3301
- styles.borderRadius = props.node.itemBorderRadius;
3302
- styles.overflow = "hidden";
3303
- }
3304
- function removeParagraphsAtStartAndEnd(layoutItem) {
3305
- let startIndex = 0;
3306
- {
3307
- }
3308
- while (startIndex < layoutItem.children.length && layoutItem.children[startIndex].type === "paragraph" && layoutItem.children[startIndex].children.filter((x) => x.type == "linebreak").length == layoutItem.children[startIndex].children.length) {
3309
- startIndex++;
3310
- }
3311
- let endIndex = layoutItem.children.length - 1;
3312
- {
3313
- }
3314
- while (endIndex >= 0 && layoutItem.children[endIndex].type === "paragraph" && layoutItem.children[endIndex].children.filter((x) => x.type == "linebreak").length == layoutItem.children[endIndex].children.length) {
3315
- endIndex--;
3316
- }
3317
- if (startIndex <= endIndex) {
3318
- layoutItem.children = layoutItem.children.slice(startIndex, endIndex + 1);
3319
- } else {
3320
- layoutItem.children = [];
3321
- }
3322
- return layoutItem;
3323
- }
3324
- let updatedLayout = props.node;
3325
- if (props.node.itemBoxShadow || props.node.itemBorderWidth) {
3326
- updatedLayout = props.node;
3327
- } else {
3328
- updatedLayout = removeParagraphsAtStartAndEnd(props.node);
3329
- }
3330
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react47.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "layout-item " + cssClasses, style: { ...styles }, children: updatedLayout.children.map((node, index) => {
3331
- {
3332
- }
3333
- const SelectedNode = NodeTypes2[node.type];
3334
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react47.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3335
- SelectedNode,
3336
- {
3337
- node,
3338
- routeParameters: props.routeParameters,
3339
- query: props.query,
3340
- session: props.session,
3341
- host: props.host,
3342
- path: props.path,
3343
- apiBaseUrl: props.apiBaseUrl
3344
- }
3345
- ) }, index);
3346
- }) }) });
3347
- };
3348
- var LayoutItemNode_default = LayoutItemNode;
3349
-
3350
3578
  // src/components/utilities/AssetUtility.tsx
3351
3579
  var AssetUtility = class {
3352
3580
  constructor() {
@@ -3360,573 +3588,9 @@ var AssetUtility = class {
3360
3588
  };
3361
3589
  var AssetUtility_default = AssetUtility;
3362
3590
 
3363
- // src/components/pageRenderingEngine/nodes/LayoutContainerNode.tsx
3591
+ // src/components/Slider.tsx
3592
+ var import_react47 = __toESM(require("react"));
3364
3593
  var import_jsx_runtime62 = require("react/jsx-runtime");
3365
- var LayoutContainerNode = (props) => {
3366
- const VERTICAL_ALIGNMENT_CLASSES = {
3367
- start: "items-start",
3368
- center: "items-center place-content-center",
3369
- end: "items-end",
3370
- stretch: "items-stretch",
3371
- baseline: "items-baseline"
3372
- };
3373
- const LAYOUTGRID_COLS_CLASSES = {
3374
- "1fr": "layout-grid-col-1",
3375
- "1fr 1fr": "layout-grid-col-2-equal",
3376
- "1fr 2fr": "layout-grid-col-2-widths-33-67",
3377
- "2fr 1fr": "layout-grid-col-2-widths-67-33",
3378
- "3fr 2fr": "layout-grid-col-2-widths-60-40",
3379
- "3fr 1fr": "layout-grid-col-2-widths-75-25",
3380
- "1fr 1fr 1fr": "layout-grid-col-3-equal",
3381
- "1fr 2fr 1fr": "layout-grid-col-3-widths-25-50-25",
3382
- "1fr 6fr 1fr": "layout-grid-col-3-widths-15-70-15",
3383
- "1fr 1fr 1fr 1fr": "layout-grid-col-4-equal"
3384
- };
3385
- const sectionWidth = props.node.sectionWidth || "fixed";
3386
- let gridCssClasses = LAYOUTGRID_COLS_CLASSES[props.node.templateColumns] || "";
3387
- if (props.node.contentVerticalAlignment) {
3388
- gridCssClasses += " " + (VERTICAL_ALIGNMENT_CLASSES[props.node.contentVerticalAlignment] || "");
3389
- }
3390
- const columnGap = props.node.columnGap || "0.5rem";
3391
- const styles = {};
3392
- let cssClasses = "layout_grid";
3393
- let addPadding = false;
3394
- if (props.node.backgroundColor) {
3395
- styles.backgroundColor = props.node.backgroundColor;
3396
- }
3397
- if (props.node.borderWidth) {
3398
- styles.borderWidth = props.node.borderWidth;
3399
- addPadding = true;
3400
- }
3401
- if (props.node.borderRadius) {
3402
- styles.borderRadius = props.node.borderRadius;
3403
- }
3404
- if (props.node.boxShadow && props.node.boxShadow !== "shadow-none") {
3405
- cssClasses += " " + props.node.boxShadow;
3406
- addPadding = true;
3407
- }
3408
- const backgroundLayers = [];
3409
- if (props.node.backgroundImage) {
3410
- const resolved = AssetUtility_default.resolveUrl(
3411
- props.apiBaseUrl,
3412
- props.node.backgroundImage
3413
- );
3414
- if (resolved) {
3415
- backgroundLayers.push(`url('${resolved}')`);
3416
- addPadding = true;
3417
- }
3418
- }
3419
- if (props.node.gradientColor1 && props.node.gradientColor2) {
3420
- backgroundLayers.push(
3421
- `linear-gradient(to bottom, ${props.node.gradientColor1}, ${props.node.gradientColor2})`
3422
- );
3423
- addPadding = true;
3424
- } else if (props.node.gradientColor1) {
3425
- backgroundLayers.push(props.node.gradientColor1);
3426
- addPadding = true;
3427
- } else if (props.node.gradientColor2) {
3428
- backgroundLayers.push(props.node.gradientColor2);
3429
- addPadding = true;
3430
- }
3431
- if (backgroundLayers.length) {
3432
- styles.background = backgroundLayers.join(", ");
3433
- }
3434
- const renderChildren = () => props.node.children?.map((node, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3435
- LayoutItemNode_default,
3436
- {
3437
- node,
3438
- order: props.node.smOrder === "reverse" ? props.node.children.length - index : index,
3439
- routeParameters: props.routeParameters,
3440
- query: props.query,
3441
- session: props.session,
3442
- host: props.host,
3443
- path: props.path,
3444
- apiBaseUrl: props.apiBaseUrl
3445
- },
3446
- index
3447
- ));
3448
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
3449
- sectionWidth === "mixed" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: cssClasses, style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "container", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3450
- "div",
3451
- {
3452
- className: `grid gap-y-4 lg:gap-y-0 ${gridCssClasses} ${addPadding ? "py-8 lg:py-6" : ""}`,
3453
- style: { columnGap, minHeight: props.node.height },
3454
- children: renderChildren()
3455
- }
3456
- ) }) }),
3457
- sectionWidth === "full" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3458
- "div",
3459
- {
3460
- className: `grid gap-y-4 lg:gap-y-0 ${cssClasses} ${gridCssClasses} ${addPadding ? "p-8 lg:p-0" : ""}`,
3461
- style: { columnGap, ...styles },
3462
- children: renderChildren()
3463
- }
3464
- ),
3465
- sectionWidth === "fixed" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "container", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3466
- "div",
3467
- {
3468
- className: `grid gap-y-4 lg:gap-y-0 ${cssClasses} ${gridCssClasses} ${addPadding ? "px-8 py-6 lg:px-6 lg:py-6" : ""}`,
3469
- style: { columnGap, ...styles },
3470
- children: renderChildren()
3471
- }
3472
- ) })
3473
- ] });
3474
- };
3475
- var LayoutContainerNode_default = LayoutContainerNode;
3476
-
3477
- // src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
3478
- var import_react48 = __toESM(require("react"));
3479
-
3480
- // src/components/pageRenderingEngine/nodes/InputControlNode.tsx
3481
- var import_jsx_runtime63 = require("react/jsx-runtime");
3482
- var InputControlNode = (props) => {
3483
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
3484
- InputControl_default,
3485
- {
3486
- name: props.node.name,
3487
- controlType: "lineTextInput",
3488
- value: props.value,
3489
- callback: props.callback,
3490
- attributes: {
3491
- pattern: props.node.pattern,
3492
- maxLength: props.node.maxLength,
3493
- minLength: props.node.minLength,
3494
- //maxValue:props.node.maxV,
3495
- //minValue?: number,
3496
- readOnly: props.node.readOnly,
3497
- label: "name",
3498
- //props.node.label,
3499
- hintText: props.node.hintText,
3500
- placeholder: props.node.placeholder,
3501
- required: props.node.required,
3502
- errorMessage: props.node.errorMessage,
3503
- helpText: props.node.helpText,
3504
- autoFocus: props.node.autoFocus
3505
- }
3506
- }
3507
- ) });
3508
- };
3509
- var InputControlNode_default = InputControlNode;
3510
-
3511
- // src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
3512
- var import_jsx_runtime64 = require("react/jsx-runtime");
3513
- var FormContainerNode = (props) => {
3514
- const NodeTypes2 = {
3515
- ["input-control"]: InputControlNode_default
3516
- };
3517
- const { node } = props;
3518
- const formRef = (0, import_react48.useRef)(null);
3519
- const initialState = {
3520
- inputValues: {},
3521
- lastPropertyChanged: ""
3522
- };
3523
- const [formState, dispatch] = (0, import_react48.useReducer)(FormReducer_default, initialState);
3524
- const handleInputChange = (0, import_react48.useCallback)((updatedValues) => {
3525
- dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
3526
- }, [dispatch]);
3527
- const onValidate = async () => {
3528
- if (formRef.current && !formRef.current.checkValidity()) {
3529
- formRef.current.classList.add("validated");
3530
- return false;
3531
- } else {
3532
- return true;
3533
- }
3534
- };
3535
- (0, import_react48.useEffect)(() => {
3536
- const fetchInitialData = async () => {
3537
- if (!props.fetchData || !node.dataFetchApi) return;
3538
- const response = await props.fetchData(
3539
- node.dataFetchApi,
3540
- props.routeParameters
3541
- );
3542
- if (response?.isSuccessful) {
3543
- dispatch({
3544
- type: FORM_INITIAL_UPDATE,
3545
- values: response.result,
3546
- name: "all"
3547
- });
3548
- }
3549
- };
3550
- fetchInitialData();
3551
- }, [props.fetchData, node.dataFetchApi, props.routeParameters]);
3552
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
3553
- node.children && node.children.map((node2, index) => {
3554
- {
3555
- }
3556
- const SelectedNode = NodeTypes2[node2.type];
3557
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react48.default.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
3558
- InputControlNode_default,
3559
- {
3560
- value: formState.inputValues[node2.name],
3561
- callback: handleInputChange,
3562
- node: node2
3563
- }
3564
- ) }, index);
3565
- }),
3566
- node.children.length == 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "py-0.5 lg:py-1.5" })
3567
- ] });
3568
- };
3569
- var FormContainerNode_default = FormContainerNode;
3570
-
3571
- // src/components/pageRenderingEngine/nodes/DivContainer.tsx
3572
- var import_react52 = __toESM(require("react"));
3573
-
3574
- // src/components/utilities/AnimationUtility.tsx
3575
- var AnimationUtility = class {
3576
- static generateAnimationCSS(config, guid) {
3577
- const {
3578
- duration = 700,
3579
- delay = 0,
3580
- easing = "ease-out",
3581
- distance = 30,
3582
- scaleStart = 1,
3583
- scaleEnd = 1.2,
3584
- repeat = 1,
3585
- intensity = 20,
3586
- speedPerChar = 100,
3587
- cursor = true,
3588
- mode = "enter",
3589
- direction = "left"
3590
- // Default direction
3591
- } = config;
3592
- let base = "", visible = "", keyframes = "";
3593
- switch (config.animation) {
3594
- case "Fade":
3595
- base = `opacity:0; transition:opacity ${duration}ms ${easing} ${delay}ms;`;
3596
- visible = `opacity:1;`;
3597
- break;
3598
- case "FadeInUp":
3599
- base = `opacity:0; transform:translateY(${distance}px); transition:all ${duration}ms ${easing} ${delay}ms;`;
3600
- visible = `opacity:1; transform:translateY(0);`;
3601
- break;
3602
- case "Slide":
3603
- const slideTransform = this.getSlideTransform(direction, distance);
3604
- base = `opacity:0; transform:${slideTransform.start}; transition:all ${duration}ms ${easing} ${delay}ms; will-change: transform, opacity;`;
3605
- visible = `opacity:1; transform:${slideTransform.end}; will-change: unset;`;
3606
- break;
3607
- case "ZoomIn":
3608
- if (mode === "enter") {
3609
- base = `opacity:0; transform:scale(${scaleStart}); transition:all ${duration}ms ${easing} ${delay}ms;`;
3610
- visible = `opacity:1; transform:scale(${scaleEnd});`;
3611
- } else {
3612
- base = `transform:scale(${scaleStart}); transition:transform ${duration / 1e3}s ${easing} ${delay / 1e3}s;`;
3613
- visible = `transform:scale(${scaleEnd});`;
3614
- }
3615
- break;
3616
- case "Bounce":
3617
- keyframes = `
3618
- @keyframes bounce {
3619
- 0%,20%,50%,80%,100% { transform: translateY(0); }
3620
- 40% { transform: translateY(-${intensity}px); }
3621
- 60% { transform: translateY(-${intensity / 2}px); }
3622
- }
3623
- `;
3624
- if (mode === "enter") {
3625
- base = `opacity:0;`;
3626
- visible = `opacity:1; animation:bounce ${duration}ms ${easing} ${delay}ms ${repeat};`;
3627
- } else {
3628
- base = ``;
3629
- visible = `animation:bounce ${duration / 1e3}s ${easing} ${delay / 1e3}s ${repeat};`;
3630
- }
3631
- break;
3632
- case "Typewriter":
3633
- keyframes = `
3634
- @keyframes typewriter { from { width: 0 } to { width: 100% } }
3635
- @keyframes blink { 50% { border-color: transparent } }
3636
- `;
3637
- base = `
3638
- overflow:hidden;
3639
- border-right:${cursor ? "2px solid black" : "none"};
3640
- white-space:nowrap;
3641
- width:0;
3642
- margin:0 auto;
3643
- `;
3644
- visible = `
3645
- animation:typewriter ${speedPerChar * 30}ms steps(30,end) ${delay}ms forwards
3646
- ${cursor ? ", blink .75s step-end infinite" : ""};
3647
- `;
3648
- break;
3649
- }
3650
- if (mode === "hover") {
3651
- return `
3652
- ${keyframes}
3653
- ${guid} { ${base} }
3654
- ${guid}:hover { ${visible} }
3655
- `;
3656
- } else {
3657
- return `
3658
- ${keyframes}
3659
- ${guid} { ${base} }
3660
- ${guid}.visible { ${visible} }
3661
- `;
3662
- }
3663
- }
3664
- // Helper method to generate slide transforms based on direction
3665
- static getSlideTransform(direction, distance) {
3666
- switch (direction) {
3667
- case "left":
3668
- return { start: `translateX(${distance}px)`, end: `translateX(0)` };
3669
- case "right":
3670
- return { start: `translateX(-${distance}px)`, end: `translateX(0)` };
3671
- case "up":
3672
- return { start: `translateY(${distance}px)`, end: `translateY(0)` };
3673
- case "down":
3674
- return { start: `translateY(-${distance}px)`, end: `translateY(0)` };
3675
- default:
3676
- return { start: `translateX(${distance}px)`, end: `translateX(0)` };
3677
- }
3678
- }
3679
- };
3680
- var AnimationUtility_default = AnimationUtility;
3681
-
3682
- // src/components/Pagination.tsx
3683
- var import_react49 = require("react");
3684
- var import_jsx_runtime65 = require("react/jsx-runtime");
3685
- var Pagination = (props) => {
3686
- const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
3687
- const builder = (0, import_react49.useMemo)(() => {
3688
- const b = new OdataBuilder(path);
3689
- if (query) b.setQuery(query);
3690
- return b;
3691
- }, [path, query]);
3692
- const activePageNumber = builder.getPageNumber(Constants.pagesize);
3693
- const totalItems = dataset?.count || 0;
3694
- const itemsPerPage = parseInt(builder.top || Constants.pagesize.toString());
3695
- const totalPages = Math.ceil(totalItems / itemsPerPage);
3696
- const startItem = totalItems > 0 ? (activePageNumber - 1) * itemsPerPage + 1 : 0;
3697
- const endItem = Math.min(activePageNumber * itemsPerPage, totalItems);
3698
- const getPaginationRange = () => {
3699
- const delta = 1;
3700
- const range = [];
3701
- if (totalPages <= 7) {
3702
- return Array.from({ length: totalPages }, (_, i) => i + 1);
3703
- }
3704
- range.push(1);
3705
- let start = Math.max(2, activePageNumber - delta);
3706
- let end = Math.min(totalPages - 1, activePageNumber + delta);
3707
- if (activePageNumber - delta <= 2) {
3708
- end = Math.min(totalPages - 1, 4);
3709
- }
3710
- if (activePageNumber + delta >= totalPages - 1) {
3711
- start = Math.max(2, totalPages - 4);
3712
- }
3713
- if (start > 2) {
3714
- range.push("...");
3715
- }
3716
- for (let i = start; i <= end; i++) {
3717
- range.push(i);
3718
- }
3719
- if (end < totalPages - 1) {
3720
- range.push("...");
3721
- }
3722
- if (totalPages > 1) {
3723
- range.push(totalPages);
3724
- }
3725
- return range;
3726
- };
3727
- const paginationRange = getPaginationRange();
3728
- const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3729
- Hyperlink,
3730
- {
3731
- linkType: "Link" /* Link */,
3732
- className: `
3733
- min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2.5 md:px-3
3734
- border text-sm font-medium transition-colors duration-150
3735
- ${activePageNumber === page ? "bg-primary-base font-semibold" : ""}
3736
- `,
3737
- href: builder.getNewPageUrl(page),
3738
- children
3739
- }
3740
- );
3741
- const NavigationButton = ({ page, disabled, children }) => {
3742
- if (disabled) {
3743
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("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 });
3744
- }
3745
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3746
- Hyperlink,
3747
- {
3748
- 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",
3749
- href: builder.getNewPageUrl(page),
3750
- children
3751
- }
3752
- );
3753
- };
3754
- if (totalPages <= 1 && totalItems === 0) return null;
3755
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "py-6 border-t bg-default", children: [
3756
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
3757
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "text-sm", children: [
3758
- "Showing ",
3759
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "font-semibold", children: [
3760
- startItem,
3761
- "-",
3762
- endItem
3763
- ] }),
3764
- " ",
3765
- "out of ",
3766
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
3767
- " results"
3768
- ] }),
3769
- totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center space-x-1", children: [
3770
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
3771
- NavigationButton,
3772
- {
3773
- page: activePageNumber - 1,
3774
- disabled: activePageNumber === 1,
3775
- children: [
3776
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
3777
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Prev" })
3778
- ]
3779
- }
3780
- ),
3781
- paginationRange.map((item, index) => {
3782
- if (item === "...") {
3783
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3784
- "span",
3785
- {
3786
- className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
3787
- children: "..."
3788
- },
3789
- `ellipsis-${index}`
3790
- );
3791
- }
3792
- const page = item;
3793
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PageButton, { page, children: page }, page);
3794
- }),
3795
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
3796
- NavigationButton,
3797
- {
3798
- page: activePageNumber + 1,
3799
- disabled: activePageNumber === totalPages,
3800
- children: [
3801
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Next" }),
3802
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
3803
- ]
3804
- }
3805
- )
3806
- ] }),
3807
- showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center space-x-2", children: [
3808
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Go to:" }),
3809
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3810
- "input",
3811
- {
3812
- type: "number",
3813
- min: "1",
3814
- max: totalPages,
3815
- defaultValue: activePageNumber,
3816
- className: "w-20 h-10 px-3 border rounded text-sm focus:outline-none focus:ring-2 focus:border-transparent",
3817
- onKeyDown: (e) => {
3818
- if (e.key === "Enter") {
3819
- const input = e.target;
3820
- const page = parseInt(input.value);
3821
- if (page >= 1 && page <= totalPages && page !== activePageNumber) {
3822
- window.location.href = builder.getNewPageUrl(page);
3823
- }
3824
- }
3825
- }
3826
- }
3827
- ) })
3828
- ] })
3829
- ] }),
3830
- showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
3831
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Show:" }),
3832
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3833
- Hyperlink,
3834
- {
3835
- className: `
3836
- px-3 py-1 text-sm rounded border transition-colors duration-150
3837
- ${itemsPerPage === size ? "bg-primary-base font-medium" : "bg-neutral-weak"}
3838
- `,
3839
- href: builder.getNewPageSizeUrl(size),
3840
- children: size
3841
- },
3842
- size
3843
- )) }),
3844
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "per page" })
3845
- ] }) })
3846
- ] });
3847
- };
3848
- var Pagination_default = Pagination;
3849
-
3850
- // src/components/utilities/PathUtility.tsx
3851
- var PathUtility = class {
3852
- constructor() {
3853
- }
3854
- normalizePath(path) {
3855
- if (path == null) {
3856
- return "/";
3857
- }
3858
- const trimmedPath = path.replace(/^\/|\/$/g, "");
3859
- return trimmedPath === "" ? "/" : "/" + trimmedPath + "/";
3860
- }
3861
- joinAndNormalizePaths(path1, path2) {
3862
- path1 = path1.replace(/\/$/, "");
3863
- path2 = path2.replace(/^\//, "");
3864
- const joinedPath = `${path1}/${path2}`;
3865
- const normalizedPath = joinedPath.replace(/\/{2,}/g, "/");
3866
- return normalizedPath === "" ? "/" : "/" + normalizedPath;
3867
- }
3868
- removeLeadingAndTrailingSlashes(path) {
3869
- if (path == null) {
3870
- return "/";
3871
- }
3872
- const trimmedPath = path.replace(/^\/|\/$/g, "");
3873
- return trimmedPath;
3874
- }
3875
- removeTrailingSlash(path) {
3876
- if (path == null) {
3877
- return "/";
3878
- }
3879
- const trimmedPath = path.replace(/\/$/, "");
3880
- return trimmedPath;
3881
- }
3882
- joinPaths(path1, path2) {
3883
- if (!path1.endsWith("/") && !path2.startsWith("/")) {
3884
- return `${path1}/${path2}`;
3885
- } else if (path1.endsWith("/") && path2.startsWith("/")) {
3886
- return `${path1}${path2.substr(1)}`;
3887
- } else {
3888
- return `${path1}${path2}`;
3889
- }
3890
- }
3891
- getFirstSegment(path) {
3892
- if (!path || path === "/") {
3893
- return "";
3894
- }
3895
- const segments = path.split("/").filter(Boolean);
3896
- return segments.length > 0 ? segments[0] : "";
3897
- }
3898
- };
3899
- var PathUtility_default = new PathUtility();
3900
-
3901
- // src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
3902
- var import_react50 = __toESM(require("react"));
3903
- var import_jsx_runtime66 = require("react/jsx-runtime");
3904
- function EnterAnimationClient({ hasEnterAnimation, children }) {
3905
- const ref = (0, import_react50.useRef)(null);
3906
- (0, import_react50.useEffect)(() => {
3907
- if (!hasEnterAnimation || !ref.current) return;
3908
- const observer = new IntersectionObserver(
3909
- (entries) => {
3910
- entries.forEach((entry) => {
3911
- if (entry.isIntersecting) {
3912
- entry.target.classList.add("visible");
3913
- observer.unobserve(entry.target);
3914
- }
3915
- });
3916
- },
3917
- { threshold: 0.1 }
3918
- );
3919
- observer.observe(ref.current);
3920
- return () => observer.disconnect();
3921
- }, [hasEnterAnimation]);
3922
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: children && // enforce passing the ref to Wrapper
3923
- //@ts-ignore
3924
- import_react50.default.cloneElement(children, { ref }) });
3925
- }
3926
-
3927
- // src/components/Slider.tsx
3928
- var import_react51 = __toESM(require("react"));
3929
- var import_jsx_runtime67 = require("react/jsx-runtime");
3930
3594
  var Slider = ({
3931
3595
  children,
3932
3596
  slidesToShow = 4,
@@ -3944,13 +3608,13 @@ var Slider = ({
3944
3608
  pillStyle = "cumulative",
3945
3609
  progressPosition = "bottom"
3946
3610
  }) => {
3947
- const [currentSlide, setCurrentSlide] = (0, import_react51.useState)(0);
3948
- const [transition, setTransition] = (0, import_react51.useState)(true);
3949
- const [slidesToShowState, setSlidesToShowState] = (0, import_react51.useState)(
3611
+ const [currentSlide, setCurrentSlide] = (0, import_react47.useState)(0);
3612
+ const [transition, setTransition] = (0, import_react47.useState)(true);
3613
+ const [slidesToShowState, setSlidesToShowState] = (0, import_react47.useState)(
3950
3614
  typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
3951
3615
  );
3952
- const [isPlaying, setIsPlaying] = (0, import_react51.useState)(autoplay);
3953
- (0, import_react51.useEffect)(() => {
3616
+ const [isPlaying, setIsPlaying] = (0, import_react47.useState)(autoplay);
3617
+ (0, import_react47.useEffect)(() => {
3954
3618
  if (typeof slidesToShow === "number") return;
3955
3619
  const handleResize = () => {
3956
3620
  if (window.innerWidth >= 1024) {
@@ -3965,7 +3629,7 @@ var Slider = ({
3965
3629
  window.addEventListener("resize", handleResize);
3966
3630
  return () => window.removeEventListener("resize", handleResize);
3967
3631
  }, [slidesToShow]);
3968
- (0, import_react51.useEffect)(() => {
3632
+ (0, import_react47.useEffect)(() => {
3969
3633
  if (!autoplay) return;
3970
3634
  const timer = setInterval(() => {
3971
3635
  if (isPlaying) {
@@ -3974,7 +3638,7 @@ var Slider = ({
3974
3638
  }, autoplay_speed);
3975
3639
  return () => clearInterval(timer);
3976
3640
  }, [autoplay, autoplay_speed, currentSlide, isPlaying]);
3977
- const totalSlides = import_react51.Children.count(children);
3641
+ const totalSlides = import_react47.Children.count(children);
3978
3642
  const maxSlide = totalSlides - slidesToShowState;
3979
3643
  const nextSlide = () => {
3980
3644
  if (currentSlide >= maxSlide) {
@@ -4019,16 +3683,16 @@ var Slider = ({
4019
3683
  }
4020
3684
  };
4021
3685
  const translateX = -currentSlide * (100 / slidesToShowState);
4022
- const slides = import_react51.Children.map(children, (child, index) => {
4023
- if (!import_react51.default.isValidElement(child)) return null;
3686
+ const slides = import_react47.Children.map(children, (child, index) => {
3687
+ if (!import_react47.default.isValidElement(child)) return null;
4024
3688
  const childProps = child.props;
4025
3689
  const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
4026
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3690
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4027
3691
  "div",
4028
3692
  {
4029
3693
  className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
4030
3694
  style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
4031
- children: (0, import_react51.cloneElement)(child, {
3695
+ children: (0, import_react47.cloneElement)(child, {
4032
3696
  className: mergedClassName
4033
3697
  })
4034
3698
  },
@@ -4046,14 +3710,14 @@ var Slider = ({
4046
3710
  return "bottom-4";
4047
3711
  }
4048
3712
  };
4049
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
3713
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4050
3714
  "div",
4051
3715
  {
4052
3716
  className: `relative w-full overflow-hidden ${className}`,
4053
3717
  onMouseEnter: handleMouseEnter,
4054
3718
  onMouseLeave: handleMouseLeave,
4055
3719
  children: [
4056
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3720
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4057
3721
  "div",
4058
3722
  {
4059
3723
  className: "flex h-full",
@@ -4064,18 +3728,18 @@ var Slider = ({
4064
3728
  children: slides
4065
3729
  }
4066
3730
  ),
4067
- show_arrows && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
4068
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3731
+ show_arrows && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
3732
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4069
3733
  ArrowButton,
4070
3734
  {
4071
3735
  direction: "left",
4072
3736
  onClick: prevSlide,
4073
3737
  visible: infinite_scroll || currentSlide > 0,
4074
3738
  className: arrowClassName,
4075
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("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__ */ (0, import_jsx_runtime67.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
3739
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("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__ */ (0, import_jsx_runtime62.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
4076
3740
  }
4077
3741
  ),
4078
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
3742
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4079
3743
  ArrowButton,
4080
3744
  {
4081
3745
  direction: "right",
@@ -4083,13 +3747,13 @@ var Slider = ({
4083
3747
  visible: infinite_scroll || currentSlide < maxSlide,
4084
3748
  className: arrowClassName,
4085
3749
  children: [
4086
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("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__ */ (0, import_jsx_runtime67.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
3750
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("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__ */ (0, import_jsx_runtime62.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
4087
3751
  " "
4088
3752
  ]
4089
3753
  }
4090
3754
  )
4091
3755
  ] }),
4092
- show_dots && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("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__ */ (0, import_jsx_runtime67.jsx)(
3756
+ show_dots && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("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__ */ (0, import_jsx_runtime62.jsx)(
4093
3757
  ProgressPill,
4094
3758
  {
4095
3759
  active: index === currentSlide,
@@ -4115,7 +3779,7 @@ var ArrowButton = ({
4115
3779
  visible,
4116
3780
  children,
4117
3781
  className = ""
4118
- }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3782
+ }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4119
3783
  "button",
4120
3784
  {
4121
3785
  className: `
@@ -4141,13 +3805,13 @@ var ProgressPill = ({
4141
3805
  currentSlide,
4142
3806
  totalSlides
4143
3807
  }) => {
4144
- const [progress, setProgress] = (0, import_react51.useState)(0);
4145
- (0, import_react51.useEffect)(() => {
3808
+ const [progress, setProgress] = (0, import_react47.useState)(0);
3809
+ (0, import_react47.useEffect)(() => {
4146
3810
  if (active) {
4147
3811
  setProgress(0);
4148
3812
  }
4149
3813
  }, [active, index]);
4150
- (0, import_react51.useEffect)(() => {
3814
+ (0, import_react47.useEffect)(() => {
4151
3815
  if (!active || !isPlaying) {
4152
3816
  if (!active) {
4153
3817
  setProgress(0);
@@ -4198,53 +3862,238 @@ var ProgressPill = ({
4198
3862
  hover:w-8
4199
3863
  `;
4200
3864
  }
4201
- };
4202
- const renderProgressBar = () => {
4203
- if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
4204
- const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
4205
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4206
- "div",
4207
- {
4208
- 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`,
4209
- style: { width: `${displayProgress}%` }
4210
- }
4211
- );
3865
+ };
3866
+ const renderProgressBar = () => {
3867
+ if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
3868
+ const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
3869
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3870
+ "div",
3871
+ {
3872
+ 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`,
3873
+ style: { width: `${displayProgress}%` }
3874
+ }
3875
+ );
3876
+ }
3877
+ return null;
3878
+ };
3879
+ const renderCumulativeFill = () => {
3880
+ if (style === "cumulative" && isFilled && !isActive) {
3881
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3882
+ "div",
3883
+ {
3884
+ className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
3885
+ style: { width: "100%" }
3886
+ }
3887
+ );
3888
+ }
3889
+ return null;
3890
+ };
3891
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
3892
+ "button",
3893
+ {
3894
+ className: `${baseClasses} ${getStyleClasses()}`,
3895
+ onClick,
3896
+ "aria-label": `Go to slide ${index + 1}`,
3897
+ "aria-current": isActive ? "true" : "false",
3898
+ children: [
3899
+ renderProgressBar(),
3900
+ renderCumulativeFill()
3901
+ ]
3902
+ }
3903
+ );
3904
+ };
3905
+ var Slider_default = Slider;
3906
+
3907
+ // src/components/utilities/AnimationUtility.tsx
3908
+ var AnimationUtility = class {
3909
+ static generateAnimationCSS(config, guid) {
3910
+ const {
3911
+ duration = 700,
3912
+ delay = 0,
3913
+ easing = "ease-out",
3914
+ distance = 30,
3915
+ scaleStart = 1,
3916
+ scaleEnd = 1.2,
3917
+ repeat = 1,
3918
+ intensity = 20,
3919
+ speedPerChar = 100,
3920
+ cursor = true,
3921
+ mode = "enter",
3922
+ direction = "left"
3923
+ // Default direction
3924
+ } = config;
3925
+ let base = "", visible = "", keyframes = "";
3926
+ switch (config.animation) {
3927
+ case "Fade":
3928
+ base = `opacity:0; transition:opacity ${duration}ms ${easing} ${delay}ms;`;
3929
+ visible = `opacity:1;`;
3930
+ break;
3931
+ case "FadeInUp":
3932
+ base = `opacity:0; transform:translateY(${distance}px); transition:all ${duration}ms ${easing} ${delay}ms;`;
3933
+ visible = `opacity:1; transform:translateY(0);`;
3934
+ break;
3935
+ case "Slide":
3936
+ const slideTransform = this.getSlideTransform(direction, distance);
3937
+ base = `opacity:0; transform:${slideTransform.start}; transition:all ${duration}ms ${easing} ${delay}ms; will-change: transform, opacity;`;
3938
+ visible = `opacity:1; transform:${slideTransform.end}; will-change: unset;`;
3939
+ break;
3940
+ case "ZoomIn":
3941
+ if (mode === "enter") {
3942
+ base = `opacity:0; transform:scale(${scaleStart}); transition:all ${duration}ms ${easing} ${delay}ms;`;
3943
+ visible = `opacity:1; transform:scale(${scaleEnd});`;
3944
+ } else {
3945
+ base = `transform:scale(${scaleStart}); transition:transform ${duration / 1e3}s ${easing} ${delay / 1e3}s;`;
3946
+ visible = `transform:scale(${scaleEnd});`;
3947
+ }
3948
+ break;
3949
+ case "Bounce":
3950
+ keyframes = `
3951
+ @keyframes bounce {
3952
+ 0%,20%,50%,80%,100% { transform: translateY(0); }
3953
+ 40% { transform: translateY(-${intensity}px); }
3954
+ 60% { transform: translateY(-${intensity / 2}px); }
3955
+ }
3956
+ `;
3957
+ if (mode === "enter") {
3958
+ base = `opacity:0;`;
3959
+ visible = `opacity:1; animation:bounce ${duration}ms ${easing} ${delay}ms ${repeat};`;
3960
+ } else {
3961
+ base = ``;
3962
+ visible = `animation:bounce ${duration / 1e3}s ${easing} ${delay / 1e3}s ${repeat};`;
3963
+ }
3964
+ break;
3965
+ case "Typewriter":
3966
+ keyframes = `
3967
+ @keyframes typewriter { from { width: 0 } to { width: 100% } }
3968
+ @keyframes blink { 50% { border-color: transparent } }
3969
+ `;
3970
+ base = `
3971
+ overflow:hidden;
3972
+ border-right:${cursor ? "2px solid black" : "none"};
3973
+ white-space:nowrap;
3974
+ width:0;
3975
+ margin:0 auto;
3976
+ `;
3977
+ visible = `
3978
+ animation:typewriter ${speedPerChar * 30}ms steps(30,end) ${delay}ms forwards
3979
+ ${cursor ? ", blink .75s step-end infinite" : ""};
3980
+ `;
3981
+ break;
3982
+ }
3983
+ if (mode === "hover") {
3984
+ return `
3985
+ ${keyframes}
3986
+ ${guid} { ${base} }
3987
+ ${guid}:hover { ${visible} }
3988
+ `;
3989
+ } else {
3990
+ return `
3991
+ ${keyframes}
3992
+ ${guid} { ${base} }
3993
+ ${guid}.visible { ${visible} }
3994
+ `;
3995
+ }
3996
+ }
3997
+ // Helper method to generate slide transforms based on direction
3998
+ static getSlideTransform(direction, distance) {
3999
+ switch (direction) {
4000
+ case "left":
4001
+ return { start: `translateX(${distance}px)`, end: `translateX(0)` };
4002
+ case "right":
4003
+ return { start: `translateX(-${distance}px)`, end: `translateX(0)` };
4004
+ case "up":
4005
+ return { start: `translateY(${distance}px)`, end: `translateY(0)` };
4006
+ case "down":
4007
+ return { start: `translateY(-${distance}px)`, end: `translateY(0)` };
4008
+ default:
4009
+ return { start: `translateX(${distance}px)`, end: `translateX(0)` };
4010
+ }
4011
+ }
4012
+ };
4013
+ var AnimationUtility_default = AnimationUtility;
4014
+
4015
+ // src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
4016
+ var import_react48 = __toESM(require("react"));
4017
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4018
+ function EnterAnimationClient({ hasEnterAnimation, children }) {
4019
+ const ref = (0, import_react48.useRef)(null);
4020
+ (0, import_react48.useEffect)(() => {
4021
+ if (!hasEnterAnimation || !ref.current) return;
4022
+ const observer = new IntersectionObserver(
4023
+ (entries) => {
4024
+ entries.forEach((entry) => {
4025
+ if (entry.isIntersecting) {
4026
+ entry.target.classList.add("visible");
4027
+ observer.unobserve(entry.target);
4028
+ }
4029
+ });
4030
+ },
4031
+ { threshold: 0.1 }
4032
+ );
4033
+ observer.observe(ref.current);
4034
+ return () => observer.disconnect();
4035
+ }, [hasEnterAnimation]);
4036
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: children && // enforce passing the ref to Wrapper
4037
+ //@ts-ignore
4038
+ import_react48.default.cloneElement(children, { ref }) });
4039
+ }
4040
+
4041
+ // src/components/utilities/PathUtility.tsx
4042
+ var PathUtility = class {
4043
+ constructor() {
4044
+ }
4045
+ normalizePath(path) {
4046
+ if (path == null) {
4047
+ return "/";
4048
+ }
4049
+ const trimmedPath = path.replace(/^\/|\/$/g, "");
4050
+ return trimmedPath === "" ? "/" : "/" + trimmedPath + "/";
4051
+ }
4052
+ joinAndNormalizePaths(path1, path2) {
4053
+ path1 = path1.replace(/\/$/, "");
4054
+ path2 = path2.replace(/^\//, "");
4055
+ const joinedPath = `${path1}/${path2}`;
4056
+ const normalizedPath = joinedPath.replace(/\/{2,}/g, "/");
4057
+ return normalizedPath === "" ? "/" : "/" + normalizedPath;
4058
+ }
4059
+ removeLeadingAndTrailingSlashes(path) {
4060
+ if (path == null) {
4061
+ return "/";
4062
+ }
4063
+ const trimmedPath = path.replace(/^\/|\/$/g, "");
4064
+ return trimmedPath;
4065
+ }
4066
+ removeTrailingSlash(path) {
4067
+ if (path == null) {
4068
+ return "/";
4212
4069
  }
4213
- return null;
4214
- };
4215
- const renderCumulativeFill = () => {
4216
- if (style === "cumulative" && isFilled && !isActive) {
4217
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4218
- "div",
4219
- {
4220
- className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
4221
- style: { width: "100%" }
4222
- }
4223
- );
4070
+ const trimmedPath = path.replace(/\/$/, "");
4071
+ return trimmedPath;
4072
+ }
4073
+ joinPaths(path1, path2) {
4074
+ if (!path1.endsWith("/") && !path2.startsWith("/")) {
4075
+ return `${path1}/${path2}`;
4076
+ } else if (path1.endsWith("/") && path2.startsWith("/")) {
4077
+ return `${path1}${path2.substr(1)}`;
4078
+ } else {
4079
+ return `${path1}${path2}`;
4224
4080
  }
4225
- return null;
4226
- };
4227
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
4228
- "button",
4229
- {
4230
- className: `${baseClasses} ${getStyleClasses()}`,
4231
- onClick,
4232
- "aria-label": `Go to slide ${index + 1}`,
4233
- "aria-current": isActive ? "true" : "false",
4234
- children: [
4235
- renderProgressBar(),
4236
- renderCumulativeFill()
4237
- ]
4081
+ }
4082
+ getFirstSegment(path) {
4083
+ if (!path || path === "/") {
4084
+ return "";
4238
4085
  }
4239
- );
4086
+ const segments = path.split("/").filter(Boolean);
4087
+ return segments.length > 0 ? segments[0] : "";
4088
+ }
4240
4089
  };
4241
- var Slider_default = Slider;
4090
+ var PathUtility_default = new PathUtility();
4242
4091
 
4243
4092
  // src/components/NoDataFound.tsx
4244
- var import_jsx_runtime68 = require("react/jsx-runtime");
4093
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4245
4094
  var NoDataFound = () => {
4246
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
4247
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4095
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
4096
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4248
4097
  "svg",
4249
4098
  {
4250
4099
  className: "w-10 h-10",
@@ -4252,7 +4101,7 @@ var NoDataFound = () => {
4252
4101
  stroke: "currentColor",
4253
4102
  viewBox: "0 0 24 24",
4254
4103
  xmlns: "http://www.w3.org/2000/svg",
4255
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4104
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4256
4105
  "path",
4257
4106
  {
4258
4107
  strokeLinecap: "round",
@@ -4263,14 +4112,182 @@ var NoDataFound = () => {
4263
4112
  )
4264
4113
  }
4265
4114
  ) }) }),
4266
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
4267
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
4115
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
4116
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
4268
4117
  ] });
4269
4118
  };
4270
4119
  var NoDataFound_default = NoDataFound;
4271
4120
 
4121
+ // src/components/Pagination.tsx
4122
+ var import_react49 = require("react");
4123
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4124
+ var Pagination = (props) => {
4125
+ const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
4126
+ const builder = (0, import_react49.useMemo)(() => {
4127
+ const b = new OdataBuilder(path);
4128
+ if (query) b.setQuery(query);
4129
+ return b;
4130
+ }, [path, query]);
4131
+ const activePageNumber = builder.getPageNumber(Constants.pagesize);
4132
+ const totalItems = dataset?.count || 0;
4133
+ const itemsPerPage = parseInt(builder.top || Constants.pagesize.toString());
4134
+ const totalPages = Math.ceil(totalItems / itemsPerPage);
4135
+ const startItem = totalItems > 0 ? (activePageNumber - 1) * itemsPerPage + 1 : 0;
4136
+ const endItem = Math.min(activePageNumber * itemsPerPage, totalItems);
4137
+ const getPaginationRange = () => {
4138
+ const delta = 1;
4139
+ const range = [];
4140
+ if (totalPages <= 7) {
4141
+ return Array.from({ length: totalPages }, (_, i) => i + 1);
4142
+ }
4143
+ range.push(1);
4144
+ let start = Math.max(2, activePageNumber - delta);
4145
+ let end = Math.min(totalPages - 1, activePageNumber + delta);
4146
+ if (activePageNumber - delta <= 2) {
4147
+ end = Math.min(totalPages - 1, 4);
4148
+ }
4149
+ if (activePageNumber + delta >= totalPages - 1) {
4150
+ start = Math.max(2, totalPages - 4);
4151
+ }
4152
+ if (start > 2) {
4153
+ range.push("...");
4154
+ }
4155
+ for (let i = start; i <= end; i++) {
4156
+ range.push(i);
4157
+ }
4158
+ if (end < totalPages - 1) {
4159
+ range.push("...");
4160
+ }
4161
+ if (totalPages > 1) {
4162
+ range.push(totalPages);
4163
+ }
4164
+ return range;
4165
+ };
4166
+ const paginationRange = getPaginationRange();
4167
+ const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4168
+ Hyperlink,
4169
+ {
4170
+ linkType: "Link" /* Link */,
4171
+ className: `
4172
+ min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2.5 md:px-3
4173
+ border text-sm font-medium transition-colors duration-150
4174
+ ${activePageNumber === page ? "bg-primary-base font-semibold" : ""}
4175
+ `,
4176
+ href: builder.getNewPageUrl(page),
4177
+ children
4178
+ }
4179
+ );
4180
+ const NavigationButton = ({ page, disabled, children }) => {
4181
+ if (disabled) {
4182
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("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 });
4183
+ }
4184
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4185
+ Hyperlink,
4186
+ {
4187
+ 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",
4188
+ href: builder.getNewPageUrl(page),
4189
+ children
4190
+ }
4191
+ );
4192
+ };
4193
+ if (totalPages <= 1 && totalItems === 0) return null;
4194
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "py-6 border-t bg-default", children: [
4195
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
4196
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "text-sm", children: [
4197
+ "Showing ",
4198
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "font-semibold", children: [
4199
+ startItem,
4200
+ "-",
4201
+ endItem
4202
+ ] }),
4203
+ " ",
4204
+ "out of ",
4205
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
4206
+ " results"
4207
+ ] }),
4208
+ totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center space-x-1", children: [
4209
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
4210
+ NavigationButton,
4211
+ {
4212
+ page: activePageNumber - 1,
4213
+ disabled: activePageNumber === 1,
4214
+ children: [
4215
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
4216
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Prev" })
4217
+ ]
4218
+ }
4219
+ ),
4220
+ paginationRange.map((item, index) => {
4221
+ if (item === "...") {
4222
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4223
+ "span",
4224
+ {
4225
+ className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
4226
+ children: "..."
4227
+ },
4228
+ `ellipsis-${index}`
4229
+ );
4230
+ }
4231
+ const page = item;
4232
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PageButton, { page, children: page }, page);
4233
+ }),
4234
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
4235
+ NavigationButton,
4236
+ {
4237
+ page: activePageNumber + 1,
4238
+ disabled: activePageNumber === totalPages,
4239
+ children: [
4240
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Next" }),
4241
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
4242
+ ]
4243
+ }
4244
+ )
4245
+ ] }),
4246
+ showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center space-x-2", children: [
4247
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Go to:" }),
4248
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4249
+ "input",
4250
+ {
4251
+ type: "number",
4252
+ min: "1",
4253
+ max: totalPages,
4254
+ defaultValue: activePageNumber,
4255
+ className: "w-20 h-10 px-3 border rounded text-sm focus:outline-none focus:ring-2 focus:border-transparent",
4256
+ onKeyDown: (e) => {
4257
+ if (e.key === "Enter") {
4258
+ const input = e.target;
4259
+ const page = parseInt(input.value);
4260
+ if (page >= 1 && page <= totalPages && page !== activePageNumber) {
4261
+ window.location.href = builder.getNewPageUrl(page);
4262
+ }
4263
+ }
4264
+ }
4265
+ }
4266
+ ) })
4267
+ ] })
4268
+ ] }),
4269
+ showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
4270
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Show:" }),
4271
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4272
+ Hyperlink,
4273
+ {
4274
+ className: `
4275
+ px-3 py-1 text-sm rounded border transition-colors duration-150
4276
+ ${itemsPerPage === size ? "bg-primary-base font-medium" : "bg-neutral-weak"}
4277
+ `,
4278
+ href: builder.getNewPageSizeUrl(size),
4279
+ children: size
4280
+ },
4281
+ size
4282
+ )) }),
4283
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "per page" })
4284
+ ] }) })
4285
+ ] });
4286
+ };
4287
+ var Pagination_default = Pagination;
4288
+
4272
4289
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
4273
- var import_jsx_runtime69 = require("react/jsx-runtime");
4290
+ var import_jsx_runtime66 = require("react/jsx-runtime");
4274
4291
  function toCamelCase(str) {
4275
4292
  return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
4276
4293
  }
@@ -4287,18 +4304,23 @@ function convertKeysToCamelCase(obj) {
4287
4304
  var getNestedValue = (obj, path) => {
4288
4305
  if (!obj || !path) return void 0;
4289
4306
  return path.split(".").reduce((current, key) => {
4307
+ {
4308
+ }
4290
4309
  return current && current[key] !== void 0 ? current[key] : void 0;
4291
4310
  }, obj);
4292
4311
  };
4312
+ {
4313
+ }
4293
4314
  function generateCompleteBackgroundString(layers, apiBaseUrl) {
4294
4315
  if (!layers || !Array.isArray(layers)) return "";
4295
4316
  return layers.filter((layer) => layer && layer.type && layer.value).map((layer) => {
4296
4317
  if (layer.type === "image" && typeof layer.value === "object") {
4297
4318
  const imageValue = layer.value;
4298
4319
  if (!imageValue.assetUrl) return "";
4299
- const resolvedAssetUrl = AssetUtility_default.resolveUrl(apiBaseUrl, imageValue.assetUrl);
4300
- if (!resolvedAssetUrl) return "";
4301
- const url = `url('${resolvedAssetUrl}')`;
4320
+ const url = `url('${AssetUtility_default.resolveUrl(
4321
+ apiBaseUrl,
4322
+ imageValue.assetUrl
4323
+ )}')`;
4302
4324
  const repeat = layer.repeat || "no-repeat";
4303
4325
  const position = layer.position || "center";
4304
4326
  const size = layer.size || "auto";
@@ -4317,12 +4339,16 @@ function generateCompleteBackgroundString(layers, apiBaseUrl) {
4317
4339
  }).filter((bg) => bg.trim() !== "").join(", ");
4318
4340
  }
4319
4341
  var generateCssString = (guid, stylesObject, mobileStylesObject) => {
4320
- let gridColumns = stylesObject.gridTemplateColumns ? stylesObject.gridTemplateColumns.match(/\d+/g) : [];
4321
- let hasGridProperties = gridColumns.length > 0;
4322
- let largeCols = hasGridProperties ? parseInt(gridColumns[0]) : 4;
4323
- let tabletColumns = hasGridProperties ? Math.ceil(parseInt(gridColumns[0]) / 2) : 2;
4324
- let mobileColumns = 1;
4325
- let cssRules = Object.entries(stylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4342
+ {
4343
+ }
4344
+ const gridColumns = stylesObject.gridTemplateColumns ? stylesObject.gridTemplateColumns.match(/\d+/g) : [];
4345
+ const hasGridProperties = gridColumns.length > 0;
4346
+ const largeCols = hasGridProperties ? parseInt(gridColumns[0]) : 4;
4347
+ const tabletColumns = hasGridProperties ? Math.ceil(parseInt(gridColumns[0]) / 2) : 2;
4348
+ const mobileColumns = 1;
4349
+ {
4350
+ }
4351
+ const cssRules = Object.entries(stylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4326
4352
  const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
4327
4353
  return `${cssKey}: ${value};`;
4328
4354
  });
@@ -4332,7 +4358,7 @@ ${cssRules.join(
4332
4358
  )}
4333
4359
  transition: all 0.3s ease-in-out; }`;
4334
4360
  if (mobileStylesObject) {
4335
- let mobileCssRules = Object.entries(mobileStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4361
+ const mobileCssRules = Object.entries(mobileStylesObject).filter(([_, value]) => value !== void 0 && value !== "").map(([key, value]) => {
4336
4362
  const cssKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
4337
4363
  return `${cssKey}: ${value};`;
4338
4364
  });
@@ -4370,7 +4396,6 @@ var DivContainer = async (props) => {
4370
4396
  code: CodeNode_default,
4371
4397
  image: ImageNode_default,
4372
4398
  horizontalrule: HorizontalRuleNode_default,
4373
- "layout-container": LayoutContainerNode_default,
4374
4399
  widget: WidgetNode_default,
4375
4400
  embed: EmbedNode_default,
4376
4401
  "div-container": DivContainer,
@@ -4382,17 +4407,15 @@ var DivContainer = async (props) => {
4382
4407
  const mobileStyles = props.node.mobileCssProperties;
4383
4408
  const dataBindingProperties = props.node.dataBinding;
4384
4409
  const updatedStyles = convertKeysToCamelCase(styles);
4385
- var background = generateCompleteBackgroundString(
4386
- props.node.backgroundLayers,
4387
- // props.resolveAssetUrl,
4388
- props.apiBaseUrl
4389
- );
4410
+ const background = generateCompleteBackgroundString(props.node.backgroundLayers, props.apiBaseUrl);
4390
4411
  let containerPaddingClass = "";
4391
4412
  if (props.node.containerPadding == "small") {
4392
4413
  containerPaddingClass = "container-small";
4393
4414
  } else if (props.node.containerPadding == "large") {
4394
4415
  containerPaddingClass = "container-large";
4395
4416
  }
4417
+ {
4418
+ }
4396
4419
  const updatedStyle = { ...updatedStyles };
4397
4420
  const backgroundStyle = background && background !== "" ? { background } : {};
4398
4421
  const combinedStyles = {
@@ -4423,13 +4446,30 @@ var DivContainer = async (props) => {
4423
4446
  return fieldValue !== void 0 && fieldValue === false;
4424
4447
  };
4425
4448
  const isHidden = shouldHideContainer();
4426
- const nodeData = props.dataMap?.[props.node.__id];
4427
- let result = nodeData?.result;
4428
- let response = nodeData?.response;
4449
+ let odataString = void 0;
4450
+ let endpoint = void 0;
4451
+ let result = null;
4452
+ let response = null;
4429
4453
  let childCollectionData = null;
4430
4454
  if (dataBindingProperties) {
4431
- if (dataBindingProperties.showNoResultsMessage && (result === void 0 || Array.isArray(result) && result.length == 0)) {
4432
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(NoDataFound_default, {});
4455
+ const serviceClient = new ServiceClient_default(props.apiBaseUrl, props.session);
4456
+ endpoint = dataBindingProperties.dataSource;
4457
+ {
4458
+ }
4459
+ endpoint = endpoint.replace(/\{(\w+)\}/g, (_, key) => {
4460
+ return props.routeParameters?.[key] ?? `{${key}}`;
4461
+ });
4462
+ if (dataBindingProperties.applyODataParams) {
4463
+ odataString = OdataBuilder.getOdataQueryString(props.query);
4464
+ if (odataString) {
4465
+ const separator = endpoint.includes("?") ? "&" : "?";
4466
+ endpoint += separator + odataString;
4467
+ }
4468
+ }
4469
+ response = await serviceClient.get(endpoint);
4470
+ result = response?.result;
4471
+ if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
4472
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(NoDataFound_default, {});
4433
4473
  }
4434
4474
  if (dataBindingProperties.childCollectionName && props.dataitem) {
4435
4475
  childCollectionData = getNestedValue(props.dataitem, dataBindingProperties.childCollectionName);
@@ -4437,9 +4477,11 @@ var DivContainer = async (props) => {
4437
4477
  }
4438
4478
  const cssResult = generateCssString(guid, updatedStyle, mobileStyles);
4439
4479
  function renderNode(node, props2, dataitem, key, href) {
4480
+ {
4481
+ }
4440
4482
  const SelectedNode = NodeTypes2[node.type];
4441
4483
  if (!SelectedNode) return null;
4442
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4484
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4443
4485
  SelectedNode,
4444
4486
  {
4445
4487
  node,
@@ -4450,11 +4492,9 @@ var DivContainer = async (props) => {
4450
4492
  host: props2.host,
4451
4493
  path: props2.path,
4452
4494
  apiBaseUrl: props2.apiBaseUrl,
4453
- assetBaseUrl: props2.assetBaseUrl,
4454
4495
  breadcrumb: props2.breadcrumb,
4455
4496
  dataitem,
4456
- href,
4457
- dataMap: props2.dataMap
4497
+ href
4458
4498
  }
4459
4499
  ) }, key);
4460
4500
  }
@@ -4492,6 +4532,8 @@ var DivContainer = async (props) => {
4492
4532
  return [props.dataitem];
4493
4533
  })();
4494
4534
  const renderLink = result && props.node.dataBinding?.responseType === "array" ? true : false;
4535
+ {
4536
+ }
4495
4537
  let Wrapper;
4496
4538
  let wrapperProps;
4497
4539
  switch (true) {
@@ -4520,6 +4562,8 @@ var DivContainer = async (props) => {
4520
4562
  const replacementTag = props.node.replaceDivTagWith;
4521
4563
  const allowedTags = ["div", "section", "article", "details", "summary"];
4522
4564
  if (replacementTag && allowedTags.includes(replacementTag)) {
4565
+ {
4566
+ }
4523
4567
  Wrapper = replacementTag;
4524
4568
  } else {
4525
4569
  Wrapper = "div";
@@ -4536,9 +4580,9 @@ var DivContainer = async (props) => {
4536
4580
  props.node.autoFormat && "auto-format",
4537
4581
  props.node.bgClass
4538
4582
  ].filter(Boolean).join(" ");
4539
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react52.default.Fragment, { children: [
4540
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
4541
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EnterAnimationClient, { hasEnterAnimation: !!props.node.enterAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4583
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react50.default.Fragment, { children: [
4584
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
4585
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(EnterAnimationClient, { hasEnterAnimation: !!props.node.enterAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4542
4586
  Wrapper,
4543
4587
  {
4544
4588
  id: guid,
@@ -4547,18 +4591,18 @@ var DivContainer = async (props) => {
4547
4591
  ...wrapperProps,
4548
4592
  children: dataToRender.map(
4549
4593
  (item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
4550
- (child, i) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react52.default.Fragment, { children: child }, i)
4594
+ (child, i) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react50.default.Fragment, { children: child }, i)
4551
4595
  ) : renderChildren(props.node.children, props, item, idx)
4552
4596
  )
4553
4597
  }
4554
4598
  ) }) }),
4555
- dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
4599
+ dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
4556
4600
  ] });
4557
4601
  };
4558
4602
  var DivContainer_default = DivContainer;
4559
4603
 
4560
4604
  // src/components/pageRenderingEngine/PageBodyRenderer.tsx
4561
- var import_jsx_runtime70 = require("react/jsx-runtime");
4605
+ var import_jsx_runtime67 = require("react/jsx-runtime");
4562
4606
  var NodeTypes = {
4563
4607
  ["paragraph"]: ParagraphNode_default,
4564
4608
  ["heading"]: HeadingNode_default,
@@ -4567,7 +4611,6 @@ var NodeTypes = {
4567
4611
  ["code"]: CodeNode_default,
4568
4612
  ["image"]: ImageNode_default,
4569
4613
  ["horizontalrule"]: HorizontalRuleNode_default,
4570
- ["layout-container"]: LayoutContainerNode_default,
4571
4614
  ["widget"]: WidgetNode_default,
4572
4615
  ["form-container"]: FormContainerNode_default,
4573
4616
  ["div-container"]: DivContainer_default,
@@ -4586,11 +4629,11 @@ var PageBodyRenderer = (props) => {
4586
4629
  if (pageBodyTree && pageBodyTree.root) {
4587
4630
  rootNode = pageBodyTree.root;
4588
4631
  }
4589
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react53.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
4632
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react51.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
4590
4633
  {
4591
4634
  }
4592
4635
  const SelectedNode = NodeTypes[node.type];
4593
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react53.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4636
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react51.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4594
4637
  SelectedNode,
4595
4638
  {
4596
4639
  node,
@@ -4601,12 +4644,10 @@ var PageBodyRenderer = (props) => {
4601
4644
  host: props.host,
4602
4645
  path: props.path,
4603
4646
  apiBaseUrl: props.apiBaseUrl,
4604
- widgetRegistry: props.widgetRegistry,
4605
4647
  serviceClient: props.serviceClient,
4606
- assetBaseUrl: props.assetBaseUrl,
4607
- dataMap: props.dataMap
4648
+ assetBaseUrl: props.assetBaseUrl
4608
4649
  }
4609
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4650
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4610
4651
  SelectedNode,
4611
4652
  {
4612
4653
  node,
@@ -4616,10 +4657,8 @@ var PageBodyRenderer = (props) => {
4616
4657
  host: props.host,
4617
4658
  path: props.path,
4618
4659
  apiBaseUrl: props.apiBaseUrl,
4619
- widgetRegistry: props.widgetRegistry,
4620
4660
  serviceClient: props.serviceClient,
4621
- assetBaseUrl: props.assetBaseUrl,
4622
- dataMap: props.dataMap
4661
+ assetBaseUrl: props.assetBaseUrl
4623
4662
  }
4624
4663
  ) }) }) }, index);
4625
4664
  }) });