@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260620051742 → 0.8.1-dev.20260623060812
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +308 -175
- package/dist/index.mjs +302 -169
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1252,7 +1252,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1252
1252
|
const containerRef = useRef2(null);
|
|
1253
1253
|
const [isCreateOpen, setIsCreateOpen] = useState4(false);
|
|
1254
1254
|
const [formData, setFormData] = useState4({});
|
|
1255
|
-
const
|
|
1255
|
+
const getNestedValue6 = (obj, path) => {
|
|
1256
1256
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
1257
1257
|
};
|
|
1258
1258
|
useEffect5(() => {
|
|
@@ -1290,7 +1290,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1290
1290
|
props.dataSourceDependsOn
|
|
1291
1291
|
]);
|
|
1292
1292
|
const filteredItems = list?.filter((item) => {
|
|
1293
|
-
const value =
|
|
1293
|
+
const value = getNestedValue6(item, props.dataTextFieldName);
|
|
1294
1294
|
return value?.toLowerCase().includes(searchTerm?.toLowerCase());
|
|
1295
1295
|
});
|
|
1296
1296
|
const playBeep = () => {
|
|
@@ -1321,7 +1321,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1321
1321
|
}, [searchTerm]);
|
|
1322
1322
|
const handleSelect = (event, item) => {
|
|
1323
1323
|
event.preventDefault();
|
|
1324
|
-
setSearchTerm(
|
|
1324
|
+
setSearchTerm(getNestedValue6(item, props.dataTextFieldName));
|
|
1325
1325
|
if (props.callback) {
|
|
1326
1326
|
const val = {};
|
|
1327
1327
|
props.callback({
|
|
@@ -1476,7 +1476,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1476
1476
|
role: "option",
|
|
1477
1477
|
tabIndex: -1,
|
|
1478
1478
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1479
|
-
children: /* @__PURE__ */ jsx25("span", { children:
|
|
1479
|
+
children: /* @__PURE__ */ jsx25("span", { children: getNestedValue6(item, props.dataTextFieldName) })
|
|
1480
1480
|
}
|
|
1481
1481
|
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx25("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1482
1482
|
}
|
|
@@ -4446,8 +4446,140 @@ var DivContainer = async (props) => {
|
|
|
4446
4446
|
};
|
|
4447
4447
|
var DivContainer_default = DivContainer;
|
|
4448
4448
|
|
|
4449
|
+
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
4450
|
+
import { jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4451
|
+
var getNestedValue5 = (obj, path) => {
|
|
4452
|
+
if (!obj || !path) return void 0;
|
|
4453
|
+
return path.split(".").reduce((current, key) => {
|
|
4454
|
+
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
4455
|
+
}, obj);
|
|
4456
|
+
};
|
|
4457
|
+
var PdfIcon = () => /* @__PURE__ */ jsxs33("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-red-500 w-8 h-8", children: [
|
|
4458
|
+
/* @__PURE__ */ jsx60("path", { d: "M7 3H14L19 8V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4459
|
+
/* @__PURE__ */ jsx60("path", { d: "M14 3V8H19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4460
|
+
/* @__PURE__ */ jsx60("path", { d: "M9 14H11C11.5304 14 12.0391 13.7893 12.4142 13.4142C12.7893 13.0391 13 12.5304 13 12C13 11.4696 12.7893 10.9609 12.4142 10.5858C12.0391 10.2107 11.5304 10 11 10H9V18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4461
|
+
/* @__PURE__ */ jsx60("path", { d: "M9 14H12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4462
|
+
] });
|
|
4463
|
+
var ExcelIcon = () => /* @__PURE__ */ jsxs33("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-green-600 w-8 h-8", children: [
|
|
4464
|
+
/* @__PURE__ */ jsx60("path", { d: "M14 3V8H19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4465
|
+
/* @__PURE__ */ jsx60("path", { d: "M5 20V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3H14L19 8V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4466
|
+
/* @__PURE__ */ jsx60("path", { d: "M9 11L15 17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4467
|
+
/* @__PURE__ */ jsx60("path", { d: "M15 11L9 17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4468
|
+
] });
|
|
4469
|
+
var WordIcon = () => /* @__PURE__ */ jsxs33("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-blue-600 w-8 h-8", children: [
|
|
4470
|
+
/* @__PURE__ */ jsx60("path", { d: "M14 3V8H19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4471
|
+
/* @__PURE__ */ jsx60("path", { d: "M5 20V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3H14L19 8V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4472
|
+
/* @__PURE__ */ jsx60("path", { d: "M8 12L10 17L12 14L14 17L16 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4473
|
+
] });
|
|
4474
|
+
var ImageIcon = () => /* @__PURE__ */ jsxs33("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-yellow-500 w-8 h-8", children: [
|
|
4475
|
+
/* @__PURE__ */ jsx60("path", { d: "M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H19C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5V15ZM21 15L16 10L9 17L6 14L3 17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4476
|
+
/* @__PURE__ */ jsx60("path", { d: "M16 8C16 8.55228 15.5523 9 15 9C14.4477 9 14 8.55228 14 8C14 7.44772 14.4477 7 15 7C15.5523 7 16 7.44772 16 8Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4477
|
+
] });
|
|
4478
|
+
var StandardIcon = () => /* @__PURE__ */ jsxs33("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-gray-500 w-8 h-8", children: [
|
|
4479
|
+
/* @__PURE__ */ jsx60("path", { d: "M14 3V8H19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
4480
|
+
/* @__PURE__ */ jsx60("path", { d: "M5 20V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3H14L19 8V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4481
|
+
] });
|
|
4482
|
+
var getFileDetails = (url) => {
|
|
4483
|
+
const extMatch = url.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);
|
|
4484
|
+
const ext = extMatch ? extMatch[1].toLowerCase() : "";
|
|
4485
|
+
let Icon2 = StandardIcon;
|
|
4486
|
+
let extLabel = "FILE";
|
|
4487
|
+
if (["pdf"].includes(ext)) {
|
|
4488
|
+
Icon2 = PdfIcon;
|
|
4489
|
+
extLabel = "PDF";
|
|
4490
|
+
} else if (["xls", "xlsx", "csv"].includes(ext)) {
|
|
4491
|
+
Icon2 = ExcelIcon;
|
|
4492
|
+
extLabel = "Excel";
|
|
4493
|
+
} else if (["doc", "docx"].includes(ext)) {
|
|
4494
|
+
Icon2 = WordIcon;
|
|
4495
|
+
extLabel = ext.toUpperCase();
|
|
4496
|
+
} else if (["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(ext)) {
|
|
4497
|
+
Icon2 = ImageIcon;
|
|
4498
|
+
extLabel = ext.toUpperCase();
|
|
4499
|
+
} else if (ext) {
|
|
4500
|
+
extLabel = ext.toUpperCase();
|
|
4501
|
+
}
|
|
4502
|
+
return { Icon: Icon2, extLabel };
|
|
4503
|
+
};
|
|
4504
|
+
var DocumentNode = (props) => {
|
|
4505
|
+
let documentUrl;
|
|
4506
|
+
let documentTitle;
|
|
4507
|
+
if (props.dataitem && props.node.documentKey) {
|
|
4508
|
+
const docData = getNestedValue5(props.dataitem, props.node.documentKey);
|
|
4509
|
+
if (typeof docData === "string") {
|
|
4510
|
+
const trimmed = docData.trim();
|
|
4511
|
+
if (trimmed.startsWith("[") || trimmed.startsWith("{")) {
|
|
4512
|
+
try {
|
|
4513
|
+
const parsed = JSON.parse(trimmed);
|
|
4514
|
+
const asset = Array.isArray(parsed) ? parsed[0] : parsed;
|
|
4515
|
+
if (asset && asset.assetUrl) {
|
|
4516
|
+
documentUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, asset.assetUrl);
|
|
4517
|
+
if (asset.title) documentTitle = asset.title;
|
|
4518
|
+
}
|
|
4519
|
+
} catch (e) {
|
|
4520
|
+
}
|
|
4521
|
+
} else {
|
|
4522
|
+
documentUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, docData);
|
|
4523
|
+
}
|
|
4524
|
+
} else if (Array.isArray(docData) && docData.length > 0) {
|
|
4525
|
+
const asset = docData[0];
|
|
4526
|
+
if (asset && asset.assetUrl) {
|
|
4527
|
+
documentUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, asset.assetUrl);
|
|
4528
|
+
if (asset.title) documentTitle = asset.title;
|
|
4529
|
+
}
|
|
4530
|
+
} else if (docData && typeof docData === "object") {
|
|
4531
|
+
const asset = docData;
|
|
4532
|
+
if (asset && asset.assetUrl) {
|
|
4533
|
+
documentUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, asset.assetUrl);
|
|
4534
|
+
if (asset.title) documentTitle = asset.title;
|
|
4535
|
+
}
|
|
4536
|
+
}
|
|
4537
|
+
}
|
|
4538
|
+
const { Icon: Icon2, extLabel } = getFileDetails(documentUrl);
|
|
4539
|
+
if (!documentTitle) {
|
|
4540
|
+
try {
|
|
4541
|
+
const pathName = new URL(documentUrl).pathname;
|
|
4542
|
+
documentTitle = pathName.split("/").pop() || "Document";
|
|
4543
|
+
} catch {
|
|
4544
|
+
documentTitle = documentUrl.split("/").pop() || "Document";
|
|
4545
|
+
}
|
|
4546
|
+
documentTitle = documentTitle.replace(/\.[^/.]+$/, "");
|
|
4547
|
+
}
|
|
4548
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between py-4 border-b border-gray-100 bg-white", children: [
|
|
4549
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center space-x-4", children: [
|
|
4550
|
+
/* @__PURE__ */ jsx60("div", { className: "flex items-center justify-center p-2 rounded bg-gray-50 border border-gray-100", children: /* @__PURE__ */ jsx60(Icon2, {}) }),
|
|
4551
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-baseline space-x-2", children: [
|
|
4552
|
+
/* @__PURE__ */ jsx60("h4", { className: "text-base font-semibold text-gray-800", children: documentTitle }),
|
|
4553
|
+
/* @__PURE__ */ jsxs33("span", { className: "text-sm font-medium text-gray-400", children: [
|
|
4554
|
+
"(",
|
|
4555
|
+
extLabel,
|
|
4556
|
+
")"
|
|
4557
|
+
] })
|
|
4558
|
+
] })
|
|
4559
|
+
] }),
|
|
4560
|
+
/* @__PURE__ */ jsxs33(
|
|
4561
|
+
"a",
|
|
4562
|
+
{
|
|
4563
|
+
href: documentUrl,
|
|
4564
|
+
download: true,
|
|
4565
|
+
target: "_blank",
|
|
4566
|
+
rel: "noreferrer",
|
|
4567
|
+
className: "inline-flex items-center px-4 py-2 text-sm font-medium text-blue-600 bg-white border border-blue-600 rounded hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors",
|
|
4568
|
+
children: [
|
|
4569
|
+
/* @__PURE__ */ jsxs33("svg", { className: "w-4 h-4 mr-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
4570
|
+
/* @__PURE__ */ jsx60("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" }),
|
|
4571
|
+
/* @__PURE__ */ jsx60("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 12v5m0 0l-3-3m3 3l3-3M12 8v4" })
|
|
4572
|
+
] }),
|
|
4573
|
+
"Download"
|
|
4574
|
+
]
|
|
4575
|
+
}
|
|
4576
|
+
)
|
|
4577
|
+
] });
|
|
4578
|
+
};
|
|
4579
|
+
var DocumentNode_default = DocumentNode;
|
|
4580
|
+
|
|
4449
4581
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4450
|
-
import { jsx as
|
|
4582
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
4451
4583
|
var NodeTypes = {
|
|
4452
4584
|
["paragraph"]: ParagraphNode_default,
|
|
4453
4585
|
["heading"]: HeadingNode_default,
|
|
@@ -4461,7 +4593,8 @@ var NodeTypes = {
|
|
|
4461
4593
|
["form-container"]: FormContainerNode_default,
|
|
4462
4594
|
["div-container"]: DivContainer_default,
|
|
4463
4595
|
["svg-icon"]: SVGIconNode_default,
|
|
4464
|
-
["embed"]: EmbedNode_default
|
|
4596
|
+
["embed"]: EmbedNode_default,
|
|
4597
|
+
["document"]: DocumentNode_default
|
|
4465
4598
|
};
|
|
4466
4599
|
var PageBodyRenderer = (props) => {
|
|
4467
4600
|
let pageBodyTree;
|
|
@@ -4483,14 +4616,14 @@ var PageBodyRenderer = (props) => {
|
|
|
4483
4616
|
}
|
|
4484
4617
|
return true;
|
|
4485
4618
|
};
|
|
4486
|
-
return /* @__PURE__ */
|
|
4619
|
+
return /* @__PURE__ */ jsx61(React42.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4487
4620
|
{
|
|
4488
4621
|
}
|
|
4489
4622
|
const SelectedNode = NodeTypes[node.type];
|
|
4490
4623
|
if (!shouldRenderNode(node)) {
|
|
4491
4624
|
return null;
|
|
4492
4625
|
}
|
|
4493
|
-
return /* @__PURE__ */
|
|
4626
|
+
return /* @__PURE__ */ jsx61(React42.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx61(React42.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx61(React42.Fragment, { children: /* @__PURE__ */ jsx61(
|
|
4494
4627
|
SelectedNode,
|
|
4495
4628
|
{
|
|
4496
4629
|
node,
|
|
@@ -4506,7 +4639,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4506
4639
|
device: props.device,
|
|
4507
4640
|
widgetRenderer: props.widgetRenderer
|
|
4508
4641
|
}
|
|
4509
|
-
) }) : /* @__PURE__ */
|
|
4642
|
+
) }) : /* @__PURE__ */ jsx61(React42.Fragment, { children: /* @__PURE__ */ jsx61(
|
|
4510
4643
|
SelectedNode,
|
|
4511
4644
|
{
|
|
4512
4645
|
node,
|
|
@@ -4528,7 +4661,7 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
4528
4661
|
|
|
4529
4662
|
// src/components/Toast.tsx
|
|
4530
4663
|
import { useState as useState8 } from "react";
|
|
4531
|
-
import { Fragment as Fragment9, jsx as
|
|
4664
|
+
import { Fragment as Fragment9, jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4532
4665
|
var Toast = () => {
|
|
4533
4666
|
const [showToast, setShowToast] = useState8(false);
|
|
4534
4667
|
const [message, setMessage] = useState8("");
|
|
@@ -4571,8 +4704,8 @@ var Toast = () => {
|
|
|
4571
4704
|
const closeToast = () => {
|
|
4572
4705
|
setShowToast(false);
|
|
4573
4706
|
};
|
|
4574
|
-
return /* @__PURE__ */
|
|
4575
|
-
/* @__PURE__ */
|
|
4707
|
+
return /* @__PURE__ */ jsx62(Fragment9, { children: showToast && /* @__PURE__ */ jsx62("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__ */ jsxs34("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
4708
|
+
/* @__PURE__ */ jsx62(
|
|
4576
4709
|
"span",
|
|
4577
4710
|
{
|
|
4578
4711
|
className: "font-medium text-inherit text-sm",
|
|
@@ -4580,7 +4713,7 @@ var Toast = () => {
|
|
|
4580
4713
|
children: message
|
|
4581
4714
|
}
|
|
4582
4715
|
),
|
|
4583
|
-
/* @__PURE__ */
|
|
4716
|
+
/* @__PURE__ */ jsx62("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx62(
|
|
4584
4717
|
"svg",
|
|
4585
4718
|
{
|
|
4586
4719
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4588,7 +4721,7 @@ var Toast = () => {
|
|
|
4588
4721
|
fill: "none",
|
|
4589
4722
|
viewBox: "0 0 24 24",
|
|
4590
4723
|
stroke: "currentColor",
|
|
4591
|
-
children: /* @__PURE__ */
|
|
4724
|
+
children: /* @__PURE__ */ jsx62("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
4592
4725
|
}
|
|
4593
4726
|
) })
|
|
4594
4727
|
] }) }) });
|
|
@@ -4598,7 +4731,7 @@ var Toast_default = Toast;
|
|
|
4598
4731
|
// src/components/NavigationTabsV2.tsx
|
|
4599
4732
|
import Link3 from "next/link";
|
|
4600
4733
|
import { usePathname } from "next/navigation";
|
|
4601
|
-
import { jsx as
|
|
4734
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
4602
4735
|
function resolveRoutePlaceholders(route, params) {
|
|
4603
4736
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
4604
4737
|
const value = params[key];
|
|
@@ -4623,8 +4756,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4623
4756
|
isActive: tab.isActive
|
|
4624
4757
|
})) || [];
|
|
4625
4758
|
if (mappedTabs.length === 0) return null;
|
|
4626
|
-
return /* @__PURE__ */
|
|
4627
|
-
return /* @__PURE__ */
|
|
4759
|
+
return /* @__PURE__ */ jsx63("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
4760
|
+
return /* @__PURE__ */ jsx63(Link3, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx63(
|
|
4628
4761
|
"div",
|
|
4629
4762
|
{
|
|
4630
4763
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -4642,46 +4775,46 @@ import { useRouter } from "next/navigation";
|
|
|
4642
4775
|
|
|
4643
4776
|
// src/components/dataForm/NoContentView.tsx
|
|
4644
4777
|
import React44 from "react";
|
|
4645
|
-
import { jsx as
|
|
4778
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
4646
4779
|
var NoContentView = (props) => {
|
|
4647
|
-
return /* @__PURE__ */
|
|
4780
|
+
return /* @__PURE__ */ jsx64(React44.Fragment, { children: props.isDataFound === false && props.children });
|
|
4648
4781
|
};
|
|
4649
4782
|
var NoContentView_default = NoContentView;
|
|
4650
4783
|
|
|
4651
4784
|
// src/components/dataForm/ContentView.tsx
|
|
4652
4785
|
import React45 from "react";
|
|
4653
|
-
import { jsx as
|
|
4786
|
+
import { jsx as jsx65, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4654
4787
|
var ContentView = (props) => {
|
|
4655
|
-
return /* @__PURE__ */
|
|
4656
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
4657
|
-
/* @__PURE__ */
|
|
4658
|
-
/* @__PURE__ */
|
|
4659
|
-
/* @__PURE__ */
|
|
4660
|
-
/* @__PURE__ */
|
|
4661
|
-
/* @__PURE__ */
|
|
4788
|
+
return /* @__PURE__ */ jsxs35(React45.Fragment, { children: [
|
|
4789
|
+
props.isDataFound == null && /* @__PURE__ */ jsx65("div", { className: "", children: /* @__PURE__ */ jsxs35("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
4790
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center mb-4", children: [
|
|
4791
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
4792
|
+
/* @__PURE__ */ jsxs35("div", { className: "ml-2", children: [
|
|
4793
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
4794
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
4662
4795
|
] })
|
|
4663
4796
|
] }),
|
|
4664
|
-
/* @__PURE__ */
|
|
4665
|
-
/* @__PURE__ */
|
|
4666
|
-
/* @__PURE__ */
|
|
4667
|
-
/* @__PURE__ */
|
|
4668
|
-
/* @__PURE__ */
|
|
4669
|
-
/* @__PURE__ */
|
|
4670
|
-
/* @__PURE__ */
|
|
4797
|
+
/* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
4798
|
+
/* @__PURE__ */ jsxs35("div", { className: "animate-pulse", children: [
|
|
4799
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4800
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4801
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4802
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4803
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4671
4804
|
] }),
|
|
4672
|
-
/* @__PURE__ */
|
|
4673
|
-
/* @__PURE__ */
|
|
4674
|
-
/* @__PURE__ */
|
|
4675
|
-
/* @__PURE__ */
|
|
4676
|
-
/* @__PURE__ */
|
|
4677
|
-
/* @__PURE__ */
|
|
4805
|
+
/* @__PURE__ */ jsxs35("div", { className: "animate-pulse", children: [
|
|
4806
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4807
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4808
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4809
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4810
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4678
4811
|
] }),
|
|
4679
|
-
/* @__PURE__ */
|
|
4680
|
-
/* @__PURE__ */
|
|
4681
|
-
/* @__PURE__ */
|
|
4682
|
-
/* @__PURE__ */
|
|
4683
|
-
/* @__PURE__ */
|
|
4684
|
-
/* @__PURE__ */
|
|
4812
|
+
/* @__PURE__ */ jsxs35("div", { className: "animate-pulse", children: [
|
|
4813
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4814
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4815
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4816
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4817
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4685
4818
|
] })
|
|
4686
4819
|
] })
|
|
4687
4820
|
] }) }),
|
|
@@ -4691,7 +4824,7 @@ var ContentView = (props) => {
|
|
|
4691
4824
|
var ContentView_default = ContentView;
|
|
4692
4825
|
|
|
4693
4826
|
// src/components/dataForm/DataList.tsx
|
|
4694
|
-
import { Fragment as Fragment10, jsx as
|
|
4827
|
+
import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4695
4828
|
var DataList = (props) => {
|
|
4696
4829
|
const router = useRouter();
|
|
4697
4830
|
let builder = new OdataBuilder(props.path);
|
|
@@ -4729,7 +4862,7 @@ var DataList = (props) => {
|
|
|
4729
4862
|
if (path.includes(".")) {
|
|
4730
4863
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
4731
4864
|
} else if (Array.isArray(obj[path])) {
|
|
4732
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
4865
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx66("div", { children: item }, index));
|
|
4733
4866
|
} else {
|
|
4734
4867
|
return obj[path];
|
|
4735
4868
|
}
|
|
@@ -4808,30 +4941,30 @@ var DataList = (props) => {
|
|
|
4808
4941
|
const renderPageNumbers = () => {
|
|
4809
4942
|
if (pages <= 10) {
|
|
4810
4943
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
4811
|
-
(page) => /* @__PURE__ */
|
|
4944
|
+
(page) => /* @__PURE__ */ jsx66(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx66(
|
|
4812
4945
|
Hyperlink,
|
|
4813
4946
|
{
|
|
4814
4947
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4815
4948
|
href: builder.getNewPageUrl(page),
|
|
4816
4949
|
children: page
|
|
4817
4950
|
}
|
|
4818
|
-
) : /* @__PURE__ */
|
|
4951
|
+
) : /* @__PURE__ */ jsx66("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
4819
4952
|
);
|
|
4820
4953
|
} else {
|
|
4821
4954
|
const showFirstPages = activePageNumber <= 5;
|
|
4822
4955
|
const showLastPages = activePageNumber > pages - 5;
|
|
4823
4956
|
if (showFirstPages) {
|
|
4824
|
-
return /* @__PURE__ */
|
|
4825
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
4957
|
+
return /* @__PURE__ */ jsxs36(Fragment10, { children: [
|
|
4958
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx66(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx66(
|
|
4826
4959
|
Hyperlink,
|
|
4827
4960
|
{
|
|
4828
4961
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4829
4962
|
href: builder.getNewPageUrl(page),
|
|
4830
4963
|
children: page
|
|
4831
4964
|
}
|
|
4832
|
-
) : /* @__PURE__ */
|
|
4833
|
-
/* @__PURE__ */
|
|
4834
|
-
/* @__PURE__ */
|
|
4965
|
+
) : /* @__PURE__ */ jsx66("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
4966
|
+
/* @__PURE__ */ jsx66("span", { className: "px-2 py-1", children: "..." }),
|
|
4967
|
+
/* @__PURE__ */ jsx66(
|
|
4835
4968
|
Hyperlink,
|
|
4836
4969
|
{
|
|
4837
4970
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4839,7 +4972,7 @@ var DataList = (props) => {
|
|
|
4839
4972
|
children: pages - 1
|
|
4840
4973
|
}
|
|
4841
4974
|
),
|
|
4842
|
-
/* @__PURE__ */
|
|
4975
|
+
/* @__PURE__ */ jsx66(
|
|
4843
4976
|
Hyperlink,
|
|
4844
4977
|
{
|
|
4845
4978
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4847,7 +4980,7 @@ var DataList = (props) => {
|
|
|
4847
4980
|
children: pages
|
|
4848
4981
|
}
|
|
4849
4982
|
),
|
|
4850
|
-
/* @__PURE__ */
|
|
4983
|
+
/* @__PURE__ */ jsx66("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs36(
|
|
4851
4984
|
"select",
|
|
4852
4985
|
{
|
|
4853
4986
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4859,18 +4992,18 @@ var DataList = (props) => {
|
|
|
4859
4992
|
}
|
|
4860
4993
|
},
|
|
4861
4994
|
children: [
|
|
4862
|
-
/* @__PURE__ */
|
|
4995
|
+
/* @__PURE__ */ jsx66("option", { className: "", value: "", children: "Jump to" }),
|
|
4863
4996
|
Array.from(
|
|
4864
4997
|
{ length: Math.max(0, pages - 10) },
|
|
4865
4998
|
(_, index) => index + 9
|
|
4866
|
-
).map((page) => /* @__PURE__ */
|
|
4999
|
+
).map((page) => /* @__PURE__ */ jsx66("option", { value: page, children: page }, page))
|
|
4867
5000
|
]
|
|
4868
5001
|
}
|
|
4869
5002
|
) })
|
|
4870
5003
|
] });
|
|
4871
5004
|
} else if (showLastPages) {
|
|
4872
|
-
return /* @__PURE__ */
|
|
4873
|
-
/* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ jsxs36(Fragment10, { children: [
|
|
5006
|
+
/* @__PURE__ */ jsx66(
|
|
4874
5007
|
Hyperlink,
|
|
4875
5008
|
{
|
|
4876
5009
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4878,7 +5011,7 @@ var DataList = (props) => {
|
|
|
4878
5011
|
children: "1"
|
|
4879
5012
|
}
|
|
4880
5013
|
),
|
|
4881
|
-
/* @__PURE__ */
|
|
5014
|
+
/* @__PURE__ */ jsx66(
|
|
4882
5015
|
Hyperlink,
|
|
4883
5016
|
{
|
|
4884
5017
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4886,21 +5019,21 @@ var DataList = (props) => {
|
|
|
4886
5019
|
children: "2"
|
|
4887
5020
|
}
|
|
4888
5021
|
),
|
|
4889
|
-
/* @__PURE__ */
|
|
5022
|
+
/* @__PURE__ */ jsx66("span", { className: "px-2 py-1", children: "..." }),
|
|
4890
5023
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
4891
|
-
(page) => /* @__PURE__ */
|
|
5024
|
+
(page) => /* @__PURE__ */ jsx66(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx66(
|
|
4892
5025
|
Hyperlink,
|
|
4893
5026
|
{
|
|
4894
5027
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4895
5028
|
href: builder.getNewPageUrl(page),
|
|
4896
5029
|
children: page
|
|
4897
5030
|
}
|
|
4898
|
-
) : /* @__PURE__ */
|
|
5031
|
+
) : /* @__PURE__ */ jsx66("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
4899
5032
|
)
|
|
4900
5033
|
] });
|
|
4901
5034
|
} else {
|
|
4902
|
-
return /* @__PURE__ */
|
|
4903
|
-
/* @__PURE__ */
|
|
5035
|
+
return /* @__PURE__ */ jsxs36(Fragment10, { children: [
|
|
5036
|
+
/* @__PURE__ */ jsx66(
|
|
4904
5037
|
Hyperlink,
|
|
4905
5038
|
{
|
|
4906
5039
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4908,7 +5041,7 @@ var DataList = (props) => {
|
|
|
4908
5041
|
children: "1"
|
|
4909
5042
|
}
|
|
4910
5043
|
),
|
|
4911
|
-
/* @__PURE__ */
|
|
5044
|
+
/* @__PURE__ */ jsx66(
|
|
4912
5045
|
Hyperlink,
|
|
4913
5046
|
{
|
|
4914
5047
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4916,20 +5049,20 @@ var DataList = (props) => {
|
|
|
4916
5049
|
children: "2"
|
|
4917
5050
|
}
|
|
4918
5051
|
),
|
|
4919
|
-
/* @__PURE__ */
|
|
5052
|
+
/* @__PURE__ */ jsx66("span", { className: "px-2 py-1", children: "..." }),
|
|
4920
5053
|
Array.from(
|
|
4921
5054
|
{ length: 5 },
|
|
4922
5055
|
(_, index) => activePageNumber - 2 + index
|
|
4923
|
-
).map((page) => /* @__PURE__ */
|
|
5056
|
+
).map((page) => /* @__PURE__ */ jsx66(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx66(
|
|
4924
5057
|
Hyperlink,
|
|
4925
5058
|
{
|
|
4926
5059
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4927
5060
|
href: builder.getNewPageUrl(page),
|
|
4928
5061
|
children: page
|
|
4929
5062
|
}
|
|
4930
|
-
) : /* @__PURE__ */
|
|
4931
|
-
/* @__PURE__ */
|
|
4932
|
-
/* @__PURE__ */
|
|
5063
|
+
) : /* @__PURE__ */ jsx66("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
5064
|
+
/* @__PURE__ */ jsx66("span", { className: "px-2 py-1", children: "..." }),
|
|
5065
|
+
/* @__PURE__ */ jsx66(
|
|
4933
5066
|
Hyperlink,
|
|
4934
5067
|
{
|
|
4935
5068
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4937,7 +5070,7 @@ var DataList = (props) => {
|
|
|
4937
5070
|
children: pages - 1
|
|
4938
5071
|
}
|
|
4939
5072
|
),
|
|
4940
|
-
/* @__PURE__ */
|
|
5073
|
+
/* @__PURE__ */ jsx66(
|
|
4941
5074
|
Hyperlink,
|
|
4942
5075
|
{
|
|
4943
5076
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4945,7 +5078,7 @@ var DataList = (props) => {
|
|
|
4945
5078
|
children: pages
|
|
4946
5079
|
}
|
|
4947
5080
|
),
|
|
4948
|
-
/* @__PURE__ */
|
|
5081
|
+
/* @__PURE__ */ jsx66("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs36(
|
|
4949
5082
|
"select",
|
|
4950
5083
|
{
|
|
4951
5084
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4957,8 +5090,8 @@ var DataList = (props) => {
|
|
|
4957
5090
|
}
|
|
4958
5091
|
},
|
|
4959
5092
|
children: [
|
|
4960
|
-
/* @__PURE__ */
|
|
4961
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
5093
|
+
/* @__PURE__ */ jsx66("option", { value: "", children: "Jump to" }),
|
|
5094
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx66("option", { value: page, children: page }, page))
|
|
4962
5095
|
]
|
|
4963
5096
|
}
|
|
4964
5097
|
) })
|
|
@@ -4966,16 +5099,16 @@ var DataList = (props) => {
|
|
|
4966
5099
|
}
|
|
4967
5100
|
}
|
|
4968
5101
|
};
|
|
4969
|
-
return /* @__PURE__ */
|
|
4970
|
-
/* @__PURE__ */
|
|
4971
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
5102
|
+
return /* @__PURE__ */ jsxs36(React46.Fragment, { children: [
|
|
5103
|
+
/* @__PURE__ */ jsxs36(ContentView_default, { isDataFound, children: [
|
|
5104
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs36(
|
|
4972
5105
|
"div",
|
|
4973
5106
|
{
|
|
4974
5107
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
4975
5108
|
children: [
|
|
4976
|
-
props.title ? /* @__PURE__ */
|
|
4977
|
-
/* @__PURE__ */
|
|
4978
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
5109
|
+
props.title ? /* @__PURE__ */ jsx66("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx66("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx66("div", {}),
|
|
5110
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
5111
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx66(
|
|
4979
5112
|
InputControl_default,
|
|
4980
5113
|
{
|
|
4981
5114
|
name: "Search_input",
|
|
@@ -4987,7 +5120,7 @@ var DataList = (props) => {
|
|
|
4987
5120
|
}
|
|
4988
5121
|
}
|
|
4989
5122
|
),
|
|
4990
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
5123
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx66(
|
|
4991
5124
|
InputControl_default,
|
|
4992
5125
|
{
|
|
4993
5126
|
name: filter.name,
|
|
@@ -5002,15 +5135,15 @@ var DataList = (props) => {
|
|
|
5002
5135
|
},
|
|
5003
5136
|
filter.name
|
|
5004
5137
|
)),
|
|
5005
|
-
props.addLinkHref && /* @__PURE__ */
|
|
5138
|
+
props.addLinkHref && /* @__PURE__ */ jsxs36(
|
|
5006
5139
|
Hyperlink,
|
|
5007
5140
|
{
|
|
5008
5141
|
className: "gap-1",
|
|
5009
5142
|
linkType: "Primary" /* Solid */,
|
|
5010
5143
|
href: props.addLinkHref,
|
|
5011
5144
|
children: [
|
|
5012
|
-
/* @__PURE__ */
|
|
5013
|
-
/* @__PURE__ */
|
|
5145
|
+
/* @__PURE__ */ jsx66(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
5146
|
+
/* @__PURE__ */ jsx66("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
5014
5147
|
]
|
|
5015
5148
|
}
|
|
5016
5149
|
)
|
|
@@ -5018,8 +5151,8 @@ var DataList = (props) => {
|
|
|
5018
5151
|
]
|
|
5019
5152
|
}
|
|
5020
5153
|
),
|
|
5021
|
-
/* @__PURE__ */
|
|
5022
|
-
/* @__PURE__ */
|
|
5154
|
+
/* @__PURE__ */ jsx66("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs36("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
5155
|
+
/* @__PURE__ */ jsx66("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx66("tr", { children: props?.columns?.map((column) => {
|
|
5023
5156
|
let url = builder.getNewOrderByUrl(column.name);
|
|
5024
5157
|
let icon = "chevronUpDown";
|
|
5025
5158
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -5029,18 +5162,18 @@ var DataList = (props) => {
|
|
|
5029
5162
|
icon = "chevronUp";
|
|
5030
5163
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
5031
5164
|
}
|
|
5032
|
-
return /* @__PURE__ */
|
|
5165
|
+
return /* @__PURE__ */ jsx66(
|
|
5033
5166
|
"th",
|
|
5034
5167
|
{
|
|
5035
5168
|
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" : ""),
|
|
5036
|
-
children: /* @__PURE__ */
|
|
5169
|
+
children: /* @__PURE__ */ jsx66(
|
|
5037
5170
|
Hyperlink,
|
|
5038
5171
|
{
|
|
5039
5172
|
href: column.enableSorting ? url : void 0,
|
|
5040
5173
|
className: "!text-neutral-contrast ",
|
|
5041
|
-
children: /* @__PURE__ */
|
|
5042
|
-
/* @__PURE__ */
|
|
5043
|
-
column.enableSorting && /* @__PURE__ */
|
|
5174
|
+
children: /* @__PURE__ */ jsxs36("span", { className: "flex items-center space-x-1", children: [
|
|
5175
|
+
/* @__PURE__ */ jsx66("span", { className: "text-black", children: column.label }),
|
|
5176
|
+
column.enableSorting && /* @__PURE__ */ jsx66(Icon_default, { className: "w-4 h-4", name: icon })
|
|
5044
5177
|
] })
|
|
5045
5178
|
}
|
|
5046
5179
|
)
|
|
@@ -5048,24 +5181,24 @@ var DataList = (props) => {
|
|
|
5048
5181
|
column.name
|
|
5049
5182
|
);
|
|
5050
5183
|
}) }) }),
|
|
5051
|
-
/* @__PURE__ */
|
|
5184
|
+
/* @__PURE__ */ jsx66("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
5052
5185
|
let validityClass = "";
|
|
5053
5186
|
console.log("dataitem", dataitem);
|
|
5054
5187
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
5055
5188
|
validityClass = "bg-alert-200";
|
|
5056
5189
|
}
|
|
5057
|
-
return /* @__PURE__ */
|
|
5190
|
+
return /* @__PURE__ */ jsx66("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
5058
5191
|
console.log("column", column);
|
|
5059
|
-
return /* @__PURE__ */
|
|
5192
|
+
return /* @__PURE__ */ jsx66(React46.Fragment, { children: /* @__PURE__ */ jsx66(
|
|
5060
5193
|
"td",
|
|
5061
5194
|
{
|
|
5062
5195
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
5063
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
5196
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx66(
|
|
5064
5197
|
Hyperlink,
|
|
5065
5198
|
{
|
|
5066
5199
|
className: "",
|
|
5067
5200
|
href: `https://${dataitem[column.name]}`,
|
|
5068
|
-
children: /* @__PURE__ */
|
|
5201
|
+
children: /* @__PURE__ */ jsx66(
|
|
5069
5202
|
ViewControl_default,
|
|
5070
5203
|
{
|
|
5071
5204
|
controlType: column.controlType,
|
|
@@ -5078,11 +5211,11 @@ var DataList = (props) => {
|
|
|
5078
5211
|
}
|
|
5079
5212
|
)
|
|
5080
5213
|
}
|
|
5081
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
5214
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx66(
|
|
5082
5215
|
Hyperlink,
|
|
5083
5216
|
{
|
|
5084
5217
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
5085
|
-
children: /* @__PURE__ */
|
|
5218
|
+
children: /* @__PURE__ */ jsx66(
|
|
5086
5219
|
ViewControl_default,
|
|
5087
5220
|
{
|
|
5088
5221
|
controlType: column.controlType,
|
|
@@ -5092,7 +5225,7 @@ var DataList = (props) => {
|
|
|
5092
5225
|
}
|
|
5093
5226
|
)
|
|
5094
5227
|
}
|
|
5095
|
-
) : /* @__PURE__ */
|
|
5228
|
+
) : /* @__PURE__ */ jsx66(
|
|
5096
5229
|
ViewControl_default,
|
|
5097
5230
|
{
|
|
5098
5231
|
controlType: column.controlType,
|
|
@@ -5106,10 +5239,10 @@ var DataList = (props) => {
|
|
|
5106
5239
|
}) }, index);
|
|
5107
5240
|
}) })
|
|
5108
5241
|
] }) }),
|
|
5109
|
-
/* @__PURE__ */
|
|
5110
|
-
/* @__PURE__ */
|
|
5111
|
-
/* @__PURE__ */
|
|
5112
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
5242
|
+
/* @__PURE__ */ jsx66("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between", children: [
|
|
5243
|
+
/* @__PURE__ */ jsx66("div", { className: "text-gray-700", children: label }),
|
|
5244
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex space-x-2 items-center", children: [
|
|
5245
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx66(
|
|
5113
5246
|
Hyperlink,
|
|
5114
5247
|
{
|
|
5115
5248
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -5117,9 +5250,9 @@ var DataList = (props) => {
|
|
|
5117
5250
|
children: "Prev"
|
|
5118
5251
|
}
|
|
5119
5252
|
),
|
|
5120
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
5253
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx66("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" }),
|
|
5121
5254
|
renderPageNumbers(),
|
|
5122
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
5255
|
+
activePageNumber < pages && /* @__PURE__ */ jsx66(
|
|
5123
5256
|
Hyperlink,
|
|
5124
5257
|
{
|
|
5125
5258
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -5127,19 +5260,19 @@ var DataList = (props) => {
|
|
|
5127
5260
|
children: "Next"
|
|
5128
5261
|
}
|
|
5129
5262
|
),
|
|
5130
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
5263
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx66("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
5131
5264
|
] })
|
|
5132
5265
|
] }) })
|
|
5133
5266
|
] }),
|
|
5134
|
-
/* @__PURE__ */
|
|
5135
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
5267
|
+
/* @__PURE__ */ jsxs36(NoContentView_default, { isDataFound, children: [
|
|
5268
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs36(
|
|
5136
5269
|
"div",
|
|
5137
5270
|
{
|
|
5138
5271
|
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`,
|
|
5139
5272
|
children: [
|
|
5140
|
-
props.title ? /* @__PURE__ */
|
|
5141
|
-
/* @__PURE__ */
|
|
5142
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
5273
|
+
props.title ? /* @__PURE__ */ jsx66("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx66("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx66("div", {}),
|
|
5274
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
5275
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx66(
|
|
5143
5276
|
InputControl_default,
|
|
5144
5277
|
{
|
|
5145
5278
|
name: "Search_input",
|
|
@@ -5151,7 +5284,7 @@ var DataList = (props) => {
|
|
|
5151
5284
|
}
|
|
5152
5285
|
}
|
|
5153
5286
|
),
|
|
5154
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
5287
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx66(
|
|
5155
5288
|
InputControl_default,
|
|
5156
5289
|
{
|
|
5157
5290
|
name: filter.name,
|
|
@@ -5166,15 +5299,15 @@ var DataList = (props) => {
|
|
|
5166
5299
|
},
|
|
5167
5300
|
filter.name
|
|
5168
5301
|
)),
|
|
5169
|
-
props.addLinkHref && /* @__PURE__ */
|
|
5302
|
+
props.addLinkHref && /* @__PURE__ */ jsxs36(
|
|
5170
5303
|
Hyperlink,
|
|
5171
5304
|
{
|
|
5172
5305
|
className: "gap-1",
|
|
5173
5306
|
linkType: "Primary" /* Solid */,
|
|
5174
5307
|
href: props.addLinkHref,
|
|
5175
5308
|
children: [
|
|
5176
|
-
/* @__PURE__ */
|
|
5177
|
-
/* @__PURE__ */
|
|
5309
|
+
/* @__PURE__ */ jsx66(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
5310
|
+
/* @__PURE__ */ jsx66("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
5178
5311
|
]
|
|
5179
5312
|
}
|
|
5180
5313
|
)
|
|
@@ -5182,8 +5315,8 @@ var DataList = (props) => {
|
|
|
5182
5315
|
]
|
|
5183
5316
|
}
|
|
5184
5317
|
),
|
|
5185
|
-
/* @__PURE__ */
|
|
5186
|
-
/* @__PURE__ */
|
|
5318
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
5319
|
+
/* @__PURE__ */ jsx66("div", { children: /* @__PURE__ */ jsx66("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx66("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx66("tr", { children: props?.columns?.map((column) => {
|
|
5187
5320
|
let url = builder.getNewOrderByUrl(column.name);
|
|
5188
5321
|
let icon = "chevronUpDown";
|
|
5189
5322
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -5193,18 +5326,18 @@ var DataList = (props) => {
|
|
|
5193
5326
|
icon = "chevronUp";
|
|
5194
5327
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
5195
5328
|
}
|
|
5196
|
-
return /* @__PURE__ */
|
|
5329
|
+
return /* @__PURE__ */ jsx66(
|
|
5197
5330
|
"th",
|
|
5198
5331
|
{
|
|
5199
5332
|
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" : ""),
|
|
5200
|
-
children: /* @__PURE__ */
|
|
5333
|
+
children: /* @__PURE__ */ jsx66(
|
|
5201
5334
|
Hyperlink,
|
|
5202
5335
|
{
|
|
5203
5336
|
href: column.enableSorting ? url : void 0,
|
|
5204
5337
|
className: "text-body-950",
|
|
5205
|
-
children: /* @__PURE__ */
|
|
5206
|
-
/* @__PURE__ */
|
|
5207
|
-
column.enableSorting && /* @__PURE__ */
|
|
5338
|
+
children: /* @__PURE__ */ jsxs36("span", { className: "flex items-center space-x-1", children: [
|
|
5339
|
+
/* @__PURE__ */ jsx66("span", { children: column.label }),
|
|
5340
|
+
column.enableSorting && /* @__PURE__ */ jsx66(Icon_default, { className: "w-4 h-4", name: icon })
|
|
5208
5341
|
] })
|
|
5209
5342
|
}
|
|
5210
5343
|
)
|
|
@@ -5212,7 +5345,7 @@ var DataList = (props) => {
|
|
|
5212
5345
|
column.name
|
|
5213
5346
|
);
|
|
5214
5347
|
}) }) }) }) }),
|
|
5215
|
-
/* @__PURE__ */
|
|
5348
|
+
/* @__PURE__ */ jsx66("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
5216
5349
|
] })
|
|
5217
5350
|
] })
|
|
5218
5351
|
] });
|
|
@@ -5222,7 +5355,7 @@ var DataList_default = DataList;
|
|
|
5222
5355
|
// src/components/dataForm/DataListRenderer.tsx
|
|
5223
5356
|
import React47, { useState as useState10, useEffect as useEffect11 } from "react";
|
|
5224
5357
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
5225
|
-
import { jsx as
|
|
5358
|
+
import { jsx as jsx67, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5226
5359
|
var viewControlMap = {
|
|
5227
5360
|
number: ViewControlTypes.number,
|
|
5228
5361
|
lineText: ViewControlTypes.lineText,
|
|
@@ -5312,9 +5445,9 @@ var DataListRenderer = ({
|
|
|
5312
5445
|
const [tabItem, setTabItem] = useState10();
|
|
5313
5446
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
5314
5447
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
5315
|
-
return /* @__PURE__ */
|
|
5316
|
-
widgetProps && /* @__PURE__ */
|
|
5317
|
-
/* @__PURE__ */
|
|
5448
|
+
return /* @__PURE__ */ jsxs37(React47.Fragment, { children: [
|
|
5449
|
+
widgetProps && /* @__PURE__ */ jsx67(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
5450
|
+
/* @__PURE__ */ jsx67(
|
|
5318
5451
|
DataList_default,
|
|
5319
5452
|
{
|
|
5320
5453
|
addLinkHref,
|
|
@@ -5359,7 +5492,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
5359
5492
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
5360
5493
|
|
|
5361
5494
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
5362
|
-
import { jsx as
|
|
5495
|
+
import { jsx as jsx68, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5363
5496
|
var DataFormChildSection = (props) => {
|
|
5364
5497
|
const { section } = props;
|
|
5365
5498
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -5427,14 +5560,14 @@ var DataFormChildSection = (props) => {
|
|
|
5427
5560
|
childItemsToRender,
|
|
5428
5561
|
allChildItems: childItems
|
|
5429
5562
|
});
|
|
5430
|
-
return /* @__PURE__ */
|
|
5431
|
-
section.sectionTitle && /* @__PURE__ */
|
|
5432
|
-
/* @__PURE__ */
|
|
5433
|
-
/* @__PURE__ */
|
|
5434
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */
|
|
5435
|
-
return /* @__PURE__ */
|
|
5563
|
+
return /* @__PURE__ */ jsx68(React48.Fragment, { children: /* @__PURE__ */ jsxs38("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
5564
|
+
section.sectionTitle && /* @__PURE__ */ jsx68("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
5565
|
+
/* @__PURE__ */ jsx68("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
5566
|
+
/* @__PURE__ */ jsx68("div", { children: /* @__PURE__ */ jsxs38("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
5567
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ jsx68("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
5568
|
+
return /* @__PURE__ */ jsxs38("tr", { className: "", children: [
|
|
5436
5569
|
sectionRow.elements.map((field, index) => {
|
|
5437
|
-
return /* @__PURE__ */
|
|
5570
|
+
return /* @__PURE__ */ jsx68(
|
|
5438
5571
|
"th",
|
|
5439
5572
|
{
|
|
5440
5573
|
className: "py-3 font-normal text-left",
|
|
@@ -5443,21 +5576,21 @@ var DataFormChildSection = (props) => {
|
|
|
5443
5576
|
field.name
|
|
5444
5577
|
);
|
|
5445
5578
|
}),
|
|
5446
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5579
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx68("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
5447
5580
|
] }, sectionRowIndex);
|
|
5448
5581
|
}) }),
|
|
5449
|
-
/* @__PURE__ */
|
|
5582
|
+
/* @__PURE__ */ jsx68("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
5450
5583
|
const { item, originalIndex } = visibleItem;
|
|
5451
5584
|
const rowKey = originalIndex;
|
|
5452
|
-
return /* @__PURE__ */
|
|
5585
|
+
return /* @__PURE__ */ jsx68(React48.Fragment, { children: section.sectionRows.map(
|
|
5453
5586
|
(sectionRow, sectionRowIndex) => {
|
|
5454
|
-
return /* @__PURE__ */
|
|
5587
|
+
return /* @__PURE__ */ jsxs38(
|
|
5455
5588
|
"tr",
|
|
5456
5589
|
{
|
|
5457
5590
|
className: "",
|
|
5458
5591
|
children: [
|
|
5459
5592
|
sectionRow.elements.map((field, index) => {
|
|
5460
|
-
return /* @__PURE__ */
|
|
5593
|
+
return /* @__PURE__ */ jsx68("td", { children: /* @__PURE__ */ jsx68("div", { className: "flex-1", children: /* @__PURE__ */ jsx68("div", { className: "w-11/12", children: /* @__PURE__ */ jsx68(
|
|
5461
5594
|
InputControl_default,
|
|
5462
5595
|
{
|
|
5463
5596
|
index: filteredIndex,
|
|
@@ -5477,7 +5610,7 @@ var DataFormChildSection = (props) => {
|
|
|
5477
5610
|
}
|
|
5478
5611
|
) }) }) }, field.name);
|
|
5479
5612
|
}),
|
|
5480
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5613
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx68("td", { children: /* @__PURE__ */ jsx68(
|
|
5481
5614
|
ClientButton_default,
|
|
5482
5615
|
{
|
|
5483
5616
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -5486,7 +5619,7 @@ var DataFormChildSection = (props) => {
|
|
|
5486
5619
|
},
|
|
5487
5620
|
dataRole: "delete",
|
|
5488
5621
|
tabIndex: -1,
|
|
5489
|
-
children: /* @__PURE__ */
|
|
5622
|
+
children: /* @__PURE__ */ jsx68(
|
|
5490
5623
|
Icon_default,
|
|
5491
5624
|
{
|
|
5492
5625
|
className: "w-4 h-4",
|
|
@@ -5503,7 +5636,7 @@ var DataFormChildSection = (props) => {
|
|
|
5503
5636
|
) }, rowKey);
|
|
5504
5637
|
}) })
|
|
5505
5638
|
] }) }),
|
|
5506
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5639
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx68("div", { className: "ml-1", children: /* @__PURE__ */ jsx68(
|
|
5507
5640
|
ClientButton_default,
|
|
5508
5641
|
{
|
|
5509
5642
|
ButtonType: "Link" /* Link */,
|
|
@@ -5518,7 +5651,7 @@ var DataFormChildSection = (props) => {
|
|
|
5518
5651
|
var DataFormChildSection_default = DataFormChildSection;
|
|
5519
5652
|
|
|
5520
5653
|
// src/components/dataForm/DataForm.tsx
|
|
5521
|
-
import { jsx as
|
|
5654
|
+
import { jsx as jsx69, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5522
5655
|
var DataForm = (props) => {
|
|
5523
5656
|
const formRef = useRef4(null);
|
|
5524
5657
|
console.log(props.dataItem, "dssads");
|
|
@@ -5738,19 +5871,19 @@ var DataForm = (props) => {
|
|
|
5738
5871
|
return false;
|
|
5739
5872
|
}
|
|
5740
5873
|
}
|
|
5741
|
-
return /* @__PURE__ */
|
|
5742
|
-
props.title && /* @__PURE__ */
|
|
5874
|
+
return /* @__PURE__ */ jsx69(React49.Fragment, { children: /* @__PURE__ */ jsxs39("div", { className: "flex-grow flex flex-col", children: [
|
|
5875
|
+
props.title && /* @__PURE__ */ jsx69("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__ */ jsxs39(
|
|
5743
5876
|
"div",
|
|
5744
5877
|
{
|
|
5745
5878
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
5746
5879
|
onClick: () => window.history.back(),
|
|
5747
5880
|
children: [
|
|
5748
|
-
/* @__PURE__ */
|
|
5749
|
-
/* @__PURE__ */
|
|
5881
|
+
/* @__PURE__ */ jsx69(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
5882
|
+
/* @__PURE__ */ jsx69("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
5750
5883
|
]
|
|
5751
5884
|
}
|
|
5752
5885
|
) }),
|
|
5753
|
-
/* @__PURE__ */
|
|
5886
|
+
/* @__PURE__ */ jsx69(
|
|
5754
5887
|
"form",
|
|
5755
5888
|
{
|
|
5756
5889
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -5771,8 +5904,8 @@ var DataForm = (props) => {
|
|
|
5771
5904
|
}
|
|
5772
5905
|
}
|
|
5773
5906
|
},
|
|
5774
|
-
children: /* @__PURE__ */
|
|
5775
|
-
return /* @__PURE__ */
|
|
5907
|
+
children: /* @__PURE__ */ jsx69("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
5908
|
+
return /* @__PURE__ */ jsx69(React49.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs39("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
5776
5909
|
section.sectionRows?.map(
|
|
5777
5910
|
(sectionRow, sectionRowIndex) => {
|
|
5778
5911
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -5783,14 +5916,14 @@ var DataForm = (props) => {
|
|
|
5783
5916
|
sectionRow.visible
|
|
5784
5917
|
);
|
|
5785
5918
|
}
|
|
5786
|
-
return /* @__PURE__ */
|
|
5787
|
-
return /* @__PURE__ */
|
|
5919
|
+
return /* @__PURE__ */ jsx69(React49.Fragment, { children: isVisible && /* @__PURE__ */ jsx69("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
5920
|
+
return /* @__PURE__ */ jsxs39(
|
|
5788
5921
|
"div",
|
|
5789
5922
|
{
|
|
5790
5923
|
className: sectionRow.grow ? "grow" : "",
|
|
5791
5924
|
children: [
|
|
5792
|
-
/* @__PURE__ */
|
|
5793
|
-
/* @__PURE__ */
|
|
5925
|
+
/* @__PURE__ */ jsx69("div", { children: field.controlType }),
|
|
5926
|
+
/* @__PURE__ */ jsx69(
|
|
5794
5927
|
InputControl_default,
|
|
5795
5928
|
{
|
|
5796
5929
|
name: field.name,
|
|
@@ -5820,12 +5953,12 @@ var DataForm = (props) => {
|
|
|
5820
5953
|
}) }) }, sectionRowIndex);
|
|
5821
5954
|
}
|
|
5822
5955
|
),
|
|
5823
|
-
/* @__PURE__ */
|
|
5956
|
+
/* @__PURE__ */ jsx69("div", { children: section.childSections?.map(
|
|
5824
5957
|
(childSection, childSectionIndex) => {
|
|
5825
|
-
return /* @__PURE__ */
|
|
5958
|
+
return /* @__PURE__ */ jsx69("div", { children: childSection.name && evalutateCondition(
|
|
5826
5959
|
formState.inputValues,
|
|
5827
5960
|
childSection.visible
|
|
5828
|
-
) && /* @__PURE__ */
|
|
5961
|
+
) && /* @__PURE__ */ jsx69(
|
|
5829
5962
|
DataFormChildSection_default,
|
|
5830
5963
|
{
|
|
5831
5964
|
section: childSection,
|
|
@@ -5840,8 +5973,8 @@ var DataForm = (props) => {
|
|
|
5840
5973
|
}) })
|
|
5841
5974
|
}
|
|
5842
5975
|
),
|
|
5843
|
-
/* @__PURE__ */
|
|
5844
|
-
/* @__PURE__ */
|
|
5976
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
5977
|
+
/* @__PURE__ */ jsx69("div", { children: props.additionalActions && /* @__PURE__ */ jsx69(
|
|
5845
5978
|
Button_default,
|
|
5846
5979
|
{
|
|
5847
5980
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5849,7 +5982,7 @@ var DataForm = (props) => {
|
|
|
5849
5982
|
children: props.additionalActions.title
|
|
5850
5983
|
}
|
|
5851
5984
|
) }),
|
|
5852
|
-
/* @__PURE__ */
|
|
5985
|
+
/* @__PURE__ */ jsx69("div", { children: props.onDelete && /* @__PURE__ */ jsx69(
|
|
5853
5986
|
Button_default,
|
|
5854
5987
|
{
|
|
5855
5988
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5860,7 +5993,7 @@ var DataForm = (props) => {
|
|
|
5860
5993
|
children: "Delete"
|
|
5861
5994
|
}
|
|
5862
5995
|
) }),
|
|
5863
|
-
/* @__PURE__ */
|
|
5996
|
+
/* @__PURE__ */ jsx69("div", { children: props.onClick && /* @__PURE__ */ jsx69(
|
|
5864
5997
|
Button_default,
|
|
5865
5998
|
{
|
|
5866
5999
|
onValidate,
|
|
@@ -5877,7 +6010,7 @@ var DataForm = (props) => {
|
|
|
5877
6010
|
var DataForm_default = DataForm;
|
|
5878
6011
|
|
|
5879
6012
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
5880
|
-
import { jsx as
|
|
6013
|
+
import { jsx as jsx70, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5881
6014
|
function getAction(actions, code) {
|
|
5882
6015
|
return actions?.find((a) => a.actionCode === code);
|
|
5883
6016
|
}
|
|
@@ -5903,9 +6036,9 @@ var DataFormRenderer = ({
|
|
|
5903
6036
|
"Delete"
|
|
5904
6037
|
);
|
|
5905
6038
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
5906
|
-
return /* @__PURE__ */
|
|
5907
|
-
widgetProps && /* @__PURE__ */
|
|
5908
|
-
/* @__PURE__ */
|
|
6039
|
+
return /* @__PURE__ */ jsxs40("div", { className: "flex-grow flex flex-col", children: [
|
|
6040
|
+
widgetProps && /* @__PURE__ */ jsx70(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
6041
|
+
/* @__PURE__ */ jsx70(
|
|
5909
6042
|
DataForm_default,
|
|
5910
6043
|
{
|
|
5911
6044
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|