@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260708070033 → 0.8.1-dev.20260709113231
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/EnterAnimationClient-2JW323TH.mjs +32 -0
- package/dist/EnterAnimationClient-RS3NQNR4.mjs +30 -0
- package/dist/{InputControlClient-OQDLYA4S.mjs → InputControlClient-AZRPSTUZ.mjs} +80 -7
- package/dist/{InputControlClient-O4HBEUP4.mjs → InputControlClient-CS4JM7UY.mjs} +1 -1
- package/dist/{InputControlClient-646PQPKQ.mjs → InputControlClient-XS52LLEE.mjs} +1 -1
- package/dist/{LinkNodeButton-WA5N3CBJ.mjs → LinkNodeButton-LX3KKGZY.mjs} +3 -4
- package/dist/{LinkNodeButton-GVOICN34.mjs → LinkNodeButton-U7T2NP22.mjs} +29 -16
- package/dist/{LinkNodeButton-66LEXGVY.mjs → LinkNodeButton-XA7Z5IDR.mjs} +3 -4
- package/dist/{chunk-67IG5NBU.mjs → chunk-JKP4XOZB.mjs} +27 -13
- package/dist/{chunk-IKIXEQPV.mjs → chunk-YL6E76X2.mjs} +27 -13
- package/dist/index.d.mts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +309 -265
- package/dist/index.mjs +71 -79
- package/dist/server.js +30 -17
- package/dist/server.mjs +1 -1
- package/package.json +1 -1
- package/dist/Pagination-YCD5CU2L.mjs +0 -183
- package/dist/chunk-2GSYECIS.mjs +0 -109
- package/dist/chunk-R2HV35IB.mjs +0 -201
package/dist/index.js
CHANGED
|
@@ -1683,38 +1683,52 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1683
1683
|
});
|
|
1684
1684
|
|
|
1685
1685
|
// src/components/ToastService.tsx
|
|
1686
|
-
var ToastService, ToastService_default;
|
|
1686
|
+
var toastHandlersKey, getToastHandlers, ToastService, ToastService_default;
|
|
1687
1687
|
var init_ToastService = __esm({
|
|
1688
1688
|
"src/components/ToastService.tsx"() {
|
|
1689
1689
|
"use strict";
|
|
1690
|
-
|
|
1690
|
+
toastHandlersKey = "__digitalStoreToastHandlers";
|
|
1691
|
+
getToastHandlers = () => {
|
|
1692
|
+
const globalScope = globalThis;
|
|
1693
|
+
if (!globalScope[toastHandlersKey]) {
|
|
1694
|
+
globalScope[toastHandlersKey] = {};
|
|
1695
|
+
}
|
|
1696
|
+
return globalScope[toastHandlersKey];
|
|
1697
|
+
};
|
|
1698
|
+
ToastService = class {
|
|
1691
1699
|
static initialize(showToast, closeToast) {
|
|
1692
|
-
|
|
1693
|
-
|
|
1700
|
+
const handlers = getToastHandlers();
|
|
1701
|
+
handlers.showToast = showToast;
|
|
1702
|
+
handlers.closeToast = closeToast;
|
|
1694
1703
|
}
|
|
1695
1704
|
static showError(message) {
|
|
1696
|
-
|
|
1697
|
-
|
|
1705
|
+
const handlers = getToastHandlers();
|
|
1706
|
+
if (handlers.showToast) {
|
|
1707
|
+
handlers.showToast(message, "error");
|
|
1698
1708
|
}
|
|
1699
1709
|
}
|
|
1700
1710
|
static showInfo(message) {
|
|
1701
|
-
|
|
1702
|
-
|
|
1711
|
+
const handlers = getToastHandlers();
|
|
1712
|
+
if (handlers.showToast) {
|
|
1713
|
+
handlers.showToast(message, "info");
|
|
1703
1714
|
}
|
|
1704
1715
|
}
|
|
1705
1716
|
static showWarning(message) {
|
|
1706
|
-
|
|
1707
|
-
|
|
1717
|
+
const handlers = getToastHandlers();
|
|
1718
|
+
if (handlers.showToast) {
|
|
1719
|
+
handlers.showToast(message, "warning");
|
|
1708
1720
|
}
|
|
1709
1721
|
}
|
|
1710
1722
|
static showSuccess(message) {
|
|
1711
|
-
|
|
1712
|
-
|
|
1723
|
+
const handlers = getToastHandlers();
|
|
1724
|
+
if (handlers.showToast) {
|
|
1725
|
+
handlers.showToast(message, "success");
|
|
1713
1726
|
}
|
|
1714
1727
|
}
|
|
1715
1728
|
static close() {
|
|
1716
|
-
|
|
1717
|
-
|
|
1729
|
+
const handlers = getToastHandlers();
|
|
1730
|
+
if (handlers.closeToast) {
|
|
1731
|
+
handlers.closeToast();
|
|
1718
1732
|
}
|
|
1719
1733
|
}
|
|
1720
1734
|
};
|
|
@@ -3126,10 +3140,9 @@ var init_LinkNodeButton = __esm({
|
|
|
3126
3140
|
}
|
|
3127
3141
|
return current;
|
|
3128
3142
|
}, []);
|
|
3129
|
-
const onClick = (0, import_react38.useCallback)(async (
|
|
3143
|
+
const onClick = (0, import_react38.useCallback)(async () => {
|
|
3130
3144
|
if (!node.postUrl) {
|
|
3131
|
-
|
|
3132
|
-
return;
|
|
3145
|
+
return { isSuccessful: false, message: "No POST URL configured for this button" };
|
|
3133
3146
|
}
|
|
3134
3147
|
setIsLoading(true);
|
|
3135
3148
|
try {
|
|
@@ -4111,6 +4124,43 @@ var init_Slider = __esm({
|
|
|
4111
4124
|
}
|
|
4112
4125
|
});
|
|
4113
4126
|
|
|
4127
|
+
// src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
|
|
4128
|
+
var EnterAnimationClient_exports = {};
|
|
4129
|
+
__export(EnterAnimationClient_exports, {
|
|
4130
|
+
default: () => EnterAnimationClient
|
|
4131
|
+
});
|
|
4132
|
+
function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
4133
|
+
const ref = (0, import_react52.useRef)(null);
|
|
4134
|
+
(0, import_react52.useEffect)(() => {
|
|
4135
|
+
if (!hasEnterAnimation || !ref.current) return;
|
|
4136
|
+
const observer = new IntersectionObserver(
|
|
4137
|
+
(entries) => {
|
|
4138
|
+
entries.forEach((entry) => {
|
|
4139
|
+
if (entry.isIntersecting) {
|
|
4140
|
+
entry.target.classList.add("visible");
|
|
4141
|
+
observer.unobserve(entry.target);
|
|
4142
|
+
}
|
|
4143
|
+
});
|
|
4144
|
+
},
|
|
4145
|
+
{ threshold: 0.1 }
|
|
4146
|
+
);
|
|
4147
|
+
observer.observe(ref.current);
|
|
4148
|
+
return () => observer.disconnect();
|
|
4149
|
+
}, [hasEnterAnimation]);
|
|
4150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, { children: children && // enforce passing the ref to Wrapper
|
|
4151
|
+
//@ts-ignore
|
|
4152
|
+
import_react52.default.cloneElement(children, { ref }) });
|
|
4153
|
+
}
|
|
4154
|
+
var import_react52, import_jsx_runtime72;
|
|
4155
|
+
var init_EnterAnimationClient = __esm({
|
|
4156
|
+
"src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx"() {
|
|
4157
|
+
"use strict";
|
|
4158
|
+
"use client";
|
|
4159
|
+
import_react52 = __toESM(require("react"));
|
|
4160
|
+
import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4161
|
+
}
|
|
4162
|
+
});
|
|
4163
|
+
|
|
4114
4164
|
// src/index.ts
|
|
4115
4165
|
var index_exports = {};
|
|
4116
4166
|
__export(index_exports, {
|
|
@@ -4524,7 +4574,7 @@ var InputControl_default = InputControl2;
|
|
|
4524
4574
|
init_InputControlType();
|
|
4525
4575
|
|
|
4526
4576
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4527
|
-
var
|
|
4577
|
+
var import_react54 = __toESM(require("react"));
|
|
4528
4578
|
|
|
4529
4579
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
4530
4580
|
var import_react40 = __toESM(require("react"));
|
|
@@ -5297,7 +5347,7 @@ var WidgetNode = (props) => {
|
|
|
5297
5347
|
var WidgetNode_default = WidgetNode;
|
|
5298
5348
|
|
|
5299
5349
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
5300
|
-
var
|
|
5350
|
+
var import_react53 = __toESM(require("react"));
|
|
5301
5351
|
|
|
5302
5352
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
5303
5353
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
@@ -6343,11 +6393,14 @@ var DocumentNode = (props) => {
|
|
|
6343
6393
|
var DocumentNode_default = DocumentNode;
|
|
6344
6394
|
|
|
6345
6395
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
6346
|
-
var
|
|
6396
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6347
6397
|
var Pagination2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
6348
6398
|
var Slider2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
6349
6399
|
ssr: false
|
|
6350
6400
|
});
|
|
6401
|
+
var EnterAnimationClient2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_EnterAnimationClient(), EnterAnimationClient_exports)), {
|
|
6402
|
+
ssr: false
|
|
6403
|
+
});
|
|
6351
6404
|
function toCamelCase(str) {
|
|
6352
6405
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
6353
6406
|
}
|
|
@@ -6597,7 +6650,7 @@ var DivContainer = async (props) => {
|
|
|
6597
6650
|
response = await serviceClient.get(endpoint);
|
|
6598
6651
|
result = response?.result;
|
|
6599
6652
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
6600
|
-
return /* @__PURE__ */ (0,
|
|
6653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(NoDataFound_default, {});
|
|
6601
6654
|
}
|
|
6602
6655
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
6603
6656
|
childCollectionData = getNestedValue6(
|
|
@@ -6617,7 +6670,7 @@ var DivContainer = async (props) => {
|
|
|
6617
6670
|
}
|
|
6618
6671
|
const SelectedNode = NodeTypes2[node.type];
|
|
6619
6672
|
if (!SelectedNode) return null;
|
|
6620
|
-
return /* @__PURE__ */ (0,
|
|
6673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6621
6674
|
SelectedNode,
|
|
6622
6675
|
{
|
|
6623
6676
|
node,
|
|
@@ -6749,14 +6802,14 @@ var DivContainer = async (props) => {
|
|
|
6749
6802
|
props.node.bgClass,
|
|
6750
6803
|
noLinkColor && "no-link-color"
|
|
6751
6804
|
].filter(Boolean).join(" ");
|
|
6752
|
-
return /* @__PURE__ */ (0,
|
|
6753
|
-
/* @__PURE__ */ (0,
|
|
6805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_react53.default.Fragment, { children: [
|
|
6806
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6754
6807
|
"style",
|
|
6755
6808
|
{
|
|
6756
6809
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
6757
6810
|
}
|
|
6758
6811
|
),
|
|
6759
|
-
/* @__PURE__ */ (0,
|
|
6812
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(EnterAnimationClient2, { hasEnterAnimation: !!props.node.enterAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6760
6813
|
Wrapper,
|
|
6761
6814
|
{
|
|
6762
6815
|
id: guid,
|
|
@@ -6770,11 +6823,11 @@ var DivContainer = async (props) => {
|
|
|
6770
6823
|
item,
|
|
6771
6824
|
idx,
|
|
6772
6825
|
props.href ? void 0 : item?.links?.view
|
|
6773
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
6826
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
6774
6827
|
)
|
|
6775
6828
|
}
|
|
6776
|
-
) }),
|
|
6777
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
6829
|
+
) }) }),
|
|
6830
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6778
6831
|
Pagination2,
|
|
6779
6832
|
{
|
|
6780
6833
|
path: props.path,
|
|
@@ -6787,7 +6840,7 @@ var DivContainer = async (props) => {
|
|
|
6787
6840
|
var DivContainer_default = DivContainer;
|
|
6788
6841
|
|
|
6789
6842
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6790
|
-
var
|
|
6843
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6791
6844
|
var NodeTypes = {
|
|
6792
6845
|
["paragraph"]: ParagraphNode_default,
|
|
6793
6846
|
["heading"]: HeadingNode_default,
|
|
@@ -6824,14 +6877,14 @@ var PageBodyRenderer = (props) => {
|
|
|
6824
6877
|
}
|
|
6825
6878
|
return true;
|
|
6826
6879
|
};
|
|
6827
|
-
return /* @__PURE__ */ (0,
|
|
6880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
6828
6881
|
{
|
|
6829
6882
|
}
|
|
6830
6883
|
const SelectedNode = NodeTypes[node.type];
|
|
6831
6884
|
if (!shouldRenderNode(node)) {
|
|
6832
6885
|
return null;
|
|
6833
6886
|
}
|
|
6834
|
-
return /* @__PURE__ */ (0,
|
|
6887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6835
6888
|
SelectedNode,
|
|
6836
6889
|
{
|
|
6837
6890
|
node,
|
|
@@ -6847,7 +6900,7 @@ var PageBodyRenderer = (props) => {
|
|
|
6847
6900
|
device: props.device,
|
|
6848
6901
|
widgetRenderer: props.widgetRenderer
|
|
6849
6902
|
}
|
|
6850
|
-
) }) : /* @__PURE__ */ (0,
|
|
6903
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6851
6904
|
SelectedNode,
|
|
6852
6905
|
{
|
|
6853
6906
|
node,
|
|
@@ -6868,53 +6921,44 @@ var PageBodyRenderer = (props) => {
|
|
|
6868
6921
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
6869
6922
|
|
|
6870
6923
|
// src/components/Toast.tsx
|
|
6871
|
-
var
|
|
6924
|
+
var import_react55 = require("react");
|
|
6872
6925
|
init_ToastService();
|
|
6873
|
-
var
|
|
6926
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6874
6927
|
var Toast = () => {
|
|
6875
|
-
const [showToast, setShowToast] = (0,
|
|
6876
|
-
const [message, setMessage] = (0,
|
|
6877
|
-
const [messageType, setMessageType] = (0,
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
};
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
setTimeout(() => {
|
|
6891
|
-
setShowToast(false);
|
|
6892
|
-
}, 4e3);
|
|
6893
|
-
};
|
|
6894
|
-
ToastService_default.showWarning = function(message2) {
|
|
6895
|
-
setShowToast(true);
|
|
6896
|
-
setMessage(message2);
|
|
6897
|
-
setMessageType("warning");
|
|
6898
|
-
setTimeout(() => {
|
|
6899
|
-
setShowToast(false);
|
|
6900
|
-
}, 4e3);
|
|
6901
|
-
};
|
|
6902
|
-
ToastService_default.showInfo = function(message2) {
|
|
6928
|
+
const [showToast, setShowToast] = (0, import_react55.useState)(false);
|
|
6929
|
+
const [message, setMessage] = (0, import_react55.useState)("");
|
|
6930
|
+
const [messageType, setMessageType] = (0, import_react55.useState)("error");
|
|
6931
|
+
const timeoutRef = (0, import_react55.useRef)(null);
|
|
6932
|
+
const closeToast = (0, import_react55.useCallback)(() => {
|
|
6933
|
+
if (timeoutRef.current) {
|
|
6934
|
+
clearTimeout(timeoutRef.current);
|
|
6935
|
+
timeoutRef.current = null;
|
|
6936
|
+
}
|
|
6937
|
+
setShowToast(false);
|
|
6938
|
+
}, []);
|
|
6939
|
+
const showMessage = (0, import_react55.useCallback)((message2, messageType2) => {
|
|
6940
|
+
if (timeoutRef.current) {
|
|
6941
|
+
clearTimeout(timeoutRef.current);
|
|
6942
|
+
}
|
|
6903
6943
|
setShowToast(true);
|
|
6904
6944
|
setMessage(message2);
|
|
6905
|
-
setMessageType(
|
|
6906
|
-
setTimeout(() => {
|
|
6945
|
+
setMessageType(messageType2);
|
|
6946
|
+
timeoutRef.current = setTimeout(() => {
|
|
6907
6947
|
setShowToast(false);
|
|
6948
|
+
timeoutRef.current = null;
|
|
6908
6949
|
}, 4e3);
|
|
6909
|
-
};
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6950
|
+
}, []);
|
|
6951
|
+
(0, import_react55.useEffect)(() => {
|
|
6952
|
+
ToastService_default.initialize(showMessage, closeToast);
|
|
6953
|
+
return () => {
|
|
6954
|
+
closeToast();
|
|
6955
|
+
ToastService_default.initialize(() => {
|
|
6956
|
+
}, () => {
|
|
6957
|
+
});
|
|
6958
|
+
};
|
|
6959
|
+
}, [closeToast, showMessage]);
|
|
6960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_jsx_runtime75.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("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__ */ (0, import_jsx_runtime75.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
6961
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6918
6962
|
"span",
|
|
6919
6963
|
{
|
|
6920
6964
|
className: "font-medium text-inherit text-sm",
|
|
@@ -6922,7 +6966,7 @@ var Toast = () => {
|
|
|
6922
6966
|
children: message
|
|
6923
6967
|
}
|
|
6924
6968
|
),
|
|
6925
|
-
/* @__PURE__ */ (0,
|
|
6969
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6926
6970
|
"svg",
|
|
6927
6971
|
{
|
|
6928
6972
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6930,7 +6974,7 @@ var Toast = () => {
|
|
|
6930
6974
|
fill: "none",
|
|
6931
6975
|
viewBox: "0 0 24 24",
|
|
6932
6976
|
stroke: "currentColor",
|
|
6933
|
-
children: /* @__PURE__ */ (0,
|
|
6977
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
6934
6978
|
}
|
|
6935
6979
|
) })
|
|
6936
6980
|
] }) }) });
|
|
@@ -6957,7 +7001,7 @@ init_TimeInput();
|
|
|
6957
7001
|
// src/components/NavigationTabsV2.tsx
|
|
6958
7002
|
var import_link3 = __toESM(require("next/link"));
|
|
6959
7003
|
var import_navigation = require("next/navigation");
|
|
6960
|
-
var
|
|
7004
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6961
7005
|
function resolveRoutePlaceholders(route, params) {
|
|
6962
7006
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
6963
7007
|
const value = params[key];
|
|
@@ -6982,8 +7026,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
6982
7026
|
isActive: tab.isActive
|
|
6983
7027
|
})) || [];
|
|
6984
7028
|
if (mappedTabs.length === 0) return null;
|
|
6985
|
-
return /* @__PURE__ */ (0,
|
|
6986
|
-
return /* @__PURE__ */ (0,
|
|
7029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
7030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6987
7031
|
"div",
|
|
6988
7032
|
{
|
|
6989
7033
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -6996,14 +7040,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
6996
7040
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
6997
7041
|
|
|
6998
7042
|
// src/components/dataForm/DataList.tsx
|
|
6999
|
-
var
|
|
7043
|
+
var import_react58 = __toESM(require("react"));
|
|
7000
7044
|
var import_navigation2 = require("next/navigation");
|
|
7001
7045
|
|
|
7002
7046
|
// src/components/dataForm/NoContentView.tsx
|
|
7003
|
-
var
|
|
7004
|
-
var
|
|
7047
|
+
var import_react56 = __toESM(require("react"));
|
|
7048
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
7005
7049
|
var NoContentView = (props) => {
|
|
7006
|
-
return /* @__PURE__ */ (0,
|
|
7050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
7007
7051
|
};
|
|
7008
7052
|
var NoContentView_default = NoContentView;
|
|
7009
7053
|
|
|
@@ -7011,39 +7055,39 @@ var NoContentView_default = NoContentView;
|
|
|
7011
7055
|
init_InputControlType();
|
|
7012
7056
|
|
|
7013
7057
|
// src/components/dataForm/ContentView.tsx
|
|
7014
|
-
var
|
|
7015
|
-
var
|
|
7058
|
+
var import_react57 = __toESM(require("react"));
|
|
7059
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7016
7060
|
var ContentView = (props) => {
|
|
7017
|
-
return /* @__PURE__ */ (0,
|
|
7018
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
7019
|
-
/* @__PURE__ */ (0,
|
|
7020
|
-
/* @__PURE__ */ (0,
|
|
7021
|
-
/* @__PURE__ */ (0,
|
|
7022
|
-
/* @__PURE__ */ (0,
|
|
7023
|
-
/* @__PURE__ */ (0,
|
|
7061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react57.default.Fragment, { children: [
|
|
7062
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
7063
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
7064
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
7065
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ml-2", children: [
|
|
7066
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
7067
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
7024
7068
|
] })
|
|
7025
7069
|
] }),
|
|
7026
|
-
/* @__PURE__ */ (0,
|
|
7027
|
-
/* @__PURE__ */ (0,
|
|
7028
|
-
/* @__PURE__ */ (0,
|
|
7029
|
-
/* @__PURE__ */ (0,
|
|
7030
|
-
/* @__PURE__ */ (0,
|
|
7031
|
-
/* @__PURE__ */ (0,
|
|
7032
|
-
/* @__PURE__ */ (0,
|
|
7070
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
7071
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "animate-pulse", children: [
|
|
7072
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7073
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7074
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7075
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7076
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7033
7077
|
] }),
|
|
7034
|
-
/* @__PURE__ */ (0,
|
|
7035
|
-
/* @__PURE__ */ (0,
|
|
7036
|
-
/* @__PURE__ */ (0,
|
|
7037
|
-
/* @__PURE__ */ (0,
|
|
7038
|
-
/* @__PURE__ */ (0,
|
|
7039
|
-
/* @__PURE__ */ (0,
|
|
7078
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "animate-pulse", children: [
|
|
7079
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7080
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7081
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7082
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7083
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7040
7084
|
] }),
|
|
7041
|
-
/* @__PURE__ */ (0,
|
|
7042
|
-
/* @__PURE__ */ (0,
|
|
7043
|
-
/* @__PURE__ */ (0,
|
|
7044
|
-
/* @__PURE__ */ (0,
|
|
7045
|
-
/* @__PURE__ */ (0,
|
|
7046
|
-
/* @__PURE__ */ (0,
|
|
7085
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "animate-pulse", children: [
|
|
7086
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7087
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7088
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7089
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7090
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7047
7091
|
] })
|
|
7048
7092
|
] })
|
|
7049
7093
|
] }) }),
|
|
@@ -7103,7 +7147,7 @@ function FormReducer(state, action) {
|
|
|
7103
7147
|
var FormReducer_default = FormReducer;
|
|
7104
7148
|
|
|
7105
7149
|
// src/components/dataForm/DataList.tsx
|
|
7106
|
-
var
|
|
7150
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7107
7151
|
var DataList = (props) => {
|
|
7108
7152
|
const router = (0, import_navigation2.useRouter)();
|
|
7109
7153
|
let builder = new OdataBuilder(props.path);
|
|
@@ -7111,9 +7155,9 @@ var DataList = (props) => {
|
|
|
7111
7155
|
let activePageNumber = 0;
|
|
7112
7156
|
let pages = 0;
|
|
7113
7157
|
console.log(props.addLinkText);
|
|
7114
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
7115
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
7116
|
-
(0,
|
|
7158
|
+
const [isDataFound, setIsDataFound] = (0, import_react58.useState)(null);
|
|
7159
|
+
const [searchTerm, setSearchTerm] = (0, import_react58.useState)(props.query?.searchTerm ?? "");
|
|
7160
|
+
(0, import_react58.useEffect)(() => {
|
|
7117
7161
|
if (props?.dataset) {
|
|
7118
7162
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
7119
7163
|
setIsDataFound(true);
|
|
@@ -7122,7 +7166,7 @@ var DataList = (props) => {
|
|
|
7122
7166
|
}
|
|
7123
7167
|
}
|
|
7124
7168
|
}, [props.dataset]);
|
|
7125
|
-
(0,
|
|
7169
|
+
(0, import_react58.useEffect)(() => {
|
|
7126
7170
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
7127
7171
|
const filterQuery = props.query["$filter"];
|
|
7128
7172
|
props.filters.forEach((filter) => {
|
|
@@ -7141,7 +7185,7 @@ var DataList = (props) => {
|
|
|
7141
7185
|
if (path.includes(".")) {
|
|
7142
7186
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
7143
7187
|
} else if (Array.isArray(obj[path])) {
|
|
7144
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
7188
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: item }, index));
|
|
7145
7189
|
} else {
|
|
7146
7190
|
return obj[path];
|
|
7147
7191
|
}
|
|
@@ -7150,11 +7194,11 @@ var DataList = (props) => {
|
|
|
7150
7194
|
inputValues: {},
|
|
7151
7195
|
lastPropertyChanged: ""
|
|
7152
7196
|
};
|
|
7153
|
-
const [formState, dispatch] = (0,
|
|
7197
|
+
const [formState, dispatch] = (0, import_react58.useReducer)(FormReducer_default, initialState);
|
|
7154
7198
|
const getSearchableColumns = () => {
|
|
7155
7199
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
7156
7200
|
};
|
|
7157
|
-
const handleFilterChange = (0,
|
|
7201
|
+
const handleFilterChange = (0, import_react58.useCallback)(
|
|
7158
7202
|
(updatedValues) => {
|
|
7159
7203
|
dispatch({
|
|
7160
7204
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7185,7 +7229,7 @@ var DataList = (props) => {
|
|
|
7185
7229
|
},
|
|
7186
7230
|
[dispatch, props, router]
|
|
7187
7231
|
);
|
|
7188
|
-
(0,
|
|
7232
|
+
(0, import_react58.useEffect)(() => {
|
|
7189
7233
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
7190
7234
|
return;
|
|
7191
7235
|
}
|
|
@@ -7220,30 +7264,30 @@ var DataList = (props) => {
|
|
|
7220
7264
|
const renderPageNumbers = () => {
|
|
7221
7265
|
if (pages <= 10) {
|
|
7222
7266
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
7223
|
-
(page) => /* @__PURE__ */ (0,
|
|
7267
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react58.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7224
7268
|
Hyperlink,
|
|
7225
7269
|
{
|
|
7226
7270
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7227
7271
|
href: builder.getNewPageUrl(page),
|
|
7228
7272
|
children: page
|
|
7229
7273
|
}
|
|
7230
|
-
) : /* @__PURE__ */ (0,
|
|
7274
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7231
7275
|
);
|
|
7232
7276
|
} else {
|
|
7233
7277
|
const showFirstPages = activePageNumber <= 5;
|
|
7234
7278
|
const showLastPages = activePageNumber > pages - 5;
|
|
7235
7279
|
if (showFirstPages) {
|
|
7236
|
-
return /* @__PURE__ */ (0,
|
|
7237
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
7280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
7281
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react58.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7238
7282
|
Hyperlink,
|
|
7239
7283
|
{
|
|
7240
7284
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7241
7285
|
href: builder.getNewPageUrl(page),
|
|
7242
7286
|
children: page
|
|
7243
7287
|
}
|
|
7244
|
-
) : /* @__PURE__ */ (0,
|
|
7245
|
-
/* @__PURE__ */ (0,
|
|
7246
|
-
/* @__PURE__ */ (0,
|
|
7288
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7289
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7290
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7247
7291
|
Hyperlink,
|
|
7248
7292
|
{
|
|
7249
7293
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7251,7 +7295,7 @@ var DataList = (props) => {
|
|
|
7251
7295
|
children: pages - 1
|
|
7252
7296
|
}
|
|
7253
7297
|
),
|
|
7254
|
-
/* @__PURE__ */ (0,
|
|
7298
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7255
7299
|
Hyperlink,
|
|
7256
7300
|
{
|
|
7257
7301
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7259,7 +7303,7 @@ var DataList = (props) => {
|
|
|
7259
7303
|
children: pages
|
|
7260
7304
|
}
|
|
7261
7305
|
),
|
|
7262
|
-
/* @__PURE__ */ (0,
|
|
7306
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7263
7307
|
"select",
|
|
7264
7308
|
{
|
|
7265
7309
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7271,18 +7315,18 @@ var DataList = (props) => {
|
|
|
7271
7315
|
}
|
|
7272
7316
|
},
|
|
7273
7317
|
children: [
|
|
7274
|
-
/* @__PURE__ */ (0,
|
|
7318
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
7275
7319
|
Array.from(
|
|
7276
7320
|
{ length: Math.max(0, pages - 10) },
|
|
7277
7321
|
(_, index) => index + 9
|
|
7278
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7322
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("option", { value: page, children: page }, page))
|
|
7279
7323
|
]
|
|
7280
7324
|
}
|
|
7281
7325
|
) })
|
|
7282
7326
|
] });
|
|
7283
7327
|
} else if (showLastPages) {
|
|
7284
|
-
return /* @__PURE__ */ (0,
|
|
7285
|
-
/* @__PURE__ */ (0,
|
|
7328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
7329
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7286
7330
|
Hyperlink,
|
|
7287
7331
|
{
|
|
7288
7332
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7290,7 +7334,7 @@ var DataList = (props) => {
|
|
|
7290
7334
|
children: "1"
|
|
7291
7335
|
}
|
|
7292
7336
|
),
|
|
7293
|
-
/* @__PURE__ */ (0,
|
|
7337
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7294
7338
|
Hyperlink,
|
|
7295
7339
|
{
|
|
7296
7340
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7298,21 +7342,21 @@ var DataList = (props) => {
|
|
|
7298
7342
|
children: "2"
|
|
7299
7343
|
}
|
|
7300
7344
|
),
|
|
7301
|
-
/* @__PURE__ */ (0,
|
|
7345
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7302
7346
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
7303
|
-
(page) => /* @__PURE__ */ (0,
|
|
7347
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react58.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7304
7348
|
Hyperlink,
|
|
7305
7349
|
{
|
|
7306
7350
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7307
7351
|
href: builder.getNewPageUrl(page),
|
|
7308
7352
|
children: page
|
|
7309
7353
|
}
|
|
7310
|
-
) : /* @__PURE__ */ (0,
|
|
7354
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7311
7355
|
)
|
|
7312
7356
|
] });
|
|
7313
7357
|
} else {
|
|
7314
|
-
return /* @__PURE__ */ (0,
|
|
7315
|
-
/* @__PURE__ */ (0,
|
|
7358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
7359
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7316
7360
|
Hyperlink,
|
|
7317
7361
|
{
|
|
7318
7362
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7320,7 +7364,7 @@ var DataList = (props) => {
|
|
|
7320
7364
|
children: "1"
|
|
7321
7365
|
}
|
|
7322
7366
|
),
|
|
7323
|
-
/* @__PURE__ */ (0,
|
|
7367
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7324
7368
|
Hyperlink,
|
|
7325
7369
|
{
|
|
7326
7370
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7328,20 +7372,20 @@ var DataList = (props) => {
|
|
|
7328
7372
|
children: "2"
|
|
7329
7373
|
}
|
|
7330
7374
|
),
|
|
7331
|
-
/* @__PURE__ */ (0,
|
|
7375
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7332
7376
|
Array.from(
|
|
7333
7377
|
{ length: 5 },
|
|
7334
7378
|
(_, index) => activePageNumber - 2 + index
|
|
7335
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7379
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react58.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7336
7380
|
Hyperlink,
|
|
7337
7381
|
{
|
|
7338
7382
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7339
7383
|
href: builder.getNewPageUrl(page),
|
|
7340
7384
|
children: page
|
|
7341
7385
|
}
|
|
7342
|
-
) : /* @__PURE__ */ (0,
|
|
7343
|
-
/* @__PURE__ */ (0,
|
|
7344
|
-
/* @__PURE__ */ (0,
|
|
7386
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7387
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7388
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7345
7389
|
Hyperlink,
|
|
7346
7390
|
{
|
|
7347
7391
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7349,7 +7393,7 @@ var DataList = (props) => {
|
|
|
7349
7393
|
children: pages - 1
|
|
7350
7394
|
}
|
|
7351
7395
|
),
|
|
7352
|
-
/* @__PURE__ */ (0,
|
|
7396
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7353
7397
|
Hyperlink,
|
|
7354
7398
|
{
|
|
7355
7399
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7357,7 +7401,7 @@ var DataList = (props) => {
|
|
|
7357
7401
|
children: pages
|
|
7358
7402
|
}
|
|
7359
7403
|
),
|
|
7360
|
-
/* @__PURE__ */ (0,
|
|
7404
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7361
7405
|
"select",
|
|
7362
7406
|
{
|
|
7363
7407
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7369,8 +7413,8 @@ var DataList = (props) => {
|
|
|
7369
7413
|
}
|
|
7370
7414
|
},
|
|
7371
7415
|
children: [
|
|
7372
|
-
/* @__PURE__ */ (0,
|
|
7373
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
7416
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("option", { value: "", children: "Jump to" }),
|
|
7417
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("option", { value: page, children: page }, page))
|
|
7374
7418
|
]
|
|
7375
7419
|
}
|
|
7376
7420
|
) })
|
|
@@ -7378,16 +7422,16 @@ var DataList = (props) => {
|
|
|
7378
7422
|
}
|
|
7379
7423
|
}
|
|
7380
7424
|
};
|
|
7381
|
-
return /* @__PURE__ */ (0,
|
|
7382
|
-
/* @__PURE__ */ (0,
|
|
7383
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react58.default.Fragment, { children: [
|
|
7426
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(ContentView_default, { isDataFound, children: [
|
|
7427
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7384
7428
|
"div",
|
|
7385
7429
|
{
|
|
7386
7430
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
7387
7431
|
children: [
|
|
7388
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7389
|
-
/* @__PURE__ */ (0,
|
|
7390
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7432
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", {}),
|
|
7433
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7434
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7391
7435
|
InputControl_default,
|
|
7392
7436
|
{
|
|
7393
7437
|
name: "Search_input",
|
|
@@ -7399,7 +7443,7 @@ var DataList = (props) => {
|
|
|
7399
7443
|
}
|
|
7400
7444
|
}
|
|
7401
7445
|
),
|
|
7402
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7446
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7403
7447
|
InputControl_default,
|
|
7404
7448
|
{
|
|
7405
7449
|
name: filter.name,
|
|
@@ -7414,15 +7458,15 @@ var DataList = (props) => {
|
|
|
7414
7458
|
},
|
|
7415
7459
|
filter.name
|
|
7416
7460
|
)),
|
|
7417
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7461
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7418
7462
|
Hyperlink,
|
|
7419
7463
|
{
|
|
7420
7464
|
className: "gap-1",
|
|
7421
7465
|
linkType: "Primary" /* Solid */,
|
|
7422
7466
|
href: props.addLinkHref,
|
|
7423
7467
|
children: [
|
|
7424
|
-
/* @__PURE__ */ (0,
|
|
7425
|
-
/* @__PURE__ */ (0,
|
|
7468
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7469
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7426
7470
|
]
|
|
7427
7471
|
}
|
|
7428
7472
|
)
|
|
@@ -7430,8 +7474,8 @@ var DataList = (props) => {
|
|
|
7430
7474
|
]
|
|
7431
7475
|
}
|
|
7432
7476
|
),
|
|
7433
|
-
/* @__PURE__ */ (0,
|
|
7434
|
-
/* @__PURE__ */ (0,
|
|
7477
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
7478
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7435
7479
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7436
7480
|
let icon = "chevronUpDown";
|
|
7437
7481
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7441,18 +7485,18 @@ var DataList = (props) => {
|
|
|
7441
7485
|
icon = "chevronUp";
|
|
7442
7486
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7443
7487
|
}
|
|
7444
|
-
return /* @__PURE__ */ (0,
|
|
7488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7445
7489
|
"th",
|
|
7446
7490
|
{
|
|
7447
7491
|
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" : ""),
|
|
7448
|
-
children: /* @__PURE__ */ (0,
|
|
7492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7449
7493
|
Hyperlink,
|
|
7450
7494
|
{
|
|
7451
7495
|
href: column.enableSorting ? url : void 0,
|
|
7452
7496
|
className: "!text-neutral-contrast ",
|
|
7453
|
-
children: /* @__PURE__ */ (0,
|
|
7454
|
-
/* @__PURE__ */ (0,
|
|
7455
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7498
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "text-black", children: column.label }),
|
|
7499
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7456
7500
|
] })
|
|
7457
7501
|
}
|
|
7458
7502
|
)
|
|
@@ -7460,24 +7504,24 @@ var DataList = (props) => {
|
|
|
7460
7504
|
column.name
|
|
7461
7505
|
);
|
|
7462
7506
|
}) }) }),
|
|
7463
|
-
/* @__PURE__ */ (0,
|
|
7507
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
7464
7508
|
let validityClass = "";
|
|
7465
7509
|
console.log("dataitem", dataitem);
|
|
7466
7510
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
7467
7511
|
validityClass = "bg-alert-200";
|
|
7468
7512
|
}
|
|
7469
|
-
return /* @__PURE__ */ (0,
|
|
7513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
7470
7514
|
console.log("column", column);
|
|
7471
|
-
return /* @__PURE__ */ (0,
|
|
7515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react58.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7472
7516
|
"td",
|
|
7473
7517
|
{
|
|
7474
7518
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
7475
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
7519
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7476
7520
|
Hyperlink,
|
|
7477
7521
|
{
|
|
7478
7522
|
className: "",
|
|
7479
7523
|
href: `https://${dataitem[column.name]}`,
|
|
7480
|
-
children: /* @__PURE__ */ (0,
|
|
7524
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7481
7525
|
ViewControl_default,
|
|
7482
7526
|
{
|
|
7483
7527
|
controlType: column.controlType,
|
|
@@ -7490,11 +7534,11 @@ var DataList = (props) => {
|
|
|
7490
7534
|
}
|
|
7491
7535
|
)
|
|
7492
7536
|
}
|
|
7493
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
7537
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7494
7538
|
Hyperlink,
|
|
7495
7539
|
{
|
|
7496
7540
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
7497
|
-
children: /* @__PURE__ */ (0,
|
|
7541
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7498
7542
|
ViewControl_default,
|
|
7499
7543
|
{
|
|
7500
7544
|
controlType: column.controlType,
|
|
@@ -7504,7 +7548,7 @@ var DataList = (props) => {
|
|
|
7504
7548
|
}
|
|
7505
7549
|
)
|
|
7506
7550
|
}
|
|
7507
|
-
) : /* @__PURE__ */ (0,
|
|
7551
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7508
7552
|
ViewControl_default,
|
|
7509
7553
|
{
|
|
7510
7554
|
controlType: column.controlType,
|
|
@@ -7518,10 +7562,10 @@ var DataList = (props) => {
|
|
|
7518
7562
|
}) }, index);
|
|
7519
7563
|
}) })
|
|
7520
7564
|
] }) }),
|
|
7521
|
-
/* @__PURE__ */ (0,
|
|
7522
|
-
/* @__PURE__ */ (0,
|
|
7523
|
-
/* @__PURE__ */ (0,
|
|
7524
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
7565
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
7566
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "text-gray-700", children: label }),
|
|
7567
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
7568
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7525
7569
|
Hyperlink,
|
|
7526
7570
|
{
|
|
7527
7571
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7529,9 +7573,9 @@ var DataList = (props) => {
|
|
|
7529
7573
|
children: "Prev"
|
|
7530
7574
|
}
|
|
7531
7575
|
),
|
|
7532
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
7576
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("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" }),
|
|
7533
7577
|
renderPageNumbers(),
|
|
7534
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
7578
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7535
7579
|
Hyperlink,
|
|
7536
7580
|
{
|
|
7537
7581
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7539,19 +7583,19 @@ var DataList = (props) => {
|
|
|
7539
7583
|
children: "Next"
|
|
7540
7584
|
}
|
|
7541
7585
|
),
|
|
7542
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
7586
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
7543
7587
|
] })
|
|
7544
7588
|
] }) })
|
|
7545
7589
|
] }),
|
|
7546
|
-
/* @__PURE__ */ (0,
|
|
7547
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7590
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
7591
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7548
7592
|
"div",
|
|
7549
7593
|
{
|
|
7550
7594
|
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`,
|
|
7551
7595
|
children: [
|
|
7552
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7553
|
-
/* @__PURE__ */ (0,
|
|
7554
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7596
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", {}),
|
|
7597
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7598
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7555
7599
|
InputControl_default,
|
|
7556
7600
|
{
|
|
7557
7601
|
name: "Search_input",
|
|
@@ -7563,7 +7607,7 @@ var DataList = (props) => {
|
|
|
7563
7607
|
}
|
|
7564
7608
|
}
|
|
7565
7609
|
),
|
|
7566
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7610
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7567
7611
|
InputControl_default,
|
|
7568
7612
|
{
|
|
7569
7613
|
name: filter.name,
|
|
@@ -7578,15 +7622,15 @@ var DataList = (props) => {
|
|
|
7578
7622
|
},
|
|
7579
7623
|
filter.name
|
|
7580
7624
|
)),
|
|
7581
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7625
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7582
7626
|
Hyperlink,
|
|
7583
7627
|
{
|
|
7584
7628
|
className: "gap-1",
|
|
7585
7629
|
linkType: "Primary" /* Solid */,
|
|
7586
7630
|
href: props.addLinkHref,
|
|
7587
7631
|
children: [
|
|
7588
|
-
/* @__PURE__ */ (0,
|
|
7589
|
-
/* @__PURE__ */ (0,
|
|
7632
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7633
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7590
7634
|
]
|
|
7591
7635
|
}
|
|
7592
7636
|
)
|
|
@@ -7594,8 +7638,8 @@ var DataList = (props) => {
|
|
|
7594
7638
|
]
|
|
7595
7639
|
}
|
|
7596
7640
|
),
|
|
7597
|
-
/* @__PURE__ */ (0,
|
|
7598
|
-
/* @__PURE__ */ (0,
|
|
7641
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
7642
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7599
7643
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7600
7644
|
let icon = "chevronUpDown";
|
|
7601
7645
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7605,18 +7649,18 @@ var DataList = (props) => {
|
|
|
7605
7649
|
icon = "chevronUp";
|
|
7606
7650
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7607
7651
|
}
|
|
7608
|
-
return /* @__PURE__ */ (0,
|
|
7652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7609
7653
|
"th",
|
|
7610
7654
|
{
|
|
7611
7655
|
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" : ""),
|
|
7612
|
-
children: /* @__PURE__ */ (0,
|
|
7656
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7613
7657
|
Hyperlink,
|
|
7614
7658
|
{
|
|
7615
7659
|
href: column.enableSorting ? url : void 0,
|
|
7616
7660
|
className: "text-body-950",
|
|
7617
|
-
children: /* @__PURE__ */ (0,
|
|
7618
|
-
/* @__PURE__ */ (0,
|
|
7619
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7661
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7662
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: column.label }),
|
|
7663
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7620
7664
|
] })
|
|
7621
7665
|
}
|
|
7622
7666
|
)
|
|
@@ -7624,7 +7668,7 @@ var DataList = (props) => {
|
|
|
7624
7668
|
column.name
|
|
7625
7669
|
);
|
|
7626
7670
|
}) }) }) }) }),
|
|
7627
|
-
/* @__PURE__ */ (0,
|
|
7671
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
7628
7672
|
] })
|
|
7629
7673
|
] })
|
|
7630
7674
|
] });
|
|
@@ -7632,12 +7676,12 @@ var DataList = (props) => {
|
|
|
7632
7676
|
var DataList_default = DataList;
|
|
7633
7677
|
|
|
7634
7678
|
// src/components/dataForm/DataListRenderer.tsx
|
|
7635
|
-
var
|
|
7679
|
+
var import_react59 = __toESM(require("react"));
|
|
7636
7680
|
init_ServiceClient();
|
|
7637
7681
|
init_OdataBuilder();
|
|
7638
7682
|
init_SelectWithSearchInput();
|
|
7639
7683
|
var import_navigation3 = require("next/navigation");
|
|
7640
|
-
var
|
|
7684
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7641
7685
|
var viewControlMap = {
|
|
7642
7686
|
number: ViewControlTypes.number,
|
|
7643
7687
|
lineText: ViewControlTypes.lineText,
|
|
@@ -7692,14 +7736,14 @@ var DataListRenderer = ({
|
|
|
7692
7736
|
widgetProps
|
|
7693
7737
|
}) => {
|
|
7694
7738
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
7695
|
-
const [columns, setColumns] = (0,
|
|
7696
|
-
const [dataset, setDataset] = (0,
|
|
7697
|
-
const [filter, setFilters] = (0,
|
|
7698
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
7699
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
7700
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
7739
|
+
const [columns, setColumns] = (0, import_react59.useState)([]);
|
|
7740
|
+
const [dataset, setDataset] = (0, import_react59.useState)();
|
|
7741
|
+
const [filter, setFilters] = (0, import_react59.useState)([]);
|
|
7742
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react59.useState)("");
|
|
7743
|
+
const [addLinkText, setAddLinkText] = (0, import_react59.useState)("");
|
|
7744
|
+
const [serviceRoute, setServiceRoute] = (0, import_react59.useState)("");
|
|
7701
7745
|
const pathname = (0, import_navigation3.usePathname)();
|
|
7702
|
-
(0,
|
|
7746
|
+
(0, import_react59.useEffect)(() => {
|
|
7703
7747
|
if (!formDefinition) return;
|
|
7704
7748
|
setColumns(mapApiToColumns(formDefinition));
|
|
7705
7749
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -7712,7 +7756,7 @@ var DataListRenderer = ({
|
|
|
7712
7756
|
setAddLinkHref(resolvedAddLinkHref);
|
|
7713
7757
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
7714
7758
|
}, [formDefinition, params]);
|
|
7715
|
-
(0,
|
|
7759
|
+
(0, import_react59.useEffect)(() => {
|
|
7716
7760
|
const fetchData = async () => {
|
|
7717
7761
|
if (!serviceRoute) return;
|
|
7718
7762
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -7732,15 +7776,15 @@ var DataListRenderer = ({
|
|
|
7732
7776
|
isActive: landingPageUrl === pathname
|
|
7733
7777
|
};
|
|
7734
7778
|
});
|
|
7735
|
-
return /* @__PURE__ */ (0,
|
|
7736
|
-
resolvedTabs.length > 0 && /* @__PURE__ */ (0,
|
|
7779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_react59.default.Fragment, { children: [
|
|
7780
|
+
resolvedTabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7737
7781
|
NavigationTabsV2_default,
|
|
7738
7782
|
{
|
|
7739
7783
|
tabs: resolvedTabs,
|
|
7740
7784
|
params: widgetProps?.params ?? params
|
|
7741
7785
|
}
|
|
7742
7786
|
),
|
|
7743
|
-
/* @__PURE__ */ (0,
|
|
7787
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7744
7788
|
DataList_default,
|
|
7745
7789
|
{
|
|
7746
7790
|
addLinkHref,
|
|
@@ -7762,13 +7806,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
7762
7806
|
init_InputControlType();
|
|
7763
7807
|
|
|
7764
7808
|
// src/components/dataForm/DataForm.tsx
|
|
7765
|
-
var
|
|
7809
|
+
var import_react61 = __toESM(require("react"));
|
|
7766
7810
|
init_Icon();
|
|
7767
7811
|
init_Button();
|
|
7768
7812
|
init_StyleTypes();
|
|
7769
7813
|
|
|
7770
7814
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7771
|
-
var
|
|
7815
|
+
var import_react60 = __toESM(require("react"));
|
|
7772
7816
|
|
|
7773
7817
|
// src/components/dataForm/StyleTypes.tsx
|
|
7774
7818
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -7795,7 +7839,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
7795
7839
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
7796
7840
|
|
|
7797
7841
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7798
|
-
var
|
|
7842
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7799
7843
|
var DataFormChildSection = (props) => {
|
|
7800
7844
|
const { section } = props;
|
|
7801
7845
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -7807,7 +7851,7 @@ var DataFormChildSection = (props) => {
|
|
|
7807
7851
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
7808
7852
|
};
|
|
7809
7853
|
const childItemsToRender = getChildItemsForRendering();
|
|
7810
|
-
const handleChildInputChange = (0,
|
|
7854
|
+
const handleChildInputChange = (0, import_react60.useCallback)(
|
|
7811
7855
|
(updatedValues) => {
|
|
7812
7856
|
if (isOneToOne) {
|
|
7813
7857
|
props.callback({
|
|
@@ -7834,7 +7878,7 @@ var DataFormChildSection = (props) => {
|
|
|
7834
7878
|
},
|
|
7835
7879
|
[props, isOneToOne, childItemsToRender]
|
|
7836
7880
|
);
|
|
7837
|
-
const onAddRow = (0,
|
|
7881
|
+
const onAddRow = (0, import_react60.useCallback)(() => {
|
|
7838
7882
|
props.callback({
|
|
7839
7883
|
sectionName: props.section.name,
|
|
7840
7884
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -7843,7 +7887,7 @@ var DataFormChildSection = (props) => {
|
|
|
7843
7887
|
rowIndex: -1
|
|
7844
7888
|
});
|
|
7845
7889
|
}, [props]);
|
|
7846
|
-
const onDeleteRow = (0,
|
|
7890
|
+
const onDeleteRow = (0, import_react60.useCallback)(
|
|
7847
7891
|
(filteredIndex) => {
|
|
7848
7892
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
7849
7893
|
if (visibleItem) {
|
|
@@ -7863,14 +7907,14 @@ var DataFormChildSection = (props) => {
|
|
|
7863
7907
|
childItemsToRender,
|
|
7864
7908
|
allChildItems: childItems
|
|
7865
7909
|
});
|
|
7866
|
-
return /* @__PURE__ */ (0,
|
|
7867
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
7868
|
-
/* @__PURE__ */ (0,
|
|
7869
|
-
/* @__PURE__ */ (0,
|
|
7870
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
7871
|
-
return /* @__PURE__ */ (0,
|
|
7910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
7911
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
7912
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
7913
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
7914
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
7915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("tr", { className: "", children: [
|
|
7872
7916
|
sectionRow.elements.map((field, index) => {
|
|
7873
|
-
return /* @__PURE__ */ (0,
|
|
7917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7874
7918
|
"th",
|
|
7875
7919
|
{
|
|
7876
7920
|
className: "py-3 font-normal text-left",
|
|
@@ -7879,21 +7923,21 @@ var DataFormChildSection = (props) => {
|
|
|
7879
7923
|
field.name
|
|
7880
7924
|
);
|
|
7881
7925
|
}),
|
|
7882
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7926
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
7883
7927
|
] }, sectionRowIndex);
|
|
7884
7928
|
}) }),
|
|
7885
|
-
/* @__PURE__ */ (0,
|
|
7929
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
7886
7930
|
const { item, originalIndex } = visibleItem;
|
|
7887
7931
|
const rowKey = originalIndex;
|
|
7888
|
-
return /* @__PURE__ */ (0,
|
|
7932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: section.sectionRows.map(
|
|
7889
7933
|
(sectionRow, sectionRowIndex) => {
|
|
7890
|
-
return /* @__PURE__ */ (0,
|
|
7934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7891
7935
|
"tr",
|
|
7892
7936
|
{
|
|
7893
7937
|
className: "",
|
|
7894
7938
|
children: [
|
|
7895
7939
|
sectionRow.elements.map((field, index) => {
|
|
7896
|
-
return /* @__PURE__ */ (0,
|
|
7940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7897
7941
|
InputControl_default,
|
|
7898
7942
|
{
|
|
7899
7943
|
index: filteredIndex,
|
|
@@ -7913,7 +7957,7 @@ var DataFormChildSection = (props) => {
|
|
|
7913
7957
|
}
|
|
7914
7958
|
) }) }) }, field.name);
|
|
7915
7959
|
}),
|
|
7916
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7960
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7917
7961
|
ClientButton_default,
|
|
7918
7962
|
{
|
|
7919
7963
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -7922,7 +7966,7 @@ var DataFormChildSection = (props) => {
|
|
|
7922
7966
|
},
|
|
7923
7967
|
dataRole: "delete",
|
|
7924
7968
|
tabIndex: -1,
|
|
7925
|
-
children: /* @__PURE__ */ (0,
|
|
7969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7926
7970
|
Icon_default,
|
|
7927
7971
|
{
|
|
7928
7972
|
className: "w-4 h-4",
|
|
@@ -7939,7 +7983,7 @@ var DataFormChildSection = (props) => {
|
|
|
7939
7983
|
) }, rowKey);
|
|
7940
7984
|
}) })
|
|
7941
7985
|
] }) }),
|
|
7942
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7986
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7943
7987
|
ClientButton_default,
|
|
7944
7988
|
{
|
|
7945
7989
|
ButtonType: "Link" /* Link */,
|
|
@@ -7954,9 +7998,9 @@ var DataFormChildSection = (props) => {
|
|
|
7954
7998
|
var DataFormChildSection_default = DataFormChildSection;
|
|
7955
7999
|
|
|
7956
8000
|
// src/components/dataForm/DataForm.tsx
|
|
7957
|
-
var
|
|
8001
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7958
8002
|
var DataForm = (props) => {
|
|
7959
|
-
const formRef = (0,
|
|
8003
|
+
const formRef = (0, import_react61.useRef)(null);
|
|
7960
8004
|
console.log(props.dataItem, "dssads");
|
|
7961
8005
|
const initialState = {
|
|
7962
8006
|
inputValues: {},
|
|
@@ -7965,9 +8009,9 @@ var DataForm = (props) => {
|
|
|
7965
8009
|
const childInitialState = {
|
|
7966
8010
|
inputValues: []
|
|
7967
8011
|
};
|
|
7968
|
-
const [formState, dispatch] = (0,
|
|
8012
|
+
const [formState, dispatch] = (0, import_react61.useReducer)(FormReducer_default, initialState);
|
|
7969
8013
|
console.log(props.sections, "sections");
|
|
7970
|
-
const clearHiddenChildSections = (0,
|
|
8014
|
+
const clearHiddenChildSections = (0, import_react61.useCallback)(
|
|
7971
8015
|
(changedProperty, newValues) => {
|
|
7972
8016
|
if (!props.sections) return;
|
|
7973
8017
|
const allChildSections = [];
|
|
@@ -8005,7 +8049,7 @@ var DataForm = (props) => {
|
|
|
8005
8049
|
},
|
|
8006
8050
|
[props.sections, formState.inputValues]
|
|
8007
8051
|
);
|
|
8008
|
-
const handleInputChange = (0,
|
|
8052
|
+
const handleInputChange = (0, import_react61.useCallback)(
|
|
8009
8053
|
async (updatedValues) => {
|
|
8010
8054
|
dispatch({
|
|
8011
8055
|
type: FORM_INPUT_UPDATE,
|
|
@@ -8020,7 +8064,7 @@ var DataForm = (props) => {
|
|
|
8020
8064
|
},
|
|
8021
8065
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
8022
8066
|
);
|
|
8023
|
-
const fetchData = (0,
|
|
8067
|
+
const fetchData = (0, import_react61.useCallback)(async () => {
|
|
8024
8068
|
if (!props.rules) return;
|
|
8025
8069
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
8026
8070
|
return;
|
|
@@ -8051,7 +8095,7 @@ var DataForm = (props) => {
|
|
|
8051
8095
|
console.error("Error fetching data:", error);
|
|
8052
8096
|
}
|
|
8053
8097
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
8054
|
-
(0,
|
|
8098
|
+
(0, import_react61.useEffect)(() => {
|
|
8055
8099
|
fetchData();
|
|
8056
8100
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
8057
8101
|
function replacePlaceholders(template, context, params) {
|
|
@@ -8071,7 +8115,7 @@ var DataForm = (props) => {
|
|
|
8071
8115
|
}
|
|
8072
8116
|
);
|
|
8073
8117
|
}
|
|
8074
|
-
const handleChildSectionChangeCallback = (0,
|
|
8118
|
+
const handleChildSectionChangeCallback = (0, import_react61.useCallback)(
|
|
8075
8119
|
(params) => {
|
|
8076
8120
|
dispatch({
|
|
8077
8121
|
type: params.actionType,
|
|
@@ -8116,7 +8160,7 @@ var DataForm = (props) => {
|
|
|
8116
8160
|
});
|
|
8117
8161
|
return cloned;
|
|
8118
8162
|
}
|
|
8119
|
-
const onClick = (0,
|
|
8163
|
+
const onClick = (0, import_react61.useCallback)(async () => {
|
|
8120
8164
|
if (props.onClick) {
|
|
8121
8165
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
8122
8166
|
const normalizedValues = normalizeChildSections(
|
|
@@ -8132,21 +8176,21 @@ var DataForm = (props) => {
|
|
|
8132
8176
|
return { isSuccessful: true };
|
|
8133
8177
|
}
|
|
8134
8178
|
}, [formState, props]);
|
|
8135
|
-
const handleAdditionalOnClick = (0,
|
|
8179
|
+
const handleAdditionalOnClick = (0, import_react61.useCallback)(async () => {
|
|
8136
8180
|
if (props.additionalActions?.onClick) {
|
|
8137
8181
|
return await props.additionalActions.onClick(formState);
|
|
8138
8182
|
} else {
|
|
8139
8183
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
8140
8184
|
}
|
|
8141
8185
|
}, [formState, props]);
|
|
8142
|
-
const onDelete = (0,
|
|
8186
|
+
const onDelete = (0, import_react61.useCallback)(async () => {
|
|
8143
8187
|
if (props.onDelete) {
|
|
8144
8188
|
return await props.onDelete(formState);
|
|
8145
8189
|
} else {
|
|
8146
8190
|
return { isSuccessful: true };
|
|
8147
8191
|
}
|
|
8148
8192
|
}, [formState, props]);
|
|
8149
|
-
(0,
|
|
8193
|
+
(0, import_react61.useEffect)(() => {
|
|
8150
8194
|
if (props.dataItem) {
|
|
8151
8195
|
dispatch({
|
|
8152
8196
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -8174,19 +8218,19 @@ var DataForm = (props) => {
|
|
|
8174
8218
|
return false;
|
|
8175
8219
|
}
|
|
8176
8220
|
}
|
|
8177
|
-
return /* @__PURE__ */ (0,
|
|
8178
|
-
props.title && /* @__PURE__ */ (0,
|
|
8221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react61.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8222
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("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__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8179
8223
|
"div",
|
|
8180
8224
|
{
|
|
8181
8225
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
8182
8226
|
onClick: () => window.history.back(),
|
|
8183
8227
|
children: [
|
|
8184
|
-
/* @__PURE__ */ (0,
|
|
8185
|
-
/* @__PURE__ */ (0,
|
|
8228
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
8229
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
8186
8230
|
]
|
|
8187
8231
|
}
|
|
8188
8232
|
) }),
|
|
8189
|
-
/* @__PURE__ */ (0,
|
|
8233
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8190
8234
|
"form",
|
|
8191
8235
|
{
|
|
8192
8236
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -8207,8 +8251,8 @@ var DataForm = (props) => {
|
|
|
8207
8251
|
}
|
|
8208
8252
|
}
|
|
8209
8253
|
},
|
|
8210
|
-
children: /* @__PURE__ */ (0,
|
|
8211
|
-
return /* @__PURE__ */ (0,
|
|
8254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
8255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react61.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
8212
8256
|
section.sectionRows?.map(
|
|
8213
8257
|
(sectionRow, sectionRowIndex) => {
|
|
8214
8258
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -8219,14 +8263,14 @@ var DataForm = (props) => {
|
|
|
8219
8263
|
sectionRow.visible
|
|
8220
8264
|
);
|
|
8221
8265
|
}
|
|
8222
|
-
return /* @__PURE__ */ (0,
|
|
8223
|
-
return /* @__PURE__ */ (0,
|
|
8266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react61.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
8267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8224
8268
|
"div",
|
|
8225
8269
|
{
|
|
8226
8270
|
className: sectionRow.grow ? "grow" : "",
|
|
8227
8271
|
children: [
|
|
8228
|
-
/* @__PURE__ */ (0,
|
|
8229
|
-
/* @__PURE__ */ (0,
|
|
8272
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: field.controlType }),
|
|
8273
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8230
8274
|
InputControl_default,
|
|
8231
8275
|
{
|
|
8232
8276
|
name: field.name,
|
|
@@ -8256,12 +8300,12 @@ var DataForm = (props) => {
|
|
|
8256
8300
|
}) }) }, sectionRowIndex);
|
|
8257
8301
|
}
|
|
8258
8302
|
),
|
|
8259
|
-
/* @__PURE__ */ (0,
|
|
8303
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: section.childSections?.map(
|
|
8260
8304
|
(childSection, childSectionIndex) => {
|
|
8261
|
-
return /* @__PURE__ */ (0,
|
|
8305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
8262
8306
|
formState.inputValues,
|
|
8263
8307
|
childSection.visible
|
|
8264
|
-
) && /* @__PURE__ */ (0,
|
|
8308
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8265
8309
|
DataFormChildSection_default,
|
|
8266
8310
|
{
|
|
8267
8311
|
section: childSection,
|
|
@@ -8276,8 +8320,8 @@ var DataForm = (props) => {
|
|
|
8276
8320
|
}) })
|
|
8277
8321
|
}
|
|
8278
8322
|
),
|
|
8279
|
-
/* @__PURE__ */ (0,
|
|
8280
|
-
/* @__PURE__ */ (0,
|
|
8323
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
8324
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8281
8325
|
Button_default,
|
|
8282
8326
|
{
|
|
8283
8327
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8285,7 +8329,7 @@ var DataForm = (props) => {
|
|
|
8285
8329
|
children: props.additionalActions.title
|
|
8286
8330
|
}
|
|
8287
8331
|
) }),
|
|
8288
|
-
/* @__PURE__ */ (0,
|
|
8332
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8289
8333
|
Button_default,
|
|
8290
8334
|
{
|
|
8291
8335
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8296,7 +8340,7 @@ var DataForm = (props) => {
|
|
|
8296
8340
|
children: "Delete"
|
|
8297
8341
|
}
|
|
8298
8342
|
) }),
|
|
8299
|
-
/* @__PURE__ */ (0,
|
|
8343
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8300
8344
|
Button_default,
|
|
8301
8345
|
{
|
|
8302
8346
|
onValidate,
|
|
@@ -8314,7 +8358,7 @@ var DataForm_default = DataForm;
|
|
|
8314
8358
|
|
|
8315
8359
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
8316
8360
|
init_ServiceClient();
|
|
8317
|
-
var
|
|
8361
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8318
8362
|
function getAction(actions, code) {
|
|
8319
8363
|
return actions?.find((a) => a.actionCode === code);
|
|
8320
8364
|
}
|
|
@@ -8340,9 +8384,9 @@ var DataFormRenderer = ({
|
|
|
8340
8384
|
"Delete"
|
|
8341
8385
|
);
|
|
8342
8386
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
8343
|
-
return /* @__PURE__ */ (0,
|
|
8344
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
8345
|
-
/* @__PURE__ */ (0,
|
|
8387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8388
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
8389
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8346
8390
|
DataForm_default,
|
|
8347
8391
|
{
|
|
8348
8392
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|