@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260620051742 → 0.8.1-dev.20260623053723
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +309 -175
- package/dist/index.mjs +303 -169
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1266,7 +1266,7 @@ var init_LinkNodeButton = __esm({
|
|
|
1266
1266
|
const fieldNames = extractFieldNames(template);
|
|
1267
1267
|
if (responseData) {
|
|
1268
1268
|
fieldNames.forEach((fieldName) => {
|
|
1269
|
-
const value =
|
|
1269
|
+
const value = getNestedValue6(responseData, fieldName);
|
|
1270
1270
|
if (value !== void 0) {
|
|
1271
1271
|
const regex1 = new RegExp(`\\{${fieldName}\\}`, "g");
|
|
1272
1272
|
const regex2 = new RegExp(`\\{\\{${fieldName}\\}\\}`, "g");
|
|
@@ -1289,7 +1289,7 @@ var init_LinkNodeButton = __esm({
|
|
|
1289
1289
|
}
|
|
1290
1290
|
return result;
|
|
1291
1291
|
}, [props.routeParameters, dataitem, extractFieldNames]);
|
|
1292
|
-
const
|
|
1292
|
+
const getNestedValue6 = (0, import_react35.useCallback)((obj, path) => {
|
|
1293
1293
|
if (!obj || !path) return void 0;
|
|
1294
1294
|
if (obj[path] !== void 0) {
|
|
1295
1295
|
return obj[path];
|
|
@@ -1339,15 +1339,15 @@ var init_LinkNodeButton = __esm({
|
|
|
1339
1339
|
console.log("Field names in redirect URL:", fieldNames);
|
|
1340
1340
|
const fieldValueMap = {};
|
|
1341
1341
|
fieldNames.forEach((fieldName) => {
|
|
1342
|
-
const value =
|
|
1342
|
+
const value = getNestedValue6(response, fieldName);
|
|
1343
1343
|
if (value !== void 0) {
|
|
1344
1344
|
fieldValueMap[fieldName] = String(value);
|
|
1345
1345
|
} else {
|
|
1346
|
-
const resultValue =
|
|
1346
|
+
const resultValue = getNestedValue6(response, `result.${fieldName}`);
|
|
1347
1347
|
if (resultValue !== void 0) {
|
|
1348
1348
|
fieldValueMap[fieldName] = String(resultValue);
|
|
1349
1349
|
} else {
|
|
1350
|
-
const dataValue =
|
|
1350
|
+
const dataValue = getNestedValue6(response, `data.${fieldName}`);
|
|
1351
1351
|
if (dataValue !== void 0) {
|
|
1352
1352
|
fieldValueMap[fieldName] = String(dataValue);
|
|
1353
1353
|
}
|
|
@@ -1385,7 +1385,7 @@ var init_LinkNodeButton = __esm({
|
|
|
1385
1385
|
setIsLoading(false);
|
|
1386
1386
|
return { isSuccessful: false, message: err.message };
|
|
1387
1387
|
}
|
|
1388
|
-
}, [node.postUrl, node.payload, node.redirectUrl, replaceTemplateVariables, extractFieldNames,
|
|
1388
|
+
}, [node.postUrl, node.payload, node.redirectUrl, replaceTemplateVariables, extractFieldNames, getNestedValue6, props.apiBaseUrl, props.session]);
|
|
1389
1389
|
const renderButtonContent = () => {
|
|
1390
1390
|
if (children) {
|
|
1391
1391
|
return children;
|
|
@@ -2852,7 +2852,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2852
2852
|
const containerRef = (0, import_react29.useRef)(null);
|
|
2853
2853
|
const [isCreateOpen, setIsCreateOpen] = (0, import_react29.useState)(false);
|
|
2854
2854
|
const [formData, setFormData] = (0, import_react29.useState)({});
|
|
2855
|
-
const
|
|
2855
|
+
const getNestedValue6 = (obj, path) => {
|
|
2856
2856
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
2857
2857
|
};
|
|
2858
2858
|
(0, import_react29.useEffect)(() => {
|
|
@@ -2890,7 +2890,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2890
2890
|
props.dataSourceDependsOn
|
|
2891
2891
|
]);
|
|
2892
2892
|
const filteredItems = list?.filter((item) => {
|
|
2893
|
-
const value =
|
|
2893
|
+
const value = getNestedValue6(item, props.dataTextFieldName);
|
|
2894
2894
|
return value?.toLowerCase().includes(searchTerm?.toLowerCase());
|
|
2895
2895
|
});
|
|
2896
2896
|
const playBeep = () => {
|
|
@@ -2921,7 +2921,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2921
2921
|
}, [searchTerm]);
|
|
2922
2922
|
const handleSelect = (event, item) => {
|
|
2923
2923
|
event.preventDefault();
|
|
2924
|
-
setSearchTerm(
|
|
2924
|
+
setSearchTerm(getNestedValue6(item, props.dataTextFieldName));
|
|
2925
2925
|
if (props.callback) {
|
|
2926
2926
|
const val = {};
|
|
2927
2927
|
props.callback({
|
|
@@ -3076,7 +3076,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
3076
3076
|
role: "option",
|
|
3077
3077
|
tabIndex: -1,
|
|
3078
3078
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
3079
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children:
|
|
3079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: getNestedValue6(item, props.dataTextFieldName) })
|
|
3080
3080
|
}
|
|
3081
3081
|
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
3082
3082
|
}
|
|
@@ -6052,8 +6052,141 @@ var DivContainer = async (props) => {
|
|
|
6052
6052
|
};
|
|
6053
6053
|
var DivContainer_default = DivContainer;
|
|
6054
6054
|
|
|
6055
|
-
// src/components/pageRenderingEngine/
|
|
6055
|
+
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
6056
6056
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6057
|
+
var getNestedValue5 = (obj, path) => {
|
|
6058
|
+
if (!obj || !path) return void 0;
|
|
6059
|
+
return path.split(".").reduce((current, key) => {
|
|
6060
|
+
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
6061
|
+
}, obj);
|
|
6062
|
+
};
|
|
6063
|
+
var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-red-500 w-8 h-8", children: [
|
|
6064
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M7 3H14L19 8V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6065
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M14 3V8H19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6066
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M9 14H11C11.5304 14 12.0391 13.7893 12.4142 13.4142C12.7893 13.0391 13 12.5304 13 12C13 11.4696 12.7893 10.9609 12.4142 10.5858C12.0391 10.2107 11.5304 10 11 10H9V18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6067
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M9 14H12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
6068
|
+
] });
|
|
6069
|
+
var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-green-600 w-8 h-8", children: [
|
|
6070
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M14 3V8H19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6071
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M5 20V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3H14L19 8V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6072
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M9 11L15 17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6073
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M15 11L9 17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
6074
|
+
] });
|
|
6075
|
+
var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-blue-600 w-8 h-8", children: [
|
|
6076
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M14 3V8H19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6077
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M5 20V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3H14L19 8V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6078
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M8 12L10 17L12 14L14 17L16 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
6079
|
+
] });
|
|
6080
|
+
var ImageIcon = () => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-yellow-500 w-8 h-8", children: [
|
|
6081
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H19C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5V15ZM21 15L16 10L9 17L6 14L3 17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6082
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M16 8C16 8.55228 15.5523 9 15 9C14.4477 9 14 8.55228 14 8C14 7.44772 14.4477 7 15 7C15.5523 7 16 7.44772 16 8Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
6083
|
+
] });
|
|
6084
|
+
var StandardIcon = () => /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "text-gray-500 w-8 h-8", children: [
|
|
6085
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M14 3V8H19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
6086
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { d: "M5 20V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3H14L19 8V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
6087
|
+
] });
|
|
6088
|
+
var getFileDetails = (url) => {
|
|
6089
|
+
const extMatch = url.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);
|
|
6090
|
+
const ext = extMatch ? extMatch[1].toLowerCase() : "";
|
|
6091
|
+
let Icon2 = StandardIcon;
|
|
6092
|
+
let extLabel = "FILE";
|
|
6093
|
+
if (["pdf"].includes(ext)) {
|
|
6094
|
+
Icon2 = PdfIcon;
|
|
6095
|
+
extLabel = "PDF";
|
|
6096
|
+
} else if (["xls", "xlsx", "csv"].includes(ext)) {
|
|
6097
|
+
Icon2 = ExcelIcon;
|
|
6098
|
+
extLabel = "Excel";
|
|
6099
|
+
} else if (["doc", "docx"].includes(ext)) {
|
|
6100
|
+
Icon2 = WordIcon;
|
|
6101
|
+
extLabel = ext.toUpperCase();
|
|
6102
|
+
} else if (["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(ext)) {
|
|
6103
|
+
Icon2 = ImageIcon;
|
|
6104
|
+
extLabel = ext.toUpperCase();
|
|
6105
|
+
} else if (ext) {
|
|
6106
|
+
extLabel = ext.toUpperCase();
|
|
6107
|
+
}
|
|
6108
|
+
return { Icon: Icon2, extLabel };
|
|
6109
|
+
};
|
|
6110
|
+
var DocumentNode = (props) => {
|
|
6111
|
+
let documentUrl;
|
|
6112
|
+
let documentTitle;
|
|
6113
|
+
if (props.dataitem && props.node.documentKey) {
|
|
6114
|
+
const docData = getNestedValue5(props.dataitem, props.node.documentKey);
|
|
6115
|
+
if (typeof docData === "string") {
|
|
6116
|
+
const trimmed = docData.trim();
|
|
6117
|
+
if (trimmed.startsWith("[") || trimmed.startsWith("{")) {
|
|
6118
|
+
try {
|
|
6119
|
+
const parsed = JSON.parse(trimmed);
|
|
6120
|
+
const asset = Array.isArray(parsed) ? parsed[0] : parsed;
|
|
6121
|
+
if (asset && asset.assetUrl) {
|
|
6122
|
+
documentUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, asset.assetUrl);
|
|
6123
|
+
if (asset.title) documentTitle = asset.title;
|
|
6124
|
+
}
|
|
6125
|
+
} catch (e) {
|
|
6126
|
+
}
|
|
6127
|
+
} else {
|
|
6128
|
+
documentUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, docData);
|
|
6129
|
+
}
|
|
6130
|
+
} else if (Array.isArray(docData) && docData.length > 0) {
|
|
6131
|
+
const asset = docData[0];
|
|
6132
|
+
if (asset && asset.assetUrl) {
|
|
6133
|
+
documentUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, asset.assetUrl);
|
|
6134
|
+
if (asset.title) documentTitle = asset.title;
|
|
6135
|
+
}
|
|
6136
|
+
} else if (docData && typeof docData === "object") {
|
|
6137
|
+
const asset = docData;
|
|
6138
|
+
if (asset && asset.assetUrl) {
|
|
6139
|
+
documentUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, asset.assetUrl);
|
|
6140
|
+
if (asset.title) documentTitle = asset.title;
|
|
6141
|
+
}
|
|
6142
|
+
}
|
|
6143
|
+
}
|
|
6144
|
+
if (!documentUrl) return null;
|
|
6145
|
+
const { Icon: Icon2, extLabel } = getFileDetails(documentUrl);
|
|
6146
|
+
if (!documentTitle) {
|
|
6147
|
+
try {
|
|
6148
|
+
const pathName = new URL(documentUrl).pathname;
|
|
6149
|
+
documentTitle = pathName.split("/").pop() || "Document";
|
|
6150
|
+
} catch {
|
|
6151
|
+
documentTitle = documentUrl.split("/").pop() || "Document";
|
|
6152
|
+
}
|
|
6153
|
+
documentTitle = documentTitle.replace(/\.[^/.]+$/, "");
|
|
6154
|
+
}
|
|
6155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex items-center justify-between py-4 border-b border-gray-100 bg-white", children: [
|
|
6156
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
6157
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-gray-50 border border-gray-100", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Icon2, {}) }),
|
|
6158
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex items-baseline space-x-2", children: [
|
|
6159
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("h4", { className: "text-base font-semibold text-gray-800", children: documentTitle }),
|
|
6160
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "text-sm font-medium text-gray-400", children: [
|
|
6161
|
+
"(",
|
|
6162
|
+
extLabel,
|
|
6163
|
+
")"
|
|
6164
|
+
] })
|
|
6165
|
+
] })
|
|
6166
|
+
] }),
|
|
6167
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
6168
|
+
"a",
|
|
6169
|
+
{
|
|
6170
|
+
href: documentUrl,
|
|
6171
|
+
download: true,
|
|
6172
|
+
target: "_blank",
|
|
6173
|
+
rel: "noreferrer",
|
|
6174
|
+
className: "inline-flex items-center px-4 py-2 text-sm font-medium text-blue-600 bg-white border border-blue-600 rounded hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors",
|
|
6175
|
+
children: [
|
|
6176
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("svg", { className: "w-4 h-4 mr-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
6177
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" }),
|
|
6178
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 12v5m0 0l-3-3m3 3l3-3M12 8v4" })
|
|
6179
|
+
] }),
|
|
6180
|
+
"Download"
|
|
6181
|
+
]
|
|
6182
|
+
}
|
|
6183
|
+
)
|
|
6184
|
+
] });
|
|
6185
|
+
};
|
|
6186
|
+
var DocumentNode_default = DocumentNode;
|
|
6187
|
+
|
|
6188
|
+
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6189
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6057
6190
|
var NodeTypes = {
|
|
6058
6191
|
["paragraph"]: ParagraphNode_default,
|
|
6059
6192
|
["heading"]: HeadingNode_default,
|
|
@@ -6067,7 +6200,8 @@ var NodeTypes = {
|
|
|
6067
6200
|
["form-container"]: FormContainerNode_default,
|
|
6068
6201
|
["div-container"]: DivContainer_default,
|
|
6069
6202
|
["svg-icon"]: SVGIconNode_default,
|
|
6070
|
-
["embed"]: EmbedNode_default
|
|
6203
|
+
["embed"]: EmbedNode_default,
|
|
6204
|
+
["document"]: DocumentNode_default
|
|
6071
6205
|
};
|
|
6072
6206
|
var PageBodyRenderer = (props) => {
|
|
6073
6207
|
let pageBodyTree;
|
|
@@ -6089,14 +6223,14 @@ var PageBodyRenderer = (props) => {
|
|
|
6089
6223
|
}
|
|
6090
6224
|
return true;
|
|
6091
6225
|
};
|
|
6092
|
-
return /* @__PURE__ */ (0,
|
|
6226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react51.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
6093
6227
|
{
|
|
6094
6228
|
}
|
|
6095
6229
|
const SelectedNode = NodeTypes[node.type];
|
|
6096
6230
|
if (!shouldRenderNode(node)) {
|
|
6097
6231
|
return null;
|
|
6098
6232
|
}
|
|
6099
|
-
return /* @__PURE__ */ (0,
|
|
6233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react51.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6100
6234
|
SelectedNode,
|
|
6101
6235
|
{
|
|
6102
6236
|
node,
|
|
@@ -6112,7 +6246,7 @@ var PageBodyRenderer = (props) => {
|
|
|
6112
6246
|
device: props.device,
|
|
6113
6247
|
widgetRenderer: props.widgetRenderer
|
|
6114
6248
|
}
|
|
6115
|
-
) }) : /* @__PURE__ */ (0,
|
|
6249
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6116
6250
|
SelectedNode,
|
|
6117
6251
|
{
|
|
6118
6252
|
node,
|
|
@@ -6135,7 +6269,7 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
6135
6269
|
// src/components/Toast.tsx
|
|
6136
6270
|
var import_react52 = require("react");
|
|
6137
6271
|
init_ToastService();
|
|
6138
|
-
var
|
|
6272
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6139
6273
|
var Toast = () => {
|
|
6140
6274
|
const [showToast, setShowToast] = (0, import_react52.useState)(false);
|
|
6141
6275
|
const [message, setMessage] = (0, import_react52.useState)("");
|
|
@@ -6178,8 +6312,8 @@ var Toast = () => {
|
|
|
6178
6312
|
const closeToast = () => {
|
|
6179
6313
|
setShowToast(false);
|
|
6180
6314
|
};
|
|
6181
|
-
return /* @__PURE__ */ (0,
|
|
6182
|
-
/* @__PURE__ */ (0,
|
|
6315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
6316
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6183
6317
|
"span",
|
|
6184
6318
|
{
|
|
6185
6319
|
className: "font-medium text-inherit text-sm",
|
|
@@ -6187,7 +6321,7 @@ var Toast = () => {
|
|
|
6187
6321
|
children: message
|
|
6188
6322
|
}
|
|
6189
6323
|
),
|
|
6190
|
-
/* @__PURE__ */ (0,
|
|
6324
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6191
6325
|
"svg",
|
|
6192
6326
|
{
|
|
6193
6327
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6195,7 +6329,7 @@ var Toast = () => {
|
|
|
6195
6329
|
fill: "none",
|
|
6196
6330
|
viewBox: "0 0 24 24",
|
|
6197
6331
|
stroke: "currentColor",
|
|
6198
|
-
children: /* @__PURE__ */ (0,
|
|
6332
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
6199
6333
|
}
|
|
6200
6334
|
) })
|
|
6201
6335
|
] }) }) });
|
|
@@ -6209,7 +6343,7 @@ init_Button();
|
|
|
6209
6343
|
// src/components/NavigationTabsV2.tsx
|
|
6210
6344
|
var import_link3 = __toESM(require("next/link"));
|
|
6211
6345
|
var import_navigation = require("next/navigation");
|
|
6212
|
-
var
|
|
6346
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6213
6347
|
function resolveRoutePlaceholders(route, params) {
|
|
6214
6348
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
6215
6349
|
const value = params[key];
|
|
@@ -6234,8 +6368,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
6234
6368
|
isActive: tab.isActive
|
|
6235
6369
|
})) || [];
|
|
6236
6370
|
if (mappedTabs.length === 0) return null;
|
|
6237
|
-
return /* @__PURE__ */ (0,
|
|
6238
|
-
return /* @__PURE__ */ (0,
|
|
6371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
6372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6239
6373
|
"div",
|
|
6240
6374
|
{
|
|
6241
6375
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -6253,46 +6387,46 @@ var import_navigation2 = require("next/navigation");
|
|
|
6253
6387
|
|
|
6254
6388
|
// src/components/dataForm/NoContentView.tsx
|
|
6255
6389
|
var import_react53 = __toESM(require("react"));
|
|
6256
|
-
var
|
|
6390
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6257
6391
|
var NoContentView = (props) => {
|
|
6258
|
-
return /* @__PURE__ */ (0,
|
|
6392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react53.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
6259
6393
|
};
|
|
6260
6394
|
var NoContentView_default = NoContentView;
|
|
6261
6395
|
|
|
6262
6396
|
// src/components/dataForm/ContentView.tsx
|
|
6263
6397
|
var import_react54 = __toESM(require("react"));
|
|
6264
|
-
var
|
|
6398
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6265
6399
|
var ContentView = (props) => {
|
|
6266
|
-
return /* @__PURE__ */ (0,
|
|
6267
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
6268
|
-
/* @__PURE__ */ (0,
|
|
6269
|
-
/* @__PURE__ */ (0,
|
|
6270
|
-
/* @__PURE__ */ (0,
|
|
6271
|
-
/* @__PURE__ */ (0,
|
|
6272
|
-
/* @__PURE__ */ (0,
|
|
6400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_react54.default.Fragment, { children: [
|
|
6401
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
6402
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
6403
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
6404
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ml-2", children: [
|
|
6405
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
6406
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
6273
6407
|
] })
|
|
6274
6408
|
] }),
|
|
6275
|
-
/* @__PURE__ */ (0,
|
|
6276
|
-
/* @__PURE__ */ (0,
|
|
6277
|
-
/* @__PURE__ */ (0,
|
|
6278
|
-
/* @__PURE__ */ (0,
|
|
6279
|
-
/* @__PURE__ */ (0,
|
|
6280
|
-
/* @__PURE__ */ (0,
|
|
6281
|
-
/* @__PURE__ */ (0,
|
|
6409
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
6410
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "animate-pulse", children: [
|
|
6411
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
6412
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
6413
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
6414
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
6415
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6282
6416
|
] }),
|
|
6283
|
-
/* @__PURE__ */ (0,
|
|
6284
|
-
/* @__PURE__ */ (0,
|
|
6285
|
-
/* @__PURE__ */ (0,
|
|
6286
|
-
/* @__PURE__ */ (0,
|
|
6287
|
-
/* @__PURE__ */ (0,
|
|
6288
|
-
/* @__PURE__ */ (0,
|
|
6417
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "animate-pulse", children: [
|
|
6418
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
6419
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
6420
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
6421
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
6422
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6289
6423
|
] }),
|
|
6290
|
-
/* @__PURE__ */ (0,
|
|
6291
|
-
/* @__PURE__ */ (0,
|
|
6292
|
-
/* @__PURE__ */ (0,
|
|
6293
|
-
/* @__PURE__ */ (0,
|
|
6294
|
-
/* @__PURE__ */ (0,
|
|
6295
|
-
/* @__PURE__ */ (0,
|
|
6424
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "animate-pulse", children: [
|
|
6425
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
6426
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
6427
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
6428
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
6429
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6296
6430
|
] })
|
|
6297
6431
|
] })
|
|
6298
6432
|
] }) }),
|
|
@@ -6303,7 +6437,7 @@ var ContentView_default = ContentView;
|
|
|
6303
6437
|
|
|
6304
6438
|
// src/components/dataForm/DataList.tsx
|
|
6305
6439
|
init_StyleTypes();
|
|
6306
|
-
var
|
|
6440
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6307
6441
|
var DataList = (props) => {
|
|
6308
6442
|
const router = (0, import_navigation2.useRouter)();
|
|
6309
6443
|
let builder = new OdataBuilder(props.path);
|
|
@@ -6341,7 +6475,7 @@ var DataList = (props) => {
|
|
|
6341
6475
|
if (path.includes(".")) {
|
|
6342
6476
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
6343
6477
|
} else if (Array.isArray(obj[path])) {
|
|
6344
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
6478
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: item }, index));
|
|
6345
6479
|
} else {
|
|
6346
6480
|
return obj[path];
|
|
6347
6481
|
}
|
|
@@ -6420,30 +6554,30 @@ var DataList = (props) => {
|
|
|
6420
6554
|
const renderPageNumbers = () => {
|
|
6421
6555
|
if (pages <= 10) {
|
|
6422
6556
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
6423
|
-
(page) => /* @__PURE__ */ (0,
|
|
6557
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react55.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6424
6558
|
Hyperlink,
|
|
6425
6559
|
{
|
|
6426
6560
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
6427
6561
|
href: builder.getNewPageUrl(page),
|
|
6428
6562
|
children: page
|
|
6429
6563
|
}
|
|
6430
|
-
) : /* @__PURE__ */ (0,
|
|
6564
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
6431
6565
|
);
|
|
6432
6566
|
} else {
|
|
6433
6567
|
const showFirstPages = activePageNumber <= 5;
|
|
6434
6568
|
const showLastPages = activePageNumber > pages - 5;
|
|
6435
6569
|
if (showFirstPages) {
|
|
6436
|
-
return /* @__PURE__ */ (0,
|
|
6437
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
6570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
6571
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react55.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6438
6572
|
Hyperlink,
|
|
6439
6573
|
{
|
|
6440
6574
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
6441
6575
|
href: builder.getNewPageUrl(page),
|
|
6442
6576
|
children: page
|
|
6443
6577
|
}
|
|
6444
|
-
) : /* @__PURE__ */ (0,
|
|
6445
|
-
/* @__PURE__ */ (0,
|
|
6446
|
-
/* @__PURE__ */ (0,
|
|
6578
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
6579
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
6580
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6447
6581
|
Hyperlink,
|
|
6448
6582
|
{
|
|
6449
6583
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6451,7 +6585,7 @@ var DataList = (props) => {
|
|
|
6451
6585
|
children: pages - 1
|
|
6452
6586
|
}
|
|
6453
6587
|
),
|
|
6454
|
-
/* @__PURE__ */ (0,
|
|
6588
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6455
6589
|
Hyperlink,
|
|
6456
6590
|
{
|
|
6457
6591
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6459,7 +6593,7 @@ var DataList = (props) => {
|
|
|
6459
6593
|
children: pages
|
|
6460
6594
|
}
|
|
6461
6595
|
),
|
|
6462
|
-
/* @__PURE__ */ (0,
|
|
6596
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6463
6597
|
"select",
|
|
6464
6598
|
{
|
|
6465
6599
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -6471,18 +6605,18 @@ var DataList = (props) => {
|
|
|
6471
6605
|
}
|
|
6472
6606
|
},
|
|
6473
6607
|
children: [
|
|
6474
|
-
/* @__PURE__ */ (0,
|
|
6608
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
6475
6609
|
Array.from(
|
|
6476
6610
|
{ length: Math.max(0, pages - 10) },
|
|
6477
6611
|
(_, index) => index + 9
|
|
6478
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
6612
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("option", { value: page, children: page }, page))
|
|
6479
6613
|
]
|
|
6480
6614
|
}
|
|
6481
6615
|
) })
|
|
6482
6616
|
] });
|
|
6483
6617
|
} else if (showLastPages) {
|
|
6484
|
-
return /* @__PURE__ */ (0,
|
|
6485
|
-
/* @__PURE__ */ (0,
|
|
6618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
6619
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6486
6620
|
Hyperlink,
|
|
6487
6621
|
{
|
|
6488
6622
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6490,7 +6624,7 @@ var DataList = (props) => {
|
|
|
6490
6624
|
children: "1"
|
|
6491
6625
|
}
|
|
6492
6626
|
),
|
|
6493
|
-
/* @__PURE__ */ (0,
|
|
6627
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6494
6628
|
Hyperlink,
|
|
6495
6629
|
{
|
|
6496
6630
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6498,21 +6632,21 @@ var DataList = (props) => {
|
|
|
6498
6632
|
children: "2"
|
|
6499
6633
|
}
|
|
6500
6634
|
),
|
|
6501
|
-
/* @__PURE__ */ (0,
|
|
6635
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
6502
6636
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
6503
|
-
(page) => /* @__PURE__ */ (0,
|
|
6637
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react55.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6504
6638
|
Hyperlink,
|
|
6505
6639
|
{
|
|
6506
6640
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
6507
6641
|
href: builder.getNewPageUrl(page),
|
|
6508
6642
|
children: page
|
|
6509
6643
|
}
|
|
6510
|
-
) : /* @__PURE__ */ (0,
|
|
6644
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
6511
6645
|
)
|
|
6512
6646
|
] });
|
|
6513
6647
|
} else {
|
|
6514
|
-
return /* @__PURE__ */ (0,
|
|
6515
|
-
/* @__PURE__ */ (0,
|
|
6648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
6649
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6516
6650
|
Hyperlink,
|
|
6517
6651
|
{
|
|
6518
6652
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6520,7 +6654,7 @@ var DataList = (props) => {
|
|
|
6520
6654
|
children: "1"
|
|
6521
6655
|
}
|
|
6522
6656
|
),
|
|
6523
|
-
/* @__PURE__ */ (0,
|
|
6657
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6524
6658
|
Hyperlink,
|
|
6525
6659
|
{
|
|
6526
6660
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6528,20 +6662,20 @@ var DataList = (props) => {
|
|
|
6528
6662
|
children: "2"
|
|
6529
6663
|
}
|
|
6530
6664
|
),
|
|
6531
|
-
/* @__PURE__ */ (0,
|
|
6665
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
6532
6666
|
Array.from(
|
|
6533
6667
|
{ length: 5 },
|
|
6534
6668
|
(_, index) => activePageNumber - 2 + index
|
|
6535
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
6669
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react55.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6536
6670
|
Hyperlink,
|
|
6537
6671
|
{
|
|
6538
6672
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
6539
6673
|
href: builder.getNewPageUrl(page),
|
|
6540
6674
|
children: page
|
|
6541
6675
|
}
|
|
6542
|
-
) : /* @__PURE__ */ (0,
|
|
6543
|
-
/* @__PURE__ */ (0,
|
|
6544
|
-
/* @__PURE__ */ (0,
|
|
6676
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
6677
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
6678
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6545
6679
|
Hyperlink,
|
|
6546
6680
|
{
|
|
6547
6681
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6549,7 +6683,7 @@ var DataList = (props) => {
|
|
|
6549
6683
|
children: pages - 1
|
|
6550
6684
|
}
|
|
6551
6685
|
),
|
|
6552
|
-
/* @__PURE__ */ (0,
|
|
6686
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6553
6687
|
Hyperlink,
|
|
6554
6688
|
{
|
|
6555
6689
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6557,7 +6691,7 @@ var DataList = (props) => {
|
|
|
6557
6691
|
children: pages
|
|
6558
6692
|
}
|
|
6559
6693
|
),
|
|
6560
|
-
/* @__PURE__ */ (0,
|
|
6694
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6561
6695
|
"select",
|
|
6562
6696
|
{
|
|
6563
6697
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -6569,8 +6703,8 @@ var DataList = (props) => {
|
|
|
6569
6703
|
}
|
|
6570
6704
|
},
|
|
6571
6705
|
children: [
|
|
6572
|
-
/* @__PURE__ */ (0,
|
|
6573
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
6706
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("option", { value: "", children: "Jump to" }),
|
|
6707
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("option", { value: page, children: page }, page))
|
|
6574
6708
|
]
|
|
6575
6709
|
}
|
|
6576
6710
|
) })
|
|
@@ -6578,16 +6712,16 @@ var DataList = (props) => {
|
|
|
6578
6712
|
}
|
|
6579
6713
|
}
|
|
6580
6714
|
};
|
|
6581
|
-
return /* @__PURE__ */ (0,
|
|
6582
|
-
/* @__PURE__ */ (0,
|
|
6583
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
6715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react55.default.Fragment, { children: [
|
|
6716
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(ContentView_default, { isDataFound, children: [
|
|
6717
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6584
6718
|
"div",
|
|
6585
6719
|
{
|
|
6586
6720
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
6587
6721
|
children: [
|
|
6588
|
-
props.title ? /* @__PURE__ */ (0,
|
|
6589
|
-
/* @__PURE__ */ (0,
|
|
6590
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
6722
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", {}),
|
|
6723
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6724
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6591
6725
|
InputControl_default,
|
|
6592
6726
|
{
|
|
6593
6727
|
name: "Search_input",
|
|
@@ -6599,7 +6733,7 @@ var DataList = (props) => {
|
|
|
6599
6733
|
}
|
|
6600
6734
|
}
|
|
6601
6735
|
),
|
|
6602
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
6736
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6603
6737
|
InputControl_default,
|
|
6604
6738
|
{
|
|
6605
6739
|
name: filter.name,
|
|
@@ -6614,15 +6748,15 @@ var DataList = (props) => {
|
|
|
6614
6748
|
},
|
|
6615
6749
|
filter.name
|
|
6616
6750
|
)),
|
|
6617
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
6751
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6618
6752
|
Hyperlink,
|
|
6619
6753
|
{
|
|
6620
6754
|
className: "gap-1",
|
|
6621
6755
|
linkType: "Primary" /* Solid */,
|
|
6622
6756
|
href: props.addLinkHref,
|
|
6623
6757
|
children: [
|
|
6624
|
-
/* @__PURE__ */ (0,
|
|
6625
|
-
/* @__PURE__ */ (0,
|
|
6758
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
6759
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
6626
6760
|
]
|
|
6627
6761
|
}
|
|
6628
6762
|
)
|
|
@@ -6630,8 +6764,8 @@ var DataList = (props) => {
|
|
|
6630
6764
|
]
|
|
6631
6765
|
}
|
|
6632
6766
|
),
|
|
6633
|
-
/* @__PURE__ */ (0,
|
|
6634
|
-
/* @__PURE__ */ (0,
|
|
6767
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
6768
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
6635
6769
|
let url = builder.getNewOrderByUrl(column.name);
|
|
6636
6770
|
let icon = "chevronUpDown";
|
|
6637
6771
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -6641,18 +6775,18 @@ var DataList = (props) => {
|
|
|
6641
6775
|
icon = "chevronUp";
|
|
6642
6776
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
6643
6777
|
}
|
|
6644
|
-
return /* @__PURE__ */ (0,
|
|
6778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6645
6779
|
"th",
|
|
6646
6780
|
{
|
|
6647
6781
|
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" : ""),
|
|
6648
|
-
children: /* @__PURE__ */ (0,
|
|
6782
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6649
6783
|
Hyperlink,
|
|
6650
6784
|
{
|
|
6651
6785
|
href: column.enableSorting ? url : void 0,
|
|
6652
6786
|
className: "!text-neutral-contrast ",
|
|
6653
|
-
children: /* @__PURE__ */ (0,
|
|
6654
|
-
/* @__PURE__ */ (0,
|
|
6655
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
6787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
6788
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-black", children: column.label }),
|
|
6789
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
6656
6790
|
] })
|
|
6657
6791
|
}
|
|
6658
6792
|
)
|
|
@@ -6660,24 +6794,24 @@ var DataList = (props) => {
|
|
|
6660
6794
|
column.name
|
|
6661
6795
|
);
|
|
6662
6796
|
}) }) }),
|
|
6663
|
-
/* @__PURE__ */ (0,
|
|
6797
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
6664
6798
|
let validityClass = "";
|
|
6665
6799
|
console.log("dataitem", dataitem);
|
|
6666
6800
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
6667
6801
|
validityClass = "bg-alert-200";
|
|
6668
6802
|
}
|
|
6669
|
-
return /* @__PURE__ */ (0,
|
|
6803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
6670
6804
|
console.log("column", column);
|
|
6671
|
-
return /* @__PURE__ */ (0,
|
|
6805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react55.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6672
6806
|
"td",
|
|
6673
6807
|
{
|
|
6674
6808
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
6675
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
6809
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6676
6810
|
Hyperlink,
|
|
6677
6811
|
{
|
|
6678
6812
|
className: "",
|
|
6679
6813
|
href: `https://${dataitem[column.name]}`,
|
|
6680
|
-
children: /* @__PURE__ */ (0,
|
|
6814
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6681
6815
|
ViewControl_default,
|
|
6682
6816
|
{
|
|
6683
6817
|
controlType: column.controlType,
|
|
@@ -6690,11 +6824,11 @@ var DataList = (props) => {
|
|
|
6690
6824
|
}
|
|
6691
6825
|
)
|
|
6692
6826
|
}
|
|
6693
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
6827
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6694
6828
|
Hyperlink,
|
|
6695
6829
|
{
|
|
6696
6830
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
6697
|
-
children: /* @__PURE__ */ (0,
|
|
6831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6698
6832
|
ViewControl_default,
|
|
6699
6833
|
{
|
|
6700
6834
|
controlType: column.controlType,
|
|
@@ -6704,7 +6838,7 @@ var DataList = (props) => {
|
|
|
6704
6838
|
}
|
|
6705
6839
|
)
|
|
6706
6840
|
}
|
|
6707
|
-
) : /* @__PURE__ */ (0,
|
|
6841
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6708
6842
|
ViewControl_default,
|
|
6709
6843
|
{
|
|
6710
6844
|
controlType: column.controlType,
|
|
@@ -6718,10 +6852,10 @@ var DataList = (props) => {
|
|
|
6718
6852
|
}) }, index);
|
|
6719
6853
|
}) })
|
|
6720
6854
|
] }) }),
|
|
6721
|
-
/* @__PURE__ */ (0,
|
|
6722
|
-
/* @__PURE__ */ (0,
|
|
6723
|
-
/* @__PURE__ */ (0,
|
|
6724
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
6855
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
6856
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "text-gray-700", children: label }),
|
|
6857
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
6858
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6725
6859
|
Hyperlink,
|
|
6726
6860
|
{
|
|
6727
6861
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -6729,9 +6863,9 @@ var DataList = (props) => {
|
|
|
6729
6863
|
children: "Prev"
|
|
6730
6864
|
}
|
|
6731
6865
|
),
|
|
6732
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
6866
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime77.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" }),
|
|
6733
6867
|
renderPageNumbers(),
|
|
6734
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
6868
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6735
6869
|
Hyperlink,
|
|
6736
6870
|
{
|
|
6737
6871
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -6739,19 +6873,19 @@ var DataList = (props) => {
|
|
|
6739
6873
|
children: "Next"
|
|
6740
6874
|
}
|
|
6741
6875
|
),
|
|
6742
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
6876
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
6743
6877
|
] })
|
|
6744
6878
|
] }) })
|
|
6745
6879
|
] }),
|
|
6746
|
-
/* @__PURE__ */ (0,
|
|
6747
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
6880
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
6881
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6748
6882
|
"div",
|
|
6749
6883
|
{
|
|
6750
6884
|
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`,
|
|
6751
6885
|
children: [
|
|
6752
|
-
props.title ? /* @__PURE__ */ (0,
|
|
6753
|
-
/* @__PURE__ */ (0,
|
|
6754
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
6886
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", {}),
|
|
6887
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6888
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6755
6889
|
InputControl_default,
|
|
6756
6890
|
{
|
|
6757
6891
|
name: "Search_input",
|
|
@@ -6763,7 +6897,7 @@ var DataList = (props) => {
|
|
|
6763
6897
|
}
|
|
6764
6898
|
}
|
|
6765
6899
|
),
|
|
6766
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
6900
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6767
6901
|
InputControl_default,
|
|
6768
6902
|
{
|
|
6769
6903
|
name: filter.name,
|
|
@@ -6778,15 +6912,15 @@ var DataList = (props) => {
|
|
|
6778
6912
|
},
|
|
6779
6913
|
filter.name
|
|
6780
6914
|
)),
|
|
6781
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
6915
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6782
6916
|
Hyperlink,
|
|
6783
6917
|
{
|
|
6784
6918
|
className: "gap-1",
|
|
6785
6919
|
linkType: "Primary" /* Solid */,
|
|
6786
6920
|
href: props.addLinkHref,
|
|
6787
6921
|
children: [
|
|
6788
|
-
/* @__PURE__ */ (0,
|
|
6789
|
-
/* @__PURE__ */ (0,
|
|
6922
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
6923
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
6790
6924
|
]
|
|
6791
6925
|
}
|
|
6792
6926
|
)
|
|
@@ -6794,8 +6928,8 @@ var DataList = (props) => {
|
|
|
6794
6928
|
]
|
|
6795
6929
|
}
|
|
6796
6930
|
),
|
|
6797
|
-
/* @__PURE__ */ (0,
|
|
6798
|
-
/* @__PURE__ */ (0,
|
|
6931
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
6932
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
6799
6933
|
let url = builder.getNewOrderByUrl(column.name);
|
|
6800
6934
|
let icon = "chevronUpDown";
|
|
6801
6935
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -6805,18 +6939,18 @@ var DataList = (props) => {
|
|
|
6805
6939
|
icon = "chevronUp";
|
|
6806
6940
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
6807
6941
|
}
|
|
6808
|
-
return /* @__PURE__ */ (0,
|
|
6942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6809
6943
|
"th",
|
|
6810
6944
|
{
|
|
6811
6945
|
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" : ""),
|
|
6812
|
-
children: /* @__PURE__ */ (0,
|
|
6946
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6813
6947
|
Hyperlink,
|
|
6814
6948
|
{
|
|
6815
6949
|
href: column.enableSorting ? url : void 0,
|
|
6816
6950
|
className: "text-body-950",
|
|
6817
|
-
children: /* @__PURE__ */ (0,
|
|
6818
|
-
/* @__PURE__ */ (0,
|
|
6819
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
6951
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
6952
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: column.label }),
|
|
6953
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
6820
6954
|
] })
|
|
6821
6955
|
}
|
|
6822
6956
|
)
|
|
@@ -6824,7 +6958,7 @@ var DataList = (props) => {
|
|
|
6824
6958
|
column.name
|
|
6825
6959
|
);
|
|
6826
6960
|
}) }) }) }) }),
|
|
6827
|
-
/* @__PURE__ */ (0,
|
|
6961
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
6828
6962
|
] })
|
|
6829
6963
|
] })
|
|
6830
6964
|
] });
|
|
@@ -6835,7 +6969,7 @@ var DataList_default = DataList;
|
|
|
6835
6969
|
var import_react56 = __toESM(require("react"));
|
|
6836
6970
|
init_ServiceClient();
|
|
6837
6971
|
var import_navigation3 = require("next/navigation");
|
|
6838
|
-
var
|
|
6972
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
6839
6973
|
var viewControlMap = {
|
|
6840
6974
|
number: ViewControlTypes.number,
|
|
6841
6975
|
lineText: ViewControlTypes.lineText,
|
|
@@ -6925,9 +7059,9 @@ var DataListRenderer = ({
|
|
|
6925
7059
|
const [tabItem, setTabItem] = (0, import_react56.useState)();
|
|
6926
7060
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
6927
7061
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
6928
|
-
return /* @__PURE__ */ (0,
|
|
6929
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
6930
|
-
/* @__PURE__ */ (0,
|
|
7062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react56.default.Fragment, { children: [
|
|
7063
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
7064
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6931
7065
|
DataList_default,
|
|
6932
7066
|
{
|
|
6933
7067
|
addLinkHref,
|
|
@@ -6977,7 +7111,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
6977
7111
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
6978
7112
|
|
|
6979
7113
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
6980
|
-
var
|
|
7114
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
6981
7115
|
var DataFormChildSection = (props) => {
|
|
6982
7116
|
const { section } = props;
|
|
6983
7117
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -7045,14 +7179,14 @@ var DataFormChildSection = (props) => {
|
|
|
7045
7179
|
childItemsToRender,
|
|
7046
7180
|
allChildItems: childItems
|
|
7047
7181
|
});
|
|
7048
|
-
return /* @__PURE__ */ (0,
|
|
7049
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
7050
|
-
/* @__PURE__ */ (0,
|
|
7051
|
-
/* @__PURE__ */ (0,
|
|
7052
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
7053
|
-
return /* @__PURE__ */ (0,
|
|
7182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
7183
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
7184
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
7185
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
7186
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
7187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("tr", { className: "", children: [
|
|
7054
7188
|
sectionRow.elements.map((field, index) => {
|
|
7055
|
-
return /* @__PURE__ */ (0,
|
|
7189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7056
7190
|
"th",
|
|
7057
7191
|
{
|
|
7058
7192
|
className: "py-3 font-normal text-left",
|
|
@@ -7061,21 +7195,21 @@ var DataFormChildSection = (props) => {
|
|
|
7061
7195
|
field.name
|
|
7062
7196
|
);
|
|
7063
7197
|
}),
|
|
7064
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7198
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
7065
7199
|
] }, sectionRowIndex);
|
|
7066
7200
|
}) }),
|
|
7067
|
-
/* @__PURE__ */ (0,
|
|
7201
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
7068
7202
|
const { item, originalIndex } = visibleItem;
|
|
7069
7203
|
const rowKey = originalIndex;
|
|
7070
|
-
return /* @__PURE__ */ (0,
|
|
7204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react57.default.Fragment, { children: section.sectionRows.map(
|
|
7071
7205
|
(sectionRow, sectionRowIndex) => {
|
|
7072
|
-
return /* @__PURE__ */ (0,
|
|
7206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7073
7207
|
"tr",
|
|
7074
7208
|
{
|
|
7075
7209
|
className: "",
|
|
7076
7210
|
children: [
|
|
7077
7211
|
sectionRow.elements.map((field, index) => {
|
|
7078
|
-
return /* @__PURE__ */ (0,
|
|
7212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7079
7213
|
InputControl_default,
|
|
7080
7214
|
{
|
|
7081
7215
|
index: filteredIndex,
|
|
@@ -7095,7 +7229,7 @@ var DataFormChildSection = (props) => {
|
|
|
7095
7229
|
}
|
|
7096
7230
|
) }) }) }, field.name);
|
|
7097
7231
|
}),
|
|
7098
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7232
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7099
7233
|
ClientButton_default,
|
|
7100
7234
|
{
|
|
7101
7235
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -7104,7 +7238,7 @@ var DataFormChildSection = (props) => {
|
|
|
7104
7238
|
},
|
|
7105
7239
|
dataRole: "delete",
|
|
7106
7240
|
tabIndex: -1,
|
|
7107
|
-
children: /* @__PURE__ */ (0,
|
|
7241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7108
7242
|
Icon_default,
|
|
7109
7243
|
{
|
|
7110
7244
|
className: "w-4 h-4",
|
|
@@ -7121,7 +7255,7 @@ var DataFormChildSection = (props) => {
|
|
|
7121
7255
|
) }, rowKey);
|
|
7122
7256
|
}) })
|
|
7123
7257
|
] }) }),
|
|
7124
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7258
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7125
7259
|
ClientButton_default,
|
|
7126
7260
|
{
|
|
7127
7261
|
ButtonType: "Link" /* Link */,
|
|
@@ -7136,7 +7270,7 @@ var DataFormChildSection = (props) => {
|
|
|
7136
7270
|
var DataFormChildSection_default = DataFormChildSection;
|
|
7137
7271
|
|
|
7138
7272
|
// src/components/dataForm/DataForm.tsx
|
|
7139
|
-
var
|
|
7273
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7140
7274
|
var DataForm = (props) => {
|
|
7141
7275
|
const formRef = (0, import_react58.useRef)(null);
|
|
7142
7276
|
console.log(props.dataItem, "dssads");
|
|
@@ -7356,19 +7490,19 @@ var DataForm = (props) => {
|
|
|
7356
7490
|
return false;
|
|
7357
7491
|
}
|
|
7358
7492
|
}
|
|
7359
|
-
return /* @__PURE__ */ (0,
|
|
7360
|
-
props.title && /* @__PURE__ */ (0,
|
|
7493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react58.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
7494
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime80.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_runtime80.jsxs)(
|
|
7361
7495
|
"div",
|
|
7362
7496
|
{
|
|
7363
7497
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
7364
7498
|
onClick: () => window.history.back(),
|
|
7365
7499
|
children: [
|
|
7366
|
-
/* @__PURE__ */ (0,
|
|
7367
|
-
/* @__PURE__ */ (0,
|
|
7500
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
7501
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
7368
7502
|
]
|
|
7369
7503
|
}
|
|
7370
7504
|
) }),
|
|
7371
|
-
/* @__PURE__ */ (0,
|
|
7505
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7372
7506
|
"form",
|
|
7373
7507
|
{
|
|
7374
7508
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -7389,8 +7523,8 @@ var DataForm = (props) => {
|
|
|
7389
7523
|
}
|
|
7390
7524
|
}
|
|
7391
7525
|
},
|
|
7392
|
-
children: /* @__PURE__ */ (0,
|
|
7393
|
-
return /* @__PURE__ */ (0,
|
|
7526
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
7527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react58.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
7394
7528
|
section.sectionRows?.map(
|
|
7395
7529
|
(sectionRow, sectionRowIndex) => {
|
|
7396
7530
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -7401,14 +7535,14 @@ var DataForm = (props) => {
|
|
|
7401
7535
|
sectionRow.visible
|
|
7402
7536
|
);
|
|
7403
7537
|
}
|
|
7404
|
-
return /* @__PURE__ */ (0,
|
|
7405
|
-
return /* @__PURE__ */ (0,
|
|
7538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react58.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
7539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
7406
7540
|
"div",
|
|
7407
7541
|
{
|
|
7408
7542
|
className: sectionRow.grow ? "grow" : "",
|
|
7409
7543
|
children: [
|
|
7410
|
-
/* @__PURE__ */ (0,
|
|
7411
|
-
/* @__PURE__ */ (0,
|
|
7544
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: field.controlType }),
|
|
7545
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7412
7546
|
InputControl_default,
|
|
7413
7547
|
{
|
|
7414
7548
|
name: field.name,
|
|
@@ -7438,12 +7572,12 @@ var DataForm = (props) => {
|
|
|
7438
7572
|
}) }) }, sectionRowIndex);
|
|
7439
7573
|
}
|
|
7440
7574
|
),
|
|
7441
|
-
/* @__PURE__ */ (0,
|
|
7575
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: section.childSections?.map(
|
|
7442
7576
|
(childSection, childSectionIndex) => {
|
|
7443
|
-
return /* @__PURE__ */ (0,
|
|
7577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
7444
7578
|
formState.inputValues,
|
|
7445
7579
|
childSection.visible
|
|
7446
|
-
) && /* @__PURE__ */ (0,
|
|
7580
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7447
7581
|
DataFormChildSection_default,
|
|
7448
7582
|
{
|
|
7449
7583
|
section: childSection,
|
|
@@ -7458,8 +7592,8 @@ var DataForm = (props) => {
|
|
|
7458
7592
|
}) })
|
|
7459
7593
|
}
|
|
7460
7594
|
),
|
|
7461
|
-
/* @__PURE__ */ (0,
|
|
7462
|
-
/* @__PURE__ */ (0,
|
|
7595
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
7596
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7463
7597
|
Button_default,
|
|
7464
7598
|
{
|
|
7465
7599
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -7467,7 +7601,7 @@ var DataForm = (props) => {
|
|
|
7467
7601
|
children: props.additionalActions.title
|
|
7468
7602
|
}
|
|
7469
7603
|
) }),
|
|
7470
|
-
/* @__PURE__ */ (0,
|
|
7604
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7471
7605
|
Button_default,
|
|
7472
7606
|
{
|
|
7473
7607
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -7478,7 +7612,7 @@ var DataForm = (props) => {
|
|
|
7478
7612
|
children: "Delete"
|
|
7479
7613
|
}
|
|
7480
7614
|
) }),
|
|
7481
|
-
/* @__PURE__ */ (0,
|
|
7615
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7482
7616
|
Button_default,
|
|
7483
7617
|
{
|
|
7484
7618
|
onValidate,
|
|
@@ -7496,7 +7630,7 @@ var DataForm_default = DataForm;
|
|
|
7496
7630
|
|
|
7497
7631
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
7498
7632
|
init_ServiceClient();
|
|
7499
|
-
var
|
|
7633
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7500
7634
|
function getAction(actions, code) {
|
|
7501
7635
|
return actions?.find((a) => a.actionCode === code);
|
|
7502
7636
|
}
|
|
@@ -7522,9 +7656,9 @@ var DataFormRenderer = ({
|
|
|
7522
7656
|
"Delete"
|
|
7523
7657
|
);
|
|
7524
7658
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
7525
|
-
return /* @__PURE__ */ (0,
|
|
7526
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
7527
|
-
/* @__PURE__ */ (0,
|
|
7659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
7660
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
7661
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7528
7662
|
DataForm_default,
|
|
7529
7663
|
{
|
|
7530
7664
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|