@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260425114015 → 0.8.1-dev.20260427125546
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +768 -563
- package/dist/index.mjs +633 -428
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -412,7 +412,7 @@ var ViewControl = (props) => {
|
|
|
412
412
|
var ViewControl_default = ViewControl;
|
|
413
413
|
|
|
414
414
|
// src/components/controls/edit/InputControl.tsx
|
|
415
|
-
import
|
|
415
|
+
import React28 from "react";
|
|
416
416
|
|
|
417
417
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
418
418
|
import React11 from "react";
|
|
@@ -582,6 +582,7 @@ var InputControlType = {
|
|
|
582
582
|
moneyInput: "money",
|
|
583
583
|
select: "select",
|
|
584
584
|
percentageInput: "percentage",
|
|
585
|
+
asset: "asset",
|
|
585
586
|
phoneInput: "phone",
|
|
586
587
|
numberInput: "number",
|
|
587
588
|
checkboxInput: "boolean",
|
|
@@ -1633,9 +1634,301 @@ var TimeInput = (props) => {
|
|
|
1633
1634
|
};
|
|
1634
1635
|
var TimeInput_default = TimeInput;
|
|
1635
1636
|
|
|
1637
|
+
// src/components/controls/edit/AssetUpload.tsx
|
|
1638
|
+
import React27, { useEffect as useEffect6 } from "react";
|
|
1639
|
+
|
|
1640
|
+
// src/components/utilities/AssetUtility.tsx
|
|
1641
|
+
var AssetUtility = class {
|
|
1642
|
+
constructor() {
|
|
1643
|
+
}
|
|
1644
|
+
static resolveUrl(assetBaseUrl, url) {
|
|
1645
|
+
if (!url) return void 0;
|
|
1646
|
+
if (url.startsWith("http")) return url;
|
|
1647
|
+
if (!assetBaseUrl) return url;
|
|
1648
|
+
return `${assetBaseUrl}/${url}`;
|
|
1649
|
+
}
|
|
1650
|
+
// static getAssetUrl(apiBaseUrl: string) {
|
|
1651
|
+
// let domainName = apiBaseUrl.replace("https://", "");
|
|
1652
|
+
// return `https://cdn.g-assets.com/${domainName}`;
|
|
1653
|
+
// }
|
|
1654
|
+
static getAssetFullPath(apiBaseUrl, relativePath) {
|
|
1655
|
+
const domainName = apiBaseUrl.replace("https://", "");
|
|
1656
|
+
return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
|
|
1657
|
+
}
|
|
1658
|
+
};
|
|
1659
|
+
var AssetUtility_default = AssetUtility;
|
|
1660
|
+
|
|
1661
|
+
// src/components/dataForm/Hyperlink.tsx
|
|
1662
|
+
import Link from "next/link";
|
|
1663
|
+
import { Fragment, jsx as jsx27 } from "react/jsx-runtime";
|
|
1664
|
+
function Hyperlink(props) {
|
|
1665
|
+
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
|
|
1666
|
+
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
1667
|
+
const additionalProps = {};
|
|
1668
|
+
if (target == "_blank") {
|
|
1669
|
+
additionalProps.rel = "noopener noreferrer";
|
|
1670
|
+
}
|
|
1671
|
+
return /* @__PURE__ */ jsx27(Fragment, { children: props.href ? /* @__PURE__ */ jsx27(
|
|
1672
|
+
Link,
|
|
1673
|
+
{
|
|
1674
|
+
href: props.href,
|
|
1675
|
+
prefetch: false,
|
|
1676
|
+
className: [linkClass, props.className].filter(Boolean).join(" "),
|
|
1677
|
+
...additionalProps,
|
|
1678
|
+
target,
|
|
1679
|
+
children: props.children
|
|
1680
|
+
}
|
|
1681
|
+
) : props.isHeading ? /* @__PURE__ */ jsx27("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx27("span", { className: props.className, children: props.children }) });
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
// src/svg/chevron-updown.tsx
|
|
1685
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1686
|
+
var ChevronUpDown = (props) => {
|
|
1687
|
+
return /* @__PURE__ */ jsx28("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx28("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
1688
|
+
};
|
|
1689
|
+
var chevron_updown_default = ChevronUpDown;
|
|
1690
|
+
|
|
1691
|
+
// src/svg/chevron-down.tsx
|
|
1692
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1693
|
+
var ChevronDown = (props) => {
|
|
1694
|
+
return /* @__PURE__ */ jsx29("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx29("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
1695
|
+
};
|
|
1696
|
+
var chevron_down_default = ChevronDown;
|
|
1697
|
+
|
|
1698
|
+
// src/svg/chevron-up.tsx
|
|
1699
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1700
|
+
var ChevronUp = (props) => {
|
|
1701
|
+
return /* @__PURE__ */ jsx30("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx30("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
1702
|
+
};
|
|
1703
|
+
var chevron_up_default = ChevronUp;
|
|
1704
|
+
|
|
1705
|
+
// src/svg/plus.tsx
|
|
1706
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1707
|
+
var Plus = (props) => {
|
|
1708
|
+
return /* @__PURE__ */ jsx31("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx31("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
1709
|
+
};
|
|
1710
|
+
var plus_default = Plus;
|
|
1711
|
+
|
|
1712
|
+
// src/svg/Icons.tsx
|
|
1713
|
+
var Icons = {
|
|
1714
|
+
chevronUpDown: chevron_updown_default,
|
|
1715
|
+
chevronDown: chevron_down_default,
|
|
1716
|
+
chevronUp: chevron_up_default,
|
|
1717
|
+
plus: plus_default
|
|
1718
|
+
};
|
|
1719
|
+
var Icons_default = Icons;
|
|
1720
|
+
|
|
1721
|
+
// src/svg/Icon.tsx
|
|
1722
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1723
|
+
var Icon = ({ name, className, ...props }) => {
|
|
1724
|
+
const IconComponent = Icons_default[name];
|
|
1725
|
+
if (!IconComponent) {
|
|
1726
|
+
console.error(`Icon "${name}" not found.`);
|
|
1727
|
+
return null;
|
|
1728
|
+
}
|
|
1729
|
+
return /* @__PURE__ */ jsx32(IconComponent, { ...props, className });
|
|
1730
|
+
};
|
|
1731
|
+
var Icon_default = Icon;
|
|
1732
|
+
|
|
1733
|
+
// src/components/controls/edit/AssetUpload.tsx
|
|
1734
|
+
import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1735
|
+
var AssetUpload = (props) => {
|
|
1736
|
+
const isDisabled = props.attributes?.disable ?? false;
|
|
1737
|
+
let allValues = [];
|
|
1738
|
+
if (props.value !== void 0 && props.value !== null && props.value !== "") {
|
|
1739
|
+
try {
|
|
1740
|
+
allValues = JSON.parse(props.value.toString());
|
|
1741
|
+
} catch (error) {
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
const getInitialTab = () => {
|
|
1745
|
+
if (allValues.length > 0) {
|
|
1746
|
+
const asset = allValues[0];
|
|
1747
|
+
if (asset.posterUrl) {
|
|
1748
|
+
return "video";
|
|
1749
|
+
} else if (asset.assetUrl) {
|
|
1750
|
+
return "image";
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
return "image";
|
|
1754
|
+
};
|
|
1755
|
+
const [assetType, setAssetType] = React27.useState(getInitialTab);
|
|
1756
|
+
useEffect6(() => {
|
|
1757
|
+
setAssetType(getInitialTab());
|
|
1758
|
+
}, [props.value]);
|
|
1759
|
+
const assetUploadCallback = (newAsset) => {
|
|
1760
|
+
if (isDisabled) return;
|
|
1761
|
+
let updated = [];
|
|
1762
|
+
updated.push({
|
|
1763
|
+
assetUrl: newAsset.assetUrl,
|
|
1764
|
+
title: newAsset.title,
|
|
1765
|
+
posterUrl: newAsset.posterUrl,
|
|
1766
|
+
intrinsicHeight: newAsset.intrinsicHeight,
|
|
1767
|
+
intrinsicWidth: newAsset.intrinsicWidth
|
|
1768
|
+
});
|
|
1769
|
+
props.callback?.({
|
|
1770
|
+
name: props.name,
|
|
1771
|
+
value: JSON.stringify(updated),
|
|
1772
|
+
index: props.index,
|
|
1773
|
+
groupKey: props.groupKey
|
|
1774
|
+
});
|
|
1775
|
+
};
|
|
1776
|
+
const deleteFile = (index) => {
|
|
1777
|
+
if (isDisabled) return;
|
|
1778
|
+
let existingValue = [];
|
|
1779
|
+
if (props.value) {
|
|
1780
|
+
try {
|
|
1781
|
+
existingValue = JSON.parse(props.value.toString());
|
|
1782
|
+
} catch (error) {
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
if (existingValue.length > index) {
|
|
1786
|
+
existingValue.splice(index, 1);
|
|
1787
|
+
props.callback?.({
|
|
1788
|
+
name: props.name,
|
|
1789
|
+
value: JSON.stringify(existingValue),
|
|
1790
|
+
index: props.index,
|
|
1791
|
+
groupKey: props.groupKey
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
};
|
|
1795
|
+
const textChangeHandler = (index, event) => {
|
|
1796
|
+
if (isDisabled) return;
|
|
1797
|
+
let existingValue = [];
|
|
1798
|
+
if (props.value) {
|
|
1799
|
+
try {
|
|
1800
|
+
existingValue = JSON.parse(props.value.toString());
|
|
1801
|
+
} catch (error) {
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
const text = event.target.value;
|
|
1805
|
+
if (existingValue.length > index) {
|
|
1806
|
+
const updatedArray = [...existingValue];
|
|
1807
|
+
updatedArray[index] = { ...updatedArray[index], title: text };
|
|
1808
|
+
props.callback?.({
|
|
1809
|
+
name: props.name,
|
|
1810
|
+
value: JSON.stringify(updatedArray),
|
|
1811
|
+
index: props.index,
|
|
1812
|
+
groupKey: props.groupKey
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1815
|
+
};
|
|
1816
|
+
const getAssetType = (asset) => {
|
|
1817
|
+
if (asset.assetUrl?.endsWith(".m3u8") || asset.posterUrl) return "video";
|
|
1818
|
+
return "image";
|
|
1819
|
+
};
|
|
1820
|
+
const shouldShowDetails = () => {
|
|
1821
|
+
if (allValues.length === 0) return false;
|
|
1822
|
+
const asset = allValues[0];
|
|
1823
|
+
if (assetType === "video") {
|
|
1824
|
+
return Boolean(asset.posterUrl && asset.assetUrl && asset.assetUrl.endsWith(".m3u8"));
|
|
1825
|
+
}
|
|
1826
|
+
if (assetType === "image") {
|
|
1827
|
+
return Boolean(asset.assetUrl && !asset.assetUrl.endsWith(".m3u8"));
|
|
1828
|
+
}
|
|
1829
|
+
return false;
|
|
1830
|
+
};
|
|
1831
|
+
return /* @__PURE__ */ jsxs22(React27.Fragment, { children: [
|
|
1832
|
+
/* @__PURE__ */ jsx33("label", { className: "block mb-1", children: /* @__PURE__ */ jsx33("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
1833
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
1834
|
+
/* @__PURE__ */ jsx33(
|
|
1835
|
+
ClientButton_default,
|
|
1836
|
+
{
|
|
1837
|
+
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
1838
|
+
ButtonType: "Link" /* Link */,
|
|
1839
|
+
onClick: () => setAssetType("image"),
|
|
1840
|
+
disabled: isDisabled,
|
|
1841
|
+
children: "Image Upload"
|
|
1842
|
+
}
|
|
1843
|
+
),
|
|
1844
|
+
/* @__PURE__ */ jsx33(
|
|
1845
|
+
ClientButton_default,
|
|
1846
|
+
{
|
|
1847
|
+
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
1848
|
+
ButtonType: "Link" /* Link */,
|
|
1849
|
+
onClick: () => setAssetType("video"),
|
|
1850
|
+
disabled: isDisabled,
|
|
1851
|
+
children: "Video Upload"
|
|
1852
|
+
}
|
|
1853
|
+
)
|
|
1854
|
+
] }),
|
|
1855
|
+
shouldShowDetails() && /* @__PURE__ */ jsxs22("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
1856
|
+
/* @__PURE__ */ jsx33("span", { className: "absolute -top-2.5 left-3 bg-primary-600 text-white text-xs px-2 py-0.5 rounded-full", children: getAssetType(allValues[0]) === "video" ? "Video" : "Image" }),
|
|
1857
|
+
/* @__PURE__ */ jsx33("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ jsxs22("div", { className: "flex justify-between items-start gap-5", children: [
|
|
1858
|
+
/* @__PURE__ */ jsxs22("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
1859
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
1860
|
+
/* @__PURE__ */ jsx33("p", { className: "text-gray-500", children: "Title" }),
|
|
1861
|
+
/* @__PURE__ */ jsx33(
|
|
1862
|
+
"input",
|
|
1863
|
+
{
|
|
1864
|
+
type: "text",
|
|
1865
|
+
value: digitalAsset.title,
|
|
1866
|
+
onChange: (event) => textChangeHandler(index, event),
|
|
1867
|
+
placeholder: "title",
|
|
1868
|
+
disabled: isDisabled,
|
|
1869
|
+
className: "w-full mt-1 py-1.5 block rounded border-gray-300 shadow-sm bg-white\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-gray-100 disabled:text-gray-400 disabled:cursor-not-allowed"
|
|
1870
|
+
}
|
|
1871
|
+
)
|
|
1872
|
+
] }),
|
|
1873
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ jsxs22("div", { children: [
|
|
1874
|
+
/* @__PURE__ */ jsx33("p", { className: "text-gray-500", children: "Resolution" }),
|
|
1875
|
+
/* @__PURE__ */ jsxs22("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
1876
|
+
digitalAsset.intrinsicWidth,
|
|
1877
|
+
"\xD7",
|
|
1878
|
+
digitalAsset.intrinsicHeight
|
|
1879
|
+
] })
|
|
1880
|
+
] }),
|
|
1881
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ jsxs22("div", { children: [
|
|
1882
|
+
/* @__PURE__ */ jsx33("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
1883
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
1884
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ jsx33(
|
|
1885
|
+
"img",
|
|
1886
|
+
{
|
|
1887
|
+
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
1888
|
+
alt: digitalAsset.title || "Video poster",
|
|
1889
|
+
className: "w-32 h-auto object-cover rounded border p-1"
|
|
1890
|
+
}
|
|
1891
|
+
),
|
|
1892
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ jsx33(
|
|
1893
|
+
"img",
|
|
1894
|
+
{
|
|
1895
|
+
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
1896
|
+
alt: digitalAsset.title || "Uploaded image",
|
|
1897
|
+
className: "w-32 h-auto object-cover rounded border p-1"
|
|
1898
|
+
}
|
|
1899
|
+
)
|
|
1900
|
+
] })
|
|
1901
|
+
] }),
|
|
1902
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ jsxs22("div", { className: "col-span-2", children: [
|
|
1903
|
+
/* @__PURE__ */ jsx33("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
1904
|
+
/* @__PURE__ */ jsx33(
|
|
1905
|
+
Hyperlink,
|
|
1906
|
+
{
|
|
1907
|
+
href: digitalAsset.assetUrl,
|
|
1908
|
+
className: "text-primary-600 underline mt-1 break-all",
|
|
1909
|
+
title: digitalAsset.assetUrl,
|
|
1910
|
+
children: digitalAsset.assetUrl
|
|
1911
|
+
}
|
|
1912
|
+
)
|
|
1913
|
+
] })
|
|
1914
|
+
] }),
|
|
1915
|
+
/* @__PURE__ */ jsx33(
|
|
1916
|
+
"span",
|
|
1917
|
+
{
|
|
1918
|
+
onClick: () => !isDisabled && deleteFile(index),
|
|
1919
|
+
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
1920
|
+
children: /* @__PURE__ */ jsx33(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
1921
|
+
}
|
|
1922
|
+
)
|
|
1923
|
+
] }, index)) })
|
|
1924
|
+
] })
|
|
1925
|
+
] });
|
|
1926
|
+
};
|
|
1927
|
+
var AssetUpload_default = AssetUpload;
|
|
1928
|
+
|
|
1636
1929
|
// src/components/controls/edit/InputControl.tsx
|
|
1637
|
-
import { jsx as
|
|
1638
|
-
var InputControl =
|
|
1930
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1931
|
+
var InputControl = React28.forwardRef(
|
|
1639
1932
|
(props, ref) => {
|
|
1640
1933
|
const ControlComponents = {
|
|
1641
1934
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -1653,23 +1946,24 @@ var InputControl = React27.forwardRef(
|
|
|
1653
1946
|
[InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
|
|
1654
1947
|
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
1655
1948
|
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
1656
|
-
[InputControlType_default.timeInput]: TimeInput_default
|
|
1949
|
+
[InputControlType_default.timeInput]: TimeInput_default,
|
|
1950
|
+
[InputControlType_default.asset]: AssetUpload_default
|
|
1657
1951
|
};
|
|
1658
1952
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
1659
|
-
return /* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ jsx34(React28.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx34(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
1660
1954
|
}
|
|
1661
1955
|
);
|
|
1662
1956
|
InputControl.displayName = "InputControl";
|
|
1663
1957
|
var InputControl_default = InputControl;
|
|
1664
1958
|
|
|
1665
1959
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
1666
|
-
import
|
|
1960
|
+
import React42 from "react";
|
|
1667
1961
|
|
|
1668
1962
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
1669
|
-
import
|
|
1963
|
+
import React31 from "react";
|
|
1670
1964
|
|
|
1671
1965
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
1672
|
-
import { jsx as
|
|
1966
|
+
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1673
1967
|
var TextNode = (props) => {
|
|
1674
1968
|
function cssStringToJson(cssString) {
|
|
1675
1969
|
const styleObject = {};
|
|
@@ -1727,59 +2021,36 @@ var TextNode = (props) => {
|
|
|
1727
2021
|
});
|
|
1728
2022
|
}
|
|
1729
2023
|
function renderWithLineBreaks(text) {
|
|
1730
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */
|
|
2024
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs23("span", { children: [
|
|
1731
2025
|
line,
|
|
1732
|
-
index < arr.length - 1 && /* @__PURE__ */
|
|
2026
|
+
index < arr.length - 1 && /* @__PURE__ */ jsx35("br", {})
|
|
1733
2027
|
] }, index));
|
|
1734
2028
|
}
|
|
1735
2029
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
1736
2030
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
1737
2031
|
return (
|
|
1738
2032
|
// @ts-expect-error custom code
|
|
1739
|
-
/* @__PURE__ */
|
|
2033
|
+
/* @__PURE__ */ jsx35("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
|
|
1740
2034
|
);
|
|
1741
2035
|
};
|
|
1742
2036
|
var TextNode_default = TextNode;
|
|
1743
2037
|
|
|
1744
2038
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
1745
|
-
import { jsx as
|
|
2039
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1746
2040
|
var LineBreakNode = () => {
|
|
1747
|
-
return /* @__PURE__ */
|
|
2041
|
+
return /* @__PURE__ */ jsx36("div", { className: "py-0.5 lg:py-1.5" });
|
|
1748
2042
|
};
|
|
1749
2043
|
var LineBreakNode_default = LineBreakNode;
|
|
1750
2044
|
|
|
1751
2045
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
1752
|
-
import
|
|
1753
|
-
|
|
1754
|
-
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
1755
|
-
import React28 from "react";
|
|
1756
|
-
|
|
1757
|
-
// src/components/utilities/AssetUtility.tsx
|
|
1758
|
-
var AssetUtility = class {
|
|
1759
|
-
constructor() {
|
|
1760
|
-
}
|
|
1761
|
-
static resolveUrl(assetBaseUrl, url) {
|
|
1762
|
-
if (!url) return void 0;
|
|
1763
|
-
if (url.startsWith("http")) return url;
|
|
1764
|
-
if (!assetBaseUrl) return url;
|
|
1765
|
-
return `${assetBaseUrl}/${url}`;
|
|
1766
|
-
}
|
|
1767
|
-
// static getAssetUrl(apiBaseUrl: string) {
|
|
1768
|
-
// let domainName = apiBaseUrl.replace("https://", "");
|
|
1769
|
-
// return `https://cdn.g-assets.com/${domainName}`;
|
|
1770
|
-
// }
|
|
1771
|
-
static getAssetFullPath(apiBaseUrl, relativePath) {
|
|
1772
|
-
const domainName = apiBaseUrl.replace("https://", "");
|
|
1773
|
-
return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
|
|
1774
|
-
}
|
|
1775
|
-
};
|
|
1776
|
-
var AssetUtility_default = AssetUtility;
|
|
2046
|
+
import React30 from "react";
|
|
1777
2047
|
|
|
1778
2048
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2049
|
+
import React29 from "react";
|
|
1779
2050
|
import dynamic from "next/dynamic";
|
|
1780
2051
|
|
|
1781
2052
|
// src/components/DeviceAssetSelector.tsx
|
|
1782
|
-
import { jsx as
|
|
2053
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1783
2054
|
var DeviceAssetSelector = ({
|
|
1784
2055
|
assets,
|
|
1785
2056
|
assetBaseUrl,
|
|
@@ -1854,7 +2125,7 @@ var DeviceAssetSelector = ({
|
|
|
1854
2125
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
1855
2126
|
const renderMedia = () => {
|
|
1856
2127
|
if (isHls) {
|
|
1857
|
-
return /* @__PURE__ */
|
|
2128
|
+
return /* @__PURE__ */ jsx37(
|
|
1858
2129
|
HlsPlayer_default,
|
|
1859
2130
|
{
|
|
1860
2131
|
assetUrl: resolvedAssetUrl,
|
|
@@ -1871,7 +2142,7 @@ var DeviceAssetSelector = ({
|
|
|
1871
2142
|
} else {
|
|
1872
2143
|
return (
|
|
1873
2144
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
1874
|
-
/* @__PURE__ */
|
|
2145
|
+
/* @__PURE__ */ jsx37(
|
|
1875
2146
|
"img",
|
|
1876
2147
|
{
|
|
1877
2148
|
style: styles,
|
|
@@ -1887,17 +2158,17 @@ var DeviceAssetSelector = ({
|
|
|
1887
2158
|
}
|
|
1888
2159
|
};
|
|
1889
2160
|
if (width) {
|
|
1890
|
-
return /* @__PURE__ */
|
|
2161
|
+
return /* @__PURE__ */ jsx37("div", { style: { width }, children: renderMedia() });
|
|
1891
2162
|
}
|
|
1892
2163
|
if (nodeProps?.format) {
|
|
1893
|
-
return /* @__PURE__ */
|
|
2164
|
+
return /* @__PURE__ */ jsx37("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
1894
2165
|
}
|
|
1895
2166
|
return renderMedia();
|
|
1896
2167
|
};
|
|
1897
2168
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
1898
2169
|
|
|
1899
2170
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
1900
|
-
import { Fragment, jsx as
|
|
2171
|
+
import { Fragment as Fragment2, jsx as jsx38 } from "react/jsx-runtime";
|
|
1901
2172
|
var HlsPlayer = dynamic(() => import("./HlsPlayer-GV3FOPYT.mjs"), {
|
|
1902
2173
|
ssr: false
|
|
1903
2174
|
});
|
|
@@ -1940,7 +2211,7 @@ var ImageNode = (props) => {
|
|
|
1940
2211
|
console.error("Error parsing assets in ImageNode:", error);
|
|
1941
2212
|
}
|
|
1942
2213
|
if (assets && assets.length > 0) {
|
|
1943
|
-
return /* @__PURE__ */
|
|
2214
|
+
return /* @__PURE__ */ jsx38(Fragment2, { children: /* @__PURE__ */ jsx38(
|
|
1944
2215
|
DeviceAssetSelector_default,
|
|
1945
2216
|
{
|
|
1946
2217
|
device: props.device,
|
|
@@ -1989,7 +2260,7 @@ var ImageNode = (props) => {
|
|
|
1989
2260
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
1990
2261
|
const renderMedia = () => {
|
|
1991
2262
|
if (isHls) {
|
|
1992
|
-
return /* @__PURE__ */
|
|
2263
|
+
return /* @__PURE__ */ jsx38(
|
|
1993
2264
|
HlsPlayer,
|
|
1994
2265
|
{
|
|
1995
2266
|
assetUrl: imageUrl,
|
|
@@ -2004,7 +2275,7 @@ var ImageNode = (props) => {
|
|
|
2004
2275
|
}
|
|
2005
2276
|
);
|
|
2006
2277
|
} else {
|
|
2007
|
-
return /* @__PURE__ */
|
|
2278
|
+
return /* @__PURE__ */ jsx38(React29.Fragment, { children: /* @__PURE__ */ jsx38(
|
|
2008
2279
|
"img",
|
|
2009
2280
|
{
|
|
2010
2281
|
style: styles,
|
|
@@ -2019,38 +2290,15 @@ var ImageNode = (props) => {
|
|
|
2019
2290
|
}
|
|
2020
2291
|
};
|
|
2021
2292
|
if (props.node.width) {
|
|
2022
|
-
return /* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ jsx38("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
2023
2294
|
}
|
|
2024
2295
|
return renderMedia();
|
|
2025
2296
|
};
|
|
2026
2297
|
var ImageNode_default = ImageNode;
|
|
2027
2298
|
|
|
2028
|
-
// src/components/dataForm/Hyperlink.tsx
|
|
2029
|
-
import Link from "next/link";
|
|
2030
|
-
import { Fragment as Fragment2, jsx as jsx32 } from "react/jsx-runtime";
|
|
2031
|
-
function Hyperlink(props) {
|
|
2032
|
-
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
|
|
2033
|
-
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
2034
|
-
const additionalProps = {};
|
|
2035
|
-
if (target == "_blank") {
|
|
2036
|
-
additionalProps.rel = "noopener noreferrer";
|
|
2037
|
-
}
|
|
2038
|
-
return /* @__PURE__ */ jsx32(Fragment2, { children: props.href ? /* @__PURE__ */ jsx32(
|
|
2039
|
-
Link,
|
|
2040
|
-
{
|
|
2041
|
-
href: props.href,
|
|
2042
|
-
prefetch: false,
|
|
2043
|
-
className: [linkClass, props.className].filter(Boolean).join(" "),
|
|
2044
|
-
...additionalProps,
|
|
2045
|
-
target,
|
|
2046
|
-
children: props.children
|
|
2047
|
-
}
|
|
2048
|
-
) : props.isHeading ? /* @__PURE__ */ jsx32("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx32("span", { className: props.className, children: props.children }) });
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
2299
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2052
2300
|
import dynamic2 from "next/dynamic";
|
|
2053
|
-
import { Fragment as Fragment3, jsx as
|
|
2301
|
+
import { Fragment as Fragment3, jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2054
2302
|
var LinkNodeButton = dynamic2(() => import("./LinkNodeButton-SSV4NINC.mjs"), {
|
|
2055
2303
|
ssr: false
|
|
2056
2304
|
});
|
|
@@ -2097,13 +2345,13 @@ var LinkNode = (props) => {
|
|
|
2097
2345
|
const isButton = node.isButton === true;
|
|
2098
2346
|
const renderChildren = () => {
|
|
2099
2347
|
if (!node.children || node.children.length === 0) return null;
|
|
2100
|
-
return /* @__PURE__ */
|
|
2348
|
+
return /* @__PURE__ */ jsx39(Fragment3, { children: node.children.map((childNode, index) => {
|
|
2101
2349
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2102
2350
|
if (!SelectedNode) {
|
|
2103
2351
|
console.warn("Unknown node type:", childNode.type);
|
|
2104
2352
|
return null;
|
|
2105
2353
|
}
|
|
2106
|
-
return /* @__PURE__ */
|
|
2354
|
+
return /* @__PURE__ */ jsx39(React30.Fragment, { children: /* @__PURE__ */ jsx39(
|
|
2107
2355
|
SelectedNode,
|
|
2108
2356
|
{
|
|
2109
2357
|
node: childNode,
|
|
@@ -2116,15 +2364,15 @@ var LinkNode = (props) => {
|
|
|
2116
2364
|
};
|
|
2117
2365
|
const renderFallback = () => {
|
|
2118
2366
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
2119
|
-
return /* @__PURE__ */
|
|
2367
|
+
return /* @__PURE__ */ jsx39("span", { children: linkText });
|
|
2120
2368
|
}
|
|
2121
2369
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
2122
|
-
return /* @__PURE__ */
|
|
2370
|
+
return /* @__PURE__ */ jsx39("br", {});
|
|
2123
2371
|
}
|
|
2124
2372
|
return null;
|
|
2125
2373
|
};
|
|
2126
2374
|
if (isButton) {
|
|
2127
|
-
return /* @__PURE__ */
|
|
2375
|
+
return /* @__PURE__ */ jsxs24(
|
|
2128
2376
|
LinkNodeButton,
|
|
2129
2377
|
{
|
|
2130
2378
|
node,
|
|
@@ -2142,7 +2390,7 @@ var LinkNode = (props) => {
|
|
|
2142
2390
|
}
|
|
2143
2391
|
);
|
|
2144
2392
|
}
|
|
2145
|
-
return /* @__PURE__ */
|
|
2393
|
+
return /* @__PURE__ */ jsxs24(
|
|
2146
2394
|
Hyperlink,
|
|
2147
2395
|
{
|
|
2148
2396
|
href: linkUrl || "#",
|
|
@@ -2158,10 +2406,10 @@ var LinkNode = (props) => {
|
|
|
2158
2406
|
var LinkNode_default = LinkNode;
|
|
2159
2407
|
|
|
2160
2408
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
2161
|
-
import { jsx as
|
|
2409
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2162
2410
|
var SVGIconNode = ({ node }) => {
|
|
2163
2411
|
if (!node?.svgCode) return null;
|
|
2164
|
-
return /* @__PURE__ */
|
|
2412
|
+
return /* @__PURE__ */ jsx40(
|
|
2165
2413
|
"span",
|
|
2166
2414
|
{
|
|
2167
2415
|
style: {
|
|
@@ -2178,7 +2426,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
2178
2426
|
|
|
2179
2427
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
2180
2428
|
import katex from "katex";
|
|
2181
|
-
import { jsx as
|
|
2429
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2182
2430
|
var EquationNode = ({ node }) => {
|
|
2183
2431
|
const { equation, inline } = node;
|
|
2184
2432
|
let html = "";
|
|
@@ -2193,7 +2441,7 @@ var EquationNode = ({ node }) => {
|
|
|
2193
2441
|
});
|
|
2194
2442
|
}
|
|
2195
2443
|
if (inline) {
|
|
2196
|
-
return /* @__PURE__ */
|
|
2444
|
+
return /* @__PURE__ */ jsx41(
|
|
2197
2445
|
"span",
|
|
2198
2446
|
{
|
|
2199
2447
|
className: "katex-inline",
|
|
@@ -2201,7 +2449,7 @@ var EquationNode = ({ node }) => {
|
|
|
2201
2449
|
}
|
|
2202
2450
|
);
|
|
2203
2451
|
}
|
|
2204
|
-
return /* @__PURE__ */
|
|
2452
|
+
return /* @__PURE__ */ jsx41(
|
|
2205
2453
|
"div",
|
|
2206
2454
|
{
|
|
2207
2455
|
className: "katex-block my-3 text-center",
|
|
@@ -2212,7 +2460,7 @@ var EquationNode = ({ node }) => {
|
|
|
2212
2460
|
var EquationNode_default = EquationNode;
|
|
2213
2461
|
|
|
2214
2462
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
2215
|
-
import { jsx as
|
|
2463
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2216
2464
|
function getNestedProperty(obj, path) {
|
|
2217
2465
|
if (!obj || !path) return null;
|
|
2218
2466
|
if (path.includes(".")) {
|
|
@@ -2225,7 +2473,7 @@ function getNestedProperty(obj, path) {
|
|
|
2225
2473
|
}
|
|
2226
2474
|
const value = obj[path];
|
|
2227
2475
|
if (Array.isArray(value)) {
|
|
2228
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
2476
|
+
return value.map((item, index) => /* @__PURE__ */ jsx42("div", { children: String(item) }, index));
|
|
2229
2477
|
}
|
|
2230
2478
|
return value;
|
|
2231
2479
|
}
|
|
@@ -2286,7 +2534,7 @@ var DatafieldNode = (props) => {
|
|
|
2286
2534
|
const dataType = props.node.dataType;
|
|
2287
2535
|
if (isEmptyValue) return null;
|
|
2288
2536
|
if (dataType === "rawContent") {
|
|
2289
|
-
return /* @__PURE__ */
|
|
2537
|
+
return /* @__PURE__ */ jsx42(
|
|
2290
2538
|
PageBodyRenderer_default,
|
|
2291
2539
|
{
|
|
2292
2540
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -2302,12 +2550,12 @@ var DatafieldNode = (props) => {
|
|
|
2302
2550
|
}
|
|
2303
2551
|
);
|
|
2304
2552
|
}
|
|
2305
|
-
return /* @__PURE__ */
|
|
2553
|
+
return /* @__PURE__ */ jsx42(
|
|
2306
2554
|
"span",
|
|
2307
2555
|
{
|
|
2308
2556
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
2309
2557
|
style: styles,
|
|
2310
|
-
children: /* @__PURE__ */
|
|
2558
|
+
children: /* @__PURE__ */ jsx42(
|
|
2311
2559
|
ViewControl_default,
|
|
2312
2560
|
{
|
|
2313
2561
|
controlType: dataType,
|
|
@@ -2320,7 +2568,7 @@ var DatafieldNode = (props) => {
|
|
|
2320
2568
|
var DatafieldNode_default = DatafieldNode;
|
|
2321
2569
|
|
|
2322
2570
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2323
|
-
import { Fragment as Fragment4, jsx as
|
|
2571
|
+
import { Fragment as Fragment4, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2324
2572
|
var ParagraphNode = (props) => {
|
|
2325
2573
|
const NodeTypes2 = {
|
|
2326
2574
|
["text"]: TextNode_default,
|
|
@@ -2340,9 +2588,9 @@ var ParagraphNode = (props) => {
|
|
|
2340
2588
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
2341
2589
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
2342
2590
|
if (isInlineOnlyParent) {
|
|
2343
|
-
return /* @__PURE__ */
|
|
2591
|
+
return /* @__PURE__ */ jsx43(Fragment4, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2344
2592
|
const SelectedNode = NodeTypes2[node.type];
|
|
2345
|
-
return /* @__PURE__ */
|
|
2593
|
+
return /* @__PURE__ */ jsx43(React31.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx43(
|
|
2346
2594
|
SelectedNode,
|
|
2347
2595
|
{
|
|
2348
2596
|
node,
|
|
@@ -2354,10 +2602,10 @@ var ParagraphNode = (props) => {
|
|
|
2354
2602
|
) }, index);
|
|
2355
2603
|
}) });
|
|
2356
2604
|
}
|
|
2357
|
-
return /* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ jsxs25("div", { className: " " + formatClasses, children: [
|
|
2358
2606
|
hasChildren && props.node.children.map((node, index) => {
|
|
2359
2607
|
const SelectedNode = NodeTypes2[node.type];
|
|
2360
|
-
return /* @__PURE__ */
|
|
2608
|
+
return /* @__PURE__ */ jsx43(React31.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx43(
|
|
2361
2609
|
SelectedNode,
|
|
2362
2610
|
{
|
|
2363
2611
|
node,
|
|
@@ -2368,14 +2616,14 @@ var ParagraphNode = (props) => {
|
|
|
2368
2616
|
}
|
|
2369
2617
|
) }, index);
|
|
2370
2618
|
}),
|
|
2371
|
-
!hasChildren && /* @__PURE__ */
|
|
2619
|
+
!hasChildren && /* @__PURE__ */ jsx43("div", { className: "py-1.5 lg:py-2" })
|
|
2372
2620
|
] });
|
|
2373
2621
|
};
|
|
2374
2622
|
var ParagraphNode_default = ParagraphNode;
|
|
2375
2623
|
|
|
2376
2624
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2377
|
-
import
|
|
2378
|
-
import { Fragment as Fragment5, jsx as
|
|
2625
|
+
import React32 from "react";
|
|
2626
|
+
import { Fragment as Fragment5, jsx as jsx44 } from "react/jsx-runtime";
|
|
2379
2627
|
var HeadingNode = (props) => {
|
|
2380
2628
|
const NodeTypes2 = {
|
|
2381
2629
|
["text"]: TextNode_default,
|
|
@@ -2391,23 +2639,23 @@ var HeadingNode = (props) => {
|
|
|
2391
2639
|
{
|
|
2392
2640
|
}
|
|
2393
2641
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
2394
|
-
return /* @__PURE__ */
|
|
2642
|
+
return /* @__PURE__ */ jsx44(Fragment5, { children: React32.createElement(
|
|
2395
2643
|
HeadingTag,
|
|
2396
2644
|
{ className: formatClasses },
|
|
2397
2645
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2398
2646
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2399
|
-
return /* @__PURE__ */
|
|
2647
|
+
return /* @__PURE__ */ jsx44(React32.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2400
2648
|
})
|
|
2401
2649
|
) });
|
|
2402
2650
|
};
|
|
2403
2651
|
var HeadingNode_default = HeadingNode;
|
|
2404
2652
|
|
|
2405
2653
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2406
|
-
import
|
|
2654
|
+
import React34 from "react";
|
|
2407
2655
|
|
|
2408
2656
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2409
|
-
import
|
|
2410
|
-
import { jsx as
|
|
2657
|
+
import React33 from "react";
|
|
2658
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2411
2659
|
var ListItemNode = (props) => {
|
|
2412
2660
|
const NodeTypes2 = {
|
|
2413
2661
|
text: TextNode_default,
|
|
@@ -2424,66 +2672,66 @@ var ListItemNode = (props) => {
|
|
|
2424
2672
|
liStyle.fontSize = match[1].trim();
|
|
2425
2673
|
}
|
|
2426
2674
|
}
|
|
2427
|
-
return /* @__PURE__ */
|
|
2675
|
+
return /* @__PURE__ */ jsx45("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
2428
2676
|
const SelectedNode = NodeTypes2[node.type];
|
|
2429
2677
|
if (node.type === "linebreak") {
|
|
2430
2678
|
if (!foundFirstBreak) {
|
|
2431
2679
|
foundFirstBreak = true;
|
|
2432
|
-
return /* @__PURE__ */
|
|
2680
|
+
return /* @__PURE__ */ jsx45("div", {}, index);
|
|
2433
2681
|
} else {
|
|
2434
|
-
return /* @__PURE__ */
|
|
2682
|
+
return /* @__PURE__ */ jsx45("div", { className: "py-1 lg:py-2" }, index);
|
|
2435
2683
|
}
|
|
2436
2684
|
} else {
|
|
2437
2685
|
foundFirstBreak = false;
|
|
2438
|
-
return /* @__PURE__ */
|
|
2686
|
+
return /* @__PURE__ */ jsx45(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2439
2687
|
}
|
|
2440
2688
|
}) });
|
|
2441
2689
|
};
|
|
2442
2690
|
var ListItemNode_default = ListItemNode;
|
|
2443
2691
|
|
|
2444
2692
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2445
|
-
import { jsx as
|
|
2693
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2446
2694
|
var ListNode = (props) => {
|
|
2447
2695
|
const NodeTypes2 = {
|
|
2448
2696
|
listitem: ListItemNode_default
|
|
2449
2697
|
};
|
|
2450
|
-
return /* @__PURE__ */
|
|
2451
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
2698
|
+
return /* @__PURE__ */ jsxs26(React34.Fragment, { children: [
|
|
2699
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx46("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2452
2700
|
const SelectedNode = NodeTypes2[node.type];
|
|
2453
|
-
return /* @__PURE__ */
|
|
2701
|
+
return /* @__PURE__ */ jsx46(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2454
2702
|
}) }),
|
|
2455
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
2703
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx46("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2456
2704
|
const SelectedNode = NodeTypes2[node.type];
|
|
2457
|
-
return /* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ jsx46(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2458
2706
|
}) })
|
|
2459
2707
|
] });
|
|
2460
2708
|
};
|
|
2461
2709
|
var ListNode_default = ListNode;
|
|
2462
2710
|
|
|
2463
2711
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
2464
|
-
import
|
|
2465
|
-
import { jsx as
|
|
2712
|
+
import React35 from "react";
|
|
2713
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2466
2714
|
var QuoteNode = (props) => {
|
|
2467
2715
|
const NodeTypes2 = {
|
|
2468
2716
|
["text"]: TextNode_default,
|
|
2469
2717
|
["linebreak"]: LineBreakNode_default,
|
|
2470
2718
|
["link"]: LinkNode_default
|
|
2471
2719
|
};
|
|
2472
|
-
return /* @__PURE__ */
|
|
2720
|
+
return /* @__PURE__ */ jsx47("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2473
2721
|
const SelectedNode = NodeTypes2[node.type];
|
|
2474
|
-
return /* @__PURE__ */
|
|
2722
|
+
return /* @__PURE__ */ jsx47(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2475
2723
|
}) });
|
|
2476
2724
|
};
|
|
2477
2725
|
var QuoteNode_default = QuoteNode;
|
|
2478
2726
|
|
|
2479
2727
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2480
|
-
import
|
|
2728
|
+
import React36 from "react";
|
|
2481
2729
|
import dynamic3 from "next/dynamic";
|
|
2482
|
-
import { jsx as
|
|
2730
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2483
2731
|
var CopyButton = dynamic3(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
2484
2732
|
ssr: false,
|
|
2485
2733
|
// optional: fallback UI while loading
|
|
2486
|
-
loading: () => /* @__PURE__ */
|
|
2734
|
+
loading: () => /* @__PURE__ */ jsx48("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
2487
2735
|
});
|
|
2488
2736
|
var CodeNode = (props) => {
|
|
2489
2737
|
const NodeTypes2 = {
|
|
@@ -2497,14 +2745,14 @@ var CodeNode = (props) => {
|
|
|
2497
2745
|
if (node.type === "link") return node.text || node.url || "";
|
|
2498
2746
|
return "";
|
|
2499
2747
|
}).join("") ?? "";
|
|
2500
|
-
return /* @__PURE__ */
|
|
2501
|
-
/* @__PURE__ */
|
|
2502
|
-
/* @__PURE__ */
|
|
2503
|
-
/* @__PURE__ */
|
|
2748
|
+
return /* @__PURE__ */ jsxs27("div", { children: [
|
|
2749
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
2750
|
+
/* @__PURE__ */ jsx48("span", { children: "Code Snippet" }),
|
|
2751
|
+
/* @__PURE__ */ jsx48(CopyButton, { text: textContent })
|
|
2504
2752
|
] }),
|
|
2505
|
-
/* @__PURE__ */
|
|
2753
|
+
/* @__PURE__ */ jsx48("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) => {
|
|
2506
2754
|
const SelectedNode = NodeTypes2[node.type];
|
|
2507
|
-
return /* @__PURE__ */
|
|
2755
|
+
return /* @__PURE__ */ jsx48(React36.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(
|
|
2508
2756
|
SelectedNode,
|
|
2509
2757
|
{
|
|
2510
2758
|
node,
|
|
@@ -2519,15 +2767,15 @@ var CodeNode = (props) => {
|
|
|
2519
2767
|
var CodeNode_default = CodeNode;
|
|
2520
2768
|
|
|
2521
2769
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
2522
|
-
import { jsx as
|
|
2770
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2523
2771
|
var HorizontalRuleNode = () => {
|
|
2524
|
-
return /* @__PURE__ */
|
|
2772
|
+
return /* @__PURE__ */ jsx49("hr", {});
|
|
2525
2773
|
};
|
|
2526
2774
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
2527
2775
|
|
|
2528
2776
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
2529
|
-
import
|
|
2530
|
-
import { Fragment as Fragment6, jsx as
|
|
2777
|
+
import React37 from "react";
|
|
2778
|
+
import { Fragment as Fragment6, jsx as jsx50 } from "react/jsx-runtime";
|
|
2531
2779
|
var WidgetNode = (props) => {
|
|
2532
2780
|
const getWidgetParameters = () => {
|
|
2533
2781
|
const widgetInputParameters = {
|
|
@@ -2584,7 +2832,7 @@ var WidgetNode = (props) => {
|
|
|
2584
2832
|
};
|
|
2585
2833
|
const widgetCode = props.node?.widgetCode;
|
|
2586
2834
|
if (!widgetCode) {
|
|
2587
|
-
return /* @__PURE__ */
|
|
2835
|
+
return /* @__PURE__ */ jsx50(Fragment6, { children: "Invalid widget" });
|
|
2588
2836
|
}
|
|
2589
2837
|
const widgetParams = getWidgetParameters();
|
|
2590
2838
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -2593,7 +2841,7 @@ var WidgetNode = (props) => {
|
|
|
2593
2841
|
}
|
|
2594
2842
|
return (
|
|
2595
2843
|
// eslint-disable-next-line react-hooks/static-components
|
|
2596
|
-
/* @__PURE__ */
|
|
2844
|
+
/* @__PURE__ */ jsx50(React37.Fragment, { children: /* @__PURE__ */ jsx50(
|
|
2597
2845
|
WidgetRenderer,
|
|
2598
2846
|
{
|
|
2599
2847
|
params: widgetParams,
|
|
@@ -2610,12 +2858,12 @@ var WidgetNode = (props) => {
|
|
|
2610
2858
|
var WidgetNode_default = WidgetNode;
|
|
2611
2859
|
|
|
2612
2860
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
2613
|
-
import
|
|
2861
|
+
import React38, { useRef as useRef3, useReducer, useCallback as useCallback2, useEffect as useEffect7 } from "react";
|
|
2614
2862
|
|
|
2615
2863
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
2616
|
-
import { jsx as
|
|
2864
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2617
2865
|
var InputControlNode = (props) => {
|
|
2618
|
-
return /* @__PURE__ */
|
|
2866
|
+
return /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsx51(
|
|
2619
2867
|
InputControl_default,
|
|
2620
2868
|
{
|
|
2621
2869
|
name: props.node.name,
|
|
@@ -2688,7 +2936,7 @@ function FormReducer(state, action) {
|
|
|
2688
2936
|
var FormReducer_default = FormReducer;
|
|
2689
2937
|
|
|
2690
2938
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
2691
|
-
import { jsx as
|
|
2939
|
+
import { jsx as jsx52, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2692
2940
|
var FormContainerNode = (props) => {
|
|
2693
2941
|
const NodeTypes2 = {
|
|
2694
2942
|
["input-control"]: InputControlNode_default
|
|
@@ -2703,7 +2951,7 @@ var FormContainerNode = (props) => {
|
|
|
2703
2951
|
const handleInputChange = useCallback2((updatedValues) => {
|
|
2704
2952
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
2705
2953
|
}, [dispatch]);
|
|
2706
|
-
|
|
2954
|
+
useEffect7(() => {
|
|
2707
2955
|
const fetchInitialData = async () => {
|
|
2708
2956
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
2709
2957
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -2718,12 +2966,12 @@ var FormContainerNode = (props) => {
|
|
|
2718
2966
|
};
|
|
2719
2967
|
fetchInitialData();
|
|
2720
2968
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
2721
|
-
return /* @__PURE__ */
|
|
2969
|
+
return /* @__PURE__ */ jsxs28("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
2722
2970
|
node.children && node.children.map((node2, index) => {
|
|
2723
2971
|
{
|
|
2724
2972
|
}
|
|
2725
2973
|
const SelectedNode = NodeTypes2[node2.type];
|
|
2726
|
-
return /* @__PURE__ */
|
|
2974
|
+
return /* @__PURE__ */ jsx52(React38.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx52(
|
|
2727
2975
|
InputControlNode_default,
|
|
2728
2976
|
{
|
|
2729
2977
|
value: formState.inputValues[node2.name],
|
|
@@ -2732,17 +2980,17 @@ var FormContainerNode = (props) => {
|
|
|
2732
2980
|
}
|
|
2733
2981
|
) }, index);
|
|
2734
2982
|
}),
|
|
2735
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
2983
|
+
node.children.length == 0 && /* @__PURE__ */ jsx52("div", { className: "py-0.5 lg:py-1.5" })
|
|
2736
2984
|
] });
|
|
2737
2985
|
};
|
|
2738
2986
|
var FormContainerNode_default = FormContainerNode;
|
|
2739
2987
|
|
|
2740
2988
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2741
|
-
import
|
|
2989
|
+
import React41 from "react";
|
|
2742
2990
|
|
|
2743
2991
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
2744
2992
|
import dynamic4 from "next/dynamic";
|
|
2745
|
-
import { jsx as
|
|
2993
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2746
2994
|
var IframeClient = dynamic4(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
2747
2995
|
ssr: false
|
|
2748
2996
|
});
|
|
@@ -2755,13 +3003,13 @@ var EmbedNode = (props) => {
|
|
|
2755
3003
|
} else {
|
|
2756
3004
|
src = props.node.embedSrc;
|
|
2757
3005
|
}
|
|
2758
|
-
return /* @__PURE__ */
|
|
3006
|
+
return /* @__PURE__ */ jsx53("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx53(IframeClient, { src }) });
|
|
2759
3007
|
};
|
|
2760
3008
|
var EmbedNode_default = EmbedNode;
|
|
2761
3009
|
|
|
2762
3010
|
// src/components/Slider.tsx
|
|
2763
|
-
import
|
|
2764
|
-
import { Fragment as Fragment7, jsx as
|
|
3011
|
+
import React39, { useState as useState5, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3012
|
+
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2765
3013
|
var Slider = ({
|
|
2766
3014
|
children,
|
|
2767
3015
|
slidesToShow = 4,
|
|
@@ -2785,7 +3033,7 @@ var Slider = ({
|
|
|
2785
3033
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
2786
3034
|
);
|
|
2787
3035
|
const [isPlaying, setIsPlaying] = useState5(autoplay);
|
|
2788
|
-
|
|
3036
|
+
useEffect8(() => {
|
|
2789
3037
|
if (typeof slidesToShow === "number") return;
|
|
2790
3038
|
const handleResize = () => {
|
|
2791
3039
|
if (window.innerWidth >= 1024) {
|
|
@@ -2800,7 +3048,7 @@ var Slider = ({
|
|
|
2800
3048
|
window.addEventListener("resize", handleResize);
|
|
2801
3049
|
return () => window.removeEventListener("resize", handleResize);
|
|
2802
3050
|
}, [slidesToShow]);
|
|
2803
|
-
|
|
3051
|
+
useEffect8(() => {
|
|
2804
3052
|
if (!autoplay) return;
|
|
2805
3053
|
const timer = setInterval(() => {
|
|
2806
3054
|
if (isPlaying) {
|
|
@@ -2855,10 +3103,10 @@ var Slider = ({
|
|
|
2855
3103
|
};
|
|
2856
3104
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
2857
3105
|
const slides = Children.map(children, (child, index) => {
|
|
2858
|
-
if (!
|
|
3106
|
+
if (!React39.isValidElement(child)) return null;
|
|
2859
3107
|
const childProps = child.props;
|
|
2860
3108
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
2861
|
-
return /* @__PURE__ */
|
|
3109
|
+
return /* @__PURE__ */ jsx54(
|
|
2862
3110
|
"div",
|
|
2863
3111
|
{
|
|
2864
3112
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -2881,14 +3129,14 @@ var Slider = ({
|
|
|
2881
3129
|
return "bottom-4";
|
|
2882
3130
|
}
|
|
2883
3131
|
};
|
|
2884
|
-
return /* @__PURE__ */
|
|
3132
|
+
return /* @__PURE__ */ jsxs29(
|
|
2885
3133
|
"div",
|
|
2886
3134
|
{
|
|
2887
3135
|
className: `relative w-full overflow-hidden ${className}`,
|
|
2888
3136
|
onMouseEnter: handleMouseEnter,
|
|
2889
3137
|
onMouseLeave: handleMouseLeave,
|
|
2890
3138
|
children: [
|
|
2891
|
-
/* @__PURE__ */
|
|
3139
|
+
/* @__PURE__ */ jsx54(
|
|
2892
3140
|
"div",
|
|
2893
3141
|
{
|
|
2894
3142
|
className: "flex h-full",
|
|
@@ -2899,18 +3147,18 @@ var Slider = ({
|
|
|
2899
3147
|
children: slides
|
|
2900
3148
|
}
|
|
2901
3149
|
),
|
|
2902
|
-
show_arrows && /* @__PURE__ */
|
|
2903
|
-
/* @__PURE__ */
|
|
3150
|
+
show_arrows && /* @__PURE__ */ jsxs29(Fragment7, { children: [
|
|
3151
|
+
/* @__PURE__ */ jsx54(
|
|
2904
3152
|
ArrowButton,
|
|
2905
3153
|
{
|
|
2906
3154
|
direction: "left",
|
|
2907
3155
|
onClick: prevSlide,
|
|
2908
3156
|
visible: infinite_scroll || currentSlide > 0,
|
|
2909
3157
|
className: arrowClassName,
|
|
2910
|
-
children: /* @__PURE__ */
|
|
3158
|
+
children: /* @__PURE__ */ jsx54("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__ */ jsx54("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
2911
3159
|
}
|
|
2912
3160
|
),
|
|
2913
|
-
/* @__PURE__ */
|
|
3161
|
+
/* @__PURE__ */ jsxs29(
|
|
2914
3162
|
ArrowButton,
|
|
2915
3163
|
{
|
|
2916
3164
|
direction: "right",
|
|
@@ -2918,13 +3166,13 @@ var Slider = ({
|
|
|
2918
3166
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
2919
3167
|
className: arrowClassName,
|
|
2920
3168
|
children: [
|
|
2921
|
-
/* @__PURE__ */
|
|
3169
|
+
/* @__PURE__ */ jsx54("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__ */ jsx54("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
2922
3170
|
" "
|
|
2923
3171
|
]
|
|
2924
3172
|
}
|
|
2925
3173
|
)
|
|
2926
3174
|
] }),
|
|
2927
|
-
show_dots && /* @__PURE__ */
|
|
3175
|
+
show_dots && /* @__PURE__ */ jsx54("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ jsx54(
|
|
2928
3176
|
ProgressPill,
|
|
2929
3177
|
{
|
|
2930
3178
|
active: index === currentSlide,
|
|
@@ -2950,7 +3198,7 @@ var ArrowButton = ({
|
|
|
2950
3198
|
visible,
|
|
2951
3199
|
children,
|
|
2952
3200
|
className = ""
|
|
2953
|
-
}) => /* @__PURE__ */
|
|
3201
|
+
}) => /* @__PURE__ */ jsx54(
|
|
2954
3202
|
"button",
|
|
2955
3203
|
{
|
|
2956
3204
|
className: `
|
|
@@ -2977,12 +3225,12 @@ var ProgressPill = ({
|
|
|
2977
3225
|
totalSlides
|
|
2978
3226
|
}) => {
|
|
2979
3227
|
const [progress, setProgress] = useState5(0);
|
|
2980
|
-
|
|
3228
|
+
useEffect8(() => {
|
|
2981
3229
|
if (active) {
|
|
2982
3230
|
setProgress(0);
|
|
2983
3231
|
}
|
|
2984
3232
|
}, [active, index]);
|
|
2985
|
-
|
|
3233
|
+
useEffect8(() => {
|
|
2986
3234
|
if (!active || !isPlaying) {
|
|
2987
3235
|
if (!active) {
|
|
2988
3236
|
setProgress(0);
|
|
@@ -3037,7 +3285,7 @@ var ProgressPill = ({
|
|
|
3037
3285
|
const renderProgressBar = () => {
|
|
3038
3286
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3039
3287
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3040
|
-
return /* @__PURE__ */
|
|
3288
|
+
return /* @__PURE__ */ jsx54(
|
|
3041
3289
|
"div",
|
|
3042
3290
|
{
|
|
3043
3291
|
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`,
|
|
@@ -3049,7 +3297,7 @@ var ProgressPill = ({
|
|
|
3049
3297
|
};
|
|
3050
3298
|
const renderCumulativeFill = () => {
|
|
3051
3299
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
3052
|
-
return /* @__PURE__ */
|
|
3300
|
+
return /* @__PURE__ */ jsx54(
|
|
3053
3301
|
"div",
|
|
3054
3302
|
{
|
|
3055
3303
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -3059,7 +3307,7 @@ var ProgressPill = ({
|
|
|
3059
3307
|
}
|
|
3060
3308
|
return null;
|
|
3061
3309
|
};
|
|
3062
|
-
return /* @__PURE__ */
|
|
3310
|
+
return /* @__PURE__ */ jsxs29(
|
|
3063
3311
|
"button",
|
|
3064
3312
|
{
|
|
3065
3313
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -3385,14 +3633,22 @@ var PathUtility = class {
|
|
|
3385
3633
|
const segments = path.split("/").filter(Boolean);
|
|
3386
3634
|
return segments.length > 0 ? segments[0] : "";
|
|
3387
3635
|
}
|
|
3636
|
+
getFileNameFromUrl(url) {
|
|
3637
|
+
if (!url || url.indexOf("/") === -1) {
|
|
3638
|
+
return url;
|
|
3639
|
+
}
|
|
3640
|
+
const parts = url.split("/");
|
|
3641
|
+
const filename = parts[parts.length - 1];
|
|
3642
|
+
return filename;
|
|
3643
|
+
}
|
|
3388
3644
|
};
|
|
3389
3645
|
var PathUtility_default = new PathUtility();
|
|
3390
3646
|
|
|
3391
3647
|
// src/components/NoDataFound.tsx
|
|
3392
|
-
import { jsx as
|
|
3648
|
+
import { jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3393
3649
|
var NoDataFound = () => {
|
|
3394
|
-
return /* @__PURE__ */
|
|
3395
|
-
/* @__PURE__ */
|
|
3650
|
+
return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
3651
|
+
/* @__PURE__ */ jsx55("div", { className: "mb-5", children: /* @__PURE__ */ jsx55("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx55(
|
|
3396
3652
|
"svg",
|
|
3397
3653
|
{
|
|
3398
3654
|
className: "w-10 h-10",
|
|
@@ -3400,7 +3656,7 @@ var NoDataFound = () => {
|
|
|
3400
3656
|
stroke: "currentColor",
|
|
3401
3657
|
viewBox: "0 0 24 24",
|
|
3402
3658
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3403
|
-
children: /* @__PURE__ */
|
|
3659
|
+
children: /* @__PURE__ */ jsx55(
|
|
3404
3660
|
"path",
|
|
3405
3661
|
{
|
|
3406
3662
|
strokeLinecap: "round",
|
|
@@ -3411,66 +3667,15 @@ var NoDataFound = () => {
|
|
|
3411
3667
|
)
|
|
3412
3668
|
}
|
|
3413
3669
|
) }) }),
|
|
3414
|
-
/* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ jsx55("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
3671
|
+
/* @__PURE__ */ jsx55("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
3416
3672
|
] });
|
|
3417
3673
|
};
|
|
3418
3674
|
var NoDataFound_default = NoDataFound;
|
|
3419
3675
|
|
|
3420
3676
|
// src/components/Pagination.tsx
|
|
3421
3677
|
import { useMemo } from "react";
|
|
3422
|
-
|
|
3423
|
-
// src/svg/chevron-updown.tsx
|
|
3424
|
-
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
3425
|
-
var ChevronUpDown = (props) => {
|
|
3426
|
-
return /* @__PURE__ */ jsx50("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx50("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
3427
|
-
};
|
|
3428
|
-
var chevron_updown_default = ChevronUpDown;
|
|
3429
|
-
|
|
3430
|
-
// src/svg/chevron-down.tsx
|
|
3431
|
-
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
3432
|
-
var ChevronDown = (props) => {
|
|
3433
|
-
return /* @__PURE__ */ jsx51("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx51("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
3434
|
-
};
|
|
3435
|
-
var chevron_down_default = ChevronDown;
|
|
3436
|
-
|
|
3437
|
-
// src/svg/chevron-up.tsx
|
|
3438
|
-
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
3439
|
-
var ChevronUp = (props) => {
|
|
3440
|
-
return /* @__PURE__ */ jsx52("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx52("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
3441
|
-
};
|
|
3442
|
-
var chevron_up_default = ChevronUp;
|
|
3443
|
-
|
|
3444
|
-
// src/svg/plus.tsx
|
|
3445
|
-
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
3446
|
-
var Plus = (props) => {
|
|
3447
|
-
return /* @__PURE__ */ jsx53("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx53("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
3448
|
-
};
|
|
3449
|
-
var plus_default = Plus;
|
|
3450
|
-
|
|
3451
|
-
// src/svg/Icons.tsx
|
|
3452
|
-
var Icons = {
|
|
3453
|
-
chevronUpDown: chevron_updown_default,
|
|
3454
|
-
chevronDown: chevron_down_default,
|
|
3455
|
-
chevronUp: chevron_up_default,
|
|
3456
|
-
plus: plus_default
|
|
3457
|
-
};
|
|
3458
|
-
var Icons_default = Icons;
|
|
3459
|
-
|
|
3460
|
-
// src/svg/Icon.tsx
|
|
3461
|
-
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3462
|
-
var Icon = ({ name, className, ...props }) => {
|
|
3463
|
-
const IconComponent = Icons_default[name];
|
|
3464
|
-
if (!IconComponent) {
|
|
3465
|
-
console.error(`Icon "${name}" not found.`);
|
|
3466
|
-
return null;
|
|
3467
|
-
}
|
|
3468
|
-
return /* @__PURE__ */ jsx54(IconComponent, { ...props, className });
|
|
3469
|
-
};
|
|
3470
|
-
var Icon_default = Icon;
|
|
3471
|
-
|
|
3472
|
-
// src/components/Pagination.tsx
|
|
3473
|
-
import { jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3678
|
+
import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3474
3679
|
var Pagination = (props) => {
|
|
3475
3680
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3476
3681
|
const builder = useMemo(() => {
|
|
@@ -3514,7 +3719,7 @@ var Pagination = (props) => {
|
|
|
3514
3719
|
return range;
|
|
3515
3720
|
};
|
|
3516
3721
|
const paginationRange = getPaginationRange();
|
|
3517
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
3722
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx56(
|
|
3518
3723
|
Hyperlink,
|
|
3519
3724
|
{
|
|
3520
3725
|
linkType: "Link" /* Link */,
|
|
@@ -3529,9 +3734,9 @@ var Pagination = (props) => {
|
|
|
3529
3734
|
);
|
|
3530
3735
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
3531
3736
|
if (disabled) {
|
|
3532
|
-
return /* @__PURE__ */
|
|
3737
|
+
return /* @__PURE__ */ jsx56("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 });
|
|
3533
3738
|
}
|
|
3534
|
-
return /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ jsx56(
|
|
3535
3740
|
Hyperlink,
|
|
3536
3741
|
{
|
|
3537
3742
|
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",
|
|
@@ -3541,35 +3746,35 @@ var Pagination = (props) => {
|
|
|
3541
3746
|
);
|
|
3542
3747
|
};
|
|
3543
3748
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
3544
|
-
return /* @__PURE__ */
|
|
3545
|
-
/* @__PURE__ */
|
|
3546
|
-
/* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ jsxs31("div", { className: "py-6 border-t bg-default", children: [
|
|
3750
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
3751
|
+
/* @__PURE__ */ jsxs31("div", { className: "text-sm", children: [
|
|
3547
3752
|
"Showing ",
|
|
3548
|
-
/* @__PURE__ */
|
|
3753
|
+
/* @__PURE__ */ jsxs31("span", { className: "font-semibold", children: [
|
|
3549
3754
|
startItem,
|
|
3550
3755
|
"-",
|
|
3551
3756
|
endItem
|
|
3552
3757
|
] }),
|
|
3553
3758
|
" ",
|
|
3554
3759
|
"out of ",
|
|
3555
|
-
/* @__PURE__ */
|
|
3760
|
+
/* @__PURE__ */ jsx56("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
3556
3761
|
" results"
|
|
3557
3762
|
] }),
|
|
3558
|
-
totalPages > 1 && /* @__PURE__ */
|
|
3559
|
-
/* @__PURE__ */
|
|
3763
|
+
totalPages > 1 && /* @__PURE__ */ jsxs31("div", { className: "flex items-center space-x-1", children: [
|
|
3764
|
+
/* @__PURE__ */ jsxs31(
|
|
3560
3765
|
NavigationButton,
|
|
3561
3766
|
{
|
|
3562
3767
|
page: activePageNumber - 1,
|
|
3563
3768
|
disabled: activePageNumber === 1,
|
|
3564
3769
|
children: [
|
|
3565
|
-
/* @__PURE__ */
|
|
3566
|
-
/* @__PURE__ */
|
|
3770
|
+
/* @__PURE__ */ jsx56("span", { children: /* @__PURE__ */ jsx56(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
3771
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "Prev" })
|
|
3567
3772
|
]
|
|
3568
3773
|
}
|
|
3569
3774
|
),
|
|
3570
3775
|
paginationRange.map((item, index) => {
|
|
3571
3776
|
if (item === "...") {
|
|
3572
|
-
return /* @__PURE__ */
|
|
3777
|
+
return /* @__PURE__ */ jsx56(
|
|
3573
3778
|
"span",
|
|
3574
3779
|
{
|
|
3575
3780
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -3579,23 +3784,23 @@ var Pagination = (props) => {
|
|
|
3579
3784
|
);
|
|
3580
3785
|
}
|
|
3581
3786
|
const page = item;
|
|
3582
|
-
return /* @__PURE__ */
|
|
3787
|
+
return /* @__PURE__ */ jsx56(PageButton, { page, children: page }, page);
|
|
3583
3788
|
}),
|
|
3584
|
-
/* @__PURE__ */
|
|
3789
|
+
/* @__PURE__ */ jsxs31(
|
|
3585
3790
|
NavigationButton,
|
|
3586
3791
|
{
|
|
3587
3792
|
page: activePageNumber + 1,
|
|
3588
3793
|
disabled: activePageNumber === totalPages,
|
|
3589
3794
|
children: [
|
|
3590
|
-
/* @__PURE__ */
|
|
3591
|
-
/* @__PURE__ */
|
|
3795
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "Next" }),
|
|
3796
|
+
/* @__PURE__ */ jsx56("span", { children: /* @__PURE__ */ jsx56(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
3592
3797
|
]
|
|
3593
3798
|
}
|
|
3594
3799
|
)
|
|
3595
3800
|
] }),
|
|
3596
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
3597
|
-
/* @__PURE__ */
|
|
3598
|
-
/* @__PURE__ */
|
|
3801
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs31("div", { className: "flex items-center space-x-2", children: [
|
|
3802
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "Go to:" }),
|
|
3803
|
+
/* @__PURE__ */ jsx56("div", { className: "relative", children: /* @__PURE__ */ jsx56(
|
|
3599
3804
|
"input",
|
|
3600
3805
|
{
|
|
3601
3806
|
type: "number",
|
|
@@ -3616,9 +3821,9 @@ var Pagination = (props) => {
|
|
|
3616
3821
|
) })
|
|
3617
3822
|
] })
|
|
3618
3823
|
] }),
|
|
3619
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
/* @__PURE__ */
|
|
3824
|
+
showPageSizeSelector && /* @__PURE__ */ jsx56("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
3825
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "Show:" }),
|
|
3826
|
+
/* @__PURE__ */ jsx56("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx56(
|
|
3622
3827
|
Hyperlink,
|
|
3623
3828
|
{
|
|
3624
3829
|
className: `
|
|
@@ -3630,7 +3835,7 @@ var Pagination = (props) => {
|
|
|
3630
3835
|
},
|
|
3631
3836
|
size
|
|
3632
3837
|
)) }),
|
|
3633
|
-
/* @__PURE__ */
|
|
3838
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "per page" })
|
|
3634
3839
|
] }) })
|
|
3635
3840
|
] });
|
|
3636
3841
|
};
|
|
@@ -3638,7 +3843,7 @@ var Pagination_default = Pagination;
|
|
|
3638
3843
|
|
|
3639
3844
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
3640
3845
|
import dynamic5 from "next/dynamic";
|
|
3641
|
-
import { Fragment as Fragment8, jsx as
|
|
3846
|
+
import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3642
3847
|
var HlsPlayer2 = dynamic5(() => import("./HlsPlayer-GV3FOPYT.mjs"), { ssr: false });
|
|
3643
3848
|
var deviceToMediaQuery = (device) => {
|
|
3644
3849
|
switch (device) {
|
|
@@ -3707,8 +3912,8 @@ var ImageGalleryNode = (props) => {
|
|
|
3707
3912
|
right: "justify-end"
|
|
3708
3913
|
};
|
|
3709
3914
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
3710
|
-
return /* @__PURE__ */
|
|
3711
|
-
hlsSources.length > 0 && /* @__PURE__ */
|
|
3915
|
+
return /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
3916
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx57(Fragment8, { children: /* @__PURE__ */ jsx57(
|
|
3712
3917
|
HlsPlayer2,
|
|
3713
3918
|
{
|
|
3714
3919
|
sources: hlsSources,
|
|
@@ -3722,14 +3927,14 @@ var ImageGalleryNode = (props) => {
|
|
|
3722
3927
|
session: props.session
|
|
3723
3928
|
}
|
|
3724
3929
|
) }),
|
|
3725
|
-
staticFallback && /* @__PURE__ */
|
|
3930
|
+
staticFallback && /* @__PURE__ */ jsx57(Fragment8, { children: /* @__PURE__ */ jsxs32("picture", { children: [
|
|
3726
3931
|
DEVICE_ORDER.map((deviceKey) => {
|
|
3727
3932
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
3728
3933
|
if (!match) return null;
|
|
3729
3934
|
const srcUrl = resolveImageUrl(match.imageUrl);
|
|
3730
3935
|
if (!srcUrl) return null;
|
|
3731
3936
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
3732
|
-
return /* @__PURE__ */
|
|
3937
|
+
return /* @__PURE__ */ jsx57(
|
|
3733
3938
|
"source",
|
|
3734
3939
|
{
|
|
3735
3940
|
media: mediaQuery,
|
|
@@ -3753,7 +3958,7 @@ var ImageGalleryNode = (props) => {
|
|
|
3753
3958
|
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
3754
3959
|
return (
|
|
3755
3960
|
// eslint-disable-next-line @next/next/no-img-element
|
|
3756
|
-
/* @__PURE__ */
|
|
3961
|
+
/* @__PURE__ */ jsx57(
|
|
3757
3962
|
"img",
|
|
3758
3963
|
{
|
|
3759
3964
|
loading: "lazy",
|
|
@@ -3774,7 +3979,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
3774
3979
|
|
|
3775
3980
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3776
3981
|
import Link2 from "next/link";
|
|
3777
|
-
import { jsx as
|
|
3982
|
+
import { jsx as jsx58, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3778
3983
|
function toCamelCase(str) {
|
|
3779
3984
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
3780
3985
|
}
|
|
@@ -3979,7 +4184,7 @@ var DivContainer = async (props) => {
|
|
|
3979
4184
|
response = await serviceClient.get(endpoint);
|
|
3980
4185
|
result = response?.result;
|
|
3981
4186
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
3982
|
-
return /* @__PURE__ */
|
|
4187
|
+
return /* @__PURE__ */ jsx58(NoDataFound_default, {});
|
|
3983
4188
|
}
|
|
3984
4189
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
3985
4190
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -3996,7 +4201,7 @@ var DivContainer = async (props) => {
|
|
|
3996
4201
|
}
|
|
3997
4202
|
const SelectedNode = NodeTypes2[node.type];
|
|
3998
4203
|
if (!SelectedNode) return null;
|
|
3999
|
-
return /* @__PURE__ */
|
|
4204
|
+
return /* @__PURE__ */ jsx58(React41.Fragment, { children: /* @__PURE__ */ jsx58(
|
|
4000
4205
|
SelectedNode,
|
|
4001
4206
|
{
|
|
4002
4207
|
node,
|
|
@@ -4098,9 +4303,9 @@ var DivContainer = async (props) => {
|
|
|
4098
4303
|
props.node.autoFormat && "auto-format",
|
|
4099
4304
|
props.node.bgClass
|
|
4100
4305
|
].filter(Boolean).join(" ");
|
|
4101
|
-
return /* @__PURE__ */
|
|
4102
|
-
/* @__PURE__ */
|
|
4103
|
-
/* @__PURE__ */
|
|
4306
|
+
return /* @__PURE__ */ jsxs33(React41.Fragment, { children: [
|
|
4307
|
+
/* @__PURE__ */ jsx58("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4308
|
+
/* @__PURE__ */ jsx58(React41.Fragment, { children: /* @__PURE__ */ jsx58(
|
|
4104
4309
|
Wrapper,
|
|
4105
4310
|
{
|
|
4106
4311
|
id: guid,
|
|
@@ -4109,18 +4314,18 @@ var DivContainer = async (props) => {
|
|
|
4109
4314
|
...wrapperProps,
|
|
4110
4315
|
children: dataToRender.map(
|
|
4111
4316
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4112
|
-
(child, i) => /* @__PURE__ */
|
|
4317
|
+
(child, i) => /* @__PURE__ */ jsx58(React41.Fragment, { children: child }, i)
|
|
4113
4318
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4114
4319
|
)
|
|
4115
4320
|
}
|
|
4116
4321
|
) }),
|
|
4117
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4322
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx58("div", { children: /* @__PURE__ */ jsx58(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4118
4323
|
] });
|
|
4119
4324
|
};
|
|
4120
4325
|
var DivContainer_default = DivContainer;
|
|
4121
4326
|
|
|
4122
4327
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4123
|
-
import { jsx as
|
|
4328
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
4124
4329
|
var NodeTypes = {
|
|
4125
4330
|
["paragraph"]: ParagraphNode_default,
|
|
4126
4331
|
["heading"]: HeadingNode_default,
|
|
@@ -4148,11 +4353,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4148
4353
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4149
4354
|
rootNode = pageBodyTree.root;
|
|
4150
4355
|
}
|
|
4151
|
-
return /* @__PURE__ */
|
|
4356
|
+
return /* @__PURE__ */ jsx59(React42.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4152
4357
|
{
|
|
4153
4358
|
}
|
|
4154
4359
|
const SelectedNode = NodeTypes[node.type];
|
|
4155
|
-
return /* @__PURE__ */
|
|
4360
|
+
return /* @__PURE__ */ jsx59(React42.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx59(React42.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx59(React42.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4156
4361
|
SelectedNode,
|
|
4157
4362
|
{
|
|
4158
4363
|
node,
|
|
@@ -4168,7 +4373,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4168
4373
|
device: props.device,
|
|
4169
4374
|
widgetRenderer: props.widgetRenderer
|
|
4170
4375
|
}
|
|
4171
|
-
) }) : /* @__PURE__ */
|
|
4376
|
+
) }) : /* @__PURE__ */ jsx59(React42.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4172
4377
|
SelectedNode,
|
|
4173
4378
|
{
|
|
4174
4379
|
node,
|
|
@@ -4190,7 +4395,7 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
4190
4395
|
|
|
4191
4396
|
// src/components/Toast.tsx
|
|
4192
4397
|
import { useState as useState7 } from "react";
|
|
4193
|
-
import { Fragment as Fragment9, jsx as
|
|
4398
|
+
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4194
4399
|
var Toast = () => {
|
|
4195
4400
|
const [showToast, setShowToast] = useState7(false);
|
|
4196
4401
|
const [message, setMessage] = useState7("");
|
|
@@ -4233,8 +4438,8 @@ var Toast = () => {
|
|
|
4233
4438
|
const closeToast = () => {
|
|
4234
4439
|
setShowToast(false);
|
|
4235
4440
|
};
|
|
4236
|
-
return /* @__PURE__ */
|
|
4237
|
-
/* @__PURE__ */
|
|
4441
|
+
return /* @__PURE__ */ jsx60(Fragment9, { children: showToast && /* @__PURE__ */ jsx60("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ jsxs34("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
4442
|
+
/* @__PURE__ */ jsx60(
|
|
4238
4443
|
"span",
|
|
4239
4444
|
{
|
|
4240
4445
|
className: "font-medium text-inherit text-sm",
|
|
@@ -4242,7 +4447,7 @@ var Toast = () => {
|
|
|
4242
4447
|
children: message
|
|
4243
4448
|
}
|
|
4244
4449
|
),
|
|
4245
|
-
/* @__PURE__ */
|
|
4450
|
+
/* @__PURE__ */ jsx60("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx60(
|
|
4246
4451
|
"svg",
|
|
4247
4452
|
{
|
|
4248
4453
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4250,7 +4455,7 @@ var Toast = () => {
|
|
|
4250
4455
|
fill: "none",
|
|
4251
4456
|
viewBox: "0 0 24 24",
|
|
4252
4457
|
stroke: "currentColor",
|
|
4253
|
-
children: /* @__PURE__ */
|
|
4458
|
+
children: /* @__PURE__ */ jsx60("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
4254
4459
|
}
|
|
4255
4460
|
) })
|
|
4256
4461
|
] }) }) });
|
|
@@ -4260,7 +4465,7 @@ var Toast_default = Toast;
|
|
|
4260
4465
|
// src/components/NavigationTabsV2.tsx
|
|
4261
4466
|
import Link3 from "next/link";
|
|
4262
4467
|
import { usePathname } from "next/navigation";
|
|
4263
|
-
import { jsx as
|
|
4468
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
4264
4469
|
function resolveRoutePlaceholders(route, params) {
|
|
4265
4470
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
4266
4471
|
const value = params[key];
|
|
@@ -4285,8 +4490,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4285
4490
|
isActive: tab.isActive
|
|
4286
4491
|
})) || [];
|
|
4287
4492
|
if (mappedTabs.length === 0) return null;
|
|
4288
|
-
return /* @__PURE__ */
|
|
4289
|
-
return /* @__PURE__ */
|
|
4493
|
+
return /* @__PURE__ */ jsx61("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
4494
|
+
return /* @__PURE__ */ jsx61(Link3, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx61(
|
|
4290
4495
|
"div",
|
|
4291
4496
|
{
|
|
4292
4497
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -4299,51 +4504,51 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4299
4504
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
4300
4505
|
|
|
4301
4506
|
// src/components/dataForm/DataList.tsx
|
|
4302
|
-
import
|
|
4507
|
+
import React46, { useEffect as useEffect9, useState as useState8, useCallback as useCallback3, useReducer as useReducer2 } from "react";
|
|
4303
4508
|
import { useRouter } from "next/navigation";
|
|
4304
4509
|
|
|
4305
4510
|
// src/components/dataForm/NoContentView.tsx
|
|
4306
|
-
import
|
|
4307
|
-
import { jsx as
|
|
4511
|
+
import React44 from "react";
|
|
4512
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4308
4513
|
var NoContentView = (props) => {
|
|
4309
|
-
return /* @__PURE__ */
|
|
4514
|
+
return /* @__PURE__ */ jsx62(React44.Fragment, { children: props.isDataFound === false && props.children });
|
|
4310
4515
|
};
|
|
4311
4516
|
var NoContentView_default = NoContentView;
|
|
4312
4517
|
|
|
4313
4518
|
// src/components/dataForm/ContentView.tsx
|
|
4314
|
-
import
|
|
4315
|
-
import { jsx as
|
|
4519
|
+
import React45 from "react";
|
|
4520
|
+
import { jsx as jsx63, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4316
4521
|
var ContentView = (props) => {
|
|
4317
|
-
return /* @__PURE__ */
|
|
4318
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
4319
|
-
/* @__PURE__ */
|
|
4320
|
-
/* @__PURE__ */
|
|
4321
|
-
/* @__PURE__ */
|
|
4322
|
-
/* @__PURE__ */
|
|
4323
|
-
/* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsxs35(React45.Fragment, { children: [
|
|
4523
|
+
props.isDataFound == null && /* @__PURE__ */ jsx63("div", { className: "", children: /* @__PURE__ */ jsxs35("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
4524
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center mb-4", children: [
|
|
4525
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
4526
|
+
/* @__PURE__ */ jsxs35("div", { className: "ml-2", children: [
|
|
4527
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
4528
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
4324
4529
|
] })
|
|
4325
4530
|
] }),
|
|
4326
|
-
/* @__PURE__ */
|
|
4327
|
-
/* @__PURE__ */
|
|
4328
|
-
/* @__PURE__ */
|
|
4329
|
-
/* @__PURE__ */
|
|
4330
|
-
/* @__PURE__ */
|
|
4331
|
-
/* @__PURE__ */
|
|
4332
|
-
/* @__PURE__ */
|
|
4531
|
+
/* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
4532
|
+
/* @__PURE__ */ jsxs35("div", { className: "animate-pulse", children: [
|
|
4533
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4534
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4535
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4536
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4537
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4333
4538
|
] }),
|
|
4334
|
-
/* @__PURE__ */
|
|
4335
|
-
/* @__PURE__ */
|
|
4336
|
-
/* @__PURE__ */
|
|
4337
|
-
/* @__PURE__ */
|
|
4338
|
-
/* @__PURE__ */
|
|
4339
|
-
/* @__PURE__ */
|
|
4539
|
+
/* @__PURE__ */ jsxs35("div", { className: "animate-pulse", children: [
|
|
4540
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4541
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4542
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4543
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4544
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4340
4545
|
] }),
|
|
4341
|
-
/* @__PURE__ */
|
|
4342
|
-
/* @__PURE__ */
|
|
4343
|
-
/* @__PURE__ */
|
|
4344
|
-
/* @__PURE__ */
|
|
4345
|
-
/* @__PURE__ */
|
|
4346
|
-
/* @__PURE__ */
|
|
4546
|
+
/* @__PURE__ */ jsxs35("div", { className: "animate-pulse", children: [
|
|
4547
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4548
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4549
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4550
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4551
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4347
4552
|
] })
|
|
4348
4553
|
] })
|
|
4349
4554
|
] }) }),
|
|
@@ -4353,7 +4558,7 @@ var ContentView = (props) => {
|
|
|
4353
4558
|
var ContentView_default = ContentView;
|
|
4354
4559
|
|
|
4355
4560
|
// src/components/dataForm/DataList.tsx
|
|
4356
|
-
import { Fragment as Fragment10, jsx as
|
|
4561
|
+
import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4357
4562
|
var DataList = (props) => {
|
|
4358
4563
|
console.log(props.dataset, "datasetssssss");
|
|
4359
4564
|
const router = useRouter();
|
|
@@ -4363,7 +4568,7 @@ var DataList = (props) => {
|
|
|
4363
4568
|
let pages = 0;
|
|
4364
4569
|
console.log(props.addLinkText);
|
|
4365
4570
|
const [isDataFound, setIsDataFound] = useState8(null);
|
|
4366
|
-
|
|
4571
|
+
useEffect9(() => {
|
|
4367
4572
|
if (props?.dataset) {
|
|
4368
4573
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
4369
4574
|
setIsDataFound(true);
|
|
@@ -4376,7 +4581,7 @@ var DataList = (props) => {
|
|
|
4376
4581
|
if (path.includes(".")) {
|
|
4377
4582
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
4378
4583
|
} else if (Array.isArray(obj[path])) {
|
|
4379
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
4584
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx64("div", { children: item }, index));
|
|
4380
4585
|
} else {
|
|
4381
4586
|
return obj[path];
|
|
4382
4587
|
}
|
|
@@ -4432,30 +4637,30 @@ var DataList = (props) => {
|
|
|
4432
4637
|
const renderPageNumbers = () => {
|
|
4433
4638
|
if (pages <= 10) {
|
|
4434
4639
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
4435
|
-
(page) => /* @__PURE__ */
|
|
4640
|
+
(page) => /* @__PURE__ */ jsx64(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4436
4641
|
Hyperlink,
|
|
4437
4642
|
{
|
|
4438
4643
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4439
4644
|
href: builder.getNewPageUrl(page),
|
|
4440
4645
|
children: page
|
|
4441
4646
|
}
|
|
4442
|
-
) : /* @__PURE__ */
|
|
4647
|
+
) : /* @__PURE__ */ jsx64("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
4443
4648
|
);
|
|
4444
4649
|
} else {
|
|
4445
4650
|
const showFirstPages = activePageNumber <= 5;
|
|
4446
4651
|
const showLastPages = activePageNumber > pages - 5;
|
|
4447
4652
|
if (showFirstPages) {
|
|
4448
|
-
return /* @__PURE__ */
|
|
4449
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
4653
|
+
return /* @__PURE__ */ jsxs36(Fragment10, { children: [
|
|
4654
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx64(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4450
4655
|
Hyperlink,
|
|
4451
4656
|
{
|
|
4452
4657
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4453
4658
|
href: builder.getNewPageUrl(page),
|
|
4454
4659
|
children: page
|
|
4455
4660
|
}
|
|
4456
|
-
) : /* @__PURE__ */
|
|
4457
|
-
/* @__PURE__ */
|
|
4458
|
-
/* @__PURE__ */
|
|
4661
|
+
) : /* @__PURE__ */ jsx64("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
4662
|
+
/* @__PURE__ */ jsx64("span", { className: "px-2 py-1", children: "..." }),
|
|
4663
|
+
/* @__PURE__ */ jsx64(
|
|
4459
4664
|
Hyperlink,
|
|
4460
4665
|
{
|
|
4461
4666
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4463,7 +4668,7 @@ var DataList = (props) => {
|
|
|
4463
4668
|
children: pages - 1
|
|
4464
4669
|
}
|
|
4465
4670
|
),
|
|
4466
|
-
/* @__PURE__ */
|
|
4671
|
+
/* @__PURE__ */ jsx64(
|
|
4467
4672
|
Hyperlink,
|
|
4468
4673
|
{
|
|
4469
4674
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4471,7 +4676,7 @@ var DataList = (props) => {
|
|
|
4471
4676
|
children: pages
|
|
4472
4677
|
}
|
|
4473
4678
|
),
|
|
4474
|
-
/* @__PURE__ */
|
|
4679
|
+
/* @__PURE__ */ jsx64("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs36(
|
|
4475
4680
|
"select",
|
|
4476
4681
|
{
|
|
4477
4682
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4483,18 +4688,18 @@ var DataList = (props) => {
|
|
|
4483
4688
|
}
|
|
4484
4689
|
},
|
|
4485
4690
|
children: [
|
|
4486
|
-
/* @__PURE__ */
|
|
4691
|
+
/* @__PURE__ */ jsx64("option", { className: "", value: "", children: "Jump to" }),
|
|
4487
4692
|
Array.from(
|
|
4488
4693
|
{ length: Math.max(0, pages - 10) },
|
|
4489
4694
|
(_, index) => index + 9
|
|
4490
|
-
).map((page) => /* @__PURE__ */
|
|
4695
|
+
).map((page) => /* @__PURE__ */ jsx64("option", { value: page, children: page }, page))
|
|
4491
4696
|
]
|
|
4492
4697
|
}
|
|
4493
4698
|
) })
|
|
4494
4699
|
] });
|
|
4495
4700
|
} else if (showLastPages) {
|
|
4496
|
-
return /* @__PURE__ */
|
|
4497
|
-
/* @__PURE__ */
|
|
4701
|
+
return /* @__PURE__ */ jsxs36(Fragment10, { children: [
|
|
4702
|
+
/* @__PURE__ */ jsx64(
|
|
4498
4703
|
Hyperlink,
|
|
4499
4704
|
{
|
|
4500
4705
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4502,7 +4707,7 @@ var DataList = (props) => {
|
|
|
4502
4707
|
children: "1"
|
|
4503
4708
|
}
|
|
4504
4709
|
),
|
|
4505
|
-
/* @__PURE__ */
|
|
4710
|
+
/* @__PURE__ */ jsx64(
|
|
4506
4711
|
Hyperlink,
|
|
4507
4712
|
{
|
|
4508
4713
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4510,21 +4715,21 @@ var DataList = (props) => {
|
|
|
4510
4715
|
children: "2"
|
|
4511
4716
|
}
|
|
4512
4717
|
),
|
|
4513
|
-
/* @__PURE__ */
|
|
4718
|
+
/* @__PURE__ */ jsx64("span", { className: "px-2 py-1", children: "..." }),
|
|
4514
4719
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
4515
|
-
(page) => /* @__PURE__ */
|
|
4720
|
+
(page) => /* @__PURE__ */ jsx64(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4516
4721
|
Hyperlink,
|
|
4517
4722
|
{
|
|
4518
4723
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4519
4724
|
href: builder.getNewPageUrl(page),
|
|
4520
4725
|
children: page
|
|
4521
4726
|
}
|
|
4522
|
-
) : /* @__PURE__ */
|
|
4727
|
+
) : /* @__PURE__ */ jsx64("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
4523
4728
|
)
|
|
4524
4729
|
] });
|
|
4525
4730
|
} else {
|
|
4526
|
-
return /* @__PURE__ */
|
|
4527
|
-
/* @__PURE__ */
|
|
4731
|
+
return /* @__PURE__ */ jsxs36(Fragment10, { children: [
|
|
4732
|
+
/* @__PURE__ */ jsx64(
|
|
4528
4733
|
Hyperlink,
|
|
4529
4734
|
{
|
|
4530
4735
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4532,7 +4737,7 @@ var DataList = (props) => {
|
|
|
4532
4737
|
children: "1"
|
|
4533
4738
|
}
|
|
4534
4739
|
),
|
|
4535
|
-
/* @__PURE__ */
|
|
4740
|
+
/* @__PURE__ */ jsx64(
|
|
4536
4741
|
Hyperlink,
|
|
4537
4742
|
{
|
|
4538
4743
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4540,20 +4745,20 @@ var DataList = (props) => {
|
|
|
4540
4745
|
children: "2"
|
|
4541
4746
|
}
|
|
4542
4747
|
),
|
|
4543
|
-
/* @__PURE__ */
|
|
4748
|
+
/* @__PURE__ */ jsx64("span", { className: "px-2 py-1", children: "..." }),
|
|
4544
4749
|
Array.from(
|
|
4545
4750
|
{ length: 5 },
|
|
4546
4751
|
(_, index) => activePageNumber - 2 + index
|
|
4547
|
-
).map((page) => /* @__PURE__ */
|
|
4752
|
+
).map((page) => /* @__PURE__ */ jsx64(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4548
4753
|
Hyperlink,
|
|
4549
4754
|
{
|
|
4550
4755
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4551
4756
|
href: builder.getNewPageUrl(page),
|
|
4552
4757
|
children: page
|
|
4553
4758
|
}
|
|
4554
|
-
) : /* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4556
|
-
/* @__PURE__ */
|
|
4759
|
+
) : /* @__PURE__ */ jsx64("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
4760
|
+
/* @__PURE__ */ jsx64("span", { className: "px-2 py-1", children: "..." }),
|
|
4761
|
+
/* @__PURE__ */ jsx64(
|
|
4557
4762
|
Hyperlink,
|
|
4558
4763
|
{
|
|
4559
4764
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4561,7 +4766,7 @@ var DataList = (props) => {
|
|
|
4561
4766
|
children: pages - 1
|
|
4562
4767
|
}
|
|
4563
4768
|
),
|
|
4564
|
-
/* @__PURE__ */
|
|
4769
|
+
/* @__PURE__ */ jsx64(
|
|
4565
4770
|
Hyperlink,
|
|
4566
4771
|
{
|
|
4567
4772
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4569,7 +4774,7 @@ var DataList = (props) => {
|
|
|
4569
4774
|
children: pages
|
|
4570
4775
|
}
|
|
4571
4776
|
),
|
|
4572
|
-
/* @__PURE__ */
|
|
4777
|
+
/* @__PURE__ */ jsx64("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs36(
|
|
4573
4778
|
"select",
|
|
4574
4779
|
{
|
|
4575
4780
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4581,8 +4786,8 @@ var DataList = (props) => {
|
|
|
4581
4786
|
}
|
|
4582
4787
|
},
|
|
4583
4788
|
children: [
|
|
4584
|
-
/* @__PURE__ */
|
|
4585
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
4789
|
+
/* @__PURE__ */ jsx64("option", { value: "", children: "Jump to" }),
|
|
4790
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx64("option", { value: page, children: page }, page))
|
|
4586
4791
|
]
|
|
4587
4792
|
}
|
|
4588
4793
|
) })
|
|
@@ -4590,16 +4795,16 @@ var DataList = (props) => {
|
|
|
4590
4795
|
}
|
|
4591
4796
|
}
|
|
4592
4797
|
};
|
|
4593
|
-
return /* @__PURE__ */
|
|
4594
|
-
/* @__PURE__ */
|
|
4595
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
4798
|
+
return /* @__PURE__ */ jsxs36(React46.Fragment, { children: [
|
|
4799
|
+
/* @__PURE__ */ jsxs36(ContentView_default, { isDataFound, children: [
|
|
4800
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs36(
|
|
4596
4801
|
"div",
|
|
4597
4802
|
{
|
|
4598
4803
|
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 sticky top-0`,
|
|
4599
4804
|
children: [
|
|
4600
|
-
props.title ? /* @__PURE__ */
|
|
4601
|
-
/* @__PURE__ */
|
|
4602
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4805
|
+
props.title ? /* @__PURE__ */ jsx64("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx64("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx64("div", {}),
|
|
4806
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
4807
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx64(
|
|
4603
4808
|
InputControl_default,
|
|
4604
4809
|
{
|
|
4605
4810
|
name: filter.name,
|
|
@@ -4614,15 +4819,15 @@ var DataList = (props) => {
|
|
|
4614
4819
|
},
|
|
4615
4820
|
filter.name
|
|
4616
4821
|
)),
|
|
4617
|
-
props.addLinkHref && /* @__PURE__ */
|
|
4822
|
+
props.addLinkHref && /* @__PURE__ */ jsxs36(
|
|
4618
4823
|
Hyperlink,
|
|
4619
4824
|
{
|
|
4620
4825
|
className: "gap-1",
|
|
4621
4826
|
linkType: "Primary" /* Solid */,
|
|
4622
4827
|
href: props.addLinkHref,
|
|
4623
4828
|
children: [
|
|
4624
|
-
/* @__PURE__ */
|
|
4625
|
-
/* @__PURE__ */
|
|
4829
|
+
/* @__PURE__ */ jsx64(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4830
|
+
/* @__PURE__ */ jsx64("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
4626
4831
|
]
|
|
4627
4832
|
}
|
|
4628
4833
|
)
|
|
@@ -4630,8 +4835,8 @@ var DataList = (props) => {
|
|
|
4630
4835
|
]
|
|
4631
4836
|
}
|
|
4632
4837
|
),
|
|
4633
|
-
/* @__PURE__ */
|
|
4634
|
-
/* @__PURE__ */
|
|
4838
|
+
/* @__PURE__ */ jsx64("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs36("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
4839
|
+
/* @__PURE__ */ jsx64("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx64("tr", { children: props?.columns?.map((column) => {
|
|
4635
4840
|
let url = builder.getNewOrderByUrl(column.name);
|
|
4636
4841
|
let icon = "chevronUpDown";
|
|
4637
4842
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -4641,36 +4846,36 @@ var DataList = (props) => {
|
|
|
4641
4846
|
icon = "chevronUp";
|
|
4642
4847
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
4643
4848
|
}
|
|
4644
|
-
return /* @__PURE__ */
|
|
4849
|
+
return /* @__PURE__ */ jsx64(
|
|
4645
4850
|
"th",
|
|
4646
4851
|
{
|
|
4647
4852
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
4648
|
-
children: /* @__PURE__ */
|
|
4649
|
-
/* @__PURE__ */
|
|
4650
|
-
column.enableSorting && /* @__PURE__ */
|
|
4853
|
+
children: /* @__PURE__ */ jsx64(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */ jsxs36("span", { className: "flex items-center space-x-1", children: [
|
|
4854
|
+
/* @__PURE__ */ jsx64("span", { className: "text-black", children: column.label }),
|
|
4855
|
+
column.enableSorting && /* @__PURE__ */ jsx64(Icon_default, { className: "w-4 h-4", name: icon })
|
|
4651
4856
|
] }) })
|
|
4652
4857
|
},
|
|
4653
4858
|
column.name
|
|
4654
4859
|
);
|
|
4655
4860
|
}) }) }),
|
|
4656
|
-
/* @__PURE__ */
|
|
4861
|
+
/* @__PURE__ */ jsx64("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
4657
4862
|
let validityClass = "";
|
|
4658
4863
|
console.log("dataitem", dataitem);
|
|
4659
4864
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
4660
4865
|
validityClass = "bg-alert-200";
|
|
4661
4866
|
}
|
|
4662
|
-
return /* @__PURE__ */
|
|
4867
|
+
return /* @__PURE__ */ jsx64("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
4663
4868
|
console.log("column", column);
|
|
4664
|
-
return /* @__PURE__ */
|
|
4869
|
+
return /* @__PURE__ */ jsx64(React46.Fragment, { children: /* @__PURE__ */ jsx64(
|
|
4665
4870
|
"td",
|
|
4666
4871
|
{
|
|
4667
4872
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
4668
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
4873
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx64(
|
|
4669
4874
|
Hyperlink,
|
|
4670
4875
|
{
|
|
4671
4876
|
className: "",
|
|
4672
4877
|
href: `https://${dataitem[column.name]}`,
|
|
4673
|
-
children: /* @__PURE__ */
|
|
4878
|
+
children: /* @__PURE__ */ jsx64(
|
|
4674
4879
|
ViewControl_default,
|
|
4675
4880
|
{
|
|
4676
4881
|
controlType: column.controlType,
|
|
@@ -4683,11 +4888,11 @@ var DataList = (props) => {
|
|
|
4683
4888
|
}
|
|
4684
4889
|
)
|
|
4685
4890
|
}
|
|
4686
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
4891
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx64(
|
|
4687
4892
|
Hyperlink,
|
|
4688
4893
|
{
|
|
4689
4894
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
4690
|
-
children: /* @__PURE__ */
|
|
4895
|
+
children: /* @__PURE__ */ jsx64(
|
|
4691
4896
|
ViewControl_default,
|
|
4692
4897
|
{
|
|
4693
4898
|
controlType: column.controlType,
|
|
@@ -4697,7 +4902,7 @@ var DataList = (props) => {
|
|
|
4697
4902
|
}
|
|
4698
4903
|
)
|
|
4699
4904
|
}
|
|
4700
|
-
) : /* @__PURE__ */
|
|
4905
|
+
) : /* @__PURE__ */ jsx64(
|
|
4701
4906
|
ViewControl_default,
|
|
4702
4907
|
{
|
|
4703
4908
|
controlType: column.controlType,
|
|
@@ -4711,10 +4916,10 @@ var DataList = (props) => {
|
|
|
4711
4916
|
}) }, index);
|
|
4712
4917
|
}) })
|
|
4713
4918
|
] }) }),
|
|
4714
|
-
/* @__PURE__ */
|
|
4715
|
-
/* @__PURE__ */
|
|
4716
|
-
/* @__PURE__ */
|
|
4717
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
4919
|
+
/* @__PURE__ */ jsx64("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between", children: [
|
|
4920
|
+
/* @__PURE__ */ jsx64("div", { className: "text-gray-700", children: label }),
|
|
4921
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex space-x-2 items-center", children: [
|
|
4922
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx64(
|
|
4718
4923
|
Hyperlink,
|
|
4719
4924
|
{
|
|
4720
4925
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -4722,9 +4927,9 @@ var DataList = (props) => {
|
|
|
4722
4927
|
children: "Prev"
|
|
4723
4928
|
}
|
|
4724
4929
|
),
|
|
4725
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
4930
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx64("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" }),
|
|
4726
4931
|
renderPageNumbers(),
|
|
4727
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
4932
|
+
activePageNumber < pages && /* @__PURE__ */ jsx64(
|
|
4728
4933
|
Hyperlink,
|
|
4729
4934
|
{
|
|
4730
4935
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -4732,19 +4937,19 @@ var DataList = (props) => {
|
|
|
4732
4937
|
children: "Next"
|
|
4733
4938
|
}
|
|
4734
4939
|
),
|
|
4735
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
4940
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx64("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
4736
4941
|
] })
|
|
4737
4942
|
] }) })
|
|
4738
4943
|
] }),
|
|
4739
|
-
/* @__PURE__ */
|
|
4740
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
4944
|
+
/* @__PURE__ */ jsxs36(NoContentView_default, { isDataFound, children: [
|
|
4945
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs36(
|
|
4741
4946
|
"div",
|
|
4742
4947
|
{
|
|
4743
4948
|
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`,
|
|
4744
4949
|
children: [
|
|
4745
|
-
props.title ? /* @__PURE__ */
|
|
4746
|
-
/* @__PURE__ */
|
|
4747
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4950
|
+
props.title ? /* @__PURE__ */ jsx64("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx64("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx64("div", {}),
|
|
4951
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-3", children: [
|
|
4952
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx64(
|
|
4748
4953
|
InputControl_default,
|
|
4749
4954
|
{
|
|
4750
4955
|
name: filter.name,
|
|
@@ -4759,15 +4964,15 @@ var DataList = (props) => {
|
|
|
4759
4964
|
},
|
|
4760
4965
|
filter.name
|
|
4761
4966
|
)),
|
|
4762
|
-
props.addLinkHref && /* @__PURE__ */
|
|
4967
|
+
props.addLinkHref && /* @__PURE__ */ jsxs36(
|
|
4763
4968
|
Hyperlink,
|
|
4764
4969
|
{
|
|
4765
4970
|
className: "gap-1",
|
|
4766
4971
|
linkType: "Primary" /* Solid */,
|
|
4767
4972
|
href: props.addLinkHref,
|
|
4768
4973
|
children: [
|
|
4769
|
-
/* @__PURE__ */
|
|
4770
|
-
/* @__PURE__ */
|
|
4974
|
+
/* @__PURE__ */ jsx64(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4975
|
+
/* @__PURE__ */ jsx64("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
4771
4976
|
]
|
|
4772
4977
|
}
|
|
4773
4978
|
)
|
|
@@ -4775,8 +4980,8 @@ var DataList = (props) => {
|
|
|
4775
4980
|
]
|
|
4776
4981
|
}
|
|
4777
4982
|
),
|
|
4778
|
-
/* @__PURE__ */
|
|
4779
|
-
/* @__PURE__ */
|
|
4983
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
4984
|
+
/* @__PURE__ */ jsx64("div", { children: /* @__PURE__ */ jsx64("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx64("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx64("tr", { children: props?.columns?.map((column) => {
|
|
4780
4985
|
let url = builder.getNewOrderByUrl(column.name);
|
|
4781
4986
|
let icon = "chevronUpDown";
|
|
4782
4987
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -4786,19 +4991,19 @@ var DataList = (props) => {
|
|
|
4786
4991
|
icon = "chevronUp";
|
|
4787
4992
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
4788
4993
|
}
|
|
4789
|
-
return /* @__PURE__ */
|
|
4994
|
+
return /* @__PURE__ */ jsx64(
|
|
4790
4995
|
"th",
|
|
4791
4996
|
{
|
|
4792
4997
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
4793
|
-
children: /* @__PURE__ */
|
|
4794
|
-
/* @__PURE__ */
|
|
4795
|
-
column.enableSorting && /* @__PURE__ */
|
|
4998
|
+
children: /* @__PURE__ */ jsx64(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */ jsxs36("span", { className: "flex items-center space-x-1", children: [
|
|
4999
|
+
/* @__PURE__ */ jsx64("span", { children: column.label }),
|
|
5000
|
+
column.enableSorting && /* @__PURE__ */ jsx64(Icon_default, { className: "w-4 h-4", name: icon })
|
|
4796
5001
|
] }) })
|
|
4797
5002
|
},
|
|
4798
5003
|
column.name
|
|
4799
5004
|
);
|
|
4800
5005
|
}) }) }) }) }),
|
|
4801
|
-
/* @__PURE__ */
|
|
5006
|
+
/* @__PURE__ */ jsx64("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
4802
5007
|
] })
|
|
4803
5008
|
] })
|
|
4804
5009
|
] });
|
|
@@ -4806,9 +5011,9 @@ var DataList = (props) => {
|
|
|
4806
5011
|
var DataList_default = DataList;
|
|
4807
5012
|
|
|
4808
5013
|
// src/components/dataForm/DataListRenderer.tsx
|
|
4809
|
-
import
|
|
5014
|
+
import React47, { useState as useState9, useEffect as useEffect10 } from "react";
|
|
4810
5015
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
4811
|
-
import { jsx as
|
|
5016
|
+
import { jsx as jsx65, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4812
5017
|
var viewControlMap = {
|
|
4813
5018
|
number: ViewControlTypes.number,
|
|
4814
5019
|
lineText: ViewControlTypes.lineText,
|
|
@@ -4869,7 +5074,7 @@ var DataListRenderer = ({
|
|
|
4869
5074
|
const [addLinkText, setAddLinkText] = useState9("");
|
|
4870
5075
|
const [serviceRoute, setServiceRoute] = useState9("");
|
|
4871
5076
|
const pathname = usePathname2();
|
|
4872
|
-
|
|
5077
|
+
useEffect10(() => {
|
|
4873
5078
|
if (!formDefinition) return;
|
|
4874
5079
|
setColumns(mapApiToColumns(formDefinition));
|
|
4875
5080
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -4882,7 +5087,7 @@ var DataListRenderer = ({
|
|
|
4882
5087
|
setAddLinkHref(resolvedAddLinkHref);
|
|
4883
5088
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
4884
5089
|
}, [formDefinition, params]);
|
|
4885
|
-
|
|
5090
|
+
useEffect10(() => {
|
|
4886
5091
|
const fetchData = async () => {
|
|
4887
5092
|
if (!serviceRoute) return;
|
|
4888
5093
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -4897,9 +5102,9 @@ var DataListRenderer = ({
|
|
|
4897
5102
|
const [tabItem, setTabItem] = useState9();
|
|
4898
5103
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
4899
5104
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
4900
|
-
return /* @__PURE__ */
|
|
4901
|
-
widgetProps && /* @__PURE__ */
|
|
4902
|
-
/* @__PURE__ */
|
|
5105
|
+
return /* @__PURE__ */ jsxs37(React47.Fragment, { children: [
|
|
5106
|
+
widgetProps && /* @__PURE__ */ jsx65(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
5107
|
+
/* @__PURE__ */ jsx65(
|
|
4903
5108
|
DataList_default,
|
|
4904
5109
|
{
|
|
4905
5110
|
addLinkHref,
|
|
@@ -4918,10 +5123,10 @@ var DataListRenderer = ({
|
|
|
4918
5123
|
var DataListRenderer_default = DataListRenderer;
|
|
4919
5124
|
|
|
4920
5125
|
// src/components/dataForm/DataForm.tsx
|
|
4921
|
-
import
|
|
5126
|
+
import React49, { useCallback as useCallback5, useEffect as useEffect11, useReducer as useReducer3, useRef as useRef4 } from "react";
|
|
4922
5127
|
|
|
4923
5128
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
4924
|
-
import
|
|
5129
|
+
import React48, { useCallback as useCallback4 } from "react";
|
|
4925
5130
|
|
|
4926
5131
|
// src/components/dataForm/StyleTypes.tsx
|
|
4927
5132
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -4944,7 +5149,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
4944
5149
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
4945
5150
|
|
|
4946
5151
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
4947
|
-
import { jsx as
|
|
5152
|
+
import { jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4948
5153
|
var DataFormChildSection = (props) => {
|
|
4949
5154
|
const { section } = props;
|
|
4950
5155
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -5012,14 +5217,14 @@ var DataFormChildSection = (props) => {
|
|
|
5012
5217
|
childItemsToRender,
|
|
5013
5218
|
allChildItems: childItems
|
|
5014
5219
|
});
|
|
5015
|
-
return /* @__PURE__ */
|
|
5016
|
-
section.sectionTitle && /* @__PURE__ */
|
|
5017
|
-
/* @__PURE__ */
|
|
5018
|
-
/* @__PURE__ */
|
|
5019
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */
|
|
5020
|
-
return /* @__PURE__ */
|
|
5220
|
+
return /* @__PURE__ */ jsx66(React48.Fragment, { children: /* @__PURE__ */ jsxs38("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
5221
|
+
section.sectionTitle && /* @__PURE__ */ jsx66("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
5222
|
+
/* @__PURE__ */ jsx66("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
5223
|
+
/* @__PURE__ */ jsx66("div", { children: /* @__PURE__ */ jsxs38("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
5224
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ jsx66("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
5225
|
+
return /* @__PURE__ */ jsxs38("tr", { className: "", children: [
|
|
5021
5226
|
sectionRow.elements.map((field, index) => {
|
|
5022
|
-
return /* @__PURE__ */
|
|
5227
|
+
return /* @__PURE__ */ jsx66(
|
|
5023
5228
|
"th",
|
|
5024
5229
|
{
|
|
5025
5230
|
className: "py-3 font-normal text-left",
|
|
@@ -5028,21 +5233,21 @@ var DataFormChildSection = (props) => {
|
|
|
5028
5233
|
field.name
|
|
5029
5234
|
);
|
|
5030
5235
|
}),
|
|
5031
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5236
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx66("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
5032
5237
|
] }, sectionRowIndex);
|
|
5033
5238
|
}) }),
|
|
5034
|
-
/* @__PURE__ */
|
|
5239
|
+
/* @__PURE__ */ jsx66("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
5035
5240
|
const { item, originalIndex } = visibleItem;
|
|
5036
5241
|
const rowKey = originalIndex;
|
|
5037
|
-
return /* @__PURE__ */
|
|
5242
|
+
return /* @__PURE__ */ jsx66(React48.Fragment, { children: section.sectionRows.map(
|
|
5038
5243
|
(sectionRow, sectionRowIndex) => {
|
|
5039
|
-
return /* @__PURE__ */
|
|
5244
|
+
return /* @__PURE__ */ jsxs38(
|
|
5040
5245
|
"tr",
|
|
5041
5246
|
{
|
|
5042
5247
|
className: "",
|
|
5043
5248
|
children: [
|
|
5044
5249
|
sectionRow.elements.map((field, index) => {
|
|
5045
|
-
return /* @__PURE__ */
|
|
5250
|
+
return /* @__PURE__ */ jsx66("td", { children: /* @__PURE__ */ jsx66("div", { className: "flex-1", children: /* @__PURE__ */ jsx66("div", { className: "w-11/12", children: /* @__PURE__ */ jsx66(
|
|
5046
5251
|
InputControl_default,
|
|
5047
5252
|
{
|
|
5048
5253
|
index: filteredIndex,
|
|
@@ -5062,7 +5267,7 @@ var DataFormChildSection = (props) => {
|
|
|
5062
5267
|
}
|
|
5063
5268
|
) }) }) }, field.name);
|
|
5064
5269
|
}),
|
|
5065
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5270
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx66("td", { children: /* @__PURE__ */ jsx66(
|
|
5066
5271
|
ClientButton_default,
|
|
5067
5272
|
{
|
|
5068
5273
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -5071,7 +5276,7 @@ var DataFormChildSection = (props) => {
|
|
|
5071
5276
|
},
|
|
5072
5277
|
dataRole: "delete",
|
|
5073
5278
|
tabIndex: -1,
|
|
5074
|
-
children: /* @__PURE__ */
|
|
5279
|
+
children: /* @__PURE__ */ jsx66(
|
|
5075
5280
|
Icon_default,
|
|
5076
5281
|
{
|
|
5077
5282
|
className: "w-4 h-4",
|
|
@@ -5088,7 +5293,7 @@ var DataFormChildSection = (props) => {
|
|
|
5088
5293
|
) }, rowKey);
|
|
5089
5294
|
}) })
|
|
5090
5295
|
] }) }),
|
|
5091
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5296
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx66("div", { className: "ml-1", children: /* @__PURE__ */ jsx66(
|
|
5092
5297
|
ClientButton_default,
|
|
5093
5298
|
{
|
|
5094
5299
|
ButtonType: "Link" /* Link */,
|
|
@@ -5103,7 +5308,7 @@ var DataFormChildSection = (props) => {
|
|
|
5103
5308
|
var DataFormChildSection_default = DataFormChildSection;
|
|
5104
5309
|
|
|
5105
5310
|
// src/components/dataForm/DataForm.tsx
|
|
5106
|
-
import { jsx as
|
|
5311
|
+
import { jsx as jsx67, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5107
5312
|
var DataForm = (props) => {
|
|
5108
5313
|
const formRef = useRef4(null);
|
|
5109
5314
|
console.log(props.dataItem, "dssads");
|
|
@@ -5200,7 +5405,7 @@ var DataForm = (props) => {
|
|
|
5200
5405
|
console.error("Error fetching data:", error);
|
|
5201
5406
|
}
|
|
5202
5407
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
5203
|
-
|
|
5408
|
+
useEffect11(() => {
|
|
5204
5409
|
fetchData();
|
|
5205
5410
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
5206
5411
|
function replacePlaceholders(template, context, params) {
|
|
@@ -5295,7 +5500,7 @@ var DataForm = (props) => {
|
|
|
5295
5500
|
return { isSuccessful: true };
|
|
5296
5501
|
}
|
|
5297
5502
|
}, [formState, props]);
|
|
5298
|
-
|
|
5503
|
+
useEffect11(() => {
|
|
5299
5504
|
if (props.dataItem) {
|
|
5300
5505
|
dispatch({
|
|
5301
5506
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -5323,19 +5528,19 @@ var DataForm = (props) => {
|
|
|
5323
5528
|
return false;
|
|
5324
5529
|
}
|
|
5325
5530
|
}
|
|
5326
|
-
return /* @__PURE__ */
|
|
5327
|
-
props.title && /* @__PURE__ */
|
|
5531
|
+
return /* @__PURE__ */ jsx67(React49.Fragment, { children: /* @__PURE__ */ jsxs39("div", { className: "flex-grow flex flex-col", children: [
|
|
5532
|
+
props.title && /* @__PURE__ */ jsx67("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ jsxs39(
|
|
5328
5533
|
"div",
|
|
5329
5534
|
{
|
|
5330
5535
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
5331
5536
|
onClick: () => window.history.back(),
|
|
5332
5537
|
children: [
|
|
5333
|
-
/* @__PURE__ */
|
|
5334
|
-
/* @__PURE__ */
|
|
5538
|
+
/* @__PURE__ */ jsx67(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
5539
|
+
/* @__PURE__ */ jsx67("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
5335
5540
|
]
|
|
5336
5541
|
}
|
|
5337
5542
|
) }),
|
|
5338
|
-
/* @__PURE__ */
|
|
5543
|
+
/* @__PURE__ */ jsx67(
|
|
5339
5544
|
"form",
|
|
5340
5545
|
{
|
|
5341
5546
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -5356,8 +5561,8 @@ var DataForm = (props) => {
|
|
|
5356
5561
|
}
|
|
5357
5562
|
}
|
|
5358
5563
|
},
|
|
5359
|
-
children: /* @__PURE__ */
|
|
5360
|
-
return /* @__PURE__ */
|
|
5564
|
+
children: /* @__PURE__ */ jsx67("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
5565
|
+
return /* @__PURE__ */ jsx67(React49.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs39("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
5361
5566
|
section.sectionRows?.map(
|
|
5362
5567
|
(sectionRow, sectionRowIndex) => {
|
|
5363
5568
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -5368,14 +5573,14 @@ var DataForm = (props) => {
|
|
|
5368
5573
|
sectionRow.visible
|
|
5369
5574
|
);
|
|
5370
5575
|
}
|
|
5371
|
-
return /* @__PURE__ */
|
|
5372
|
-
return /* @__PURE__ */
|
|
5576
|
+
return /* @__PURE__ */ jsx67(React49.Fragment, { children: isVisible && /* @__PURE__ */ jsx67("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
5577
|
+
return /* @__PURE__ */ jsxs39(
|
|
5373
5578
|
"div",
|
|
5374
5579
|
{
|
|
5375
5580
|
className: sectionRow.grow ? "grow" : "",
|
|
5376
5581
|
children: [
|
|
5377
|
-
/* @__PURE__ */
|
|
5378
|
-
/* @__PURE__ */
|
|
5582
|
+
/* @__PURE__ */ jsx67("div", { children: field.controlType }),
|
|
5583
|
+
/* @__PURE__ */ jsx67(
|
|
5379
5584
|
InputControl_default,
|
|
5380
5585
|
{
|
|
5381
5586
|
name: field.name,
|
|
@@ -5405,12 +5610,12 @@ var DataForm = (props) => {
|
|
|
5405
5610
|
}) }) }, sectionRowIndex);
|
|
5406
5611
|
}
|
|
5407
5612
|
),
|
|
5408
|
-
/* @__PURE__ */
|
|
5613
|
+
/* @__PURE__ */ jsx67("div", { children: section.childSections?.map(
|
|
5409
5614
|
(childSection, childSectionIndex) => {
|
|
5410
|
-
return /* @__PURE__ */
|
|
5615
|
+
return /* @__PURE__ */ jsx67("div", { children: childSection.name && evalutateCondition(
|
|
5411
5616
|
formState.inputValues,
|
|
5412
5617
|
childSection.visible
|
|
5413
|
-
) && /* @__PURE__ */
|
|
5618
|
+
) && /* @__PURE__ */ jsx67(
|
|
5414
5619
|
DataFormChildSection_default,
|
|
5415
5620
|
{
|
|
5416
5621
|
section: childSection,
|
|
@@ -5425,8 +5630,8 @@ var DataForm = (props) => {
|
|
|
5425
5630
|
}) })
|
|
5426
5631
|
}
|
|
5427
5632
|
),
|
|
5428
|
-
/* @__PURE__ */
|
|
5429
|
-
/* @__PURE__ */
|
|
5633
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
5634
|
+
/* @__PURE__ */ jsx67("div", { children: props.additionalActions && /* @__PURE__ */ jsx67(
|
|
5430
5635
|
Button_default,
|
|
5431
5636
|
{
|
|
5432
5637
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5434,7 +5639,7 @@ var DataForm = (props) => {
|
|
|
5434
5639
|
children: props.additionalActions.title
|
|
5435
5640
|
}
|
|
5436
5641
|
) }),
|
|
5437
|
-
/* @__PURE__ */
|
|
5642
|
+
/* @__PURE__ */ jsx67("div", { children: props.onDelete && /* @__PURE__ */ jsx67(
|
|
5438
5643
|
Button_default,
|
|
5439
5644
|
{
|
|
5440
5645
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5445,7 +5650,7 @@ var DataForm = (props) => {
|
|
|
5445
5650
|
children: "Delete"
|
|
5446
5651
|
}
|
|
5447
5652
|
) }),
|
|
5448
|
-
/* @__PURE__ */
|
|
5653
|
+
/* @__PURE__ */ jsx67("div", { children: props.onClick && /* @__PURE__ */ jsx67(
|
|
5449
5654
|
Button_default,
|
|
5450
5655
|
{
|
|
5451
5656
|
onValidate,
|
|
@@ -5462,7 +5667,7 @@ var DataForm = (props) => {
|
|
|
5462
5667
|
var DataForm_default = DataForm;
|
|
5463
5668
|
|
|
5464
5669
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
5465
|
-
import { jsx as
|
|
5670
|
+
import { jsx as jsx68, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5466
5671
|
function getAction(actions, code) {
|
|
5467
5672
|
return actions?.find((a) => a.actionCode === code);
|
|
5468
5673
|
}
|
|
@@ -5488,9 +5693,9 @@ var DataFormRenderer = ({
|
|
|
5488
5693
|
"Delete"
|
|
5489
5694
|
);
|
|
5490
5695
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
5491
|
-
return /* @__PURE__ */
|
|
5492
|
-
widgetProps && /* @__PURE__ */
|
|
5493
|
-
/* @__PURE__ */
|
|
5696
|
+
return /* @__PURE__ */ jsxs40("div", { className: "flex-grow flex flex-col", children: [
|
|
5697
|
+
widgetProps && /* @__PURE__ */ jsx68(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
5698
|
+
/* @__PURE__ */ jsx68(
|
|
5494
5699
|
DataForm_default,
|
|
5495
5700
|
{
|
|
5496
5701
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|