@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260324172014 → 0.8.1-dev.20260325073346
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/IframeClient-J22NMEVY.mjs +96 -0
- package/dist/index.js +117 -93
- package/dist/index.mjs +77 -164
- package/package.json +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
4
|
+
import React2, { useEffect, useRef, useState } from "react";
|
|
5
|
+
|
|
6
|
+
// src/components/IFrameLoaderView.tsx
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var IFrameLoaderView = (props) => {
|
|
10
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
11
|
+
props.isDataFound == null && /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsxs("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
12
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center mb-4", children: [
|
|
13
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
14
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-2", children: [
|
|
15
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
16
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
17
|
+
] })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
|
|
21
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
22
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
23
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
24
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
25
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
29
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
30
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
31
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
32
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
|
|
35
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
36
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
37
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
38
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
39
|
+
/* @__PURE__ */ jsx("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
40
|
+
] })
|
|
41
|
+
] })
|
|
42
|
+
] }) }),
|
|
43
|
+
props.children
|
|
44
|
+
] });
|
|
45
|
+
};
|
|
46
|
+
var IFrameLoaderView_default = IFrameLoaderView;
|
|
47
|
+
|
|
48
|
+
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
49
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
50
|
+
var IframeClient = ({ src }) => {
|
|
51
|
+
const iframeRef = useRef(null);
|
|
52
|
+
const [iframeHeight, setIframeHeight] = useState("100%");
|
|
53
|
+
const [isDataFound, setIsDataFound] = useState(null);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
const handleReceiveMessage = (event) => {
|
|
56
|
+
const eventName = event?.data?.eventName;
|
|
57
|
+
const payload = event?.data?.payload;
|
|
58
|
+
if (eventName === "SET_HEIGHT" && payload?.height) {
|
|
59
|
+
let height = 500;
|
|
60
|
+
if (payload.height > 500) {
|
|
61
|
+
height = payload.height + 50;
|
|
62
|
+
}
|
|
63
|
+
setIframeHeight(`${height}px`);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
window.addEventListener("message", handleReceiveMessage);
|
|
67
|
+
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
68
|
+
}, []);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
const handleResize = () => {
|
|
71
|
+
if (iframeRef.current) {
|
|
72
|
+
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
window.addEventListener("resize", handleResize);
|
|
76
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
77
|
+
}, []);
|
|
78
|
+
const handleIframeLoad = () => {
|
|
79
|
+
setIsDataFound(true);
|
|
80
|
+
};
|
|
81
|
+
return /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */ jsx2(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ jsx2(
|
|
82
|
+
"iframe",
|
|
83
|
+
{
|
|
84
|
+
ref: iframeRef,
|
|
85
|
+
src,
|
|
86
|
+
className: "w-full h-full border-none",
|
|
87
|
+
scrolling: "no",
|
|
88
|
+
style: { height: iframeHeight },
|
|
89
|
+
onLoad: handleIframeLoad
|
|
90
|
+
}
|
|
91
|
+
) }) });
|
|
92
|
+
};
|
|
93
|
+
var IframeClient_default = IframeClient;
|
|
94
|
+
export {
|
|
95
|
+
IframeClient_default as default
|
|
96
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function __init() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
8
11
|
var __export = (target, all) => {
|
|
9
12
|
for (var name in all)
|
|
10
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -27,6 +30,114 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
30
|
));
|
|
28
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
32
|
|
|
33
|
+
// src/components/IFrameLoaderView.tsx
|
|
34
|
+
var import_react46, import_jsx_runtime61, IFrameLoaderView, IFrameLoaderView_default;
|
|
35
|
+
var init_IFrameLoaderView = __esm({
|
|
36
|
+
"src/components/IFrameLoaderView.tsx"() {
|
|
37
|
+
"use strict";
|
|
38
|
+
import_react46 = __toESM(require("react"));
|
|
39
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
40
|
+
IFrameLoaderView = (props) => {
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react46.default.Fragment, { children: [
|
|
42
|
+
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: [
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ml-2", children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
71
|
+
] })
|
|
72
|
+
] })
|
|
73
|
+
] }) }),
|
|
74
|
+
props.children
|
|
75
|
+
] });
|
|
76
|
+
};
|
|
77
|
+
IFrameLoaderView_default = IFrameLoaderView;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
82
|
+
var IframeClient_exports = {};
|
|
83
|
+
__export(IframeClient_exports, {
|
|
84
|
+
default: () => IframeClient_default
|
|
85
|
+
});
|
|
86
|
+
var import_react47, import_jsx_runtime62, IframeClient, IframeClient_default;
|
|
87
|
+
var init_IframeClient = __esm({
|
|
88
|
+
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
89
|
+
"use strict";
|
|
90
|
+
"use client";
|
|
91
|
+
import_react47 = __toESM(require("react"));
|
|
92
|
+
init_IFrameLoaderView();
|
|
93
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
94
|
+
IframeClient = ({ src }) => {
|
|
95
|
+
const iframeRef = (0, import_react47.useRef)(null);
|
|
96
|
+
const [iframeHeight, setIframeHeight] = (0, import_react47.useState)("100%");
|
|
97
|
+
const [isDataFound, setIsDataFound] = (0, import_react47.useState)(null);
|
|
98
|
+
(0, import_react47.useEffect)(() => {
|
|
99
|
+
const handleReceiveMessage = (event) => {
|
|
100
|
+
const eventName = event?.data?.eventName;
|
|
101
|
+
const payload = event?.data?.payload;
|
|
102
|
+
if (eventName === "SET_HEIGHT" && payload?.height) {
|
|
103
|
+
let height = 500;
|
|
104
|
+
if (payload.height > 500) {
|
|
105
|
+
height = payload.height + 50;
|
|
106
|
+
}
|
|
107
|
+
setIframeHeight(`${height}px`);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
window.addEventListener("message", handleReceiveMessage);
|
|
111
|
+
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
112
|
+
}, []);
|
|
113
|
+
(0, import_react47.useEffect)(() => {
|
|
114
|
+
const handleResize = () => {
|
|
115
|
+
if (iframeRef.current) {
|
|
116
|
+
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
window.addEventListener("resize", handleResize);
|
|
120
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
121
|
+
}, []);
|
|
122
|
+
const handleIframeLoad = () => {
|
|
123
|
+
setIsDataFound(true);
|
|
124
|
+
};
|
|
125
|
+
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)(
|
|
126
|
+
"iframe",
|
|
127
|
+
{
|
|
128
|
+
ref: iframeRef,
|
|
129
|
+
src,
|
|
130
|
+
className: "w-full h-full border-none",
|
|
131
|
+
scrolling: "no",
|
|
132
|
+
style: { height: iframeHeight },
|
|
133
|
+
onLoad: handleIframeLoad
|
|
134
|
+
}
|
|
135
|
+
) }) });
|
|
136
|
+
};
|
|
137
|
+
IframeClient_default = IframeClient;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
30
141
|
// src/index.ts
|
|
31
142
|
var index_exports = {};
|
|
32
143
|
__export(index_exports, {
|
|
@@ -2878,6 +2989,7 @@ var HeadingNode = (props) => {
|
|
|
2878
2989
|
["text"]: TextNode_default,
|
|
2879
2990
|
["link"]: LinkNode_default,
|
|
2880
2991
|
["svg-icon"]: SVGIconNode_default,
|
|
2992
|
+
["linebreak"]: LineBreakNode_default,
|
|
2881
2993
|
["datafield"]: DatafieldNode_default
|
|
2882
2994
|
};
|
|
2883
2995
|
const HeadingTag = `${props.node.tag}`;
|
|
@@ -3826,100 +3938,12 @@ var FormContainerNode_default = FormContainerNode;
|
|
|
3826
3938
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3827
3939
|
var import_react50 = __toESM(require("react"));
|
|
3828
3940
|
|
|
3829
|
-
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3830
|
-
var import_react47 = __toESM(require("react"));
|
|
3831
|
-
|
|
3832
|
-
// src/components/IFrameLoaderView.tsx
|
|
3833
|
-
var import_react46 = __toESM(require("react"));
|
|
3834
|
-
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3835
|
-
var IFrameLoaderView = (props) => {
|
|
3836
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react46.default.Fragment, { children: [
|
|
3837
|
-
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: [
|
|
3838
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3839
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3840
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ml-2", children: [
|
|
3841
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3842
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3843
|
-
] })
|
|
3844
|
-
] }),
|
|
3845
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3846
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
3847
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3848
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3849
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3850
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3851
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3852
|
-
] }),
|
|
3853
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
3854
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3855
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3856
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3857
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3858
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3859
|
-
] }),
|
|
3860
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
3861
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3862
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3863
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3864
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3865
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3866
|
-
] })
|
|
3867
|
-
] })
|
|
3868
|
-
] }) }),
|
|
3869
|
-
props.children
|
|
3870
|
-
] });
|
|
3871
|
-
};
|
|
3872
|
-
var IFrameLoaderView_default = IFrameLoaderView;
|
|
3873
|
-
|
|
3874
|
-
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3875
|
-
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3876
|
-
var IframeClient = ({ src }) => {
|
|
3877
|
-
const iframeRef = (0, import_react47.useRef)(null);
|
|
3878
|
-
const [iframeHeight, setIframeHeight] = (0, import_react47.useState)("100%");
|
|
3879
|
-
const [isDataFound, setIsDataFound] = (0, import_react47.useState)(null);
|
|
3880
|
-
(0, import_react47.useEffect)(() => {
|
|
3881
|
-
const handleReceiveMessage = (event) => {
|
|
3882
|
-
const eventName = event?.data?.eventName;
|
|
3883
|
-
const payload = event?.data?.payload;
|
|
3884
|
-
if (eventName === "SET_HEIGHT" && payload?.height) {
|
|
3885
|
-
let height = 500;
|
|
3886
|
-
if (payload.height > 500) {
|
|
3887
|
-
height = payload.height + 50;
|
|
3888
|
-
}
|
|
3889
|
-
setIframeHeight(`${height}px`);
|
|
3890
|
-
}
|
|
3891
|
-
};
|
|
3892
|
-
window.addEventListener("message", handleReceiveMessage);
|
|
3893
|
-
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3894
|
-
}, []);
|
|
3895
|
-
(0, import_react47.useEffect)(() => {
|
|
3896
|
-
const handleResize = () => {
|
|
3897
|
-
if (iframeRef.current) {
|
|
3898
|
-
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
3899
|
-
}
|
|
3900
|
-
};
|
|
3901
|
-
window.addEventListener("resize", handleResize);
|
|
3902
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
3903
|
-
}, []);
|
|
3904
|
-
const handleIframeLoad = () => {
|
|
3905
|
-
setIsDataFound(true);
|
|
3906
|
-
};
|
|
3907
|
-
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)(
|
|
3908
|
-
"iframe",
|
|
3909
|
-
{
|
|
3910
|
-
ref: iframeRef,
|
|
3911
|
-
src,
|
|
3912
|
-
className: "w-full h-full border-none",
|
|
3913
|
-
scrolling: "no",
|
|
3914
|
-
style: { height: iframeHeight },
|
|
3915
|
-
onLoad: handleIframeLoad
|
|
3916
|
-
}
|
|
3917
|
-
) }) });
|
|
3918
|
-
};
|
|
3919
|
-
var IframeClient_default = IframeClient;
|
|
3920
|
-
|
|
3921
3941
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3942
|
+
var import_dynamic = __toESM(require("next/dynamic"));
|
|
3922
3943
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3944
|
+
var IframeClient2 = (0, import_dynamic.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
3945
|
+
ssr: false
|
|
3946
|
+
});
|
|
3923
3947
|
var EmbedNode = (props) => {
|
|
3924
3948
|
let src;
|
|
3925
3949
|
if (props.node.provider == "youtube") {
|
|
@@ -3929,7 +3953,7 @@ var EmbedNode = (props) => {
|
|
|
3929
3953
|
} else {
|
|
3930
3954
|
src = props.node.embedSrc;
|
|
3931
3955
|
}
|
|
3932
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IframeClient2, { src }) });
|
|
3933
3957
|
};
|
|
3934
3958
|
var EmbedNode_default = EmbedNode;
|
|
3935
3959
|
|
package/dist/index.mjs
CHANGED
|
@@ -2521,7 +2521,7 @@ var DataList = (props) => {
|
|
|
2521
2521
|
var DataList_default = DataList;
|
|
2522
2522
|
|
|
2523
2523
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2524
|
-
import
|
|
2524
|
+
import React48 from "react";
|
|
2525
2525
|
|
|
2526
2526
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2527
2527
|
import React36 from "react";
|
|
@@ -2843,6 +2843,7 @@ var HeadingNode = (props) => {
|
|
|
2843
2843
|
["text"]: TextNode_default,
|
|
2844
2844
|
["link"]: LinkNode_default,
|
|
2845
2845
|
["svg-icon"]: SVGIconNode_default,
|
|
2846
|
+
["linebreak"]: LineBreakNode_default,
|
|
2846
2847
|
["datafield"]: DatafieldNode_default
|
|
2847
2848
|
};
|
|
2848
2849
|
const HeadingTag = `${props.node.tag}`;
|
|
@@ -3789,102 +3790,14 @@ var FormContainerNode = (props) => {
|
|
|
3789
3790
|
var FormContainerNode_default = FormContainerNode;
|
|
3790
3791
|
|
|
3791
3792
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3792
|
-
import
|
|
3793
|
-
|
|
3794
|
-
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3795
|
-
import React46, { useEffect as useEffect10, useRef as useRef6, useState as useState10 } from "react";
|
|
3796
|
-
|
|
3797
|
-
// src/components/IFrameLoaderView.tsx
|
|
3798
|
-
import React45 from "react";
|
|
3799
|
-
import { jsx as jsx61, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3800
|
-
var IFrameLoaderView = (props) => {
|
|
3801
|
-
return /* @__PURE__ */ jsxs30(React45.Fragment, { children: [
|
|
3802
|
-
props.isDataFound == null && /* @__PURE__ */ jsx61("div", { className: "", children: /* @__PURE__ */ jsxs30("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3803
|
-
/* @__PURE__ */ jsxs30("div", { className: "flex items-center mb-4", children: [
|
|
3804
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3805
|
-
/* @__PURE__ */ jsxs30("div", { className: "ml-2", children: [
|
|
3806
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3807
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3808
|
-
] })
|
|
3809
|
-
] }),
|
|
3810
|
-
/* @__PURE__ */ jsxs30("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3811
|
-
/* @__PURE__ */ jsxs30("div", { className: "animate-pulse", children: [
|
|
3812
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3813
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3814
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3815
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3816
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3817
|
-
] }),
|
|
3818
|
-
/* @__PURE__ */ jsxs30("div", { className: "animate-pulse", children: [
|
|
3819
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3820
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3821
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3822
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3823
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3824
|
-
] }),
|
|
3825
|
-
/* @__PURE__ */ jsxs30("div", { className: "animate-pulse", children: [
|
|
3826
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3827
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3828
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3829
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3830
|
-
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3831
|
-
] })
|
|
3832
|
-
] })
|
|
3833
|
-
] }) }),
|
|
3834
|
-
props.children
|
|
3835
|
-
] });
|
|
3836
|
-
};
|
|
3837
|
-
var IFrameLoaderView_default = IFrameLoaderView;
|
|
3838
|
-
|
|
3839
|
-
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3840
|
-
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
3841
|
-
var IframeClient = ({ src }) => {
|
|
3842
|
-
const iframeRef = useRef6(null);
|
|
3843
|
-
const [iframeHeight, setIframeHeight] = useState10("100%");
|
|
3844
|
-
const [isDataFound, setIsDataFound] = useState10(null);
|
|
3845
|
-
useEffect10(() => {
|
|
3846
|
-
const handleReceiveMessage = (event) => {
|
|
3847
|
-
const eventName = event?.data?.eventName;
|
|
3848
|
-
const payload = event?.data?.payload;
|
|
3849
|
-
if (eventName === "SET_HEIGHT" && payload?.height) {
|
|
3850
|
-
let height = 500;
|
|
3851
|
-
if (payload.height > 500) {
|
|
3852
|
-
height = payload.height + 50;
|
|
3853
|
-
}
|
|
3854
|
-
setIframeHeight(`${height}px`);
|
|
3855
|
-
}
|
|
3856
|
-
};
|
|
3857
|
-
window.addEventListener("message", handleReceiveMessage);
|
|
3858
|
-
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3859
|
-
}, []);
|
|
3860
|
-
useEffect10(() => {
|
|
3861
|
-
const handleResize = () => {
|
|
3862
|
-
if (iframeRef.current) {
|
|
3863
|
-
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
3864
|
-
}
|
|
3865
|
-
};
|
|
3866
|
-
window.addEventListener("resize", handleResize);
|
|
3867
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
3868
|
-
}, []);
|
|
3869
|
-
const handleIframeLoad = () => {
|
|
3870
|
-
setIsDataFound(true);
|
|
3871
|
-
};
|
|
3872
|
-
return /* @__PURE__ */ jsx62(React46.Fragment, { children: /* @__PURE__ */ jsx62(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ jsx62(
|
|
3873
|
-
"iframe",
|
|
3874
|
-
{
|
|
3875
|
-
ref: iframeRef,
|
|
3876
|
-
src,
|
|
3877
|
-
className: "w-full h-full border-none",
|
|
3878
|
-
scrolling: "no",
|
|
3879
|
-
style: { height: iframeHeight },
|
|
3880
|
-
onLoad: handleIframeLoad
|
|
3881
|
-
}
|
|
3882
|
-
) }) });
|
|
3883
|
-
};
|
|
3884
|
-
var IframeClient_default = IframeClient;
|
|
3793
|
+
import React47 from "react";
|
|
3885
3794
|
|
|
3886
3795
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3887
|
-
import
|
|
3796
|
+
import dynamic from "next/dynamic";
|
|
3797
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
3798
|
+
var IframeClient = dynamic(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
3799
|
+
ssr: false
|
|
3800
|
+
});
|
|
3888
3801
|
var EmbedNode = (props) => {
|
|
3889
3802
|
let src;
|
|
3890
3803
|
if (props.node.provider == "youtube") {
|
|
@@ -3894,13 +3807,13 @@ var EmbedNode = (props) => {
|
|
|
3894
3807
|
} else {
|
|
3895
3808
|
src = props.node.embedSrc;
|
|
3896
3809
|
}
|
|
3897
|
-
return /* @__PURE__ */
|
|
3810
|
+
return /* @__PURE__ */ jsx61("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx61(IframeClient, { src }) });
|
|
3898
3811
|
};
|
|
3899
3812
|
var EmbedNode_default = EmbedNode;
|
|
3900
3813
|
|
|
3901
3814
|
// src/components/Slider.tsx
|
|
3902
|
-
import
|
|
3903
|
-
import { Fragment as Fragment8, jsx as
|
|
3815
|
+
import React45, { useState as useState10, useEffect as useEffect10, Children, cloneElement } from "react";
|
|
3816
|
+
import { Fragment as Fragment8, jsx as jsx62, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3904
3817
|
var Slider = ({
|
|
3905
3818
|
children,
|
|
3906
3819
|
slidesToShow = 4,
|
|
@@ -3918,13 +3831,13 @@ var Slider = ({
|
|
|
3918
3831
|
pillStyle = "cumulative",
|
|
3919
3832
|
progressPosition = "bottom"
|
|
3920
3833
|
}) => {
|
|
3921
|
-
const [currentSlide, setCurrentSlide] =
|
|
3922
|
-
const [transition, setTransition] =
|
|
3923
|
-
const [slidesToShowState, setSlidesToShowState] =
|
|
3834
|
+
const [currentSlide, setCurrentSlide] = useState10(0);
|
|
3835
|
+
const [transition, setTransition] = useState10(true);
|
|
3836
|
+
const [slidesToShowState, setSlidesToShowState] = useState10(
|
|
3924
3837
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3925
3838
|
);
|
|
3926
|
-
const [isPlaying, setIsPlaying] =
|
|
3927
|
-
|
|
3839
|
+
const [isPlaying, setIsPlaying] = useState10(autoplay);
|
|
3840
|
+
useEffect10(() => {
|
|
3928
3841
|
if (typeof slidesToShow === "number") return;
|
|
3929
3842
|
const handleResize = () => {
|
|
3930
3843
|
if (window.innerWidth >= 1024) {
|
|
@@ -3939,7 +3852,7 @@ var Slider = ({
|
|
|
3939
3852
|
window.addEventListener("resize", handleResize);
|
|
3940
3853
|
return () => window.removeEventListener("resize", handleResize);
|
|
3941
3854
|
}, [slidesToShow]);
|
|
3942
|
-
|
|
3855
|
+
useEffect10(() => {
|
|
3943
3856
|
if (!autoplay) return;
|
|
3944
3857
|
const timer = setInterval(() => {
|
|
3945
3858
|
if (isPlaying) {
|
|
@@ -3994,10 +3907,10 @@ var Slider = ({
|
|
|
3994
3907
|
};
|
|
3995
3908
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3996
3909
|
const slides = Children.map(children, (child, index) => {
|
|
3997
|
-
if (!
|
|
3910
|
+
if (!React45.isValidElement(child)) return null;
|
|
3998
3911
|
const childProps = child.props;
|
|
3999
3912
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4000
|
-
return /* @__PURE__ */
|
|
3913
|
+
return /* @__PURE__ */ jsx62(
|
|
4001
3914
|
"div",
|
|
4002
3915
|
{
|
|
4003
3916
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -4020,14 +3933,14 @@ var Slider = ({
|
|
|
4020
3933
|
return "bottom-4";
|
|
4021
3934
|
}
|
|
4022
3935
|
};
|
|
4023
|
-
return /* @__PURE__ */
|
|
3936
|
+
return /* @__PURE__ */ jsxs30(
|
|
4024
3937
|
"div",
|
|
4025
3938
|
{
|
|
4026
3939
|
className: `relative w-full overflow-hidden ${className}`,
|
|
4027
3940
|
onMouseEnter: handleMouseEnter,
|
|
4028
3941
|
onMouseLeave: handleMouseLeave,
|
|
4029
3942
|
children: [
|
|
4030
|
-
/* @__PURE__ */
|
|
3943
|
+
/* @__PURE__ */ jsx62(
|
|
4031
3944
|
"div",
|
|
4032
3945
|
{
|
|
4033
3946
|
className: "flex h-full",
|
|
@@ -4038,18 +3951,18 @@ var Slider = ({
|
|
|
4038
3951
|
children: slides
|
|
4039
3952
|
}
|
|
4040
3953
|
),
|
|
4041
|
-
show_arrows && /* @__PURE__ */
|
|
4042
|
-
/* @__PURE__ */
|
|
3954
|
+
show_arrows && /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
3955
|
+
/* @__PURE__ */ jsx62(
|
|
4043
3956
|
ArrowButton,
|
|
4044
3957
|
{
|
|
4045
3958
|
direction: "left",
|
|
4046
3959
|
onClick: prevSlide,
|
|
4047
3960
|
visible: infinite_scroll || currentSlide > 0,
|
|
4048
3961
|
className: arrowClassName,
|
|
4049
|
-
children: /* @__PURE__ */
|
|
3962
|
+
children: /* @__PURE__ */ jsx62("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__ */ jsx62("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
4050
3963
|
}
|
|
4051
3964
|
),
|
|
4052
|
-
/* @__PURE__ */
|
|
3965
|
+
/* @__PURE__ */ jsxs30(
|
|
4053
3966
|
ArrowButton,
|
|
4054
3967
|
{
|
|
4055
3968
|
direction: "right",
|
|
@@ -4057,13 +3970,13 @@ var Slider = ({
|
|
|
4057
3970
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
4058
3971
|
className: arrowClassName,
|
|
4059
3972
|
children: [
|
|
4060
|
-
/* @__PURE__ */
|
|
3973
|
+
/* @__PURE__ */ jsx62("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__ */ jsx62("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
4061
3974
|
" "
|
|
4062
3975
|
]
|
|
4063
3976
|
}
|
|
4064
3977
|
)
|
|
4065
3978
|
] }),
|
|
4066
|
-
show_dots && /* @__PURE__ */
|
|
3979
|
+
show_dots && /* @__PURE__ */ jsx62("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ jsx62(
|
|
4067
3980
|
ProgressPill,
|
|
4068
3981
|
{
|
|
4069
3982
|
active: index === currentSlide,
|
|
@@ -4089,7 +4002,7 @@ var ArrowButton = ({
|
|
|
4089
4002
|
visible,
|
|
4090
4003
|
children,
|
|
4091
4004
|
className = ""
|
|
4092
|
-
}) => /* @__PURE__ */
|
|
4005
|
+
}) => /* @__PURE__ */ jsx62(
|
|
4093
4006
|
"button",
|
|
4094
4007
|
{
|
|
4095
4008
|
className: `
|
|
@@ -4115,13 +4028,13 @@ var ProgressPill = ({
|
|
|
4115
4028
|
currentSlide,
|
|
4116
4029
|
totalSlides
|
|
4117
4030
|
}) => {
|
|
4118
|
-
const [progress, setProgress] =
|
|
4119
|
-
|
|
4031
|
+
const [progress, setProgress] = useState10(0);
|
|
4032
|
+
useEffect10(() => {
|
|
4120
4033
|
if (active) {
|
|
4121
4034
|
setProgress(0);
|
|
4122
4035
|
}
|
|
4123
4036
|
}, [active, index]);
|
|
4124
|
-
|
|
4037
|
+
useEffect10(() => {
|
|
4125
4038
|
if (!active || !isPlaying) {
|
|
4126
4039
|
if (!active) {
|
|
4127
4040
|
setProgress(0);
|
|
@@ -4176,7 +4089,7 @@ var ProgressPill = ({
|
|
|
4176
4089
|
const renderProgressBar = () => {
|
|
4177
4090
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
4178
4091
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
4179
|
-
return /* @__PURE__ */
|
|
4092
|
+
return /* @__PURE__ */ jsx62(
|
|
4180
4093
|
"div",
|
|
4181
4094
|
{
|
|
4182
4095
|
className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
|
|
@@ -4188,7 +4101,7 @@ var ProgressPill = ({
|
|
|
4188
4101
|
};
|
|
4189
4102
|
const renderCumulativeFill = () => {
|
|
4190
4103
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4191
|
-
return /* @__PURE__ */
|
|
4104
|
+
return /* @__PURE__ */ jsx62(
|
|
4192
4105
|
"div",
|
|
4193
4106
|
{
|
|
4194
4107
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4198,7 +4111,7 @@ var ProgressPill = ({
|
|
|
4198
4111
|
}
|
|
4199
4112
|
return null;
|
|
4200
4113
|
};
|
|
4201
|
-
return /* @__PURE__ */
|
|
4114
|
+
return /* @__PURE__ */ jsxs30(
|
|
4202
4115
|
"button",
|
|
4203
4116
|
{
|
|
4204
4117
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4374,10 +4287,10 @@ var PathUtility = class {
|
|
|
4374
4287
|
var PathUtility_default = new PathUtility();
|
|
4375
4288
|
|
|
4376
4289
|
// src/components/NoDataFound.tsx
|
|
4377
|
-
import { jsx as
|
|
4290
|
+
import { jsx as jsx63, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4378
4291
|
var NoDataFound = () => {
|
|
4379
|
-
return /* @__PURE__ */
|
|
4380
|
-
/* @__PURE__ */
|
|
4292
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4293
|
+
/* @__PURE__ */ jsx63("div", { className: "mb-5", children: /* @__PURE__ */ jsx63("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx63(
|
|
4381
4294
|
"svg",
|
|
4382
4295
|
{
|
|
4383
4296
|
className: "w-10 h-10",
|
|
@@ -4385,7 +4298,7 @@ var NoDataFound = () => {
|
|
|
4385
4298
|
stroke: "currentColor",
|
|
4386
4299
|
viewBox: "0 0 24 24",
|
|
4387
4300
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4388
|
-
children: /* @__PURE__ */
|
|
4301
|
+
children: /* @__PURE__ */ jsx63(
|
|
4389
4302
|
"path",
|
|
4390
4303
|
{
|
|
4391
4304
|
strokeLinecap: "round",
|
|
@@ -4396,15 +4309,15 @@ var NoDataFound = () => {
|
|
|
4396
4309
|
)
|
|
4397
4310
|
}
|
|
4398
4311
|
) }) }),
|
|
4399
|
-
/* @__PURE__ */
|
|
4400
|
-
/* @__PURE__ */
|
|
4312
|
+
/* @__PURE__ */ jsx63("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4313
|
+
/* @__PURE__ */ jsx63("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4401
4314
|
] });
|
|
4402
4315
|
};
|
|
4403
4316
|
var NoDataFound_default = NoDataFound;
|
|
4404
4317
|
|
|
4405
4318
|
// src/components/Pagination.tsx
|
|
4406
4319
|
import { useMemo } from "react";
|
|
4407
|
-
import { jsx as
|
|
4320
|
+
import { jsx as jsx64, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4408
4321
|
var Pagination = (props) => {
|
|
4409
4322
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4410
4323
|
const builder = useMemo(() => {
|
|
@@ -4448,7 +4361,7 @@ var Pagination = (props) => {
|
|
|
4448
4361
|
return range;
|
|
4449
4362
|
};
|
|
4450
4363
|
const paginationRange = getPaginationRange();
|
|
4451
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
4364
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx64(
|
|
4452
4365
|
Hyperlink,
|
|
4453
4366
|
{
|
|
4454
4367
|
linkType: "Link" /* Link */,
|
|
@@ -4463,9 +4376,9 @@ var Pagination = (props) => {
|
|
|
4463
4376
|
);
|
|
4464
4377
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4465
4378
|
if (disabled) {
|
|
4466
|
-
return /* @__PURE__ */
|
|
4379
|
+
return /* @__PURE__ */ jsx64("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
|
|
4467
4380
|
}
|
|
4468
|
-
return /* @__PURE__ */
|
|
4381
|
+
return /* @__PURE__ */ jsx64(
|
|
4469
4382
|
Hyperlink,
|
|
4470
4383
|
{
|
|
4471
4384
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
|
|
@@ -4475,35 +4388,35 @@ var Pagination = (props) => {
|
|
|
4475
4388
|
);
|
|
4476
4389
|
};
|
|
4477
4390
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4478
|
-
return /* @__PURE__ */
|
|
4479
|
-
/* @__PURE__ */
|
|
4480
|
-
/* @__PURE__ */
|
|
4391
|
+
return /* @__PURE__ */ jsxs32("div", { className: "py-6 border-t bg-default", children: [
|
|
4392
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4393
|
+
/* @__PURE__ */ jsxs32("div", { className: "text-sm", children: [
|
|
4481
4394
|
"Showing ",
|
|
4482
|
-
/* @__PURE__ */
|
|
4395
|
+
/* @__PURE__ */ jsxs32("span", { className: "font-semibold", children: [
|
|
4483
4396
|
startItem,
|
|
4484
4397
|
"-",
|
|
4485
4398
|
endItem
|
|
4486
4399
|
] }),
|
|
4487
4400
|
" ",
|
|
4488
4401
|
"out of ",
|
|
4489
|
-
/* @__PURE__ */
|
|
4402
|
+
/* @__PURE__ */ jsx64("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4490
4403
|
" results"
|
|
4491
4404
|
] }),
|
|
4492
|
-
totalPages > 1 && /* @__PURE__ */
|
|
4493
|
-
/* @__PURE__ */
|
|
4405
|
+
totalPages > 1 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-1", children: [
|
|
4406
|
+
/* @__PURE__ */ jsxs32(
|
|
4494
4407
|
NavigationButton,
|
|
4495
4408
|
{
|
|
4496
4409
|
page: activePageNumber - 1,
|
|
4497
4410
|
disabled: activePageNumber === 1,
|
|
4498
4411
|
children: [
|
|
4499
|
-
/* @__PURE__ */
|
|
4500
|
-
/* @__PURE__ */
|
|
4412
|
+
/* @__PURE__ */ jsx64("span", { children: /* @__PURE__ */ jsx64(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4413
|
+
/* @__PURE__ */ jsx64("span", { className: "text-sm", children: "Prev" })
|
|
4501
4414
|
]
|
|
4502
4415
|
}
|
|
4503
4416
|
),
|
|
4504
4417
|
paginationRange.map((item, index) => {
|
|
4505
4418
|
if (item === "...") {
|
|
4506
|
-
return /* @__PURE__ */
|
|
4419
|
+
return /* @__PURE__ */ jsx64(
|
|
4507
4420
|
"span",
|
|
4508
4421
|
{
|
|
4509
4422
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4513,23 +4426,23 @@ var Pagination = (props) => {
|
|
|
4513
4426
|
);
|
|
4514
4427
|
}
|
|
4515
4428
|
const page = item;
|
|
4516
|
-
return /* @__PURE__ */
|
|
4429
|
+
return /* @__PURE__ */ jsx64(PageButton, { page, children: page }, page);
|
|
4517
4430
|
}),
|
|
4518
|
-
/* @__PURE__ */
|
|
4431
|
+
/* @__PURE__ */ jsxs32(
|
|
4519
4432
|
NavigationButton,
|
|
4520
4433
|
{
|
|
4521
4434
|
page: activePageNumber + 1,
|
|
4522
4435
|
disabled: activePageNumber === totalPages,
|
|
4523
4436
|
children: [
|
|
4524
|
-
/* @__PURE__ */
|
|
4525
|
-
/* @__PURE__ */
|
|
4437
|
+
/* @__PURE__ */ jsx64("span", { className: "text-sm", children: "Next" }),
|
|
4438
|
+
/* @__PURE__ */ jsx64("span", { children: /* @__PURE__ */ jsx64(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4526
4439
|
]
|
|
4527
4440
|
}
|
|
4528
4441
|
)
|
|
4529
4442
|
] }),
|
|
4530
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
4531
|
-
/* @__PURE__ */
|
|
4532
|
-
/* @__PURE__ */
|
|
4443
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
|
|
4444
|
+
/* @__PURE__ */ jsx64("span", { className: "text-sm", children: "Go to:" }),
|
|
4445
|
+
/* @__PURE__ */ jsx64("div", { className: "relative", children: /* @__PURE__ */ jsx64(
|
|
4533
4446
|
"input",
|
|
4534
4447
|
{
|
|
4535
4448
|
type: "number",
|
|
@@ -4550,9 +4463,9 @@ var Pagination = (props) => {
|
|
|
4550
4463
|
) })
|
|
4551
4464
|
] })
|
|
4552
4465
|
] }),
|
|
4553
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
4554
|
-
/* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4466
|
+
showPageSizeSelector && /* @__PURE__ */ jsx64("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4467
|
+
/* @__PURE__ */ jsx64("span", { className: "text-sm", children: "Show:" }),
|
|
4468
|
+
/* @__PURE__ */ jsx64("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx64(
|
|
4556
4469
|
Hyperlink,
|
|
4557
4470
|
{
|
|
4558
4471
|
className: `
|
|
@@ -4564,14 +4477,14 @@ var Pagination = (props) => {
|
|
|
4564
4477
|
},
|
|
4565
4478
|
size
|
|
4566
4479
|
)) }),
|
|
4567
|
-
/* @__PURE__ */
|
|
4480
|
+
/* @__PURE__ */ jsx64("span", { className: "text-sm", children: "per page" })
|
|
4568
4481
|
] }) })
|
|
4569
4482
|
] });
|
|
4570
4483
|
};
|
|
4571
4484
|
var Pagination_default = Pagination;
|
|
4572
4485
|
|
|
4573
4486
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4574
|
-
import { jsx as
|
|
4487
|
+
import { jsx as jsx65, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4575
4488
|
function toCamelCase(str) {
|
|
4576
4489
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4577
4490
|
}
|
|
@@ -4753,7 +4666,7 @@ var DivContainer = async (props) => {
|
|
|
4753
4666
|
response = await serviceClient.get(endpoint);
|
|
4754
4667
|
result = response?.result;
|
|
4755
4668
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4756
|
-
return /* @__PURE__ */
|
|
4669
|
+
return /* @__PURE__ */ jsx65(NoDataFound_default, {});
|
|
4757
4670
|
}
|
|
4758
4671
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4759
4672
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -4765,7 +4678,7 @@ var DivContainer = async (props) => {
|
|
|
4765
4678
|
}
|
|
4766
4679
|
const SelectedNode = NodeTypes2[node.type];
|
|
4767
4680
|
if (!SelectedNode) return null;
|
|
4768
|
-
return /* @__PURE__ */
|
|
4681
|
+
return /* @__PURE__ */ jsx65(React47.Fragment, { children: /* @__PURE__ */ jsx65(
|
|
4769
4682
|
SelectedNode,
|
|
4770
4683
|
{
|
|
4771
4684
|
node,
|
|
@@ -4865,9 +4778,9 @@ var DivContainer = async (props) => {
|
|
|
4865
4778
|
props.node.autoFormat && "auto-format",
|
|
4866
4779
|
props.node.bgClass
|
|
4867
4780
|
].filter(Boolean).join(" ");
|
|
4868
|
-
return /* @__PURE__ */
|
|
4869
|
-
/* @__PURE__ */
|
|
4870
|
-
/* @__PURE__ */
|
|
4781
|
+
return /* @__PURE__ */ jsxs33(React47.Fragment, { children: [
|
|
4782
|
+
/* @__PURE__ */ jsx65("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4783
|
+
/* @__PURE__ */ jsx65(React47.Fragment, { children: /* @__PURE__ */ jsx65(
|
|
4871
4784
|
Wrapper,
|
|
4872
4785
|
{
|
|
4873
4786
|
id: guid,
|
|
@@ -4876,18 +4789,18 @@ var DivContainer = async (props) => {
|
|
|
4876
4789
|
...wrapperProps,
|
|
4877
4790
|
children: dataToRender.map(
|
|
4878
4791
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4879
|
-
(child, i) => /* @__PURE__ */
|
|
4792
|
+
(child, i) => /* @__PURE__ */ jsx65(React47.Fragment, { children: child }, i)
|
|
4880
4793
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4881
4794
|
)
|
|
4882
4795
|
}
|
|
4883
4796
|
) }),
|
|
4884
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4797
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx65("div", { children: /* @__PURE__ */ jsx65(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4885
4798
|
] });
|
|
4886
4799
|
};
|
|
4887
4800
|
var DivContainer_default = DivContainer;
|
|
4888
4801
|
|
|
4889
4802
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4890
|
-
import { jsx as
|
|
4803
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
4891
4804
|
var NodeTypes = {
|
|
4892
4805
|
["paragraph"]: ParagraphNode_default,
|
|
4893
4806
|
["heading"]: HeadingNode_default,
|
|
@@ -4914,11 +4827,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4914
4827
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4915
4828
|
rootNode = pageBodyTree.root;
|
|
4916
4829
|
}
|
|
4917
|
-
return /* @__PURE__ */
|
|
4830
|
+
return /* @__PURE__ */ jsx66(React48.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4918
4831
|
{
|
|
4919
4832
|
}
|
|
4920
4833
|
const SelectedNode = NodeTypes[node.type];
|
|
4921
|
-
return /* @__PURE__ */
|
|
4834
|
+
return /* @__PURE__ */ jsx66(React48.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx66(React48.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx66(React48.Fragment, { children: /* @__PURE__ */ jsx66(
|
|
4922
4835
|
SelectedNode,
|
|
4923
4836
|
{
|
|
4924
4837
|
node,
|
|
@@ -4933,7 +4846,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4933
4846
|
assetBaseUrl: props.assetBaseUrl,
|
|
4934
4847
|
device: props.device
|
|
4935
4848
|
}
|
|
4936
|
-
) }) : /* @__PURE__ */
|
|
4849
|
+
) }) : /* @__PURE__ */ jsx66(React48.Fragment, { children: /* @__PURE__ */ jsx66(
|
|
4937
4850
|
SelectedNode,
|
|
4938
4851
|
{
|
|
4939
4852
|
node,
|
package/package.json
CHANGED