@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260323092346 → 0.8.1-dev.20260323121228
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 +164 -281
- package/dist/index.mjs +196 -313
- 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
|
] });
|
|
@@ -2871,13 +2780,7 @@ var DatafieldNode = (props) => {
|
|
|
2871
2780
|
{
|
|
2872
2781
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
2873
2782
|
style: styles,
|
|
2874
|
-
children:
|
|
2875
|
-
ViewControl_default,
|
|
2876
|
-
{
|
|
2877
|
-
controlType: dataType,
|
|
2878
|
-
value: value ?? `@databound[${fieldName}]`
|
|
2879
|
-
}
|
|
2880
|
-
)
|
|
2783
|
+
children: String(value)
|
|
2881
2784
|
}
|
|
2882
2785
|
);
|
|
2883
2786
|
};
|
|
@@ -2906,7 +2809,7 @@ var ParagraphNode = (props) => {
|
|
|
2906
2809
|
if (isInlineOnlyParent) {
|
|
2907
2810
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2908
2811
|
const SelectedNode = NodeTypes2[node.type];
|
|
2909
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react36.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2910
2813
|
SelectedNode,
|
|
2911
2814
|
{
|
|
2912
2815
|
node,
|
|
@@ -2921,7 +2824,7 @@ var ParagraphNode = (props) => {
|
|
|
2921
2824
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: " " + formatClasses, children: [
|
|
2922
2825
|
hasChildren && props.node.children.map((node, index) => {
|
|
2923
2826
|
const SelectedNode = NodeTypes2[node.type];
|
|
2924
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react36.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2925
2828
|
SelectedNode,
|
|
2926
2829
|
{
|
|
2927
2830
|
node,
|
|
@@ -2938,7 +2841,7 @@ var ParagraphNode = (props) => {
|
|
|
2938
2841
|
var ParagraphNode_default = ParagraphNode;
|
|
2939
2842
|
|
|
2940
2843
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2941
|
-
var
|
|
2844
|
+
var import_react37 = __toESM(require("react"));
|
|
2942
2845
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2943
2846
|
var HeadingNode = (props) => {
|
|
2944
2847
|
const NodeTypes2 = {
|
|
@@ -2955,22 +2858,22 @@ var HeadingNode = (props) => {
|
|
|
2955
2858
|
{
|
|
2956
2859
|
}
|
|
2957
2860
|
let formatClasses = FormatClass[props.node.format] || "";
|
|
2958
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children:
|
|
2861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, { children: import_react37.default.createElement(
|
|
2959
2862
|
HeadingTag,
|
|
2960
2863
|
{ className: formatClasses },
|
|
2961
2864
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2962
2865
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2963
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2866
|
+
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
2867
|
})
|
|
2965
2868
|
) });
|
|
2966
2869
|
};
|
|
2967
2870
|
var HeadingNode_default = HeadingNode;
|
|
2968
2871
|
|
|
2969
2872
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2970
|
-
var
|
|
2873
|
+
var import_react39 = __toESM(require("react"));
|
|
2971
2874
|
|
|
2972
2875
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2973
|
-
var
|
|
2876
|
+
var import_react38 = __toESM(require("react"));
|
|
2974
2877
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2975
2878
|
var ListItemNode = (props) => {
|
|
2976
2879
|
const NodeTypes2 = {
|
|
@@ -2999,7 +2902,7 @@ var ListItemNode = (props) => {
|
|
|
2999
2902
|
}
|
|
3000
2903
|
} else {
|
|
3001
2904
|
foundFirstBreak = false;
|
|
3002
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2905
|
+
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
2906
|
}
|
|
3004
2907
|
}) });
|
|
3005
2908
|
};
|
|
@@ -3011,21 +2914,21 @@ var ListNode = (props) => {
|
|
|
3011
2914
|
const NodeTypes2 = {
|
|
3012
2915
|
listitem: ListItemNode_default
|
|
3013
2916
|
};
|
|
3014
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react39.default.Fragment, { children: [
|
|
3015
2918
|
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3016
2919
|
const SelectedNode = NodeTypes2[node.type];
|
|
3017
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2920
|
+
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
2921
|
}) }),
|
|
3019
2922
|
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3020
2923
|
const SelectedNode = NodeTypes2[node.type];
|
|
3021
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2924
|
+
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
2925
|
}) })
|
|
3023
2926
|
] });
|
|
3024
2927
|
};
|
|
3025
2928
|
var ListNode_default = ListNode;
|
|
3026
2929
|
|
|
3027
2930
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
3028
|
-
var
|
|
2931
|
+
var import_react40 = __toESM(require("react"));
|
|
3029
2932
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3030
2933
|
var QuoteNode = (props) => {
|
|
3031
2934
|
const NodeTypes2 = {
|
|
@@ -3035,21 +2938,21 @@ var QuoteNode = (props) => {
|
|
|
3035
2938
|
};
|
|
3036
2939
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3037
2940
|
const SelectedNode = NodeTypes2[node.type];
|
|
3038
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2941
|
+
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
2942
|
}) });
|
|
3040
2943
|
};
|
|
3041
2944
|
var QuoteNode_default = QuoteNode;
|
|
3042
2945
|
|
|
3043
2946
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3044
|
-
var
|
|
2947
|
+
var import_react42 = __toESM(require("react"));
|
|
3045
2948
|
|
|
3046
2949
|
// src/components/CopyButton.tsx
|
|
3047
|
-
var
|
|
2950
|
+
var import_react41 = require("react");
|
|
3048
2951
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3049
2952
|
function CopyButton({ text }) {
|
|
3050
|
-
const [copied, setCopied] = (0,
|
|
3051
|
-
const timeoutRef = (0,
|
|
3052
|
-
(0,
|
|
2953
|
+
const [copied, setCopied] = (0, import_react41.useState)(false);
|
|
2954
|
+
const timeoutRef = (0, import_react41.useRef)(null);
|
|
2955
|
+
(0, import_react41.useEffect)(() => {
|
|
3053
2956
|
return () => {
|
|
3054
2957
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3055
2958
|
};
|
|
@@ -3115,7 +3018,7 @@ var CodeNode = (props) => {
|
|
|
3115
3018
|
] }),
|
|
3116
3019
|
/* @__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
3020
|
const SelectedNode = NodeTypes2[node.type];
|
|
3118
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3021
|
+
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
3022
|
}) })
|
|
3120
3023
|
] });
|
|
3121
3024
|
};
|
|
@@ -3129,15 +3032,15 @@ var HorizontalRuleNode = (props) => {
|
|
|
3129
3032
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3130
3033
|
|
|
3131
3034
|
// src/components/pageRenderingEngine/nodes/LayoutItemNode.tsx
|
|
3132
|
-
var
|
|
3035
|
+
var import_react48 = __toESM(require("react"));
|
|
3133
3036
|
|
|
3134
3037
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3135
|
-
var
|
|
3038
|
+
var import_react43 = __toESM(require("react"));
|
|
3136
3039
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3137
3040
|
var ImageNode = (props) => {
|
|
3138
3041
|
const { node, apiBaseUrl = "" } = props;
|
|
3139
3042
|
let imageUrl = node.imageUrl.startsWith("http") ? node.imageUrl : `${apiBaseUrl}/digitalassets/storefront/${node.imageUrl}`;
|
|
3140
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3043
|
+
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
3044
|
"img",
|
|
3142
3045
|
{
|
|
3143
3046
|
loading: "lazy",
|
|
@@ -3162,7 +3065,7 @@ var ImageNode = (props) => {
|
|
|
3162
3065
|
var ImageNode_default = ImageNode;
|
|
3163
3066
|
|
|
3164
3067
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3165
|
-
var
|
|
3068
|
+
var import_react44 = require("react");
|
|
3166
3069
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3167
3070
|
var WidgetNode = (props) => {
|
|
3168
3071
|
const getWidgetParameters = () => {
|
|
@@ -3223,7 +3126,7 @@ var WidgetNode = (props) => {
|
|
|
3223
3126
|
props.node.widgetCode
|
|
3224
3127
|
] });
|
|
3225
3128
|
}
|
|
3226
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3129
|
+
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
3130
|
SelectedWidget,
|
|
3228
3131
|
{
|
|
3229
3132
|
params: getWidgetParameters(),
|
|
@@ -3238,13 +3141,13 @@ var WidgetNode = (props) => {
|
|
|
3238
3141
|
var WidgetNode_default = WidgetNode;
|
|
3239
3142
|
|
|
3240
3143
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3241
|
-
var
|
|
3144
|
+
var import_react46 = __toESM(require("react"));
|
|
3242
3145
|
|
|
3243
3146
|
// src/components/IFrameLoaderView.tsx
|
|
3244
|
-
var
|
|
3147
|
+
var import_react45 = __toESM(require("react"));
|
|
3245
3148
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3246
3149
|
var IFrameLoaderView = (props) => {
|
|
3247
|
-
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
3150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react45.default.Fragment, { children: [
|
|
3248
3151
|
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
3152
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3250
3153
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
@@ -3285,10 +3188,10 @@ var IFrameLoaderView_default = IFrameLoaderView;
|
|
|
3285
3188
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3286
3189
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3287
3190
|
var IframeClient = ({ src }) => {
|
|
3288
|
-
const iframeRef = (0,
|
|
3289
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
3290
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
3291
|
-
(0,
|
|
3191
|
+
const iframeRef = (0, import_react46.useRef)(null);
|
|
3192
|
+
const [iframeHeight, setIframeHeight] = (0, import_react46.useState)("100%");
|
|
3193
|
+
const [isDataFound, setIsDataFound] = (0, import_react46.useState)(null);
|
|
3194
|
+
(0, import_react46.useEffect)(() => {
|
|
3292
3195
|
const handleReceiveMessage = (event) => {
|
|
3293
3196
|
const eventName = event?.data?.eventName;
|
|
3294
3197
|
const payload = event?.data?.payload;
|
|
@@ -3303,7 +3206,7 @@ var IframeClient = ({ src }) => {
|
|
|
3303
3206
|
window.addEventListener("message", handleReceiveMessage);
|
|
3304
3207
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3305
3208
|
}, []);
|
|
3306
|
-
(0,
|
|
3209
|
+
(0, import_react46.useEffect)(() => {
|
|
3307
3210
|
const handleResize = () => {
|
|
3308
3211
|
if (iframeRef.current) {
|
|
3309
3212
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3315,7 +3218,7 @@ var IframeClient = ({ src }) => {
|
|
|
3315
3218
|
const handleIframeLoad = () => {
|
|
3316
3219
|
setIsDataFound(true);
|
|
3317
3220
|
};
|
|
3318
|
-
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3221
|
+
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
3222
|
"iframe",
|
|
3320
3223
|
{
|
|
3321
3224
|
ref: iframeRef,
|
|
@@ -3344,7 +3247,7 @@ var EmbedNode = (props) => {
|
|
|
3344
3247
|
var EmbedNode_default = EmbedNode;
|
|
3345
3248
|
|
|
3346
3249
|
// src/components/pageRenderingEngine/nodes/VideoNode.tsx
|
|
3347
|
-
var
|
|
3250
|
+
var import_react47 = __toESM(require("react"));
|
|
3348
3251
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3349
3252
|
var VideoNode = (props) => {
|
|
3350
3253
|
let src;
|
|
@@ -3353,7 +3256,7 @@ var VideoNode = (props) => {
|
|
|
3353
3256
|
} else if (props.node.provider == "bunny") {
|
|
3354
3257
|
src = `https://iframe.mediadelivery.net/embed/${props.node.videoId}?autoplay=false&loop=false&muted=false&preload=true&responsive=true`;
|
|
3355
3258
|
}
|
|
3356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3259
|
+
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
3260
|
};
|
|
3358
3261
|
var VideoNode_default = VideoNode;
|
|
3359
3262
|
|
|
@@ -3419,11 +3322,11 @@ var LayoutItemNode = (props) => {
|
|
|
3419
3322
|
} else {
|
|
3420
3323
|
updatedLayout = removeParagraphsAtStartAndEnd(props.node);
|
|
3421
3324
|
}
|
|
3422
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3325
|
+
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
3326
|
{
|
|
3424
3327
|
}
|
|
3425
3328
|
const SelectedNode = NodeTypes2[node.type];
|
|
3426
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react48.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3427
3330
|
SelectedNode,
|
|
3428
3331
|
{
|
|
3429
3332
|
node,
|
|
@@ -3567,7 +3470,7 @@ var LayoutContainerNode = (props) => {
|
|
|
3567
3470
|
var LayoutContainerNode_default = LayoutContainerNode;
|
|
3568
3471
|
|
|
3569
3472
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3570
|
-
var
|
|
3473
|
+
var import_react49 = __toESM(require("react"));
|
|
3571
3474
|
|
|
3572
3475
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3573
3476
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
@@ -3607,13 +3510,13 @@ var FormContainerNode = (props) => {
|
|
|
3607
3510
|
["input-control"]: InputControlNode_default
|
|
3608
3511
|
};
|
|
3609
3512
|
const { node } = props;
|
|
3610
|
-
const formRef = (0,
|
|
3513
|
+
const formRef = (0, import_react49.useRef)(null);
|
|
3611
3514
|
const initialState = {
|
|
3612
3515
|
inputValues: {},
|
|
3613
3516
|
lastPropertyChanged: ""
|
|
3614
3517
|
};
|
|
3615
|
-
const [formState, dispatch] = (0,
|
|
3616
|
-
const handleInputChange = (0,
|
|
3518
|
+
const [formState, dispatch] = (0, import_react49.useReducer)(FormReducer_default, initialState);
|
|
3519
|
+
const handleInputChange = (0, import_react49.useCallback)((updatedValues) => {
|
|
3617
3520
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
3618
3521
|
}, [dispatch]);
|
|
3619
3522
|
const onValidate = async () => {
|
|
@@ -3624,7 +3527,7 @@ var FormContainerNode = (props) => {
|
|
|
3624
3527
|
return true;
|
|
3625
3528
|
}
|
|
3626
3529
|
};
|
|
3627
|
-
(0,
|
|
3530
|
+
(0, import_react49.useEffect)(() => {
|
|
3628
3531
|
const fetchInitialData = async () => {
|
|
3629
3532
|
if (!props.fetchData || !node.dataFetchApi) return;
|
|
3630
3533
|
const response = await props.fetchData(
|
|
@@ -3646,7 +3549,7 @@ var FormContainerNode = (props) => {
|
|
|
3646
3549
|
{
|
|
3647
3550
|
}
|
|
3648
3551
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3649
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react49.default.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3650
3553
|
InputControlNode_default,
|
|
3651
3554
|
{
|
|
3652
3555
|
value: formState.inputValues[node2.name],
|
|
@@ -3661,7 +3564,7 @@ var FormContainerNode = (props) => {
|
|
|
3661
3564
|
var FormContainerNode_default = FormContainerNode;
|
|
3662
3565
|
|
|
3663
3566
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3664
|
-
var
|
|
3567
|
+
var import_react53 = __toESM(require("react"));
|
|
3665
3568
|
|
|
3666
3569
|
// src/components/utilities/AnimationUtility.tsx
|
|
3667
3570
|
var AnimationUtility = class {
|
|
@@ -3772,11 +3675,11 @@ var AnimationUtility = class {
|
|
|
3772
3675
|
var AnimationUtility_default = AnimationUtility;
|
|
3773
3676
|
|
|
3774
3677
|
// src/components/Pagination.tsx
|
|
3775
|
-
var
|
|
3678
|
+
var import_react50 = require("react");
|
|
3776
3679
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3777
3680
|
var Pagination = (props) => {
|
|
3778
3681
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3779
|
-
const builder = (0,
|
|
3682
|
+
const builder = (0, import_react50.useMemo)(() => {
|
|
3780
3683
|
const b = new OdataBuilder(path);
|
|
3781
3684
|
if (query) b.setQuery(query);
|
|
3782
3685
|
return b;
|
|
@@ -3991,11 +3894,11 @@ var PathUtility = class {
|
|
|
3991
3894
|
var PathUtility_default = new PathUtility();
|
|
3992
3895
|
|
|
3993
3896
|
// src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
|
|
3994
|
-
var
|
|
3897
|
+
var import_react51 = __toESM(require("react"));
|
|
3995
3898
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3996
3899
|
function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
3997
|
-
const ref = (0,
|
|
3998
|
-
(0,
|
|
3900
|
+
const ref = (0, import_react51.useRef)(null);
|
|
3901
|
+
(0, import_react51.useEffect)(() => {
|
|
3999
3902
|
if (!hasEnterAnimation || !ref.current) return;
|
|
4000
3903
|
const observer = new IntersectionObserver(
|
|
4001
3904
|
(entries) => {
|
|
@@ -4013,11 +3916,11 @@ function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
|
4013
3916
|
}, [hasEnterAnimation]);
|
|
4014
3917
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: children && // enforce passing the ref to Wrapper
|
|
4015
3918
|
//@ts-ignore
|
|
4016
|
-
|
|
3919
|
+
import_react51.default.cloneElement(children, { ref }) });
|
|
4017
3920
|
}
|
|
4018
3921
|
|
|
4019
3922
|
// src/components/Slider.tsx
|
|
4020
|
-
var
|
|
3923
|
+
var import_react52 = __toESM(require("react"));
|
|
4021
3924
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4022
3925
|
var Slider = ({
|
|
4023
3926
|
children,
|
|
@@ -4036,13 +3939,13 @@ var Slider = ({
|
|
|
4036
3939
|
pillStyle = "cumulative",
|
|
4037
3940
|
progressPosition = "bottom"
|
|
4038
3941
|
}) => {
|
|
4039
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
4040
|
-
const [transition, setTransition] = (0,
|
|
4041
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
3942
|
+
const [currentSlide, setCurrentSlide] = (0, import_react52.useState)(0);
|
|
3943
|
+
const [transition, setTransition] = (0, import_react52.useState)(true);
|
|
3944
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react52.useState)(
|
|
4042
3945
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
4043
3946
|
);
|
|
4044
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
4045
|
-
(0,
|
|
3947
|
+
const [isPlaying, setIsPlaying] = (0, import_react52.useState)(autoplay);
|
|
3948
|
+
(0, import_react52.useEffect)(() => {
|
|
4046
3949
|
if (typeof slidesToShow === "number") return;
|
|
4047
3950
|
const handleResize = () => {
|
|
4048
3951
|
if (window.innerWidth >= 1024) {
|
|
@@ -4057,7 +3960,7 @@ var Slider = ({
|
|
|
4057
3960
|
window.addEventListener("resize", handleResize);
|
|
4058
3961
|
return () => window.removeEventListener("resize", handleResize);
|
|
4059
3962
|
}, [slidesToShow]);
|
|
4060
|
-
(0,
|
|
3963
|
+
(0, import_react52.useEffect)(() => {
|
|
4061
3964
|
if (!autoplay) return;
|
|
4062
3965
|
const timer = setInterval(() => {
|
|
4063
3966
|
if (isPlaying) {
|
|
@@ -4066,7 +3969,7 @@ var Slider = ({
|
|
|
4066
3969
|
}, autoplay_speed);
|
|
4067
3970
|
return () => clearInterval(timer);
|
|
4068
3971
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
4069
|
-
const totalSlides =
|
|
3972
|
+
const totalSlides = import_react52.Children.count(children);
|
|
4070
3973
|
const maxSlide = totalSlides - slidesToShowState;
|
|
4071
3974
|
const nextSlide = () => {
|
|
4072
3975
|
if (currentSlide >= maxSlide) {
|
|
@@ -4111,8 +4014,8 @@ var Slider = ({
|
|
|
4111
4014
|
}
|
|
4112
4015
|
};
|
|
4113
4016
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
4114
|
-
const slides =
|
|
4115
|
-
if (!
|
|
4017
|
+
const slides = import_react52.Children.map(children, (child, index) => {
|
|
4018
|
+
if (!import_react52.default.isValidElement(child)) return null;
|
|
4116
4019
|
const childProps = child.props;
|
|
4117
4020
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4118
4021
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
@@ -4120,7 +4023,7 @@ var Slider = ({
|
|
|
4120
4023
|
{
|
|
4121
4024
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
4122
4025
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
4123
|
-
children: (0,
|
|
4026
|
+
children: (0, import_react52.cloneElement)(child, {
|
|
4124
4027
|
className: mergedClassName
|
|
4125
4028
|
})
|
|
4126
4029
|
},
|
|
@@ -4233,13 +4136,13 @@ var ProgressPill = ({
|
|
|
4233
4136
|
currentSlide,
|
|
4234
4137
|
totalSlides
|
|
4235
4138
|
}) => {
|
|
4236
|
-
const [progress, setProgress] = (0,
|
|
4237
|
-
(0,
|
|
4139
|
+
const [progress, setProgress] = (0, import_react52.useState)(0);
|
|
4140
|
+
(0, import_react52.useEffect)(() => {
|
|
4238
4141
|
if (active) {
|
|
4239
4142
|
setProgress(0);
|
|
4240
4143
|
}
|
|
4241
4144
|
}, [active, index]);
|
|
4242
|
-
(0,
|
|
4145
|
+
(0, import_react52.useEffect)(() => {
|
|
4243
4146
|
if (!active || !isPlaying) {
|
|
4244
4147
|
if (!active) {
|
|
4245
4148
|
setProgress(0);
|
|
@@ -4515,31 +4418,11 @@ var DivContainer = async (props) => {
|
|
|
4515
4418
|
return fieldValue !== void 0 && fieldValue === false;
|
|
4516
4419
|
};
|
|
4517
4420
|
const isHidden = shouldHideContainer();
|
|
4518
|
-
|
|
4519
|
-
let
|
|
4520
|
-
let
|
|
4521
|
-
let response = null;
|
|
4421
|
+
const nodeData = props.dataMap?.[props.node.__id];
|
|
4422
|
+
let result = nodeData?.result;
|
|
4423
|
+
let response = nodeData?.response;
|
|
4522
4424
|
let childCollectionData = null;
|
|
4523
4425
|
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
4426
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || Array.isArray(result) && result.length == 0)) {
|
|
4544
4427
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(NoDataFound_default, {});
|
|
4545
4428
|
}
|
|
@@ -4551,7 +4434,7 @@ var DivContainer = async (props) => {
|
|
|
4551
4434
|
function renderNode(node, props2, dataitem, key, href) {
|
|
4552
4435
|
const SelectedNode = NodeTypes2[node.type];
|
|
4553
4436
|
if (!SelectedNode) return null;
|
|
4554
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4555
4438
|
SelectedNode,
|
|
4556
4439
|
{
|
|
4557
4440
|
node,
|
|
@@ -4562,11 +4445,11 @@ var DivContainer = async (props) => {
|
|
|
4562
4445
|
host: props2.host,
|
|
4563
4446
|
path: props2.path,
|
|
4564
4447
|
apiBaseUrl: props2.apiBaseUrl,
|
|
4565
|
-
serviceClient: props2.serviceClient,
|
|
4566
4448
|
resolveAssetUrl: props2.resolveAssetUrl,
|
|
4567
4449
|
breadcrumb: props2.breadcrumb,
|
|
4568
4450
|
dataitem,
|
|
4569
|
-
href
|
|
4451
|
+
href,
|
|
4452
|
+
dataMap: props2.dataMap
|
|
4570
4453
|
}
|
|
4571
4454
|
) }, key);
|
|
4572
4455
|
}
|
|
@@ -4648,9 +4531,9 @@ var DivContainer = async (props) => {
|
|
|
4648
4531
|
props.node.autoFormat && "auto-format",
|
|
4649
4532
|
props.node.bgClass
|
|
4650
4533
|
].filter(Boolean).join(" ");
|
|
4651
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
4534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react53.default.Fragment, { children: [
|
|
4652
4535
|
/* @__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)(
|
|
4536
|
+
/* @__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
4537
|
Wrapper,
|
|
4655
4538
|
{
|
|
4656
4539
|
id: guid,
|
|
@@ -4659,7 +4542,7 @@ var DivContainer = async (props) => {
|
|
|
4659
4542
|
...wrapperProps,
|
|
4660
4543
|
children: dataToRender.map(
|
|
4661
4544
|
(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)(
|
|
4545
|
+
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react53.default.Fragment, { children: child }, i)
|
|
4663
4546
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4664
4547
|
)
|
|
4665
4548
|
}
|
|
@@ -4698,11 +4581,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4698
4581
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4699
4582
|
rootNode = pageBodyTree.root;
|
|
4700
4583
|
}
|
|
4701
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react54.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4702
4585
|
{
|
|
4703
4586
|
}
|
|
4704
4587
|
const SelectedNode = NodeTypes[node.type];
|
|
4705
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4588
|
+
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
4589
|
SelectedNode,
|
|
4707
4590
|
{
|
|
4708
4591
|
node,
|
|
@@ -4716,9 +4599,9 @@ var PageBodyRenderer = (props) => {
|
|
|
4716
4599
|
widgetRegistry: props.widgetRegistry,
|
|
4717
4600
|
serviceClient: props.serviceClient,
|
|
4718
4601
|
resolveAssetUrl: props.resolveAssetUrl,
|
|
4719
|
-
|
|
4602
|
+
dataMap: props.dataMap
|
|
4720
4603
|
}
|
|
4721
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4604
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4722
4605
|
SelectedNode,
|
|
4723
4606
|
{
|
|
4724
4607
|
node,
|
|
@@ -4731,7 +4614,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4731
4614
|
widgetRegistry: props.widgetRegistry,
|
|
4732
4615
|
serviceClient: props.serviceClient,
|
|
4733
4616
|
resolveAssetUrl: props.resolveAssetUrl,
|
|
4734
|
-
|
|
4617
|
+
dataMap: props.dataMap
|
|
4735
4618
|
}
|
|
4736
4619
|
) }) }) }, index);
|
|
4737
4620
|
}) });
|