@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260414103409 → 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 +65 -57
- package/dist/index.mjs +36 -28
- 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,7 +3428,7 @@ 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"));
|
|
@@ -4041,7 +4041,8 @@ var DatafieldNode = (props) => {
|
|
|
4041
4041
|
path: props.path,
|
|
4042
4042
|
apiBaseUrl: props.apiBaseUrl,
|
|
4043
4043
|
breadcrumb: props.breadcrumb,
|
|
4044
|
-
donotApplyContainerClass: true
|
|
4044
|
+
donotApplyContainerClass: true,
|
|
4045
|
+
widgetRenderer: props.widgetRenderer
|
|
4045
4046
|
}
|
|
4046
4047
|
);
|
|
4047
4048
|
}
|
|
@@ -4269,6 +4270,7 @@ var HorizontalRuleNode = () => {
|
|
|
4269
4270
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
4270
4271
|
|
|
4271
4272
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
4273
|
+
var import_react44 = __toESM(require("react"));
|
|
4272
4274
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4273
4275
|
var WidgetNode = (props) => {
|
|
4274
4276
|
const getWidgetParameters = () => {
|
|
@@ -4341,23 +4343,26 @@ var WidgetNode = (props) => {
|
|
|
4341
4343
|
const widgetParams = getWidgetParameters();
|
|
4342
4344
|
return (
|
|
4343
4345
|
// eslint-disable-next-line react-hooks/static-components
|
|
4344
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
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
|
+
] })
|
|
4355
4360
|
);
|
|
4356
4361
|
};
|
|
4357
4362
|
var WidgetNode_default = WidgetNode;
|
|
4358
4363
|
|
|
4359
4364
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
4360
|
-
var
|
|
4365
|
+
var import_react45 = __toESM(require("react"));
|
|
4361
4366
|
|
|
4362
4367
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
4363
4368
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
@@ -4398,16 +4403,16 @@ var FormContainerNode = (props) => {
|
|
|
4398
4403
|
["input-control"]: InputControlNode_default
|
|
4399
4404
|
};
|
|
4400
4405
|
const { node } = props;
|
|
4401
|
-
const formRef = (0,
|
|
4406
|
+
const formRef = (0, import_react45.useRef)(null);
|
|
4402
4407
|
const initialState = {
|
|
4403
4408
|
inputValues: {},
|
|
4404
4409
|
lastPropertyChanged: ""
|
|
4405
4410
|
};
|
|
4406
|
-
const [formState, dispatch] = (0,
|
|
4407
|
-
const handleInputChange = (0,
|
|
4411
|
+
const [formState, dispatch] = (0, import_react45.useReducer)(FormReducer_default, initialState);
|
|
4412
|
+
const handleInputChange = (0, import_react45.useCallback)((updatedValues) => {
|
|
4408
4413
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
4409
4414
|
}, [dispatch]);
|
|
4410
|
-
(0,
|
|
4415
|
+
(0, import_react45.useEffect)(() => {
|
|
4411
4416
|
const fetchInitialData = async () => {
|
|
4412
4417
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
4413
4418
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -4427,7 +4432,7 @@ var FormContainerNode = (props) => {
|
|
|
4427
4432
|
{
|
|
4428
4433
|
}
|
|
4429
4434
|
const SelectedNode = NodeTypes2[node2.type];
|
|
4430
|
-
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)(
|
|
4431
4436
|
InputControlNode_default,
|
|
4432
4437
|
{
|
|
4433
4438
|
value: formState.inputValues[node2.name],
|
|
@@ -4442,7 +4447,7 @@ var FormContainerNode = (props) => {
|
|
|
4442
4447
|
var FormContainerNode_default = FormContainerNode;
|
|
4443
4448
|
|
|
4444
4449
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4445
|
-
var
|
|
4450
|
+
var import_react50 = __toESM(require("react"));
|
|
4446
4451
|
|
|
4447
4452
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
4448
4453
|
var import_dynamic4 = __toESM(require("next/dynamic"));
|
|
@@ -4467,7 +4472,7 @@ var EmbedNode_default = EmbedNode;
|
|
|
4467
4472
|
init_ServiceClient();
|
|
4468
4473
|
|
|
4469
4474
|
// src/components/Slider.tsx
|
|
4470
|
-
var
|
|
4475
|
+
var import_react48 = __toESM(require("react"));
|
|
4471
4476
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4472
4477
|
var Slider = ({
|
|
4473
4478
|
children,
|
|
@@ -4486,13 +4491,13 @@ var Slider = ({
|
|
|
4486
4491
|
pillStyle = "cumulative",
|
|
4487
4492
|
progressPosition = "bottom"
|
|
4488
4493
|
}) => {
|
|
4489
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
4490
|
-
const [transition, setTransition] = (0,
|
|
4491
|
-
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)(
|
|
4492
4497
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
4493
4498
|
);
|
|
4494
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
4495
|
-
(0,
|
|
4499
|
+
const [isPlaying, setIsPlaying] = (0, import_react48.useState)(autoplay);
|
|
4500
|
+
(0, import_react48.useEffect)(() => {
|
|
4496
4501
|
if (typeof slidesToShow === "number") return;
|
|
4497
4502
|
const handleResize = () => {
|
|
4498
4503
|
if (window.innerWidth >= 1024) {
|
|
@@ -4507,7 +4512,7 @@ var Slider = ({
|
|
|
4507
4512
|
window.addEventListener("resize", handleResize);
|
|
4508
4513
|
return () => window.removeEventListener("resize", handleResize);
|
|
4509
4514
|
}, [slidesToShow]);
|
|
4510
|
-
(0,
|
|
4515
|
+
(0, import_react48.useEffect)(() => {
|
|
4511
4516
|
if (!autoplay) return;
|
|
4512
4517
|
const timer = setInterval(() => {
|
|
4513
4518
|
if (isPlaying) {
|
|
@@ -4516,7 +4521,7 @@ var Slider = ({
|
|
|
4516
4521
|
}, autoplay_speed);
|
|
4517
4522
|
return () => clearInterval(timer);
|
|
4518
4523
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
4519
|
-
const totalSlides =
|
|
4524
|
+
const totalSlides = import_react48.Children.count(children);
|
|
4520
4525
|
const maxSlide = totalSlides - slidesToShowState;
|
|
4521
4526
|
const nextSlide = () => {
|
|
4522
4527
|
if (currentSlide >= maxSlide) {
|
|
@@ -4561,8 +4566,8 @@ var Slider = ({
|
|
|
4561
4566
|
}
|
|
4562
4567
|
};
|
|
4563
4568
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
4564
|
-
const slides =
|
|
4565
|
-
if (!
|
|
4569
|
+
const slides = import_react48.Children.map(children, (child, index) => {
|
|
4570
|
+
if (!import_react48.default.isValidElement(child)) return null;
|
|
4566
4571
|
const childProps = child.props;
|
|
4567
4572
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4568
4573
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
@@ -4570,7 +4575,7 @@ var Slider = ({
|
|
|
4570
4575
|
{
|
|
4571
4576
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
4572
4577
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
4573
|
-
children: (0,
|
|
4578
|
+
children: (0, import_react48.cloneElement)(child, {
|
|
4574
4579
|
className: mergedClassName
|
|
4575
4580
|
})
|
|
4576
4581
|
},
|
|
@@ -4683,13 +4688,13 @@ var ProgressPill = ({
|
|
|
4683
4688
|
currentSlide,
|
|
4684
4689
|
totalSlides
|
|
4685
4690
|
}) => {
|
|
4686
|
-
const [progress, setProgress] = (0,
|
|
4687
|
-
(0,
|
|
4691
|
+
const [progress, setProgress] = (0, import_react48.useState)(0);
|
|
4692
|
+
(0, import_react48.useEffect)(() => {
|
|
4688
4693
|
if (active) {
|
|
4689
4694
|
setProgress(0);
|
|
4690
4695
|
}
|
|
4691
4696
|
}, [active, index]);
|
|
4692
|
-
(0,
|
|
4697
|
+
(0, import_react48.useEffect)(() => {
|
|
4693
4698
|
if (!active || !isPlaying) {
|
|
4694
4699
|
if (!active) {
|
|
4695
4700
|
setProgress(0);
|
|
@@ -4971,12 +4976,12 @@ var NoDataFound = () => {
|
|
|
4971
4976
|
var NoDataFound_default = NoDataFound;
|
|
4972
4977
|
|
|
4973
4978
|
// src/components/Pagination.tsx
|
|
4974
|
-
var
|
|
4979
|
+
var import_react49 = require("react");
|
|
4975
4980
|
init_StyleTypes();
|
|
4976
4981
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4977
4982
|
var Pagination = (props) => {
|
|
4978
4983
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4979
|
-
const builder = (0,
|
|
4984
|
+
const builder = (0, import_react49.useMemo)(() => {
|
|
4980
4985
|
const b = new OdataBuilder(path);
|
|
4981
4986
|
if (query) b.setQuery(query);
|
|
4982
4987
|
return b;
|
|
@@ -5455,7 +5460,7 @@ var DivContainer = async (props) => {
|
|
|
5455
5460
|
}
|
|
5456
5461
|
const SelectedNode = NodeTypes2[node.type];
|
|
5457
5462
|
if (!SelectedNode) return null;
|
|
5458
|
-
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)(
|
|
5459
5464
|
SelectedNode,
|
|
5460
5465
|
{
|
|
5461
5466
|
node,
|
|
@@ -5470,7 +5475,8 @@ var DivContainer = async (props) => {
|
|
|
5470
5475
|
dataitem,
|
|
5471
5476
|
href,
|
|
5472
5477
|
assetBaseUrl: props2.assetBaseUrl,
|
|
5473
|
-
device: props2.device
|
|
5478
|
+
device: props2.device,
|
|
5479
|
+
widgetRenderer: props2.widgetRenderer
|
|
5474
5480
|
}
|
|
5475
5481
|
) }, key);
|
|
5476
5482
|
}
|
|
@@ -5556,9 +5562,9 @@ var DivContainer = async (props) => {
|
|
|
5556
5562
|
props.node.autoFormat && "auto-format",
|
|
5557
5563
|
props.node.bgClass
|
|
5558
5564
|
].filter(Boolean).join(" ");
|
|
5559
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react50.default.Fragment, { children: [
|
|
5560
5566
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
5561
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5567
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5562
5568
|
Wrapper,
|
|
5563
5569
|
{
|
|
5564
5570
|
id: guid,
|
|
@@ -5567,7 +5573,7 @@ var DivContainer = async (props) => {
|
|
|
5567
5573
|
...wrapperProps,
|
|
5568
5574
|
children: dataToRender.map(
|
|
5569
5575
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
5570
|
-
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5576
|
+
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: child }, i)
|
|
5571
5577
|
) : renderChildren(props.node.children, props, item, idx)
|
|
5572
5578
|
)
|
|
5573
5579
|
}
|
|
@@ -5606,11 +5612,11 @@ var PageBodyRenderer = (props) => {
|
|
|
5606
5612
|
if (pageBodyTree && pageBodyTree.root) {
|
|
5607
5613
|
rootNode = pageBodyTree.root;
|
|
5608
5614
|
}
|
|
5609
|
-
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) => {
|
|
5610
5616
|
{
|
|
5611
5617
|
}
|
|
5612
5618
|
const SelectedNode = NodeTypes[node.type];
|
|
5613
|
-
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)(
|
|
5614
5620
|
SelectedNode,
|
|
5615
5621
|
{
|
|
5616
5622
|
node,
|
|
@@ -5623,9 +5629,10 @@ var PageBodyRenderer = (props) => {
|
|
|
5623
5629
|
apiBaseUrl: props.apiBaseUrl,
|
|
5624
5630
|
serviceClient: props.serviceClient,
|
|
5625
5631
|
assetBaseUrl: props.assetBaseUrl,
|
|
5626
|
-
device: props.device
|
|
5632
|
+
device: props.device,
|
|
5633
|
+
widgetRenderer: props.widgetRenderer
|
|
5627
5634
|
}
|
|
5628
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5635
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5629
5636
|
SelectedNode,
|
|
5630
5637
|
{
|
|
5631
5638
|
node,
|
|
@@ -5637,7 +5644,8 @@ var PageBodyRenderer = (props) => {
|
|
|
5637
5644
|
apiBaseUrl: props.apiBaseUrl,
|
|
5638
5645
|
serviceClient: props.serviceClient,
|
|
5639
5646
|
assetBaseUrl: props.assetBaseUrl,
|
|
5640
|
-
device: props.device
|
|
5647
|
+
device: props.device,
|
|
5648
|
+
widgetRenderer: props.widgetRenderer
|
|
5641
5649
|
}
|
|
5642
5650
|
) }) }) }, index);
|
|
5643
5651
|
}) });
|
package/dist/index.mjs
CHANGED
|
@@ -2467,7 +2467,7 @@ 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";
|
|
@@ -3078,7 +3078,8 @@ var DatafieldNode = (props) => {
|
|
|
3078
3078
|
path: props.path,
|
|
3079
3079
|
apiBaseUrl: props.apiBaseUrl,
|
|
3080
3080
|
breadcrumb: props.breadcrumb,
|
|
3081
|
-
donotApplyContainerClass: true
|
|
3081
|
+
donotApplyContainerClass: true,
|
|
3082
|
+
widgetRenderer: props.widgetRenderer
|
|
3082
3083
|
}
|
|
3083
3084
|
);
|
|
3084
3085
|
}
|
|
@@ -3306,6 +3307,7 @@ var HorizontalRuleNode = () => {
|
|
|
3306
3307
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3307
3308
|
|
|
3308
3309
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3310
|
+
import React38 from "react";
|
|
3309
3311
|
import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3310
3312
|
var WidgetNode = (props) => {
|
|
3311
3313
|
const getWidgetParameters = () => {
|
|
@@ -3378,23 +3380,26 @@ var WidgetNode = (props) => {
|
|
|
3378
3380
|
const widgetParams = getWidgetParameters();
|
|
3379
3381
|
return (
|
|
3380
3382
|
// eslint-disable-next-line react-hooks/static-components
|
|
3381
|
-
/* @__PURE__ */
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
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
|
+
] })
|
|
3392
3397
|
);
|
|
3393
3398
|
};
|
|
3394
3399
|
var WidgetNode_default = WidgetNode;
|
|
3395
3400
|
|
|
3396
3401
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3397
|
-
import
|
|
3402
|
+
import React39, { useRef as useRef3, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect7 } from "react";
|
|
3398
3403
|
|
|
3399
3404
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3400
3405
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
@@ -3463,7 +3468,7 @@ var FormContainerNode = (props) => {
|
|
|
3463
3468
|
{
|
|
3464
3469
|
}
|
|
3465
3470
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3466
|
-
return /* @__PURE__ */ jsx53(
|
|
3471
|
+
return /* @__PURE__ */ jsx53(React39.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx53(
|
|
3467
3472
|
InputControlNode_default,
|
|
3468
3473
|
{
|
|
3469
3474
|
value: formState.inputValues[node2.name],
|
|
@@ -3478,7 +3483,7 @@ var FormContainerNode = (props) => {
|
|
|
3478
3483
|
var FormContainerNode_default = FormContainerNode;
|
|
3479
3484
|
|
|
3480
3485
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3481
|
-
import
|
|
3486
|
+
import React42 from "react";
|
|
3482
3487
|
|
|
3483
3488
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3484
3489
|
import dynamic4 from "next/dynamic";
|
|
@@ -3500,7 +3505,7 @@ var EmbedNode = (props) => {
|
|
|
3500
3505
|
var EmbedNode_default = EmbedNode;
|
|
3501
3506
|
|
|
3502
3507
|
// src/components/Slider.tsx
|
|
3503
|
-
import
|
|
3508
|
+
import React40, { useState as useState6, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3504
3509
|
import { Fragment as Fragment8, jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3505
3510
|
var Slider = ({
|
|
3506
3511
|
children,
|
|
@@ -3595,7 +3600,7 @@ var Slider = ({
|
|
|
3595
3600
|
};
|
|
3596
3601
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3597
3602
|
const slides = Children.map(children, (child, index) => {
|
|
3598
|
-
if (!
|
|
3603
|
+
if (!React40.isValidElement(child)) return null;
|
|
3599
3604
|
const childProps = child.props;
|
|
3600
3605
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3601
3606
|
return /* @__PURE__ */ jsx55(
|
|
@@ -4487,7 +4492,7 @@ var DivContainer = async (props) => {
|
|
|
4487
4492
|
}
|
|
4488
4493
|
const SelectedNode = NodeTypes2[node.type];
|
|
4489
4494
|
if (!SelectedNode) return null;
|
|
4490
|
-
return /* @__PURE__ */ jsx59(
|
|
4495
|
+
return /* @__PURE__ */ jsx59(React42.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4491
4496
|
SelectedNode,
|
|
4492
4497
|
{
|
|
4493
4498
|
node,
|
|
@@ -4502,7 +4507,8 @@ var DivContainer = async (props) => {
|
|
|
4502
4507
|
dataitem,
|
|
4503
4508
|
href,
|
|
4504
4509
|
assetBaseUrl: props2.assetBaseUrl,
|
|
4505
|
-
device: props2.device
|
|
4510
|
+
device: props2.device,
|
|
4511
|
+
widgetRenderer: props2.widgetRenderer
|
|
4506
4512
|
}
|
|
4507
4513
|
) }, key);
|
|
4508
4514
|
}
|
|
@@ -4588,9 +4594,9 @@ var DivContainer = async (props) => {
|
|
|
4588
4594
|
props.node.autoFormat && "auto-format",
|
|
4589
4595
|
props.node.bgClass
|
|
4590
4596
|
].filter(Boolean).join(" ");
|
|
4591
|
-
return /* @__PURE__ */ jsxs34(
|
|
4597
|
+
return /* @__PURE__ */ jsxs34(React42.Fragment, { children: [
|
|
4592
4598
|
/* @__PURE__ */ jsx59("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4593
|
-
/* @__PURE__ */ jsx59(
|
|
4599
|
+
/* @__PURE__ */ jsx59(React42.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4594
4600
|
Wrapper,
|
|
4595
4601
|
{
|
|
4596
4602
|
id: guid,
|
|
@@ -4599,7 +4605,7 @@ var DivContainer = async (props) => {
|
|
|
4599
4605
|
...wrapperProps,
|
|
4600
4606
|
children: dataToRender.map(
|
|
4601
4607
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4602
|
-
(child, i) => /* @__PURE__ */ jsx59(
|
|
4608
|
+
(child, i) => /* @__PURE__ */ jsx59(React42.Fragment, { children: child }, i)
|
|
4603
4609
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4604
4610
|
)
|
|
4605
4611
|
}
|
|
@@ -4638,11 +4644,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4638
4644
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4639
4645
|
rootNode = pageBodyTree.root;
|
|
4640
4646
|
}
|
|
4641
|
-
return /* @__PURE__ */ jsx60(
|
|
4647
|
+
return /* @__PURE__ */ jsx60(React43.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4642
4648
|
{
|
|
4643
4649
|
}
|
|
4644
4650
|
const SelectedNode = NodeTypes[node.type];
|
|
4645
|
-
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(
|
|
4646
4652
|
SelectedNode,
|
|
4647
4653
|
{
|
|
4648
4654
|
node,
|
|
@@ -4655,9 +4661,10 @@ var PageBodyRenderer = (props) => {
|
|
|
4655
4661
|
apiBaseUrl: props.apiBaseUrl,
|
|
4656
4662
|
serviceClient: props.serviceClient,
|
|
4657
4663
|
assetBaseUrl: props.assetBaseUrl,
|
|
4658
|
-
device: props.device
|
|
4664
|
+
device: props.device,
|
|
4665
|
+
widgetRenderer: props.widgetRenderer
|
|
4659
4666
|
}
|
|
4660
|
-
) }) : /* @__PURE__ */ jsx60(
|
|
4667
|
+
) }) : /* @__PURE__ */ jsx60(React43.Fragment, { children: /* @__PURE__ */ jsx60(
|
|
4661
4668
|
SelectedNode,
|
|
4662
4669
|
{
|
|
4663
4670
|
node,
|
|
@@ -4669,7 +4676,8 @@ var PageBodyRenderer = (props) => {
|
|
|
4669
4676
|
apiBaseUrl: props.apiBaseUrl,
|
|
4670
4677
|
serviceClient: props.serviceClient,
|
|
4671
4678
|
assetBaseUrl: props.assetBaseUrl,
|
|
4672
|
-
device: props.device
|
|
4679
|
+
device: props.device,
|
|
4680
|
+
widgetRenderer: props.widgetRenderer
|
|
4673
4681
|
}
|
|
4674
4682
|
) }) }) }, index);
|
|
4675
4683
|
}) });
|
package/package.json
CHANGED