@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20261114091258 → 0.8.1-dev.20261119092426
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/{InputControlClient-IKQYB764.mjs → InputControlClient-57F6TZ7E.mjs} +5 -3
- package/dist/{Pagination-6R4XZLF6.mjs → Pagination-LXNPTR2H.mjs} +2 -2
- package/dist/{chunk-RSUG2VPX.mjs → chunk-4Y2KBXMJ.mjs} +1 -1
- package/dist/{chunk-GNIFUHGR.mjs → chunk-RTUD2GCR.mjs} +277 -2
- package/dist/{chunk-N3EYMPAJ.mjs → chunk-W4RXVJJ7.mjs} +2 -1
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +995 -708
- package/dist/index.mjs +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2385,7 +2385,8 @@ var init_InputControlType = __esm({
|
|
|
2385
2385
|
dateInput: "dateInput",
|
|
2386
2386
|
radioInput: "radioInput",
|
|
2387
2387
|
videoInput: "videoInput",
|
|
2388
|
-
referenceInput: "referenceInput"
|
|
2388
|
+
referenceInput: "referenceInput",
|
|
2389
|
+
picklist: "picklist"
|
|
2389
2390
|
};
|
|
2390
2391
|
InputControlType_default = InputControlType;
|
|
2391
2392
|
}
|
|
@@ -4898,17 +4899,298 @@ var init_ReferenceInput = __esm({
|
|
|
4898
4899
|
}
|
|
4899
4900
|
});
|
|
4900
4901
|
|
|
4902
|
+
// src/components/controls/edit/PicklistInput.tsx
|
|
4903
|
+
function Svg({
|
|
4904
|
+
s = 16,
|
|
4905
|
+
c = "",
|
|
4906
|
+
fill = "none",
|
|
4907
|
+
sw = 2,
|
|
4908
|
+
children
|
|
4909
|
+
}) {
|
|
4910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4911
|
+
"svg",
|
|
4912
|
+
{
|
|
4913
|
+
width: s,
|
|
4914
|
+
height: s,
|
|
4915
|
+
viewBox: "0 0 24 24",
|
|
4916
|
+
fill,
|
|
4917
|
+
stroke: "currentColor",
|
|
4918
|
+
strokeWidth: sw,
|
|
4919
|
+
strokeLinecap: "round",
|
|
4920
|
+
strokeLinejoin: "round",
|
|
4921
|
+
className: c,
|
|
4922
|
+
children
|
|
4923
|
+
}
|
|
4924
|
+
);
|
|
4925
|
+
}
|
|
4926
|
+
var import_react45, import_jsx_runtime59, IcoPlus, IcoEdit, IcoX, parseValueToOptions, PicklistInput, PicklistInput_default;
|
|
4927
|
+
var init_PicklistInput = __esm({
|
|
4928
|
+
"src/components/controls/edit/PicklistInput.tsx"() {
|
|
4929
|
+
"use strict";
|
|
4930
|
+
"use client";
|
|
4931
|
+
import_react45 = __toESM(require("react"));
|
|
4932
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4933
|
+
IcoPlus = (p) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Svg, { ...p, children: [
|
|
4934
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
4935
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
4936
|
+
] });
|
|
4937
|
+
IcoEdit = (p) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Svg, { ...p, children: [
|
|
4938
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
4939
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
|
4940
|
+
] });
|
|
4941
|
+
IcoX = (p) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Svg, { ...p, children: [
|
|
4942
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
4943
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
4944
|
+
] });
|
|
4945
|
+
parseValueToOptions = (val, textField) => {
|
|
4946
|
+
if (val === void 0 || val === null || val === "") return [];
|
|
4947
|
+
let parsed = val;
|
|
4948
|
+
if (typeof parsed === "string") {
|
|
4949
|
+
try {
|
|
4950
|
+
parsed = JSON.parse(parsed);
|
|
4951
|
+
} catch {
|
|
4952
|
+
return parsed.split(",").map((s) => s.trim()).filter(Boolean).map((text) => ({ text, rawItem: text }));
|
|
4953
|
+
}
|
|
4954
|
+
}
|
|
4955
|
+
if (Array.isArray(parsed)) {
|
|
4956
|
+
return parsed.map((item) => {
|
|
4957
|
+
if (typeof item === "string") {
|
|
4958
|
+
return { text: item.trim(), rawItem: item };
|
|
4959
|
+
}
|
|
4960
|
+
if (item && typeof item === "object") {
|
|
4961
|
+
const key = textField || (item.attributeValue !== void 0 ? "attributeValue" : item.value !== void 0 ? "value" : item.name !== void 0 ? "name" : item.title !== void 0 ? "title" : Object.keys(item).find((k) => typeof item[k] === "string"));
|
|
4962
|
+
const text = key && item[key] !== void 0 ? String(item[key]).trim() : "";
|
|
4963
|
+
return { text, rawItem: item };
|
|
4964
|
+
}
|
|
4965
|
+
return { text: String(item).trim(), rawItem: item };
|
|
4966
|
+
}).filter((opt) => opt.text.length > 0);
|
|
4967
|
+
}
|
|
4968
|
+
return [];
|
|
4969
|
+
};
|
|
4970
|
+
PicklistInput = (props) => {
|
|
4971
|
+
const [isOpen, setIsOpen] = (0, import_react45.useState)(false);
|
|
4972
|
+
const [draftOptions, setDraftOptions] = (0, import_react45.useState)([]);
|
|
4973
|
+
const [inputValue, setInputValue] = (0, import_react45.useState)("");
|
|
4974
|
+
const savedOptions = (0, import_react45.useMemo)(() => {
|
|
4975
|
+
return parseValueToOptions(props.value, props.dataTextFieldName);
|
|
4976
|
+
}, [props.value, props.dataTextFieldName]);
|
|
4977
|
+
const handleOpen = (0, import_react45.useCallback)(() => {
|
|
4978
|
+
setDraftOptions([...savedOptions]);
|
|
4979
|
+
setInputValue("");
|
|
4980
|
+
setIsOpen(true);
|
|
4981
|
+
}, [savedOptions]);
|
|
4982
|
+
const handleAdd = (0, import_react45.useCallback)(() => {
|
|
4983
|
+
const trimmed = inputValue.trim();
|
|
4984
|
+
if (!trimmed) return;
|
|
4985
|
+
let newTexts = [];
|
|
4986
|
+
if (trimmed.includes(",")) {
|
|
4987
|
+
newTexts = trimmed.split(",").map((s) => s.trim()).filter(Boolean);
|
|
4988
|
+
} else {
|
|
4989
|
+
newTexts = [trimmed];
|
|
4990
|
+
}
|
|
4991
|
+
const updated = [...draftOptions];
|
|
4992
|
+
for (const text of newTexts) {
|
|
4993
|
+
if (!updated.some((opt) => opt.text.toLowerCase() === text.toLowerCase())) {
|
|
4994
|
+
updated.push({ text });
|
|
4995
|
+
}
|
|
4996
|
+
}
|
|
4997
|
+
setDraftOptions(updated);
|
|
4998
|
+
setInputValue("");
|
|
4999
|
+
}, [draftOptions, inputValue]);
|
|
5000
|
+
const handleRemove = (0, import_react45.useCallback)((index) => {
|
|
5001
|
+
setDraftOptions((prev) => prev.filter((_, i) => i !== index));
|
|
5002
|
+
}, []);
|
|
5003
|
+
const handleSave = (0, import_react45.useCallback)(() => {
|
|
5004
|
+
const textField = props.dataTextFieldName || (draftOptions.some(
|
|
5005
|
+
(o) => o.rawItem && typeof o.rawItem === "object" && "attributeValue" in o.rawItem
|
|
5006
|
+
) ? "attributeValue" : void 0);
|
|
5007
|
+
let outputValue;
|
|
5008
|
+
if (textField) {
|
|
5009
|
+
outputValue = draftOptions.map((opt) => {
|
|
5010
|
+
if (opt.rawItem && typeof opt.rawItem === "object") {
|
|
5011
|
+
return {
|
|
5012
|
+
...opt.rawItem,
|
|
5013
|
+
[textField]: opt.text
|
|
5014
|
+
};
|
|
5015
|
+
}
|
|
5016
|
+
return {
|
|
5017
|
+
[textField]: opt.text
|
|
5018
|
+
};
|
|
5019
|
+
});
|
|
5020
|
+
} else if (draftOptions.some((o) => o.rawItem && typeof o.rawItem === "object")) {
|
|
5021
|
+
outputValue = draftOptions.map((opt) => {
|
|
5022
|
+
if (opt.rawItem && typeof opt.rawItem === "object") {
|
|
5023
|
+
return {
|
|
5024
|
+
...opt.rawItem,
|
|
5025
|
+
value: opt.text
|
|
5026
|
+
};
|
|
5027
|
+
}
|
|
5028
|
+
return { value: opt.text };
|
|
5029
|
+
});
|
|
5030
|
+
} else {
|
|
5031
|
+
outputValue = draftOptions.map((opt) => opt.text);
|
|
5032
|
+
}
|
|
5033
|
+
if (props.callback) {
|
|
5034
|
+
props.callback({
|
|
5035
|
+
name: props.name,
|
|
5036
|
+
value: outputValue,
|
|
5037
|
+
index: props.index
|
|
5038
|
+
});
|
|
5039
|
+
}
|
|
5040
|
+
setIsOpen(false);
|
|
5041
|
+
}, [draftOptions, props]);
|
|
5042
|
+
const title = props.attributes?.label || (typeof props.name === "string" ? props.name : "Field");
|
|
5043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react45.default.Fragment, { children: [
|
|
5044
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
5045
|
+
"button",
|
|
5046
|
+
{
|
|
5047
|
+
type: "button",
|
|
5048
|
+
onClick: handleOpen,
|
|
5049
|
+
disabled: props.attributes?.disable || props.disable || props.attributes?.readOnly,
|
|
5050
|
+
className: "w-full text-left px-2.5 py-1.5 text-xs bg-neutral-weak hover:bg-neutral-soft border border-neutral-soft rounded transition-colors flex items-center justify-between gap-2 shadow-2xs group cursor-pointer disabled:opacity-50",
|
|
5051
|
+
children: [
|
|
5052
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "truncate flex items-center gap-1.5 min-w-0", children: savedOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react45.default.Fragment, { children: [
|
|
5053
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "shrink-0 text-[10px] font-bold px-1.5 py-0.5 rounded-full bg-info-weak border border-info-soft", children: [
|
|
5054
|
+
savedOptions.length,
|
|
5055
|
+
" option",
|
|
5056
|
+
savedOptions.length !== 1 ? "s" : ""
|
|
5057
|
+
] }),
|
|
5058
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "truncate opacity-75 text-[11px]", children: [
|
|
5059
|
+
savedOptions.slice(0, 2).map((o) => o.text).join(", "),
|
|
5060
|
+
savedOptions.length > 2 ? ` (+${savedOptions.length - 2})` : ""
|
|
5061
|
+
] })
|
|
5062
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "italic text-[11px] flex items-center gap-1", children: [
|
|
5063
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IcoPlus, { s: 11 }),
|
|
5064
|
+
" ",
|
|
5065
|
+
props.attributes?.placeholder || "Add Options"
|
|
5066
|
+
] }) }),
|
|
5067
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "shrink-0 p-1 rounded-md bg-neutral-weak group-hover:bg-neutral-soft transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IcoEdit, { s: 11 }) })
|
|
5068
|
+
]
|
|
5069
|
+
}
|
|
5070
|
+
),
|
|
5071
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-neutral-stronger/60 backdrop-blur-xs", children: [
|
|
5072
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5073
|
+
"div",
|
|
5074
|
+
{
|
|
5075
|
+
className: "absolute inset-0",
|
|
5076
|
+
onClick: () => setIsOpen(false)
|
|
5077
|
+
}
|
|
5078
|
+
),
|
|
5079
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative bg-neutral-weak border border-neutral-soft rounded-2xl shadow-2xl w-full max-w-xl mx-4 overflow-hidden z-10", children: [
|
|
5080
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center justify-between px-6 py-4 border-b border-neutral-soft", children: [
|
|
5081
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("h2", { className: "text-sm font-bold", children: [
|
|
5082
|
+
"Configure Picklist \u2014 ",
|
|
5083
|
+
title
|
|
5084
|
+
] }),
|
|
5085
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5086
|
+
"button",
|
|
5087
|
+
{
|
|
5088
|
+
type: "button",
|
|
5089
|
+
onClick: () => setIsOpen(false),
|
|
5090
|
+
className: "p-1 rounded-lg bg-neutral-weak hover:bg-neutral-soft border border-neutral-soft cursor-pointer transition-colors",
|
|
5091
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IcoX, { s: 14 })
|
|
5092
|
+
}
|
|
5093
|
+
)
|
|
5094
|
+
] }),
|
|
5095
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "px-6 py-5 space-y-4", children: [
|
|
5096
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
5097
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xs font-semibold mb-1", children: "Add Options" }),
|
|
5098
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-stretch gap-2", children: [
|
|
5099
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5100
|
+
"input",
|
|
5101
|
+
{
|
|
5102
|
+
type: "text",
|
|
5103
|
+
value: inputValue,
|
|
5104
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
5105
|
+
onKeyDown: (e) => {
|
|
5106
|
+
if (e.key === "Enter") {
|
|
5107
|
+
e.preventDefault();
|
|
5108
|
+
handleAdd();
|
|
5109
|
+
}
|
|
5110
|
+
},
|
|
5111
|
+
placeholder: "Type option name or paste comma-separated values",
|
|
5112
|
+
className: "flex-1 px-3 py-2 text-xs bg-neutral-weak border border-neutral-soft rounded-lg focus:outline-hidden focus:border-primary-base"
|
|
5113
|
+
}
|
|
5114
|
+
),
|
|
5115
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5116
|
+
"button",
|
|
5117
|
+
{
|
|
5118
|
+
type: "button",
|
|
5119
|
+
onClick: handleAdd,
|
|
5120
|
+
disabled: !inputValue.trim(),
|
|
5121
|
+
className: "px-3 py-2 text-xs font-semibold bg-primary-base hover:bg-primary-strong disabled:opacity-50 border border-primary-strong rounded-lg cursor-pointer flex items-center justify-center gap-1 transition-colors",
|
|
5122
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IcoPlus, { s: 12 })
|
|
5123
|
+
}
|
|
5124
|
+
)
|
|
5125
|
+
] }),
|
|
5126
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("small", { className: "bg-info-weak border border-info-soft rounded-md px-3 py-1.5 block mt-2 text-[11px]", children: "Tip: Paste comma-separated values (e.g. \u201Cremote, office, hybrid\u201D) to add multiple options at once." })
|
|
5127
|
+
] }),
|
|
5128
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
5129
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center justify-between mb-2", children: [
|
|
5130
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xs font-semibold", children: "Configured Options" }),
|
|
5131
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-[10px] font-bold bg-neutral-soft px-2 py-0.5 rounded-full", children: draftOptions.length })
|
|
5132
|
+
] }),
|
|
5133
|
+
draftOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "p-6 bg-neutral-soft rounded-md border border-dashed border-neutral-base text-center", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("small", { className: "italic block", children: "No options defined yet. Type above to add options." }) }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex flex-wrap gap-1.5 max-h-48 overflow-y-auto", children: draftOptions.map((opt, idx) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
5134
|
+
"div",
|
|
5135
|
+
{
|
|
5136
|
+
className: "flex items-center gap-1.5 px-2.5 py-1 bg-info-soft hover:bg-neutral-soft border border-info-soft rounded-md text-xs font-semibold transition-colors",
|
|
5137
|
+
children: [
|
|
5138
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: opt.text }),
|
|
5139
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5140
|
+
"button",
|
|
5141
|
+
{
|
|
5142
|
+
type: "button",
|
|
5143
|
+
onClick: () => handleRemove(idx),
|
|
5144
|
+
title: "Remove option",
|
|
5145
|
+
className: "p-0.5 rounded hover:bg-error-soft cursor-pointer transition-colors",
|
|
5146
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IcoX, { s: 11 })
|
|
5147
|
+
}
|
|
5148
|
+
)
|
|
5149
|
+
]
|
|
5150
|
+
},
|
|
5151
|
+
idx
|
|
5152
|
+
)) })
|
|
5153
|
+
] })
|
|
5154
|
+
] }),
|
|
5155
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex justify-end gap-2 px-6 py-4 border-t border-neutral-soft bg-neutral-weak", children: [
|
|
5156
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5157
|
+
"button",
|
|
5158
|
+
{
|
|
5159
|
+
type: "button",
|
|
5160
|
+
onClick: () => setIsOpen(false),
|
|
5161
|
+
className: "px-4 py-2 text-xs font-medium bg-neutral-soft hover:bg-neutral-base border border-neutral-soft rounded-lg cursor-pointer transition-colors",
|
|
5162
|
+
children: "Cancel"
|
|
5163
|
+
}
|
|
5164
|
+
),
|
|
5165
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5166
|
+
"button",
|
|
5167
|
+
{
|
|
5168
|
+
type: "button",
|
|
5169
|
+
onClick: handleSave,
|
|
5170
|
+
className: "px-4 py-2 text-xs font-medium bg-primary-base hover:bg-primary-strong border border-primary-strong rounded-lg cursor-pointer transition-colors",
|
|
5171
|
+
children: "Save Options"
|
|
5172
|
+
}
|
|
5173
|
+
)
|
|
5174
|
+
] })
|
|
5175
|
+
] })
|
|
5176
|
+
] })
|
|
5177
|
+
] });
|
|
5178
|
+
};
|
|
5179
|
+
PicklistInput_default = PicklistInput;
|
|
5180
|
+
}
|
|
5181
|
+
});
|
|
5182
|
+
|
|
4901
5183
|
// src/components/controls/edit/InputControlClient.tsx
|
|
4902
5184
|
var InputControlClient_exports = {};
|
|
4903
5185
|
__export(InputControlClient_exports, {
|
|
4904
5186
|
default: () => InputControlClient_default
|
|
4905
5187
|
});
|
|
4906
|
-
var
|
|
5188
|
+
var import_react46, import_jsx_runtime60, InputControl, InputControlClient_default;
|
|
4907
5189
|
var init_InputControlClient = __esm({
|
|
4908
5190
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
4909
5191
|
"use strict";
|
|
4910
5192
|
"use client";
|
|
4911
|
-
|
|
5193
|
+
import_react46 = __toESM(require("react"));
|
|
4912
5194
|
init_MultilineTextInput();
|
|
4913
5195
|
init_LineTextInput();
|
|
4914
5196
|
init_MoneyInput();
|
|
@@ -4930,8 +5212,9 @@ var init_InputControlClient = __esm({
|
|
|
4930
5212
|
init_DateInput();
|
|
4931
5213
|
init_RadioInput();
|
|
4932
5214
|
init_ReferenceInput();
|
|
4933
|
-
|
|
4934
|
-
|
|
5215
|
+
init_PicklistInput();
|
|
5216
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5217
|
+
InputControl = import_react46.default.forwardRef(
|
|
4935
5218
|
(props, ref) => {
|
|
4936
5219
|
const ControlComponents = {
|
|
4937
5220
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -4953,10 +5236,11 @@ var init_InputControlClient = __esm({
|
|
|
4953
5236
|
[InputControlType_default.switchInput]: SwitchInput_default,
|
|
4954
5237
|
[InputControlType_default.dateInput]: DateInput_default,
|
|
4955
5238
|
[InputControlType_default.radioInput]: RadioInput_default,
|
|
4956
|
-
[InputControlType_default.referenceInput]: ReferenceInput_default
|
|
5239
|
+
[InputControlType_default.referenceInput]: ReferenceInput_default,
|
|
5240
|
+
[InputControlType_default.picklist]: PicklistInput_default
|
|
4957
5241
|
};
|
|
4958
5242
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
4959
|
-
return /* @__PURE__ */ (0,
|
|
5243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react46.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
4960
5244
|
}
|
|
4961
5245
|
);
|
|
4962
5246
|
InputControl.displayName = "InputControl";
|
|
@@ -5199,29 +5483,29 @@ var LinkNodeButton_exports = {};
|
|
|
5199
5483
|
__export(LinkNodeButton_exports, {
|
|
5200
5484
|
default: () => LinkNodeButton_default
|
|
5201
5485
|
});
|
|
5202
|
-
var
|
|
5486
|
+
var import_react47, import_jsx_runtime64, LinkNodeButton, LinkNodeButton_default;
|
|
5203
5487
|
var init_LinkNodeButton = __esm({
|
|
5204
5488
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
5205
5489
|
"use strict";
|
|
5206
5490
|
"use client";
|
|
5207
|
-
|
|
5491
|
+
import_react47 = require("react");
|
|
5208
5492
|
init_Button();
|
|
5209
5493
|
init_ServiceClient();
|
|
5210
5494
|
init_ToastService();
|
|
5211
|
-
|
|
5495
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5212
5496
|
LinkNodeButton = (props) => {
|
|
5213
5497
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
5214
|
-
const [isLoading, setIsLoading] = (0,
|
|
5215
|
-
const [successMessage, setSuccessMessage] = (0,
|
|
5498
|
+
const [isLoading, setIsLoading] = (0, import_react47.useState)(false);
|
|
5499
|
+
const [successMessage, setSuccessMessage] = (0, import_react47.useState)(null);
|
|
5216
5500
|
console.log("LinkNodeButton props:", props);
|
|
5217
|
-
const extractFieldNames = (0,
|
|
5501
|
+
const extractFieldNames = (0, import_react47.useCallback)((template) => {
|
|
5218
5502
|
if (!template) return [];
|
|
5219
5503
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
5220
5504
|
const matches = Array.from(template.matchAll(regex));
|
|
5221
5505
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
5222
5506
|
return fieldNames;
|
|
5223
5507
|
}, []);
|
|
5224
|
-
const replaceTemplateVariables = (0,
|
|
5508
|
+
const replaceTemplateVariables = (0, import_react47.useCallback)(
|
|
5225
5509
|
(template, responseData) => {
|
|
5226
5510
|
if (!template) return template;
|
|
5227
5511
|
let result = template;
|
|
@@ -5253,7 +5537,7 @@ var init_LinkNodeButton = __esm({
|
|
|
5253
5537
|
},
|
|
5254
5538
|
[props.routeParameters, dataitem, extractFieldNames]
|
|
5255
5539
|
);
|
|
5256
|
-
const getNestedValue8 = (0,
|
|
5540
|
+
const getNestedValue8 = (0, import_react47.useCallback)((obj, path) => {
|
|
5257
5541
|
if (!obj || !path) return void 0;
|
|
5258
5542
|
if (obj[path] !== void 0) {
|
|
5259
5543
|
return obj[path];
|
|
@@ -5268,7 +5552,7 @@ var init_LinkNodeButton = __esm({
|
|
|
5268
5552
|
}
|
|
5269
5553
|
return current;
|
|
5270
5554
|
}, []);
|
|
5271
|
-
const onClick = (0,
|
|
5555
|
+
const onClick = (0, import_react47.useCallback)(async () => {
|
|
5272
5556
|
if (!node.postUrl) {
|
|
5273
5557
|
return {
|
|
5274
5558
|
isSuccessful: false,
|
|
@@ -5382,14 +5666,14 @@ var init_LinkNodeButton = __esm({
|
|
|
5382
5666
|
return children;
|
|
5383
5667
|
}
|
|
5384
5668
|
if (linkText) {
|
|
5385
|
-
return /* @__PURE__ */ (0,
|
|
5669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: linkText });
|
|
5386
5670
|
}
|
|
5387
5671
|
return node.title || "Button";
|
|
5388
5672
|
};
|
|
5389
5673
|
const fontSize = node.children?.[0]?.style?.match(/font-size:\s*([^;]+)/)?.[1];
|
|
5390
5674
|
const isCustomButton = Boolean(node.customButtonClass);
|
|
5391
5675
|
const buttonClass = isCustomButton ? node.customButtonClass ?? "" : ["w-full", node.customButtonClass].filter(Boolean).join(" ");
|
|
5392
|
-
return /* @__PURE__ */ (0,
|
|
5676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5393
5677
|
Button_default,
|
|
5394
5678
|
{
|
|
5395
5679
|
ButtonType: linkType,
|
|
@@ -5397,20 +5681,20 @@ var init_LinkNodeButton = __esm({
|
|
|
5397
5681
|
disabled: isLoading || !!successMessage,
|
|
5398
5682
|
className: buttonClass,
|
|
5399
5683
|
isCustomButton,
|
|
5400
|
-
children: successMessage ? /* @__PURE__ */ (0,
|
|
5684
|
+
children: successMessage ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
5401
5685
|
"span",
|
|
5402
5686
|
{
|
|
5403
5687
|
style: fontSize ? { fontSize } : void 0,
|
|
5404
5688
|
className: "inline-flex items-center gap-2",
|
|
5405
5689
|
children: [
|
|
5406
|
-
/* @__PURE__ */ (0,
|
|
5690
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5407
5691
|
"svg",
|
|
5408
5692
|
{
|
|
5409
5693
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5410
5694
|
viewBox: "0 0 20 20",
|
|
5411
5695
|
fill: "currentColor",
|
|
5412
5696
|
className: "w-5 h-5",
|
|
5413
|
-
children: /* @__PURE__ */ (0,
|
|
5697
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5414
5698
|
"path",
|
|
5415
5699
|
{
|
|
5416
5700
|
fillRule: "evenodd",
|
|
@@ -5420,7 +5704,7 @@ var init_LinkNodeButton = __esm({
|
|
|
5420
5704
|
)
|
|
5421
5705
|
}
|
|
5422
5706
|
),
|
|
5423
|
-
/* @__PURE__ */ (0,
|
|
5707
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: successMessage })
|
|
5424
5708
|
]
|
|
5425
5709
|
}
|
|
5426
5710
|
) : renderButtonContent()
|
|
@@ -5436,13 +5720,13 @@ var CounterNodeClient_exports = {};
|
|
|
5436
5720
|
__export(CounterNodeClient_exports, {
|
|
5437
5721
|
default: () => CounterNodeClient_default
|
|
5438
5722
|
});
|
|
5439
|
-
var
|
|
5723
|
+
var import_react49, import_jsx_runtime69, FORMAT_CLASSES2, CounterNodeClient, CounterNodeClient_default;
|
|
5440
5724
|
var init_CounterNodeClient = __esm({
|
|
5441
5725
|
"src/components/pageRenderingEngine/nodes/CounterNodeClient.tsx"() {
|
|
5442
5726
|
"use strict";
|
|
5443
5727
|
"use client";
|
|
5444
|
-
|
|
5445
|
-
|
|
5728
|
+
import_react49 = require("react");
|
|
5729
|
+
import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5446
5730
|
FORMAT_CLASSES2 = {
|
|
5447
5731
|
center: "justify-center text-center",
|
|
5448
5732
|
right: "justify-end text-right",
|
|
@@ -5450,16 +5734,16 @@ var init_CounterNodeClient = __esm({
|
|
|
5450
5734
|
justify: "justify-between text-justify"
|
|
5451
5735
|
};
|
|
5452
5736
|
CounterNodeClient = ({ node }) => {
|
|
5453
|
-
const ref = (0,
|
|
5737
|
+
const ref = (0, import_react49.useRef)(null);
|
|
5454
5738
|
const startValue = typeof node?.startValue === "number" ? node.startValue : Number(node?.startValue) || 0;
|
|
5455
5739
|
const endValue = typeof node?.endValue === "number" ? node.endValue : Number(node?.endValue) || 0;
|
|
5456
5740
|
const duration = Math.max(Number(node?.duration) || 2e3, 300);
|
|
5457
5741
|
const prefix = node?.prefix ?? "";
|
|
5458
5742
|
const suffix = node?.suffix ?? "";
|
|
5459
5743
|
const format = node?.format;
|
|
5460
|
-
const [displayValue, setDisplayValue] = (0,
|
|
5461
|
-
const hasAnimatedRef = (0,
|
|
5462
|
-
const runAnimation = (0,
|
|
5744
|
+
const [displayValue, setDisplayValue] = (0, import_react49.useState)(startValue);
|
|
5745
|
+
const hasAnimatedRef = (0, import_react49.useRef)(false);
|
|
5746
|
+
const runAnimation = (0, import_react49.useCallback)(() => {
|
|
5463
5747
|
let startTime = null;
|
|
5464
5748
|
let animationFrameId;
|
|
5465
5749
|
const step = (timestamp) => {
|
|
@@ -5481,7 +5765,7 @@ var init_CounterNodeClient = __esm({
|
|
|
5481
5765
|
}
|
|
5482
5766
|
};
|
|
5483
5767
|
}, [startValue, endValue, duration]);
|
|
5484
|
-
(0,
|
|
5768
|
+
(0, import_react49.useEffect)(() => {
|
|
5485
5769
|
const currentRef = ref.current;
|
|
5486
5770
|
if (!currentRef) return;
|
|
5487
5771
|
if (typeof IntersectionObserver === "undefined") {
|
|
@@ -5506,12 +5790,12 @@ var init_CounterNodeClient = __esm({
|
|
|
5506
5790
|
}, [runAnimation]);
|
|
5507
5791
|
if (!node) return null;
|
|
5508
5792
|
const alignClass = format && FORMAT_CLASSES2[format] || "justify-center text-center";
|
|
5509
|
-
return /* @__PURE__ */ (0,
|
|
5793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5510
5794
|
"div",
|
|
5511
5795
|
{
|
|
5512
5796
|
ref,
|
|
5513
5797
|
className: `counter-node inline-flex items-center ${alignClass}`,
|
|
5514
|
-
children: /* @__PURE__ */ (0,
|
|
5798
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "counter-display text-3xl font-bold tracking-tight", children: [
|
|
5515
5799
|
prefix,
|
|
5516
5800
|
displayValue.toLocaleString(),
|
|
5517
5801
|
suffix
|
|
@@ -5529,9 +5813,9 @@ __export(CopyButton_exports, {
|
|
|
5529
5813
|
default: () => CopyButton
|
|
5530
5814
|
});
|
|
5531
5815
|
function CopyButton({ text }) {
|
|
5532
|
-
const [copied, setCopied] = (0,
|
|
5533
|
-
const timeoutRef = (0,
|
|
5534
|
-
(0,
|
|
5816
|
+
const [copied, setCopied] = (0, import_react55.useState)(false);
|
|
5817
|
+
const timeoutRef = (0, import_react55.useRef)(null);
|
|
5818
|
+
(0, import_react55.useEffect)(() => {
|
|
5535
5819
|
return () => {
|
|
5536
5820
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5537
5821
|
};
|
|
@@ -5546,13 +5830,13 @@ function CopyButton({ text }) {
|
|
|
5546
5830
|
console.error("Failed to copy: ", err);
|
|
5547
5831
|
}
|
|
5548
5832
|
};
|
|
5549
|
-
return /* @__PURE__ */ (0,
|
|
5833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
5550
5834
|
"button",
|
|
5551
5835
|
{
|
|
5552
5836
|
onClick: handleCopy,
|
|
5553
5837
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
5554
5838
|
children: [
|
|
5555
|
-
/* @__PURE__ */ (0,
|
|
5839
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
5556
5840
|
"svg",
|
|
5557
5841
|
{
|
|
5558
5842
|
width: "16",
|
|
@@ -5560,7 +5844,7 @@ function CopyButton({ text }) {
|
|
|
5560
5844
|
viewBox: "0 0 24 24",
|
|
5561
5845
|
className: "w-4 h-4",
|
|
5562
5846
|
fill: "currentColor",
|
|
5563
|
-
children: /* @__PURE__ */ (0,
|
|
5847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
5564
5848
|
"path",
|
|
5565
5849
|
{
|
|
5566
5850
|
fillRule: "evenodd",
|
|
@@ -5575,54 +5859,54 @@ function CopyButton({ text }) {
|
|
|
5575
5859
|
}
|
|
5576
5860
|
);
|
|
5577
5861
|
}
|
|
5578
|
-
var
|
|
5862
|
+
var import_react55, import_jsx_runtime76;
|
|
5579
5863
|
var init_CopyButton = __esm({
|
|
5580
5864
|
"src/components/CopyButton.tsx"() {
|
|
5581
5865
|
"use strict";
|
|
5582
5866
|
"use client";
|
|
5583
|
-
|
|
5584
|
-
|
|
5867
|
+
import_react55 = require("react");
|
|
5868
|
+
import_jsx_runtime76 = require("react/jsx-runtime");
|
|
5585
5869
|
}
|
|
5586
5870
|
});
|
|
5587
5871
|
|
|
5588
5872
|
// src/components/IFrameLoaderView.tsx
|
|
5589
|
-
var
|
|
5873
|
+
var import_react58, import_jsx_runtime80, IFrameLoaderView, IFrameLoaderView_default;
|
|
5590
5874
|
var init_IFrameLoaderView = __esm({
|
|
5591
5875
|
"src/components/IFrameLoaderView.tsx"() {
|
|
5592
5876
|
"use strict";
|
|
5593
|
-
|
|
5594
|
-
|
|
5877
|
+
import_react58 = __toESM(require("react"));
|
|
5878
|
+
import_jsx_runtime80 = require("react/jsx-runtime");
|
|
5595
5879
|
IFrameLoaderView = (props) => {
|
|
5596
|
-
return /* @__PURE__ */ (0,
|
|
5597
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
5598
|
-
/* @__PURE__ */ (0,
|
|
5599
|
-
/* @__PURE__ */ (0,
|
|
5600
|
-
/* @__PURE__ */ (0,
|
|
5601
|
-
/* @__PURE__ */ (0,
|
|
5602
|
-
/* @__PURE__ */ (0,
|
|
5880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_react58.default.Fragment, { children: [
|
|
5881
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
5882
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
5883
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
5884
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ml-2", children: [
|
|
5885
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
5886
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
5603
5887
|
] })
|
|
5604
5888
|
] }),
|
|
5605
|
-
/* @__PURE__ */ (0,
|
|
5606
|
-
/* @__PURE__ */ (0,
|
|
5607
|
-
/* @__PURE__ */ (0,
|
|
5608
|
-
/* @__PURE__ */ (0,
|
|
5609
|
-
/* @__PURE__ */ (0,
|
|
5610
|
-
/* @__PURE__ */ (0,
|
|
5611
|
-
/* @__PURE__ */ (0,
|
|
5889
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
5890
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "animate-pulse", children: [
|
|
5891
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5892
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5893
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5894
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5895
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5612
5896
|
] }),
|
|
5613
|
-
/* @__PURE__ */ (0,
|
|
5614
|
-
/* @__PURE__ */ (0,
|
|
5615
|
-
/* @__PURE__ */ (0,
|
|
5616
|
-
/* @__PURE__ */ (0,
|
|
5617
|
-
/* @__PURE__ */ (0,
|
|
5618
|
-
/* @__PURE__ */ (0,
|
|
5897
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "animate-pulse", children: [
|
|
5898
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5899
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5900
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5901
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5902
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5619
5903
|
] }),
|
|
5620
|
-
/* @__PURE__ */ (0,
|
|
5621
|
-
/* @__PURE__ */ (0,
|
|
5622
|
-
/* @__PURE__ */ (0,
|
|
5623
|
-
/* @__PURE__ */ (0,
|
|
5624
|
-
/* @__PURE__ */ (0,
|
|
5625
|
-
/* @__PURE__ */ (0,
|
|
5904
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "animate-pulse", children: [
|
|
5905
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5906
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5907
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5908
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5909
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5626
5910
|
] })
|
|
5627
5911
|
] })
|
|
5628
5912
|
] }) }),
|
|
@@ -5638,23 +5922,23 @@ var IframeClient_exports = {};
|
|
|
5638
5922
|
__export(IframeClient_exports, {
|
|
5639
5923
|
default: () => IframeClient_default
|
|
5640
5924
|
});
|
|
5641
|
-
var
|
|
5925
|
+
var import_react59, import_jsx_runtime81, IframeClient, IframeClient_default;
|
|
5642
5926
|
var init_IframeClient = __esm({
|
|
5643
5927
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
5644
5928
|
"use strict";
|
|
5645
5929
|
"use client";
|
|
5646
|
-
|
|
5930
|
+
import_react59 = __toESM(require("react"));
|
|
5647
5931
|
init_IFrameLoaderView();
|
|
5648
|
-
|
|
5932
|
+
import_jsx_runtime81 = require("react/jsx-runtime");
|
|
5649
5933
|
IframeClient = ({
|
|
5650
5934
|
src,
|
|
5651
5935
|
width,
|
|
5652
5936
|
height
|
|
5653
5937
|
}) => {
|
|
5654
|
-
const iframeRef = (0,
|
|
5655
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
5656
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
5657
|
-
(0,
|
|
5938
|
+
const iframeRef = (0, import_react59.useRef)(null);
|
|
5939
|
+
const [iframeHeight, setIframeHeight] = (0, import_react59.useState)("100%");
|
|
5940
|
+
const [isDataFound, setIsDataFound] = (0, import_react59.useState)(null);
|
|
5941
|
+
(0, import_react59.useEffect)(() => {
|
|
5658
5942
|
const handleReceiveMessage = (event) => {
|
|
5659
5943
|
const eventName = event?.data?.eventName;
|
|
5660
5944
|
const payload = event?.data?.payload;
|
|
@@ -5669,7 +5953,7 @@ var init_IframeClient = __esm({
|
|
|
5669
5953
|
window.addEventListener("message", handleReceiveMessage);
|
|
5670
5954
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
5671
5955
|
}, []);
|
|
5672
|
-
(0,
|
|
5956
|
+
(0, import_react59.useEffect)(() => {
|
|
5673
5957
|
const handleResize = () => {
|
|
5674
5958
|
if (iframeRef.current) {
|
|
5675
5959
|
iframeRef.current.contentWindow?.postMessage(
|
|
@@ -5684,7 +5968,7 @@ var init_IframeClient = __esm({
|
|
|
5684
5968
|
const handleIframeLoad = () => {
|
|
5685
5969
|
setIsDataFound(true);
|
|
5686
5970
|
};
|
|
5687
|
-
return /* @__PURE__ */ (0,
|
|
5971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react59.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
5688
5972
|
"iframe",
|
|
5689
5973
|
{
|
|
5690
5974
|
ref: iframeRef,
|
|
@@ -5944,22 +6228,22 @@ var MediaAccordionNodeClient_exports = {};
|
|
|
5944
6228
|
__export(MediaAccordionNodeClient_exports, {
|
|
5945
6229
|
default: () => MediaAccordionNodeClient_default
|
|
5946
6230
|
});
|
|
5947
|
-
var
|
|
6231
|
+
var import_react60, import_dynamic15, import_image, import_jsx_runtime88, HlsPlayer5, isHlsUrl, isVideoUrl, MediaAccordionNodeClient, MediaAccordionNodeClient_default;
|
|
5948
6232
|
var init_MediaAccordionNodeClient = __esm({
|
|
5949
6233
|
"src/components/pageRenderingEngine/nodes/MediaAccordionNodeClient.tsx"() {
|
|
5950
6234
|
"use strict";
|
|
5951
6235
|
"use client";
|
|
5952
|
-
|
|
6236
|
+
import_react60 = require("react");
|
|
5953
6237
|
import_dynamic15 = __toESM(require("next/dynamic"));
|
|
5954
6238
|
import_image = __toESM(require("next/image"));
|
|
5955
6239
|
init_AssetUtility();
|
|
5956
|
-
|
|
6240
|
+
import_jsx_runtime88 = require("react/jsx-runtime");
|
|
5957
6241
|
HlsPlayer5 = (0, import_dynamic15.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
5958
6242
|
isHlsUrl = (url) => /\.m3u8(?:$|[?#])/i.test(url);
|
|
5959
6243
|
isVideoUrl = (url) => /\.(mp4|webm|ogv)(?:$|[?#])/i.test(url);
|
|
5960
6244
|
MediaAccordionNodeClient = (props) => {
|
|
5961
6245
|
const items = Array.isArray(props.node.items) ? props.node.items : [];
|
|
5962
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
6246
|
+
const [activeIndex, setActiveIndex] = (0, import_react60.useState)(0);
|
|
5963
6247
|
const activeItem = items[activeIndex] ?? items[0];
|
|
5964
6248
|
const buttonBackground = props.node.buttonBackgroundLayers?.length ? props.node.buttonBackgroundLayers.slice(0, 1).map((layer) => {
|
|
5965
6249
|
const colors = layer.value.colors.map((stop) => `color-mix(in srgb, ${stop.color}, transparent ${stop.transparency ?? 0}%) ${stop.position}%`).join(", ");
|
|
@@ -5972,7 +6256,7 @@ var init_MediaAccordionNodeClient = __esm({
|
|
|
5972
6256
|
const posterUrl = resolveUrl(item.posterUrl);
|
|
5973
6257
|
if (!mediaUrl) return null;
|
|
5974
6258
|
if (item.mediaType === "image") {
|
|
5975
|
-
return /* @__PURE__ */ (0,
|
|
6259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5976
6260
|
import_image.default,
|
|
5977
6261
|
{
|
|
5978
6262
|
className: "story-accordion__media-image",
|
|
@@ -5986,7 +6270,7 @@ var init_MediaAccordionNodeClient = __esm({
|
|
|
5986
6270
|
);
|
|
5987
6271
|
}
|
|
5988
6272
|
if (isHlsUrl(mediaUrl)) {
|
|
5989
|
-
return /* @__PURE__ */ (0,
|
|
6273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
5990
6274
|
HlsPlayer5,
|
|
5991
6275
|
{
|
|
5992
6276
|
assetUrl: mediaUrl,
|
|
@@ -5998,7 +6282,7 @@ var init_MediaAccordionNodeClient = __esm({
|
|
|
5998
6282
|
);
|
|
5999
6283
|
}
|
|
6000
6284
|
if (item.mediaType === "video" || isVideoUrl(mediaUrl)) {
|
|
6001
|
-
return /* @__PURE__ */ (0,
|
|
6285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6002
6286
|
"video",
|
|
6003
6287
|
{
|
|
6004
6288
|
className: "story-accordion__media-video",
|
|
@@ -6010,7 +6294,7 @@ var init_MediaAccordionNodeClient = __esm({
|
|
|
6010
6294
|
}
|
|
6011
6295
|
);
|
|
6012
6296
|
}
|
|
6013
|
-
return /* @__PURE__ */ (0,
|
|
6297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6014
6298
|
import_image.default,
|
|
6015
6299
|
{
|
|
6016
6300
|
className: "story-accordion__media-image",
|
|
@@ -6024,7 +6308,7 @@ var init_MediaAccordionNodeClient = __esm({
|
|
|
6024
6308
|
);
|
|
6025
6309
|
};
|
|
6026
6310
|
if (items.length === 0) return null;
|
|
6027
|
-
return /* @__PURE__ */ (0,
|
|
6311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
6028
6312
|
"section",
|
|
6029
6313
|
{
|
|
6030
6314
|
className: "story-accordion",
|
|
@@ -6044,7 +6328,7 @@ var init_MediaAccordionNodeClient = __esm({
|
|
|
6044
6328
|
"--story-button-border-width": `${Math.max(0, props.node.buttonBorderWidth ?? 1)}px`
|
|
6045
6329
|
},
|
|
6046
6330
|
children: [
|
|
6047
|
-
/* @__PURE__ */ (0,
|
|
6331
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("style", { children: `
|
|
6048
6332
|
.story-accordion { display:grid; grid-template-columns:minmax(0,var(--story-media-ratio,1.45fr)) minmax(260px,1fr); gap:20px; align-items:stretch; width:100%; padding:16px; border-radius:14px; background:var(--neutral); }
|
|
6049
6333
|
.story-accordion__media { position:relative; min-height:320px; overflow:hidden; border-radius:10px; background:var(--neutral-border); }
|
|
6050
6334
|
.story-accordion__media > * { display:block; width:100%; height:100%; min-height:320px; }
|
|
@@ -6057,8 +6341,8 @@ var init_MediaAccordionNodeClient = __esm({
|
|
|
6057
6341
|
.story-accordion__item:focus-visible { outline:3px solid var(--primary-action-fill); outline-offset:2px; }
|
|
6058
6342
|
@media(max-width:700px) { .story-accordion { grid-template-columns:minmax(0,1fr); gap:14px; padding:10px; } .story-accordion__media, .story-accordion__media > * { min-height:220px; } .story-accordion__list { gap:8px; } .story-accordion__item { min-height:48px; } }
|
|
6059
6343
|
` }),
|
|
6060
|
-
/* @__PURE__ */ (0,
|
|
6061
|
-
/* @__PURE__ */ (0,
|
|
6344
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "story-accordion__media", children: activeItem ? renderMedia(activeItem) : null }),
|
|
6345
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "story-accordion__list", role: "group", "aria-label": "Choose a story", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6062
6346
|
"button",
|
|
6063
6347
|
{
|
|
6064
6348
|
type: "button",
|
|
@@ -6091,21 +6375,21 @@ var Pagination_exports = {};
|
|
|
6091
6375
|
__export(Pagination_exports, {
|
|
6092
6376
|
default: () => Pagination_default
|
|
6093
6377
|
});
|
|
6094
|
-
var
|
|
6378
|
+
var import_react61, import_jsx_runtime90, Pagination, Pagination_default;
|
|
6095
6379
|
var init_Pagination = __esm({
|
|
6096
6380
|
"src/components/Pagination.tsx"() {
|
|
6097
6381
|
"use strict";
|
|
6098
6382
|
"use client";
|
|
6099
|
-
|
|
6383
|
+
import_react61 = require("react");
|
|
6100
6384
|
init_OdataBuilder();
|
|
6101
6385
|
init_Icon();
|
|
6102
6386
|
init_StyleTypes();
|
|
6103
6387
|
init_InputControlType();
|
|
6104
6388
|
init_Hyperlink();
|
|
6105
|
-
|
|
6389
|
+
import_jsx_runtime90 = require("react/jsx-runtime");
|
|
6106
6390
|
Pagination = (props) => {
|
|
6107
6391
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
6108
|
-
const builder = (0,
|
|
6392
|
+
const builder = (0, import_react61.useMemo)(() => {
|
|
6109
6393
|
const b = new OdataBuilder(path);
|
|
6110
6394
|
if (query) b.setQuery(query);
|
|
6111
6395
|
return b;
|
|
@@ -6146,7 +6430,7 @@ var init_Pagination = __esm({
|
|
|
6146
6430
|
return range;
|
|
6147
6431
|
};
|
|
6148
6432
|
const paginationRange = getPaginationRange();
|
|
6149
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
6433
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6150
6434
|
Hyperlink,
|
|
6151
6435
|
{
|
|
6152
6436
|
linkType: "Link" /* Link */,
|
|
@@ -6161,9 +6445,9 @@ var init_Pagination = __esm({
|
|
|
6161
6445
|
);
|
|
6162
6446
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
6163
6447
|
if (disabled) {
|
|
6164
|
-
return /* @__PURE__ */ (0,
|
|
6448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.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 });
|
|
6165
6449
|
}
|
|
6166
|
-
return /* @__PURE__ */ (0,
|
|
6450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6167
6451
|
Hyperlink,
|
|
6168
6452
|
{
|
|
6169
6453
|
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",
|
|
@@ -6173,35 +6457,35 @@ var init_Pagination = __esm({
|
|
|
6173
6457
|
);
|
|
6174
6458
|
};
|
|
6175
6459
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
6176
|
-
return /* @__PURE__ */ (0,
|
|
6177
|
-
/* @__PURE__ */ (0,
|
|
6178
|
-
/* @__PURE__ */ (0,
|
|
6460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "py-6 border-t mt-6", children: [
|
|
6461
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
6462
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "text-sm", children: [
|
|
6179
6463
|
"Showing ",
|
|
6180
|
-
/* @__PURE__ */ (0,
|
|
6464
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "font-semibold", children: [
|
|
6181
6465
|
startItem,
|
|
6182
6466
|
"-",
|
|
6183
6467
|
endItem
|
|
6184
6468
|
] }),
|
|
6185
6469
|
" ",
|
|
6186
6470
|
"out of ",
|
|
6187
|
-
/* @__PURE__ */ (0,
|
|
6471
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
6188
6472
|
" results"
|
|
6189
6473
|
] }),
|
|
6190
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
6191
|
-
/* @__PURE__ */ (0,
|
|
6474
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
6475
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
6192
6476
|
NavigationButton,
|
|
6193
6477
|
{
|
|
6194
6478
|
page: activePageNumber - 1,
|
|
6195
6479
|
disabled: activePageNumber === 1,
|
|
6196
6480
|
children: [
|
|
6197
|
-
/* @__PURE__ */ (0,
|
|
6198
|
-
/* @__PURE__ */ (0,
|
|
6481
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
6482
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
6199
6483
|
]
|
|
6200
6484
|
}
|
|
6201
6485
|
),
|
|
6202
6486
|
paginationRange.map((item, index) => {
|
|
6203
6487
|
if (item === "...") {
|
|
6204
|
-
return /* @__PURE__ */ (0,
|
|
6488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6205
6489
|
"span",
|
|
6206
6490
|
{
|
|
6207
6491
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -6211,23 +6495,23 @@ var init_Pagination = __esm({
|
|
|
6211
6495
|
);
|
|
6212
6496
|
}
|
|
6213
6497
|
const page = item;
|
|
6214
|
-
return /* @__PURE__ */ (0,
|
|
6498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(PageButton, { page, children: page }, page);
|
|
6215
6499
|
}),
|
|
6216
|
-
/* @__PURE__ */ (0,
|
|
6500
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
6217
6501
|
NavigationButton,
|
|
6218
6502
|
{
|
|
6219
6503
|
page: activePageNumber + 1,
|
|
6220
6504
|
disabled: activePageNumber === totalPages,
|
|
6221
6505
|
children: [
|
|
6222
|
-
/* @__PURE__ */ (0,
|
|
6223
|
-
/* @__PURE__ */ (0,
|
|
6506
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
6507
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
6224
6508
|
]
|
|
6225
6509
|
}
|
|
6226
6510
|
)
|
|
6227
6511
|
] }),
|
|
6228
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
6229
|
-
/* @__PURE__ */ (0,
|
|
6230
|
-
/* @__PURE__ */ (0,
|
|
6512
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
6513
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
6514
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6231
6515
|
"input",
|
|
6232
6516
|
{
|
|
6233
6517
|
type: "number",
|
|
@@ -6248,9 +6532,9 @@ var init_Pagination = __esm({
|
|
|
6248
6532
|
) })
|
|
6249
6533
|
] })
|
|
6250
6534
|
] }),
|
|
6251
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
6252
|
-
/* @__PURE__ */ (0,
|
|
6253
|
-
/* @__PURE__ */ (0,
|
|
6535
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
6536
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
6537
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6254
6538
|
Hyperlink,
|
|
6255
6539
|
{
|
|
6256
6540
|
className: `
|
|
@@ -6262,7 +6546,7 @@ var init_Pagination = __esm({
|
|
|
6262
6546
|
},
|
|
6263
6547
|
size
|
|
6264
6548
|
)) }),
|
|
6265
|
-
/* @__PURE__ */ (0,
|
|
6549
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-sm", children: "per page" })
|
|
6266
6550
|
] }) })
|
|
6267
6551
|
] });
|
|
6268
6552
|
};
|
|
@@ -6275,16 +6559,16 @@ var DataBindingControls_exports = {};
|
|
|
6275
6559
|
__export(DataBindingControls_exports, {
|
|
6276
6560
|
default: () => DataBindingControls_default
|
|
6277
6561
|
});
|
|
6278
|
-
var
|
|
6562
|
+
var import_react62, import_navigation, import_jsx_runtime91, humanize, escapeODataString, parseFacetSelections, buildFacetFilter, parseODataSearch, SearchIcon, ResetIcon, FilterSlidersIcon, ChevronDownIcon, CheckIcon, CloseIcon, MapPinIcon, BriefcaseIcon, FileTextIcon, TagIcon, getCategoryIcon, normalizeSortOption, DataBindingControls, DataBindingControls_default;
|
|
6279
6563
|
var init_DataBindingControls = __esm({
|
|
6280
6564
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
6281
6565
|
"use strict";
|
|
6282
6566
|
"use client";
|
|
6283
|
-
|
|
6567
|
+
import_react62 = require("react");
|
|
6284
6568
|
import_navigation = require("next/navigation");
|
|
6285
6569
|
init_Button();
|
|
6286
6570
|
init_StyleTypes();
|
|
6287
|
-
|
|
6571
|
+
import_jsx_runtime91 = require("react/jsx-runtime");
|
|
6288
6572
|
humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
6289
6573
|
escapeODataString = (value) => value.replace(/'/g, "''");
|
|
6290
6574
|
parseFacetSelections = (filter) => {
|
|
@@ -6307,7 +6591,7 @@ var init_DataBindingControls = __esm({
|
|
|
6307
6591
|
}
|
|
6308
6592
|
return trimmedValue;
|
|
6309
6593
|
};
|
|
6310
|
-
SearchIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6594
|
+
SearchIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6311
6595
|
"svg",
|
|
6312
6596
|
{
|
|
6313
6597
|
"aria-hidden": "true",
|
|
@@ -6317,12 +6601,12 @@ var init_DataBindingControls = __esm({
|
|
|
6317
6601
|
stroke: "currentColor",
|
|
6318
6602
|
strokeWidth: "2",
|
|
6319
6603
|
children: [
|
|
6320
|
-
/* @__PURE__ */ (0,
|
|
6321
|
-
/* @__PURE__ */ (0,
|
|
6604
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("circle", { cx: "11", cy: "11", r: "7" }),
|
|
6605
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { strokeLinecap: "round", d: "m20 20-4-4" })
|
|
6322
6606
|
]
|
|
6323
6607
|
}
|
|
6324
6608
|
);
|
|
6325
|
-
ResetIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6609
|
+
ResetIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6326
6610
|
"svg",
|
|
6327
6611
|
{
|
|
6328
6612
|
"aria-hidden": "true",
|
|
@@ -6332,8 +6616,8 @@ var init_DataBindingControls = __esm({
|
|
|
6332
6616
|
stroke: "currentColor",
|
|
6333
6617
|
strokeWidth: "2",
|
|
6334
6618
|
children: [
|
|
6335
|
-
/* @__PURE__ */ (0,
|
|
6336
|
-
/* @__PURE__ */ (0,
|
|
6619
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 4v6h6" }),
|
|
6620
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6337
6621
|
"path",
|
|
6338
6622
|
{
|
|
6339
6623
|
strokeLinecap: "round",
|
|
@@ -6344,7 +6628,7 @@ var init_DataBindingControls = __esm({
|
|
|
6344
6628
|
]
|
|
6345
6629
|
}
|
|
6346
6630
|
);
|
|
6347
|
-
FilterSlidersIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6631
|
+
FilterSlidersIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6348
6632
|
"svg",
|
|
6349
6633
|
{
|
|
6350
6634
|
"aria-hidden": "true",
|
|
@@ -6354,14 +6638,14 @@ var init_DataBindingControls = __esm({
|
|
|
6354
6638
|
stroke: "currentColor",
|
|
6355
6639
|
strokeWidth: "2",
|
|
6356
6640
|
children: [
|
|
6357
|
-
/* @__PURE__ */ (0,
|
|
6358
|
-
/* @__PURE__ */ (0,
|
|
6359
|
-
/* @__PURE__ */ (0,
|
|
6360
|
-
/* @__PURE__ */ (0,
|
|
6641
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 4h18M3 12h18M3 20h18" }),
|
|
6642
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("circle", { cx: "8", cy: "4", r: "2", fill: "currentColor" }),
|
|
6643
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("circle", { cx: "16", cy: "12", r: "2", fill: "currentColor" }),
|
|
6644
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("circle", { cx: "10", cy: "20", r: "2", fill: "currentColor" })
|
|
6361
6645
|
]
|
|
6362
6646
|
}
|
|
6363
6647
|
);
|
|
6364
|
-
ChevronDownIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6648
|
+
ChevronDownIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6365
6649
|
"svg",
|
|
6366
6650
|
{
|
|
6367
6651
|
"aria-hidden": "true",
|
|
@@ -6370,10 +6654,10 @@ var init_DataBindingControls = __esm({
|
|
|
6370
6654
|
viewBox: "0 0 24 24",
|
|
6371
6655
|
stroke: "currentColor",
|
|
6372
6656
|
strokeWidth: "2",
|
|
6373
|
-
children: /* @__PURE__ */ (0,
|
|
6657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19 9-7 7-7-7" })
|
|
6374
6658
|
}
|
|
6375
6659
|
);
|
|
6376
|
-
CheckIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6660
|
+
CheckIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6377
6661
|
"svg",
|
|
6378
6662
|
{
|
|
6379
6663
|
"aria-hidden": "true",
|
|
@@ -6382,10 +6666,10 @@ var init_DataBindingControls = __esm({
|
|
|
6382
6666
|
viewBox: "0 0 24 24",
|
|
6383
6667
|
stroke: "currentColor",
|
|
6384
6668
|
strokeWidth: "2.5",
|
|
6385
|
-
children: /* @__PURE__ */ (0,
|
|
6669
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
|
|
6386
6670
|
}
|
|
6387
6671
|
);
|
|
6388
|
-
CloseIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6672
|
+
CloseIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6389
6673
|
"svg",
|
|
6390
6674
|
{
|
|
6391
6675
|
"aria-hidden": "true",
|
|
@@ -6394,10 +6678,10 @@ var init_DataBindingControls = __esm({
|
|
|
6394
6678
|
viewBox: "0 0 24 24",
|
|
6395
6679
|
stroke: "currentColor",
|
|
6396
6680
|
strokeWidth: "2",
|
|
6397
|
-
children: /* @__PURE__ */ (0,
|
|
6681
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
6398
6682
|
}
|
|
6399
6683
|
);
|
|
6400
|
-
MapPinIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6684
|
+
MapPinIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6401
6685
|
"svg",
|
|
6402
6686
|
{
|
|
6403
6687
|
"aria-hidden": "true",
|
|
@@ -6407,7 +6691,7 @@ var init_DataBindingControls = __esm({
|
|
|
6407
6691
|
stroke: "currentColor",
|
|
6408
6692
|
strokeWidth: "2",
|
|
6409
6693
|
children: [
|
|
6410
|
-
/* @__PURE__ */ (0,
|
|
6694
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6411
6695
|
"path",
|
|
6412
6696
|
{
|
|
6413
6697
|
strokeLinecap: "round",
|
|
@@ -6415,7 +6699,7 @@ var init_DataBindingControls = __esm({
|
|
|
6415
6699
|
d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
6416
6700
|
}
|
|
6417
6701
|
),
|
|
6418
|
-
/* @__PURE__ */ (0,
|
|
6702
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6419
6703
|
"path",
|
|
6420
6704
|
{
|
|
6421
6705
|
strokeLinecap: "round",
|
|
@@ -6426,7 +6710,7 @@ var init_DataBindingControls = __esm({
|
|
|
6426
6710
|
]
|
|
6427
6711
|
}
|
|
6428
6712
|
);
|
|
6429
|
-
BriefcaseIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6713
|
+
BriefcaseIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6430
6714
|
"svg",
|
|
6431
6715
|
{
|
|
6432
6716
|
"aria-hidden": "true",
|
|
@@ -6435,7 +6719,7 @@ var init_DataBindingControls = __esm({
|
|
|
6435
6719
|
viewBox: "0 0 24 24",
|
|
6436
6720
|
stroke: "currentColor",
|
|
6437
6721
|
strokeWidth: "2",
|
|
6438
|
-
children: /* @__PURE__ */ (0,
|
|
6722
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6439
6723
|
"path",
|
|
6440
6724
|
{
|
|
6441
6725
|
strokeLinecap: "round",
|
|
@@ -6445,7 +6729,7 @@ var init_DataBindingControls = __esm({
|
|
|
6445
6729
|
)
|
|
6446
6730
|
}
|
|
6447
6731
|
);
|
|
6448
|
-
FileTextIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6732
|
+
FileTextIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6449
6733
|
"svg",
|
|
6450
6734
|
{
|
|
6451
6735
|
"aria-hidden": "true",
|
|
@@ -6454,7 +6738,7 @@ var init_DataBindingControls = __esm({
|
|
|
6454
6738
|
viewBox: "0 0 24 24",
|
|
6455
6739
|
stroke: "currentColor",
|
|
6456
6740
|
strokeWidth: "2",
|
|
6457
|
-
children: /* @__PURE__ */ (0,
|
|
6741
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6458
6742
|
"path",
|
|
6459
6743
|
{
|
|
6460
6744
|
strokeLinecap: "round",
|
|
@@ -6464,7 +6748,7 @@ var init_DataBindingControls = __esm({
|
|
|
6464
6748
|
)
|
|
6465
6749
|
}
|
|
6466
6750
|
);
|
|
6467
|
-
TagIcon = ({ className = "" }) => /* @__PURE__ */ (0,
|
|
6751
|
+
TagIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6468
6752
|
"svg",
|
|
6469
6753
|
{
|
|
6470
6754
|
"aria-hidden": "true",
|
|
@@ -6473,7 +6757,7 @@ var init_DataBindingControls = __esm({
|
|
|
6473
6757
|
viewBox: "0 0 24 24",
|
|
6474
6758
|
stroke: "currentColor",
|
|
6475
6759
|
strokeWidth: "2",
|
|
6476
|
-
children: /* @__PURE__ */ (0,
|
|
6760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6477
6761
|
"path",
|
|
6478
6762
|
{
|
|
6479
6763
|
strokeLinecap: "round",
|
|
@@ -6486,15 +6770,15 @@ var init_DataBindingControls = __esm({
|
|
|
6486
6770
|
getCategoryIcon = (category) => {
|
|
6487
6771
|
const lower = category.toLowerCase();
|
|
6488
6772
|
if (lower.includes("location") || lower.includes("city") || lower.includes("country") || lower.includes("state") || lower.includes("address")) {
|
|
6489
|
-
return /* @__PURE__ */ (0,
|
|
6773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(MapPinIcon, { className: "h-4 w-4" });
|
|
6490
6774
|
}
|
|
6491
6775
|
if (lower.includes("type") || lower.includes("work") || lower.includes("employment") || lower.includes("experience")) {
|
|
6492
|
-
return /* @__PURE__ */ (0,
|
|
6776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(BriefcaseIcon, { className: "h-4 w-4" });
|
|
6493
6777
|
}
|
|
6494
6778
|
if (lower.includes("department") || lower.includes("category") || lower.includes("role") || lower.includes("industry")) {
|
|
6495
|
-
return /* @__PURE__ */ (0,
|
|
6779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(FileTextIcon, { className: "h-4 w-4" });
|
|
6496
6780
|
}
|
|
6497
|
-
return /* @__PURE__ */ (0,
|
|
6781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(TagIcon, { className: "h-4 w-4" });
|
|
6498
6782
|
};
|
|
6499
6783
|
normalizeSortOption = (option) => {
|
|
6500
6784
|
const direction = option.direction.trim();
|
|
@@ -6516,13 +6800,13 @@ var init_DataBindingControls = __esm({
|
|
|
6516
6800
|
}) => {
|
|
6517
6801
|
const router = (0, import_navigation.useRouter)();
|
|
6518
6802
|
const searchParams = (0, import_navigation.useSearchParams)();
|
|
6519
|
-
const [collapsedCategories, setCollapsedCategories] = (0,
|
|
6520
|
-
const [isSortOpen, setIsSortOpen] = (0,
|
|
6521
|
-
const [isMobileFiltersOpen, setIsMobileFiltersOpen] = (0,
|
|
6522
|
-
const [facetCategorySearch, setFacetCategorySearch] = (0,
|
|
6523
|
-
const desktopSortDropdownRef = (0,
|
|
6524
|
-
const mobileSortDropdownRef = (0,
|
|
6525
|
-
(0,
|
|
6803
|
+
const [collapsedCategories, setCollapsedCategories] = (0, import_react62.useState)({});
|
|
6804
|
+
const [isSortOpen, setIsSortOpen] = (0, import_react62.useState)(false);
|
|
6805
|
+
const [isMobileFiltersOpen, setIsMobileFiltersOpen] = (0, import_react62.useState)(false);
|
|
6806
|
+
const [facetCategorySearch, setFacetCategorySearch] = (0, import_react62.useState)({});
|
|
6807
|
+
const desktopSortDropdownRef = (0, import_react62.useRef)(null);
|
|
6808
|
+
const mobileSortDropdownRef = (0, import_react62.useRef)(null);
|
|
6809
|
+
(0, import_react62.useEffect)(() => {
|
|
6526
6810
|
const handleClickOutside = (event) => {
|
|
6527
6811
|
const target = event.target;
|
|
6528
6812
|
const clickedInsideDesktop = desktopSortDropdownRef.current?.contains(target);
|
|
@@ -6548,15 +6832,15 @@ var init_DataBindingControls = __esm({
|
|
|
6548
6832
|
const currentSearch = parseODataSearch(
|
|
6549
6833
|
searchParamsSearch !== void 0 && searchParamsSearch !== null ? searchParamsSearch : query?.["$search"]
|
|
6550
6834
|
);
|
|
6551
|
-
const [searchText, setSearchText] = (0,
|
|
6552
|
-
(0,
|
|
6835
|
+
const [searchText, setSearchText] = (0, import_react62.useState)(currentSearch);
|
|
6836
|
+
(0, import_react62.useEffect)(() => {
|
|
6553
6837
|
setSearchText(currentSearch);
|
|
6554
6838
|
}, [currentSearch]);
|
|
6555
|
-
const selectedFacetValues = (0,
|
|
6839
|
+
const selectedFacetValues = (0, import_react62.useMemo)(
|
|
6556
6840
|
() => parseFacetSelections(currentFilter),
|
|
6557
6841
|
[currentFilter]
|
|
6558
6842
|
);
|
|
6559
|
-
(0,
|
|
6843
|
+
(0, import_react62.useEffect)(() => {
|
|
6560
6844
|
if (isMobileFiltersOpen) {
|
|
6561
6845
|
document.body.style.overflow = "hidden";
|
|
6562
6846
|
} else {
|
|
@@ -6566,7 +6850,7 @@ var init_DataBindingControls = __esm({
|
|
|
6566
6850
|
document.body.style.overflow = "";
|
|
6567
6851
|
};
|
|
6568
6852
|
}, [isMobileFiltersOpen]);
|
|
6569
|
-
const activeFacets = (0,
|
|
6853
|
+
const activeFacets = (0, import_react62.useMemo)(() => {
|
|
6570
6854
|
const facetMap = /* @__PURE__ */ new Map();
|
|
6571
6855
|
if (facets) {
|
|
6572
6856
|
Object.entries(facets).forEach(([field, values]) => {
|
|
@@ -6591,11 +6875,11 @@ var init_DataBindingControls = __esm({
|
|
|
6591
6875
|
});
|
|
6592
6876
|
return Array.from(facetMap.entries());
|
|
6593
6877
|
}, [facets, selectedFacetValues]);
|
|
6594
|
-
const normalizedSortOptions = (0,
|
|
6878
|
+
const normalizedSortOptions = (0, import_react62.useMemo)(
|
|
6595
6879
|
() => (sortOptions ?? []).filter((option) => option?.name && option?.direction).map(normalizeSortOption).filter((option) => option.value),
|
|
6596
6880
|
[sortOptions]
|
|
6597
6881
|
);
|
|
6598
|
-
const selectedSortOption = (0,
|
|
6882
|
+
const selectedSortOption = (0, import_react62.useMemo)(() => {
|
|
6599
6883
|
if (!normalizedSortOptions.length) return null;
|
|
6600
6884
|
const trimmedCurrentSort = currentSort.trim().toLowerCase();
|
|
6601
6885
|
if (!trimmedCurrentSort) return normalizedSortOptions[0];
|
|
@@ -6604,7 +6888,7 @@ var init_DataBindingControls = __esm({
|
|
|
6604
6888
|
) || normalizedSortOptions[0];
|
|
6605
6889
|
}, [normalizedSortOptions, currentSort]);
|
|
6606
6890
|
const selectedSortLabel = selectedSortOption?.label || "";
|
|
6607
|
-
const getQueryUrl = (0,
|
|
6891
|
+
const getQueryUrl = (0, import_react62.useCallback)(
|
|
6608
6892
|
(updates) => {
|
|
6609
6893
|
const initialParams = searchParams ? searchParams.toString() : "";
|
|
6610
6894
|
const params = new URLSearchParams(initialParams || query || {});
|
|
@@ -6622,7 +6906,7 @@ var init_DataBindingControls = __esm({
|
|
|
6622
6906
|
},
|
|
6623
6907
|
[path, query, searchParams]
|
|
6624
6908
|
);
|
|
6625
|
-
const navigateWithoutReload = (0,
|
|
6909
|
+
const navigateWithoutReload = (0, import_react62.useCallback)(
|
|
6626
6910
|
(url) => {
|
|
6627
6911
|
if (typeof window !== "undefined") {
|
|
6628
6912
|
const targetUrl = new URL(url, window.location.origin);
|
|
@@ -6634,7 +6918,7 @@ var init_DataBindingControls = __esm({
|
|
|
6634
6918
|
},
|
|
6635
6919
|
[router]
|
|
6636
6920
|
);
|
|
6637
|
-
const handleSelectSort = (0,
|
|
6921
|
+
const handleSelectSort = (0, import_react62.useCallback)(
|
|
6638
6922
|
(sortValue) => {
|
|
6639
6923
|
setIsSortOpen(false);
|
|
6640
6924
|
navigateWithoutReload(
|
|
@@ -6674,7 +6958,7 @@ var init_DataBindingControls = __esm({
|
|
|
6674
6958
|
})
|
|
6675
6959
|
);
|
|
6676
6960
|
};
|
|
6677
|
-
const handleSearch = (0,
|
|
6961
|
+
const handleSearch = (0, import_react62.useCallback)(async () => {
|
|
6678
6962
|
const trimmedSearchText = searchText.trim();
|
|
6679
6963
|
if (trimmedSearchText === currentSearch.trim()) {
|
|
6680
6964
|
return { isSuccessful: true };
|
|
@@ -6686,7 +6970,7 @@ var init_DataBindingControls = __esm({
|
|
|
6686
6970
|
);
|
|
6687
6971
|
return { isSuccessful: true };
|
|
6688
6972
|
}, [currentSearch, getQueryUrl, navigateWithoutReload, searchText]);
|
|
6689
|
-
const handleClearAll = (0,
|
|
6973
|
+
const handleClearAll = (0, import_react62.useCallback)(async () => {
|
|
6690
6974
|
navigateWithoutReload(
|
|
6691
6975
|
getQueryUrl({
|
|
6692
6976
|
$filter: void 0,
|
|
@@ -6709,9 +6993,9 @@ var init_DataBindingControls = __esm({
|
|
|
6709
6993
|
if (!shouldShowToolbar && !shouldShowFacets) {
|
|
6710
6994
|
return null;
|
|
6711
6995
|
}
|
|
6712
|
-
const renderFacetItems = (field, values) => /* @__PURE__ */ (0,
|
|
6996
|
+
const renderFacetItems = (field, values) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-col gap-1 pt-1 pb-1", children: values.map((facet) => {
|
|
6713
6997
|
const isSelected = selectedFacetValues.get(field) === facet.value;
|
|
6714
|
-
return /* @__PURE__ */ (0,
|
|
6998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6715
6999
|
"button",
|
|
6716
7000
|
{
|
|
6717
7001
|
type: "button",
|
|
@@ -6719,17 +7003,17 @@ var init_DataBindingControls = __esm({
|
|
|
6719
7003
|
"aria-pressed": isSelected,
|
|
6720
7004
|
className: `group flex w-full cursor-pointer items-center justify-between gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base ${isSelected ? "bg-neutral-soft font-medium border border-neutral-soft" : "hover:bg-neutral-weak border border-transparent"}`,
|
|
6721
7005
|
children: [
|
|
6722
|
-
/* @__PURE__ */ (0,
|
|
6723
|
-
/* @__PURE__ */ (0,
|
|
7006
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
7007
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6724
7008
|
"span",
|
|
6725
7009
|
{
|
|
6726
7010
|
className: `flex h-4 w-4 shrink-0 items-center justify-center rounded-[3px] border transition-colors duration-150 ${isSelected ? "bg-primary-base border-primary-base" : " group-hover:border-neutral-strong bg-default border-neutral-soft"}`,
|
|
6727
|
-
children: isSelected && /* @__PURE__ */ (0,
|
|
7011
|
+
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckIcon, { className: "h-3 w-3" })
|
|
6728
7012
|
}
|
|
6729
7013
|
),
|
|
6730
|
-
/* @__PURE__ */ (0,
|
|
7014
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "leading-snug break-words", children: facet.value })
|
|
6731
7015
|
] }),
|
|
6732
|
-
/* @__PURE__ */ (0,
|
|
7016
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6733
7017
|
"span",
|
|
6734
7018
|
{
|
|
6735
7019
|
className: `shrink-0 rounded px-1.5 py-0.5 text-xs transition-colors ml-2 ${isSelected ? "bg-neutral-weak font-semibold" : "bg-neutral-weak font-normal"}`,
|
|
@@ -6741,14 +7025,14 @@ var init_DataBindingControls = __esm({
|
|
|
6741
7025
|
`${field}-${facet.value}`
|
|
6742
7026
|
);
|
|
6743
7027
|
}) });
|
|
6744
|
-
return /* @__PURE__ */ (0,
|
|
7028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6745
7029
|
"div",
|
|
6746
7030
|
{
|
|
6747
7031
|
className: mode === "toolbar" ? "my-4 sm:my-6" : "flex flex-col rounded-md border border-neutral-soft bg-default p-4 shadow-sm",
|
|
6748
7032
|
children: [
|
|
6749
|
-
shouldShowToolbar && /* @__PURE__ */ (0,
|
|
6750
|
-
/* @__PURE__ */ (0,
|
|
6751
|
-
showSearchBar && /* @__PURE__ */ (0,
|
|
7033
|
+
shouldShowToolbar && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
7034
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "hidden lg:flex lg:items-center lg:justify-between lg:gap-4", children: [
|
|
7035
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6752
7036
|
"form",
|
|
6753
7037
|
{
|
|
6754
7038
|
role: "search",
|
|
@@ -6758,9 +7042,9 @@ var init_DataBindingControls = __esm({
|
|
|
6758
7042
|
void handleSearch();
|
|
6759
7043
|
},
|
|
6760
7044
|
children: [
|
|
6761
|
-
/* @__PURE__ */ (0,
|
|
6762
|
-
/* @__PURE__ */ (0,
|
|
6763
|
-
/* @__PURE__ */ (0,
|
|
7045
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "relative min-w-0 flex-1", children: [
|
|
7046
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3.5 top-1/2 z-10 h-4 w-4 -translate-y-1/2 opacity-60" }),
|
|
7047
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6764
7048
|
"input",
|
|
6765
7049
|
{
|
|
6766
7050
|
type: "text",
|
|
@@ -6772,23 +7056,23 @@ var init_DataBindingControls = __esm({
|
|
|
6772
7056
|
}
|
|
6773
7057
|
)
|
|
6774
7058
|
] }),
|
|
6775
|
-
/* @__PURE__ */ (0,
|
|
7059
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6776
7060
|
Button_default,
|
|
6777
7061
|
{
|
|
6778
7062
|
ButtonType: "Primary" /* Solid */,
|
|
6779
7063
|
onClick: handleSearch,
|
|
6780
7064
|
className: "!h-10 !rounded-md !px-5 !py-0 flex items-center justify-center gap-1.5 shrink-0",
|
|
6781
7065
|
children: [
|
|
6782
|
-
/* @__PURE__ */ (0,
|
|
6783
|
-
/* @__PURE__ */ (0,
|
|
7066
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(SearchIcon, { className: "h-4 w-4" }),
|
|
7067
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: "Search" })
|
|
6784
7068
|
]
|
|
6785
7069
|
}
|
|
6786
7070
|
)
|
|
6787
7071
|
]
|
|
6788
7072
|
}
|
|
6789
7073
|
),
|
|
6790
|
-
hasSortControls && /* @__PURE__ */ (0,
|
|
6791
|
-
/* @__PURE__ */ (0,
|
|
7074
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "relative shrink-0", ref: desktopSortDropdownRef, children: [
|
|
7075
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6792
7076
|
"button",
|
|
6793
7077
|
{
|
|
6794
7078
|
type: "button",
|
|
@@ -6796,11 +7080,11 @@ var init_DataBindingControls = __esm({
|
|
|
6796
7080
|
"aria-expanded": isSortOpen,
|
|
6797
7081
|
className: "inline-flex h-10 items-center justify-between gap-2.5 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-normal shadow-sm transition-all hover:bg-neutral-weak focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-base cursor-pointer whitespace-nowrap",
|
|
6798
7082
|
children: [
|
|
6799
|
-
/* @__PURE__ */ (0,
|
|
6800
|
-
/* @__PURE__ */ (0,
|
|
6801
|
-
/* @__PURE__ */ (0,
|
|
7083
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { className: "whitespace-nowrap", children: [
|
|
7084
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "opacity-70", children: "Sort by: " }),
|
|
7085
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "font-semibold", children: selectedSortLabel })
|
|
6802
7086
|
] }),
|
|
6803
|
-
/* @__PURE__ */ (0,
|
|
7087
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6804
7088
|
ChevronDownIcon,
|
|
6805
7089
|
{
|
|
6806
7090
|
className: `h-4 w-4 shrink-0 transition-transform duration-200 ${isSortOpen ? "rotate-180" : ""}`
|
|
@@ -6809,17 +7093,17 @@ var init_DataBindingControls = __esm({
|
|
|
6809
7093
|
]
|
|
6810
7094
|
}
|
|
6811
7095
|
),
|
|
6812
|
-
isSortOpen && /* @__PURE__ */ (0,
|
|
7096
|
+
isSortOpen && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "absolute right-0 z-50 mt-1.5 w-max min-w-full max-h-80 overflow-y-auto rounded-md border border-neutral-soft bg-default p-1 shadow-lg", children: normalizedSortOptions.map((option) => {
|
|
6813
7097
|
const isSelected = selectedSortOption?.value === option.value;
|
|
6814
|
-
return /* @__PURE__ */ (0,
|
|
7098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6815
7099
|
"button",
|
|
6816
7100
|
{
|
|
6817
7101
|
type: "button",
|
|
6818
7102
|
onClick: () => handleSelectSort(option.value),
|
|
6819
7103
|
className: `flex w-full items-center justify-between gap-4 rounded-md px-3 py-1.5 text-left text-sm transition-colors cursor-pointer whitespace-nowrap ${isSelected ? "bg-primary-base font-semibold" : "hover:bg-neutral-soft font-normal"}`,
|
|
6820
7104
|
children: [
|
|
6821
|
-
/* @__PURE__ */ (0,
|
|
6822
|
-
isSelected && /* @__PURE__ */ (0,
|
|
7105
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
|
|
7106
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckIcon, { className: "h-4 w-4 shrink-0" })
|
|
6823
7107
|
]
|
|
6824
7108
|
},
|
|
6825
7109
|
option.value
|
|
@@ -6827,8 +7111,8 @@ var init_DataBindingControls = __esm({
|
|
|
6827
7111
|
}) })
|
|
6828
7112
|
] })
|
|
6829
7113
|
] }),
|
|
6830
|
-
/* @__PURE__ */ (0,
|
|
6831
|
-
showSearchBar && /* @__PURE__ */ (0,
|
|
7114
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-col gap-2.5 lg:hidden", children: [
|
|
7115
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6832
7116
|
"form",
|
|
6833
7117
|
{
|
|
6834
7118
|
role: "search",
|
|
@@ -6838,8 +7122,8 @@ var init_DataBindingControls = __esm({
|
|
|
6838
7122
|
void handleSearch();
|
|
6839
7123
|
},
|
|
6840
7124
|
children: [
|
|
6841
|
-
/* @__PURE__ */ (0,
|
|
6842
|
-
/* @__PURE__ */ (0,
|
|
7125
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3.5 top-1/2 z-10 h-4 w-4 -translate-y-1/2 opacity-50" }),
|
|
7126
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6843
7127
|
"input",
|
|
6844
7128
|
{
|
|
6845
7129
|
type: "text",
|
|
@@ -6853,28 +7137,28 @@ var init_DataBindingControls = __esm({
|
|
|
6853
7137
|
]
|
|
6854
7138
|
}
|
|
6855
7139
|
),
|
|
6856
|
-
/* @__PURE__ */ (0,
|
|
6857
|
-
showFacets && /* @__PURE__ */ (0,
|
|
7140
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between gap-2.5 pt-0.5", children: [
|
|
7141
|
+
showFacets && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6858
7142
|
"button",
|
|
6859
7143
|
{
|
|
6860
7144
|
type: "button",
|
|
6861
7145
|
onClick: () => setIsMobileFiltersOpen(true),
|
|
6862
7146
|
className: "inline-flex h-10 items-center justify-center gap-2 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-medium shadow-sm transition-all hover:bg-neutral-weak cursor-pointer active:scale-95",
|
|
6863
7147
|
children: [
|
|
6864
|
-
/* @__PURE__ */ (0,
|
|
6865
|
-
/* @__PURE__ */ (0,
|
|
7148
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(FilterSlidersIcon, { className: "h-4 w-4" }),
|
|
7149
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { children: [
|
|
6866
7150
|
"Filters",
|
|
6867
7151
|
selectedFacetCount > 0 ? ` (${selectedFacetCount})` : ""
|
|
6868
7152
|
] }),
|
|
6869
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6870
|
-
/* @__PURE__ */ (0,
|
|
6871
|
-
/* @__PURE__ */ (0,
|
|
7153
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { className: "relative flex h-2 w-2", children: [
|
|
7154
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-primary-base opacity-75" }),
|
|
7155
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-primary-base" })
|
|
6872
7156
|
] })
|
|
6873
7157
|
]
|
|
6874
7158
|
}
|
|
6875
7159
|
),
|
|
6876
|
-
hasSortControls && /* @__PURE__ */ (0,
|
|
6877
|
-
/* @__PURE__ */ (0,
|
|
7160
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "relative shrink-0 ml-auto", ref: mobileSortDropdownRef, children: [
|
|
7161
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6878
7162
|
"button",
|
|
6879
7163
|
{
|
|
6880
7164
|
type: "button",
|
|
@@ -6882,8 +7166,8 @@ var init_DataBindingControls = __esm({
|
|
|
6882
7166
|
"aria-expanded": isSortOpen,
|
|
6883
7167
|
className: "inline-flex h-10 items-center justify-between gap-2 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-medium shadow-sm transition-all hover:bg-neutral-weak cursor-pointer whitespace-nowrap",
|
|
6884
7168
|
children: [
|
|
6885
|
-
/* @__PURE__ */ (0,
|
|
6886
|
-
/* @__PURE__ */ (0,
|
|
7169
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "whitespace-nowrap font-medium", children: selectedSortLabel }),
|
|
7170
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6887
7171
|
ChevronDownIcon,
|
|
6888
7172
|
{
|
|
6889
7173
|
className: `h-4 w-4 shrink-0 transition-transform duration-200 ${isSortOpen ? "rotate-180" : ""}`
|
|
@@ -6892,17 +7176,17 @@ var init_DataBindingControls = __esm({
|
|
|
6892
7176
|
]
|
|
6893
7177
|
}
|
|
6894
7178
|
),
|
|
6895
|
-
isSortOpen && /* @__PURE__ */ (0,
|
|
7179
|
+
isSortOpen && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "absolute right-0 z-50 mt-1.5 w-max min-w-[160px] max-h-80 overflow-y-auto rounded-md border border-neutral-soft bg-default p-1 shadow-xl", children: normalizedSortOptions.map((option) => {
|
|
6896
7180
|
const isSelected = selectedSortOption?.value === option.value;
|
|
6897
|
-
return /* @__PURE__ */ (0,
|
|
7181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6898
7182
|
"button",
|
|
6899
7183
|
{
|
|
6900
7184
|
type: "button",
|
|
6901
7185
|
onClick: () => handleSelectSort(option.value),
|
|
6902
7186
|
className: `flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors cursor-pointer whitespace-nowrap ${isSelected ? "bg-primary-base font-semibold" : "hover:bg-neutral-soft font-normal"}`,
|
|
6903
7187
|
children: [
|
|
6904
|
-
/* @__PURE__ */ (0,
|
|
6905
|
-
isSelected && /* @__PURE__ */ (0,
|
|
7188
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
|
|
7189
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckIcon, { className: "h-4 w-4 shrink-0" })
|
|
6906
7190
|
]
|
|
6907
7191
|
},
|
|
6908
7192
|
option.value
|
|
@@ -6910,8 +7194,8 @@ var init_DataBindingControls = __esm({
|
|
|
6910
7194
|
}) })
|
|
6911
7195
|
] })
|
|
6912
7196
|
] }),
|
|
6913
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
6914
|
-
Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0,
|
|
7197
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5 pt-1", children: [
|
|
7198
|
+
Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6915
7199
|
"button",
|
|
6916
7200
|
{
|
|
6917
7201
|
type: "button",
|
|
@@ -6919,13 +7203,13 @@ var init_DataBindingControls = __esm({
|
|
|
6919
7203
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-md border border-neutral-soft bg-neutral-weak px-2.5 py-1 text-xs transition-colors hover:bg-neutral-soft",
|
|
6920
7204
|
title: `Remove filter: ${value}`,
|
|
6921
7205
|
children: [
|
|
6922
|
-
/* @__PURE__ */ (0,
|
|
6923
|
-
/* @__PURE__ */ (0,
|
|
7206
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "font-medium truncate max-w-[140px]", children: value }),
|
|
7207
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CloseIcon, { className: "h-3 w-3 shrink-0 opacity-60 group-hover:opacity-100" })
|
|
6924
7208
|
]
|
|
6925
7209
|
},
|
|
6926
7210
|
`mobile-chip-${field}`
|
|
6927
7211
|
)),
|
|
6928
|
-
/* @__PURE__ */ (0,
|
|
7212
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6929
7213
|
"button",
|
|
6930
7214
|
{
|
|
6931
7215
|
type: "button",
|
|
@@ -6936,8 +7220,8 @@ var init_DataBindingControls = __esm({
|
|
|
6936
7220
|
)
|
|
6937
7221
|
] })
|
|
6938
7222
|
] }),
|
|
6939
|
-
isMobileFiltersOpen && /* @__PURE__ */ (0,
|
|
6940
|
-
/* @__PURE__ */ (0,
|
|
7223
|
+
isMobileFiltersOpen && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "fixed inset-0 z-50 flex flex-col justify-end lg:hidden", children: [
|
|
7224
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6941
7225
|
"div",
|
|
6942
7226
|
{
|
|
6943
7227
|
className: "fixed inset-0 bg-neutral-stronger/60 backdrop-blur-xs transition-opacity duration-300",
|
|
@@ -6945,12 +7229,12 @@ var init_DataBindingControls = __esm({
|
|
|
6945
7229
|
"aria-hidden": "true"
|
|
6946
7230
|
}
|
|
6947
7231
|
),
|
|
6948
|
-
/* @__PURE__ */ (0,
|
|
6949
|
-
/* @__PURE__ */ (0,
|
|
6950
|
-
/* @__PURE__ */ (0,
|
|
6951
|
-
/* @__PURE__ */ (0,
|
|
6952
|
-
/* @__PURE__ */ (0,
|
|
6953
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
7232
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "relative z-10 flex h-[85vh] max-h-[85vh] w-full flex-col rounded-t-xl border-t border-neutral-soft bg-default shadow-2xl transition-transform duration-300 animate-in slide-in-from-bottom", children: [
|
|
7233
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "pt-2.5 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "mx-auto h-1.5 w-12 rounded-full bg-neutral-soft" }) }),
|
|
7234
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between px-5 py-3 border-b border-neutral-soft", children: [
|
|
7235
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h2", { className: "text-lg font-bold tracking-tight", children: "Filters" }),
|
|
7236
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7237
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6954
7238
|
"button",
|
|
6955
7239
|
{
|
|
6956
7240
|
type: "button",
|
|
@@ -6959,38 +7243,38 @@ var init_DataBindingControls = __esm({
|
|
|
6959
7243
|
children: "Clear all"
|
|
6960
7244
|
}
|
|
6961
7245
|
),
|
|
6962
|
-
/* @__PURE__ */ (0,
|
|
7246
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6963
7247
|
"button",
|
|
6964
7248
|
{
|
|
6965
7249
|
type: "button",
|
|
6966
7250
|
onClick: () => setIsMobileFiltersOpen(false),
|
|
6967
7251
|
className: "p-1 rounded-full hover:bg-neutral-weak transition-colors cursor-pointer",
|
|
6968
7252
|
"aria-label": "Close filters",
|
|
6969
|
-
children: /* @__PURE__ */ (0,
|
|
7253
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CloseIcon, { className: "h-5 w-5 opacity-70" })
|
|
6970
7254
|
}
|
|
6971
7255
|
)
|
|
6972
7256
|
] })
|
|
6973
7257
|
] }),
|
|
6974
|
-
/* @__PURE__ */ (0,
|
|
7258
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex-1 overflow-y-auto px-5 py-3 space-y-3 divide-y divide-neutral-soft", children: activeFacets.map(([field, values]) => {
|
|
6975
7259
|
const isOpen = !collapsedCategories[field];
|
|
6976
7260
|
const selectedValue = selectedFacetValues.get(field);
|
|
6977
7261
|
const categorySearch = facetCategorySearch[field]?.toLowerCase() || "";
|
|
6978
7262
|
const filteredValues = categorySearch ? values.filter((v) => v.value.toLowerCase().includes(categorySearch)) : values;
|
|
6979
|
-
return /* @__PURE__ */ (0,
|
|
6980
|
-
/* @__PURE__ */ (0,
|
|
7263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "pt-3 first:pt-0", children: [
|
|
7264
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6981
7265
|
"button",
|
|
6982
7266
|
{
|
|
6983
7267
|
type: "button",
|
|
6984
7268
|
onClick: () => toggleCategory(field),
|
|
6985
7269
|
className: "flex w-full cursor-pointer items-center justify-between rounded-md py-2 text-left transition-colors",
|
|
6986
7270
|
children: [
|
|
6987
|
-
/* @__PURE__ */ (0,
|
|
6988
|
-
/* @__PURE__ */ (0,
|
|
6989
|
-
/* @__PURE__ */ (0,
|
|
7271
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
7272
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-neutral-soft bg-neutral-weak", children: getCategoryIcon(field) }),
|
|
7273
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "font-semibold text-sm", children: humanize(field) })
|
|
6990
7274
|
] }),
|
|
6991
|
-
/* @__PURE__ */ (0,
|
|
6992
|
-
selectedValue && /* @__PURE__ */ (0,
|
|
6993
|
-
/* @__PURE__ */ (0,
|
|
7275
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
7276
|
+
selectedValue && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary-base text-xs font-bold leading-none", children: "1" }),
|
|
7277
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6994
7278
|
ChevronDownIcon,
|
|
6995
7279
|
{
|
|
6996
7280
|
className: `h-4 w-4 transition-transform duration-200 ${isOpen ? "rotate-180" : ""}`
|
|
@@ -7000,10 +7284,10 @@ var init_DataBindingControls = __esm({
|
|
|
7000
7284
|
]
|
|
7001
7285
|
}
|
|
7002
7286
|
),
|
|
7003
|
-
isOpen && /* @__PURE__ */ (0,
|
|
7004
|
-
values.length > 5 && /* @__PURE__ */ (0,
|
|
7005
|
-
/* @__PURE__ */ (0,
|
|
7006
|
-
/* @__PURE__ */ (0,
|
|
7287
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "pt-2 pb-1 pl-1 pr-1 space-y-1.5", children: [
|
|
7288
|
+
values.length > 5 && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "relative mb-2", children: [
|
|
7289
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 opacity-50" }),
|
|
7290
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
7007
7291
|
"input",
|
|
7008
7292
|
{
|
|
7009
7293
|
type: "text",
|
|
@@ -7017,9 +7301,9 @@ var init_DataBindingControls = __esm({
|
|
|
7017
7301
|
}
|
|
7018
7302
|
)
|
|
7019
7303
|
] }),
|
|
7020
|
-
filteredValues.length === 0 ? /* @__PURE__ */ (0,
|
|
7304
|
+
filteredValues.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "py-2 text-center text-xs opacity-60", children: "No matching options" }) : filteredValues.map((facet) => {
|
|
7021
7305
|
const isChecked = selectedValue === facet.value;
|
|
7022
|
-
return /* @__PURE__ */ (0,
|
|
7306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
7023
7307
|
"button",
|
|
7024
7308
|
{
|
|
7025
7309
|
type: "button",
|
|
@@ -7029,17 +7313,17 @@ var init_DataBindingControls = __esm({
|
|
|
7029
7313
|
"aria-pressed": isChecked,
|
|
7030
7314
|
className: `flex w-full cursor-pointer items-center justify-between gap-3 rounded-md px-2.5 py-2 text-left text-sm transition-colors ${isChecked ? "bg-neutral-soft font-medium" : "hover:bg-neutral-weak"}`,
|
|
7031
7315
|
children: [
|
|
7032
|
-
/* @__PURE__ */ (0,
|
|
7033
|
-
/* @__PURE__ */ (0,
|
|
7316
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
7317
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
7034
7318
|
"span",
|
|
7035
7319
|
{
|
|
7036
7320
|
className: `flex h-5 w-5 shrink-0 items-center justify-center rounded-md border transition-colors ${isChecked ? "bg-primary-base border-primary-base" : "border-neutral-soft bg-default"}`,
|
|
7037
|
-
children: isChecked && /* @__PURE__ */ (0,
|
|
7321
|
+
children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckIcon, { className: "h-3.5 w-3.5" })
|
|
7038
7322
|
}
|
|
7039
7323
|
),
|
|
7040
|
-
/* @__PURE__ */ (0,
|
|
7324
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "leading-snug break-words", children: facet.value })
|
|
7041
7325
|
] }),
|
|
7042
|
-
/* @__PURE__ */ (0,
|
|
7326
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "shrink-0 text-xs opacity-60 ml-2", children: facet.count })
|
|
7043
7327
|
]
|
|
7044
7328
|
},
|
|
7045
7329
|
`drawer-${field}-${facet.value}`
|
|
@@ -7048,8 +7332,8 @@ var init_DataBindingControls = __esm({
|
|
|
7048
7332
|
] })
|
|
7049
7333
|
] }, `drawer-cat-${field}`);
|
|
7050
7334
|
}) }),
|
|
7051
|
-
/* @__PURE__ */ (0,
|
|
7052
|
-
/* @__PURE__ */ (0,
|
|
7335
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-3 border-t border-neutral-soft bg-default p-4", children: [
|
|
7336
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
7053
7337
|
"button",
|
|
7054
7338
|
{
|
|
7055
7339
|
type: "button",
|
|
@@ -7058,7 +7342,7 @@ var init_DataBindingControls = __esm({
|
|
|
7058
7342
|
children: "Close"
|
|
7059
7343
|
}
|
|
7060
7344
|
),
|
|
7061
|
-
/* @__PURE__ */ (0,
|
|
7345
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
7062
7346
|
"button",
|
|
7063
7347
|
{
|
|
7064
7348
|
type: "button",
|
|
@@ -7074,14 +7358,14 @@ var init_DataBindingControls = __esm({
|
|
|
7074
7358
|
] })
|
|
7075
7359
|
] })
|
|
7076
7360
|
] }),
|
|
7077
|
-
shouldShowFacets && /* @__PURE__ */ (0,
|
|
7078
|
-
/* @__PURE__ */ (0,
|
|
7079
|
-
/* @__PURE__ */ (0,
|
|
7080
|
-
/* @__PURE__ */ (0,
|
|
7081
|
-
/* @__PURE__ */ (0,
|
|
7082
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
7361
|
+
shouldShowFacets && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
7362
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center justify-between border-b border-neutral-soft pb-3", children: [
|
|
7363
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
7364
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(FilterSlidersIcon, { className: "h-4 w-4" }),
|
|
7365
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h2", { className: "text-base font-semibold tracking-tight", children: "Filters" }),
|
|
7366
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "flex h-5 items-center justify-center rounded-full bg-primary-base px-2 text-xs font-semibold", children: selectedFacetCount })
|
|
7083
7367
|
] }),
|
|
7084
|
-
hasActiveFiltersOrSort && /* @__PURE__ */ (0,
|
|
7368
|
+
hasActiveFiltersOrSort && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
7085
7369
|
"button",
|
|
7086
7370
|
{
|
|
7087
7371
|
type: "button",
|
|
@@ -7089,13 +7373,13 @@ var init_DataBindingControls = __esm({
|
|
|
7089
7373
|
className: "group inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-colors duration-150 hover:bg-neutral-soft focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base",
|
|
7090
7374
|
"aria-label": "Clear all filters and sorting",
|
|
7091
7375
|
children: [
|
|
7092
|
-
/* @__PURE__ */ (0,
|
|
7093
|
-
/* @__PURE__ */ (0,
|
|
7376
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ResetIcon, { className: "h-3.5 w-3.5 transition-transform duration-200 group-hover:-rotate-45" }),
|
|
7377
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: "Clear all" })
|
|
7094
7378
|
]
|
|
7095
7379
|
}
|
|
7096
7380
|
)
|
|
7097
7381
|
] }),
|
|
7098
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0,
|
|
7382
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-wrap gap-1.5 pb-2.5 border-b border-neutral-soft", children: Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
7099
7383
|
"button",
|
|
7100
7384
|
{
|
|
7101
7385
|
type: "button",
|
|
@@ -7103,35 +7387,35 @@ var init_DataBindingControls = __esm({
|
|
|
7103
7387
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-md border border-neutral-soft bg-neutral-weak px-2.5 py-1 text-xs transition-colors hover:bg-neutral-soft",
|
|
7104
7388
|
title: `Remove filter: ${value}`,
|
|
7105
7389
|
children: [
|
|
7106
|
-
/* @__PURE__ */ (0,
|
|
7107
|
-
/* @__PURE__ */ (0,
|
|
7390
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "font-medium truncate max-w-[150px]", children: value }),
|
|
7391
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CloseIcon, { className: "h-3.5 w-3.5 shrink-0 opacity-60 group-hover:opacity-100" })
|
|
7108
7392
|
]
|
|
7109
7393
|
},
|
|
7110
7394
|
`chip-${field}`
|
|
7111
7395
|
)) }),
|
|
7112
|
-
activeFacets.length === 1 && /* @__PURE__ */ (0,
|
|
7113
|
-
/* @__PURE__ */ (0,
|
|
7396
|
+
activeFacets.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("nav", { "aria-label": `${humanize(activeFacets[0][0])} filters`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "py-1", children: [
|
|
7397
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "px-1 pb-2 font-medium text-sm", children: humanize(activeFacets[0][0]) }),
|
|
7114
7398
|
renderFacetItems(activeFacets[0][0], activeFacets[0][1])
|
|
7115
7399
|
] }) }),
|
|
7116
|
-
activeFacets.length > 1 && /* @__PURE__ */ (0,
|
|
7400
|
+
activeFacets.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-col divide-y divide-neutral-soft", children: activeFacets.map(([field, values]) => {
|
|
7117
7401
|
const isOpen = !collapsedCategories[field];
|
|
7118
|
-
return /* @__PURE__ */ (0,
|
|
7402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
7119
7403
|
"div",
|
|
7120
7404
|
{
|
|
7121
7405
|
className: "py-2 first:pt-0 last:pb-0",
|
|
7122
7406
|
children: [
|
|
7123
|
-
/* @__PURE__ */ (0,
|
|
7407
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
7124
7408
|
"button",
|
|
7125
7409
|
{
|
|
7126
7410
|
type: "button",
|
|
7127
7411
|
onClick: () => toggleCategory(field),
|
|
7128
7412
|
className: "flex w-full cursor-pointer items-center justify-between rounded-md px-1.5 py-1.5 text-sm font-semibold transition-colors duration-150 hover:bg-neutral-weak focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base",
|
|
7129
7413
|
children: [
|
|
7130
|
-
/* @__PURE__ */ (0,
|
|
7131
|
-
/* @__PURE__ */ (0,
|
|
7132
|
-
/* @__PURE__ */ (0,
|
|
7414
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
7415
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded border border-neutral-soft bg-neutral-weak", children: getCategoryIcon(field) }),
|
|
7416
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: humanize(field) })
|
|
7133
7417
|
] }),
|
|
7134
|
-
/* @__PURE__ */ (0,
|
|
7418
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
7135
7419
|
ChevronDownIcon,
|
|
7136
7420
|
{
|
|
7137
7421
|
className: `h-4 w-4 transition-transform duration-200 ease-out ${isOpen ? "rotate-180" : ""}`
|
|
@@ -7140,7 +7424,7 @@ var init_DataBindingControls = __esm({
|
|
|
7140
7424
|
]
|
|
7141
7425
|
}
|
|
7142
7426
|
),
|
|
7143
|
-
isOpen && /* @__PURE__ */ (0,
|
|
7427
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "pt-1", children: renderFacetItems(field, values) })
|
|
7144
7428
|
]
|
|
7145
7429
|
},
|
|
7146
7430
|
field
|
|
@@ -7160,13 +7444,13 @@ var Slider_exports = {};
|
|
|
7160
7444
|
__export(Slider_exports, {
|
|
7161
7445
|
default: () => Slider_default
|
|
7162
7446
|
});
|
|
7163
|
-
var
|
|
7447
|
+
var import_react63, import_jsx_runtime92, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
7164
7448
|
var init_Slider = __esm({
|
|
7165
7449
|
"src/components/Slider.tsx"() {
|
|
7166
7450
|
"use strict";
|
|
7167
7451
|
"use client";
|
|
7168
|
-
|
|
7169
|
-
|
|
7452
|
+
import_react63 = __toESM(require("react"));
|
|
7453
|
+
import_jsx_runtime92 = require("react/jsx-runtime");
|
|
7170
7454
|
Slider = ({
|
|
7171
7455
|
children,
|
|
7172
7456
|
columns,
|
|
@@ -7187,24 +7471,24 @@ var init_Slider = __esm({
|
|
|
7187
7471
|
progressPosition = "bottom",
|
|
7188
7472
|
scrollByColumns = false
|
|
7189
7473
|
}) => {
|
|
7190
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
7191
|
-
const [transition, setTransition] = (0,
|
|
7474
|
+
const [currentSlide, setCurrentSlide] = (0, import_react63.useState)(0);
|
|
7475
|
+
const [transition, setTransition] = (0, import_react63.useState)(true);
|
|
7192
7476
|
const initialSlidesToShow = slidesToShow ?? columns ?? 4;
|
|
7193
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
7477
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react63.useState)(
|
|
7194
7478
|
typeof initialSlidesToShow === "number" ? initialSlidesToShow : initialSlidesToShow.large
|
|
7195
7479
|
);
|
|
7196
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
7197
|
-
const trackRef = (0,
|
|
7198
|
-
const [videoProgress, setVideoProgress] = (0,
|
|
7199
|
-
const activeVideosRef = (0,
|
|
7200
|
-
const completedVideosRef = (0,
|
|
7201
|
-
const nextSlideRef = (0,
|
|
7480
|
+
const [isPlaying, setIsPlaying] = (0, import_react63.useState)(autoplay);
|
|
7481
|
+
const trackRef = (0, import_react63.useRef)(null);
|
|
7482
|
+
const [videoProgress, setVideoProgress] = (0, import_react63.useState)(null);
|
|
7483
|
+
const activeVideosRef = (0, import_react63.useRef)([]);
|
|
7484
|
+
const completedVideosRef = (0, import_react63.useRef)(/* @__PURE__ */ new Set());
|
|
7485
|
+
const nextSlideRef = (0, import_react63.useRef)(() => {
|
|
7202
7486
|
});
|
|
7203
|
-
const isPlayingRef = (0,
|
|
7204
|
-
(0,
|
|
7487
|
+
const isPlayingRef = (0, import_react63.useRef)(isPlaying);
|
|
7488
|
+
(0, import_react63.useEffect)(() => {
|
|
7205
7489
|
isPlayingRef.current = isPlaying;
|
|
7206
7490
|
}, [isPlaying]);
|
|
7207
|
-
(0,
|
|
7491
|
+
(0, import_react63.useEffect)(() => {
|
|
7208
7492
|
if (typeof initialSlidesToShow === "number") {
|
|
7209
7493
|
setSlidesToShowState(initialSlidesToShow);
|
|
7210
7494
|
return;
|
|
@@ -7222,7 +7506,7 @@ var init_Slider = __esm({
|
|
|
7222
7506
|
window.addEventListener("resize", handleResize);
|
|
7223
7507
|
return () => window.removeEventListener("resize", handleResize);
|
|
7224
7508
|
}, [initialSlidesToShow]);
|
|
7225
|
-
const totalSlides =
|
|
7509
|
+
const totalSlides = import_react63.Children.count(children);
|
|
7226
7510
|
const numColumns = columns ?? slidesToShowState;
|
|
7227
7511
|
const slideWidthPercentage = (() => {
|
|
7228
7512
|
if (typeof lastColPercentage !== "number") {
|
|
@@ -7337,7 +7621,7 @@ var init_Slider = __esm({
|
|
|
7337
7621
|
}
|
|
7338
7622
|
}
|
|
7339
7623
|
};
|
|
7340
|
-
(0,
|
|
7624
|
+
(0, import_react63.useEffect)(() => {
|
|
7341
7625
|
if (!autoplay) return;
|
|
7342
7626
|
let isEffectActive = true;
|
|
7343
7627
|
let cleanupVideo = null;
|
|
@@ -7512,24 +7796,24 @@ var init_Slider = __esm({
|
|
|
7512
7796
|
}
|
|
7513
7797
|
};
|
|
7514
7798
|
const translateX = -currentSlide * slideWidthPercentage;
|
|
7515
|
-
const slides =
|
|
7516
|
-
if (!
|
|
7799
|
+
const slides = import_react63.Children.map(children, (child, index) => {
|
|
7800
|
+
if (!import_react63.default.isValidElement(child)) return null;
|
|
7517
7801
|
const childProps = child.props;
|
|
7518
7802
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
7519
|
-
return /* @__PURE__ */ (0,
|
|
7803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7520
7804
|
"div",
|
|
7521
7805
|
{
|
|
7522
7806
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
7523
7807
|
style: { width: `calc(${slideWidthPercentage}%)`, paddingRight: gap },
|
|
7524
|
-
children: (0,
|
|
7808
|
+
children: (0, import_react63.cloneElement)(child, {
|
|
7525
7809
|
className: mergedClassName
|
|
7526
7810
|
})
|
|
7527
7811
|
},
|
|
7528
7812
|
index
|
|
7529
7813
|
);
|
|
7530
7814
|
});
|
|
7531
|
-
return /* @__PURE__ */ (0,
|
|
7532
|
-
show_dots && progressPosition === "top" && /* @__PURE__ */ (0,
|
|
7815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "w-full", children: [
|
|
7816
|
+
show_dots && progressPosition === "top" && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "flex justify-center space-x-1.5 mb-4", children: slidePositions.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7533
7817
|
ProgressPill,
|
|
7534
7818
|
{
|
|
7535
7819
|
active: index === currentStepIndex,
|
|
@@ -7545,14 +7829,14 @@ var init_Slider = __esm({
|
|
|
7545
7829
|
},
|
|
7546
7830
|
index
|
|
7547
7831
|
)) }),
|
|
7548
|
-
/* @__PURE__ */ (0,
|
|
7832
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
7549
7833
|
"div",
|
|
7550
7834
|
{
|
|
7551
7835
|
className: `relative w-full overflow-hidden ${className}`,
|
|
7552
7836
|
onMouseEnter: handleMouseEnter,
|
|
7553
7837
|
onMouseLeave: handleMouseLeave,
|
|
7554
7838
|
children: [
|
|
7555
|
-
/* @__PURE__ */ (0,
|
|
7839
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7556
7840
|
"div",
|
|
7557
7841
|
{
|
|
7558
7842
|
ref: trackRef,
|
|
@@ -7564,32 +7848,32 @@ var init_Slider = __esm({
|
|
|
7564
7848
|
children: slides
|
|
7565
7849
|
}
|
|
7566
7850
|
),
|
|
7567
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
7568
|
-
/* @__PURE__ */ (0,
|
|
7851
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
|
|
7852
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7569
7853
|
ArrowButton,
|
|
7570
7854
|
{
|
|
7571
7855
|
direction: "left",
|
|
7572
7856
|
onClick: prevSlide,
|
|
7573
7857
|
visible: infinite_scroll || currentSlide > 0,
|
|
7574
7858
|
className: arrowClassName,
|
|
7575
|
-
children: /* @__PURE__ */ (0,
|
|
7859
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.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_runtime92.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
7576
7860
|
}
|
|
7577
7861
|
),
|
|
7578
|
-
/* @__PURE__ */ (0,
|
|
7862
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7579
7863
|
ArrowButton,
|
|
7580
7864
|
{
|
|
7581
7865
|
direction: "right",
|
|
7582
7866
|
onClick: nextSlide,
|
|
7583
7867
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
7584
7868
|
className: arrowClassName,
|
|
7585
|
-
children: /* @__PURE__ */ (0,
|
|
7869
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.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_runtime92.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) })
|
|
7586
7870
|
}
|
|
7587
7871
|
)
|
|
7588
7872
|
] })
|
|
7589
7873
|
]
|
|
7590
7874
|
}
|
|
7591
7875
|
),
|
|
7592
|
-
show_dots && progressPosition !== "top" && /* @__PURE__ */ (0,
|
|
7876
|
+
show_dots && progressPosition !== "top" && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "flex justify-center space-x-1.5 mt-5", children: slidePositions.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7593
7877
|
ProgressPill,
|
|
7594
7878
|
{
|
|
7595
7879
|
active: index === currentStepIndex,
|
|
@@ -7613,7 +7897,7 @@ var init_Slider = __esm({
|
|
|
7613
7897
|
visible,
|
|
7614
7898
|
children,
|
|
7615
7899
|
className = ""
|
|
7616
|
-
}) => /* @__PURE__ */ (0,
|
|
7900
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7617
7901
|
"button",
|
|
7618
7902
|
{
|
|
7619
7903
|
className: `
|
|
@@ -7639,13 +7923,13 @@ var init_Slider = __esm({
|
|
|
7639
7923
|
currentStep,
|
|
7640
7924
|
customProgress = null
|
|
7641
7925
|
}) => {
|
|
7642
|
-
const [progress, setProgress] = (0,
|
|
7643
|
-
(0,
|
|
7926
|
+
const [progress, setProgress] = (0, import_react63.useState)(0);
|
|
7927
|
+
(0, import_react63.useEffect)(() => {
|
|
7644
7928
|
if (active) {
|
|
7645
7929
|
setProgress(0);
|
|
7646
7930
|
}
|
|
7647
7931
|
}, [active, index]);
|
|
7648
|
-
(0,
|
|
7932
|
+
(0, import_react63.useEffect)(() => {
|
|
7649
7933
|
if (!active || !isPlaying || customProgress !== null) {
|
|
7650
7934
|
if (!active) {
|
|
7651
7935
|
setProgress(0);
|
|
@@ -7698,7 +7982,7 @@ var init_Slider = __esm({
|
|
|
7698
7982
|
const renderProgressBar = () => {
|
|
7699
7983
|
if ((style === "modern" || style === "cumulative") && isActive) {
|
|
7700
7984
|
const displayProgress = customProgress ?? progress;
|
|
7701
|
-
return /* @__PURE__ */ (0,
|
|
7985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7702
7986
|
"div",
|
|
7703
7987
|
{
|
|
7704
7988
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
|
|
@@ -7708,7 +7992,7 @@ var init_Slider = __esm({
|
|
|
7708
7992
|
}
|
|
7709
7993
|
return null;
|
|
7710
7994
|
};
|
|
7711
|
-
return /* @__PURE__ */ (0,
|
|
7995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7712
7996
|
"button",
|
|
7713
7997
|
{
|
|
7714
7998
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -7748,6 +8032,7 @@ __export(index_exports, {
|
|
|
7748
8032
|
PageBodyRenderer: () => PageBodyRenderer_default,
|
|
7749
8033
|
PercentageInput: () => PercentageInput_default,
|
|
7750
8034
|
PhoneInput: () => PhoneInput_default,
|
|
8035
|
+
PicklistInput: () => PicklistInput_default,
|
|
7751
8036
|
RadioInput: () => RadioInput_default,
|
|
7752
8037
|
Select: () => Select_default,
|
|
7753
8038
|
TimeInput: () => TimeInput_default,
|
|
@@ -8208,13 +8493,13 @@ var InputControl_default = InputControl2;
|
|
|
8208
8493
|
init_InputControlType();
|
|
8209
8494
|
|
|
8210
8495
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
8211
|
-
var
|
|
8496
|
+
var import_react65 = __toESM(require("react"));
|
|
8212
8497
|
|
|
8213
8498
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
8214
|
-
var
|
|
8499
|
+
var import_react50 = __toESM(require("react"));
|
|
8215
8500
|
|
|
8216
8501
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
8217
|
-
var
|
|
8502
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
8218
8503
|
var TextNode = (props) => {
|
|
8219
8504
|
function cssStringToJson(cssString) {
|
|
8220
8505
|
const styleObject = {};
|
|
@@ -8271,36 +8556,36 @@ var TextNode = (props) => {
|
|
|
8271
8556
|
});
|
|
8272
8557
|
}
|
|
8273
8558
|
function renderWithLineBreaks(text) {
|
|
8274
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
8559
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { children: [
|
|
8275
8560
|
line,
|
|
8276
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
8561
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("br", {})
|
|
8277
8562
|
] }, index));
|
|
8278
8563
|
}
|
|
8279
8564
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
8280
8565
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
8281
8566
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
8282
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
8567
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("sub", { children: content }) : content;
|
|
8283
8568
|
return (
|
|
8284
8569
|
// @ts-expect-error custom code
|
|
8285
|
-
/* @__PURE__ */ (0,
|
|
8570
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
8286
8571
|
);
|
|
8287
8572
|
};
|
|
8288
8573
|
var TextNode_default = TextNode;
|
|
8289
8574
|
|
|
8290
8575
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
8291
|
-
var
|
|
8576
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8292
8577
|
var LineBreakNode = () => {
|
|
8293
|
-
return /* @__PURE__ */ (0,
|
|
8578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
8294
8579
|
};
|
|
8295
8580
|
var LineBreakNode_default = LineBreakNode;
|
|
8296
8581
|
|
|
8297
8582
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
8298
|
-
var
|
|
8583
|
+
var import_react48 = __toESM(require("react"));
|
|
8299
8584
|
|
|
8300
8585
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
8301
8586
|
init_AssetUtility();
|
|
8302
8587
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
8303
|
-
var
|
|
8588
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8304
8589
|
var HlsPlayer3 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
8305
8590
|
var getNestedValue = (obj, path) => {
|
|
8306
8591
|
if (!obj || !path) return void 0;
|
|
@@ -8333,7 +8618,7 @@ var ImageNode = (props) => {
|
|
|
8333
8618
|
assets = [image];
|
|
8334
8619
|
}
|
|
8335
8620
|
if (assets && assets.length > 0) {
|
|
8336
|
-
return /* @__PURE__ */ (0,
|
|
8621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8337
8622
|
DeviceAssetSelector_default,
|
|
8338
8623
|
{
|
|
8339
8624
|
device: props.device,
|
|
@@ -8374,7 +8659,7 @@ var ImageNode = (props) => {
|
|
|
8374
8659
|
right: "justify-end"
|
|
8375
8660
|
};
|
|
8376
8661
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
8377
|
-
const renderMedia = () => isHls ? /* @__PURE__ */ (0,
|
|
8662
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8378
8663
|
HlsPlayer3,
|
|
8379
8664
|
{
|
|
8380
8665
|
assetUrl: imageUrl,
|
|
@@ -8387,7 +8672,7 @@ var ImageNode = (props) => {
|
|
|
8387
8672
|
apiBaseUrl: props.apiBaseUrl,
|
|
8388
8673
|
session: props.session
|
|
8389
8674
|
}
|
|
8390
|
-
) : /* @__PURE__ */ (0,
|
|
8675
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8391
8676
|
"img",
|
|
8392
8677
|
{
|
|
8393
8678
|
style: styles,
|
|
@@ -8400,7 +8685,7 @@ var ImageNode = (props) => {
|
|
|
8400
8685
|
}
|
|
8401
8686
|
);
|
|
8402
8687
|
if (props.node.width) {
|
|
8403
|
-
return /* @__PURE__ */ (0,
|
|
8688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `flex ${FORMAT_CLASSES3[props.node.format] ?? ""}`, children: renderMedia() });
|
|
8404
8689
|
}
|
|
8405
8690
|
return renderMedia();
|
|
8406
8691
|
};
|
|
@@ -8410,7 +8695,7 @@ var ImageNode_default = ImageNode;
|
|
|
8410
8695
|
init_StyleTypes();
|
|
8411
8696
|
init_Hyperlink();
|
|
8412
8697
|
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
8413
|
-
var
|
|
8698
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
8414
8699
|
var LinkNodeButton2 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
8415
8700
|
ssr: false
|
|
8416
8701
|
});
|
|
@@ -8463,13 +8748,13 @@ var LinkNode = (props) => {
|
|
|
8463
8748
|
const isButton = node.isButton === true;
|
|
8464
8749
|
const renderChildren2 = () => {
|
|
8465
8750
|
if (!node.children || node.children.length === 0) return null;
|
|
8466
|
-
return /* @__PURE__ */ (0,
|
|
8751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_jsx_runtime65.Fragment, { children: node.children.map((childNode, index) => {
|
|
8467
8752
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
8468
8753
|
if (!SelectedNode) {
|
|
8469
8754
|
console.warn("Unknown node type:", childNode.type);
|
|
8470
8755
|
return null;
|
|
8471
8756
|
}
|
|
8472
|
-
return /* @__PURE__ */ (0,
|
|
8757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react48.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8473
8758
|
SelectedNode,
|
|
8474
8759
|
{
|
|
8475
8760
|
node: childNode,
|
|
@@ -8482,15 +8767,15 @@ var LinkNode = (props) => {
|
|
|
8482
8767
|
};
|
|
8483
8768
|
const renderFallback = () => {
|
|
8484
8769
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
8485
|
-
return /* @__PURE__ */ (0,
|
|
8770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: linkText });
|
|
8486
8771
|
}
|
|
8487
8772
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
8488
|
-
return /* @__PURE__ */ (0,
|
|
8773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("br", {});
|
|
8489
8774
|
}
|
|
8490
8775
|
return null;
|
|
8491
8776
|
};
|
|
8492
8777
|
if (isButton) {
|
|
8493
|
-
return /* @__PURE__ */ (0,
|
|
8778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
8494
8779
|
LinkNodeButton2,
|
|
8495
8780
|
{
|
|
8496
8781
|
node,
|
|
@@ -8508,7 +8793,7 @@ var LinkNode = (props) => {
|
|
|
8508
8793
|
}
|
|
8509
8794
|
);
|
|
8510
8795
|
}
|
|
8511
|
-
return /* @__PURE__ */ (0,
|
|
8796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
8512
8797
|
Hyperlink,
|
|
8513
8798
|
{
|
|
8514
8799
|
href: linkUrl || "#",
|
|
@@ -8525,10 +8810,10 @@ var LinkNode = (props) => {
|
|
|
8525
8810
|
var LinkNode_default = LinkNode;
|
|
8526
8811
|
|
|
8527
8812
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
8528
|
-
var
|
|
8813
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
8529
8814
|
var SVGIconNode = ({ node }) => {
|
|
8530
8815
|
if (!node?.svgCode) return null;
|
|
8531
|
-
return /* @__PURE__ */ (0,
|
|
8816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8532
8817
|
"span",
|
|
8533
8818
|
{
|
|
8534
8819
|
style: {
|
|
@@ -8547,7 +8832,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
8547
8832
|
|
|
8548
8833
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
8549
8834
|
var import_katex = __toESM(require("katex"));
|
|
8550
|
-
var
|
|
8835
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
8551
8836
|
var EquationNode = ({ node }) => {
|
|
8552
8837
|
const { equation, inline } = node;
|
|
8553
8838
|
let html = "";
|
|
@@ -8562,7 +8847,7 @@ var EquationNode = ({ node }) => {
|
|
|
8562
8847
|
});
|
|
8563
8848
|
}
|
|
8564
8849
|
if (inline) {
|
|
8565
|
-
return /* @__PURE__ */ (0,
|
|
8850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
8566
8851
|
"span",
|
|
8567
8852
|
{
|
|
8568
8853
|
className: "katex-inline",
|
|
@@ -8570,7 +8855,7 @@ var EquationNode = ({ node }) => {
|
|
|
8570
8855
|
}
|
|
8571
8856
|
);
|
|
8572
8857
|
}
|
|
8573
|
-
return /* @__PURE__ */ (0,
|
|
8858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
8574
8859
|
"div",
|
|
8575
8860
|
{
|
|
8576
8861
|
className: "katex-block my-3 text-center",
|
|
@@ -8581,7 +8866,7 @@ var EquationNode = ({ node }) => {
|
|
|
8581
8866
|
var EquationNode_default = EquationNode;
|
|
8582
8867
|
|
|
8583
8868
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
8584
|
-
var
|
|
8869
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
8585
8870
|
function getNestedProperty(obj, path) {
|
|
8586
8871
|
if (!obj || !path) return null;
|
|
8587
8872
|
if (path.includes(".")) {
|
|
@@ -8594,7 +8879,7 @@ function getNestedProperty(obj, path) {
|
|
|
8594
8879
|
}
|
|
8595
8880
|
const value = obj[path];
|
|
8596
8881
|
if (Array.isArray(value)) {
|
|
8597
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
8882
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { children: String(item) }, index));
|
|
8598
8883
|
}
|
|
8599
8884
|
return value;
|
|
8600
8885
|
}
|
|
@@ -8659,7 +8944,7 @@ var DatafieldNode = (props) => {
|
|
|
8659
8944
|
const dataType = props.node.dataType;
|
|
8660
8945
|
if (isEmptyValue) return null;
|
|
8661
8946
|
if (dataType === "rawContent") {
|
|
8662
|
-
return /* @__PURE__ */ (0,
|
|
8947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8663
8948
|
PageBodyRenderer_default,
|
|
8664
8949
|
{
|
|
8665
8950
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -8678,13 +8963,13 @@ var DatafieldNode = (props) => {
|
|
|
8678
8963
|
}
|
|
8679
8964
|
);
|
|
8680
8965
|
}
|
|
8681
|
-
return /* @__PURE__ */ (0,
|
|
8966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8682
8967
|
"span",
|
|
8683
8968
|
{
|
|
8684
8969
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
8685
8970
|
style: styles,
|
|
8686
8971
|
title,
|
|
8687
|
-
children: /* @__PURE__ */ (0,
|
|
8972
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8688
8973
|
ViewControl_default,
|
|
8689
8974
|
{
|
|
8690
8975
|
controlType: dataType,
|
|
@@ -8700,17 +8985,17 @@ var DatafieldNode_default = DatafieldNode;
|
|
|
8700
8985
|
|
|
8701
8986
|
// src/components/pageRenderingEngine/nodes/CounterNode.tsx
|
|
8702
8987
|
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
8703
|
-
var
|
|
8988
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
8704
8989
|
var CounterNodeClient2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_CounterNodeClient(), CounterNodeClient_exports)), {
|
|
8705
8990
|
ssr: false
|
|
8706
8991
|
});
|
|
8707
8992
|
var CounterNode = (props) => {
|
|
8708
|
-
return /* @__PURE__ */ (0,
|
|
8993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(CounterNodeClient2, { node: props.node });
|
|
8709
8994
|
};
|
|
8710
8995
|
var CounterNode_default = CounterNode;
|
|
8711
8996
|
|
|
8712
8997
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
8713
|
-
var
|
|
8998
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
8714
8999
|
var ParagraphNode = (props) => {
|
|
8715
9000
|
const NodeTypes2 = {
|
|
8716
9001
|
["text"]: TextNode_default,
|
|
@@ -8731,9 +9016,9 @@ var ParagraphNode = (props) => {
|
|
|
8731
9016
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
8732
9017
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
8733
9018
|
if (isInlineOnlyParent) {
|
|
8734
|
-
return /* @__PURE__ */ (0,
|
|
9019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
8735
9020
|
const SelectedNode = NodeTypes2[node.type];
|
|
8736
|
-
return /* @__PURE__ */ (0,
|
|
9021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8737
9022
|
SelectedNode,
|
|
8738
9023
|
{
|
|
8739
9024
|
node,
|
|
@@ -8746,10 +9031,10 @@ var ParagraphNode = (props) => {
|
|
|
8746
9031
|
) }, index);
|
|
8747
9032
|
}) });
|
|
8748
9033
|
}
|
|
8749
|
-
return /* @__PURE__ */ (0,
|
|
9034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: " " + formatClasses, children: [
|
|
8750
9035
|
hasChildren && props.node.children.map((node, index) => {
|
|
8751
9036
|
const SelectedNode = NodeTypes2[node.type];
|
|
8752
|
-
return /* @__PURE__ */ (0,
|
|
9037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8753
9038
|
SelectedNode,
|
|
8754
9039
|
{
|
|
8755
9040
|
node,
|
|
@@ -8761,14 +9046,14 @@ var ParagraphNode = (props) => {
|
|
|
8761
9046
|
}
|
|
8762
9047
|
) }, index);
|
|
8763
9048
|
}),
|
|
8764
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
9049
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
8765
9050
|
] });
|
|
8766
9051
|
};
|
|
8767
9052
|
var ParagraphNode_default = ParagraphNode;
|
|
8768
9053
|
|
|
8769
9054
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
8770
|
-
var
|
|
8771
|
-
var
|
|
9055
|
+
var import_react51 = __toESM(require("react"));
|
|
9056
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
8772
9057
|
var HeadingNode = (props) => {
|
|
8773
9058
|
const NodeTypes2 = {
|
|
8774
9059
|
["text"]: TextNode_default,
|
|
@@ -8785,23 +9070,23 @@ var HeadingNode = (props) => {
|
|
|
8785
9070
|
{
|
|
8786
9071
|
}
|
|
8787
9072
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
8788
|
-
return /* @__PURE__ */ (0,
|
|
9073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, { children: import_react51.default.createElement(
|
|
8789
9074
|
HeadingTag,
|
|
8790
9075
|
{ className: formatClasses },
|
|
8791
9076
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
8792
9077
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
8793
|
-
return /* @__PURE__ */ (0,
|
|
9078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, assetBaseUrl: props.assetBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
8794
9079
|
})
|
|
8795
9080
|
) });
|
|
8796
9081
|
};
|
|
8797
9082
|
var HeadingNode_default = HeadingNode;
|
|
8798
9083
|
|
|
8799
9084
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
8800
|
-
var
|
|
9085
|
+
var import_react53 = __toESM(require("react"));
|
|
8801
9086
|
|
|
8802
9087
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
8803
|
-
var
|
|
8804
|
-
var
|
|
9088
|
+
var import_react52 = __toESM(require("react"));
|
|
9089
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
8805
9090
|
var ListItemNode = (props) => {
|
|
8806
9091
|
const NodeTypes2 = {
|
|
8807
9092
|
text: TextNode_default,
|
|
@@ -8818,66 +9103,66 @@ var ListItemNode = (props) => {
|
|
|
8818
9103
|
liStyle.fontSize = match[1].trim();
|
|
8819
9104
|
}
|
|
8820
9105
|
}
|
|
8821
|
-
return /* @__PURE__ */ (0,
|
|
9106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
8822
9107
|
const SelectedNode = NodeTypes2[node.type];
|
|
8823
9108
|
if (node.type === "linebreak") {
|
|
8824
9109
|
if (!foundFirstBreak) {
|
|
8825
9110
|
foundFirstBreak = true;
|
|
8826
|
-
return /* @__PURE__ */ (0,
|
|
9111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", {}, index);
|
|
8827
9112
|
} else {
|
|
8828
|
-
return /* @__PURE__ */ (0,
|
|
9113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
8829
9114
|
}
|
|
8830
9115
|
} else {
|
|
8831
9116
|
foundFirstBreak = false;
|
|
8832
|
-
return /* @__PURE__ */ (0,
|
|
9117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react52.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
8833
9118
|
}
|
|
8834
9119
|
}) });
|
|
8835
9120
|
};
|
|
8836
9121
|
var ListItemNode_default = ListItemNode;
|
|
8837
9122
|
|
|
8838
9123
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
8839
|
-
var
|
|
9124
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
8840
9125
|
var ListNode = (props) => {
|
|
8841
9126
|
const NodeTypes2 = {
|
|
8842
9127
|
listitem: ListItemNode_default
|
|
8843
9128
|
};
|
|
8844
|
-
return /* @__PURE__ */ (0,
|
|
8845
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
9129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_react53.default.Fragment, { children: [
|
|
9130
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
8846
9131
|
const SelectedNode = NodeTypes2[node.type];
|
|
8847
|
-
return /* @__PURE__ */ (0,
|
|
9132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
8848
9133
|
}) }),
|
|
8849
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
9134
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
8850
9135
|
const SelectedNode = NodeTypes2[node.type];
|
|
8851
|
-
return /* @__PURE__ */ (0,
|
|
9136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
8852
9137
|
}) })
|
|
8853
9138
|
] });
|
|
8854
9139
|
};
|
|
8855
9140
|
var ListNode_default = ListNode;
|
|
8856
9141
|
|
|
8857
9142
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
8858
|
-
var
|
|
8859
|
-
var
|
|
9143
|
+
var import_react54 = __toESM(require("react"));
|
|
9144
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8860
9145
|
var QuoteNode = (props) => {
|
|
8861
9146
|
const NodeTypes2 = {
|
|
8862
9147
|
["text"]: TextNode_default,
|
|
8863
9148
|
["linebreak"]: LineBreakNode_default,
|
|
8864
9149
|
["link"]: LinkNode_default
|
|
8865
9150
|
};
|
|
8866
|
-
return /* @__PURE__ */ (0,
|
|
9151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
8867
9152
|
const SelectedNode = NodeTypes2[node.type];
|
|
8868
|
-
return /* @__PURE__ */ (0,
|
|
9153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react54.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
8869
9154
|
}) });
|
|
8870
9155
|
};
|
|
8871
9156
|
var QuoteNode_default = QuoteNode;
|
|
8872
9157
|
|
|
8873
9158
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
8874
|
-
var
|
|
9159
|
+
var import_react56 = __toESM(require("react"));
|
|
8875
9160
|
var import_dynamic11 = __toESM(require("next/dynamic"));
|
|
8876
|
-
var
|
|
9161
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8877
9162
|
var CopyButton2 = (0, import_dynamic11.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
8878
9163
|
ssr: false,
|
|
8879
9164
|
// optional: fallback UI while loading
|
|
8880
|
-
loading: () => /* @__PURE__ */ (0,
|
|
9165
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
8881
9166
|
});
|
|
8882
9167
|
var CodeNode = (props) => {
|
|
8883
9168
|
const NodeTypes2 = {
|
|
@@ -8891,14 +9176,14 @@ var CodeNode = (props) => {
|
|
|
8891
9176
|
if (node.type === "link") return node.text || node.url || "";
|
|
8892
9177
|
return "";
|
|
8893
9178
|
}).join("") ?? "";
|
|
8894
|
-
return /* @__PURE__ */ (0,
|
|
8895
|
-
/* @__PURE__ */ (0,
|
|
8896
|
-
/* @__PURE__ */ (0,
|
|
8897
|
-
/* @__PURE__ */ (0,
|
|
9179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { children: [
|
|
9180
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
9181
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: "Code Snippet" }),
|
|
9182
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(CopyButton2, { text: textContent })
|
|
8898
9183
|
] }),
|
|
8899
|
-
/* @__PURE__ */ (0,
|
|
9184
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.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) => {
|
|
8900
9185
|
const SelectedNode = NodeTypes2[node.type];
|
|
8901
|
-
return /* @__PURE__ */ (0,
|
|
9186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8902
9187
|
SelectedNode,
|
|
8903
9188
|
{
|
|
8904
9189
|
node,
|
|
@@ -8913,15 +9198,15 @@ var CodeNode = (props) => {
|
|
|
8913
9198
|
var CodeNode_default = CodeNode;
|
|
8914
9199
|
|
|
8915
9200
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
8916
|
-
var
|
|
9201
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
8917
9202
|
var HorizontalRuleNode = () => {
|
|
8918
|
-
return /* @__PURE__ */ (0,
|
|
9203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("hr", {});
|
|
8919
9204
|
};
|
|
8920
9205
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
8921
9206
|
|
|
8922
9207
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
8923
|
-
var
|
|
8924
|
-
var
|
|
9208
|
+
var import_react57 = __toESM(require("react"));
|
|
9209
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
8925
9210
|
var WidgetNode = (props) => {
|
|
8926
9211
|
const getWidgetParameters = () => {
|
|
8927
9212
|
const widgetInputParameters = {
|
|
@@ -8985,7 +9270,7 @@ var WidgetNode = (props) => {
|
|
|
8985
9270
|
};
|
|
8986
9271
|
const widgetCode = props.node?.widgetCode;
|
|
8987
9272
|
if (!widgetCode) {
|
|
8988
|
-
return /* @__PURE__ */ (0,
|
|
9273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, { children: "Invalid widget" });
|
|
8989
9274
|
}
|
|
8990
9275
|
const widgetParams = getWidgetParameters();
|
|
8991
9276
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -8994,7 +9279,7 @@ var WidgetNode = (props) => {
|
|
|
8994
9279
|
}
|
|
8995
9280
|
return (
|
|
8996
9281
|
// eslint-disable-next-line react-hooks/static-components
|
|
8997
|
-
/* @__PURE__ */ (0,
|
|
9282
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8998
9283
|
WidgetRenderer,
|
|
8999
9284
|
{
|
|
9000
9285
|
params: widgetParams,
|
|
@@ -9012,11 +9297,11 @@ var WidgetNode_default = WidgetNode;
|
|
|
9012
9297
|
|
|
9013
9298
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
9014
9299
|
var import_dynamic17 = __toESM(require("next/dynamic"));
|
|
9015
|
-
var
|
|
9300
|
+
var import_react64 = __toESM(require("react"));
|
|
9016
9301
|
|
|
9017
9302
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
9018
9303
|
var import_dynamic12 = __toESM(require("next/dynamic"));
|
|
9019
|
-
var
|
|
9304
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
9020
9305
|
var IframeClient2 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
9021
9306
|
ssr: false
|
|
9022
9307
|
});
|
|
@@ -9029,7 +9314,7 @@ var EmbedNode = (props) => {
|
|
|
9029
9314
|
} else {
|
|
9030
9315
|
src = props.node.embedSrc;
|
|
9031
9316
|
}
|
|
9032
|
-
return /* @__PURE__ */ (0,
|
|
9317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IframeClient2, { src }) });
|
|
9033
9318
|
};
|
|
9034
9319
|
var EmbedNode_default = EmbedNode;
|
|
9035
9320
|
|
|
@@ -9272,10 +9557,10 @@ var PathUtility = class {
|
|
|
9272
9557
|
var PathUtility_default = new PathUtility();
|
|
9273
9558
|
|
|
9274
9559
|
// src/components/NoDataFound.tsx
|
|
9275
|
-
var
|
|
9560
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
9276
9561
|
var NoDataFound = () => {
|
|
9277
|
-
return /* @__PURE__ */ (0,
|
|
9278
|
-
/* @__PURE__ */ (0,
|
|
9562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
9563
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9279
9564
|
"svg",
|
|
9280
9565
|
{
|
|
9281
9566
|
className: "w-10 h-10",
|
|
@@ -9283,7 +9568,7 @@ var NoDataFound = () => {
|
|
|
9283
9568
|
stroke: "currentColor",
|
|
9284
9569
|
viewBox: "0 0 24 24",
|
|
9285
9570
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9286
|
-
children: /* @__PURE__ */ (0,
|
|
9571
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9287
9572
|
"path",
|
|
9288
9573
|
{
|
|
9289
9574
|
strokeLinecap: "round",
|
|
@@ -9294,17 +9579,17 @@ var NoDataFound = () => {
|
|
|
9294
9579
|
)
|
|
9295
9580
|
}
|
|
9296
9581
|
) }) }),
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9298
|
-
/* @__PURE__ */ (0,
|
|
9582
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
9583
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
9299
9584
|
] });
|
|
9300
9585
|
};
|
|
9301
9586
|
var NoDataFound_default = NoDataFound;
|
|
9302
9587
|
|
|
9303
9588
|
// src/components/NoFilterResultsFound.tsx
|
|
9304
|
-
var
|
|
9589
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
9305
9590
|
var NoFilterResultsFound = () => {
|
|
9306
|
-
return /* @__PURE__ */ (0,
|
|
9307
|
-
/* @__PURE__ */ (0,
|
|
9591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
9592
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9308
9593
|
"svg",
|
|
9309
9594
|
{
|
|
9310
9595
|
className: "w-10 h-10",
|
|
@@ -9312,7 +9597,7 @@ var NoFilterResultsFound = () => {
|
|
|
9312
9597
|
stroke: "currentColor",
|
|
9313
9598
|
viewBox: "0 0 24 24",
|
|
9314
9599
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9315
|
-
children: /* @__PURE__ */ (0,
|
|
9600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9316
9601
|
"path",
|
|
9317
9602
|
{
|
|
9318
9603
|
strokeLinecap: "round",
|
|
@@ -9323,8 +9608,8 @@ var NoFilterResultsFound = () => {
|
|
|
9323
9608
|
)
|
|
9324
9609
|
}
|
|
9325
9610
|
) }) }),
|
|
9326
|
-
/* @__PURE__ */ (0,
|
|
9327
|
-
/* @__PURE__ */ (0,
|
|
9611
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No Results Found" }),
|
|
9612
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "max-w-sm mb-0", children: "No data matches the current search query and configured parameters. Try adjusting your search criteria or filters to view available results." })
|
|
9328
9613
|
] });
|
|
9329
9614
|
};
|
|
9330
9615
|
var NoFilterResultsFound_default = NoFilterResultsFound;
|
|
@@ -9332,7 +9617,7 @@ var NoFilterResultsFound_default = NoFilterResultsFound;
|
|
|
9332
9617
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
9333
9618
|
init_AssetUtility();
|
|
9334
9619
|
var import_dynamic13 = __toESM(require("next/dynamic"));
|
|
9335
|
-
var
|
|
9620
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9336
9621
|
var HlsPlayer4 = (0, import_dynamic13.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
9337
9622
|
var deviceToMediaQuery = (device) => {
|
|
9338
9623
|
switch (device) {
|
|
@@ -9528,8 +9813,8 @@ var ImageGalleryNode = (props) => {
|
|
|
9528
9813
|
right: "justify-end"
|
|
9529
9814
|
};
|
|
9530
9815
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
9531
|
-
return /* @__PURE__ */ (0,
|
|
9532
|
-
hlsSources.length > 0 && hlsStyles.display !== "none" && /* @__PURE__ */ (0,
|
|
9816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
9817
|
+
hlsSources.length > 0 && hlsStyles.display !== "none" && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_jsx_runtime85.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { style: hlsStyles, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9533
9818
|
HlsPlayer4,
|
|
9534
9819
|
{
|
|
9535
9820
|
sources: hlsSources,
|
|
@@ -9544,7 +9829,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9544
9829
|
styles: hlsStyles
|
|
9545
9830
|
}
|
|
9546
9831
|
) }) }),
|
|
9547
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
9832
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { style: staticStyles, children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("picture", { children: [
|
|
9548
9833
|
DEVICE_ORDER.map((deviceKey) => {
|
|
9549
9834
|
const match = staticSources.find(
|
|
9550
9835
|
(img) => img.device === deviceKey
|
|
@@ -9560,7 +9845,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9560
9845
|
if (!srcUrl) {
|
|
9561
9846
|
return null;
|
|
9562
9847
|
}
|
|
9563
|
-
return /* @__PURE__ */ (0,
|
|
9848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9564
9849
|
"source",
|
|
9565
9850
|
{
|
|
9566
9851
|
media: deviceToMediaQuery(match.device),
|
|
@@ -9585,7 +9870,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9585
9870
|
if (img.borderRadius) {
|
|
9586
9871
|
styles.borderRadius = img.borderRadius;
|
|
9587
9872
|
}
|
|
9588
|
-
return /* @__PURE__ */ (0,
|
|
9873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9589
9874
|
"img",
|
|
9590
9875
|
{
|
|
9591
9876
|
loading: "lazy",
|
|
@@ -9600,7 +9885,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9600
9885
|
})()
|
|
9601
9886
|
] }) : (
|
|
9602
9887
|
/* Case 2: Only device-specific images exist */
|
|
9603
|
-
/* @__PURE__ */ (0,
|
|
9888
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_jsx_runtime85.Fragment, { children: staticSources.map((img, index) => {
|
|
9604
9889
|
const resolved = resolveImage(img);
|
|
9605
9890
|
const imageUrl = resolved?.imageUrl;
|
|
9606
9891
|
if (!imageUrl) {
|
|
@@ -9627,7 +9912,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9627
9912
|
default:
|
|
9628
9913
|
display = "block";
|
|
9629
9914
|
}
|
|
9630
|
-
return /* @__PURE__ */ (0,
|
|
9915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9631
9916
|
"img",
|
|
9632
9917
|
{
|
|
9633
9918
|
loading: "lazy",
|
|
@@ -9768,7 +10053,7 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
9768
10053
|
|
|
9769
10054
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
9770
10055
|
init_AssetUtility();
|
|
9771
|
-
var
|
|
10056
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
9772
10057
|
var getNestedValue5 = (obj, path) => {
|
|
9773
10058
|
if (!obj || !path) return void 0;
|
|
9774
10059
|
return path.split(".").reduce((current, key) => {
|
|
@@ -9799,21 +10084,21 @@ var parseDocuments = (value) => {
|
|
|
9799
10084
|
}
|
|
9800
10085
|
return [];
|
|
9801
10086
|
};
|
|
9802
|
-
var PdfIcon2 = () => /* @__PURE__ */ (0,
|
|
10087
|
+
var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
9803
10088
|
"svg",
|
|
9804
10089
|
{
|
|
9805
10090
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9806
10091
|
viewBox: "0 0 48 48",
|
|
9807
10092
|
className: "w-10 h-10",
|
|
9808
10093
|
children: [
|
|
9809
|
-
/* @__PURE__ */ (0,
|
|
10094
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9810
10095
|
"path",
|
|
9811
10096
|
{
|
|
9812
10097
|
fill: "#e53935",
|
|
9813
10098
|
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"
|
|
9814
10099
|
}
|
|
9815
10100
|
),
|
|
9816
|
-
/* @__PURE__ */ (0,
|
|
10101
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9817
10102
|
"path",
|
|
9818
10103
|
{
|
|
9819
10104
|
fill: "#fff",
|
|
@@ -9823,55 +10108,55 @@ var PdfIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
9823
10108
|
]
|
|
9824
10109
|
}
|
|
9825
10110
|
);
|
|
9826
|
-
var ExcelIcon2 = () => /* @__PURE__ */ (0,
|
|
10111
|
+
var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
9827
10112
|
"svg",
|
|
9828
10113
|
{
|
|
9829
10114
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9830
10115
|
viewBox: "0 0 48 48",
|
|
9831
10116
|
className: "w-10 h-10",
|
|
9832
10117
|
children: [
|
|
9833
|
-
/* @__PURE__ */ (0,
|
|
10118
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9834
10119
|
"path",
|
|
9835
10120
|
{
|
|
9836
10121
|
fill: "#169154",
|
|
9837
10122
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
9838
10123
|
}
|
|
9839
10124
|
),
|
|
9840
|
-
/* @__PURE__ */ (0,
|
|
10125
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9841
10126
|
"path",
|
|
9842
10127
|
{
|
|
9843
10128
|
fill: "#18482a",
|
|
9844
10129
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
9845
10130
|
}
|
|
9846
10131
|
),
|
|
9847
|
-
/* @__PURE__ */ (0,
|
|
9848
|
-
/* @__PURE__ */ (0,
|
|
9849
|
-
/* @__PURE__ */ (0,
|
|
9850
|
-
/* @__PURE__ */ (0,
|
|
10132
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
10133
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
10134
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("g", { children: [
|
|
10135
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9851
10136
|
"path",
|
|
9852
10137
|
{
|
|
9853
10138
|
fill: "#29c27f",
|
|
9854
10139
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
9855
10140
|
}
|
|
9856
10141
|
),
|
|
9857
|
-
/* @__PURE__ */ (0,
|
|
10142
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9858
10143
|
"path",
|
|
9859
10144
|
{
|
|
9860
10145
|
fill: "#27663f",
|
|
9861
10146
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
9862
10147
|
}
|
|
9863
10148
|
),
|
|
9864
|
-
/* @__PURE__ */ (0,
|
|
9865
|
-
/* @__PURE__ */ (0,
|
|
10149
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
10150
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
9866
10151
|
] }),
|
|
9867
|
-
/* @__PURE__ */ (0,
|
|
10152
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9868
10153
|
"path",
|
|
9869
10154
|
{
|
|
9870
10155
|
fill: "#0c7238",
|
|
9871
10156
|
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"
|
|
9872
10157
|
}
|
|
9873
10158
|
),
|
|
9874
|
-
/* @__PURE__ */ (0,
|
|
10159
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9875
10160
|
"path",
|
|
9876
10161
|
{
|
|
9877
10162
|
fill: "#fff",
|
|
@@ -9881,7 +10166,7 @@ var ExcelIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
9881
10166
|
]
|
|
9882
10167
|
}
|
|
9883
10168
|
);
|
|
9884
|
-
var WordIcon2 = () => /* @__PURE__ */ (0,
|
|
10169
|
+
var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
9885
10170
|
"svg",
|
|
9886
10171
|
{
|
|
9887
10172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9889,14 +10174,14 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
9889
10174
|
className: "w-10 h-10",
|
|
9890
10175
|
baseProfile: "basic",
|
|
9891
10176
|
children: [
|
|
9892
|
-
/* @__PURE__ */ (0,
|
|
10177
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9893
10178
|
"path",
|
|
9894
10179
|
{
|
|
9895
10180
|
fill: "#283593",
|
|
9896
10181
|
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"
|
|
9897
10182
|
}
|
|
9898
10183
|
),
|
|
9899
|
-
/* @__PURE__ */ (0,
|
|
10184
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
9900
10185
|
"linearGradient",
|
|
9901
10186
|
{
|
|
9902
10187
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -9907,19 +10192,19 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
9907
10192
|
gradientTransform: "translate(0 -339.89)",
|
|
9908
10193
|
gradientUnits: "userSpaceOnUse",
|
|
9909
10194
|
children: [
|
|
9910
|
-
/* @__PURE__ */ (0,
|
|
9911
|
-
/* @__PURE__ */ (0,
|
|
10195
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
10196
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
9912
10197
|
]
|
|
9913
10198
|
}
|
|
9914
10199
|
),
|
|
9915
|
-
/* @__PURE__ */ (0,
|
|
10200
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9916
10201
|
"path",
|
|
9917
10202
|
{
|
|
9918
10203
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
9919
10204
|
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"
|
|
9920
10205
|
}
|
|
9921
10206
|
),
|
|
9922
|
-
/* @__PURE__ */ (0,
|
|
10207
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9923
10208
|
"path",
|
|
9924
10209
|
{
|
|
9925
10210
|
fill: "#1e88e5",
|
|
@@ -9927,21 +10212,21 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
9927
10212
|
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"
|
|
9928
10213
|
}
|
|
9929
10214
|
),
|
|
9930
|
-
/* @__PURE__ */ (0,
|
|
10215
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9931
10216
|
"path",
|
|
9932
10217
|
{
|
|
9933
10218
|
fill: "#00e5ff",
|
|
9934
10219
|
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"
|
|
9935
10220
|
}
|
|
9936
10221
|
),
|
|
9937
|
-
/* @__PURE__ */ (0,
|
|
10222
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9938
10223
|
"path",
|
|
9939
10224
|
{
|
|
9940
10225
|
fill: "#1565c0",
|
|
9941
10226
|
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"
|
|
9942
10227
|
}
|
|
9943
10228
|
),
|
|
9944
|
-
/* @__PURE__ */ (0,
|
|
10229
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9945
10230
|
"path",
|
|
9946
10231
|
{
|
|
9947
10232
|
fill: "#fff",
|
|
@@ -9951,42 +10236,42 @@ var WordIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
9951
10236
|
]
|
|
9952
10237
|
}
|
|
9953
10238
|
);
|
|
9954
|
-
var StandardIcon2 = () => /* @__PURE__ */ (0,
|
|
10239
|
+
var StandardIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
9955
10240
|
"svg",
|
|
9956
10241
|
{
|
|
9957
10242
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9958
10243
|
viewBox: "0 0 48 48",
|
|
9959
10244
|
className: "w-10 h-10",
|
|
9960
10245
|
children: [
|
|
9961
|
-
/* @__PURE__ */ (0,
|
|
9962
|
-
/* @__PURE__ */ (0,
|
|
10246
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
10247
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
9963
10248
|
]
|
|
9964
10249
|
}
|
|
9965
10250
|
);
|
|
9966
|
-
var PowerPointIcon2 = () => /* @__PURE__ */ (0,
|
|
10251
|
+
var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
9967
10252
|
"svg",
|
|
9968
10253
|
{
|
|
9969
10254
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9970
10255
|
viewBox: "0 0 48 48",
|
|
9971
10256
|
className: "w-10 h-10",
|
|
9972
10257
|
children: [
|
|
9973
|
-
/* @__PURE__ */ (0,
|
|
10258
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9974
10259
|
"path",
|
|
9975
10260
|
{
|
|
9976
10261
|
fill: "#dc4c2c",
|
|
9977
10262
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
9978
10263
|
}
|
|
9979
10264
|
),
|
|
9980
|
-
/* @__PURE__ */ (0,
|
|
9981
|
-
/* @__PURE__ */ (0,
|
|
9982
|
-
/* @__PURE__ */ (0,
|
|
10265
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
10266
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
10267
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9983
10268
|
"path",
|
|
9984
10269
|
{
|
|
9985
10270
|
fill: "#9b341f",
|
|
9986
10271
|
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"
|
|
9987
10272
|
}
|
|
9988
10273
|
),
|
|
9989
|
-
/* @__PURE__ */ (0,
|
|
10274
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9990
10275
|
"path",
|
|
9991
10276
|
{
|
|
9992
10277
|
fill: "#fff",
|
|
@@ -9996,16 +10281,16 @@ var PowerPointIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
9996
10281
|
]
|
|
9997
10282
|
}
|
|
9998
10283
|
);
|
|
9999
|
-
var TextIcon2 = () => /* @__PURE__ */ (0,
|
|
10284
|
+
var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
10000
10285
|
"svg",
|
|
10001
10286
|
{
|
|
10002
10287
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10003
10288
|
viewBox: "0 0 48 48",
|
|
10004
10289
|
className: "w-10 h-10",
|
|
10005
10290
|
children: [
|
|
10006
|
-
/* @__PURE__ */ (0,
|
|
10007
|
-
/* @__PURE__ */ (0,
|
|
10008
|
-
/* @__PURE__ */ (0,
|
|
10291
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
10292
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
10293
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10009
10294
|
"path",
|
|
10010
10295
|
{
|
|
10011
10296
|
fill: "#1976D2",
|
|
@@ -10015,7 +10300,7 @@ var TextIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
10015
10300
|
]
|
|
10016
10301
|
}
|
|
10017
10302
|
);
|
|
10018
|
-
var ArchiveIcon2 = () => /* @__PURE__ */ (0,
|
|
10303
|
+
var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
10019
10304
|
"svg",
|
|
10020
10305
|
{
|
|
10021
10306
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10025,14 +10310,14 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
10025
10310
|
version: "1.0",
|
|
10026
10311
|
className: "w-10 h-10",
|
|
10027
10312
|
children: [
|
|
10028
|
-
/* @__PURE__ */ (0,
|
|
10313
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10029
10314
|
"path",
|
|
10030
10315
|
{
|
|
10031
10316
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
10032
10317
|
"clip-rule": "nonzero"
|
|
10033
10318
|
}
|
|
10034
10319
|
) }) }),
|
|
10035
|
-
/* @__PURE__ */ (0,
|
|
10320
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10036
10321
|
"path",
|
|
10037
10322
|
{
|
|
10038
10323
|
fill: "#ff9100",
|
|
@@ -10041,7 +10326,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
10041
10326
|
"fill-rule": "nonzero"
|
|
10042
10327
|
}
|
|
10043
10328
|
) }),
|
|
10044
|
-
/* @__PURE__ */ (0,
|
|
10329
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10045
10330
|
"path",
|
|
10046
10331
|
{
|
|
10047
10332
|
fill: "#fbe9e7",
|
|
@@ -10050,7 +10335,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
10050
10335
|
"fill-rule": "nonzero"
|
|
10051
10336
|
}
|
|
10052
10337
|
),
|
|
10053
|
-
/* @__PURE__ */ (0,
|
|
10338
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10054
10339
|
"path",
|
|
10055
10340
|
{
|
|
10056
10341
|
fill: "#ffe0b2",
|
|
@@ -10059,7 +10344,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
10059
10344
|
"fill-rule": "nonzero"
|
|
10060
10345
|
}
|
|
10061
10346
|
),
|
|
10062
|
-
/* @__PURE__ */ (0,
|
|
10347
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10063
10348
|
"path",
|
|
10064
10349
|
{
|
|
10065
10350
|
fill: "#ffe0b2",
|
|
@@ -10068,7 +10353,7 @@ var ArchiveIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
|
10068
10353
|
"fill-rule": "nonzero"
|
|
10069
10354
|
}
|
|
10070
10355
|
),
|
|
10071
|
-
/* @__PURE__ */ (0,
|
|
10356
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10072
10357
|
"path",
|
|
10073
10358
|
{
|
|
10074
10359
|
fill: "#ffe0b2",
|
|
@@ -10121,8 +10406,8 @@ var DocumentNode = (props) => {
|
|
|
10121
10406
|
if (!props.node.showNoResultMessage) {
|
|
10122
10407
|
return null;
|
|
10123
10408
|
}
|
|
10124
|
-
return /* @__PURE__ */ (0,
|
|
10125
|
-
/* @__PURE__ */ (0,
|
|
10409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_jsx_runtime86.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
10410
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10126
10411
|
"svg",
|
|
10127
10412
|
{
|
|
10128
10413
|
className: "w-5 h-5",
|
|
@@ -10130,7 +10415,7 @@ var DocumentNode = (props) => {
|
|
|
10130
10415
|
stroke: "currentColor",
|
|
10131
10416
|
viewBox: "0 0 24 24",
|
|
10132
10417
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10133
|
-
children: /* @__PURE__ */ (0,
|
|
10418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10134
10419
|
"path",
|
|
10135
10420
|
{
|
|
10136
10421
|
strokeLinecap: "round",
|
|
@@ -10141,11 +10426,11 @@ var DocumentNode = (props) => {
|
|
|
10141
10426
|
)
|
|
10142
10427
|
}
|
|
10143
10428
|
) }),
|
|
10144
|
-
/* @__PURE__ */ (0,
|
|
10145
|
-
/* @__PURE__ */ (0,
|
|
10429
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
10430
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
10146
10431
|
] }) });
|
|
10147
10432
|
}
|
|
10148
|
-
return /* @__PURE__ */ (0,
|
|
10433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
10149
10434
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
10150
10435
|
props.assetBaseUrl,
|
|
10151
10436
|
doc.assetUrl
|
|
@@ -10163,16 +10448,16 @@ var DocumentNode = (props) => {
|
|
|
10163
10448
|
}
|
|
10164
10449
|
}
|
|
10165
10450
|
const { Icon: Icon2, extLabel } = getFileDetails2(documentUrl);
|
|
10166
|
-
return /* @__PURE__ */ (0,
|
|
10451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
10167
10452
|
"div",
|
|
10168
10453
|
{
|
|
10169
10454
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
10170
10455
|
children: [
|
|
10171
|
-
/* @__PURE__ */ (0,
|
|
10172
|
-
/* @__PURE__ */ (0,
|
|
10173
|
-
/* @__PURE__ */ (0,
|
|
10456
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center space-x-4 min-w-0", children: [
|
|
10457
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Icon2, {}) }),
|
|
10458
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex items-baseline space-x-2 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h4", { className: "text-sm sm:text-base font-semibold [overflow-wrap:anywhere] min-w-0 sm:truncate", title: documentTitle, children: documentTitle }) })
|
|
10174
10459
|
] }),
|
|
10175
|
-
/* @__PURE__ */ (0,
|
|
10460
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
10176
10461
|
"a",
|
|
10177
10462
|
{
|
|
10178
10463
|
href: documentUrl,
|
|
@@ -10180,7 +10465,7 @@ var DocumentNode = (props) => {
|
|
|
10180
10465
|
rel: "noopener noreferrer",
|
|
10181
10466
|
className: "inline-flex items-center px-4 py-2 text-sm font-medium bg-default border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors shrink-0",
|
|
10182
10467
|
children: [
|
|
10183
|
-
/* @__PURE__ */ (0,
|
|
10468
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
10184
10469
|
"svg",
|
|
10185
10470
|
{
|
|
10186
10471
|
className: "w-4 h-4 mr-2",
|
|
@@ -10188,7 +10473,7 @@ var DocumentNode = (props) => {
|
|
|
10188
10473
|
stroke: "currentColor",
|
|
10189
10474
|
viewBox: "0 0 24 24",
|
|
10190
10475
|
children: [
|
|
10191
|
-
/* @__PURE__ */ (0,
|
|
10476
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10192
10477
|
"path",
|
|
10193
10478
|
{
|
|
10194
10479
|
strokeLinecap: "round",
|
|
@@ -10197,7 +10482,7 @@ var DocumentNode = (props) => {
|
|
|
10197
10482
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
10198
10483
|
}
|
|
10199
10484
|
),
|
|
10200
|
-
/* @__PURE__ */ (0,
|
|
10485
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10201
10486
|
"path",
|
|
10202
10487
|
{
|
|
10203
10488
|
strokeLinecap: "round",
|
|
@@ -10223,13 +10508,13 @@ var DocumentNode_default = DocumentNode;
|
|
|
10223
10508
|
|
|
10224
10509
|
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
10225
10510
|
var import_dynamic14 = __toESM(require("next/dynamic"));
|
|
10226
|
-
var
|
|
10511
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
10227
10512
|
var IframeClient3 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
10228
10513
|
ssr: false
|
|
10229
10514
|
});
|
|
10230
10515
|
var GoogleMapNode = (props) => {
|
|
10231
10516
|
let src = props.node.embedUrl;
|
|
10232
|
-
return /* @__PURE__ */ (0,
|
|
10517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "google-map-container", children: src && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10233
10518
|
IframeClient3,
|
|
10234
10519
|
{
|
|
10235
10520
|
src,
|
|
@@ -10243,7 +10528,7 @@ var GoogleMapNode_default = GoogleMapNode;
|
|
|
10243
10528
|
// src/components/pageRenderingEngine/nodes/MediaAccordionNode.tsx
|
|
10244
10529
|
var import_dynamic16 = __toESM(require("next/dynamic"));
|
|
10245
10530
|
init_ServiceClient();
|
|
10246
|
-
var
|
|
10531
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
10247
10532
|
var MediaAccordionNodeClient2 = (0, import_dynamic16.default)(
|
|
10248
10533
|
() => Promise.resolve().then(() => (init_MediaAccordionNodeClient(), MediaAccordionNodeClient_exports)),
|
|
10249
10534
|
{ ssr: false }
|
|
@@ -10328,7 +10613,7 @@ var MediaAccordionNode = async (props) => {
|
|
|
10328
10613
|
props.routeParameters
|
|
10329
10614
|
);
|
|
10330
10615
|
const node = apiItems ? { ...props.node, items: apiItems } : props.node;
|
|
10331
|
-
return /* @__PURE__ */ (0,
|
|
10616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10332
10617
|
MediaAccordionNodeClient2,
|
|
10333
10618
|
{
|
|
10334
10619
|
node,
|
|
@@ -10340,7 +10625,7 @@ var MediaAccordionNode = async (props) => {
|
|
|
10340
10625
|
var MediaAccordionNode_default = MediaAccordionNode;
|
|
10341
10626
|
|
|
10342
10627
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
10343
|
-
var
|
|
10628
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
10344
10629
|
var Pagination2 = (0, import_dynamic17.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
10345
10630
|
var DataBindingControls2 = (0, import_dynamic17.default)(() => Promise.resolve().then(() => (init_DataBindingControls(), DataBindingControls_exports)), {
|
|
10346
10631
|
ssr: true
|
|
@@ -10636,7 +10921,7 @@ var DivContainer = async (props) => {
|
|
|
10636
10921
|
}
|
|
10637
10922
|
const SelectedNode = NodeTypes2[node.type];
|
|
10638
10923
|
if (!SelectedNode) return null;
|
|
10639
|
-
return /* @__PURE__ */ (0,
|
|
10924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react64.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10640
10925
|
SelectedNode,
|
|
10641
10926
|
{
|
|
10642
10927
|
node,
|
|
@@ -10741,7 +11026,7 @@ var DivContainer = async (props) => {
|
|
|
10741
11026
|
item,
|
|
10742
11027
|
idx,
|
|
10743
11028
|
props.href ? void 0 : item?.links?.view
|
|
10744
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
11029
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react64.default.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
10745
11030
|
);
|
|
10746
11031
|
}
|
|
10747
11032
|
return props.node.children.flatMap((node, childIndex) => {
|
|
@@ -10859,17 +11144,17 @@ var DivContainer = async (props) => {
|
|
|
10859
11144
|
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
10860
11145
|
);
|
|
10861
11146
|
const WrapperComponent = Wrapper;
|
|
10862
|
-
const renderedContainer = /* @__PURE__ */ (0,
|
|
11147
|
+
const renderedContainer = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10863
11148
|
WrapperComponent,
|
|
10864
11149
|
{
|
|
10865
11150
|
id: guid,
|
|
10866
11151
|
style: combinedStyles,
|
|
10867
11152
|
className: classNames || void 0,
|
|
10868
11153
|
...wrapperProps,
|
|
10869
|
-
children: shouldShowNoDataMessage ? hasActiveFilter ? /* @__PURE__ */ (0,
|
|
11154
|
+
children: shouldShowNoDataMessage ? hasActiveFilter ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NoFilterResultsFound_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NoDataFound_default, {}) : renderContainerChildren()
|
|
10870
11155
|
}
|
|
10871
11156
|
);
|
|
10872
|
-
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0,
|
|
11157
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10873
11158
|
Pagination2,
|
|
10874
11159
|
{
|
|
10875
11160
|
path: props.path,
|
|
@@ -10877,15 +11162,15 @@ var DivContainer = async (props) => {
|
|
|
10877
11162
|
dataset: response
|
|
10878
11163
|
}
|
|
10879
11164
|
) : null;
|
|
10880
|
-
return /* @__PURE__ */ (0,
|
|
10881
|
-
/* @__PURE__ */ (0,
|
|
11165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_react64.default.Fragment, { children: [
|
|
11166
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10882
11167
|
"style",
|
|
10883
11168
|
{
|
|
10884
11169
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
10885
11170
|
}
|
|
10886
11171
|
),
|
|
10887
|
-
showDataBindingControls ? /* @__PURE__ */ (0,
|
|
10888
|
-
/* @__PURE__ */ (0,
|
|
11172
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_react64.default.Fragment, { children: [
|
|
11173
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10889
11174
|
DataBindingControls2,
|
|
10890
11175
|
{
|
|
10891
11176
|
mode: "toolbar",
|
|
@@ -10898,16 +11183,16 @@ var DivContainer = async (props) => {
|
|
|
10898
11183
|
showSearchBar: dataBindingProperties?.showSearchBar
|
|
10899
11184
|
}
|
|
10900
11185
|
),
|
|
10901
|
-
/* @__PURE__ */ (0,
|
|
11186
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
10902
11187
|
"div",
|
|
10903
11188
|
{
|
|
10904
11189
|
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
10905
11190
|
children: [
|
|
10906
|
-
/* @__PURE__ */ (0,
|
|
11191
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "min-w-0", children: [
|
|
10907
11192
|
renderedContainer,
|
|
10908
11193
|
paginationControl
|
|
10909
11194
|
] }),
|
|
10910
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ (0,
|
|
11195
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("aside", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10911
11196
|
DataBindingControls2,
|
|
10912
11197
|
{
|
|
10913
11198
|
mode: "facets",
|
|
@@ -10920,16 +11205,16 @@ var DivContainer = async (props) => {
|
|
|
10920
11205
|
]
|
|
10921
11206
|
}
|
|
10922
11207
|
)
|
|
10923
|
-
] }) : /* @__PURE__ */ (0,
|
|
11208
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_react64.default.Fragment, { children: [
|
|
10924
11209
|
renderedContainer,
|
|
10925
|
-
paginationControl && /* @__PURE__ */ (0,
|
|
11210
|
+
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { children: paginationControl })
|
|
10926
11211
|
] })
|
|
10927
11212
|
] });
|
|
10928
11213
|
};
|
|
10929
11214
|
var DivContainer_default = DivContainer;
|
|
10930
11215
|
|
|
10931
11216
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
10932
|
-
var
|
|
11217
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
10933
11218
|
var NodeTypes = {
|
|
10934
11219
|
["paragraph"]: ParagraphNode_default,
|
|
10935
11220
|
["heading"]: HeadingNode_default,
|
|
@@ -10969,14 +11254,14 @@ var PageBodyRenderer = (props) => {
|
|
|
10969
11254
|
}
|
|
10970
11255
|
return true;
|
|
10971
11256
|
};
|
|
10972
|
-
return /* @__PURE__ */ (0,
|
|
11257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react65.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
10973
11258
|
{
|
|
10974
11259
|
}
|
|
10975
11260
|
const SelectedNode = NodeTypes[node.type];
|
|
10976
11261
|
if (!shouldRenderNode(node)) {
|
|
10977
11262
|
return null;
|
|
10978
11263
|
}
|
|
10979
|
-
return /* @__PURE__ */ (0,
|
|
11264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react65.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react65.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react65.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
10980
11265
|
SelectedNode,
|
|
10981
11266
|
{
|
|
10982
11267
|
node,
|
|
@@ -10992,7 +11277,7 @@ var PageBodyRenderer = (props) => {
|
|
|
10992
11277
|
device: props.device,
|
|
10993
11278
|
widgetRenderer: props.widgetRenderer
|
|
10994
11279
|
}
|
|
10995
|
-
) }) : /* @__PURE__ */ (0,
|
|
11280
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react65.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
10996
11281
|
SelectedNode,
|
|
10997
11282
|
{
|
|
10998
11283
|
node,
|
|
@@ -11013,10 +11298,10 @@ var PageBodyRenderer = (props) => {
|
|
|
11013
11298
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
11014
11299
|
|
|
11015
11300
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
11016
|
-
var
|
|
11301
|
+
var import_react66 = require("react");
|
|
11017
11302
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
11018
11303
|
function EnterAnimationHydrator() {
|
|
11019
|
-
(0,
|
|
11304
|
+
(0, import_react66.useEffect)(() => {
|
|
11020
11305
|
let observer;
|
|
11021
11306
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
11022
11307
|
const revealAnimatedElements = () => {
|
|
@@ -11061,22 +11346,22 @@ function EnterAnimationHydrator() {
|
|
|
11061
11346
|
}
|
|
11062
11347
|
|
|
11063
11348
|
// src/components/Toast.tsx
|
|
11064
|
-
var
|
|
11349
|
+
var import_react67 = require("react");
|
|
11065
11350
|
init_ToastService();
|
|
11066
|
-
var
|
|
11351
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
11067
11352
|
var Toast = () => {
|
|
11068
|
-
const [showToast, setShowToast] = (0,
|
|
11069
|
-
const [message, setMessage] = (0,
|
|
11070
|
-
const [messageType, setMessageType] = (0,
|
|
11071
|
-
const timeoutRef = (0,
|
|
11072
|
-
const closeToast = (0,
|
|
11353
|
+
const [showToast, setShowToast] = (0, import_react67.useState)(false);
|
|
11354
|
+
const [message, setMessage] = (0, import_react67.useState)("");
|
|
11355
|
+
const [messageType, setMessageType] = (0, import_react67.useState)("error");
|
|
11356
|
+
const timeoutRef = (0, import_react67.useRef)(null);
|
|
11357
|
+
const closeToast = (0, import_react67.useCallback)(() => {
|
|
11073
11358
|
if (timeoutRef.current) {
|
|
11074
11359
|
clearTimeout(timeoutRef.current);
|
|
11075
11360
|
timeoutRef.current = null;
|
|
11076
11361
|
}
|
|
11077
11362
|
setShowToast(false);
|
|
11078
11363
|
}, []);
|
|
11079
|
-
const showMessage = (0,
|
|
11364
|
+
const showMessage = (0, import_react67.useCallback)((message2, messageType2) => {
|
|
11080
11365
|
if (timeoutRef.current) {
|
|
11081
11366
|
clearTimeout(timeoutRef.current);
|
|
11082
11367
|
}
|
|
@@ -11088,7 +11373,7 @@ var Toast = () => {
|
|
|
11088
11373
|
timeoutRef.current = null;
|
|
11089
11374
|
}, 4e3);
|
|
11090
11375
|
}, []);
|
|
11091
|
-
(0,
|
|
11376
|
+
(0, import_react67.useEffect)(() => {
|
|
11092
11377
|
ToastService_default.initialize(showMessage, closeToast);
|
|
11093
11378
|
return () => {
|
|
11094
11379
|
closeToast();
|
|
@@ -11097,8 +11382,8 @@ var Toast = () => {
|
|
|
11097
11382
|
});
|
|
11098
11383
|
};
|
|
11099
11384
|
}, [closeToast, showMessage]);
|
|
11100
|
-
return /* @__PURE__ */ (0,
|
|
11101
|
-
/* @__PURE__ */ (0,
|
|
11385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_jsx_runtime95.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "fixed top-2 flex justify-center w-[calc(100%-2rem)] sm:w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `w-full items-center flex justify-between p-3 pr-8 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
11386
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11102
11387
|
"span",
|
|
11103
11388
|
{
|
|
11104
11389
|
className: "font-medium text-inherit text-sm",
|
|
@@ -11106,7 +11391,7 @@ var Toast = () => {
|
|
|
11106
11391
|
children: message
|
|
11107
11392
|
}
|
|
11108
11393
|
),
|
|
11109
|
-
/* @__PURE__ */ (0,
|
|
11394
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
11110
11395
|
"svg",
|
|
11111
11396
|
{
|
|
11112
11397
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11114,7 +11399,7 @@ var Toast = () => {
|
|
|
11114
11399
|
fill: "none",
|
|
11115
11400
|
viewBox: "0 0 24 24",
|
|
11116
11401
|
stroke: "currentColor",
|
|
11117
|
-
children: /* @__PURE__ */ (0,
|
|
11402
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
11118
11403
|
}
|
|
11119
11404
|
) })
|
|
11120
11405
|
] }) }) });
|
|
@@ -11140,11 +11425,12 @@ init_EmailInput();
|
|
|
11140
11425
|
init_TimeInput();
|
|
11141
11426
|
init_DateInput();
|
|
11142
11427
|
init_RadioInput();
|
|
11428
|
+
init_PicklistInput();
|
|
11143
11429
|
|
|
11144
11430
|
// src/components/NavigationTabsV2.tsx
|
|
11145
11431
|
var import_link3 = __toESM(require("next/link"));
|
|
11146
11432
|
var import_navigation2 = require("next/navigation");
|
|
11147
|
-
var
|
|
11433
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
11148
11434
|
function resolveRoutePlaceholders(route, params) {
|
|
11149
11435
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
11150
11436
|
const value = params[key];
|
|
@@ -11169,8 +11455,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
11169
11455
|
isActive: tab.isActive
|
|
11170
11456
|
})) || [];
|
|
11171
11457
|
if (mappedTabs.length === 0) return null;
|
|
11172
|
-
return /* @__PURE__ */ (0,
|
|
11173
|
-
return /* @__PURE__ */ (0,
|
|
11458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
11459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11174
11460
|
"div",
|
|
11175
11461
|
{
|
|
11176
11462
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -11183,14 +11469,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
11183
11469
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
11184
11470
|
|
|
11185
11471
|
// src/components/dataForm/DataList.tsx
|
|
11186
|
-
var
|
|
11472
|
+
var import_react70 = __toESM(require("react"));
|
|
11187
11473
|
var import_navigation3 = require("next/navigation");
|
|
11188
11474
|
|
|
11189
11475
|
// src/components/dataForm/NoContentView.tsx
|
|
11190
|
-
var
|
|
11191
|
-
var
|
|
11476
|
+
var import_react68 = __toESM(require("react"));
|
|
11477
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
11192
11478
|
var NoContentView = (props) => {
|
|
11193
|
-
return /* @__PURE__ */ (0,
|
|
11479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_react68.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
11194
11480
|
};
|
|
11195
11481
|
var NoContentView_default = NoContentView;
|
|
11196
11482
|
|
|
@@ -11198,39 +11484,39 @@ var NoContentView_default = NoContentView;
|
|
|
11198
11484
|
init_InputControlType();
|
|
11199
11485
|
|
|
11200
11486
|
// src/components/dataForm/ContentView.tsx
|
|
11201
|
-
var
|
|
11202
|
-
var
|
|
11487
|
+
var import_react69 = __toESM(require("react"));
|
|
11488
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
11203
11489
|
var ContentView = (props) => {
|
|
11204
|
-
return /* @__PURE__ */ (0,
|
|
11205
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
11206
|
-
/* @__PURE__ */ (0,
|
|
11207
|
-
/* @__PURE__ */ (0,
|
|
11208
|
-
/* @__PURE__ */ (0,
|
|
11209
|
-
/* @__PURE__ */ (0,
|
|
11210
|
-
/* @__PURE__ */ (0,
|
|
11490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_react69.default.Fragment, { children: [
|
|
11491
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
11492
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
11493
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
11494
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "ml-2", children: [
|
|
11495
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
11496
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
11211
11497
|
] })
|
|
11212
11498
|
] }),
|
|
11213
|
-
/* @__PURE__ */ (0,
|
|
11214
|
-
/* @__PURE__ */ (0,
|
|
11215
|
-
/* @__PURE__ */ (0,
|
|
11216
|
-
/* @__PURE__ */ (0,
|
|
11217
|
-
/* @__PURE__ */ (0,
|
|
11218
|
-
/* @__PURE__ */ (0,
|
|
11219
|
-
/* @__PURE__ */ (0,
|
|
11499
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
11500
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "animate-pulse", children: [
|
|
11501
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
11502
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
11503
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
11504
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
11505
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
11220
11506
|
] }),
|
|
11221
|
-
/* @__PURE__ */ (0,
|
|
11222
|
-
/* @__PURE__ */ (0,
|
|
11223
|
-
/* @__PURE__ */ (0,
|
|
11224
|
-
/* @__PURE__ */ (0,
|
|
11225
|
-
/* @__PURE__ */ (0,
|
|
11226
|
-
/* @__PURE__ */ (0,
|
|
11507
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "animate-pulse", children: [
|
|
11508
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
11509
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
11510
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
11511
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
11512
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
11227
11513
|
] }),
|
|
11228
|
-
/* @__PURE__ */ (0,
|
|
11229
|
-
/* @__PURE__ */ (0,
|
|
11230
|
-
/* @__PURE__ */ (0,
|
|
11231
|
-
/* @__PURE__ */ (0,
|
|
11232
|
-
/* @__PURE__ */ (0,
|
|
11233
|
-
/* @__PURE__ */ (0,
|
|
11514
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "animate-pulse", children: [
|
|
11515
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
11516
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
11517
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
11518
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
11519
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
11234
11520
|
] })
|
|
11235
11521
|
] })
|
|
11236
11522
|
] }) }),
|
|
@@ -11290,7 +11576,7 @@ function FormReducer(state, action) {
|
|
|
11290
11576
|
var FormReducer_default = FormReducer;
|
|
11291
11577
|
|
|
11292
11578
|
// src/components/dataForm/DataList.tsx
|
|
11293
|
-
var
|
|
11579
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
11294
11580
|
var DataList = (props) => {
|
|
11295
11581
|
const router = (0, import_navigation3.useRouter)();
|
|
11296
11582
|
let builder = new OdataBuilder(props.path);
|
|
@@ -11298,13 +11584,13 @@ var DataList = (props) => {
|
|
|
11298
11584
|
let activePageNumber = 0;
|
|
11299
11585
|
let pages = 0;
|
|
11300
11586
|
console.log(props.addLinkText);
|
|
11301
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
11302
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
11587
|
+
const [isDataFound, setIsDataFound] = (0, import_react70.useState)(null);
|
|
11588
|
+
const [searchTerm, setSearchTerm] = (0, import_react70.useState)(props.query?.searchTerm ?? "");
|
|
11303
11589
|
const searchPlaceholder = `Search by ${props.columns.filter((col) => col.isSearchable).map((col) => col.label).join(", ")}`;
|
|
11304
|
-
(0,
|
|
11590
|
+
(0, import_react70.useEffect)(() => {
|
|
11305
11591
|
setSearchTerm(props.query?.searchTerm ?? "");
|
|
11306
11592
|
}, [props.query?.searchTerm]);
|
|
11307
|
-
(0,
|
|
11593
|
+
(0, import_react70.useEffect)(() => {
|
|
11308
11594
|
if (props?.dataset) {
|
|
11309
11595
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
11310
11596
|
setIsDataFound(true);
|
|
@@ -11313,7 +11599,7 @@ var DataList = (props) => {
|
|
|
11313
11599
|
}
|
|
11314
11600
|
}
|
|
11315
11601
|
}, [props.dataset]);
|
|
11316
|
-
(0,
|
|
11602
|
+
(0, import_react70.useEffect)(() => {
|
|
11317
11603
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
11318
11604
|
const filterQuery = props.query["$filter"];
|
|
11319
11605
|
props.filters.forEach((filter) => {
|
|
@@ -11332,7 +11618,7 @@ var DataList = (props) => {
|
|
|
11332
11618
|
if (path.includes(".")) {
|
|
11333
11619
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
11334
11620
|
} else if (Array.isArray(obj[path])) {
|
|
11335
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
11621
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { children: item }, index));
|
|
11336
11622
|
} else {
|
|
11337
11623
|
return obj[path];
|
|
11338
11624
|
}
|
|
@@ -11341,11 +11627,11 @@ var DataList = (props) => {
|
|
|
11341
11627
|
inputValues: {},
|
|
11342
11628
|
lastPropertyChanged: ""
|
|
11343
11629
|
};
|
|
11344
|
-
const [formState, dispatch] = (0,
|
|
11630
|
+
const [formState, dispatch] = (0, import_react70.useReducer)(FormReducer_default, initialState);
|
|
11345
11631
|
const getSearchableColumns = () => {
|
|
11346
11632
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
11347
11633
|
};
|
|
11348
|
-
const handleFilterChange = (0,
|
|
11634
|
+
const handleFilterChange = (0, import_react70.useCallback)(
|
|
11349
11635
|
(updatedValues) => {
|
|
11350
11636
|
dispatch({
|
|
11351
11637
|
type: FORM_INPUT_UPDATE,
|
|
@@ -11376,7 +11662,7 @@ var DataList = (props) => {
|
|
|
11376
11662
|
},
|
|
11377
11663
|
[dispatch, props, router]
|
|
11378
11664
|
);
|
|
11379
|
-
(0,
|
|
11665
|
+
(0, import_react70.useEffect)(() => {
|
|
11380
11666
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
11381
11667
|
return;
|
|
11382
11668
|
}
|
|
@@ -11414,30 +11700,30 @@ var DataList = (props) => {
|
|
|
11414
11700
|
const renderPageNumbers = () => {
|
|
11415
11701
|
if (pages <= 10) {
|
|
11416
11702
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
11417
|
-
(page) => /* @__PURE__ */ (0,
|
|
11703
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react70.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11418
11704
|
Hyperlink,
|
|
11419
11705
|
{
|
|
11420
11706
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
11421
11707
|
href: builder.getNewPageUrl(page),
|
|
11422
11708
|
children: page
|
|
11423
11709
|
}
|
|
11424
|
-
) : /* @__PURE__ */ (0,
|
|
11710
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
11425
11711
|
);
|
|
11426
11712
|
} else {
|
|
11427
11713
|
const showFirstPages = activePageNumber <= 5;
|
|
11428
11714
|
const showLastPages = activePageNumber > pages - 5;
|
|
11429
11715
|
if (showFirstPages) {
|
|
11430
|
-
return /* @__PURE__ */ (0,
|
|
11431
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
11716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
11717
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react70.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11432
11718
|
Hyperlink,
|
|
11433
11719
|
{
|
|
11434
11720
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
11435
11721
|
href: builder.getNewPageUrl(page),
|
|
11436
11722
|
children: page
|
|
11437
11723
|
}
|
|
11438
|
-
) : /* @__PURE__ */ (0,
|
|
11439
|
-
/* @__PURE__ */ (0,
|
|
11440
|
-
/* @__PURE__ */ (0,
|
|
11724
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
11725
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
11726
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11441
11727
|
Hyperlink,
|
|
11442
11728
|
{
|
|
11443
11729
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -11445,7 +11731,7 @@ var DataList = (props) => {
|
|
|
11445
11731
|
children: pages - 1
|
|
11446
11732
|
}
|
|
11447
11733
|
),
|
|
11448
|
-
/* @__PURE__ */ (0,
|
|
11734
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11449
11735
|
Hyperlink,
|
|
11450
11736
|
{
|
|
11451
11737
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -11453,7 +11739,7 @@ var DataList = (props) => {
|
|
|
11453
11739
|
children: pages
|
|
11454
11740
|
}
|
|
11455
11741
|
),
|
|
11456
|
-
/* @__PURE__ */ (0,
|
|
11742
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
11457
11743
|
"select",
|
|
11458
11744
|
{
|
|
11459
11745
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -11465,18 +11751,18 @@ var DataList = (props) => {
|
|
|
11465
11751
|
}
|
|
11466
11752
|
},
|
|
11467
11753
|
children: [
|
|
11468
|
-
/* @__PURE__ */ (0,
|
|
11754
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
11469
11755
|
Array.from(
|
|
11470
11756
|
{ length: Math.max(0, pages - 10) },
|
|
11471
11757
|
(_, index) => index + 9
|
|
11472
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
11758
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("option", { value: page, children: page }, page))
|
|
11473
11759
|
]
|
|
11474
11760
|
}
|
|
11475
11761
|
) })
|
|
11476
11762
|
] });
|
|
11477
11763
|
} else if (showLastPages) {
|
|
11478
|
-
return /* @__PURE__ */ (0,
|
|
11479
|
-
/* @__PURE__ */ (0,
|
|
11764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
11765
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11480
11766
|
Hyperlink,
|
|
11481
11767
|
{
|
|
11482
11768
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -11484,7 +11770,7 @@ var DataList = (props) => {
|
|
|
11484
11770
|
children: "1"
|
|
11485
11771
|
}
|
|
11486
11772
|
),
|
|
11487
|
-
/* @__PURE__ */ (0,
|
|
11773
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11488
11774
|
Hyperlink,
|
|
11489
11775
|
{
|
|
11490
11776
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -11492,21 +11778,21 @@ var DataList = (props) => {
|
|
|
11492
11778
|
children: "2"
|
|
11493
11779
|
}
|
|
11494
11780
|
),
|
|
11495
|
-
/* @__PURE__ */ (0,
|
|
11781
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
11496
11782
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
11497
|
-
(page) => /* @__PURE__ */ (0,
|
|
11783
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react70.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11498
11784
|
Hyperlink,
|
|
11499
11785
|
{
|
|
11500
11786
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
11501
11787
|
href: builder.getNewPageUrl(page),
|
|
11502
11788
|
children: page
|
|
11503
11789
|
}
|
|
11504
|
-
) : /* @__PURE__ */ (0,
|
|
11790
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
11505
11791
|
)
|
|
11506
11792
|
] });
|
|
11507
11793
|
} else {
|
|
11508
|
-
return /* @__PURE__ */ (0,
|
|
11509
|
-
/* @__PURE__ */ (0,
|
|
11794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
11795
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11510
11796
|
Hyperlink,
|
|
11511
11797
|
{
|
|
11512
11798
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -11514,7 +11800,7 @@ var DataList = (props) => {
|
|
|
11514
11800
|
children: "1"
|
|
11515
11801
|
}
|
|
11516
11802
|
),
|
|
11517
|
-
/* @__PURE__ */ (0,
|
|
11803
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11518
11804
|
Hyperlink,
|
|
11519
11805
|
{
|
|
11520
11806
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -11522,20 +11808,20 @@ var DataList = (props) => {
|
|
|
11522
11808
|
children: "2"
|
|
11523
11809
|
}
|
|
11524
11810
|
),
|
|
11525
|
-
/* @__PURE__ */ (0,
|
|
11811
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
11526
11812
|
Array.from(
|
|
11527
11813
|
{ length: 5 },
|
|
11528
11814
|
(_, index) => activePageNumber - 2 + index
|
|
11529
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
11815
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react70.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11530
11816
|
Hyperlink,
|
|
11531
11817
|
{
|
|
11532
11818
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
11533
11819
|
href: builder.getNewPageUrl(page),
|
|
11534
11820
|
children: page
|
|
11535
11821
|
}
|
|
11536
|
-
) : /* @__PURE__ */ (0,
|
|
11537
|
-
/* @__PURE__ */ (0,
|
|
11538
|
-
/* @__PURE__ */ (0,
|
|
11822
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
11823
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
11824
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11539
11825
|
Hyperlink,
|
|
11540
11826
|
{
|
|
11541
11827
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -11543,7 +11829,7 @@ var DataList = (props) => {
|
|
|
11543
11829
|
children: pages - 1
|
|
11544
11830
|
}
|
|
11545
11831
|
),
|
|
11546
|
-
/* @__PURE__ */ (0,
|
|
11832
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11547
11833
|
Hyperlink,
|
|
11548
11834
|
{
|
|
11549
11835
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -11551,7 +11837,7 @@ var DataList = (props) => {
|
|
|
11551
11837
|
children: pages
|
|
11552
11838
|
}
|
|
11553
11839
|
),
|
|
11554
|
-
/* @__PURE__ */ (0,
|
|
11840
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
11555
11841
|
"select",
|
|
11556
11842
|
{
|
|
11557
11843
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -11563,8 +11849,8 @@ var DataList = (props) => {
|
|
|
11563
11849
|
}
|
|
11564
11850
|
},
|
|
11565
11851
|
children: [
|
|
11566
|
-
/* @__PURE__ */ (0,
|
|
11567
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
11852
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("option", { value: "", children: "Jump to" }),
|
|
11853
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("option", { value: page, children: page }, page))
|
|
11568
11854
|
]
|
|
11569
11855
|
}
|
|
11570
11856
|
) })
|
|
@@ -11572,16 +11858,16 @@ var DataList = (props) => {
|
|
|
11572
11858
|
}
|
|
11573
11859
|
}
|
|
11574
11860
|
};
|
|
11575
|
-
return /* @__PURE__ */ (0,
|
|
11576
|
-
/* @__PURE__ */ (0,
|
|
11577
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
11861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react70.default.Fragment, { children: [
|
|
11862
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(ContentView_default, { isDataFound, children: [
|
|
11863
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
11578
11864
|
"div",
|
|
11579
11865
|
{
|
|
11580
11866
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
11581
11867
|
children: [
|
|
11582
|
-
props.title ? /* @__PURE__ */ (0,
|
|
11583
|
-
/* @__PURE__ */ (0,
|
|
11584
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
11868
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", {}),
|
|
11869
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
11870
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11585
11871
|
InputControl_default,
|
|
11586
11872
|
{
|
|
11587
11873
|
name: "Search_input",
|
|
@@ -11595,7 +11881,7 @@ var DataList = (props) => {
|
|
|
11595
11881
|
}
|
|
11596
11882
|
}
|
|
11597
11883
|
),
|
|
11598
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
11884
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11599
11885
|
InputControl_default,
|
|
11600
11886
|
{
|
|
11601
11887
|
name: filter.name,
|
|
@@ -11610,15 +11896,15 @@ var DataList = (props) => {
|
|
|
11610
11896
|
},
|
|
11611
11897
|
filter.name
|
|
11612
11898
|
)),
|
|
11613
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
11899
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
11614
11900
|
Hyperlink,
|
|
11615
11901
|
{
|
|
11616
11902
|
className: "gap-1",
|
|
11617
11903
|
linkType: "Primary" /* Solid */,
|
|
11618
11904
|
href: props.addLinkHref,
|
|
11619
11905
|
children: [
|
|
11620
|
-
/* @__PURE__ */ (0,
|
|
11621
|
-
/* @__PURE__ */ (0,
|
|
11906
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
11907
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
11622
11908
|
]
|
|
11623
11909
|
}
|
|
11624
11910
|
)
|
|
@@ -11626,8 +11912,8 @@ var DataList = (props) => {
|
|
|
11626
11912
|
]
|
|
11627
11913
|
}
|
|
11628
11914
|
),
|
|
11629
|
-
/* @__PURE__ */ (0,
|
|
11630
|
-
/* @__PURE__ */ (0,
|
|
11915
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
11916
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("tr", { children: [
|
|
11631
11917
|
props?.columns?.map((column) => {
|
|
11632
11918
|
let url = builder.getNewOrderByUrl(column.name);
|
|
11633
11919
|
let icon = "chevronUpDown";
|
|
@@ -11638,18 +11924,18 @@ var DataList = (props) => {
|
|
|
11638
11924
|
icon = "chevronUp";
|
|
11639
11925
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
11640
11926
|
}
|
|
11641
|
-
return /* @__PURE__ */ (0,
|
|
11927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11642
11928
|
"th",
|
|
11643
11929
|
{
|
|
11644
11930
|
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" : ""),
|
|
11645
|
-
children: /* @__PURE__ */ (0,
|
|
11931
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11646
11932
|
Hyperlink,
|
|
11647
11933
|
{
|
|
11648
11934
|
href: column.enableSorting ? url : void 0,
|
|
11649
11935
|
className: "!text-neutral-contrast ",
|
|
11650
|
-
children: /* @__PURE__ */ (0,
|
|
11651
|
-
/* @__PURE__ */ (0,
|
|
11652
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
11936
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
11937
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-black", children: column.label }),
|
|
11938
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
11653
11939
|
] })
|
|
11654
11940
|
}
|
|
11655
11941
|
)
|
|
@@ -11657,25 +11943,25 @@ var DataList = (props) => {
|
|
|
11657
11943
|
column.name
|
|
11658
11944
|
);
|
|
11659
11945
|
}),
|
|
11660
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
11946
|
+
props.onQuickView && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("th", { className: "px-6 py-3 text-right font-medium bg-neutral-soft w-32 text-black", children: "Action" })
|
|
11661
11947
|
] }) }),
|
|
11662
|
-
/* @__PURE__ */ (0,
|
|
11948
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
11663
11949
|
let validityClass = "";
|
|
11664
11950
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
11665
11951
|
validityClass = "bg-alert-200";
|
|
11666
11952
|
}
|
|
11667
|
-
return /* @__PURE__ */ (0,
|
|
11953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("tr", { className: validityClass, children: [
|
|
11668
11954
|
props?.columns?.map((column, colindex) => {
|
|
11669
|
-
return /* @__PURE__ */ (0,
|
|
11955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react70.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11670
11956
|
"td",
|
|
11671
11957
|
{
|
|
11672
11958
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
11673
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
11959
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11674
11960
|
Hyperlink,
|
|
11675
11961
|
{
|
|
11676
11962
|
className: "",
|
|
11677
11963
|
href: `https://${dataitem[column.name]}`,
|
|
11678
|
-
children: /* @__PURE__ */ (0,
|
|
11964
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11679
11965
|
ViewControl_default,
|
|
11680
11966
|
{
|
|
11681
11967
|
controlType: column.controlType,
|
|
@@ -11688,11 +11974,11 @@ var DataList = (props) => {
|
|
|
11688
11974
|
}
|
|
11689
11975
|
)
|
|
11690
11976
|
}
|
|
11691
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
11977
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11692
11978
|
Hyperlink,
|
|
11693
11979
|
{
|
|
11694
11980
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
11695
|
-
children: /* @__PURE__ */ (0,
|
|
11981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11696
11982
|
ViewControl_default,
|
|
11697
11983
|
{
|
|
11698
11984
|
controlType: column.controlType,
|
|
@@ -11702,7 +11988,7 @@ var DataList = (props) => {
|
|
|
11702
11988
|
}
|
|
11703
11989
|
)
|
|
11704
11990
|
}
|
|
11705
|
-
) : /* @__PURE__ */ (0,
|
|
11991
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11706
11992
|
ViewControl_default,
|
|
11707
11993
|
{
|
|
11708
11994
|
controlType: column.controlType,
|
|
@@ -11714,7 +12000,7 @@ var DataList = (props) => {
|
|
|
11714
12000
|
}
|
|
11715
12001
|
) }, colindex);
|
|
11716
12002
|
}),
|
|
11717
|
-
props.onQuickView && /* @__PURE__ */ (0,
|
|
12003
|
+
props.onQuickView && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("td", { className: "px-6 py-2 text-right whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
11718
12004
|
"button",
|
|
11719
12005
|
{
|
|
11720
12006
|
type: "button",
|
|
@@ -11724,7 +12010,7 @@ var DataList = (props) => {
|
|
|
11724
12010
|
},
|
|
11725
12011
|
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",
|
|
11726
12012
|
children: [
|
|
11727
|
-
/* @__PURE__ */ (0,
|
|
12013
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
11728
12014
|
"svg",
|
|
11729
12015
|
{
|
|
11730
12016
|
className: "w-3.5 h-3.5",
|
|
@@ -11735,22 +12021,22 @@ var DataList = (props) => {
|
|
|
11735
12021
|
strokeLinecap: "round",
|
|
11736
12022
|
strokeLinejoin: "round",
|
|
11737
12023
|
children: [
|
|
11738
|
-
/* @__PURE__ */ (0,
|
|
11739
|
-
/* @__PURE__ */ (0,
|
|
12024
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
12025
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
|
11740
12026
|
]
|
|
11741
12027
|
}
|
|
11742
12028
|
),
|
|
11743
|
-
/* @__PURE__ */ (0,
|
|
12029
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: props.quickViewLabel || "Quick View" })
|
|
11744
12030
|
]
|
|
11745
12031
|
}
|
|
11746
12032
|
) })
|
|
11747
12033
|
] }, index);
|
|
11748
12034
|
}) })
|
|
11749
12035
|
] }) }),
|
|
11750
|
-
/* @__PURE__ */ (0,
|
|
11751
|
-
/* @__PURE__ */ (0,
|
|
11752
|
-
/* @__PURE__ */ (0,
|
|
11753
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
12036
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
12037
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "text-gray-700", children: label }),
|
|
12038
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
12039
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11754
12040
|
Hyperlink,
|
|
11755
12041
|
{
|
|
11756
12042
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -11758,9 +12044,9 @@ var DataList = (props) => {
|
|
|
11758
12044
|
children: "Prev"
|
|
11759
12045
|
}
|
|
11760
12046
|
),
|
|
11761
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
12047
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime99.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" }),
|
|
11762
12048
|
renderPageNumbers(),
|
|
11763
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
12049
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11764
12050
|
Hyperlink,
|
|
11765
12051
|
{
|
|
11766
12052
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -11768,19 +12054,19 @@ var DataList = (props) => {
|
|
|
11768
12054
|
children: "Next"
|
|
11769
12055
|
}
|
|
11770
12056
|
),
|
|
11771
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
12057
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
11772
12058
|
] })
|
|
11773
12059
|
] }) })
|
|
11774
12060
|
] }),
|
|
11775
|
-
/* @__PURE__ */ (0,
|
|
11776
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
12061
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
12062
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
11777
12063
|
"div",
|
|
11778
12064
|
{
|
|
11779
12065
|
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`,
|
|
11780
12066
|
children: [
|
|
11781
|
-
props.title ? /* @__PURE__ */ (0,
|
|
11782
|
-
/* @__PURE__ */ (0,
|
|
11783
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
12067
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", {}),
|
|
12068
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
12069
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11784
12070
|
InputControl_default,
|
|
11785
12071
|
{
|
|
11786
12072
|
name: "Search_input",
|
|
@@ -11794,7 +12080,7 @@ var DataList = (props) => {
|
|
|
11794
12080
|
}
|
|
11795
12081
|
}
|
|
11796
12082
|
),
|
|
11797
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
12083
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11798
12084
|
InputControl_default,
|
|
11799
12085
|
{
|
|
11800
12086
|
name: filter.name,
|
|
@@ -11809,15 +12095,15 @@ var DataList = (props) => {
|
|
|
11809
12095
|
},
|
|
11810
12096
|
filter.name
|
|
11811
12097
|
)),
|
|
11812
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
12098
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
11813
12099
|
Hyperlink,
|
|
11814
12100
|
{
|
|
11815
12101
|
className: "gap-1",
|
|
11816
12102
|
linkType: "Primary" /* Solid */,
|
|
11817
12103
|
href: props.addLinkHref,
|
|
11818
12104
|
children: [
|
|
11819
|
-
/* @__PURE__ */ (0,
|
|
11820
|
-
/* @__PURE__ */ (0,
|
|
12105
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
12106
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
11821
12107
|
]
|
|
11822
12108
|
}
|
|
11823
12109
|
)
|
|
@@ -11825,8 +12111,8 @@ var DataList = (props) => {
|
|
|
11825
12111
|
]
|
|
11826
12112
|
}
|
|
11827
12113
|
),
|
|
11828
|
-
/* @__PURE__ */ (0,
|
|
11829
|
-
/* @__PURE__ */ (0,
|
|
12114
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
12115
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
11830
12116
|
let url = builder.getNewOrderByUrl(column.name);
|
|
11831
12117
|
let icon = "chevronUpDown";
|
|
11832
12118
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -11836,18 +12122,18 @@ var DataList = (props) => {
|
|
|
11836
12122
|
icon = "chevronUp";
|
|
11837
12123
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
11838
12124
|
}
|
|
11839
|
-
return /* @__PURE__ */ (0,
|
|
12125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11840
12126
|
"th",
|
|
11841
12127
|
{
|
|
11842
12128
|
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" : ""),
|
|
11843
|
-
children: /* @__PURE__ */ (0,
|
|
12129
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11844
12130
|
Hyperlink,
|
|
11845
12131
|
{
|
|
11846
12132
|
href: column.enableSorting ? url : void 0,
|
|
11847
12133
|
className: "text-body-950",
|
|
11848
|
-
children: /* @__PURE__ */ (0,
|
|
11849
|
-
/* @__PURE__ */ (0,
|
|
11850
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
12134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
12135
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: column.label }),
|
|
12136
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
11851
12137
|
] })
|
|
11852
12138
|
}
|
|
11853
12139
|
)
|
|
@@ -11855,7 +12141,7 @@ var DataList = (props) => {
|
|
|
11855
12141
|
column.name
|
|
11856
12142
|
);
|
|
11857
12143
|
}) }) }) }) }),
|
|
11858
|
-
/* @__PURE__ */ (0,
|
|
12144
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
11859
12145
|
] })
|
|
11860
12146
|
] })
|
|
11861
12147
|
] });
|
|
@@ -11863,12 +12149,12 @@ var DataList = (props) => {
|
|
|
11863
12149
|
var DataList_default = DataList;
|
|
11864
12150
|
|
|
11865
12151
|
// src/components/dataForm/DataListRenderer.tsx
|
|
11866
|
-
var
|
|
12152
|
+
var import_react71 = __toESM(require("react"));
|
|
11867
12153
|
init_ServiceClient();
|
|
11868
12154
|
init_OdataBuilder();
|
|
11869
12155
|
init_SelectWithSearchInput();
|
|
11870
12156
|
var import_navigation4 = require("next/navigation");
|
|
11871
|
-
var
|
|
12157
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
11872
12158
|
var viewControlMap = {
|
|
11873
12159
|
number: ViewControlTypes.number,
|
|
11874
12160
|
lineText: ViewControlTypes.lineText,
|
|
@@ -11923,14 +12209,14 @@ var DataListRenderer = ({
|
|
|
11923
12209
|
widgetProps
|
|
11924
12210
|
}) => {
|
|
11925
12211
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
11926
|
-
const [columns, setColumns] = (0,
|
|
11927
|
-
const [dataset, setDataset] = (0,
|
|
11928
|
-
const [filter, setFilters] = (0,
|
|
11929
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
11930
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
11931
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
12212
|
+
const [columns, setColumns] = (0, import_react71.useState)([]);
|
|
12213
|
+
const [dataset, setDataset] = (0, import_react71.useState)();
|
|
12214
|
+
const [filter, setFilters] = (0, import_react71.useState)([]);
|
|
12215
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react71.useState)("");
|
|
12216
|
+
const [addLinkText, setAddLinkText] = (0, import_react71.useState)("");
|
|
12217
|
+
const [serviceRoute, setServiceRoute] = (0, import_react71.useState)("");
|
|
11932
12218
|
const pathname = (0, import_navigation4.usePathname)();
|
|
11933
|
-
(0,
|
|
12219
|
+
(0, import_react71.useEffect)(() => {
|
|
11934
12220
|
if (!formDefinition) return;
|
|
11935
12221
|
setColumns(mapApiToColumns(formDefinition));
|
|
11936
12222
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -11943,7 +12229,7 @@ var DataListRenderer = ({
|
|
|
11943
12229
|
setAddLinkHref(resolvedAddLinkHref);
|
|
11944
12230
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
11945
12231
|
}, [formDefinition, params]);
|
|
11946
|
-
(0,
|
|
12232
|
+
(0, import_react71.useEffect)(() => {
|
|
11947
12233
|
const fetchData = async () => {
|
|
11948
12234
|
if (!serviceRoute) return;
|
|
11949
12235
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -11963,13 +12249,13 @@ var DataListRenderer = ({
|
|
|
11963
12249
|
isActive: landingPageUrl === pathname
|
|
11964
12250
|
};
|
|
11965
12251
|
});
|
|
11966
|
-
return /* @__PURE__ */ (0,
|
|
12252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_react71.default.Fragment, { children: [
|
|
11967
12253
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
11968
12254
|
// tabs={resolvedTabs}
|
|
11969
12255
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
11970
12256
|
// />
|
|
11971
|
-
/* @__PURE__ */ (0,
|
|
11972
|
-
/* @__PURE__ */ (0,
|
|
12257
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
12258
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
11973
12259
|
DataList_default,
|
|
11974
12260
|
{
|
|
11975
12261
|
addLinkHref,
|
|
@@ -11991,13 +12277,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
11991
12277
|
init_InputControlType();
|
|
11992
12278
|
|
|
11993
12279
|
// src/components/dataForm/DataForm.tsx
|
|
11994
|
-
var
|
|
12280
|
+
var import_react73 = __toESM(require("react"));
|
|
11995
12281
|
init_Icon();
|
|
11996
12282
|
init_Button();
|
|
11997
12283
|
init_StyleTypes();
|
|
11998
12284
|
|
|
11999
12285
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
12000
|
-
var
|
|
12286
|
+
var import_react72 = __toESM(require("react"));
|
|
12001
12287
|
|
|
12002
12288
|
// src/components/dataForm/StyleTypes.tsx
|
|
12003
12289
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -12024,7 +12310,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
12024
12310
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
12025
12311
|
|
|
12026
12312
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
12027
|
-
var
|
|
12313
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
12028
12314
|
var DataFormChildSection = (props) => {
|
|
12029
12315
|
const { section } = props;
|
|
12030
12316
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -12036,7 +12322,7 @@ var DataFormChildSection = (props) => {
|
|
|
12036
12322
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
12037
12323
|
};
|
|
12038
12324
|
const childItemsToRender = getChildItemsForRendering();
|
|
12039
|
-
const handleChildInputChange = (0,
|
|
12325
|
+
const handleChildInputChange = (0, import_react72.useCallback)(
|
|
12040
12326
|
(updatedValues) => {
|
|
12041
12327
|
if (isOneToOne) {
|
|
12042
12328
|
props.callback({
|
|
@@ -12063,7 +12349,7 @@ var DataFormChildSection = (props) => {
|
|
|
12063
12349
|
},
|
|
12064
12350
|
[props, isOneToOne, childItemsToRender]
|
|
12065
12351
|
);
|
|
12066
|
-
const onAddRow = (0,
|
|
12352
|
+
const onAddRow = (0, import_react72.useCallback)(() => {
|
|
12067
12353
|
props.callback({
|
|
12068
12354
|
sectionName: props.section.name,
|
|
12069
12355
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -12072,7 +12358,7 @@ var DataFormChildSection = (props) => {
|
|
|
12072
12358
|
rowIndex: -1
|
|
12073
12359
|
});
|
|
12074
12360
|
}, [props]);
|
|
12075
|
-
const onDeleteRow = (0,
|
|
12361
|
+
const onDeleteRow = (0, import_react72.useCallback)(
|
|
12076
12362
|
(filteredIndex) => {
|
|
12077
12363
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
12078
12364
|
if (visibleItem) {
|
|
@@ -12092,14 +12378,14 @@ var DataFormChildSection = (props) => {
|
|
|
12092
12378
|
childItemsToRender,
|
|
12093
12379
|
allChildItems: childItems
|
|
12094
12380
|
});
|
|
12095
|
-
return /* @__PURE__ */ (0,
|
|
12096
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
12097
|
-
/* @__PURE__ */ (0,
|
|
12098
|
-
/* @__PURE__ */ (0,
|
|
12099
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
12100
|
-
return /* @__PURE__ */ (0,
|
|
12381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react72.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
12382
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
12383
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
12384
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
12385
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
12386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("tr", { className: "", children: [
|
|
12101
12387
|
sectionRow.elements.map((field, index) => {
|
|
12102
|
-
return /* @__PURE__ */ (0,
|
|
12388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
12103
12389
|
"th",
|
|
12104
12390
|
{
|
|
12105
12391
|
className: "py-3 font-normal text-left",
|
|
@@ -12108,21 +12394,21 @@ var DataFormChildSection = (props) => {
|
|
|
12108
12394
|
field.name
|
|
12109
12395
|
);
|
|
12110
12396
|
}),
|
|
12111
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
12397
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
12112
12398
|
] }, sectionRowIndex);
|
|
12113
12399
|
}) }),
|
|
12114
|
-
/* @__PURE__ */ (0,
|
|
12400
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
12115
12401
|
const { item, originalIndex } = visibleItem;
|
|
12116
12402
|
const rowKey = originalIndex;
|
|
12117
|
-
return /* @__PURE__ */ (0,
|
|
12403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react72.default.Fragment, { children: section.sectionRows.map(
|
|
12118
12404
|
(sectionRow, sectionRowIndex) => {
|
|
12119
|
-
return /* @__PURE__ */ (0,
|
|
12405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
12120
12406
|
"tr",
|
|
12121
12407
|
{
|
|
12122
12408
|
className: "",
|
|
12123
12409
|
children: [
|
|
12124
12410
|
sectionRow.elements.map((field, index) => {
|
|
12125
|
-
return /* @__PURE__ */ (0,
|
|
12411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
12126
12412
|
InputControl_default,
|
|
12127
12413
|
{
|
|
12128
12414
|
index: filteredIndex,
|
|
@@ -12142,7 +12428,7 @@ var DataFormChildSection = (props) => {
|
|
|
12142
12428
|
}
|
|
12143
12429
|
) }) }) }, field.name);
|
|
12144
12430
|
}),
|
|
12145
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
12431
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
12146
12432
|
ClientButton_default,
|
|
12147
12433
|
{
|
|
12148
12434
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -12151,7 +12437,7 @@ var DataFormChildSection = (props) => {
|
|
|
12151
12437
|
},
|
|
12152
12438
|
dataRole: "delete",
|
|
12153
12439
|
tabIndex: -1,
|
|
12154
|
-
children: /* @__PURE__ */ (0,
|
|
12440
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
12155
12441
|
Icon_default,
|
|
12156
12442
|
{
|
|
12157
12443
|
className: "w-4 h-4",
|
|
@@ -12168,7 +12454,7 @@ var DataFormChildSection = (props) => {
|
|
|
12168
12454
|
) }, rowKey);
|
|
12169
12455
|
}) })
|
|
12170
12456
|
] }) }),
|
|
12171
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
12457
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
12172
12458
|
ClientButton_default,
|
|
12173
12459
|
{
|
|
12174
12460
|
ButtonType: "Link" /* Link */,
|
|
@@ -12183,9 +12469,9 @@ var DataFormChildSection = (props) => {
|
|
|
12183
12469
|
var DataFormChildSection_default = DataFormChildSection;
|
|
12184
12470
|
|
|
12185
12471
|
// src/components/dataForm/DataForm.tsx
|
|
12186
|
-
var
|
|
12472
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
12187
12473
|
var DataForm = (props) => {
|
|
12188
|
-
const formRef = (0,
|
|
12474
|
+
const formRef = (0, import_react73.useRef)(null);
|
|
12189
12475
|
console.log(props.dataItem, "dssads");
|
|
12190
12476
|
const initialState = {
|
|
12191
12477
|
inputValues: {},
|
|
@@ -12194,9 +12480,9 @@ var DataForm = (props) => {
|
|
|
12194
12480
|
const childInitialState = {
|
|
12195
12481
|
inputValues: []
|
|
12196
12482
|
};
|
|
12197
|
-
const [formState, dispatch] = (0,
|
|
12483
|
+
const [formState, dispatch] = (0, import_react73.useReducer)(FormReducer_default, initialState);
|
|
12198
12484
|
console.log(props.sections, "sections");
|
|
12199
|
-
const clearHiddenChildSections = (0,
|
|
12485
|
+
const clearHiddenChildSections = (0, import_react73.useCallback)(
|
|
12200
12486
|
(changedProperty, newValues) => {
|
|
12201
12487
|
if (!props.sections) return;
|
|
12202
12488
|
const allChildSections = [];
|
|
@@ -12234,7 +12520,7 @@ var DataForm = (props) => {
|
|
|
12234
12520
|
},
|
|
12235
12521
|
[props.sections, formState.inputValues]
|
|
12236
12522
|
);
|
|
12237
|
-
const handleInputChange = (0,
|
|
12523
|
+
const handleInputChange = (0, import_react73.useCallback)(
|
|
12238
12524
|
async (updatedValues) => {
|
|
12239
12525
|
dispatch({
|
|
12240
12526
|
type: FORM_INPUT_UPDATE,
|
|
@@ -12249,7 +12535,7 @@ var DataForm = (props) => {
|
|
|
12249
12535
|
},
|
|
12250
12536
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
12251
12537
|
);
|
|
12252
|
-
const fetchData = (0,
|
|
12538
|
+
const fetchData = (0, import_react73.useCallback)(async () => {
|
|
12253
12539
|
if (!props.rules) return;
|
|
12254
12540
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
12255
12541
|
return;
|
|
@@ -12280,7 +12566,7 @@ var DataForm = (props) => {
|
|
|
12280
12566
|
console.error("Error fetching data:", error);
|
|
12281
12567
|
}
|
|
12282
12568
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
12283
|
-
(0,
|
|
12569
|
+
(0, import_react73.useEffect)(() => {
|
|
12284
12570
|
fetchData();
|
|
12285
12571
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
12286
12572
|
function replacePlaceholders(template, context, params) {
|
|
@@ -12300,7 +12586,7 @@ var DataForm = (props) => {
|
|
|
12300
12586
|
}
|
|
12301
12587
|
);
|
|
12302
12588
|
}
|
|
12303
|
-
const handleChildSectionChangeCallback = (0,
|
|
12589
|
+
const handleChildSectionChangeCallback = (0, import_react73.useCallback)(
|
|
12304
12590
|
(params) => {
|
|
12305
12591
|
dispatch({
|
|
12306
12592
|
type: params.actionType,
|
|
@@ -12345,7 +12631,7 @@ var DataForm = (props) => {
|
|
|
12345
12631
|
});
|
|
12346
12632
|
return cloned;
|
|
12347
12633
|
}
|
|
12348
|
-
const onClick = (0,
|
|
12634
|
+
const onClick = (0, import_react73.useCallback)(async () => {
|
|
12349
12635
|
if (props.onClick) {
|
|
12350
12636
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
12351
12637
|
const normalizedValues = normalizeChildSections(
|
|
@@ -12361,21 +12647,21 @@ var DataForm = (props) => {
|
|
|
12361
12647
|
return { isSuccessful: true };
|
|
12362
12648
|
}
|
|
12363
12649
|
}, [formState, props]);
|
|
12364
|
-
const handleAdditionalOnClick = (0,
|
|
12650
|
+
const handleAdditionalOnClick = (0, import_react73.useCallback)(async () => {
|
|
12365
12651
|
if (props.additionalActions?.onClick) {
|
|
12366
12652
|
return await props.additionalActions.onClick(formState);
|
|
12367
12653
|
} else {
|
|
12368
12654
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
12369
12655
|
}
|
|
12370
12656
|
}, [formState, props]);
|
|
12371
|
-
const onDelete = (0,
|
|
12657
|
+
const onDelete = (0, import_react73.useCallback)(async () => {
|
|
12372
12658
|
if (props.onDelete) {
|
|
12373
12659
|
return await props.onDelete(formState);
|
|
12374
12660
|
} else {
|
|
12375
12661
|
return { isSuccessful: true };
|
|
12376
12662
|
}
|
|
12377
12663
|
}, [formState, props]);
|
|
12378
|
-
(0,
|
|
12664
|
+
(0, import_react73.useEffect)(() => {
|
|
12379
12665
|
if (props.dataItem) {
|
|
12380
12666
|
dispatch({
|
|
12381
12667
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -12403,19 +12689,19 @@ var DataForm = (props) => {
|
|
|
12403
12689
|
return false;
|
|
12404
12690
|
}
|
|
12405
12691
|
}
|
|
12406
|
-
return /* @__PURE__ */ (0,
|
|
12407
|
-
props.title && /* @__PURE__ */ (0,
|
|
12692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react73.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
12693
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime102.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_runtime102.jsxs)(
|
|
12408
12694
|
"div",
|
|
12409
12695
|
{
|
|
12410
12696
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
12411
12697
|
onClick: () => window.history.back(),
|
|
12412
12698
|
children: [
|
|
12413
|
-
/* @__PURE__ */ (0,
|
|
12414
|
-
/* @__PURE__ */ (0,
|
|
12699
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
12700
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
12415
12701
|
]
|
|
12416
12702
|
}
|
|
12417
12703
|
) }),
|
|
12418
|
-
/* @__PURE__ */ (0,
|
|
12704
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
12419
12705
|
"form",
|
|
12420
12706
|
{
|
|
12421
12707
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -12436,8 +12722,8 @@ var DataForm = (props) => {
|
|
|
12436
12722
|
}
|
|
12437
12723
|
}
|
|
12438
12724
|
},
|
|
12439
|
-
children: /* @__PURE__ */ (0,
|
|
12440
|
-
return /* @__PURE__ */ (0,
|
|
12725
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
12726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react73.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
12441
12727
|
section.sectionRows?.map(
|
|
12442
12728
|
(sectionRow, sectionRowIndex) => {
|
|
12443
12729
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -12448,14 +12734,14 @@ var DataForm = (props) => {
|
|
|
12448
12734
|
sectionRow.visible
|
|
12449
12735
|
);
|
|
12450
12736
|
}
|
|
12451
|
-
return /* @__PURE__ */ (0,
|
|
12452
|
-
return /* @__PURE__ */ (0,
|
|
12737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react73.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
12738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
12453
12739
|
"div",
|
|
12454
12740
|
{
|
|
12455
12741
|
className: sectionRow.grow ? "grow" : "",
|
|
12456
12742
|
children: [
|
|
12457
|
-
/* @__PURE__ */ (0,
|
|
12458
|
-
/* @__PURE__ */ (0,
|
|
12743
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { children: field.controlType }),
|
|
12744
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
12459
12745
|
InputControl_default,
|
|
12460
12746
|
{
|
|
12461
12747
|
name: field.name,
|
|
@@ -12485,12 +12771,12 @@ var DataForm = (props) => {
|
|
|
12485
12771
|
}) }) }, sectionRowIndex);
|
|
12486
12772
|
}
|
|
12487
12773
|
),
|
|
12488
|
-
/* @__PURE__ */ (0,
|
|
12774
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { children: section.childSections?.map(
|
|
12489
12775
|
(childSection, childSectionIndex) => {
|
|
12490
|
-
return /* @__PURE__ */ (0,
|
|
12776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
12491
12777
|
formState.inputValues,
|
|
12492
12778
|
childSection.visible
|
|
12493
|
-
) && /* @__PURE__ */ (0,
|
|
12779
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
12494
12780
|
DataFormChildSection_default,
|
|
12495
12781
|
{
|
|
12496
12782
|
section: childSection,
|
|
@@ -12505,8 +12791,8 @@ var DataForm = (props) => {
|
|
|
12505
12791
|
}) })
|
|
12506
12792
|
}
|
|
12507
12793
|
),
|
|
12508
|
-
/* @__PURE__ */ (0,
|
|
12509
|
-
/* @__PURE__ */ (0,
|
|
12794
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
12795
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
12510
12796
|
Button_default,
|
|
12511
12797
|
{
|
|
12512
12798
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -12514,7 +12800,7 @@ var DataForm = (props) => {
|
|
|
12514
12800
|
children: props.additionalActions.title
|
|
12515
12801
|
}
|
|
12516
12802
|
) }),
|
|
12517
|
-
/* @__PURE__ */ (0,
|
|
12803
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
12518
12804
|
Button_default,
|
|
12519
12805
|
{
|
|
12520
12806
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -12525,7 +12811,7 @@ var DataForm = (props) => {
|
|
|
12525
12811
|
children: "Delete"
|
|
12526
12812
|
}
|
|
12527
12813
|
) }),
|
|
12528
|
-
/* @__PURE__ */ (0,
|
|
12814
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
12529
12815
|
Button_default,
|
|
12530
12816
|
{
|
|
12531
12817
|
onValidate,
|
|
@@ -12543,7 +12829,7 @@ var DataForm_default = DataForm;
|
|
|
12543
12829
|
|
|
12544
12830
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
12545
12831
|
init_ServiceClient();
|
|
12546
|
-
var
|
|
12832
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
12547
12833
|
function getAction(actions, code) {
|
|
12548
12834
|
return actions?.find((a) => a.actionCode === code);
|
|
12549
12835
|
}
|
|
@@ -12569,9 +12855,9 @@ var DataFormRenderer = ({
|
|
|
12569
12855
|
"Delete"
|
|
12570
12856
|
);
|
|
12571
12857
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
12572
|
-
return /* @__PURE__ */ (0,
|
|
12573
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
12574
|
-
/* @__PURE__ */ (0,
|
|
12858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
12859
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
12860
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
12575
12861
|
DataForm_default,
|
|
12576
12862
|
{
|
|
12577
12863
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|
|
@@ -12614,6 +12900,7 @@ var DataFormRenderer_default = DataFormRenderer;
|
|
|
12614
12900
|
PageBodyRenderer,
|
|
12615
12901
|
PercentageInput,
|
|
12616
12902
|
PhoneInput,
|
|
12903
|
+
PicklistInput,
|
|
12617
12904
|
RadioInput,
|
|
12618
12905
|
Select,
|
|
12619
12906
|
TimeInput,
|