@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260808091030 → 0.8.1-dev.20260808143630
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/{IframeClient-E6VGPN6S.mjs → IframeClient-WF2KLXZB.mjs} +4 -1
- package/dist/{IframeClient-J64QAFNK.mjs → IframeClient-XEWQLGUQ.mjs} +4 -1
- package/dist/index.js +243 -219
- package/dist/index.mjs +169 -148
- package/dist/server.js +98 -74
- package/dist/server.mjs +38 -17
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1196,13 +1196,13 @@ var WidgetNode = (props) => {
|
|
|
1196
1196
|
var WidgetNode_default = WidgetNode;
|
|
1197
1197
|
|
|
1198
1198
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
1199
|
-
import
|
|
1199
|
+
import dynamic12 from "next/dynamic";
|
|
1200
1200
|
import React22 from "react";
|
|
1201
1201
|
|
|
1202
1202
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
1203
1203
|
import dynamic9 from "next/dynamic";
|
|
1204
1204
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1205
|
-
var IframeClient = dynamic9(() => import("./IframeClient-
|
|
1205
|
+
var IframeClient = dynamic9(() => import("./IframeClient-WF2KLXZB.mjs"), {
|
|
1206
1206
|
ssr: false
|
|
1207
1207
|
});
|
|
1208
1208
|
var EmbedNode = (props) => {
|
|
@@ -2284,10 +2284,29 @@ var DocumentNode = (props) => {
|
|
|
2284
2284
|
};
|
|
2285
2285
|
var DocumentNode_default = DocumentNode;
|
|
2286
2286
|
|
|
2287
|
+
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
2288
|
+
import dynamic11 from "next/dynamic";
|
|
2289
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2290
|
+
var IframeClient2 = dynamic11(() => import("./IframeClient-WF2KLXZB.mjs"), {
|
|
2291
|
+
ssr: false
|
|
2292
|
+
});
|
|
2293
|
+
var GoogleMapNode = (props) => {
|
|
2294
|
+
let src = props.node.embedUrl;
|
|
2295
|
+
return /* @__PURE__ */ jsx34("div", { className: "google-map-container", children: src && /* @__PURE__ */ jsx34(
|
|
2296
|
+
IframeClient2,
|
|
2297
|
+
{
|
|
2298
|
+
src,
|
|
2299
|
+
width: props.node.width,
|
|
2300
|
+
height: props.node.height
|
|
2301
|
+
}
|
|
2302
|
+
) });
|
|
2303
|
+
};
|
|
2304
|
+
var GoogleMapNode_default = GoogleMapNode;
|
|
2305
|
+
|
|
2287
2306
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2288
|
-
import { jsx as
|
|
2289
|
-
var Pagination =
|
|
2290
|
-
var Slider =
|
|
2307
|
+
import { jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2308
|
+
var Pagination = dynamic12(() => import("./Pagination-YKNCYVXV.mjs"), { ssr: true });
|
|
2309
|
+
var Slider = dynamic12(() => import("./Slider-554BKC7N.mjs"), {
|
|
2291
2310
|
ssr: false
|
|
2292
2311
|
});
|
|
2293
2312
|
function toCamelCase(str) {
|
|
@@ -2468,7 +2487,8 @@ var DivContainer = async (props) => {
|
|
|
2468
2487
|
text: TextNode_default,
|
|
2469
2488
|
datafield: DatafieldNode_default,
|
|
2470
2489
|
"svg-icon": SVGIconNode_default,
|
|
2471
|
-
document: DocumentNode_default
|
|
2490
|
+
document: DocumentNode_default,
|
|
2491
|
+
"google-map": GoogleMapNode_default
|
|
2472
2492
|
};
|
|
2473
2493
|
const styles = props.node.cssProperties;
|
|
2474
2494
|
const mobileStyles = props.node.mobileCssProperties;
|
|
@@ -2540,7 +2560,7 @@ var DivContainer = async (props) => {
|
|
|
2540
2560
|
response = await serviceClient.get(endpoint);
|
|
2541
2561
|
result = response?.result;
|
|
2542
2562
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
2543
|
-
return /* @__PURE__ */
|
|
2563
|
+
return /* @__PURE__ */ jsx35(NoDataFound_default, {});
|
|
2544
2564
|
}
|
|
2545
2565
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
2546
2566
|
childCollectionData = getNestedValue6(
|
|
@@ -2560,7 +2580,7 @@ var DivContainer = async (props) => {
|
|
|
2560
2580
|
}
|
|
2561
2581
|
const SelectedNode = NodeTypes2[node.type];
|
|
2562
2582
|
if (!SelectedNode) return null;
|
|
2563
|
-
return /* @__PURE__ */
|
|
2583
|
+
return /* @__PURE__ */ jsx35(React22.Fragment, { children: /* @__PURE__ */ jsx35(
|
|
2564
2584
|
SelectedNode,
|
|
2565
2585
|
{
|
|
2566
2586
|
node,
|
|
@@ -2694,13 +2714,13 @@ var DivContainer = async (props) => {
|
|
|
2694
2714
|
!!props.node.enterAnimation && "enter-animation"
|
|
2695
2715
|
].filter(Boolean).join(" ");
|
|
2696
2716
|
return /* @__PURE__ */ jsxs13(React22.Fragment, { children: [
|
|
2697
|
-
/* @__PURE__ */
|
|
2717
|
+
/* @__PURE__ */ jsx35(
|
|
2698
2718
|
"style",
|
|
2699
2719
|
{
|
|
2700
2720
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
2701
2721
|
}
|
|
2702
2722
|
),
|
|
2703
|
-
/* @__PURE__ */
|
|
2723
|
+
/* @__PURE__ */ jsx35(
|
|
2704
2724
|
Wrapper,
|
|
2705
2725
|
{
|
|
2706
2726
|
id: guid,
|
|
@@ -2714,11 +2734,11 @@ var DivContainer = async (props) => {
|
|
|
2714
2734
|
item,
|
|
2715
2735
|
idx,
|
|
2716
2736
|
props.href ? void 0 : item?.links?.view
|
|
2717
|
-
)?.map((child, i) => /* @__PURE__ */
|
|
2737
|
+
)?.map((child, i) => /* @__PURE__ */ jsx35(React22.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
2718
2738
|
)
|
|
2719
2739
|
}
|
|
2720
2740
|
),
|
|
2721
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
2741
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
2722
2742
|
Pagination,
|
|
2723
2743
|
{
|
|
2724
2744
|
path: props.path,
|
|
@@ -2731,7 +2751,7 @@ var DivContainer = async (props) => {
|
|
|
2731
2751
|
var DivContainer_default = DivContainer;
|
|
2732
2752
|
|
|
2733
2753
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2734
|
-
import { jsx as
|
|
2754
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2735
2755
|
var NodeTypes = {
|
|
2736
2756
|
["paragraph"]: ParagraphNode_default,
|
|
2737
2757
|
["heading"]: HeadingNode_default,
|
|
@@ -2746,7 +2766,8 @@ var NodeTypes = {
|
|
|
2746
2766
|
["div-container"]: DivContainer_default,
|
|
2747
2767
|
["svg-icon"]: SVGIconNode_default,
|
|
2748
2768
|
["embed"]: EmbedNode_default,
|
|
2749
|
-
["document"]: DocumentNode_default
|
|
2769
|
+
["document"]: DocumentNode_default,
|
|
2770
|
+
["google-map"]: GoogleMapNode_default
|
|
2750
2771
|
};
|
|
2751
2772
|
var PageBodyRenderer = (props) => {
|
|
2752
2773
|
let pageBodyTree;
|
|
@@ -2768,14 +2789,14 @@ var PageBodyRenderer = (props) => {
|
|
|
2768
2789
|
}
|
|
2769
2790
|
return true;
|
|
2770
2791
|
};
|
|
2771
|
-
return /* @__PURE__ */
|
|
2792
|
+
return /* @__PURE__ */ jsx36(React23.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
2772
2793
|
{
|
|
2773
2794
|
}
|
|
2774
2795
|
const SelectedNode = NodeTypes[node.type];
|
|
2775
2796
|
if (!shouldRenderNode(node)) {
|
|
2776
2797
|
return null;
|
|
2777
2798
|
}
|
|
2778
|
-
return /* @__PURE__ */
|
|
2799
|
+
return /* @__PURE__ */ jsx36(React23.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx36(React23.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx36(React23.Fragment, { children: /* @__PURE__ */ jsx36(
|
|
2779
2800
|
SelectedNode,
|
|
2780
2801
|
{
|
|
2781
2802
|
node,
|
|
@@ -2791,7 +2812,7 @@ var PageBodyRenderer = (props) => {
|
|
|
2791
2812
|
device: props.device,
|
|
2792
2813
|
widgetRenderer: props.widgetRenderer
|
|
2793
2814
|
}
|
|
2794
|
-
) }) : /* @__PURE__ */
|
|
2815
|
+
) }) : /* @__PURE__ */ jsx36(React23.Fragment, { children: /* @__PURE__ */ jsx36(
|
|
2795
2816
|
SelectedNode,
|
|
2796
2817
|
{
|
|
2797
2818
|
node,
|
|
@@ -2861,7 +2882,7 @@ function EnterAnimationHydrator() {
|
|
|
2861
2882
|
|
|
2862
2883
|
// src/components/Toast.tsx
|
|
2863
2884
|
import { useCallback, useEffect as useEffect2, useRef, useState } from "react";
|
|
2864
|
-
import { Fragment as Fragment7, jsx as
|
|
2885
|
+
import { Fragment as Fragment7, jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2865
2886
|
var Toast = () => {
|
|
2866
2887
|
const [showToast, setShowToast] = useState(false);
|
|
2867
2888
|
const [message, setMessage] = useState("");
|
|
@@ -2895,8 +2916,8 @@ var Toast = () => {
|
|
|
2895
2916
|
});
|
|
2896
2917
|
};
|
|
2897
2918
|
}, [closeToast, showMessage]);
|
|
2898
|
-
return /* @__PURE__ */
|
|
2899
|
-
/* @__PURE__ */
|
|
2919
|
+
return /* @__PURE__ */ jsx37(Fragment7, { children: showToast && /* @__PURE__ */ jsx37("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ jsxs14("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
2920
|
+
/* @__PURE__ */ jsx37(
|
|
2900
2921
|
"span",
|
|
2901
2922
|
{
|
|
2902
2923
|
className: "font-medium text-inherit text-sm",
|
|
@@ -2904,7 +2925,7 @@ var Toast = () => {
|
|
|
2904
2925
|
children: message
|
|
2905
2926
|
}
|
|
2906
2927
|
),
|
|
2907
|
-
/* @__PURE__ */
|
|
2928
|
+
/* @__PURE__ */ jsx37("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx37(
|
|
2908
2929
|
"svg",
|
|
2909
2930
|
{
|
|
2910
2931
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2912,7 +2933,7 @@ var Toast = () => {
|
|
|
2912
2933
|
fill: "none",
|
|
2913
2934
|
viewBox: "0 0 24 24",
|
|
2914
2935
|
stroke: "currentColor",
|
|
2915
|
-
children: /* @__PURE__ */
|
|
2936
|
+
children: /* @__PURE__ */ jsx37("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
2916
2937
|
}
|
|
2917
2938
|
) })
|
|
2918
2939
|
] }) }) });
|
|
@@ -2922,7 +2943,7 @@ var Toast_default = Toast;
|
|
|
2922
2943
|
// src/components/NavigationTabsV2.tsx
|
|
2923
2944
|
import Link2 from "next/link";
|
|
2924
2945
|
import { usePathname } from "next/navigation";
|
|
2925
|
-
import { jsx as
|
|
2946
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2926
2947
|
function resolveRoutePlaceholders(route, params) {
|
|
2927
2948
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
2928
2949
|
const value = params[key];
|
|
@@ -2947,8 +2968,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
2947
2968
|
isActive: tab.isActive
|
|
2948
2969
|
})) || [];
|
|
2949
2970
|
if (mappedTabs.length === 0) return null;
|
|
2950
|
-
return /* @__PURE__ */
|
|
2951
|
-
return /* @__PURE__ */
|
|
2971
|
+
return /* @__PURE__ */ jsx38("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
2972
|
+
return /* @__PURE__ */ jsx38(Link2, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx38(
|
|
2952
2973
|
"div",
|
|
2953
2974
|
{
|
|
2954
2975
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -2966,46 +2987,46 @@ import { useRouter } from "next/navigation";
|
|
|
2966
2987
|
|
|
2967
2988
|
// src/components/dataForm/NoContentView.tsx
|
|
2968
2989
|
import React25 from "react";
|
|
2969
|
-
import { jsx as
|
|
2990
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2970
2991
|
var NoContentView = (props) => {
|
|
2971
|
-
return /* @__PURE__ */
|
|
2992
|
+
return /* @__PURE__ */ jsx39(React25.Fragment, { children: props.isDataFound === false && props.children });
|
|
2972
2993
|
};
|
|
2973
2994
|
var NoContentView_default = NoContentView;
|
|
2974
2995
|
|
|
2975
2996
|
// src/components/dataForm/ContentView.tsx
|
|
2976
2997
|
import React26 from "react";
|
|
2977
|
-
import { jsx as
|
|
2998
|
+
import { jsx as jsx40, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2978
2999
|
var ContentView = (props) => {
|
|
2979
3000
|
return /* @__PURE__ */ jsxs15(React26.Fragment, { children: [
|
|
2980
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
3001
|
+
props.isDataFound == null && /* @__PURE__ */ jsx40("div", { className: "", children: /* @__PURE__ */ jsxs15("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
2981
3002
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center mb-4", children: [
|
|
2982
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
2983
3004
|
/* @__PURE__ */ jsxs15("div", { className: "ml-2", children: [
|
|
2984
|
-
/* @__PURE__ */
|
|
2985
|
-
/* @__PURE__ */
|
|
3005
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3006
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
2986
3007
|
] })
|
|
2987
3008
|
] }),
|
|
2988
3009
|
/* @__PURE__ */ jsxs15("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
2989
3010
|
/* @__PURE__ */ jsxs15("div", { className: "animate-pulse", children: [
|
|
2990
|
-
/* @__PURE__ */
|
|
2991
|
-
/* @__PURE__ */
|
|
2992
|
-
/* @__PURE__ */
|
|
2993
|
-
/* @__PURE__ */
|
|
2994
|
-
/* @__PURE__ */
|
|
3011
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3012
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3013
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3014
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3015
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
2995
3016
|
] }),
|
|
2996
3017
|
/* @__PURE__ */ jsxs15("div", { className: "animate-pulse", children: [
|
|
2997
|
-
/* @__PURE__ */
|
|
2998
|
-
/* @__PURE__ */
|
|
2999
|
-
/* @__PURE__ */
|
|
3000
|
-
/* @__PURE__ */
|
|
3001
|
-
/* @__PURE__ */
|
|
3018
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3019
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3020
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3021
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3022
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3002
3023
|
] }),
|
|
3003
3024
|
/* @__PURE__ */ jsxs15("div", { className: "animate-pulse", children: [
|
|
3004
|
-
/* @__PURE__ */
|
|
3005
|
-
/* @__PURE__ */
|
|
3006
|
-
/* @__PURE__ */
|
|
3007
|
-
/* @__PURE__ */
|
|
3008
|
-
/* @__PURE__ */
|
|
3025
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3026
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3027
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3028
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3029
|
+
/* @__PURE__ */ jsx40("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3009
3030
|
] })
|
|
3010
3031
|
] })
|
|
3011
3032
|
] }) }),
|
|
@@ -3059,7 +3080,7 @@ function FormReducer(state, action) {
|
|
|
3059
3080
|
var FormReducer_default = FormReducer;
|
|
3060
3081
|
|
|
3061
3082
|
// src/components/dataForm/DataList.tsx
|
|
3062
|
-
import { Fragment as Fragment8, jsx as
|
|
3083
|
+
import { Fragment as Fragment8, jsx as jsx41, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3063
3084
|
var DataList = (props) => {
|
|
3064
3085
|
const router = useRouter();
|
|
3065
3086
|
let builder = new OdataBuilder(props.path);
|
|
@@ -3097,7 +3118,7 @@ var DataList = (props) => {
|
|
|
3097
3118
|
if (path.includes(".")) {
|
|
3098
3119
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
3099
3120
|
} else if (Array.isArray(obj[path])) {
|
|
3100
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
3121
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx41("div", { children: item }, index));
|
|
3101
3122
|
} else {
|
|
3102
3123
|
return obj[path];
|
|
3103
3124
|
}
|
|
@@ -3176,30 +3197,30 @@ var DataList = (props) => {
|
|
|
3176
3197
|
const renderPageNumbers = () => {
|
|
3177
3198
|
if (pages <= 10) {
|
|
3178
3199
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
3179
|
-
(page) => /* @__PURE__ */
|
|
3200
|
+
(page) => /* @__PURE__ */ jsx41(React27.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx41(
|
|
3180
3201
|
Hyperlink,
|
|
3181
3202
|
{
|
|
3182
3203
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3183
3204
|
href: builder.getNewPageUrl(page),
|
|
3184
3205
|
children: page
|
|
3185
3206
|
}
|
|
3186
|
-
) : /* @__PURE__ */
|
|
3207
|
+
) : /* @__PURE__ */ jsx41("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
3187
3208
|
);
|
|
3188
3209
|
} else {
|
|
3189
3210
|
const showFirstPages = activePageNumber <= 5;
|
|
3190
3211
|
const showLastPages = activePageNumber > pages - 5;
|
|
3191
3212
|
if (showFirstPages) {
|
|
3192
3213
|
return /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
3193
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
3214
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx41(React27.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx41(
|
|
3194
3215
|
Hyperlink,
|
|
3195
3216
|
{
|
|
3196
3217
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3197
3218
|
href: builder.getNewPageUrl(page),
|
|
3198
3219
|
children: page
|
|
3199
3220
|
}
|
|
3200
|
-
) : /* @__PURE__ */
|
|
3201
|
-
/* @__PURE__ */
|
|
3202
|
-
/* @__PURE__ */
|
|
3221
|
+
) : /* @__PURE__ */ jsx41("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
3222
|
+
/* @__PURE__ */ jsx41("span", { className: "px-2 py-1", children: "..." }),
|
|
3223
|
+
/* @__PURE__ */ jsx41(
|
|
3203
3224
|
Hyperlink,
|
|
3204
3225
|
{
|
|
3205
3226
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3207,7 +3228,7 @@ var DataList = (props) => {
|
|
|
3207
3228
|
children: pages - 1
|
|
3208
3229
|
}
|
|
3209
3230
|
),
|
|
3210
|
-
/* @__PURE__ */
|
|
3231
|
+
/* @__PURE__ */ jsx41(
|
|
3211
3232
|
Hyperlink,
|
|
3212
3233
|
{
|
|
3213
3234
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3215,7 +3236,7 @@ var DataList = (props) => {
|
|
|
3215
3236
|
children: pages
|
|
3216
3237
|
}
|
|
3217
3238
|
),
|
|
3218
|
-
/* @__PURE__ */
|
|
3239
|
+
/* @__PURE__ */ jsx41("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs16(
|
|
3219
3240
|
"select",
|
|
3220
3241
|
{
|
|
3221
3242
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -3227,18 +3248,18 @@ var DataList = (props) => {
|
|
|
3227
3248
|
}
|
|
3228
3249
|
},
|
|
3229
3250
|
children: [
|
|
3230
|
-
/* @__PURE__ */
|
|
3251
|
+
/* @__PURE__ */ jsx41("option", { className: "", value: "", children: "Jump to" }),
|
|
3231
3252
|
Array.from(
|
|
3232
3253
|
{ length: Math.max(0, pages - 10) },
|
|
3233
3254
|
(_, index) => index + 9
|
|
3234
|
-
).map((page) => /* @__PURE__ */
|
|
3255
|
+
).map((page) => /* @__PURE__ */ jsx41("option", { value: page, children: page }, page))
|
|
3235
3256
|
]
|
|
3236
3257
|
}
|
|
3237
3258
|
) })
|
|
3238
3259
|
] });
|
|
3239
3260
|
} else if (showLastPages) {
|
|
3240
3261
|
return /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
3241
|
-
/* @__PURE__ */
|
|
3262
|
+
/* @__PURE__ */ jsx41(
|
|
3242
3263
|
Hyperlink,
|
|
3243
3264
|
{
|
|
3244
3265
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3246,7 +3267,7 @@ var DataList = (props) => {
|
|
|
3246
3267
|
children: "1"
|
|
3247
3268
|
}
|
|
3248
3269
|
),
|
|
3249
|
-
/* @__PURE__ */
|
|
3270
|
+
/* @__PURE__ */ jsx41(
|
|
3250
3271
|
Hyperlink,
|
|
3251
3272
|
{
|
|
3252
3273
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3254,21 +3275,21 @@ var DataList = (props) => {
|
|
|
3254
3275
|
children: "2"
|
|
3255
3276
|
}
|
|
3256
3277
|
),
|
|
3257
|
-
/* @__PURE__ */
|
|
3278
|
+
/* @__PURE__ */ jsx41("span", { className: "px-2 py-1", children: "..." }),
|
|
3258
3279
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
3259
|
-
(page) => /* @__PURE__ */
|
|
3280
|
+
(page) => /* @__PURE__ */ jsx41(React27.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx41(
|
|
3260
3281
|
Hyperlink,
|
|
3261
3282
|
{
|
|
3262
3283
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3263
3284
|
href: builder.getNewPageUrl(page),
|
|
3264
3285
|
children: page
|
|
3265
3286
|
}
|
|
3266
|
-
) : /* @__PURE__ */
|
|
3287
|
+
) : /* @__PURE__ */ jsx41("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
3267
3288
|
)
|
|
3268
3289
|
] });
|
|
3269
3290
|
} else {
|
|
3270
3291
|
return /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
3271
|
-
/* @__PURE__ */
|
|
3292
|
+
/* @__PURE__ */ jsx41(
|
|
3272
3293
|
Hyperlink,
|
|
3273
3294
|
{
|
|
3274
3295
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3276,7 +3297,7 @@ var DataList = (props) => {
|
|
|
3276
3297
|
children: "1"
|
|
3277
3298
|
}
|
|
3278
3299
|
),
|
|
3279
|
-
/* @__PURE__ */
|
|
3300
|
+
/* @__PURE__ */ jsx41(
|
|
3280
3301
|
Hyperlink,
|
|
3281
3302
|
{
|
|
3282
3303
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3284,20 +3305,20 @@ var DataList = (props) => {
|
|
|
3284
3305
|
children: "2"
|
|
3285
3306
|
}
|
|
3286
3307
|
),
|
|
3287
|
-
/* @__PURE__ */
|
|
3308
|
+
/* @__PURE__ */ jsx41("span", { className: "px-2 py-1", children: "..." }),
|
|
3288
3309
|
Array.from(
|
|
3289
3310
|
{ length: 5 },
|
|
3290
3311
|
(_, index) => activePageNumber - 2 + index
|
|
3291
|
-
).map((page) => /* @__PURE__ */
|
|
3312
|
+
).map((page) => /* @__PURE__ */ jsx41(React27.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx41(
|
|
3292
3313
|
Hyperlink,
|
|
3293
3314
|
{
|
|
3294
3315
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3295
3316
|
href: builder.getNewPageUrl(page),
|
|
3296
3317
|
children: page
|
|
3297
3318
|
}
|
|
3298
|
-
) : /* @__PURE__ */
|
|
3299
|
-
/* @__PURE__ */
|
|
3300
|
-
/* @__PURE__ */
|
|
3319
|
+
) : /* @__PURE__ */ jsx41("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
3320
|
+
/* @__PURE__ */ jsx41("span", { className: "px-2 py-1", children: "..." }),
|
|
3321
|
+
/* @__PURE__ */ jsx41(
|
|
3301
3322
|
Hyperlink,
|
|
3302
3323
|
{
|
|
3303
3324
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3305,7 +3326,7 @@ var DataList = (props) => {
|
|
|
3305
3326
|
children: pages - 1
|
|
3306
3327
|
}
|
|
3307
3328
|
),
|
|
3308
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx41(
|
|
3309
3330
|
Hyperlink,
|
|
3310
3331
|
{
|
|
3311
3332
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3313,7 +3334,7 @@ var DataList = (props) => {
|
|
|
3313
3334
|
children: pages
|
|
3314
3335
|
}
|
|
3315
3336
|
),
|
|
3316
|
-
/* @__PURE__ */
|
|
3337
|
+
/* @__PURE__ */ jsx41("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs16(
|
|
3317
3338
|
"select",
|
|
3318
3339
|
{
|
|
3319
3340
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -3325,8 +3346,8 @@ var DataList = (props) => {
|
|
|
3325
3346
|
}
|
|
3326
3347
|
},
|
|
3327
3348
|
children: [
|
|
3328
|
-
/* @__PURE__ */
|
|
3329
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
3349
|
+
/* @__PURE__ */ jsx41("option", { value: "", children: "Jump to" }),
|
|
3350
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx41("option", { value: page, children: page }, page))
|
|
3330
3351
|
]
|
|
3331
3352
|
}
|
|
3332
3353
|
) })
|
|
@@ -3341,9 +3362,9 @@ var DataList = (props) => {
|
|
|
3341
3362
|
{
|
|
3342
3363
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
3343
3364
|
children: [
|
|
3344
|
-
props.title ? /* @__PURE__ */
|
|
3365
|
+
props.title ? /* @__PURE__ */ jsx41("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx41("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx41("div", {}),
|
|
3345
3366
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-3", children: [
|
|
3346
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
3367
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx41(
|
|
3347
3368
|
InputControl_default,
|
|
3348
3369
|
{
|
|
3349
3370
|
name: "Search_input",
|
|
@@ -3355,7 +3376,7 @@ var DataList = (props) => {
|
|
|
3355
3376
|
}
|
|
3356
3377
|
}
|
|
3357
3378
|
),
|
|
3358
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
3379
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx41(
|
|
3359
3380
|
InputControl_default,
|
|
3360
3381
|
{
|
|
3361
3382
|
name: filter.name,
|
|
@@ -3377,8 +3398,8 @@ var DataList = (props) => {
|
|
|
3377
3398
|
linkType: "Primary" /* Solid */,
|
|
3378
3399
|
href: props.addLinkHref,
|
|
3379
3400
|
children: [
|
|
3380
|
-
/* @__PURE__ */
|
|
3381
|
-
/* @__PURE__ */
|
|
3401
|
+
/* @__PURE__ */ jsx41(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
3402
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
3382
3403
|
]
|
|
3383
3404
|
}
|
|
3384
3405
|
)
|
|
@@ -3386,8 +3407,8 @@ var DataList = (props) => {
|
|
|
3386
3407
|
]
|
|
3387
3408
|
}
|
|
3388
3409
|
),
|
|
3389
|
-
/* @__PURE__ */
|
|
3390
|
-
/* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ jsx41("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs16("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
3411
|
+
/* @__PURE__ */ jsx41("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx41("tr", { children: props?.columns?.map((column) => {
|
|
3391
3412
|
let url = builder.getNewOrderByUrl(column.name);
|
|
3392
3413
|
let icon = "chevronUpDown";
|
|
3393
3414
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -3397,18 +3418,18 @@ var DataList = (props) => {
|
|
|
3397
3418
|
icon = "chevronUp";
|
|
3398
3419
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
3399
3420
|
}
|
|
3400
|
-
return /* @__PURE__ */
|
|
3421
|
+
return /* @__PURE__ */ jsx41(
|
|
3401
3422
|
"th",
|
|
3402
3423
|
{
|
|
3403
3424
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
3404
|
-
children: /* @__PURE__ */
|
|
3425
|
+
children: /* @__PURE__ */ jsx41(
|
|
3405
3426
|
Hyperlink,
|
|
3406
3427
|
{
|
|
3407
3428
|
href: column.enableSorting ? url : void 0,
|
|
3408
3429
|
className: "!text-neutral-contrast ",
|
|
3409
3430
|
children: /* @__PURE__ */ jsxs16("span", { className: "flex items-center space-x-1", children: [
|
|
3410
|
-
/* @__PURE__ */
|
|
3411
|
-
column.enableSorting && /* @__PURE__ */
|
|
3431
|
+
/* @__PURE__ */ jsx41("span", { className: "text-black", children: column.label }),
|
|
3432
|
+
column.enableSorting && /* @__PURE__ */ jsx41(Icon_default, { className: "w-4 h-4", name: icon })
|
|
3412
3433
|
] })
|
|
3413
3434
|
}
|
|
3414
3435
|
)
|
|
@@ -3416,24 +3437,24 @@ var DataList = (props) => {
|
|
|
3416
3437
|
column.name
|
|
3417
3438
|
);
|
|
3418
3439
|
}) }) }),
|
|
3419
|
-
/* @__PURE__ */
|
|
3440
|
+
/* @__PURE__ */ jsx41("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
3420
3441
|
let validityClass = "";
|
|
3421
3442
|
console.log("dataitem", dataitem);
|
|
3422
3443
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
3423
3444
|
validityClass = "bg-alert-200";
|
|
3424
3445
|
}
|
|
3425
|
-
return /* @__PURE__ */
|
|
3446
|
+
return /* @__PURE__ */ jsx41("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
3426
3447
|
console.log("column", column);
|
|
3427
|
-
return /* @__PURE__ */
|
|
3448
|
+
return /* @__PURE__ */ jsx41(React27.Fragment, { children: /* @__PURE__ */ jsx41(
|
|
3428
3449
|
"td",
|
|
3429
3450
|
{
|
|
3430
3451
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
3431
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
3452
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx41(
|
|
3432
3453
|
Hyperlink,
|
|
3433
3454
|
{
|
|
3434
3455
|
className: "",
|
|
3435
3456
|
href: `https://${dataitem[column.name]}`,
|
|
3436
|
-
children: /* @__PURE__ */
|
|
3457
|
+
children: /* @__PURE__ */ jsx41(
|
|
3437
3458
|
ViewControl_default,
|
|
3438
3459
|
{
|
|
3439
3460
|
controlType: column.controlType,
|
|
@@ -3446,11 +3467,11 @@ var DataList = (props) => {
|
|
|
3446
3467
|
}
|
|
3447
3468
|
)
|
|
3448
3469
|
}
|
|
3449
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
3470
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx41(
|
|
3450
3471
|
Hyperlink,
|
|
3451
3472
|
{
|
|
3452
3473
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
3453
|
-
children: /* @__PURE__ */
|
|
3474
|
+
children: /* @__PURE__ */ jsx41(
|
|
3454
3475
|
ViewControl_default,
|
|
3455
3476
|
{
|
|
3456
3477
|
controlType: column.controlType,
|
|
@@ -3460,7 +3481,7 @@ var DataList = (props) => {
|
|
|
3460
3481
|
}
|
|
3461
3482
|
)
|
|
3462
3483
|
}
|
|
3463
|
-
) : /* @__PURE__ */
|
|
3484
|
+
) : /* @__PURE__ */ jsx41(
|
|
3464
3485
|
ViewControl_default,
|
|
3465
3486
|
{
|
|
3466
3487
|
controlType: column.controlType,
|
|
@@ -3474,10 +3495,10 @@ var DataList = (props) => {
|
|
|
3474
3495
|
}) }, index);
|
|
3475
3496
|
}) })
|
|
3476
3497
|
] }) }),
|
|
3477
|
-
/* @__PURE__ */
|
|
3478
|
-
/* @__PURE__ */
|
|
3498
|
+
/* @__PURE__ */ jsx41("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between", children: [
|
|
3499
|
+
/* @__PURE__ */ jsx41("div", { className: "text-gray-700", children: label }),
|
|
3479
3500
|
/* @__PURE__ */ jsxs16("div", { className: "flex space-x-2 items-center", children: [
|
|
3480
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
3501
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx41(
|
|
3481
3502
|
Hyperlink,
|
|
3482
3503
|
{
|
|
3483
3504
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -3485,9 +3506,9 @@ var DataList = (props) => {
|
|
|
3485
3506
|
children: "Prev"
|
|
3486
3507
|
}
|
|
3487
3508
|
),
|
|
3488
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
3509
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx41("div", { className: "px-3 py-1 rounded-l-md border border-gray-300 bg-gray-200 text-gray-500 hover:bg-gray-200", children: "Prev" }),
|
|
3489
3510
|
renderPageNumbers(),
|
|
3490
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
3511
|
+
activePageNumber < pages && /* @__PURE__ */ jsx41(
|
|
3491
3512
|
Hyperlink,
|
|
3492
3513
|
{
|
|
3493
3514
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -3495,7 +3516,7 @@ var DataList = (props) => {
|
|
|
3495
3516
|
children: "Next"
|
|
3496
3517
|
}
|
|
3497
3518
|
),
|
|
3498
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
3519
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx41("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
3499
3520
|
] })
|
|
3500
3521
|
] }) })
|
|
3501
3522
|
] }),
|
|
@@ -3505,9 +3526,9 @@ var DataList = (props) => {
|
|
|
3505
3526
|
{
|
|
3506
3527
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200`,
|
|
3507
3528
|
children: [
|
|
3508
|
-
props.title ? /* @__PURE__ */
|
|
3529
|
+
props.title ? /* @__PURE__ */ jsx41("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx41("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx41("div", {}),
|
|
3509
3530
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-3", children: [
|
|
3510
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
3531
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx41(
|
|
3511
3532
|
InputControl_default,
|
|
3512
3533
|
{
|
|
3513
3534
|
name: "Search_input",
|
|
@@ -3519,7 +3540,7 @@ var DataList = (props) => {
|
|
|
3519
3540
|
}
|
|
3520
3541
|
}
|
|
3521
3542
|
),
|
|
3522
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
3543
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx41(
|
|
3523
3544
|
InputControl_default,
|
|
3524
3545
|
{
|
|
3525
3546
|
name: filter.name,
|
|
@@ -3541,8 +3562,8 @@ var DataList = (props) => {
|
|
|
3541
3562
|
linkType: "Primary" /* Solid */,
|
|
3542
3563
|
href: props.addLinkHref,
|
|
3543
3564
|
children: [
|
|
3544
|
-
/* @__PURE__ */
|
|
3545
|
-
/* @__PURE__ */
|
|
3565
|
+
/* @__PURE__ */ jsx41(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
3566
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
3546
3567
|
]
|
|
3547
3568
|
}
|
|
3548
3569
|
)
|
|
@@ -3551,7 +3572,7 @@ var DataList = (props) => {
|
|
|
3551
3572
|
}
|
|
3552
3573
|
),
|
|
3553
3574
|
/* @__PURE__ */ jsxs16("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
3554
|
-
/* @__PURE__ */
|
|
3575
|
+
/* @__PURE__ */ jsx41("div", { children: /* @__PURE__ */ jsx41("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx41("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx41("tr", { children: props?.columns?.map((column) => {
|
|
3555
3576
|
let url = builder.getNewOrderByUrl(column.name);
|
|
3556
3577
|
let icon = "chevronUpDown";
|
|
3557
3578
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -3561,18 +3582,18 @@ var DataList = (props) => {
|
|
|
3561
3582
|
icon = "chevronUp";
|
|
3562
3583
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
3563
3584
|
}
|
|
3564
|
-
return /* @__PURE__ */
|
|
3585
|
+
return /* @__PURE__ */ jsx41(
|
|
3565
3586
|
"th",
|
|
3566
3587
|
{
|
|
3567
3588
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
3568
|
-
children: /* @__PURE__ */
|
|
3589
|
+
children: /* @__PURE__ */ jsx41(
|
|
3569
3590
|
Hyperlink,
|
|
3570
3591
|
{
|
|
3571
3592
|
href: column.enableSorting ? url : void 0,
|
|
3572
3593
|
className: "text-body-950",
|
|
3573
3594
|
children: /* @__PURE__ */ jsxs16("span", { className: "flex items-center space-x-1", children: [
|
|
3574
|
-
/* @__PURE__ */
|
|
3575
|
-
column.enableSorting && /* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ jsx41("span", { children: column.label }),
|
|
3596
|
+
column.enableSorting && /* @__PURE__ */ jsx41(Icon_default, { className: "w-4 h-4", name: icon })
|
|
3576
3597
|
] })
|
|
3577
3598
|
}
|
|
3578
3599
|
)
|
|
@@ -3580,7 +3601,7 @@ var DataList = (props) => {
|
|
|
3580
3601
|
column.name
|
|
3581
3602
|
);
|
|
3582
3603
|
}) }) }) }) }),
|
|
3583
|
-
/* @__PURE__ */
|
|
3604
|
+
/* @__PURE__ */ jsx41("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
3584
3605
|
] })
|
|
3585
3606
|
] })
|
|
3586
3607
|
] });
|
|
@@ -3590,7 +3611,7 @@ var DataList_default = DataList;
|
|
|
3590
3611
|
// src/components/dataForm/DataListRenderer.tsx
|
|
3591
3612
|
import React28, { useState as useState3, useEffect as useEffect4 } from "react";
|
|
3592
3613
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
3593
|
-
import { jsx as
|
|
3614
|
+
import { jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3594
3615
|
var viewControlMap = {
|
|
3595
3616
|
number: ViewControlTypes.number,
|
|
3596
3617
|
lineText: ViewControlTypes.lineText,
|
|
@@ -3690,8 +3711,8 @@ var DataListRenderer = ({
|
|
|
3690
3711
|
// tabs={resolvedTabs}
|
|
3691
3712
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
3692
3713
|
// />
|
|
3693
|
-
/* @__PURE__ */
|
|
3694
|
-
/* @__PURE__ */
|
|
3714
|
+
/* @__PURE__ */ jsx42(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
3715
|
+
/* @__PURE__ */ jsx42(
|
|
3695
3716
|
DataList_default,
|
|
3696
3717
|
{
|
|
3697
3718
|
addLinkHref,
|
|
@@ -3736,7 +3757,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
3736
3757
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
3737
3758
|
|
|
3738
3759
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
3739
|
-
import { jsx as
|
|
3760
|
+
import { jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3740
3761
|
var DataFormChildSection = (props) => {
|
|
3741
3762
|
const { section } = props;
|
|
3742
3763
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -3804,14 +3825,14 @@ var DataFormChildSection = (props) => {
|
|
|
3804
3825
|
childItemsToRender,
|
|
3805
3826
|
allChildItems: childItems
|
|
3806
3827
|
});
|
|
3807
|
-
return /* @__PURE__ */
|
|
3808
|
-
section.sectionTitle && /* @__PURE__ */
|
|
3809
|
-
/* @__PURE__ */
|
|
3810
|
-
/* @__PURE__ */
|
|
3811
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */
|
|
3828
|
+
return /* @__PURE__ */ jsx43(React29.Fragment, { children: /* @__PURE__ */ jsxs18("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
3829
|
+
section.sectionTitle && /* @__PURE__ */ jsx43("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
3830
|
+
/* @__PURE__ */ jsx43("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
3831
|
+
/* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsxs18("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
3832
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ jsx43("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
3812
3833
|
return /* @__PURE__ */ jsxs18("tr", { className: "", children: [
|
|
3813
3834
|
sectionRow.elements.map((field, index) => {
|
|
3814
|
-
return /* @__PURE__ */
|
|
3835
|
+
return /* @__PURE__ */ jsx43(
|
|
3815
3836
|
"th",
|
|
3816
3837
|
{
|
|
3817
3838
|
className: "py-3 font-normal text-left",
|
|
@@ -3820,13 +3841,13 @@ var DataFormChildSection = (props) => {
|
|
|
3820
3841
|
field.name
|
|
3821
3842
|
);
|
|
3822
3843
|
}),
|
|
3823
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
3844
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx43("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
3824
3845
|
] }, sectionRowIndex);
|
|
3825
3846
|
}) }),
|
|
3826
|
-
/* @__PURE__ */
|
|
3847
|
+
/* @__PURE__ */ jsx43("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
3827
3848
|
const { item, originalIndex } = visibleItem;
|
|
3828
3849
|
const rowKey = originalIndex;
|
|
3829
|
-
return /* @__PURE__ */
|
|
3850
|
+
return /* @__PURE__ */ jsx43(React29.Fragment, { children: section.sectionRows.map(
|
|
3830
3851
|
(sectionRow, sectionRowIndex) => {
|
|
3831
3852
|
return /* @__PURE__ */ jsxs18(
|
|
3832
3853
|
"tr",
|
|
@@ -3834,7 +3855,7 @@ var DataFormChildSection = (props) => {
|
|
|
3834
3855
|
className: "",
|
|
3835
3856
|
children: [
|
|
3836
3857
|
sectionRow.elements.map((field, index) => {
|
|
3837
|
-
return /* @__PURE__ */
|
|
3858
|
+
return /* @__PURE__ */ jsx43("td", { children: /* @__PURE__ */ jsx43("div", { className: "flex-1", children: /* @__PURE__ */ jsx43("div", { className: "w-11/12", children: /* @__PURE__ */ jsx43(
|
|
3838
3859
|
InputControl_default,
|
|
3839
3860
|
{
|
|
3840
3861
|
index: filteredIndex,
|
|
@@ -3854,7 +3875,7 @@ var DataFormChildSection = (props) => {
|
|
|
3854
3875
|
}
|
|
3855
3876
|
) }) }) }, field.name);
|
|
3856
3877
|
}),
|
|
3857
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
3878
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx43("td", { children: /* @__PURE__ */ jsx43(
|
|
3858
3879
|
ClientButton_default,
|
|
3859
3880
|
{
|
|
3860
3881
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -3863,7 +3884,7 @@ var DataFormChildSection = (props) => {
|
|
|
3863
3884
|
},
|
|
3864
3885
|
dataRole: "delete",
|
|
3865
3886
|
tabIndex: -1,
|
|
3866
|
-
children: /* @__PURE__ */
|
|
3887
|
+
children: /* @__PURE__ */ jsx43(
|
|
3867
3888
|
Icon_default,
|
|
3868
3889
|
{
|
|
3869
3890
|
className: "w-4 h-4",
|
|
@@ -3880,7 +3901,7 @@ var DataFormChildSection = (props) => {
|
|
|
3880
3901
|
) }, rowKey);
|
|
3881
3902
|
}) })
|
|
3882
3903
|
] }) }),
|
|
3883
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
3904
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx43("div", { className: "ml-1", children: /* @__PURE__ */ jsx43(
|
|
3884
3905
|
ClientButton_default,
|
|
3885
3906
|
{
|
|
3886
3907
|
ButtonType: "Link" /* Link */,
|
|
@@ -3895,7 +3916,7 @@ var DataFormChildSection = (props) => {
|
|
|
3895
3916
|
var DataFormChildSection_default = DataFormChildSection;
|
|
3896
3917
|
|
|
3897
3918
|
// src/components/dataForm/DataForm.tsx
|
|
3898
|
-
import { jsx as
|
|
3919
|
+
import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3899
3920
|
var DataForm = (props) => {
|
|
3900
3921
|
const formRef = useRef2(null);
|
|
3901
3922
|
console.log(props.dataItem, "dssads");
|
|
@@ -4115,19 +4136,19 @@ var DataForm = (props) => {
|
|
|
4115
4136
|
return false;
|
|
4116
4137
|
}
|
|
4117
4138
|
}
|
|
4118
|
-
return /* @__PURE__ */
|
|
4119
|
-
props.title && /* @__PURE__ */
|
|
4139
|
+
return /* @__PURE__ */ jsx44(React30.Fragment, { children: /* @__PURE__ */ jsxs19("div", { className: "flex-grow flex flex-col", children: [
|
|
4140
|
+
props.title && /* @__PURE__ */ jsx44("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ jsxs19(
|
|
4120
4141
|
"div",
|
|
4121
4142
|
{
|
|
4122
4143
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
4123
4144
|
onClick: () => window.history.back(),
|
|
4124
4145
|
children: [
|
|
4125
|
-
/* @__PURE__ */
|
|
4126
|
-
/* @__PURE__ */
|
|
4146
|
+
/* @__PURE__ */ jsx44(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
4147
|
+
/* @__PURE__ */ jsx44("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
4127
4148
|
]
|
|
4128
4149
|
}
|
|
4129
4150
|
) }),
|
|
4130
|
-
/* @__PURE__ */
|
|
4151
|
+
/* @__PURE__ */ jsx44(
|
|
4131
4152
|
"form",
|
|
4132
4153
|
{
|
|
4133
4154
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -4148,8 +4169,8 @@ var DataForm = (props) => {
|
|
|
4148
4169
|
}
|
|
4149
4170
|
}
|
|
4150
4171
|
},
|
|
4151
|
-
children: /* @__PURE__ */
|
|
4152
|
-
return /* @__PURE__ */
|
|
4172
|
+
children: /* @__PURE__ */ jsx44("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
4173
|
+
return /* @__PURE__ */ jsx44(React30.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs19("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
4153
4174
|
section.sectionRows?.map(
|
|
4154
4175
|
(sectionRow, sectionRowIndex) => {
|
|
4155
4176
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -4160,14 +4181,14 @@ var DataForm = (props) => {
|
|
|
4160
4181
|
sectionRow.visible
|
|
4161
4182
|
);
|
|
4162
4183
|
}
|
|
4163
|
-
return /* @__PURE__ */
|
|
4184
|
+
return /* @__PURE__ */ jsx44(React30.Fragment, { children: isVisible && /* @__PURE__ */ jsx44("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
4164
4185
|
return /* @__PURE__ */ jsxs19(
|
|
4165
4186
|
"div",
|
|
4166
4187
|
{
|
|
4167
4188
|
className: sectionRow.grow ? "grow" : "",
|
|
4168
4189
|
children: [
|
|
4169
|
-
/* @__PURE__ */
|
|
4170
|
-
/* @__PURE__ */
|
|
4190
|
+
/* @__PURE__ */ jsx44("div", { children: field.controlType }),
|
|
4191
|
+
/* @__PURE__ */ jsx44(
|
|
4171
4192
|
InputControl_default,
|
|
4172
4193
|
{
|
|
4173
4194
|
name: field.name,
|
|
@@ -4197,12 +4218,12 @@ var DataForm = (props) => {
|
|
|
4197
4218
|
}) }) }, sectionRowIndex);
|
|
4198
4219
|
}
|
|
4199
4220
|
),
|
|
4200
|
-
/* @__PURE__ */
|
|
4221
|
+
/* @__PURE__ */ jsx44("div", { children: section.childSections?.map(
|
|
4201
4222
|
(childSection, childSectionIndex) => {
|
|
4202
|
-
return /* @__PURE__ */
|
|
4223
|
+
return /* @__PURE__ */ jsx44("div", { children: childSection.name && evalutateCondition(
|
|
4203
4224
|
formState.inputValues,
|
|
4204
4225
|
childSection.visible
|
|
4205
|
-
) && /* @__PURE__ */
|
|
4226
|
+
) && /* @__PURE__ */ jsx44(
|
|
4206
4227
|
DataFormChildSection_default,
|
|
4207
4228
|
{
|
|
4208
4229
|
section: childSection,
|
|
@@ -4218,7 +4239,7 @@ var DataForm = (props) => {
|
|
|
4218
4239
|
}
|
|
4219
4240
|
),
|
|
4220
4241
|
/* @__PURE__ */ jsxs19("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
4221
|
-
/* @__PURE__ */
|
|
4242
|
+
/* @__PURE__ */ jsx44("div", { children: props.additionalActions && /* @__PURE__ */ jsx44(
|
|
4222
4243
|
Button_default,
|
|
4223
4244
|
{
|
|
4224
4245
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -4226,7 +4247,7 @@ var DataForm = (props) => {
|
|
|
4226
4247
|
children: props.additionalActions.title
|
|
4227
4248
|
}
|
|
4228
4249
|
) }),
|
|
4229
|
-
/* @__PURE__ */
|
|
4250
|
+
/* @__PURE__ */ jsx44("div", { children: props.onDelete && /* @__PURE__ */ jsx44(
|
|
4230
4251
|
Button_default,
|
|
4231
4252
|
{
|
|
4232
4253
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -4237,7 +4258,7 @@ var DataForm = (props) => {
|
|
|
4237
4258
|
children: "Delete"
|
|
4238
4259
|
}
|
|
4239
4260
|
) }),
|
|
4240
|
-
/* @__PURE__ */
|
|
4261
|
+
/* @__PURE__ */ jsx44("div", { children: props.onClick && /* @__PURE__ */ jsx44(
|
|
4241
4262
|
Button_default,
|
|
4242
4263
|
{
|
|
4243
4264
|
onValidate,
|
|
@@ -4254,7 +4275,7 @@ var DataForm = (props) => {
|
|
|
4254
4275
|
var DataForm_default = DataForm;
|
|
4255
4276
|
|
|
4256
4277
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
4257
|
-
import { jsx as
|
|
4278
|
+
import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4258
4279
|
function getAction(actions, code) {
|
|
4259
4280
|
return actions?.find((a) => a.actionCode === code);
|
|
4260
4281
|
}
|
|
@@ -4281,8 +4302,8 @@ var DataFormRenderer = ({
|
|
|
4281
4302
|
);
|
|
4282
4303
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
4283
4304
|
return /* @__PURE__ */ jsxs20("div", { className: "flex-grow flex flex-col", children: [
|
|
4284
|
-
widgetProps && /* @__PURE__ */
|
|
4285
|
-
/* @__PURE__ */
|
|
4305
|
+
widgetProps && /* @__PURE__ */ jsx45(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
4306
|
+
/* @__PURE__ */ jsx45(
|
|
4286
4307
|
DataForm_default,
|
|
4287
4308
|
{
|
|
4288
4309
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|