@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260410111456 → 0.8.1-dev.20260415045826
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 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +77 -62
- package/dist/index.mjs +77 -62
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -850,14 +850,14 @@ var init_CopyButton = __esm({
|
|
|
850
850
|
});
|
|
851
851
|
|
|
852
852
|
// src/components/IFrameLoaderView.tsx
|
|
853
|
-
var
|
|
853
|
+
var import_react46, import_jsx_runtime61, IFrameLoaderView, IFrameLoaderView_default;
|
|
854
854
|
var init_IFrameLoaderView = __esm({
|
|
855
855
|
"src/components/IFrameLoaderView.tsx"() {
|
|
856
856
|
"use strict";
|
|
857
|
-
|
|
857
|
+
import_react46 = __toESM(require("react"));
|
|
858
858
|
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
859
859
|
IFrameLoaderView = (props) => {
|
|
860
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react46.default.Fragment, { children: [
|
|
861
861
|
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
862
862
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
863
863
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
@@ -902,19 +902,19 @@ var IframeClient_exports = {};
|
|
|
902
902
|
__export(IframeClient_exports, {
|
|
903
903
|
default: () => IframeClient_default
|
|
904
904
|
});
|
|
905
|
-
var
|
|
905
|
+
var import_react47, import_jsx_runtime62, IframeClient, IframeClient_default;
|
|
906
906
|
var init_IframeClient = __esm({
|
|
907
907
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
908
908
|
"use strict";
|
|
909
909
|
"use client";
|
|
910
|
-
|
|
910
|
+
import_react47 = __toESM(require("react"));
|
|
911
911
|
init_IFrameLoaderView();
|
|
912
912
|
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
913
913
|
IframeClient = ({ src }) => {
|
|
914
|
-
const iframeRef = (0,
|
|
915
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
916
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
917
|
-
(0,
|
|
914
|
+
const iframeRef = (0, import_react47.useRef)(null);
|
|
915
|
+
const [iframeHeight, setIframeHeight] = (0, import_react47.useState)("100%");
|
|
916
|
+
const [isDataFound, setIsDataFound] = (0, import_react47.useState)(null);
|
|
917
|
+
(0, import_react47.useEffect)(() => {
|
|
918
918
|
const handleReceiveMessage = (event) => {
|
|
919
919
|
const eventName = event?.data?.eventName;
|
|
920
920
|
const payload = event?.data?.payload;
|
|
@@ -929,7 +929,7 @@ var init_IframeClient = __esm({
|
|
|
929
929
|
window.addEventListener("message", handleReceiveMessage);
|
|
930
930
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
931
931
|
}, []);
|
|
932
|
-
(0,
|
|
932
|
+
(0, import_react47.useEffect)(() => {
|
|
933
933
|
const handleResize = () => {
|
|
934
934
|
if (iframeRef.current) {
|
|
935
935
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -941,7 +941,7 @@ var init_IframeClient = __esm({
|
|
|
941
941
|
const handleIframeLoad = () => {
|
|
942
942
|
setIsDataFound(true);
|
|
943
943
|
};
|
|
944
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react47.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
945
945
|
"iframe",
|
|
946
946
|
{
|
|
947
947
|
ref: iframeRef,
|
|
@@ -3428,16 +3428,13 @@ var DataList = (props) => {
|
|
|
3428
3428
|
var DataList_default = DataList;
|
|
3429
3429
|
|
|
3430
3430
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
3431
|
-
var
|
|
3431
|
+
var import_react51 = __toESM(require("react"));
|
|
3432
3432
|
|
|
3433
3433
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
3434
3434
|
var import_react37 = __toESM(require("react"));
|
|
3435
3435
|
|
|
3436
3436
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
3437
|
-
var import_jsx_runtime40 = (
|
|
3438
|
-
// @ts-expect-error custom code
|
|
3439
|
-
require("react/jsx-runtime")
|
|
3440
|
-
);
|
|
3437
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3441
3438
|
var TextNode = (props) => {
|
|
3442
3439
|
function cssStringToJson(cssString) {
|
|
3443
3440
|
const styleObject = {};
|
|
@@ -3494,8 +3491,18 @@ var TextNode = (props) => {
|
|
|
3494
3491
|
return key in dataItem ? dataItem[key] : `{${key}}`;
|
|
3495
3492
|
});
|
|
3496
3493
|
}
|
|
3494
|
+
function renderWithLineBreaks(text) {
|
|
3495
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { children: [
|
|
3496
|
+
line,
|
|
3497
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("br", {})
|
|
3498
|
+
] }, index));
|
|
3499
|
+
}
|
|
3497
3500
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
3498
|
-
|
|
3501
|
+
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
3502
|
+
return (
|
|
3503
|
+
// @ts-expect-error custom code
|
|
3504
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
|
|
3505
|
+
);
|
|
3499
3506
|
};
|
|
3500
3507
|
var TextNode_default = TextNode;
|
|
3501
3508
|
|
|
@@ -4034,7 +4041,8 @@ var DatafieldNode = (props) => {
|
|
|
4034
4041
|
path: props.path,
|
|
4035
4042
|
apiBaseUrl: props.apiBaseUrl,
|
|
4036
4043
|
breadcrumb: props.breadcrumb,
|
|
4037
|
-
donotApplyContainerClass: true
|
|
4044
|
+
donotApplyContainerClass: true,
|
|
4045
|
+
widgetRenderer: props.widgetRenderer
|
|
4038
4046
|
}
|
|
4039
4047
|
);
|
|
4040
4048
|
}
|
|
@@ -4262,6 +4270,7 @@ var HorizontalRuleNode = () => {
|
|
|
4262
4270
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
4263
4271
|
|
|
4264
4272
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
4273
|
+
var import_react44 = __toESM(require("react"));
|
|
4265
4274
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4266
4275
|
var WidgetNode = (props) => {
|
|
4267
4276
|
const getWidgetParameters = () => {
|
|
@@ -4334,23 +4343,26 @@ var WidgetNode = (props) => {
|
|
|
4334
4343
|
const widgetParams = getWidgetParameters();
|
|
4335
4344
|
return (
|
|
4336
4345
|
// eslint-disable-next-line react-hooks/static-components
|
|
4337
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4346
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_react44.default.Fragment, { children: [
|
|
4347
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(props.widgetRenderer, {}),
|
|
4348
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4349
|
+
SelectedWidget,
|
|
4350
|
+
{
|
|
4351
|
+
params: widgetParams,
|
|
4352
|
+
query: props.query,
|
|
4353
|
+
session: props.session,
|
|
4354
|
+
host: props.host,
|
|
4355
|
+
path: props.path,
|
|
4356
|
+
apiBaseUrl: props.apiBaseUrl
|
|
4357
|
+
}
|
|
4358
|
+
)
|
|
4359
|
+
] })
|
|
4348
4360
|
);
|
|
4349
4361
|
};
|
|
4350
4362
|
var WidgetNode_default = WidgetNode;
|
|
4351
4363
|
|
|
4352
4364
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
4353
|
-
var
|
|
4365
|
+
var import_react45 = __toESM(require("react"));
|
|
4354
4366
|
|
|
4355
4367
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
4356
4368
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
@@ -4391,16 +4403,16 @@ var FormContainerNode = (props) => {
|
|
|
4391
4403
|
["input-control"]: InputControlNode_default
|
|
4392
4404
|
};
|
|
4393
4405
|
const { node } = props;
|
|
4394
|
-
const formRef = (0,
|
|
4406
|
+
const formRef = (0, import_react45.useRef)(null);
|
|
4395
4407
|
const initialState = {
|
|
4396
4408
|
inputValues: {},
|
|
4397
4409
|
lastPropertyChanged: ""
|
|
4398
4410
|
};
|
|
4399
|
-
const [formState, dispatch] = (0,
|
|
4400
|
-
const handleInputChange = (0,
|
|
4411
|
+
const [formState, dispatch] = (0, import_react45.useReducer)(FormReducer_default, initialState);
|
|
4412
|
+
const handleInputChange = (0, import_react45.useCallback)((updatedValues) => {
|
|
4401
4413
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
4402
4414
|
}, [dispatch]);
|
|
4403
|
-
(0,
|
|
4415
|
+
(0, import_react45.useEffect)(() => {
|
|
4404
4416
|
const fetchInitialData = async () => {
|
|
4405
4417
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
4406
4418
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -4420,7 +4432,7 @@ var FormContainerNode = (props) => {
|
|
|
4420
4432
|
{
|
|
4421
4433
|
}
|
|
4422
4434
|
const SelectedNode = NodeTypes2[node2.type];
|
|
4423
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
4435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react45.default.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
4424
4436
|
InputControlNode_default,
|
|
4425
4437
|
{
|
|
4426
4438
|
value: formState.inputValues[node2.name],
|
|
@@ -4435,7 +4447,7 @@ var FormContainerNode = (props) => {
|
|
|
4435
4447
|
var FormContainerNode_default = FormContainerNode;
|
|
4436
4448
|
|
|
4437
4449
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4438
|
-
var
|
|
4450
|
+
var import_react50 = __toESM(require("react"));
|
|
4439
4451
|
|
|
4440
4452
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
4441
4453
|
var import_dynamic4 = __toESM(require("next/dynamic"));
|
|
@@ -4460,7 +4472,7 @@ var EmbedNode_default = EmbedNode;
|
|
|
4460
4472
|
init_ServiceClient();
|
|
4461
4473
|
|
|
4462
4474
|
// src/components/Slider.tsx
|
|
4463
|
-
var
|
|
4475
|
+
var import_react48 = __toESM(require("react"));
|
|
4464
4476
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4465
4477
|
var Slider = ({
|
|
4466
4478
|
children,
|
|
@@ -4479,13 +4491,13 @@ var Slider = ({
|
|
|
4479
4491
|
pillStyle = "cumulative",
|
|
4480
4492
|
progressPosition = "bottom"
|
|
4481
4493
|
}) => {
|
|
4482
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
4483
|
-
const [transition, setTransition] = (0,
|
|
4484
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
4494
|
+
const [currentSlide, setCurrentSlide] = (0, import_react48.useState)(0);
|
|
4495
|
+
const [transition, setTransition] = (0, import_react48.useState)(true);
|
|
4496
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react48.useState)(
|
|
4485
4497
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
4486
4498
|
);
|
|
4487
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
4488
|
-
(0,
|
|
4499
|
+
const [isPlaying, setIsPlaying] = (0, import_react48.useState)(autoplay);
|
|
4500
|
+
(0, import_react48.useEffect)(() => {
|
|
4489
4501
|
if (typeof slidesToShow === "number") return;
|
|
4490
4502
|
const handleResize = () => {
|
|
4491
4503
|
if (window.innerWidth >= 1024) {
|
|
@@ -4500,7 +4512,7 @@ var Slider = ({
|
|
|
4500
4512
|
window.addEventListener("resize", handleResize);
|
|
4501
4513
|
return () => window.removeEventListener("resize", handleResize);
|
|
4502
4514
|
}, [slidesToShow]);
|
|
4503
|
-
(0,
|
|
4515
|
+
(0, import_react48.useEffect)(() => {
|
|
4504
4516
|
if (!autoplay) return;
|
|
4505
4517
|
const timer = setInterval(() => {
|
|
4506
4518
|
if (isPlaying) {
|
|
@@ -4509,7 +4521,7 @@ var Slider = ({
|
|
|
4509
4521
|
}, autoplay_speed);
|
|
4510
4522
|
return () => clearInterval(timer);
|
|
4511
4523
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
4512
|
-
const totalSlides =
|
|
4524
|
+
const totalSlides = import_react48.Children.count(children);
|
|
4513
4525
|
const maxSlide = totalSlides - slidesToShowState;
|
|
4514
4526
|
const nextSlide = () => {
|
|
4515
4527
|
if (currentSlide >= maxSlide) {
|
|
@@ -4554,8 +4566,8 @@ var Slider = ({
|
|
|
4554
4566
|
}
|
|
4555
4567
|
};
|
|
4556
4568
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
4557
|
-
const slides =
|
|
4558
|
-
if (!
|
|
4569
|
+
const slides = import_react48.Children.map(children, (child, index) => {
|
|
4570
|
+
if (!import_react48.default.isValidElement(child)) return null;
|
|
4559
4571
|
const childProps = child.props;
|
|
4560
4572
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4561
4573
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
@@ -4563,7 +4575,7 @@ var Slider = ({
|
|
|
4563
4575
|
{
|
|
4564
4576
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
4565
4577
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
4566
|
-
children: (0,
|
|
4578
|
+
children: (0, import_react48.cloneElement)(child, {
|
|
4567
4579
|
className: mergedClassName
|
|
4568
4580
|
})
|
|
4569
4581
|
},
|
|
@@ -4676,13 +4688,13 @@ var ProgressPill = ({
|
|
|
4676
4688
|
currentSlide,
|
|
4677
4689
|
totalSlides
|
|
4678
4690
|
}) => {
|
|
4679
|
-
const [progress, setProgress] = (0,
|
|
4680
|
-
(0,
|
|
4691
|
+
const [progress, setProgress] = (0, import_react48.useState)(0);
|
|
4692
|
+
(0, import_react48.useEffect)(() => {
|
|
4681
4693
|
if (active) {
|
|
4682
4694
|
setProgress(0);
|
|
4683
4695
|
}
|
|
4684
4696
|
}, [active, index]);
|
|
4685
|
-
(0,
|
|
4697
|
+
(0, import_react48.useEffect)(() => {
|
|
4686
4698
|
if (!active || !isPlaying) {
|
|
4687
4699
|
if (!active) {
|
|
4688
4700
|
setProgress(0);
|
|
@@ -4964,12 +4976,12 @@ var NoDataFound = () => {
|
|
|
4964
4976
|
var NoDataFound_default = NoDataFound;
|
|
4965
4977
|
|
|
4966
4978
|
// src/components/Pagination.tsx
|
|
4967
|
-
var
|
|
4979
|
+
var import_react49 = require("react");
|
|
4968
4980
|
init_StyleTypes();
|
|
4969
4981
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4970
4982
|
var Pagination = (props) => {
|
|
4971
4983
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4972
|
-
const builder = (0,
|
|
4984
|
+
const builder = (0, import_react49.useMemo)(() => {
|
|
4973
4985
|
const b = new OdataBuilder(path);
|
|
4974
4986
|
if (query) b.setQuery(query);
|
|
4975
4987
|
return b;
|
|
@@ -5448,7 +5460,7 @@ var DivContainer = async (props) => {
|
|
|
5448
5460
|
}
|
|
5449
5461
|
const SelectedNode = NodeTypes2[node.type];
|
|
5450
5462
|
if (!SelectedNode) return null;
|
|
5451
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5452
5464
|
SelectedNode,
|
|
5453
5465
|
{
|
|
5454
5466
|
node,
|
|
@@ -5463,7 +5475,8 @@ var DivContainer = async (props) => {
|
|
|
5463
5475
|
dataitem,
|
|
5464
5476
|
href,
|
|
5465
5477
|
assetBaseUrl: props2.assetBaseUrl,
|
|
5466
|
-
device: props2.device
|
|
5478
|
+
device: props2.device,
|
|
5479
|
+
widgetRenderer: props2.widgetRenderer
|
|
5467
5480
|
}
|
|
5468
5481
|
) }, key);
|
|
5469
5482
|
}
|
|
@@ -5549,9 +5562,9 @@ var DivContainer = async (props) => {
|
|
|
5549
5562
|
props.node.autoFormat && "auto-format",
|
|
5550
5563
|
props.node.bgClass
|
|
5551
5564
|
].filter(Boolean).join(" ");
|
|
5552
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react50.default.Fragment, { children: [
|
|
5553
5566
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
5554
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5567
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5555
5568
|
Wrapper,
|
|
5556
5569
|
{
|
|
5557
5570
|
id: guid,
|
|
@@ -5560,7 +5573,7 @@ var DivContainer = async (props) => {
|
|
|
5560
5573
|
...wrapperProps,
|
|
5561
5574
|
children: dataToRender.map(
|
|
5562
5575
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
5563
|
-
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5576
|
+
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: child }, i)
|
|
5564
5577
|
) : renderChildren(props.node.children, props, item, idx)
|
|
5565
5578
|
)
|
|
5566
5579
|
}
|
|
@@ -5599,11 +5612,11 @@ var PageBodyRenderer = (props) => {
|
|
|
5599
5612
|
if (pageBodyTree && pageBodyTree.root) {
|
|
5600
5613
|
rootNode = pageBodyTree.root;
|
|
5601
5614
|
}
|
|
5602
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react51.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
5603
5616
|
{
|
|
5604
5617
|
}
|
|
5605
5618
|
const SelectedNode = NodeTypes[node.type];
|
|
5606
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react51.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5607
5620
|
SelectedNode,
|
|
5608
5621
|
{
|
|
5609
5622
|
node,
|
|
@@ -5616,9 +5629,10 @@ var PageBodyRenderer = (props) => {
|
|
|
5616
5629
|
apiBaseUrl: props.apiBaseUrl,
|
|
5617
5630
|
serviceClient: props.serviceClient,
|
|
5618
5631
|
assetBaseUrl: props.assetBaseUrl,
|
|
5619
|
-
device: props.device
|
|
5632
|
+
device: props.device,
|
|
5633
|
+
widgetRenderer: props.widgetRenderer
|
|
5620
5634
|
}
|
|
5621
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5635
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5622
5636
|
SelectedNode,
|
|
5623
5637
|
{
|
|
5624
5638
|
node,
|
|
@@ -5630,7 +5644,8 @@ var PageBodyRenderer = (props) => {
|
|
|
5630
5644
|
apiBaseUrl: props.apiBaseUrl,
|
|
5631
5645
|
serviceClient: props.serviceClient,
|
|
5632
5646
|
assetBaseUrl: props.assetBaseUrl,
|
|
5633
|
-
device: props.device
|
|
5647
|
+
device: props.device,
|
|
5648
|
+
widgetRenderer: props.widgetRenderer
|
|
5634
5649
|
}
|
|
5635
5650
|
) }) }) }, index);
|
|
5636
5651
|
}) });
|
package/dist/index.mjs
CHANGED
|
@@ -2467,13 +2467,13 @@ var DataList = (props) => {
|
|
|
2467
2467
|
var DataList_default = DataList;
|
|
2468
2468
|
|
|
2469
2469
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2470
|
-
import
|
|
2470
|
+
import React43 from "react";
|
|
2471
2471
|
|
|
2472
2472
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2473
2473
|
import React32 from "react";
|
|
2474
2474
|
|
|
2475
2475
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
2476
|
-
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2476
|
+
import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2477
2477
|
var TextNode = (props) => {
|
|
2478
2478
|
function cssStringToJson(cssString) {
|
|
2479
2479
|
const styleObject = {};
|
|
@@ -2530,10 +2530,17 @@ var TextNode = (props) => {
|
|
|
2530
2530
|
return key in dataItem ? dataItem[key] : `{${key}}`;
|
|
2531
2531
|
});
|
|
2532
2532
|
}
|
|
2533
|
+
function renderWithLineBreaks(text) {
|
|
2534
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs24("span", { children: [
|
|
2535
|
+
line,
|
|
2536
|
+
index < arr.length - 1 && /* @__PURE__ */ jsx36("br", {})
|
|
2537
|
+
] }, index));
|
|
2538
|
+
}
|
|
2533
2539
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
2540
|
+
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
2534
2541
|
return (
|
|
2535
2542
|
// @ts-expect-error custom code
|
|
2536
|
-
/* @__PURE__ */ jsx36("span", { style: { ...styles }, className: getFormatClass(props.node.format), children:
|
|
2543
|
+
/* @__PURE__ */ jsx36("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
|
|
2537
2544
|
);
|
|
2538
2545
|
};
|
|
2539
2546
|
var TextNode_default = TextNode;
|
|
@@ -2824,7 +2831,7 @@ var ImageNode_default = ImageNode;
|
|
|
2824
2831
|
|
|
2825
2832
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2826
2833
|
import dynamic2 from "next/dynamic";
|
|
2827
|
-
import { Fragment as Fragment4, jsx as jsx40, jsxs as
|
|
2834
|
+
import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2828
2835
|
var LinkNodeButton = dynamic2(() => import("./LinkNodeButton-KBSXOEHS.mjs"), {
|
|
2829
2836
|
ssr: false
|
|
2830
2837
|
});
|
|
@@ -2898,7 +2905,7 @@ var LinkNode = (props) => {
|
|
|
2898
2905
|
return null;
|
|
2899
2906
|
};
|
|
2900
2907
|
if (isButton) {
|
|
2901
|
-
return /* @__PURE__ */
|
|
2908
|
+
return /* @__PURE__ */ jsxs25(
|
|
2902
2909
|
LinkNodeButton,
|
|
2903
2910
|
{
|
|
2904
2911
|
node,
|
|
@@ -2916,7 +2923,7 @@ var LinkNode = (props) => {
|
|
|
2916
2923
|
}
|
|
2917
2924
|
);
|
|
2918
2925
|
}
|
|
2919
|
-
return /* @__PURE__ */
|
|
2926
|
+
return /* @__PURE__ */ jsxs25(
|
|
2920
2927
|
Hyperlink,
|
|
2921
2928
|
{
|
|
2922
2929
|
href: linkUrl || "#",
|
|
@@ -3071,7 +3078,8 @@ var DatafieldNode = (props) => {
|
|
|
3071
3078
|
path: props.path,
|
|
3072
3079
|
apiBaseUrl: props.apiBaseUrl,
|
|
3073
3080
|
breadcrumb: props.breadcrumb,
|
|
3074
|
-
donotApplyContainerClass: true
|
|
3081
|
+
donotApplyContainerClass: true,
|
|
3082
|
+
widgetRenderer: props.widgetRenderer
|
|
3075
3083
|
}
|
|
3076
3084
|
);
|
|
3077
3085
|
}
|
|
@@ -3093,7 +3101,7 @@ var DatafieldNode = (props) => {
|
|
|
3093
3101
|
var DatafieldNode_default = DatafieldNode;
|
|
3094
3102
|
|
|
3095
3103
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
3096
|
-
import { Fragment as Fragment5, jsx as jsx44, jsxs as
|
|
3104
|
+
import { Fragment as Fragment5, jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3097
3105
|
var ParagraphNode = (props) => {
|
|
3098
3106
|
const NodeTypes2 = {
|
|
3099
3107
|
["text"]: TextNode_default,
|
|
@@ -3127,7 +3135,7 @@ var ParagraphNode = (props) => {
|
|
|
3127
3135
|
) }, index);
|
|
3128
3136
|
}) });
|
|
3129
3137
|
}
|
|
3130
|
-
return /* @__PURE__ */
|
|
3138
|
+
return /* @__PURE__ */ jsxs26("div", { className: " " + formatClasses, children: [
|
|
3131
3139
|
hasChildren && props.node.children.map((node, index) => {
|
|
3132
3140
|
const SelectedNode = NodeTypes2[node.type];
|
|
3133
3141
|
return /* @__PURE__ */ jsx44(React32.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(
|
|
@@ -3215,12 +3223,12 @@ var ListItemNode = (props) => {
|
|
|
3215
3223
|
var ListItemNode_default = ListItemNode;
|
|
3216
3224
|
|
|
3217
3225
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
3218
|
-
import { jsx as jsx47, jsxs as
|
|
3226
|
+
import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3219
3227
|
var ListNode = (props) => {
|
|
3220
3228
|
const NodeTypes2 = {
|
|
3221
3229
|
listitem: ListItemNode_default
|
|
3222
3230
|
};
|
|
3223
|
-
return /* @__PURE__ */
|
|
3231
|
+
return /* @__PURE__ */ jsxs27(React35.Fragment, { children: [
|
|
3224
3232
|
props.node.listType == "bullet" && /* @__PURE__ */ jsx47("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3225
3233
|
const SelectedNode = NodeTypes2[node.type];
|
|
3226
3234
|
return /* @__PURE__ */ jsx47(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
@@ -3252,7 +3260,7 @@ var QuoteNode_default = QuoteNode;
|
|
|
3252
3260
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3253
3261
|
import React37 from "react";
|
|
3254
3262
|
import dynamic3 from "next/dynamic";
|
|
3255
|
-
import { jsx as jsx49, jsxs as
|
|
3263
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3256
3264
|
var CopyButton = dynamic3(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
3257
3265
|
ssr: false,
|
|
3258
3266
|
// optional: fallback UI while loading
|
|
@@ -3270,8 +3278,8 @@ var CodeNode = (props) => {
|
|
|
3270
3278
|
if (node.type === "link") return node.text || node.url || "";
|
|
3271
3279
|
return "";
|
|
3272
3280
|
}).join("") ?? "";
|
|
3273
|
-
return /* @__PURE__ */
|
|
3274
|
-
/* @__PURE__ */
|
|
3281
|
+
return /* @__PURE__ */ jsxs28("div", { children: [
|
|
3282
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
3275
3283
|
/* @__PURE__ */ jsx49("span", { children: "Code Snippet" }),
|
|
3276
3284
|
/* @__PURE__ */ jsx49(CopyButton, { text: textContent })
|
|
3277
3285
|
] }),
|
|
@@ -3299,7 +3307,8 @@ var HorizontalRuleNode = () => {
|
|
|
3299
3307
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3300
3308
|
|
|
3301
3309
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3302
|
-
import
|
|
3310
|
+
import React38 from "react";
|
|
3311
|
+
import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3303
3312
|
var WidgetNode = (props) => {
|
|
3304
3313
|
const getWidgetParameters = () => {
|
|
3305
3314
|
const widgetInputParameters = {
|
|
@@ -3363,7 +3372,7 @@ var WidgetNode = (props) => {
|
|
|
3363
3372
|
if (process.env.NODE_ENV !== "production") {
|
|
3364
3373
|
console.warn("Widget not found:", widgetCode);
|
|
3365
3374
|
}
|
|
3366
|
-
return /* @__PURE__ */
|
|
3375
|
+
return /* @__PURE__ */ jsxs29(Fragment7, { children: [
|
|
3367
3376
|
"Widget not found: ",
|
|
3368
3377
|
widgetCode
|
|
3369
3378
|
] });
|
|
@@ -3371,23 +3380,26 @@ var WidgetNode = (props) => {
|
|
|
3371
3380
|
const widgetParams = getWidgetParameters();
|
|
3372
3381
|
return (
|
|
3373
3382
|
// eslint-disable-next-line react-hooks/static-components
|
|
3374
|
-
/* @__PURE__ */
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3383
|
+
/* @__PURE__ */ jsxs29(React38.Fragment, { children: [
|
|
3384
|
+
/* @__PURE__ */ jsx51(props.widgetRenderer, {}),
|
|
3385
|
+
/* @__PURE__ */ jsx51(
|
|
3386
|
+
SelectedWidget,
|
|
3387
|
+
{
|
|
3388
|
+
params: widgetParams,
|
|
3389
|
+
query: props.query,
|
|
3390
|
+
session: props.session,
|
|
3391
|
+
host: props.host,
|
|
3392
|
+
path: props.path,
|
|
3393
|
+
apiBaseUrl: props.apiBaseUrl
|
|
3394
|
+
}
|
|
3395
|
+
)
|
|
3396
|
+
] })
|
|
3385
3397
|
);
|
|
3386
3398
|
};
|
|
3387
3399
|
var WidgetNode_default = WidgetNode;
|
|
3388
3400
|
|
|
3389
3401
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3390
|
-
import
|
|
3402
|
+
import React39, { useRef as useRef3, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect7 } from "react";
|
|
3391
3403
|
|
|
3392
3404
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3393
3405
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
@@ -3421,7 +3433,7 @@ var InputControlNode = (props) => {
|
|
|
3421
3433
|
var InputControlNode_default = InputControlNode;
|
|
3422
3434
|
|
|
3423
3435
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3424
|
-
import { jsx as jsx53, jsxs as
|
|
3436
|
+
import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3425
3437
|
var FormContainerNode = (props) => {
|
|
3426
3438
|
const NodeTypes2 = {
|
|
3427
3439
|
["input-control"]: InputControlNode_default
|
|
@@ -3451,12 +3463,12 @@ var FormContainerNode = (props) => {
|
|
|
3451
3463
|
};
|
|
3452
3464
|
fetchInitialData();
|
|
3453
3465
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3454
|
-
return /* @__PURE__ */
|
|
3466
|
+
return /* @__PURE__ */ jsxs30("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3455
3467
|
node.children && node.children.map((node2, index) => {
|
|
3456
3468
|
{
|
|
3457
3469
|
}
|
|
3458
3470
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3459
|
-
return /* @__PURE__ */ jsx53(
|
|
3471
|
+
return /* @__PURE__ */ jsx53(React39.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx53(
|
|
3460
3472
|
InputControlNode_default,
|
|
3461
3473
|
{
|
|
3462
3474
|
value: formState.inputValues[node2.name],
|
|
@@ -3471,7 +3483,7 @@ var FormContainerNode = (props) => {
|
|
|
3471
3483
|
var FormContainerNode_default = FormContainerNode;
|
|
3472
3484
|
|
|
3473
3485
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3474
|
-
import
|
|
3486
|
+
import React42 from "react";
|
|
3475
3487
|
|
|
3476
3488
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3477
3489
|
import dynamic4 from "next/dynamic";
|
|
@@ -3493,8 +3505,8 @@ var EmbedNode = (props) => {
|
|
|
3493
3505
|
var EmbedNode_default = EmbedNode;
|
|
3494
3506
|
|
|
3495
3507
|
// src/components/Slider.tsx
|
|
3496
|
-
import
|
|
3497
|
-
import { Fragment as Fragment8, jsx as jsx55, jsxs as
|
|
3508
|
+
import React40, { useState as useState6, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3509
|
+
import { Fragment as Fragment8, jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3498
3510
|
var Slider = ({
|
|
3499
3511
|
children,
|
|
3500
3512
|
slidesToShow = 4,
|
|
@@ -3588,7 +3600,7 @@ var Slider = ({
|
|
|
3588
3600
|
};
|
|
3589
3601
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3590
3602
|
const slides = Children.map(children, (child, index) => {
|
|
3591
|
-
if (!
|
|
3603
|
+
if (!React40.isValidElement(child)) return null;
|
|
3592
3604
|
const childProps = child.props;
|
|
3593
3605
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3594
3606
|
return /* @__PURE__ */ jsx55(
|
|
@@ -3614,7 +3626,7 @@ var Slider = ({
|
|
|
3614
3626
|
return "bottom-4";
|
|
3615
3627
|
}
|
|
3616
3628
|
};
|
|
3617
|
-
return /* @__PURE__ */
|
|
3629
|
+
return /* @__PURE__ */ jsxs31(
|
|
3618
3630
|
"div",
|
|
3619
3631
|
{
|
|
3620
3632
|
className: `relative w-full overflow-hidden ${className}`,
|
|
@@ -3632,7 +3644,7 @@ var Slider = ({
|
|
|
3632
3644
|
children: slides
|
|
3633
3645
|
}
|
|
3634
3646
|
),
|
|
3635
|
-
show_arrows && /* @__PURE__ */
|
|
3647
|
+
show_arrows && /* @__PURE__ */ jsxs31(Fragment8, { children: [
|
|
3636
3648
|
/* @__PURE__ */ jsx55(
|
|
3637
3649
|
ArrowButton,
|
|
3638
3650
|
{
|
|
@@ -3643,7 +3655,7 @@ var Slider = ({
|
|
|
3643
3655
|
children: /* @__PURE__ */ jsx55("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__ */ jsx55("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3644
3656
|
}
|
|
3645
3657
|
),
|
|
3646
|
-
/* @__PURE__ */
|
|
3658
|
+
/* @__PURE__ */ jsxs31(
|
|
3647
3659
|
ArrowButton,
|
|
3648
3660
|
{
|
|
3649
3661
|
direction: "right",
|
|
@@ -3792,7 +3804,7 @@ var ProgressPill = ({
|
|
|
3792
3804
|
}
|
|
3793
3805
|
return null;
|
|
3794
3806
|
};
|
|
3795
|
-
return /* @__PURE__ */
|
|
3807
|
+
return /* @__PURE__ */ jsxs31(
|
|
3796
3808
|
"button",
|
|
3797
3809
|
{
|
|
3798
3810
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -3968,9 +3980,9 @@ var PathUtility = class {
|
|
|
3968
3980
|
var PathUtility_default = new PathUtility();
|
|
3969
3981
|
|
|
3970
3982
|
// src/components/NoDataFound.tsx
|
|
3971
|
-
import { jsx as jsx56, jsxs as
|
|
3983
|
+
import { jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3972
3984
|
var NoDataFound = () => {
|
|
3973
|
-
return /* @__PURE__ */
|
|
3985
|
+
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
3974
3986
|
/* @__PURE__ */ jsx56("div", { className: "mb-5", children: /* @__PURE__ */ jsx56("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx56(
|
|
3975
3987
|
"svg",
|
|
3976
3988
|
{
|
|
@@ -3998,7 +4010,7 @@ var NoDataFound_default = NoDataFound;
|
|
|
3998
4010
|
|
|
3999
4011
|
// src/components/Pagination.tsx
|
|
4000
4012
|
import { useMemo } from "react";
|
|
4001
|
-
import { jsx as jsx57, jsxs as
|
|
4013
|
+
import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4002
4014
|
var Pagination = (props) => {
|
|
4003
4015
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4004
4016
|
const builder = useMemo(() => {
|
|
@@ -4069,11 +4081,11 @@ var Pagination = (props) => {
|
|
|
4069
4081
|
);
|
|
4070
4082
|
};
|
|
4071
4083
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4072
|
-
return /* @__PURE__ */
|
|
4073
|
-
/* @__PURE__ */
|
|
4074
|
-
/* @__PURE__ */
|
|
4084
|
+
return /* @__PURE__ */ jsxs33("div", { className: "py-6 border-t bg-default", children: [
|
|
4085
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4086
|
+
/* @__PURE__ */ jsxs33("div", { className: "text-sm", children: [
|
|
4075
4087
|
"Showing ",
|
|
4076
|
-
/* @__PURE__ */
|
|
4088
|
+
/* @__PURE__ */ jsxs33("span", { className: "font-semibold", children: [
|
|
4077
4089
|
startItem,
|
|
4078
4090
|
"-",
|
|
4079
4091
|
endItem
|
|
@@ -4083,8 +4095,8 @@ var Pagination = (props) => {
|
|
|
4083
4095
|
/* @__PURE__ */ jsx57("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4084
4096
|
" results"
|
|
4085
4097
|
] }),
|
|
4086
|
-
totalPages > 1 && /* @__PURE__ */
|
|
4087
|
-
/* @__PURE__ */
|
|
4098
|
+
totalPages > 1 && /* @__PURE__ */ jsxs33("div", { className: "flex items-center space-x-1", children: [
|
|
4099
|
+
/* @__PURE__ */ jsxs33(
|
|
4088
4100
|
NavigationButton,
|
|
4089
4101
|
{
|
|
4090
4102
|
page: activePageNumber - 1,
|
|
@@ -4109,7 +4121,7 @@ var Pagination = (props) => {
|
|
|
4109
4121
|
const page = item;
|
|
4110
4122
|
return /* @__PURE__ */ jsx57(PageButton, { page, children: page }, page);
|
|
4111
4123
|
}),
|
|
4112
|
-
/* @__PURE__ */
|
|
4124
|
+
/* @__PURE__ */ jsxs33(
|
|
4113
4125
|
NavigationButton,
|
|
4114
4126
|
{
|
|
4115
4127
|
page: activePageNumber + 1,
|
|
@@ -4121,7 +4133,7 @@ var Pagination = (props) => {
|
|
|
4121
4133
|
}
|
|
4122
4134
|
)
|
|
4123
4135
|
] }),
|
|
4124
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
4136
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs33("div", { className: "flex items-center space-x-2", children: [
|
|
4125
4137
|
/* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Go to:" }),
|
|
4126
4138
|
/* @__PURE__ */ jsx57("div", { className: "relative", children: /* @__PURE__ */ jsx57(
|
|
4127
4139
|
"input",
|
|
@@ -4144,7 +4156,7 @@ var Pagination = (props) => {
|
|
|
4144
4156
|
) })
|
|
4145
4157
|
] })
|
|
4146
4158
|
] }),
|
|
4147
|
-
showPageSizeSelector && /* @__PURE__ */ jsx57("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */
|
|
4159
|
+
showPageSizeSelector && /* @__PURE__ */ jsx57("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4148
4160
|
/* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Show:" }),
|
|
4149
4161
|
/* @__PURE__ */ jsx57("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx57(
|
|
4150
4162
|
Hyperlink,
|
|
@@ -4258,7 +4270,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
4258
4270
|
|
|
4259
4271
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4260
4272
|
import Link2 from "next/link";
|
|
4261
|
-
import { jsx as jsx59, jsxs as
|
|
4273
|
+
import { jsx as jsx59, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4262
4274
|
function toCamelCase(str) {
|
|
4263
4275
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4264
4276
|
}
|
|
@@ -4480,7 +4492,7 @@ var DivContainer = async (props) => {
|
|
|
4480
4492
|
}
|
|
4481
4493
|
const SelectedNode = NodeTypes2[node.type];
|
|
4482
4494
|
if (!SelectedNode) return null;
|
|
4483
|
-
return /* @__PURE__ */ jsx59(
|
|
4495
|
+
return /* @__PURE__ */ jsx59(React42.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4484
4496
|
SelectedNode,
|
|
4485
4497
|
{
|
|
4486
4498
|
node,
|
|
@@ -4495,7 +4507,8 @@ var DivContainer = async (props) => {
|
|
|
4495
4507
|
dataitem,
|
|
4496
4508
|
href,
|
|
4497
4509
|
assetBaseUrl: props2.assetBaseUrl,
|
|
4498
|
-
device: props2.device
|
|
4510
|
+
device: props2.device,
|
|
4511
|
+
widgetRenderer: props2.widgetRenderer
|
|
4499
4512
|
}
|
|
4500
4513
|
) }, key);
|
|
4501
4514
|
}
|
|
@@ -4581,9 +4594,9 @@ var DivContainer = async (props) => {
|
|
|
4581
4594
|
props.node.autoFormat && "auto-format",
|
|
4582
4595
|
props.node.bgClass
|
|
4583
4596
|
].filter(Boolean).join(" ");
|
|
4584
|
-
return /* @__PURE__ */
|
|
4597
|
+
return /* @__PURE__ */ jsxs34(React42.Fragment, { children: [
|
|
4585
4598
|
/* @__PURE__ */ jsx59("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4586
|
-
/* @__PURE__ */ jsx59(
|
|
4599
|
+
/* @__PURE__ */ jsx59(React42.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4587
4600
|
Wrapper,
|
|
4588
4601
|
{
|
|
4589
4602
|
id: guid,
|
|
@@ -4592,7 +4605,7 @@ var DivContainer = async (props) => {
|
|
|
4592
4605
|
...wrapperProps,
|
|
4593
4606
|
children: dataToRender.map(
|
|
4594
4607
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4595
|
-
(child, i) => /* @__PURE__ */ jsx59(
|
|
4608
|
+
(child, i) => /* @__PURE__ */ jsx59(React42.Fragment, { children: child }, i)
|
|
4596
4609
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4597
4610
|
)
|
|
4598
4611
|
}
|
|
@@ -4631,11 +4644,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4631
4644
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4632
4645
|
rootNode = pageBodyTree.root;
|
|
4633
4646
|
}
|
|
4634
|
-
return /* @__PURE__ */ jsx60(
|
|
4647
|
+
return /* @__PURE__ */ jsx60(React43.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4635
4648
|
{
|
|
4636
4649
|
}
|
|
4637
4650
|
const SelectedNode = NodeTypes[node.type];
|
|
4638
|
-
return /* @__PURE__ */ jsx60(
|
|
4651
|
+
return /* @__PURE__ */ jsx60(React43.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx60(React43.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx60(React43.Fragment, { children: /* @__PURE__ */ jsx60(
|
|
4639
4652
|
SelectedNode,
|
|
4640
4653
|
{
|
|
4641
4654
|
node,
|
|
@@ -4648,9 +4661,10 @@ var PageBodyRenderer = (props) => {
|
|
|
4648
4661
|
apiBaseUrl: props.apiBaseUrl,
|
|
4649
4662
|
serviceClient: props.serviceClient,
|
|
4650
4663
|
assetBaseUrl: props.assetBaseUrl,
|
|
4651
|
-
device: props.device
|
|
4664
|
+
device: props.device,
|
|
4665
|
+
widgetRenderer: props.widgetRenderer
|
|
4652
4666
|
}
|
|
4653
|
-
) }) : /* @__PURE__ */ jsx60(
|
|
4667
|
+
) }) : /* @__PURE__ */ jsx60(React43.Fragment, { children: /* @__PURE__ */ jsx60(
|
|
4654
4668
|
SelectedNode,
|
|
4655
4669
|
{
|
|
4656
4670
|
node,
|
|
@@ -4662,7 +4676,8 @@ var PageBodyRenderer = (props) => {
|
|
|
4662
4676
|
apiBaseUrl: props.apiBaseUrl,
|
|
4663
4677
|
serviceClient: props.serviceClient,
|
|
4664
4678
|
assetBaseUrl: props.assetBaseUrl,
|
|
4665
|
-
device: props.device
|
|
4679
|
+
device: props.device,
|
|
4680
|
+
widgetRenderer: props.widgetRenderer
|
|
4666
4681
|
}
|
|
4667
4682
|
) }) }) }, index);
|
|
4668
4683
|
}) });
|
package/package.json
CHANGED