@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260713054732 → 0.8.1-dev.20260713110639
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/InputControlClient-HIZOJLKW.mjs +677 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +227 -233
- package/dist/index.mjs +82 -37
- package/dist/server.d.mts +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +6 -6
- package/dist/server.mjs +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
"use strict";
|
|
4
2
|
var __create = Object.create;
|
|
5
3
|
var __defProp = Object.defineProperty;
|
|
@@ -4127,58 +4125,6 @@ var init_Slider = __esm({
|
|
|
4127
4125
|
}
|
|
4128
4126
|
});
|
|
4129
4127
|
|
|
4130
|
-
// src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
|
|
4131
|
-
var EnterAnimationClient_exports = {};
|
|
4132
|
-
__export(EnterAnimationClient_exports, {
|
|
4133
|
-
default: () => EnterAnimationClient
|
|
4134
|
-
});
|
|
4135
|
-
function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
4136
|
-
const ref = (0, import_react52.useRef)(null);
|
|
4137
|
-
console.log("render");
|
|
4138
|
-
(0, import_react52.useEffect)(() => {
|
|
4139
|
-
console.log("effect");
|
|
4140
|
-
console.log("ref", ref.current);
|
|
4141
|
-
if (!hasEnterAnimation) {
|
|
4142
|
-
console.log("no animation");
|
|
4143
|
-
return;
|
|
4144
|
-
}
|
|
4145
|
-
if (!ref.current) {
|
|
4146
|
-
console.log("no ref");
|
|
4147
|
-
return;
|
|
4148
|
-
}
|
|
4149
|
-
console.log("observer started");
|
|
4150
|
-
}, []);
|
|
4151
|
-
(0, import_react52.useEffect)(() => {
|
|
4152
|
-
if (!hasEnterAnimation || !ref.current) return;
|
|
4153
|
-
const observer = new IntersectionObserver(
|
|
4154
|
-
(entries) => {
|
|
4155
|
-
entries.forEach((entry) => {
|
|
4156
|
-
if (entry.isIntersecting) {
|
|
4157
|
-
entry.target.classList.add("visible");
|
|
4158
|
-
observer.unobserve(entry.target);
|
|
4159
|
-
}
|
|
4160
|
-
});
|
|
4161
|
-
},
|
|
4162
|
-
{ threshold: 0.1 }
|
|
4163
|
-
);
|
|
4164
|
-
observer.observe(ref.current);
|
|
4165
|
-
return () => observer.disconnect();
|
|
4166
|
-
}, [hasEnterAnimation]);
|
|
4167
|
-
if (!children) return null;
|
|
4168
|
-
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, { children: children && // enforce passing the ref to Wrapper
|
|
4169
|
-
//@ts-ignore
|
|
4170
|
-
import_react52.default.cloneElement(children, { ref }) });
|
|
4171
|
-
}
|
|
4172
|
-
var import_react52, import_jsx_runtime72;
|
|
4173
|
-
var init_EnterAnimationClient = __esm({
|
|
4174
|
-
"src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx"() {
|
|
4175
|
-
"use strict";
|
|
4176
|
-
"use client";
|
|
4177
|
-
import_react52 = __toESM(require("react"));
|
|
4178
|
-
import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4179
|
-
}
|
|
4180
|
-
});
|
|
4181
|
-
|
|
4182
4128
|
// src/index.ts
|
|
4183
4129
|
var index_exports = {};
|
|
4184
4130
|
__export(index_exports, {
|
|
@@ -4191,6 +4137,7 @@ __export(index_exports, {
|
|
|
4191
4137
|
DataListRenderer: () => DataListRenderer_default,
|
|
4192
4138
|
DateTimeInput: () => DateTimeInput_default,
|
|
4193
4139
|
EmailInput: () => EmailInput_default,
|
|
4140
|
+
EnterAnimationHydrator: () => EnterAnimationHydrator,
|
|
4194
4141
|
InputControl: () => InputControl_default,
|
|
4195
4142
|
InputControlType: () => InputControlType_default,
|
|
4196
4143
|
LineTextInput: () => LineTextInput_default,
|
|
@@ -4593,7 +4540,7 @@ var InputControl_default = InputControl2;
|
|
|
4593
4540
|
init_InputControlType();
|
|
4594
4541
|
|
|
4595
4542
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4596
|
-
var
|
|
4543
|
+
var import_react53 = __toESM(require("react"));
|
|
4597
4544
|
|
|
4598
4545
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
4599
4546
|
var import_react40 = __toESM(require("react"));
|
|
@@ -5367,7 +5314,7 @@ var WidgetNode_default = WidgetNode;
|
|
|
5367
5314
|
|
|
5368
5315
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
5369
5316
|
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
5370
|
-
var
|
|
5317
|
+
var import_react52 = __toESM(require("react"));
|
|
5371
5318
|
|
|
5372
5319
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
5373
5320
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
@@ -6410,14 +6357,11 @@ var DocumentNode = (props) => {
|
|
|
6410
6357
|
var DocumentNode_default = DocumentNode;
|
|
6411
6358
|
|
|
6412
6359
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
6413
|
-
var
|
|
6360
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6414
6361
|
var Pagination2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
6415
6362
|
var Slider2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
6416
6363
|
ssr: false
|
|
6417
6364
|
});
|
|
6418
|
-
var EnterAnimationClient2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_EnterAnimationClient(), EnterAnimationClient_exports)), {
|
|
6419
|
-
ssr: false
|
|
6420
|
-
});
|
|
6421
6365
|
function toCamelCase(str) {
|
|
6422
6366
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
6423
6367
|
}
|
|
@@ -6667,7 +6611,7 @@ var DivContainer = async (props) => {
|
|
|
6667
6611
|
response = await serviceClient.get(endpoint);
|
|
6668
6612
|
result = response?.result;
|
|
6669
6613
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
6670
|
-
return /* @__PURE__ */ (0,
|
|
6614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(NoDataFound_default, {});
|
|
6671
6615
|
}
|
|
6672
6616
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
6673
6617
|
childCollectionData = getNestedValue6(
|
|
@@ -6687,7 +6631,7 @@ var DivContainer = async (props) => {
|
|
|
6687
6631
|
}
|
|
6688
6632
|
const SelectedNode = NodeTypes2[node.type];
|
|
6689
6633
|
if (!SelectedNode) return null;
|
|
6690
|
-
return /* @__PURE__ */ (0,
|
|
6634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6691
6635
|
SelectedNode,
|
|
6692
6636
|
{
|
|
6693
6637
|
node,
|
|
@@ -6817,16 +6761,17 @@ var DivContainer = async (props) => {
|
|
|
6817
6761
|
containerPaddingClass,
|
|
6818
6762
|
props.node.autoFormat && "auto-format",
|
|
6819
6763
|
props.node.bgClass,
|
|
6820
|
-
noLinkColor && "no-link-color"
|
|
6764
|
+
noLinkColor && "no-link-color",
|
|
6765
|
+
!!props.node.enterAnimation && "enter-animation"
|
|
6821
6766
|
].filter(Boolean).join(" ");
|
|
6822
|
-
return /* @__PURE__ */ (0,
|
|
6823
|
-
/* @__PURE__ */ (0,
|
|
6767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_react52.default.Fragment, { children: [
|
|
6768
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6824
6769
|
"style",
|
|
6825
6770
|
{
|
|
6826
6771
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
6827
6772
|
}
|
|
6828
6773
|
),
|
|
6829
|
-
/* @__PURE__ */ (0,
|
|
6774
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6830
6775
|
Wrapper,
|
|
6831
6776
|
{
|
|
6832
6777
|
id: guid,
|
|
@@ -6840,11 +6785,11 @@ var DivContainer = async (props) => {
|
|
|
6840
6785
|
item,
|
|
6841
6786
|
idx,
|
|
6842
6787
|
props.href ? void 0 : item?.links?.view
|
|
6843
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
6788
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
6844
6789
|
)
|
|
6845
6790
|
}
|
|
6846
|
-
)
|
|
6847
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
6791
|
+
),
|
|
6792
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6848
6793
|
Pagination2,
|
|
6849
6794
|
{
|
|
6850
6795
|
path: props.path,
|
|
@@ -6857,7 +6802,7 @@ var DivContainer = async (props) => {
|
|
|
6857
6802
|
var DivContainer_default = DivContainer;
|
|
6858
6803
|
|
|
6859
6804
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6860
|
-
var
|
|
6805
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6861
6806
|
var NodeTypes = {
|
|
6862
6807
|
["paragraph"]: ParagraphNode_default,
|
|
6863
6808
|
["heading"]: HeadingNode_default,
|
|
@@ -6894,14 +6839,14 @@ var PageBodyRenderer = (props) => {
|
|
|
6894
6839
|
}
|
|
6895
6840
|
return true;
|
|
6896
6841
|
};
|
|
6897
|
-
return /* @__PURE__ */ (0,
|
|
6842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
6898
6843
|
{
|
|
6899
6844
|
}
|
|
6900
6845
|
const SelectedNode = NodeTypes[node.type];
|
|
6901
6846
|
if (!shouldRenderNode(node)) {
|
|
6902
6847
|
return null;
|
|
6903
6848
|
}
|
|
6904
|
-
return /* @__PURE__ */ (0,
|
|
6849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6905
6850
|
SelectedNode,
|
|
6906
6851
|
{
|
|
6907
6852
|
node,
|
|
@@ -6917,7 +6862,7 @@ var PageBodyRenderer = (props) => {
|
|
|
6917
6862
|
device: props.device,
|
|
6918
6863
|
widgetRenderer: props.widgetRenderer
|
|
6919
6864
|
}
|
|
6920
|
-
) }) : /* @__PURE__ */ (0,
|
|
6865
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6921
6866
|
SelectedNode,
|
|
6922
6867
|
{
|
|
6923
6868
|
node,
|
|
@@ -6937,10 +6882,58 @@ var PageBodyRenderer = (props) => {
|
|
|
6937
6882
|
};
|
|
6938
6883
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
6939
6884
|
|
|
6885
|
+
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
6886
|
+
var import_react54 = require("react");
|
|
6887
|
+
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
6888
|
+
function EnterAnimationHydrator() {
|
|
6889
|
+
(0, import_react54.useEffect)(() => {
|
|
6890
|
+
let observer;
|
|
6891
|
+
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
6892
|
+
const revealAnimatedElements = () => {
|
|
6893
|
+
const animatedElements = document.querySelectorAll(ENTER_ANIMATION_SELECTOR);
|
|
6894
|
+
if (!("IntersectionObserver" in window)) {
|
|
6895
|
+
animatedElements.forEach((element) => {
|
|
6896
|
+
element.classList.add("visible");
|
|
6897
|
+
});
|
|
6898
|
+
return;
|
|
6899
|
+
}
|
|
6900
|
+
observer ?? (observer = new IntersectionObserver(
|
|
6901
|
+
(entries) => {
|
|
6902
|
+
entries.forEach((entry) => {
|
|
6903
|
+
if (entry.isIntersecting) {
|
|
6904
|
+
entry.target.classList.add("visible");
|
|
6905
|
+
observer?.unobserve(entry.target);
|
|
6906
|
+
}
|
|
6907
|
+
});
|
|
6908
|
+
},
|
|
6909
|
+
{ threshold: 0.1 }
|
|
6910
|
+
));
|
|
6911
|
+
animatedElements.forEach((element) => {
|
|
6912
|
+
if (element.classList.contains("visible") || observedElements.has(element)) {
|
|
6913
|
+
return;
|
|
6914
|
+
}
|
|
6915
|
+
observedElements.add(element);
|
|
6916
|
+
observer?.observe(element);
|
|
6917
|
+
});
|
|
6918
|
+
};
|
|
6919
|
+
revealAnimatedElements();
|
|
6920
|
+
const mutationObserver = new MutationObserver(revealAnimatedElements);
|
|
6921
|
+
mutationObserver.observe(document.body, {
|
|
6922
|
+
childList: true,
|
|
6923
|
+
subtree: true
|
|
6924
|
+
});
|
|
6925
|
+
return () => {
|
|
6926
|
+
mutationObserver.disconnect();
|
|
6927
|
+
observer?.disconnect();
|
|
6928
|
+
};
|
|
6929
|
+
}, []);
|
|
6930
|
+
return null;
|
|
6931
|
+
}
|
|
6932
|
+
|
|
6940
6933
|
// src/components/Toast.tsx
|
|
6941
6934
|
var import_react55 = require("react");
|
|
6942
6935
|
init_ToastService();
|
|
6943
|
-
var
|
|
6936
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6944
6937
|
var Toast = () => {
|
|
6945
6938
|
const [showToast, setShowToast] = (0, import_react55.useState)(false);
|
|
6946
6939
|
const [message, setMessage] = (0, import_react55.useState)("");
|
|
@@ -6974,8 +6967,8 @@ var Toast = () => {
|
|
|
6974
6967
|
});
|
|
6975
6968
|
};
|
|
6976
6969
|
}, [closeToast, showMessage]);
|
|
6977
|
-
return /* @__PURE__ */ (0,
|
|
6978
|
-
/* @__PURE__ */ (0,
|
|
6970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_jsx_runtime74.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime74.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_runtime74.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
6971
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6979
6972
|
"span",
|
|
6980
6973
|
{
|
|
6981
6974
|
className: "font-medium text-inherit text-sm",
|
|
@@ -6983,7 +6976,7 @@ var Toast = () => {
|
|
|
6983
6976
|
children: message
|
|
6984
6977
|
}
|
|
6985
6978
|
),
|
|
6986
|
-
/* @__PURE__ */ (0,
|
|
6979
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6987
6980
|
"svg",
|
|
6988
6981
|
{
|
|
6989
6982
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6991,7 +6984,7 @@ var Toast = () => {
|
|
|
6991
6984
|
fill: "none",
|
|
6992
6985
|
viewBox: "0 0 24 24",
|
|
6993
6986
|
stroke: "currentColor",
|
|
6994
|
-
children: /* @__PURE__ */ (0,
|
|
6987
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
6995
6988
|
}
|
|
6996
6989
|
) })
|
|
6997
6990
|
] }) }) });
|
|
@@ -7018,7 +7011,7 @@ init_TimeInput();
|
|
|
7018
7011
|
// src/components/NavigationTabsV2.tsx
|
|
7019
7012
|
var import_link3 = __toESM(require("next/link"));
|
|
7020
7013
|
var import_navigation = require("next/navigation");
|
|
7021
|
-
var
|
|
7014
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
7022
7015
|
function resolveRoutePlaceholders(route, params) {
|
|
7023
7016
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
7024
7017
|
const value = params[key];
|
|
@@ -7043,8 +7036,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
7043
7036
|
isActive: tab.isActive
|
|
7044
7037
|
})) || [];
|
|
7045
7038
|
if (mappedTabs.length === 0) return null;
|
|
7046
|
-
return /* @__PURE__ */ (0,
|
|
7047
|
-
return /* @__PURE__ */ (0,
|
|
7039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
7040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
7048
7041
|
"div",
|
|
7049
7042
|
{
|
|
7050
7043
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -7062,9 +7055,9 @@ var import_navigation2 = require("next/navigation");
|
|
|
7062
7055
|
|
|
7063
7056
|
// src/components/dataForm/NoContentView.tsx
|
|
7064
7057
|
var import_react56 = __toESM(require("react"));
|
|
7065
|
-
var
|
|
7058
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
7066
7059
|
var NoContentView = (props) => {
|
|
7067
|
-
return /* @__PURE__ */ (0,
|
|
7060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react56.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
7068
7061
|
};
|
|
7069
7062
|
var NoContentView_default = NoContentView;
|
|
7070
7063
|
|
|
@@ -7073,38 +7066,38 @@ init_InputControlType();
|
|
|
7073
7066
|
|
|
7074
7067
|
// src/components/dataForm/ContentView.tsx
|
|
7075
7068
|
var import_react57 = __toESM(require("react"));
|
|
7076
|
-
var
|
|
7069
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
7077
7070
|
var ContentView = (props) => {
|
|
7078
|
-
return /* @__PURE__ */ (0,
|
|
7079
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
7080
|
-
/* @__PURE__ */ (0,
|
|
7081
|
-
/* @__PURE__ */ (0,
|
|
7082
|
-
/* @__PURE__ */ (0,
|
|
7083
|
-
/* @__PURE__ */ (0,
|
|
7084
|
-
/* @__PURE__ */ (0,
|
|
7071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react57.default.Fragment, { children: [
|
|
7072
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
7073
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
7074
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
7075
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ml-2", children: [
|
|
7076
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
7077
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
7085
7078
|
] })
|
|
7086
7079
|
] }),
|
|
7087
|
-
/* @__PURE__ */ (0,
|
|
7088
|
-
/* @__PURE__ */ (0,
|
|
7089
|
-
/* @__PURE__ */ (0,
|
|
7090
|
-
/* @__PURE__ */ (0,
|
|
7091
|
-
/* @__PURE__ */ (0,
|
|
7092
|
-
/* @__PURE__ */ (0,
|
|
7093
|
-
/* @__PURE__ */ (0,
|
|
7080
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
7081
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
7082
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7083
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7084
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7085
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7086
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7094
7087
|
] }),
|
|
7095
|
-
/* @__PURE__ */ (0,
|
|
7096
|
-
/* @__PURE__ */ (0,
|
|
7097
|
-
/* @__PURE__ */ (0,
|
|
7098
|
-
/* @__PURE__ */ (0,
|
|
7099
|
-
/* @__PURE__ */ (0,
|
|
7100
|
-
/* @__PURE__ */ (0,
|
|
7088
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
7089
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7090
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7091
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7092
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7093
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7101
7094
|
] }),
|
|
7102
|
-
/* @__PURE__ */ (0,
|
|
7103
|
-
/* @__PURE__ */ (0,
|
|
7104
|
-
/* @__PURE__ */ (0,
|
|
7105
|
-
/* @__PURE__ */ (0,
|
|
7106
|
-
/* @__PURE__ */ (0,
|
|
7107
|
-
/* @__PURE__ */ (0,
|
|
7095
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
7096
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7097
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7098
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7099
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7100
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7108
7101
|
] })
|
|
7109
7102
|
] })
|
|
7110
7103
|
] }) }),
|
|
@@ -7164,7 +7157,7 @@ function FormReducer(state, action) {
|
|
|
7164
7157
|
var FormReducer_default = FormReducer;
|
|
7165
7158
|
|
|
7166
7159
|
// src/components/dataForm/DataList.tsx
|
|
7167
|
-
var
|
|
7160
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7168
7161
|
var DataList = (props) => {
|
|
7169
7162
|
const router = (0, import_navigation2.useRouter)();
|
|
7170
7163
|
let builder = new OdataBuilder(props.path);
|
|
@@ -7202,7 +7195,7 @@ var DataList = (props) => {
|
|
|
7202
7195
|
if (path.includes(".")) {
|
|
7203
7196
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
7204
7197
|
} else if (Array.isArray(obj[path])) {
|
|
7205
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
7198
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: item }, index));
|
|
7206
7199
|
} else {
|
|
7207
7200
|
return obj[path];
|
|
7208
7201
|
}
|
|
@@ -7281,30 +7274,30 @@ var DataList = (props) => {
|
|
|
7281
7274
|
const renderPageNumbers = () => {
|
|
7282
7275
|
if (pages <= 10) {
|
|
7283
7276
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
7284
|
-
(page) => /* @__PURE__ */ (0,
|
|
7277
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react58.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7285
7278
|
Hyperlink,
|
|
7286
7279
|
{
|
|
7287
7280
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7288
7281
|
href: builder.getNewPageUrl(page),
|
|
7289
7282
|
children: page
|
|
7290
7283
|
}
|
|
7291
|
-
) : /* @__PURE__ */ (0,
|
|
7284
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7292
7285
|
);
|
|
7293
7286
|
} else {
|
|
7294
7287
|
const showFirstPages = activePageNumber <= 5;
|
|
7295
7288
|
const showLastPages = activePageNumber > pages - 5;
|
|
7296
7289
|
if (showFirstPages) {
|
|
7297
|
-
return /* @__PURE__ */ (0,
|
|
7298
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
7290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7291
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react58.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7299
7292
|
Hyperlink,
|
|
7300
7293
|
{
|
|
7301
7294
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7302
7295
|
href: builder.getNewPageUrl(page),
|
|
7303
7296
|
children: page
|
|
7304
7297
|
}
|
|
7305
|
-
) : /* @__PURE__ */ (0,
|
|
7306
|
-
/* @__PURE__ */ (0,
|
|
7307
|
-
/* @__PURE__ */ (0,
|
|
7298
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7299
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7300
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7308
7301
|
Hyperlink,
|
|
7309
7302
|
{
|
|
7310
7303
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7312,7 +7305,7 @@ var DataList = (props) => {
|
|
|
7312
7305
|
children: pages - 1
|
|
7313
7306
|
}
|
|
7314
7307
|
),
|
|
7315
|
-
/* @__PURE__ */ (0,
|
|
7308
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7316
7309
|
Hyperlink,
|
|
7317
7310
|
{
|
|
7318
7311
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7320,7 +7313,7 @@ var DataList = (props) => {
|
|
|
7320
7313
|
children: pages
|
|
7321
7314
|
}
|
|
7322
7315
|
),
|
|
7323
|
-
/* @__PURE__ */ (0,
|
|
7316
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7324
7317
|
"select",
|
|
7325
7318
|
{
|
|
7326
7319
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7332,18 +7325,18 @@ var DataList = (props) => {
|
|
|
7332
7325
|
}
|
|
7333
7326
|
},
|
|
7334
7327
|
children: [
|
|
7335
|
-
/* @__PURE__ */ (0,
|
|
7328
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
7336
7329
|
Array.from(
|
|
7337
7330
|
{ length: Math.max(0, pages - 10) },
|
|
7338
7331
|
(_, index) => index + 9
|
|
7339
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7332
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { value: page, children: page }, page))
|
|
7340
7333
|
]
|
|
7341
7334
|
}
|
|
7342
7335
|
) })
|
|
7343
7336
|
] });
|
|
7344
7337
|
} else if (showLastPages) {
|
|
7345
|
-
return /* @__PURE__ */ (0,
|
|
7346
|
-
/* @__PURE__ */ (0,
|
|
7338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7339
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7347
7340
|
Hyperlink,
|
|
7348
7341
|
{
|
|
7349
7342
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7351,7 +7344,7 @@ var DataList = (props) => {
|
|
|
7351
7344
|
children: "1"
|
|
7352
7345
|
}
|
|
7353
7346
|
),
|
|
7354
|
-
/* @__PURE__ */ (0,
|
|
7347
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7355
7348
|
Hyperlink,
|
|
7356
7349
|
{
|
|
7357
7350
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7359,21 +7352,21 @@ var DataList = (props) => {
|
|
|
7359
7352
|
children: "2"
|
|
7360
7353
|
}
|
|
7361
7354
|
),
|
|
7362
|
-
/* @__PURE__ */ (0,
|
|
7355
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7363
7356
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
7364
|
-
(page) => /* @__PURE__ */ (0,
|
|
7357
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react58.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7365
7358
|
Hyperlink,
|
|
7366
7359
|
{
|
|
7367
7360
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7368
7361
|
href: builder.getNewPageUrl(page),
|
|
7369
7362
|
children: page
|
|
7370
7363
|
}
|
|
7371
|
-
) : /* @__PURE__ */ (0,
|
|
7364
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7372
7365
|
)
|
|
7373
7366
|
] });
|
|
7374
7367
|
} else {
|
|
7375
|
-
return /* @__PURE__ */ (0,
|
|
7376
|
-
/* @__PURE__ */ (0,
|
|
7368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7369
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7377
7370
|
Hyperlink,
|
|
7378
7371
|
{
|
|
7379
7372
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7381,7 +7374,7 @@ var DataList = (props) => {
|
|
|
7381
7374
|
children: "1"
|
|
7382
7375
|
}
|
|
7383
7376
|
),
|
|
7384
|
-
/* @__PURE__ */ (0,
|
|
7377
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7385
7378
|
Hyperlink,
|
|
7386
7379
|
{
|
|
7387
7380
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7389,20 +7382,20 @@ var DataList = (props) => {
|
|
|
7389
7382
|
children: "2"
|
|
7390
7383
|
}
|
|
7391
7384
|
),
|
|
7392
|
-
/* @__PURE__ */ (0,
|
|
7385
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7393
7386
|
Array.from(
|
|
7394
7387
|
{ length: 5 },
|
|
7395
7388
|
(_, index) => activePageNumber - 2 + index
|
|
7396
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7389
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react58.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7397
7390
|
Hyperlink,
|
|
7398
7391
|
{
|
|
7399
7392
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7400
7393
|
href: builder.getNewPageUrl(page),
|
|
7401
7394
|
children: page
|
|
7402
7395
|
}
|
|
7403
|
-
) : /* @__PURE__ */ (0,
|
|
7404
|
-
/* @__PURE__ */ (0,
|
|
7405
|
-
/* @__PURE__ */ (0,
|
|
7396
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7397
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7398
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7406
7399
|
Hyperlink,
|
|
7407
7400
|
{
|
|
7408
7401
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7410,7 +7403,7 @@ var DataList = (props) => {
|
|
|
7410
7403
|
children: pages - 1
|
|
7411
7404
|
}
|
|
7412
7405
|
),
|
|
7413
|
-
/* @__PURE__ */ (0,
|
|
7406
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7414
7407
|
Hyperlink,
|
|
7415
7408
|
{
|
|
7416
7409
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7418,7 +7411,7 @@ var DataList = (props) => {
|
|
|
7418
7411
|
children: pages
|
|
7419
7412
|
}
|
|
7420
7413
|
),
|
|
7421
|
-
/* @__PURE__ */ (0,
|
|
7414
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7422
7415
|
"select",
|
|
7423
7416
|
{
|
|
7424
7417
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7430,8 +7423,8 @@ var DataList = (props) => {
|
|
|
7430
7423
|
}
|
|
7431
7424
|
},
|
|
7432
7425
|
children: [
|
|
7433
|
-
/* @__PURE__ */ (0,
|
|
7434
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
7426
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { value: "", children: "Jump to" }),
|
|
7427
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { value: page, children: page }, page))
|
|
7435
7428
|
]
|
|
7436
7429
|
}
|
|
7437
7430
|
) })
|
|
@@ -7439,16 +7432,16 @@ var DataList = (props) => {
|
|
|
7439
7432
|
}
|
|
7440
7433
|
}
|
|
7441
7434
|
};
|
|
7442
|
-
return /* @__PURE__ */ (0,
|
|
7443
|
-
/* @__PURE__ */ (0,
|
|
7444
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react58.default.Fragment, { children: [
|
|
7436
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(ContentView_default, { isDataFound, children: [
|
|
7437
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7445
7438
|
"div",
|
|
7446
7439
|
{
|
|
7447
7440
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
7448
7441
|
children: [
|
|
7449
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7450
|
-
/* @__PURE__ */ (0,
|
|
7451
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7442
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", {}),
|
|
7443
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7444
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7452
7445
|
InputControl_default,
|
|
7453
7446
|
{
|
|
7454
7447
|
name: "Search_input",
|
|
@@ -7460,7 +7453,7 @@ var DataList = (props) => {
|
|
|
7460
7453
|
}
|
|
7461
7454
|
}
|
|
7462
7455
|
),
|
|
7463
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7456
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7464
7457
|
InputControl_default,
|
|
7465
7458
|
{
|
|
7466
7459
|
name: filter.name,
|
|
@@ -7475,15 +7468,15 @@ var DataList = (props) => {
|
|
|
7475
7468
|
},
|
|
7476
7469
|
filter.name
|
|
7477
7470
|
)),
|
|
7478
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7471
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7479
7472
|
Hyperlink,
|
|
7480
7473
|
{
|
|
7481
7474
|
className: "gap-1",
|
|
7482
7475
|
linkType: "Primary" /* Solid */,
|
|
7483
7476
|
href: props.addLinkHref,
|
|
7484
7477
|
children: [
|
|
7485
|
-
/* @__PURE__ */ (0,
|
|
7486
|
-
/* @__PURE__ */ (0,
|
|
7478
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7479
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7487
7480
|
]
|
|
7488
7481
|
}
|
|
7489
7482
|
)
|
|
@@ -7491,8 +7484,8 @@ var DataList = (props) => {
|
|
|
7491
7484
|
]
|
|
7492
7485
|
}
|
|
7493
7486
|
),
|
|
7494
|
-
/* @__PURE__ */ (0,
|
|
7495
|
-
/* @__PURE__ */ (0,
|
|
7487
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
7488
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7496
7489
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7497
7490
|
let icon = "chevronUpDown";
|
|
7498
7491
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7502,18 +7495,18 @@ var DataList = (props) => {
|
|
|
7502
7495
|
icon = "chevronUp";
|
|
7503
7496
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7504
7497
|
}
|
|
7505
|
-
return /* @__PURE__ */ (0,
|
|
7498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7506
7499
|
"th",
|
|
7507
7500
|
{
|
|
7508
7501
|
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" : ""),
|
|
7509
|
-
children: /* @__PURE__ */ (0,
|
|
7502
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7510
7503
|
Hyperlink,
|
|
7511
7504
|
{
|
|
7512
7505
|
href: column.enableSorting ? url : void 0,
|
|
7513
7506
|
className: "!text-neutral-contrast ",
|
|
7514
|
-
children: /* @__PURE__ */ (0,
|
|
7515
|
-
/* @__PURE__ */ (0,
|
|
7516
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7508
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-black", children: column.label }),
|
|
7509
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7517
7510
|
] })
|
|
7518
7511
|
}
|
|
7519
7512
|
)
|
|
@@ -7521,24 +7514,24 @@ var DataList = (props) => {
|
|
|
7521
7514
|
column.name
|
|
7522
7515
|
);
|
|
7523
7516
|
}) }) }),
|
|
7524
|
-
/* @__PURE__ */ (0,
|
|
7517
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
7525
7518
|
let validityClass = "";
|
|
7526
7519
|
console.log("dataitem", dataitem);
|
|
7527
7520
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
7528
7521
|
validityClass = "bg-alert-200";
|
|
7529
7522
|
}
|
|
7530
|
-
return /* @__PURE__ */ (0,
|
|
7523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
7531
7524
|
console.log("column", column);
|
|
7532
|
-
return /* @__PURE__ */ (0,
|
|
7525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react58.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7533
7526
|
"td",
|
|
7534
7527
|
{
|
|
7535
7528
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
7536
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
7529
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7537
7530
|
Hyperlink,
|
|
7538
7531
|
{
|
|
7539
7532
|
className: "",
|
|
7540
7533
|
href: `https://${dataitem[column.name]}`,
|
|
7541
|
-
children: /* @__PURE__ */ (0,
|
|
7534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7542
7535
|
ViewControl_default,
|
|
7543
7536
|
{
|
|
7544
7537
|
controlType: column.controlType,
|
|
@@ -7551,11 +7544,11 @@ var DataList = (props) => {
|
|
|
7551
7544
|
}
|
|
7552
7545
|
)
|
|
7553
7546
|
}
|
|
7554
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
7547
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7555
7548
|
Hyperlink,
|
|
7556
7549
|
{
|
|
7557
7550
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
7558
|
-
children: /* @__PURE__ */ (0,
|
|
7551
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7559
7552
|
ViewControl_default,
|
|
7560
7553
|
{
|
|
7561
7554
|
controlType: column.controlType,
|
|
@@ -7565,7 +7558,7 @@ var DataList = (props) => {
|
|
|
7565
7558
|
}
|
|
7566
7559
|
)
|
|
7567
7560
|
}
|
|
7568
|
-
) : /* @__PURE__ */ (0,
|
|
7561
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7569
7562
|
ViewControl_default,
|
|
7570
7563
|
{
|
|
7571
7564
|
controlType: column.controlType,
|
|
@@ -7579,10 +7572,10 @@ var DataList = (props) => {
|
|
|
7579
7572
|
}) }, index);
|
|
7580
7573
|
}) })
|
|
7581
7574
|
] }) }),
|
|
7582
|
-
/* @__PURE__ */ (0,
|
|
7583
|
-
/* @__PURE__ */ (0,
|
|
7584
|
-
/* @__PURE__ */ (0,
|
|
7585
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
7575
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
7576
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "text-gray-700", children: label }),
|
|
7577
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
7578
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7586
7579
|
Hyperlink,
|
|
7587
7580
|
{
|
|
7588
7581
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7590,9 +7583,9 @@ var DataList = (props) => {
|
|
|
7590
7583
|
children: "Prev"
|
|
7591
7584
|
}
|
|
7592
7585
|
),
|
|
7593
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
7586
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime78.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" }),
|
|
7594
7587
|
renderPageNumbers(),
|
|
7595
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
7588
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7596
7589
|
Hyperlink,
|
|
7597
7590
|
{
|
|
7598
7591
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7600,19 +7593,19 @@ var DataList = (props) => {
|
|
|
7600
7593
|
children: "Next"
|
|
7601
7594
|
}
|
|
7602
7595
|
),
|
|
7603
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
7596
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
7604
7597
|
] })
|
|
7605
7598
|
] }) })
|
|
7606
7599
|
] }),
|
|
7607
|
-
/* @__PURE__ */ (0,
|
|
7608
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7600
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
7601
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7609
7602
|
"div",
|
|
7610
7603
|
{
|
|
7611
7604
|
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`,
|
|
7612
7605
|
children: [
|
|
7613
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7614
|
-
/* @__PURE__ */ (0,
|
|
7615
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7606
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", {}),
|
|
7607
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7608
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7616
7609
|
InputControl_default,
|
|
7617
7610
|
{
|
|
7618
7611
|
name: "Search_input",
|
|
@@ -7624,7 +7617,7 @@ var DataList = (props) => {
|
|
|
7624
7617
|
}
|
|
7625
7618
|
}
|
|
7626
7619
|
),
|
|
7627
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7620
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7628
7621
|
InputControl_default,
|
|
7629
7622
|
{
|
|
7630
7623
|
name: filter.name,
|
|
@@ -7639,15 +7632,15 @@ var DataList = (props) => {
|
|
|
7639
7632
|
},
|
|
7640
7633
|
filter.name
|
|
7641
7634
|
)),
|
|
7642
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7635
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7643
7636
|
Hyperlink,
|
|
7644
7637
|
{
|
|
7645
7638
|
className: "gap-1",
|
|
7646
7639
|
linkType: "Primary" /* Solid */,
|
|
7647
7640
|
href: props.addLinkHref,
|
|
7648
7641
|
children: [
|
|
7649
|
-
/* @__PURE__ */ (0,
|
|
7650
|
-
/* @__PURE__ */ (0,
|
|
7642
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7643
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7651
7644
|
]
|
|
7652
7645
|
}
|
|
7653
7646
|
)
|
|
@@ -7655,8 +7648,8 @@ var DataList = (props) => {
|
|
|
7655
7648
|
]
|
|
7656
7649
|
}
|
|
7657
7650
|
),
|
|
7658
|
-
/* @__PURE__ */ (0,
|
|
7659
|
-
/* @__PURE__ */ (0,
|
|
7651
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
7652
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7660
7653
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7661
7654
|
let icon = "chevronUpDown";
|
|
7662
7655
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7666,18 +7659,18 @@ var DataList = (props) => {
|
|
|
7666
7659
|
icon = "chevronUp";
|
|
7667
7660
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7668
7661
|
}
|
|
7669
|
-
return /* @__PURE__ */ (0,
|
|
7662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7670
7663
|
"th",
|
|
7671
7664
|
{
|
|
7672
7665
|
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" : ""),
|
|
7673
|
-
children: /* @__PURE__ */ (0,
|
|
7666
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7674
7667
|
Hyperlink,
|
|
7675
7668
|
{
|
|
7676
7669
|
href: column.enableSorting ? url : void 0,
|
|
7677
7670
|
className: "text-body-950",
|
|
7678
|
-
children: /* @__PURE__ */ (0,
|
|
7679
|
-
/* @__PURE__ */ (0,
|
|
7680
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7671
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7672
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: column.label }),
|
|
7673
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7681
7674
|
] })
|
|
7682
7675
|
}
|
|
7683
7676
|
)
|
|
@@ -7685,7 +7678,7 @@ var DataList = (props) => {
|
|
|
7685
7678
|
column.name
|
|
7686
7679
|
);
|
|
7687
7680
|
}) }) }) }) }),
|
|
7688
|
-
/* @__PURE__ */ (0,
|
|
7681
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
7689
7682
|
] })
|
|
7690
7683
|
] })
|
|
7691
7684
|
] });
|
|
@@ -7698,7 +7691,7 @@ init_ServiceClient();
|
|
|
7698
7691
|
init_OdataBuilder();
|
|
7699
7692
|
init_SelectWithSearchInput();
|
|
7700
7693
|
var import_navigation3 = require("next/navigation");
|
|
7701
|
-
var
|
|
7694
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7702
7695
|
var viewControlMap = {
|
|
7703
7696
|
number: ViewControlTypes.number,
|
|
7704
7697
|
lineText: ViewControlTypes.lineText,
|
|
@@ -7793,15 +7786,15 @@ var DataListRenderer = ({
|
|
|
7793
7786
|
isActive: landingPageUrl === pathname
|
|
7794
7787
|
};
|
|
7795
7788
|
});
|
|
7796
|
-
return /* @__PURE__ */ (0,
|
|
7797
|
-
resolvedTabs.length > 0 && /* @__PURE__ */ (0,
|
|
7789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react59.default.Fragment, { children: [
|
|
7790
|
+
resolvedTabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7798
7791
|
NavigationTabsV2_default,
|
|
7799
7792
|
{
|
|
7800
7793
|
tabs: resolvedTabs,
|
|
7801
7794
|
params: widgetProps?.params ?? params
|
|
7802
7795
|
}
|
|
7803
7796
|
),
|
|
7804
|
-
/* @__PURE__ */ (0,
|
|
7797
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7805
7798
|
DataList_default,
|
|
7806
7799
|
{
|
|
7807
7800
|
addLinkHref,
|
|
@@ -7856,7 +7849,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
7856
7849
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
7857
7850
|
|
|
7858
7851
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7859
|
-
var
|
|
7852
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7860
7853
|
var DataFormChildSection = (props) => {
|
|
7861
7854
|
const { section } = props;
|
|
7862
7855
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -7924,14 +7917,14 @@ var DataFormChildSection = (props) => {
|
|
|
7924
7917
|
childItemsToRender,
|
|
7925
7918
|
allChildItems: childItems
|
|
7926
7919
|
});
|
|
7927
|
-
return /* @__PURE__ */ (0,
|
|
7928
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
7929
|
-
/* @__PURE__ */ (0,
|
|
7930
|
-
/* @__PURE__ */ (0,
|
|
7931
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
7932
|
-
return /* @__PURE__ */ (0,
|
|
7920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react60.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
7921
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
7922
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
7923
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
7924
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
7925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("tr", { className: "", children: [
|
|
7933
7926
|
sectionRow.elements.map((field, index) => {
|
|
7934
|
-
return /* @__PURE__ */ (0,
|
|
7927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7935
7928
|
"th",
|
|
7936
7929
|
{
|
|
7937
7930
|
className: "py-3 font-normal text-left",
|
|
@@ -7940,21 +7933,21 @@ var DataFormChildSection = (props) => {
|
|
|
7940
7933
|
field.name
|
|
7941
7934
|
);
|
|
7942
7935
|
}),
|
|
7943
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7936
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
7944
7937
|
] }, sectionRowIndex);
|
|
7945
7938
|
}) }),
|
|
7946
|
-
/* @__PURE__ */ (0,
|
|
7939
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
7947
7940
|
const { item, originalIndex } = visibleItem;
|
|
7948
7941
|
const rowKey = originalIndex;
|
|
7949
|
-
return /* @__PURE__ */ (0,
|
|
7942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react60.default.Fragment, { children: section.sectionRows.map(
|
|
7950
7943
|
(sectionRow, sectionRowIndex) => {
|
|
7951
|
-
return /* @__PURE__ */ (0,
|
|
7944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
7952
7945
|
"tr",
|
|
7953
7946
|
{
|
|
7954
7947
|
className: "",
|
|
7955
7948
|
children: [
|
|
7956
7949
|
sectionRow.elements.map((field, index) => {
|
|
7957
|
-
return /* @__PURE__ */ (0,
|
|
7950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7958
7951
|
InputControl_default,
|
|
7959
7952
|
{
|
|
7960
7953
|
index: filteredIndex,
|
|
@@ -7974,7 +7967,7 @@ var DataFormChildSection = (props) => {
|
|
|
7974
7967
|
}
|
|
7975
7968
|
) }) }) }, field.name);
|
|
7976
7969
|
}),
|
|
7977
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7970
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7978
7971
|
ClientButton_default,
|
|
7979
7972
|
{
|
|
7980
7973
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -7983,7 +7976,7 @@ var DataFormChildSection = (props) => {
|
|
|
7983
7976
|
},
|
|
7984
7977
|
dataRole: "delete",
|
|
7985
7978
|
tabIndex: -1,
|
|
7986
|
-
children: /* @__PURE__ */ (0,
|
|
7979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7987
7980
|
Icon_default,
|
|
7988
7981
|
{
|
|
7989
7982
|
className: "w-4 h-4",
|
|
@@ -8000,7 +7993,7 @@ var DataFormChildSection = (props) => {
|
|
|
8000
7993
|
) }, rowKey);
|
|
8001
7994
|
}) })
|
|
8002
7995
|
] }) }),
|
|
8003
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7996
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8004
7997
|
ClientButton_default,
|
|
8005
7998
|
{
|
|
8006
7999
|
ButtonType: "Link" /* Link */,
|
|
@@ -8015,7 +8008,7 @@ var DataFormChildSection = (props) => {
|
|
|
8015
8008
|
var DataFormChildSection_default = DataFormChildSection;
|
|
8016
8009
|
|
|
8017
8010
|
// src/components/dataForm/DataForm.tsx
|
|
8018
|
-
var
|
|
8011
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
8019
8012
|
var DataForm = (props) => {
|
|
8020
8013
|
const formRef = (0, import_react61.useRef)(null);
|
|
8021
8014
|
console.log(props.dataItem, "dssads");
|
|
@@ -8235,19 +8228,19 @@ var DataForm = (props) => {
|
|
|
8235
8228
|
return false;
|
|
8236
8229
|
}
|
|
8237
8230
|
}
|
|
8238
|
-
return /* @__PURE__ */ (0,
|
|
8239
|
-
props.title && /* @__PURE__ */ (0,
|
|
8231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react61.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8232
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime81.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_runtime81.jsxs)(
|
|
8240
8233
|
"div",
|
|
8241
8234
|
{
|
|
8242
8235
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
8243
8236
|
onClick: () => window.history.back(),
|
|
8244
8237
|
children: [
|
|
8245
|
-
/* @__PURE__ */ (0,
|
|
8246
|
-
/* @__PURE__ */ (0,
|
|
8238
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
8239
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
8247
8240
|
]
|
|
8248
8241
|
}
|
|
8249
8242
|
) }),
|
|
8250
|
-
/* @__PURE__ */ (0,
|
|
8243
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8251
8244
|
"form",
|
|
8252
8245
|
{
|
|
8253
8246
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -8268,8 +8261,8 @@ var DataForm = (props) => {
|
|
|
8268
8261
|
}
|
|
8269
8262
|
}
|
|
8270
8263
|
},
|
|
8271
|
-
children: /* @__PURE__ */ (0,
|
|
8272
|
-
return /* @__PURE__ */ (0,
|
|
8264
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
8265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react61.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
8273
8266
|
section.sectionRows?.map(
|
|
8274
8267
|
(sectionRow, sectionRowIndex) => {
|
|
8275
8268
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -8280,14 +8273,14 @@ var DataForm = (props) => {
|
|
|
8280
8273
|
sectionRow.visible
|
|
8281
8274
|
);
|
|
8282
8275
|
}
|
|
8283
|
-
return /* @__PURE__ */ (0,
|
|
8284
|
-
return /* @__PURE__ */ (0,
|
|
8276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react61.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
8277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8285
8278
|
"div",
|
|
8286
8279
|
{
|
|
8287
8280
|
className: sectionRow.grow ? "grow" : "",
|
|
8288
8281
|
children: [
|
|
8289
|
-
/* @__PURE__ */ (0,
|
|
8290
|
-
/* @__PURE__ */ (0,
|
|
8282
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: field.controlType }),
|
|
8283
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8291
8284
|
InputControl_default,
|
|
8292
8285
|
{
|
|
8293
8286
|
name: field.name,
|
|
@@ -8317,12 +8310,12 @@ var DataForm = (props) => {
|
|
|
8317
8310
|
}) }) }, sectionRowIndex);
|
|
8318
8311
|
}
|
|
8319
8312
|
),
|
|
8320
|
-
/* @__PURE__ */ (0,
|
|
8313
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: section.childSections?.map(
|
|
8321
8314
|
(childSection, childSectionIndex) => {
|
|
8322
|
-
return /* @__PURE__ */ (0,
|
|
8315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
8323
8316
|
formState.inputValues,
|
|
8324
8317
|
childSection.visible
|
|
8325
|
-
) && /* @__PURE__ */ (0,
|
|
8318
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8326
8319
|
DataFormChildSection_default,
|
|
8327
8320
|
{
|
|
8328
8321
|
section: childSection,
|
|
@@ -8337,8 +8330,8 @@ var DataForm = (props) => {
|
|
|
8337
8330
|
}) })
|
|
8338
8331
|
}
|
|
8339
8332
|
),
|
|
8340
|
-
/* @__PURE__ */ (0,
|
|
8341
|
-
/* @__PURE__ */ (0,
|
|
8333
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
8334
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8342
8335
|
Button_default,
|
|
8343
8336
|
{
|
|
8344
8337
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8346,7 +8339,7 @@ var DataForm = (props) => {
|
|
|
8346
8339
|
children: props.additionalActions.title
|
|
8347
8340
|
}
|
|
8348
8341
|
) }),
|
|
8349
|
-
/* @__PURE__ */ (0,
|
|
8342
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8350
8343
|
Button_default,
|
|
8351
8344
|
{
|
|
8352
8345
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8357,7 +8350,7 @@ var DataForm = (props) => {
|
|
|
8357
8350
|
children: "Delete"
|
|
8358
8351
|
}
|
|
8359
8352
|
) }),
|
|
8360
|
-
/* @__PURE__ */ (0,
|
|
8353
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8361
8354
|
Button_default,
|
|
8362
8355
|
{
|
|
8363
8356
|
onValidate,
|
|
@@ -8375,7 +8368,7 @@ var DataForm_default = DataForm;
|
|
|
8375
8368
|
|
|
8376
8369
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
8377
8370
|
init_ServiceClient();
|
|
8378
|
-
var
|
|
8371
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8379
8372
|
function getAction(actions, code) {
|
|
8380
8373
|
return actions?.find((a) => a.actionCode === code);
|
|
8381
8374
|
}
|
|
@@ -8401,9 +8394,9 @@ var DataFormRenderer = ({
|
|
|
8401
8394
|
"Delete"
|
|
8402
8395
|
);
|
|
8403
8396
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
8404
|
-
return /* @__PURE__ */ (0,
|
|
8405
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
8406
|
-
/* @__PURE__ */ (0,
|
|
8397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8398
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
8399
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8407
8400
|
DataForm_default,
|
|
8408
8401
|
{
|
|
8409
8402
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|
|
@@ -8433,6 +8426,7 @@ var DataFormRenderer_default = DataFormRenderer;
|
|
|
8433
8426
|
DataListRenderer,
|
|
8434
8427
|
DateTimeInput,
|
|
8435
8428
|
EmailInput,
|
|
8429
|
+
EnterAnimationHydrator,
|
|
8436
8430
|
InputControl,
|
|
8437
8431
|
InputControlType,
|
|
8438
8432
|
LineTextInput,
|