@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260901065721 → 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 =
|
|
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 =
|
|
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
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
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,35 +8797,19 @@ var DivContainer = async (props) => {
|
|
|
8778
8797
|
void 0,
|
|
8779
8798
|
true
|
|
8780
8799
|
)
|
|
8781
|
-
] : [
|
|
8782
|
-
// Let the repeated child evaluate its own data source. It returns
|
|
8783
|
-
// null when the result is empty and the no-results message is off.
|
|
8784
|
-
renderNode(
|
|
8785
|
-
node,
|
|
8786
|
-
props,
|
|
8787
|
-
props.dataitem,
|
|
8788
|
-
`replicated-${childIndex}`
|
|
8789
|
-
)
|
|
8790
8800
|
];
|
|
8791
8801
|
}
|
|
8792
|
-
return
|
|
8793
|
-
(item, itemIndex) => renderNode(
|
|
8794
|
-
node,
|
|
8795
|
-
props,
|
|
8796
|
-
item,
|
|
8797
|
-
`replicated-${childIndex}-${itemIndex}`,
|
|
8798
|
-
item?.links?.view && !props.href ? item.links.view : void 0
|
|
8799
|
-
)
|
|
8800
|
-
);
|
|
8802
|
+
return [];
|
|
8801
8803
|
}
|
|
8802
|
-
return
|
|
8803
|
-
renderNode(
|
|
8804
|
+
return repeatItems.map(
|
|
8805
|
+
(item, itemIndex) => renderNode(
|
|
8804
8806
|
node,
|
|
8805
8807
|
props,
|
|
8806
|
-
|
|
8807
|
-
`
|
|
8808
|
+
item,
|
|
8809
|
+
`replicated-${childIndex}-${itemIndex}`,
|
|
8810
|
+
item?.links?.view && !props.href ? item.links.view : void 0
|
|
8808
8811
|
)
|
|
8809
|
-
|
|
8812
|
+
);
|
|
8810
8813
|
});
|
|
8811
8814
|
};
|
|
8812
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-
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
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,35 +2793,19 @@ var DivContainer = async (props) => {
|
|
|
2774
2793
|
void 0,
|
|
2775
2794
|
true
|
|
2776
2795
|
)
|
|
2777
|
-
] : [
|
|
2778
|
-
// Let the repeated child evaluate its own data source. It returns
|
|
2779
|
-
// null when the result is empty and the no-results message is off.
|
|
2780
|
-
renderNode(
|
|
2781
|
-
node,
|
|
2782
|
-
props,
|
|
2783
|
-
props.dataitem,
|
|
2784
|
-
`replicated-${childIndex}`
|
|
2785
|
-
)
|
|
2786
2796
|
];
|
|
2787
2797
|
}
|
|
2788
|
-
return
|
|
2789
|
-
(item, itemIndex) => renderNode(
|
|
2790
|
-
node,
|
|
2791
|
-
props,
|
|
2792
|
-
item,
|
|
2793
|
-
`replicated-${childIndex}-${itemIndex}`,
|
|
2794
|
-
item?.links?.view && !props.href ? item.links.view : void 0
|
|
2795
|
-
)
|
|
2796
|
-
);
|
|
2798
|
+
return [];
|
|
2797
2799
|
}
|
|
2798
|
-
return
|
|
2799
|
-
renderNode(
|
|
2800
|
+
return repeatItems.map(
|
|
2801
|
+
(item, itemIndex) => renderNode(
|
|
2800
2802
|
node,
|
|
2801
2803
|
props,
|
|
2802
|
-
|
|
2803
|
-
`
|
|
2804
|
+
item,
|
|
2805
|
+
`replicated-${childIndex}-${itemIndex}`,
|
|
2806
|
+
item?.links?.view && !props.href ? item.links.view : void 0
|
|
2804
2807
|
)
|
|
2805
|
-
|
|
2808
|
+
);
|
|
2806
2809
|
});
|
|
2807
2810
|
};
|
|
2808
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 =
|
|
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 =
|
|
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
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
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,35 +8766,19 @@ var DivContainer = async (props) => {
|
|
|
8747
8766
|
void 0,
|
|
8748
8767
|
true
|
|
8749
8768
|
)
|
|
8750
|
-
] : [
|
|
8751
|
-
// Let the repeated child evaluate its own data source. It returns
|
|
8752
|
-
// null when the result is empty and the no-results message is off.
|
|
8753
|
-
renderNode(
|
|
8754
|
-
node,
|
|
8755
|
-
props,
|
|
8756
|
-
props.dataitem,
|
|
8757
|
-
`replicated-${childIndex}`
|
|
8758
|
-
)
|
|
8759
8769
|
];
|
|
8760
8770
|
}
|
|
8761
|
-
return
|
|
8762
|
-
(item, itemIndex) => renderNode(
|
|
8763
|
-
node,
|
|
8764
|
-
props,
|
|
8765
|
-
item,
|
|
8766
|
-
`replicated-${childIndex}-${itemIndex}`,
|
|
8767
|
-
item?.links?.view && !props.href ? item.links.view : void 0
|
|
8768
|
-
)
|
|
8769
|
-
);
|
|
8771
|
+
return [];
|
|
8770
8772
|
}
|
|
8771
|
-
return
|
|
8772
|
-
renderNode(
|
|
8773
|
+
return repeatItems.map(
|
|
8774
|
+
(item, itemIndex) => renderNode(
|
|
8773
8775
|
node,
|
|
8774
8776
|
props,
|
|
8775
|
-
|
|
8776
|
-
`
|
|
8777
|
+
item,
|
|
8778
|
+
`replicated-${childIndex}-${itemIndex}`,
|
|
8779
|
+
item?.links?.view && !props.href ? item.links.view : void 0
|
|
8777
8780
|
)
|
|
8778
|
-
|
|
8781
|
+
);
|
|
8779
8782
|
});
|
|
8780
8783
|
};
|
|
8781
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-
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
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,35 +2761,19 @@ var DivContainer = async (props) => {
|
|
|
2742
2761
|
void 0,
|
|
2743
2762
|
true
|
|
2744
2763
|
)
|
|
2745
|
-
] : [
|
|
2746
|
-
// Let the repeated child evaluate its own data source. It returns
|
|
2747
|
-
// null when the result is empty and the no-results message is off.
|
|
2748
|
-
renderNode(
|
|
2749
|
-
node,
|
|
2750
|
-
props,
|
|
2751
|
-
props.dataitem,
|
|
2752
|
-
`replicated-${childIndex}`
|
|
2753
|
-
)
|
|
2754
2764
|
];
|
|
2755
2765
|
}
|
|
2756
|
-
return
|
|
2757
|
-
(item, itemIndex) => renderNode(
|
|
2758
|
-
node,
|
|
2759
|
-
props,
|
|
2760
|
-
item,
|
|
2761
|
-
`replicated-${childIndex}-${itemIndex}`,
|
|
2762
|
-
item?.links?.view && !props.href ? item.links.view : void 0
|
|
2763
|
-
)
|
|
2764
|
-
);
|
|
2766
|
+
return [];
|
|
2765
2767
|
}
|
|
2766
|
-
return
|
|
2767
|
-
renderNode(
|
|
2768
|
+
return repeatItems.map(
|
|
2769
|
+
(item, itemIndex) => renderNode(
|
|
2768
2770
|
node,
|
|
2769
2771
|
props,
|
|
2770
|
-
|
|
2771
|
-
`
|
|
2772
|
+
item,
|
|
2773
|
+
`replicated-${childIndex}-${itemIndex}`,
|
|
2774
|
+
item?.links?.view && !props.href ? item.links.view : void 0
|
|
2772
2775
|
)
|
|
2773
|
-
|
|
2776
|
+
);
|
|
2774
2777
|
});
|
|
2775
2778
|
};
|
|
2776
2779
|
{
|