@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260901061310 → 0.8.1-dev.20260901095905

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.
@@ -86,7 +86,7 @@ var Pagination = (props) => {
86
86
  );
87
87
  };
88
88
  if (totalPages <= 1 && totalItems === 0) return null;
89
- return /* @__PURE__ */ jsxs("div", { className: "py-6 border-t bg-default", children: [
89
+ return /* @__PURE__ */ jsxs("div", { className: "py-6 border-t bg-default mt-6", children: [
90
90
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
91
91
  /* @__PURE__ */ jsxs("div", { className: "text-sm", children: [
92
92
  "Showing ",
@@ -86,7 +86,7 @@ var Pagination = (props) => {
86
86
  );
87
87
  };
88
88
  if (totalPages <= 1 && totalItems === 0) return null;
89
- return /* @__PURE__ */ jsxs("div", { className: "py-6 border-t bg-default", children: [
89
+ return /* @__PURE__ */ jsxs("div", { className: "py-6 border-t bg-default mt-6", children: [
90
90
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
91
91
  /* @__PURE__ */ jsxs("div", { className: "text-sm", children: [
92
92
  "Showing ",
package/dist/index.js CHANGED
@@ -5333,7 +5333,7 @@ var init_Pagination = __esm({
5333
5333
  );
5334
5334
  };
5335
5335
  if (totalPages <= 1 && totalItems === 0) return null;
5336
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "py-6 border-t bg-default", children: [
5336
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "py-6 border-t bg-default mt-6", children: [
5337
5337
  /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
5338
5338
  /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "text-sm", children: [
5339
5339
  "Showing ",
@@ -8587,6 +8587,7 @@ var DivContainer = async (props) => {
8587
8587
  const mobileStyles = props.node.mobileCssProperties;
8588
8588
  const tabletStyles = props.node.tabletCssProperties;
8589
8589
  const dataBindingProperties = props.node.dataBinding;
8590
+ const isRepeatForEachItem = props.node.repeatForEachItem === true || props.node.replicate === true;
8590
8591
  const updatedStyles = convertKeysToCamelCase(styles);
8591
8592
  let containerPaddingClass = "";
8592
8593
  if (props.node.containerPadding == "small") {
@@ -8659,9 +8660,9 @@ var DivContainer = async (props) => {
8659
8660
  dataBindingProperties.childCollectionName
8660
8661
  );
8661
8662
  }
8662
- const effectiveResult = dataBindingProperties.childCollectionName ? childCollectionData : result;
8663
+ const effectiveResult = childCollectionData ?? result;
8663
8664
  const hasNoData = effectiveResult === null || effectiveResult === void 0 || typeof effectiveResult === "string" && effectiveResult.trim() === "" || Array.isArray(effectiveResult) && effectiveResult.length === 0 || typeof effectiveResult === "object" && !Array.isArray(effectiveResult) && Object.keys(effectiveResult).length === 0;
8664
- if (hasNoData && dataBindingProperties.showNoResultsMessage !== true) {
8665
+ if (hasNoData && !isRepeatForEachItem && dataBindingProperties.showNoResultsMessage !== true) {
8665
8666
  return null;
8666
8667
  }
8667
8668
  }
@@ -8721,7 +8722,7 @@ var DivContainer = async (props) => {
8721
8722
  return dataItem[key] !== void 0 ? dataItem[key] : match;
8722
8723
  });
8723
8724
  }
8724
- const arrayResult = result && props.node.dataBinding?.responseType === "array" && Array.isArray(result) ? result : null;
8725
+ const arrayResult = Array.isArray(result) ? result : null;
8725
8726
  const hasReplicatedChildren = Boolean(
8726
8727
  props.node.children?.some(
8727
8728
  (node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
@@ -8767,9 +8768,27 @@ var DivContainer = async (props) => {
8767
8768
  );
8768
8769
  }
8769
8770
  return props.node.children.flatMap((node, childIndex) => {
8770
- if (node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)) {
8771
- if (!arrayResult || arrayResult.length === 0) {
8772
- return node?.dataBinding?.showNoResultsMessage ? [
8771
+ const isRepeated = node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true);
8772
+ if (!isRepeated) {
8773
+ return [renderNode(node, props, props.dataitem, `static-${childIndex}`)];
8774
+ }
8775
+ let repeatItems = null;
8776
+ const childCollectionName = node?.dataBinding?.childCollectionName;
8777
+ if (childCollectionName && props.dataitem) {
8778
+ const nestedCollection = getNestedValue6(
8779
+ props.dataitem,
8780
+ childCollectionName
8781
+ );
8782
+ if (Array.isArray(nestedCollection)) {
8783
+ repeatItems = nestedCollection;
8784
+ }
8785
+ }
8786
+ if (repeatItems === null && Array.isArray(arrayResult)) {
8787
+ repeatItems = arrayResult;
8788
+ }
8789
+ if (!repeatItems || repeatItems.length === 0) {
8790
+ if (node?.dataBinding?.showNoResultsMessage === true) {
8791
+ return [
8773
8792
  renderNode(
8774
8793
  node,
8775
8794
  props,
@@ -8778,26 +8797,19 @@ var DivContainer = async (props) => {
8778
8797
  void 0,
8779
8798
  true
8780
8799
  )
8781
- ] : [];
8800
+ ];
8782
8801
  }
8783
- return arrayResult.map(
8784
- (item, itemIndex) => renderNode(
8785
- node,
8786
- props,
8787
- item,
8788
- `replicated-${childIndex}-${itemIndex}`,
8789
- item?.links?.view && !props.href ? item.links.view : void 0
8790
- )
8791
- );
8802
+ return [];
8792
8803
  }
8793
- return [
8794
- renderNode(
8804
+ return repeatItems.map(
8805
+ (item, itemIndex) => renderNode(
8795
8806
  node,
8796
8807
  props,
8797
- props.dataitem,
8798
- `static-${childIndex}`
8808
+ item,
8809
+ `replicated-${childIndex}-${itemIndex}`,
8810
+ item?.links?.view && !props.href ? item.links.view : void 0
8799
8811
  )
8800
- ];
8812
+ );
8801
8813
  });
8802
8814
  };
8803
8815
  {
package/dist/index.mjs CHANGED
@@ -2391,7 +2391,7 @@ var GoogleMapNode_default = GoogleMapNode;
2391
2391
 
2392
2392
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
2393
2393
  import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
2394
- var Pagination = dynamic12(() => import("./Pagination-JGUQJ2DH.mjs"), { ssr: true });
2394
+ var Pagination = dynamic12(() => import("./Pagination-PGAK7KDA.mjs"), { ssr: true });
2395
2395
  var DataBindingControls = dynamic12(() => import("./DataBindingControls-GWNAJ7PR.mjs"), {
2396
2396
  ssr: true
2397
2397
  });
@@ -2583,6 +2583,7 @@ var DivContainer = async (props) => {
2583
2583
  const mobileStyles = props.node.mobileCssProperties;
2584
2584
  const tabletStyles = props.node.tabletCssProperties;
2585
2585
  const dataBindingProperties = props.node.dataBinding;
2586
+ const isRepeatForEachItem = props.node.repeatForEachItem === true || props.node.replicate === true;
2586
2587
  const updatedStyles = convertKeysToCamelCase(styles);
2587
2588
  let containerPaddingClass = "";
2588
2589
  if (props.node.containerPadding == "small") {
@@ -2655,9 +2656,9 @@ var DivContainer = async (props) => {
2655
2656
  dataBindingProperties.childCollectionName
2656
2657
  );
2657
2658
  }
2658
- const effectiveResult = dataBindingProperties.childCollectionName ? childCollectionData : result;
2659
+ const effectiveResult = childCollectionData ?? result;
2659
2660
  const hasNoData = effectiveResult === null || effectiveResult === void 0 || typeof effectiveResult === "string" && effectiveResult.trim() === "" || Array.isArray(effectiveResult) && effectiveResult.length === 0 || typeof effectiveResult === "object" && !Array.isArray(effectiveResult) && Object.keys(effectiveResult).length === 0;
2660
- if (hasNoData && dataBindingProperties.showNoResultsMessage !== true) {
2661
+ if (hasNoData && !isRepeatForEachItem && dataBindingProperties.showNoResultsMessage !== true) {
2661
2662
  return null;
2662
2663
  }
2663
2664
  }
@@ -2717,7 +2718,7 @@ var DivContainer = async (props) => {
2717
2718
  return dataItem[key] !== void 0 ? dataItem[key] : match;
2718
2719
  });
2719
2720
  }
2720
- const arrayResult = result && props.node.dataBinding?.responseType === "array" && Array.isArray(result) ? result : null;
2721
+ const arrayResult = Array.isArray(result) ? result : null;
2721
2722
  const hasReplicatedChildren = Boolean(
2722
2723
  props.node.children?.some(
2723
2724
  (node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
@@ -2763,9 +2764,27 @@ var DivContainer = async (props) => {
2763
2764
  );
2764
2765
  }
2765
2766
  return props.node.children.flatMap((node, childIndex) => {
2766
- if (node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)) {
2767
- if (!arrayResult || arrayResult.length === 0) {
2768
- return node?.dataBinding?.showNoResultsMessage ? [
2767
+ const isRepeated = node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true);
2768
+ if (!isRepeated) {
2769
+ return [renderNode(node, props, props.dataitem, `static-${childIndex}`)];
2770
+ }
2771
+ let repeatItems = null;
2772
+ const childCollectionName = node?.dataBinding?.childCollectionName;
2773
+ if (childCollectionName && props.dataitem) {
2774
+ const nestedCollection = getNestedValue6(
2775
+ props.dataitem,
2776
+ childCollectionName
2777
+ );
2778
+ if (Array.isArray(nestedCollection)) {
2779
+ repeatItems = nestedCollection;
2780
+ }
2781
+ }
2782
+ if (repeatItems === null && Array.isArray(arrayResult)) {
2783
+ repeatItems = arrayResult;
2784
+ }
2785
+ if (!repeatItems || repeatItems.length === 0) {
2786
+ if (node?.dataBinding?.showNoResultsMessage === true) {
2787
+ return [
2769
2788
  renderNode(
2770
2789
  node,
2771
2790
  props,
@@ -2774,26 +2793,19 @@ var DivContainer = async (props) => {
2774
2793
  void 0,
2775
2794
  true
2776
2795
  )
2777
- ] : [];
2796
+ ];
2778
2797
  }
2779
- return arrayResult.map(
2780
- (item, itemIndex) => renderNode(
2781
- node,
2782
- props,
2783
- item,
2784
- `replicated-${childIndex}-${itemIndex}`,
2785
- item?.links?.view && !props.href ? item.links.view : void 0
2786
- )
2787
- );
2798
+ return [];
2788
2799
  }
2789
- return [
2790
- renderNode(
2800
+ return repeatItems.map(
2801
+ (item, itemIndex) => renderNode(
2791
2802
  node,
2792
2803
  props,
2793
- props.dataitem,
2794
- `static-${childIndex}`
2804
+ item,
2805
+ `replicated-${childIndex}-${itemIndex}`,
2806
+ item?.links?.view && !props.href ? item.links.view : void 0
2795
2807
  )
2796
- ];
2808
+ );
2797
2809
  });
2798
2810
  };
2799
2811
  {
package/dist/server.js CHANGED
@@ -3437,7 +3437,7 @@ var init_Pagination = __esm({
3437
3437
  );
3438
3438
  };
3439
3439
  if (totalPages <= 1 && totalItems === 0) return null;
3440
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "py-6 border-t bg-default", children: [
3440
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "py-6 border-t bg-default mt-6", children: [
3441
3441
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
3442
3442
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "text-sm", children: [
3443
3443
  "Showing ",
@@ -8556,6 +8556,7 @@ var DivContainer = async (props) => {
8556
8556
  const mobileStyles = props.node.mobileCssProperties;
8557
8557
  const tabletStyles = props.node.tabletCssProperties;
8558
8558
  const dataBindingProperties = props.node.dataBinding;
8559
+ const isRepeatForEachItem = props.node.repeatForEachItem === true || props.node.replicate === true;
8559
8560
  const updatedStyles = convertKeysToCamelCase(styles);
8560
8561
  let containerPaddingClass = "";
8561
8562
  if (props.node.containerPadding == "small") {
@@ -8628,9 +8629,9 @@ var DivContainer = async (props) => {
8628
8629
  dataBindingProperties.childCollectionName
8629
8630
  );
8630
8631
  }
8631
- const effectiveResult = dataBindingProperties.childCollectionName ? childCollectionData : result;
8632
+ const effectiveResult = childCollectionData ?? result;
8632
8633
  const hasNoData = effectiveResult === null || effectiveResult === void 0 || typeof effectiveResult === "string" && effectiveResult.trim() === "" || Array.isArray(effectiveResult) && effectiveResult.length === 0 || typeof effectiveResult === "object" && !Array.isArray(effectiveResult) && Object.keys(effectiveResult).length === 0;
8633
- if (hasNoData && dataBindingProperties.showNoResultsMessage !== true) {
8634
+ if (hasNoData && !isRepeatForEachItem && dataBindingProperties.showNoResultsMessage !== true) {
8634
8635
  return null;
8635
8636
  }
8636
8637
  }
@@ -8690,7 +8691,7 @@ var DivContainer = async (props) => {
8690
8691
  return dataItem[key] !== void 0 ? dataItem[key] : match;
8691
8692
  });
8692
8693
  }
8693
- const arrayResult = result && props.node.dataBinding?.responseType === "array" && Array.isArray(result) ? result : null;
8694
+ const arrayResult = Array.isArray(result) ? result : null;
8694
8695
  const hasReplicatedChildren = Boolean(
8695
8696
  props.node.children?.some(
8696
8697
  (node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
@@ -8736,9 +8737,27 @@ var DivContainer = async (props) => {
8736
8737
  );
8737
8738
  }
8738
8739
  return props.node.children.flatMap((node, childIndex) => {
8739
- if (node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)) {
8740
- if (!arrayResult || arrayResult.length === 0) {
8741
- return node?.dataBinding?.showNoResultsMessage ? [
8740
+ const isRepeated = node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true);
8741
+ if (!isRepeated) {
8742
+ return [renderNode(node, props, props.dataitem, `static-${childIndex}`)];
8743
+ }
8744
+ let repeatItems = null;
8745
+ const childCollectionName = node?.dataBinding?.childCollectionName;
8746
+ if (childCollectionName && props.dataitem) {
8747
+ const nestedCollection = getNestedValue6(
8748
+ props.dataitem,
8749
+ childCollectionName
8750
+ );
8751
+ if (Array.isArray(nestedCollection)) {
8752
+ repeatItems = nestedCollection;
8753
+ }
8754
+ }
8755
+ if (repeatItems === null && Array.isArray(arrayResult)) {
8756
+ repeatItems = arrayResult;
8757
+ }
8758
+ if (!repeatItems || repeatItems.length === 0) {
8759
+ if (node?.dataBinding?.showNoResultsMessage === true) {
8760
+ return [
8742
8761
  renderNode(
8743
8762
  node,
8744
8763
  props,
@@ -8747,26 +8766,19 @@ var DivContainer = async (props) => {
8747
8766
  void 0,
8748
8767
  true
8749
8768
  )
8750
- ] : [];
8769
+ ];
8751
8770
  }
8752
- return arrayResult.map(
8753
- (item, itemIndex) => renderNode(
8754
- node,
8755
- props,
8756
- item,
8757
- `replicated-${childIndex}-${itemIndex}`,
8758
- item?.links?.view && !props.href ? item.links.view : void 0
8759
- )
8760
- );
8771
+ return [];
8761
8772
  }
8762
- return [
8763
- renderNode(
8773
+ return repeatItems.map(
8774
+ (item, itemIndex) => renderNode(
8764
8775
  node,
8765
8776
  props,
8766
- props.dataitem,
8767
- `static-${childIndex}`
8777
+ item,
8778
+ `replicated-${childIndex}-${itemIndex}`,
8779
+ item?.links?.view && !props.href ? item.links.view : void 0
8768
8780
  )
8769
- ];
8781
+ );
8770
8782
  });
8771
8783
  };
8772
8784
  {
package/dist/server.mjs CHANGED
@@ -2359,7 +2359,7 @@ var GoogleMapNode_default = GoogleMapNode;
2359
2359
 
2360
2360
  // src/components/pageRenderingEngine/nodes/DivContainer.tsx
2361
2361
  import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
2362
- var Pagination = dynamic12(() => import("./Pagination-LNJ27L7U.mjs"), { ssr: true });
2362
+ var Pagination = dynamic12(() => import("./Pagination-M3VZKKXY.mjs"), { ssr: true });
2363
2363
  var DataBindingControls = dynamic12(() => import("./DataBindingControls-WC3HBVVQ.mjs"), {
2364
2364
  ssr: true
2365
2365
  });
@@ -2551,6 +2551,7 @@ var DivContainer = async (props) => {
2551
2551
  const mobileStyles = props.node.mobileCssProperties;
2552
2552
  const tabletStyles = props.node.tabletCssProperties;
2553
2553
  const dataBindingProperties = props.node.dataBinding;
2554
+ const isRepeatForEachItem = props.node.repeatForEachItem === true || props.node.replicate === true;
2554
2555
  const updatedStyles = convertKeysToCamelCase(styles);
2555
2556
  let containerPaddingClass = "";
2556
2557
  if (props.node.containerPadding == "small") {
@@ -2623,9 +2624,9 @@ var DivContainer = async (props) => {
2623
2624
  dataBindingProperties.childCollectionName
2624
2625
  );
2625
2626
  }
2626
- const effectiveResult = dataBindingProperties.childCollectionName ? childCollectionData : result;
2627
+ const effectiveResult = childCollectionData ?? result;
2627
2628
  const hasNoData = effectiveResult === null || effectiveResult === void 0 || typeof effectiveResult === "string" && effectiveResult.trim() === "" || Array.isArray(effectiveResult) && effectiveResult.length === 0 || typeof effectiveResult === "object" && !Array.isArray(effectiveResult) && Object.keys(effectiveResult).length === 0;
2628
- if (hasNoData && dataBindingProperties.showNoResultsMessage !== true) {
2629
+ if (hasNoData && !isRepeatForEachItem && dataBindingProperties.showNoResultsMessage !== true) {
2629
2630
  return null;
2630
2631
  }
2631
2632
  }
@@ -2685,7 +2686,7 @@ var DivContainer = async (props) => {
2685
2686
  return dataItem[key] !== void 0 ? dataItem[key] : match;
2686
2687
  });
2687
2688
  }
2688
- const arrayResult = result && props.node.dataBinding?.responseType === "array" && Array.isArray(result) ? result : null;
2689
+ const arrayResult = Array.isArray(result) ? result : null;
2689
2690
  const hasReplicatedChildren = Boolean(
2690
2691
  props.node.children?.some(
2691
2692
  (node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
@@ -2731,9 +2732,27 @@ var DivContainer = async (props) => {
2731
2732
  );
2732
2733
  }
2733
2734
  return props.node.children.flatMap((node, childIndex) => {
2734
- if (node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)) {
2735
- if (!arrayResult || arrayResult.length === 0) {
2736
- return node?.dataBinding?.showNoResultsMessage ? [
2735
+ const isRepeated = node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true);
2736
+ if (!isRepeated) {
2737
+ return [renderNode(node, props, props.dataitem, `static-${childIndex}`)];
2738
+ }
2739
+ let repeatItems = null;
2740
+ const childCollectionName = node?.dataBinding?.childCollectionName;
2741
+ if (childCollectionName && props.dataitem) {
2742
+ const nestedCollection = getNestedValue6(
2743
+ props.dataitem,
2744
+ childCollectionName
2745
+ );
2746
+ if (Array.isArray(nestedCollection)) {
2747
+ repeatItems = nestedCollection;
2748
+ }
2749
+ }
2750
+ if (repeatItems === null && Array.isArray(arrayResult)) {
2751
+ repeatItems = arrayResult;
2752
+ }
2753
+ if (!repeatItems || repeatItems.length === 0) {
2754
+ if (node?.dataBinding?.showNoResultsMessage === true) {
2755
+ return [
2737
2756
  renderNode(
2738
2757
  node,
2739
2758
  props,
@@ -2742,26 +2761,19 @@ var DivContainer = async (props) => {
2742
2761
  void 0,
2743
2762
  true
2744
2763
  )
2745
- ] : [];
2764
+ ];
2746
2765
  }
2747
- return arrayResult.map(
2748
- (item, itemIndex) => renderNode(
2749
- node,
2750
- props,
2751
- item,
2752
- `replicated-${childIndex}-${itemIndex}`,
2753
- item?.links?.view && !props.href ? item.links.view : void 0
2754
- )
2755
- );
2766
+ return [];
2756
2767
  }
2757
- return [
2758
- renderNode(
2768
+ return repeatItems.map(
2769
+ (item, itemIndex) => renderNode(
2759
2770
  node,
2760
2771
  props,
2761
- props.dataitem,
2762
- `static-${childIndex}`
2772
+ item,
2773
+ `replicated-${childIndex}-${itemIndex}`,
2774
+ item?.links?.view && !props.href ? item.links.view : void 0
2763
2775
  )
2764
- ];
2776
+ );
2765
2777
  });
2766
2778
  };
2767
2779
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clyrex-digital/clyrex-controls-dev",
3
- "version": "0.8.1-dev.20260901061310",
3
+ "version": "0.8.1-dev.20260901095905",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",