@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260831113446 → 0.8.1-dev.20260901054125
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-JYDYPHSQ.mjs → CommentRendererClient-FU5ZMGBV.mjs} +46 -2
- package/dist/{CommentRendererClient-5OIJYJ5Z.mjs → CommentRendererClient-L6GILW7U.mjs} +46 -2
- package/dist/{DataBindingControls-JLAO3NJL.mjs → DataBindingControls-GWNAJ7PR.mjs} +2 -2
- package/dist/{DataBindingControls-Y4JXUDZV.mjs → DataBindingControls-WC3HBVVQ.mjs} +2 -2
- package/dist/{InputControlClient-POQDFVL3.mjs → InputControlClient-GRH7VSJR.mjs} +2 -7
- package/dist/{InputControlClient-XC24HYZX.mjs → InputControlClient-NHZU2L64.mjs} +81 -262
- 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-XTG4JW2O.mjs → chunk-5VGTT4A5.mjs} +35 -215
- package/dist/{chunk-E4VOFO5Q.mjs → chunk-DTWPZPSX.mjs} +0 -3
- package/dist/{chunk-4R7F7LBL.mjs → chunk-IEY342PD.mjs} +0 -3
- package/dist/{chunk-GGG5MJLN.mjs → chunk-Q3LFGHLM.mjs} +1 -1
- 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 +749 -856
- package/dist/index.mjs +75 -29
- package/dist/server.js +275 -378
- package/dist/server.mjs +71 -23
- 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 });
|
|
@@ -1808,7 +1842,17 @@ var init_CommentNodeRenderer = __esm({
|
|
|
1808
1842
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CommentFileNode_default, { node: element, assetBaseUrl });
|
|
1809
1843
|
case "link": {
|
|
1810
1844
|
const url = typeof element.url === "string" ? element.url : "#";
|
|
1811
|
-
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
|
+
);
|
|
1812
1856
|
}
|
|
1813
1857
|
case "mention": {
|
|
1814
1858
|
const label = element.label ?? element.mentionName ?? element.text ?? "";
|
|
@@ -2070,6 +2114,7 @@ var init_LineTextInput = __esm({
|
|
|
2070
2114
|
value,
|
|
2071
2115
|
onChange: textChangeHandler,
|
|
2072
2116
|
onBlur: props?.onBlur,
|
|
2117
|
+
autoFocus: props?.attributes?.autoFocus,
|
|
2073
2118
|
required: props?.attributes?.required,
|
|
2074
2119
|
placeholder: props?.attributes?.placeholder,
|
|
2075
2120
|
maxLength: props?.attributes?.maxLength,
|
|
@@ -2169,7 +2214,6 @@ var init_InputControlType = __esm({
|
|
|
2169
2214
|
moneyInput: "money",
|
|
2170
2215
|
select: "select",
|
|
2171
2216
|
percentageInput: "percentage",
|
|
2172
|
-
asset: "asset",
|
|
2173
2217
|
assetUpload: "assetUpload",
|
|
2174
2218
|
phoneInput: "phone",
|
|
2175
2219
|
numberInput: "numberInput",
|
|
@@ -2180,11 +2224,9 @@ var init_InputControlType = __esm({
|
|
|
2180
2224
|
colorInput: "colorInput",
|
|
2181
2225
|
selectWithSearchInput: "selectWithSearchInput",
|
|
2182
2226
|
selectWithSearchPanel: "selectWithSearchPanel",
|
|
2183
|
-
booleanSelect: "booleanSelect",
|
|
2184
2227
|
switchInput: "switchInput",
|
|
2185
2228
|
dateInput: "dateInput",
|
|
2186
2229
|
radioInput: "radioInput",
|
|
2187
|
-
switcher: "switcher",
|
|
2188
2230
|
videoInput: "videoInput",
|
|
2189
2231
|
referenceInput: "referenceInput"
|
|
2190
2232
|
};
|
|
@@ -3479,106 +3521,13 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
3479
3521
|
}
|
|
3480
3522
|
});
|
|
3481
3523
|
|
|
3482
|
-
// src/components/controls/edit/BooleanSelect.tsx
|
|
3483
|
-
var import_react38, import_jsx_runtime46, BooleanSelect, BooleanSelect_default;
|
|
3484
|
-
var init_BooleanSelect = __esm({
|
|
3485
|
-
"src/components/controls/edit/BooleanSelect.tsx"() {
|
|
3486
|
-
"use strict";
|
|
3487
|
-
import_react38 = __toESM(require("react"));
|
|
3488
|
-
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3489
|
-
BooleanSelect = (props) => {
|
|
3490
|
-
const [list, setList] = (0, import_react38.useState)();
|
|
3491
|
-
const textChangeHandler = (event) => {
|
|
3492
|
-
const text = event.target.value;
|
|
3493
|
-
const boolValue = text?.toLowerCase() === "true" || text === "1";
|
|
3494
|
-
if (props.callback !== void 0) {
|
|
3495
|
-
props.callback({
|
|
3496
|
-
name: props.name,
|
|
3497
|
-
value: boolValue,
|
|
3498
|
-
index: props.index,
|
|
3499
|
-
groupKey: props.groupKey
|
|
3500
|
-
});
|
|
3501
|
-
}
|
|
3502
|
-
};
|
|
3503
|
-
(0, import_react38.useEffect)(() => {
|
|
3504
|
-
async function fetchData() {
|
|
3505
|
-
console.log("in select");
|
|
3506
|
-
if (props.dataset) {
|
|
3507
|
-
setList(props.dataset);
|
|
3508
|
-
} else if (props.dataSource && props.dataSource != "" && props.serviceClient) {
|
|
3509
|
-
let dataSource = props.dataSource;
|
|
3510
|
-
let response;
|
|
3511
|
-
if (props.dataSourceDependsOn) {
|
|
3512
|
-
if (props.dependentValue) {
|
|
3513
|
-
dataSource = dataSource.replace(
|
|
3514
|
-
`{${props.dataSourceDependsOn}}`,
|
|
3515
|
-
props.dependentValue
|
|
3516
|
-
);
|
|
3517
|
-
response = await props.serviceClient.get(dataSource);
|
|
3518
|
-
setList(response.result);
|
|
3519
|
-
}
|
|
3520
|
-
} else {
|
|
3521
|
-
response = await props.serviceClient.get(dataSource);
|
|
3522
|
-
setList(response.result);
|
|
3523
|
-
}
|
|
3524
|
-
}
|
|
3525
|
-
}
|
|
3526
|
-
fetchData();
|
|
3527
|
-
}, [
|
|
3528
|
-
props.dataSource,
|
|
3529
|
-
props.dependentValue,
|
|
3530
|
-
props.dataset,
|
|
3531
|
-
props.dataSourceDependsOn
|
|
3532
|
-
]);
|
|
3533
|
-
let value;
|
|
3534
|
-
if (props.value !== void 0 && props.value !== null) {
|
|
3535
|
-
value = props.value;
|
|
3536
|
-
}
|
|
3537
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react38.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "block", children: [
|
|
3538
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
3539
|
-
" ",
|
|
3540
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
3541
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3542
|
-
"select",
|
|
3543
|
-
{
|
|
3544
|
-
name: props.name,
|
|
3545
|
-
id: props.name,
|
|
3546
|
-
value,
|
|
3547
|
-
onChange: textChangeHandler,
|
|
3548
|
-
required: props?.attributes?.required,
|
|
3549
|
-
placeholder: props?.attributes?.placeholder,
|
|
3550
|
-
disabled: props?.attributes?.readOnly,
|
|
3551
|
-
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 ",
|
|
3552
|
-
children: [
|
|
3553
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
3554
|
-
list && list.map((item, i) => {
|
|
3555
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3556
|
-
"option",
|
|
3557
|
-
{
|
|
3558
|
-
className: "fac-select-option",
|
|
3559
|
-
value: item[props.dataKeyFieldName],
|
|
3560
|
-
children: item[props.dataTextFieldName]
|
|
3561
|
-
},
|
|
3562
|
-
item[props.dataKeyFieldName]
|
|
3563
|
-
);
|
|
3564
|
-
})
|
|
3565
|
-
]
|
|
3566
|
-
}
|
|
3567
|
-
),
|
|
3568
|
-
/* @__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 : "" })
|
|
3569
|
-
] }) });
|
|
3570
|
-
};
|
|
3571
|
-
BooleanSelect_default = BooleanSelect;
|
|
3572
|
-
}
|
|
3573
|
-
});
|
|
3574
|
-
|
|
3575
3524
|
// src/components/controls/edit/EmailInput.tsx
|
|
3576
|
-
var
|
|
3525
|
+
var import_react38, import_jsx_runtime46, EmailInput, EmailInput_default;
|
|
3577
3526
|
var init_EmailInput = __esm({
|
|
3578
3527
|
"src/components/controls/edit/EmailInput.tsx"() {
|
|
3579
3528
|
"use strict";
|
|
3580
|
-
|
|
3581
|
-
|
|
3529
|
+
import_react38 = __toESM(require("react"));
|
|
3530
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3582
3531
|
EmailInput = (props) => {
|
|
3583
3532
|
const textChangeHandler = (event) => {
|
|
3584
3533
|
const text = event.target.value;
|
|
@@ -3603,11 +3552,11 @@ var init_EmailInput = __esm({
|
|
|
3603
3552
|
if (props.value !== void 0 && props.value !== null) {
|
|
3604
3553
|
value = props.value;
|
|
3605
3554
|
}
|
|
3606
|
-
return /* @__PURE__ */ (0,
|
|
3607
|
-
/* @__PURE__ */ (0,
|
|
3555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react38.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "block mb-1", children: [
|
|
3556
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
3608
3557
|
" ",
|
|
3609
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
3610
|
-
/* @__PURE__ */ (0,
|
|
3558
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
3559
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3611
3560
|
"input",
|
|
3612
3561
|
{
|
|
3613
3562
|
type: "email",
|
|
@@ -3623,7 +3572,7 @@ var init_EmailInput = __esm({
|
|
|
3623
3572
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
3624
3573
|
}
|
|
3625
3574
|
),
|
|
3626
|
-
/* @__PURE__ */ (0,
|
|
3575
|
+
/* @__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 : "" })
|
|
3627
3576
|
] }) });
|
|
3628
3577
|
};
|
|
3629
3578
|
EmailInput_default = EmailInput;
|
|
@@ -3631,13 +3580,13 @@ var init_EmailInput = __esm({
|
|
|
3631
3580
|
});
|
|
3632
3581
|
|
|
3633
3582
|
// src/components/controls/edit/TimeInput.tsx
|
|
3634
|
-
var
|
|
3583
|
+
var import_react39, import_jsx_runtime47, TimeInput, TimeInput_default;
|
|
3635
3584
|
var init_TimeInput = __esm({
|
|
3636
3585
|
"src/components/controls/edit/TimeInput.tsx"() {
|
|
3637
3586
|
"use strict";
|
|
3638
3587
|
"use client";
|
|
3639
|
-
|
|
3640
|
-
|
|
3588
|
+
import_react39 = __toESM(require("react"));
|
|
3589
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3641
3590
|
TimeInput = (props) => {
|
|
3642
3591
|
const timeChangeHandler = (event) => {
|
|
3643
3592
|
const timeValue = event.target.value;
|
|
@@ -3650,11 +3599,11 @@ var init_TimeInput = __esm({
|
|
|
3650
3599
|
});
|
|
3651
3600
|
}
|
|
3652
3601
|
};
|
|
3653
|
-
return /* @__PURE__ */ (0,
|
|
3654
|
-
/* @__PURE__ */ (0,
|
|
3602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react39.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "block mb-1", children: [
|
|
3603
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
3655
3604
|
" ",
|
|
3656
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
3657
|
-
/* @__PURE__ */ (0,
|
|
3605
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
3606
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3658
3607
|
"input",
|
|
3659
3608
|
{
|
|
3660
3609
|
type: "time",
|
|
@@ -3667,7 +3616,7 @@ var init_TimeInput = __esm({
|
|
|
3667
3616
|
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"
|
|
3668
3617
|
}
|
|
3669
3618
|
) }),
|
|
3670
|
-
/* @__PURE__ */ (0,
|
|
3619
|
+
/* @__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 ?? "" })
|
|
3671
3620
|
] }) });
|
|
3672
3621
|
};
|
|
3673
3622
|
TimeInput_default = TimeInput;
|
|
@@ -3682,7 +3631,7 @@ function Hyperlink(props) {
|
|
|
3682
3631
|
if (target == "_blank") {
|
|
3683
3632
|
additionalProps.rel = "noopener noreferrer";
|
|
3684
3633
|
}
|
|
3685
|
-
return /* @__PURE__ */ (0,
|
|
3634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3686
3635
|
import_link.default,
|
|
3687
3636
|
{
|
|
3688
3637
|
href: props.href,
|
|
@@ -3692,65 +3641,65 @@ function Hyperlink(props) {
|
|
|
3692
3641
|
target,
|
|
3693
3642
|
children: props.children
|
|
3694
3643
|
}
|
|
3695
|
-
) : props.isHeading ? /* @__PURE__ */ (0,
|
|
3644
|
+
) : 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 }) });
|
|
3696
3645
|
}
|
|
3697
|
-
var import_link,
|
|
3646
|
+
var import_link, import_jsx_runtime48;
|
|
3698
3647
|
var init_Hyperlink = __esm({
|
|
3699
3648
|
"src/components/dataForm/Hyperlink.tsx"() {
|
|
3700
3649
|
"use strict";
|
|
3701
3650
|
import_link = __toESM(require("next/link"));
|
|
3702
3651
|
init_StyleTypes();
|
|
3703
|
-
|
|
3652
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3704
3653
|
}
|
|
3705
3654
|
});
|
|
3706
3655
|
|
|
3707
3656
|
// src/svg/chevron-updown.tsx
|
|
3708
|
-
var
|
|
3657
|
+
var import_jsx_runtime49, ChevronUpDown, chevron_updown_default;
|
|
3709
3658
|
var init_chevron_updown = __esm({
|
|
3710
3659
|
"src/svg/chevron-updown.tsx"() {
|
|
3711
3660
|
"use strict";
|
|
3712
|
-
|
|
3661
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3713
3662
|
ChevronUpDown = (props) => {
|
|
3714
|
-
return /* @__PURE__ */ (0,
|
|
3663
|
+
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" }) });
|
|
3715
3664
|
};
|
|
3716
3665
|
chevron_updown_default = ChevronUpDown;
|
|
3717
3666
|
}
|
|
3718
3667
|
});
|
|
3719
3668
|
|
|
3720
3669
|
// src/svg/chevron-down.tsx
|
|
3721
|
-
var
|
|
3670
|
+
var import_jsx_runtime50, ChevronDown, chevron_down_default;
|
|
3722
3671
|
var init_chevron_down = __esm({
|
|
3723
3672
|
"src/svg/chevron-down.tsx"() {
|
|
3724
3673
|
"use strict";
|
|
3725
|
-
|
|
3674
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3726
3675
|
ChevronDown = (props) => {
|
|
3727
|
-
return /* @__PURE__ */ (0,
|
|
3676
|
+
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" }) });
|
|
3728
3677
|
};
|
|
3729
3678
|
chevron_down_default = ChevronDown;
|
|
3730
3679
|
}
|
|
3731
3680
|
});
|
|
3732
3681
|
|
|
3733
3682
|
// src/svg/chevron-up.tsx
|
|
3734
|
-
var
|
|
3683
|
+
var import_jsx_runtime51, ChevronUp, chevron_up_default;
|
|
3735
3684
|
var init_chevron_up = __esm({
|
|
3736
3685
|
"src/svg/chevron-up.tsx"() {
|
|
3737
3686
|
"use strict";
|
|
3738
|
-
|
|
3687
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3739
3688
|
ChevronUp = (props) => {
|
|
3740
|
-
return /* @__PURE__ */ (0,
|
|
3689
|
+
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" }) });
|
|
3741
3690
|
};
|
|
3742
3691
|
chevron_up_default = ChevronUp;
|
|
3743
3692
|
}
|
|
3744
3693
|
});
|
|
3745
3694
|
|
|
3746
3695
|
// src/svg/plus.tsx
|
|
3747
|
-
var
|
|
3696
|
+
var import_jsx_runtime52, Plus, plus_default;
|
|
3748
3697
|
var init_plus = __esm({
|
|
3749
3698
|
"src/svg/plus.tsx"() {
|
|
3750
3699
|
"use strict";
|
|
3751
|
-
|
|
3700
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3752
3701
|
Plus = (props) => {
|
|
3753
|
-
return /* @__PURE__ */ (0,
|
|
3702
|
+
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" }) });
|
|
3754
3703
|
};
|
|
3755
3704
|
plus_default = Plus;
|
|
3756
3705
|
}
|
|
@@ -3776,37 +3725,37 @@ var init_Icons = __esm({
|
|
|
3776
3725
|
});
|
|
3777
3726
|
|
|
3778
3727
|
// src/svg/Icon.tsx
|
|
3779
|
-
var
|
|
3728
|
+
var import_jsx_runtime53, Icon, Icon_default;
|
|
3780
3729
|
var init_Icon = __esm({
|
|
3781
3730
|
"src/svg/Icon.tsx"() {
|
|
3782
3731
|
"use strict";
|
|
3783
3732
|
init_Icons();
|
|
3784
|
-
|
|
3733
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3785
3734
|
Icon = ({ name, className, ...props }) => {
|
|
3786
3735
|
const IconComponent = Icons_default[name];
|
|
3787
3736
|
if (!IconComponent) {
|
|
3788
3737
|
console.error(`Icon "${name}" not found.`);
|
|
3789
3738
|
return null;
|
|
3790
3739
|
}
|
|
3791
|
-
return /* @__PURE__ */ (0,
|
|
3740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(IconComponent, { ...props, className });
|
|
3792
3741
|
};
|
|
3793
3742
|
Icon_default = Icon;
|
|
3794
3743
|
}
|
|
3795
3744
|
});
|
|
3796
3745
|
|
|
3797
3746
|
// src/components/controls/edit/AssetUpload.tsx
|
|
3798
|
-
var
|
|
3747
|
+
var import_react40, import_jsx_runtime54, AssetUpload, AssetUpload_default;
|
|
3799
3748
|
var init_AssetUpload = __esm({
|
|
3800
3749
|
"src/components/controls/edit/AssetUpload.tsx"() {
|
|
3801
3750
|
"use strict";
|
|
3802
3751
|
"use client";
|
|
3803
|
-
|
|
3752
|
+
import_react40 = __toESM(require("react"));
|
|
3804
3753
|
init_ClientButton();
|
|
3805
3754
|
init_StyleTypes();
|
|
3806
3755
|
init_AssetUtility();
|
|
3807
3756
|
init_Hyperlink();
|
|
3808
3757
|
init_Icon();
|
|
3809
|
-
|
|
3758
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3810
3759
|
AssetUpload = (props) => {
|
|
3811
3760
|
const isDisabled = props.attributes?.disable ?? false;
|
|
3812
3761
|
let allValues = [];
|
|
@@ -3827,8 +3776,8 @@ var init_AssetUpload = __esm({
|
|
|
3827
3776
|
}
|
|
3828
3777
|
return "image";
|
|
3829
3778
|
};
|
|
3830
|
-
const [assetType, setAssetType] =
|
|
3831
|
-
(0,
|
|
3779
|
+
const [assetType, setAssetType] = import_react40.default.useState(getInitialTab);
|
|
3780
|
+
(0, import_react40.useEffect)(() => {
|
|
3832
3781
|
setAssetType(getInitialTab());
|
|
3833
3782
|
}, [props.value]);
|
|
3834
3783
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -3903,10 +3852,10 @@ var init_AssetUpload = __esm({
|
|
|
3903
3852
|
}
|
|
3904
3853
|
return false;
|
|
3905
3854
|
};
|
|
3906
|
-
return /* @__PURE__ */ (0,
|
|
3907
|
-
/* @__PURE__ */ (0,
|
|
3908
|
-
/* @__PURE__ */ (0,
|
|
3909
|
-
/* @__PURE__ */ (0,
|
|
3855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react40.default.Fragment, { children: [
|
|
3856
|
+
/* @__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 }) }),
|
|
3857
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3910
3859
|
ClientButton_default,
|
|
3911
3860
|
{
|
|
3912
3861
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -3916,7 +3865,7 @@ var init_AssetUpload = __esm({
|
|
|
3916
3865
|
children: "Image Upload"
|
|
3917
3866
|
}
|
|
3918
3867
|
),
|
|
3919
|
-
/* @__PURE__ */ (0,
|
|
3868
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3920
3869
|
ClientButton_default,
|
|
3921
3870
|
{
|
|
3922
3871
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -3927,13 +3876,13 @@ var init_AssetUpload = __esm({
|
|
|
3927
3876
|
}
|
|
3928
3877
|
)
|
|
3929
3878
|
] }),
|
|
3930
|
-
shouldShowDetails() && /* @__PURE__ */ (0,
|
|
3931
|
-
/* @__PURE__ */ (0,
|
|
3932
|
-
/* @__PURE__ */ (0,
|
|
3933
|
-
/* @__PURE__ */ (0,
|
|
3934
|
-
/* @__PURE__ */ (0,
|
|
3935
|
-
/* @__PURE__ */ (0,
|
|
3936
|
-
/* @__PURE__ */ (0,
|
|
3879
|
+
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: [
|
|
3880
|
+
/* @__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" }),
|
|
3881
|
+
/* @__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: [
|
|
3882
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
3883
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
|
|
3884
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-gray-500", children: "Title" }),
|
|
3885
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3937
3886
|
"input",
|
|
3938
3887
|
{
|
|
3939
3888
|
type: "text",
|
|
@@ -3945,18 +3894,18 @@ var init_AssetUpload = __esm({
|
|
|
3945
3894
|
}
|
|
3946
3895
|
)
|
|
3947
3896
|
] }),
|
|
3948
|
-
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0,
|
|
3949
|
-
/* @__PURE__ */ (0,
|
|
3950
|
-
/* @__PURE__ */ (0,
|
|
3897
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-gray-500", children: "Resolution" }),
|
|
3899
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
3951
3900
|
digitalAsset.intrinsicWidth,
|
|
3952
3901
|
"\xD7",
|
|
3953
3902
|
digitalAsset.intrinsicHeight
|
|
3954
3903
|
] })
|
|
3955
3904
|
] }),
|
|
3956
|
-
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0,
|
|
3957
|
-
/* @__PURE__ */ (0,
|
|
3958
|
-
/* @__PURE__ */ (0,
|
|
3959
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0,
|
|
3905
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
|
|
3906
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
3907
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
3908
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3960
3909
|
"img",
|
|
3961
3910
|
{
|
|
3962
3911
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -3964,7 +3913,7 @@ var init_AssetUpload = __esm({
|
|
|
3964
3913
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
3965
3914
|
}
|
|
3966
3915
|
),
|
|
3967
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0,
|
|
3916
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3968
3917
|
"img",
|
|
3969
3918
|
{
|
|
3970
3919
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -3974,9 +3923,9 @@ var init_AssetUpload = __esm({
|
|
|
3974
3923
|
)
|
|
3975
3924
|
] })
|
|
3976
3925
|
] }),
|
|
3977
|
-
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0,
|
|
3978
|
-
/* @__PURE__ */ (0,
|
|
3979
|
-
/* @__PURE__ */ (0,
|
|
3926
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "col-span-2", children: [
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
3928
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3980
3929
|
Hyperlink,
|
|
3981
3930
|
{
|
|
3982
3931
|
href: digitalAsset.assetUrl,
|
|
@@ -3987,12 +3936,12 @@ var init_AssetUpload = __esm({
|
|
|
3987
3936
|
)
|
|
3988
3937
|
] })
|
|
3989
3938
|
] }),
|
|
3990
|
-
/* @__PURE__ */ (0,
|
|
3939
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3991
3940
|
"span",
|
|
3992
3941
|
{
|
|
3993
3942
|
onClick: () => !isDisabled && deleteFile(index),
|
|
3994
3943
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
3995
|
-
children: /* @__PURE__ */ (0,
|
|
3944
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
3996
3945
|
}
|
|
3997
3946
|
)
|
|
3998
3947
|
] }, index)) })
|
|
@@ -4004,12 +3953,12 @@ var init_AssetUpload = __esm({
|
|
|
4004
3953
|
});
|
|
4005
3954
|
|
|
4006
3955
|
// src/components/controls/edit/SwitchInput.tsx
|
|
4007
|
-
var
|
|
3956
|
+
var import_react41, import_jsx_runtime55, SwitchInput, SwitchInput_default;
|
|
4008
3957
|
var init_SwitchInput = __esm({
|
|
4009
3958
|
"src/components/controls/edit/SwitchInput.tsx"() {
|
|
4010
3959
|
"use strict";
|
|
4011
|
-
|
|
4012
|
-
|
|
3960
|
+
import_react41 = __toESM(require("react"));
|
|
3961
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4013
3962
|
SwitchInput = (props) => {
|
|
4014
3963
|
const textChangeHandler = (event) => {
|
|
4015
3964
|
let text = event.target.checked;
|
|
@@ -4026,28 +3975,28 @@ var init_SwitchInput = __esm({
|
|
|
4026
3975
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
4027
3976
|
value = true;
|
|
4028
3977
|
}
|
|
4029
|
-
return /* @__PURE__ */ (0,
|
|
4030
|
-
/* @__PURE__ */ (0,
|
|
4031
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
3978
|
+
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: [
|
|
3979
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0", children: [
|
|
3980
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
4032
3981
|
"label",
|
|
4033
3982
|
{
|
|
4034
3983
|
htmlFor: props.name,
|
|
4035
3984
|
className: "inline-block text-sm font-semibold text-slate-800",
|
|
4036
3985
|
children: [
|
|
4037
3986
|
props.attributes.label,
|
|
4038
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
3987
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
4039
3988
|
]
|
|
4040
3989
|
}
|
|
4041
3990
|
),
|
|
4042
|
-
/* @__PURE__ */ (0,
|
|
3991
|
+
/* @__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 || "" })
|
|
4043
3992
|
] }),
|
|
4044
|
-
/* @__PURE__ */ (0,
|
|
3993
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
4045
3994
|
"label",
|
|
4046
3995
|
{
|
|
4047
3996
|
htmlFor: props.name,
|
|
4048
3997
|
className: "relative inline-flex shrink-0 cursor-pointer items-center peer-disabled:cursor-not-allowed",
|
|
4049
3998
|
children: [
|
|
4050
|
-
/* @__PURE__ */ (0,
|
|
3999
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4051
4000
|
"input",
|
|
4052
4001
|
{
|
|
4053
4002
|
type: "checkbox",
|
|
@@ -4060,13 +4009,13 @@ var init_SwitchInput = __esm({
|
|
|
4060
4009
|
className: "peer sr-only"
|
|
4061
4010
|
}
|
|
4062
4011
|
),
|
|
4063
|
-
/* @__PURE__ */ (0,
|
|
4012
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4064
4013
|
"div",
|
|
4065
4014
|
{
|
|
4066
4015
|
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"
|
|
4067
4016
|
}
|
|
4068
4017
|
),
|
|
4069
|
-
/* @__PURE__ */ (0,
|
|
4018
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4070
4019
|
"div",
|
|
4071
4020
|
{
|
|
4072
4021
|
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"
|
|
@@ -4164,15 +4113,15 @@ var init_DateTimeUtility = __esm({
|
|
|
4164
4113
|
});
|
|
4165
4114
|
|
|
4166
4115
|
// src/components/controls/edit/DateInput.tsx
|
|
4167
|
-
var
|
|
4116
|
+
var import_react42, import_jsx_runtime56, DateInput, DateInput_default;
|
|
4168
4117
|
var init_DateInput = __esm({
|
|
4169
4118
|
"src/components/controls/edit/DateInput.tsx"() {
|
|
4170
4119
|
"use strict";
|
|
4171
|
-
|
|
4120
|
+
import_react42 = require("react");
|
|
4172
4121
|
init_DateTimeUtility();
|
|
4173
|
-
|
|
4122
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4174
4123
|
DateInput = (props) => {
|
|
4175
|
-
const value = (0,
|
|
4124
|
+
const value = (0, import_react42.useMemo)(() => {
|
|
4176
4125
|
if (props.value === void 0 || props.value === null || props.value === "") {
|
|
4177
4126
|
return "";
|
|
4178
4127
|
}
|
|
@@ -4204,11 +4153,11 @@ var init_DateInput = __esm({
|
|
|
4204
4153
|
groupKey: props.groupKey
|
|
4205
4154
|
});
|
|
4206
4155
|
};
|
|
4207
|
-
return /* @__PURE__ */ (0,
|
|
4208
|
-
props.attributes?.label && /* @__PURE__ */ (0,
|
|
4156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("label", { className: "block mb-1", children: [
|
|
4157
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-sm font-medium", children: props.attributes.label }),
|
|
4209
4158
|
" ",
|
|
4210
|
-
props.attributes?.label && props.attributes.required && /* @__PURE__ */ (0,
|
|
4211
|
-
/* @__PURE__ */ (0,
|
|
4159
|
+
props.attributes?.label && props.attributes.required && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
4160
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4212
4161
|
"input",
|
|
4213
4162
|
{
|
|
4214
4163
|
type: "date",
|
|
@@ -4222,7 +4171,7 @@ var init_DateInput = __esm({
|
|
|
4222
4171
|
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
4223
4172
|
}
|
|
4224
4173
|
),
|
|
4225
|
-
/* @__PURE__ */ (0,
|
|
4174
|
+
/* @__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 ?? "" })
|
|
4226
4175
|
] });
|
|
4227
4176
|
};
|
|
4228
4177
|
DateInput_default = DateInput;
|
|
@@ -4230,16 +4179,16 @@ var init_DateInput = __esm({
|
|
|
4230
4179
|
});
|
|
4231
4180
|
|
|
4232
4181
|
// src/components/controls/edit/RadioInput.tsx
|
|
4233
|
-
var
|
|
4182
|
+
var import_react43, import_jsx_runtime57, RadioInput, RadioInput_default;
|
|
4234
4183
|
var init_RadioInput = __esm({
|
|
4235
4184
|
"src/components/controls/edit/RadioInput.tsx"() {
|
|
4236
4185
|
"use strict";
|
|
4237
|
-
|
|
4186
|
+
import_react43 = require("react");
|
|
4238
4187
|
init_Icon();
|
|
4239
|
-
|
|
4188
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4240
4189
|
RadioInput = (props) => {
|
|
4241
|
-
const [list, setList] = (0,
|
|
4242
|
-
(0,
|
|
4190
|
+
const [list, setList] = (0, import_react43.useState)([]);
|
|
4191
|
+
(0, import_react43.useEffect)(() => {
|
|
4243
4192
|
async function loadData() {
|
|
4244
4193
|
if (props.dataset) {
|
|
4245
4194
|
setList(props.dataset);
|
|
@@ -4281,22 +4230,22 @@ var init_RadioInput = __esm({
|
|
|
4281
4230
|
});
|
|
4282
4231
|
}
|
|
4283
4232
|
};
|
|
4284
|
-
return /* @__PURE__ */ (0,
|
|
4285
|
-
/* @__PURE__ */ (0,
|
|
4286
|
-
/* @__PURE__ */ (0,
|
|
4233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "block", children: [
|
|
4234
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
4235
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-col gap-3", children: list.map((item, index) => {
|
|
4287
4236
|
const itemValue = item[props.dataKeyFieldName];
|
|
4288
4237
|
const isSelected = String(itemValue) === String(props.value ?? "");
|
|
4289
4238
|
const isRecommended = props.dataRecommendedValue !== void 0 && String(itemValue) === String(props.dataRecommendedValue);
|
|
4290
4239
|
const resultClassName = isSelected ? isRecommended ? "bg-success" : props.dataRecommendedValue ? "bg-alert" : "border-transparent" : "border-transparent";
|
|
4291
4240
|
const iconName = isSelected && props.dataRecommendedValue ? isRecommended ? "checkCircle" : "xCircle" : void 0;
|
|
4292
4241
|
const inputId = `${props.name}-${props.index ?? 0}-id-${index}`;
|
|
4293
|
-
return /* @__PURE__ */ (0,
|
|
4242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
4294
4243
|
"div",
|
|
4295
4244
|
{
|
|
4296
4245
|
className: `font-normal flex items-center justify-between gap-4 cursor-pointer border rounded p-2 ${resultClassName}`,
|
|
4297
4246
|
children: [
|
|
4298
|
-
/* @__PURE__ */ (0,
|
|
4299
|
-
/* @__PURE__ */ (0,
|
|
4247
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex gap-4 items-start", children: [
|
|
4248
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4300
4249
|
"input",
|
|
4301
4250
|
{
|
|
4302
4251
|
type: "radio",
|
|
@@ -4310,125 +4259,30 @@ var init_RadioInput = __esm({
|
|
|
4310
4259
|
required: props.attributes?.required
|
|
4311
4260
|
}
|
|
4312
4261
|
),
|
|
4313
|
-
/* @__PURE__ */ (0,
|
|
4262
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("label", { className: "text-body-950 pr-2", htmlFor: inputId, children: item[props.dataTextFieldName] })
|
|
4314
4263
|
] }),
|
|
4315
|
-
iconName && /* @__PURE__ */ (0,
|
|
4264
|
+
iconName && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon_default, { className: "w-5 h-5 text-success", name: iconName })
|
|
4316
4265
|
]
|
|
4317
4266
|
},
|
|
4318
4267
|
String(itemValue)
|
|
4319
4268
|
);
|
|
4320
4269
|
}) }),
|
|
4321
|
-
/* @__PURE__ */ (0,
|
|
4270
|
+
/* @__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 ?? "" })
|
|
4322
4271
|
] });
|
|
4323
4272
|
};
|
|
4324
4273
|
RadioInput_default = RadioInput;
|
|
4325
4274
|
}
|
|
4326
4275
|
});
|
|
4327
4276
|
|
|
4328
|
-
// src/components/controls/edit/Switcher.tsx
|
|
4329
|
-
var import_react45, import_jsx_runtime59, Switcher, Switcher_default;
|
|
4330
|
-
var init_Switcher = __esm({
|
|
4331
|
-
"src/components/controls/edit/Switcher.tsx"() {
|
|
4332
|
-
"use strict";
|
|
4333
|
-
import_react45 = require("react");
|
|
4334
|
-
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4335
|
-
Switcher = (props) => {
|
|
4336
|
-
const [list, setList] = (0, import_react45.useState)([]);
|
|
4337
|
-
(0, import_react45.useEffect)(() => {
|
|
4338
|
-
async function loadData() {
|
|
4339
|
-
if (props.dataset) {
|
|
4340
|
-
setList(props.dataset);
|
|
4341
|
-
return;
|
|
4342
|
-
}
|
|
4343
|
-
if (!props.dataSource || !props.serviceClient) {
|
|
4344
|
-
setList([]);
|
|
4345
|
-
return;
|
|
4346
|
-
}
|
|
4347
|
-
let dataSource = props.dataSource;
|
|
4348
|
-
if (props.dataSourceDependsOn) {
|
|
4349
|
-
if (!props.dependentValue) {
|
|
4350
|
-
setList([]);
|
|
4351
|
-
return;
|
|
4352
|
-
}
|
|
4353
|
-
dataSource = dataSource.replace(
|
|
4354
|
-
`{${props.dataSourceDependsOn}}`,
|
|
4355
|
-
props.dependentValue
|
|
4356
|
-
);
|
|
4357
|
-
}
|
|
4358
|
-
const response = await props.serviceClient.get(dataSource);
|
|
4359
|
-
setList(response.result ?? []);
|
|
4360
|
-
}
|
|
4361
|
-
loadData();
|
|
4362
|
-
}, [
|
|
4363
|
-
props.dataSource,
|
|
4364
|
-
props.dataSourceDependsOn,
|
|
4365
|
-
props.dataset,
|
|
4366
|
-
props.dependentValue,
|
|
4367
|
-
props.serviceClient
|
|
4368
|
-
]);
|
|
4369
|
-
const changeHandler = (event) => {
|
|
4370
|
-
props.callback?.({
|
|
4371
|
-
name: props.name,
|
|
4372
|
-
value: event.target.value,
|
|
4373
|
-
index: props.index,
|
|
4374
|
-
groupKey: props.groupKey
|
|
4375
|
-
});
|
|
4376
|
-
};
|
|
4377
|
-
const value = props.value === void 0 || props.value === null ? "" : String(props.value);
|
|
4378
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("label", { className: "block mb-1", children: [
|
|
4379
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
4380
|
-
list.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4381
|
-
"input",
|
|
4382
|
-
{
|
|
4383
|
-
type: "text",
|
|
4384
|
-
name: props.name,
|
|
4385
|
-
id: props.name,
|
|
4386
|
-
value,
|
|
4387
|
-
onChange: changeHandler,
|
|
4388
|
-
required: props.attributes?.required,
|
|
4389
|
-
placeholder: props.attributes?.placeholder,
|
|
4390
|
-
disabled: props.attributes?.readOnly,
|
|
4391
|
-
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
4392
|
-
}
|
|
4393
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4394
|
-
"select",
|
|
4395
|
-
{
|
|
4396
|
-
name: props.name,
|
|
4397
|
-
id: props.name,
|
|
4398
|
-
value,
|
|
4399
|
-
onChange: changeHandler,
|
|
4400
|
-
required: props.attributes?.required,
|
|
4401
|
-
disabled: props.attributes?.readOnly,
|
|
4402
|
-
className: `peer select my-1 py-1 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`,
|
|
4403
|
-
children: [
|
|
4404
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
4405
|
-
list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4406
|
-
"option",
|
|
4407
|
-
{
|
|
4408
|
-
value: item[props.dataKeyFieldName],
|
|
4409
|
-
children: item[props.dataTextFieldName]
|
|
4410
|
-
},
|
|
4411
|
-
String(item[props.dataKeyFieldName])
|
|
4412
|
-
))
|
|
4413
|
-
]
|
|
4414
|
-
}
|
|
4415
|
-
),
|
|
4416
|
-
/* @__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 ?? "" })
|
|
4417
|
-
] });
|
|
4418
|
-
};
|
|
4419
|
-
Switcher_default = Switcher;
|
|
4420
|
-
}
|
|
4421
|
-
});
|
|
4422
|
-
|
|
4423
4277
|
// src/components/controls/edit/ReferenceInput.tsx
|
|
4424
|
-
var
|
|
4278
|
+
var import_jsx_runtime58, ReferenceInput, ReferenceInput_default;
|
|
4425
4279
|
var init_ReferenceInput = __esm({
|
|
4426
4280
|
"src/components/controls/edit/ReferenceInput.tsx"() {
|
|
4427
4281
|
"use strict";
|
|
4428
4282
|
init_SelectWithSearchInput();
|
|
4429
|
-
|
|
4283
|
+
import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4430
4284
|
ReferenceInput = (props) => {
|
|
4431
|
-
return /* @__PURE__ */ (0,
|
|
4285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectWithSearchInput_default, { ...props });
|
|
4432
4286
|
};
|
|
4433
4287
|
ReferenceInput_default = ReferenceInput;
|
|
4434
4288
|
}
|
|
@@ -4439,12 +4293,12 @@ var InputControlClient_exports = {};
|
|
|
4439
4293
|
__export(InputControlClient_exports, {
|
|
4440
4294
|
default: () => InputControlClient_default
|
|
4441
4295
|
});
|
|
4442
|
-
var
|
|
4296
|
+
var import_react44, import_jsx_runtime59, InputControl, InputControlClient_default;
|
|
4443
4297
|
var init_InputControlClient = __esm({
|
|
4444
4298
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
4445
4299
|
"use strict";
|
|
4446
4300
|
"use client";
|
|
4447
|
-
|
|
4301
|
+
import_react44 = __toESM(require("react"));
|
|
4448
4302
|
init_MultilineTextInput();
|
|
4449
4303
|
init_LineTextInput();
|
|
4450
4304
|
init_MoneyInput();
|
|
@@ -4459,17 +4313,15 @@ var init_InputControlClient = __esm({
|
|
|
4459
4313
|
init_ColorInput();
|
|
4460
4314
|
init_SelectWithSearchInput();
|
|
4461
4315
|
init_SelectWithSearchPanel();
|
|
4462
|
-
init_BooleanSelect();
|
|
4463
4316
|
init_EmailInput();
|
|
4464
4317
|
init_TimeInput();
|
|
4465
4318
|
init_AssetUpload();
|
|
4466
4319
|
init_SwitchInput();
|
|
4467
4320
|
init_DateInput();
|
|
4468
4321
|
init_RadioInput();
|
|
4469
|
-
init_Switcher();
|
|
4470
4322
|
init_ReferenceInput();
|
|
4471
|
-
|
|
4472
|
-
InputControl =
|
|
4323
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4324
|
+
InputControl = import_react44.default.forwardRef(
|
|
4473
4325
|
(props, ref) => {
|
|
4474
4326
|
const ControlComponents = {
|
|
4475
4327
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -4486,18 +4338,15 @@ var init_InputControlClient = __esm({
|
|
|
4486
4338
|
[InputControlType_default.colorInput]: ColorInput_default,
|
|
4487
4339
|
[InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
|
|
4488
4340
|
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
4489
|
-
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
4490
4341
|
[InputControlType_default.timeInput]: TimeInput_default,
|
|
4491
|
-
[InputControlType_default.asset]: AssetUpload_default,
|
|
4492
4342
|
[InputControlType_default.assetUpload]: AssetUpload_default,
|
|
4493
4343
|
[InputControlType_default.switchInput]: SwitchInput_default,
|
|
4494
4344
|
[InputControlType_default.dateInput]: DateInput_default,
|
|
4495
4345
|
[InputControlType_default.radioInput]: RadioInput_default,
|
|
4496
|
-
[InputControlType_default.switcher]: Switcher_default,
|
|
4497
4346
|
[InputControlType_default.referenceInput]: ReferenceInput_default
|
|
4498
4347
|
};
|
|
4499
4348
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
4500
|
-
return /* @__PURE__ */ (0,
|
|
4349
|
+
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 });
|
|
4501
4350
|
}
|
|
4502
4351
|
);
|
|
4503
4352
|
InputControl.displayName = "InputControl";
|
|
@@ -4753,29 +4602,29 @@ var LinkNodeButton_exports = {};
|
|
|
4753
4602
|
__export(LinkNodeButton_exports, {
|
|
4754
4603
|
default: () => LinkNodeButton_default
|
|
4755
4604
|
});
|
|
4756
|
-
var
|
|
4605
|
+
var import_react45, import_jsx_runtime63, LinkNodeButton, LinkNodeButton_default;
|
|
4757
4606
|
var init_LinkNodeButton = __esm({
|
|
4758
4607
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
4759
4608
|
"use strict";
|
|
4760
4609
|
"use client";
|
|
4761
|
-
|
|
4610
|
+
import_react45 = require("react");
|
|
4762
4611
|
init_Button();
|
|
4763
4612
|
init_ServiceClient();
|
|
4764
4613
|
init_ToastService();
|
|
4765
|
-
|
|
4614
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4766
4615
|
LinkNodeButton = (props) => {
|
|
4767
4616
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
4768
|
-
const [isLoading, setIsLoading] = (0,
|
|
4769
|
-
const [successMessage, setSuccessMessage] = (0,
|
|
4617
|
+
const [isLoading, setIsLoading] = (0, import_react45.useState)(false);
|
|
4618
|
+
const [successMessage, setSuccessMessage] = (0, import_react45.useState)(null);
|
|
4770
4619
|
console.log("LinkNodeButton props:", props);
|
|
4771
|
-
const extractFieldNames = (0,
|
|
4620
|
+
const extractFieldNames = (0, import_react45.useCallback)((template) => {
|
|
4772
4621
|
if (!template) return [];
|
|
4773
4622
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
4774
4623
|
const matches = Array.from(template.matchAll(regex));
|
|
4775
4624
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
4776
4625
|
return fieldNames;
|
|
4777
4626
|
}, []);
|
|
4778
|
-
const replaceTemplateVariables = (0,
|
|
4627
|
+
const replaceTemplateVariables = (0, import_react45.useCallback)(
|
|
4779
4628
|
(template, responseData) => {
|
|
4780
4629
|
if (!template) return template;
|
|
4781
4630
|
let result = template;
|
|
@@ -4807,7 +4656,7 @@ var init_LinkNodeButton = __esm({
|
|
|
4807
4656
|
},
|
|
4808
4657
|
[props.routeParameters, dataitem, extractFieldNames]
|
|
4809
4658
|
);
|
|
4810
|
-
const getNestedValue7 = (0,
|
|
4659
|
+
const getNestedValue7 = (0, import_react45.useCallback)((obj, path) => {
|
|
4811
4660
|
if (!obj || !path) return void 0;
|
|
4812
4661
|
if (obj[path] !== void 0) {
|
|
4813
4662
|
return obj[path];
|
|
@@ -4822,7 +4671,7 @@ var init_LinkNodeButton = __esm({
|
|
|
4822
4671
|
}
|
|
4823
4672
|
return current;
|
|
4824
4673
|
}, []);
|
|
4825
|
-
const onClick = (0,
|
|
4674
|
+
const onClick = (0, import_react45.useCallback)(async () => {
|
|
4826
4675
|
if (!node.postUrl) {
|
|
4827
4676
|
return {
|
|
4828
4677
|
isSuccessful: false,
|
|
@@ -4936,32 +4785,32 @@ var init_LinkNodeButton = __esm({
|
|
|
4936
4785
|
return children;
|
|
4937
4786
|
}
|
|
4938
4787
|
if (linkText) {
|
|
4939
|
-
return /* @__PURE__ */ (0,
|
|
4788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: linkText });
|
|
4940
4789
|
}
|
|
4941
4790
|
return node.title || "Button";
|
|
4942
4791
|
};
|
|
4943
4792
|
const fontSize = node.children?.[0]?.style?.match(/font-size:\s*([^;]+)/)?.[1];
|
|
4944
|
-
return /* @__PURE__ */ (0,
|
|
4793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4945
4794
|
Button_default,
|
|
4946
4795
|
{
|
|
4947
4796
|
ButtonType: linkType,
|
|
4948
4797
|
onClick,
|
|
4949
4798
|
disabled: isLoading || !!successMessage,
|
|
4950
4799
|
className: "w-full",
|
|
4951
|
-
children: successMessage ? /* @__PURE__ */ (0,
|
|
4800
|
+
children: successMessage ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
4952
4801
|
"span",
|
|
4953
4802
|
{
|
|
4954
4803
|
style: fontSize ? { fontSize } : void 0,
|
|
4955
4804
|
className: "inline-flex items-center gap-2",
|
|
4956
4805
|
children: [
|
|
4957
|
-
/* @__PURE__ */ (0,
|
|
4806
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4958
4807
|
"svg",
|
|
4959
4808
|
{
|
|
4960
4809
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4961
4810
|
viewBox: "0 0 20 20",
|
|
4962
4811
|
fill: "currentColor",
|
|
4963
4812
|
className: "w-5 h-5",
|
|
4964
|
-
children: /* @__PURE__ */ (0,
|
|
4813
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4965
4814
|
"path",
|
|
4966
4815
|
{
|
|
4967
4816
|
fillRule: "evenodd",
|
|
@@ -4971,7 +4820,7 @@ var init_LinkNodeButton = __esm({
|
|
|
4971
4820
|
)
|
|
4972
4821
|
}
|
|
4973
4822
|
),
|
|
4974
|
-
/* @__PURE__ */ (0,
|
|
4823
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: successMessage })
|
|
4975
4824
|
]
|
|
4976
4825
|
}
|
|
4977
4826
|
) : renderButtonContent()
|
|
@@ -4988,9 +4837,9 @@ __export(CopyButton_exports, {
|
|
|
4988
4837
|
default: () => CopyButton
|
|
4989
4838
|
});
|
|
4990
4839
|
function CopyButton({ text }) {
|
|
4991
|
-
const [copied, setCopied] = (0,
|
|
4992
|
-
const timeoutRef = (0,
|
|
4993
|
-
(0,
|
|
4840
|
+
const [copied, setCopied] = (0, import_react52.useState)(false);
|
|
4841
|
+
const timeoutRef = (0, import_react52.useRef)(null);
|
|
4842
|
+
(0, import_react52.useEffect)(() => {
|
|
4994
4843
|
return () => {
|
|
4995
4844
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4996
4845
|
};
|
|
@@ -5005,13 +4854,13 @@ function CopyButton({ text }) {
|
|
|
5005
4854
|
console.error("Failed to copy: ", err);
|
|
5006
4855
|
}
|
|
5007
4856
|
};
|
|
5008
|
-
return /* @__PURE__ */ (0,
|
|
4857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5009
4858
|
"button",
|
|
5010
4859
|
{
|
|
5011
4860
|
onClick: handleCopy,
|
|
5012
4861
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
5013
4862
|
children: [
|
|
5014
|
-
/* @__PURE__ */ (0,
|
|
4863
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5015
4864
|
"svg",
|
|
5016
4865
|
{
|
|
5017
4866
|
width: "16",
|
|
@@ -5019,7 +4868,7 @@ function CopyButton({ text }) {
|
|
|
5019
4868
|
viewBox: "0 0 24 24",
|
|
5020
4869
|
className: "w-4 h-4",
|
|
5021
4870
|
fill: "currentColor",
|
|
5022
|
-
children: /* @__PURE__ */ (0,
|
|
4871
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5023
4872
|
"path",
|
|
5024
4873
|
{
|
|
5025
4874
|
fillRule: "evenodd",
|
|
@@ -5034,54 +4883,54 @@ function CopyButton({ text }) {
|
|
|
5034
4883
|
}
|
|
5035
4884
|
);
|
|
5036
4885
|
}
|
|
5037
|
-
var
|
|
4886
|
+
var import_react52, import_jsx_runtime73;
|
|
5038
4887
|
var init_CopyButton = __esm({
|
|
5039
4888
|
"src/components/CopyButton.tsx"() {
|
|
5040
4889
|
"use strict";
|
|
5041
4890
|
"use client";
|
|
5042
|
-
|
|
5043
|
-
|
|
4891
|
+
import_react52 = require("react");
|
|
4892
|
+
import_jsx_runtime73 = require("react/jsx-runtime");
|
|
5044
4893
|
}
|
|
5045
4894
|
});
|
|
5046
4895
|
|
|
5047
4896
|
// src/components/IFrameLoaderView.tsx
|
|
5048
|
-
var
|
|
4897
|
+
var import_react55, import_jsx_runtime77, IFrameLoaderView, IFrameLoaderView_default;
|
|
5049
4898
|
var init_IFrameLoaderView = __esm({
|
|
5050
4899
|
"src/components/IFrameLoaderView.tsx"() {
|
|
5051
4900
|
"use strict";
|
|
5052
|
-
|
|
5053
|
-
|
|
4901
|
+
import_react55 = __toESM(require("react"));
|
|
4902
|
+
import_jsx_runtime77 = require("react/jsx-runtime");
|
|
5054
4903
|
IFrameLoaderView = (props) => {
|
|
5055
|
-
return /* @__PURE__ */ (0,
|
|
5056
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
5057
|
-
/* @__PURE__ */ (0,
|
|
5058
|
-
/* @__PURE__ */ (0,
|
|
5059
|
-
/* @__PURE__ */ (0,
|
|
5060
|
-
/* @__PURE__ */ (0,
|
|
5061
|
-
/* @__PURE__ */ (0,
|
|
4904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react55.default.Fragment, { children: [
|
|
4905
|
+
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: [
|
|
4906
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
4907
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
4908
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ml-2", children: [
|
|
4909
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
4910
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
5062
4911
|
] })
|
|
5063
4912
|
] }),
|
|
5064
|
-
/* @__PURE__ */ (0,
|
|
5065
|
-
/* @__PURE__ */ (0,
|
|
5066
|
-
/* @__PURE__ */ (0,
|
|
5067
|
-
/* @__PURE__ */ (0,
|
|
5068
|
-
/* @__PURE__ */ (0,
|
|
5069
|
-
/* @__PURE__ */ (0,
|
|
5070
|
-
/* @__PURE__ */ (0,
|
|
4913
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
4914
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
4915
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4916
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4917
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4918
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4919
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5071
4920
|
] }),
|
|
5072
|
-
/* @__PURE__ */ (0,
|
|
5073
|
-
/* @__PURE__ */ (0,
|
|
5074
|
-
/* @__PURE__ */ (0,
|
|
5075
|
-
/* @__PURE__ */ (0,
|
|
5076
|
-
/* @__PURE__ */ (0,
|
|
5077
|
-
/* @__PURE__ */ (0,
|
|
4921
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
4922
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4923
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4924
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4925
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4926
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5078
4927
|
] }),
|
|
5079
|
-
/* @__PURE__ */ (0,
|
|
5080
|
-
/* @__PURE__ */ (0,
|
|
5081
|
-
/* @__PURE__ */ (0,
|
|
5082
|
-
/* @__PURE__ */ (0,
|
|
5083
|
-
/* @__PURE__ */ (0,
|
|
5084
|
-
/* @__PURE__ */ (0,
|
|
4928
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
4929
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4930
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4931
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4932
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4933
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5085
4934
|
] })
|
|
5086
4935
|
] })
|
|
5087
4936
|
] }) }),
|
|
@@ -5097,23 +4946,23 @@ var IframeClient_exports = {};
|
|
|
5097
4946
|
__export(IframeClient_exports, {
|
|
5098
4947
|
default: () => IframeClient_default
|
|
5099
4948
|
});
|
|
5100
|
-
var
|
|
4949
|
+
var import_react56, import_jsx_runtime78, IframeClient, IframeClient_default;
|
|
5101
4950
|
var init_IframeClient = __esm({
|
|
5102
4951
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
5103
4952
|
"use strict";
|
|
5104
4953
|
"use client";
|
|
5105
|
-
|
|
4954
|
+
import_react56 = __toESM(require("react"));
|
|
5106
4955
|
init_IFrameLoaderView();
|
|
5107
|
-
|
|
4956
|
+
import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5108
4957
|
IframeClient = ({
|
|
5109
4958
|
src,
|
|
5110
4959
|
width,
|
|
5111
4960
|
height
|
|
5112
4961
|
}) => {
|
|
5113
|
-
const iframeRef = (0,
|
|
5114
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
5115
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
5116
|
-
(0,
|
|
4962
|
+
const iframeRef = (0, import_react56.useRef)(null);
|
|
4963
|
+
const [iframeHeight, setIframeHeight] = (0, import_react56.useState)("100%");
|
|
4964
|
+
const [isDataFound, setIsDataFound] = (0, import_react56.useState)(null);
|
|
4965
|
+
(0, import_react56.useEffect)(() => {
|
|
5117
4966
|
const handleReceiveMessage = (event) => {
|
|
5118
4967
|
const eventName = event?.data?.eventName;
|
|
5119
4968
|
const payload = event?.data?.payload;
|
|
@@ -5128,7 +4977,7 @@ var init_IframeClient = __esm({
|
|
|
5128
4977
|
window.addEventListener("message", handleReceiveMessage);
|
|
5129
4978
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
5130
4979
|
}, []);
|
|
5131
|
-
(0,
|
|
4980
|
+
(0, import_react56.useEffect)(() => {
|
|
5132
4981
|
const handleResize = () => {
|
|
5133
4982
|
if (iframeRef.current) {
|
|
5134
4983
|
iframeRef.current.contentWindow?.postMessage(
|
|
@@ -5143,7 +4992,7 @@ var init_IframeClient = __esm({
|
|
|
5143
4992
|
const handleIframeLoad = () => {
|
|
5144
4993
|
setIsDataFound(true);
|
|
5145
4994
|
};
|
|
5146
|
-
return /* @__PURE__ */ (0,
|
|
4995
|
+
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)(
|
|
5147
4996
|
"iframe",
|
|
5148
4997
|
{
|
|
5149
4998
|
ref: iframeRef,
|
|
@@ -5402,21 +5251,21 @@ var Pagination_exports = {};
|
|
|
5402
5251
|
__export(Pagination_exports, {
|
|
5403
5252
|
default: () => Pagination_default
|
|
5404
5253
|
});
|
|
5405
|
-
var
|
|
5254
|
+
var import_react57, import_jsx_runtime84, Pagination, Pagination_default;
|
|
5406
5255
|
var init_Pagination = __esm({
|
|
5407
5256
|
"src/components/Pagination.tsx"() {
|
|
5408
5257
|
"use strict";
|
|
5409
5258
|
"use client";
|
|
5410
|
-
|
|
5259
|
+
import_react57 = require("react");
|
|
5411
5260
|
init_OdataBuilder();
|
|
5412
5261
|
init_Icon();
|
|
5413
5262
|
init_StyleTypes();
|
|
5414
5263
|
init_InputControlType();
|
|
5415
5264
|
init_Hyperlink();
|
|
5416
|
-
|
|
5265
|
+
import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5417
5266
|
Pagination = (props) => {
|
|
5418
5267
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
5419
|
-
const builder = (0,
|
|
5268
|
+
const builder = (0, import_react57.useMemo)(() => {
|
|
5420
5269
|
const b = new OdataBuilder(path);
|
|
5421
5270
|
if (query) b.setQuery(query);
|
|
5422
5271
|
return b;
|
|
@@ -5457,7 +5306,7 @@ var init_Pagination = __esm({
|
|
|
5457
5306
|
return range;
|
|
5458
5307
|
};
|
|
5459
5308
|
const paginationRange = getPaginationRange();
|
|
5460
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
5309
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5461
5310
|
Hyperlink,
|
|
5462
5311
|
{
|
|
5463
5312
|
linkType: "Link" /* Link */,
|
|
@@ -5472,9 +5321,9 @@ var init_Pagination = __esm({
|
|
|
5472
5321
|
);
|
|
5473
5322
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
5474
5323
|
if (disabled) {
|
|
5475
|
-
return /* @__PURE__ */ (0,
|
|
5324
|
+
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 });
|
|
5476
5325
|
}
|
|
5477
|
-
return /* @__PURE__ */ (0,
|
|
5326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5478
5327
|
Hyperlink,
|
|
5479
5328
|
{
|
|
5480
5329
|
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",
|
|
@@ -5484,35 +5333,35 @@ var init_Pagination = __esm({
|
|
|
5484
5333
|
);
|
|
5485
5334
|
};
|
|
5486
5335
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
5487
|
-
return /* @__PURE__ */ (0,
|
|
5488
|
-
/* @__PURE__ */ (0,
|
|
5489
|
-
/* @__PURE__ */ (0,
|
|
5336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
5338
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "text-sm", children: [
|
|
5490
5339
|
"Showing ",
|
|
5491
|
-
/* @__PURE__ */ (0,
|
|
5340
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "font-semibold", children: [
|
|
5492
5341
|
startItem,
|
|
5493
5342
|
"-",
|
|
5494
5343
|
endItem
|
|
5495
5344
|
] }),
|
|
5496
5345
|
" ",
|
|
5497
5346
|
"out of ",
|
|
5498
|
-
/* @__PURE__ */ (0,
|
|
5347
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
5499
5348
|
" results"
|
|
5500
5349
|
] }),
|
|
5501
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
5502
|
-
/* @__PURE__ */ (0,
|
|
5350
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
5351
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
5503
5352
|
NavigationButton,
|
|
5504
5353
|
{
|
|
5505
5354
|
page: activePageNumber - 1,
|
|
5506
5355
|
disabled: activePageNumber === 1,
|
|
5507
5356
|
children: [
|
|
5508
|
-
/* @__PURE__ */ (0,
|
|
5509
|
-
/* @__PURE__ */ (0,
|
|
5357
|
+
/* @__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" }) }),
|
|
5358
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
5510
5359
|
]
|
|
5511
5360
|
}
|
|
5512
5361
|
),
|
|
5513
5362
|
paginationRange.map((item, index) => {
|
|
5514
5363
|
if (item === "...") {
|
|
5515
|
-
return /* @__PURE__ */ (0,
|
|
5364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5516
5365
|
"span",
|
|
5517
5366
|
{
|
|
5518
5367
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -5522,23 +5371,23 @@ var init_Pagination = __esm({
|
|
|
5522
5371
|
);
|
|
5523
5372
|
}
|
|
5524
5373
|
const page = item;
|
|
5525
|
-
return /* @__PURE__ */ (0,
|
|
5374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PageButton, { page, children: page }, page);
|
|
5526
5375
|
}),
|
|
5527
|
-
/* @__PURE__ */ (0,
|
|
5376
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
5528
5377
|
NavigationButton,
|
|
5529
5378
|
{
|
|
5530
5379
|
page: activePageNumber + 1,
|
|
5531
5380
|
disabled: activePageNumber === totalPages,
|
|
5532
5381
|
children: [
|
|
5533
|
-
/* @__PURE__ */ (0,
|
|
5534
|
-
/* @__PURE__ */ (0,
|
|
5382
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
5383
|
+
/* @__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" }) })
|
|
5535
5384
|
]
|
|
5536
5385
|
}
|
|
5537
5386
|
)
|
|
5538
5387
|
] }),
|
|
5539
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
5540
|
-
/* @__PURE__ */ (0,
|
|
5541
|
-
/* @__PURE__ */ (0,
|
|
5388
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
5389
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
5390
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5542
5391
|
"input",
|
|
5543
5392
|
{
|
|
5544
5393
|
type: "number",
|
|
@@ -5559,9 +5408,9 @@ var init_Pagination = __esm({
|
|
|
5559
5408
|
) })
|
|
5560
5409
|
] })
|
|
5561
5410
|
] }),
|
|
5562
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
5563
|
-
/* @__PURE__ */ (0,
|
|
5564
|
-
/* @__PURE__ */ (0,
|
|
5411
|
+
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: [
|
|
5412
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
5413
|
+
/* @__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)(
|
|
5565
5414
|
Hyperlink,
|
|
5566
5415
|
{
|
|
5567
5416
|
className: `
|
|
@@ -5573,7 +5422,7 @@ var init_Pagination = __esm({
|
|
|
5573
5422
|
},
|
|
5574
5423
|
size
|
|
5575
5424
|
)) }),
|
|
5576
|
-
/* @__PURE__ */ (0,
|
|
5425
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-sm", children: "per page" })
|
|
5577
5426
|
] }) })
|
|
5578
5427
|
] });
|
|
5579
5428
|
};
|
|
@@ -5586,16 +5435,16 @@ var DataBindingControls_exports = {};
|
|
|
5586
5435
|
__export(DataBindingControls_exports, {
|
|
5587
5436
|
default: () => DataBindingControls_default
|
|
5588
5437
|
});
|
|
5589
|
-
var
|
|
5438
|
+
var import_react58, import_navigation, import_jsx_runtime85, humanize, escapeODataString, parseFacetSelections, buildFacetFilter, parseODataSearch, normalizeSortOption, DUMMY_FACETS, DUMMY_SORT_OPTIONS, DataBindingControls, DataBindingControls_default;
|
|
5590
5439
|
var init_DataBindingControls = __esm({
|
|
5591
5440
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
5592
5441
|
"use strict";
|
|
5593
5442
|
"use client";
|
|
5594
|
-
|
|
5443
|
+
import_react58 = require("react");
|
|
5595
5444
|
import_navigation = require("next/navigation");
|
|
5596
5445
|
init_InputControl();
|
|
5597
5446
|
init_InputControlType();
|
|
5598
|
-
|
|
5447
|
+
import_jsx_runtime85 = require("react/jsx-runtime");
|
|
5599
5448
|
humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
5600
5449
|
escapeODataString = (value) => value.replace(/'/g, "''");
|
|
5601
5450
|
parseFacetSelections = (filter) => {
|
|
@@ -5672,12 +5521,12 @@ var init_DataBindingControls = __esm({
|
|
|
5672
5521
|
const selectedFacetValues = parseFacetSelections(currentFilter);
|
|
5673
5522
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
5674
5523
|
const currentSearch = parseODataSearch(query?.["$search"]);
|
|
5675
|
-
const [searchText, setSearchText] = (0,
|
|
5676
|
-
const lastNavigationUrl = (0,
|
|
5677
|
-
(0,
|
|
5524
|
+
const [searchText, setSearchText] = (0, import_react58.useState)(currentSearch);
|
|
5525
|
+
const lastNavigationUrl = (0, import_react58.useRef)(null);
|
|
5526
|
+
(0, import_react58.useEffect)(() => {
|
|
5678
5527
|
setSearchText(currentSearch);
|
|
5679
5528
|
}, [currentSearch]);
|
|
5680
|
-
const getQueryUrl = (0,
|
|
5529
|
+
const getQueryUrl = (0, import_react58.useCallback)(
|
|
5681
5530
|
(updates) => {
|
|
5682
5531
|
const params = new URLSearchParams(query ?? {});
|
|
5683
5532
|
Object.entries(updates).forEach(([key, value]) => {
|
|
@@ -5707,7 +5556,7 @@ var init_DataBindingControls = __esm({
|
|
|
5707
5556
|
filter: void 0
|
|
5708
5557
|
});
|
|
5709
5558
|
};
|
|
5710
|
-
const navigateWithoutReload = (0,
|
|
5559
|
+
const navigateWithoutReload = (0, import_react58.useCallback)(
|
|
5711
5560
|
(url) => {
|
|
5712
5561
|
if (lastNavigationUrl.current === url) {
|
|
5713
5562
|
return;
|
|
@@ -5723,7 +5572,7 @@ var init_DataBindingControls = __esm({
|
|
|
5723
5572
|
},
|
|
5724
5573
|
[router]
|
|
5725
5574
|
);
|
|
5726
|
-
(0,
|
|
5575
|
+
(0, import_react58.useEffect)(() => {
|
|
5727
5576
|
const trimmedSearchText = searchText.trim();
|
|
5728
5577
|
if (trimmedSearchText === currentSearch.trim()) {
|
|
5729
5578
|
return;
|
|
@@ -5744,8 +5593,8 @@ var init_DataBindingControls = __esm({
|
|
|
5744
5593
|
if (!shouldShowToolbar && !shouldShowFacets) {
|
|
5745
5594
|
return null;
|
|
5746
5595
|
}
|
|
5747
|
-
const renderFacetLinks = (field, values, stacked = false) => /* @__PURE__ */ (0,
|
|
5748
|
-
/* @__PURE__ */ (0,
|
|
5596
|
+
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: [
|
|
5597
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5749
5598
|
"button",
|
|
5750
5599
|
{
|
|
5751
5600
|
type: "button",
|
|
@@ -5757,7 +5606,7 @@ var init_DataBindingControls = __esm({
|
|
|
5757
5606
|
),
|
|
5758
5607
|
values.map((facet) => {
|
|
5759
5608
|
const isSelected = selectedFacetValues.get(field) === facet.value;
|
|
5760
|
-
return /* @__PURE__ */ (0,
|
|
5609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
5761
5610
|
"button",
|
|
5762
5611
|
{
|
|
5763
5612
|
type: "button",
|
|
@@ -5775,9 +5624,9 @@ var init_DataBindingControls = __esm({
|
|
|
5775
5624
|
);
|
|
5776
5625
|
})
|
|
5777
5626
|
] });
|
|
5778
|
-
return /* @__PURE__ */ (0,
|
|
5779
|
-
shouldShowToolbar && /* @__PURE__ */ (0,
|
|
5780
|
-
showSearchBar && /* @__PURE__ */ (0,
|
|
5627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: mode === "toolbar" ? "mb-6" : "flex flex-col gap-2", children: [
|
|
5628
|
+
shouldShowToolbar && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
|
|
5629
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "w-full max-w-xl", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5781
5630
|
InputControl_default,
|
|
5782
5631
|
{
|
|
5783
5632
|
name: "searchText",
|
|
@@ -5788,9 +5637,9 @@ var init_DataBindingControls = __esm({
|
|
|
5788
5637
|
inputClasses: "!mt-0"
|
|
5789
5638
|
}
|
|
5790
5639
|
) }),
|
|
5791
|
-
hasSortControls && /* @__PURE__ */ (0,
|
|
5792
|
-
/* @__PURE__ */ (0,
|
|
5793
|
-
/* @__PURE__ */ (0,
|
|
5640
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
5641
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "font-medium", children: "Sort by" }),
|
|
5642
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
5794
5643
|
InputControl_default,
|
|
5795
5644
|
{
|
|
5796
5645
|
name: "sortOptions",
|
|
@@ -5811,10 +5660,10 @@ var init_DataBindingControls = __esm({
|
|
|
5811
5660
|
)
|
|
5812
5661
|
] })
|
|
5813
5662
|
] }),
|
|
5814
|
-
shouldShowFacets && facetGroups.length === 1 && /* @__PURE__ */ (0,
|
|
5815
|
-
shouldShowFacets && facetGroups.length > 1 && /* @__PURE__ */ (0,
|
|
5816
|
-
/* @__PURE__ */ (0,
|
|
5817
|
-
/* @__PURE__ */ (0,
|
|
5663
|
+
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]) }),
|
|
5664
|
+
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: [
|
|
5665
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("summary", { className: "cursor-pointer font-semibold", children: humanize(field) }),
|
|
5666
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "p-2", children: renderFacetLinks(field, values, true) })
|
|
5818
5667
|
] }, field)) })
|
|
5819
5668
|
] });
|
|
5820
5669
|
};
|
|
@@ -5827,13 +5676,13 @@ var Slider_exports = {};
|
|
|
5827
5676
|
__export(Slider_exports, {
|
|
5828
5677
|
default: () => Slider_default
|
|
5829
5678
|
});
|
|
5830
|
-
var
|
|
5679
|
+
var import_react59, import_jsx_runtime86, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
5831
5680
|
var init_Slider = __esm({
|
|
5832
5681
|
"src/components/Slider.tsx"() {
|
|
5833
5682
|
"use strict";
|
|
5834
5683
|
"use client";
|
|
5835
|
-
|
|
5836
|
-
|
|
5684
|
+
import_react59 = __toESM(require("react"));
|
|
5685
|
+
import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5837
5686
|
Slider = ({
|
|
5838
5687
|
children,
|
|
5839
5688
|
slidesToShow = 4,
|
|
@@ -5851,13 +5700,13 @@ var init_Slider = __esm({
|
|
|
5851
5700
|
pillStyle = "cumulative",
|
|
5852
5701
|
progressPosition = "bottom"
|
|
5853
5702
|
}) => {
|
|
5854
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
5855
|
-
const [transition, setTransition] = (0,
|
|
5856
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
5703
|
+
const [currentSlide, setCurrentSlide] = (0, import_react59.useState)(0);
|
|
5704
|
+
const [transition, setTransition] = (0, import_react59.useState)(true);
|
|
5705
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react59.useState)(
|
|
5857
5706
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
5858
5707
|
);
|
|
5859
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
5860
|
-
(0,
|
|
5708
|
+
const [isPlaying, setIsPlaying] = (0, import_react59.useState)(autoplay);
|
|
5709
|
+
(0, import_react59.useEffect)(() => {
|
|
5861
5710
|
if (typeof slidesToShow === "number") return;
|
|
5862
5711
|
const handleResize = () => {
|
|
5863
5712
|
if (window.innerWidth >= 1024) {
|
|
@@ -5872,7 +5721,7 @@ var init_Slider = __esm({
|
|
|
5872
5721
|
window.addEventListener("resize", handleResize);
|
|
5873
5722
|
return () => window.removeEventListener("resize", handleResize);
|
|
5874
5723
|
}, [slidesToShow]);
|
|
5875
|
-
(0,
|
|
5724
|
+
(0, import_react59.useEffect)(() => {
|
|
5876
5725
|
if (!autoplay) return;
|
|
5877
5726
|
const timer = setInterval(() => {
|
|
5878
5727
|
if (isPlaying) {
|
|
@@ -5881,7 +5730,7 @@ var init_Slider = __esm({
|
|
|
5881
5730
|
}, autoplay_speed);
|
|
5882
5731
|
return () => clearInterval(timer);
|
|
5883
5732
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
5884
|
-
const totalSlides =
|
|
5733
|
+
const totalSlides = import_react59.Children.count(children);
|
|
5885
5734
|
const maxSlide = totalSlides - slidesToShowState;
|
|
5886
5735
|
const nextSlide = () => {
|
|
5887
5736
|
if (currentSlide >= maxSlide) {
|
|
@@ -5926,16 +5775,16 @@ var init_Slider = __esm({
|
|
|
5926
5775
|
}
|
|
5927
5776
|
};
|
|
5928
5777
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
5929
|
-
const slides =
|
|
5930
|
-
if (!
|
|
5778
|
+
const slides = import_react59.Children.map(children, (child, index) => {
|
|
5779
|
+
if (!import_react59.default.isValidElement(child)) return null;
|
|
5931
5780
|
const childProps = child.props;
|
|
5932
5781
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
5933
|
-
return /* @__PURE__ */ (0,
|
|
5782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5934
5783
|
"div",
|
|
5935
5784
|
{
|
|
5936
5785
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
5937
5786
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
5938
|
-
children: (0,
|
|
5787
|
+
children: (0, import_react59.cloneElement)(child, {
|
|
5939
5788
|
className: mergedClassName
|
|
5940
5789
|
})
|
|
5941
5790
|
},
|
|
@@ -5953,14 +5802,14 @@ var init_Slider = __esm({
|
|
|
5953
5802
|
return "bottom-4";
|
|
5954
5803
|
}
|
|
5955
5804
|
};
|
|
5956
|
-
return /* @__PURE__ */ (0,
|
|
5805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5957
5806
|
"div",
|
|
5958
5807
|
{
|
|
5959
5808
|
className: `relative w-full overflow-hidden ${className}`,
|
|
5960
5809
|
onMouseEnter: handleMouseEnter,
|
|
5961
5810
|
onMouseLeave: handleMouseLeave,
|
|
5962
5811
|
children: [
|
|
5963
|
-
/* @__PURE__ */ (0,
|
|
5812
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5964
5813
|
"div",
|
|
5965
5814
|
{
|
|
5966
5815
|
className: "flex h-full",
|
|
@@ -5971,18 +5820,18 @@ var init_Slider = __esm({
|
|
|
5971
5820
|
children: slides
|
|
5972
5821
|
}
|
|
5973
5822
|
),
|
|
5974
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
5975
|
-
/* @__PURE__ */ (0,
|
|
5823
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
5824
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5976
5825
|
ArrowButton,
|
|
5977
5826
|
{
|
|
5978
5827
|
direction: "left",
|
|
5979
5828
|
onClick: prevSlide,
|
|
5980
5829
|
visible: infinite_scroll || currentSlide > 0,
|
|
5981
5830
|
className: arrowClassName,
|
|
5982
|
-
children: /* @__PURE__ */ (0,
|
|
5831
|
+
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" }) })
|
|
5983
5832
|
}
|
|
5984
5833
|
),
|
|
5985
|
-
/* @__PURE__ */ (0,
|
|
5834
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5986
5835
|
ArrowButton,
|
|
5987
5836
|
{
|
|
5988
5837
|
direction: "right",
|
|
@@ -5990,13 +5839,13 @@ var init_Slider = __esm({
|
|
|
5990
5839
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
5991
5840
|
className: arrowClassName,
|
|
5992
5841
|
children: [
|
|
5993
|
-
/* @__PURE__ */ (0,
|
|
5842
|
+
/* @__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" }) }),
|
|
5994
5843
|
" "
|
|
5995
5844
|
]
|
|
5996
5845
|
}
|
|
5997
5846
|
)
|
|
5998
5847
|
] }),
|
|
5999
|
-
show_dots && /* @__PURE__ */ (0,
|
|
5848
|
+
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)(
|
|
6000
5849
|
ProgressPill,
|
|
6001
5850
|
{
|
|
6002
5851
|
active: index === currentSlide,
|
|
@@ -6022,7 +5871,7 @@ var init_Slider = __esm({
|
|
|
6022
5871
|
visible,
|
|
6023
5872
|
children,
|
|
6024
5873
|
className = ""
|
|
6025
|
-
}) => /* @__PURE__ */ (0,
|
|
5874
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6026
5875
|
"button",
|
|
6027
5876
|
{
|
|
6028
5877
|
className: `
|
|
@@ -6048,13 +5897,13 @@ var init_Slider = __esm({
|
|
|
6048
5897
|
currentSlide,
|
|
6049
5898
|
totalSlides
|
|
6050
5899
|
}) => {
|
|
6051
|
-
const [progress, setProgress] = (0,
|
|
6052
|
-
(0,
|
|
5900
|
+
const [progress, setProgress] = (0, import_react59.useState)(0);
|
|
5901
|
+
(0, import_react59.useEffect)(() => {
|
|
6053
5902
|
if (active) {
|
|
6054
5903
|
setProgress(0);
|
|
6055
5904
|
}
|
|
6056
5905
|
}, [active, index]);
|
|
6057
|
-
(0,
|
|
5906
|
+
(0, import_react59.useEffect)(() => {
|
|
6058
5907
|
if (!active || !isPlaying) {
|
|
6059
5908
|
if (!active) {
|
|
6060
5909
|
setProgress(0);
|
|
@@ -6109,7 +5958,7 @@ var init_Slider = __esm({
|
|
|
6109
5958
|
const renderProgressBar = () => {
|
|
6110
5959
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
6111
5960
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
6112
|
-
return /* @__PURE__ */ (0,
|
|
5961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6113
5962
|
"div",
|
|
6114
5963
|
{
|
|
6115
5964
|
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`,
|
|
@@ -6121,7 +5970,7 @@ var init_Slider = __esm({
|
|
|
6121
5970
|
};
|
|
6122
5971
|
const renderCumulativeFill = () => {
|
|
6123
5972
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
6124
|
-
return /* @__PURE__ */ (0,
|
|
5973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6125
5974
|
"div",
|
|
6126
5975
|
{
|
|
6127
5976
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -6131,7 +5980,7 @@ var init_Slider = __esm({
|
|
|
6131
5980
|
}
|
|
6132
5981
|
return null;
|
|
6133
5982
|
};
|
|
6134
|
-
return /* @__PURE__ */ (0,
|
|
5983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6135
5984
|
"button",
|
|
6136
5985
|
{
|
|
6137
5986
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -6152,7 +6001,6 @@ var init_Slider = __esm({
|
|
|
6152
6001
|
// src/index.ts
|
|
6153
6002
|
var index_exports = {};
|
|
6154
6003
|
__export(index_exports, {
|
|
6155
|
-
BooleanSelect: () => BooleanSelect_default,
|
|
6156
6004
|
Button: () => Button_default,
|
|
6157
6005
|
CheckboxInput: () => CheckboxInput_default,
|
|
6158
6006
|
ColorInput: () => ColorInput_default,
|
|
@@ -6176,7 +6024,6 @@ __export(index_exports, {
|
|
|
6176
6024
|
PhoneInput: () => PhoneInput_default,
|
|
6177
6025
|
RadioInput: () => RadioInput_default,
|
|
6178
6026
|
Select: () => Select_default,
|
|
6179
|
-
Switcher: () => Switcher_default,
|
|
6180
6027
|
TimeInput: () => TimeInput_default,
|
|
6181
6028
|
Toast: () => Toast_default,
|
|
6182
6029
|
ToastService: () => ToastService_default,
|
|
@@ -6651,13 +6498,13 @@ init_InputControl();
|
|
|
6651
6498
|
init_InputControlType();
|
|
6652
6499
|
|
|
6653
6500
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6654
|
-
var
|
|
6501
|
+
var import_react61 = __toESM(require("react"));
|
|
6655
6502
|
|
|
6656
6503
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
6657
|
-
var
|
|
6504
|
+
var import_react47 = __toESM(require("react"));
|
|
6658
6505
|
|
|
6659
6506
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
6660
|
-
var
|
|
6507
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
6661
6508
|
var TextNode = (props) => {
|
|
6662
6509
|
function cssStringToJson(cssString) {
|
|
6663
6510
|
const styleObject = {};
|
|
@@ -6712,36 +6559,36 @@ var TextNode = (props) => {
|
|
|
6712
6559
|
});
|
|
6713
6560
|
}
|
|
6714
6561
|
function renderWithLineBreaks(text) {
|
|
6715
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
6562
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { children: [
|
|
6716
6563
|
line,
|
|
6717
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
6564
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("br", {})
|
|
6718
6565
|
] }, index));
|
|
6719
6566
|
}
|
|
6720
6567
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
6721
6568
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
6722
6569
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
6723
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
6570
|
+
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;
|
|
6724
6571
|
return (
|
|
6725
6572
|
// @ts-expect-error custom code
|
|
6726
|
-
/* @__PURE__ */ (0,
|
|
6573
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
6727
6574
|
);
|
|
6728
6575
|
};
|
|
6729
6576
|
var TextNode_default = TextNode;
|
|
6730
6577
|
|
|
6731
6578
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
6732
|
-
var
|
|
6579
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
6733
6580
|
var LineBreakNode = () => {
|
|
6734
|
-
return /* @__PURE__ */ (0,
|
|
6581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
6735
6582
|
};
|
|
6736
6583
|
var LineBreakNode_default = LineBreakNode;
|
|
6737
6584
|
|
|
6738
6585
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
6739
|
-
var
|
|
6586
|
+
var import_react46 = __toESM(require("react"));
|
|
6740
6587
|
|
|
6741
6588
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
6742
6589
|
init_AssetUtility();
|
|
6743
6590
|
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
6744
|
-
var
|
|
6591
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
6745
6592
|
var HlsPlayer3 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
6746
6593
|
var getNestedValue = (obj, path) => {
|
|
6747
6594
|
if (!obj || !path) return void 0;
|
|
@@ -6774,7 +6621,7 @@ var ImageNode = (props) => {
|
|
|
6774
6621
|
assets = [image];
|
|
6775
6622
|
}
|
|
6776
6623
|
if (assets && assets.length > 0) {
|
|
6777
|
-
return /* @__PURE__ */ (0,
|
|
6624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
6778
6625
|
DeviceAssetSelector_default,
|
|
6779
6626
|
{
|
|
6780
6627
|
device: props.device,
|
|
@@ -6815,7 +6662,7 @@ var ImageNode = (props) => {
|
|
|
6815
6662
|
right: "justify-end"
|
|
6816
6663
|
};
|
|
6817
6664
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
6818
|
-
const renderMedia = () => isHls ? /* @__PURE__ */ (0,
|
|
6665
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
6819
6666
|
HlsPlayer3,
|
|
6820
6667
|
{
|
|
6821
6668
|
assetUrl: imageUrl,
|
|
@@ -6828,7 +6675,7 @@ var ImageNode = (props) => {
|
|
|
6828
6675
|
apiBaseUrl: props.apiBaseUrl,
|
|
6829
6676
|
session: props.session
|
|
6830
6677
|
}
|
|
6831
|
-
) : /* @__PURE__ */ (0,
|
|
6678
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
6832
6679
|
"img",
|
|
6833
6680
|
{
|
|
6834
6681
|
style: styles,
|
|
@@ -6841,7 +6688,7 @@ var ImageNode = (props) => {
|
|
|
6841
6688
|
}
|
|
6842
6689
|
);
|
|
6843
6690
|
if (props.node.width) {
|
|
6844
|
-
return /* @__PURE__ */ (0,
|
|
6691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
6845
6692
|
}
|
|
6846
6693
|
return renderMedia();
|
|
6847
6694
|
};
|
|
@@ -6851,7 +6698,7 @@ var ImageNode_default = ImageNode;
|
|
|
6851
6698
|
init_StyleTypes();
|
|
6852
6699
|
init_Hyperlink();
|
|
6853
6700
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
6854
|
-
var
|
|
6701
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
6855
6702
|
var LinkNodeButton2 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
6856
6703
|
ssr: false
|
|
6857
6704
|
});
|
|
@@ -6904,13 +6751,13 @@ var LinkNode = (props) => {
|
|
|
6904
6751
|
const isButton = node.isButton === true;
|
|
6905
6752
|
const renderChildren2 = () => {
|
|
6906
6753
|
if (!node.children || node.children.length === 0) return null;
|
|
6907
|
-
return /* @__PURE__ */ (0,
|
|
6754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_jsx_runtime64.Fragment, { children: node.children.map((childNode, index) => {
|
|
6908
6755
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
6909
6756
|
if (!SelectedNode) {
|
|
6910
6757
|
console.warn("Unknown node type:", childNode.type);
|
|
6911
6758
|
return null;
|
|
6912
6759
|
}
|
|
6913
|
-
return /* @__PURE__ */ (0,
|
|
6760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react46.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
6914
6761
|
SelectedNode,
|
|
6915
6762
|
{
|
|
6916
6763
|
node: childNode,
|
|
@@ -6923,15 +6770,15 @@ var LinkNode = (props) => {
|
|
|
6923
6770
|
};
|
|
6924
6771
|
const renderFallback = () => {
|
|
6925
6772
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
6926
|
-
return /* @__PURE__ */ (0,
|
|
6773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: linkText });
|
|
6927
6774
|
}
|
|
6928
6775
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
6929
|
-
return /* @__PURE__ */ (0,
|
|
6776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("br", {});
|
|
6930
6777
|
}
|
|
6931
6778
|
return null;
|
|
6932
6779
|
};
|
|
6933
6780
|
if (isButton) {
|
|
6934
|
-
return /* @__PURE__ */ (0,
|
|
6781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
6935
6782
|
LinkNodeButton2,
|
|
6936
6783
|
{
|
|
6937
6784
|
node,
|
|
@@ -6949,7 +6796,7 @@ var LinkNode = (props) => {
|
|
|
6949
6796
|
}
|
|
6950
6797
|
);
|
|
6951
6798
|
}
|
|
6952
|
-
return /* @__PURE__ */ (0,
|
|
6799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
6953
6800
|
Hyperlink,
|
|
6954
6801
|
{
|
|
6955
6802
|
href: linkUrl || "#",
|
|
@@ -6965,10 +6812,10 @@ var LinkNode = (props) => {
|
|
|
6965
6812
|
var LinkNode_default = LinkNode;
|
|
6966
6813
|
|
|
6967
6814
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
6968
|
-
var
|
|
6815
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6969
6816
|
var SVGIconNode = ({ node }) => {
|
|
6970
6817
|
if (!node?.svgCode) return null;
|
|
6971
|
-
return /* @__PURE__ */ (0,
|
|
6818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
6972
6819
|
"span",
|
|
6973
6820
|
{
|
|
6974
6821
|
style: {
|
|
@@ -6985,7 +6832,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
6985
6832
|
|
|
6986
6833
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
6987
6834
|
var import_katex = __toESM(require("katex"));
|
|
6988
|
-
var
|
|
6835
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
6989
6836
|
var EquationNode = ({ node }) => {
|
|
6990
6837
|
const { equation, inline } = node;
|
|
6991
6838
|
let html = "";
|
|
@@ -7000,7 +6847,7 @@ var EquationNode = ({ node }) => {
|
|
|
7000
6847
|
});
|
|
7001
6848
|
}
|
|
7002
6849
|
if (inline) {
|
|
7003
|
-
return /* @__PURE__ */ (0,
|
|
6850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7004
6851
|
"span",
|
|
7005
6852
|
{
|
|
7006
6853
|
className: "katex-inline",
|
|
@@ -7008,7 +6855,7 @@ var EquationNode = ({ node }) => {
|
|
|
7008
6855
|
}
|
|
7009
6856
|
);
|
|
7010
6857
|
}
|
|
7011
|
-
return /* @__PURE__ */ (0,
|
|
6858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7012
6859
|
"div",
|
|
7013
6860
|
{
|
|
7014
6861
|
className: "katex-block my-3 text-center",
|
|
@@ -7019,7 +6866,7 @@ var EquationNode = ({ node }) => {
|
|
|
7019
6866
|
var EquationNode_default = EquationNode;
|
|
7020
6867
|
|
|
7021
6868
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
7022
|
-
var
|
|
6869
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
7023
6870
|
function getNestedProperty(obj, path) {
|
|
7024
6871
|
if (!obj || !path) return null;
|
|
7025
6872
|
if (path.includes(".")) {
|
|
@@ -7032,7 +6879,7 @@ function getNestedProperty(obj, path) {
|
|
|
7032
6879
|
}
|
|
7033
6880
|
const value = obj[path];
|
|
7034
6881
|
if (Array.isArray(value)) {
|
|
7035
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
6882
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { children: String(item) }, index));
|
|
7036
6883
|
}
|
|
7037
6884
|
return value;
|
|
7038
6885
|
}
|
|
@@ -7095,7 +6942,7 @@ var DatafieldNode = (props) => {
|
|
|
7095
6942
|
const dataType = props.node.dataType;
|
|
7096
6943
|
if (isEmptyValue) return null;
|
|
7097
6944
|
if (dataType === "rawContent") {
|
|
7098
|
-
return /* @__PURE__ */ (0,
|
|
6945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7099
6946
|
PageBodyRenderer_default,
|
|
7100
6947
|
{
|
|
7101
6948
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -7111,13 +6958,13 @@ var DatafieldNode = (props) => {
|
|
|
7111
6958
|
}
|
|
7112
6959
|
);
|
|
7113
6960
|
}
|
|
7114
|
-
return /* @__PURE__ */ (0,
|
|
6961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7115
6962
|
"span",
|
|
7116
6963
|
{
|
|
7117
6964
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
7118
6965
|
style: styles,
|
|
7119
6966
|
title,
|
|
7120
|
-
children: /* @__PURE__ */ (0,
|
|
6967
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7121
6968
|
ViewControl_default,
|
|
7122
6969
|
{
|
|
7123
6970
|
controlType: dataType,
|
|
@@ -7132,7 +6979,7 @@ var DatafieldNode = (props) => {
|
|
|
7132
6979
|
var DatafieldNode_default = DatafieldNode;
|
|
7133
6980
|
|
|
7134
6981
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
7135
|
-
var
|
|
6982
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
7136
6983
|
var ParagraphNode = (props) => {
|
|
7137
6984
|
const NodeTypes2 = {
|
|
7138
6985
|
["text"]: TextNode_default,
|
|
@@ -7152,9 +6999,9 @@ var ParagraphNode = (props) => {
|
|
|
7152
6999
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
7153
7000
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
7154
7001
|
if (isInlineOnlyParent) {
|
|
7155
|
-
return /* @__PURE__ */ (0,
|
|
7002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
7156
7003
|
const SelectedNode = NodeTypes2[node.type];
|
|
7157
|
-
return /* @__PURE__ */ (0,
|
|
7004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react47.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7158
7005
|
SelectedNode,
|
|
7159
7006
|
{
|
|
7160
7007
|
node,
|
|
@@ -7167,10 +7014,10 @@ var ParagraphNode = (props) => {
|
|
|
7167
7014
|
) }, index);
|
|
7168
7015
|
}) });
|
|
7169
7016
|
}
|
|
7170
|
-
return /* @__PURE__ */ (0,
|
|
7017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: " " + formatClasses, children: [
|
|
7171
7018
|
hasChildren && props.node.children.map((node, index) => {
|
|
7172
7019
|
const SelectedNode = NodeTypes2[node.type];
|
|
7173
|
-
return /* @__PURE__ */ (0,
|
|
7020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react47.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7174
7021
|
SelectedNode,
|
|
7175
7022
|
{
|
|
7176
7023
|
node,
|
|
@@ -7182,14 +7029,14 @@ var ParagraphNode = (props) => {
|
|
|
7182
7029
|
}
|
|
7183
7030
|
) }, index);
|
|
7184
7031
|
}),
|
|
7185
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
7032
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
7186
7033
|
] });
|
|
7187
7034
|
};
|
|
7188
7035
|
var ParagraphNode_default = ParagraphNode;
|
|
7189
7036
|
|
|
7190
7037
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
7191
|
-
var
|
|
7192
|
-
var
|
|
7038
|
+
var import_react48 = __toESM(require("react"));
|
|
7039
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
7193
7040
|
var HeadingNode = (props) => {
|
|
7194
7041
|
const NodeTypes2 = {
|
|
7195
7042
|
["text"]: TextNode_default,
|
|
@@ -7205,23 +7052,23 @@ var HeadingNode = (props) => {
|
|
|
7205
7052
|
{
|
|
7206
7053
|
}
|
|
7207
7054
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
7208
|
-
return /* @__PURE__ */ (0,
|
|
7055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: import_react48.default.createElement(
|
|
7209
7056
|
HeadingTag,
|
|
7210
7057
|
{ className: formatClasses },
|
|
7211
7058
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
7212
7059
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
7213
|
-
return /* @__PURE__ */ (0,
|
|
7060
|
+
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);
|
|
7214
7061
|
})
|
|
7215
7062
|
) });
|
|
7216
7063
|
};
|
|
7217
7064
|
var HeadingNode_default = HeadingNode;
|
|
7218
7065
|
|
|
7219
7066
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
7220
|
-
var
|
|
7067
|
+
var import_react50 = __toESM(require("react"));
|
|
7221
7068
|
|
|
7222
7069
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
7223
|
-
var
|
|
7224
|
-
var
|
|
7070
|
+
var import_react49 = __toESM(require("react"));
|
|
7071
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
7225
7072
|
var ListItemNode = (props) => {
|
|
7226
7073
|
const NodeTypes2 = {
|
|
7227
7074
|
text: TextNode_default,
|
|
@@ -7238,66 +7085,66 @@ var ListItemNode = (props) => {
|
|
|
7238
7085
|
liStyle.fontSize = match[1].trim();
|
|
7239
7086
|
}
|
|
7240
7087
|
}
|
|
7241
|
-
return /* @__PURE__ */ (0,
|
|
7088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
7242
7089
|
const SelectedNode = NodeTypes2[node.type];
|
|
7243
7090
|
if (node.type === "linebreak") {
|
|
7244
7091
|
if (!foundFirstBreak) {
|
|
7245
7092
|
foundFirstBreak = true;
|
|
7246
|
-
return /* @__PURE__ */ (0,
|
|
7093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", {}, index);
|
|
7247
7094
|
} else {
|
|
7248
|
-
return /* @__PURE__ */ (0,
|
|
7095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
7249
7096
|
}
|
|
7250
7097
|
} else {
|
|
7251
7098
|
foundFirstBreak = false;
|
|
7252
|
-
return /* @__PURE__ */ (0,
|
|
7099
|
+
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);
|
|
7253
7100
|
}
|
|
7254
7101
|
}) });
|
|
7255
7102
|
};
|
|
7256
7103
|
var ListItemNode_default = ListItemNode;
|
|
7257
7104
|
|
|
7258
7105
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
7259
|
-
var
|
|
7106
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
7260
7107
|
var ListNode = (props) => {
|
|
7261
7108
|
const NodeTypes2 = {
|
|
7262
7109
|
listitem: ListItemNode_default
|
|
7263
7110
|
};
|
|
7264
|
-
return /* @__PURE__ */ (0,
|
|
7265
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
7111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_react50.default.Fragment, { children: [
|
|
7112
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7266
7113
|
const SelectedNode = NodeTypes2[node.type];
|
|
7267
|
-
return /* @__PURE__ */ (0,
|
|
7114
|
+
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);
|
|
7268
7115
|
}) }),
|
|
7269
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
7116
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7270
7117
|
const SelectedNode = NodeTypes2[node.type];
|
|
7271
|
-
return /* @__PURE__ */ (0,
|
|
7118
|
+
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);
|
|
7272
7119
|
}) })
|
|
7273
7120
|
] });
|
|
7274
7121
|
};
|
|
7275
7122
|
var ListNode_default = ListNode;
|
|
7276
7123
|
|
|
7277
7124
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
7278
|
-
var
|
|
7279
|
-
var
|
|
7125
|
+
var import_react51 = __toESM(require("react"));
|
|
7126
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
7280
7127
|
var QuoteNode = (props) => {
|
|
7281
7128
|
const NodeTypes2 = {
|
|
7282
7129
|
["text"]: TextNode_default,
|
|
7283
7130
|
["linebreak"]: LineBreakNode_default,
|
|
7284
7131
|
["link"]: LinkNode_default
|
|
7285
7132
|
};
|
|
7286
|
-
return /* @__PURE__ */ (0,
|
|
7133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7287
7134
|
const SelectedNode = NodeTypes2[node.type];
|
|
7288
|
-
return /* @__PURE__ */ (0,
|
|
7135
|
+
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);
|
|
7289
7136
|
}) });
|
|
7290
7137
|
};
|
|
7291
7138
|
var QuoteNode_default = QuoteNode;
|
|
7292
7139
|
|
|
7293
7140
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
7294
|
-
var
|
|
7141
|
+
var import_react53 = __toESM(require("react"));
|
|
7295
7142
|
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
7296
|
-
var
|
|
7143
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
7297
7144
|
var CopyButton2 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
7298
7145
|
ssr: false,
|
|
7299
7146
|
// optional: fallback UI while loading
|
|
7300
|
-
loading: () => /* @__PURE__ */ (0,
|
|
7147
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
7301
7148
|
});
|
|
7302
7149
|
var CodeNode = (props) => {
|
|
7303
7150
|
const NodeTypes2 = {
|
|
@@ -7311,14 +7158,14 @@ var CodeNode = (props) => {
|
|
|
7311
7158
|
if (node.type === "link") return node.text || node.url || "";
|
|
7312
7159
|
return "";
|
|
7313
7160
|
}).join("") ?? "";
|
|
7314
|
-
return /* @__PURE__ */ (0,
|
|
7315
|
-
/* @__PURE__ */ (0,
|
|
7316
|
-
/* @__PURE__ */ (0,
|
|
7317
|
-
/* @__PURE__ */ (0,
|
|
7161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { children: [
|
|
7162
|
+
/* @__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: [
|
|
7163
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: "Code Snippet" }),
|
|
7164
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(CopyButton2, { text: textContent })
|
|
7318
7165
|
] }),
|
|
7319
|
-
/* @__PURE__ */ (0,
|
|
7166
|
+
/* @__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) => {
|
|
7320
7167
|
const SelectedNode = NodeTypes2[node.type];
|
|
7321
|
-
return /* @__PURE__ */ (0,
|
|
7168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
7322
7169
|
SelectedNode,
|
|
7323
7170
|
{
|
|
7324
7171
|
node,
|
|
@@ -7333,15 +7180,15 @@ var CodeNode = (props) => {
|
|
|
7333
7180
|
var CodeNode_default = CodeNode;
|
|
7334
7181
|
|
|
7335
7182
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
7336
|
-
var
|
|
7183
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
7337
7184
|
var HorizontalRuleNode = () => {
|
|
7338
|
-
return /* @__PURE__ */ (0,
|
|
7185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("hr", {});
|
|
7339
7186
|
};
|
|
7340
7187
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
7341
7188
|
|
|
7342
7189
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
7343
|
-
var
|
|
7344
|
-
var
|
|
7190
|
+
var import_react54 = __toESM(require("react"));
|
|
7191
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
7345
7192
|
var WidgetNode = (props) => {
|
|
7346
7193
|
const getWidgetParameters = () => {
|
|
7347
7194
|
const widgetInputParameters = {
|
|
@@ -7405,7 +7252,7 @@ var WidgetNode = (props) => {
|
|
|
7405
7252
|
};
|
|
7406
7253
|
const widgetCode = props.node?.widgetCode;
|
|
7407
7254
|
if (!widgetCode) {
|
|
7408
|
-
return /* @__PURE__ */ (0,
|
|
7255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_jsx_runtime76.Fragment, { children: "Invalid widget" });
|
|
7409
7256
|
}
|
|
7410
7257
|
const widgetParams = getWidgetParameters();
|
|
7411
7258
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -7414,7 +7261,7 @@ var WidgetNode = (props) => {
|
|
|
7414
7261
|
}
|
|
7415
7262
|
return (
|
|
7416
7263
|
// eslint-disable-next-line react-hooks/static-components
|
|
7417
|
-
/* @__PURE__ */ (0,
|
|
7264
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7418
7265
|
WidgetRenderer,
|
|
7419
7266
|
{
|
|
7420
7267
|
params: widgetParams,
|
|
@@ -7432,11 +7279,11 @@ var WidgetNode_default = WidgetNode;
|
|
|
7432
7279
|
|
|
7433
7280
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
7434
7281
|
var import_dynamic13 = __toESM(require("next/dynamic"));
|
|
7435
|
-
var
|
|
7282
|
+
var import_react60 = __toESM(require("react"));
|
|
7436
7283
|
|
|
7437
7284
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
7438
7285
|
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
7439
|
-
var
|
|
7286
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7440
7287
|
var IframeClient2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
7441
7288
|
ssr: false
|
|
7442
7289
|
});
|
|
@@ -7449,7 +7296,7 @@ var EmbedNode = (props) => {
|
|
|
7449
7296
|
} else {
|
|
7450
7297
|
src = props.node.embedSrc;
|
|
7451
7298
|
}
|
|
7452
|
-
return /* @__PURE__ */ (0,
|
|
7299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(IframeClient2, { src }) });
|
|
7453
7300
|
};
|
|
7454
7301
|
var EmbedNode_default = EmbedNode;
|
|
7455
7302
|
|
|
@@ -7649,10 +7496,10 @@ var PathUtility = class {
|
|
|
7649
7496
|
var PathUtility_default = new PathUtility();
|
|
7650
7497
|
|
|
7651
7498
|
// src/components/NoDataFound.tsx
|
|
7652
|
-
var
|
|
7499
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7653
7500
|
var NoDataFound = () => {
|
|
7654
|
-
return /* @__PURE__ */ (0,
|
|
7655
|
-
/* @__PURE__ */ (0,
|
|
7501
|
+
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: [
|
|
7502
|
+
/* @__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)(
|
|
7656
7503
|
"svg",
|
|
7657
7504
|
{
|
|
7658
7505
|
className: "w-10 h-10",
|
|
@@ -7660,7 +7507,7 @@ var NoDataFound = () => {
|
|
|
7660
7507
|
stroke: "currentColor",
|
|
7661
7508
|
viewBox: "0 0 24 24",
|
|
7662
7509
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7663
|
-
children: /* @__PURE__ */ (0,
|
|
7510
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7664
7511
|
"path",
|
|
7665
7512
|
{
|
|
7666
7513
|
strokeLinecap: "round",
|
|
@@ -7671,8 +7518,8 @@ var NoDataFound = () => {
|
|
|
7671
7518
|
)
|
|
7672
7519
|
}
|
|
7673
7520
|
) }) }),
|
|
7674
|
-
/* @__PURE__ */ (0,
|
|
7675
|
-
/* @__PURE__ */ (0,
|
|
7521
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
7522
|
+
/* @__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." })
|
|
7676
7523
|
] });
|
|
7677
7524
|
};
|
|
7678
7525
|
var NoDataFound_default = NoDataFound;
|
|
@@ -7680,7 +7527,7 @@ var NoDataFound_default = NoDataFound;
|
|
|
7680
7527
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
7681
7528
|
init_AssetUtility();
|
|
7682
7529
|
var import_dynamic11 = __toESM(require("next/dynamic"));
|
|
7683
|
-
var
|
|
7530
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7684
7531
|
var HlsPlayer4 = (0, import_dynamic11.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
7685
7532
|
var deviceToMediaQuery = (device) => {
|
|
7686
7533
|
switch (device) {
|
|
@@ -7836,8 +7683,8 @@ var ImageGalleryNode = (props) => {
|
|
|
7836
7683
|
right: "justify-end"
|
|
7837
7684
|
};
|
|
7838
7685
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
7839
|
-
return /* @__PURE__ */ (0,
|
|
7840
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
7686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7687
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7841
7688
|
HlsPlayer4,
|
|
7842
7689
|
{
|
|
7843
7690
|
sources: hlsSources,
|
|
@@ -7852,7 +7699,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7852
7699
|
styles: hlsStyles
|
|
7853
7700
|
}
|
|
7854
7701
|
) }),
|
|
7855
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
7702
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("picture", { children: [
|
|
7856
7703
|
DEVICE_ORDER.map((deviceKey) => {
|
|
7857
7704
|
const match = staticSources.find(
|
|
7858
7705
|
(img) => img.device === deviceKey
|
|
@@ -7868,7 +7715,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7868
7715
|
if (!srcUrl) {
|
|
7869
7716
|
return null;
|
|
7870
7717
|
}
|
|
7871
|
-
return /* @__PURE__ */ (0,
|
|
7718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7872
7719
|
"source",
|
|
7873
7720
|
{
|
|
7874
7721
|
media: deviceToMediaQuery(match.device),
|
|
@@ -7893,7 +7740,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7893
7740
|
if (img.borderRadius) {
|
|
7894
7741
|
styles.borderRadius = img.borderRadius;
|
|
7895
7742
|
}
|
|
7896
|
-
return /* @__PURE__ */ (0,
|
|
7743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7897
7744
|
"img",
|
|
7898
7745
|
{
|
|
7899
7746
|
loading: "lazy",
|
|
@@ -7908,7 +7755,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7908
7755
|
})()
|
|
7909
7756
|
] }) : (
|
|
7910
7757
|
/* Case 2: Only device-specific images exist */
|
|
7911
|
-
/* @__PURE__ */ (0,
|
|
7758
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_jsx_runtime81.Fragment, { children: staticSources.map((img, index) => {
|
|
7912
7759
|
const resolved = resolveImage(img);
|
|
7913
7760
|
const imageUrl = resolved?.imageUrl;
|
|
7914
7761
|
if (!imageUrl) {
|
|
@@ -7935,7 +7782,7 @@ var ImageGalleryNode = (props) => {
|
|
|
7935
7782
|
default:
|
|
7936
7783
|
display = "block";
|
|
7937
7784
|
}
|
|
7938
|
-
return /* @__PURE__ */ (0,
|
|
7785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7939
7786
|
"img",
|
|
7940
7787
|
{
|
|
7941
7788
|
loading: "lazy",
|
|
@@ -8076,28 +7923,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
8076
7923
|
|
|
8077
7924
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
8078
7925
|
init_AssetUtility();
|
|
8079
|
-
var
|
|
7926
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8080
7927
|
var getNestedValue5 = (obj, path) => {
|
|
8081
7928
|
if (!obj || !path) return void 0;
|
|
8082
7929
|
return path.split(".").reduce((current, key) => {
|
|
8083
7930
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
8084
7931
|
}, obj);
|
|
8085
7932
|
};
|
|
8086
|
-
var PdfIcon2 = () => /* @__PURE__ */ (0,
|
|
7933
|
+
var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8087
7934
|
"svg",
|
|
8088
7935
|
{
|
|
8089
7936
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8090
7937
|
viewBox: "0 0 48 48",
|
|
8091
7938
|
className: "w-10 h-10",
|
|
8092
7939
|
children: [
|
|
8093
|
-
/* @__PURE__ */ (0,
|
|
7940
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8094
7941
|
"path",
|
|
8095
7942
|
{
|
|
8096
7943
|
fill: "#e53935",
|
|
8097
7944
|
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"
|
|
8098
7945
|
}
|
|
8099
7946
|
),
|
|
8100
|
-
/* @__PURE__ */ (0,
|
|
7947
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8101
7948
|
"path",
|
|
8102
7949
|
{
|
|
8103
7950
|
fill: "#fff",
|
|
@@ -8107,55 +7954,55 @@ var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8107
7954
|
]
|
|
8108
7955
|
}
|
|
8109
7956
|
);
|
|
8110
|
-
var ExcelIcon2 = () => /* @__PURE__ */ (0,
|
|
7957
|
+
var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8111
7958
|
"svg",
|
|
8112
7959
|
{
|
|
8113
7960
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8114
7961
|
viewBox: "0 0 48 48",
|
|
8115
7962
|
className: "w-10 h-10",
|
|
8116
7963
|
children: [
|
|
8117
|
-
/* @__PURE__ */ (0,
|
|
7964
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8118
7965
|
"path",
|
|
8119
7966
|
{
|
|
8120
7967
|
fill: "#169154",
|
|
8121
7968
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
8122
7969
|
}
|
|
8123
7970
|
),
|
|
8124
|
-
/* @__PURE__ */ (0,
|
|
7971
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8125
7972
|
"path",
|
|
8126
7973
|
{
|
|
8127
7974
|
fill: "#18482a",
|
|
8128
7975
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
8129
7976
|
}
|
|
8130
7977
|
),
|
|
8131
|
-
/* @__PURE__ */ (0,
|
|
8132
|
-
/* @__PURE__ */ (0,
|
|
8133
|
-
/* @__PURE__ */ (0,
|
|
8134
|
-
/* @__PURE__ */ (0,
|
|
7978
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
7979
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
7980
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("g", { children: [
|
|
7981
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8135
7982
|
"path",
|
|
8136
7983
|
{
|
|
8137
7984
|
fill: "#29c27f",
|
|
8138
7985
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
8139
7986
|
}
|
|
8140
7987
|
),
|
|
8141
|
-
/* @__PURE__ */ (0,
|
|
7988
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8142
7989
|
"path",
|
|
8143
7990
|
{
|
|
8144
7991
|
fill: "#27663f",
|
|
8145
7992
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
8146
7993
|
}
|
|
8147
7994
|
),
|
|
8148
|
-
/* @__PURE__ */ (0,
|
|
8149
|
-
/* @__PURE__ */ (0,
|
|
7995
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
7996
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
8150
7997
|
] }),
|
|
8151
|
-
/* @__PURE__ */ (0,
|
|
7998
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8152
7999
|
"path",
|
|
8153
8000
|
{
|
|
8154
8001
|
fill: "#0c7238",
|
|
8155
8002
|
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"
|
|
8156
8003
|
}
|
|
8157
8004
|
),
|
|
8158
|
-
/* @__PURE__ */ (0,
|
|
8005
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8159
8006
|
"path",
|
|
8160
8007
|
{
|
|
8161
8008
|
fill: "#fff",
|
|
@@ -8165,7 +8012,7 @@ var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8165
8012
|
]
|
|
8166
8013
|
}
|
|
8167
8014
|
);
|
|
8168
|
-
var WordIcon2 = () => /* @__PURE__ */ (0,
|
|
8015
|
+
var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8169
8016
|
"svg",
|
|
8170
8017
|
{
|
|
8171
8018
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8173,14 +8020,14 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8173
8020
|
className: "w-10 h-10",
|
|
8174
8021
|
baseProfile: "basic",
|
|
8175
8022
|
children: [
|
|
8176
|
-
/* @__PURE__ */ (0,
|
|
8023
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8177
8024
|
"path",
|
|
8178
8025
|
{
|
|
8179
8026
|
fill: "#283593",
|
|
8180
8027
|
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"
|
|
8181
8028
|
}
|
|
8182
8029
|
),
|
|
8183
|
-
/* @__PURE__ */ (0,
|
|
8030
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8184
8031
|
"linearGradient",
|
|
8185
8032
|
{
|
|
8186
8033
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -8191,19 +8038,19 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8191
8038
|
gradientTransform: "translate(0 -339.89)",
|
|
8192
8039
|
gradientUnits: "userSpaceOnUse",
|
|
8193
8040
|
children: [
|
|
8194
|
-
/* @__PURE__ */ (0,
|
|
8195
|
-
/* @__PURE__ */ (0,
|
|
8041
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
8042
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
8196
8043
|
]
|
|
8197
8044
|
}
|
|
8198
8045
|
),
|
|
8199
|
-
/* @__PURE__ */ (0,
|
|
8046
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8200
8047
|
"path",
|
|
8201
8048
|
{
|
|
8202
8049
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
8203
8050
|
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"
|
|
8204
8051
|
}
|
|
8205
8052
|
),
|
|
8206
|
-
/* @__PURE__ */ (0,
|
|
8053
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8207
8054
|
"path",
|
|
8208
8055
|
{
|
|
8209
8056
|
fill: "#1e88e5",
|
|
@@ -8211,21 +8058,21 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8211
8058
|
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"
|
|
8212
8059
|
}
|
|
8213
8060
|
),
|
|
8214
|
-
/* @__PURE__ */ (0,
|
|
8061
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8215
8062
|
"path",
|
|
8216
8063
|
{
|
|
8217
8064
|
fill: "#00e5ff",
|
|
8218
8065
|
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"
|
|
8219
8066
|
}
|
|
8220
8067
|
),
|
|
8221
|
-
/* @__PURE__ */ (0,
|
|
8068
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8222
8069
|
"path",
|
|
8223
8070
|
{
|
|
8224
8071
|
fill: "#1565c0",
|
|
8225
8072
|
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"
|
|
8226
8073
|
}
|
|
8227
8074
|
),
|
|
8228
|
-
/* @__PURE__ */ (0,
|
|
8075
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8229
8076
|
"path",
|
|
8230
8077
|
{
|
|
8231
8078
|
fill: "#fff",
|
|
@@ -8235,42 +8082,42 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8235
8082
|
]
|
|
8236
8083
|
}
|
|
8237
8084
|
);
|
|
8238
|
-
var StandardIcon2 = () => /* @__PURE__ */ (0,
|
|
8085
|
+
var StandardIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8239
8086
|
"svg",
|
|
8240
8087
|
{
|
|
8241
8088
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8242
8089
|
viewBox: "0 0 48 48",
|
|
8243
8090
|
className: "w-10 h-10",
|
|
8244
8091
|
children: [
|
|
8245
|
-
/* @__PURE__ */ (0,
|
|
8246
|
-
/* @__PURE__ */ (0,
|
|
8092
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
8093
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
8247
8094
|
]
|
|
8248
8095
|
}
|
|
8249
8096
|
);
|
|
8250
|
-
var PowerPointIcon2 = () => /* @__PURE__ */ (0,
|
|
8097
|
+
var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8251
8098
|
"svg",
|
|
8252
8099
|
{
|
|
8253
8100
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8254
8101
|
viewBox: "0 0 48 48",
|
|
8255
8102
|
className: "w-10 h-10",
|
|
8256
8103
|
children: [
|
|
8257
|
-
/* @__PURE__ */ (0,
|
|
8104
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8258
8105
|
"path",
|
|
8259
8106
|
{
|
|
8260
8107
|
fill: "#dc4c2c",
|
|
8261
8108
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
8262
8109
|
}
|
|
8263
8110
|
),
|
|
8264
|
-
/* @__PURE__ */ (0,
|
|
8265
|
-
/* @__PURE__ */ (0,
|
|
8266
|
-
/* @__PURE__ */ (0,
|
|
8111
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
8112
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
8113
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8267
8114
|
"path",
|
|
8268
8115
|
{
|
|
8269
8116
|
fill: "#9b341f",
|
|
8270
8117
|
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"
|
|
8271
8118
|
}
|
|
8272
8119
|
),
|
|
8273
|
-
/* @__PURE__ */ (0,
|
|
8120
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8274
8121
|
"path",
|
|
8275
8122
|
{
|
|
8276
8123
|
fill: "#fff",
|
|
@@ -8280,16 +8127,16 @@ var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8280
8127
|
]
|
|
8281
8128
|
}
|
|
8282
8129
|
);
|
|
8283
|
-
var TextIcon2 = () => /* @__PURE__ */ (0,
|
|
8130
|
+
var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8284
8131
|
"svg",
|
|
8285
8132
|
{
|
|
8286
8133
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8287
8134
|
viewBox: "0 0 48 48",
|
|
8288
8135
|
className: "w-10 h-10",
|
|
8289
8136
|
children: [
|
|
8290
|
-
/* @__PURE__ */ (0,
|
|
8291
|
-
/* @__PURE__ */ (0,
|
|
8292
|
-
/* @__PURE__ */ (0,
|
|
8137
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
8138
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
8139
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8293
8140
|
"path",
|
|
8294
8141
|
{
|
|
8295
8142
|
fill: "#1976D2",
|
|
@@ -8299,7 +8146,7 @@ var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8299
8146
|
]
|
|
8300
8147
|
}
|
|
8301
8148
|
);
|
|
8302
|
-
var ArchiveIcon2 = () => /* @__PURE__ */ (0,
|
|
8149
|
+
var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8303
8150
|
"svg",
|
|
8304
8151
|
{
|
|
8305
8152
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8309,14 +8156,14 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8309
8156
|
version: "1.0",
|
|
8310
8157
|
className: "w-10 h-10",
|
|
8311
8158
|
children: [
|
|
8312
|
-
/* @__PURE__ */ (0,
|
|
8159
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8313
8160
|
"path",
|
|
8314
8161
|
{
|
|
8315
8162
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
8316
8163
|
"clip-rule": "nonzero"
|
|
8317
8164
|
}
|
|
8318
8165
|
) }) }),
|
|
8319
|
-
/* @__PURE__ */ (0,
|
|
8166
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8320
8167
|
"path",
|
|
8321
8168
|
{
|
|
8322
8169
|
fill: "#ff9100",
|
|
@@ -8325,7 +8172,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8325
8172
|
"fill-rule": "nonzero"
|
|
8326
8173
|
}
|
|
8327
8174
|
) }),
|
|
8328
|
-
/* @__PURE__ */ (0,
|
|
8175
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8329
8176
|
"path",
|
|
8330
8177
|
{
|
|
8331
8178
|
fill: "#fbe9e7",
|
|
@@ -8334,7 +8181,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8334
8181
|
"fill-rule": "nonzero"
|
|
8335
8182
|
}
|
|
8336
8183
|
),
|
|
8337
|
-
/* @__PURE__ */ (0,
|
|
8184
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8338
8185
|
"path",
|
|
8339
8186
|
{
|
|
8340
8187
|
fill: "#ffe0b2",
|
|
@@ -8343,7 +8190,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8343
8190
|
"fill-rule": "nonzero"
|
|
8344
8191
|
}
|
|
8345
8192
|
),
|
|
8346
|
-
/* @__PURE__ */ (0,
|
|
8193
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8347
8194
|
"path",
|
|
8348
8195
|
{
|
|
8349
8196
|
fill: "#ffe0b2",
|
|
@@ -8352,7 +8199,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
|
8352
8199
|
"fill-rule": "nonzero"
|
|
8353
8200
|
}
|
|
8354
8201
|
),
|
|
8355
|
-
/* @__PURE__ */ (0,
|
|
8202
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8356
8203
|
"path",
|
|
8357
8204
|
{
|
|
8358
8205
|
fill: "#ffe0b2",
|
|
@@ -8427,8 +8274,8 @@ var DocumentNode = (props) => {
|
|
|
8427
8274
|
}
|
|
8428
8275
|
}
|
|
8429
8276
|
if (documents.length === 0) {
|
|
8430
|
-
return /* @__PURE__ */ (0,
|
|
8431
|
-
/* @__PURE__ */ (0,
|
|
8277
|
+
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: [
|
|
8278
|
+
/* @__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)(
|
|
8432
8279
|
"svg",
|
|
8433
8280
|
{
|
|
8434
8281
|
className: "w-5 h-5",
|
|
@@ -8436,7 +8283,7 @@ var DocumentNode = (props) => {
|
|
|
8436
8283
|
stroke: "currentColor",
|
|
8437
8284
|
viewBox: "0 0 24 24",
|
|
8438
8285
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8439
|
-
children: /* @__PURE__ */ (0,
|
|
8286
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8440
8287
|
"path",
|
|
8441
8288
|
{
|
|
8442
8289
|
strokeLinecap: "round",
|
|
@@ -8447,11 +8294,11 @@ var DocumentNode = (props) => {
|
|
|
8447
8294
|
)
|
|
8448
8295
|
}
|
|
8449
8296
|
) }),
|
|
8450
|
-
/* @__PURE__ */ (0,
|
|
8451
|
-
/* @__PURE__ */ (0,
|
|
8297
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
8298
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
8452
8299
|
] }) });
|
|
8453
8300
|
}
|
|
8454
|
-
return /* @__PURE__ */ (0,
|
|
8301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
8455
8302
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
8456
8303
|
props.assetBaseUrl,
|
|
8457
8304
|
doc.assetUrl
|
|
@@ -8469,16 +8316,16 @@ var DocumentNode = (props) => {
|
|
|
8469
8316
|
}
|
|
8470
8317
|
}
|
|
8471
8318
|
const { Icon: Icon2, extLabel } = getFileDetails2(documentUrl);
|
|
8472
|
-
return /* @__PURE__ */ (0,
|
|
8319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8473
8320
|
"div",
|
|
8474
8321
|
{
|
|
8475
8322
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
8476
8323
|
children: [
|
|
8477
|
-
/* @__PURE__ */ (0,
|
|
8478
|
-
/* @__PURE__ */ (0,
|
|
8479
|
-
/* @__PURE__ */ (0,
|
|
8324
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
8325
|
+
/* @__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, {}) }),
|
|
8326
|
+
/* @__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 }) })
|
|
8480
8327
|
] }),
|
|
8481
|
-
/* @__PURE__ */ (0,
|
|
8328
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8482
8329
|
"a",
|
|
8483
8330
|
{
|
|
8484
8331
|
href: documentUrl,
|
|
@@ -8486,7 +8333,7 @@ var DocumentNode = (props) => {
|
|
|
8486
8333
|
rel: "noopener noreferrer",
|
|
8487
8334
|
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",
|
|
8488
8335
|
children: [
|
|
8489
|
-
/* @__PURE__ */ (0,
|
|
8336
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8490
8337
|
"svg",
|
|
8491
8338
|
{
|
|
8492
8339
|
className: "w-4 h-4 mr-2",
|
|
@@ -8494,7 +8341,7 @@ var DocumentNode = (props) => {
|
|
|
8494
8341
|
stroke: "currentColor",
|
|
8495
8342
|
viewBox: "0 0 24 24",
|
|
8496
8343
|
children: [
|
|
8497
|
-
/* @__PURE__ */ (0,
|
|
8344
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8498
8345
|
"path",
|
|
8499
8346
|
{
|
|
8500
8347
|
strokeLinecap: "round",
|
|
@@ -8503,7 +8350,7 @@ var DocumentNode = (props) => {
|
|
|
8503
8350
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
8504
8351
|
}
|
|
8505
8352
|
),
|
|
8506
|
-
/* @__PURE__ */ (0,
|
|
8353
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8507
8354
|
"path",
|
|
8508
8355
|
{
|
|
8509
8356
|
strokeLinecap: "round",
|
|
@@ -8529,13 +8376,13 @@ var DocumentNode_default = DocumentNode;
|
|
|
8529
8376
|
|
|
8530
8377
|
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
8531
8378
|
var import_dynamic12 = __toESM(require("next/dynamic"));
|
|
8532
|
-
var
|
|
8379
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8533
8380
|
var IframeClient3 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
8534
8381
|
ssr: false
|
|
8535
8382
|
});
|
|
8536
8383
|
var GoogleMapNode = (props) => {
|
|
8537
8384
|
let src = props.node.embedUrl;
|
|
8538
|
-
return /* @__PURE__ */ (0,
|
|
8385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "google-map-container", children: src && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8539
8386
|
IframeClient3,
|
|
8540
8387
|
{
|
|
8541
8388
|
src,
|
|
@@ -8547,7 +8394,7 @@ var GoogleMapNode = (props) => {
|
|
|
8547
8394
|
var GoogleMapNode_default = GoogleMapNode;
|
|
8548
8395
|
|
|
8549
8396
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
8550
|
-
var
|
|
8397
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8551
8398
|
var Pagination2 = (0, import_dynamic13.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
8552
8399
|
var DataBindingControls2 = (0, import_dynamic13.default)(() => Promise.resolve().then(() => (init_DataBindingControls(), DataBindingControls_exports)), {
|
|
8553
8400
|
ssr: true
|
|
@@ -8788,7 +8635,8 @@ var DivContainer = async (props) => {
|
|
|
8788
8635
|
let result = null;
|
|
8789
8636
|
let response = null;
|
|
8790
8637
|
let childCollectionData = null;
|
|
8791
|
-
|
|
8638
|
+
let shouldShowNoDataMessage = props.forceNoDataMessage === true;
|
|
8639
|
+
if (dataBindingProperties && !shouldShowNoDataMessage) {
|
|
8792
8640
|
const serviceClient = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
8793
8641
|
endpoint = dataBindingProperties.dataSource;
|
|
8794
8642
|
{
|
|
@@ -8805,15 +8653,17 @@ var DivContainer = async (props) => {
|
|
|
8805
8653
|
}
|
|
8806
8654
|
response = await serviceClient.get(endpoint);
|
|
8807
8655
|
result = response?.result;
|
|
8808
|
-
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
8809
|
-
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(NoDataFound_default, {});
|
|
8810
|
-
}
|
|
8811
8656
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
8812
8657
|
childCollectionData = getNestedValue6(
|
|
8813
8658
|
props.dataitem,
|
|
8814
8659
|
dataBindingProperties.childCollectionName
|
|
8815
8660
|
);
|
|
8816
8661
|
}
|
|
8662
|
+
const effectiveResult = dataBindingProperties.childCollectionName ? childCollectionData : result;
|
|
8663
|
+
const hasNoData = effectiveResult === null || effectiveResult === void 0 || typeof effectiveResult === "string" && effectiveResult.trim() === "" || Array.isArray(effectiveResult) && effectiveResult.length === 0 || typeof effectiveResult === "object" && !Array.isArray(effectiveResult) && Object.keys(effectiveResult).length === 0;
|
|
8664
|
+
if (hasNoData && (props.node.repeatForEachItem === true || props.node.replicate === true)) {
|
|
8665
|
+
shouldShowNoDataMessage = dataBindingProperties.showNoResultsMessage;
|
|
8666
|
+
}
|
|
8817
8667
|
}
|
|
8818
8668
|
const cssResult = generateCssString(
|
|
8819
8669
|
guid,
|
|
@@ -8821,12 +8671,12 @@ var DivContainer = async (props) => {
|
|
|
8821
8671
|
tabletStyles,
|
|
8822
8672
|
mobileStyles
|
|
8823
8673
|
);
|
|
8824
|
-
function renderNode(node, props2, dataitem, key, href) {
|
|
8674
|
+
function renderNode(node, props2, dataitem, key, href, forceNoDataMessage = false) {
|
|
8825
8675
|
{
|
|
8826
8676
|
}
|
|
8827
8677
|
const SelectedNode = NodeTypes2[node.type];
|
|
8828
8678
|
if (!SelectedNode) return null;
|
|
8829
|
-
return /* @__PURE__ */ (0,
|
|
8679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react60.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8830
8680
|
SelectedNode,
|
|
8831
8681
|
{
|
|
8832
8682
|
node,
|
|
@@ -8842,7 +8692,8 @@ var DivContainer = async (props) => {
|
|
|
8842
8692
|
href,
|
|
8843
8693
|
assetBaseUrl: props2.assetBaseUrl,
|
|
8844
8694
|
device: props2.device,
|
|
8845
|
-
widgetRenderer: props2.widgetRenderer
|
|
8695
|
+
widgetRenderer: props2.widgetRenderer,
|
|
8696
|
+
forceNoDataMessage
|
|
8846
8697
|
}
|
|
8847
8698
|
) }, key);
|
|
8848
8699
|
}
|
|
@@ -8870,19 +8721,25 @@ var DivContainer = async (props) => {
|
|
|
8870
8721
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
8871
8722
|
});
|
|
8872
8723
|
}
|
|
8724
|
+
const arrayResult = result && props.node.dataBinding?.responseType === "array" && Array.isArray(result) ? result : null;
|
|
8725
|
+
const hasReplicatedChildren = Boolean(
|
|
8726
|
+
props.node.children?.some(
|
|
8727
|
+
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
8728
|
+
)
|
|
8729
|
+
);
|
|
8873
8730
|
const dataToRender = (() => {
|
|
8874
8731
|
if (childCollectionData && Array.isArray(childCollectionData)) {
|
|
8875
8732
|
return childCollectionData;
|
|
8876
8733
|
}
|
|
8877
|
-
if (
|
|
8878
|
-
return
|
|
8734
|
+
if (arrayResult && !hasReplicatedChildren) {
|
|
8735
|
+
return arrayResult;
|
|
8879
8736
|
}
|
|
8880
8737
|
if (result && props.node.dataBinding?.responseType === "object") {
|
|
8881
8738
|
return [result];
|
|
8882
8739
|
}
|
|
8883
8740
|
return [props.dataitem];
|
|
8884
8741
|
})();
|
|
8885
|
-
const backgroundDataItem = dataToRender.length > 0 ? dataToRender[0] : props.dataitem;
|
|
8742
|
+
const backgroundDataItem = hasReplicatedChildren && arrayResult && arrayResult.length > 0 ? arrayResult[0] : dataToRender.length > 0 ? dataToRender[0] : props.dataitem;
|
|
8886
8743
|
const background = generateCompleteBackgroundString(
|
|
8887
8744
|
props.node.backgroundLayers,
|
|
8888
8745
|
props.assetBaseUrl,
|
|
@@ -8897,6 +8754,52 @@ var DivContainer = async (props) => {
|
|
|
8897
8754
|
combinedStyles.backgroundClip = "text";
|
|
8898
8755
|
}
|
|
8899
8756
|
const renderLink = result && props.node.dataBinding?.responseType === "array" ? true : false;
|
|
8757
|
+
const renderContainerChildren = () => {
|
|
8758
|
+
if (!hasReplicatedChildren) {
|
|
8759
|
+
return dataToRender.map(
|
|
8760
|
+
(item, idx) => item?.links?.view && renderLink ? renderChildren2(
|
|
8761
|
+
props.node.children,
|
|
8762
|
+
props,
|
|
8763
|
+
item,
|
|
8764
|
+
idx,
|
|
8765
|
+
props.href ? void 0 : item?.links?.view
|
|
8766
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react60.default.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
8767
|
+
);
|
|
8768
|
+
}
|
|
8769
|
+
return props.node.children.flatMap((node, childIndex) => {
|
|
8770
|
+
if (node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)) {
|
|
8771
|
+
if (!arrayResult || arrayResult.length === 0) {
|
|
8772
|
+
return node?.dataBinding?.showNoResultsMessage ? [
|
|
8773
|
+
renderNode(
|
|
8774
|
+
node,
|
|
8775
|
+
props,
|
|
8776
|
+
props.dataitem,
|
|
8777
|
+
`no-results-${childIndex}`,
|
|
8778
|
+
void 0,
|
|
8779
|
+
true
|
|
8780
|
+
)
|
|
8781
|
+
] : [];
|
|
8782
|
+
}
|
|
8783
|
+
return arrayResult.map(
|
|
8784
|
+
(item, itemIndex) => renderNode(
|
|
8785
|
+
node,
|
|
8786
|
+
props,
|
|
8787
|
+
item,
|
|
8788
|
+
`replicated-${childIndex}-${itemIndex}`,
|
|
8789
|
+
item?.links?.view && !props.href ? item.links.view : void 0
|
|
8790
|
+
)
|
|
8791
|
+
);
|
|
8792
|
+
}
|
|
8793
|
+
return [
|
|
8794
|
+
renderNode(
|
|
8795
|
+
node,
|
|
8796
|
+
props,
|
|
8797
|
+
props.dataitem,
|
|
8798
|
+
`static-${childIndex}`
|
|
8799
|
+
)
|
|
8800
|
+
];
|
|
8801
|
+
});
|
|
8802
|
+
};
|
|
8900
8803
|
{
|
|
8901
8804
|
}
|
|
8902
8805
|
let Wrapper;
|
|
@@ -8963,25 +8866,17 @@ var DivContainer = async (props) => {
|
|
|
8963
8866
|
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
8964
8867
|
);
|
|
8965
8868
|
const WrapperComponent = Wrapper;
|
|
8966
|
-
const renderedContainer = /* @__PURE__ */ (0,
|
|
8869
|
+
const renderedContainer = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8967
8870
|
WrapperComponent,
|
|
8968
8871
|
{
|
|
8969
8872
|
id: guid,
|
|
8970
8873
|
style: combinedStyles,
|
|
8971
8874
|
className: classNames || void 0,
|
|
8972
8875
|
...wrapperProps,
|
|
8973
|
-
children:
|
|
8974
|
-
(item, idx) => item?.links?.view && renderLink ? renderChildren2(
|
|
8975
|
-
props.node.children,
|
|
8976
|
-
props,
|
|
8977
|
-
item,
|
|
8978
|
-
idx,
|
|
8979
|
-
props.href ? void 0 : item?.links?.view
|
|
8980
|
-
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react62.default.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
8981
|
-
)
|
|
8876
|
+
children: shouldShowNoDataMessage ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NoDataFound_default, {}) : renderContainerChildren()
|
|
8982
8877
|
}
|
|
8983
8878
|
);
|
|
8984
|
-
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0,
|
|
8879
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8985
8880
|
Pagination2,
|
|
8986
8881
|
{
|
|
8987
8882
|
path: props.path,
|
|
@@ -8989,15 +8884,15 @@ var DivContainer = async (props) => {
|
|
|
8989
8884
|
dataset: response
|
|
8990
8885
|
}
|
|
8991
8886
|
) : null;
|
|
8992
|
-
return /* @__PURE__ */ (0,
|
|
8993
|
-
/* @__PURE__ */ (0,
|
|
8887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react60.default.Fragment, { children: [
|
|
8888
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8994
8889
|
"style",
|
|
8995
8890
|
{
|
|
8996
8891
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
8997
8892
|
}
|
|
8998
8893
|
),
|
|
8999
|
-
showDataBindingControls ? /* @__PURE__ */ (0,
|
|
9000
|
-
/* @__PURE__ */ (0,
|
|
8894
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react60.default.Fragment, { children: [
|
|
8895
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9001
8896
|
DataBindingControls2,
|
|
9002
8897
|
{
|
|
9003
8898
|
mode: "toolbar",
|
|
@@ -9009,18 +8904,18 @@ var DivContainer = async (props) => {
|
|
|
9009
8904
|
showSearchBar: dataBindingProperties?.showSearchBar
|
|
9010
8905
|
}
|
|
9011
8906
|
),
|
|
9012
|
-
/* @__PURE__ */ (0,
|
|
8907
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9013
8908
|
"div",
|
|
9014
8909
|
{
|
|
9015
8910
|
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
9016
8911
|
children: [
|
|
9017
|
-
/* @__PURE__ */ (0,
|
|
8912
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "min-w-0", children: [
|
|
9018
8913
|
renderedContainer,
|
|
9019
8914
|
paginationControl
|
|
9020
8915
|
] }),
|
|
9021
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ (0,
|
|
9022
|
-
/* @__PURE__ */ (0,
|
|
9023
|
-
/* @__PURE__ */ (0,
|
|
8916
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
8917
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
8918
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9024
8919
|
DataBindingControls2,
|
|
9025
8920
|
{
|
|
9026
8921
|
mode: "facets",
|
|
@@ -9034,16 +8929,16 @@ var DivContainer = async (props) => {
|
|
|
9034
8929
|
]
|
|
9035
8930
|
}
|
|
9036
8931
|
)
|
|
9037
|
-
] }) : /* @__PURE__ */ (0,
|
|
8932
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react60.default.Fragment, { children: [
|
|
9038
8933
|
renderedContainer,
|
|
9039
|
-
paginationControl && /* @__PURE__ */ (0,
|
|
8934
|
+
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: paginationControl })
|
|
9040
8935
|
] })
|
|
9041
8936
|
] });
|
|
9042
8937
|
};
|
|
9043
8938
|
var DivContainer_default = DivContainer;
|
|
9044
8939
|
|
|
9045
8940
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
9046
|
-
var
|
|
8941
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
9047
8942
|
var NodeTypes = {
|
|
9048
8943
|
["paragraph"]: ParagraphNode_default,
|
|
9049
8944
|
["heading"]: HeadingNode_default,
|
|
@@ -9081,14 +8976,14 @@ var PageBodyRenderer = (props) => {
|
|
|
9081
8976
|
}
|
|
9082
8977
|
return true;
|
|
9083
8978
|
};
|
|
9084
|
-
return /* @__PURE__ */ (0,
|
|
8979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react61.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
9085
8980
|
{
|
|
9086
8981
|
}
|
|
9087
8982
|
const SelectedNode = NodeTypes[node.type];
|
|
9088
8983
|
if (!shouldRenderNode(node)) {
|
|
9089
8984
|
return null;
|
|
9090
8985
|
}
|
|
9091
|
-
return /* @__PURE__ */ (0,
|
|
8986
|
+
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)(
|
|
9092
8987
|
SelectedNode,
|
|
9093
8988
|
{
|
|
9094
8989
|
node,
|
|
@@ -9104,7 +8999,7 @@ var PageBodyRenderer = (props) => {
|
|
|
9104
8999
|
device: props.device,
|
|
9105
9000
|
widgetRenderer: props.widgetRenderer
|
|
9106
9001
|
}
|
|
9107
|
-
) }) : /* @__PURE__ */ (0,
|
|
9002
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react61.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9108
9003
|
SelectedNode,
|
|
9109
9004
|
{
|
|
9110
9005
|
node,
|
|
@@ -9125,10 +9020,10 @@ var PageBodyRenderer = (props) => {
|
|
|
9125
9020
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
9126
9021
|
|
|
9127
9022
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
9128
|
-
var
|
|
9023
|
+
var import_react62 = require("react");
|
|
9129
9024
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
9130
9025
|
function EnterAnimationHydrator() {
|
|
9131
|
-
(0,
|
|
9026
|
+
(0, import_react62.useEffect)(() => {
|
|
9132
9027
|
let observer;
|
|
9133
9028
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
9134
9029
|
const revealAnimatedElements = () => {
|
|
@@ -9173,22 +9068,22 @@ function EnterAnimationHydrator() {
|
|
|
9173
9068
|
}
|
|
9174
9069
|
|
|
9175
9070
|
// src/components/Toast.tsx
|
|
9176
|
-
var
|
|
9071
|
+
var import_react63 = require("react");
|
|
9177
9072
|
init_ToastService();
|
|
9178
|
-
var
|
|
9073
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9179
9074
|
var Toast = () => {
|
|
9180
|
-
const [showToast, setShowToast] = (0,
|
|
9181
|
-
const [message, setMessage] = (0,
|
|
9182
|
-
const [messageType, setMessageType] = (0,
|
|
9183
|
-
const timeoutRef = (0,
|
|
9184
|
-
const closeToast = (0,
|
|
9075
|
+
const [showToast, setShowToast] = (0, import_react63.useState)(false);
|
|
9076
|
+
const [message, setMessage] = (0, import_react63.useState)("");
|
|
9077
|
+
const [messageType, setMessageType] = (0, import_react63.useState)("error");
|
|
9078
|
+
const timeoutRef = (0, import_react63.useRef)(null);
|
|
9079
|
+
const closeToast = (0, import_react63.useCallback)(() => {
|
|
9185
9080
|
if (timeoutRef.current) {
|
|
9186
9081
|
clearTimeout(timeoutRef.current);
|
|
9187
9082
|
timeoutRef.current = null;
|
|
9188
9083
|
}
|
|
9189
9084
|
setShowToast(false);
|
|
9190
9085
|
}, []);
|
|
9191
|
-
const showMessage = (0,
|
|
9086
|
+
const showMessage = (0, import_react63.useCallback)((message2, messageType2) => {
|
|
9192
9087
|
if (timeoutRef.current) {
|
|
9193
9088
|
clearTimeout(timeoutRef.current);
|
|
9194
9089
|
}
|
|
@@ -9200,7 +9095,7 @@ var Toast = () => {
|
|
|
9200
9095
|
timeoutRef.current = null;
|
|
9201
9096
|
}, 4e3);
|
|
9202
9097
|
}, []);
|
|
9203
|
-
(0,
|
|
9098
|
+
(0, import_react63.useEffect)(() => {
|
|
9204
9099
|
ToastService_default.initialize(showMessage, closeToast);
|
|
9205
9100
|
return () => {
|
|
9206
9101
|
closeToast();
|
|
@@ -9209,8 +9104,8 @@ var Toast = () => {
|
|
|
9209
9104
|
});
|
|
9210
9105
|
};
|
|
9211
9106
|
}, [closeToast, showMessage]);
|
|
9212
|
-
return /* @__PURE__ */ (0,
|
|
9213
|
-
/* @__PURE__ */ (0,
|
|
9107
|
+
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: [
|
|
9108
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9214
9109
|
"span",
|
|
9215
9110
|
{
|
|
9216
9111
|
className: "font-medium text-inherit text-sm",
|
|
@@ -9218,7 +9113,7 @@ var Toast = () => {
|
|
|
9218
9113
|
children: message
|
|
9219
9114
|
}
|
|
9220
9115
|
),
|
|
9221
|
-
/* @__PURE__ */ (0,
|
|
9116
|
+
/* @__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)(
|
|
9222
9117
|
"svg",
|
|
9223
9118
|
{
|
|
9224
9119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9226,7 +9121,7 @@ var Toast = () => {
|
|
|
9226
9121
|
fill: "none",
|
|
9227
9122
|
viewBox: "0 0 24 24",
|
|
9228
9123
|
stroke: "currentColor",
|
|
9229
|
-
children: /* @__PURE__ */ (0,
|
|
9124
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
9230
9125
|
}
|
|
9231
9126
|
) })
|
|
9232
9127
|
] }) }) });
|
|
@@ -9246,18 +9141,16 @@ init_CheckboxInput();
|
|
|
9246
9141
|
init_OtpInput();
|
|
9247
9142
|
init_DateTimeInput();
|
|
9248
9143
|
init_ColorInput();
|
|
9249
|
-
init_BooleanSelect();
|
|
9250
9144
|
init_Select();
|
|
9251
9145
|
init_EmailInput();
|
|
9252
9146
|
init_TimeInput();
|
|
9253
9147
|
init_DateInput();
|
|
9254
9148
|
init_RadioInput();
|
|
9255
|
-
init_Switcher();
|
|
9256
9149
|
|
|
9257
9150
|
// src/components/NavigationTabsV2.tsx
|
|
9258
9151
|
var import_link3 = __toESM(require("next/link"));
|
|
9259
9152
|
var import_navigation2 = require("next/navigation");
|
|
9260
|
-
var
|
|
9153
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
9261
9154
|
function resolveRoutePlaceholders(route, params) {
|
|
9262
9155
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
9263
9156
|
const value = params[key];
|
|
@@ -9282,8 +9175,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
9282
9175
|
isActive: tab.isActive
|
|
9283
9176
|
})) || [];
|
|
9284
9177
|
if (mappedTabs.length === 0) return null;
|
|
9285
|
-
return /* @__PURE__ */ (0,
|
|
9286
|
-
return /* @__PURE__ */ (0,
|
|
9178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
9179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
9287
9180
|
"div",
|
|
9288
9181
|
{
|
|
9289
9182
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -9296,15 +9189,15 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
9296
9189
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
9297
9190
|
|
|
9298
9191
|
// src/components/dataForm/DataList.tsx
|
|
9299
|
-
var
|
|
9192
|
+
var import_react66 = __toESM(require("react"));
|
|
9300
9193
|
init_InputControl();
|
|
9301
9194
|
var import_navigation3 = require("next/navigation");
|
|
9302
9195
|
|
|
9303
9196
|
// src/components/dataForm/NoContentView.tsx
|
|
9304
|
-
var
|
|
9305
|
-
var
|
|
9197
|
+
var import_react64 = __toESM(require("react"));
|
|
9198
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
9306
9199
|
var NoContentView = (props) => {
|
|
9307
|
-
return /* @__PURE__ */ (0,
|
|
9200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react64.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
9308
9201
|
};
|
|
9309
9202
|
var NoContentView_default = NoContentView;
|
|
9310
9203
|
|
|
@@ -9312,39 +9205,39 @@ var NoContentView_default = NoContentView;
|
|
|
9312
9205
|
init_InputControlType();
|
|
9313
9206
|
|
|
9314
9207
|
// src/components/dataForm/ContentView.tsx
|
|
9315
|
-
var
|
|
9316
|
-
var
|
|
9208
|
+
var import_react65 = __toESM(require("react"));
|
|
9209
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
9317
9210
|
var ContentView = (props) => {
|
|
9318
|
-
return /* @__PURE__ */ (0,
|
|
9319
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
9320
|
-
/* @__PURE__ */ (0,
|
|
9321
|
-
/* @__PURE__ */ (0,
|
|
9322
|
-
/* @__PURE__ */ (0,
|
|
9323
|
-
/* @__PURE__ */ (0,
|
|
9324
|
-
/* @__PURE__ */ (0,
|
|
9211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_react65.default.Fragment, { children: [
|
|
9212
|
+
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: [
|
|
9213
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
9214
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
9215
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "ml-2", children: [
|
|
9216
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
9217
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
9325
9218
|
] })
|
|
9326
9219
|
] }),
|
|
9327
|
-
/* @__PURE__ */ (0,
|
|
9328
|
-
/* @__PURE__ */ (0,
|
|
9329
|
-
/* @__PURE__ */ (0,
|
|
9330
|
-
/* @__PURE__ */ (0,
|
|
9331
|
-
/* @__PURE__ */ (0,
|
|
9332
|
-
/* @__PURE__ */ (0,
|
|
9333
|
-
/* @__PURE__ */ (0,
|
|
9220
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
9221
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "animate-pulse", children: [
|
|
9222
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
9223
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
9224
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
9225
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
9226
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
9334
9227
|
] }),
|
|
9335
|
-
/* @__PURE__ */ (0,
|
|
9336
|
-
/* @__PURE__ */ (0,
|
|
9337
|
-
/* @__PURE__ */ (0,
|
|
9338
|
-
/* @__PURE__ */ (0,
|
|
9339
|
-
/* @__PURE__ */ (0,
|
|
9340
|
-
/* @__PURE__ */ (0,
|
|
9228
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "animate-pulse", children: [
|
|
9229
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
9230
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
9231
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
9232
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
9233
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
9341
9234
|
] }),
|
|
9342
|
-
/* @__PURE__ */ (0,
|
|
9343
|
-
/* @__PURE__ */ (0,
|
|
9344
|
-
/* @__PURE__ */ (0,
|
|
9345
|
-
/* @__PURE__ */ (0,
|
|
9346
|
-
/* @__PURE__ */ (0,
|
|
9347
|
-
/* @__PURE__ */ (0,
|
|
9235
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "animate-pulse", children: [
|
|
9236
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
9237
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
9238
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
9239
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
9240
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
9348
9241
|
] })
|
|
9349
9242
|
] })
|
|
9350
9243
|
] }) }),
|
|
@@ -9404,7 +9297,7 @@ function FormReducer(state, action) {
|
|
|
9404
9297
|
var FormReducer_default = FormReducer;
|
|
9405
9298
|
|
|
9406
9299
|
// src/components/dataForm/DataList.tsx
|
|
9407
|
-
var
|
|
9300
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
9408
9301
|
var DataList = (props) => {
|
|
9409
9302
|
const router = (0, import_navigation3.useRouter)();
|
|
9410
9303
|
let builder = new OdataBuilder(props.path);
|
|
@@ -9412,12 +9305,12 @@ var DataList = (props) => {
|
|
|
9412
9305
|
let activePageNumber = 0;
|
|
9413
9306
|
let pages = 0;
|
|
9414
9307
|
console.log(props.addLinkText);
|
|
9415
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
9416
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
9417
|
-
(0,
|
|
9308
|
+
const [isDataFound, setIsDataFound] = (0, import_react66.useState)(null);
|
|
9309
|
+
const [searchTerm, setSearchTerm] = (0, import_react66.useState)(props.query?.searchTerm ?? "");
|
|
9310
|
+
(0, import_react66.useEffect)(() => {
|
|
9418
9311
|
setSearchTerm(props.query?.searchTerm ?? "");
|
|
9419
9312
|
}, [props.query?.searchTerm]);
|
|
9420
|
-
(0,
|
|
9313
|
+
(0, import_react66.useEffect)(() => {
|
|
9421
9314
|
if (props?.dataset) {
|
|
9422
9315
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
9423
9316
|
setIsDataFound(true);
|
|
@@ -9426,7 +9319,7 @@ var DataList = (props) => {
|
|
|
9426
9319
|
}
|
|
9427
9320
|
}
|
|
9428
9321
|
}, [props.dataset]);
|
|
9429
|
-
(0,
|
|
9322
|
+
(0, import_react66.useEffect)(() => {
|
|
9430
9323
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
9431
9324
|
const filterQuery = props.query["$filter"];
|
|
9432
9325
|
props.filters.forEach((filter) => {
|
|
@@ -9445,7 +9338,7 @@ var DataList = (props) => {
|
|
|
9445
9338
|
if (path.includes(".")) {
|
|
9446
9339
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
9447
9340
|
} else if (Array.isArray(obj[path])) {
|
|
9448
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
9341
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { children: item }, index));
|
|
9449
9342
|
} else {
|
|
9450
9343
|
return obj[path];
|
|
9451
9344
|
}
|
|
@@ -9454,11 +9347,11 @@ var DataList = (props) => {
|
|
|
9454
9347
|
inputValues: {},
|
|
9455
9348
|
lastPropertyChanged: ""
|
|
9456
9349
|
};
|
|
9457
|
-
const [formState, dispatch] = (0,
|
|
9350
|
+
const [formState, dispatch] = (0, import_react66.useReducer)(FormReducer_default, initialState);
|
|
9458
9351
|
const getSearchableColumns = () => {
|
|
9459
9352
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
9460
9353
|
};
|
|
9461
|
-
const handleFilterChange = (0,
|
|
9354
|
+
const handleFilterChange = (0, import_react66.useCallback)(
|
|
9462
9355
|
(updatedValues) => {
|
|
9463
9356
|
dispatch({
|
|
9464
9357
|
type: FORM_INPUT_UPDATE,
|
|
@@ -9489,7 +9382,7 @@ var DataList = (props) => {
|
|
|
9489
9382
|
},
|
|
9490
9383
|
[dispatch, props, router]
|
|
9491
9384
|
);
|
|
9492
|
-
(0,
|
|
9385
|
+
(0, import_react66.useEffect)(() => {
|
|
9493
9386
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
9494
9387
|
return;
|
|
9495
9388
|
}
|
|
@@ -9527,30 +9420,30 @@ var DataList = (props) => {
|
|
|
9527
9420
|
const renderPageNumbers = () => {
|
|
9528
9421
|
if (pages <= 10) {
|
|
9529
9422
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
9530
|
-
(page) => /* @__PURE__ */ (0,
|
|
9423
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9531
9424
|
Hyperlink,
|
|
9532
9425
|
{
|
|
9533
9426
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
9534
9427
|
href: builder.getNewPageUrl(page),
|
|
9535
9428
|
children: page
|
|
9536
9429
|
}
|
|
9537
|
-
) : /* @__PURE__ */ (0,
|
|
9430
|
+
) : /* @__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)
|
|
9538
9431
|
);
|
|
9539
9432
|
} else {
|
|
9540
9433
|
const showFirstPages = activePageNumber <= 5;
|
|
9541
9434
|
const showLastPages = activePageNumber > pages - 5;
|
|
9542
9435
|
if (showFirstPages) {
|
|
9543
|
-
return /* @__PURE__ */ (0,
|
|
9544
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
9436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9437
|
+
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)(
|
|
9545
9438
|
Hyperlink,
|
|
9546
9439
|
{
|
|
9547
9440
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
9548
9441
|
href: builder.getNewPageUrl(page),
|
|
9549
9442
|
children: page
|
|
9550
9443
|
}
|
|
9551
|
-
) : /* @__PURE__ */ (0,
|
|
9552
|
-
/* @__PURE__ */ (0,
|
|
9553
|
-
/* @__PURE__ */ (0,
|
|
9444
|
+
) : /* @__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)),
|
|
9445
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9446
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9554
9447
|
Hyperlink,
|
|
9555
9448
|
{
|
|
9556
9449
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9558,7 +9451,7 @@ var DataList = (props) => {
|
|
|
9558
9451
|
children: pages - 1
|
|
9559
9452
|
}
|
|
9560
9453
|
),
|
|
9561
|
-
/* @__PURE__ */ (0,
|
|
9454
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9562
9455
|
Hyperlink,
|
|
9563
9456
|
{
|
|
9564
9457
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9566,7 +9459,7 @@ var DataList = (props) => {
|
|
|
9566
9459
|
children: pages
|
|
9567
9460
|
}
|
|
9568
9461
|
),
|
|
9569
|
-
/* @__PURE__ */ (0,
|
|
9462
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9570
9463
|
"select",
|
|
9571
9464
|
{
|
|
9572
9465
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -9578,18 +9471,18 @@ var DataList = (props) => {
|
|
|
9578
9471
|
}
|
|
9579
9472
|
},
|
|
9580
9473
|
children: [
|
|
9581
|
-
/* @__PURE__ */ (0,
|
|
9474
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
9582
9475
|
Array.from(
|
|
9583
9476
|
{ length: Math.max(0, pages - 10) },
|
|
9584
9477
|
(_, index) => index + 9
|
|
9585
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
9478
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("option", { value: page, children: page }, page))
|
|
9586
9479
|
]
|
|
9587
9480
|
}
|
|
9588
9481
|
) })
|
|
9589
9482
|
] });
|
|
9590
9483
|
} else if (showLastPages) {
|
|
9591
|
-
return /* @__PURE__ */ (0,
|
|
9592
|
-
/* @__PURE__ */ (0,
|
|
9484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9485
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9593
9486
|
Hyperlink,
|
|
9594
9487
|
{
|
|
9595
9488
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9597,7 +9490,7 @@ var DataList = (props) => {
|
|
|
9597
9490
|
children: "1"
|
|
9598
9491
|
}
|
|
9599
9492
|
),
|
|
9600
|
-
/* @__PURE__ */ (0,
|
|
9493
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9601
9494
|
Hyperlink,
|
|
9602
9495
|
{
|
|
9603
9496
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9605,21 +9498,21 @@ var DataList = (props) => {
|
|
|
9605
9498
|
children: "2"
|
|
9606
9499
|
}
|
|
9607
9500
|
),
|
|
9608
|
-
/* @__PURE__ */ (0,
|
|
9501
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9609
9502
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
9610
|
-
(page) => /* @__PURE__ */ (0,
|
|
9503
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9611
9504
|
Hyperlink,
|
|
9612
9505
|
{
|
|
9613
9506
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
9614
9507
|
href: builder.getNewPageUrl(page),
|
|
9615
9508
|
children: page
|
|
9616
9509
|
}
|
|
9617
|
-
) : /* @__PURE__ */ (0,
|
|
9510
|
+
) : /* @__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)
|
|
9618
9511
|
)
|
|
9619
9512
|
] });
|
|
9620
9513
|
} else {
|
|
9621
|
-
return /* @__PURE__ */ (0,
|
|
9622
|
-
/* @__PURE__ */ (0,
|
|
9514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9515
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9623
9516
|
Hyperlink,
|
|
9624
9517
|
{
|
|
9625
9518
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9627,7 +9520,7 @@ var DataList = (props) => {
|
|
|
9627
9520
|
children: "1"
|
|
9628
9521
|
}
|
|
9629
9522
|
),
|
|
9630
|
-
/* @__PURE__ */ (0,
|
|
9523
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9631
9524
|
Hyperlink,
|
|
9632
9525
|
{
|
|
9633
9526
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9635,20 +9528,20 @@ var DataList = (props) => {
|
|
|
9635
9528
|
children: "2"
|
|
9636
9529
|
}
|
|
9637
9530
|
),
|
|
9638
|
-
/* @__PURE__ */ (0,
|
|
9531
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9639
9532
|
Array.from(
|
|
9640
9533
|
{ length: 5 },
|
|
9641
9534
|
(_, index) => activePageNumber - 2 + index
|
|
9642
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
9535
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9643
9536
|
Hyperlink,
|
|
9644
9537
|
{
|
|
9645
9538
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
9646
9539
|
href: builder.getNewPageUrl(page),
|
|
9647
9540
|
children: page
|
|
9648
9541
|
}
|
|
9649
|
-
) : /* @__PURE__ */ (0,
|
|
9650
|
-
/* @__PURE__ */ (0,
|
|
9651
|
-
/* @__PURE__ */ (0,
|
|
9542
|
+
) : /* @__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)),
|
|
9543
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9544
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9652
9545
|
Hyperlink,
|
|
9653
9546
|
{
|
|
9654
9547
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9656,7 +9549,7 @@ var DataList = (props) => {
|
|
|
9656
9549
|
children: pages - 1
|
|
9657
9550
|
}
|
|
9658
9551
|
),
|
|
9659
|
-
/* @__PURE__ */ (0,
|
|
9552
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9660
9553
|
Hyperlink,
|
|
9661
9554
|
{
|
|
9662
9555
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9664,7 +9557,7 @@ var DataList = (props) => {
|
|
|
9664
9557
|
children: pages
|
|
9665
9558
|
}
|
|
9666
9559
|
),
|
|
9667
|
-
/* @__PURE__ */ (0,
|
|
9560
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9668
9561
|
"select",
|
|
9669
9562
|
{
|
|
9670
9563
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -9676,8 +9569,8 @@ var DataList = (props) => {
|
|
|
9676
9569
|
}
|
|
9677
9570
|
},
|
|
9678
9571
|
children: [
|
|
9679
|
-
/* @__PURE__ */ (0,
|
|
9680
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
9572
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("option", { value: "", children: "Jump to" }),
|
|
9573
|
+
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))
|
|
9681
9574
|
]
|
|
9682
9575
|
}
|
|
9683
9576
|
) })
|
|
@@ -9685,16 +9578,16 @@ var DataList = (props) => {
|
|
|
9685
9578
|
}
|
|
9686
9579
|
}
|
|
9687
9580
|
};
|
|
9688
|
-
return /* @__PURE__ */ (0,
|
|
9689
|
-
/* @__PURE__ */ (0,
|
|
9690
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
9581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_react66.default.Fragment, { children: [
|
|
9582
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(ContentView_default, { isDataFound, children: [
|
|
9583
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9691
9584
|
"div",
|
|
9692
9585
|
{
|
|
9693
9586
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
9694
9587
|
children: [
|
|
9695
|
-
props.title ? /* @__PURE__ */ (0,
|
|
9696
|
-
/* @__PURE__ */ (0,
|
|
9697
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
9588
|
+
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", {}),
|
|
9589
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
9590
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9698
9591
|
InputControl_default,
|
|
9699
9592
|
{
|
|
9700
9593
|
name: "Search_input",
|
|
@@ -9702,11 +9595,12 @@ var DataList = (props) => {
|
|
|
9702
9595
|
value: searchTerm,
|
|
9703
9596
|
callback: (e) => setSearchTerm(e.value),
|
|
9704
9597
|
attributes: {
|
|
9598
|
+
autoFocus: true,
|
|
9705
9599
|
placeholder: `Search by ${props.columns.filter((col) => col.isSearchable).map((col) => col.label).join(", ")}`
|
|
9706
9600
|
}
|
|
9707
9601
|
}
|
|
9708
9602
|
),
|
|
9709
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
9603
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9710
9604
|
InputControl_default,
|
|
9711
9605
|
{
|
|
9712
9606
|
name: filter.name,
|
|
@@ -9721,15 +9615,15 @@ var DataList = (props) => {
|
|
|
9721
9615
|
},
|
|
9722
9616
|
filter.name
|
|
9723
9617
|
)),
|
|
9724
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
9618
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9725
9619
|
Hyperlink,
|
|
9726
9620
|
{
|
|
9727
9621
|
className: "gap-1",
|
|
9728
9622
|
linkType: "Primary" /* Solid */,
|
|
9729
9623
|
href: props.addLinkHref,
|
|
9730
9624
|
children: [
|
|
9731
|
-
/* @__PURE__ */ (0,
|
|
9732
|
-
/* @__PURE__ */ (0,
|
|
9625
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
9626
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
9733
9627
|
]
|
|
9734
9628
|
}
|
|
9735
9629
|
)
|
|
@@ -9737,8 +9631,8 @@ var DataList = (props) => {
|
|
|
9737
9631
|
]
|
|
9738
9632
|
}
|
|
9739
9633
|
),
|
|
9740
|
-
/* @__PURE__ */ (0,
|
|
9741
|
-
/* @__PURE__ */ (0,
|
|
9634
|
+
/* @__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: [
|
|
9635
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("tr", { children: [
|
|
9742
9636
|
props?.columns?.map((column) => {
|
|
9743
9637
|
let url = builder.getNewOrderByUrl(column.name);
|
|
9744
9638
|
let icon = "chevronUpDown";
|
|
@@ -9749,18 +9643,18 @@ var DataList = (props) => {
|
|
|
9749
9643
|
icon = "chevronUp";
|
|
9750
9644
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
9751
9645
|
}
|
|
9752
|
-
return /* @__PURE__ */ (0,
|
|
9646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9753
9647
|
"th",
|
|
9754
9648
|
{
|
|
9755
9649
|
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" : ""),
|
|
9756
|
-
children: /* @__PURE__ */ (0,
|
|
9650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9757
9651
|
Hyperlink,
|
|
9758
9652
|
{
|
|
9759
9653
|
href: column.enableSorting ? url : void 0,
|
|
9760
9654
|
className: "!text-neutral-contrast ",
|
|
9761
|
-
children: /* @__PURE__ */ (0,
|
|
9762
|
-
/* @__PURE__ */ (0,
|
|
9763
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
9655
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
9656
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-black", children: column.label }),
|
|
9657
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
9764
9658
|
] })
|
|
9765
9659
|
}
|
|
9766
9660
|
)
|
|
@@ -9768,25 +9662,25 @@ var DataList = (props) => {
|
|
|
9768
9662
|
column.name
|
|
9769
9663
|
);
|
|
9770
9664
|
}),
|
|
9771
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
9665
|
+
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" })
|
|
9772
9666
|
] }) }),
|
|
9773
|
-
/* @__PURE__ */ (0,
|
|
9667
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
9774
9668
|
let validityClass = "";
|
|
9775
9669
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
9776
9670
|
validityClass = "bg-alert-200";
|
|
9777
9671
|
}
|
|
9778
|
-
return /* @__PURE__ */ (0,
|
|
9672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("tr", { className: validityClass, children: [
|
|
9779
9673
|
props?.columns?.map((column, colindex) => {
|
|
9780
|
-
return /* @__PURE__ */ (0,
|
|
9674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react66.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9781
9675
|
"td",
|
|
9782
9676
|
{
|
|
9783
9677
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
9784
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
9678
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9785
9679
|
Hyperlink,
|
|
9786
9680
|
{
|
|
9787
9681
|
className: "",
|
|
9788
9682
|
href: `https://${dataitem[column.name]}`,
|
|
9789
|
-
children: /* @__PURE__ */ (0,
|
|
9683
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9790
9684
|
ViewControl_default,
|
|
9791
9685
|
{
|
|
9792
9686
|
controlType: column.controlType,
|
|
@@ -9799,11 +9693,11 @@ var DataList = (props) => {
|
|
|
9799
9693
|
}
|
|
9800
9694
|
)
|
|
9801
9695
|
}
|
|
9802
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
9696
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9803
9697
|
Hyperlink,
|
|
9804
9698
|
{
|
|
9805
9699
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
9806
|
-
children: /* @__PURE__ */ (0,
|
|
9700
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9807
9701
|
ViewControl_default,
|
|
9808
9702
|
{
|
|
9809
9703
|
controlType: column.controlType,
|
|
@@ -9813,7 +9707,7 @@ var DataList = (props) => {
|
|
|
9813
9707
|
}
|
|
9814
9708
|
)
|
|
9815
9709
|
}
|
|
9816
|
-
) : /* @__PURE__ */ (0,
|
|
9710
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9817
9711
|
ViewControl_default,
|
|
9818
9712
|
{
|
|
9819
9713
|
controlType: column.controlType,
|
|
@@ -9825,7 +9719,7 @@ var DataList = (props) => {
|
|
|
9825
9719
|
}
|
|
9826
9720
|
) }, colindex);
|
|
9827
9721
|
}),
|
|
9828
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
9722
|
+
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)(
|
|
9829
9723
|
"button",
|
|
9830
9724
|
{
|
|
9831
9725
|
type: "button",
|
|
@@ -9835,7 +9729,7 @@ var DataList = (props) => {
|
|
|
9835
9729
|
},
|
|
9836
9730
|
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",
|
|
9837
9731
|
children: [
|
|
9838
|
-
/* @__PURE__ */ (0,
|
|
9732
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9839
9733
|
"svg",
|
|
9840
9734
|
{
|
|
9841
9735
|
className: "w-3.5 h-3.5",
|
|
@@ -9846,22 +9740,22 @@ var DataList = (props) => {
|
|
|
9846
9740
|
strokeLinecap: "round",
|
|
9847
9741
|
strokeLinejoin: "round",
|
|
9848
9742
|
children: [
|
|
9849
|
-
/* @__PURE__ */ (0,
|
|
9850
|
-
/* @__PURE__ */ (0,
|
|
9743
|
+
/* @__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" }),
|
|
9744
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
9851
9745
|
]
|
|
9852
9746
|
}
|
|
9853
9747
|
),
|
|
9854
|
-
/* @__PURE__ */ (0,
|
|
9748
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: props.quickViewLabel || "Quick View" })
|
|
9855
9749
|
]
|
|
9856
9750
|
}
|
|
9857
9751
|
) })
|
|
9858
9752
|
] }, index);
|
|
9859
9753
|
}) })
|
|
9860
9754
|
] }) }),
|
|
9861
|
-
/* @__PURE__ */ (0,
|
|
9862
|
-
/* @__PURE__ */ (0,
|
|
9863
|
-
/* @__PURE__ */ (0,
|
|
9864
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
9755
|
+
/* @__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: [
|
|
9756
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "text-gray-700", children: label }),
|
|
9757
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
9758
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9865
9759
|
Hyperlink,
|
|
9866
9760
|
{
|
|
9867
9761
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -9869,9 +9763,9 @@ var DataList = (props) => {
|
|
|
9869
9763
|
children: "Prev"
|
|
9870
9764
|
}
|
|
9871
9765
|
),
|
|
9872
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
9766
|
+
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" }),
|
|
9873
9767
|
renderPageNumbers(),
|
|
9874
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
9768
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9875
9769
|
Hyperlink,
|
|
9876
9770
|
{
|
|
9877
9771
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -9879,19 +9773,19 @@ var DataList = (props) => {
|
|
|
9879
9773
|
children: "Next"
|
|
9880
9774
|
}
|
|
9881
9775
|
),
|
|
9882
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
9776
|
+
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" })
|
|
9883
9777
|
] })
|
|
9884
9778
|
] }) })
|
|
9885
9779
|
] }),
|
|
9886
|
-
/* @__PURE__ */ (0,
|
|
9887
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
9780
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
9781
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9888
9782
|
"div",
|
|
9889
9783
|
{
|
|
9890
9784
|
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`,
|
|
9891
9785
|
children: [
|
|
9892
|
-
props.title ? /* @__PURE__ */ (0,
|
|
9893
|
-
/* @__PURE__ */ (0,
|
|
9894
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
9786
|
+
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", {}),
|
|
9787
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
9788
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9895
9789
|
InputControl_default,
|
|
9896
9790
|
{
|
|
9897
9791
|
name: "Search_input",
|
|
@@ -9899,11 +9793,12 @@ var DataList = (props) => {
|
|
|
9899
9793
|
value: searchTerm,
|
|
9900
9794
|
callback: (e) => setSearchTerm(e.value),
|
|
9901
9795
|
attributes: {
|
|
9796
|
+
autoFocus: true,
|
|
9902
9797
|
placeholder: `Search by ${props.columns.filter((col) => col.isSearchable).map((col) => col.label).join(", ")}`
|
|
9903
9798
|
}
|
|
9904
9799
|
}
|
|
9905
9800
|
),
|
|
9906
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
9801
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9907
9802
|
InputControl_default,
|
|
9908
9803
|
{
|
|
9909
9804
|
name: filter.name,
|
|
@@ -9918,15 +9813,15 @@ var DataList = (props) => {
|
|
|
9918
9813
|
},
|
|
9919
9814
|
filter.name
|
|
9920
9815
|
)),
|
|
9921
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
9816
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9922
9817
|
Hyperlink,
|
|
9923
9818
|
{
|
|
9924
9819
|
className: "gap-1",
|
|
9925
9820
|
linkType: "Primary" /* Solid */,
|
|
9926
9821
|
href: props.addLinkHref,
|
|
9927
9822
|
children: [
|
|
9928
|
-
/* @__PURE__ */ (0,
|
|
9929
|
-
/* @__PURE__ */ (0,
|
|
9823
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
9824
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
9930
9825
|
]
|
|
9931
9826
|
}
|
|
9932
9827
|
)
|
|
@@ -9934,8 +9829,8 @@ var DataList = (props) => {
|
|
|
9934
9829
|
]
|
|
9935
9830
|
}
|
|
9936
9831
|
),
|
|
9937
|
-
/* @__PURE__ */ (0,
|
|
9938
|
-
/* @__PURE__ */ (0,
|
|
9832
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
9833
|
+
/* @__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) => {
|
|
9939
9834
|
let url = builder.getNewOrderByUrl(column.name);
|
|
9940
9835
|
let icon = "chevronUpDown";
|
|
9941
9836
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -9945,18 +9840,18 @@ var DataList = (props) => {
|
|
|
9945
9840
|
icon = "chevronUp";
|
|
9946
9841
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
9947
9842
|
}
|
|
9948
|
-
return /* @__PURE__ */ (0,
|
|
9843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9949
9844
|
"th",
|
|
9950
9845
|
{
|
|
9951
9846
|
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" : ""),
|
|
9952
|
-
children: /* @__PURE__ */ (0,
|
|
9847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9953
9848
|
Hyperlink,
|
|
9954
9849
|
{
|
|
9955
9850
|
href: column.enableSorting ? url : void 0,
|
|
9956
9851
|
className: "text-body-950",
|
|
9957
|
-
children: /* @__PURE__ */ (0,
|
|
9958
|
-
/* @__PURE__ */ (0,
|
|
9959
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
9852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
9853
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: column.label }),
|
|
9854
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
9960
9855
|
] })
|
|
9961
9856
|
}
|
|
9962
9857
|
)
|
|
@@ -9964,7 +9859,7 @@ var DataList = (props) => {
|
|
|
9964
9859
|
column.name
|
|
9965
9860
|
);
|
|
9966
9861
|
}) }) }) }) }),
|
|
9967
|
-
/* @__PURE__ */ (0,
|
|
9862
|
+
/* @__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." })
|
|
9968
9863
|
] })
|
|
9969
9864
|
] })
|
|
9970
9865
|
] });
|
|
@@ -9972,12 +9867,12 @@ var DataList = (props) => {
|
|
|
9972
9867
|
var DataList_default = DataList;
|
|
9973
9868
|
|
|
9974
9869
|
// src/components/dataForm/DataListRenderer.tsx
|
|
9975
|
-
var
|
|
9870
|
+
var import_react67 = __toESM(require("react"));
|
|
9976
9871
|
init_ServiceClient();
|
|
9977
9872
|
init_OdataBuilder();
|
|
9978
9873
|
init_SelectWithSearchInput();
|
|
9979
9874
|
var import_navigation4 = require("next/navigation");
|
|
9980
|
-
var
|
|
9875
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
9981
9876
|
var viewControlMap = {
|
|
9982
9877
|
number: ViewControlTypes.number,
|
|
9983
9878
|
lineText: ViewControlTypes.lineText,
|
|
@@ -10032,14 +9927,14 @@ var DataListRenderer = ({
|
|
|
10032
9927
|
widgetProps
|
|
10033
9928
|
}) => {
|
|
10034
9929
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
10035
|
-
const [columns, setColumns] = (0,
|
|
10036
|
-
const [dataset, setDataset] = (0,
|
|
10037
|
-
const [filter, setFilters] = (0,
|
|
10038
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
10039
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
10040
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
9930
|
+
const [columns, setColumns] = (0, import_react67.useState)([]);
|
|
9931
|
+
const [dataset, setDataset] = (0, import_react67.useState)();
|
|
9932
|
+
const [filter, setFilters] = (0, import_react67.useState)([]);
|
|
9933
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react67.useState)("");
|
|
9934
|
+
const [addLinkText, setAddLinkText] = (0, import_react67.useState)("");
|
|
9935
|
+
const [serviceRoute, setServiceRoute] = (0, import_react67.useState)("");
|
|
10041
9936
|
const pathname = (0, import_navigation4.usePathname)();
|
|
10042
|
-
(0,
|
|
9937
|
+
(0, import_react67.useEffect)(() => {
|
|
10043
9938
|
if (!formDefinition) return;
|
|
10044
9939
|
setColumns(mapApiToColumns(formDefinition));
|
|
10045
9940
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -10052,7 +9947,7 @@ var DataListRenderer = ({
|
|
|
10052
9947
|
setAddLinkHref(resolvedAddLinkHref);
|
|
10053
9948
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
10054
9949
|
}, [formDefinition, params]);
|
|
10055
|
-
(0,
|
|
9950
|
+
(0, import_react67.useEffect)(() => {
|
|
10056
9951
|
const fetchData = async () => {
|
|
10057
9952
|
if (!serviceRoute) return;
|
|
10058
9953
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -10072,13 +9967,13 @@ var DataListRenderer = ({
|
|
|
10072
9967
|
isActive: landingPageUrl === pathname
|
|
10073
9968
|
};
|
|
10074
9969
|
});
|
|
10075
|
-
return /* @__PURE__ */ (0,
|
|
9970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_react67.default.Fragment, { children: [
|
|
10076
9971
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
10077
9972
|
// tabs={resolvedTabs}
|
|
10078
9973
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
10079
9974
|
// />
|
|
10080
|
-
/* @__PURE__ */ (0,
|
|
10081
|
-
/* @__PURE__ */ (0,
|
|
9975
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
9976
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
10082
9977
|
DataList_default,
|
|
10083
9978
|
{
|
|
10084
9979
|
addLinkHref,
|
|
@@ -10100,14 +9995,14 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
10100
9995
|
init_InputControlType();
|
|
10101
9996
|
|
|
10102
9997
|
// src/components/dataForm/DataForm.tsx
|
|
10103
|
-
var
|
|
9998
|
+
var import_react69 = __toESM(require("react"));
|
|
10104
9999
|
init_InputControl();
|
|
10105
10000
|
init_Icon();
|
|
10106
10001
|
init_Button();
|
|
10107
10002
|
init_StyleTypes();
|
|
10108
10003
|
|
|
10109
10004
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
10110
|
-
var
|
|
10005
|
+
var import_react68 = __toESM(require("react"));
|
|
10111
10006
|
init_InputControl();
|
|
10112
10007
|
|
|
10113
10008
|
// src/components/dataForm/StyleTypes.tsx
|
|
@@ -10135,7 +10030,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
10135
10030
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
10136
10031
|
|
|
10137
10032
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
10138
|
-
var
|
|
10033
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
10139
10034
|
var DataFormChildSection = (props) => {
|
|
10140
10035
|
const { section } = props;
|
|
10141
10036
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -10147,7 +10042,7 @@ var DataFormChildSection = (props) => {
|
|
|
10147
10042
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
10148
10043
|
};
|
|
10149
10044
|
const childItemsToRender = getChildItemsForRendering();
|
|
10150
|
-
const handleChildInputChange = (0,
|
|
10045
|
+
const handleChildInputChange = (0, import_react68.useCallback)(
|
|
10151
10046
|
(updatedValues) => {
|
|
10152
10047
|
if (isOneToOne) {
|
|
10153
10048
|
props.callback({
|
|
@@ -10174,7 +10069,7 @@ var DataFormChildSection = (props) => {
|
|
|
10174
10069
|
},
|
|
10175
10070
|
[props, isOneToOne, childItemsToRender]
|
|
10176
10071
|
);
|
|
10177
|
-
const onAddRow = (0,
|
|
10072
|
+
const onAddRow = (0, import_react68.useCallback)(() => {
|
|
10178
10073
|
props.callback({
|
|
10179
10074
|
sectionName: props.section.name,
|
|
10180
10075
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -10183,7 +10078,7 @@ var DataFormChildSection = (props) => {
|
|
|
10183
10078
|
rowIndex: -1
|
|
10184
10079
|
});
|
|
10185
10080
|
}, [props]);
|
|
10186
|
-
const onDeleteRow = (0,
|
|
10081
|
+
const onDeleteRow = (0, import_react68.useCallback)(
|
|
10187
10082
|
(filteredIndex) => {
|
|
10188
10083
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
10189
10084
|
if (visibleItem) {
|
|
@@ -10203,14 +10098,14 @@ var DataFormChildSection = (props) => {
|
|
|
10203
10098
|
childItemsToRender,
|
|
10204
10099
|
allChildItems: childItems
|
|
10205
10100
|
});
|
|
10206
|
-
return /* @__PURE__ */ (0,
|
|
10207
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
10208
|
-
/* @__PURE__ */ (0,
|
|
10209
|
-
/* @__PURE__ */ (0,
|
|
10210
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
10211
|
-
return /* @__PURE__ */ (0,
|
|
10101
|
+
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: [
|
|
10102
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
10103
|
+
/* @__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: [
|
|
10104
|
+
/* @__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: [
|
|
10105
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
10106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("tr", { className: "", children: [
|
|
10212
10107
|
sectionRow.elements.map((field, index) => {
|
|
10213
|
-
return /* @__PURE__ */ (0,
|
|
10108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10214
10109
|
"th",
|
|
10215
10110
|
{
|
|
10216
10111
|
className: "py-3 font-normal text-left",
|
|
@@ -10219,21 +10114,21 @@ var DataFormChildSection = (props) => {
|
|
|
10219
10114
|
field.name
|
|
10220
10115
|
);
|
|
10221
10116
|
}),
|
|
10222
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
10117
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
10223
10118
|
] }, sectionRowIndex);
|
|
10224
10119
|
}) }),
|
|
10225
|
-
/* @__PURE__ */ (0,
|
|
10120
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
10226
10121
|
const { item, originalIndex } = visibleItem;
|
|
10227
10122
|
const rowKey = originalIndex;
|
|
10228
|
-
return /* @__PURE__ */ (0,
|
|
10123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react68.default.Fragment, { children: section.sectionRows.map(
|
|
10229
10124
|
(sectionRow, sectionRowIndex) => {
|
|
10230
|
-
return /* @__PURE__ */ (0,
|
|
10125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10231
10126
|
"tr",
|
|
10232
10127
|
{
|
|
10233
10128
|
className: "",
|
|
10234
10129
|
children: [
|
|
10235
10130
|
sectionRow.elements.map((field, index) => {
|
|
10236
|
-
return /* @__PURE__ */ (0,
|
|
10131
|
+
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)(
|
|
10237
10132
|
InputControl_default,
|
|
10238
10133
|
{
|
|
10239
10134
|
index: filteredIndex,
|
|
@@ -10253,7 +10148,7 @@ var DataFormChildSection = (props) => {
|
|
|
10253
10148
|
}
|
|
10254
10149
|
) }) }) }, field.name);
|
|
10255
10150
|
}),
|
|
10256
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
10151
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10257
10152
|
ClientButton_default,
|
|
10258
10153
|
{
|
|
10259
10154
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -10262,7 +10157,7 @@ var DataFormChildSection = (props) => {
|
|
|
10262
10157
|
},
|
|
10263
10158
|
dataRole: "delete",
|
|
10264
10159
|
tabIndex: -1,
|
|
10265
|
-
children: /* @__PURE__ */ (0,
|
|
10160
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10266
10161
|
Icon_default,
|
|
10267
10162
|
{
|
|
10268
10163
|
className: "w-4 h-4",
|
|
@@ -10279,7 +10174,7 @@ var DataFormChildSection = (props) => {
|
|
|
10279
10174
|
) }, rowKey);
|
|
10280
10175
|
}) })
|
|
10281
10176
|
] }) }),
|
|
10282
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
10177
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10283
10178
|
ClientButton_default,
|
|
10284
10179
|
{
|
|
10285
10180
|
ButtonType: "Link" /* Link */,
|
|
@@ -10294,9 +10189,9 @@ var DataFormChildSection = (props) => {
|
|
|
10294
10189
|
var DataFormChildSection_default = DataFormChildSection;
|
|
10295
10190
|
|
|
10296
10191
|
// src/components/dataForm/DataForm.tsx
|
|
10297
|
-
var
|
|
10192
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
10298
10193
|
var DataForm = (props) => {
|
|
10299
|
-
const formRef = (0,
|
|
10194
|
+
const formRef = (0, import_react69.useRef)(null);
|
|
10300
10195
|
console.log(props.dataItem, "dssads");
|
|
10301
10196
|
const initialState = {
|
|
10302
10197
|
inputValues: {},
|
|
@@ -10305,9 +10200,9 @@ var DataForm = (props) => {
|
|
|
10305
10200
|
const childInitialState = {
|
|
10306
10201
|
inputValues: []
|
|
10307
10202
|
};
|
|
10308
|
-
const [formState, dispatch] = (0,
|
|
10203
|
+
const [formState, dispatch] = (0, import_react69.useReducer)(FormReducer_default, initialState);
|
|
10309
10204
|
console.log(props.sections, "sections");
|
|
10310
|
-
const clearHiddenChildSections = (0,
|
|
10205
|
+
const clearHiddenChildSections = (0, import_react69.useCallback)(
|
|
10311
10206
|
(changedProperty, newValues) => {
|
|
10312
10207
|
if (!props.sections) return;
|
|
10313
10208
|
const allChildSections = [];
|
|
@@ -10345,7 +10240,7 @@ var DataForm = (props) => {
|
|
|
10345
10240
|
},
|
|
10346
10241
|
[props.sections, formState.inputValues]
|
|
10347
10242
|
);
|
|
10348
|
-
const handleInputChange = (0,
|
|
10243
|
+
const handleInputChange = (0, import_react69.useCallback)(
|
|
10349
10244
|
async (updatedValues) => {
|
|
10350
10245
|
dispatch({
|
|
10351
10246
|
type: FORM_INPUT_UPDATE,
|
|
@@ -10360,7 +10255,7 @@ var DataForm = (props) => {
|
|
|
10360
10255
|
},
|
|
10361
10256
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
10362
10257
|
);
|
|
10363
|
-
const fetchData = (0,
|
|
10258
|
+
const fetchData = (0, import_react69.useCallback)(async () => {
|
|
10364
10259
|
if (!props.rules) return;
|
|
10365
10260
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
10366
10261
|
return;
|
|
@@ -10391,7 +10286,7 @@ var DataForm = (props) => {
|
|
|
10391
10286
|
console.error("Error fetching data:", error);
|
|
10392
10287
|
}
|
|
10393
10288
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
10394
|
-
(0,
|
|
10289
|
+
(0, import_react69.useEffect)(() => {
|
|
10395
10290
|
fetchData();
|
|
10396
10291
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
10397
10292
|
function replacePlaceholders(template, context, params) {
|
|
@@ -10411,7 +10306,7 @@ var DataForm = (props) => {
|
|
|
10411
10306
|
}
|
|
10412
10307
|
);
|
|
10413
10308
|
}
|
|
10414
|
-
const handleChildSectionChangeCallback = (0,
|
|
10309
|
+
const handleChildSectionChangeCallback = (0, import_react69.useCallback)(
|
|
10415
10310
|
(params) => {
|
|
10416
10311
|
dispatch({
|
|
10417
10312
|
type: params.actionType,
|
|
@@ -10456,7 +10351,7 @@ var DataForm = (props) => {
|
|
|
10456
10351
|
});
|
|
10457
10352
|
return cloned;
|
|
10458
10353
|
}
|
|
10459
|
-
const onClick = (0,
|
|
10354
|
+
const onClick = (0, import_react69.useCallback)(async () => {
|
|
10460
10355
|
if (props.onClick) {
|
|
10461
10356
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
10462
10357
|
const normalizedValues = normalizeChildSections(
|
|
@@ -10472,21 +10367,21 @@ var DataForm = (props) => {
|
|
|
10472
10367
|
return { isSuccessful: true };
|
|
10473
10368
|
}
|
|
10474
10369
|
}, [formState, props]);
|
|
10475
|
-
const handleAdditionalOnClick = (0,
|
|
10370
|
+
const handleAdditionalOnClick = (0, import_react69.useCallback)(async () => {
|
|
10476
10371
|
if (props.additionalActions?.onClick) {
|
|
10477
10372
|
return await props.additionalActions.onClick(formState);
|
|
10478
10373
|
} else {
|
|
10479
10374
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
10480
10375
|
}
|
|
10481
10376
|
}, [formState, props]);
|
|
10482
|
-
const onDelete = (0,
|
|
10377
|
+
const onDelete = (0, import_react69.useCallback)(async () => {
|
|
10483
10378
|
if (props.onDelete) {
|
|
10484
10379
|
return await props.onDelete(formState);
|
|
10485
10380
|
} else {
|
|
10486
10381
|
return { isSuccessful: true };
|
|
10487
10382
|
}
|
|
10488
10383
|
}, [formState, props]);
|
|
10489
|
-
(0,
|
|
10384
|
+
(0, import_react69.useEffect)(() => {
|
|
10490
10385
|
if (props.dataItem) {
|
|
10491
10386
|
dispatch({
|
|
10492
10387
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -10514,19 +10409,19 @@ var DataForm = (props) => {
|
|
|
10514
10409
|
return false;
|
|
10515
10410
|
}
|
|
10516
10411
|
}
|
|
10517
|
-
return /* @__PURE__ */ (0,
|
|
10518
|
-
props.title && /* @__PURE__ */ (0,
|
|
10412
|
+
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: [
|
|
10413
|
+
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)(
|
|
10519
10414
|
"div",
|
|
10520
10415
|
{
|
|
10521
10416
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
10522
10417
|
onClick: () => window.history.back(),
|
|
10523
10418
|
children: [
|
|
10524
|
-
/* @__PURE__ */ (0,
|
|
10525
|
-
/* @__PURE__ */ (0,
|
|
10419
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
10420
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
10526
10421
|
]
|
|
10527
10422
|
}
|
|
10528
10423
|
) }),
|
|
10529
|
-
/* @__PURE__ */ (0,
|
|
10424
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10530
10425
|
"form",
|
|
10531
10426
|
{
|
|
10532
10427
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -10547,8 +10442,8 @@ var DataForm = (props) => {
|
|
|
10547
10442
|
}
|
|
10548
10443
|
}
|
|
10549
10444
|
},
|
|
10550
|
-
children: /* @__PURE__ */ (0,
|
|
10551
|
-
return /* @__PURE__ */ (0,
|
|
10445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
10446
|
+
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: [
|
|
10552
10447
|
section.sectionRows?.map(
|
|
10553
10448
|
(sectionRow, sectionRowIndex) => {
|
|
10554
10449
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -10559,14 +10454,14 @@ var DataForm = (props) => {
|
|
|
10559
10454
|
sectionRow.visible
|
|
10560
10455
|
);
|
|
10561
10456
|
}
|
|
10562
|
-
return /* @__PURE__ */ (0,
|
|
10563
|
-
return /* @__PURE__ */ (0,
|
|
10457
|
+
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) => {
|
|
10458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
10564
10459
|
"div",
|
|
10565
10460
|
{
|
|
10566
10461
|
className: sectionRow.grow ? "grow" : "",
|
|
10567
10462
|
children: [
|
|
10568
|
-
/* @__PURE__ */ (0,
|
|
10569
|
-
/* @__PURE__ */ (0,
|
|
10463
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: field.controlType }),
|
|
10464
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10570
10465
|
InputControl_default,
|
|
10571
10466
|
{
|
|
10572
10467
|
name: field.name,
|
|
@@ -10596,12 +10491,12 @@ var DataForm = (props) => {
|
|
|
10596
10491
|
}) }) }, sectionRowIndex);
|
|
10597
10492
|
}
|
|
10598
10493
|
),
|
|
10599
|
-
/* @__PURE__ */ (0,
|
|
10494
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: section.childSections?.map(
|
|
10600
10495
|
(childSection, childSectionIndex) => {
|
|
10601
|
-
return /* @__PURE__ */ (0,
|
|
10496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
10602
10497
|
formState.inputValues,
|
|
10603
10498
|
childSection.visible
|
|
10604
|
-
) && /* @__PURE__ */ (0,
|
|
10499
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10605
10500
|
DataFormChildSection_default,
|
|
10606
10501
|
{
|
|
10607
10502
|
section: childSection,
|
|
@@ -10616,8 +10511,8 @@ var DataForm = (props) => {
|
|
|
10616
10511
|
}) })
|
|
10617
10512
|
}
|
|
10618
10513
|
),
|
|
10619
|
-
/* @__PURE__ */ (0,
|
|
10620
|
-
/* @__PURE__ */ (0,
|
|
10514
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
10515
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10621
10516
|
Button_default,
|
|
10622
10517
|
{
|
|
10623
10518
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -10625,7 +10520,7 @@ var DataForm = (props) => {
|
|
|
10625
10520
|
children: props.additionalActions.title
|
|
10626
10521
|
}
|
|
10627
10522
|
) }),
|
|
10628
|
-
/* @__PURE__ */ (0,
|
|
10523
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10629
10524
|
Button_default,
|
|
10630
10525
|
{
|
|
10631
10526
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -10636,7 +10531,7 @@ var DataForm = (props) => {
|
|
|
10636
10531
|
children: "Delete"
|
|
10637
10532
|
}
|
|
10638
10533
|
) }),
|
|
10639
|
-
/* @__PURE__ */ (0,
|
|
10534
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10640
10535
|
Button_default,
|
|
10641
10536
|
{
|
|
10642
10537
|
onValidate,
|
|
@@ -10654,7 +10549,7 @@ var DataForm_default = DataForm;
|
|
|
10654
10549
|
|
|
10655
10550
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
10656
10551
|
init_ServiceClient();
|
|
10657
|
-
var
|
|
10552
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
10658
10553
|
function getAction(actions, code) {
|
|
10659
10554
|
return actions?.find((a) => a.actionCode === code);
|
|
10660
10555
|
}
|
|
@@ -10680,9 +10575,9 @@ var DataFormRenderer = ({
|
|
|
10680
10575
|
"Delete"
|
|
10681
10576
|
);
|
|
10682
10577
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
10683
|
-
return /* @__PURE__ */ (0,
|
|
10684
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
10685
|
-
/* @__PURE__ */ (0,
|
|
10578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
10579
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
10580
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
10686
10581
|
DataForm_default,
|
|
10687
10582
|
{
|
|
10688
10583
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|
|
@@ -10703,7 +10598,6 @@ var DataFormRenderer = ({
|
|
|
10703
10598
|
var DataFormRenderer_default = DataFormRenderer;
|
|
10704
10599
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10705
10600
|
0 && (module.exports = {
|
|
10706
|
-
BooleanSelect,
|
|
10707
10601
|
Button,
|
|
10708
10602
|
CheckboxInput,
|
|
10709
10603
|
ColorInput,
|
|
@@ -10727,7 +10621,6 @@ var DataFormRenderer_default = DataFormRenderer;
|
|
|
10727
10621
|
PhoneInput,
|
|
10728
10622
|
RadioInput,
|
|
10729
10623
|
Select,
|
|
10730
|
-
Switcher,
|
|
10731
10624
|
TimeInput,
|
|
10732
10625
|
Toast,
|
|
10733
10626
|
ToastService,
|