@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260831113446 → 0.8.1-dev.20260901054125
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/{CommentRendererClient-JYDYPHSQ.mjs → CommentRendererClient-FU5ZMGBV.mjs} +46 -2
- package/dist/{CommentRendererClient-5OIJYJ5Z.mjs → CommentRendererClient-L6GILW7U.mjs} +46 -2
- package/dist/{DataBindingControls-JLAO3NJL.mjs → DataBindingControls-GWNAJ7PR.mjs} +2 -2
- package/dist/{DataBindingControls-Y4JXUDZV.mjs → DataBindingControls-WC3HBVVQ.mjs} +2 -2
- package/dist/{InputControlClient-POQDFVL3.mjs → InputControlClient-GRH7VSJR.mjs} +2 -7
- package/dist/{InputControlClient-XC24HYZX.mjs → InputControlClient-NHZU2L64.mjs} +81 -262
- package/dist/{Pagination-T7Z2NXKO.mjs → Pagination-JGUQJ2DH.mjs} +2 -2
- package/dist/{Pagination-QBPYDD66.mjs → Pagination-LNJ27L7U.mjs} +2 -2
- package/dist/{chunk-5TQWVOWH.mjs → chunk-2VS554XP.mjs} +1 -1
- package/dist/{chunk-XTG4JW2O.mjs → chunk-5VGTT4A5.mjs} +35 -215
- package/dist/{chunk-E4VOFO5Q.mjs → chunk-DTWPZPSX.mjs} +0 -3
- package/dist/{chunk-4R7F7LBL.mjs → chunk-IEY342PD.mjs} +0 -3
- package/dist/{chunk-GGG5MJLN.mjs → chunk-Q3LFGHLM.mjs} +1 -1
- package/dist/{chunk-X5ERUUQV.mjs → chunk-RG3CISAA.mjs} +1 -1
- package/dist/index.d.mts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +749 -856
- package/dist/index.mjs +75 -29
- package/dist/server.js +275 -378
- package/dist/server.mjs +71 -23
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
OdataBuilder
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RG3CISAA.mjs";
|
|
6
6
|
import {
|
|
7
7
|
InputControl_default
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Q3LFGHLM.mjs";
|
|
9
9
|
import "./chunk-JDX47MFV.mjs";
|
|
10
10
|
import {
|
|
11
|
-
BooleanSelect_default,
|
|
12
11
|
CheckboxInput_default,
|
|
13
12
|
ColorInput_default,
|
|
14
13
|
DateInput_default,
|
|
@@ -24,9 +23,8 @@ import {
|
|
|
24
23
|
RadioInput_default,
|
|
25
24
|
SelectWithSearchInput_default,
|
|
26
25
|
Select_default,
|
|
27
|
-
Switcher_default,
|
|
28
26
|
TimeInput_default
|
|
29
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5VGTT4A5.mjs";
|
|
30
28
|
import {
|
|
31
29
|
Hyperlink,
|
|
32
30
|
Icon_default
|
|
@@ -34,7 +32,7 @@ import {
|
|
|
34
32
|
import {
|
|
35
33
|
Constants,
|
|
36
34
|
InputControlType_default
|
|
37
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-DTWPZPSX.mjs";
|
|
38
36
|
import {
|
|
39
37
|
AssetUtility_default
|
|
40
38
|
} from "./chunk-UPCAOGEY.mjs";
|
|
@@ -412,7 +410,7 @@ var TimeUntilStarts_default = TimeUntilStarts;
|
|
|
412
410
|
|
|
413
411
|
// src/components/controls/view/Commentrenderer.tsx
|
|
414
412
|
import dynamic5 from "next/dynamic";
|
|
415
|
-
var CommentRenderer = dynamic5(() => import("./CommentRendererClient-
|
|
413
|
+
var CommentRenderer = dynamic5(() => import("./CommentRendererClient-L6GILW7U.mjs"), {
|
|
416
414
|
ssr: false
|
|
417
415
|
});
|
|
418
416
|
var Commentrenderer_default = CommentRenderer;
|
|
@@ -2393,8 +2391,8 @@ var GoogleMapNode_default = GoogleMapNode;
|
|
|
2393
2391
|
|
|
2394
2392
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2395
2393
|
import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2396
|
-
var Pagination = dynamic12(() => import("./Pagination-
|
|
2397
|
-
var DataBindingControls = dynamic12(() => import("./DataBindingControls-
|
|
2394
|
+
var Pagination = dynamic12(() => import("./Pagination-JGUQJ2DH.mjs"), { ssr: true });
|
|
2395
|
+
var DataBindingControls = dynamic12(() => import("./DataBindingControls-GWNAJ7PR.mjs"), {
|
|
2398
2396
|
ssr: true
|
|
2399
2397
|
});
|
|
2400
2398
|
var Slider = dynamic12(() => import("./Slider-554BKC7N.mjs"), {
|
|
@@ -2633,7 +2631,8 @@ var DivContainer = async (props) => {
|
|
|
2633
2631
|
let result = null;
|
|
2634
2632
|
let response = null;
|
|
2635
2633
|
let childCollectionData = null;
|
|
2636
|
-
|
|
2634
|
+
let shouldShowNoDataMessage = props.forceNoDataMessage === true;
|
|
2635
|
+
if (dataBindingProperties && !shouldShowNoDataMessage) {
|
|
2637
2636
|
const serviceClient = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
2638
2637
|
endpoint = dataBindingProperties.dataSource;
|
|
2639
2638
|
{
|
|
@@ -2650,15 +2649,17 @@ var DivContainer = async (props) => {
|
|
|
2650
2649
|
}
|
|
2651
2650
|
response = await serviceClient.get(endpoint);
|
|
2652
2651
|
result = response?.result;
|
|
2653
|
-
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
2654
|
-
return /* @__PURE__ */ jsx37(NoDataFound_default, {});
|
|
2655
|
-
}
|
|
2656
2652
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
2657
2653
|
childCollectionData = getNestedValue6(
|
|
2658
2654
|
props.dataitem,
|
|
2659
2655
|
dataBindingProperties.childCollectionName
|
|
2660
2656
|
);
|
|
2661
2657
|
}
|
|
2658
|
+
const effectiveResult = dataBindingProperties.childCollectionName ? childCollectionData : result;
|
|
2659
|
+
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 && (props.node.repeatForEachItem === true || props.node.replicate === true)) {
|
|
2661
|
+
shouldShowNoDataMessage = dataBindingProperties.showNoResultsMessage;
|
|
2662
|
+
}
|
|
2662
2663
|
}
|
|
2663
2664
|
const cssResult = generateCssString(
|
|
2664
2665
|
guid,
|
|
@@ -2666,7 +2667,7 @@ var DivContainer = async (props) => {
|
|
|
2666
2667
|
tabletStyles,
|
|
2667
2668
|
mobileStyles
|
|
2668
2669
|
);
|
|
2669
|
-
function renderNode(node, props2, dataitem, key, href) {
|
|
2670
|
+
function renderNode(node, props2, dataitem, key, href, forceNoDataMessage = false) {
|
|
2670
2671
|
{
|
|
2671
2672
|
}
|
|
2672
2673
|
const SelectedNode = NodeTypes2[node.type];
|
|
@@ -2687,7 +2688,8 @@ var DivContainer = async (props) => {
|
|
|
2687
2688
|
href,
|
|
2688
2689
|
assetBaseUrl: props2.assetBaseUrl,
|
|
2689
2690
|
device: props2.device,
|
|
2690
|
-
widgetRenderer: props2.widgetRenderer
|
|
2691
|
+
widgetRenderer: props2.widgetRenderer,
|
|
2692
|
+
forceNoDataMessage
|
|
2691
2693
|
}
|
|
2692
2694
|
) }, key);
|
|
2693
2695
|
}
|
|
@@ -2715,19 +2717,25 @@ var DivContainer = async (props) => {
|
|
|
2715
2717
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
2716
2718
|
});
|
|
2717
2719
|
}
|
|
2720
|
+
const arrayResult = result && props.node.dataBinding?.responseType === "array" && Array.isArray(result) ? result : null;
|
|
2721
|
+
const hasReplicatedChildren = Boolean(
|
|
2722
|
+
props.node.children?.some(
|
|
2723
|
+
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
2724
|
+
)
|
|
2725
|
+
);
|
|
2718
2726
|
const dataToRender = (() => {
|
|
2719
2727
|
if (childCollectionData && Array.isArray(childCollectionData)) {
|
|
2720
2728
|
return childCollectionData;
|
|
2721
2729
|
}
|
|
2722
|
-
if (
|
|
2723
|
-
return
|
|
2730
|
+
if (arrayResult && !hasReplicatedChildren) {
|
|
2731
|
+
return arrayResult;
|
|
2724
2732
|
}
|
|
2725
2733
|
if (result && props.node.dataBinding?.responseType === "object") {
|
|
2726
2734
|
return [result];
|
|
2727
2735
|
}
|
|
2728
2736
|
return [props.dataitem];
|
|
2729
2737
|
})();
|
|
2730
|
-
const backgroundDataItem = dataToRender.length > 0 ? dataToRender[0] : props.dataitem;
|
|
2738
|
+
const backgroundDataItem = hasReplicatedChildren && arrayResult && arrayResult.length > 0 ? arrayResult[0] : dataToRender.length > 0 ? dataToRender[0] : props.dataitem;
|
|
2731
2739
|
const background = generateCompleteBackgroundString(
|
|
2732
2740
|
props.node.backgroundLayers,
|
|
2733
2741
|
props.assetBaseUrl,
|
|
@@ -2742,6 +2750,52 @@ var DivContainer = async (props) => {
|
|
|
2742
2750
|
combinedStyles.backgroundClip = "text";
|
|
2743
2751
|
}
|
|
2744
2752
|
const renderLink = result && props.node.dataBinding?.responseType === "array" ? true : false;
|
|
2753
|
+
const renderContainerChildren = () => {
|
|
2754
|
+
if (!hasReplicatedChildren) {
|
|
2755
|
+
return dataToRender.map(
|
|
2756
|
+
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|
|
2757
|
+
props.node.children,
|
|
2758
|
+
props,
|
|
2759
|
+
item,
|
|
2760
|
+
idx,
|
|
2761
|
+
props.href ? void 0 : item?.links?.view
|
|
2762
|
+
)?.map((child, i) => /* @__PURE__ */ jsx37(React23.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
2763
|
+
);
|
|
2764
|
+
}
|
|
2765
|
+
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 ? [
|
|
2769
|
+
renderNode(
|
|
2770
|
+
node,
|
|
2771
|
+
props,
|
|
2772
|
+
props.dataitem,
|
|
2773
|
+
`no-results-${childIndex}`,
|
|
2774
|
+
void 0,
|
|
2775
|
+
true
|
|
2776
|
+
)
|
|
2777
|
+
] : [];
|
|
2778
|
+
}
|
|
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
|
+
);
|
|
2788
|
+
}
|
|
2789
|
+
return [
|
|
2790
|
+
renderNode(
|
|
2791
|
+
node,
|
|
2792
|
+
props,
|
|
2793
|
+
props.dataitem,
|
|
2794
|
+
`static-${childIndex}`
|
|
2795
|
+
)
|
|
2796
|
+
];
|
|
2797
|
+
});
|
|
2798
|
+
};
|
|
2745
2799
|
{
|
|
2746
2800
|
}
|
|
2747
2801
|
let Wrapper;
|
|
@@ -2815,15 +2869,7 @@ var DivContainer = async (props) => {
|
|
|
2815
2869
|
style: combinedStyles,
|
|
2816
2870
|
className: classNames || void 0,
|
|
2817
2871
|
...wrapperProps,
|
|
2818
|
-
children:
|
|
2819
|
-
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|
|
2820
|
-
props.node.children,
|
|
2821
|
-
props,
|
|
2822
|
-
item,
|
|
2823
|
-
idx,
|
|
2824
|
-
props.href ? void 0 : item?.links?.view
|
|
2825
|
-
)?.map((child, i) => /* @__PURE__ */ jsx37(React23.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
2826
|
-
)
|
|
2872
|
+
children: shouldShowNoDataMessage ? /* @__PURE__ */ jsx37(NoDataFound_default, {}) : renderContainerChildren()
|
|
2827
2873
|
}
|
|
2828
2874
|
);
|
|
2829
2875
|
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ jsx37(
|
|
@@ -3515,6 +3561,7 @@ var DataList = (props) => {
|
|
|
3515
3561
|
value: searchTerm,
|
|
3516
3562
|
callback: (e) => setSearchTerm(e.value),
|
|
3517
3563
|
attributes: {
|
|
3564
|
+
autoFocus: true,
|
|
3518
3565
|
placeholder: `Search by ${props.columns.filter((col) => col.isSearchable).map((col) => col.label).join(", ")}`
|
|
3519
3566
|
}
|
|
3520
3567
|
}
|
|
@@ -3712,6 +3759,7 @@ var DataList = (props) => {
|
|
|
3712
3759
|
value: searchTerm,
|
|
3713
3760
|
callback: (e) => setSearchTerm(e.value),
|
|
3714
3761
|
attributes: {
|
|
3762
|
+
autoFocus: true,
|
|
3715
3763
|
placeholder: `Search by ${props.columns.filter((col) => col.isSearchable).map((col) => col.label).join(", ")}`
|
|
3716
3764
|
}
|
|
3717
3765
|
}
|
|
@@ -4499,7 +4547,6 @@ var DataFormRenderer = ({
|
|
|
4499
4547
|
};
|
|
4500
4548
|
var DataFormRenderer_default = DataFormRenderer;
|
|
4501
4549
|
export {
|
|
4502
|
-
BooleanSelect_default as BooleanSelect,
|
|
4503
4550
|
Button_default as Button,
|
|
4504
4551
|
CheckboxInput_default as CheckboxInput,
|
|
4505
4552
|
ColorInput_default as ColorInput,
|
|
@@ -4523,7 +4570,6 @@ export {
|
|
|
4523
4570
|
PhoneInput_default as PhoneInput,
|
|
4524
4571
|
RadioInput_default as RadioInput,
|
|
4525
4572
|
Select_default as Select,
|
|
4526
|
-
Switcher_default as Switcher,
|
|
4527
4573
|
TimeInput_default as TimeInput,
|
|
4528
4574
|
Toast_default as Toast,
|
|
4529
4575
|
ToastService_default as ToastService,
|