@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.mjs
CHANGED
|
@@ -1101,53 +1101,28 @@ var ToastService_default = ToastService;
|
|
|
1101
1101
|
|
|
1102
1102
|
// src/components/StyleTypes.tsx
|
|
1103
1103
|
var buttonClasses = /* @__PURE__ */ new Map([
|
|
1104
|
-
[
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
],
|
|
1108
|
-
[
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
],
|
|
1112
|
-
[
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
],
|
|
1116
|
-
[
|
|
1117
|
-
"PrimaryHollow" /* PrimaryHollow */,
|
|
1118
|
-
"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"
|
|
1119
|
-
],
|
|
1120
|
-
[
|
|
1121
|
-
"SecondaryHollow" /* SecondaryHollow */,
|
|
1122
|
-
"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"
|
|
1123
|
-
],
|
|
1124
|
-
[
|
|
1125
|
-
"NeutralHollow" /* NeutralHollow */,
|
|
1126
|
-
"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"
|
|
1127
|
-
],
|
|
1128
|
-
[
|
|
1129
|
-
"Ripple" /* Ripple */,
|
|
1130
|
-
"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"
|
|
1131
|
-
],
|
|
1132
|
-
[
|
|
1133
|
-
"Danger" /* Danger */,
|
|
1134
|
-
"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"
|
|
1135
|
-
],
|
|
1136
|
-
["Link" /* Link */, ""],
|
|
1137
|
-
[
|
|
1138
|
-
"Light" /* Light */,
|
|
1139
|
-
"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"
|
|
1140
|
-
]
|
|
1104
|
+
["Primary" /* Solid */, "btn-solid"],
|
|
1105
|
+
["PrimaryHollow" /* Hollow */, "btn-hollow"],
|
|
1106
|
+
["Link" /* Link */, "btn-link"]
|
|
1107
|
+
// [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"],
|
|
1108
|
+
// [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"],
|
|
1109
|
+
// [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"],
|
|
1110
|
+
// [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"],
|
|
1111
|
+
// [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"],
|
|
1112
|
+
// [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"],
|
|
1113
|
+
// [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"],
|
|
1114
|
+
// [StyleTypes.Link, ""],
|
|
1115
|
+
// [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"],
|
|
1141
1116
|
]);
|
|
1142
1117
|
var progressClasses = /* @__PURE__ */ new Map([
|
|
1143
|
-
["Primary" /*
|
|
1144
|
-
["PrimaryHollow" /*
|
|
1145
|
-
[
|
|
1146
|
-
[
|
|
1147
|
-
[
|
|
1148
|
-
[
|
|
1149
|
-
[
|
|
1150
|
-
[
|
|
1118
|
+
["Primary" /* Solid */, ""],
|
|
1119
|
+
["PrimaryHollow" /* Hollow */, ""],
|
|
1120
|
+
// [StyleTypes.Solid, ""],
|
|
1121
|
+
// [StyleTypes.Hollow, ""],
|
|
1122
|
+
// [StyleTypes.Solid, ""],
|
|
1123
|
+
// [StyleTypes.Hollow, ""],
|
|
1124
|
+
// [StyleTypes.Ripple, ""],
|
|
1125
|
+
// [StyleTypes.Danger, ""],
|
|
1151
1126
|
["Link" /* Link */, ""]
|
|
1152
1127
|
]);
|
|
1153
1128
|
|
|
@@ -1156,56 +1131,21 @@ import { useState as useState3 } from "react";
|
|
|
1156
1131
|
|
|
1157
1132
|
// src/components/ClientButton.tsx
|
|
1158
1133
|
import React24 from "react";
|
|
1159
|
-
|
|
1160
|
-
// src/components/utilities/ToastService.tsx
|
|
1161
|
-
var ToastService2 = class {
|
|
1162
|
-
static showError(message) {
|
|
1163
|
-
console.error(message);
|
|
1164
|
-
if (typeof window !== "undefined") {
|
|
1165
|
-
alert(message);
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
static showSuccess(message) {
|
|
1169
|
-
console.log(message);
|
|
1170
|
-
if (typeof window !== "undefined") {
|
|
1171
|
-
alert(message);
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
static showWarning(message) {
|
|
1175
|
-
console.warn(message);
|
|
1176
|
-
if (typeof window !== "undefined") {
|
|
1177
|
-
alert(message);
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
static showInfo(message) {
|
|
1181
|
-
console.info(message);
|
|
1182
|
-
if (typeof window !== "undefined") {
|
|
1183
|
-
alert(message);
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
};
|
|
1187
|
-
var ToastService_default2 = ToastService2;
|
|
1188
|
-
|
|
1189
|
-
// src/components/ClientButton.tsx
|
|
1190
1134
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1191
1135
|
var ClientButton = (props) => {
|
|
1192
1136
|
const execute = async (event) => {
|
|
1193
|
-
event.preventDefault();
|
|
1194
1137
|
if (props.onClick !== void 0) {
|
|
1195
1138
|
props.onClick();
|
|
1196
1139
|
} else {
|
|
1197
|
-
|
|
1140
|
+
ToastService_default.showError("No action defined.");
|
|
1198
1141
|
}
|
|
1199
1142
|
};
|
|
1200
|
-
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /*
|
|
1143
|
+
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1201
1144
|
return /* @__PURE__ */ jsx24(React24.Fragment, { children: /* @__PURE__ */ jsx24(
|
|
1202
1145
|
"button",
|
|
1203
1146
|
{
|
|
1204
1147
|
type: "button",
|
|
1205
1148
|
onClick: execute,
|
|
1206
|
-
"data-role": props.dataRole,
|
|
1207
|
-
disabled: props.disabled,
|
|
1208
|
-
tabIndex: props.tabIndex,
|
|
1209
1149
|
className: buttonClass + " " + props.className,
|
|
1210
1150
|
children: props.children
|
|
1211
1151
|
}
|
|
@@ -1229,21 +1169,27 @@ var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
|
1229
1169
|
onCancel();
|
|
1230
1170
|
}
|
|
1231
1171
|
};
|
|
1232
|
-
return /* @__PURE__ */ jsx25(Fragment, { children: showModal && /* @__PURE__ */ jsxs14("div", { className: "fixed inset-0 flex items-center justify-center z-
|
|
1172
|
+
return /* @__PURE__ */ jsx25(Fragment, { children: showModal && /* @__PURE__ */ jsxs14("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
|
|
1233
1173
|
/* @__PURE__ */ jsx25("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1234
|
-
/* @__PURE__ */ jsxs14("div", { className: "bg-white rounded-md p-6 shadow border z-50", children: [
|
|
1235
|
-
/* @__PURE__ */ jsx25("p", { className: "text-xl font-
|
|
1174
|
+
/* @__PURE__ */ jsxs14("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1175
|
+
/* @__PURE__ */ jsx25("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1236
1176
|
/* @__PURE__ */ jsx25("p", { className: "mb-4", children: message }),
|
|
1237
1177
|
/* @__PURE__ */ jsxs14("div", { className: "flex justify-end gap-8", children: [
|
|
1238
1178
|
/* @__PURE__ */ jsx25(
|
|
1239
1179
|
ClientButton_default,
|
|
1240
1180
|
{
|
|
1241
1181
|
onClick: handleCancelAction,
|
|
1242
|
-
ButtonType: "PrimaryHollow" /*
|
|
1182
|
+
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
1243
1183
|
children: "Cancel"
|
|
1244
1184
|
}
|
|
1245
1185
|
),
|
|
1246
|
-
/* @__PURE__ */ jsx25(
|
|
1186
|
+
/* @__PURE__ */ jsx25(
|
|
1187
|
+
ClientButton_default,
|
|
1188
|
+
{
|
|
1189
|
+
onClick: handleConfirmAction,
|
|
1190
|
+
children: "Confirm"
|
|
1191
|
+
}
|
|
1192
|
+
)
|
|
1247
1193
|
] })
|
|
1248
1194
|
] })
|
|
1249
1195
|
] }) });
|
|
@@ -1261,10 +1207,9 @@ var Button = (props) => {
|
|
|
1261
1207
|
const [showModal, setShowModal] = useState4(null);
|
|
1262
1208
|
const execute = async (event) => {
|
|
1263
1209
|
event.preventDefault();
|
|
1210
|
+
event.stopPropagation();
|
|
1264
1211
|
if (props.confirm) {
|
|
1265
|
-
const confirmed = await showConfirmation(
|
|
1266
|
-
"Are you sure you want to delete this item?"
|
|
1267
|
-
);
|
|
1212
|
+
const confirmed = await showConfirmation("Are you sure you want to delete this item?");
|
|
1268
1213
|
setShowModal(null);
|
|
1269
1214
|
if (!confirmed) {
|
|
1270
1215
|
return;
|
|
@@ -1279,15 +1224,12 @@ var Button = (props) => {
|
|
|
1279
1224
|
isValid = await props.onValidate();
|
|
1280
1225
|
if (!isValid) {
|
|
1281
1226
|
setInProgress(false);
|
|
1282
|
-
ToastService_default.showError(
|
|
1283
|
-
"There are error in the form. Please fix them before proceeding."
|
|
1284
|
-
);
|
|
1227
|
+
ToastService_default.showError("There are errors in the form. Please fix them before proceeding.");
|
|
1285
1228
|
return;
|
|
1286
1229
|
}
|
|
1287
1230
|
}
|
|
1288
1231
|
if (props.onClick !== void 0) {
|
|
1289
|
-
let response = await props.onClick(
|
|
1290
|
-
console.log(response);
|
|
1232
|
+
let response = await props.onClick();
|
|
1291
1233
|
if (response.isSuccessful) {
|
|
1292
1234
|
setIsActionPerformed(true);
|
|
1293
1235
|
setResponseMessage(response.message);
|
|
@@ -1306,61 +1248,27 @@ var Button = (props) => {
|
|
|
1306
1248
|
return new Promise((resolve) => {
|
|
1307
1249
|
const onConfirm = () => resolve(true);
|
|
1308
1250
|
const onCancel = () => resolve(false);
|
|
1309
|
-
setShowModal(
|
|
1310
|
-
/* @__PURE__ */ jsx26(
|
|
1311
|
-
Confirm_default,
|
|
1312
|
-
{
|
|
1313
|
-
message: props.confirmationMessage,
|
|
1314
|
-
onConfirm,
|
|
1315
|
-
onCancel
|
|
1316
|
-
}
|
|
1317
|
-
)
|
|
1318
|
-
);
|
|
1251
|
+
setShowModal(/* @__PURE__ */ jsx26(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
1319
1252
|
});
|
|
1320
1253
|
};
|
|
1321
|
-
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /*
|
|
1322
|
-
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /*
|
|
1254
|
+
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1255
|
+
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
1256
|
+
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
1323
1257
|
return /* @__PURE__ */ jsxs15(React26.Fragment, { children: [
|
|
1324
1258
|
/* @__PURE__ */ jsxs15(
|
|
1325
1259
|
"button",
|
|
1326
1260
|
{
|
|
1327
1261
|
type: "submit",
|
|
1328
1262
|
onClick: execute,
|
|
1329
|
-
id: props.id,
|
|
1330
1263
|
disabled: props.disabled,
|
|
1331
|
-
|
|
1264
|
+
title: isDisabled ? "The button is disabled to prevent any action" : "",
|
|
1265
|
+
className: buttonClass + " relative " + props.className,
|
|
1332
1266
|
children: [
|
|
1333
1267
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
1334
|
-
inProgress && /* @__PURE__ */ jsx26(React26.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ jsx26("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ jsxs15(
|
|
1335
|
-
"
|
|
1336
|
-
{
|
|
1337
|
-
|
|
1338
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1339
|
-
fill: "none",
|
|
1340
|
-
viewBox: "0 0 24 24",
|
|
1341
|
-
children: [
|
|
1342
|
-
/* @__PURE__ */ jsx26(
|
|
1343
|
-
"circle",
|
|
1344
|
-
{
|
|
1345
|
-
className: "opacity-25",
|
|
1346
|
-
cx: "12",
|
|
1347
|
-
cy: "12",
|
|
1348
|
-
r: "10",
|
|
1349
|
-
stroke: "currentColor",
|
|
1350
|
-
strokeWidth: "4"
|
|
1351
|
-
}
|
|
1352
|
-
),
|
|
1353
|
-
/* @__PURE__ */ jsx26(
|
|
1354
|
-
"path",
|
|
1355
|
-
{
|
|
1356
|
-
className: "opacity-75",
|
|
1357
|
-
fill: "currentColor",
|
|
1358
|
-
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"
|
|
1359
|
-
}
|
|
1360
|
-
)
|
|
1361
|
-
]
|
|
1362
|
-
}
|
|
1363
|
-
) })
|
|
1268
|
+
inProgress && /* @__PURE__ */ jsx26(React26.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ jsx26("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ jsxs15("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: [
|
|
1269
|
+
/* @__PURE__ */ jsx26("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1270
|
+
/* @__PURE__ */ jsx26("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" })
|
|
1271
|
+
] }) })
|
|
1364
1272
|
]
|
|
1365
1273
|
}
|
|
1366
1274
|
),
|
|
@@ -1581,7 +1489,10 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1581
1489
|
}
|
|
1582
1490
|
)
|
|
1583
1491
|
] }, field.name)),
|
|
1584
|
-
/* @__PURE__ */ jsxs16(Button_default, { onClick:
|
|
1492
|
+
/* @__PURE__ */ jsxs16(Button_default, { onClick: async () => {
|
|
1493
|
+
handleSaveModal();
|
|
1494
|
+
return { isSuccessful: true };
|
|
1495
|
+
}, className: "w-full", children: [
|
|
1585
1496
|
"Save ",
|
|
1586
1497
|
props.attributes?.label
|
|
1587
1498
|
] })
|
|
@@ -1821,7 +1732,7 @@ InputControl.displayName = "InputControl";
|
|
|
1821
1732
|
var InputControl_default = InputControl;
|
|
1822
1733
|
|
|
1823
1734
|
// src/components/dataForm/DataList.tsx
|
|
1824
|
-
import
|
|
1735
|
+
import React34, { useEffect as useEffect6, useState as useState7, useCallback as useCallback2, useReducer } from "react";
|
|
1825
1736
|
import { useRouter } from "next/navigation";
|
|
1826
1737
|
|
|
1827
1738
|
// src/components/dataForm/NoContentView.tsx
|
|
@@ -1876,27 +1787,25 @@ var ContentView_default = ContentView;
|
|
|
1876
1787
|
|
|
1877
1788
|
// src/components/dataForm/Hyperlink.tsx
|
|
1878
1789
|
import Link from "next/link";
|
|
1879
|
-
import
|
|
1880
|
-
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1790
|
+
import { Fragment as Fragment2, jsx as jsx34 } from "react/jsx-runtime";
|
|
1881
1791
|
function Hyperlink(props) {
|
|
1882
|
-
let linkClass = props.linkType ? buttonClasses.get(props.linkType) :
|
|
1883
|
-
const target = props
|
|
1884
|
-
const additionalProps =
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
] });
|
|
1792
|
+
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : "";
|
|
1793
|
+
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
1794
|
+
const additionalProps = {};
|
|
1795
|
+
if (target == "_blank") {
|
|
1796
|
+
additionalProps.rel = "noopener noreferrer";
|
|
1797
|
+
}
|
|
1798
|
+
return /* @__PURE__ */ jsx34(Fragment2, { children: props.href ? /* @__PURE__ */ jsx34(
|
|
1799
|
+
Link,
|
|
1800
|
+
{
|
|
1801
|
+
href: props.href,
|
|
1802
|
+
prefetch: false,
|
|
1803
|
+
className: `${linkClass} ${props.className ?? ""}`,
|
|
1804
|
+
...additionalProps,
|
|
1805
|
+
target,
|
|
1806
|
+
children: props.children
|
|
1807
|
+
}
|
|
1808
|
+
) : props.isHeading ? /* @__PURE__ */ jsx34("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx34("span", { className: props.className, children: props.children }) });
|
|
1900
1809
|
}
|
|
1901
1810
|
|
|
1902
1811
|
// src/clients/OdataBuilder.tsx
|
|
@@ -2147,7 +2056,7 @@ function FormReducer(state, action) {
|
|
|
2147
2056
|
var FormReducer_default = FormReducer;
|
|
2148
2057
|
|
|
2149
2058
|
// src/components/dataForm/DataList.tsx
|
|
2150
|
-
import { Fragment as
|
|
2059
|
+
import { Fragment as Fragment3, jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2151
2060
|
var DataList = (props) => {
|
|
2152
2061
|
console.log(props.dataset, "datasetssssss");
|
|
2153
2062
|
const router = useRouter();
|
|
@@ -2226,7 +2135,7 @@ var DataList = (props) => {
|
|
|
2226
2135
|
const renderPageNumbers = () => {
|
|
2227
2136
|
if (pages <= 10) {
|
|
2228
2137
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
2229
|
-
(page) => /* @__PURE__ */ jsx40(
|
|
2138
|
+
(page) => /* @__PURE__ */ jsx40(React34.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx40(
|
|
2230
2139
|
Hyperlink,
|
|
2231
2140
|
{
|
|
2232
2141
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2239,8 +2148,8 @@ var DataList = (props) => {
|
|
|
2239
2148
|
const showFirstPages = activePageNumber <= 5;
|
|
2240
2149
|
const showLastPages = activePageNumber > pages - 5;
|
|
2241
2150
|
if (showFirstPages) {
|
|
2242
|
-
return /* @__PURE__ */
|
|
2243
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx40(
|
|
2151
|
+
return /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
2152
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx40(React34.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx40(
|
|
2244
2153
|
Hyperlink,
|
|
2245
2154
|
{
|
|
2246
2155
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2265,7 +2174,7 @@ var DataList = (props) => {
|
|
|
2265
2174
|
children: pages
|
|
2266
2175
|
}
|
|
2267
2176
|
),
|
|
2268
|
-
/* @__PURE__ */ jsx40("div", { className: "relative inline-block", children: /* @__PURE__ */
|
|
2177
|
+
/* @__PURE__ */ jsx40("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs21(
|
|
2269
2178
|
"select",
|
|
2270
2179
|
{
|
|
2271
2180
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2287,7 +2196,7 @@ var DataList = (props) => {
|
|
|
2287
2196
|
) })
|
|
2288
2197
|
] });
|
|
2289
2198
|
} else if (showLastPages) {
|
|
2290
|
-
return /* @__PURE__ */
|
|
2199
|
+
return /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
2291
2200
|
/* @__PURE__ */ jsx40(
|
|
2292
2201
|
Hyperlink,
|
|
2293
2202
|
{
|
|
@@ -2306,7 +2215,7 @@ var DataList = (props) => {
|
|
|
2306
2215
|
),
|
|
2307
2216
|
/* @__PURE__ */ jsx40("span", { className: "px-2 py-1", children: "..." }),
|
|
2308
2217
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
2309
|
-
(page) => /* @__PURE__ */ jsx40(
|
|
2218
|
+
(page) => /* @__PURE__ */ jsx40(React34.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx40(
|
|
2310
2219
|
Hyperlink,
|
|
2311
2220
|
{
|
|
2312
2221
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2317,7 +2226,7 @@ var DataList = (props) => {
|
|
|
2317
2226
|
)
|
|
2318
2227
|
] });
|
|
2319
2228
|
} else {
|
|
2320
|
-
return /* @__PURE__ */
|
|
2229
|
+
return /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
2321
2230
|
/* @__PURE__ */ jsx40(
|
|
2322
2231
|
Hyperlink,
|
|
2323
2232
|
{
|
|
@@ -2338,7 +2247,7 @@ var DataList = (props) => {
|
|
|
2338
2247
|
Array.from(
|
|
2339
2248
|
{ length: 5 },
|
|
2340
2249
|
(_, index) => activePageNumber - 2 + index
|
|
2341
|
-
).map((page) => /* @__PURE__ */ jsx40(
|
|
2250
|
+
).map((page) => /* @__PURE__ */ jsx40(React34.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx40(
|
|
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",
|
|
@@ -2363,7 +2272,7 @@ var DataList = (props) => {
|
|
|
2363
2272
|
children: pages
|
|
2364
2273
|
}
|
|
2365
2274
|
),
|
|
2366
|
-
/* @__PURE__ */ jsx40("div", { className: "relative inline-block", children: /* @__PURE__ */
|
|
2275
|
+
/* @__PURE__ */ jsx40("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs21(
|
|
2367
2276
|
"select",
|
|
2368
2277
|
{
|
|
2369
2278
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2384,15 +2293,15 @@ var DataList = (props) => {
|
|
|
2384
2293
|
}
|
|
2385
2294
|
}
|
|
2386
2295
|
};
|
|
2387
|
-
return /* @__PURE__ */
|
|
2388
|
-
/* @__PURE__ */
|
|
2389
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ jsxs21(React34.Fragment, { children: [
|
|
2297
|
+
/* @__PURE__ */ jsxs21(ContentView_default, { isDataFound, children: [
|
|
2298
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs21(
|
|
2390
2299
|
"div",
|
|
2391
2300
|
{
|
|
2392
2301
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200 sticky top-0`,
|
|
2393
2302
|
children: [
|
|
2394
2303
|
props.title ? /* @__PURE__ */ jsx40("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx40("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx40("div", {}),
|
|
2395
|
-
/* @__PURE__ */
|
|
2304
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-3", children: [
|
|
2396
2305
|
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx40(
|
|
2397
2306
|
InputControl_default,
|
|
2398
2307
|
{
|
|
@@ -2408,11 +2317,11 @@ var DataList = (props) => {
|
|
|
2408
2317
|
},
|
|
2409
2318
|
filter.name
|
|
2410
2319
|
)),
|
|
2411
|
-
props.addLinkHref && /* @__PURE__ */
|
|
2320
|
+
props.addLinkHref && /* @__PURE__ */ jsxs21(
|
|
2412
2321
|
Hyperlink,
|
|
2413
2322
|
{
|
|
2414
2323
|
className: "gap-1",
|
|
2415
|
-
linkType: "Primary" /*
|
|
2324
|
+
linkType: "Primary" /* Solid */,
|
|
2416
2325
|
href: props.addLinkHref,
|
|
2417
2326
|
children: [
|
|
2418
2327
|
/* @__PURE__ */ jsx40(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
@@ -2424,7 +2333,7 @@ var DataList = (props) => {
|
|
|
2424
2333
|
]
|
|
2425
2334
|
}
|
|
2426
2335
|
),
|
|
2427
|
-
/* @__PURE__ */ jsx40("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */
|
|
2336
|
+
/* @__PURE__ */ jsx40("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs21("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
2428
2337
|
/* @__PURE__ */ jsx40("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx40("tr", { children: props?.columns?.map((column) => {
|
|
2429
2338
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2430
2339
|
let icon = "chevronUpDown";
|
|
@@ -2439,7 +2348,7 @@ var DataList = (props) => {
|
|
|
2439
2348
|
"th",
|
|
2440
2349
|
{
|
|
2441
2350
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.moneyView ? " text-right" : ""),
|
|
2442
|
-
children: /* @__PURE__ */ jsx40(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */
|
|
2351
|
+
children: /* @__PURE__ */ jsx40(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */ jsxs21("span", { className: "flex items-center space-x-1", children: [
|
|
2443
2352
|
/* @__PURE__ */ jsx40("span", { className: "text-black", children: column.label }),
|
|
2444
2353
|
column.enableSorting && /* @__PURE__ */ jsx40(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2445
2354
|
] }) })
|
|
@@ -2455,7 +2364,7 @@ var DataList = (props) => {
|
|
|
2455
2364
|
}
|
|
2456
2365
|
return /* @__PURE__ */ jsx40("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
2457
2366
|
console.log("column", column);
|
|
2458
|
-
return /* @__PURE__ */ jsx40(
|
|
2367
|
+
return /* @__PURE__ */ jsx40(React34.Fragment, { children: /* @__PURE__ */ jsx40(
|
|
2459
2368
|
"td",
|
|
2460
2369
|
{
|
|
2461
2370
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.moneyView ? "" : ""),
|
|
@@ -2505,9 +2414,9 @@ var DataList = (props) => {
|
|
|
2505
2414
|
}) }, index);
|
|
2506
2415
|
}) })
|
|
2507
2416
|
] }) }),
|
|
2508
|
-
/* @__PURE__ */ jsx40("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */
|
|
2417
|
+
/* @__PURE__ */ jsx40("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between", children: [
|
|
2509
2418
|
/* @__PURE__ */ jsx40("div", { className: "text-gray-700", children: label }),
|
|
2510
|
-
/* @__PURE__ */
|
|
2419
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex space-x-2 items-center", children: [
|
|
2511
2420
|
activePageNumber > 1 && /* @__PURE__ */ jsx40(
|
|
2512
2421
|
Hyperlink,
|
|
2513
2422
|
{
|
|
@@ -2530,14 +2439,14 @@ var DataList = (props) => {
|
|
|
2530
2439
|
] })
|
|
2531
2440
|
] }) })
|
|
2532
2441
|
] }),
|
|
2533
|
-
/* @__PURE__ */
|
|
2534
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
2442
|
+
/* @__PURE__ */ jsxs21(NoContentView_default, { isDataFound, children: [
|
|
2443
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs21(
|
|
2535
2444
|
"div",
|
|
2536
2445
|
{
|
|
2537
2446
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200`,
|
|
2538
2447
|
children: [
|
|
2539
2448
|
props.title ? /* @__PURE__ */ jsx40("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx40("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx40("div", {}),
|
|
2540
|
-
/* @__PURE__ */
|
|
2449
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-3", children: [
|
|
2541
2450
|
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx40(
|
|
2542
2451
|
InputControl_default,
|
|
2543
2452
|
{
|
|
@@ -2553,11 +2462,11 @@ var DataList = (props) => {
|
|
|
2553
2462
|
},
|
|
2554
2463
|
filter.name
|
|
2555
2464
|
)),
|
|
2556
|
-
props.addLinkHref && /* @__PURE__ */
|
|
2465
|
+
props.addLinkHref && /* @__PURE__ */ jsxs21(
|
|
2557
2466
|
Hyperlink,
|
|
2558
2467
|
{
|
|
2559
2468
|
className: "gap-1",
|
|
2560
|
-
linkType: "Primary" /*
|
|
2469
|
+
linkType: "Primary" /* Solid */,
|
|
2561
2470
|
href: props.addLinkHref,
|
|
2562
2471
|
children: [
|
|
2563
2472
|
/* @__PURE__ */ jsx40(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
@@ -2569,7 +2478,7 @@ var DataList = (props) => {
|
|
|
2569
2478
|
]
|
|
2570
2479
|
}
|
|
2571
2480
|
),
|
|
2572
|
-
/* @__PURE__ */
|
|
2481
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
2573
2482
|
/* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx40("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx40("tr", { children: props?.columns?.map((column) => {
|
|
2574
2483
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2575
2484
|
let icon = "chevronUpDown";
|
|
@@ -2584,7 +2493,7 @@ var DataList = (props) => {
|
|
|
2584
2493
|
"th",
|
|
2585
2494
|
{
|
|
2586
2495
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.moneyView ? " text-right" : ""),
|
|
2587
|
-
children: /* @__PURE__ */ jsx40(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */
|
|
2496
|
+
children: /* @__PURE__ */ jsx40(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */ jsxs21("span", { className: "flex items-center space-x-1", children: [
|
|
2588
2497
|
/* @__PURE__ */ jsx40("span", { children: column.label }),
|
|
2589
2498
|
column.enableSorting && /* @__PURE__ */ jsx40(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2590
2499
|
] }) })
|
|
@@ -2600,10 +2509,10 @@ var DataList = (props) => {
|
|
|
2600
2509
|
var DataList_default = DataList;
|
|
2601
2510
|
|
|
2602
2511
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2603
|
-
import
|
|
2512
|
+
import React53 from "react";
|
|
2604
2513
|
|
|
2605
2514
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2606
|
-
import
|
|
2515
|
+
import React36 from "react";
|
|
2607
2516
|
|
|
2608
2517
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
2609
2518
|
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
@@ -2675,9 +2584,9 @@ var LineBreakNode = (props) => {
|
|
|
2675
2584
|
var LineBreakNode_default = LineBreakNode;
|
|
2676
2585
|
|
|
2677
2586
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2678
|
-
import
|
|
2587
|
+
import React35 from "react";
|
|
2679
2588
|
import Link2 from "next/link";
|
|
2680
|
-
import { jsx as jsx43, jsxs as
|
|
2589
|
+
import { jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2681
2590
|
var LinkNode = (props) => {
|
|
2682
2591
|
const NodeTypes2 = {
|
|
2683
2592
|
["text"]: TextNode_default
|
|
@@ -2685,10 +2594,10 @@ var LinkNode = (props) => {
|
|
|
2685
2594
|
{
|
|
2686
2595
|
}
|
|
2687
2596
|
let formatClasses = props.node.cssClass || "";
|
|
2688
|
-
return /* @__PURE__ */
|
|
2597
|
+
return /* @__PURE__ */ jsxs22(Link2, { className: formatClasses, href: props.node.url, title: props.node.title, children: [
|
|
2689
2598
|
props.node.children && props.node.children.map((node, index) => {
|
|
2690
2599
|
const SelectedNode = NodeTypes2[node.type];
|
|
2691
|
-
return /* @__PURE__ */ jsx43(
|
|
2600
|
+
return /* @__PURE__ */ jsx43(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx43(SelectedNode, { node }) }, index);
|
|
2692
2601
|
}),
|
|
2693
2602
|
props.node.children.length == 0 && /* @__PURE__ */ jsx43("br", {})
|
|
2694
2603
|
] });
|
|
@@ -2839,20 +2748,14 @@ var DatafieldNode = (props) => {
|
|
|
2839
2748
|
{
|
|
2840
2749
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
2841
2750
|
style: styles,
|
|
2842
|
-
children:
|
|
2843
|
-
ViewControl_default,
|
|
2844
|
-
{
|
|
2845
|
-
controlType: dataType,
|
|
2846
|
-
value: value ?? `@databound[${fieldName}]`
|
|
2847
|
-
}
|
|
2848
|
-
)
|
|
2751
|
+
children: String(value)
|
|
2849
2752
|
}
|
|
2850
2753
|
);
|
|
2851
2754
|
};
|
|
2852
2755
|
var DatafieldNode_default = DatafieldNode;
|
|
2853
2756
|
|
|
2854
2757
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2855
|
-
import { Fragment as
|
|
2758
|
+
import { Fragment as Fragment4, jsx as jsx47, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2856
2759
|
var ParagraphNode = (props) => {
|
|
2857
2760
|
const NodeTypes2 = {
|
|
2858
2761
|
["text"]: TextNode_default,
|
|
@@ -2872,9 +2775,9 @@ var ParagraphNode = (props) => {
|
|
|
2872
2775
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
2873
2776
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
2874
2777
|
if (isInlineOnlyParent) {
|
|
2875
|
-
return /* @__PURE__ */ jsx47(
|
|
2778
|
+
return /* @__PURE__ */ jsx47(Fragment4, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2876
2779
|
const SelectedNode = NodeTypes2[node.type];
|
|
2877
|
-
return /* @__PURE__ */ jsx47(
|
|
2780
|
+
return /* @__PURE__ */ jsx47(React36.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(
|
|
2878
2781
|
SelectedNode,
|
|
2879
2782
|
{
|
|
2880
2783
|
node,
|
|
@@ -2886,10 +2789,10 @@ var ParagraphNode = (props) => {
|
|
|
2886
2789
|
) }, index);
|
|
2887
2790
|
}) });
|
|
2888
2791
|
}
|
|
2889
|
-
return /* @__PURE__ */
|
|
2792
|
+
return /* @__PURE__ */ jsxs23("div", { className: " " + formatClasses, children: [
|
|
2890
2793
|
hasChildren && props.node.children.map((node, index) => {
|
|
2891
2794
|
const SelectedNode = NodeTypes2[node.type];
|
|
2892
|
-
return /* @__PURE__ */ jsx47(
|
|
2795
|
+
return /* @__PURE__ */ jsx47(React36.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(
|
|
2893
2796
|
SelectedNode,
|
|
2894
2797
|
{
|
|
2895
2798
|
node,
|
|
@@ -2906,8 +2809,8 @@ var ParagraphNode = (props) => {
|
|
|
2906
2809
|
var ParagraphNode_default = ParagraphNode;
|
|
2907
2810
|
|
|
2908
2811
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2909
|
-
import
|
|
2910
|
-
import { Fragment as
|
|
2812
|
+
import React37 from "react";
|
|
2813
|
+
import { Fragment as Fragment5, jsx as jsx48 } from "react/jsx-runtime";
|
|
2911
2814
|
var HeadingNode = (props) => {
|
|
2912
2815
|
const NodeTypes2 = {
|
|
2913
2816
|
["text"]: TextNode_default,
|
|
@@ -2923,22 +2826,22 @@ var HeadingNode = (props) => {
|
|
|
2923
2826
|
{
|
|
2924
2827
|
}
|
|
2925
2828
|
let formatClasses = FormatClass[props.node.format] || "";
|
|
2926
|
-
return /* @__PURE__ */ jsx48(
|
|
2829
|
+
return /* @__PURE__ */ jsx48(Fragment5, { children: React37.createElement(
|
|
2927
2830
|
HeadingTag,
|
|
2928
2831
|
{ className: formatClasses },
|
|
2929
2832
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2930
2833
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2931
|
-
return /* @__PURE__ */ jsx48(
|
|
2834
|
+
return /* @__PURE__ */ jsx48(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2932
2835
|
})
|
|
2933
2836
|
) });
|
|
2934
2837
|
};
|
|
2935
2838
|
var HeadingNode_default = HeadingNode;
|
|
2936
2839
|
|
|
2937
2840
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2938
|
-
import
|
|
2841
|
+
import React39 from "react";
|
|
2939
2842
|
|
|
2940
2843
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2941
|
-
import
|
|
2844
|
+
import React38 from "react";
|
|
2942
2845
|
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2943
2846
|
var ListItemNode = (props) => {
|
|
2944
2847
|
const NodeTypes2 = {
|
|
@@ -2967,33 +2870,33 @@ var ListItemNode = (props) => {
|
|
|
2967
2870
|
}
|
|
2968
2871
|
} else {
|
|
2969
2872
|
foundFirstBreak = false;
|
|
2970
|
-
return /* @__PURE__ */ jsx49(
|
|
2873
|
+
return /* @__PURE__ */ jsx49(React38.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx49(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2971
2874
|
}
|
|
2972
2875
|
}) });
|
|
2973
2876
|
};
|
|
2974
2877
|
var ListItemNode_default = ListItemNode;
|
|
2975
2878
|
|
|
2976
2879
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2977
|
-
import { jsx as jsx50, jsxs as
|
|
2880
|
+
import { jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2978
2881
|
var ListNode = (props) => {
|
|
2979
2882
|
const NodeTypes2 = {
|
|
2980
2883
|
listitem: ListItemNode_default
|
|
2981
2884
|
};
|
|
2982
|
-
return /* @__PURE__ */
|
|
2885
|
+
return /* @__PURE__ */ jsxs24(React39.Fragment, { children: [
|
|
2983
2886
|
props.node.listType == "bullet" && /* @__PURE__ */ jsx50("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2984
2887
|
const SelectedNode = NodeTypes2[node.type];
|
|
2985
|
-
return /* @__PURE__ */ jsx50(
|
|
2888
|
+
return /* @__PURE__ */ jsx50(React39.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx50(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2986
2889
|
}) }),
|
|
2987
2890
|
props.node.listType == "number" && /* @__PURE__ */ jsx50("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2988
2891
|
const SelectedNode = NodeTypes2[node.type];
|
|
2989
|
-
return /* @__PURE__ */ jsx50(
|
|
2892
|
+
return /* @__PURE__ */ jsx50(React39.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx50(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2990
2893
|
}) })
|
|
2991
2894
|
] });
|
|
2992
2895
|
};
|
|
2993
2896
|
var ListNode_default = ListNode;
|
|
2994
2897
|
|
|
2995
2898
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
2996
|
-
import
|
|
2899
|
+
import React40 from "react";
|
|
2997
2900
|
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2998
2901
|
var QuoteNode = (props) => {
|
|
2999
2902
|
const NodeTypes2 = {
|
|
@@ -3003,17 +2906,17 @@ var QuoteNode = (props) => {
|
|
|
3003
2906
|
};
|
|
3004
2907
|
return /* @__PURE__ */ jsx51("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3005
2908
|
const SelectedNode = NodeTypes2[node.type];
|
|
3006
|
-
return /* @__PURE__ */ jsx51(
|
|
2909
|
+
return /* @__PURE__ */ jsx51(React40.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx51(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3007
2910
|
}) });
|
|
3008
2911
|
};
|
|
3009
2912
|
var QuoteNode_default = QuoteNode;
|
|
3010
2913
|
|
|
3011
2914
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3012
|
-
import
|
|
2915
|
+
import React41 from "react";
|
|
3013
2916
|
|
|
3014
2917
|
// src/components/CopyButton.tsx
|
|
3015
2918
|
import { useState as useState8, useRef as useRef3, useEffect as useEffect7 } from "react";
|
|
3016
|
-
import { jsx as jsx52, jsxs as
|
|
2919
|
+
import { jsx as jsx52, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3017
2920
|
function CopyButton({ text }) {
|
|
3018
2921
|
const [copied, setCopied] = useState8(false);
|
|
3019
2922
|
const timeoutRef = useRef3(null);
|
|
@@ -3032,7 +2935,7 @@ function CopyButton({ text }) {
|
|
|
3032
2935
|
console.error("Failed to copy: ", err);
|
|
3033
2936
|
}
|
|
3034
2937
|
};
|
|
3035
|
-
return /* @__PURE__ */
|
|
2938
|
+
return /* @__PURE__ */ jsxs25(
|
|
3036
2939
|
"button",
|
|
3037
2940
|
{
|
|
3038
2941
|
onClick: handleCopy,
|
|
@@ -3063,7 +2966,7 @@ function CopyButton({ text }) {
|
|
|
3063
2966
|
}
|
|
3064
2967
|
|
|
3065
2968
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3066
|
-
import { jsx as jsx53, jsxs as
|
|
2969
|
+
import { jsx as jsx53, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3067
2970
|
var CodeNode = (props) => {
|
|
3068
2971
|
const NodeTypes2 = {
|
|
3069
2972
|
["text"]: TextNode_default,
|
|
@@ -3076,14 +2979,14 @@ var CodeNode = (props) => {
|
|
|
3076
2979
|
if (node.type === "link") return node.text || node.url || "";
|
|
3077
2980
|
return "";
|
|
3078
2981
|
}).join("") ?? "";
|
|
3079
|
-
return /* @__PURE__ */
|
|
3080
|
-
/* @__PURE__ */
|
|
2982
|
+
return /* @__PURE__ */ jsxs26("div", { className: "code-block", children: [
|
|
2983
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center relative text-gray-200 bg-gray-800 px-4 py-2.5 text-xs font-sans justify-between rounded-t-md", children: [
|
|
3081
2984
|
/* @__PURE__ */ jsx53("span", { children: "Code Snippet" }),
|
|
3082
2985
|
/* @__PURE__ */ jsx53(CopyButton, { text: textContent })
|
|
3083
2986
|
] }),
|
|
3084
2987
|
/* @__PURE__ */ jsx53("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) => {
|
|
3085
2988
|
const SelectedNode = NodeTypes2[node.type];
|
|
3086
|
-
return /* @__PURE__ */ jsx53(
|
|
2989
|
+
return /* @__PURE__ */ jsx53(React41.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx53(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3087
2990
|
}) })
|
|
3088
2991
|
] });
|
|
3089
2992
|
};
|
|
@@ -3097,15 +3000,15 @@ var HorizontalRuleNode = (props) => {
|
|
|
3097
3000
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3098
3001
|
|
|
3099
3002
|
// src/components/pageRenderingEngine/nodes/LayoutItemNode.tsx
|
|
3100
|
-
import
|
|
3003
|
+
import React47 from "react";
|
|
3101
3004
|
|
|
3102
3005
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3103
|
-
import
|
|
3006
|
+
import React42 from "react";
|
|
3104
3007
|
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
3105
3008
|
var ImageNode = (props) => {
|
|
3106
3009
|
const { node, apiBaseUrl = "" } = props;
|
|
3107
3010
|
let imageUrl = node.imageUrl.startsWith("http") ? node.imageUrl : `${apiBaseUrl}/digitalassets/storefront/${node.imageUrl}`;
|
|
3108
|
-
return /* @__PURE__ */ jsx55(
|
|
3011
|
+
return /* @__PURE__ */ jsx55(React42.Fragment, { children: node.width ? /* @__PURE__ */ jsx55("div", { style: { width: node.width }, children: /* @__PURE__ */ jsx55(
|
|
3109
3012
|
"img",
|
|
3110
3013
|
{
|
|
3111
3014
|
loading: "lazy",
|
|
@@ -3131,7 +3034,7 @@ var ImageNode_default = ImageNode;
|
|
|
3131
3034
|
|
|
3132
3035
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3133
3036
|
import { Suspense } from "react";
|
|
3134
|
-
import { Fragment as
|
|
3037
|
+
import { Fragment as Fragment6, jsx as jsx56, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3135
3038
|
var WidgetNode = (props) => {
|
|
3136
3039
|
const getWidgetParameters = () => {
|
|
3137
3040
|
const widgetInputParameters = { ...props.routeParameters ?? {} };
|
|
@@ -3186,7 +3089,7 @@ var WidgetNode = (props) => {
|
|
|
3186
3089
|
const SelectedWidget = props.widgetRegistry?.[props.node.widgetCode];
|
|
3187
3090
|
if (!SelectedWidget) {
|
|
3188
3091
|
console.warn("Widget not found:", props.node.widgetCode);
|
|
3189
|
-
return /* @__PURE__ */
|
|
3092
|
+
return /* @__PURE__ */ jsxs27(Fragment6, { children: [
|
|
3190
3093
|
"Widget not found: ",
|
|
3191
3094
|
props.node.widgetCode
|
|
3192
3095
|
] });
|
|
@@ -3206,37 +3109,37 @@ var WidgetNode = (props) => {
|
|
|
3206
3109
|
var WidgetNode_default = WidgetNode;
|
|
3207
3110
|
|
|
3208
3111
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3209
|
-
import
|
|
3112
|
+
import React45, { useEffect as useEffect8, useRef as useRef4, useState as useState9 } from "react";
|
|
3210
3113
|
|
|
3211
3114
|
// src/components/IFrameLoaderView.tsx
|
|
3212
|
-
import
|
|
3213
|
-
import { jsx as jsx57, jsxs as
|
|
3115
|
+
import React44 from "react";
|
|
3116
|
+
import { jsx as jsx57, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3214
3117
|
var IFrameLoaderView = (props) => {
|
|
3215
|
-
return /* @__PURE__ */
|
|
3216
|
-
props.isDataFound == null && /* @__PURE__ */ jsx57("div", { className: "", children: /* @__PURE__ */
|
|
3217
|
-
/* @__PURE__ */
|
|
3118
|
+
return /* @__PURE__ */ jsxs28(React44.Fragment, { children: [
|
|
3119
|
+
props.isDataFound == null && /* @__PURE__ */ jsx57("div", { className: "", children: /* @__PURE__ */ jsxs28("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3120
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center mb-4", children: [
|
|
3218
3121
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3219
|
-
/* @__PURE__ */
|
|
3122
|
+
/* @__PURE__ */ jsxs28("div", { className: "ml-2", children: [
|
|
3220
3123
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3221
3124
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3222
3125
|
] })
|
|
3223
3126
|
] }),
|
|
3224
|
-
/* @__PURE__ */
|
|
3225
|
-
/* @__PURE__ */
|
|
3127
|
+
/* @__PURE__ */ jsxs28("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3128
|
+
/* @__PURE__ */ jsxs28("div", { className: "animate-pulse", children: [
|
|
3226
3129
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3227
3130
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3228
3131
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3229
3132
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3230
3133
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3231
3134
|
] }),
|
|
3232
|
-
/* @__PURE__ */
|
|
3135
|
+
/* @__PURE__ */ jsxs28("div", { className: "animate-pulse", children: [
|
|
3233
3136
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3234
3137
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3235
3138
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3236
3139
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3237
3140
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3238
3141
|
] }),
|
|
3239
|
-
/* @__PURE__ */
|
|
3142
|
+
/* @__PURE__ */ jsxs28("div", { className: "animate-pulse", children: [
|
|
3240
3143
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3241
3144
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3242
3145
|
/* @__PURE__ */ jsx57("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
@@ -3283,7 +3186,7 @@ var IframeClient = ({ src }) => {
|
|
|
3283
3186
|
const handleIframeLoad = () => {
|
|
3284
3187
|
setIsDataFound(true);
|
|
3285
3188
|
};
|
|
3286
|
-
return /* @__PURE__ */ jsx58(
|
|
3189
|
+
return /* @__PURE__ */ jsx58(React45.Fragment, { children: /* @__PURE__ */ jsx58(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ jsx58(
|
|
3287
3190
|
"iframe",
|
|
3288
3191
|
{
|
|
3289
3192
|
ref: iframeRef,
|
|
@@ -3312,7 +3215,7 @@ var EmbedNode = (props) => {
|
|
|
3312
3215
|
var EmbedNode_default = EmbedNode;
|
|
3313
3216
|
|
|
3314
3217
|
// src/components/pageRenderingEngine/nodes/VideoNode.tsx
|
|
3315
|
-
import
|
|
3218
|
+
import React46 from "react";
|
|
3316
3219
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3317
3220
|
var VideoNode = (props) => {
|
|
3318
3221
|
let src;
|
|
@@ -3321,7 +3224,7 @@ var VideoNode = (props) => {
|
|
|
3321
3224
|
} else if (props.node.provider == "bunny") {
|
|
3322
3225
|
src = `https://iframe.mediadelivery.net/embed/${props.node.videoId}?autoplay=false&loop=false&muted=false&preload=true&responsive=true`;
|
|
3323
3226
|
}
|
|
3324
|
-
return /* @__PURE__ */ jsx60(
|
|
3227
|
+
return /* @__PURE__ */ jsx60(React46.Fragment, { children: src && /* @__PURE__ */ jsx60("iframe", { className: "w-full aspect-video rounded", src, loading: "lazy", allow: "accelerometer;gyroscope;autoplay;encrypted-media;picture-in-picture;", allowFullScreen: true }) });
|
|
3325
3228
|
};
|
|
3326
3229
|
var VideoNode_default = VideoNode;
|
|
3327
3230
|
|
|
@@ -3387,11 +3290,11 @@ var LayoutItemNode = (props) => {
|
|
|
3387
3290
|
} else {
|
|
3388
3291
|
updatedLayout = removeParagraphsAtStartAndEnd(props.node);
|
|
3389
3292
|
}
|
|
3390
|
-
return /* @__PURE__ */ jsx61(
|
|
3293
|
+
return /* @__PURE__ */ jsx61(React47.Fragment, { children: /* @__PURE__ */ jsx61("div", { className: "layout-item " + cssClasses, style: { ...styles }, children: updatedLayout.children.map((node, index) => {
|
|
3391
3294
|
{
|
|
3392
3295
|
}
|
|
3393
3296
|
const SelectedNode = NodeTypes2[node.type];
|
|
3394
|
-
return /* @__PURE__ */ jsx61(
|
|
3297
|
+
return /* @__PURE__ */ jsx61(React47.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx61(
|
|
3395
3298
|
SelectedNode,
|
|
3396
3299
|
{
|
|
3397
3300
|
node,
|
|
@@ -3421,7 +3324,7 @@ var AssetUtility = class {
|
|
|
3421
3324
|
var AssetUtility_default = AssetUtility;
|
|
3422
3325
|
|
|
3423
3326
|
// src/components/pageRenderingEngine/nodes/LayoutContainerNode.tsx
|
|
3424
|
-
import { Fragment as
|
|
3327
|
+
import { Fragment as Fragment7, jsx as jsx62, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3425
3328
|
var LayoutContainerNode = (props) => {
|
|
3426
3329
|
const VERTICAL_ALIGNMENT_CLASSES = {
|
|
3427
3330
|
start: "items-start",
|
|
@@ -3505,7 +3408,7 @@ var LayoutContainerNode = (props) => {
|
|
|
3505
3408
|
},
|
|
3506
3409
|
index
|
|
3507
3410
|
));
|
|
3508
|
-
return /* @__PURE__ */
|
|
3411
|
+
return /* @__PURE__ */ jsxs29(Fragment7, { children: [
|
|
3509
3412
|
sectionWidth === "mixed" && /* @__PURE__ */ jsx62("div", { className: cssClasses, style: styles, children: /* @__PURE__ */ jsx62("div", { className: "container", children: /* @__PURE__ */ jsx62(
|
|
3510
3413
|
"div",
|
|
3511
3414
|
{
|
|
@@ -3535,7 +3438,7 @@ var LayoutContainerNode = (props) => {
|
|
|
3535
3438
|
var LayoutContainerNode_default = LayoutContainerNode;
|
|
3536
3439
|
|
|
3537
3440
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3538
|
-
import
|
|
3441
|
+
import React48, { useRef as useRef5, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect9 } from "react";
|
|
3539
3442
|
|
|
3540
3443
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3541
3444
|
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
@@ -3569,7 +3472,7 @@ var InputControlNode = (props) => {
|
|
|
3569
3472
|
var InputControlNode_default = InputControlNode;
|
|
3570
3473
|
|
|
3571
3474
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3572
|
-
import { jsx as jsx64, jsxs as
|
|
3475
|
+
import { jsx as jsx64, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3573
3476
|
var FormContainerNode = (props) => {
|
|
3574
3477
|
const NodeTypes2 = {
|
|
3575
3478
|
["input-control"]: InputControlNode_default
|
|
@@ -3609,12 +3512,12 @@ var FormContainerNode = (props) => {
|
|
|
3609
3512
|
};
|
|
3610
3513
|
fetchInitialData();
|
|
3611
3514
|
}, [props.fetchData, node.dataFetchApi, props.routeParameters]);
|
|
3612
|
-
return /* @__PURE__ */
|
|
3515
|
+
return /* @__PURE__ */ jsxs30("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3613
3516
|
node.children && node.children.map((node2, index) => {
|
|
3614
3517
|
{
|
|
3615
3518
|
}
|
|
3616
3519
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3617
|
-
return /* @__PURE__ */ jsx64(
|
|
3520
|
+
return /* @__PURE__ */ jsx64(React48.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx64(
|
|
3618
3521
|
InputControlNode_default,
|
|
3619
3522
|
{
|
|
3620
3523
|
value: formState.inputValues[node2.name],
|
|
@@ -3629,7 +3532,7 @@ var FormContainerNode = (props) => {
|
|
|
3629
3532
|
var FormContainerNode_default = FormContainerNode;
|
|
3630
3533
|
|
|
3631
3534
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3632
|
-
import
|
|
3535
|
+
import React52 from "react";
|
|
3633
3536
|
|
|
3634
3537
|
// src/components/utilities/AnimationUtility.tsx
|
|
3635
3538
|
var AnimationUtility = class {
|
|
@@ -3741,7 +3644,7 @@ var AnimationUtility_default = AnimationUtility;
|
|
|
3741
3644
|
|
|
3742
3645
|
// src/components/Pagination.tsx
|
|
3743
3646
|
import { useMemo } from "react";
|
|
3744
|
-
import { jsx as jsx65, jsxs as
|
|
3647
|
+
import { jsx as jsx65, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3745
3648
|
var Pagination = (props) => {
|
|
3746
3649
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3747
3650
|
const builder = useMemo(() => {
|
|
@@ -3812,11 +3715,11 @@ var Pagination = (props) => {
|
|
|
3812
3715
|
);
|
|
3813
3716
|
};
|
|
3814
3717
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
3815
|
-
return /* @__PURE__ */
|
|
3816
|
-
/* @__PURE__ */
|
|
3817
|
-
/* @__PURE__ */
|
|
3718
|
+
return /* @__PURE__ */ jsxs31("div", { className: "py-6 border-t bg-default", children: [
|
|
3719
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
3720
|
+
/* @__PURE__ */ jsxs31("div", { className: "text-sm", children: [
|
|
3818
3721
|
"Showing ",
|
|
3819
|
-
/* @__PURE__ */
|
|
3722
|
+
/* @__PURE__ */ jsxs31("span", { className: "font-semibold", children: [
|
|
3820
3723
|
startItem,
|
|
3821
3724
|
"-",
|
|
3822
3725
|
endItem
|
|
@@ -3826,8 +3729,8 @@ var Pagination = (props) => {
|
|
|
3826
3729
|
/* @__PURE__ */ jsx65("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
3827
3730
|
" results"
|
|
3828
3731
|
] }),
|
|
3829
|
-
totalPages > 1 && /* @__PURE__ */
|
|
3830
|
-
/* @__PURE__ */
|
|
3732
|
+
totalPages > 1 && /* @__PURE__ */ jsxs31("div", { className: "flex items-center space-x-1", children: [
|
|
3733
|
+
/* @__PURE__ */ jsxs31(
|
|
3831
3734
|
NavigationButton,
|
|
3832
3735
|
{
|
|
3833
3736
|
page: activePageNumber - 1,
|
|
@@ -3852,7 +3755,7 @@ var Pagination = (props) => {
|
|
|
3852
3755
|
const page = item;
|
|
3853
3756
|
return /* @__PURE__ */ jsx65(PageButton, { page, children: page }, page);
|
|
3854
3757
|
}),
|
|
3855
|
-
/* @__PURE__ */
|
|
3758
|
+
/* @__PURE__ */ jsxs31(
|
|
3856
3759
|
NavigationButton,
|
|
3857
3760
|
{
|
|
3858
3761
|
page: activePageNumber + 1,
|
|
@@ -3864,7 +3767,7 @@ var Pagination = (props) => {
|
|
|
3864
3767
|
}
|
|
3865
3768
|
)
|
|
3866
3769
|
] }),
|
|
3867
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
3770
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs31("div", { className: "flex items-center space-x-2", children: [
|
|
3868
3771
|
/* @__PURE__ */ jsx65("span", { className: "text-sm", children: "Go to:" }),
|
|
3869
3772
|
/* @__PURE__ */ jsx65("div", { className: "relative", children: /* @__PURE__ */ jsx65(
|
|
3870
3773
|
"input",
|
|
@@ -3887,7 +3790,7 @@ var Pagination = (props) => {
|
|
|
3887
3790
|
) })
|
|
3888
3791
|
] })
|
|
3889
3792
|
] }),
|
|
3890
|
-
showPageSizeSelector && /* @__PURE__ */ jsx65("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */
|
|
3793
|
+
showPageSizeSelector && /* @__PURE__ */ jsx65("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
3891
3794
|
/* @__PURE__ */ jsx65("span", { className: "text-sm", children: "Show:" }),
|
|
3892
3795
|
/* @__PURE__ */ jsx65("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx65(
|
|
3893
3796
|
Hyperlink,
|
|
@@ -3959,8 +3862,8 @@ var PathUtility = class {
|
|
|
3959
3862
|
var PathUtility_default = new PathUtility();
|
|
3960
3863
|
|
|
3961
3864
|
// src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
|
|
3962
|
-
import
|
|
3963
|
-
import { Fragment as
|
|
3865
|
+
import React50, { useEffect as useEffect10, useRef as useRef6 } from "react";
|
|
3866
|
+
import { Fragment as Fragment8, jsx as jsx66 } from "react/jsx-runtime";
|
|
3964
3867
|
function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
3965
3868
|
const ref = useRef6(null);
|
|
3966
3869
|
useEffect10(() => {
|
|
@@ -3979,14 +3882,14 @@ function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
|
3979
3882
|
observer.observe(ref.current);
|
|
3980
3883
|
return () => observer.disconnect();
|
|
3981
3884
|
}, [hasEnterAnimation]);
|
|
3982
|
-
return /* @__PURE__ */ jsx66(
|
|
3885
|
+
return /* @__PURE__ */ jsx66(Fragment8, { children: children && // enforce passing the ref to Wrapper
|
|
3983
3886
|
//@ts-ignore
|
|
3984
|
-
|
|
3887
|
+
React50.cloneElement(children, { ref }) });
|
|
3985
3888
|
}
|
|
3986
3889
|
|
|
3987
3890
|
// src/components/Slider.tsx
|
|
3988
|
-
import
|
|
3989
|
-
import { Fragment as
|
|
3891
|
+
import React51, { useState as useState11, useEffect as useEffect11, Children, cloneElement } from "react";
|
|
3892
|
+
import { Fragment as Fragment9, jsx as jsx67, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3990
3893
|
var Slider = ({
|
|
3991
3894
|
children,
|
|
3992
3895
|
slidesToShow = 4,
|
|
@@ -4080,7 +3983,7 @@ var Slider = ({
|
|
|
4080
3983
|
};
|
|
4081
3984
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
4082
3985
|
const slides = Children.map(children, (child, index) => {
|
|
4083
|
-
if (!
|
|
3986
|
+
if (!React51.isValidElement(child)) return null;
|
|
4084
3987
|
const childProps = child.props;
|
|
4085
3988
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4086
3989
|
return /* @__PURE__ */ jsx67(
|
|
@@ -4106,7 +4009,7 @@ var Slider = ({
|
|
|
4106
4009
|
return "bottom-4";
|
|
4107
4010
|
}
|
|
4108
4011
|
};
|
|
4109
|
-
return /* @__PURE__ */
|
|
4012
|
+
return /* @__PURE__ */ jsxs32(
|
|
4110
4013
|
"div",
|
|
4111
4014
|
{
|
|
4112
4015
|
className: `relative w-full overflow-hidden ${className}`,
|
|
@@ -4124,7 +4027,7 @@ var Slider = ({
|
|
|
4124
4027
|
children: slides
|
|
4125
4028
|
}
|
|
4126
4029
|
),
|
|
4127
|
-
show_arrows && /* @__PURE__ */
|
|
4030
|
+
show_arrows && /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
4128
4031
|
/* @__PURE__ */ jsx67(
|
|
4129
4032
|
ArrowButton,
|
|
4130
4033
|
{
|
|
@@ -4135,7 +4038,7 @@ var Slider = ({
|
|
|
4135
4038
|
children: /* @__PURE__ */ jsx67("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
4136
4039
|
}
|
|
4137
4040
|
),
|
|
4138
|
-
/* @__PURE__ */
|
|
4041
|
+
/* @__PURE__ */ jsxs32(
|
|
4139
4042
|
ArrowButton,
|
|
4140
4043
|
{
|
|
4141
4044
|
direction: "right",
|
|
@@ -4284,7 +4187,7 @@ var ProgressPill = ({
|
|
|
4284
4187
|
}
|
|
4285
4188
|
return null;
|
|
4286
4189
|
};
|
|
4287
|
-
return /* @__PURE__ */
|
|
4190
|
+
return /* @__PURE__ */ jsxs32(
|
|
4288
4191
|
"button",
|
|
4289
4192
|
{
|
|
4290
4193
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4301,9 +4204,9 @@ var ProgressPill = ({
|
|
|
4301
4204
|
var Slider_default = Slider;
|
|
4302
4205
|
|
|
4303
4206
|
// src/components/NoDataFound.tsx
|
|
4304
|
-
import { jsx as jsx68, jsxs as
|
|
4207
|
+
import { jsx as jsx68, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4305
4208
|
var NoDataFound = () => {
|
|
4306
|
-
return /* @__PURE__ */
|
|
4209
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4307
4210
|
/* @__PURE__ */ jsx68("div", { className: "mb-5", children: /* @__PURE__ */ jsx68("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx68(
|
|
4308
4211
|
"svg",
|
|
4309
4212
|
{
|
|
@@ -4330,7 +4233,7 @@ var NoDataFound = () => {
|
|
|
4330
4233
|
var NoDataFound_default = NoDataFound;
|
|
4331
4234
|
|
|
4332
4235
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4333
|
-
import { jsx as jsx69, jsxs as
|
|
4236
|
+
import { jsx as jsx69, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4334
4237
|
function toCamelCase(str) {
|
|
4335
4238
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4336
4239
|
}
|
|
@@ -4483,31 +4386,11 @@ var DivContainer = async (props) => {
|
|
|
4483
4386
|
return fieldValue !== void 0 && fieldValue === false;
|
|
4484
4387
|
};
|
|
4485
4388
|
const isHidden = shouldHideContainer();
|
|
4486
|
-
|
|
4487
|
-
let
|
|
4488
|
-
let
|
|
4489
|
-
let response = null;
|
|
4389
|
+
const nodeData = props.dataMap?.[props.node.__id];
|
|
4390
|
+
let result = nodeData?.result;
|
|
4391
|
+
let response = nodeData?.response;
|
|
4490
4392
|
let childCollectionData = null;
|
|
4491
4393
|
if (dataBindingProperties) {
|
|
4492
|
-
endpoint = dataBindingProperties.dataSource;
|
|
4493
|
-
endpoint = endpoint.replace(/\{(\w+)\}/g, (_, key) => {
|
|
4494
|
-
return props.routeParameters?.[key] ?? `{${key}}`;
|
|
4495
|
-
});
|
|
4496
|
-
if (dataBindingProperties.applyODataParams) {
|
|
4497
|
-
odataString = OdataBuilder.getOdataQueryString(props.query);
|
|
4498
|
-
if (odataString) {
|
|
4499
|
-
const separator = endpoint.includes("?") ? "&" : "?";
|
|
4500
|
-
endpoint += separator + odataString;
|
|
4501
|
-
}
|
|
4502
|
-
}
|
|
4503
|
-
if (props.fetchData) {
|
|
4504
|
-
response = await props.fetchData(endpoint);
|
|
4505
|
-
result = response?.result;
|
|
4506
|
-
} else {
|
|
4507
|
-
console.warn(
|
|
4508
|
-
"DivContainer data binding needs `fetchData` prop but none was provided."
|
|
4509
|
-
);
|
|
4510
|
-
}
|
|
4511
4394
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || Array.isArray(result) && result.length == 0)) {
|
|
4512
4395
|
return /* @__PURE__ */ jsx69(NoDataFound_default, {});
|
|
4513
4396
|
}
|
|
@@ -4519,7 +4402,7 @@ var DivContainer = async (props) => {
|
|
|
4519
4402
|
function renderNode(node, props2, dataitem, key, href) {
|
|
4520
4403
|
const SelectedNode = NodeTypes2[node.type];
|
|
4521
4404
|
if (!SelectedNode) return null;
|
|
4522
|
-
return /* @__PURE__ */ jsx69(
|
|
4405
|
+
return /* @__PURE__ */ jsx69(React52.Fragment, { children: /* @__PURE__ */ jsx69(
|
|
4523
4406
|
SelectedNode,
|
|
4524
4407
|
{
|
|
4525
4408
|
node,
|
|
@@ -4530,11 +4413,11 @@ var DivContainer = async (props) => {
|
|
|
4530
4413
|
host: props2.host,
|
|
4531
4414
|
path: props2.path,
|
|
4532
4415
|
apiBaseUrl: props2.apiBaseUrl,
|
|
4533
|
-
serviceClient: props2.serviceClient,
|
|
4534
4416
|
resolveAssetUrl: props2.resolveAssetUrl,
|
|
4535
4417
|
breadcrumb: props2.breadcrumb,
|
|
4536
4418
|
dataitem,
|
|
4537
|
-
href
|
|
4419
|
+
href,
|
|
4420
|
+
dataMap: props2.dataMap
|
|
4538
4421
|
}
|
|
4539
4422
|
) }, key);
|
|
4540
4423
|
}
|
|
@@ -4616,9 +4499,9 @@ var DivContainer = async (props) => {
|
|
|
4616
4499
|
props.node.autoFormat && "auto-format",
|
|
4617
4500
|
props.node.bgClass
|
|
4618
4501
|
].filter(Boolean).join(" ");
|
|
4619
|
-
return /* @__PURE__ */
|
|
4502
|
+
return /* @__PURE__ */ jsxs34(React52.Fragment, { children: [
|
|
4620
4503
|
/* @__PURE__ */ jsx69("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4621
|
-
/* @__PURE__ */ jsx69(EnterAnimationClient, { hasEnterAnimation: !!props.node.enterAnimation, children: /* @__PURE__ */ jsx69(
|
|
4504
|
+
/* @__PURE__ */ jsx69(EnterAnimationClient, { hasEnterAnimation: !!props.node.enterAnimation, children: /* @__PURE__ */ jsx69(React52.Fragment, { children: /* @__PURE__ */ jsx69(
|
|
4622
4505
|
Wrapper,
|
|
4623
4506
|
{
|
|
4624
4507
|
id: guid,
|
|
@@ -4627,7 +4510,7 @@ var DivContainer = async (props) => {
|
|
|
4627
4510
|
...wrapperProps,
|
|
4628
4511
|
children: dataToRender.map(
|
|
4629
4512
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4630
|
-
(child, i) => /* @__PURE__ */ jsx69(
|
|
4513
|
+
(child, i) => /* @__PURE__ */ jsx69(React52.Fragment, { children: child }, i)
|
|
4631
4514
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4632
4515
|
)
|
|
4633
4516
|
}
|
|
@@ -4666,11 +4549,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4666
4549
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4667
4550
|
rootNode = pageBodyTree.root;
|
|
4668
4551
|
}
|
|
4669
|
-
return /* @__PURE__ */ jsx70(
|
|
4552
|
+
return /* @__PURE__ */ jsx70(React53.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4670
4553
|
{
|
|
4671
4554
|
}
|
|
4672
4555
|
const SelectedNode = NodeTypes[node.type];
|
|
4673
|
-
return /* @__PURE__ */ jsx70(
|
|
4556
|
+
return /* @__PURE__ */ jsx70(React53.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx70(React53.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx70(React53.Fragment, { children: /* @__PURE__ */ jsx70(
|
|
4674
4557
|
SelectedNode,
|
|
4675
4558
|
{
|
|
4676
4559
|
node,
|
|
@@ -4684,9 +4567,9 @@ var PageBodyRenderer = (props) => {
|
|
|
4684
4567
|
widgetRegistry: props.widgetRegistry,
|
|
4685
4568
|
serviceClient: props.serviceClient,
|
|
4686
4569
|
resolveAssetUrl: props.resolveAssetUrl,
|
|
4687
|
-
|
|
4570
|
+
dataMap: props.dataMap
|
|
4688
4571
|
}
|
|
4689
|
-
) }) : /* @__PURE__ */ jsx70(
|
|
4572
|
+
) }) : /* @__PURE__ */ jsx70(React53.Fragment, { children: /* @__PURE__ */ jsx70(
|
|
4690
4573
|
SelectedNode,
|
|
4691
4574
|
{
|
|
4692
4575
|
node,
|
|
@@ -4699,7 +4582,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4699
4582
|
widgetRegistry: props.widgetRegistry,
|
|
4700
4583
|
serviceClient: props.serviceClient,
|
|
4701
4584
|
resolveAssetUrl: props.resolveAssetUrl,
|
|
4702
|
-
|
|
4585
|
+
dataMap: props.dataMap
|
|
4703
4586
|
}
|
|
4704
4587
|
) }) }) }, index);
|
|
4705
4588
|
}) });
|