@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260929055955 → 0.8.1-dev.20260930101733
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 +717 -632
- package/dist/index.mjs +449 -364
- package/dist/server.js +520 -435
- package/dist/server.mjs +239 -154
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5435,9 +5435,9 @@ __export(CopyButton_exports, {
|
|
|
5435
5435
|
default: () => CopyButton
|
|
5436
5436
|
});
|
|
5437
5437
|
function CopyButton({ text }) {
|
|
5438
|
-
const [copied, setCopied] = (0,
|
|
5439
|
-
const timeoutRef = (0,
|
|
5440
|
-
(0,
|
|
5438
|
+
const [copied, setCopied] = (0, import_react54.useState)(false);
|
|
5439
|
+
const timeoutRef = (0, import_react54.useRef)(null);
|
|
5440
|
+
(0, import_react54.useEffect)(() => {
|
|
5441
5441
|
return () => {
|
|
5442
5442
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5443
5443
|
};
|
|
@@ -5452,13 +5452,13 @@ function CopyButton({ text }) {
|
|
|
5452
5452
|
console.error("Failed to copy: ", err);
|
|
5453
5453
|
}
|
|
5454
5454
|
};
|
|
5455
|
-
return /* @__PURE__ */ (0,
|
|
5455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
5456
5456
|
"button",
|
|
5457
5457
|
{
|
|
5458
5458
|
onClick: handleCopy,
|
|
5459
5459
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
5460
5460
|
children: [
|
|
5461
|
-
/* @__PURE__ */ (0,
|
|
5461
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5462
5462
|
"svg",
|
|
5463
5463
|
{
|
|
5464
5464
|
width: "16",
|
|
@@ -5466,7 +5466,7 @@ function CopyButton({ text }) {
|
|
|
5466
5466
|
viewBox: "0 0 24 24",
|
|
5467
5467
|
className: "w-4 h-4",
|
|
5468
5468
|
fill: "currentColor",
|
|
5469
|
-
children: /* @__PURE__ */ (0,
|
|
5469
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5470
5470
|
"path",
|
|
5471
5471
|
{
|
|
5472
5472
|
fillRule: "evenodd",
|
|
@@ -5481,54 +5481,54 @@ function CopyButton({ text }) {
|
|
|
5481
5481
|
}
|
|
5482
5482
|
);
|
|
5483
5483
|
}
|
|
5484
|
-
var
|
|
5484
|
+
var import_react54, import_jsx_runtime74;
|
|
5485
5485
|
var init_CopyButton = __esm({
|
|
5486
5486
|
"src/components/CopyButton.tsx"() {
|
|
5487
5487
|
"use strict";
|
|
5488
5488
|
"use client";
|
|
5489
|
-
|
|
5490
|
-
|
|
5489
|
+
import_react54 = require("react");
|
|
5490
|
+
import_jsx_runtime74 = require("react/jsx-runtime");
|
|
5491
5491
|
}
|
|
5492
5492
|
});
|
|
5493
5493
|
|
|
5494
5494
|
// src/components/IFrameLoaderView.tsx
|
|
5495
|
-
var
|
|
5495
|
+
var import_react57, import_jsx_runtime78, IFrameLoaderView, IFrameLoaderView_default;
|
|
5496
5496
|
var init_IFrameLoaderView = __esm({
|
|
5497
5497
|
"src/components/IFrameLoaderView.tsx"() {
|
|
5498
5498
|
"use strict";
|
|
5499
|
-
|
|
5500
|
-
|
|
5499
|
+
import_react57 = __toESM(require("react"));
|
|
5500
|
+
import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5501
5501
|
IFrameLoaderView = (props) => {
|
|
5502
|
-
return /* @__PURE__ */ (0,
|
|
5503
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
5504
|
-
/* @__PURE__ */ (0,
|
|
5505
|
-
/* @__PURE__ */ (0,
|
|
5506
|
-
/* @__PURE__ */ (0,
|
|
5507
|
-
/* @__PURE__ */ (0,
|
|
5508
|
-
/* @__PURE__ */ (0,
|
|
5502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react57.default.Fragment, { children: [
|
|
5503
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
5504
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
5505
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
5506
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "ml-2", children: [
|
|
5507
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
5508
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
5509
5509
|
] })
|
|
5510
5510
|
] }),
|
|
5511
|
-
/* @__PURE__ */ (0,
|
|
5512
|
-
/* @__PURE__ */ (0,
|
|
5513
|
-
/* @__PURE__ */ (0,
|
|
5514
|
-
/* @__PURE__ */ (0,
|
|
5515
|
-
/* @__PURE__ */ (0,
|
|
5516
|
-
/* @__PURE__ */ (0,
|
|
5517
|
-
/* @__PURE__ */ (0,
|
|
5511
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
5512
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "animate-pulse", children: [
|
|
5513
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5514
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5515
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5516
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5517
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5518
5518
|
] }),
|
|
5519
|
-
/* @__PURE__ */ (0,
|
|
5520
|
-
/* @__PURE__ */ (0,
|
|
5521
|
-
/* @__PURE__ */ (0,
|
|
5522
|
-
/* @__PURE__ */ (0,
|
|
5523
|
-
/* @__PURE__ */ (0,
|
|
5524
|
-
/* @__PURE__ */ (0,
|
|
5519
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "animate-pulse", children: [
|
|
5520
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5521
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5522
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5523
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5524
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5525
5525
|
] }),
|
|
5526
|
-
/* @__PURE__ */ (0,
|
|
5527
|
-
/* @__PURE__ */ (0,
|
|
5528
|
-
/* @__PURE__ */ (0,
|
|
5529
|
-
/* @__PURE__ */ (0,
|
|
5530
|
-
/* @__PURE__ */ (0,
|
|
5531
|
-
/* @__PURE__ */ (0,
|
|
5526
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "animate-pulse", children: [
|
|
5527
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5528
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5529
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5530
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5531
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5532
5532
|
] })
|
|
5533
5533
|
] })
|
|
5534
5534
|
] }) }),
|
|
@@ -5544,23 +5544,23 @@ var IframeClient_exports = {};
|
|
|
5544
5544
|
__export(IframeClient_exports, {
|
|
5545
5545
|
default: () => IframeClient_default
|
|
5546
5546
|
});
|
|
5547
|
-
var
|
|
5547
|
+
var import_react58, import_jsx_runtime79, IframeClient, IframeClient_default;
|
|
5548
5548
|
var init_IframeClient = __esm({
|
|
5549
5549
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
5550
5550
|
"use strict";
|
|
5551
5551
|
"use client";
|
|
5552
|
-
|
|
5552
|
+
import_react58 = __toESM(require("react"));
|
|
5553
5553
|
init_IFrameLoaderView();
|
|
5554
|
-
|
|
5554
|
+
import_jsx_runtime79 = require("react/jsx-runtime");
|
|
5555
5555
|
IframeClient = ({
|
|
5556
5556
|
src,
|
|
5557
5557
|
width,
|
|
5558
5558
|
height
|
|
5559
5559
|
}) => {
|
|
5560
|
-
const iframeRef = (0,
|
|
5561
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
5562
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
5563
|
-
(0,
|
|
5560
|
+
const iframeRef = (0, import_react58.useRef)(null);
|
|
5561
|
+
const [iframeHeight, setIframeHeight] = (0, import_react58.useState)("100%");
|
|
5562
|
+
const [isDataFound, setIsDataFound] = (0, import_react58.useState)(null);
|
|
5563
|
+
(0, import_react58.useEffect)(() => {
|
|
5564
5564
|
const handleReceiveMessage = (event) => {
|
|
5565
5565
|
const eventName = event?.data?.eventName;
|
|
5566
5566
|
const payload = event?.data?.payload;
|
|
@@ -5575,7 +5575,7 @@ var init_IframeClient = __esm({
|
|
|
5575
5575
|
window.addEventListener("message", handleReceiveMessage);
|
|
5576
5576
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
5577
5577
|
}, []);
|
|
5578
|
-
(0,
|
|
5578
|
+
(0, import_react58.useEffect)(() => {
|
|
5579
5579
|
const handleResize = () => {
|
|
5580
5580
|
if (iframeRef.current) {
|
|
5581
5581
|
iframeRef.current.contentWindow?.postMessage(
|
|
@@ -5590,7 +5590,7 @@ var init_IframeClient = __esm({
|
|
|
5590
5590
|
const handleIframeLoad = () => {
|
|
5591
5591
|
setIsDataFound(true);
|
|
5592
5592
|
};
|
|
5593
|
-
return /* @__PURE__ */ (0,
|
|
5593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react58.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
5594
5594
|
"iframe",
|
|
5595
5595
|
{
|
|
5596
5596
|
ref: iframeRef,
|
|
@@ -5850,21 +5850,21 @@ var Pagination_exports = {};
|
|
|
5850
5850
|
__export(Pagination_exports, {
|
|
5851
5851
|
default: () => Pagination_default
|
|
5852
5852
|
});
|
|
5853
|
-
var
|
|
5853
|
+
var import_react59, import_jsx_runtime86, Pagination, Pagination_default;
|
|
5854
5854
|
var init_Pagination = __esm({
|
|
5855
5855
|
"src/components/Pagination.tsx"() {
|
|
5856
5856
|
"use strict";
|
|
5857
5857
|
"use client";
|
|
5858
|
-
|
|
5858
|
+
import_react59 = require("react");
|
|
5859
5859
|
init_OdataBuilder();
|
|
5860
5860
|
init_Icon();
|
|
5861
5861
|
init_StyleTypes();
|
|
5862
5862
|
init_InputControlType();
|
|
5863
5863
|
init_Hyperlink();
|
|
5864
|
-
|
|
5864
|
+
import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5865
5865
|
Pagination = (props) => {
|
|
5866
5866
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
5867
|
-
const builder = (0,
|
|
5867
|
+
const builder = (0, import_react59.useMemo)(() => {
|
|
5868
5868
|
const b = new OdataBuilder(path);
|
|
5869
5869
|
if (query) b.setQuery(query);
|
|
5870
5870
|
return b;
|
|
@@ -5905,7 +5905,7 @@ var init_Pagination = __esm({
|
|
|
5905
5905
|
return range;
|
|
5906
5906
|
};
|
|
5907
5907
|
const paginationRange = getPaginationRange();
|
|
5908
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
5908
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5909
5909
|
Hyperlink,
|
|
5910
5910
|
{
|
|
5911
5911
|
linkType: "Link" /* Link */,
|
|
@@ -5920,9 +5920,9 @@ var init_Pagination = __esm({
|
|
|
5920
5920
|
);
|
|
5921
5921
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
5922
5922
|
if (disabled) {
|
|
5923
|
-
return /* @__PURE__ */ (0,
|
|
5923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
|
|
5924
5924
|
}
|
|
5925
|
-
return /* @__PURE__ */ (0,
|
|
5925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5926
5926
|
Hyperlink,
|
|
5927
5927
|
{
|
|
5928
5928
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
|
|
@@ -5932,35 +5932,35 @@ var init_Pagination = __esm({
|
|
|
5932
5932
|
);
|
|
5933
5933
|
};
|
|
5934
5934
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
5935
|
-
return /* @__PURE__ */ (0,
|
|
5936
|
-
/* @__PURE__ */ (0,
|
|
5937
|
-
/* @__PURE__ */ (0,
|
|
5935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "py-6 border-t mt-6", children: [
|
|
5936
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
5937
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "text-sm", children: [
|
|
5938
5938
|
"Showing ",
|
|
5939
|
-
/* @__PURE__ */ (0,
|
|
5939
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "font-semibold", children: [
|
|
5940
5940
|
startItem,
|
|
5941
5941
|
"-",
|
|
5942
5942
|
endItem
|
|
5943
5943
|
] }),
|
|
5944
5944
|
" ",
|
|
5945
5945
|
"out of ",
|
|
5946
|
-
/* @__PURE__ */ (0,
|
|
5946
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
5947
5947
|
" results"
|
|
5948
5948
|
] }),
|
|
5949
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
5950
|
-
/* @__PURE__ */ (0,
|
|
5949
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
5950
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5951
5951
|
NavigationButton,
|
|
5952
5952
|
{
|
|
5953
5953
|
page: activePageNumber - 1,
|
|
5954
5954
|
disabled: activePageNumber === 1,
|
|
5955
5955
|
children: [
|
|
5956
|
-
/* @__PURE__ */ (0,
|
|
5957
|
-
/* @__PURE__ */ (0,
|
|
5956
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
5957
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
5958
5958
|
]
|
|
5959
5959
|
}
|
|
5960
5960
|
),
|
|
5961
5961
|
paginationRange.map((item, index) => {
|
|
5962
5962
|
if (item === "...") {
|
|
5963
|
-
return /* @__PURE__ */ (0,
|
|
5963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5964
5964
|
"span",
|
|
5965
5965
|
{
|
|
5966
5966
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -5970,23 +5970,23 @@ var init_Pagination = __esm({
|
|
|
5970
5970
|
);
|
|
5971
5971
|
}
|
|
5972
5972
|
const page = item;
|
|
5973
|
-
return /* @__PURE__ */ (0,
|
|
5973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PageButton, { page, children: page }, page);
|
|
5974
5974
|
}),
|
|
5975
|
-
/* @__PURE__ */ (0,
|
|
5975
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5976
5976
|
NavigationButton,
|
|
5977
5977
|
{
|
|
5978
5978
|
page: activePageNumber + 1,
|
|
5979
5979
|
disabled: activePageNumber === totalPages,
|
|
5980
5980
|
children: [
|
|
5981
|
-
/* @__PURE__ */ (0,
|
|
5982
|
-
/* @__PURE__ */ (0,
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
5983
5983
|
]
|
|
5984
5984
|
}
|
|
5985
5985
|
)
|
|
5986
5986
|
] }),
|
|
5987
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
5988
|
-
/* @__PURE__ */ (0,
|
|
5989
|
-
/* @__PURE__ */ (0,
|
|
5987
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
5988
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
5989
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5990
5990
|
"input",
|
|
5991
5991
|
{
|
|
5992
5992
|
type: "number",
|
|
@@ -6007,9 +6007,9 @@ var init_Pagination = __esm({
|
|
|
6007
6007
|
) })
|
|
6008
6008
|
] })
|
|
6009
6009
|
] }),
|
|
6010
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
6011
|
-
/* @__PURE__ */ (0,
|
|
6012
|
-
/* @__PURE__ */ (0,
|
|
6010
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
6011
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
6012
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6013
6013
|
Hyperlink,
|
|
6014
6014
|
{
|
|
6015
6015
|
className: `
|
|
@@ -6021,7 +6021,7 @@ var init_Pagination = __esm({
|
|
|
6021
6021
|
},
|
|
6022
6022
|
size
|
|
6023
6023
|
)) }),
|
|
6024
|
-
/* @__PURE__ */ (0,
|
|
6024
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm", children: "per page" })
|
|
6025
6025
|
] }) })
|
|
6026
6026
|
] });
|
|
6027
6027
|
};
|
|
@@ -6034,16 +6034,16 @@ var DataBindingControls_exports = {};
|
|
|
6034
6034
|
__export(DataBindingControls_exports, {
|
|
6035
6035
|
default: () => DataBindingControls_default
|
|
6036
6036
|
});
|
|
6037
|
-
var
|
|
6037
|
+
var import_react60, import_navigation, import_jsx_runtime87, humanize, escapeODataString, parseFacetSelections, buildFacetFilter, parseODataSearch, SearchIcon, ResetIcon, FilterSlidersIcon, ChevronDownIcon, CheckIcon, CloseIcon, MapPinIcon, BriefcaseIcon, FileTextIcon, TagIcon, getCategoryIcon, normalizeSortOption, DataBindingControls, DataBindingControls_default;
|
|
6038
6038
|
var init_DataBindingControls = __esm({
|
|
6039
6039
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
6040
6040
|
"use strict";
|
|
6041
6041
|
"use client";
|
|
6042
|
-
|
|
6042
|
+
import_react60 = require("react");
|
|
6043
6043
|
import_navigation = require("next/navigation");
|
|
6044
6044
|
init_Button();
|
|
6045
6045
|
init_StyleTypes();
|
|
6046
|
-
|
|
6046
|
+
import_jsx_runtime87 = require("react/jsx-runtime");
|
|
6047
6047
|
humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
6048
6048
|
escapeODataString = (value) => value.replace(/'/g, "''");
|
|
6049
6049
|
parseFacetSelections = (filter) => {
|
|
@@ -6066,7 +6066,7 @@ var init_DataBindingControls = __esm({
|
|
|
6066
6066
|
}
|
|
6067
6067
|
return trimmedValue;
|
|
6068
6068
|
};
|
|
6069
|
-
SearchIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6069
|
+
SearchIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6070
6070
|
"svg",
|
|
6071
6071
|
{
|
|
6072
6072
|
"aria-hidden": "true",
|
|
@@ -6076,12 +6076,12 @@ var init_DataBindingControls = __esm({
|
|
|
6076
6076
|
stroke: "currentColor",
|
|
6077
6077
|
strokeWidth: "2",
|
|
6078
6078
|
children: [
|
|
6079
|
-
/* @__PURE__ */ (0,
|
|
6080
|
-
/* @__PURE__ */ (0,
|
|
6079
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("circle", { cx: "11", cy: "11", r: "7" }),
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", d: "m20 20-4-4" })
|
|
6081
6081
|
]
|
|
6082
6082
|
}
|
|
6083
6083
|
);
|
|
6084
|
-
ResetIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6084
|
+
ResetIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6085
6085
|
"svg",
|
|
6086
6086
|
{
|
|
6087
6087
|
"aria-hidden": "true",
|
|
@@ -6091,8 +6091,8 @@ var init_DataBindingControls = __esm({
|
|
|
6091
6091
|
stroke: "currentColor",
|
|
6092
6092
|
strokeWidth: "2",
|
|
6093
6093
|
children: [
|
|
6094
|
-
/* @__PURE__ */ (0,
|
|
6095
|
-
/* @__PURE__ */ (0,
|
|
6094
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 4v6h6" }),
|
|
6095
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6096
6096
|
"path",
|
|
6097
6097
|
{
|
|
6098
6098
|
strokeLinecap: "round",
|
|
@@ -6103,7 +6103,7 @@ var init_DataBindingControls = __esm({
|
|
|
6103
6103
|
]
|
|
6104
6104
|
}
|
|
6105
6105
|
);
|
|
6106
|
-
FilterSlidersIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6106
|
+
FilterSlidersIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6107
6107
|
"svg",
|
|
6108
6108
|
{
|
|
6109
6109
|
"aria-hidden": "true",
|
|
@@ -6113,14 +6113,14 @@ var init_DataBindingControls = __esm({
|
|
|
6113
6113
|
stroke: "currentColor",
|
|
6114
6114
|
strokeWidth: "2",
|
|
6115
6115
|
children: [
|
|
6116
|
-
/* @__PURE__ */ (0,
|
|
6117
|
-
/* @__PURE__ */ (0,
|
|
6118
|
-
/* @__PURE__ */ (0,
|
|
6119
|
-
/* @__PURE__ */ (0,
|
|
6116
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 4h18M3 12h18M3 20h18" }),
|
|
6117
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("circle", { cx: "8", cy: "4", r: "2", fill: "currentColor" }),
|
|
6118
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("circle", { cx: "16", cy: "12", r: "2", fill: "currentColor" }),
|
|
6119
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("circle", { cx: "10", cy: "20", r: "2", fill: "currentColor" })
|
|
6120
6120
|
]
|
|
6121
6121
|
}
|
|
6122
6122
|
);
|
|
6123
|
-
ChevronDownIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6123
|
+
ChevronDownIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6124
6124
|
"svg",
|
|
6125
6125
|
{
|
|
6126
6126
|
"aria-hidden": "true",
|
|
@@ -6129,10 +6129,10 @@ var init_DataBindingControls = __esm({
|
|
|
6129
6129
|
viewBox: "0 0 24 24",
|
|
6130
6130
|
stroke: "currentColor",
|
|
6131
6131
|
strokeWidth: "2",
|
|
6132
|
-
children: /* @__PURE__ */ (0,
|
|
6132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19 9-7 7-7-7" })
|
|
6133
6133
|
}
|
|
6134
6134
|
);
|
|
6135
|
-
CheckIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6135
|
+
CheckIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6136
6136
|
"svg",
|
|
6137
6137
|
{
|
|
6138
6138
|
"aria-hidden": "true",
|
|
@@ -6141,10 +6141,10 @@ var init_DataBindingControls = __esm({
|
|
|
6141
6141
|
viewBox: "0 0 24 24",
|
|
6142
6142
|
stroke: "currentColor",
|
|
6143
6143
|
strokeWidth: "2.5",
|
|
6144
|
-
children: /* @__PURE__ */ (0,
|
|
6144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
|
|
6145
6145
|
}
|
|
6146
6146
|
);
|
|
6147
|
-
CloseIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6147
|
+
CloseIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6148
6148
|
"svg",
|
|
6149
6149
|
{
|
|
6150
6150
|
"aria-hidden": "true",
|
|
@@ -6153,10 +6153,10 @@ var init_DataBindingControls = __esm({
|
|
|
6153
6153
|
viewBox: "0 0 24 24",
|
|
6154
6154
|
stroke: "currentColor",
|
|
6155
6155
|
strokeWidth: "2",
|
|
6156
|
-
children: /* @__PURE__ */ (0,
|
|
6156
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
6157
6157
|
}
|
|
6158
6158
|
);
|
|
6159
|
-
MapPinIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6159
|
+
MapPinIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6160
6160
|
"svg",
|
|
6161
6161
|
{
|
|
6162
6162
|
"aria-hidden": "true",
|
|
@@ -6166,7 +6166,7 @@ var init_DataBindingControls = __esm({
|
|
|
6166
6166
|
stroke: "currentColor",
|
|
6167
6167
|
strokeWidth: "2",
|
|
6168
6168
|
children: [
|
|
6169
|
-
/* @__PURE__ */ (0,
|
|
6169
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6170
6170
|
"path",
|
|
6171
6171
|
{
|
|
6172
6172
|
strokeLinecap: "round",
|
|
@@ -6174,7 +6174,7 @@ var init_DataBindingControls = __esm({
|
|
|
6174
6174
|
d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
6175
6175
|
}
|
|
6176
6176
|
),
|
|
6177
|
-
/* @__PURE__ */ (0,
|
|
6177
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6178
6178
|
"path",
|
|
6179
6179
|
{
|
|
6180
6180
|
strokeLinecap: "round",
|
|
@@ -6185,7 +6185,7 @@ var init_DataBindingControls = __esm({
|
|
|
6185
6185
|
]
|
|
6186
6186
|
}
|
|
6187
6187
|
);
|
|
6188
|
-
BriefcaseIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6188
|
+
BriefcaseIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6189
6189
|
"svg",
|
|
6190
6190
|
{
|
|
6191
6191
|
"aria-hidden": "true",
|
|
@@ -6194,7 +6194,7 @@ var init_DataBindingControls = __esm({
|
|
|
6194
6194
|
viewBox: "0 0 24 24",
|
|
6195
6195
|
stroke: "currentColor",
|
|
6196
6196
|
strokeWidth: "2",
|
|
6197
|
-
children: /* @__PURE__ */ (0,
|
|
6197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6198
6198
|
"path",
|
|
6199
6199
|
{
|
|
6200
6200
|
strokeLinecap: "round",
|
|
@@ -6204,7 +6204,7 @@ var init_DataBindingControls = __esm({
|
|
|
6204
6204
|
)
|
|
6205
6205
|
}
|
|
6206
6206
|
);
|
|
6207
|
-
FileTextIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6207
|
+
FileTextIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6208
6208
|
"svg",
|
|
6209
6209
|
{
|
|
6210
6210
|
"aria-hidden": "true",
|
|
@@ -6213,7 +6213,7 @@ var init_DataBindingControls = __esm({
|
|
|
6213
6213
|
viewBox: "0 0 24 24",
|
|
6214
6214
|
stroke: "currentColor",
|
|
6215
6215
|
strokeWidth: "2",
|
|
6216
|
-
children: /* @__PURE__ */ (0,
|
|
6216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6217
6217
|
"path",
|
|
6218
6218
|
{
|
|
6219
6219
|
strokeLinecap: "round",
|
|
@@ -6223,7 +6223,7 @@ var init_DataBindingControls = __esm({
|
|
|
6223
6223
|
)
|
|
6224
6224
|
}
|
|
6225
6225
|
);
|
|
6226
|
-
TagIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6226
|
+
TagIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6227
6227
|
"svg",
|
|
6228
6228
|
{
|
|
6229
6229
|
"aria-hidden": "true",
|
|
@@ -6232,7 +6232,7 @@ var init_DataBindingControls = __esm({
|
|
|
6232
6232
|
viewBox: "0 0 24 24",
|
|
6233
6233
|
stroke: "currentColor",
|
|
6234
6234
|
strokeWidth: "2",
|
|
6235
|
-
children: /* @__PURE__ */ (0,
|
|
6235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6236
6236
|
"path",
|
|
6237
6237
|
{
|
|
6238
6238
|
strokeLinecap: "round",
|
|
@@ -6245,15 +6245,15 @@ var init_DataBindingControls = __esm({
|
|
|
6245
6245
|
getCategoryIcon = (category) => {
|
|
6246
6246
|
const lower = category.toLowerCase();
|
|
6247
6247
|
if (lower.includes("location") || lower.includes("city") || lower.includes("country") || lower.includes("state") || lower.includes("address")) {
|
|
6248
|
-
return /* @__PURE__ */ (0,
|
|
6248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(MapPinIcon, { className: "h-4 w-4" });
|
|
6249
6249
|
}
|
|
6250
6250
|
if (lower.includes("type") || lower.includes("work") || lower.includes("employment") || lower.includes("experience")) {
|
|
6251
|
-
return /* @__PURE__ */ (0,
|
|
6251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(BriefcaseIcon, { className: "h-4 w-4" });
|
|
6252
6252
|
}
|
|
6253
6253
|
if (lower.includes("department") || lower.includes("category") || lower.includes("role") || lower.includes("industry")) {
|
|
6254
|
-
return /* @__PURE__ */ (0,
|
|
6254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FileTextIcon, { className: "h-4 w-4" });
|
|
6255
6255
|
}
|
|
6256
|
-
return /* @__PURE__ */ (0,
|
|
6256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TagIcon, { className: "h-4 w-4" });
|
|
6257
6257
|
};
|
|
6258
6258
|
normalizeSortOption = (option) => {
|
|
6259
6259
|
const direction = option.direction.trim();
|
|
@@ -6275,13 +6275,13 @@ var init_DataBindingControls = __esm({
|
|
|
6275
6275
|
}) => {
|
|
6276
6276
|
const router = (0, import_navigation.useRouter)();
|
|
6277
6277
|
const searchParams = (0, import_navigation.useSearchParams)();
|
|
6278
|
-
const [collapsedCategories, setCollapsedCategories] = (0,
|
|
6279
|
-
const [isSortOpen, setIsSortOpen] = (0,
|
|
6280
|
-
const [isMobileFiltersOpen, setIsMobileFiltersOpen] = (0,
|
|
6281
|
-
const [facetCategorySearch, setFacetCategorySearch] = (0,
|
|
6282
|
-
const desktopSortDropdownRef = (0,
|
|
6283
|
-
const mobileSortDropdownRef = (0,
|
|
6284
|
-
(0,
|
|
6278
|
+
const [collapsedCategories, setCollapsedCategories] = (0, import_react60.useState)({});
|
|
6279
|
+
const [isSortOpen, setIsSortOpen] = (0, import_react60.useState)(false);
|
|
6280
|
+
const [isMobileFiltersOpen, setIsMobileFiltersOpen] = (0, import_react60.useState)(false);
|
|
6281
|
+
const [facetCategorySearch, setFacetCategorySearch] = (0, import_react60.useState)({});
|
|
6282
|
+
const desktopSortDropdownRef = (0, import_react60.useRef)(null);
|
|
6283
|
+
const mobileSortDropdownRef = (0, import_react60.useRef)(null);
|
|
6284
|
+
(0, import_react60.useEffect)(() => {
|
|
6285
6285
|
const handleClickOutside = (event) => {
|
|
6286
6286
|
const target = event.target;
|
|
6287
6287
|
const clickedInsideDesktop = desktopSortDropdownRef.current?.contains(target);
|
|
@@ -6307,15 +6307,15 @@ var init_DataBindingControls = __esm({
|
|
|
6307
6307
|
const currentSearch = parseODataSearch(
|
|
6308
6308
|
searchParamsSearch !== void 0 && searchParamsSearch !== null ? searchParamsSearch : query?.["$search"]
|
|
6309
6309
|
);
|
|
6310
|
-
const [searchText, setSearchText] = (0,
|
|
6311
|
-
(0,
|
|
6310
|
+
const [searchText, setSearchText] = (0, import_react60.useState)(currentSearch);
|
|
6311
|
+
(0, import_react60.useEffect)(() => {
|
|
6312
6312
|
setSearchText(currentSearch);
|
|
6313
6313
|
}, [currentSearch]);
|
|
6314
|
-
const selectedFacetValues = (0,
|
|
6314
|
+
const selectedFacetValues = (0, import_react60.useMemo)(
|
|
6315
6315
|
() => parseFacetSelections(currentFilter),
|
|
6316
6316
|
[currentFilter]
|
|
6317
6317
|
);
|
|
6318
|
-
(0,
|
|
6318
|
+
(0, import_react60.useEffect)(() => {
|
|
6319
6319
|
if (isMobileFiltersOpen) {
|
|
6320
6320
|
document.body.style.overflow = "hidden";
|
|
6321
6321
|
} else {
|
|
@@ -6325,7 +6325,7 @@ var init_DataBindingControls = __esm({
|
|
|
6325
6325
|
document.body.style.overflow = "";
|
|
6326
6326
|
};
|
|
6327
6327
|
}, [isMobileFiltersOpen]);
|
|
6328
|
-
const activeFacets = (0,
|
|
6328
|
+
const activeFacets = (0, import_react60.useMemo)(() => {
|
|
6329
6329
|
const facetMap = /* @__PURE__ */ new Map();
|
|
6330
6330
|
if (facets) {
|
|
6331
6331
|
Object.entries(facets).forEach(([field, values]) => {
|
|
@@ -6350,11 +6350,11 @@ var init_DataBindingControls = __esm({
|
|
|
6350
6350
|
});
|
|
6351
6351
|
return Array.from(facetMap.entries());
|
|
6352
6352
|
}, [facets, selectedFacetValues]);
|
|
6353
|
-
const normalizedSortOptions = (0,
|
|
6353
|
+
const normalizedSortOptions = (0, import_react60.useMemo)(
|
|
6354
6354
|
() => (sortOptions ?? []).filter((option) => option?.name && option?.direction).map(normalizeSortOption).filter((option) => option.value),
|
|
6355
6355
|
[sortOptions]
|
|
6356
6356
|
);
|
|
6357
|
-
const selectedSortOption = (0,
|
|
6357
|
+
const selectedSortOption = (0, import_react60.useMemo)(() => {
|
|
6358
6358
|
if (!normalizedSortOptions.length) return null;
|
|
6359
6359
|
const trimmedCurrentSort = currentSort.trim().toLowerCase();
|
|
6360
6360
|
if (!trimmedCurrentSort) return normalizedSortOptions[0];
|
|
@@ -6363,7 +6363,7 @@ var init_DataBindingControls = __esm({
|
|
|
6363
6363
|
) || normalizedSortOptions[0];
|
|
6364
6364
|
}, [normalizedSortOptions, currentSort]);
|
|
6365
6365
|
const selectedSortLabel = selectedSortOption?.label || "";
|
|
6366
|
-
const getQueryUrl = (0,
|
|
6366
|
+
const getQueryUrl = (0, import_react60.useCallback)(
|
|
6367
6367
|
(updates) => {
|
|
6368
6368
|
const initialParams = searchParams ? searchParams.toString() : "";
|
|
6369
6369
|
const params = new URLSearchParams(initialParams || query || {});
|
|
@@ -6381,7 +6381,7 @@ var init_DataBindingControls = __esm({
|
|
|
6381
6381
|
},
|
|
6382
6382
|
[path, query, searchParams]
|
|
6383
6383
|
);
|
|
6384
|
-
const navigateWithoutReload = (0,
|
|
6384
|
+
const navigateWithoutReload = (0, import_react60.useCallback)(
|
|
6385
6385
|
(url) => {
|
|
6386
6386
|
if (typeof window !== "undefined") {
|
|
6387
6387
|
const targetUrl = new URL(url, window.location.origin);
|
|
@@ -6393,7 +6393,7 @@ var init_DataBindingControls = __esm({
|
|
|
6393
6393
|
},
|
|
6394
6394
|
[router]
|
|
6395
6395
|
);
|
|
6396
|
-
const handleSelectSort = (0,
|
|
6396
|
+
const handleSelectSort = (0, import_react60.useCallback)(
|
|
6397
6397
|
(sortValue) => {
|
|
6398
6398
|
setIsSortOpen(false);
|
|
6399
6399
|
navigateWithoutReload(
|
|
@@ -6433,7 +6433,7 @@ var init_DataBindingControls = __esm({
|
|
|
6433
6433
|
})
|
|
6434
6434
|
);
|
|
6435
6435
|
};
|
|
6436
|
-
const handleSearch = (0,
|
|
6436
|
+
const handleSearch = (0, import_react60.useCallback)(async () => {
|
|
6437
6437
|
const trimmedSearchText = searchText.trim();
|
|
6438
6438
|
if (trimmedSearchText === currentSearch.trim()) {
|
|
6439
6439
|
return { isSuccessful: true };
|
|
@@ -6445,7 +6445,7 @@ var init_DataBindingControls = __esm({
|
|
|
6445
6445
|
);
|
|
6446
6446
|
return { isSuccessful: true };
|
|
6447
6447
|
}, [currentSearch, getQueryUrl, navigateWithoutReload, searchText]);
|
|
6448
|
-
const handleClearAll = (0,
|
|
6448
|
+
const handleClearAll = (0, import_react60.useCallback)(async () => {
|
|
6449
6449
|
navigateWithoutReload(
|
|
6450
6450
|
getQueryUrl({
|
|
6451
6451
|
$filter: void 0,
|
|
@@ -6468,9 +6468,9 @@ var init_DataBindingControls = __esm({
|
|
|
6468
6468
|
if (!shouldShowToolbar && !shouldShowFacets) {
|
|
6469
6469
|
return null;
|
|
6470
6470
|
}
|
|
6471
|
-
const renderFacetItems = (field, values) => /* @__PURE__ */ (0,
|
|
6471
|
+
const renderFacetItems = (field, values) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex flex-col gap-1 pt-1 pb-1", children: values.map((facet) => {
|
|
6472
6472
|
const isSelected = selectedFacetValues.get(field) === facet.value;
|
|
6473
|
-
return /* @__PURE__ */ (0,
|
|
6473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6474
6474
|
"button",
|
|
6475
6475
|
{
|
|
6476
6476
|
type: "button",
|
|
@@ -6478,17 +6478,17 @@ var init_DataBindingControls = __esm({
|
|
|
6478
6478
|
"aria-pressed": isSelected,
|
|
6479
6479
|
className: `group flex w-full cursor-pointer items-center justify-between gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base ${isSelected ? "bg-neutral-soft font-medium border border-neutral-soft" : "hover:bg-neutral-weak border border-transparent"}`,
|
|
6480
6480
|
children: [
|
|
6481
|
-
/* @__PURE__ */ (0,
|
|
6482
|
-
/* @__PURE__ */ (0,
|
|
6481
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
6482
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6483
6483
|
"span",
|
|
6484
6484
|
{
|
|
6485
6485
|
className: `flex h-4 w-4 shrink-0 items-center justify-center rounded-[3px] border transition-colors duration-150 ${isSelected ? "bg-primary-base border-primary-base" : " group-hover:border-neutral-strong bg-default border-neutral-soft"}`,
|
|
6486
|
-
children: isSelected && /* @__PURE__ */ (0,
|
|
6486
|
+
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CheckIcon, { className: "h-3 w-3" })
|
|
6487
6487
|
}
|
|
6488
6488
|
),
|
|
6489
|
-
/* @__PURE__ */ (0,
|
|
6489
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "leading-snug break-words", children: facet.value })
|
|
6490
6490
|
] }),
|
|
6491
|
-
/* @__PURE__ */ (0,
|
|
6491
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6492
6492
|
"span",
|
|
6493
6493
|
{
|
|
6494
6494
|
className: `shrink-0 rounded px-1.5 py-0.5 text-xs transition-colors ml-2 ${isSelected ? "bg-neutral-weak font-semibold" : "bg-neutral-weak font-normal"}`,
|
|
@@ -6500,14 +6500,14 @@ var init_DataBindingControls = __esm({
|
|
|
6500
6500
|
`${field}-${facet.value}`
|
|
6501
6501
|
);
|
|
6502
6502
|
}) });
|
|
6503
|
-
return /* @__PURE__ */ (0,
|
|
6503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6504
6504
|
"div",
|
|
6505
6505
|
{
|
|
6506
6506
|
className: mode === "toolbar" ? "my-4 sm:my-6" : "flex flex-col rounded-md border border-neutral-soft bg-default p-4 shadow-sm",
|
|
6507
6507
|
children: [
|
|
6508
|
-
shouldShowToolbar && /* @__PURE__ */ (0,
|
|
6509
|
-
/* @__PURE__ */ (0,
|
|
6510
|
-
showSearchBar && /* @__PURE__ */ (0,
|
|
6508
|
+
shouldShowToolbar && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
6509
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "hidden lg:flex lg:items-center lg:justify-between lg:gap-4", children: [
|
|
6510
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6511
6511
|
"form",
|
|
6512
6512
|
{
|
|
6513
6513
|
role: "search",
|
|
@@ -6517,9 +6517,9 @@ var init_DataBindingControls = __esm({
|
|
|
6517
6517
|
void handleSearch();
|
|
6518
6518
|
},
|
|
6519
6519
|
children: [
|
|
6520
|
-
/* @__PURE__ */ (0,
|
|
6521
|
-
/* @__PURE__ */ (0,
|
|
6522
|
-
/* @__PURE__ */ (0,
|
|
6520
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative min-w-0 flex-1", children: [
|
|
6521
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3.5 top-1/2 z-10 h-4 w-4 -translate-y-1/2 opacity-60" }),
|
|
6522
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6523
6523
|
"input",
|
|
6524
6524
|
{
|
|
6525
6525
|
type: "text",
|
|
@@ -6531,23 +6531,23 @@ var init_DataBindingControls = __esm({
|
|
|
6531
6531
|
}
|
|
6532
6532
|
)
|
|
6533
6533
|
] }),
|
|
6534
|
-
/* @__PURE__ */ (0,
|
|
6534
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6535
6535
|
Button_default,
|
|
6536
6536
|
{
|
|
6537
6537
|
ButtonType: "Primary" /* Solid */,
|
|
6538
6538
|
onClick: handleSearch,
|
|
6539
6539
|
className: "!h-10 !rounded-md !px-5 !py-0 flex items-center justify-center gap-1.5 shrink-0",
|
|
6540
6540
|
children: [
|
|
6541
|
-
/* @__PURE__ */ (0,
|
|
6542
|
-
/* @__PURE__ */ (0,
|
|
6541
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchIcon, { className: "h-4 w-4" }),
|
|
6542
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: "Search" })
|
|
6543
6543
|
]
|
|
6544
6544
|
}
|
|
6545
6545
|
)
|
|
6546
6546
|
]
|
|
6547
6547
|
}
|
|
6548
6548
|
),
|
|
6549
|
-
hasSortControls && /* @__PURE__ */ (0,
|
|
6550
|
-
/* @__PURE__ */ (0,
|
|
6549
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative shrink-0", ref: desktopSortDropdownRef, children: [
|
|
6550
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6551
6551
|
"button",
|
|
6552
6552
|
{
|
|
6553
6553
|
type: "button",
|
|
@@ -6555,11 +6555,11 @@ var init_DataBindingControls = __esm({
|
|
|
6555
6555
|
"aria-expanded": isSortOpen,
|
|
6556
6556
|
className: "inline-flex h-10 items-center justify-between gap-2.5 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-normal shadow-sm transition-all hover:bg-neutral-weak focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-base cursor-pointer whitespace-nowrap",
|
|
6557
6557
|
children: [
|
|
6558
|
-
/* @__PURE__ */ (0,
|
|
6559
|
-
/* @__PURE__ */ (0,
|
|
6560
|
-
/* @__PURE__ */ (0,
|
|
6558
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { className: "whitespace-nowrap", children: [
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "opacity-70", children: "Sort by: " }),
|
|
6560
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "font-semibold", children: selectedSortLabel })
|
|
6561
6561
|
] }),
|
|
6562
|
-
/* @__PURE__ */ (0,
|
|
6562
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6563
6563
|
ChevronDownIcon,
|
|
6564
6564
|
{
|
|
6565
6565
|
className: `h-4 w-4 shrink-0 transition-transform duration-200 ${isSortOpen ? "rotate-180" : ""}`
|
|
@@ -6568,17 +6568,17 @@ var init_DataBindingControls = __esm({
|
|
|
6568
6568
|
]
|
|
6569
6569
|
}
|
|
6570
6570
|
),
|
|
6571
|
-
isSortOpen && /* @__PURE__ */ (0,
|
|
6571
|
+
isSortOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "absolute right-0 z-50 mt-1.5 w-max min-w-full max-h-80 overflow-y-auto rounded-md border border-neutral-soft bg-default p-1 shadow-lg", children: normalizedSortOptions.map((option) => {
|
|
6572
6572
|
const isSelected = selectedSortOption?.value === option.value;
|
|
6573
|
-
return /* @__PURE__ */ (0,
|
|
6573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6574
6574
|
"button",
|
|
6575
6575
|
{
|
|
6576
6576
|
type: "button",
|
|
6577
6577
|
onClick: () => handleSelectSort(option.value),
|
|
6578
6578
|
className: `flex w-full items-center justify-between gap-4 rounded-md px-3 py-1.5 text-left text-sm transition-colors cursor-pointer whitespace-nowrap ${isSelected ? "bg-primary-base font-semibold" : "hover:bg-neutral-soft font-normal"}`,
|
|
6579
6579
|
children: [
|
|
6580
|
-
/* @__PURE__ */ (0,
|
|
6581
|
-
isSelected && /* @__PURE__ */ (0,
|
|
6580
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
|
|
6581
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CheckIcon, { className: "h-4 w-4 shrink-0" })
|
|
6582
6582
|
]
|
|
6583
6583
|
},
|
|
6584
6584
|
option.value
|
|
@@ -6586,8 +6586,8 @@ var init_DataBindingControls = __esm({
|
|
|
6586
6586
|
}) })
|
|
6587
6587
|
] })
|
|
6588
6588
|
] }),
|
|
6589
|
-
/* @__PURE__ */ (0,
|
|
6590
|
-
showSearchBar && /* @__PURE__ */ (0,
|
|
6589
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-col gap-2.5 lg:hidden", children: [
|
|
6590
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6591
6591
|
"form",
|
|
6592
6592
|
{
|
|
6593
6593
|
role: "search",
|
|
@@ -6597,8 +6597,8 @@ var init_DataBindingControls = __esm({
|
|
|
6597
6597
|
void handleSearch();
|
|
6598
6598
|
},
|
|
6599
6599
|
children: [
|
|
6600
|
-
/* @__PURE__ */ (0,
|
|
6601
|
-
/* @__PURE__ */ (0,
|
|
6600
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3.5 top-1/2 z-10 h-4 w-4 -translate-y-1/2 opacity-50" }),
|
|
6601
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6602
6602
|
"input",
|
|
6603
6603
|
{
|
|
6604
6604
|
type: "text",
|
|
@@ -6612,28 +6612,28 @@ var init_DataBindingControls = __esm({
|
|
|
6612
6612
|
]
|
|
6613
6613
|
}
|
|
6614
6614
|
),
|
|
6615
|
-
/* @__PURE__ */ (0,
|
|
6616
|
-
showFacets && /* @__PURE__ */ (0,
|
|
6615
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center justify-between gap-2.5 pt-0.5", children: [
|
|
6616
|
+
showFacets && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6617
6617
|
"button",
|
|
6618
6618
|
{
|
|
6619
6619
|
type: "button",
|
|
6620
6620
|
onClick: () => setIsMobileFiltersOpen(true),
|
|
6621
6621
|
className: "inline-flex h-10 items-center justify-center gap-2 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-medium shadow-sm transition-all hover:bg-neutral-weak cursor-pointer active:scale-95",
|
|
6622
6622
|
children: [
|
|
6623
|
-
/* @__PURE__ */ (0,
|
|
6624
|
-
/* @__PURE__ */ (0,
|
|
6623
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FilterSlidersIcon, { className: "h-4 w-4" }),
|
|
6624
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { children: [
|
|
6625
6625
|
"Filters",
|
|
6626
6626
|
selectedFacetCount > 0 ? ` (${selectedFacetCount})` : ""
|
|
6627
6627
|
] }),
|
|
6628
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6629
|
-
/* @__PURE__ */ (0,
|
|
6630
|
-
/* @__PURE__ */ (0,
|
|
6628
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { className: "relative flex h-2 w-2", children: [
|
|
6629
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-primary-base opacity-75" }),
|
|
6630
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-primary-base" })
|
|
6631
6631
|
] })
|
|
6632
6632
|
]
|
|
6633
6633
|
}
|
|
6634
6634
|
),
|
|
6635
|
-
hasSortControls && /* @__PURE__ */ (0,
|
|
6636
|
-
/* @__PURE__ */ (0,
|
|
6635
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative shrink-0 ml-auto", ref: mobileSortDropdownRef, children: [
|
|
6636
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6637
6637
|
"button",
|
|
6638
6638
|
{
|
|
6639
6639
|
type: "button",
|
|
@@ -6641,8 +6641,8 @@ var init_DataBindingControls = __esm({
|
|
|
6641
6641
|
"aria-expanded": isSortOpen,
|
|
6642
6642
|
className: "inline-flex h-10 items-center justify-between gap-2 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-medium shadow-sm transition-all hover:bg-neutral-weak cursor-pointer whitespace-nowrap",
|
|
6643
6643
|
children: [
|
|
6644
|
-
/* @__PURE__ */ (0,
|
|
6645
|
-
/* @__PURE__ */ (0,
|
|
6644
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "whitespace-nowrap font-medium", children: selectedSortLabel }),
|
|
6645
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6646
6646
|
ChevronDownIcon,
|
|
6647
6647
|
{
|
|
6648
6648
|
className: `h-4 w-4 shrink-0 transition-transform duration-200 ${isSortOpen ? "rotate-180" : ""}`
|
|
@@ -6651,17 +6651,17 @@ var init_DataBindingControls = __esm({
|
|
|
6651
6651
|
]
|
|
6652
6652
|
}
|
|
6653
6653
|
),
|
|
6654
|
-
isSortOpen && /* @__PURE__ */ (0,
|
|
6654
|
+
isSortOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "absolute right-0 z-50 mt-1.5 w-max min-w-[160px] max-h-80 overflow-y-auto rounded-md border border-neutral-soft bg-default p-1 shadow-xl", children: normalizedSortOptions.map((option) => {
|
|
6655
6655
|
const isSelected = selectedSortOption?.value === option.value;
|
|
6656
|
-
return /* @__PURE__ */ (0,
|
|
6656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6657
6657
|
"button",
|
|
6658
6658
|
{
|
|
6659
6659
|
type: "button",
|
|
6660
6660
|
onClick: () => handleSelectSort(option.value),
|
|
6661
6661
|
className: `flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors cursor-pointer whitespace-nowrap ${isSelected ? "bg-primary-base font-semibold" : "hover:bg-neutral-soft font-normal"}`,
|
|
6662
6662
|
children: [
|
|
6663
|
-
/* @__PURE__ */ (0,
|
|
6664
|
-
isSelected && /* @__PURE__ */ (0,
|
|
6663
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
|
|
6664
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CheckIcon, { className: "h-4 w-4 shrink-0" })
|
|
6665
6665
|
]
|
|
6666
6666
|
},
|
|
6667
6667
|
option.value
|
|
@@ -6669,8 +6669,8 @@ var init_DataBindingControls = __esm({
|
|
|
6669
6669
|
}) })
|
|
6670
6670
|
] })
|
|
6671
6671
|
] }),
|
|
6672
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6673
|
-
Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0,
|
|
6672
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5 pt-1", children: [
|
|
6673
|
+
Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6674
6674
|
"button",
|
|
6675
6675
|
{
|
|
6676
6676
|
type: "button",
|
|
@@ -6678,13 +6678,13 @@ var init_DataBindingControls = __esm({
|
|
|
6678
6678
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-md border border-neutral-soft bg-neutral-weak px-2.5 py-1 text-xs transition-colors hover:bg-neutral-soft",
|
|
6679
6679
|
title: `Remove filter: ${value}`,
|
|
6680
6680
|
children: [
|
|
6681
|
-
/* @__PURE__ */ (0,
|
|
6682
|
-
/* @__PURE__ */ (0,
|
|
6681
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "font-medium truncate max-w-[140px]", children: value }),
|
|
6682
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CloseIcon, { className: "h-3 w-3 shrink-0 opacity-60 group-hover:opacity-100" })
|
|
6683
6683
|
]
|
|
6684
6684
|
},
|
|
6685
6685
|
`mobile-chip-${field}`
|
|
6686
6686
|
)),
|
|
6687
|
-
/* @__PURE__ */ (0,
|
|
6687
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6688
6688
|
"button",
|
|
6689
6689
|
{
|
|
6690
6690
|
type: "button",
|
|
@@ -6695,8 +6695,8 @@ var init_DataBindingControls = __esm({
|
|
|
6695
6695
|
)
|
|
6696
6696
|
] })
|
|
6697
6697
|
] }),
|
|
6698
|
-
isMobileFiltersOpen && /* @__PURE__ */ (0,
|
|
6699
|
-
/* @__PURE__ */ (0,
|
|
6698
|
+
isMobileFiltersOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "fixed inset-0 z-50 flex flex-col justify-end lg:hidden", children: [
|
|
6699
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6700
6700
|
"div",
|
|
6701
6701
|
{
|
|
6702
6702
|
className: "fixed inset-0 bg-neutral-stronger/60 backdrop-blur-xs transition-opacity duration-300",
|
|
@@ -6704,12 +6704,12 @@ var init_DataBindingControls = __esm({
|
|
|
6704
6704
|
"aria-hidden": "true"
|
|
6705
6705
|
}
|
|
6706
6706
|
),
|
|
6707
|
-
/* @__PURE__ */ (0,
|
|
6708
|
-
/* @__PURE__ */ (0,
|
|
6709
|
-
/* @__PURE__ */ (0,
|
|
6710
|
-
/* @__PURE__ */ (0,
|
|
6711
|
-
/* @__PURE__ */ (0,
|
|
6712
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6707
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative z-10 flex h-[85vh] max-h-[85vh] w-full flex-col rounded-t-xl border-t border-neutral-soft bg-default shadow-2xl transition-transform duration-300 animate-in slide-in-from-bottom", children: [
|
|
6708
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "pt-2.5 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "mx-auto h-1.5 w-12 rounded-full bg-neutral-soft" }) }),
|
|
6709
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center justify-between px-5 py-3 border-b border-neutral-soft", children: [
|
|
6710
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h2", { className: "text-lg font-bold tracking-tight", children: "Filters" }),
|
|
6711
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6712
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6713
6713
|
"button",
|
|
6714
6714
|
{
|
|
6715
6715
|
type: "button",
|
|
@@ -6718,38 +6718,38 @@ var init_DataBindingControls = __esm({
|
|
|
6718
6718
|
children: "Clear all"
|
|
6719
6719
|
}
|
|
6720
6720
|
),
|
|
6721
|
-
/* @__PURE__ */ (0,
|
|
6721
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6722
6722
|
"button",
|
|
6723
6723
|
{
|
|
6724
6724
|
type: "button",
|
|
6725
6725
|
onClick: () => setIsMobileFiltersOpen(false),
|
|
6726
6726
|
className: "p-1 rounded-full hover:bg-neutral-weak transition-colors cursor-pointer",
|
|
6727
6727
|
"aria-label": "Close filters",
|
|
6728
|
-
children: /* @__PURE__ */ (0,
|
|
6728
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CloseIcon, { className: "h-5 w-5 opacity-70" })
|
|
6729
6729
|
}
|
|
6730
6730
|
)
|
|
6731
6731
|
] })
|
|
6732
6732
|
] }),
|
|
6733
|
-
/* @__PURE__ */ (0,
|
|
6733
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex-1 overflow-y-auto px-5 py-3 space-y-3 divide-y divide-neutral-soft", children: activeFacets.map(([field, values]) => {
|
|
6734
6734
|
const isOpen = !collapsedCategories[field];
|
|
6735
6735
|
const selectedValue = selectedFacetValues.get(field);
|
|
6736
6736
|
const categorySearch = facetCategorySearch[field]?.toLowerCase() || "";
|
|
6737
6737
|
const filteredValues = categorySearch ? values.filter((v) => v.value.toLowerCase().includes(categorySearch)) : values;
|
|
6738
|
-
return /* @__PURE__ */ (0,
|
|
6739
|
-
/* @__PURE__ */ (0,
|
|
6738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "pt-3 first:pt-0", children: [
|
|
6739
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6740
6740
|
"button",
|
|
6741
6741
|
{
|
|
6742
6742
|
type: "button",
|
|
6743
6743
|
onClick: () => toggleCategory(field),
|
|
6744
6744
|
className: "flex w-full cursor-pointer items-center justify-between rounded-md py-2 text-left transition-colors",
|
|
6745
6745
|
children: [
|
|
6746
|
-
/* @__PURE__ */ (0,
|
|
6747
|
-
/* @__PURE__ */ (0,
|
|
6748
|
-
/* @__PURE__ */ (0,
|
|
6746
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
6747
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-neutral-soft bg-neutral-weak", children: getCategoryIcon(field) }),
|
|
6748
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "font-semibold text-sm", children: humanize(field) })
|
|
6749
6749
|
] }),
|
|
6750
|
-
/* @__PURE__ */ (0,
|
|
6751
|
-
selectedValue && /* @__PURE__ */ (0,
|
|
6752
|
-
/* @__PURE__ */ (0,
|
|
6750
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6751
|
+
selectedValue && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary-base text-xs font-bold leading-none", children: "1" }),
|
|
6752
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6753
6753
|
ChevronDownIcon,
|
|
6754
6754
|
{
|
|
6755
6755
|
className: `h-4 w-4 transition-transform duration-200 ${isOpen ? "rotate-180" : ""}`
|
|
@@ -6759,10 +6759,10 @@ var init_DataBindingControls = __esm({
|
|
|
6759
6759
|
]
|
|
6760
6760
|
}
|
|
6761
6761
|
),
|
|
6762
|
-
isOpen && /* @__PURE__ */ (0,
|
|
6763
|
-
values.length > 5 && /* @__PURE__ */ (0,
|
|
6764
|
-
/* @__PURE__ */ (0,
|
|
6765
|
-
/* @__PURE__ */ (0,
|
|
6762
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "pt-2 pb-1 pl-1 pr-1 space-y-1.5", children: [
|
|
6763
|
+
values.length > 5 && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative mb-2", children: [
|
|
6764
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 opacity-50" }),
|
|
6765
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6766
6766
|
"input",
|
|
6767
6767
|
{
|
|
6768
6768
|
type: "text",
|
|
@@ -6776,9 +6776,9 @@ var init_DataBindingControls = __esm({
|
|
|
6776
6776
|
}
|
|
6777
6777
|
)
|
|
6778
6778
|
] }),
|
|
6779
|
-
filteredValues.length === 0 ? /* @__PURE__ */ (0,
|
|
6779
|
+
filteredValues.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "py-2 text-center text-xs opacity-60", children: "No matching options" }) : filteredValues.map((facet) => {
|
|
6780
6780
|
const isChecked = selectedValue === facet.value;
|
|
6781
|
-
return /* @__PURE__ */ (0,
|
|
6781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6782
6782
|
"button",
|
|
6783
6783
|
{
|
|
6784
6784
|
type: "button",
|
|
@@ -6788,17 +6788,17 @@ var init_DataBindingControls = __esm({
|
|
|
6788
6788
|
"aria-pressed": isChecked,
|
|
6789
6789
|
className: `flex w-full cursor-pointer items-center justify-between gap-3 rounded-md px-2.5 py-2 text-left text-sm transition-colors ${isChecked ? "bg-neutral-soft font-medium" : "hover:bg-neutral-weak"}`,
|
|
6790
6790
|
children: [
|
|
6791
|
-
/* @__PURE__ */ (0,
|
|
6792
|
-
/* @__PURE__ */ (0,
|
|
6791
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
6792
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6793
6793
|
"span",
|
|
6794
6794
|
{
|
|
6795
6795
|
className: `flex h-5 w-5 shrink-0 items-center justify-center rounded-md border transition-colors ${isChecked ? "bg-primary-base border-primary-base" : "border-neutral-soft bg-default"}`,
|
|
6796
|
-
children: isChecked && /* @__PURE__ */ (0,
|
|
6796
|
+
children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CheckIcon, { className: "h-3.5 w-3.5" })
|
|
6797
6797
|
}
|
|
6798
6798
|
),
|
|
6799
|
-
/* @__PURE__ */ (0,
|
|
6799
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "leading-snug break-words", children: facet.value })
|
|
6800
6800
|
] }),
|
|
6801
|
-
/* @__PURE__ */ (0,
|
|
6801
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "shrink-0 text-xs opacity-60 ml-2", children: facet.count })
|
|
6802
6802
|
]
|
|
6803
6803
|
},
|
|
6804
6804
|
`drawer-${field}-${facet.value}`
|
|
@@ -6807,8 +6807,8 @@ var init_DataBindingControls = __esm({
|
|
|
6807
6807
|
] })
|
|
6808
6808
|
] }, `drawer-cat-${field}`);
|
|
6809
6809
|
}) }),
|
|
6810
|
-
/* @__PURE__ */ (0,
|
|
6811
|
-
/* @__PURE__ */ (0,
|
|
6810
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-3 border-t border-neutral-soft bg-default p-4", children: [
|
|
6811
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6812
6812
|
"button",
|
|
6813
6813
|
{
|
|
6814
6814
|
type: "button",
|
|
@@ -6817,7 +6817,7 @@ var init_DataBindingControls = __esm({
|
|
|
6817
6817
|
children: "Close"
|
|
6818
6818
|
}
|
|
6819
6819
|
),
|
|
6820
|
-
/* @__PURE__ */ (0,
|
|
6820
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6821
6821
|
"button",
|
|
6822
6822
|
{
|
|
6823
6823
|
type: "button",
|
|
@@ -6833,14 +6833,14 @@ var init_DataBindingControls = __esm({
|
|
|
6833
6833
|
] })
|
|
6834
6834
|
] })
|
|
6835
6835
|
] }),
|
|
6836
|
-
shouldShowFacets && /* @__PURE__ */ (0,
|
|
6837
|
-
/* @__PURE__ */ (0,
|
|
6838
|
-
/* @__PURE__ */ (0,
|
|
6839
|
-
/* @__PURE__ */ (0,
|
|
6840
|
-
/* @__PURE__ */ (0,
|
|
6841
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6836
|
+
shouldShowFacets && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
6837
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center justify-between border-b border-neutral-soft pb-3", children: [
|
|
6838
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6839
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FilterSlidersIcon, { className: "h-4 w-4" }),
|
|
6840
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h2", { className: "text-base font-semibold tracking-tight", children: "Filters" }),
|
|
6841
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "flex h-5 items-center justify-center rounded-full bg-primary-base px-2 text-xs font-semibold", children: selectedFacetCount })
|
|
6842
6842
|
] }),
|
|
6843
|
-
hasActiveFiltersOrSort && /* @__PURE__ */ (0,
|
|
6843
|
+
hasActiveFiltersOrSort && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6844
6844
|
"button",
|
|
6845
6845
|
{
|
|
6846
6846
|
type: "button",
|
|
@@ -6848,13 +6848,13 @@ var init_DataBindingControls = __esm({
|
|
|
6848
6848
|
className: "group inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-colors duration-150 hover:bg-neutral-soft focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base",
|
|
6849
6849
|
"aria-label": "Clear all filters and sorting",
|
|
6850
6850
|
children: [
|
|
6851
|
-
/* @__PURE__ */ (0,
|
|
6852
|
-
/* @__PURE__ */ (0,
|
|
6851
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ResetIcon, { className: "h-3.5 w-3.5 transition-transform duration-200 group-hover:-rotate-45" }),
|
|
6852
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: "Clear all" })
|
|
6853
6853
|
]
|
|
6854
6854
|
}
|
|
6855
6855
|
)
|
|
6856
6856
|
] }),
|
|
6857
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6857
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex flex-wrap gap-1.5 pb-2.5 border-b border-neutral-soft", children: Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6858
6858
|
"button",
|
|
6859
6859
|
{
|
|
6860
6860
|
type: "button",
|
|
@@ -6862,35 +6862,35 @@ var init_DataBindingControls = __esm({
|
|
|
6862
6862
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-md border border-neutral-soft bg-neutral-weak px-2.5 py-1 text-xs transition-colors hover:bg-neutral-soft",
|
|
6863
6863
|
title: `Remove filter: ${value}`,
|
|
6864
6864
|
children: [
|
|
6865
|
-
/* @__PURE__ */ (0,
|
|
6866
|
-
/* @__PURE__ */ (0,
|
|
6865
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "font-medium truncate max-w-[150px]", children: value }),
|
|
6866
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CloseIcon, { className: "h-3.5 w-3.5 shrink-0 opacity-60 group-hover:opacity-100" })
|
|
6867
6867
|
]
|
|
6868
6868
|
},
|
|
6869
6869
|
`chip-${field}`
|
|
6870
6870
|
)) }),
|
|
6871
|
-
activeFacets.length === 1 && /* @__PURE__ */ (0,
|
|
6872
|
-
/* @__PURE__ */ (0,
|
|
6871
|
+
activeFacets.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("nav", { "aria-label": `${humanize(activeFacets[0][0])} filters`, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "py-1", children: [
|
|
6872
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "px-1 pb-2 font-medium text-sm", children: humanize(activeFacets[0][0]) }),
|
|
6873
6873
|
renderFacetItems(activeFacets[0][0], activeFacets[0][1])
|
|
6874
6874
|
] }) }),
|
|
6875
|
-
activeFacets.length > 1 && /* @__PURE__ */ (0,
|
|
6875
|
+
activeFacets.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "flex flex-col divide-y divide-neutral-soft", children: activeFacets.map(([field, values]) => {
|
|
6876
6876
|
const isOpen = !collapsedCategories[field];
|
|
6877
|
-
return /* @__PURE__ */ (0,
|
|
6877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6878
6878
|
"div",
|
|
6879
6879
|
{
|
|
6880
6880
|
className: "py-2 first:pt-0 last:pb-0",
|
|
6881
6881
|
children: [
|
|
6882
|
-
/* @__PURE__ */ (0,
|
|
6882
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
6883
6883
|
"button",
|
|
6884
6884
|
{
|
|
6885
6885
|
type: "button",
|
|
6886
6886
|
onClick: () => toggleCategory(field),
|
|
6887
6887
|
className: "flex w-full cursor-pointer items-center justify-between rounded-md px-1.5 py-1.5 text-sm font-semibold transition-colors duration-150 hover:bg-neutral-weak focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base",
|
|
6888
6888
|
children: [
|
|
6889
|
-
/* @__PURE__ */ (0,
|
|
6890
|
-
/* @__PURE__ */ (0,
|
|
6891
|
-
/* @__PURE__ */ (0,
|
|
6889
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6890
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded border border-neutral-soft bg-neutral-weak", children: getCategoryIcon(field) }),
|
|
6891
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: humanize(field) })
|
|
6892
6892
|
] }),
|
|
6893
|
-
/* @__PURE__ */ (0,
|
|
6893
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
6894
6894
|
ChevronDownIcon,
|
|
6895
6895
|
{
|
|
6896
6896
|
className: `h-4 w-4 transition-transform duration-200 ease-out ${isOpen ? "rotate-180" : ""}`
|
|
@@ -6899,7 +6899,7 @@ var init_DataBindingControls = __esm({
|
|
|
6899
6899
|
]
|
|
6900
6900
|
}
|
|
6901
6901
|
),
|
|
6902
|
-
isOpen && /* @__PURE__ */ (0,
|
|
6902
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "pt-1", children: renderFacetItems(field, values) })
|
|
6903
6903
|
]
|
|
6904
6904
|
},
|
|
6905
6905
|
field
|
|
@@ -6919,13 +6919,13 @@ var Slider_exports = {};
|
|
|
6919
6919
|
__export(Slider_exports, {
|
|
6920
6920
|
default: () => Slider_default
|
|
6921
6921
|
});
|
|
6922
|
-
var
|
|
6922
|
+
var import_react61, import_jsx_runtime88, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
6923
6923
|
var init_Slider = __esm({
|
|
6924
6924
|
"src/components/Slider.tsx"() {
|
|
6925
6925
|
"use strict";
|
|
6926
6926
|
"use client";
|
|
6927
|
-
|
|
6928
|
-
|
|
6927
|
+
import_react61 = __toESM(require("react"));
|
|
6928
|
+
import_jsx_runtime88 = require("react/jsx-runtime");
|
|
6929
6929
|
Slider = ({
|
|
6930
6930
|
children,
|
|
6931
6931
|
columns,
|
|
@@ -6946,17 +6946,17 @@ var init_Slider = __esm({
|
|
|
6946
6946
|
progressPosition = "bottom",
|
|
6947
6947
|
scrollByColumns = false
|
|
6948
6948
|
}) => {
|
|
6949
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
6950
|
-
const [transition, setTransition] = (0,
|
|
6949
|
+
const [currentSlide, setCurrentSlide] = (0, import_react61.useState)(0);
|
|
6950
|
+
const [transition, setTransition] = (0, import_react61.useState)(true);
|
|
6951
6951
|
const initialSlidesToShow = slidesToShow ?? columns ?? 4;
|
|
6952
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
6952
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react61.useState)(
|
|
6953
6953
|
typeof initialSlidesToShow === "number" ? initialSlidesToShow : initialSlidesToShow.large
|
|
6954
6954
|
);
|
|
6955
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
6956
|
-
const trackRef = (0,
|
|
6955
|
+
const [isPlaying, setIsPlaying] = (0, import_react61.useState)(autoplay);
|
|
6956
|
+
const trackRef = (0, import_react61.useRef)(null);
|
|
6957
6957
|
console.log("trackRef:", trackRef);
|
|
6958
|
-
const [videoProgress, setVideoProgress] = (0,
|
|
6959
|
-
(0,
|
|
6958
|
+
const [videoProgress, setVideoProgress] = (0, import_react61.useState)(null);
|
|
6959
|
+
(0, import_react61.useEffect)(() => {
|
|
6960
6960
|
if (typeof initialSlidesToShow === "number") {
|
|
6961
6961
|
setSlidesToShowState(initialSlidesToShow);
|
|
6962
6962
|
return;
|
|
@@ -6974,7 +6974,7 @@ var init_Slider = __esm({
|
|
|
6974
6974
|
window.addEventListener("resize", handleResize);
|
|
6975
6975
|
return () => window.removeEventListener("resize", handleResize);
|
|
6976
6976
|
}, [initialSlidesToShow]);
|
|
6977
|
-
(0,
|
|
6977
|
+
(0, import_react61.useEffect)(() => {
|
|
6978
6978
|
if (!autoplay) return;
|
|
6979
6979
|
const activeSlideElement = trackRef.current?.children[currentSlide];
|
|
6980
6980
|
const videoElement = activeSlideElement?.querySelector("video");
|
|
@@ -7019,7 +7019,7 @@ var init_Slider = __esm({
|
|
|
7019
7019
|
}, autoplay_speed);
|
|
7020
7020
|
return () => clearInterval(timer);
|
|
7021
7021
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
7022
|
-
const totalSlides =
|
|
7022
|
+
const totalSlides = import_react61.Children.count(children);
|
|
7023
7023
|
const numColumns = columns ?? slidesToShowState;
|
|
7024
7024
|
const slideWidthPercentage = (() => {
|
|
7025
7025
|
if (typeof lastColPercentage !== "number") {
|
|
@@ -7079,24 +7079,24 @@ var init_Slider = __esm({
|
|
|
7079
7079
|
}
|
|
7080
7080
|
};
|
|
7081
7081
|
const translateX = -currentSlide * slideWidthPercentage;
|
|
7082
|
-
const slides =
|
|
7083
|
-
if (!
|
|
7082
|
+
const slides = import_react61.Children.map(children, (child, index) => {
|
|
7083
|
+
if (!import_react61.default.isValidElement(child)) return null;
|
|
7084
7084
|
const childProps = child.props;
|
|
7085
7085
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
7086
|
-
return /* @__PURE__ */ (0,
|
|
7086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7087
7087
|
"div",
|
|
7088
7088
|
{
|
|
7089
7089
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
7090
7090
|
style: { width: `calc(${slideWidthPercentage}%)`, paddingRight: gap },
|
|
7091
|
-
children: (0,
|
|
7091
|
+
children: (0, import_react61.cloneElement)(child, {
|
|
7092
7092
|
className: mergedClassName
|
|
7093
7093
|
})
|
|
7094
7094
|
},
|
|
7095
7095
|
index
|
|
7096
7096
|
);
|
|
7097
7097
|
});
|
|
7098
|
-
return /* @__PURE__ */ (0,
|
|
7099
|
-
show_dots && progressPosition === "top" && /* @__PURE__ */ (0,
|
|
7098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "w-full", children: [
|
|
7099
|
+
show_dots && progressPosition === "top" && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "flex justify-center space-x-1.5 mb-4", children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7100
7100
|
ProgressPill,
|
|
7101
7101
|
{
|
|
7102
7102
|
active: index === currentSlide,
|
|
@@ -7113,14 +7113,14 @@ var init_Slider = __esm({
|
|
|
7113
7113
|
},
|
|
7114
7114
|
index
|
|
7115
7115
|
)) }),
|
|
7116
|
-
/* @__PURE__ */ (0,
|
|
7116
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
7117
7117
|
"div",
|
|
7118
7118
|
{
|
|
7119
7119
|
className: `relative w-full overflow-hidden ${className}`,
|
|
7120
7120
|
onMouseEnter: handleMouseEnter,
|
|
7121
7121
|
onMouseLeave: handleMouseLeave,
|
|
7122
7122
|
children: [
|
|
7123
|
-
/* @__PURE__ */ (0,
|
|
7123
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7124
7124
|
"div",
|
|
7125
7125
|
{
|
|
7126
7126
|
ref: trackRef,
|
|
@@ -7132,32 +7132,32 @@ var init_Slider = __esm({
|
|
|
7132
7132
|
children: slides
|
|
7133
7133
|
}
|
|
7134
7134
|
),
|
|
7135
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
7136
|
-
/* @__PURE__ */ (0,
|
|
7135
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
7136
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7137
7137
|
ArrowButton,
|
|
7138
7138
|
{
|
|
7139
7139
|
direction: "left",
|
|
7140
7140
|
onClick: prevSlide,
|
|
7141
7141
|
visible: infinite_scroll || currentSlide > 0,
|
|
7142
7142
|
className: arrowClassName,
|
|
7143
|
-
children: /* @__PURE__ */ (0,
|
|
7143
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
7144
7144
|
}
|
|
7145
7145
|
),
|
|
7146
|
-
/* @__PURE__ */ (0,
|
|
7146
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7147
7147
|
ArrowButton,
|
|
7148
7148
|
{
|
|
7149
7149
|
direction: "right",
|
|
7150
7150
|
onClick: nextSlide,
|
|
7151
7151
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
7152
7152
|
className: arrowClassName,
|
|
7153
|
-
children: /* @__PURE__ */ (0,
|
|
7153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) })
|
|
7154
7154
|
}
|
|
7155
7155
|
)
|
|
7156
7156
|
] })
|
|
7157
7157
|
]
|
|
7158
7158
|
}
|
|
7159
7159
|
),
|
|
7160
|
-
show_dots && progressPosition !== "top" && /* @__PURE__ */ (0,
|
|
7160
|
+
show_dots && progressPosition !== "top" && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "flex justify-center space-x-1.5 mt-5", children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7161
7161
|
ProgressPill,
|
|
7162
7162
|
{
|
|
7163
7163
|
active: index === currentSlide,
|
|
@@ -7182,7 +7182,7 @@ var init_Slider = __esm({
|
|
|
7182
7182
|
visible,
|
|
7183
7183
|
children,
|
|
7184
7184
|
className = ""
|
|
7185
|
-
}) => /* @__PURE__ */ (0,
|
|
7185
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7186
7186
|
"button",
|
|
7187
7187
|
{
|
|
7188
7188
|
className: `
|
|
@@ -7209,13 +7209,13 @@ var init_Slider = __esm({
|
|
|
7209
7209
|
totalSlides,
|
|
7210
7210
|
customProgress = null
|
|
7211
7211
|
}) => {
|
|
7212
|
-
const [progress, setProgress] = (0,
|
|
7213
|
-
(0,
|
|
7212
|
+
const [progress, setProgress] = (0, import_react61.useState)(0);
|
|
7213
|
+
(0, import_react61.useEffect)(() => {
|
|
7214
7214
|
if (active) {
|
|
7215
7215
|
setProgress(0);
|
|
7216
7216
|
}
|
|
7217
7217
|
}, [active, index]);
|
|
7218
|
-
(0,
|
|
7218
|
+
(0, import_react61.useEffect)(() => {
|
|
7219
7219
|
if (!active || !isPlaying || customProgress !== null) {
|
|
7220
7220
|
if (!active) {
|
|
7221
7221
|
setProgress(0);
|
|
@@ -7270,7 +7270,7 @@ var init_Slider = __esm({
|
|
|
7270
7270
|
const renderProgressBar = () => {
|
|
7271
7271
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
7272
7272
|
const displayProgress = style === "cumulative" && isFilled ? 100 : customProgress !== null && customProgress !== void 0 ? customProgress : progress;
|
|
7273
|
-
return /* @__PURE__ */ (0,
|
|
7273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7274
7274
|
"div",
|
|
7275
7275
|
{
|
|
7276
7276
|
className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
|
|
@@ -7282,7 +7282,7 @@ var init_Slider = __esm({
|
|
|
7282
7282
|
};
|
|
7283
7283
|
const renderCumulativeFill = () => {
|
|
7284
7284
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
7285
|
-
return /* @__PURE__ */ (0,
|
|
7285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7286
7286
|
"div",
|
|
7287
7287
|
{
|
|
7288
7288
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -7292,7 +7292,7 @@ var init_Slider = __esm({
|
|
|
7292
7292
|
}
|
|
7293
7293
|
return null;
|
|
7294
7294
|
};
|
|
7295
|
-
return /* @__PURE__ */ (0,
|
|
7295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
7296
7296
|
"button",
|
|
7297
7297
|
{
|
|
7298
7298
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -7777,10 +7777,10 @@ var InputControl_default = InputControl2;
|
|
|
7777
7777
|
init_InputControlType();
|
|
7778
7778
|
|
|
7779
7779
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
7780
|
-
var
|
|
7780
|
+
var import_react63 = __toESM(require("react"));
|
|
7781
7781
|
|
|
7782
7782
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
7783
|
-
var
|
|
7783
|
+
var import_react49 = __toESM(require("react"));
|
|
7784
7784
|
|
|
7785
7785
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
7786
7786
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
@@ -7935,7 +7935,7 @@ var ImageNode = (props) => {
|
|
|
7935
7935
|
...props.node.borderRadius && { borderRadius: props.node.borderRadius },
|
|
7936
7936
|
...props.node.width && { width: props.node.width }
|
|
7937
7937
|
};
|
|
7938
|
-
const
|
|
7938
|
+
const FORMAT_CLASSES3 = {
|
|
7939
7939
|
center: "justify-center",
|
|
7940
7940
|
left: "justify-start",
|
|
7941
7941
|
right: "justify-end"
|
|
@@ -7967,7 +7967,7 @@ var ImageNode = (props) => {
|
|
|
7967
7967
|
}
|
|
7968
7968
|
);
|
|
7969
7969
|
if (props.node.width) {
|
|
7970
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `flex ${
|
|
7970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `flex ${FORMAT_CLASSES3[props.node.format] ?? ""}`, children: renderMedia() });
|
|
7971
7971
|
}
|
|
7972
7972
|
return renderMedia();
|
|
7973
7973
|
};
|
|
@@ -8260,8 +8260,89 @@ var DatafieldNode = (props) => {
|
|
|
8260
8260
|
};
|
|
8261
8261
|
var DatafieldNode_default = DatafieldNode;
|
|
8262
8262
|
|
|
8263
|
-
// src/components/pageRenderingEngine/nodes/
|
|
8263
|
+
// src/components/pageRenderingEngine/nodes/CounterNode.tsx
|
|
8264
|
+
var import_react48 = require("react");
|
|
8264
8265
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
8266
|
+
var FORMAT_CLASSES2 = {
|
|
8267
|
+
center: "justify-center text-center",
|
|
8268
|
+
right: "justify-end text-right",
|
|
8269
|
+
left: "justify-start text-left",
|
|
8270
|
+
justify: "justify-between text-justify"
|
|
8271
|
+
};
|
|
8272
|
+
var CounterNode = ({ node }) => {
|
|
8273
|
+
const ref = (0, import_react48.useRef)(null);
|
|
8274
|
+
const startValue = typeof node?.startValue === "number" ? node.startValue : Number(node?.startValue) || 0;
|
|
8275
|
+
const endValue = typeof node?.endValue === "number" ? node.endValue : Number(node?.endValue) || 0;
|
|
8276
|
+
const duration = Math.max(Number(node?.duration) || 2e3, 300);
|
|
8277
|
+
const prefix = node?.prefix ?? "";
|
|
8278
|
+
const suffix = node?.suffix ?? "";
|
|
8279
|
+
const format = node?.format;
|
|
8280
|
+
const [displayValue, setDisplayValue] = (0, import_react48.useState)(startValue);
|
|
8281
|
+
const hasAnimatedRef = (0, import_react48.useRef)(false);
|
|
8282
|
+
const runAnimation = (0, import_react48.useCallback)(() => {
|
|
8283
|
+
let startTime = null;
|
|
8284
|
+
let animationFrameId;
|
|
8285
|
+
const step = (timestamp) => {
|
|
8286
|
+
if (!startTime) startTime = timestamp;
|
|
8287
|
+
const progress = Math.min((timestamp - startTime) / duration, 1);
|
|
8288
|
+
const easeOutProgress = 1 - Math.pow(1 - progress, 3);
|
|
8289
|
+
const currentVal = Math.round(startValue + (endValue - startValue) * easeOutProgress);
|
|
8290
|
+
setDisplayValue(currentVal);
|
|
8291
|
+
if (progress < 1) {
|
|
8292
|
+
animationFrameId = requestAnimationFrame(step);
|
|
8293
|
+
} else {
|
|
8294
|
+
setDisplayValue(endValue);
|
|
8295
|
+
}
|
|
8296
|
+
};
|
|
8297
|
+
animationFrameId = requestAnimationFrame(step);
|
|
8298
|
+
return () => {
|
|
8299
|
+
if (animationFrameId) {
|
|
8300
|
+
cancelAnimationFrame(animationFrameId);
|
|
8301
|
+
}
|
|
8302
|
+
};
|
|
8303
|
+
}, [startValue, endValue, duration]);
|
|
8304
|
+
(0, import_react48.useEffect)(() => {
|
|
8305
|
+
const currentRef = ref.current;
|
|
8306
|
+
if (!currentRef) return;
|
|
8307
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
8308
|
+
return runAnimation();
|
|
8309
|
+
}
|
|
8310
|
+
const observer = new IntersectionObserver(
|
|
8311
|
+
(entries) => {
|
|
8312
|
+
entries.forEach((entry) => {
|
|
8313
|
+
if (entry.isIntersecting && !hasAnimatedRef.current) {
|
|
8314
|
+
hasAnimatedRef.current = true;
|
|
8315
|
+
runAnimation();
|
|
8316
|
+
observer.unobserve(entry.target);
|
|
8317
|
+
}
|
|
8318
|
+
});
|
|
8319
|
+
},
|
|
8320
|
+
{ threshold: 0.1 }
|
|
8321
|
+
);
|
|
8322
|
+
observer.observe(currentRef);
|
|
8323
|
+
return () => {
|
|
8324
|
+
observer.disconnect();
|
|
8325
|
+
};
|
|
8326
|
+
}, [runAnimation]);
|
|
8327
|
+
if (!node) return null;
|
|
8328
|
+
const alignClass = format && FORMAT_CLASSES2[format] || "justify-center text-center";
|
|
8329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8330
|
+
"div",
|
|
8331
|
+
{
|
|
8332
|
+
ref,
|
|
8333
|
+
className: `counter-node inline-flex items-center ${alignClass}`,
|
|
8334
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: "counter-display text-3xl font-bold tracking-tight", children: [
|
|
8335
|
+
prefix,
|
|
8336
|
+
displayValue.toLocaleString(),
|
|
8337
|
+
suffix
|
|
8338
|
+
] })
|
|
8339
|
+
}
|
|
8340
|
+
);
|
|
8341
|
+
};
|
|
8342
|
+
var CounterNode_default = CounterNode;
|
|
8343
|
+
|
|
8344
|
+
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
8345
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
8265
8346
|
var ParagraphNode = (props) => {
|
|
8266
8347
|
const NodeTypes2 = {
|
|
8267
8348
|
["text"]: TextNode_default,
|
|
@@ -8269,7 +8350,8 @@ var ParagraphNode = (props) => {
|
|
|
8269
8350
|
["link"]: LinkNode_default,
|
|
8270
8351
|
["datafield"]: DatafieldNode_default,
|
|
8271
8352
|
["equation"]: EquationNode_default,
|
|
8272
|
-
["svg-icon"]: SVGIconNode_default
|
|
8353
|
+
["svg-icon"]: SVGIconNode_default,
|
|
8354
|
+
["counter"]: CounterNode_default
|
|
8273
8355
|
};
|
|
8274
8356
|
const FormatClass = {
|
|
8275
8357
|
"center": "text-center",
|
|
@@ -8281,9 +8363,9 @@ var ParagraphNode = (props) => {
|
|
|
8281
8363
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
8282
8364
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
8283
8365
|
if (isInlineOnlyParent) {
|
|
8284
|
-
return /* @__PURE__ */ (0,
|
|
8366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
8285
8367
|
const SelectedNode = NodeTypes2[node.type];
|
|
8286
|
-
return /* @__PURE__ */ (0,
|
|
8368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react49.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8287
8369
|
SelectedNode,
|
|
8288
8370
|
{
|
|
8289
8371
|
node,
|
|
@@ -8296,10 +8378,10 @@ var ParagraphNode = (props) => {
|
|
|
8296
8378
|
) }, index);
|
|
8297
8379
|
}) });
|
|
8298
8380
|
}
|
|
8299
|
-
return /* @__PURE__ */ (0,
|
|
8381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: " " + formatClasses, children: [
|
|
8300
8382
|
hasChildren && props.node.children.map((node, index) => {
|
|
8301
8383
|
const SelectedNode = NodeTypes2[node.type];
|
|
8302
|
-
return /* @__PURE__ */ (0,
|
|
8384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react49.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8303
8385
|
SelectedNode,
|
|
8304
8386
|
{
|
|
8305
8387
|
node,
|
|
@@ -8311,21 +8393,22 @@ var ParagraphNode = (props) => {
|
|
|
8311
8393
|
}
|
|
8312
8394
|
) }, index);
|
|
8313
8395
|
}),
|
|
8314
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
8396
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
8315
8397
|
] });
|
|
8316
8398
|
};
|
|
8317
8399
|
var ParagraphNode_default = ParagraphNode;
|
|
8318
8400
|
|
|
8319
8401
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
8320
|
-
var
|
|
8321
|
-
var
|
|
8402
|
+
var import_react50 = __toESM(require("react"));
|
|
8403
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
8322
8404
|
var HeadingNode = (props) => {
|
|
8323
8405
|
const NodeTypes2 = {
|
|
8324
8406
|
["text"]: TextNode_default,
|
|
8325
8407
|
["link"]: LinkNode_default,
|
|
8326
8408
|
["svg-icon"]: SVGIconNode_default,
|
|
8327
8409
|
["linebreak"]: LineBreakNode_default,
|
|
8328
|
-
["datafield"]: DatafieldNode_default
|
|
8410
|
+
["datafield"]: DatafieldNode_default,
|
|
8411
|
+
["counter"]: CounterNode_default
|
|
8329
8412
|
};
|
|
8330
8413
|
const HeadingTag = `${props.node.tag}`;
|
|
8331
8414
|
const FormatClass = {
|
|
@@ -8334,23 +8417,23 @@ var HeadingNode = (props) => {
|
|
|
8334
8417
|
{
|
|
8335
8418
|
}
|
|
8336
8419
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
8337
|
-
return /* @__PURE__ */ (0,
|
|
8420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, { children: import_react50.default.createElement(
|
|
8338
8421
|
HeadingTag,
|
|
8339
8422
|
{ className: formatClasses },
|
|
8340
8423
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
8341
8424
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
8342
|
-
return /* @__PURE__ */ (0,
|
|
8425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, assetBaseUrl: props.assetBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
8343
8426
|
})
|
|
8344
8427
|
) });
|
|
8345
8428
|
};
|
|
8346
8429
|
var HeadingNode_default = HeadingNode;
|
|
8347
8430
|
|
|
8348
8431
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
8349
|
-
var
|
|
8432
|
+
var import_react52 = __toESM(require("react"));
|
|
8350
8433
|
|
|
8351
8434
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
8352
|
-
var
|
|
8353
|
-
var
|
|
8435
|
+
var import_react51 = __toESM(require("react"));
|
|
8436
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
8354
8437
|
var ListItemNode = (props) => {
|
|
8355
8438
|
const NodeTypes2 = {
|
|
8356
8439
|
text: TextNode_default,
|
|
@@ -8367,66 +8450,66 @@ var ListItemNode = (props) => {
|
|
|
8367
8450
|
liStyle.fontSize = match[1].trim();
|
|
8368
8451
|
}
|
|
8369
8452
|
}
|
|
8370
|
-
return /* @__PURE__ */ (0,
|
|
8453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
8371
8454
|
const SelectedNode = NodeTypes2[node.type];
|
|
8372
8455
|
if (node.type === "linebreak") {
|
|
8373
8456
|
if (!foundFirstBreak) {
|
|
8374
8457
|
foundFirstBreak = true;
|
|
8375
|
-
return /* @__PURE__ */ (0,
|
|
8458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", {}, index);
|
|
8376
8459
|
} else {
|
|
8377
|
-
return /* @__PURE__ */ (0,
|
|
8460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
8378
8461
|
}
|
|
8379
8462
|
} else {
|
|
8380
8463
|
foundFirstBreak = false;
|
|
8381
|
-
return /* @__PURE__ */ (0,
|
|
8464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
8382
8465
|
}
|
|
8383
8466
|
}) });
|
|
8384
8467
|
};
|
|
8385
8468
|
var ListItemNode_default = ListItemNode;
|
|
8386
8469
|
|
|
8387
8470
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
8388
|
-
var
|
|
8471
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
8389
8472
|
var ListNode = (props) => {
|
|
8390
8473
|
const NodeTypes2 = {
|
|
8391
8474
|
listitem: ListItemNode_default
|
|
8392
8475
|
};
|
|
8393
|
-
return /* @__PURE__ */ (0,
|
|
8394
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
8476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_react52.default.Fragment, { children: [
|
|
8477
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
8395
8478
|
const SelectedNode = NodeTypes2[node.type];
|
|
8396
|
-
return /* @__PURE__ */ (0,
|
|
8479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
8397
8480
|
}) }),
|
|
8398
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
8481
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
8399
8482
|
const SelectedNode = NodeTypes2[node.type];
|
|
8400
|
-
return /* @__PURE__ */ (0,
|
|
8483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
8401
8484
|
}) })
|
|
8402
8485
|
] });
|
|
8403
8486
|
};
|
|
8404
8487
|
var ListNode_default = ListNode;
|
|
8405
8488
|
|
|
8406
8489
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
8407
|
-
var
|
|
8408
|
-
var
|
|
8490
|
+
var import_react53 = __toESM(require("react"));
|
|
8491
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
8409
8492
|
var QuoteNode = (props) => {
|
|
8410
8493
|
const NodeTypes2 = {
|
|
8411
8494
|
["text"]: TextNode_default,
|
|
8412
8495
|
["linebreak"]: LineBreakNode_default,
|
|
8413
8496
|
["link"]: LinkNode_default
|
|
8414
8497
|
};
|
|
8415
|
-
return /* @__PURE__ */ (0,
|
|
8498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
8416
8499
|
const SelectedNode = NodeTypes2[node.type];
|
|
8417
|
-
return /* @__PURE__ */ (0,
|
|
8500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
8418
8501
|
}) });
|
|
8419
8502
|
};
|
|
8420
8503
|
var QuoteNode_default = QuoteNode;
|
|
8421
8504
|
|
|
8422
8505
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
8423
|
-
var
|
|
8506
|
+
var import_react55 = __toESM(require("react"));
|
|
8424
8507
|
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
8425
|
-
var
|
|
8508
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8426
8509
|
var CopyButton2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
8427
8510
|
ssr: false,
|
|
8428
8511
|
// optional: fallback UI while loading
|
|
8429
|
-
loading: () => /* @__PURE__ */ (0,
|
|
8512
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
8430
8513
|
});
|
|
8431
8514
|
var CodeNode = (props) => {
|
|
8432
8515
|
const NodeTypes2 = {
|
|
@@ -8440,14 +8523,14 @@ var CodeNode = (props) => {
|
|
|
8440
8523
|
if (node.type === "link") return node.text || node.url || "";
|
|
8441
8524
|
return "";
|
|
8442
8525
|
}).join("") ?? "";
|
|
8443
|
-
return /* @__PURE__ */ (0,
|
|
8444
|
-
/* @__PURE__ */ (0,
|
|
8445
|
-
/* @__PURE__ */ (0,
|
|
8446
|
-
/* @__PURE__ */ (0,
|
|
8526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { children: [
|
|
8527
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
8528
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: "Code Snippet" }),
|
|
8529
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(CopyButton2, { text: textContent })
|
|
8447
8530
|
] }),
|
|
8448
|
-
/* @__PURE__ */ (0,
|
|
8531
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("code", { className: "bg-neutral-soft p-4 text-sm whitespace-pre-wrap border border-2 block", children: props.node.children && props.node.children.map((node, index) => {
|
|
8449
8532
|
const SelectedNode = NodeTypes2[node.type];
|
|
8450
|
-
return /* @__PURE__ */ (0,
|
|
8533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react55.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8451
8534
|
SelectedNode,
|
|
8452
8535
|
{
|
|
8453
8536
|
node,
|
|
@@ -8462,15 +8545,15 @@ var CodeNode = (props) => {
|
|
|
8462
8545
|
var CodeNode_default = CodeNode;
|
|
8463
8546
|
|
|
8464
8547
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
8465
|
-
var
|
|
8548
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
8466
8549
|
var HorizontalRuleNode = () => {
|
|
8467
|
-
return /* @__PURE__ */ (0,
|
|
8550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("hr", {});
|
|
8468
8551
|
};
|
|
8469
8552
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
8470
8553
|
|
|
8471
8554
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
8472
|
-
var
|
|
8473
|
-
var
|
|
8555
|
+
var import_react56 = __toESM(require("react"));
|
|
8556
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8474
8557
|
var WidgetNode = (props) => {
|
|
8475
8558
|
const getWidgetParameters = () => {
|
|
8476
8559
|
const widgetInputParameters = {
|
|
@@ -8534,7 +8617,7 @@ var WidgetNode = (props) => {
|
|
|
8534
8617
|
};
|
|
8535
8618
|
const widgetCode = props.node?.widgetCode;
|
|
8536
8619
|
if (!widgetCode) {
|
|
8537
|
-
return /* @__PURE__ */ (0,
|
|
8620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_jsx_runtime77.Fragment, { children: "Invalid widget" });
|
|
8538
8621
|
}
|
|
8539
8622
|
const widgetParams = getWidgetParameters();
|
|
8540
8623
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -8543,7 +8626,7 @@ var WidgetNode = (props) => {
|
|
|
8543
8626
|
}
|
|
8544
8627
|
return (
|
|
8545
8628
|
// eslint-disable-next-line react-hooks/static-components
|
|
8546
|
-
/* @__PURE__ */ (0,
|
|
8629
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8547
8630
|
WidgetRenderer,
|
|
8548
8631
|
{
|
|
8549
8632
|
params: widgetParams,
|
|
@@ -8561,11 +8644,11 @@ var WidgetNode_default = WidgetNode;
|
|
|
8561
8644
|
|
|
8562
8645
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
8563
8646
|
var import_dynamic14 = __toESM(require("next/dynamic"));
|
|
8564
|
-
var
|
|
8647
|
+
var import_react62 = __toESM(require("react"));
|
|
8565
8648
|
|
|
8566
8649
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
8567
8650
|
var import_dynamic11 = __toESM(require("next/dynamic"));
|
|
8568
|
-
var
|
|
8651
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
8569
8652
|
var IframeClient2 = (0, import_dynamic11.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
8570
8653
|
ssr: false
|
|
8571
8654
|
});
|
|
@@ -8578,7 +8661,7 @@ var EmbedNode = (props) => {
|
|
|
8578
8661
|
} else {
|
|
8579
8662
|
src = props.node.embedSrc;
|
|
8580
8663
|
}
|
|
8581
|
-
return /* @__PURE__ */ (0,
|
|
8664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(IframeClient2, { src }) });
|
|
8582
8665
|
};
|
|
8583
8666
|
var EmbedNode_default = EmbedNode;
|
|
8584
8667
|
|
|
@@ -8821,10 +8904,10 @@ var PathUtility = class {
|
|
|
8821
8904
|
var PathUtility_default = new PathUtility();
|
|
8822
8905
|
|
|
8823
8906
|
// src/components/NoDataFound.tsx
|
|
8824
|
-
var
|
|
8907
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
8825
8908
|
var NoDataFound = () => {
|
|
8826
|
-
return /* @__PURE__ */ (0,
|
|
8827
|
-
/* @__PURE__ */ (0,
|
|
8909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
8910
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8828
8911
|
"svg",
|
|
8829
8912
|
{
|
|
8830
8913
|
className: "w-10 h-10",
|
|
@@ -8832,7 +8915,7 @@ var NoDataFound = () => {
|
|
|
8832
8915
|
stroke: "currentColor",
|
|
8833
8916
|
viewBox: "0 0 24 24",
|
|
8834
8917
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8835
|
-
children: /* @__PURE__ */ (0,
|
|
8918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8836
8919
|
"path",
|
|
8837
8920
|
{
|
|
8838
8921
|
strokeLinecap: "round",
|
|
@@ -8843,17 +8926,17 @@ var NoDataFound = () => {
|
|
|
8843
8926
|
)
|
|
8844
8927
|
}
|
|
8845
8928
|
) }) }),
|
|
8846
|
-
/* @__PURE__ */ (0,
|
|
8847
|
-
/* @__PURE__ */ (0,
|
|
8929
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
8930
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
8848
8931
|
] });
|
|
8849
8932
|
};
|
|
8850
8933
|
var NoDataFound_default = NoDataFound;
|
|
8851
8934
|
|
|
8852
8935
|
// src/components/NoFilterResultsFound.tsx
|
|
8853
|
-
var
|
|
8936
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8854
8937
|
var NoFilterResultsFound = () => {
|
|
8855
|
-
return /* @__PURE__ */ (0,
|
|
8856
|
-
/* @__PURE__ */ (0,
|
|
8938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
8939
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8857
8940
|
"svg",
|
|
8858
8941
|
{
|
|
8859
8942
|
className: "w-10 h-10",
|
|
@@ -8861,7 +8944,7 @@ var NoFilterResultsFound = () => {
|
|
|
8861
8944
|
stroke: "currentColor",
|
|
8862
8945
|
viewBox: "0 0 24 24",
|
|
8863
8946
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8864
|
-
children: /* @__PURE__ */ (0,
|
|
8947
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8865
8948
|
"path",
|
|
8866
8949
|
{
|
|
8867
8950
|
strokeLinecap: "round",
|
|
@@ -8872,8 +8955,8 @@ var NoFilterResultsFound = () => {
|
|
|
8872
8955
|
)
|
|
8873
8956
|
}
|
|
8874
8957
|
) }) }),
|
|
8875
|
-
/* @__PURE__ */ (0,
|
|
8876
|
-
/* @__PURE__ */ (0,
|
|
8958
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No Results Found" }),
|
|
8959
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "max-w-sm mb-0", children: "No data matches the current search query and configured parameters. Try adjusting your search criteria or filters to view available results." })
|
|
8877
8960
|
] });
|
|
8878
8961
|
};
|
|
8879
8962
|
var NoFilterResultsFound_default = NoFilterResultsFound;
|
|
@@ -8881,7 +8964,7 @@ var NoFilterResultsFound_default = NoFilterResultsFound;
|
|
|
8881
8964
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
8882
8965
|
init_AssetUtility();
|
|
8883
8966
|
var import_dynamic12 = __toESM(require("next/dynamic"));
|
|
8884
|
-
var
|
|
8967
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8885
8968
|
var HlsPlayer4 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
8886
8969
|
var deviceToMediaQuery = (device) => {
|
|
8887
8970
|
switch (device) {
|
|
@@ -9037,8 +9120,8 @@ var ImageGalleryNode = (props) => {
|
|
|
9037
9120
|
right: "justify-end"
|
|
9038
9121
|
};
|
|
9039
9122
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
9040
|
-
return /* @__PURE__ */ (0,
|
|
9041
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
9123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
9124
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_jsx_runtime83.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9042
9125
|
HlsPlayer4,
|
|
9043
9126
|
{
|
|
9044
9127
|
sources: hlsSources,
|
|
@@ -9053,7 +9136,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9053
9136
|
styles: hlsStyles
|
|
9054
9137
|
}
|
|
9055
9138
|
) }),
|
|
9056
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
9139
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_jsx_runtime83.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("picture", { children: [
|
|
9057
9140
|
DEVICE_ORDER.map((deviceKey) => {
|
|
9058
9141
|
const match = staticSources.find(
|
|
9059
9142
|
(img) => img.device === deviceKey
|
|
@@ -9069,7 +9152,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9069
9152
|
if (!srcUrl) {
|
|
9070
9153
|
return null;
|
|
9071
9154
|
}
|
|
9072
|
-
return /* @__PURE__ */ (0,
|
|
9155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9073
9156
|
"source",
|
|
9074
9157
|
{
|
|
9075
9158
|
media: deviceToMediaQuery(match.device),
|
|
@@ -9094,7 +9177,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9094
9177
|
if (img.borderRadius) {
|
|
9095
9178
|
styles.borderRadius = img.borderRadius;
|
|
9096
9179
|
}
|
|
9097
|
-
return /* @__PURE__ */ (0,
|
|
9180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9098
9181
|
"img",
|
|
9099
9182
|
{
|
|
9100
9183
|
loading: "lazy",
|
|
@@ -9109,7 +9192,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9109
9192
|
})()
|
|
9110
9193
|
] }) : (
|
|
9111
9194
|
/* Case 2: Only device-specific images exist */
|
|
9112
|
-
/* @__PURE__ */ (0,
|
|
9195
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_jsx_runtime83.Fragment, { children: staticSources.map((img, index) => {
|
|
9113
9196
|
const resolved = resolveImage(img);
|
|
9114
9197
|
const imageUrl = resolved?.imageUrl;
|
|
9115
9198
|
if (!imageUrl) {
|
|
@@ -9136,7 +9219,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9136
9219
|
default:
|
|
9137
9220
|
display = "block";
|
|
9138
9221
|
}
|
|
9139
|
-
return /* @__PURE__ */ (0,
|
|
9222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9140
9223
|
"img",
|
|
9141
9224
|
{
|
|
9142
9225
|
loading: "lazy",
|
|
@@ -9277,7 +9360,7 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
9277
9360
|
|
|
9278
9361
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
9279
9362
|
init_AssetUtility();
|
|
9280
|
-
var
|
|
9363
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
9281
9364
|
var getNestedValue5 = (obj, path) => {
|
|
9282
9365
|
if (!obj || !path) return void 0;
|
|
9283
9366
|
return path.split(".").reduce((current, key) => {
|
|
@@ -9308,21 +9391,21 @@ var parseDocuments = (value) => {
|
|
|
9308
9391
|
}
|
|
9309
9392
|
return [];
|
|
9310
9393
|
};
|
|
9311
|
-
var PdfIcon2 = () => /* @__PURE__ */ (0,
|
|
9394
|
+
var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9312
9395
|
"svg",
|
|
9313
9396
|
{
|
|
9314
9397
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9315
9398
|
viewBox: "0 0 48 48",
|
|
9316
9399
|
className: "w-10 h-10",
|
|
9317
9400
|
children: [
|
|
9318
|
-
/* @__PURE__ */ (0,
|
|
9401
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9319
9402
|
"path",
|
|
9320
9403
|
{
|
|
9321
9404
|
fill: "#e53935",
|
|
9322
9405
|
d: "M38,42H10c-2.209,0-4-1.791-4-4V10c0-2.209,1.791-4,4-4h28c2.209,0,4,1.791,4,4v28 C42,40.209,40.209,42,38,42z"
|
|
9323
9406
|
}
|
|
9324
9407
|
),
|
|
9325
|
-
/* @__PURE__ */ (0,
|
|
9408
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9326
9409
|
"path",
|
|
9327
9410
|
{
|
|
9328
9411
|
fill: "#fff",
|
|
@@ -9332,55 +9415,55 @@ var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9332
9415
|
]
|
|
9333
9416
|
}
|
|
9334
9417
|
);
|
|
9335
|
-
var ExcelIcon2 = () => /* @__PURE__ */ (0,
|
|
9418
|
+
var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9336
9419
|
"svg",
|
|
9337
9420
|
{
|
|
9338
9421
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9339
9422
|
viewBox: "0 0 48 48",
|
|
9340
9423
|
className: "w-10 h-10",
|
|
9341
9424
|
children: [
|
|
9342
|
-
/* @__PURE__ */ (0,
|
|
9425
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9343
9426
|
"path",
|
|
9344
9427
|
{
|
|
9345
9428
|
fill: "#169154",
|
|
9346
9429
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
9347
9430
|
}
|
|
9348
9431
|
),
|
|
9349
|
-
/* @__PURE__ */ (0,
|
|
9432
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9350
9433
|
"path",
|
|
9351
9434
|
{
|
|
9352
9435
|
fill: "#18482a",
|
|
9353
9436
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
9354
9437
|
}
|
|
9355
9438
|
),
|
|
9356
|
-
/* @__PURE__ */ (0,
|
|
9357
|
-
/* @__PURE__ */ (0,
|
|
9358
|
-
/* @__PURE__ */ (0,
|
|
9359
|
-
/* @__PURE__ */ (0,
|
|
9439
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
9440
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
9441
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("g", { children: [
|
|
9442
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9360
9443
|
"path",
|
|
9361
9444
|
{
|
|
9362
9445
|
fill: "#29c27f",
|
|
9363
9446
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
9364
9447
|
}
|
|
9365
9448
|
),
|
|
9366
|
-
/* @__PURE__ */ (0,
|
|
9449
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9367
9450
|
"path",
|
|
9368
9451
|
{
|
|
9369
9452
|
fill: "#27663f",
|
|
9370
9453
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
9371
9454
|
}
|
|
9372
9455
|
),
|
|
9373
|
-
/* @__PURE__ */ (0,
|
|
9374
|
-
/* @__PURE__ */ (0,
|
|
9456
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
9457
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
9375
9458
|
] }),
|
|
9376
|
-
/* @__PURE__ */ (0,
|
|
9459
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9377
9460
|
"path",
|
|
9378
9461
|
{
|
|
9379
9462
|
fill: "#0c7238",
|
|
9380
9463
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
9381
9464
|
}
|
|
9382
9465
|
),
|
|
9383
|
-
/* @__PURE__ */ (0,
|
|
9466
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9384
9467
|
"path",
|
|
9385
9468
|
{
|
|
9386
9469
|
fill: "#fff",
|
|
@@ -9390,7 +9473,7 @@ var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9390
9473
|
]
|
|
9391
9474
|
}
|
|
9392
9475
|
);
|
|
9393
|
-
var WordIcon2 = () => /* @__PURE__ */ (0,
|
|
9476
|
+
var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9394
9477
|
"svg",
|
|
9395
9478
|
{
|
|
9396
9479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9398,14 +9481,14 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9398
9481
|
className: "w-10 h-10",
|
|
9399
9482
|
baseProfile: "basic",
|
|
9400
9483
|
children: [
|
|
9401
|
-
/* @__PURE__ */ (0,
|
|
9484
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9402
9485
|
"path",
|
|
9403
9486
|
{
|
|
9404
9487
|
fill: "#283593",
|
|
9405
9488
|
d: "M9,33.595l14.911-18.706L41,26v13.306C41,41.346,39.346,43,37.306,43H15.332 C11.835,43,9,40.164,9,36.667C9,36.667,9,33.595,9,33.595z"
|
|
9406
9489
|
}
|
|
9407
9490
|
),
|
|
9408
|
-
/* @__PURE__ */ (0,
|
|
9491
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9409
9492
|
"linearGradient",
|
|
9410
9493
|
{
|
|
9411
9494
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -9416,19 +9499,19 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9416
9499
|
gradientTransform: "translate(0 -339.89)",
|
|
9417
9500
|
gradientUnits: "userSpaceOnUse",
|
|
9418
9501
|
children: [
|
|
9419
|
-
/* @__PURE__ */ (0,
|
|
9420
|
-
/* @__PURE__ */ (0,
|
|
9502
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
9503
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
9421
9504
|
]
|
|
9422
9505
|
}
|
|
9423
9506
|
),
|
|
9424
|
-
/* @__PURE__ */ (0,
|
|
9507
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9425
9508
|
"path",
|
|
9426
9509
|
{
|
|
9427
9510
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
9428
9511
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
9429
9512
|
}
|
|
9430
9513
|
),
|
|
9431
|
-
/* @__PURE__ */ (0,
|
|
9514
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9432
9515
|
"path",
|
|
9433
9516
|
{
|
|
9434
9517
|
fill: "#1e88e5",
|
|
@@ -9436,21 +9519,21 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9436
9519
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
9437
9520
|
}
|
|
9438
9521
|
),
|
|
9439
|
-
/* @__PURE__ */ (0,
|
|
9522
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9440
9523
|
"path",
|
|
9441
9524
|
{
|
|
9442
9525
|
fill: "#00e5ff",
|
|
9443
9526
|
d: "M9,10.333C9,6.836,11.835,4,15.332,4h21.975C39.346,4,41,5.654,41,7.694v5.611 C41,15.346,39.346,17,37.306,17H15.332C11.835,17,9,19.836,9,23.333C9,23.333,9,10.333,9,10.333z"
|
|
9444
9527
|
}
|
|
9445
9528
|
),
|
|
9446
|
-
/* @__PURE__ */ (0,
|
|
9529
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9447
9530
|
"path",
|
|
9448
9531
|
{
|
|
9449
9532
|
fill: "#1565c0",
|
|
9450
9533
|
d: "M7.5,23h10c1.933,0,3.5,1.567,3.5,3.5v10c0,1.933-1.567,3.5-3.5,3.5h-10C5.567,40,4,38.433,4,36.5 v-10C4,24.567,5.567,23,7.5,23z"
|
|
9451
9534
|
}
|
|
9452
9535
|
),
|
|
9453
|
-
/* @__PURE__ */ (0,
|
|
9536
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9454
9537
|
"path",
|
|
9455
9538
|
{
|
|
9456
9539
|
fill: "#fff",
|
|
@@ -9460,42 +9543,42 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9460
9543
|
]
|
|
9461
9544
|
}
|
|
9462
9545
|
);
|
|
9463
|
-
var StandardIcon2 = () => /* @__PURE__ */ (0,
|
|
9546
|
+
var StandardIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9464
9547
|
"svg",
|
|
9465
9548
|
{
|
|
9466
9549
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9467
9550
|
viewBox: "0 0 48 48",
|
|
9468
9551
|
className: "w-10 h-10",
|
|
9469
9552
|
children: [
|
|
9470
|
-
/* @__PURE__ */ (0,
|
|
9471
|
-
/* @__PURE__ */ (0,
|
|
9553
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
9554
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
9472
9555
|
]
|
|
9473
9556
|
}
|
|
9474
9557
|
);
|
|
9475
|
-
var PowerPointIcon2 = () => /* @__PURE__ */ (0,
|
|
9558
|
+
var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9476
9559
|
"svg",
|
|
9477
9560
|
{
|
|
9478
9561
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9479
9562
|
viewBox: "0 0 48 48",
|
|
9480
9563
|
className: "w-10 h-10",
|
|
9481
9564
|
children: [
|
|
9482
|
-
/* @__PURE__ */ (0,
|
|
9565
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9483
9566
|
"path",
|
|
9484
9567
|
{
|
|
9485
9568
|
fill: "#dc4c2c",
|
|
9486
9569
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
9487
9570
|
}
|
|
9488
9571
|
),
|
|
9489
|
-
/* @__PURE__ */ (0,
|
|
9490
|
-
/* @__PURE__ */ (0,
|
|
9491
|
-
/* @__PURE__ */ (0,
|
|
9572
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
9573
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
9574
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9492
9575
|
"path",
|
|
9493
9576
|
{
|
|
9494
9577
|
fill: "#9b341f",
|
|
9495
9578
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
9496
9579
|
}
|
|
9497
9580
|
),
|
|
9498
|
-
/* @__PURE__ */ (0,
|
|
9581
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9499
9582
|
"path",
|
|
9500
9583
|
{
|
|
9501
9584
|
fill: "#fff",
|
|
@@ -9505,16 +9588,16 @@ var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9505
9588
|
]
|
|
9506
9589
|
}
|
|
9507
9590
|
);
|
|
9508
|
-
var TextIcon2 = () => /* @__PURE__ */ (0,
|
|
9591
|
+
var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9509
9592
|
"svg",
|
|
9510
9593
|
{
|
|
9511
9594
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9512
9595
|
viewBox: "0 0 48 48",
|
|
9513
9596
|
className: "w-10 h-10",
|
|
9514
9597
|
children: [
|
|
9515
|
-
/* @__PURE__ */ (0,
|
|
9516
|
-
/* @__PURE__ */ (0,
|
|
9517
|
-
/* @__PURE__ */ (0,
|
|
9598
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
9599
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
9600
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9518
9601
|
"path",
|
|
9519
9602
|
{
|
|
9520
9603
|
fill: "#1976D2",
|
|
@@ -9524,7 +9607,7 @@ var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9524
9607
|
]
|
|
9525
9608
|
}
|
|
9526
9609
|
);
|
|
9527
|
-
var ArchiveIcon2 = () => /* @__PURE__ */ (0,
|
|
9610
|
+
var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9528
9611
|
"svg",
|
|
9529
9612
|
{
|
|
9530
9613
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9534,14 +9617,14 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9534
9617
|
version: "1.0",
|
|
9535
9618
|
className: "w-10 h-10",
|
|
9536
9619
|
children: [
|
|
9537
|
-
/* @__PURE__ */ (0,
|
|
9620
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9538
9621
|
"path",
|
|
9539
9622
|
{
|
|
9540
9623
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
9541
9624
|
"clip-rule": "nonzero"
|
|
9542
9625
|
}
|
|
9543
9626
|
) }) }),
|
|
9544
|
-
/* @__PURE__ */ (0,
|
|
9627
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9545
9628
|
"path",
|
|
9546
9629
|
{
|
|
9547
9630
|
fill: "#ff9100",
|
|
@@ -9550,7 +9633,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9550
9633
|
"fill-rule": "nonzero"
|
|
9551
9634
|
}
|
|
9552
9635
|
) }),
|
|
9553
|
-
/* @__PURE__ */ (0,
|
|
9636
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9554
9637
|
"path",
|
|
9555
9638
|
{
|
|
9556
9639
|
fill: "#fbe9e7",
|
|
@@ -9559,7 +9642,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9559
9642
|
"fill-rule": "nonzero"
|
|
9560
9643
|
}
|
|
9561
9644
|
),
|
|
9562
|
-
/* @__PURE__ */ (0,
|
|
9645
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9563
9646
|
"path",
|
|
9564
9647
|
{
|
|
9565
9648
|
fill: "#ffe0b2",
|
|
@@ -9568,7 +9651,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9568
9651
|
"fill-rule": "nonzero"
|
|
9569
9652
|
}
|
|
9570
9653
|
),
|
|
9571
|
-
/* @__PURE__ */ (0,
|
|
9654
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9572
9655
|
"path",
|
|
9573
9656
|
{
|
|
9574
9657
|
fill: "#ffe0b2",
|
|
@@ -9577,7 +9660,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
|
9577
9660
|
"fill-rule": "nonzero"
|
|
9578
9661
|
}
|
|
9579
9662
|
),
|
|
9580
|
-
/* @__PURE__ */ (0,
|
|
9663
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9581
9664
|
"path",
|
|
9582
9665
|
{
|
|
9583
9666
|
fill: "#ffe0b2",
|
|
@@ -9627,8 +9710,8 @@ var DocumentNode = (props) => {
|
|
|
9627
9710
|
documents = parseDocuments(props.node.documentAsset);
|
|
9628
9711
|
}
|
|
9629
9712
|
if (documents.length === 0) {
|
|
9630
|
-
return /* @__PURE__ */ (0,
|
|
9631
|
-
/* @__PURE__ */ (0,
|
|
9713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_jsx_runtime84.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
9714
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9632
9715
|
"svg",
|
|
9633
9716
|
{
|
|
9634
9717
|
className: "w-5 h-5",
|
|
@@ -9636,7 +9719,7 @@ var DocumentNode = (props) => {
|
|
|
9636
9719
|
stroke: "currentColor",
|
|
9637
9720
|
viewBox: "0 0 24 24",
|
|
9638
9721
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9639
|
-
children: /* @__PURE__ */ (0,
|
|
9722
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9640
9723
|
"path",
|
|
9641
9724
|
{
|
|
9642
9725
|
strokeLinecap: "round",
|
|
@@ -9647,11 +9730,11 @@ var DocumentNode = (props) => {
|
|
|
9647
9730
|
)
|
|
9648
9731
|
}
|
|
9649
9732
|
) }),
|
|
9650
|
-
/* @__PURE__ */ (0,
|
|
9651
|
-
/* @__PURE__ */ (0,
|
|
9733
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
9734
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
9652
9735
|
] }) });
|
|
9653
9736
|
}
|
|
9654
|
-
return /* @__PURE__ */ (0,
|
|
9737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
9655
9738
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
9656
9739
|
props.assetBaseUrl,
|
|
9657
9740
|
doc.assetUrl
|
|
@@ -9669,16 +9752,16 @@ var DocumentNode = (props) => {
|
|
|
9669
9752
|
}
|
|
9670
9753
|
}
|
|
9671
9754
|
const { Icon: Icon2, extLabel } = getFileDetails2(documentUrl);
|
|
9672
|
-
return /* @__PURE__ */ (0,
|
|
9755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9673
9756
|
"div",
|
|
9674
9757
|
{
|
|
9675
9758
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
9676
9759
|
children: [
|
|
9677
|
-
/* @__PURE__ */ (0,
|
|
9678
|
-
/* @__PURE__ */ (0,
|
|
9679
|
-
/* @__PURE__ */ (0,
|
|
9760
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center space-x-4 min-w-0", children: [
|
|
9761
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon2, {}) }),
|
|
9762
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex items-baseline space-x-2 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h4", { className: "text-base font-semibold truncate", title: documentTitle, children: documentTitle }) })
|
|
9680
9763
|
] }),
|
|
9681
|
-
/* @__PURE__ */ (0,
|
|
9764
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9682
9765
|
"a",
|
|
9683
9766
|
{
|
|
9684
9767
|
href: documentUrl,
|
|
@@ -9686,7 +9769,7 @@ var DocumentNode = (props) => {
|
|
|
9686
9769
|
rel: "noopener noreferrer",
|
|
9687
9770
|
className: "inline-flex items-center px-4 py-2 text-sm font-medium bg-default border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors shrink-0",
|
|
9688
9771
|
children: [
|
|
9689
|
-
/* @__PURE__ */ (0,
|
|
9772
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9690
9773
|
"svg",
|
|
9691
9774
|
{
|
|
9692
9775
|
className: "w-4 h-4 mr-2",
|
|
@@ -9694,7 +9777,7 @@ var DocumentNode = (props) => {
|
|
|
9694
9777
|
stroke: "currentColor",
|
|
9695
9778
|
viewBox: "0 0 24 24",
|
|
9696
9779
|
children: [
|
|
9697
|
-
/* @__PURE__ */ (0,
|
|
9780
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9698
9781
|
"path",
|
|
9699
9782
|
{
|
|
9700
9783
|
strokeLinecap: "round",
|
|
@@ -9703,7 +9786,7 @@ var DocumentNode = (props) => {
|
|
|
9703
9786
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
9704
9787
|
}
|
|
9705
9788
|
),
|
|
9706
|
-
/* @__PURE__ */ (0,
|
|
9789
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9707
9790
|
"path",
|
|
9708
9791
|
{
|
|
9709
9792
|
strokeLinecap: "round",
|
|
@@ -9729,13 +9812,13 @@ var DocumentNode_default = DocumentNode;
|
|
|
9729
9812
|
|
|
9730
9813
|
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
9731
9814
|
var import_dynamic13 = __toESM(require("next/dynamic"));
|
|
9732
|
-
var
|
|
9815
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9733
9816
|
var IframeClient3 = (0, import_dynamic13.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
9734
9817
|
ssr: false
|
|
9735
9818
|
});
|
|
9736
9819
|
var GoogleMapNode = (props) => {
|
|
9737
9820
|
let src = props.node.embedUrl;
|
|
9738
|
-
return /* @__PURE__ */ (0,
|
|
9821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "google-map-container", children: src && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9739
9822
|
IframeClient3,
|
|
9740
9823
|
{
|
|
9741
9824
|
src,
|
|
@@ -9747,7 +9830,7 @@ var GoogleMapNode = (props) => {
|
|
|
9747
9830
|
var GoogleMapNode_default = GoogleMapNode;
|
|
9748
9831
|
|
|
9749
9832
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
9750
|
-
var
|
|
9833
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9751
9834
|
var Pagination2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
9752
9835
|
var DataBindingControls2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_DataBindingControls(), DataBindingControls_exports)), {
|
|
9753
9836
|
ssr: true
|
|
@@ -9934,7 +10017,8 @@ var DivContainer = async (props) => {
|
|
|
9934
10017
|
datafield: DatafieldNode_default,
|
|
9935
10018
|
"svg-icon": SVGIconNode_default,
|
|
9936
10019
|
document: DocumentNode_default,
|
|
9937
|
-
"google-map": GoogleMapNode_default
|
|
10020
|
+
"google-map": GoogleMapNode_default,
|
|
10021
|
+
counter: CounterNode_default
|
|
9938
10022
|
};
|
|
9939
10023
|
const styles = props.node.cssProperties;
|
|
9940
10024
|
const mobileStyles = props.node.mobileCssProperties;
|
|
@@ -10032,7 +10116,7 @@ var DivContainer = async (props) => {
|
|
|
10032
10116
|
}
|
|
10033
10117
|
const SelectedNode = NodeTypes2[node.type];
|
|
10034
10118
|
if (!SelectedNode) return null;
|
|
10035
|
-
return /* @__PURE__ */ (0,
|
|
10119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react62.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10036
10120
|
SelectedNode,
|
|
10037
10121
|
{
|
|
10038
10122
|
node,
|
|
@@ -10124,7 +10208,7 @@ var DivContainer = async (props) => {
|
|
|
10124
10208
|
item,
|
|
10125
10209
|
idx,
|
|
10126
10210
|
props.href ? void 0 : item?.links?.view
|
|
10127
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
10211
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react62.default.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
10128
10212
|
);
|
|
10129
10213
|
}
|
|
10130
10214
|
return props.node.children.flatMap((node, childIndex) => {
|
|
@@ -10242,17 +10326,17 @@ var DivContainer = async (props) => {
|
|
|
10242
10326
|
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
10243
10327
|
);
|
|
10244
10328
|
const WrapperComponent = Wrapper;
|
|
10245
|
-
const renderedContainer = /* @__PURE__ */ (0,
|
|
10329
|
+
const renderedContainer = /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10246
10330
|
WrapperComponent,
|
|
10247
10331
|
{
|
|
10248
10332
|
id: guid,
|
|
10249
10333
|
style: combinedStyles,
|
|
10250
10334
|
className: classNames || void 0,
|
|
10251
10335
|
...wrapperProps,
|
|
10252
|
-
children: shouldShowNoDataMessage ? hasActiveFilter ? /* @__PURE__ */ (0,
|
|
10336
|
+
children: shouldShowNoDataMessage ? hasActiveFilter ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(NoFilterResultsFound_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(NoDataFound_default, {}) : renderContainerChildren()
|
|
10253
10337
|
}
|
|
10254
10338
|
);
|
|
10255
|
-
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0,
|
|
10339
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10256
10340
|
Pagination2,
|
|
10257
10341
|
{
|
|
10258
10342
|
path: props.path,
|
|
@@ -10260,15 +10344,15 @@ var DivContainer = async (props) => {
|
|
|
10260
10344
|
dataset: response
|
|
10261
10345
|
}
|
|
10262
10346
|
) : null;
|
|
10263
|
-
return /* @__PURE__ */ (0,
|
|
10264
|
-
/* @__PURE__ */ (0,
|
|
10347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_react62.default.Fragment, { children: [
|
|
10348
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10265
10349
|
"style",
|
|
10266
10350
|
{
|
|
10267
10351
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
10268
10352
|
}
|
|
10269
10353
|
),
|
|
10270
|
-
showDataBindingControls ? /* @__PURE__ */ (0,
|
|
10271
|
-
/* @__PURE__ */ (0,
|
|
10354
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_react62.default.Fragment, { children: [
|
|
10355
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10272
10356
|
DataBindingControls2,
|
|
10273
10357
|
{
|
|
10274
10358
|
mode: "toolbar",
|
|
@@ -10281,16 +10365,16 @@ var DivContainer = async (props) => {
|
|
|
10281
10365
|
showSearchBar: dataBindingProperties?.showSearchBar
|
|
10282
10366
|
}
|
|
10283
10367
|
),
|
|
10284
|
-
/* @__PURE__ */ (0,
|
|
10368
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
10285
10369
|
"div",
|
|
10286
10370
|
{
|
|
10287
10371
|
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
10288
10372
|
children: [
|
|
10289
|
-
/* @__PURE__ */ (0,
|
|
10373
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "min-w-0", children: [
|
|
10290
10374
|
renderedContainer,
|
|
10291
10375
|
paginationControl
|
|
10292
10376
|
] }),
|
|
10293
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ (0,
|
|
10377
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("aside", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10294
10378
|
DataBindingControls2,
|
|
10295
10379
|
{
|
|
10296
10380
|
mode: "facets",
|
|
@@ -10303,16 +10387,16 @@ var DivContainer = async (props) => {
|
|
|
10303
10387
|
]
|
|
10304
10388
|
}
|
|
10305
10389
|
)
|
|
10306
|
-
] }) : /* @__PURE__ */ (0,
|
|
10390
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_react62.default.Fragment, { children: [
|
|
10307
10391
|
renderedContainer,
|
|
10308
|
-
paginationControl && /* @__PURE__ */ (0,
|
|
10392
|
+
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { children: paginationControl })
|
|
10309
10393
|
] })
|
|
10310
10394
|
] });
|
|
10311
10395
|
};
|
|
10312
10396
|
var DivContainer_default = DivContainer;
|
|
10313
10397
|
|
|
10314
10398
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
10315
|
-
var
|
|
10399
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
10316
10400
|
var NodeTypes = {
|
|
10317
10401
|
["paragraph"]: ParagraphNode_default,
|
|
10318
10402
|
["heading"]: HeadingNode_default,
|
|
@@ -10328,7 +10412,8 @@ var NodeTypes = {
|
|
|
10328
10412
|
["svg-icon"]: SVGIconNode_default,
|
|
10329
10413
|
["embed"]: EmbedNode_default,
|
|
10330
10414
|
["document"]: DocumentNode_default,
|
|
10331
|
-
["google-map"]: GoogleMapNode_default
|
|
10415
|
+
["google-map"]: GoogleMapNode_default,
|
|
10416
|
+
["counter"]: CounterNode_default
|
|
10332
10417
|
};
|
|
10333
10418
|
var PageBodyRenderer = (props) => {
|
|
10334
10419
|
let pageBodyTree;
|
|
@@ -10350,14 +10435,14 @@ var PageBodyRenderer = (props) => {
|
|
|
10350
10435
|
}
|
|
10351
10436
|
return true;
|
|
10352
10437
|
};
|
|
10353
|
-
return /* @__PURE__ */ (0,
|
|
10438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react63.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
10354
10439
|
{
|
|
10355
10440
|
}
|
|
10356
10441
|
const SelectedNode = NodeTypes[node.type];
|
|
10357
10442
|
if (!shouldRenderNode(node)) {
|
|
10358
10443
|
return null;
|
|
10359
10444
|
}
|
|
10360
|
-
return /* @__PURE__ */ (0,
|
|
10445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react63.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react63.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react63.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10361
10446
|
SelectedNode,
|
|
10362
10447
|
{
|
|
10363
10448
|
node,
|
|
@@ -10373,7 +10458,7 @@ var PageBodyRenderer = (props) => {
|
|
|
10373
10458
|
device: props.device,
|
|
10374
10459
|
widgetRenderer: props.widgetRenderer
|
|
10375
10460
|
}
|
|
10376
|
-
) }) : /* @__PURE__ */ (0,
|
|
10461
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_react63.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10377
10462
|
SelectedNode,
|
|
10378
10463
|
{
|
|
10379
10464
|
node,
|
|
@@ -10394,10 +10479,10 @@ var PageBodyRenderer = (props) => {
|
|
|
10394
10479
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
10395
10480
|
|
|
10396
10481
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
10397
|
-
var
|
|
10482
|
+
var import_react64 = require("react");
|
|
10398
10483
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
10399
10484
|
function EnterAnimationHydrator() {
|
|
10400
|
-
(0,
|
|
10485
|
+
(0, import_react64.useEffect)(() => {
|
|
10401
10486
|
let observer;
|
|
10402
10487
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
10403
10488
|
const revealAnimatedElements = () => {
|
|
@@ -10442,22 +10527,22 @@ function EnterAnimationHydrator() {
|
|
|
10442
10527
|
}
|
|
10443
10528
|
|
|
10444
10529
|
// src/components/Toast.tsx
|
|
10445
|
-
var
|
|
10530
|
+
var import_react65 = require("react");
|
|
10446
10531
|
init_ToastService();
|
|
10447
|
-
var
|
|
10532
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
10448
10533
|
var Toast = () => {
|
|
10449
|
-
const [showToast, setShowToast] = (0,
|
|
10450
|
-
const [message, setMessage] = (0,
|
|
10451
|
-
const [messageType, setMessageType] = (0,
|
|
10452
|
-
const timeoutRef = (0,
|
|
10453
|
-
const closeToast = (0,
|
|
10534
|
+
const [showToast, setShowToast] = (0, import_react65.useState)(false);
|
|
10535
|
+
const [message, setMessage] = (0, import_react65.useState)("");
|
|
10536
|
+
const [messageType, setMessageType] = (0, import_react65.useState)("error");
|
|
10537
|
+
const timeoutRef = (0, import_react65.useRef)(null);
|
|
10538
|
+
const closeToast = (0, import_react65.useCallback)(() => {
|
|
10454
10539
|
if (timeoutRef.current) {
|
|
10455
10540
|
clearTimeout(timeoutRef.current);
|
|
10456
10541
|
timeoutRef.current = null;
|
|
10457
10542
|
}
|
|
10458
10543
|
setShowToast(false);
|
|
10459
10544
|
}, []);
|
|
10460
|
-
const showMessage = (0,
|
|
10545
|
+
const showMessage = (0, import_react65.useCallback)((message2, messageType2) => {
|
|
10461
10546
|
if (timeoutRef.current) {
|
|
10462
10547
|
clearTimeout(timeoutRef.current);
|
|
10463
10548
|
}
|
|
@@ -10469,7 +10554,7 @@ var Toast = () => {
|
|
|
10469
10554
|
timeoutRef.current = null;
|
|
10470
10555
|
}, 4e3);
|
|
10471
10556
|
}, []);
|
|
10472
|
-
(0,
|
|
10557
|
+
(0, import_react65.useEffect)(() => {
|
|
10473
10558
|
ToastService_default.initialize(showMessage, closeToast);
|
|
10474
10559
|
return () => {
|
|
10475
10560
|
closeToast();
|
|
@@ -10478,8 +10563,8 @@ var Toast = () => {
|
|
|
10478
10563
|
});
|
|
10479
10564
|
};
|
|
10480
10565
|
}, [closeToast, showMessage]);
|
|
10481
|
-
return /* @__PURE__ */ (0,
|
|
10482
|
-
/* @__PURE__ */ (0,
|
|
10566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime91.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_runtime91.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
10567
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10483
10568
|
"span",
|
|
10484
10569
|
{
|
|
10485
10570
|
className: "font-medium text-inherit text-sm",
|
|
@@ -10487,7 +10572,7 @@ var Toast = () => {
|
|
|
10487
10572
|
children: message
|
|
10488
10573
|
}
|
|
10489
10574
|
),
|
|
10490
|
-
/* @__PURE__ */ (0,
|
|
10575
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10491
10576
|
"svg",
|
|
10492
10577
|
{
|
|
10493
10578
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10495,7 +10580,7 @@ var Toast = () => {
|
|
|
10495
10580
|
fill: "none",
|
|
10496
10581
|
viewBox: "0 0 24 24",
|
|
10497
10582
|
stroke: "currentColor",
|
|
10498
|
-
children: /* @__PURE__ */ (0,
|
|
10583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
10499
10584
|
}
|
|
10500
10585
|
) })
|
|
10501
10586
|
] }) }) });
|
|
@@ -10525,7 +10610,7 @@ init_RadioInput();
|
|
|
10525
10610
|
// src/components/NavigationTabsV2.tsx
|
|
10526
10611
|
var import_link3 = __toESM(require("next/link"));
|
|
10527
10612
|
var import_navigation2 = require("next/navigation");
|
|
10528
|
-
var
|
|
10613
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
10529
10614
|
function resolveRoutePlaceholders(route, params) {
|
|
10530
10615
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
10531
10616
|
const value = params[key];
|
|
@@ -10550,8 +10635,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
10550
10635
|
isActive: tab.isActive
|
|
10551
10636
|
})) || [];
|
|
10552
10637
|
if (mappedTabs.length === 0) return null;
|
|
10553
|
-
return /* @__PURE__ */ (0,
|
|
10554
|
-
return /* @__PURE__ */ (0,
|
|
10638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
10639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10555
10640
|
"div",
|
|
10556
10641
|
{
|
|
10557
10642
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -10564,14 +10649,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
10564
10649
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
10565
10650
|
|
|
10566
10651
|
// src/components/dataForm/DataList.tsx
|
|
10567
|
-
var
|
|
10652
|
+
var import_react68 = __toESM(require("react"));
|
|
10568
10653
|
var import_navigation3 = require("next/navigation");
|
|
10569
10654
|
|
|
10570
10655
|
// src/components/dataForm/NoContentView.tsx
|
|
10571
|
-
var
|
|
10572
|
-
var
|
|
10656
|
+
var import_react66 = __toESM(require("react"));
|
|
10657
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
10573
10658
|
var NoContentView = (props) => {
|
|
10574
|
-
return /* @__PURE__ */ (0,
|
|
10659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
10575
10660
|
};
|
|
10576
10661
|
var NoContentView_default = NoContentView;
|
|
10577
10662
|
|
|
@@ -10579,39 +10664,39 @@ var NoContentView_default = NoContentView;
|
|
|
10579
10664
|
init_InputControlType();
|
|
10580
10665
|
|
|
10581
10666
|
// src/components/dataForm/ContentView.tsx
|
|
10582
|
-
var
|
|
10583
|
-
var
|
|
10667
|
+
var import_react67 = __toESM(require("react"));
|
|
10668
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
10584
10669
|
var ContentView = (props) => {
|
|
10585
|
-
return /* @__PURE__ */ (0,
|
|
10586
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
10587
|
-
/* @__PURE__ */ (0,
|
|
10588
|
-
/* @__PURE__ */ (0,
|
|
10589
|
-
/* @__PURE__ */ (0,
|
|
10590
|
-
/* @__PURE__ */ (0,
|
|
10591
|
-
/* @__PURE__ */ (0,
|
|
10670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_react67.default.Fragment, { children: [
|
|
10671
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
10672
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
10673
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
10674
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "ml-2", children: [
|
|
10675
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
10676
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
10592
10677
|
] })
|
|
10593
10678
|
] }),
|
|
10594
|
-
/* @__PURE__ */ (0,
|
|
10595
|
-
/* @__PURE__ */ (0,
|
|
10596
|
-
/* @__PURE__ */ (0,
|
|
10597
|
-
/* @__PURE__ */ (0,
|
|
10598
|
-
/* @__PURE__ */ (0,
|
|
10599
|
-
/* @__PURE__ */ (0,
|
|
10600
|
-
/* @__PURE__ */ (0,
|
|
10679
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
10680
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "animate-pulse", children: [
|
|
10681
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
10682
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
10683
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
10684
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
10685
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
10601
10686
|
] }),
|
|
10602
|
-
/* @__PURE__ */ (0,
|
|
10603
|
-
/* @__PURE__ */ (0,
|
|
10604
|
-
/* @__PURE__ */ (0,
|
|
10605
|
-
/* @__PURE__ */ (0,
|
|
10606
|
-
/* @__PURE__ */ (0,
|
|
10607
|
-
/* @__PURE__ */ (0,
|
|
10687
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "animate-pulse", children: [
|
|
10688
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
10689
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
10690
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
10691
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
10692
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
10608
10693
|
] }),
|
|
10609
|
-
/* @__PURE__ */ (0,
|
|
10610
|
-
/* @__PURE__ */ (0,
|
|
10611
|
-
/* @__PURE__ */ (0,
|
|
10612
|
-
/* @__PURE__ */ (0,
|
|
10613
|
-
/* @__PURE__ */ (0,
|
|
10614
|
-
/* @__PURE__ */ (0,
|
|
10694
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "animate-pulse", children: [
|
|
10695
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
10696
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
10697
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
10698
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
10699
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
10615
10700
|
] })
|
|
10616
10701
|
] })
|
|
10617
10702
|
] }) }),
|
|
@@ -10671,7 +10756,7 @@ function FormReducer(state, action) {
|
|
|
10671
10756
|
var FormReducer_default = FormReducer;
|
|
10672
10757
|
|
|
10673
10758
|
// src/components/dataForm/DataList.tsx
|
|
10674
|
-
var
|
|
10759
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
10675
10760
|
var DataList = (props) => {
|
|
10676
10761
|
const router = (0, import_navigation3.useRouter)();
|
|
10677
10762
|
let builder = new OdataBuilder(props.path);
|
|
@@ -10679,12 +10764,12 @@ var DataList = (props) => {
|
|
|
10679
10764
|
let activePageNumber = 0;
|
|
10680
10765
|
let pages = 0;
|
|
10681
10766
|
console.log(props.addLinkText);
|
|
10682
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
10683
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
10684
|
-
(0,
|
|
10767
|
+
const [isDataFound, setIsDataFound] = (0, import_react68.useState)(null);
|
|
10768
|
+
const [searchTerm, setSearchTerm] = (0, import_react68.useState)(props.query?.searchTerm ?? "");
|
|
10769
|
+
(0, import_react68.useEffect)(() => {
|
|
10685
10770
|
setSearchTerm(props.query?.searchTerm ?? "");
|
|
10686
10771
|
}, [props.query?.searchTerm]);
|
|
10687
|
-
(0,
|
|
10772
|
+
(0, import_react68.useEffect)(() => {
|
|
10688
10773
|
if (props?.dataset) {
|
|
10689
10774
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
10690
10775
|
setIsDataFound(true);
|
|
@@ -10693,7 +10778,7 @@ var DataList = (props) => {
|
|
|
10693
10778
|
}
|
|
10694
10779
|
}
|
|
10695
10780
|
}, [props.dataset]);
|
|
10696
|
-
(0,
|
|
10781
|
+
(0, import_react68.useEffect)(() => {
|
|
10697
10782
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
10698
10783
|
const filterQuery = props.query["$filter"];
|
|
10699
10784
|
props.filters.forEach((filter) => {
|
|
@@ -10712,7 +10797,7 @@ var DataList = (props) => {
|
|
|
10712
10797
|
if (path.includes(".")) {
|
|
10713
10798
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
10714
10799
|
} else if (Array.isArray(obj[path])) {
|
|
10715
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
10800
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: item }, index));
|
|
10716
10801
|
} else {
|
|
10717
10802
|
return obj[path];
|
|
10718
10803
|
}
|
|
@@ -10721,11 +10806,11 @@ var DataList = (props) => {
|
|
|
10721
10806
|
inputValues: {},
|
|
10722
10807
|
lastPropertyChanged: ""
|
|
10723
10808
|
};
|
|
10724
|
-
const [formState, dispatch] = (0,
|
|
10809
|
+
const [formState, dispatch] = (0, import_react68.useReducer)(FormReducer_default, initialState);
|
|
10725
10810
|
const getSearchableColumns = () => {
|
|
10726
10811
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
10727
10812
|
};
|
|
10728
|
-
const handleFilterChange = (0,
|
|
10813
|
+
const handleFilterChange = (0, import_react68.useCallback)(
|
|
10729
10814
|
(updatedValues) => {
|
|
10730
10815
|
dispatch({
|
|
10731
10816
|
type: FORM_INPUT_UPDATE,
|
|
@@ -10756,7 +10841,7 @@ var DataList = (props) => {
|
|
|
10756
10841
|
},
|
|
10757
10842
|
[dispatch, props, router]
|
|
10758
10843
|
);
|
|
10759
|
-
(0,
|
|
10844
|
+
(0, import_react68.useEffect)(() => {
|
|
10760
10845
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
10761
10846
|
return;
|
|
10762
10847
|
}
|
|
@@ -10794,30 +10879,30 @@ var DataList = (props) => {
|
|
|
10794
10879
|
const renderPageNumbers = () => {
|
|
10795
10880
|
if (pages <= 10) {
|
|
10796
10881
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
10797
|
-
(page) => /* @__PURE__ */ (0,
|
|
10882
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10798
10883
|
Hyperlink,
|
|
10799
10884
|
{
|
|
10800
10885
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
10801
10886
|
href: builder.getNewPageUrl(page),
|
|
10802
10887
|
children: page
|
|
10803
10888
|
}
|
|
10804
|
-
) : /* @__PURE__ */ (0,
|
|
10889
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
10805
10890
|
);
|
|
10806
10891
|
} else {
|
|
10807
10892
|
const showFirstPages = activePageNumber <= 5;
|
|
10808
10893
|
const showLastPages = activePageNumber > pages - 5;
|
|
10809
10894
|
if (showFirstPages) {
|
|
10810
|
-
return /* @__PURE__ */ (0,
|
|
10811
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
10895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
|
|
10896
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10812
10897
|
Hyperlink,
|
|
10813
10898
|
{
|
|
10814
10899
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
10815
10900
|
href: builder.getNewPageUrl(page),
|
|
10816
10901
|
children: page
|
|
10817
10902
|
}
|
|
10818
|
-
) : /* @__PURE__ */ (0,
|
|
10819
|
-
/* @__PURE__ */ (0,
|
|
10820
|
-
/* @__PURE__ */ (0,
|
|
10903
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
10904
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
10905
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10821
10906
|
Hyperlink,
|
|
10822
10907
|
{
|
|
10823
10908
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10825,7 +10910,7 @@ var DataList = (props) => {
|
|
|
10825
10910
|
children: pages - 1
|
|
10826
10911
|
}
|
|
10827
10912
|
),
|
|
10828
|
-
/* @__PURE__ */ (0,
|
|
10913
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10829
10914
|
Hyperlink,
|
|
10830
10915
|
{
|
|
10831
10916
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10833,7 +10918,7 @@ var DataList = (props) => {
|
|
|
10833
10918
|
children: pages
|
|
10834
10919
|
}
|
|
10835
10920
|
),
|
|
10836
|
-
/* @__PURE__ */ (0,
|
|
10921
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10837
10922
|
"select",
|
|
10838
10923
|
{
|
|
10839
10924
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -10845,18 +10930,18 @@ var DataList = (props) => {
|
|
|
10845
10930
|
}
|
|
10846
10931
|
},
|
|
10847
10932
|
children: [
|
|
10848
|
-
/* @__PURE__ */ (0,
|
|
10933
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
10849
10934
|
Array.from(
|
|
10850
10935
|
{ length: Math.max(0, pages - 10) },
|
|
10851
10936
|
(_, index) => index + 9
|
|
10852
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
10937
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: page, children: page }, page))
|
|
10853
10938
|
]
|
|
10854
10939
|
}
|
|
10855
10940
|
) })
|
|
10856
10941
|
] });
|
|
10857
10942
|
} else if (showLastPages) {
|
|
10858
|
-
return /* @__PURE__ */ (0,
|
|
10859
|
-
/* @__PURE__ */ (0,
|
|
10943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
|
|
10944
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10860
10945
|
Hyperlink,
|
|
10861
10946
|
{
|
|
10862
10947
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10864,7 +10949,7 @@ var DataList = (props) => {
|
|
|
10864
10949
|
children: "1"
|
|
10865
10950
|
}
|
|
10866
10951
|
),
|
|
10867
|
-
/* @__PURE__ */ (0,
|
|
10952
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10868
10953
|
Hyperlink,
|
|
10869
10954
|
{
|
|
10870
10955
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10872,21 +10957,21 @@ var DataList = (props) => {
|
|
|
10872
10957
|
children: "2"
|
|
10873
10958
|
}
|
|
10874
10959
|
),
|
|
10875
|
-
/* @__PURE__ */ (0,
|
|
10960
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
10876
10961
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
10877
|
-
(page) => /* @__PURE__ */ (0,
|
|
10962
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10878
10963
|
Hyperlink,
|
|
10879
10964
|
{
|
|
10880
10965
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
10881
10966
|
href: builder.getNewPageUrl(page),
|
|
10882
10967
|
children: page
|
|
10883
10968
|
}
|
|
10884
|
-
) : /* @__PURE__ */ (0,
|
|
10969
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
10885
10970
|
)
|
|
10886
10971
|
] });
|
|
10887
10972
|
} else {
|
|
10888
|
-
return /* @__PURE__ */ (0,
|
|
10889
|
-
/* @__PURE__ */ (0,
|
|
10973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
|
|
10974
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10890
10975
|
Hyperlink,
|
|
10891
10976
|
{
|
|
10892
10977
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10894,7 +10979,7 @@ var DataList = (props) => {
|
|
|
10894
10979
|
children: "1"
|
|
10895
10980
|
}
|
|
10896
10981
|
),
|
|
10897
|
-
/* @__PURE__ */ (0,
|
|
10982
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10898
10983
|
Hyperlink,
|
|
10899
10984
|
{
|
|
10900
10985
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10902,20 +10987,20 @@ var DataList = (props) => {
|
|
|
10902
10987
|
children: "2"
|
|
10903
10988
|
}
|
|
10904
10989
|
),
|
|
10905
|
-
/* @__PURE__ */ (0,
|
|
10990
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
10906
10991
|
Array.from(
|
|
10907
10992
|
{ length: 5 },
|
|
10908
10993
|
(_, index) => activePageNumber - 2 + index
|
|
10909
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
10994
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10910
10995
|
Hyperlink,
|
|
10911
10996
|
{
|
|
10912
10997
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
10913
10998
|
href: builder.getNewPageUrl(page),
|
|
10914
10999
|
children: page
|
|
10915
11000
|
}
|
|
10916
|
-
) : /* @__PURE__ */ (0,
|
|
10917
|
-
/* @__PURE__ */ (0,
|
|
10918
|
-
/* @__PURE__ */ (0,
|
|
11001
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
11002
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
11003
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10919
11004
|
Hyperlink,
|
|
10920
11005
|
{
|
|
10921
11006
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10923,7 +11008,7 @@ var DataList = (props) => {
|
|
|
10923
11008
|
children: pages - 1
|
|
10924
11009
|
}
|
|
10925
11010
|
),
|
|
10926
|
-
/* @__PURE__ */ (0,
|
|
11011
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10927
11012
|
Hyperlink,
|
|
10928
11013
|
{
|
|
10929
11014
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -10931,7 +11016,7 @@ var DataList = (props) => {
|
|
|
10931
11016
|
children: pages
|
|
10932
11017
|
}
|
|
10933
11018
|
),
|
|
10934
|
-
/* @__PURE__ */ (0,
|
|
11019
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10935
11020
|
"select",
|
|
10936
11021
|
{
|
|
10937
11022
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -10943,8 +11028,8 @@ var DataList = (props) => {
|
|
|
10943
11028
|
}
|
|
10944
11029
|
},
|
|
10945
11030
|
children: [
|
|
10946
|
-
/* @__PURE__ */ (0,
|
|
10947
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
11031
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: "", children: "Jump to" }),
|
|
11032
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("option", { value: page, children: page }, page))
|
|
10948
11033
|
]
|
|
10949
11034
|
}
|
|
10950
11035
|
) })
|
|
@@ -10952,16 +11037,16 @@ var DataList = (props) => {
|
|
|
10952
11037
|
}
|
|
10953
11038
|
}
|
|
10954
11039
|
};
|
|
10955
|
-
return /* @__PURE__ */ (0,
|
|
10956
|
-
/* @__PURE__ */ (0,
|
|
10957
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
11040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_react68.default.Fragment, { children: [
|
|
11041
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(ContentView_default, { isDataFound, children: [
|
|
11042
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10958
11043
|
"div",
|
|
10959
11044
|
{
|
|
10960
11045
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
10961
11046
|
children: [
|
|
10962
|
-
props.title ? /* @__PURE__ */ (0,
|
|
10963
|
-
/* @__PURE__ */ (0,
|
|
10964
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
11047
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", {}),
|
|
11048
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
11049
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10965
11050
|
InputControl_default,
|
|
10966
11051
|
{
|
|
10967
11052
|
name: "Search_input",
|
|
@@ -10974,7 +11059,7 @@ var DataList = (props) => {
|
|
|
10974
11059
|
}
|
|
10975
11060
|
}
|
|
10976
11061
|
),
|
|
10977
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
11062
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10978
11063
|
InputControl_default,
|
|
10979
11064
|
{
|
|
10980
11065
|
name: filter.name,
|
|
@@ -10989,15 +11074,15 @@ var DataList = (props) => {
|
|
|
10989
11074
|
},
|
|
10990
11075
|
filter.name
|
|
10991
11076
|
)),
|
|
10992
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
11077
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10993
11078
|
Hyperlink,
|
|
10994
11079
|
{
|
|
10995
11080
|
className: "gap-1",
|
|
10996
11081
|
linkType: "Primary" /* Solid */,
|
|
10997
11082
|
href: props.addLinkHref,
|
|
10998
11083
|
children: [
|
|
10999
|
-
/* @__PURE__ */ (0,
|
|
11000
|
-
/* @__PURE__ */ (0,
|
|
11084
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
11085
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
11001
11086
|
]
|
|
11002
11087
|
}
|
|
11003
11088
|
)
|
|
@@ -11005,8 +11090,8 @@ var DataList = (props) => {
|
|
|
11005
11090
|
]
|
|
11006
11091
|
}
|
|
11007
11092
|
),
|
|
11008
|
-
/* @__PURE__ */ (0,
|
|
11009
|
-
/* @__PURE__ */ (0,
|
|
11093
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
11094
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("tr", { children: [
|
|
11010
11095
|
props?.columns?.map((column) => {
|
|
11011
11096
|
let url = builder.getNewOrderByUrl(column.name);
|
|
11012
11097
|
let icon = "chevronUpDown";
|
|
@@ -11017,18 +11102,18 @@ var DataList = (props) => {
|
|
|
11017
11102
|
icon = "chevronUp";
|
|
11018
11103
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
11019
11104
|
}
|
|
11020
|
-
return /* @__PURE__ */ (0,
|
|
11105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11021
11106
|
"th",
|
|
11022
11107
|
{
|
|
11023
11108
|
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" : ""),
|
|
11024
|
-
children: /* @__PURE__ */ (0,
|
|
11109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11025
11110
|
Hyperlink,
|
|
11026
11111
|
{
|
|
11027
11112
|
href: column.enableSorting ? url : void 0,
|
|
11028
11113
|
className: "!text-neutral-contrast ",
|
|
11029
|
-
children: /* @__PURE__ */ (0,
|
|
11030
|
-
/* @__PURE__ */ (0,
|
|
11031
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
11114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
11115
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "text-black", children: column.label }),
|
|
11116
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
11032
11117
|
] })
|
|
11033
11118
|
}
|
|
11034
11119
|
)
|
|
@@ -11036,25 +11121,25 @@ var DataList = (props) => {
|
|
|
11036
11121
|
column.name
|
|
11037
11122
|
);
|
|
11038
11123
|
}),
|
|
11039
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
11124
|
+
props.onQuickView && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("th", { className: "px-6 py-3 text-right font-medium bg-neutral-soft w-32 text-black", children: "Action" })
|
|
11040
11125
|
] }) }),
|
|
11041
|
-
/* @__PURE__ */ (0,
|
|
11126
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
11042
11127
|
let validityClass = "";
|
|
11043
11128
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
11044
11129
|
validityClass = "bg-alert-200";
|
|
11045
11130
|
}
|
|
11046
|
-
return /* @__PURE__ */ (0,
|
|
11131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("tr", { className: validityClass, children: [
|
|
11047
11132
|
props?.columns?.map((column, colindex) => {
|
|
11048
|
-
return /* @__PURE__ */ (0,
|
|
11133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11049
11134
|
"td",
|
|
11050
11135
|
{
|
|
11051
11136
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
11052
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
11137
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11053
11138
|
Hyperlink,
|
|
11054
11139
|
{
|
|
11055
11140
|
className: "",
|
|
11056
11141
|
href: `https://${dataitem[column.name]}`,
|
|
11057
|
-
children: /* @__PURE__ */ (0,
|
|
11142
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11058
11143
|
ViewControl_default,
|
|
11059
11144
|
{
|
|
11060
11145
|
controlType: column.controlType,
|
|
@@ -11067,11 +11152,11 @@ var DataList = (props) => {
|
|
|
11067
11152
|
}
|
|
11068
11153
|
)
|
|
11069
11154
|
}
|
|
11070
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
11155
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11071
11156
|
Hyperlink,
|
|
11072
11157
|
{
|
|
11073
11158
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
11074
|
-
children: /* @__PURE__ */ (0,
|
|
11159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11075
11160
|
ViewControl_default,
|
|
11076
11161
|
{
|
|
11077
11162
|
controlType: column.controlType,
|
|
@@ -11081,7 +11166,7 @@ var DataList = (props) => {
|
|
|
11081
11166
|
}
|
|
11082
11167
|
)
|
|
11083
11168
|
}
|
|
11084
|
-
) : /* @__PURE__ */ (0,
|
|
11169
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11085
11170
|
ViewControl_default,
|
|
11086
11171
|
{
|
|
11087
11172
|
controlType: column.controlType,
|
|
@@ -11093,7 +11178,7 @@ var DataList = (props) => {
|
|
|
11093
11178
|
}
|
|
11094
11179
|
) }, colindex);
|
|
11095
11180
|
}),
|
|
11096
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
11181
|
+
props.onQuickView && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("td", { className: "px-6 py-2 text-right whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
11097
11182
|
"button",
|
|
11098
11183
|
{
|
|
11099
11184
|
type: "button",
|
|
@@ -11103,7 +11188,7 @@ var DataList = (props) => {
|
|
|
11103
11188
|
},
|
|
11104
11189
|
className: "inline-flex items-center gap-1.5 px-3 py-1 text-xs font-semibold rounded-md border border-neutral-300 bg-white hover:bg-neutral-100 text-neutral-800 transition-colors shadow-xs",
|
|
11105
11190
|
children: [
|
|
11106
|
-
/* @__PURE__ */ (0,
|
|
11191
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
11107
11192
|
"svg",
|
|
11108
11193
|
{
|
|
11109
11194
|
className: "w-3.5 h-3.5",
|
|
@@ -11114,22 +11199,22 @@ var DataList = (props) => {
|
|
|
11114
11199
|
strokeLinecap: "round",
|
|
11115
11200
|
strokeLinejoin: "round",
|
|
11116
11201
|
children: [
|
|
11117
|
-
/* @__PURE__ */ (0,
|
|
11118
|
-
/* @__PURE__ */ (0,
|
|
11202
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
11203
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
11119
11204
|
]
|
|
11120
11205
|
}
|
|
11121
11206
|
),
|
|
11122
|
-
/* @__PURE__ */ (0,
|
|
11207
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: props.quickViewLabel || "Quick View" })
|
|
11123
11208
|
]
|
|
11124
11209
|
}
|
|
11125
11210
|
) })
|
|
11126
11211
|
] }, index);
|
|
11127
11212
|
}) })
|
|
11128
11213
|
] }) }),
|
|
11129
|
-
/* @__PURE__ */ (0,
|
|
11130
|
-
/* @__PURE__ */ (0,
|
|
11131
|
-
/* @__PURE__ */ (0,
|
|
11132
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
11214
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
11215
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "text-gray-700", children: label }),
|
|
11216
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
11217
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11133
11218
|
Hyperlink,
|
|
11134
11219
|
{
|
|
11135
11220
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -11137,9 +11222,9 @@ var DataList = (props) => {
|
|
|
11137
11222
|
children: "Prev"
|
|
11138
11223
|
}
|
|
11139
11224
|
),
|
|
11140
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
11225
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime95.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" }),
|
|
11141
11226
|
renderPageNumbers(),
|
|
11142
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
11227
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11143
11228
|
Hyperlink,
|
|
11144
11229
|
{
|
|
11145
11230
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -11147,19 +11232,19 @@ var DataList = (props) => {
|
|
|
11147
11232
|
children: "Next"
|
|
11148
11233
|
}
|
|
11149
11234
|
),
|
|
11150
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
11235
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
11151
11236
|
] })
|
|
11152
11237
|
] }) })
|
|
11153
11238
|
] }),
|
|
11154
|
-
/* @__PURE__ */ (0,
|
|
11155
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
11239
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
11240
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
11156
11241
|
"div",
|
|
11157
11242
|
{
|
|
11158
11243
|
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`,
|
|
11159
11244
|
children: [
|
|
11160
|
-
props.title ? /* @__PURE__ */ (0,
|
|
11161
|
-
/* @__PURE__ */ (0,
|
|
11162
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
11245
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", {}),
|
|
11246
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
11247
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11163
11248
|
InputControl_default,
|
|
11164
11249
|
{
|
|
11165
11250
|
name: "Search_input",
|
|
@@ -11172,7 +11257,7 @@ var DataList = (props) => {
|
|
|
11172
11257
|
}
|
|
11173
11258
|
}
|
|
11174
11259
|
),
|
|
11175
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
11260
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11176
11261
|
InputControl_default,
|
|
11177
11262
|
{
|
|
11178
11263
|
name: filter.name,
|
|
@@ -11187,15 +11272,15 @@ var DataList = (props) => {
|
|
|
11187
11272
|
},
|
|
11188
11273
|
filter.name
|
|
11189
11274
|
)),
|
|
11190
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
11275
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
11191
11276
|
Hyperlink,
|
|
11192
11277
|
{
|
|
11193
11278
|
className: "gap-1",
|
|
11194
11279
|
linkType: "Primary" /* Solid */,
|
|
11195
11280
|
href: props.addLinkHref,
|
|
11196
11281
|
children: [
|
|
11197
|
-
/* @__PURE__ */ (0,
|
|
11198
|
-
/* @__PURE__ */ (0,
|
|
11282
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
11283
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
11199
11284
|
]
|
|
11200
11285
|
}
|
|
11201
11286
|
)
|
|
@@ -11203,8 +11288,8 @@ var DataList = (props) => {
|
|
|
11203
11288
|
]
|
|
11204
11289
|
}
|
|
11205
11290
|
),
|
|
11206
|
-
/* @__PURE__ */ (0,
|
|
11207
|
-
/* @__PURE__ */ (0,
|
|
11291
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
11292
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
11208
11293
|
let url = builder.getNewOrderByUrl(column.name);
|
|
11209
11294
|
let icon = "chevronUpDown";
|
|
11210
11295
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -11214,18 +11299,18 @@ var DataList = (props) => {
|
|
|
11214
11299
|
icon = "chevronUp";
|
|
11215
11300
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
11216
11301
|
}
|
|
11217
|
-
return /* @__PURE__ */ (0,
|
|
11302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11218
11303
|
"th",
|
|
11219
11304
|
{
|
|
11220
11305
|
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" : ""),
|
|
11221
|
-
children: /* @__PURE__ */ (0,
|
|
11306
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11222
11307
|
Hyperlink,
|
|
11223
11308
|
{
|
|
11224
11309
|
href: column.enableSorting ? url : void 0,
|
|
11225
11310
|
className: "text-body-950",
|
|
11226
|
-
children: /* @__PURE__ */ (0,
|
|
11227
|
-
/* @__PURE__ */ (0,
|
|
11228
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
11311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
11312
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: column.label }),
|
|
11313
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
11229
11314
|
] })
|
|
11230
11315
|
}
|
|
11231
11316
|
)
|
|
@@ -11233,7 +11318,7 @@ var DataList = (props) => {
|
|
|
11233
11318
|
column.name
|
|
11234
11319
|
);
|
|
11235
11320
|
}) }) }) }) }),
|
|
11236
|
-
/* @__PURE__ */ (0,
|
|
11321
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
11237
11322
|
] })
|
|
11238
11323
|
] })
|
|
11239
11324
|
] });
|
|
@@ -11241,12 +11326,12 @@ var DataList = (props) => {
|
|
|
11241
11326
|
var DataList_default = DataList;
|
|
11242
11327
|
|
|
11243
11328
|
// src/components/dataForm/DataListRenderer.tsx
|
|
11244
|
-
var
|
|
11329
|
+
var import_react69 = __toESM(require("react"));
|
|
11245
11330
|
init_ServiceClient();
|
|
11246
11331
|
init_OdataBuilder();
|
|
11247
11332
|
init_SelectWithSearchInput();
|
|
11248
11333
|
var import_navigation4 = require("next/navigation");
|
|
11249
|
-
var
|
|
11334
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
11250
11335
|
var viewControlMap = {
|
|
11251
11336
|
number: ViewControlTypes.number,
|
|
11252
11337
|
lineText: ViewControlTypes.lineText,
|
|
@@ -11301,14 +11386,14 @@ var DataListRenderer = ({
|
|
|
11301
11386
|
widgetProps
|
|
11302
11387
|
}) => {
|
|
11303
11388
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
11304
|
-
const [columns, setColumns] = (0,
|
|
11305
|
-
const [dataset, setDataset] = (0,
|
|
11306
|
-
const [filter, setFilters] = (0,
|
|
11307
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
11308
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
11309
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
11389
|
+
const [columns, setColumns] = (0, import_react69.useState)([]);
|
|
11390
|
+
const [dataset, setDataset] = (0, import_react69.useState)();
|
|
11391
|
+
const [filter, setFilters] = (0, import_react69.useState)([]);
|
|
11392
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react69.useState)("");
|
|
11393
|
+
const [addLinkText, setAddLinkText] = (0, import_react69.useState)("");
|
|
11394
|
+
const [serviceRoute, setServiceRoute] = (0, import_react69.useState)("");
|
|
11310
11395
|
const pathname = (0, import_navigation4.usePathname)();
|
|
11311
|
-
(0,
|
|
11396
|
+
(0, import_react69.useEffect)(() => {
|
|
11312
11397
|
if (!formDefinition) return;
|
|
11313
11398
|
setColumns(mapApiToColumns(formDefinition));
|
|
11314
11399
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -11321,7 +11406,7 @@ var DataListRenderer = ({
|
|
|
11321
11406
|
setAddLinkHref(resolvedAddLinkHref);
|
|
11322
11407
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
11323
11408
|
}, [formDefinition, params]);
|
|
11324
|
-
(0,
|
|
11409
|
+
(0, import_react69.useEffect)(() => {
|
|
11325
11410
|
const fetchData = async () => {
|
|
11326
11411
|
if (!serviceRoute) return;
|
|
11327
11412
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -11341,13 +11426,13 @@ var DataListRenderer = ({
|
|
|
11341
11426
|
isActive: landingPageUrl === pathname
|
|
11342
11427
|
};
|
|
11343
11428
|
});
|
|
11344
|
-
return /* @__PURE__ */ (0,
|
|
11429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_react69.default.Fragment, { children: [
|
|
11345
11430
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
11346
11431
|
// tabs={resolvedTabs}
|
|
11347
11432
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
11348
11433
|
// />
|
|
11349
|
-
/* @__PURE__ */ (0,
|
|
11350
|
-
/* @__PURE__ */ (0,
|
|
11434
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
11435
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11351
11436
|
DataList_default,
|
|
11352
11437
|
{
|
|
11353
11438
|
addLinkHref,
|
|
@@ -11369,13 +11454,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
11369
11454
|
init_InputControlType();
|
|
11370
11455
|
|
|
11371
11456
|
// src/components/dataForm/DataForm.tsx
|
|
11372
|
-
var
|
|
11457
|
+
var import_react71 = __toESM(require("react"));
|
|
11373
11458
|
init_Icon();
|
|
11374
11459
|
init_Button();
|
|
11375
11460
|
init_StyleTypes();
|
|
11376
11461
|
|
|
11377
11462
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
11378
|
-
var
|
|
11463
|
+
var import_react70 = __toESM(require("react"));
|
|
11379
11464
|
|
|
11380
11465
|
// src/components/dataForm/StyleTypes.tsx
|
|
11381
11466
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -11402,7 +11487,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
11402
11487
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
11403
11488
|
|
|
11404
11489
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
11405
|
-
var
|
|
11490
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
11406
11491
|
var DataFormChildSection = (props) => {
|
|
11407
11492
|
const { section } = props;
|
|
11408
11493
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -11414,7 +11499,7 @@ var DataFormChildSection = (props) => {
|
|
|
11414
11499
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
11415
11500
|
};
|
|
11416
11501
|
const childItemsToRender = getChildItemsForRendering();
|
|
11417
|
-
const handleChildInputChange = (0,
|
|
11502
|
+
const handleChildInputChange = (0, import_react70.useCallback)(
|
|
11418
11503
|
(updatedValues) => {
|
|
11419
11504
|
if (isOneToOne) {
|
|
11420
11505
|
props.callback({
|
|
@@ -11441,7 +11526,7 @@ var DataFormChildSection = (props) => {
|
|
|
11441
11526
|
},
|
|
11442
11527
|
[props, isOneToOne, childItemsToRender]
|
|
11443
11528
|
);
|
|
11444
|
-
const onAddRow = (0,
|
|
11529
|
+
const onAddRow = (0, import_react70.useCallback)(() => {
|
|
11445
11530
|
props.callback({
|
|
11446
11531
|
sectionName: props.section.name,
|
|
11447
11532
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -11450,7 +11535,7 @@ var DataFormChildSection = (props) => {
|
|
|
11450
11535
|
rowIndex: -1
|
|
11451
11536
|
});
|
|
11452
11537
|
}, [props]);
|
|
11453
|
-
const onDeleteRow = (0,
|
|
11538
|
+
const onDeleteRow = (0, import_react70.useCallback)(
|
|
11454
11539
|
(filteredIndex) => {
|
|
11455
11540
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
11456
11541
|
if (visibleItem) {
|
|
@@ -11470,14 +11555,14 @@ var DataFormChildSection = (props) => {
|
|
|
11470
11555
|
childItemsToRender,
|
|
11471
11556
|
allChildItems: childItems
|
|
11472
11557
|
});
|
|
11473
|
-
return /* @__PURE__ */ (0,
|
|
11474
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
11475
|
-
/* @__PURE__ */ (0,
|
|
11476
|
-
/* @__PURE__ */ (0,
|
|
11477
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
11478
|
-
return /* @__PURE__ */ (0,
|
|
11558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react70.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
11559
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
11560
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
11561
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
11562
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
11563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("tr", { className: "", children: [
|
|
11479
11564
|
sectionRow.elements.map((field, index) => {
|
|
11480
|
-
return /* @__PURE__ */ (0,
|
|
11565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11481
11566
|
"th",
|
|
11482
11567
|
{
|
|
11483
11568
|
className: "py-3 font-normal text-left",
|
|
@@ -11486,21 +11571,21 @@ var DataFormChildSection = (props) => {
|
|
|
11486
11571
|
field.name
|
|
11487
11572
|
);
|
|
11488
11573
|
}),
|
|
11489
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
11574
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
11490
11575
|
] }, sectionRowIndex);
|
|
11491
11576
|
}) }),
|
|
11492
|
-
/* @__PURE__ */ (0,
|
|
11577
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
11493
11578
|
const { item, originalIndex } = visibleItem;
|
|
11494
11579
|
const rowKey = originalIndex;
|
|
11495
|
-
return /* @__PURE__ */ (0,
|
|
11580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react70.default.Fragment, { children: section.sectionRows.map(
|
|
11496
11581
|
(sectionRow, sectionRowIndex) => {
|
|
11497
|
-
return /* @__PURE__ */ (0,
|
|
11582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
11498
11583
|
"tr",
|
|
11499
11584
|
{
|
|
11500
11585
|
className: "",
|
|
11501
11586
|
children: [
|
|
11502
11587
|
sectionRow.elements.map((field, index) => {
|
|
11503
|
-
return /* @__PURE__ */ (0,
|
|
11588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11504
11589
|
InputControl_default,
|
|
11505
11590
|
{
|
|
11506
11591
|
index: filteredIndex,
|
|
@@ -11520,7 +11605,7 @@ var DataFormChildSection = (props) => {
|
|
|
11520
11605
|
}
|
|
11521
11606
|
) }) }) }, field.name);
|
|
11522
11607
|
}),
|
|
11523
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
11608
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11524
11609
|
ClientButton_default,
|
|
11525
11610
|
{
|
|
11526
11611
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -11529,7 +11614,7 @@ var DataFormChildSection = (props) => {
|
|
|
11529
11614
|
},
|
|
11530
11615
|
dataRole: "delete",
|
|
11531
11616
|
tabIndex: -1,
|
|
11532
|
-
children: /* @__PURE__ */ (0,
|
|
11617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11533
11618
|
Icon_default,
|
|
11534
11619
|
{
|
|
11535
11620
|
className: "w-4 h-4",
|
|
@@ -11546,7 +11631,7 @@ var DataFormChildSection = (props) => {
|
|
|
11546
11631
|
) }, rowKey);
|
|
11547
11632
|
}) })
|
|
11548
11633
|
] }) }),
|
|
11549
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
11634
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11550
11635
|
ClientButton_default,
|
|
11551
11636
|
{
|
|
11552
11637
|
ButtonType: "Link" /* Link */,
|
|
@@ -11561,9 +11646,9 @@ var DataFormChildSection = (props) => {
|
|
|
11561
11646
|
var DataFormChildSection_default = DataFormChildSection;
|
|
11562
11647
|
|
|
11563
11648
|
// src/components/dataForm/DataForm.tsx
|
|
11564
|
-
var
|
|
11649
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
11565
11650
|
var DataForm = (props) => {
|
|
11566
|
-
const formRef = (0,
|
|
11651
|
+
const formRef = (0, import_react71.useRef)(null);
|
|
11567
11652
|
console.log(props.dataItem, "dssads");
|
|
11568
11653
|
const initialState = {
|
|
11569
11654
|
inputValues: {},
|
|
@@ -11572,9 +11657,9 @@ var DataForm = (props) => {
|
|
|
11572
11657
|
const childInitialState = {
|
|
11573
11658
|
inputValues: []
|
|
11574
11659
|
};
|
|
11575
|
-
const [formState, dispatch] = (0,
|
|
11660
|
+
const [formState, dispatch] = (0, import_react71.useReducer)(FormReducer_default, initialState);
|
|
11576
11661
|
console.log(props.sections, "sections");
|
|
11577
|
-
const clearHiddenChildSections = (0,
|
|
11662
|
+
const clearHiddenChildSections = (0, import_react71.useCallback)(
|
|
11578
11663
|
(changedProperty, newValues) => {
|
|
11579
11664
|
if (!props.sections) return;
|
|
11580
11665
|
const allChildSections = [];
|
|
@@ -11612,7 +11697,7 @@ var DataForm = (props) => {
|
|
|
11612
11697
|
},
|
|
11613
11698
|
[props.sections, formState.inputValues]
|
|
11614
11699
|
);
|
|
11615
|
-
const handleInputChange = (0,
|
|
11700
|
+
const handleInputChange = (0, import_react71.useCallback)(
|
|
11616
11701
|
async (updatedValues) => {
|
|
11617
11702
|
dispatch({
|
|
11618
11703
|
type: FORM_INPUT_UPDATE,
|
|
@@ -11627,7 +11712,7 @@ var DataForm = (props) => {
|
|
|
11627
11712
|
},
|
|
11628
11713
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
11629
11714
|
);
|
|
11630
|
-
const fetchData = (0,
|
|
11715
|
+
const fetchData = (0, import_react71.useCallback)(async () => {
|
|
11631
11716
|
if (!props.rules) return;
|
|
11632
11717
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
11633
11718
|
return;
|
|
@@ -11658,7 +11743,7 @@ var DataForm = (props) => {
|
|
|
11658
11743
|
console.error("Error fetching data:", error);
|
|
11659
11744
|
}
|
|
11660
11745
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
11661
|
-
(0,
|
|
11746
|
+
(0, import_react71.useEffect)(() => {
|
|
11662
11747
|
fetchData();
|
|
11663
11748
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
11664
11749
|
function replacePlaceholders(template, context, params) {
|
|
@@ -11678,7 +11763,7 @@ var DataForm = (props) => {
|
|
|
11678
11763
|
}
|
|
11679
11764
|
);
|
|
11680
11765
|
}
|
|
11681
|
-
const handleChildSectionChangeCallback = (0,
|
|
11766
|
+
const handleChildSectionChangeCallback = (0, import_react71.useCallback)(
|
|
11682
11767
|
(params) => {
|
|
11683
11768
|
dispatch({
|
|
11684
11769
|
type: params.actionType,
|
|
@@ -11723,7 +11808,7 @@ var DataForm = (props) => {
|
|
|
11723
11808
|
});
|
|
11724
11809
|
return cloned;
|
|
11725
11810
|
}
|
|
11726
|
-
const onClick = (0,
|
|
11811
|
+
const onClick = (0, import_react71.useCallback)(async () => {
|
|
11727
11812
|
if (props.onClick) {
|
|
11728
11813
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
11729
11814
|
const normalizedValues = normalizeChildSections(
|
|
@@ -11739,21 +11824,21 @@ var DataForm = (props) => {
|
|
|
11739
11824
|
return { isSuccessful: true };
|
|
11740
11825
|
}
|
|
11741
11826
|
}, [formState, props]);
|
|
11742
|
-
const handleAdditionalOnClick = (0,
|
|
11827
|
+
const handleAdditionalOnClick = (0, import_react71.useCallback)(async () => {
|
|
11743
11828
|
if (props.additionalActions?.onClick) {
|
|
11744
11829
|
return await props.additionalActions.onClick(formState);
|
|
11745
11830
|
} else {
|
|
11746
11831
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
11747
11832
|
}
|
|
11748
11833
|
}, [formState, props]);
|
|
11749
|
-
const onDelete = (0,
|
|
11834
|
+
const onDelete = (0, import_react71.useCallback)(async () => {
|
|
11750
11835
|
if (props.onDelete) {
|
|
11751
11836
|
return await props.onDelete(formState);
|
|
11752
11837
|
} else {
|
|
11753
11838
|
return { isSuccessful: true };
|
|
11754
11839
|
}
|
|
11755
11840
|
}, [formState, props]);
|
|
11756
|
-
(0,
|
|
11841
|
+
(0, import_react71.useEffect)(() => {
|
|
11757
11842
|
if (props.dataItem) {
|
|
11758
11843
|
dispatch({
|
|
11759
11844
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -11781,19 +11866,19 @@ var DataForm = (props) => {
|
|
|
11781
11866
|
return false;
|
|
11782
11867
|
}
|
|
11783
11868
|
}
|
|
11784
|
-
return /* @__PURE__ */ (0,
|
|
11785
|
-
props.title && /* @__PURE__ */ (0,
|
|
11869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react71.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
11870
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime98.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_runtime98.jsxs)(
|
|
11786
11871
|
"div",
|
|
11787
11872
|
{
|
|
11788
11873
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
11789
11874
|
onClick: () => window.history.back(),
|
|
11790
11875
|
children: [
|
|
11791
|
-
/* @__PURE__ */ (0,
|
|
11792
|
-
/* @__PURE__ */ (0,
|
|
11876
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
11877
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
11793
11878
|
]
|
|
11794
11879
|
}
|
|
11795
11880
|
) }),
|
|
11796
|
-
/* @__PURE__ */ (0,
|
|
11881
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11797
11882
|
"form",
|
|
11798
11883
|
{
|
|
11799
11884
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -11814,8 +11899,8 @@ var DataForm = (props) => {
|
|
|
11814
11899
|
}
|
|
11815
11900
|
}
|
|
11816
11901
|
},
|
|
11817
|
-
children: /* @__PURE__ */ (0,
|
|
11818
|
-
return /* @__PURE__ */ (0,
|
|
11902
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
11903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react71.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
11819
11904
|
section.sectionRows?.map(
|
|
11820
11905
|
(sectionRow, sectionRowIndex) => {
|
|
11821
11906
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -11826,14 +11911,14 @@ var DataForm = (props) => {
|
|
|
11826
11911
|
sectionRow.visible
|
|
11827
11912
|
);
|
|
11828
11913
|
}
|
|
11829
|
-
return /* @__PURE__ */ (0,
|
|
11830
|
-
return /* @__PURE__ */ (0,
|
|
11914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react71.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
11915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
11831
11916
|
"div",
|
|
11832
11917
|
{
|
|
11833
11918
|
className: sectionRow.grow ? "grow" : "",
|
|
11834
11919
|
children: [
|
|
11835
|
-
/* @__PURE__ */ (0,
|
|
11836
|
-
/* @__PURE__ */ (0,
|
|
11920
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: field.controlType }),
|
|
11921
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11837
11922
|
InputControl_default,
|
|
11838
11923
|
{
|
|
11839
11924
|
name: field.name,
|
|
@@ -11863,12 +11948,12 @@ var DataForm = (props) => {
|
|
|
11863
11948
|
}) }) }, sectionRowIndex);
|
|
11864
11949
|
}
|
|
11865
11950
|
),
|
|
11866
|
-
/* @__PURE__ */ (0,
|
|
11951
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: section.childSections?.map(
|
|
11867
11952
|
(childSection, childSectionIndex) => {
|
|
11868
|
-
return /* @__PURE__ */ (0,
|
|
11953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
11869
11954
|
formState.inputValues,
|
|
11870
11955
|
childSection.visible
|
|
11871
|
-
) && /* @__PURE__ */ (0,
|
|
11956
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11872
11957
|
DataFormChildSection_default,
|
|
11873
11958
|
{
|
|
11874
11959
|
section: childSection,
|
|
@@ -11883,8 +11968,8 @@ var DataForm = (props) => {
|
|
|
11883
11968
|
}) })
|
|
11884
11969
|
}
|
|
11885
11970
|
),
|
|
11886
|
-
/* @__PURE__ */ (0,
|
|
11887
|
-
/* @__PURE__ */ (0,
|
|
11971
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
11972
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11888
11973
|
Button_default,
|
|
11889
11974
|
{
|
|
11890
11975
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -11892,7 +11977,7 @@ var DataForm = (props) => {
|
|
|
11892
11977
|
children: props.additionalActions.title
|
|
11893
11978
|
}
|
|
11894
11979
|
) }),
|
|
11895
|
-
/* @__PURE__ */ (0,
|
|
11980
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11896
11981
|
Button_default,
|
|
11897
11982
|
{
|
|
11898
11983
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -11903,7 +11988,7 @@ var DataForm = (props) => {
|
|
|
11903
11988
|
children: "Delete"
|
|
11904
11989
|
}
|
|
11905
11990
|
) }),
|
|
11906
|
-
/* @__PURE__ */ (0,
|
|
11991
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11907
11992
|
Button_default,
|
|
11908
11993
|
{
|
|
11909
11994
|
onValidate,
|
|
@@ -11921,7 +12006,7 @@ var DataForm_default = DataForm;
|
|
|
11921
12006
|
|
|
11922
12007
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
11923
12008
|
init_ServiceClient();
|
|
11924
|
-
var
|
|
12009
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
11925
12010
|
function getAction(actions, code) {
|
|
11926
12011
|
return actions?.find((a) => a.actionCode === code);
|
|
11927
12012
|
}
|
|
@@ -11947,9 +12032,9 @@ var DataFormRenderer = ({
|
|
|
11947
12032
|
"Delete"
|
|
11948
12033
|
);
|
|
11949
12034
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
11950
|
-
return /* @__PURE__ */ (0,
|
|
11951
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
11952
|
-
/* @__PURE__ */ (0,
|
|
12035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
12036
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
12037
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11953
12038
|
DataForm_default,
|
|
11954
12039
|
{
|
|
11955
12040
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|