@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260831063450 → 0.8.1-dev.20260901043813
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/{CommentRendererClient-IAXFBEMF.mjs → CommentRendererClient-FU5ZMGBV.mjs} +58 -4
- package/dist/{CommentRendererClient-XPZN5L64.mjs → CommentRendererClient-L6GILW7U.mjs} +58 -4
- package/dist/{DataBindingControls-Y4JXUDZV.mjs → DataBindingControls-ANAEGFPF.mjs} +2 -2
- package/dist/{DataBindingControls-JLAO3NJL.mjs → DataBindingControls-GA2UILYQ.mjs} +2 -2
- package/dist/{InputControlClient-XC24HYZX.mjs → InputControlClient-HDT3N6ZI.mjs} +80 -262
- package/dist/{InputControlClient-POQDFVL3.mjs → InputControlClient-ZM6VEU6Q.mjs} +2 -7
- package/dist/{Pagination-T7Z2NXKO.mjs → Pagination-JGUQJ2DH.mjs} +2 -2
- package/dist/{Pagination-QBPYDD66.mjs → Pagination-LNJ27L7U.mjs} +2 -2
- package/dist/{chunk-5TQWVOWH.mjs → chunk-2VS554XP.mjs} +1 -1
- package/dist/{chunk-GGG5MJLN.mjs → chunk-37F2HMKK.mjs} +1 -1
- package/dist/{chunk-E4VOFO5Q.mjs → chunk-DTWPZPSX.mjs} +0 -3
- package/dist/{chunk-4R7F7LBL.mjs → chunk-IEY342PD.mjs} +0 -3
- package/dist/{chunk-XTG4JW2O.mjs → chunk-PE3NKJNR.mjs} +34 -215
- package/dist/{chunk-X5ERUUQV.mjs → chunk-RG3CISAA.mjs} +1 -1
- package/dist/index.d.mts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +694 -842
- package/dist/index.mjs +7 -11
- package/dist/server.js +222 -364
- package/dist/server.mjs +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1722,7 +1722,7 @@ var init_CommentFileNode = __esm({
|
|
|
1722
1722
|
});
|
|
1723
1723
|
|
|
1724
1724
|
// src/components/controls/view/CommentNodeRenderer.tsx
|
|
1725
|
-
var import_react19, import_jsx_runtime25, TextLeafNode, renderChildren, headingLevelFromTag, CommentNodeRenderer, CommentNodeRenderer_default;
|
|
1725
|
+
var import_react19, import_jsx_runtime25, LINK_STYLE, URL_PATTERN, linkifyText, TextLeafNode, renderChildren, headingLevelFromTag, CommentNodeRenderer, CommentNodeRenderer_default;
|
|
1726
1726
|
var init_CommentNodeRenderer = __esm({
|
|
1727
1727
|
"src/components/controls/view/CommentNodeRenderer.tsx"() {
|
|
1728
1728
|
"use strict";
|
|
@@ -1731,8 +1731,42 @@ var init_CommentNodeRenderer = __esm({
|
|
|
1731
1731
|
init_CommentImageNode();
|
|
1732
1732
|
init_CommentFileNode();
|
|
1733
1733
|
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1734
|
+
LINK_STYLE = { textDecoration: "underline", wordBreak: "break-word" };
|
|
1735
|
+
URL_PATTERN = /(https?:\/\/[^\s<>"']+|www\.[^\s<>"']+)/gi;
|
|
1736
|
+
linkifyText = (text, keyPrefix) => {
|
|
1737
|
+
const parts = text.split(URL_PATTERN);
|
|
1738
|
+
if (parts.length === 1) {
|
|
1739
|
+
return text;
|
|
1740
|
+
}
|
|
1741
|
+
return parts.map((part, index) => {
|
|
1742
|
+
if (!part) {
|
|
1743
|
+
return null;
|
|
1744
|
+
}
|
|
1745
|
+
const isUrl = index % 2 === 1;
|
|
1746
|
+
if (!isUrl) {
|
|
1747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react19.default.Fragment, { children: part }, `${keyPrefix}-${index}`);
|
|
1748
|
+
}
|
|
1749
|
+
const trimmed = part.replace(/[.,;:!?)\]]+$/, "");
|
|
1750
|
+
const trailing = part.slice(trimmed.length);
|
|
1751
|
+
const href = trimmed.startsWith("www.") ? `https://${trimmed}` : trimmed;
|
|
1752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react19.default.Fragment, { children: [
|
|
1753
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1754
|
+
"a",
|
|
1755
|
+
{
|
|
1756
|
+
href,
|
|
1757
|
+
target: "_blank",
|
|
1758
|
+
rel: "noopener noreferrer nofollow ugc",
|
|
1759
|
+
className: "comment-node-link bg-info-weak",
|
|
1760
|
+
style: LINK_STYLE,
|
|
1761
|
+
children: trimmed
|
|
1762
|
+
}
|
|
1763
|
+
),
|
|
1764
|
+
trailing
|
|
1765
|
+
] }, `${keyPrefix}-${index}`);
|
|
1766
|
+
});
|
|
1767
|
+
};
|
|
1734
1768
|
TextLeafNode = ({ node }) => {
|
|
1735
|
-
let content = node.text;
|
|
1769
|
+
let content = node.code ? node.text : linkifyText(node.text ?? "", node.id ?? "comment-text");
|
|
1736
1770
|
if (node.code) content = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("code", { className: "comment-node-code", children: content });
|
|
1737
1771
|
if (node.bold) content = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("strong", { children: content });
|
|
1738
1772
|
if (node.italic) content = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("em", { children: content });
|
|
@@ -1771,8 +1805,18 @@ var init_CommentNodeRenderer = __esm({
|
|
|
1771
1805
|
const element = asElementNode(node);
|
|
1772
1806
|
const key = element.id ?? element.type;
|
|
1773
1807
|
switch (element.type) {
|
|
1774
|
-
case "paragraph":
|
|
1775
|
-
|
|
1808
|
+
case "paragraph": {
|
|
1809
|
+
const paragraphChildren = element.children ?? [];
|
|
1810
|
+
const isEmptyParagraph = paragraphChildren.length === 0 || paragraphChildren.every((child) => isTextNode(child) && (child.text ?? "").length === 0);
|
|
1811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1812
|
+
"p",
|
|
1813
|
+
{
|
|
1814
|
+
className: "comment-node-paragraph",
|
|
1815
|
+
style: { margin: 0, whiteSpace: "pre-wrap", wordBreak: "break-word" },
|
|
1816
|
+
children: isEmptyParagraph ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("br", {}) : renderChildren(element.children, key, assetBaseUrl)
|
|
1817
|
+
}
|
|
1818
|
+
);
|
|
1819
|
+
}
|
|
1776
1820
|
case "heading": {
|
|
1777
1821
|
const level = headingLevelFromTag(element.tag ?? element.level);
|
|
1778
1822
|
const HeadingTag = `h${level}`;
|
|
@@ -1798,7 +1842,17 @@ var init_CommentNodeRenderer = __esm({
|
|
|
1798
1842
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CommentFileNode_default, { node: element, assetBaseUrl });
|
|
1799
1843
|
case "link": {
|
|
1800
1844
|
const url = typeof element.url === "string" ? element.url : "#";
|
|
1801
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1846
|
+
"a",
|
|
1847
|
+
{
|
|
1848
|
+
href: url,
|
|
1849
|
+
target: "_blank",
|
|
1850
|
+
rel: "noopener noreferrer",
|
|
1851
|
+
className: "comment-node-link bg-info-weak",
|
|
1852
|
+
style: LINK_STYLE,
|
|
1853
|
+
children: renderChildren(element.children, key, assetBaseUrl)
|
|
1854
|
+
}
|
|
1855
|
+
);
|
|
1802
1856
|
}
|
|
1803
1857
|
case "mention": {
|
|
1804
1858
|
const label = element.label ?? element.mentionName ?? element.text ?? "";
|
|
@@ -2159,7 +2213,6 @@ var init_InputControlType = __esm({
|
|
|
2159
2213
|
moneyInput: "money",
|
|
2160
2214
|
select: "select",
|
|
2161
2215
|
percentageInput: "percentage",
|
|
2162
|
-
asset: "asset",
|
|
2163
2216
|
assetUpload: "assetUpload",
|
|
2164
2217
|
phoneInput: "phone",
|
|
2165
2218
|
numberInput: "numberInput",
|
|
@@ -2170,11 +2223,9 @@ var init_InputControlType = __esm({
|
|
|
2170
2223
|
colorInput: "colorInput",
|
|
2171
2224
|
selectWithSearchInput: "selectWithSearchInput",
|
|
2172
2225
|
selectWithSearchPanel: "selectWithSearchPanel",
|
|
2173
|
-
booleanSelect: "booleanSelect",
|
|
2174
2226
|
switchInput: "switchInput",
|
|
2175
2227
|
dateInput: "dateInput",
|
|
2176
2228
|
radioInput: "radioInput",
|
|
2177
|
-
switcher: "switcher",
|
|
2178
2229
|
videoInput: "videoInput",
|
|
2179
2230
|
referenceInput: "referenceInput"
|
|
2180
2231
|
};
|
|
@@ -3469,106 +3520,13 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
3469
3520
|
}
|
|
3470
3521
|
});
|
|
3471
3522
|
|
|
3472
|
-
// src/components/controls/edit/BooleanSelect.tsx
|
|
3473
|
-
var import_react38, import_jsx_runtime46, BooleanSelect, BooleanSelect_default;
|
|
3474
|
-
var init_BooleanSelect = __esm({
|
|
3475
|
-
"src/components/controls/edit/BooleanSelect.tsx"() {
|
|
3476
|
-
"use strict";
|
|
3477
|
-
import_react38 = __toESM(require("react"));
|
|
3478
|
-
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3479
|
-
BooleanSelect = (props) => {
|
|
3480
|
-
const [list, setList] = (0, import_react38.useState)();
|
|
3481
|
-
const textChangeHandler = (event) => {
|
|
3482
|
-
const text = event.target.value;
|
|
3483
|
-
const boolValue = text?.toLowerCase() === "true" || text === "1";
|
|
3484
|
-
if (props.callback !== void 0) {
|
|
3485
|
-
props.callback({
|
|
3486
|
-
name: props.name,
|
|
3487
|
-
value: boolValue,
|
|
3488
|
-
index: props.index,
|
|
3489
|
-
groupKey: props.groupKey
|
|
3490
|
-
});
|
|
3491
|
-
}
|
|
3492
|
-
};
|
|
3493
|
-
(0, import_react38.useEffect)(() => {
|
|
3494
|
-
async function fetchData() {
|
|
3495
|
-
console.log("in select");
|
|
3496
|
-
if (props.dataset) {
|
|
3497
|
-
setList(props.dataset);
|
|
3498
|
-
} else if (props.dataSource && props.dataSource != "" && props.serviceClient) {
|
|
3499
|
-
let dataSource = props.dataSource;
|
|
3500
|
-
let response;
|
|
3501
|
-
if (props.dataSourceDependsOn) {
|
|
3502
|
-
if (props.dependentValue) {
|
|
3503
|
-
dataSource = dataSource.replace(
|
|
3504
|
-
`{${props.dataSourceDependsOn}}`,
|
|
3505
|
-
props.dependentValue
|
|
3506
|
-
);
|
|
3507
|
-
response = await props.serviceClient.get(dataSource);
|
|
3508
|
-
setList(response.result);
|
|
3509
|
-
}
|
|
3510
|
-
} else {
|
|
3511
|
-
response = await props.serviceClient.get(dataSource);
|
|
3512
|
-
setList(response.result);
|
|
3513
|
-
}
|
|
3514
|
-
}
|
|
3515
|
-
}
|
|
3516
|
-
fetchData();
|
|
3517
|
-
}, [
|
|
3518
|
-
props.dataSource,
|
|
3519
|
-
props.dependentValue,
|
|
3520
|
-
props.dataset,
|
|
3521
|
-
props.dataSourceDependsOn
|
|
3522
|
-
]);
|
|
3523
|
-
let value;
|
|
3524
|
-
if (props.value !== void 0 && props.value !== null) {
|
|
3525
|
-
value = props.value;
|
|
3526
|
-
}
|
|
3527
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react38.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "block", children: [
|
|
3528
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
3529
|
-
" ",
|
|
3530
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
3531
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3532
|
-
"select",
|
|
3533
|
-
{
|
|
3534
|
-
name: props.name,
|
|
3535
|
-
id: props.name,
|
|
3536
|
-
value,
|
|
3537
|
-
onChange: textChangeHandler,
|
|
3538
|
-
required: props?.attributes?.required,
|
|
3539
|
-
placeholder: props?.attributes?.placeholder,
|
|
3540
|
-
disabled: props?.attributes?.readOnly,
|
|
3541
|
-
className: "peer mt-1 py-1.5 block w-full text-black rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n ",
|
|
3542
|
-
children: [
|
|
3543
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
3544
|
-
list && list.map((item, i) => {
|
|
3545
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3546
|
-
"option",
|
|
3547
|
-
{
|
|
3548
|
-
className: "fac-select-option",
|
|
3549
|
-
value: item[props.dataKeyFieldName],
|
|
3550
|
-
children: item[props.dataTextFieldName]
|
|
3551
|
-
},
|
|
3552
|
-
item[props.dataKeyFieldName]
|
|
3553
|
-
);
|
|
3554
|
-
})
|
|
3555
|
-
]
|
|
3556
|
-
}
|
|
3557
|
-
),
|
|
3558
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
3559
|
-
] }) });
|
|
3560
|
-
};
|
|
3561
|
-
BooleanSelect_default = BooleanSelect;
|
|
3562
|
-
}
|
|
3563
|
-
});
|
|
3564
|
-
|
|
3565
3523
|
// src/components/controls/edit/EmailInput.tsx
|
|
3566
|
-
var
|
|
3524
|
+
var import_react38, import_jsx_runtime46, EmailInput, EmailInput_default;
|
|
3567
3525
|
var init_EmailInput = __esm({
|
|
3568
3526
|
"src/components/controls/edit/EmailInput.tsx"() {
|
|
3569
3527
|
"use strict";
|
|
3570
|
-
|
|
3571
|
-
|
|
3528
|
+
import_react38 = __toESM(require("react"));
|
|
3529
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3572
3530
|
EmailInput = (props) => {
|
|
3573
3531
|
const textChangeHandler = (event) => {
|
|
3574
3532
|
const text = event.target.value;
|
|
@@ -3593,11 +3551,11 @@ var init_EmailInput = __esm({
|
|
|
3593
3551
|
if (props.value !== void 0 && props.value !== null) {
|
|
3594
3552
|
value = props.value;
|
|
3595
3553
|
}
|
|
3596
|
-
return /* @__PURE__ */ (0,
|
|
3597
|
-
/* @__PURE__ */ (0,
|
|
3554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react38.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "block mb-1", children: [
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
3598
3556
|
" ",
|
|
3599
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
3600
|
-
/* @__PURE__ */ (0,
|
|
3557
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
3558
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3601
3559
|
"input",
|
|
3602
3560
|
{
|
|
3603
3561
|
type: "email",
|
|
@@ -3613,7 +3571,7 @@ var init_EmailInput = __esm({
|
|
|
3613
3571
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
3614
3572
|
}
|
|
3615
3573
|
),
|
|
3616
|
-
/* @__PURE__ */ (0,
|
|
3574
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
3617
3575
|
] }) });
|
|
3618
3576
|
};
|
|
3619
3577
|
EmailInput_default = EmailInput;
|
|
@@ -3621,13 +3579,13 @@ var init_EmailInput = __esm({
|
|
|
3621
3579
|
});
|
|
3622
3580
|
|
|
3623
3581
|
// src/components/controls/edit/TimeInput.tsx
|
|
3624
|
-
var
|
|
3582
|
+
var import_react39, import_jsx_runtime47, TimeInput, TimeInput_default;
|
|
3625
3583
|
var init_TimeInput = __esm({
|
|
3626
3584
|
"src/components/controls/edit/TimeInput.tsx"() {
|
|
3627
3585
|
"use strict";
|
|
3628
3586
|
"use client";
|
|
3629
|
-
|
|
3630
|
-
|
|
3587
|
+
import_react39 = __toESM(require("react"));
|
|
3588
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3631
3589
|
TimeInput = (props) => {
|
|
3632
3590
|
const timeChangeHandler = (event) => {
|
|
3633
3591
|
const timeValue = event.target.value;
|
|
@@ -3640,11 +3598,11 @@ var init_TimeInput = __esm({
|
|
|
3640
3598
|
});
|
|
3641
3599
|
}
|
|
3642
3600
|
};
|
|
3643
|
-
return /* @__PURE__ */ (0,
|
|
3644
|
-
/* @__PURE__ */ (0,
|
|
3601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react39.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "block mb-1", children: [
|
|
3602
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
3645
3603
|
" ",
|
|
3646
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
3647
|
-
/* @__PURE__ */ (0,
|
|
3604
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
3605
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3648
3606
|
"input",
|
|
3649
3607
|
{
|
|
3650
3608
|
type: "time",
|
|
@@ -3657,7 +3615,7 @@ var init_TimeInput = __esm({
|
|
|
3657
3615
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
|
|
3658
3616
|
}
|
|
3659
3617
|
) }),
|
|
3660
|
-
/* @__PURE__ */ (0,
|
|
3618
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
3661
3619
|
] }) });
|
|
3662
3620
|
};
|
|
3663
3621
|
TimeInput_default = TimeInput;
|
|
@@ -3672,7 +3630,7 @@ function Hyperlink(props) {
|
|
|
3672
3630
|
if (target == "_blank") {
|
|
3673
3631
|
additionalProps.rel = "noopener noreferrer";
|
|
3674
3632
|
}
|
|
3675
|
-
return /* @__PURE__ */ (0,
|
|
3633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3676
3634
|
import_link.default,
|
|
3677
3635
|
{
|
|
3678
3636
|
href: props.href,
|
|
@@ -3682,65 +3640,65 @@ function Hyperlink(props) {
|
|
|
3682
3640
|
target,
|
|
3683
3641
|
children: props.children
|
|
3684
3642
|
}
|
|
3685
|
-
) : props.isHeading ? /* @__PURE__ */ (0,
|
|
3643
|
+
) : props.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: props.className, children: props.children }) });
|
|
3686
3644
|
}
|
|
3687
|
-
var import_link,
|
|
3645
|
+
var import_link, import_jsx_runtime48;
|
|
3688
3646
|
var init_Hyperlink = __esm({
|
|
3689
3647
|
"src/components/dataForm/Hyperlink.tsx"() {
|
|
3690
3648
|
"use strict";
|
|
3691
3649
|
import_link = __toESM(require("next/link"));
|
|
3692
3650
|
init_StyleTypes();
|
|
3693
|
-
|
|
3651
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3694
3652
|
}
|
|
3695
3653
|
});
|
|
3696
3654
|
|
|
3697
3655
|
// src/svg/chevron-updown.tsx
|
|
3698
|
-
var
|
|
3656
|
+
var import_jsx_runtime49, ChevronUpDown, chevron_updown_default;
|
|
3699
3657
|
var init_chevron_updown = __esm({
|
|
3700
3658
|
"src/svg/chevron-updown.tsx"() {
|
|
3701
3659
|
"use strict";
|
|
3702
|
-
|
|
3660
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3703
3661
|
ChevronUpDown = (props) => {
|
|
3704
|
-
return /* @__PURE__ */ (0,
|
|
3662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("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__ */ (0, import_jsx_runtime49.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
3705
3663
|
};
|
|
3706
3664
|
chevron_updown_default = ChevronUpDown;
|
|
3707
3665
|
}
|
|
3708
3666
|
});
|
|
3709
3667
|
|
|
3710
3668
|
// src/svg/chevron-down.tsx
|
|
3711
|
-
var
|
|
3669
|
+
var import_jsx_runtime50, ChevronDown, chevron_down_default;
|
|
3712
3670
|
var init_chevron_down = __esm({
|
|
3713
3671
|
"src/svg/chevron-down.tsx"() {
|
|
3714
3672
|
"use strict";
|
|
3715
|
-
|
|
3673
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3716
3674
|
ChevronDown = (props) => {
|
|
3717
|
-
return /* @__PURE__ */ (0,
|
|
3675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("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__ */ (0, import_jsx_runtime50.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
3718
3676
|
};
|
|
3719
3677
|
chevron_down_default = ChevronDown;
|
|
3720
3678
|
}
|
|
3721
3679
|
});
|
|
3722
3680
|
|
|
3723
3681
|
// src/svg/chevron-up.tsx
|
|
3724
|
-
var
|
|
3682
|
+
var import_jsx_runtime51, ChevronUp, chevron_up_default;
|
|
3725
3683
|
var init_chevron_up = __esm({
|
|
3726
3684
|
"src/svg/chevron-up.tsx"() {
|
|
3727
3685
|
"use strict";
|
|
3728
|
-
|
|
3686
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3729
3687
|
ChevronUp = (props) => {
|
|
3730
|
-
return /* @__PURE__ */ (0,
|
|
3688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("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__ */ (0, import_jsx_runtime51.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
3731
3689
|
};
|
|
3732
3690
|
chevron_up_default = ChevronUp;
|
|
3733
3691
|
}
|
|
3734
3692
|
});
|
|
3735
3693
|
|
|
3736
3694
|
// src/svg/plus.tsx
|
|
3737
|
-
var
|
|
3695
|
+
var import_jsx_runtime52, Plus, plus_default;
|
|
3738
3696
|
var init_plus = __esm({
|
|
3739
3697
|
"src/svg/plus.tsx"() {
|
|
3740
3698
|
"use strict";
|
|
3741
|
-
|
|
3699
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3742
3700
|
Plus = (props) => {
|
|
3743
|
-
return /* @__PURE__ */ (0,
|
|
3701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("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__ */ (0, import_jsx_runtime52.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
3744
3702
|
};
|
|
3745
3703
|
plus_default = Plus;
|
|
3746
3704
|
}
|
|
@@ -3766,37 +3724,37 @@ var init_Icons = __esm({
|
|
|
3766
3724
|
});
|
|
3767
3725
|
|
|
3768
3726
|
// src/svg/Icon.tsx
|
|
3769
|
-
var
|
|
3727
|
+
var import_jsx_runtime53, Icon, Icon_default;
|
|
3770
3728
|
var init_Icon = __esm({
|
|
3771
3729
|
"src/svg/Icon.tsx"() {
|
|
3772
3730
|
"use strict";
|
|
3773
3731
|
init_Icons();
|
|
3774
|
-
|
|
3732
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3775
3733
|
Icon = ({ name, className, ...props }) => {
|
|
3776
3734
|
const IconComponent = Icons_default[name];
|
|
3777
3735
|
if (!IconComponent) {
|
|
3778
3736
|
console.error(`Icon "${name}" not found.`);
|
|
3779
3737
|
return null;
|
|
3780
3738
|
}
|
|
3781
|
-
return /* @__PURE__ */ (0,
|
|
3739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(IconComponent, { ...props, className });
|
|
3782
3740
|
};
|
|
3783
3741
|
Icon_default = Icon;
|
|
3784
3742
|
}
|
|
3785
3743
|
});
|
|
3786
3744
|
|
|
3787
3745
|
// src/components/controls/edit/AssetUpload.tsx
|
|
3788
|
-
var
|
|
3746
|
+
var import_react40, import_jsx_runtime54, AssetUpload, AssetUpload_default;
|
|
3789
3747
|
var init_AssetUpload = __esm({
|
|
3790
3748
|
"src/components/controls/edit/AssetUpload.tsx"() {
|
|
3791
3749
|
"use strict";
|
|
3792
3750
|
"use client";
|
|
3793
|
-
|
|
3751
|
+
import_react40 = __toESM(require("react"));
|
|
3794
3752
|
init_ClientButton();
|
|
3795
3753
|
init_StyleTypes();
|
|
3796
3754
|
init_AssetUtility();
|
|
3797
3755
|
init_Hyperlink();
|
|
3798
3756
|
init_Icon();
|
|
3799
|
-
|
|
3757
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3800
3758
|
AssetUpload = (props) => {
|
|
3801
3759
|
const isDisabled = props.attributes?.disable ?? false;
|
|
3802
3760
|
let allValues = [];
|
|
@@ -3817,8 +3775,8 @@ var init_AssetUpload = __esm({
|
|
|
3817
3775
|
}
|
|
3818
3776
|
return "image";
|
|
3819
3777
|
};
|
|
3820
|
-
const [assetType, setAssetType] =
|
|
3821
|
-
(0,
|
|
3778
|
+
const [assetType, setAssetType] = import_react40.default.useState(getInitialTab);
|
|
3779
|
+
(0, import_react40.useEffect)(() => {
|
|
3822
3780
|
setAssetType(getInitialTab());
|
|
3823
3781
|
}, [props.value]);
|
|
3824
3782
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -3893,10 +3851,10 @@ var init_AssetUpload = __esm({
|
|
|
3893
3851
|
}
|
|
3894
3852
|
return false;
|
|
3895
3853
|
};
|
|
3896
|
-
return /* @__PURE__ */ (0,
|
|
3897
|
-
/* @__PURE__ */ (0,
|
|
3898
|
-
/* @__PURE__ */ (0,
|
|
3899
|
-
/* @__PURE__ */ (0,
|
|
3854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react40.default.Fragment, { children: [
|
|
3855
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("label", { className: "block mb-1", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
3856
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
3857
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3900
3858
|
ClientButton_default,
|
|
3901
3859
|
{
|
|
3902
3860
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -3906,7 +3864,7 @@ var init_AssetUpload = __esm({
|
|
|
3906
3864
|
children: "Image Upload"
|
|
3907
3865
|
}
|
|
3908
3866
|
),
|
|
3909
|
-
/* @__PURE__ */ (0,
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3910
3868
|
ClientButton_default,
|
|
3911
3869
|
{
|
|
3912
3870
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -3917,13 +3875,13 @@ var init_AssetUpload = __esm({
|
|
|
3917
3875
|
}
|
|
3918
3876
|
)
|
|
3919
3877
|
] }),
|
|
3920
|
-
shouldShowDetails() && /* @__PURE__ */ (0,
|
|
3921
|
-
/* @__PURE__ */ (0,
|
|
3922
|
-
/* @__PURE__ */ (0,
|
|
3923
|
-
/* @__PURE__ */ (0,
|
|
3924
|
-
/* @__PURE__ */ (0,
|
|
3925
|
-
/* @__PURE__ */ (0,
|
|
3926
|
-
/* @__PURE__ */ (0,
|
|
3878
|
+
shouldShowDetails() && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
3879
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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" }),
|
|
3880
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex justify-between items-start gap-5", children: [
|
|
3881
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
3882
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
|
|
3883
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-gray-500", children: "Title" }),
|
|
3884
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3927
3885
|
"input",
|
|
3928
3886
|
{
|
|
3929
3887
|
type: "text",
|
|
@@ -3935,18 +3893,18 @@ var init_AssetUpload = __esm({
|
|
|
3935
3893
|
}
|
|
3936
3894
|
)
|
|
3937
3895
|
] }),
|
|
3938
|
-
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0,
|
|
3939
|
-
/* @__PURE__ */ (0,
|
|
3940
|
-
/* @__PURE__ */ (0,
|
|
3896
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-gray-500", children: "Resolution" }),
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
3941
3899
|
digitalAsset.intrinsicWidth,
|
|
3942
3900
|
"\xD7",
|
|
3943
3901
|
digitalAsset.intrinsicHeight
|
|
3944
3902
|
] })
|
|
3945
3903
|
] }),
|
|
3946
|
-
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0,
|
|
3947
|
-
/* @__PURE__ */ (0,
|
|
3948
|
-
/* @__PURE__ */ (0,
|
|
3949
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0,
|
|
3904
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
|
|
3905
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
3906
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
3907
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3950
3908
|
"img",
|
|
3951
3909
|
{
|
|
3952
3910
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -3954,7 +3912,7 @@ var init_AssetUpload = __esm({
|
|
|
3954
3912
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
3955
3913
|
}
|
|
3956
3914
|
),
|
|
3957
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0,
|
|
3915
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3958
3916
|
"img",
|
|
3959
3917
|
{
|
|
3960
3918
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -3964,9 +3922,9 @@ var init_AssetUpload = __esm({
|
|
|
3964
3922
|
)
|
|
3965
3923
|
] })
|
|
3966
3924
|
] }),
|
|
3967
|
-
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0,
|
|
3968
|
-
/* @__PURE__ */ (0,
|
|
3969
|
-
/* @__PURE__ */ (0,
|
|
3925
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "col-span-2", children: [
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3970
3928
|
Hyperlink,
|
|
3971
3929
|
{
|
|
3972
3930
|
href: digitalAsset.assetUrl,
|
|
@@ -3977,12 +3935,12 @@ var init_AssetUpload = __esm({
|
|
|
3977
3935
|
)
|
|
3978
3936
|
] })
|
|
3979
3937
|
] }),
|
|
3980
|
-
/* @__PURE__ */ (0,
|
|
3938
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3981
3939
|
"span",
|
|
3982
3940
|
{
|
|
3983
3941
|
onClick: () => !isDisabled && deleteFile(index),
|
|
3984
3942
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
3985
|
-
children: /* @__PURE__ */ (0,
|
|
3943
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
3986
3944
|
}
|
|
3987
3945
|
)
|
|
3988
3946
|
] }, index)) })
|
|
@@ -3994,12 +3952,12 @@ var init_AssetUpload = __esm({
|
|
|
3994
3952
|
});
|
|
3995
3953
|
|
|
3996
3954
|
// src/components/controls/edit/SwitchInput.tsx
|
|
3997
|
-
var
|
|
3955
|
+
var import_react41, import_jsx_runtime55, SwitchInput, SwitchInput_default;
|
|
3998
3956
|
var init_SwitchInput = __esm({
|
|
3999
3957
|
"src/components/controls/edit/SwitchInput.tsx"() {
|
|
4000
3958
|
"use strict";
|
|
4001
|
-
|
|
4002
|
-
|
|
3959
|
+
import_react41 = __toESM(require("react"));
|
|
3960
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4003
3961
|
SwitchInput = (props) => {
|
|
4004
3962
|
const textChangeHandler = (event) => {
|
|
4005
3963
|
let text = event.target.checked;
|
|
@@ -4016,28 +3974,28 @@ var init_SwitchInput = __esm({
|
|
|
4016
3974
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
4017
3975
|
value = true;
|
|
4018
3976
|
}
|
|
4019
|
-
return /* @__PURE__ */ (0,
|
|
4020
|
-
/* @__PURE__ */ (0,
|
|
4021
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
3977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react41.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-start justify-between gap-4 py-3", children: [
|
|
3978
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0", children: [
|
|
3979
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
4022
3980
|
"label",
|
|
4023
3981
|
{
|
|
4024
3982
|
htmlFor: props.name,
|
|
4025
3983
|
className: "inline-block text-sm font-semibold text-slate-800",
|
|
4026
3984
|
children: [
|
|
4027
3985
|
props.attributes.label,
|
|
4028
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
3986
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
4029
3987
|
]
|
|
4030
3988
|
}
|
|
4031
3989
|
),
|
|
4032
|
-
/* @__PURE__ */ (0,
|
|
3990
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage || "" })
|
|
4033
3991
|
] }),
|
|
4034
|
-
/* @__PURE__ */ (0,
|
|
3992
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
4035
3993
|
"label",
|
|
4036
3994
|
{
|
|
4037
3995
|
htmlFor: props.name,
|
|
4038
3996
|
className: "relative inline-flex shrink-0 cursor-pointer items-center peer-disabled:cursor-not-allowed",
|
|
4039
3997
|
children: [
|
|
4040
|
-
/* @__PURE__ */ (0,
|
|
3998
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4041
3999
|
"input",
|
|
4042
4000
|
{
|
|
4043
4001
|
type: "checkbox",
|
|
@@ -4050,13 +4008,13 @@ var init_SwitchInput = __esm({
|
|
|
4050
4008
|
className: "peer sr-only"
|
|
4051
4009
|
}
|
|
4052
4010
|
),
|
|
4053
|
-
/* @__PURE__ */ (0,
|
|
4011
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4054
4012
|
"div",
|
|
4055
4013
|
{
|
|
4056
4014
|
className: "h-6 w-11 rounded-full bg-slate-200 shadow-inner\n transition-colors duration-200 ease-in-out\n peer-checked:bg-blue-600\n peer-focus-visible:ring-2 peer-focus-visible:ring-blue-300 peer-focus-visible:ring-offset-2\n peer-disabled:bg-slate-100"
|
|
4057
4015
|
}
|
|
4058
4016
|
),
|
|
4059
|
-
/* @__PURE__ */ (0,
|
|
4017
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4060
4018
|
"div",
|
|
4061
4019
|
{
|
|
4062
4020
|
className: "absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-default shadow\n transition-transform duration-200 ease-in-out\n peer-checked:translate-x-5\n peer-disabled:bg-slate-50"
|
|
@@ -4154,15 +4112,15 @@ var init_DateTimeUtility = __esm({
|
|
|
4154
4112
|
});
|
|
4155
4113
|
|
|
4156
4114
|
// src/components/controls/edit/DateInput.tsx
|
|
4157
|
-
var
|
|
4115
|
+
var import_react42, import_jsx_runtime56, DateInput, DateInput_default;
|
|
4158
4116
|
var init_DateInput = __esm({
|
|
4159
4117
|
"src/components/controls/edit/DateInput.tsx"() {
|
|
4160
4118
|
"use strict";
|
|
4161
|
-
|
|
4119
|
+
import_react42 = require("react");
|
|
4162
4120
|
init_DateTimeUtility();
|
|
4163
|
-
|
|
4121
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4164
4122
|
DateInput = (props) => {
|
|
4165
|
-
const value = (0,
|
|
4123
|
+
const value = (0, import_react42.useMemo)(() => {
|
|
4166
4124
|
if (props.value === void 0 || props.value === null || props.value === "") {
|
|
4167
4125
|
return "";
|
|
4168
4126
|
}
|
|
@@ -4194,11 +4152,11 @@ var init_DateInput = __esm({
|
|
|
4194
4152
|
groupKey: props.groupKey
|
|
4195
4153
|
});
|
|
4196
4154
|
};
|
|
4197
|
-
return /* @__PURE__ */ (0,
|
|
4198
|
-
props.attributes?.label && /* @__PURE__ */ (0,
|
|
4155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("label", { className: "block mb-1", children: [
|
|
4156
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-sm font-medium", children: props.attributes.label }),
|
|
4199
4157
|
" ",
|
|
4200
|
-
props.attributes?.label && props.attributes.required && /* @__PURE__ */ (0,
|
|
4201
|
-
/* @__PURE__ */ (0,
|
|
4158
|
+
props.attributes?.label && props.attributes.required && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
4159
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4202
4160
|
"input",
|
|
4203
4161
|
{
|
|
4204
4162
|
type: "date",
|
|
@@ -4212,7 +4170,7 @@ var init_DateInput = __esm({
|
|
|
4212
4170
|
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
4213
4171
|
}
|
|
4214
4172
|
),
|
|
4215
|
-
/* @__PURE__ */ (0,
|
|
4173
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
4216
4174
|
] });
|
|
4217
4175
|
};
|
|
4218
4176
|
DateInput_default = DateInput;
|
|
@@ -4220,16 +4178,16 @@ var init_DateInput = __esm({
|
|
|
4220
4178
|
});
|
|
4221
4179
|
|
|
4222
4180
|
// src/components/controls/edit/RadioInput.tsx
|
|
4223
|
-
var
|
|
4181
|
+
var import_react43, import_jsx_runtime57, RadioInput, RadioInput_default;
|
|
4224
4182
|
var init_RadioInput = __esm({
|
|
4225
4183
|
"src/components/controls/edit/RadioInput.tsx"() {
|
|
4226
4184
|
"use strict";
|
|
4227
|
-
|
|
4185
|
+
import_react43 = require("react");
|
|
4228
4186
|
init_Icon();
|
|
4229
|
-
|
|
4187
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4230
4188
|
RadioInput = (props) => {
|
|
4231
|
-
const [list, setList] = (0,
|
|
4232
|
-
(0,
|
|
4189
|
+
const [list, setList] = (0, import_react43.useState)([]);
|
|
4190
|
+
(0, import_react43.useEffect)(() => {
|
|
4233
4191
|
async function loadData() {
|
|
4234
4192
|
if (props.dataset) {
|
|
4235
4193
|
setList(props.dataset);
|
|
@@ -4271,22 +4229,22 @@ var init_RadioInput = __esm({
|
|
|
4271
4229
|
});
|
|
4272
4230
|
}
|
|
4273
4231
|
};
|
|
4274
|
-
return /* @__PURE__ */ (0,
|
|
4275
|
-
/* @__PURE__ */ (0,
|
|
4276
|
-
/* @__PURE__ */ (0,
|
|
4232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "block", children: [
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
4234
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-col gap-3", children: list.map((item, index) => {
|
|
4277
4235
|
const itemValue = item[props.dataKeyFieldName];
|
|
4278
4236
|
const isSelected = String(itemValue) === String(props.value ?? "");
|
|
4279
4237
|
const isRecommended = props.dataRecommendedValue !== void 0 && String(itemValue) === String(props.dataRecommendedValue);
|
|
4280
4238
|
const resultClassName = isSelected ? isRecommended ? "bg-success" : props.dataRecommendedValue ? "bg-alert" : "border-transparent" : "border-transparent";
|
|
4281
4239
|
const iconName = isSelected && props.dataRecommendedValue ? isRecommended ? "checkCircle" : "xCircle" : void 0;
|
|
4282
4240
|
const inputId = `${props.name}-${props.index ?? 0}-id-${index}`;
|
|
4283
|
-
return /* @__PURE__ */ (0,
|
|
4241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
4284
4242
|
"div",
|
|
4285
4243
|
{
|
|
4286
4244
|
className: `font-normal flex items-center justify-between gap-4 cursor-pointer border rounded p-2 ${resultClassName}`,
|
|
4287
4245
|
children: [
|
|
4288
|
-
/* @__PURE__ */ (0,
|
|
4289
|
-
/* @__PURE__ */ (0,
|
|
4246
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex gap-4 items-start", children: [
|
|
4247
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4290
4248
|
"input",
|
|
4291
4249
|
{
|
|
4292
4250
|
type: "radio",
|
|
@@ -4300,125 +4258,30 @@ var init_RadioInput = __esm({
|
|
|
4300
4258
|
required: props.attributes?.required
|
|
4301
4259
|
}
|
|
4302
4260
|
),
|
|
4303
|
-
/* @__PURE__ */ (0,
|
|
4261
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("label", { className: "text-body-950 pr-2", htmlFor: inputId, children: item[props.dataTextFieldName] })
|
|
4304
4262
|
] }),
|
|
4305
|
-
iconName && /* @__PURE__ */ (0,
|
|
4263
|
+
iconName && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon_default, { className: "w-5 h-5 text-success", name: iconName })
|
|
4306
4264
|
]
|
|
4307
4265
|
},
|
|
4308
4266
|
String(itemValue)
|
|
4309
4267
|
);
|
|
4310
4268
|
}) }),
|
|
4311
|
-
/* @__PURE__ */ (0,
|
|
4269
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
4312
4270
|
] });
|
|
4313
4271
|
};
|
|
4314
4272
|
RadioInput_default = RadioInput;
|
|
4315
4273
|
}
|
|
4316
4274
|
});
|
|
4317
4275
|
|
|
4318
|
-
// src/components/controls/edit/Switcher.tsx
|
|
4319
|
-
var import_react45, import_jsx_runtime59, Switcher, Switcher_default;
|
|
4320
|
-
var init_Switcher = __esm({
|
|
4321
|
-
"src/components/controls/edit/Switcher.tsx"() {
|
|
4322
|
-
"use strict";
|
|
4323
|
-
import_react45 = require("react");
|
|
4324
|
-
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4325
|
-
Switcher = (props) => {
|
|
4326
|
-
const [list, setList] = (0, import_react45.useState)([]);
|
|
4327
|
-
(0, import_react45.useEffect)(() => {
|
|
4328
|
-
async function loadData() {
|
|
4329
|
-
if (props.dataset) {
|
|
4330
|
-
setList(props.dataset);
|
|
4331
|
-
return;
|
|
4332
|
-
}
|
|
4333
|
-
if (!props.dataSource || !props.serviceClient) {
|
|
4334
|
-
setList([]);
|
|
4335
|
-
return;
|
|
4336
|
-
}
|
|
4337
|
-
let dataSource = props.dataSource;
|
|
4338
|
-
if (props.dataSourceDependsOn) {
|
|
4339
|
-
if (!props.dependentValue) {
|
|
4340
|
-
setList([]);
|
|
4341
|
-
return;
|
|
4342
|
-
}
|
|
4343
|
-
dataSource = dataSource.replace(
|
|
4344
|
-
`{${props.dataSourceDependsOn}}`,
|
|
4345
|
-
props.dependentValue
|
|
4346
|
-
);
|
|
4347
|
-
}
|
|
4348
|
-
const response = await props.serviceClient.get(dataSource);
|
|
4349
|
-
setList(response.result ?? []);
|
|
4350
|
-
}
|
|
4351
|
-
loadData();
|
|
4352
|
-
}, [
|
|
4353
|
-
props.dataSource,
|
|
4354
|
-
props.dataSourceDependsOn,
|
|
4355
|
-
props.dataset,
|
|
4356
|
-
props.dependentValue,
|
|
4357
|
-
props.serviceClient
|
|
4358
|
-
]);
|
|
4359
|
-
const changeHandler = (event) => {
|
|
4360
|
-
props.callback?.({
|
|
4361
|
-
name: props.name,
|
|
4362
|
-
value: event.target.value,
|
|
4363
|
-
index: props.index,
|
|
4364
|
-
groupKey: props.groupKey
|
|
4365
|
-
});
|
|
4366
|
-
};
|
|
4367
|
-
const value = props.value === void 0 || props.value === null ? "" : String(props.value);
|
|
4368
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("label", { className: "block mb-1", children: [
|
|
4369
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
4370
|
-
list.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4371
|
-
"input",
|
|
4372
|
-
{
|
|
4373
|
-
type: "text",
|
|
4374
|
-
name: props.name,
|
|
4375
|
-
id: props.name,
|
|
4376
|
-
value,
|
|
4377
|
-
onChange: changeHandler,
|
|
4378
|
-
required: props.attributes?.required,
|
|
4379
|
-
placeholder: props.attributes?.placeholder,
|
|
4380
|
-
disabled: props.attributes?.readOnly,
|
|
4381
|
-
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
4382
|
-
}
|
|
4383
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4384
|
-
"select",
|
|
4385
|
-
{
|
|
4386
|
-
name: props.name,
|
|
4387
|
-
id: props.name,
|
|
4388
|
-
value,
|
|
4389
|
-
onChange: changeHandler,
|
|
4390
|
-
required: props.attributes?.required,
|
|
4391
|
-
disabled: props.attributes?.readOnly,
|
|
4392
|
-
className: `peer select my-1 py-1 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`,
|
|
4393
|
-
children: [
|
|
4394
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
4395
|
-
list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4396
|
-
"option",
|
|
4397
|
-
{
|
|
4398
|
-
value: item[props.dataKeyFieldName],
|
|
4399
|
-
children: item[props.dataTextFieldName]
|
|
4400
|
-
},
|
|
4401
|
-
String(item[props.dataKeyFieldName])
|
|
4402
|
-
))
|
|
4403
|
-
]
|
|
4404
|
-
}
|
|
4405
|
-
),
|
|
4406
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
4407
|
-
] });
|
|
4408
|
-
};
|
|
4409
|
-
Switcher_default = Switcher;
|
|
4410
|
-
}
|
|
4411
|
-
});
|
|
4412
|
-
|
|
4413
4276
|
// src/components/controls/edit/ReferenceInput.tsx
|
|
4414
|
-
var
|
|
4277
|
+
var import_jsx_runtime58, ReferenceInput, ReferenceInput_default;
|
|
4415
4278
|
var init_ReferenceInput = __esm({
|
|
4416
4279
|
"src/components/controls/edit/ReferenceInput.tsx"() {
|
|
4417
4280
|
"use strict";
|
|
4418
4281
|
init_SelectWithSearchInput();
|
|
4419
|
-
|
|
4282
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4420
4283
|
ReferenceInput = (props) => {
|
|
4421
|
-
return /* @__PURE__ */ (0,
|
|
4284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectWithSearchInput_default, { ...props });
|
|
4422
4285
|
};
|
|
4423
4286
|
ReferenceInput_default = ReferenceInput;
|
|
4424
4287
|
}
|
|
@@ -4429,12 +4292,12 @@ var InputControlClient_exports = {};
|
|
|
4429
4292
|
__export(InputControlClient_exports, {
|
|
4430
4293
|
default: () => InputControlClient_default
|
|
4431
4294
|
});
|
|
4432
|
-
var
|
|
4295
|
+
var import_react44, import_jsx_runtime59, InputControl, InputControlClient_default;
|
|
4433
4296
|
var init_InputControlClient = __esm({
|
|
4434
4297
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
4435
4298
|
"use strict";
|
|
4436
4299
|
"use client";
|
|
4437
|
-
|
|
4300
|
+
import_react44 = __toESM(require("react"));
|
|
4438
4301
|
init_MultilineTextInput();
|
|
4439
4302
|
init_LineTextInput();
|
|
4440
4303
|
init_MoneyInput();
|
|
@@ -4449,17 +4312,15 @@ var init_InputControlClient = __esm({
|
|
|
4449
4312
|
init_ColorInput();
|
|
4450
4313
|
init_SelectWithSearchInput();
|
|
4451
4314
|
init_SelectWithSearchPanel();
|
|
4452
|
-
init_BooleanSelect();
|
|
4453
4315
|
init_EmailInput();
|
|
4454
4316
|
init_TimeInput();
|
|
4455
4317
|
init_AssetUpload();
|
|
4456
4318
|
init_SwitchInput();
|
|
4457
4319
|
init_DateInput();
|
|
4458
4320
|
init_RadioInput();
|
|
4459
|
-
init_Switcher();
|
|
4460
4321
|
init_ReferenceInput();
|
|
4461
|
-
|
|
4462
|
-
InputControl =
|
|
4322
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4323
|
+
InputControl = import_react44.default.forwardRef(
|
|
4463
4324
|
(props, ref) => {
|
|
4464
4325
|
const ControlComponents = {
|
|
4465
4326
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -4476,18 +4337,15 @@ var init_InputControlClient = __esm({
|
|
|
4476
4337
|
[InputControlType_default.colorInput]: ColorInput_default,
|
|
4477
4338
|
[InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
|
|
4478
4339
|
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
4479
|
-
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
4480
4340
|
[InputControlType_default.timeInput]: TimeInput_default,
|
|
4481
|
-
[InputControlType_default.asset]: AssetUpload_default,
|
|
4482
4341
|
[InputControlType_default.assetUpload]: AssetUpload_default,
|
|
4483
4342
|
[InputControlType_default.switchInput]: SwitchInput_default,
|
|
4484
4343
|
[InputControlType_default.dateInput]: DateInput_default,
|
|
4485
4344
|
[InputControlType_default.radioInput]: RadioInput_default,
|
|
4486
|
-
[InputControlType_default.switcher]: Switcher_default,
|
|
4487
4345
|
[InputControlType_default.referenceInput]: ReferenceInput_default
|
|
4488
4346
|
};
|
|
4489
4347
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
4490
|
-
return /* @__PURE__ */ (0,
|
|
4348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react44.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
4491
4349
|
}
|
|
4492
4350
|
);
|
|
4493
4351
|
InputControl.displayName = "InputControl";
|
|
@@ -4743,29 +4601,29 @@ var LinkNodeButton_exports = {};
|
|
|
4743
4601
|
__export(LinkNodeButton_exports, {
|
|
4744
4602
|
default: () => LinkNodeButton_default
|
|
4745
4603
|
});
|
|
4746
|
-
var
|
|
4604
|
+
var import_react45, import_jsx_runtime63, LinkNodeButton, LinkNodeButton_default;
|
|
4747
4605
|
var init_LinkNodeButton = __esm({
|
|
4748
4606
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
4749
4607
|
"use strict";
|
|
4750
4608
|
"use client";
|
|
4751
|
-
|
|
4609
|
+
import_react45 = require("react");
|
|
4752
4610
|
init_Button();
|
|
4753
4611
|
init_ServiceClient();
|
|
4754
4612
|
init_ToastService();
|
|
4755
|
-
|
|
4613
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4756
4614
|
LinkNodeButton = (props) => {
|
|
4757
4615
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
4758
|
-
const [isLoading, setIsLoading] = (0,
|
|
4759
|
-
const [successMessage, setSuccessMessage] = (0,
|
|
4616
|
+
const [isLoading, setIsLoading] = (0, import_react45.useState)(false);
|
|
4617
|
+
const [successMessage, setSuccessMessage] = (0, import_react45.useState)(null);
|
|
4760
4618
|
console.log("LinkNodeButton props:", props);
|
|
4761
|
-
const extractFieldNames = (0,
|
|
4619
|
+
const extractFieldNames = (0, import_react45.useCallback)((template) => {
|
|
4762
4620
|
if (!template) return [];
|
|
4763
4621
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
4764
4622
|
const matches = Array.from(template.matchAll(regex));
|
|
4765
4623
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
4766
4624
|
return fieldNames;
|
|
4767
4625
|
}, []);
|
|
4768
|
-
const replaceTemplateVariables = (0,
|
|
4626
|
+
const replaceTemplateVariables = (0, import_react45.useCallback)(
|
|
4769
4627
|
(template, responseData) => {
|
|
4770
4628
|
if (!template) return template;
|
|
4771
4629
|
let result = template;
|
|
@@ -4797,7 +4655,7 @@ var init_LinkNodeButton = __esm({
|
|
|
4797
4655
|
},
|
|
4798
4656
|
[props.routeParameters, dataitem, extractFieldNames]
|
|
4799
4657
|
);
|
|
4800
|
-
const getNestedValue7 = (0,
|
|
4658
|
+
const getNestedValue7 = (0, import_react45.useCallback)((obj, path) => {
|
|
4801
4659
|
if (!obj || !path) return void 0;
|
|
4802
4660
|
if (obj[path] !== void 0) {
|
|
4803
4661
|
return obj[path];
|
|
@@ -4812,7 +4670,7 @@ var init_LinkNodeButton = __esm({
|
|
|
4812
4670
|
}
|
|
4813
4671
|
return current;
|
|
4814
4672
|
}, []);
|
|
4815
|
-
const onClick = (0,
|
|
4673
|
+
const onClick = (0, import_react45.useCallback)(async () => {
|
|
4816
4674
|
if (!node.postUrl) {
|
|
4817
4675
|
return {
|
|
4818
4676
|
isSuccessful: false,
|
|
@@ -4926,32 +4784,32 @@ var init_LinkNodeButton = __esm({
|
|
|
4926
4784
|
return children;
|
|
4927
4785
|
}
|
|
4928
4786
|
if (linkText) {
|
|
4929
|
-
return /* @__PURE__ */ (0,
|
|
4787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: linkText });
|
|
4930
4788
|
}
|
|
4931
4789
|
return node.title || "Button";
|
|
4932
4790
|
};
|
|
4933
4791
|
const fontSize = node.children?.[0]?.style?.match(/font-size:\s*([^;]+)/)?.[1];
|
|
4934
|
-
return /* @__PURE__ */ (0,
|
|
4792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4935
4793
|
Button_default,
|
|
4936
4794
|
{
|
|
4937
4795
|
ButtonType: linkType,
|
|
4938
4796
|
onClick,
|
|
4939
4797
|
disabled: isLoading || !!successMessage,
|
|
4940
4798
|
className: "w-full",
|
|
4941
|
-
children: successMessage ? /* @__PURE__ */ (0,
|
|
4799
|
+
children: successMessage ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
4942
4800
|
"span",
|
|
4943
4801
|
{
|
|
4944
4802
|
style: fontSize ? { fontSize } : void 0,
|
|
4945
4803
|
className: "inline-flex items-center gap-2",
|
|
4946
4804
|
children: [
|
|
4947
|
-
/* @__PURE__ */ (0,
|
|
4805
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4948
4806
|
"svg",
|
|
4949
4807
|
{
|
|
4950
4808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4951
4809
|
viewBox: "0 0 20 20",
|
|
4952
4810
|
fill: "currentColor",
|
|
4953
4811
|
className: "w-5 h-5",
|
|
4954
|
-
children: /* @__PURE__ */ (0,
|
|
4812
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4955
4813
|
"path",
|
|
4956
4814
|
{
|
|
4957
4815
|
fillRule: "evenodd",
|
|
@@ -4961,7 +4819,7 @@ var init_LinkNodeButton = __esm({
|
|
|
4961
4819
|
)
|
|
4962
4820
|
}
|
|
4963
4821
|
),
|
|
4964
|
-
/* @__PURE__ */ (0,
|
|
4822
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: successMessage })
|
|
4965
4823
|
]
|
|
4966
4824
|
}
|
|
4967
4825
|
) : renderButtonContent()
|
|
@@ -4978,9 +4836,9 @@ __export(CopyButton_exports, {
|
|
|
4978
4836
|
default: () => CopyButton
|
|
4979
4837
|
});
|
|
4980
4838
|
function CopyButton({ text }) {
|
|
4981
|
-
const [copied, setCopied] = (0,
|
|
4982
|
-
const timeoutRef = (0,
|
|
4983
|
-
(0,
|
|
4839
|
+
const [copied, setCopied] = (0, import_react52.useState)(false);
|
|
4840
|
+
const timeoutRef = (0, import_react52.useRef)(null);
|
|
4841
|
+
(0, import_react52.useEffect)(() => {
|
|
4984
4842
|
return () => {
|
|
4985
4843
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4986
4844
|
};
|
|
@@ -4995,13 +4853,13 @@ function CopyButton({ text }) {
|
|
|
4995
4853
|
console.error("Failed to copy: ", err);
|
|
4996
4854
|
}
|
|
4997
4855
|
};
|
|
4998
|
-
return /* @__PURE__ */ (0,
|
|
4856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
4999
4857
|
"button",
|
|
5000
4858
|
{
|
|
5001
4859
|
onClick: handleCopy,
|
|
5002
4860
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
5003
4861
|
children: [
|
|
5004
|
-
/* @__PURE__ */ (0,
|
|
4862
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5005
4863
|
"svg",
|
|
5006
4864
|
{
|
|
5007
4865
|
width: "16",
|
|
@@ -5009,7 +4867,7 @@ function CopyButton({ text }) {
|
|
|
5009
4867
|
viewBox: "0 0 24 24",
|
|
5010
4868
|
className: "w-4 h-4",
|
|
5011
4869
|
fill: "currentColor",
|
|
5012
|
-
children: /* @__PURE__ */ (0,
|
|
4870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5013
4871
|
"path",
|
|
5014
4872
|
{
|
|
5015
4873
|
fillRule: "evenodd",
|
|
@@ -5024,54 +4882,54 @@ function CopyButton({ text }) {
|
|
|
5024
4882
|
}
|
|
5025
4883
|
);
|
|
5026
4884
|
}
|
|
5027
|
-
var
|
|
4885
|
+
var import_react52, import_jsx_runtime73;
|
|
5028
4886
|
var init_CopyButton = __esm({
|
|
5029
4887
|
"src/components/CopyButton.tsx"() {
|
|
5030
4888
|
"use strict";
|
|
5031
4889
|
"use client";
|
|
5032
|
-
|
|
5033
|
-
|
|
4890
|
+
import_react52 = require("react");
|
|
4891
|
+
import_jsx_runtime73 = require("react/jsx-runtime");
|
|
5034
4892
|
}
|
|
5035
4893
|
});
|
|
5036
4894
|
|
|
5037
4895
|
// src/components/IFrameLoaderView.tsx
|
|
5038
|
-
var
|
|
4896
|
+
var import_react55, import_jsx_runtime77, IFrameLoaderView, IFrameLoaderView_default;
|
|
5039
4897
|
var init_IFrameLoaderView = __esm({
|
|
5040
4898
|
"src/components/IFrameLoaderView.tsx"() {
|
|
5041
4899
|
"use strict";
|
|
5042
|
-
|
|
5043
|
-
|
|
4900
|
+
import_react55 = __toESM(require("react"));
|
|
4901
|
+
import_jsx_runtime77 = require("react/jsx-runtime");
|
|
5044
4902
|
IFrameLoaderView = (props) => {
|
|
5045
|
-
return /* @__PURE__ */ (0,
|
|
5046
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
5047
|
-
/* @__PURE__ */ (0,
|
|
5048
|
-
/* @__PURE__ */ (0,
|
|
5049
|
-
/* @__PURE__ */ (0,
|
|
5050
|
-
/* @__PURE__ */ (0,
|
|
5051
|
-
/* @__PURE__ */ (0,
|
|
4903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react55.default.Fragment, { children: [
|
|
4904
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
4905
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
4906
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
4907
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ml-2", children: [
|
|
4908
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
4909
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
5052
4910
|
] })
|
|
5053
4911
|
] }),
|
|
5054
|
-
/* @__PURE__ */ (0,
|
|
5055
|
-
/* @__PURE__ */ (0,
|
|
5056
|
-
/* @__PURE__ */ (0,
|
|
5057
|
-
/* @__PURE__ */ (0,
|
|
5058
|
-
/* @__PURE__ */ (0,
|
|
5059
|
-
/* @__PURE__ */ (0,
|
|
5060
|
-
/* @__PURE__ */ (0,
|
|
4912
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
4913
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
4914
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4915
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4916
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4917
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4918
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5061
4919
|
] }),
|
|
5062
|
-
/* @__PURE__ */ (0,
|
|
5063
|
-
/* @__PURE__ */ (0,
|
|
5064
|
-
/* @__PURE__ */ (0,
|
|
5065
|
-
/* @__PURE__ */ (0,
|
|
5066
|
-
/* @__PURE__ */ (0,
|
|
5067
|
-
/* @__PURE__ */ (0,
|
|
4920
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
4921
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4922
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4923
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4924
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4925
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5068
4926
|
] }),
|
|
5069
|
-
/* @__PURE__ */ (0,
|
|
5070
|
-
/* @__PURE__ */ (0,
|
|
5071
|
-
/* @__PURE__ */ (0,
|
|
5072
|
-
/* @__PURE__ */ (0,
|
|
5073
|
-
/* @__PURE__ */ (0,
|
|
5074
|
-
/* @__PURE__ */ (0,
|
|
4927
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
4928
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4929
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4930
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4931
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4932
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5075
4933
|
] })
|
|
5076
4934
|
] })
|
|
5077
4935
|
] }) }),
|
|
@@ -5087,23 +4945,23 @@ var IframeClient_exports = {};
|
|
|
5087
4945
|
__export(IframeClient_exports, {
|
|
5088
4946
|
default: () => IframeClient_default
|
|
5089
4947
|
});
|
|
5090
|
-
var
|
|
4948
|
+
var import_react56, import_jsx_runtime78, IframeClient, IframeClient_default;
|
|
5091
4949
|
var init_IframeClient = __esm({
|
|
5092
4950
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
5093
4951
|
"use strict";
|
|
5094
4952
|
"use client";
|
|
5095
|
-
|
|
4953
|
+
import_react56 = __toESM(require("react"));
|
|
5096
4954
|
init_IFrameLoaderView();
|
|
5097
|
-
|
|
4955
|
+
import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5098
4956
|
IframeClient = ({
|
|
5099
4957
|
src,
|
|
5100
4958
|
width,
|
|
5101
4959
|
height
|
|
5102
4960
|
}) => {
|
|
5103
|
-
const iframeRef = (0,
|
|
5104
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
5105
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
5106
|
-
(0,
|
|
4961
|
+
const iframeRef = (0, import_react56.useRef)(null);
|
|
4962
|
+
const [iframeHeight, setIframeHeight] = (0, import_react56.useState)("100%");
|
|
4963
|
+
const [isDataFound, setIsDataFound] = (0, import_react56.useState)(null);
|
|
4964
|
+
(0, import_react56.useEffect)(() => {
|
|
5107
4965
|
const handleReceiveMessage = (event) => {
|
|
5108
4966
|
const eventName = event?.data?.eventName;
|
|
5109
4967
|
const payload = event?.data?.payload;
|
|
@@ -5118,7 +4976,7 @@ var init_IframeClient = __esm({
|
|
|
5118
4976
|
window.addEventListener("message", handleReceiveMessage);
|
|
5119
4977
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
5120
4978
|
}, []);
|
|
5121
|
-
(0,
|
|
4979
|
+
(0, import_react56.useEffect)(() => {
|
|
5122
4980
|
const handleResize = () => {
|
|
5123
4981
|
if (iframeRef.current) {
|
|
5124
4982
|
iframeRef.current.contentWindow?.postMessage(
|
|
@@ -5133,7 +4991,7 @@ var init_IframeClient = __esm({
|
|
|
5133
4991
|
const handleIframeLoad = () => {
|
|
5134
4992
|
setIsDataFound(true);
|
|
5135
4993
|
};
|
|
5136
|
-
return /* @__PURE__ */ (0,
|
|
4994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5137
4995
|
"iframe",
|
|
5138
4996
|
{
|
|
5139
4997
|
ref: iframeRef,
|
|
@@ -5392,21 +5250,21 @@ var Pagination_exports = {};
|
|
|
5392
5250
|
__export(Pagination_exports, {
|
|
5393
5251
|
default: () => Pagination_default
|
|
5394
5252
|
});
|
|
5395
|
-
var
|
|
5253
|
+
var import_react57, import_jsx_runtime84, Pagination, Pagination_default;
|
|
5396
5254
|
var init_Pagination = __esm({
|
|
5397
5255
|
"src/components/Pagination.tsx"() {
|
|
5398
5256
|
"use strict";
|
|
5399
5257
|
"use client";
|
|
5400
|
-
|
|
5258
|
+
import_react57 = require("react");
|
|
5401
5259
|
init_OdataBuilder();
|
|
5402
5260
|
init_Icon();
|
|
5403
5261
|
init_StyleTypes();
|
|
5404
5262
|
init_InputControlType();
|
|
5405
5263
|
init_Hyperlink();
|
|
5406
|
-
|
|
5264
|
+
import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5407
5265
|
Pagination = (props) => {
|
|
5408
5266
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
5409
|
-
const builder = (0,
|
|
5267
|
+
const builder = (0, import_react57.useMemo)(() => {
|
|
5410
5268
|
const b = new OdataBuilder(path);
|
|
5411
5269
|
if (query) b.setQuery(query);
|
|
5412
5270
|
return b;
|
|
@@ -5447,7 +5305,7 @@ var init_Pagination = __esm({
|
|
|
5447
5305
|
return range;
|
|
5448
5306
|
};
|
|
5449
5307
|
const paginationRange = getPaginationRange();
|
|
5450
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
5308
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5451
5309
|
Hyperlink,
|
|
5452
5310
|
{
|
|
5453
5311
|
linkType: "Link" /* Link */,
|
|
@@ -5462,9 +5320,9 @@ var init_Pagination = __esm({
|
|
|
5462
5320
|
);
|
|
5463
5321
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
5464
5322
|
if (disabled) {
|
|
5465
|
-
return /* @__PURE__ */ (0,
|
|
5323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
|
|
5466
5324
|
}
|
|
5467
|
-
return /* @__PURE__ */ (0,
|
|
5325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5468
5326
|
Hyperlink,
|
|
5469
5327
|
{
|
|
5470
5328
|
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",
|
|
@@ -5474,35 +5332,35 @@ var init_Pagination = __esm({
|
|
|
5474
5332
|
);
|
|
5475
5333
|
};
|
|
5476
5334
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
5477
|
-
return /* @__PURE__ */ (0,
|
|
5478
|
-
/* @__PURE__ */ (0,
|
|
5479
|
-
/* @__PURE__ */ (0,
|
|
5335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
5336
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "text-sm", children: [
|
|
5480
5338
|
"Showing ",
|
|
5481
|
-
/* @__PURE__ */ (0,
|
|
5339
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "font-semibold", children: [
|
|
5482
5340
|
startItem,
|
|
5483
5341
|
"-",
|
|
5484
5342
|
endItem
|
|
5485
5343
|
] }),
|
|
5486
5344
|
" ",
|
|
5487
5345
|
"out of ",
|
|
5488
|
-
/* @__PURE__ */ (0,
|
|
5346
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
5489
5347
|
" results"
|
|
5490
5348
|
] }),
|
|
5491
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
5492
|
-
/* @__PURE__ */ (0,
|
|
5349
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
5350
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
5493
5351
|
NavigationButton,
|
|
5494
5352
|
{
|
|
5495
5353
|
page: activePageNumber - 1,
|
|
5496
5354
|
disabled: activePageNumber === 1,
|
|
5497
5355
|
children: [
|
|
5498
|
-
/* @__PURE__ */ (0,
|
|
5499
|
-
/* @__PURE__ */ (0,
|
|
5356
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
5357
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
5500
5358
|
]
|
|
5501
5359
|
}
|
|
5502
5360
|
),
|
|
5503
5361
|
paginationRange.map((item, index) => {
|
|
5504
5362
|
if (item === "...") {
|
|
5505
|
-
return /* @__PURE__ */ (0,
|
|
5363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5506
5364
|
"span",
|
|
5507
5365
|
{
|
|
5508
5366
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -5512,23 +5370,23 @@ var init_Pagination = __esm({
|
|
|
5512
5370
|
);
|
|
5513
5371
|
}
|
|
5514
5372
|
const page = item;
|
|
5515
|
-
return /* @__PURE__ */ (0,
|
|
5373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PageButton, { page, children: page }, page);
|
|
5516
5374
|
}),
|
|
5517
|
-
/* @__PURE__ */ (0,
|
|
5375
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
5518
5376
|
NavigationButton,
|
|
5519
5377
|
{
|
|
5520
5378
|
page: activePageNumber + 1,
|
|
5521
5379
|
disabled: activePageNumber === totalPages,
|
|
5522
5380
|
children: [
|
|
5523
|
-
/* @__PURE__ */ (0,
|
|
5524
|
-
/* @__PURE__ */ (0,
|
|
5381
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
5382
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
5525
5383
|
]
|
|
5526
5384
|
}
|
|
5527
5385
|
)
|
|
5528
5386
|
] }),
|
|
5529
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
5530
|
-
/* @__PURE__ */ (0,
|
|
5531
|
-
/* @__PURE__ */ (0,
|
|
5387
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
5388
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
5389
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5532
5390
|
"input",
|
|
5533
5391
|
{
|
|
5534
5392
|
type: "number",
|
|
@@ -5549,9 +5407,9 @@ var init_Pagination = __esm({
|
|
|
5549
5407
|
) })
|
|
5550
5408
|
] })
|
|
5551
5409
|
] }),
|
|
5552
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
5553
|
-
/* @__PURE__ */ (0,
|
|
5554
|
-
/* @__PURE__ */ (0,
|
|
5410
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
5411
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
5412
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5555
5413
|
Hyperlink,
|
|
5556
5414
|
{
|
|
5557
5415
|
className: `
|
|
@@ -5563,7 +5421,7 @@ var init_Pagination = __esm({
|
|
|
5563
5421
|
},
|
|
5564
5422
|
size
|
|
5565
5423
|
)) }),
|
|
5566
|
-
/* @__PURE__ */ (0,
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "per page" })
|
|
5567
5425
|
] }) })
|
|
5568
5426
|
] });
|
|
5569
5427
|
};
|
|
@@ -5576,16 +5434,16 @@ var DataBindingControls_exports = {};
|
|
|
5576
5434
|
__export(DataBindingControls_exports, {
|
|
5577
5435
|
default: () => DataBindingControls_default
|
|
5578
5436
|
});
|
|
5579
|
-
var
|
|
5437
|
+
var import_react58, import_navigation, import_jsx_runtime85, humanize, escapeODataString, parseFacetSelections, buildFacetFilter, parseODataSearch, normalizeSortOption, DUMMY_FACETS, DUMMY_SORT_OPTIONS, DataBindingControls, DataBindingControls_default;
|
|
5580
5438
|
var init_DataBindingControls = __esm({
|
|
5581
5439
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
5582
5440
|
"use strict";
|
|
5583
5441
|
"use client";
|
|
5584
|
-
|
|
5442
|
+
import_react58 = require("react");
|
|
5585
5443
|
import_navigation = require("next/navigation");
|
|
5586
5444
|
init_InputControl();
|
|
5587
5445
|
init_InputControlType();
|
|
5588
|
-
|
|
5446
|
+
import_jsx_runtime85 = require("react/jsx-runtime");
|
|
5589
5447
|
humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
5590
5448
|
escapeODataString = (value) => value.replace(/'/g, "''");
|
|
5591
5449
|
parseFacetSelections = (filter) => {
|
|
@@ -5662,12 +5520,12 @@ var init_DataBindingControls = __esm({
|
|
|
5662
5520
|
const selectedFacetValues = parseFacetSelections(currentFilter);
|
|
5663
5521
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
5664
5522
|
const currentSearch = parseODataSearch(query?.["$search"]);
|
|
5665
|
-
const [searchText, setSearchText] = (0,
|
|
5666
|
-
const lastNavigationUrl = (0,
|
|
5667
|
-
(0,
|
|
5523
|
+
const [searchText, setSearchText] = (0, import_react58.useState)(currentSearch);
|
|
5524
|
+
const lastNavigationUrl = (0, import_react58.useRef)(null);
|
|
5525
|
+
(0, import_react58.useEffect)(() => {
|
|
5668
5526
|
setSearchText(currentSearch);
|
|
5669
5527
|
}, [currentSearch]);
|
|
5670
|
-
const getQueryUrl = (0,
|
|
5528
|
+
const getQueryUrl = (0, import_react58.useCallback)(
|
|
5671
5529
|
(updates) => {
|
|
5672
5530
|
const params = new URLSearchParams(query ?? {});
|
|
5673
5531
|
Object.entries(updates).forEach(([key, value]) => {
|
|
@@ -5697,7 +5555,7 @@ var init_DataBindingControls = __esm({
|
|
|
5697
5555
|
filter: void 0
|
|
5698
5556
|
});
|
|
5699
5557
|
};
|
|
5700
|
-
const navigateWithoutReload = (0,
|
|
5558
|
+
const navigateWithoutReload = (0, import_react58.useCallback)(
|
|
5701
5559
|
(url) => {
|
|
5702
5560
|
if (lastNavigationUrl.current === url) {
|
|
5703
5561
|
return;
|
|
@@ -5713,7 +5571,7 @@ var init_DataBindingControls = __esm({
|
|
|
5713
5571
|
},
|
|
5714
5572
|
[router]
|
|
5715
5573
|
);
|
|
5716
|
-
(0,
|
|
5574
|
+
(0, import_react58.useEffect)(() => {
|
|
5717
5575
|
const trimmedSearchText = searchText.trim();
|
|
5718
5576
|
if (trimmedSearchText === currentSearch.trim()) {
|
|
5719
5577
|
return;
|
|
@@ -5734,8 +5592,8 @@ var init_DataBindingControls = __esm({
|
|
|
5734
5592
|
if (!shouldShowToolbar && !shouldShowFacets) {
|
|
5735
5593
|
return null;
|
|
5736
5594
|
}
|
|
5737
|
-
const renderFacetLinks = (field, values, stacked = false) => /* @__PURE__ */ (0,
|
|
5738
|
-
/* @__PURE__ */ (0,
|
|
5595
|
+
const renderFacetLinks = (field, values, stacked = false) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: stacked ? "flex flex-col gap-1" : "flex flex-wrap gap-2", children: [
|
|
5596
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5739
5597
|
"button",
|
|
5740
5598
|
{
|
|
5741
5599
|
type: "button",
|
|
@@ -5747,7 +5605,7 @@ var init_DataBindingControls = __esm({
|
|
|
5747
5605
|
),
|
|
5748
5606
|
values.map((facet) => {
|
|
5749
5607
|
const isSelected = selectedFacetValues.get(field) === facet.value;
|
|
5750
|
-
return /* @__PURE__ */ (0,
|
|
5608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
5751
5609
|
"button",
|
|
5752
5610
|
{
|
|
5753
5611
|
type: "button",
|
|
@@ -5765,9 +5623,9 @@ var init_DataBindingControls = __esm({
|
|
|
5765
5623
|
);
|
|
5766
5624
|
})
|
|
5767
5625
|
] });
|
|
5768
|
-
return /* @__PURE__ */ (0,
|
|
5769
|
-
shouldShowToolbar && /* @__PURE__ */ (0,
|
|
5770
|
-
showSearchBar && /* @__PURE__ */ (0,
|
|
5626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: mode === "toolbar" ? "mb-6" : "flex flex-col gap-2", children: [
|
|
5627
|
+
shouldShowToolbar && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
|
|
5628
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "w-full max-w-xl", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5771
5629
|
InputControl_default,
|
|
5772
5630
|
{
|
|
5773
5631
|
name: "searchText",
|
|
@@ -5778,9 +5636,9 @@ var init_DataBindingControls = __esm({
|
|
|
5778
5636
|
inputClasses: "!mt-0"
|
|
5779
5637
|
}
|
|
5780
5638
|
) }),
|
|
5781
|
-
hasSortControls && /* @__PURE__ */ (0,
|
|
5782
|
-
/* @__PURE__ */ (0,
|
|
5783
|
-
/* @__PURE__ */ (0,
|
|
5639
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
5640
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "font-medium", children: "Sort by" }),
|
|
5641
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5784
5642
|
InputControl_default,
|
|
5785
5643
|
{
|
|
5786
5644
|
name: "sortOptions",
|
|
@@ -5801,10 +5659,10 @@ var init_DataBindingControls = __esm({
|
|
|
5801
5659
|
)
|
|
5802
5660
|
] })
|
|
5803
5661
|
] }),
|
|
5804
|
-
shouldShowFacets && facetGroups.length === 1 && /* @__PURE__ */ (0,
|
|
5805
|
-
shouldShowFacets && facetGroups.length > 1 && /* @__PURE__ */ (0,
|
|
5806
|
-
/* @__PURE__ */ (0,
|
|
5807
|
-
/* @__PURE__ */ (0,
|
|
5662
|
+
shouldShowFacets && facetGroups.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("nav", { "aria-label": `${humanize(facetGroups[0][0])} filters`, children: renderFacetLinks(facetGroups[0][0], facetGroups[0][1]) }),
|
|
5663
|
+
shouldShowFacets && facetGroups.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "flex flex-col gap-2", children: facetGroups.map(([field, values]) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("details", { className: "border-b", open: true, children: [
|
|
5664
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("summary", { className: "cursor-pointer font-semibold", children: humanize(field) }),
|
|
5665
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "p-2", children: renderFacetLinks(field, values, true) })
|
|
5808
5666
|
] }, field)) })
|
|
5809
5667
|
] });
|
|
5810
5668
|
};
|
|
@@ -5817,13 +5675,13 @@ var Slider_exports = {};
|
|
|
5817
5675
|
__export(Slider_exports, {
|
|
5818
5676
|
default: () => Slider_default
|
|
5819
5677
|
});
|
|
5820
|
-
var
|
|
5678
|
+
var import_react59, import_jsx_runtime86, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
5821
5679
|
var init_Slider = __esm({
|
|
5822
5680
|
"src/components/Slider.tsx"() {
|
|
5823
5681
|
"use strict";
|
|
5824
5682
|
"use client";
|
|
5825
|
-
|
|
5826
|
-
|
|
5683
|
+
import_react59 = __toESM(require("react"));
|
|
5684
|
+
import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5827
5685
|
Slider = ({
|
|
5828
5686
|
children,
|
|
5829
5687
|
slidesToShow = 4,
|
|
@@ -5841,13 +5699,13 @@ var init_Slider = __esm({
|
|
|
5841
5699
|
pillStyle = "cumulative",
|
|
5842
5700
|
progressPosition = "bottom"
|
|
5843
5701
|
}) => {
|
|
5844
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
5845
|
-
const [transition, setTransition] = (0,
|
|
5846
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
5702
|
+
const [currentSlide, setCurrentSlide] = (0, import_react59.useState)(0);
|
|
5703
|
+
const [transition, setTransition] = (0, import_react59.useState)(true);
|
|
5704
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react59.useState)(
|
|
5847
5705
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
5848
5706
|
);
|
|
5849
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
5850
|
-
(0,
|
|
5707
|
+
const [isPlaying, setIsPlaying] = (0, import_react59.useState)(autoplay);
|
|
5708
|
+
(0, import_react59.useEffect)(() => {
|
|
5851
5709
|
if (typeof slidesToShow === "number") return;
|
|
5852
5710
|
const handleResize = () => {
|
|
5853
5711
|
if (window.innerWidth >= 1024) {
|
|
@@ -5862,7 +5720,7 @@ var init_Slider = __esm({
|
|
|
5862
5720
|
window.addEventListener("resize", handleResize);
|
|
5863
5721
|
return () => window.removeEventListener("resize", handleResize);
|
|
5864
5722
|
}, [slidesToShow]);
|
|
5865
|
-
(0,
|
|
5723
|
+
(0, import_react59.useEffect)(() => {
|
|
5866
5724
|
if (!autoplay) return;
|
|
5867
5725
|
const timer = setInterval(() => {
|
|
5868
5726
|
if (isPlaying) {
|
|
@@ -5871,7 +5729,7 @@ var init_Slider = __esm({
|
|
|
5871
5729
|
}, autoplay_speed);
|
|
5872
5730
|
return () => clearInterval(timer);
|
|
5873
5731
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
5874
|
-
const totalSlides =
|
|
5732
|
+
const totalSlides = import_react59.Children.count(children);
|
|
5875
5733
|
const maxSlide = totalSlides - slidesToShowState;
|
|
5876
5734
|
const nextSlide = () => {
|
|
5877
5735
|
if (currentSlide >= maxSlide) {
|
|
@@ -5916,16 +5774,16 @@ var init_Slider = __esm({
|
|
|
5916
5774
|
}
|
|
5917
5775
|
};
|
|
5918
5776
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
5919
|
-
const slides =
|
|
5920
|
-
if (!
|
|
5777
|
+
const slides = import_react59.Children.map(children, (child, index) => {
|
|
5778
|
+
if (!import_react59.default.isValidElement(child)) return null;
|
|
5921
5779
|
const childProps = child.props;
|
|
5922
5780
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
5923
|
-
return /* @__PURE__ */ (0,
|
|
5781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5924
5782
|
"div",
|
|
5925
5783
|
{
|
|
5926
5784
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
5927
5785
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
5928
|
-
children: (0,
|
|
5786
|
+
children: (0, import_react59.cloneElement)(child, {
|
|
5929
5787
|
className: mergedClassName
|
|
5930
5788
|
})
|
|
5931
5789
|
},
|
|
@@ -5943,14 +5801,14 @@ var init_Slider = __esm({
|
|
|
5943
5801
|
return "bottom-4";
|
|
5944
5802
|
}
|
|
5945
5803
|
};
|
|
5946
|
-
return /* @__PURE__ */ (0,
|
|
5804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5947
5805
|
"div",
|
|
5948
5806
|
{
|
|
5949
5807
|
className: `relative w-full overflow-hidden ${className}`,
|
|
5950
5808
|
onMouseEnter: handleMouseEnter,
|
|
5951
5809
|
onMouseLeave: handleMouseLeave,
|
|
5952
5810
|
children: [
|
|
5953
|
-
/* @__PURE__ */ (0,
|
|
5811
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5954
5812
|
"div",
|
|
5955
5813
|
{
|
|
5956
5814
|
className: "flex h-full",
|
|
@@ -5961,18 +5819,18 @@ var init_Slider = __esm({
|
|
|
5961
5819
|
children: slides
|
|
5962
5820
|
}
|
|
5963
5821
|
),
|
|
5964
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
5965
|
-
/* @__PURE__ */ (0,
|
|
5822
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
5823
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5966
5824
|
ArrowButton,
|
|
5967
5825
|
{
|
|
5968
5826
|
direction: "left",
|
|
5969
5827
|
onClick: prevSlide,
|
|
5970
5828
|
visible: infinite_scroll || currentSlide > 0,
|
|
5971
5829
|
className: arrowClassName,
|
|
5972
|
-
children: /* @__PURE__ */ (0,
|
|
5830
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
5973
5831
|
}
|
|
5974
5832
|
),
|
|
5975
|
-
/* @__PURE__ */ (0,
|
|
5833
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5976
5834
|
ArrowButton,
|
|
5977
5835
|
{
|
|
5978
5836
|
direction: "right",
|
|
@@ -5980,13 +5838,13 @@ var init_Slider = __esm({
|
|
|
5980
5838
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
5981
5839
|
className: arrowClassName,
|
|
5982
5840
|
children: [
|
|
5983
|
-
/* @__PURE__ */ (0,
|
|
5841
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
5984
5842
|
" "
|
|
5985
5843
|
]
|
|
5986
5844
|
}
|
|
5987
5845
|
)
|
|
5988
5846
|
] }),
|
|
5989
|
-
show_dots && /* @__PURE__ */ (0,
|
|
5847
|
+
show_dots && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("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__ */ (0, import_jsx_runtime86.jsx)(
|
|
5990
5848
|
ProgressPill,
|
|
5991
5849
|
{
|
|
5992
5850
|
active: index === currentSlide,
|
|
@@ -6012,7 +5870,7 @@ var init_Slider = __esm({
|
|
|
6012
5870
|
visible,
|
|
6013
5871
|
children,
|
|
6014
5872
|
className = ""
|
|
6015
|
-
}) => /* @__PURE__ */ (0,
|
|
5873
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6016
5874
|
"button",
|
|
6017
5875
|
{
|
|
6018
5876
|
className: `
|
|
@@ -6038,13 +5896,13 @@ var init_Slider = __esm({
|
|
|
6038
5896
|
currentSlide,
|
|
6039
5897
|
totalSlides
|
|
6040
5898
|
}) => {
|
|
6041
|
-
const [progress, setProgress] = (0,
|
|
6042
|
-
(0,
|
|
5899
|
+
const [progress, setProgress] = (0, import_react59.useState)(0);
|
|
5900
|
+
(0, import_react59.useEffect)(() => {
|
|
6043
5901
|
if (active) {
|
|
6044
5902
|
setProgress(0);
|
|
6045
5903
|
}
|
|
6046
5904
|
}, [active, index]);
|
|
6047
|
-
(0,
|
|
5905
|
+
(0, import_react59.useEffect)(() => {
|
|
6048
5906
|
if (!active || !isPlaying) {
|
|
6049
5907
|
if (!active) {
|
|
6050
5908
|
setProgress(0);
|
|
@@ -6099,7 +5957,7 @@ var init_Slider = __esm({
|
|
|
6099
5957
|
const renderProgressBar = () => {
|
|
6100
5958
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
6101
5959
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
6102
|
-
return /* @__PURE__ */ (0,
|
|
5960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6103
5961
|
"div",
|
|
6104
5962
|
{
|
|
6105
5963
|
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`,
|
|
@@ -6111,7 +5969,7 @@ var init_Slider = __esm({
|
|
|
6111
5969
|
};
|
|
6112
5970
|
const renderCumulativeFill = () => {
|
|
6113
5971
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
6114
|
-
return /* @__PURE__ */ (0,
|
|
5972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6115
5973
|
"div",
|
|
6116
5974
|
{
|
|
6117
5975
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -6121,7 +5979,7 @@ var init_Slider = __esm({
|
|
|
6121
5979
|
}
|
|
6122
5980
|
return null;
|
|
6123
5981
|
};
|
|
6124
|
-
return /* @__PURE__ */ (0,
|
|
5982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6125
5983
|
"button",
|
|
6126
5984
|
{
|
|
6127
5985
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -6142,7 +6000,6 @@ var init_Slider = __esm({
|
|
|
6142
6000
|
// src/index.ts
|
|
6143
6001
|
var index_exports = {};
|
|
6144
6002
|
__export(index_exports, {
|
|
6145
|
-
BooleanSelect: () => BooleanSelect_default,
|
|
6146
6003
|
Button: () => Button_default,
|
|
6147
6004
|
CheckboxInput: () => CheckboxInput_default,
|
|
6148
6005
|
ColorInput: () => ColorInput_default,
|
|
@@ -6166,7 +6023,6 @@ __export(index_exports, {
|
|
|
6166
6023
|
PhoneInput: () => PhoneInput_default,
|
|
6167
6024
|
RadioInput: () => RadioInput_default,
|
|
6168
6025
|
Select: () => Select_default,
|
|
6169
|
-
Switcher: () => Switcher_default,
|
|
6170
6026
|
TimeInput: () => TimeInput_default,
|
|
6171
6027
|
Toast: () => Toast_default,
|
|
6172
6028
|
ToastService: () => ToastService_default,
|
|
@@ -6641,13 +6497,13 @@ init_InputControl();
|
|
|
6641
6497
|
init_InputControlType();
|
|
6642
6498
|
|
|
6643
6499
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6644
|
-
var
|
|
6500
|
+
var import_react61 = __toESM(require("react"));
|
|
6645
6501
|
|
|
6646
6502
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
6647
|
-
var
|
|
6503
|
+
var import_react47 = __toESM(require("react"));
|
|
6648
6504
|
|
|
6649
6505
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
6650
|
-
var
|
|
6506
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
6651
6507
|
var TextNode = (props) => {
|
|
6652
6508
|
function cssStringToJson(cssString) {
|
|
6653
6509
|
const styleObject = {};
|
|
@@ -6702,36 +6558,36 @@ var TextNode = (props) => {
|
|
|
6702
6558
|
});
|
|
6703
6559
|
}
|
|
6704
6560
|
function renderWithLineBreaks(text) {
|
|
6705
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
6561
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { children: [
|
|
6706
6562
|
line,
|
|
6707
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
6563
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("br", {})
|
|
6708
6564
|
] }, index));
|
|
6709
6565
|
}
|
|
6710
6566
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
6711
6567
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
6712
6568
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
6713
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
6569
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("sub", { children: content }) : content;
|
|
6714
6570
|
return (
|
|
6715
6571
|
// @ts-expect-error custom code
|
|
6716
|
-
/* @__PURE__ */ (0,
|
|
6572
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
6717
6573
|
);
|
|
6718
6574
|
};
|
|
6719
6575
|
var TextNode_default = TextNode;
|
|
6720
6576
|
|
|
6721
6577
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
6722
|
-
var
|
|
6578
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
6723
6579
|
var LineBreakNode = () => {
|
|
6724
|
-
return /* @__PURE__ */ (0,
|
|
6580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
6725
6581
|
};
|
|
6726
6582
|
var LineBreakNode_default = LineBreakNode;
|
|
6727
6583
|
|
|
6728
6584
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
6729
|
-
var
|
|
6585
|
+
var import_react46 = __toESM(require("react"));
|
|
6730
6586
|
|
|
6731
6587
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
6732
6588
|
init_AssetUtility();
|
|
6733
6589
|
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
6734
|
-
var
|
|
6590
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
6735
6591
|
var HlsPlayer3 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
6736
6592
|
var getNestedValue = (obj, path) => {
|
|
6737
6593
|
if (!obj || !path) return void 0;
|
|
@@ -6764,7 +6620,7 @@ var ImageNode = (props) => {
|
|
|
6764
6620
|
assets = [image];
|
|
6765
6621
|
}
|
|
6766
6622
|
if (assets && assets.length > 0) {
|
|
6767
|
-
return /* @__PURE__ */ (0,
|
|
6623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
6768
6624
|
DeviceAssetSelector_default,
|
|
6769
6625
|
{
|
|
6770
6626
|
device: props.device,
|
|
@@ -6805,7 +6661,7 @@ var ImageNode = (props) => {
|
|
|
6805
6661
|
right: "justify-end"
|
|
6806
6662
|
};
|
|
6807
6663
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
6808
|
-
const renderMedia = () => isHls ? /* @__PURE__ */ (0,
|
|
6664
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
6809
6665
|
HlsPlayer3,
|
|
6810
6666
|
{
|
|
6811
6667
|
assetUrl: imageUrl,
|
|
@@ -6818,7 +6674,7 @@ var ImageNode = (props) => {
|
|
|
6818
6674
|
apiBaseUrl: props.apiBaseUrl,
|
|
6819
6675
|
session: props.session
|
|
6820
6676
|
}
|
|
6821
|
-
) : /* @__PURE__ */ (0,
|
|
6677
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
6822
6678
|
"img",
|
|
6823
6679
|
{
|
|
6824
6680
|
style: styles,
|
|
@@ -6831,7 +6687,7 @@ var ImageNode = (props) => {
|
|
|
6831
6687
|
}
|
|
6832
6688
|
);
|
|
6833
6689
|
if (props.node.width) {
|
|
6834
|
-
return /* @__PURE__ */ (0,
|
|
6690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
6835
6691
|
}
|
|
6836
6692
|
return renderMedia();
|
|
6837
6693
|
};
|
|
@@ -6841,7 +6697,7 @@ var ImageNode_default = ImageNode;
|
|
|
6841
6697
|
init_StyleTypes();
|
|
6842
6698
|
init_Hyperlink();
|
|
6843
6699
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
6844
|
-
var
|
|
6700
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
6845
6701
|
var LinkNodeButton2 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
6846
6702
|
ssr: false
|
|
6847
6703
|
});
|
|
@@ -6894,13 +6750,13 @@ var LinkNode = (props) => {
|
|
|
6894
6750
|
const isButton = node.isButton === true;
|
|
6895
6751
|
const renderChildren2 = () => {
|
|
6896
6752
|
if (!node.children || node.children.length === 0) return null;
|
|
6897
|
-
return /* @__PURE__ */ (0,
|
|
6753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_jsx_runtime64.Fragment, { children: node.children.map((childNode, index) => {
|
|
6898
6754
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
6899
6755
|
if (!SelectedNode) {
|
|
6900
6756
|
console.warn("Unknown node type:", childNode.type);
|
|
6901
6757
|
return null;
|
|
6902
6758
|
}
|
|
6903
|
-
return /* @__PURE__ */ (0,
|
|
6759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react46.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
6904
6760
|
SelectedNode,
|
|
6905
6761
|
{
|
|
6906
6762
|
node: childNode,
|
|
@@ -6913,15 +6769,15 @@ var LinkNode = (props) => {
|
|
|
6913
6769
|
};
|
|
6914
6770
|
const renderFallback = () => {
|
|
6915
6771
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
6916
|
-
return /* @__PURE__ */ (0,
|
|
6772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: linkText });
|
|
6917
6773
|
}
|
|
6918
6774
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
6919
|
-
return /* @__PURE__ */ (0,
|
|
6775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("br", {});
|
|
6920
6776
|
}
|
|
6921
6777
|
return null;
|
|
6922
6778
|
};
|
|
6923
6779
|
if (isButton) {
|
|
6924
|
-
return /* @__PURE__ */ (0,
|
|
6780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
6925
6781
|
LinkNodeButton2,
|
|
6926
6782
|
{
|
|
6927
6783
|
node,
|
|
@@ -6939,7 +6795,7 @@ var LinkNode = (props) => {
|
|
|
6939
6795
|
}
|
|
6940
6796
|
);
|
|
6941
6797
|
}
|
|
6942
|
-
return /* @__PURE__ */ (0,
|
|
6798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
6943
6799
|
Hyperlink,
|
|
6944
6800
|
{
|
|
6945
6801
|
href: linkUrl || "#",
|
|
@@ -6955,10 +6811,10 @@ var LinkNode = (props) => {
|
|
|
6955
6811
|
var LinkNode_default = LinkNode;
|
|
6956
6812
|
|
|
6957
6813
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
6958
|
-
var
|
|
6814
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6959
6815
|
var SVGIconNode = ({ node }) => {
|
|
6960
6816
|
if (!node?.svgCode) return null;
|
|
6961
|
-
return /* @__PURE__ */ (0,
|
|
6817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
6962
6818
|
"span",
|
|
6963
6819
|
{
|
|
6964
6820
|
style: {
|
|
@@ -6975,7 +6831,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
6975
6831
|
|
|
6976
6832
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
6977
6833
|
var import_katex = __toESM(require("katex"));
|
|
6978
|
-
var
|
|
6834
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
6979
6835
|
var EquationNode = ({ node }) => {
|
|
6980
6836
|
const { equation, inline } = node;
|
|
6981
6837
|
let html = "";
|
|
@@ -6990,7 +6846,7 @@ var EquationNode = ({ node }) => {
|
|
|
6990
6846
|
});
|
|
6991
6847
|
}
|
|
6992
6848
|
if (inline) {
|
|
6993
|
-
return /* @__PURE__ */ (0,
|
|
6849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
6994
6850
|
"span",
|
|
6995
6851
|
{
|
|
6996
6852
|
className: "katex-inline",
|
|
@@ -6998,7 +6854,7 @@ var EquationNode = ({ node }) => {
|
|
|
6998
6854
|
}
|
|
6999
6855
|
);
|
|
7000
6856
|
}
|
|
7001
|
-
return /* @__PURE__ */ (0,
|
|
6857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7002
6858
|
"div",
|
|
7003
6859
|
{
|
|
7004
6860
|
className: "katex-block my-3 text-center",
|
|
@@ -7009,7 +6865,7 @@ var EquationNode = ({ node }) => {
|
|
|
7009
6865
|
var EquationNode_default = EquationNode;
|
|
7010
6866
|
|
|
7011
6867
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
7012
|
-
var
|
|
6868
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
7013
6869
|
function getNestedProperty(obj, path) {
|
|
7014
6870
|
if (!obj || !path) return null;
|
|
7015
6871
|
if (path.includes(".")) {
|
|
@@ -7022,7 +6878,7 @@ function getNestedProperty(obj, path) {
|
|
|
7022
6878
|
}
|
|
7023
6879
|
const value = obj[path];
|
|
7024
6880
|
if (Array.isArray(value)) {
|
|
7025
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
6881
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { children: String(item) }, index));
|
|
7026
6882
|
}
|
|
7027
6883
|
return value;
|
|
7028
6884
|
}
|
|
@@ -7085,7 +6941,7 @@ var DatafieldNode = (props) => {
|
|
|
7085
6941
|
const dataType = props.node.dataType;
|
|
7086
6942
|
if (isEmptyValue) return null;
|
|
7087
6943
|
if (dataType === "rawContent") {
|
|
7088
|
-
return /* @__PURE__ */ (0,
|
|
6944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7089
6945
|
PageBodyRenderer_default,
|
|
7090
6946
|
{
|
|
7091
6947
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -7101,13 +6957,13 @@ var DatafieldNode = (props) => {
|
|
|
7101
6957
|
}
|
|
7102
6958
|
);
|
|
7103
6959
|
}
|
|
7104
|
-
return /* @__PURE__ */ (0,
|
|
6960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7105
6961
|
"span",
|
|
7106
6962
|
{
|
|
7107
6963
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
7108
6964
|
style: styles,
|
|
7109
6965
|
title,
|
|
7110
|
-
children: /* @__PURE__ */ (0,
|
|
6966
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7111
6967
|
ViewControl_default,
|
|
7112
6968
|
{
|
|
7113
6969
|
controlType: dataType,
|
|
@@ -7122,7 +6978,7 @@ var DatafieldNode = (props) => {
|
|
|
7122
6978
|
var DatafieldNode_default = DatafieldNode;
|
|
7123
6979
|
|
|
7124
6980
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
7125
|
-
var
|
|
6981
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
7126
6982
|
var ParagraphNode = (props) => {
|
|
7127
6983
|
const NodeTypes2 = {
|
|
7128
6984
|
["text"]: TextNode_default,
|
|
@@ -7142,9 +6998,9 @@ var ParagraphNode = (props) => {
|
|
|
7142
6998
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
7143
6999
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
7144
7000
|
if (isInlineOnlyParent) {
|
|
7145
|
-
return /* @__PURE__ */ (0,
|
|
7001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
7146
7002
|
const SelectedNode = NodeTypes2[node.type];
|
|
7147
|
-
return /* @__PURE__ */ (0,
|
|
7003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react47.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7148
7004
|
SelectedNode,
|
|
7149
7005
|
{
|
|
7150
7006
|
node,
|
|
@@ -7157,10 +7013,10 @@ var ParagraphNode = (props) => {
|
|
|
7157
7013
|
) }, index);
|
|
7158
7014
|
}) });
|
|
7159
7015
|
}
|
|
7160
|
-
return /* @__PURE__ */ (0,
|
|
7016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: " " + formatClasses, children: [
|
|
7161
7017
|
hasChildren && props.node.children.map((node, index) => {
|
|
7162
7018
|
const SelectedNode = NodeTypes2[node.type];
|
|
7163
|
-
return /* @__PURE__ */ (0,
|
|
7019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react47.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7164
7020
|
SelectedNode,
|
|
7165
7021
|
{
|
|
7166
7022
|
node,
|
|
@@ -7172,14 +7028,14 @@ var ParagraphNode = (props) => {
|
|
|
7172
7028
|
}
|
|
7173
7029
|
) }, index);
|
|
7174
7030
|
}),
|
|
7175
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
7031
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
7176
7032
|
] });
|
|
7177
7033
|
};
|
|
7178
7034
|
var ParagraphNode_default = ParagraphNode;
|
|
7179
7035
|
|
|
7180
7036
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
7181
|
-
var
|
|
7182
|
-
var
|
|
7037
|
+
var import_react48 = __toESM(require("react"));
|
|
7038
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
7183
7039
|
var HeadingNode = (props) => {
|
|
7184
7040
|
const NodeTypes2 = {
|
|
7185
7041
|
["text"]: TextNode_default,
|
|
@@ -7195,23 +7051,23 @@ var HeadingNode = (props) => {
|
|
|
7195
7051
|
{
|
|
7196
7052
|
}
|
|
7197
7053
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
7198
|
-
return /* @__PURE__ */ (0,
|
|
7054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: import_react48.default.createElement(
|
|
7199
7055
|
HeadingTag,
|
|
7200
7056
|
{ className: formatClasses },
|
|
7201
7057
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
7202
7058
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
7203
|
-
return /* @__PURE__ */ (0,
|
|
7059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react48.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, assetBaseUrl: props.assetBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
7204
7060
|
})
|
|
7205
7061
|
) });
|
|
7206
7062
|
};
|
|
7207
7063
|
var HeadingNode_default = HeadingNode;
|
|
7208
7064
|
|
|
7209
7065
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
7210
|
-
var
|
|
7066
|
+
var import_react50 = __toESM(require("react"));
|
|
7211
7067
|
|
|
7212
7068
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
7213
|
-
var
|
|
7214
|
-
var
|
|
7069
|
+
var import_react49 = __toESM(require("react"));
|
|
7070
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
7215
7071
|
var ListItemNode = (props) => {
|
|
7216
7072
|
const NodeTypes2 = {
|
|
7217
7073
|
text: TextNode_default,
|
|
@@ -7228,66 +7084,66 @@ var ListItemNode = (props) => {
|
|
|
7228
7084
|
liStyle.fontSize = match[1].trim();
|
|
7229
7085
|
}
|
|
7230
7086
|
}
|
|
7231
|
-
return /* @__PURE__ */ (0,
|
|
7087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
7232
7088
|
const SelectedNode = NodeTypes2[node.type];
|
|
7233
7089
|
if (node.type === "linebreak") {
|
|
7234
7090
|
if (!foundFirstBreak) {
|
|
7235
7091
|
foundFirstBreak = true;
|
|
7236
|
-
return /* @__PURE__ */ (0,
|
|
7092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", {}, index);
|
|
7237
7093
|
} else {
|
|
7238
|
-
return /* @__PURE__ */ (0,
|
|
7094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
7239
7095
|
}
|
|
7240
7096
|
} else {
|
|
7241
7097
|
foundFirstBreak = false;
|
|
7242
|
-
return /* @__PURE__ */ (0,
|
|
7098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react49.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
7243
7099
|
}
|
|
7244
7100
|
}) });
|
|
7245
7101
|
};
|
|
7246
7102
|
var ListItemNode_default = ListItemNode;
|
|
7247
7103
|
|
|
7248
7104
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
7249
|
-
var
|
|
7105
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
7250
7106
|
var ListNode = (props) => {
|
|
7251
7107
|
const NodeTypes2 = {
|
|
7252
7108
|
listitem: ListItemNode_default
|
|
7253
7109
|
};
|
|
7254
|
-
return /* @__PURE__ */ (0,
|
|
7255
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
7110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_react50.default.Fragment, { children: [
|
|
7111
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7256
7112
|
const SelectedNode = NodeTypes2[node.type];
|
|
7257
|
-
return /* @__PURE__ */ (0,
|
|
7113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
7258
7114
|
}) }),
|
|
7259
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
7115
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7260
7116
|
const SelectedNode = NodeTypes2[node.type];
|
|
7261
|
-
return /* @__PURE__ */ (0,
|
|
7117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
7262
7118
|
}) })
|
|
7263
7119
|
] });
|
|
7264
7120
|
};
|
|
7265
7121
|
var ListNode_default = ListNode;
|
|
7266
7122
|
|
|
7267
7123
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
7268
|
-
var
|
|
7269
|
-
var
|
|
7124
|
+
var import_react51 = __toESM(require("react"));
|
|
7125
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
7270
7126
|
var QuoteNode = (props) => {
|
|
7271
7127
|
const NodeTypes2 = {
|
|
7272
7128
|
["text"]: TextNode_default,
|
|
7273
7129
|
["linebreak"]: LineBreakNode_default,
|
|
7274
7130
|
["link"]: LinkNode_default
|
|
7275
7131
|
};
|
|
7276
|
-
return /* @__PURE__ */ (0,
|
|
7132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7277
7133
|
const SelectedNode = NodeTypes2[node.type];
|
|
7278
|
-
return /* @__PURE__ */ (0,
|
|
7134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
7279
7135
|
}) });
|
|
7280
7136
|
};
|
|
7281
7137
|
var QuoteNode_default = QuoteNode;
|
|
7282
7138
|
|
|
7283
7139
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
7284
|
-
var
|
|
7140
|
+
var import_react53 = __toESM(require("react"));
|
|
7285
7141
|
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
7286
|
-
var
|
|
7142
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
7287
7143
|
var CopyButton2 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
7288
7144
|
ssr: false,
|
|
7289
7145
|
// optional: fallback UI while loading
|
|
7290
|
-
loading: () => /* @__PURE__ */ (0,
|
|
7146
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
7291
7147
|
});
|
|
7292
7148
|
var CodeNode = (props) => {
|
|
7293
7149
|
const NodeTypes2 = {
|
|
@@ -7301,14 +7157,14 @@ var CodeNode = (props) => {
|
|
|
7301
7157
|
if (node.type === "link") return node.text || node.url || "";
|
|
7302
7158
|
return "";
|
|
7303
7159
|
}).join("") ?? "";
|
|
7304
|
-
return /* @__PURE__ */ (0,
|
|
7305
|
-
/* @__PURE__ */ (0,
|
|
7306
|
-
/* @__PURE__ */ (0,
|
|
7307
|
-
/* @__PURE__ */ (0,
|
|
7160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { children: [
|
|
7161
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
7162
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: "Code Snippet" }),
|
|
7163
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(CopyButton2, { text: textContent })
|
|
7308
7164
|
] }),
|
|
7309
|
-
/* @__PURE__ */ (0,
|
|
7165
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("code", { className: "bg-neutral-soft p-4 text-sm whitespace-pre-wrap border border-2 block", children: props.node.children && props.node.children.map((node, index) => {
|
|
7310
7166
|
const SelectedNode = NodeTypes2[node.type];
|
|
7311
|
-
return /* @__PURE__ */ (0,
|
|
7167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
7312
7168
|
SelectedNode,
|
|
7313
7169
|
{
|
|
7314
7170
|
node,
|
|
@@ -7323,15 +7179,15 @@ var CodeNode = (props) => {
|
|
|
7323
7179
|
var CodeNode_default = CodeNode;
|
|
7324
7180
|
|
|
7325
7181
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
7326
|
-
var
|
|
7182
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
7327
7183
|
var HorizontalRuleNode = () => {
|
|
7328
|
-
return /* @__PURE__ */ (0,
|
|
7184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("hr", {});
|
|
7329
7185
|
};
|
|
7330
7186
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
7331
7187
|
|
|
7332
7188
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
7333
|
-
var
|
|
7334
|
-
var
|
|
7189
|
+
var import_react54 = __toESM(require("react"));
|
|
7190
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
7335
7191
|
var WidgetNode = (props) => {
|
|
7336
7192
|
const getWidgetParameters = () => {
|
|
7337
7193
|
const widgetInputParameters = {
|
|
@@ -7395,7 +7251,7 @@ var WidgetNode = (props) => {
|
|
|
7395
7251
|
};
|
|
7396
7252
|
const widgetCode = props.node?.widgetCode;
|
|
7397
7253
|
if (!widgetCode) {
|
|
7398
|
-
return /* @__PURE__ */ (0,
|
|
7254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_jsx_runtime76.Fragment, { children: "Invalid widget" });
|
|
7399
7255
|
}
|
|
7400
7256
|
const widgetParams = getWidgetParameters();
|
|
7401
7257
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -7404,7 +7260,7 @@ var WidgetNode = (props) => {
|
|
|
7404
7260
|
}
|
|
7405
7261
|
return (
|
|
7406
7262
|
// eslint-disable-next-line react-hooks/static-components
|
|
7407
|
-
/* @__PURE__ */ (0,
|
|
7263
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7408
7264
|
WidgetRenderer,
|
|
7409
7265
|
{
|
|
7410
7266
|
params: widgetParams,
|
|
@@ -7422,11 +7278,11 @@ var WidgetNode_default = WidgetNode;
|
|
|
7422
7278
|
|
|
7423
7279
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
7424
7280
|
var import_dynamic13 = __toESM(require("next/dynamic"));
|
|
7425
|
-
var
|
|
7281
|
+
var import_react60 = __toESM(require("react"));
|
|
7426
7282
|
|
|
7427
7283
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
7428
7284
|
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
7429
|
-
var
|
|
7285
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7430
7286
|
var IframeClient2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
7431
7287
|
ssr: false
|
|
7432
7288
|
});
|
|
@@ -7439,7 +7295,7 @@ var EmbedNode = (props) => {
|
|
|
7439
7295
|
} else {
|
|
7440
7296
|
src = props.node.embedSrc;
|
|
7441
7297
|
}
|
|
7442
|
-
return /* @__PURE__ */ (0,
|
|
7298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IframeClient2, { src }) });
|
|
7443
7299
|
};
|
|
7444
7300
|
var EmbedNode_default = EmbedNode;
|
|
7445
7301
|
|
|
@@ -7639,10 +7495,10 @@ var PathUtility = class {
|
|
|
7639
7495
|
var PathUtility_default = new PathUtility();
|
|
7640
7496
|
|
|
7641
7497
|
// src/components/NoDataFound.tsx
|
|
7642
|
-
var
|
|
7498
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7643
7499
|
var NoDataFound = () => {
|
|
7644
|
-
return /* @__PURE__ */ (0,
|
|
7645
|
-
/* @__PURE__ */ (0,
|
|
7500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
7501
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7646
7502
|
"svg",
|
|
7647
7503
|
{
|
|
7648
7504
|
className: "w-10 h-10",
|
|
@@ -7650,7 +7506,7 @@ var NoDataFound = () => {
|
|
|
7650
7506
|
stroke: "currentColor",
|
|
7651
7507
|
viewBox: "0 0 24 24",
|
|
7652
7508
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7653
|
-
children: /* @__PURE__ */ (0,
|
|
7509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7654
7510
|
"path",
|
|
7655
7511
|
{
|
|
7656
7512
|
strokeLinecap: "round",
|
|
@@ -7661,8 +7517,8 @@ var NoDataFound = () => {
|
|
|
7661
7517
|
)
|
|
7662
7518
|
}
|
|
7663
7519
|
) }) }),
|
|
7664
|
-
/* @__PURE__ */ (0,
|
|
7665
|
-
/* @__PURE__ */ (0,
|
|
7520
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
7521
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
7666
7522
|
] });
|
|
7667
7523
|
};
|
|
7668
7524
|
var NoDataFound_default = NoDataFound;
|
|
@@ -7670,7 +7526,7 @@ var NoDataFound_default = NoDataFound;
|
|
|
7670
7526
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
7671
7527
|
init_AssetUtility();
|
|
7672
7528
|
var import_dynamic11 = __toESM(require("next/dynamic"));
|
|
7673
|
-
var
|
|
7529
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7674
7530
|
var HlsPlayer4 = (0, import_dynamic11.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
7675
7531
|
var deviceToMediaQuery = (device) => {
|
|
7676
7532
|
switch (device) {
|
|
@@ -7826,8 +7682,8 @@ var ImageGalleryNode = (props) => {
|
|
|
7826
7682
|
right: "justify-end"
|
|
7827
7683
|
};
|
|
7828
7684
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
7829
|
-
return /* @__PURE__ */ (0,
|
|
7830
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
7685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7686
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7831
7687
|
HlsPlayer4,
|
|
7832
7688
|
{
|
|
7833
7689
|
sources: hlsSources,
|
|
@@ -7842,7 +7698,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7842
7698
|
styles: hlsStyles
|
|
7843
7699
|
}
|
|
7844
7700
|
) }),
|
|
7845
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
7701
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("picture", { children: [
|
|
7846
7702
|
DEVICE_ORDER.map((deviceKey) => {
|
|
7847
7703
|
const match = staticSources.find(
|
|
7848
7704
|
(img) => img.device === deviceKey
|
|
@@ -7858,7 +7714,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7858
7714
|
if (!srcUrl) {
|
|
7859
7715
|
return null;
|
|
7860
7716
|
}
|
|
7861
|
-
return /* @__PURE__ */ (0,
|
|
7717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7862
7718
|
"source",
|
|
7863
7719
|
{
|
|
7864
7720
|
media: deviceToMediaQuery(match.device),
|
|
@@ -7883,7 +7739,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7883
7739
|
if (img.borderRadius) {
|
|
7884
7740
|
styles.borderRadius = img.borderRadius;
|
|
7885
7741
|
}
|
|
7886
|
-
return /* @__PURE__ */ (0,
|
|
7742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7887
7743
|
"img",
|
|
7888
7744
|
{
|
|
7889
7745
|
loading: "lazy",
|
|
@@ -7898,7 +7754,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7898
7754
|
})()
|
|
7899
7755
|
] }) : (
|
|
7900
7756
|
/* Case 2: Only device-specific images exist */
|
|
7901
|
-
/* @__PURE__ */ (0,
|
|
7757
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children: staticSources.map((img, index) => {
|
|
7902
7758
|
const resolved = resolveImage(img);
|
|
7903
7759
|
const imageUrl = resolved?.imageUrl;
|
|
7904
7760
|
if (!imageUrl) {
|
|
@@ -7925,7 +7781,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7925
7781
|
default:
|
|
7926
7782
|
display = "block";
|
|
7927
7783
|
}
|
|
7928
|
-
return /* @__PURE__ */ (0,
|
|
7784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7929
7785
|
"img",
|
|
7930
7786
|
{
|
|
7931
7787
|
loading: "lazy",
|
|
@@ -8066,28 +7922,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
8066
7922
|
|
|
8067
7923
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
8068
7924
|
init_AssetUtility();
|
|
8069
|
-
var
|
|
7925
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8070
7926
|
var getNestedValue5 = (obj, path) => {
|
|
8071
7927
|
if (!obj || !path) return void 0;
|
|
8072
7928
|
return path.split(".").reduce((current, key) => {
|
|
8073
7929
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
8074
7930
|
}, obj);
|
|
8075
7931
|
};
|
|
8076
|
-
var PdfIcon2 = () => /* @__PURE__ */ (0,
|
|
7932
|
+
var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8077
7933
|
"svg",
|
|
8078
7934
|
{
|
|
8079
7935
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8080
7936
|
viewBox: "0 0 48 48",
|
|
8081
7937
|
className: "w-10 h-10",
|
|
8082
7938
|
children: [
|
|
8083
|
-
/* @__PURE__ */ (0,
|
|
7939
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8084
7940
|
"path",
|
|
8085
7941
|
{
|
|
8086
7942
|
fill: "#e53935",
|
|
8087
7943
|
d: "M38,42H10c-2.209,0-4-1.791-4-4V10c0-2.209,1.791-4,4-4h28c2.209,0,4,1.791,4,4v28 C42,40.209,40.209,42,38,42z"
|
|
8088
7944
|
}
|
|
8089
7945
|
),
|
|
8090
|
-
/* @__PURE__ */ (0,
|
|
7946
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8091
7947
|
"path",
|
|
8092
7948
|
{
|
|
8093
7949
|
fill: "#fff",
|
|
@@ -8097,55 +7953,55 @@ var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8097
7953
|
]
|
|
8098
7954
|
}
|
|
8099
7955
|
);
|
|
8100
|
-
var ExcelIcon2 = () => /* @__PURE__ */ (0,
|
|
7956
|
+
var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8101
7957
|
"svg",
|
|
8102
7958
|
{
|
|
8103
7959
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8104
7960
|
viewBox: "0 0 48 48",
|
|
8105
7961
|
className: "w-10 h-10",
|
|
8106
7962
|
children: [
|
|
8107
|
-
/* @__PURE__ */ (0,
|
|
7963
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8108
7964
|
"path",
|
|
8109
7965
|
{
|
|
8110
7966
|
fill: "#169154",
|
|
8111
7967
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
8112
7968
|
}
|
|
8113
7969
|
),
|
|
8114
|
-
/* @__PURE__ */ (0,
|
|
7970
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8115
7971
|
"path",
|
|
8116
7972
|
{
|
|
8117
7973
|
fill: "#18482a",
|
|
8118
7974
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
8119
7975
|
}
|
|
8120
7976
|
),
|
|
8121
|
-
/* @__PURE__ */ (0,
|
|
8122
|
-
/* @__PURE__ */ (0,
|
|
8123
|
-
/* @__PURE__ */ (0,
|
|
8124
|
-
/* @__PURE__ */ (0,
|
|
7977
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
7978
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
7979
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("g", { children: [
|
|
7980
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8125
7981
|
"path",
|
|
8126
7982
|
{
|
|
8127
7983
|
fill: "#29c27f",
|
|
8128
7984
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
8129
7985
|
}
|
|
8130
7986
|
),
|
|
8131
|
-
/* @__PURE__ */ (0,
|
|
7987
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8132
7988
|
"path",
|
|
8133
7989
|
{
|
|
8134
7990
|
fill: "#27663f",
|
|
8135
7991
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
8136
7992
|
}
|
|
8137
7993
|
),
|
|
8138
|
-
/* @__PURE__ */ (0,
|
|
8139
|
-
/* @__PURE__ */ (0,
|
|
7994
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
7995
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
8140
7996
|
] }),
|
|
8141
|
-
/* @__PURE__ */ (0,
|
|
7997
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8142
7998
|
"path",
|
|
8143
7999
|
{
|
|
8144
8000
|
fill: "#0c7238",
|
|
8145
8001
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
8146
8002
|
}
|
|
8147
8003
|
),
|
|
8148
|
-
/* @__PURE__ */ (0,
|
|
8004
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8149
8005
|
"path",
|
|
8150
8006
|
{
|
|
8151
8007
|
fill: "#fff",
|
|
@@ -8155,7 +8011,7 @@ var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8155
8011
|
]
|
|
8156
8012
|
}
|
|
8157
8013
|
);
|
|
8158
|
-
var WordIcon2 = () => /* @__PURE__ */ (0,
|
|
8014
|
+
var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8159
8015
|
"svg",
|
|
8160
8016
|
{
|
|
8161
8017
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8163,14 +8019,14 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8163
8019
|
className: "w-10 h-10",
|
|
8164
8020
|
baseProfile: "basic",
|
|
8165
8021
|
children: [
|
|
8166
|
-
/* @__PURE__ */ (0,
|
|
8022
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8167
8023
|
"path",
|
|
8168
8024
|
{
|
|
8169
8025
|
fill: "#283593",
|
|
8170
8026
|
d: "M9,33.595l14.911-18.706L41,26v13.306C41,41.346,39.346,43,37.306,43H15.332 C11.835,43,9,40.164,9,36.667C9,36.667,9,33.595,9,33.595z"
|
|
8171
8027
|
}
|
|
8172
8028
|
),
|
|
8173
|
-
/* @__PURE__ */ (0,
|
|
8029
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8174
8030
|
"linearGradient",
|
|
8175
8031
|
{
|
|
8176
8032
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -8181,19 +8037,19 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8181
8037
|
gradientTransform: "translate(0 -339.89)",
|
|
8182
8038
|
gradientUnits: "userSpaceOnUse",
|
|
8183
8039
|
children: [
|
|
8184
|
-
/* @__PURE__ */ (0,
|
|
8185
|
-
/* @__PURE__ */ (0,
|
|
8040
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
8041
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
8186
8042
|
]
|
|
8187
8043
|
}
|
|
8188
8044
|
),
|
|
8189
|
-
/* @__PURE__ */ (0,
|
|
8045
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8190
8046
|
"path",
|
|
8191
8047
|
{
|
|
8192
8048
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
8193
8049
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
8194
8050
|
}
|
|
8195
8051
|
),
|
|
8196
|
-
/* @__PURE__ */ (0,
|
|
8052
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8197
8053
|
"path",
|
|
8198
8054
|
{
|
|
8199
8055
|
fill: "#1e88e5",
|
|
@@ -8201,21 +8057,21 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8201
8057
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
8202
8058
|
}
|
|
8203
8059
|
),
|
|
8204
|
-
/* @__PURE__ */ (0,
|
|
8060
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8205
8061
|
"path",
|
|
8206
8062
|
{
|
|
8207
8063
|
fill: "#00e5ff",
|
|
8208
8064
|
d: "M9,10.333C9,6.836,11.835,4,15.332,4h21.975C39.346,4,41,5.654,41,7.694v5.611 C41,15.346,39.346,17,37.306,17H15.332C11.835,17,9,19.836,9,23.333C9,23.333,9,10.333,9,10.333z"
|
|
8209
8065
|
}
|
|
8210
8066
|
),
|
|
8211
|
-
/* @__PURE__ */ (0,
|
|
8067
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8212
8068
|
"path",
|
|
8213
8069
|
{
|
|
8214
8070
|
fill: "#1565c0",
|
|
8215
8071
|
d: "M7.5,23h10c1.933,0,3.5,1.567,3.5,3.5v10c0,1.933-1.567,3.5-3.5,3.5h-10C5.567,40,4,38.433,4,36.5 v-10C4,24.567,5.567,23,7.5,23z"
|
|
8216
8072
|
}
|
|
8217
8073
|
),
|
|
8218
|
-
/* @__PURE__ */ (0,
|
|
8074
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8219
8075
|
"path",
|
|
8220
8076
|
{
|
|
8221
8077
|
fill: "#fff",
|
|
@@ -8225,42 +8081,42 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8225
8081
|
]
|
|
8226
8082
|
}
|
|
8227
8083
|
);
|
|
8228
|
-
var StandardIcon2 = () => /* @__PURE__ */ (0,
|
|
8084
|
+
var StandardIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8229
8085
|
"svg",
|
|
8230
8086
|
{
|
|
8231
8087
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8232
8088
|
viewBox: "0 0 48 48",
|
|
8233
8089
|
className: "w-10 h-10",
|
|
8234
8090
|
children: [
|
|
8235
|
-
/* @__PURE__ */ (0,
|
|
8236
|
-
/* @__PURE__ */ (0,
|
|
8091
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
8092
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
8237
8093
|
]
|
|
8238
8094
|
}
|
|
8239
8095
|
);
|
|
8240
|
-
var PowerPointIcon2 = () => /* @__PURE__ */ (0,
|
|
8096
|
+
var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8241
8097
|
"svg",
|
|
8242
8098
|
{
|
|
8243
8099
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8244
8100
|
viewBox: "0 0 48 48",
|
|
8245
8101
|
className: "w-10 h-10",
|
|
8246
8102
|
children: [
|
|
8247
|
-
/* @__PURE__ */ (0,
|
|
8103
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8248
8104
|
"path",
|
|
8249
8105
|
{
|
|
8250
8106
|
fill: "#dc4c2c",
|
|
8251
8107
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
8252
8108
|
}
|
|
8253
8109
|
),
|
|
8254
|
-
/* @__PURE__ */ (0,
|
|
8255
|
-
/* @__PURE__ */ (0,
|
|
8256
|
-
/* @__PURE__ */ (0,
|
|
8110
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
8111
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
8112
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8257
8113
|
"path",
|
|
8258
8114
|
{
|
|
8259
8115
|
fill: "#9b341f",
|
|
8260
8116
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
8261
8117
|
}
|
|
8262
8118
|
),
|
|
8263
|
-
/* @__PURE__ */ (0,
|
|
8119
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8264
8120
|
"path",
|
|
8265
8121
|
{
|
|
8266
8122
|
fill: "#fff",
|
|
@@ -8270,16 +8126,16 @@ var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8270
8126
|
]
|
|
8271
8127
|
}
|
|
8272
8128
|
);
|
|
8273
|
-
var TextIcon2 = () => /* @__PURE__ */ (0,
|
|
8129
|
+
var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8274
8130
|
"svg",
|
|
8275
8131
|
{
|
|
8276
8132
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8277
8133
|
viewBox: "0 0 48 48",
|
|
8278
8134
|
className: "w-10 h-10",
|
|
8279
8135
|
children: [
|
|
8280
|
-
/* @__PURE__ */ (0,
|
|
8281
|
-
/* @__PURE__ */ (0,
|
|
8282
|
-
/* @__PURE__ */ (0,
|
|
8136
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
8137
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
8138
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8283
8139
|
"path",
|
|
8284
8140
|
{
|
|
8285
8141
|
fill: "#1976D2",
|
|
@@ -8289,7 +8145,7 @@ var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8289
8145
|
]
|
|
8290
8146
|
}
|
|
8291
8147
|
);
|
|
8292
|
-
var ArchiveIcon2 = () => /* @__PURE__ */ (0,
|
|
8148
|
+
var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8293
8149
|
"svg",
|
|
8294
8150
|
{
|
|
8295
8151
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8299,14 +8155,14 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8299
8155
|
version: "1.0",
|
|
8300
8156
|
className: "w-10 h-10",
|
|
8301
8157
|
children: [
|
|
8302
|
-
/* @__PURE__ */ (0,
|
|
8158
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8303
8159
|
"path",
|
|
8304
8160
|
{
|
|
8305
8161
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
8306
8162
|
"clip-rule": "nonzero"
|
|
8307
8163
|
}
|
|
8308
8164
|
) }) }),
|
|
8309
|
-
/* @__PURE__ */ (0,
|
|
8165
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8310
8166
|
"path",
|
|
8311
8167
|
{
|
|
8312
8168
|
fill: "#ff9100",
|
|
@@ -8315,7 +8171,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8315
8171
|
"fill-rule": "nonzero"
|
|
8316
8172
|
}
|
|
8317
8173
|
) }),
|
|
8318
|
-
/* @__PURE__ */ (0,
|
|
8174
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8319
8175
|
"path",
|
|
8320
8176
|
{
|
|
8321
8177
|
fill: "#fbe9e7",
|
|
@@ -8324,7 +8180,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8324
8180
|
"fill-rule": "nonzero"
|
|
8325
8181
|
}
|
|
8326
8182
|
),
|
|
8327
|
-
/* @__PURE__ */ (0,
|
|
8183
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8328
8184
|
"path",
|
|
8329
8185
|
{
|
|
8330
8186
|
fill: "#ffe0b2",
|
|
@@ -8333,7 +8189,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8333
8189
|
"fill-rule": "nonzero"
|
|
8334
8190
|
}
|
|
8335
8191
|
),
|
|
8336
|
-
/* @__PURE__ */ (0,
|
|
8192
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8337
8193
|
"path",
|
|
8338
8194
|
{
|
|
8339
8195
|
fill: "#ffe0b2",
|
|
@@ -8342,7 +8198,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8342
8198
|
"fill-rule": "nonzero"
|
|
8343
8199
|
}
|
|
8344
8200
|
),
|
|
8345
|
-
/* @__PURE__ */ (0,
|
|
8201
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8346
8202
|
"path",
|
|
8347
8203
|
{
|
|
8348
8204
|
fill: "#ffe0b2",
|
|
@@ -8417,8 +8273,8 @@ var DocumentNode = (props) => {
|
|
|
8417
8273
|
}
|
|
8418
8274
|
}
|
|
8419
8275
|
if (documents.length === 0) {
|
|
8420
|
-
return /* @__PURE__ */ (0,
|
|
8421
|
-
/* @__PURE__ */ (0,
|
|
8276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_jsx_runtime82.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
8277
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8422
8278
|
"svg",
|
|
8423
8279
|
{
|
|
8424
8280
|
className: "w-5 h-5",
|
|
@@ -8426,7 +8282,7 @@ var DocumentNode = (props) => {
|
|
|
8426
8282
|
stroke: "currentColor",
|
|
8427
8283
|
viewBox: "0 0 24 24",
|
|
8428
8284
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8429
|
-
children: /* @__PURE__ */ (0,
|
|
8285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8430
8286
|
"path",
|
|
8431
8287
|
{
|
|
8432
8288
|
strokeLinecap: "round",
|
|
@@ -8437,11 +8293,11 @@ var DocumentNode = (props) => {
|
|
|
8437
8293
|
)
|
|
8438
8294
|
}
|
|
8439
8295
|
) }),
|
|
8440
|
-
/* @__PURE__ */ (0,
|
|
8441
|
-
/* @__PURE__ */ (0,
|
|
8296
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
8297
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
8442
8298
|
] }) });
|
|
8443
8299
|
}
|
|
8444
|
-
return /* @__PURE__ */ (0,
|
|
8300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
8445
8301
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
8446
8302
|
props.assetBaseUrl,
|
|
8447
8303
|
doc.assetUrl
|
|
@@ -8459,16 +8315,16 @@ var DocumentNode = (props) => {
|
|
|
8459
8315
|
}
|
|
8460
8316
|
}
|
|
8461
8317
|
const { Icon: Icon2, extLabel } = getFileDetails2(documentUrl);
|
|
8462
|
-
return /* @__PURE__ */ (0,
|
|
8318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8463
8319
|
"div",
|
|
8464
8320
|
{
|
|
8465
8321
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
8466
8322
|
children: [
|
|
8467
|
-
/* @__PURE__ */ (0,
|
|
8468
|
-
/* @__PURE__ */ (0,
|
|
8469
|
-
/* @__PURE__ */ (0,
|
|
8323
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
8324
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon2, {}) }),
|
|
8325
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex items-baseline space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("h4", { className: "text-base font-semibold", children: documentTitle }) })
|
|
8470
8326
|
] }),
|
|
8471
|
-
/* @__PURE__ */ (0,
|
|
8327
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8472
8328
|
"a",
|
|
8473
8329
|
{
|
|
8474
8330
|
href: documentUrl,
|
|
@@ -8476,7 +8332,7 @@ var DocumentNode = (props) => {
|
|
|
8476
8332
|
rel: "noopener noreferrer",
|
|
8477
8333
|
className: "inline-flex items-center px-4 py-2 text-sm font-medium bg-default border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors",
|
|
8478
8334
|
children: [
|
|
8479
|
-
/* @__PURE__ */ (0,
|
|
8335
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8480
8336
|
"svg",
|
|
8481
8337
|
{
|
|
8482
8338
|
className: "w-4 h-4 mr-2",
|
|
@@ -8484,7 +8340,7 @@ var DocumentNode = (props) => {
|
|
|
8484
8340
|
stroke: "currentColor",
|
|
8485
8341
|
viewBox: "0 0 24 24",
|
|
8486
8342
|
children: [
|
|
8487
|
-
/* @__PURE__ */ (0,
|
|
8343
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8488
8344
|
"path",
|
|
8489
8345
|
{
|
|
8490
8346
|
strokeLinecap: "round",
|
|
@@ -8493,7 +8349,7 @@ var DocumentNode = (props) => {
|
|
|
8493
8349
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
8494
8350
|
}
|
|
8495
8351
|
),
|
|
8496
|
-
/* @__PURE__ */ (0,
|
|
8352
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8497
8353
|
"path",
|
|
8498
8354
|
{
|
|
8499
8355
|
strokeLinecap: "round",
|
|
@@ -8519,13 +8375,13 @@ var DocumentNode_default = DocumentNode;
|
|
|
8519
8375
|
|
|
8520
8376
|
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
8521
8377
|
var import_dynamic12 = __toESM(require("next/dynamic"));
|
|
8522
|
-
var
|
|
8378
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8523
8379
|
var IframeClient3 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
8524
8380
|
ssr: false
|
|
8525
8381
|
});
|
|
8526
8382
|
var GoogleMapNode = (props) => {
|
|
8527
8383
|
let src = props.node.embedUrl;
|
|
8528
|
-
return /* @__PURE__ */ (0,
|
|
8384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "google-map-container", children: src && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8529
8385
|
IframeClient3,
|
|
8530
8386
|
{
|
|
8531
8387
|
src,
|
|
@@ -8537,7 +8393,7 @@ var GoogleMapNode = (props) => {
|
|
|
8537
8393
|
var GoogleMapNode_default = GoogleMapNode;
|
|
8538
8394
|
|
|
8539
8395
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
8540
|
-
var
|
|
8396
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8541
8397
|
var Pagination2 = (0, import_dynamic13.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
8542
8398
|
var DataBindingControls2 = (0, import_dynamic13.default)(() => Promise.resolve().then(() => (init_DataBindingControls(), DataBindingControls_exports)), {
|
|
8543
8399
|
ssr: true
|
|
@@ -8796,7 +8652,7 @@ var DivContainer = async (props) => {
|
|
|
8796
8652
|
response = await serviceClient.get(endpoint);
|
|
8797
8653
|
result = response?.result;
|
|
8798
8654
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
8799
|
-
return /* @__PURE__ */ (0,
|
|
8655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NoDataFound_default, {});
|
|
8800
8656
|
}
|
|
8801
8657
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
8802
8658
|
childCollectionData = getNestedValue6(
|
|
@@ -8816,7 +8672,7 @@ var DivContainer = async (props) => {
|
|
|
8816
8672
|
}
|
|
8817
8673
|
const SelectedNode = NodeTypes2[node.type];
|
|
8818
8674
|
if (!SelectedNode) return null;
|
|
8819
|
-
return /* @__PURE__ */ (0,
|
|
8675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react60.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8820
8676
|
SelectedNode,
|
|
8821
8677
|
{
|
|
8822
8678
|
node,
|
|
@@ -8953,7 +8809,7 @@ var DivContainer = async (props) => {
|
|
|
8953
8809
|
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
8954
8810
|
);
|
|
8955
8811
|
const WrapperComponent = Wrapper;
|
|
8956
|
-
const renderedContainer = /* @__PURE__ */ (0,
|
|
8812
|
+
const renderedContainer = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8957
8813
|
WrapperComponent,
|
|
8958
8814
|
{
|
|
8959
8815
|
id: guid,
|
|
@@ -8967,11 +8823,11 @@ var DivContainer = async (props) => {
|
|
|
8967
8823
|
item,
|
|
8968
8824
|
idx,
|
|
8969
8825
|
props.href ? void 0 : item?.links?.view
|
|
8970
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
8826
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react60.default.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
8971
8827
|
)
|
|
8972
8828
|
}
|
|
8973
8829
|
);
|
|
8974
|
-
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0,
|
|
8830
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8975
8831
|
Pagination2,
|
|
8976
8832
|
{
|
|
8977
8833
|
path: props.path,
|
|
@@ -8979,15 +8835,15 @@ var DivContainer = async (props) => {
|
|
|
8979
8835
|
dataset: response
|
|
8980
8836
|
}
|
|
8981
8837
|
) : null;
|
|
8982
|
-
return /* @__PURE__ */ (0,
|
|
8983
|
-
/* @__PURE__ */ (0,
|
|
8838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react60.default.Fragment, { children: [
|
|
8839
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8984
8840
|
"style",
|
|
8985
8841
|
{
|
|
8986
8842
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
8987
8843
|
}
|
|
8988
8844
|
),
|
|
8989
|
-
showDataBindingControls ? /* @__PURE__ */ (0,
|
|
8990
|
-
/* @__PURE__ */ (0,
|
|
8845
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react60.default.Fragment, { children: [
|
|
8846
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8991
8847
|
DataBindingControls2,
|
|
8992
8848
|
{
|
|
8993
8849
|
mode: "toolbar",
|
|
@@ -8999,18 +8855,18 @@ var DivContainer = async (props) => {
|
|
|
8999
8855
|
showSearchBar: dataBindingProperties?.showSearchBar
|
|
9000
8856
|
}
|
|
9001
8857
|
),
|
|
9002
|
-
/* @__PURE__ */ (0,
|
|
8858
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9003
8859
|
"div",
|
|
9004
8860
|
{
|
|
9005
8861
|
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
9006
8862
|
children: [
|
|
9007
|
-
/* @__PURE__ */ (0,
|
|
8863
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "min-w-0", children: [
|
|
9008
8864
|
renderedContainer,
|
|
9009
8865
|
paginationControl
|
|
9010
8866
|
] }),
|
|
9011
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ (0,
|
|
9012
|
-
/* @__PURE__ */ (0,
|
|
9013
|
-
/* @__PURE__ */ (0,
|
|
8867
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
8868
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
8869
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9014
8870
|
DataBindingControls2,
|
|
9015
8871
|
{
|
|
9016
8872
|
mode: "facets",
|
|
@@ -9024,16 +8880,16 @@ var DivContainer = async (props) => {
|
|
|
9024
8880
|
]
|
|
9025
8881
|
}
|
|
9026
8882
|
)
|
|
9027
|
-
] }) : /* @__PURE__ */ (0,
|
|
8883
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react60.default.Fragment, { children: [
|
|
9028
8884
|
renderedContainer,
|
|
9029
|
-
paginationControl && /* @__PURE__ */ (0,
|
|
8885
|
+
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: paginationControl })
|
|
9030
8886
|
] })
|
|
9031
8887
|
] });
|
|
9032
8888
|
};
|
|
9033
8889
|
var DivContainer_default = DivContainer;
|
|
9034
8890
|
|
|
9035
8891
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
9036
|
-
var
|
|
8892
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
9037
8893
|
var NodeTypes = {
|
|
9038
8894
|
["paragraph"]: ParagraphNode_default,
|
|
9039
8895
|
["heading"]: HeadingNode_default,
|
|
@@ -9071,14 +8927,14 @@ var PageBodyRenderer = (props) => {
|
|
|
9071
8927
|
}
|
|
9072
8928
|
return true;
|
|
9073
8929
|
};
|
|
9074
|
-
return /* @__PURE__ */ (0,
|
|
8930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react61.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
9075
8931
|
{
|
|
9076
8932
|
}
|
|
9077
8933
|
const SelectedNode = NodeTypes[node.type];
|
|
9078
8934
|
if (!shouldRenderNode(node)) {
|
|
9079
8935
|
return null;
|
|
9080
8936
|
}
|
|
9081
|
-
return /* @__PURE__ */ (0,
|
|
8937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react61.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react61.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react61.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9082
8938
|
SelectedNode,
|
|
9083
8939
|
{
|
|
9084
8940
|
node,
|
|
@@ -9094,7 +8950,7 @@ var PageBodyRenderer = (props) => {
|
|
|
9094
8950
|
device: props.device,
|
|
9095
8951
|
widgetRenderer: props.widgetRenderer
|
|
9096
8952
|
}
|
|
9097
|
-
) }) : /* @__PURE__ */ (0,
|
|
8953
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react61.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9098
8954
|
SelectedNode,
|
|
9099
8955
|
{
|
|
9100
8956
|
node,
|
|
@@ -9115,10 +8971,10 @@ var PageBodyRenderer = (props) => {
|
|
|
9115
8971
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
9116
8972
|
|
|
9117
8973
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
9118
|
-
var
|
|
8974
|
+
var import_react62 = require("react");
|
|
9119
8975
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
9120
8976
|
function EnterAnimationHydrator() {
|
|
9121
|
-
(0,
|
|
8977
|
+
(0, import_react62.useEffect)(() => {
|
|
9122
8978
|
let observer;
|
|
9123
8979
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
9124
8980
|
const revealAnimatedElements = () => {
|
|
@@ -9163,22 +9019,22 @@ function EnterAnimationHydrator() {
|
|
|
9163
9019
|
}
|
|
9164
9020
|
|
|
9165
9021
|
// src/components/Toast.tsx
|
|
9166
|
-
var
|
|
9022
|
+
var import_react63 = require("react");
|
|
9167
9023
|
init_ToastService();
|
|
9168
|
-
var
|
|
9024
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9169
9025
|
var Toast = () => {
|
|
9170
|
-
const [showToast, setShowToast] = (0,
|
|
9171
|
-
const [message, setMessage] = (0,
|
|
9172
|
-
const [messageType, setMessageType] = (0,
|
|
9173
|
-
const timeoutRef = (0,
|
|
9174
|
-
const closeToast = (0,
|
|
9026
|
+
const [showToast, setShowToast] = (0, import_react63.useState)(false);
|
|
9027
|
+
const [message, setMessage] = (0, import_react63.useState)("");
|
|
9028
|
+
const [messageType, setMessageType] = (0, import_react63.useState)("error");
|
|
9029
|
+
const timeoutRef = (0, import_react63.useRef)(null);
|
|
9030
|
+
const closeToast = (0, import_react63.useCallback)(() => {
|
|
9175
9031
|
if (timeoutRef.current) {
|
|
9176
9032
|
clearTimeout(timeoutRef.current);
|
|
9177
9033
|
timeoutRef.current = null;
|
|
9178
9034
|
}
|
|
9179
9035
|
setShowToast(false);
|
|
9180
9036
|
}, []);
|
|
9181
|
-
const showMessage = (0,
|
|
9037
|
+
const showMessage = (0, import_react63.useCallback)((message2, messageType2) => {
|
|
9182
9038
|
if (timeoutRef.current) {
|
|
9183
9039
|
clearTimeout(timeoutRef.current);
|
|
9184
9040
|
}
|
|
@@ -9190,7 +9046,7 @@ var Toast = () => {
|
|
|
9190
9046
|
timeoutRef.current = null;
|
|
9191
9047
|
}, 4e3);
|
|
9192
9048
|
}, []);
|
|
9193
|
-
(0,
|
|
9049
|
+
(0, import_react63.useEffect)(() => {
|
|
9194
9050
|
ToastService_default.initialize(showMessage, closeToast);
|
|
9195
9051
|
return () => {
|
|
9196
9052
|
closeToast();
|
|
@@ -9199,8 +9055,8 @@ var Toast = () => {
|
|
|
9199
9055
|
});
|
|
9200
9056
|
};
|
|
9201
9057
|
}, [closeToast, showMessage]);
|
|
9202
|
-
return /* @__PURE__ */ (0,
|
|
9203
|
-
/* @__PURE__ */ (0,
|
|
9058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_jsx_runtime89.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
9059
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9204
9060
|
"span",
|
|
9205
9061
|
{
|
|
9206
9062
|
className: "font-medium text-inherit text-sm",
|
|
@@ -9208,7 +9064,7 @@ var Toast = () => {
|
|
|
9208
9064
|
children: message
|
|
9209
9065
|
}
|
|
9210
9066
|
),
|
|
9211
|
-
/* @__PURE__ */ (0,
|
|
9067
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9212
9068
|
"svg",
|
|
9213
9069
|
{
|
|
9214
9070
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9216,7 +9072,7 @@ var Toast = () => {
|
|
|
9216
9072
|
fill: "none",
|
|
9217
9073
|
viewBox: "0 0 24 24",
|
|
9218
9074
|
stroke: "currentColor",
|
|
9219
|
-
children: /* @__PURE__ */ (0,
|
|
9075
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
9220
9076
|
}
|
|
9221
9077
|
) })
|
|
9222
9078
|
] }) }) });
|
|
@@ -9236,18 +9092,16 @@ init_CheckboxInput();
|
|
|
9236
9092
|
init_OtpInput();
|
|
9237
9093
|
init_DateTimeInput();
|
|
9238
9094
|
init_ColorInput();
|
|
9239
|
-
init_BooleanSelect();
|
|
9240
9095
|
init_Select();
|
|
9241
9096
|
init_EmailInput();
|
|
9242
9097
|
init_TimeInput();
|
|
9243
9098
|
init_DateInput();
|
|
9244
9099
|
init_RadioInput();
|
|
9245
|
-
init_Switcher();
|
|
9246
9100
|
|
|
9247
9101
|
// src/components/NavigationTabsV2.tsx
|
|
9248
9102
|
var import_link3 = __toESM(require("next/link"));
|
|
9249
9103
|
var import_navigation2 = require("next/navigation");
|
|
9250
|
-
var
|
|
9104
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
9251
9105
|
function resolveRoutePlaceholders(route, params) {
|
|
9252
9106
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
9253
9107
|
const value = params[key];
|
|
@@ -9272,8 +9126,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
9272
9126
|
isActive: tab.isActive
|
|
9273
9127
|
})) || [];
|
|
9274
9128
|
if (mappedTabs.length === 0) return null;
|
|
9275
|
-
return /* @__PURE__ */ (0,
|
|
9276
|
-
return /* @__PURE__ */ (0,
|
|
9129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
9130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
9277
9131
|
"div",
|
|
9278
9132
|
{
|
|
9279
9133
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -9286,15 +9140,15 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
9286
9140
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
9287
9141
|
|
|
9288
9142
|
// src/components/dataForm/DataList.tsx
|
|
9289
|
-
var
|
|
9143
|
+
var import_react66 = __toESM(require("react"));
|
|
9290
9144
|
init_InputControl();
|
|
9291
9145
|
var import_navigation3 = require("next/navigation");
|
|
9292
9146
|
|
|
9293
9147
|
// src/components/dataForm/NoContentView.tsx
|
|
9294
|
-
var
|
|
9295
|
-
var
|
|
9148
|
+
var import_react64 = __toESM(require("react"));
|
|
9149
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
9296
9150
|
var NoContentView = (props) => {
|
|
9297
|
-
return /* @__PURE__ */ (0,
|
|
9151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react64.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
9298
9152
|
};
|
|
9299
9153
|
var NoContentView_default = NoContentView;
|
|
9300
9154
|
|
|
@@ -9302,39 +9156,39 @@ var NoContentView_default = NoContentView;
|
|
|
9302
9156
|
init_InputControlType();
|
|
9303
9157
|
|
|
9304
9158
|
// src/components/dataForm/ContentView.tsx
|
|
9305
|
-
var
|
|
9306
|
-
var
|
|
9159
|
+
var import_react65 = __toESM(require("react"));
|
|
9160
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
9307
9161
|
var ContentView = (props) => {
|
|
9308
|
-
return /* @__PURE__ */ (0,
|
|
9309
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
9310
|
-
/* @__PURE__ */ (0,
|
|
9311
|
-
/* @__PURE__ */ (0,
|
|
9312
|
-
/* @__PURE__ */ (0,
|
|
9313
|
-
/* @__PURE__ */ (0,
|
|
9314
|
-
/* @__PURE__ */ (0,
|
|
9162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_react65.default.Fragment, { children: [
|
|
9163
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
9164
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
9165
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
9166
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ml-2", children: [
|
|
9167
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
9168
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
9315
9169
|
] })
|
|
9316
9170
|
] }),
|
|
9317
|
-
/* @__PURE__ */ (0,
|
|
9318
|
-
/* @__PURE__ */ (0,
|
|
9319
|
-
/* @__PURE__ */ (0,
|
|
9320
|
-
/* @__PURE__ */ (0,
|
|
9321
|
-
/* @__PURE__ */ (0,
|
|
9322
|
-
/* @__PURE__ */ (0,
|
|
9323
|
-
/* @__PURE__ */ (0,
|
|
9171
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
9172
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "animate-pulse", children: [
|
|
9173
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
9174
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
9175
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
9176
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
9177
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
9324
9178
|
] }),
|
|
9325
|
-
/* @__PURE__ */ (0,
|
|
9326
|
-
/* @__PURE__ */ (0,
|
|
9327
|
-
/* @__PURE__ */ (0,
|
|
9328
|
-
/* @__PURE__ */ (0,
|
|
9329
|
-
/* @__PURE__ */ (0,
|
|
9330
|
-
/* @__PURE__ */ (0,
|
|
9179
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "animate-pulse", children: [
|
|
9180
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
9181
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
9182
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
9183
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
9184
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
9331
9185
|
] }),
|
|
9332
|
-
/* @__PURE__ */ (0,
|
|
9333
|
-
/* @__PURE__ */ (0,
|
|
9334
|
-
/* @__PURE__ */ (0,
|
|
9335
|
-
/* @__PURE__ */ (0,
|
|
9336
|
-
/* @__PURE__ */ (0,
|
|
9337
|
-
/* @__PURE__ */ (0,
|
|
9186
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "animate-pulse", children: [
|
|
9187
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
9188
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
9189
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
9190
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
9191
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
9338
9192
|
] })
|
|
9339
9193
|
] })
|
|
9340
9194
|
] }) }),
|
|
@@ -9394,7 +9248,7 @@ function FormReducer(state, action) {
|
|
|
9394
9248
|
var FormReducer_default = FormReducer;
|
|
9395
9249
|
|
|
9396
9250
|
// src/components/dataForm/DataList.tsx
|
|
9397
|
-
var
|
|
9251
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
9398
9252
|
var DataList = (props) => {
|
|
9399
9253
|
const router = (0, import_navigation3.useRouter)();
|
|
9400
9254
|
let builder = new OdataBuilder(props.path);
|
|
@@ -9402,12 +9256,12 @@ var DataList = (props) => {
|
|
|
9402
9256
|
let activePageNumber = 0;
|
|
9403
9257
|
let pages = 0;
|
|
9404
9258
|
console.log(props.addLinkText);
|
|
9405
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
9406
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
9407
|
-
(0,
|
|
9259
|
+
const [isDataFound, setIsDataFound] = (0, import_react66.useState)(null);
|
|
9260
|
+
const [searchTerm, setSearchTerm] = (0, import_react66.useState)(props.query?.searchTerm ?? "");
|
|
9261
|
+
(0, import_react66.useEffect)(() => {
|
|
9408
9262
|
setSearchTerm(props.query?.searchTerm ?? "");
|
|
9409
9263
|
}, [props.query?.searchTerm]);
|
|
9410
|
-
(0,
|
|
9264
|
+
(0, import_react66.useEffect)(() => {
|
|
9411
9265
|
if (props?.dataset) {
|
|
9412
9266
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
9413
9267
|
setIsDataFound(true);
|
|
@@ -9416,7 +9270,7 @@ var DataList = (props) => {
|
|
|
9416
9270
|
}
|
|
9417
9271
|
}
|
|
9418
9272
|
}, [props.dataset]);
|
|
9419
|
-
(0,
|
|
9273
|
+
(0, import_react66.useEffect)(() => {
|
|
9420
9274
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
9421
9275
|
const filterQuery = props.query["$filter"];
|
|
9422
9276
|
props.filters.forEach((filter) => {
|
|
@@ -9435,7 +9289,7 @@ var DataList = (props) => {
|
|
|
9435
9289
|
if (path.includes(".")) {
|
|
9436
9290
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
9437
9291
|
} else if (Array.isArray(obj[path])) {
|
|
9438
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
9292
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { children: item }, index));
|
|
9439
9293
|
} else {
|
|
9440
9294
|
return obj[path];
|
|
9441
9295
|
}
|
|
@@ -9444,11 +9298,11 @@ var DataList = (props) => {
|
|
|
9444
9298
|
inputValues: {},
|
|
9445
9299
|
lastPropertyChanged: ""
|
|
9446
9300
|
};
|
|
9447
|
-
const [formState, dispatch] = (0,
|
|
9301
|
+
const [formState, dispatch] = (0, import_react66.useReducer)(FormReducer_default, initialState);
|
|
9448
9302
|
const getSearchableColumns = () => {
|
|
9449
9303
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
9450
9304
|
};
|
|
9451
|
-
const handleFilterChange = (0,
|
|
9305
|
+
const handleFilterChange = (0, import_react66.useCallback)(
|
|
9452
9306
|
(updatedValues) => {
|
|
9453
9307
|
dispatch({
|
|
9454
9308
|
type: FORM_INPUT_UPDATE,
|
|
@@ -9479,7 +9333,7 @@ var DataList = (props) => {
|
|
|
9479
9333
|
},
|
|
9480
9334
|
[dispatch, props, router]
|
|
9481
9335
|
);
|
|
9482
|
-
(0,
|
|
9336
|
+
(0, import_react66.useEffect)(() => {
|
|
9483
9337
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
9484
9338
|
return;
|
|
9485
9339
|
}
|
|
@@ -9517,30 +9371,30 @@ var DataList = (props) => {
|
|
|
9517
9371
|
const renderPageNumbers = () => {
|
|
9518
9372
|
if (pages <= 10) {
|
|
9519
9373
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
9520
|
-
(page) => /* @__PURE__ */ (0,
|
|
9374
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9521
9375
|
Hyperlink,
|
|
9522
9376
|
{
|
|
9523
9377
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
9524
9378
|
href: builder.getNewPageUrl(page),
|
|
9525
9379
|
children: page
|
|
9526
9380
|
}
|
|
9527
|
-
) : /* @__PURE__ */ (0,
|
|
9381
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
9528
9382
|
);
|
|
9529
9383
|
} else {
|
|
9530
9384
|
const showFirstPages = activePageNumber <= 5;
|
|
9531
9385
|
const showLastPages = activePageNumber > pages - 5;
|
|
9532
9386
|
if (showFirstPages) {
|
|
9533
|
-
return /* @__PURE__ */ (0,
|
|
9534
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
9387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9388
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9535
9389
|
Hyperlink,
|
|
9536
9390
|
{
|
|
9537
9391
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
9538
9392
|
href: builder.getNewPageUrl(page),
|
|
9539
9393
|
children: page
|
|
9540
9394
|
}
|
|
9541
|
-
) : /* @__PURE__ */ (0,
|
|
9542
|
-
/* @__PURE__ */ (0,
|
|
9543
|
-
/* @__PURE__ */ (0,
|
|
9395
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
9396
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9397
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9544
9398
|
Hyperlink,
|
|
9545
9399
|
{
|
|
9546
9400
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9548,7 +9402,7 @@ var DataList = (props) => {
|
|
|
9548
9402
|
children: pages - 1
|
|
9549
9403
|
}
|
|
9550
9404
|
),
|
|
9551
|
-
/* @__PURE__ */ (0,
|
|
9405
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9552
9406
|
Hyperlink,
|
|
9553
9407
|
{
|
|
9554
9408
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9556,7 +9410,7 @@ var DataList = (props) => {
|
|
|
9556
9410
|
children: pages
|
|
9557
9411
|
}
|
|
9558
9412
|
),
|
|
9559
|
-
/* @__PURE__ */ (0,
|
|
9413
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9560
9414
|
"select",
|
|
9561
9415
|
{
|
|
9562
9416
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -9568,18 +9422,18 @@ var DataList = (props) => {
|
|
|
9568
9422
|
}
|
|
9569
9423
|
},
|
|
9570
9424
|
children: [
|
|
9571
|
-
/* @__PURE__ */ (0,
|
|
9425
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
9572
9426
|
Array.from(
|
|
9573
9427
|
{ length: Math.max(0, pages - 10) },
|
|
9574
9428
|
(_, index) => index + 9
|
|
9575
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
9429
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("option", { value: page, children: page }, page))
|
|
9576
9430
|
]
|
|
9577
9431
|
}
|
|
9578
9432
|
) })
|
|
9579
9433
|
] });
|
|
9580
9434
|
} else if (showLastPages) {
|
|
9581
|
-
return /* @__PURE__ */ (0,
|
|
9582
|
-
/* @__PURE__ */ (0,
|
|
9435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9436
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9583
9437
|
Hyperlink,
|
|
9584
9438
|
{
|
|
9585
9439
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9587,7 +9441,7 @@ var DataList = (props) => {
|
|
|
9587
9441
|
children: "1"
|
|
9588
9442
|
}
|
|
9589
9443
|
),
|
|
9590
|
-
/* @__PURE__ */ (0,
|
|
9444
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9591
9445
|
Hyperlink,
|
|
9592
9446
|
{
|
|
9593
9447
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9595,21 +9449,21 @@ var DataList = (props) => {
|
|
|
9595
9449
|
children: "2"
|
|
9596
9450
|
}
|
|
9597
9451
|
),
|
|
9598
|
-
/* @__PURE__ */ (0,
|
|
9452
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9599
9453
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
9600
|
-
(page) => /* @__PURE__ */ (0,
|
|
9454
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9601
9455
|
Hyperlink,
|
|
9602
9456
|
{
|
|
9603
9457
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
9604
9458
|
href: builder.getNewPageUrl(page),
|
|
9605
9459
|
children: page
|
|
9606
9460
|
}
|
|
9607
|
-
) : /* @__PURE__ */ (0,
|
|
9461
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
9608
9462
|
)
|
|
9609
9463
|
] });
|
|
9610
9464
|
} else {
|
|
9611
|
-
return /* @__PURE__ */ (0,
|
|
9612
|
-
/* @__PURE__ */ (0,
|
|
9465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9466
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9613
9467
|
Hyperlink,
|
|
9614
9468
|
{
|
|
9615
9469
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9617,7 +9471,7 @@ var DataList = (props) => {
|
|
|
9617
9471
|
children: "1"
|
|
9618
9472
|
}
|
|
9619
9473
|
),
|
|
9620
|
-
/* @__PURE__ */ (0,
|
|
9474
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9621
9475
|
Hyperlink,
|
|
9622
9476
|
{
|
|
9623
9477
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9625,20 +9479,20 @@ var DataList = (props) => {
|
|
|
9625
9479
|
children: "2"
|
|
9626
9480
|
}
|
|
9627
9481
|
),
|
|
9628
|
-
/* @__PURE__ */ (0,
|
|
9482
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9629
9483
|
Array.from(
|
|
9630
9484
|
{ length: 5 },
|
|
9631
9485
|
(_, index) => activePageNumber - 2 + index
|
|
9632
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
9486
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9633
9487
|
Hyperlink,
|
|
9634
9488
|
{
|
|
9635
9489
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
9636
9490
|
href: builder.getNewPageUrl(page),
|
|
9637
9491
|
children: page
|
|
9638
9492
|
}
|
|
9639
|
-
) : /* @__PURE__ */ (0,
|
|
9640
|
-
/* @__PURE__ */ (0,
|
|
9641
|
-
/* @__PURE__ */ (0,
|
|
9493
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
9494
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9495
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9642
9496
|
Hyperlink,
|
|
9643
9497
|
{
|
|
9644
9498
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9646,7 +9500,7 @@ var DataList = (props) => {
|
|
|
9646
9500
|
children: pages - 1
|
|
9647
9501
|
}
|
|
9648
9502
|
),
|
|
9649
|
-
/* @__PURE__ */ (0,
|
|
9503
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9650
9504
|
Hyperlink,
|
|
9651
9505
|
{
|
|
9652
9506
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9654,7 +9508,7 @@ var DataList = (props) => {
|
|
|
9654
9508
|
children: pages
|
|
9655
9509
|
}
|
|
9656
9510
|
),
|
|
9657
|
-
/* @__PURE__ */ (0,
|
|
9511
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9658
9512
|
"select",
|
|
9659
9513
|
{
|
|
9660
9514
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -9666,8 +9520,8 @@ var DataList = (props) => {
|
|
|
9666
9520
|
}
|
|
9667
9521
|
},
|
|
9668
9522
|
children: [
|
|
9669
|
-
/* @__PURE__ */ (0,
|
|
9670
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
9523
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("option", { value: "", children: "Jump to" }),
|
|
9524
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("option", { value: page, children: page }, page))
|
|
9671
9525
|
]
|
|
9672
9526
|
}
|
|
9673
9527
|
) })
|
|
@@ -9675,16 +9529,16 @@ var DataList = (props) => {
|
|
|
9675
9529
|
}
|
|
9676
9530
|
}
|
|
9677
9531
|
};
|
|
9678
|
-
return /* @__PURE__ */ (0,
|
|
9679
|
-
/* @__PURE__ */ (0,
|
|
9680
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
9532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_react66.default.Fragment, { children: [
|
|
9533
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(ContentView_default, { isDataFound, children: [
|
|
9534
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9681
9535
|
"div",
|
|
9682
9536
|
{
|
|
9683
9537
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
9684
9538
|
children: [
|
|
9685
|
-
props.title ? /* @__PURE__ */ (0,
|
|
9686
|
-
/* @__PURE__ */ (0,
|
|
9687
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
9539
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", {}),
|
|
9540
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
9541
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9688
9542
|
InputControl_default,
|
|
9689
9543
|
{
|
|
9690
9544
|
name: "Search_input",
|
|
@@ -9696,7 +9550,7 @@ var DataList = (props) => {
|
|
|
9696
9550
|
}
|
|
9697
9551
|
}
|
|
9698
9552
|
),
|
|
9699
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
9553
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9700
9554
|
InputControl_default,
|
|
9701
9555
|
{
|
|
9702
9556
|
name: filter.name,
|
|
@@ -9711,15 +9565,15 @@ var DataList = (props) => {
|
|
|
9711
9565
|
},
|
|
9712
9566
|
filter.name
|
|
9713
9567
|
)),
|
|
9714
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
9568
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9715
9569
|
Hyperlink,
|
|
9716
9570
|
{
|
|
9717
9571
|
className: "gap-1",
|
|
9718
9572
|
linkType: "Primary" /* Solid */,
|
|
9719
9573
|
href: props.addLinkHref,
|
|
9720
9574
|
children: [
|
|
9721
|
-
/* @__PURE__ */ (0,
|
|
9722
|
-
/* @__PURE__ */ (0,
|
|
9575
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
9576
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
9723
9577
|
]
|
|
9724
9578
|
}
|
|
9725
9579
|
)
|
|
@@ -9727,8 +9581,8 @@ var DataList = (props) => {
|
|
|
9727
9581
|
]
|
|
9728
9582
|
}
|
|
9729
9583
|
),
|
|
9730
|
-
/* @__PURE__ */ (0,
|
|
9731
|
-
/* @__PURE__ */ (0,
|
|
9584
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
9585
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("tr", { children: [
|
|
9732
9586
|
props?.columns?.map((column) => {
|
|
9733
9587
|
let url = builder.getNewOrderByUrl(column.name);
|
|
9734
9588
|
let icon = "chevronUpDown";
|
|
@@ -9739,18 +9593,18 @@ var DataList = (props) => {
|
|
|
9739
9593
|
icon = "chevronUp";
|
|
9740
9594
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
9741
9595
|
}
|
|
9742
|
-
return /* @__PURE__ */ (0,
|
|
9596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9743
9597
|
"th",
|
|
9744
9598
|
{
|
|
9745
9599
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
9746
|
-
children: /* @__PURE__ */ (0,
|
|
9600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9747
9601
|
Hyperlink,
|
|
9748
9602
|
{
|
|
9749
9603
|
href: column.enableSorting ? url : void 0,
|
|
9750
9604
|
className: "!text-neutral-contrast ",
|
|
9751
|
-
children: /* @__PURE__ */ (0,
|
|
9752
|
-
/* @__PURE__ */ (0,
|
|
9753
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
9605
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
9606
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-black", children: column.label }),
|
|
9607
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
9754
9608
|
] })
|
|
9755
9609
|
}
|
|
9756
9610
|
)
|
|
@@ -9758,25 +9612,25 @@ var DataList = (props) => {
|
|
|
9758
9612
|
column.name
|
|
9759
9613
|
);
|
|
9760
9614
|
}),
|
|
9761
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
9615
|
+
props.onQuickView && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("th", { className: "px-6 py-3 text-right font-medium bg-neutral-soft w-32 text-black", children: "Action" })
|
|
9762
9616
|
] }) }),
|
|
9763
|
-
/* @__PURE__ */ (0,
|
|
9617
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
9764
9618
|
let validityClass = "";
|
|
9765
9619
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
9766
9620
|
validityClass = "bg-alert-200";
|
|
9767
9621
|
}
|
|
9768
|
-
return /* @__PURE__ */ (0,
|
|
9622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("tr", { className: validityClass, children: [
|
|
9769
9623
|
props?.columns?.map((column, colindex) => {
|
|
9770
|
-
return /* @__PURE__ */ (0,
|
|
9624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9771
9625
|
"td",
|
|
9772
9626
|
{
|
|
9773
9627
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
9774
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
9628
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9775
9629
|
Hyperlink,
|
|
9776
9630
|
{
|
|
9777
9631
|
className: "",
|
|
9778
9632
|
href: `https://${dataitem[column.name]}`,
|
|
9779
|
-
children: /* @__PURE__ */ (0,
|
|
9633
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9780
9634
|
ViewControl_default,
|
|
9781
9635
|
{
|
|
9782
9636
|
controlType: column.controlType,
|
|
@@ -9789,11 +9643,11 @@ var DataList = (props) => {
|
|
|
9789
9643
|
}
|
|
9790
9644
|
)
|
|
9791
9645
|
}
|
|
9792
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
9646
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9793
9647
|
Hyperlink,
|
|
9794
9648
|
{
|
|
9795
9649
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
9796
|
-
children: /* @__PURE__ */ (0,
|
|
9650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9797
9651
|
ViewControl_default,
|
|
9798
9652
|
{
|
|
9799
9653
|
controlType: column.controlType,
|
|
@@ -9803,7 +9657,7 @@ var DataList = (props) => {
|
|
|
9803
9657
|
}
|
|
9804
9658
|
)
|
|
9805
9659
|
}
|
|
9806
|
-
) : /* @__PURE__ */ (0,
|
|
9660
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9807
9661
|
ViewControl_default,
|
|
9808
9662
|
{
|
|
9809
9663
|
controlType: column.controlType,
|
|
@@ -9815,7 +9669,7 @@ var DataList = (props) => {
|
|
|
9815
9669
|
}
|
|
9816
9670
|
) }, colindex);
|
|
9817
9671
|
}),
|
|
9818
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
9672
|
+
props.onQuickView && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("td", { className: "px-6 py-2 text-right whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9819
9673
|
"button",
|
|
9820
9674
|
{
|
|
9821
9675
|
type: "button",
|
|
@@ -9825,7 +9679,7 @@ var DataList = (props) => {
|
|
|
9825
9679
|
},
|
|
9826
9680
|
className: "inline-flex items-center gap-1.5 px-3 py-1 text-xs font-semibold rounded-md border border-neutral-300 bg-white hover:bg-neutral-100 text-neutral-800 transition-colors shadow-xs",
|
|
9827
9681
|
children: [
|
|
9828
|
-
/* @__PURE__ */ (0,
|
|
9682
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9829
9683
|
"svg",
|
|
9830
9684
|
{
|
|
9831
9685
|
className: "w-3.5 h-3.5",
|
|
@@ -9836,22 +9690,22 @@ var DataList = (props) => {
|
|
|
9836
9690
|
strokeLinecap: "round",
|
|
9837
9691
|
strokeLinejoin: "round",
|
|
9838
9692
|
children: [
|
|
9839
|
-
/* @__PURE__ */ (0,
|
|
9840
|
-
/* @__PURE__ */ (0,
|
|
9693
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
9694
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
9841
9695
|
]
|
|
9842
9696
|
}
|
|
9843
9697
|
),
|
|
9844
|
-
/* @__PURE__ */ (0,
|
|
9698
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: props.quickViewLabel || "Quick View" })
|
|
9845
9699
|
]
|
|
9846
9700
|
}
|
|
9847
9701
|
) })
|
|
9848
9702
|
] }, index);
|
|
9849
9703
|
}) })
|
|
9850
9704
|
] }) }),
|
|
9851
|
-
/* @__PURE__ */ (0,
|
|
9852
|
-
/* @__PURE__ */ (0,
|
|
9853
|
-
/* @__PURE__ */ (0,
|
|
9854
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
9705
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
9706
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "text-gray-700", children: label }),
|
|
9707
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
9708
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9855
9709
|
Hyperlink,
|
|
9856
9710
|
{
|
|
9857
9711
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -9859,9 +9713,9 @@ var DataList = (props) => {
|
|
|
9859
9713
|
children: "Prev"
|
|
9860
9714
|
}
|
|
9861
9715
|
),
|
|
9862
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
9716
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "px-3 py-1 rounded-l-md border border-gray-300 bg-gray-200 text-gray-500 hover:bg-gray-200", children: "Prev" }),
|
|
9863
9717
|
renderPageNumbers(),
|
|
9864
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
9718
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9865
9719
|
Hyperlink,
|
|
9866
9720
|
{
|
|
9867
9721
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -9869,19 +9723,19 @@ var DataList = (props) => {
|
|
|
9869
9723
|
children: "Next"
|
|
9870
9724
|
}
|
|
9871
9725
|
),
|
|
9872
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
9726
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
9873
9727
|
] })
|
|
9874
9728
|
] }) })
|
|
9875
9729
|
] }),
|
|
9876
|
-
/* @__PURE__ */ (0,
|
|
9877
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
9730
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
9731
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9878
9732
|
"div",
|
|
9879
9733
|
{
|
|
9880
9734
|
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`,
|
|
9881
9735
|
children: [
|
|
9882
|
-
props.title ? /* @__PURE__ */ (0,
|
|
9883
|
-
/* @__PURE__ */ (0,
|
|
9884
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
9736
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", {}),
|
|
9737
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
9738
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9885
9739
|
InputControl_default,
|
|
9886
9740
|
{
|
|
9887
9741
|
name: "Search_input",
|
|
@@ -9893,7 +9747,7 @@ var DataList = (props) => {
|
|
|
9893
9747
|
}
|
|
9894
9748
|
}
|
|
9895
9749
|
),
|
|
9896
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
9750
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9897
9751
|
InputControl_default,
|
|
9898
9752
|
{
|
|
9899
9753
|
name: filter.name,
|
|
@@ -9908,15 +9762,15 @@ var DataList = (props) => {
|
|
|
9908
9762
|
},
|
|
9909
9763
|
filter.name
|
|
9910
9764
|
)),
|
|
9911
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
9765
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9912
9766
|
Hyperlink,
|
|
9913
9767
|
{
|
|
9914
9768
|
className: "gap-1",
|
|
9915
9769
|
linkType: "Primary" /* Solid */,
|
|
9916
9770
|
href: props.addLinkHref,
|
|
9917
9771
|
children: [
|
|
9918
|
-
/* @__PURE__ */ (0,
|
|
9919
|
-
/* @__PURE__ */ (0,
|
|
9772
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
9773
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
9920
9774
|
]
|
|
9921
9775
|
}
|
|
9922
9776
|
)
|
|
@@ -9924,8 +9778,8 @@ var DataList = (props) => {
|
|
|
9924
9778
|
]
|
|
9925
9779
|
}
|
|
9926
9780
|
),
|
|
9927
|
-
/* @__PURE__ */ (0,
|
|
9928
|
-
/* @__PURE__ */ (0,
|
|
9781
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
9782
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
9929
9783
|
let url = builder.getNewOrderByUrl(column.name);
|
|
9930
9784
|
let icon = "chevronUpDown";
|
|
9931
9785
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -9935,18 +9789,18 @@ var DataList = (props) => {
|
|
|
9935
9789
|
icon = "chevronUp";
|
|
9936
9790
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
9937
9791
|
}
|
|
9938
|
-
return /* @__PURE__ */ (0,
|
|
9792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9939
9793
|
"th",
|
|
9940
9794
|
{
|
|
9941
9795
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
9942
|
-
children: /* @__PURE__ */ (0,
|
|
9796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9943
9797
|
Hyperlink,
|
|
9944
9798
|
{
|
|
9945
9799
|
href: column.enableSorting ? url : void 0,
|
|
9946
9800
|
className: "text-body-950",
|
|
9947
|
-
children: /* @__PURE__ */ (0,
|
|
9948
|
-
/* @__PURE__ */ (0,
|
|
9949
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
9801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
9802
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: column.label }),
|
|
9803
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
9950
9804
|
] })
|
|
9951
9805
|
}
|
|
9952
9806
|
)
|
|
@@ -9954,7 +9808,7 @@ var DataList = (props) => {
|
|
|
9954
9808
|
column.name
|
|
9955
9809
|
);
|
|
9956
9810
|
}) }) }) }) }),
|
|
9957
|
-
/* @__PURE__ */ (0,
|
|
9811
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
9958
9812
|
] })
|
|
9959
9813
|
] })
|
|
9960
9814
|
] });
|
|
@@ -9962,12 +9816,12 @@ var DataList = (props) => {
|
|
|
9962
9816
|
var DataList_default = DataList;
|
|
9963
9817
|
|
|
9964
9818
|
// src/components/dataForm/DataListRenderer.tsx
|
|
9965
|
-
var
|
|
9819
|
+
var import_react67 = __toESM(require("react"));
|
|
9966
9820
|
init_ServiceClient();
|
|
9967
9821
|
init_OdataBuilder();
|
|
9968
9822
|
init_SelectWithSearchInput();
|
|
9969
9823
|
var import_navigation4 = require("next/navigation");
|
|
9970
|
-
var
|
|
9824
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
9971
9825
|
var viewControlMap = {
|
|
9972
9826
|
number: ViewControlTypes.number,
|
|
9973
9827
|
lineText: ViewControlTypes.lineText,
|
|
@@ -10022,14 +9876,14 @@ var DataListRenderer = ({
|
|
|
10022
9876
|
widgetProps
|
|
10023
9877
|
}) => {
|
|
10024
9878
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
10025
|
-
const [columns, setColumns] = (0,
|
|
10026
|
-
const [dataset, setDataset] = (0,
|
|
10027
|
-
const [filter, setFilters] = (0,
|
|
10028
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
10029
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
10030
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
9879
|
+
const [columns, setColumns] = (0, import_react67.useState)([]);
|
|
9880
|
+
const [dataset, setDataset] = (0, import_react67.useState)();
|
|
9881
|
+
const [filter, setFilters] = (0, import_react67.useState)([]);
|
|
9882
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react67.useState)("");
|
|
9883
|
+
const [addLinkText, setAddLinkText] = (0, import_react67.useState)("");
|
|
9884
|
+
const [serviceRoute, setServiceRoute] = (0, import_react67.useState)("");
|
|
10031
9885
|
const pathname = (0, import_navigation4.usePathname)();
|
|
10032
|
-
(0,
|
|
9886
|
+
(0, import_react67.useEffect)(() => {
|
|
10033
9887
|
if (!formDefinition) return;
|
|
10034
9888
|
setColumns(mapApiToColumns(formDefinition));
|
|
10035
9889
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -10042,7 +9896,7 @@ var DataListRenderer = ({
|
|
|
10042
9896
|
setAddLinkHref(resolvedAddLinkHref);
|
|
10043
9897
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
10044
9898
|
}, [formDefinition, params]);
|
|
10045
|
-
(0,
|
|
9899
|
+
(0, import_react67.useEffect)(() => {
|
|
10046
9900
|
const fetchData = async () => {
|
|
10047
9901
|
if (!serviceRoute) return;
|
|
10048
9902
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -10062,13 +9916,13 @@ var DataListRenderer = ({
|
|
|
10062
9916
|
isActive: landingPageUrl === pathname
|
|
10063
9917
|
};
|
|
10064
9918
|
});
|
|
10065
|
-
return /* @__PURE__ */ (0,
|
|
9919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_react67.default.Fragment, { children: [
|
|
10066
9920
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
10067
9921
|
// tabs={resolvedTabs}
|
|
10068
9922
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
10069
9923
|
// />
|
|
10070
|
-
/* @__PURE__ */ (0,
|
|
10071
|
-
/* @__PURE__ */ (0,
|
|
9924
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
9925
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
10072
9926
|
DataList_default,
|
|
10073
9927
|
{
|
|
10074
9928
|
addLinkHref,
|
|
@@ -10090,14 +9944,14 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
10090
9944
|
init_InputControlType();
|
|
10091
9945
|
|
|
10092
9946
|
// src/components/dataForm/DataForm.tsx
|
|
10093
|
-
var
|
|
9947
|
+
var import_react69 = __toESM(require("react"));
|
|
10094
9948
|
init_InputControl();
|
|
10095
9949
|
init_Icon();
|
|
10096
9950
|
init_Button();
|
|
10097
9951
|
init_StyleTypes();
|
|
10098
9952
|
|
|
10099
9953
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
10100
|
-
var
|
|
9954
|
+
var import_react68 = __toESM(require("react"));
|
|
10101
9955
|
init_InputControl();
|
|
10102
9956
|
|
|
10103
9957
|
// src/components/dataForm/StyleTypes.tsx
|
|
@@ -10125,7 +9979,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
10125
9979
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
10126
9980
|
|
|
10127
9981
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
10128
|
-
var
|
|
9982
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
10129
9983
|
var DataFormChildSection = (props) => {
|
|
10130
9984
|
const { section } = props;
|
|
10131
9985
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -10137,7 +9991,7 @@ var DataFormChildSection = (props) => {
|
|
|
10137
9991
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
10138
9992
|
};
|
|
10139
9993
|
const childItemsToRender = getChildItemsForRendering();
|
|
10140
|
-
const handleChildInputChange = (0,
|
|
9994
|
+
const handleChildInputChange = (0, import_react68.useCallback)(
|
|
10141
9995
|
(updatedValues) => {
|
|
10142
9996
|
if (isOneToOne) {
|
|
10143
9997
|
props.callback({
|
|
@@ -10164,7 +10018,7 @@ var DataFormChildSection = (props) => {
|
|
|
10164
10018
|
},
|
|
10165
10019
|
[props, isOneToOne, childItemsToRender]
|
|
10166
10020
|
);
|
|
10167
|
-
const onAddRow = (0,
|
|
10021
|
+
const onAddRow = (0, import_react68.useCallback)(() => {
|
|
10168
10022
|
props.callback({
|
|
10169
10023
|
sectionName: props.section.name,
|
|
10170
10024
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -10173,7 +10027,7 @@ var DataFormChildSection = (props) => {
|
|
|
10173
10027
|
rowIndex: -1
|
|
10174
10028
|
});
|
|
10175
10029
|
}, [props]);
|
|
10176
|
-
const onDeleteRow = (0,
|
|
10030
|
+
const onDeleteRow = (0, import_react68.useCallback)(
|
|
10177
10031
|
(filteredIndex) => {
|
|
10178
10032
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
10179
10033
|
if (visibleItem) {
|
|
@@ -10193,14 +10047,14 @@ var DataFormChildSection = (props) => {
|
|
|
10193
10047
|
childItemsToRender,
|
|
10194
10048
|
allChildItems: childItems
|
|
10195
10049
|
});
|
|
10196
|
-
return /* @__PURE__ */ (0,
|
|
10197
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
10198
|
-
/* @__PURE__ */ (0,
|
|
10199
|
-
/* @__PURE__ */ (0,
|
|
10200
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
10201
|
-
return /* @__PURE__ */ (0,
|
|
10050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
10051
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
10052
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
10053
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
10054
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
10055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("tr", { className: "", children: [
|
|
10202
10056
|
sectionRow.elements.map((field, index) => {
|
|
10203
|
-
return /* @__PURE__ */ (0,
|
|
10057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10204
10058
|
"th",
|
|
10205
10059
|
{
|
|
10206
10060
|
className: "py-3 font-normal text-left",
|
|
@@ -10209,21 +10063,21 @@ var DataFormChildSection = (props) => {
|
|
|
10209
10063
|
field.name
|
|
10210
10064
|
);
|
|
10211
10065
|
}),
|
|
10212
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
10066
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
10213
10067
|
] }, sectionRowIndex);
|
|
10214
10068
|
}) }),
|
|
10215
|
-
/* @__PURE__ */ (0,
|
|
10069
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
10216
10070
|
const { item, originalIndex } = visibleItem;
|
|
10217
10071
|
const rowKey = originalIndex;
|
|
10218
|
-
return /* @__PURE__ */ (0,
|
|
10072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: section.sectionRows.map(
|
|
10219
10073
|
(sectionRow, sectionRowIndex) => {
|
|
10220
|
-
return /* @__PURE__ */ (0,
|
|
10074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10221
10075
|
"tr",
|
|
10222
10076
|
{
|
|
10223
10077
|
className: "",
|
|
10224
10078
|
children: [
|
|
10225
10079
|
sectionRow.elements.map((field, index) => {
|
|
10226
|
-
return /* @__PURE__ */ (0,
|
|
10080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10227
10081
|
InputControl_default,
|
|
10228
10082
|
{
|
|
10229
10083
|
index: filteredIndex,
|
|
@@ -10243,7 +10097,7 @@ var DataFormChildSection = (props) => {
|
|
|
10243
10097
|
}
|
|
10244
10098
|
) }) }) }, field.name);
|
|
10245
10099
|
}),
|
|
10246
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
10100
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10247
10101
|
ClientButton_default,
|
|
10248
10102
|
{
|
|
10249
10103
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -10252,7 +10106,7 @@ var DataFormChildSection = (props) => {
|
|
|
10252
10106
|
},
|
|
10253
10107
|
dataRole: "delete",
|
|
10254
10108
|
tabIndex: -1,
|
|
10255
|
-
children: /* @__PURE__ */ (0,
|
|
10109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10256
10110
|
Icon_default,
|
|
10257
10111
|
{
|
|
10258
10112
|
className: "w-4 h-4",
|
|
@@ -10269,7 +10123,7 @@ var DataFormChildSection = (props) => {
|
|
|
10269
10123
|
) }, rowKey);
|
|
10270
10124
|
}) })
|
|
10271
10125
|
] }) }),
|
|
10272
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
10126
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10273
10127
|
ClientButton_default,
|
|
10274
10128
|
{
|
|
10275
10129
|
ButtonType: "Link" /* Link */,
|
|
@@ -10284,9 +10138,9 @@ var DataFormChildSection = (props) => {
|
|
|
10284
10138
|
var DataFormChildSection_default = DataFormChildSection;
|
|
10285
10139
|
|
|
10286
10140
|
// src/components/dataForm/DataForm.tsx
|
|
10287
|
-
var
|
|
10141
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
10288
10142
|
var DataForm = (props) => {
|
|
10289
|
-
const formRef = (0,
|
|
10143
|
+
const formRef = (0, import_react69.useRef)(null);
|
|
10290
10144
|
console.log(props.dataItem, "dssads");
|
|
10291
10145
|
const initialState = {
|
|
10292
10146
|
inputValues: {},
|
|
@@ -10295,9 +10149,9 @@ var DataForm = (props) => {
|
|
|
10295
10149
|
const childInitialState = {
|
|
10296
10150
|
inputValues: []
|
|
10297
10151
|
};
|
|
10298
|
-
const [formState, dispatch] = (0,
|
|
10152
|
+
const [formState, dispatch] = (0, import_react69.useReducer)(FormReducer_default, initialState);
|
|
10299
10153
|
console.log(props.sections, "sections");
|
|
10300
|
-
const clearHiddenChildSections = (0,
|
|
10154
|
+
const clearHiddenChildSections = (0, import_react69.useCallback)(
|
|
10301
10155
|
(changedProperty, newValues) => {
|
|
10302
10156
|
if (!props.sections) return;
|
|
10303
10157
|
const allChildSections = [];
|
|
@@ -10335,7 +10189,7 @@ var DataForm = (props) => {
|
|
|
10335
10189
|
},
|
|
10336
10190
|
[props.sections, formState.inputValues]
|
|
10337
10191
|
);
|
|
10338
|
-
const handleInputChange = (0,
|
|
10192
|
+
const handleInputChange = (0, import_react69.useCallback)(
|
|
10339
10193
|
async (updatedValues) => {
|
|
10340
10194
|
dispatch({
|
|
10341
10195
|
type: FORM_INPUT_UPDATE,
|
|
@@ -10350,7 +10204,7 @@ var DataForm = (props) => {
|
|
|
10350
10204
|
},
|
|
10351
10205
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
10352
10206
|
);
|
|
10353
|
-
const fetchData = (0,
|
|
10207
|
+
const fetchData = (0, import_react69.useCallback)(async () => {
|
|
10354
10208
|
if (!props.rules) return;
|
|
10355
10209
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
10356
10210
|
return;
|
|
@@ -10381,7 +10235,7 @@ var DataForm = (props) => {
|
|
|
10381
10235
|
console.error("Error fetching data:", error);
|
|
10382
10236
|
}
|
|
10383
10237
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
10384
|
-
(0,
|
|
10238
|
+
(0, import_react69.useEffect)(() => {
|
|
10385
10239
|
fetchData();
|
|
10386
10240
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
10387
10241
|
function replacePlaceholders(template, context, params) {
|
|
@@ -10401,7 +10255,7 @@ var DataForm = (props) => {
|
|
|
10401
10255
|
}
|
|
10402
10256
|
);
|
|
10403
10257
|
}
|
|
10404
|
-
const handleChildSectionChangeCallback = (0,
|
|
10258
|
+
const handleChildSectionChangeCallback = (0, import_react69.useCallback)(
|
|
10405
10259
|
(params) => {
|
|
10406
10260
|
dispatch({
|
|
10407
10261
|
type: params.actionType,
|
|
@@ -10446,7 +10300,7 @@ var DataForm = (props) => {
|
|
|
10446
10300
|
});
|
|
10447
10301
|
return cloned;
|
|
10448
10302
|
}
|
|
10449
|
-
const onClick = (0,
|
|
10303
|
+
const onClick = (0, import_react69.useCallback)(async () => {
|
|
10450
10304
|
if (props.onClick) {
|
|
10451
10305
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
10452
10306
|
const normalizedValues = normalizeChildSections(
|
|
@@ -10462,21 +10316,21 @@ var DataForm = (props) => {
|
|
|
10462
10316
|
return { isSuccessful: true };
|
|
10463
10317
|
}
|
|
10464
10318
|
}, [formState, props]);
|
|
10465
|
-
const handleAdditionalOnClick = (0,
|
|
10319
|
+
const handleAdditionalOnClick = (0, import_react69.useCallback)(async () => {
|
|
10466
10320
|
if (props.additionalActions?.onClick) {
|
|
10467
10321
|
return await props.additionalActions.onClick(formState);
|
|
10468
10322
|
} else {
|
|
10469
10323
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
10470
10324
|
}
|
|
10471
10325
|
}, [formState, props]);
|
|
10472
|
-
const onDelete = (0,
|
|
10326
|
+
const onDelete = (0, import_react69.useCallback)(async () => {
|
|
10473
10327
|
if (props.onDelete) {
|
|
10474
10328
|
return await props.onDelete(formState);
|
|
10475
10329
|
} else {
|
|
10476
10330
|
return { isSuccessful: true };
|
|
10477
10331
|
}
|
|
10478
10332
|
}, [formState, props]);
|
|
10479
|
-
(0,
|
|
10333
|
+
(0, import_react69.useEffect)(() => {
|
|
10480
10334
|
if (props.dataItem) {
|
|
10481
10335
|
dispatch({
|
|
10482
10336
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -10504,19 +10358,19 @@ var DataForm = (props) => {
|
|
|
10504
10358
|
return false;
|
|
10505
10359
|
}
|
|
10506
10360
|
}
|
|
10507
|
-
return /* @__PURE__ */ (0,
|
|
10508
|
-
props.title && /* @__PURE__ */ (0,
|
|
10361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react69.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
10362
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
10509
10363
|
"div",
|
|
10510
10364
|
{
|
|
10511
10365
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
10512
10366
|
onClick: () => window.history.back(),
|
|
10513
10367
|
children: [
|
|
10514
|
-
/* @__PURE__ */ (0,
|
|
10515
|
-
/* @__PURE__ */ (0,
|
|
10368
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
10369
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
10516
10370
|
]
|
|
10517
10371
|
}
|
|
10518
10372
|
) }),
|
|
10519
|
-
/* @__PURE__ */ (0,
|
|
10373
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10520
10374
|
"form",
|
|
10521
10375
|
{
|
|
10522
10376
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -10537,8 +10391,8 @@ var DataForm = (props) => {
|
|
|
10537
10391
|
}
|
|
10538
10392
|
}
|
|
10539
10393
|
},
|
|
10540
|
-
children: /* @__PURE__ */ (0,
|
|
10541
|
-
return /* @__PURE__ */ (0,
|
|
10394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
10395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react69.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
10542
10396
|
section.sectionRows?.map(
|
|
10543
10397
|
(sectionRow, sectionRowIndex) => {
|
|
10544
10398
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -10549,14 +10403,14 @@ var DataForm = (props) => {
|
|
|
10549
10403
|
sectionRow.visible
|
|
10550
10404
|
);
|
|
10551
10405
|
}
|
|
10552
|
-
return /* @__PURE__ */ (0,
|
|
10553
|
-
return /* @__PURE__ */ (0,
|
|
10406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react69.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
10407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
10554
10408
|
"div",
|
|
10555
10409
|
{
|
|
10556
10410
|
className: sectionRow.grow ? "grow" : "",
|
|
10557
10411
|
children: [
|
|
10558
|
-
/* @__PURE__ */ (0,
|
|
10559
|
-
/* @__PURE__ */ (0,
|
|
10412
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: field.controlType }),
|
|
10413
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10560
10414
|
InputControl_default,
|
|
10561
10415
|
{
|
|
10562
10416
|
name: field.name,
|
|
@@ -10586,12 +10440,12 @@ var DataForm = (props) => {
|
|
|
10586
10440
|
}) }) }, sectionRowIndex);
|
|
10587
10441
|
}
|
|
10588
10442
|
),
|
|
10589
|
-
/* @__PURE__ */ (0,
|
|
10443
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: section.childSections?.map(
|
|
10590
10444
|
(childSection, childSectionIndex) => {
|
|
10591
|
-
return /* @__PURE__ */ (0,
|
|
10445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
10592
10446
|
formState.inputValues,
|
|
10593
10447
|
childSection.visible
|
|
10594
|
-
) && /* @__PURE__ */ (0,
|
|
10448
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10595
10449
|
DataFormChildSection_default,
|
|
10596
10450
|
{
|
|
10597
10451
|
section: childSection,
|
|
@@ -10606,8 +10460,8 @@ var DataForm = (props) => {
|
|
|
10606
10460
|
}) })
|
|
10607
10461
|
}
|
|
10608
10462
|
),
|
|
10609
|
-
/* @__PURE__ */ (0,
|
|
10610
|
-
/* @__PURE__ */ (0,
|
|
10463
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
10464
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10611
10465
|
Button_default,
|
|
10612
10466
|
{
|
|
10613
10467
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -10615,7 +10469,7 @@ var DataForm = (props) => {
|
|
|
10615
10469
|
children: props.additionalActions.title
|
|
10616
10470
|
}
|
|
10617
10471
|
) }),
|
|
10618
|
-
/* @__PURE__ */ (0,
|
|
10472
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10619
10473
|
Button_default,
|
|
10620
10474
|
{
|
|
10621
10475
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -10626,7 +10480,7 @@ var DataForm = (props) => {
|
|
|
10626
10480
|
children: "Delete"
|
|
10627
10481
|
}
|
|
10628
10482
|
) }),
|
|
10629
|
-
/* @__PURE__ */ (0,
|
|
10483
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10630
10484
|
Button_default,
|
|
10631
10485
|
{
|
|
10632
10486
|
onValidate,
|
|
@@ -10644,7 +10498,7 @@ var DataForm_default = DataForm;
|
|
|
10644
10498
|
|
|
10645
10499
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
10646
10500
|
init_ServiceClient();
|
|
10647
|
-
var
|
|
10501
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
10648
10502
|
function getAction(actions, code) {
|
|
10649
10503
|
return actions?.find((a) => a.actionCode === code);
|
|
10650
10504
|
}
|
|
@@ -10670,9 +10524,9 @@ var DataFormRenderer = ({
|
|
|
10670
10524
|
"Delete"
|
|
10671
10525
|
);
|
|
10672
10526
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
10673
|
-
return /* @__PURE__ */ (0,
|
|
10674
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
10675
|
-
/* @__PURE__ */ (0,
|
|
10527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
10528
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
10529
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
10676
10530
|
DataForm_default,
|
|
10677
10531
|
{
|
|
10678
10532
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|
|
@@ -10693,7 +10547,6 @@ var DataFormRenderer = ({
|
|
|
10693
10547
|
var DataFormRenderer_default = DataFormRenderer;
|
|
10694
10548
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10695
10549
|
0 && (module.exports = {
|
|
10696
|
-
BooleanSelect,
|
|
10697
10550
|
Button,
|
|
10698
10551
|
CheckboxInput,
|
|
10699
10552
|
ColorInput,
|
|
@@ -10717,7 +10570,6 @@ var DataFormRenderer_default = DataFormRenderer;
|
|
|
10717
10570
|
PhoneInput,
|
|
10718
10571
|
RadioInput,
|
|
10719
10572
|
Select,
|
|
10720
|
-
Switcher,
|
|
10721
10573
|
TimeInput,
|
|
10722
10574
|
Toast,
|
|
10723
10575
|
ToastService,
|