@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260323092346 → 0.8.1-dev.20260323111546
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +163 -274
- package/dist/index.mjs +195 -306
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1141,53 +1141,28 @@ var ToastService_default = ToastService;
|
|
|
1141
1141
|
|
|
1142
1142
|
// src/components/StyleTypes.tsx
|
|
1143
1143
|
var buttonClasses = /* @__PURE__ */ new Map([
|
|
1144
|
-
[
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
],
|
|
1148
|
-
[
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
],
|
|
1152
|
-
[
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
],
|
|
1156
|
-
[
|
|
1157
|
-
"PrimaryHollow" /* PrimaryHollow */,
|
|
1158
|
-
"inline-flex font-medium items-center justify-center px-4 py-3 lg:py-2 transparent border-primary border text-primary rounded hover:shadow-md focus:outline-none transition duration-150 ease-in-out active:scale-95"
|
|
1159
|
-
],
|
|
1160
|
-
[
|
|
1161
|
-
"SecondaryHollow" /* SecondaryHollow */,
|
|
1162
|
-
"inline-flex font-medium items-center justify-center px-4 py-3 lg:py-2 transparent border-secondary border text-secondary rounded hover:shadow-md focus:outline-none transition duration-150 ease-in-out active:scale-95"
|
|
1163
|
-
],
|
|
1164
|
-
[
|
|
1165
|
-
"NeutralHollow" /* NeutralHollow */,
|
|
1166
|
-
"inline-flex font-medium items-center justify-center px-4 py-3 lg:py-2 transparent border-neutral border text-neutral rounded hover:shadow-md focus:outline-none transition duration-150 ease-in-out active:scale-95"
|
|
1167
|
-
],
|
|
1168
|
-
[
|
|
1169
|
-
"Ripple" /* Ripple */,
|
|
1170
|
-
"px-3 py-1.5 inline-flex items-center text-sm font-medium rounded border-[1.5px] border-primary ripple btn-bg-primary btn-primary-text"
|
|
1171
|
-
],
|
|
1172
|
-
[
|
|
1173
|
-
"Danger" /* Danger */,
|
|
1174
|
-
"inline-flex text-sm font-medium items-center justify-center px-4 py-2 border border-alert bg-alert text-white rounded hover:bg-alert-600 hover:border-alert-600 focus:outline-none active:ring-1 active:ring-alert"
|
|
1175
|
-
],
|
|
1176
|
-
["Link" /* Link */, ""],
|
|
1177
|
-
[
|
|
1178
|
-
"Light" /* Light */,
|
|
1179
|
-
"inline-flex items-center justify-center rounded bg-white border px-4 py-2 leading-6 text-primary shadow-sm hover:shadow focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1180
|
-
]
|
|
1144
|
+
["Primary" /* Solid */, "btn-solid"],
|
|
1145
|
+
["PrimaryHollow" /* Hollow */, "btn-hollow"],
|
|
1146
|
+
["Link" /* Link */, "btn-link"]
|
|
1147
|
+
// [StyleTypes.Solid, "relative inline-flex items-center justify-center bg-gradient-to-b from-secondary to-secondary-strong rounded px-4 py-3 lg:py-2 font-medium shadow-sm hover:shadow-lg focus:outline-none active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed transition duration-150 ease-in-out text-body hover:bg-secondary-strong"],
|
|
1148
|
+
// [StyleTypes.Solid, "relative inline-flex items-center justify-center bg-neutral-strong rounded px-4 py-3 lg:py-2 font-medium shadow-sm hover:shadow-lg focus:outline-none active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed transition duration-150 ease-in-out text-body hover:bg-neutral-stronger"],
|
|
1149
|
+
// [StyleTypes.Hollow, "inline-flex font-medium items-center justify-center px-4 py-3 lg:py-2 transparent border-primary border text-primary rounded hover:shadow-md focus:outline-none transition duration-150 ease-in-out active:scale-95"],
|
|
1150
|
+
// [StyleTypes.Hollow, "inline-flex font-medium items-center justify-center px-4 py-3 lg:py-2 transparent border-secondary border text-secondary rounded hover:shadow-md focus:outline-none transition duration-150 ease-in-out active:scale-95"],
|
|
1151
|
+
// [StyleTypes.Hollow, "inline-flex font-medium items-center justify-center px-4 py-3 lg:py-2 transparent border-neutral border text-neutral rounded hover:shadow-md focus:outline-none transition duration-150 ease-in-out active:scale-95"],
|
|
1152
|
+
// [StyleTypes.Ripple, "px-3 py-1.5 inline-flex items-center text-sm font-medium rounded border-[1.5px] border-primary ripple btn-bg-primary btn-primary-text"],
|
|
1153
|
+
// [StyleTypes.Danger, "inline-flex text-sm font-medium items-center justify-center px-4 py-2 border border-alert bg-alert text-white rounded hover:bg-alert-600 hover:border-alert-600 focus:outline-none active:ring-1 active:ring-alert"],
|
|
1154
|
+
// [StyleTypes.Link, ""],
|
|
1155
|
+
// [StyleTypes.Light, "inline-flex items-center justify-center rounded bg-white border px-4 py-2 leading-6 text-primary shadow-sm hover:shadow focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary disabled:opacity-50 disabled:cursor-not-allowed"],
|
|
1181
1156
|
]);
|
|
1182
1157
|
var progressClasses = /* @__PURE__ */ new Map([
|
|
1183
|
-
["Primary" /*
|
|
1184
|
-
["PrimaryHollow" /*
|
|
1185
|
-
[
|
|
1186
|
-
[
|
|
1187
|
-
[
|
|
1188
|
-
[
|
|
1189
|
-
[
|
|
1190
|
-
[
|
|
1158
|
+
["Primary" /* Solid */, ""],
|
|
1159
|
+
["PrimaryHollow" /* Hollow */, ""],
|
|
1160
|
+
// [StyleTypes.Solid, ""],
|
|
1161
|
+
// [StyleTypes.Hollow, ""],
|
|
1162
|
+
// [StyleTypes.Solid, ""],
|
|
1163
|
+
// [StyleTypes.Hollow, ""],
|
|
1164
|
+
// [StyleTypes.Ripple, ""],
|
|
1165
|
+
// [StyleTypes.Danger, ""],
|
|
1191
1166
|
["Link" /* Link */, ""]
|
|
1192
1167
|
]);
|
|
1193
1168
|
|
|
@@ -1196,56 +1171,21 @@ var import_react25 = require("react");
|
|
|
1196
1171
|
|
|
1197
1172
|
// src/components/ClientButton.tsx
|
|
1198
1173
|
var import_react24 = __toESM(require("react"));
|
|
1199
|
-
|
|
1200
|
-
// src/components/utilities/ToastService.tsx
|
|
1201
|
-
var ToastService2 = class {
|
|
1202
|
-
static showError(message) {
|
|
1203
|
-
console.error(message);
|
|
1204
|
-
if (typeof window !== "undefined") {
|
|
1205
|
-
alert(message);
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
static showSuccess(message) {
|
|
1209
|
-
console.log(message);
|
|
1210
|
-
if (typeof window !== "undefined") {
|
|
1211
|
-
alert(message);
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
static showWarning(message) {
|
|
1215
|
-
console.warn(message);
|
|
1216
|
-
if (typeof window !== "undefined") {
|
|
1217
|
-
alert(message);
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
static showInfo(message) {
|
|
1221
|
-
console.info(message);
|
|
1222
|
-
if (typeof window !== "undefined") {
|
|
1223
|
-
alert(message);
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
};
|
|
1227
|
-
var ToastService_default2 = ToastService2;
|
|
1228
|
-
|
|
1229
|
-
// src/components/ClientButton.tsx
|
|
1230
1174
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1231
1175
|
var ClientButton = (props) => {
|
|
1232
1176
|
const execute = async (event) => {
|
|
1233
|
-
event.preventDefault();
|
|
1234
1177
|
if (props.onClick !== void 0) {
|
|
1235
1178
|
props.onClick();
|
|
1236
1179
|
} else {
|
|
1237
|
-
|
|
1180
|
+
ToastService_default.showError("No action defined.");
|
|
1238
1181
|
}
|
|
1239
1182
|
};
|
|
1240
|
-
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /*
|
|
1183
|
+
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1241
1184
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react24.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1242
1185
|
"button",
|
|
1243
1186
|
{
|
|
1244
1187
|
type: "button",
|
|
1245
1188
|
onClick: execute,
|
|
1246
|
-
"data-role": props.dataRole,
|
|
1247
|
-
disabled: props.disabled,
|
|
1248
|
-
tabIndex: props.tabIndex,
|
|
1249
1189
|
className: buttonClass + " " + props.className,
|
|
1250
1190
|
children: props.children
|
|
1251
1191
|
}
|
|
@@ -1269,21 +1209,27 @@ var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
|
1269
1209
|
onCancel();
|
|
1270
1210
|
}
|
|
1271
1211
|
};
|
|
1272
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: showModal && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "fixed inset-0 flex items-center justify-center z-
|
|
1212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: showModal && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
|
|
1273
1213
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1274
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "bg-white rounded-md p-6 shadow border z-50", children: [
|
|
1275
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xl font-
|
|
1214
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1215
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1276
1216
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mb-4", children: message }),
|
|
1277
1217
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex justify-end gap-8", children: [
|
|
1278
1218
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1279
1219
|
ClientButton_default,
|
|
1280
1220
|
{
|
|
1281
1221
|
onClick: handleCancelAction,
|
|
1282
|
-
ButtonType: "PrimaryHollow" /*
|
|
1222
|
+
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
1283
1223
|
children: "Cancel"
|
|
1284
1224
|
}
|
|
1285
1225
|
),
|
|
1286
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1226
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1227
|
+
ClientButton_default,
|
|
1228
|
+
{
|
|
1229
|
+
onClick: handleConfirmAction,
|
|
1230
|
+
children: "Confirm"
|
|
1231
|
+
}
|
|
1232
|
+
)
|
|
1287
1233
|
] })
|
|
1288
1234
|
] })
|
|
1289
1235
|
] }) });
|
|
@@ -1301,10 +1247,9 @@ var Button = (props) => {
|
|
|
1301
1247
|
const [showModal, setShowModal] = (0, import_react26.useState)(null);
|
|
1302
1248
|
const execute = async (event) => {
|
|
1303
1249
|
event.preventDefault();
|
|
1250
|
+
event.stopPropagation();
|
|
1304
1251
|
if (props.confirm) {
|
|
1305
|
-
const confirmed = await showConfirmation(
|
|
1306
|
-
"Are you sure you want to delete this item?"
|
|
1307
|
-
);
|
|
1252
|
+
const confirmed = await showConfirmation("Are you sure you want to delete this item?");
|
|
1308
1253
|
setShowModal(null);
|
|
1309
1254
|
if (!confirmed) {
|
|
1310
1255
|
return;
|
|
@@ -1319,15 +1264,12 @@ var Button = (props) => {
|
|
|
1319
1264
|
isValid = await props.onValidate();
|
|
1320
1265
|
if (!isValid) {
|
|
1321
1266
|
setInProgress(false);
|
|
1322
|
-
ToastService_default.showError(
|
|
1323
|
-
"There are error in the form. Please fix them before proceeding."
|
|
1324
|
-
);
|
|
1267
|
+
ToastService_default.showError("There are errors in the form. Please fix them before proceeding.");
|
|
1325
1268
|
return;
|
|
1326
1269
|
}
|
|
1327
1270
|
}
|
|
1328
1271
|
if (props.onClick !== void 0) {
|
|
1329
|
-
let response = await props.onClick(
|
|
1330
|
-
console.log(response);
|
|
1272
|
+
let response = await props.onClick();
|
|
1331
1273
|
if (response.isSuccessful) {
|
|
1332
1274
|
setIsActionPerformed(true);
|
|
1333
1275
|
setResponseMessage(response.message);
|
|
@@ -1346,61 +1288,27 @@ var Button = (props) => {
|
|
|
1346
1288
|
return new Promise((resolve) => {
|
|
1347
1289
|
const onConfirm = () => resolve(true);
|
|
1348
1290
|
const onCancel = () => resolve(false);
|
|
1349
|
-
setShowModal(
|
|
1350
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1351
|
-
Confirm_default,
|
|
1352
|
-
{
|
|
1353
|
-
message: props.confirmationMessage,
|
|
1354
|
-
onConfirm,
|
|
1355
|
-
onCancel
|
|
1356
|
-
}
|
|
1357
|
-
)
|
|
1358
|
-
);
|
|
1291
|
+
setShowModal(/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
1359
1292
|
});
|
|
1360
1293
|
};
|
|
1361
|
-
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /*
|
|
1362
|
-
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /*
|
|
1294
|
+
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1295
|
+
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
1296
|
+
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
1363
1297
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react26.default.Fragment, { children: [
|
|
1364
1298
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1365
1299
|
"button",
|
|
1366
1300
|
{
|
|
1367
1301
|
type: "submit",
|
|
1368
1302
|
onClick: execute,
|
|
1369
|
-
id: props.id,
|
|
1370
1303
|
disabled: props.disabled,
|
|
1371
|
-
|
|
1304
|
+
title: isDisabled ? "The button is disabled to prevent any action" : "",
|
|
1305
|
+
className: buttonClass + " relative " + props.className,
|
|
1372
1306
|
children: [
|
|
1373
1307
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
1374
|
-
inProgress && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react26.default.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1375
|
-
"
|
|
1376
|
-
{
|
|
1377
|
-
|
|
1378
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1379
|
-
fill: "none",
|
|
1380
|
-
viewBox: "0 0 24 24",
|
|
1381
|
-
children: [
|
|
1382
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1383
|
-
"circle",
|
|
1384
|
-
{
|
|
1385
|
-
className: "opacity-25",
|
|
1386
|
-
cx: "12",
|
|
1387
|
-
cy: "12",
|
|
1388
|
-
r: "10",
|
|
1389
|
-
stroke: "currentColor",
|
|
1390
|
-
strokeWidth: "4"
|
|
1391
|
-
}
|
|
1392
|
-
),
|
|
1393
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1394
|
-
"path",
|
|
1395
|
-
{
|
|
1396
|
-
className: "opacity-75",
|
|
1397
|
-
fill: "currentColor",
|
|
1398
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
1399
|
-
}
|
|
1400
|
-
)
|
|
1401
|
-
]
|
|
1402
|
-
}
|
|
1403
|
-
) })
|
|
1308
|
+
inProgress && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react26.default.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
1309
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1310
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
1311
|
+
] }) })
|
|
1404
1312
|
]
|
|
1405
1313
|
}
|
|
1406
1314
|
),
|
|
@@ -1616,7 +1524,10 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1616
1524
|
}
|
|
1617
1525
|
)
|
|
1618
1526
|
] }, field.name)),
|
|
1619
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Button_default, { onClick:
|
|
1527
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Button_default, { onClick: async () => {
|
|
1528
|
+
handleSaveModal();
|
|
1529
|
+
return { isSuccessful: true };
|
|
1530
|
+
}, className: "w-full", children: [
|
|
1620
1531
|
"Save ",
|
|
1621
1532
|
props.attributes?.label
|
|
1622
1533
|
] })
|
|
@@ -1853,7 +1764,7 @@ InputControl.displayName = "InputControl";
|
|
|
1853
1764
|
var InputControl_default = InputControl;
|
|
1854
1765
|
|
|
1855
1766
|
// src/components/dataForm/DataList.tsx
|
|
1856
|
-
var
|
|
1767
|
+
var import_react34 = __toESM(require("react"));
|
|
1857
1768
|
var import_navigation = require("next/navigation");
|
|
1858
1769
|
|
|
1859
1770
|
// src/components/dataForm/NoContentView.tsx
|
|
@@ -1908,27 +1819,25 @@ var ContentView_default = ContentView;
|
|
|
1908
1819
|
|
|
1909
1820
|
// src/components/dataForm/Hyperlink.tsx
|
|
1910
1821
|
var import_link = __toESM(require("next/link"));
|
|
1911
|
-
var import_react34 = __toESM(require("react"));
|
|
1912
1822
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1913
1823
|
function Hyperlink(props) {
|
|
1914
|
-
let linkClass = props.linkType ? buttonClasses.get(props.linkType) :
|
|
1915
|
-
const target = props
|
|
1916
|
-
const additionalProps =
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
] });
|
|
1824
|
+
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : "";
|
|
1825
|
+
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
1826
|
+
const additionalProps = {};
|
|
1827
|
+
if (target == "_blank") {
|
|
1828
|
+
additionalProps.rel = "noopener noreferrer";
|
|
1829
|
+
}
|
|
1830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1831
|
+
import_link.default,
|
|
1832
|
+
{
|
|
1833
|
+
href: props.href,
|
|
1834
|
+
prefetch: false,
|
|
1835
|
+
className: `${linkClass} ${props.className ?? ""}`,
|
|
1836
|
+
...additionalProps,
|
|
1837
|
+
target,
|
|
1838
|
+
children: props.children
|
|
1839
|
+
}
|
|
1840
|
+
) : props.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: props.className, children: props.children }) });
|
|
1932
1841
|
}
|
|
1933
1842
|
|
|
1934
1843
|
// src/clients/OdataBuilder.tsx
|
|
@@ -2188,8 +2097,8 @@ var DataList = (props) => {
|
|
|
2188
2097
|
let activePageNumber = 0;
|
|
2189
2098
|
let pages = 0;
|
|
2190
2099
|
console.log(props.addLinkText);
|
|
2191
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
2192
|
-
(0,
|
|
2100
|
+
const [isDataFound, setIsDataFound] = (0, import_react34.useState)(null);
|
|
2101
|
+
(0, import_react34.useEffect)(() => {
|
|
2193
2102
|
if (props?.dataset) {
|
|
2194
2103
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
2195
2104
|
setIsDataFound(true);
|
|
@@ -2211,8 +2120,8 @@ var DataList = (props) => {
|
|
|
2211
2120
|
inputValues: {},
|
|
2212
2121
|
lastPropertyChanged: ""
|
|
2213
2122
|
};
|
|
2214
|
-
const [formState, dispatch] = (0,
|
|
2215
|
-
const handleFilterChange = (0,
|
|
2123
|
+
const [formState, dispatch] = (0, import_react34.useReducer)(FormReducer_default, initialState);
|
|
2124
|
+
const handleFilterChange = (0, import_react34.useCallback)(
|
|
2216
2125
|
(updatedValues) => {
|
|
2217
2126
|
dispatch({
|
|
2218
2127
|
type: FORM_INPUT_UPDATE,
|
|
@@ -2258,7 +2167,7 @@ var DataList = (props) => {
|
|
|
2258
2167
|
const renderPageNumbers = () => {
|
|
2259
2168
|
if (pages <= 10) {
|
|
2260
2169
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
2261
|
-
(page) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2170
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react34.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2262
2171
|
Hyperlink,
|
|
2263
2172
|
{
|
|
2264
2173
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2272,7 +2181,7 @@ var DataList = (props) => {
|
|
|
2272
2181
|
const showLastPages = activePageNumber > pages - 5;
|
|
2273
2182
|
if (showFirstPages) {
|
|
2274
2183
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
2275
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2184
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react34.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2276
2185
|
Hyperlink,
|
|
2277
2186
|
{
|
|
2278
2187
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2338,7 +2247,7 @@ var DataList = (props) => {
|
|
|
2338
2247
|
),
|
|
2339
2248
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
2340
2249
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
2341
|
-
(page) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2250
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react34.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2342
2251
|
Hyperlink,
|
|
2343
2252
|
{
|
|
2344
2253
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2370,7 +2279,7 @@ var DataList = (props) => {
|
|
|
2370
2279
|
Array.from(
|
|
2371
2280
|
{ length: 5 },
|
|
2372
2281
|
(_, index) => activePageNumber - 2 + index
|
|
2373
|
-
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2282
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react34.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2374
2283
|
Hyperlink,
|
|
2375
2284
|
{
|
|
2376
2285
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2416,7 +2325,7 @@ var DataList = (props) => {
|
|
|
2416
2325
|
}
|
|
2417
2326
|
}
|
|
2418
2327
|
};
|
|
2419
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react34.default.Fragment, { children: [
|
|
2420
2329
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(ContentView_default, { isDataFound, children: [
|
|
2421
2330
|
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2422
2331
|
"div",
|
|
@@ -2444,7 +2353,7 @@ var DataList = (props) => {
|
|
|
2444
2353
|
Hyperlink,
|
|
2445
2354
|
{
|
|
2446
2355
|
className: "gap-1",
|
|
2447
|
-
linkType: "Primary" /*
|
|
2356
|
+
linkType: "Primary" /* Solid */,
|
|
2448
2357
|
href: props.addLinkHref,
|
|
2449
2358
|
children: [
|
|
2450
2359
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
@@ -2487,7 +2396,7 @@ var DataList = (props) => {
|
|
|
2487
2396
|
}
|
|
2488
2397
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
2489
2398
|
console.log("column", column);
|
|
2490
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react34.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2491
2400
|
"td",
|
|
2492
2401
|
{
|
|
2493
2402
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.moneyView ? "" : ""),
|
|
@@ -2589,7 +2498,7 @@ var DataList = (props) => {
|
|
|
2589
2498
|
Hyperlink,
|
|
2590
2499
|
{
|
|
2591
2500
|
className: "gap-1",
|
|
2592
|
-
linkType: "Primary" /*
|
|
2501
|
+
linkType: "Primary" /* Solid */,
|
|
2593
2502
|
href: props.addLinkHref,
|
|
2594
2503
|
children: [
|
|
2595
2504
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
@@ -2632,10 +2541,10 @@ var DataList = (props) => {
|
|
|
2632
2541
|
var DataList_default = DataList;
|
|
2633
2542
|
|
|
2634
2543
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2635
|
-
var
|
|
2544
|
+
var import_react54 = __toESM(require("react"));
|
|
2636
2545
|
|
|
2637
2546
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2638
|
-
var
|
|
2547
|
+
var import_react36 = __toESM(require("react"));
|
|
2639
2548
|
|
|
2640
2549
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
2641
2550
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
@@ -2707,7 +2616,7 @@ var LineBreakNode = (props) => {
|
|
|
2707
2616
|
var LineBreakNode_default = LineBreakNode;
|
|
2708
2617
|
|
|
2709
2618
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2710
|
-
var
|
|
2619
|
+
var import_react35 = __toESM(require("react"));
|
|
2711
2620
|
var import_link2 = __toESM(require("next/link"));
|
|
2712
2621
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2713
2622
|
var LinkNode = (props) => {
|
|
@@ -2720,7 +2629,7 @@ var LinkNode = (props) => {
|
|
|
2720
2629
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_link2.default, { className: formatClasses, href: props.node.url, title: props.node.title, children: [
|
|
2721
2630
|
props.node.children && props.node.children.map((node, index) => {
|
|
2722
2631
|
const SelectedNode = NodeTypes2[node.type];
|
|
2723
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react35.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SelectedNode, { node }) }, index);
|
|
2724
2633
|
}),
|
|
2725
2634
|
props.node.children.length == 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("br", {})
|
|
2726
2635
|
] });
|
|
@@ -2906,7 +2815,7 @@ var ParagraphNode = (props) => {
|
|
|
2906
2815
|
if (isInlineOnlyParent) {
|
|
2907
2816
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2908
2817
|
const SelectedNode = NodeTypes2[node.type];
|
|
2909
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react36.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2910
2819
|
SelectedNode,
|
|
2911
2820
|
{
|
|
2912
2821
|
node,
|
|
@@ -2921,7 +2830,7 @@ var ParagraphNode = (props) => {
|
|
|
2921
2830
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: " " + formatClasses, children: [
|
|
2922
2831
|
hasChildren && props.node.children.map((node, index) => {
|
|
2923
2832
|
const SelectedNode = NodeTypes2[node.type];
|
|
2924
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react36.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2925
2834
|
SelectedNode,
|
|
2926
2835
|
{
|
|
2927
2836
|
node,
|
|
@@ -2938,7 +2847,7 @@ var ParagraphNode = (props) => {
|
|
|
2938
2847
|
var ParagraphNode_default = ParagraphNode;
|
|
2939
2848
|
|
|
2940
2849
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2941
|
-
var
|
|
2850
|
+
var import_react37 = __toESM(require("react"));
|
|
2942
2851
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2943
2852
|
var HeadingNode = (props) => {
|
|
2944
2853
|
const NodeTypes2 = {
|
|
@@ -2955,22 +2864,22 @@ var HeadingNode = (props) => {
|
|
|
2955
2864
|
{
|
|
2956
2865
|
}
|
|
2957
2866
|
let formatClasses = FormatClass[props.node.format] || "";
|
|
2958
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children:
|
|
2867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: import_react37.default.createElement(
|
|
2959
2868
|
HeadingTag,
|
|
2960
2869
|
{ className: formatClasses },
|
|
2961
2870
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2962
2871
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2963
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react37.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2964
2873
|
})
|
|
2965
2874
|
) });
|
|
2966
2875
|
};
|
|
2967
2876
|
var HeadingNode_default = HeadingNode;
|
|
2968
2877
|
|
|
2969
2878
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2970
|
-
var
|
|
2879
|
+
var import_react39 = __toESM(require("react"));
|
|
2971
2880
|
|
|
2972
2881
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2973
|
-
var
|
|
2882
|
+
var import_react38 = __toESM(require("react"));
|
|
2974
2883
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2975
2884
|
var ListItemNode = (props) => {
|
|
2976
2885
|
const NodeTypes2 = {
|
|
@@ -2999,7 +2908,7 @@ var ListItemNode = (props) => {
|
|
|
2999
2908
|
}
|
|
3000
2909
|
} else {
|
|
3001
2910
|
foundFirstBreak = false;
|
|
3002
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react38.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3003
2912
|
}
|
|
3004
2913
|
}) });
|
|
3005
2914
|
};
|
|
@@ -3011,21 +2920,21 @@ var ListNode = (props) => {
|
|
|
3011
2920
|
const NodeTypes2 = {
|
|
3012
2921
|
listitem: ListItemNode_default
|
|
3013
2922
|
};
|
|
3014
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react39.default.Fragment, { children: [
|
|
3015
2924
|
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3016
2925
|
const SelectedNode = NodeTypes2[node.type];
|
|
3017
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react39.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3018
2927
|
}) }),
|
|
3019
2928
|
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3020
2929
|
const SelectedNode = NodeTypes2[node.type];
|
|
3021
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react39.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3022
2931
|
}) })
|
|
3023
2932
|
] });
|
|
3024
2933
|
};
|
|
3025
2934
|
var ListNode_default = ListNode;
|
|
3026
2935
|
|
|
3027
2936
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
3028
|
-
var
|
|
2937
|
+
var import_react40 = __toESM(require("react"));
|
|
3029
2938
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3030
2939
|
var QuoteNode = (props) => {
|
|
3031
2940
|
const NodeTypes2 = {
|
|
@@ -3035,21 +2944,21 @@ var QuoteNode = (props) => {
|
|
|
3035
2944
|
};
|
|
3036
2945
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3037
2946
|
const SelectedNode = NodeTypes2[node.type];
|
|
3038
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react40.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3039
2948
|
}) });
|
|
3040
2949
|
};
|
|
3041
2950
|
var QuoteNode_default = QuoteNode;
|
|
3042
2951
|
|
|
3043
2952
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3044
|
-
var
|
|
2953
|
+
var import_react42 = __toESM(require("react"));
|
|
3045
2954
|
|
|
3046
2955
|
// src/components/CopyButton.tsx
|
|
3047
|
-
var
|
|
2956
|
+
var import_react41 = require("react");
|
|
3048
2957
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3049
2958
|
function CopyButton({ text }) {
|
|
3050
|
-
const [copied, setCopied] = (0,
|
|
3051
|
-
const timeoutRef = (0,
|
|
3052
|
-
(0,
|
|
2959
|
+
const [copied, setCopied] = (0, import_react41.useState)(false);
|
|
2960
|
+
const timeoutRef = (0, import_react41.useRef)(null);
|
|
2961
|
+
(0, import_react41.useEffect)(() => {
|
|
3053
2962
|
return () => {
|
|
3054
2963
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3055
2964
|
};
|
|
@@ -3115,7 +3024,7 @@ var CodeNode = (props) => {
|
|
|
3115
3024
|
] }),
|
|
3116
3025
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("code", { className: "block bg-gray-900 text-gray-100 p-4 rounded-b-md text-sm whitespace-pre-wrap", children: props.node.children && props.node.children.map((node, index) => {
|
|
3117
3026
|
const SelectedNode = NodeTypes2[node.type];
|
|
3118
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react42.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3119
3028
|
}) })
|
|
3120
3029
|
] });
|
|
3121
3030
|
};
|
|
@@ -3129,15 +3038,15 @@ var HorizontalRuleNode = (props) => {
|
|
|
3129
3038
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3130
3039
|
|
|
3131
3040
|
// src/components/pageRenderingEngine/nodes/LayoutItemNode.tsx
|
|
3132
|
-
var
|
|
3041
|
+
var import_react48 = __toESM(require("react"));
|
|
3133
3042
|
|
|
3134
3043
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3135
|
-
var
|
|
3044
|
+
var import_react43 = __toESM(require("react"));
|
|
3136
3045
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3137
3046
|
var ImageNode = (props) => {
|
|
3138
3047
|
const { node, apiBaseUrl = "" } = props;
|
|
3139
3048
|
let imageUrl = node.imageUrl.startsWith("http") ? node.imageUrl : `${apiBaseUrl}/digitalassets/storefront/${node.imageUrl}`;
|
|
3140
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react43.default.Fragment, { children: node.width ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { style: { width: node.width }, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3141
3050
|
"img",
|
|
3142
3051
|
{
|
|
3143
3052
|
loading: "lazy",
|
|
@@ -3162,7 +3071,7 @@ var ImageNode = (props) => {
|
|
|
3162
3071
|
var ImageNode_default = ImageNode;
|
|
3163
3072
|
|
|
3164
3073
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3165
|
-
var
|
|
3074
|
+
var import_react44 = require("react");
|
|
3166
3075
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3167
3076
|
var WidgetNode = (props) => {
|
|
3168
3077
|
const getWidgetParameters = () => {
|
|
@@ -3223,7 +3132,7 @@ var WidgetNode = (props) => {
|
|
|
3223
3132
|
props.node.widgetCode
|
|
3224
3133
|
] });
|
|
3225
3134
|
}
|
|
3226
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react44.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "container mt-2", children: "..." }), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3227
3136
|
SelectedWidget,
|
|
3228
3137
|
{
|
|
3229
3138
|
params: getWidgetParameters(),
|
|
@@ -3238,13 +3147,13 @@ var WidgetNode = (props) => {
|
|
|
3238
3147
|
var WidgetNode_default = WidgetNode;
|
|
3239
3148
|
|
|
3240
3149
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3241
|
-
var
|
|
3150
|
+
var import_react46 = __toESM(require("react"));
|
|
3242
3151
|
|
|
3243
3152
|
// src/components/IFrameLoaderView.tsx
|
|
3244
|
-
var
|
|
3153
|
+
var import_react45 = __toESM(require("react"));
|
|
3245
3154
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3246
3155
|
var IFrameLoaderView = (props) => {
|
|
3247
|
-
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
3156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react45.default.Fragment, { children: [
|
|
3248
3157
|
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3249
3158
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3250
3159
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
@@ -3285,10 +3194,10 @@ var IFrameLoaderView_default = IFrameLoaderView;
|
|
|
3285
3194
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3286
3195
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3287
3196
|
var IframeClient = ({ src }) => {
|
|
3288
|
-
const iframeRef = (0,
|
|
3289
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
3290
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
3291
|
-
(0,
|
|
3197
|
+
const iframeRef = (0, import_react46.useRef)(null);
|
|
3198
|
+
const [iframeHeight, setIframeHeight] = (0, import_react46.useState)("100%");
|
|
3199
|
+
const [isDataFound, setIsDataFound] = (0, import_react46.useState)(null);
|
|
3200
|
+
(0, import_react46.useEffect)(() => {
|
|
3292
3201
|
const handleReceiveMessage = (event) => {
|
|
3293
3202
|
const eventName = event?.data?.eventName;
|
|
3294
3203
|
const payload = event?.data?.payload;
|
|
@@ -3303,7 +3212,7 @@ var IframeClient = ({ src }) => {
|
|
|
3303
3212
|
window.addEventListener("message", handleReceiveMessage);
|
|
3304
3213
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3305
3214
|
}, []);
|
|
3306
|
-
(0,
|
|
3215
|
+
(0, import_react46.useEffect)(() => {
|
|
3307
3216
|
const handleResize = () => {
|
|
3308
3217
|
if (iframeRef.current) {
|
|
3309
3218
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3315,7 +3224,7 @@ var IframeClient = ({ src }) => {
|
|
|
3315
3224
|
const handleIframeLoad = () => {
|
|
3316
3225
|
setIsDataFound(true);
|
|
3317
3226
|
};
|
|
3318
|
-
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react46.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3319
3228
|
"iframe",
|
|
3320
3229
|
{
|
|
3321
3230
|
ref: iframeRef,
|
|
@@ -3344,7 +3253,7 @@ var EmbedNode = (props) => {
|
|
|
3344
3253
|
var EmbedNode_default = EmbedNode;
|
|
3345
3254
|
|
|
3346
3255
|
// src/components/pageRenderingEngine/nodes/VideoNode.tsx
|
|
3347
|
-
var
|
|
3256
|
+
var import_react47 = __toESM(require("react"));
|
|
3348
3257
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3349
3258
|
var VideoNode = (props) => {
|
|
3350
3259
|
let src;
|
|
@@ -3353,7 +3262,7 @@ var VideoNode = (props) => {
|
|
|
3353
3262
|
} else if (props.node.provider == "bunny") {
|
|
3354
3263
|
src = `https://iframe.mediadelivery.net/embed/${props.node.videoId}?autoplay=false&loop=false&muted=false&preload=true&responsive=true`;
|
|
3355
3264
|
}
|
|
3356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react47.default.Fragment, { children: src && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("iframe", { className: "w-full aspect-video rounded", src, loading: "lazy", allow: "accelerometer;gyroscope;autoplay;encrypted-media;picture-in-picture;", allowFullScreen: true }) });
|
|
3357
3266
|
};
|
|
3358
3267
|
var VideoNode_default = VideoNode;
|
|
3359
3268
|
|
|
@@ -3419,11 +3328,11 @@ var LayoutItemNode = (props) => {
|
|
|
3419
3328
|
} else {
|
|
3420
3329
|
updatedLayout = removeParagraphsAtStartAndEnd(props.node);
|
|
3421
3330
|
}
|
|
3422
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react48.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "layout-item " + cssClasses, style: { ...styles }, children: updatedLayout.children.map((node, index) => {
|
|
3423
3332
|
{
|
|
3424
3333
|
}
|
|
3425
3334
|
const SelectedNode = NodeTypes2[node.type];
|
|
3426
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react48.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3427
3336
|
SelectedNode,
|
|
3428
3337
|
{
|
|
3429
3338
|
node,
|
|
@@ -3567,7 +3476,7 @@ var LayoutContainerNode = (props) => {
|
|
|
3567
3476
|
var LayoutContainerNode_default = LayoutContainerNode;
|
|
3568
3477
|
|
|
3569
3478
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3570
|
-
var
|
|
3479
|
+
var import_react49 = __toESM(require("react"));
|
|
3571
3480
|
|
|
3572
3481
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3573
3482
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
@@ -3607,13 +3516,13 @@ var FormContainerNode = (props) => {
|
|
|
3607
3516
|
["input-control"]: InputControlNode_default
|
|
3608
3517
|
};
|
|
3609
3518
|
const { node } = props;
|
|
3610
|
-
const formRef = (0,
|
|
3519
|
+
const formRef = (0, import_react49.useRef)(null);
|
|
3611
3520
|
const initialState = {
|
|
3612
3521
|
inputValues: {},
|
|
3613
3522
|
lastPropertyChanged: ""
|
|
3614
3523
|
};
|
|
3615
|
-
const [formState, dispatch] = (0,
|
|
3616
|
-
const handleInputChange = (0,
|
|
3524
|
+
const [formState, dispatch] = (0, import_react49.useReducer)(FormReducer_default, initialState);
|
|
3525
|
+
const handleInputChange = (0, import_react49.useCallback)((updatedValues) => {
|
|
3617
3526
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
3618
3527
|
}, [dispatch]);
|
|
3619
3528
|
const onValidate = async () => {
|
|
@@ -3624,7 +3533,7 @@ var FormContainerNode = (props) => {
|
|
|
3624
3533
|
return true;
|
|
3625
3534
|
}
|
|
3626
3535
|
};
|
|
3627
|
-
(0,
|
|
3536
|
+
(0, import_react49.useEffect)(() => {
|
|
3628
3537
|
const fetchInitialData = async () => {
|
|
3629
3538
|
if (!props.fetchData || !node.dataFetchApi) return;
|
|
3630
3539
|
const response = await props.fetchData(
|
|
@@ -3646,7 +3555,7 @@ var FormContainerNode = (props) => {
|
|
|
3646
3555
|
{
|
|
3647
3556
|
}
|
|
3648
3557
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3649
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react49.default.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3650
3559
|
InputControlNode_default,
|
|
3651
3560
|
{
|
|
3652
3561
|
value: formState.inputValues[node2.name],
|
|
@@ -3661,7 +3570,7 @@ var FormContainerNode = (props) => {
|
|
|
3661
3570
|
var FormContainerNode_default = FormContainerNode;
|
|
3662
3571
|
|
|
3663
3572
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3664
|
-
var
|
|
3573
|
+
var import_react53 = __toESM(require("react"));
|
|
3665
3574
|
|
|
3666
3575
|
// src/components/utilities/AnimationUtility.tsx
|
|
3667
3576
|
var AnimationUtility = class {
|
|
@@ -3772,11 +3681,11 @@ var AnimationUtility = class {
|
|
|
3772
3681
|
var AnimationUtility_default = AnimationUtility;
|
|
3773
3682
|
|
|
3774
3683
|
// src/components/Pagination.tsx
|
|
3775
|
-
var
|
|
3684
|
+
var import_react50 = require("react");
|
|
3776
3685
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3777
3686
|
var Pagination = (props) => {
|
|
3778
3687
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3779
|
-
const builder = (0,
|
|
3688
|
+
const builder = (0, import_react50.useMemo)(() => {
|
|
3780
3689
|
const b = new OdataBuilder(path);
|
|
3781
3690
|
if (query) b.setQuery(query);
|
|
3782
3691
|
return b;
|
|
@@ -3991,11 +3900,11 @@ var PathUtility = class {
|
|
|
3991
3900
|
var PathUtility_default = new PathUtility();
|
|
3992
3901
|
|
|
3993
3902
|
// src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
|
|
3994
|
-
var
|
|
3903
|
+
var import_react51 = __toESM(require("react"));
|
|
3995
3904
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3996
3905
|
function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
3997
|
-
const ref = (0,
|
|
3998
|
-
(0,
|
|
3906
|
+
const ref = (0, import_react51.useRef)(null);
|
|
3907
|
+
(0, import_react51.useEffect)(() => {
|
|
3999
3908
|
if (!hasEnterAnimation || !ref.current) return;
|
|
4000
3909
|
const observer = new IntersectionObserver(
|
|
4001
3910
|
(entries) => {
|
|
@@ -4013,11 +3922,11 @@ function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
|
4013
3922
|
}, [hasEnterAnimation]);
|
|
4014
3923
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: children && // enforce passing the ref to Wrapper
|
|
4015
3924
|
//@ts-ignore
|
|
4016
|
-
|
|
3925
|
+
import_react51.default.cloneElement(children, { ref }) });
|
|
4017
3926
|
}
|
|
4018
3927
|
|
|
4019
3928
|
// src/components/Slider.tsx
|
|
4020
|
-
var
|
|
3929
|
+
var import_react52 = __toESM(require("react"));
|
|
4021
3930
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4022
3931
|
var Slider = ({
|
|
4023
3932
|
children,
|
|
@@ -4036,13 +3945,13 @@ var Slider = ({
|
|
|
4036
3945
|
pillStyle = "cumulative",
|
|
4037
3946
|
progressPosition = "bottom"
|
|
4038
3947
|
}) => {
|
|
4039
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
4040
|
-
const [transition, setTransition] = (0,
|
|
4041
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
3948
|
+
const [currentSlide, setCurrentSlide] = (0, import_react52.useState)(0);
|
|
3949
|
+
const [transition, setTransition] = (0, import_react52.useState)(true);
|
|
3950
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react52.useState)(
|
|
4042
3951
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
4043
3952
|
);
|
|
4044
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
4045
|
-
(0,
|
|
3953
|
+
const [isPlaying, setIsPlaying] = (0, import_react52.useState)(autoplay);
|
|
3954
|
+
(0, import_react52.useEffect)(() => {
|
|
4046
3955
|
if (typeof slidesToShow === "number") return;
|
|
4047
3956
|
const handleResize = () => {
|
|
4048
3957
|
if (window.innerWidth >= 1024) {
|
|
@@ -4057,7 +3966,7 @@ var Slider = ({
|
|
|
4057
3966
|
window.addEventListener("resize", handleResize);
|
|
4058
3967
|
return () => window.removeEventListener("resize", handleResize);
|
|
4059
3968
|
}, [slidesToShow]);
|
|
4060
|
-
(0,
|
|
3969
|
+
(0, import_react52.useEffect)(() => {
|
|
4061
3970
|
if (!autoplay) return;
|
|
4062
3971
|
const timer = setInterval(() => {
|
|
4063
3972
|
if (isPlaying) {
|
|
@@ -4066,7 +3975,7 @@ var Slider = ({
|
|
|
4066
3975
|
}, autoplay_speed);
|
|
4067
3976
|
return () => clearInterval(timer);
|
|
4068
3977
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
4069
|
-
const totalSlides =
|
|
3978
|
+
const totalSlides = import_react52.Children.count(children);
|
|
4070
3979
|
const maxSlide = totalSlides - slidesToShowState;
|
|
4071
3980
|
const nextSlide = () => {
|
|
4072
3981
|
if (currentSlide >= maxSlide) {
|
|
@@ -4111,8 +4020,8 @@ var Slider = ({
|
|
|
4111
4020
|
}
|
|
4112
4021
|
};
|
|
4113
4022
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
4114
|
-
const slides =
|
|
4115
|
-
if (!
|
|
4023
|
+
const slides = import_react52.Children.map(children, (child, index) => {
|
|
4024
|
+
if (!import_react52.default.isValidElement(child)) return null;
|
|
4116
4025
|
const childProps = child.props;
|
|
4117
4026
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4118
4027
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
@@ -4120,7 +4029,7 @@ var Slider = ({
|
|
|
4120
4029
|
{
|
|
4121
4030
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
4122
4031
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
4123
|
-
children: (0,
|
|
4032
|
+
children: (0, import_react52.cloneElement)(child, {
|
|
4124
4033
|
className: mergedClassName
|
|
4125
4034
|
})
|
|
4126
4035
|
},
|
|
@@ -4233,13 +4142,13 @@ var ProgressPill = ({
|
|
|
4233
4142
|
currentSlide,
|
|
4234
4143
|
totalSlides
|
|
4235
4144
|
}) => {
|
|
4236
|
-
const [progress, setProgress] = (0,
|
|
4237
|
-
(0,
|
|
4145
|
+
const [progress, setProgress] = (0, import_react52.useState)(0);
|
|
4146
|
+
(0, import_react52.useEffect)(() => {
|
|
4238
4147
|
if (active) {
|
|
4239
4148
|
setProgress(0);
|
|
4240
4149
|
}
|
|
4241
4150
|
}, [active, index]);
|
|
4242
|
-
(0,
|
|
4151
|
+
(0, import_react52.useEffect)(() => {
|
|
4243
4152
|
if (!active || !isPlaying) {
|
|
4244
4153
|
if (!active) {
|
|
4245
4154
|
setProgress(0);
|
|
@@ -4515,31 +4424,11 @@ var DivContainer = async (props) => {
|
|
|
4515
4424
|
return fieldValue !== void 0 && fieldValue === false;
|
|
4516
4425
|
};
|
|
4517
4426
|
const isHidden = shouldHideContainer();
|
|
4518
|
-
|
|
4519
|
-
let
|
|
4520
|
-
let
|
|
4521
|
-
let response = null;
|
|
4427
|
+
const nodeData = props.dataMap?.[props.node.__id];
|
|
4428
|
+
let result = nodeData?.result;
|
|
4429
|
+
let response = nodeData?.response;
|
|
4522
4430
|
let childCollectionData = null;
|
|
4523
4431
|
if (dataBindingProperties) {
|
|
4524
|
-
endpoint = dataBindingProperties.dataSource;
|
|
4525
|
-
endpoint = endpoint.replace(/\{(\w+)\}/g, (_, key) => {
|
|
4526
|
-
return props.routeParameters?.[key] ?? `{${key}}`;
|
|
4527
|
-
});
|
|
4528
|
-
if (dataBindingProperties.applyODataParams) {
|
|
4529
|
-
odataString = OdataBuilder.getOdataQueryString(props.query);
|
|
4530
|
-
if (odataString) {
|
|
4531
|
-
const separator = endpoint.includes("?") ? "&" : "?";
|
|
4532
|
-
endpoint += separator + odataString;
|
|
4533
|
-
}
|
|
4534
|
-
}
|
|
4535
|
-
if (props.fetchData) {
|
|
4536
|
-
response = await props.fetchData(endpoint);
|
|
4537
|
-
result = response?.result;
|
|
4538
|
-
} else {
|
|
4539
|
-
console.warn(
|
|
4540
|
-
"DivContainer data binding needs `fetchData` prop but none was provided."
|
|
4541
|
-
);
|
|
4542
|
-
}
|
|
4543
4432
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || Array.isArray(result) && result.length == 0)) {
|
|
4544
4433
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(NoDataFound_default, {});
|
|
4545
4434
|
}
|
|
@@ -4551,7 +4440,7 @@ var DivContainer = async (props) => {
|
|
|
4551
4440
|
function renderNode(node, props2, dataitem, key, href) {
|
|
4552
4441
|
const SelectedNode = NodeTypes2[node.type];
|
|
4553
4442
|
if (!SelectedNode) return null;
|
|
4554
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4555
4444
|
SelectedNode,
|
|
4556
4445
|
{
|
|
4557
4446
|
node,
|
|
@@ -4562,11 +4451,11 @@ var DivContainer = async (props) => {
|
|
|
4562
4451
|
host: props2.host,
|
|
4563
4452
|
path: props2.path,
|
|
4564
4453
|
apiBaseUrl: props2.apiBaseUrl,
|
|
4565
|
-
serviceClient: props2.serviceClient,
|
|
4566
4454
|
resolveAssetUrl: props2.resolveAssetUrl,
|
|
4567
4455
|
breadcrumb: props2.breadcrumb,
|
|
4568
4456
|
dataitem,
|
|
4569
|
-
href
|
|
4457
|
+
href,
|
|
4458
|
+
dataMap: props2.dataMap
|
|
4570
4459
|
}
|
|
4571
4460
|
) }, key);
|
|
4572
4461
|
}
|
|
@@ -4648,9 +4537,9 @@ var DivContainer = async (props) => {
|
|
|
4648
4537
|
props.node.autoFormat && "auto-format",
|
|
4649
4538
|
props.node.bgClass
|
|
4650
4539
|
].filter(Boolean).join(" ");
|
|
4651
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
4540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react53.default.Fragment, { children: [
|
|
4652
4541
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4653
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EnterAnimationClient, { hasEnterAnimation: !!props.node.enterAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4542
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(EnterAnimationClient, { hasEnterAnimation: !!props.node.enterAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4654
4543
|
Wrapper,
|
|
4655
4544
|
{
|
|
4656
4545
|
id: guid,
|
|
@@ -4659,7 +4548,7 @@ var DivContainer = async (props) => {
|
|
|
4659
4548
|
...wrapperProps,
|
|
4660
4549
|
children: dataToRender.map(
|
|
4661
4550
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4662
|
-
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4551
|
+
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react53.default.Fragment, { children: child }, i)
|
|
4663
4552
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4664
4553
|
)
|
|
4665
4554
|
}
|
|
@@ -4698,11 +4587,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4698
4587
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4699
4588
|
rootNode = pageBodyTree.root;
|
|
4700
4589
|
}
|
|
4701
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react54.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4702
4591
|
{
|
|
4703
4592
|
}
|
|
4704
4593
|
const SelectedNode = NodeTypes[node.type];
|
|
4705
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react54.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react54.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4706
4595
|
SelectedNode,
|
|
4707
4596
|
{
|
|
4708
4597
|
node,
|
|
@@ -4716,9 +4605,9 @@ var PageBodyRenderer = (props) => {
|
|
|
4716
4605
|
widgetRegistry: props.widgetRegistry,
|
|
4717
4606
|
serviceClient: props.serviceClient,
|
|
4718
4607
|
resolveAssetUrl: props.resolveAssetUrl,
|
|
4719
|
-
|
|
4608
|
+
dataMap: props.dataMap
|
|
4720
4609
|
}
|
|
4721
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4610
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4722
4611
|
SelectedNode,
|
|
4723
4612
|
{
|
|
4724
4613
|
node,
|
|
@@ -4731,7 +4620,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4731
4620
|
widgetRegistry: props.widgetRegistry,
|
|
4732
4621
|
serviceClient: props.serviceClient,
|
|
4733
4622
|
resolveAssetUrl: props.resolveAssetUrl,
|
|
4734
|
-
|
|
4623
|
+
dataMap: props.dataMap
|
|
4735
4624
|
}
|
|
4736
4625
|
) }) }) }, index);
|
|
4737
4626
|
}) });
|