@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20261003121654 → 0.8.1-dev.20261006100546
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 +25 -4
- package/dist/index.mjs +25 -4
- package/dist/server.js +25 -4
- package/dist/server.mjs +25 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9868,6 +9868,14 @@ var Slider2 = (0, import_dynamic15.default)(() => Promise.resolve().then(() => (
|
|
|
9868
9868
|
function toCamelCase(str) {
|
|
9869
9869
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
9870
9870
|
}
|
|
9871
|
+
function hasRepeatedContainer(node) {
|
|
9872
|
+
if (!node || typeof node !== "object") return false;
|
|
9873
|
+
const container = node;
|
|
9874
|
+
if (container.type === "div-container" && (container.repeatForEachItem === true || container.replicate === true)) {
|
|
9875
|
+
return true;
|
|
9876
|
+
}
|
|
9877
|
+
return Array.isArray(container.children) && container.children.some(hasRepeatedContainer);
|
|
9878
|
+
}
|
|
9871
9879
|
function convertKeysToCamelCase(obj) {
|
|
9872
9880
|
if (!obj || typeof obj !== "object") return obj;
|
|
9873
9881
|
if (Array.isArray(obj)) return obj.map(convertKeysToCamelCase);
|
|
@@ -10188,7 +10196,7 @@ var DivContainer = async (props) => {
|
|
|
10188
10196
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
10189
10197
|
});
|
|
10190
10198
|
}
|
|
10191
|
-
const arrayResult = Array.isArray(result) ? result : null;
|
|
10199
|
+
const arrayResult = Array.isArray(result) ? result : !dataSource && Array.isArray(props.dataitem) ? props.dataitem : null;
|
|
10192
10200
|
const hasReplicatedChildren = Boolean(
|
|
10193
10201
|
props.node.children?.some(
|
|
10194
10202
|
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
@@ -10224,9 +10232,22 @@ var DivContainer = async (props) => {
|
|
|
10224
10232
|
const renderContainerChildren = () => {
|
|
10225
10233
|
if (!hasReplicatedChildren) {
|
|
10226
10234
|
if (Array.isArray(arrayResult)) {
|
|
10227
|
-
return props.node.children.flatMap(
|
|
10228
|
-
(node
|
|
10229
|
-
|
|
10235
|
+
return props.node.children.flatMap((node, childIndex) => {
|
|
10236
|
+
if (node.type !== "div-container") {
|
|
10237
|
+
return [
|
|
10238
|
+
renderNode(node, props, props.dataitem, `static-${childIndex}`)
|
|
10239
|
+
];
|
|
10240
|
+
}
|
|
10241
|
+
const containsRepeater = node.children.some(hasRepeatedContainer);
|
|
10242
|
+
return [
|
|
10243
|
+
renderNode(
|
|
10244
|
+
node,
|
|
10245
|
+
props,
|
|
10246
|
+
containsRepeater ? arrayResult : props.dataitem,
|
|
10247
|
+
`${containsRepeater ? "nested-repeater" : "static"}-${childIndex}`
|
|
10248
|
+
)
|
|
10249
|
+
];
|
|
10250
|
+
});
|
|
10230
10251
|
}
|
|
10231
10252
|
return dataToRender.map(
|
|
10232
10253
|
(item, idx) => item?.links?.view && renderLink ? renderChildren2(
|
package/dist/index.mjs
CHANGED
|
@@ -2455,6 +2455,14 @@ var Slider = dynamic15(() => import("./Slider-42T6THEQ.mjs"), {
|
|
|
2455
2455
|
function toCamelCase(str) {
|
|
2456
2456
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
2457
2457
|
}
|
|
2458
|
+
function hasRepeatedContainer(node) {
|
|
2459
|
+
if (!node || typeof node !== "object") return false;
|
|
2460
|
+
const container = node;
|
|
2461
|
+
if (container.type === "div-container" && (container.repeatForEachItem === true || container.replicate === true)) {
|
|
2462
|
+
return true;
|
|
2463
|
+
}
|
|
2464
|
+
return Array.isArray(container.children) && container.children.some(hasRepeatedContainer);
|
|
2465
|
+
}
|
|
2458
2466
|
function convertKeysToCamelCase(obj) {
|
|
2459
2467
|
if (!obj || typeof obj !== "object") return obj;
|
|
2460
2468
|
if (Array.isArray(obj)) return obj.map(convertKeysToCamelCase);
|
|
@@ -2775,7 +2783,7 @@ var DivContainer = async (props) => {
|
|
|
2775
2783
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
2776
2784
|
});
|
|
2777
2785
|
}
|
|
2778
|
-
const arrayResult = Array.isArray(result) ? result : null;
|
|
2786
|
+
const arrayResult = Array.isArray(result) ? result : !dataSource && Array.isArray(props.dataitem) ? props.dataitem : null;
|
|
2779
2787
|
const hasReplicatedChildren = Boolean(
|
|
2780
2788
|
props.node.children?.some(
|
|
2781
2789
|
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
@@ -2811,9 +2819,22 @@ var DivContainer = async (props) => {
|
|
|
2811
2819
|
const renderContainerChildren = () => {
|
|
2812
2820
|
if (!hasReplicatedChildren) {
|
|
2813
2821
|
if (Array.isArray(arrayResult)) {
|
|
2814
|
-
return props.node.children.flatMap(
|
|
2815
|
-
(node
|
|
2816
|
-
|
|
2822
|
+
return props.node.children.flatMap((node, childIndex) => {
|
|
2823
|
+
if (node.type !== "div-container") {
|
|
2824
|
+
return [
|
|
2825
|
+
renderNode(node, props, props.dataitem, `static-${childIndex}`)
|
|
2826
|
+
];
|
|
2827
|
+
}
|
|
2828
|
+
const containsRepeater = node.children.some(hasRepeatedContainer);
|
|
2829
|
+
return [
|
|
2830
|
+
renderNode(
|
|
2831
|
+
node,
|
|
2832
|
+
props,
|
|
2833
|
+
containsRepeater ? arrayResult : props.dataitem,
|
|
2834
|
+
`${containsRepeater ? "nested-repeater" : "static"}-${childIndex}`
|
|
2835
|
+
)
|
|
2836
|
+
];
|
|
2837
|
+
});
|
|
2817
2838
|
}
|
|
2818
2839
|
return dataToRender.map(
|
|
2819
2840
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|
package/dist/server.js
CHANGED
|
@@ -7461,6 +7461,14 @@ var Slider2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (
|
|
|
7461
7461
|
function toCamelCase(str) {
|
|
7462
7462
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
7463
7463
|
}
|
|
7464
|
+
function hasRepeatedContainer(node) {
|
|
7465
|
+
if (!node || typeof node !== "object") return false;
|
|
7466
|
+
const container = node;
|
|
7467
|
+
if (container.type === "div-container" && (container.repeatForEachItem === true || container.replicate === true)) {
|
|
7468
|
+
return true;
|
|
7469
|
+
}
|
|
7470
|
+
return Array.isArray(container.children) && container.children.some(hasRepeatedContainer);
|
|
7471
|
+
}
|
|
7464
7472
|
function convertKeysToCamelCase(obj) {
|
|
7465
7473
|
if (!obj || typeof obj !== "object") return obj;
|
|
7466
7474
|
if (Array.isArray(obj)) return obj.map(convertKeysToCamelCase);
|
|
@@ -7781,7 +7789,7 @@ var DivContainer = async (props) => {
|
|
|
7781
7789
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
7782
7790
|
});
|
|
7783
7791
|
}
|
|
7784
|
-
const arrayResult = Array.isArray(result) ? result : null;
|
|
7792
|
+
const arrayResult = Array.isArray(result) ? result : !dataSource && Array.isArray(props.dataitem) ? props.dataitem : null;
|
|
7785
7793
|
const hasReplicatedChildren = Boolean(
|
|
7786
7794
|
props.node.children?.some(
|
|
7787
7795
|
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
@@ -7817,9 +7825,22 @@ var DivContainer = async (props) => {
|
|
|
7817
7825
|
const renderContainerChildren = () => {
|
|
7818
7826
|
if (!hasReplicatedChildren) {
|
|
7819
7827
|
if (Array.isArray(arrayResult)) {
|
|
7820
|
-
return props.node.children.flatMap(
|
|
7821
|
-
(node
|
|
7822
|
-
|
|
7828
|
+
return props.node.children.flatMap((node, childIndex) => {
|
|
7829
|
+
if (node.type !== "div-container") {
|
|
7830
|
+
return [
|
|
7831
|
+
renderNode(node, props, props.dataitem, `static-${childIndex}`)
|
|
7832
|
+
];
|
|
7833
|
+
}
|
|
7834
|
+
const containsRepeater = node.children.some(hasRepeatedContainer);
|
|
7835
|
+
return [
|
|
7836
|
+
renderNode(
|
|
7837
|
+
node,
|
|
7838
|
+
props,
|
|
7839
|
+
containsRepeater ? arrayResult : props.dataitem,
|
|
7840
|
+
`${containsRepeater ? "nested-repeater" : "static"}-${childIndex}`
|
|
7841
|
+
)
|
|
7842
|
+
];
|
|
7843
|
+
});
|
|
7823
7844
|
}
|
|
7824
7845
|
return dataToRender.map(
|
|
7825
7846
|
(item, idx) => item?.links?.view && renderLink ? renderChildren2(
|
package/dist/server.mjs
CHANGED
|
@@ -2411,6 +2411,14 @@ var Slider = dynamic14(() => import("./Slider-UNNVADVP.mjs"), {
|
|
|
2411
2411
|
function toCamelCase(str) {
|
|
2412
2412
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
2413
2413
|
}
|
|
2414
|
+
function hasRepeatedContainer(node) {
|
|
2415
|
+
if (!node || typeof node !== "object") return false;
|
|
2416
|
+
const container = node;
|
|
2417
|
+
if (container.type === "div-container" && (container.repeatForEachItem === true || container.replicate === true)) {
|
|
2418
|
+
return true;
|
|
2419
|
+
}
|
|
2420
|
+
return Array.isArray(container.children) && container.children.some(hasRepeatedContainer);
|
|
2421
|
+
}
|
|
2414
2422
|
function convertKeysToCamelCase(obj) {
|
|
2415
2423
|
if (!obj || typeof obj !== "object") return obj;
|
|
2416
2424
|
if (Array.isArray(obj)) return obj.map(convertKeysToCamelCase);
|
|
@@ -2731,7 +2739,7 @@ var DivContainer = async (props) => {
|
|
|
2731
2739
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
2732
2740
|
});
|
|
2733
2741
|
}
|
|
2734
|
-
const arrayResult = Array.isArray(result) ? result : null;
|
|
2742
|
+
const arrayResult = Array.isArray(result) ? result : !dataSource && Array.isArray(props.dataitem) ? props.dataitem : null;
|
|
2735
2743
|
const hasReplicatedChildren = Boolean(
|
|
2736
2744
|
props.node.children?.some(
|
|
2737
2745
|
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
@@ -2767,9 +2775,22 @@ var DivContainer = async (props) => {
|
|
|
2767
2775
|
const renderContainerChildren = () => {
|
|
2768
2776
|
if (!hasReplicatedChildren) {
|
|
2769
2777
|
if (Array.isArray(arrayResult)) {
|
|
2770
|
-
return props.node.children.flatMap(
|
|
2771
|
-
(node
|
|
2772
|
-
|
|
2778
|
+
return props.node.children.flatMap((node, childIndex) => {
|
|
2779
|
+
if (node.type !== "div-container") {
|
|
2780
|
+
return [
|
|
2781
|
+
renderNode(node, props, props.dataitem, `static-${childIndex}`)
|
|
2782
|
+
];
|
|
2783
|
+
}
|
|
2784
|
+
const containsRepeater = node.children.some(hasRepeatedContainer);
|
|
2785
|
+
return [
|
|
2786
|
+
renderNode(
|
|
2787
|
+
node,
|
|
2788
|
+
props,
|
|
2789
|
+
containsRepeater ? arrayResult : props.dataitem,
|
|
2790
|
+
`${containsRepeater ? "nested-repeater" : "static"}-${childIndex}`
|
|
2791
|
+
)
|
|
2792
|
+
];
|
|
2793
|
+
});
|
|
2773
2794
|
}
|
|
2774
2795
|
return dataToRender.map(
|
|
2775
2796
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|