@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260325073346 → 0.8.1-dev.20260325084305
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/CopyButton-XONTQQW7.mjs +55 -0
- package/dist/index.js +83 -62
- package/dist/index.mjs +133 -174
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/CopyButton.tsx
|
|
4
|
+
import { useState, useRef, useEffect } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function CopyButton({ text }) {
|
|
7
|
+
const [copied, setCopied] = useState(false);
|
|
8
|
+
const timeoutRef = useRef(null);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
return () => {
|
|
11
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
12
|
+
};
|
|
13
|
+
}, []);
|
|
14
|
+
const handleCopy = async () => {
|
|
15
|
+
try {
|
|
16
|
+
await navigator.clipboard.writeText(text);
|
|
17
|
+
setCopied(true);
|
|
18
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
19
|
+
timeoutRef.current = setTimeout(() => setCopied(false), 2e3);
|
|
20
|
+
} catch (err) {
|
|
21
|
+
console.error("Failed to copy: ", err);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
onClick: handleCopy,
|
|
28
|
+
className: "flex gap-1 items-center hover:text-white transition",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
"svg",
|
|
32
|
+
{
|
|
33
|
+
width: "16",
|
|
34
|
+
height: "16",
|
|
35
|
+
viewBox: "0 0 24 24",
|
|
36
|
+
className: "w-4 h-4",
|
|
37
|
+
fill: "currentColor",
|
|
38
|
+
children: /* @__PURE__ */ jsx(
|
|
39
|
+
"path",
|
|
40
|
+
{
|
|
41
|
+
fillRule: "evenodd",
|
|
42
|
+
clipRule: "evenodd",
|
|
43
|
+
d: "M12 4C10.8954 4 10 4.89543 10 6H14C14 4.89543 13.1046 4 12 4ZM8.53513 4C9.22675 2.8044 10.5194 2 12 2C13.4806 2 14.7733 2.8044 15.4649 4H17C18.6569 4 20 5.34315 20 7V19C20 20.6569 18.6569 22 17 22H7C5.34315 22 4 20.6569 4 19V7C4 5.34315 5.34315 4 7 4H8.53513ZM8 6H7C6.44772 6 6 6.44772 6 7V19C6 19.5523 6.44772 20 7 20H17C17.5523 20 18 19.5523 18 19V7C18 6.44772 17.5523 6 17 6H16C16 7.10457 15.1046 8 14 8H10C8.89543 8 8 7.10457 8 6Z"
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
copied ? "Copied!" : "Copy code"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
CopyButton as default
|
|
55
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,68 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
+
// src/components/CopyButton.tsx
|
|
34
|
+
var CopyButton_exports = {};
|
|
35
|
+
__export(CopyButton_exports, {
|
|
36
|
+
default: () => CopyButton
|
|
37
|
+
});
|
|
38
|
+
function CopyButton({ text }) {
|
|
39
|
+
const [copied, setCopied] = (0, import_react41.useState)(false);
|
|
40
|
+
const timeoutRef = (0, import_react41.useRef)(null);
|
|
41
|
+
(0, import_react41.useEffect)(() => {
|
|
42
|
+
return () => {
|
|
43
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
const handleCopy = async () => {
|
|
47
|
+
try {
|
|
48
|
+
await navigator.clipboard.writeText(text);
|
|
49
|
+
setCopied(true);
|
|
50
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
51
|
+
timeoutRef.current = setTimeout(() => setCopied(false), 2e3);
|
|
52
|
+
} catch (err) {
|
|
53
|
+
console.error("Failed to copy: ", err);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
57
|
+
"button",
|
|
58
|
+
{
|
|
59
|
+
onClick: handleCopy,
|
|
60
|
+
className: "flex gap-1 items-center hover:text-white transition",
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
63
|
+
"svg",
|
|
64
|
+
{
|
|
65
|
+
width: "16",
|
|
66
|
+
height: "16",
|
|
67
|
+
viewBox: "0 0 24 24",
|
|
68
|
+
className: "w-4 h-4",
|
|
69
|
+
fill: "currentColor",
|
|
70
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
71
|
+
"path",
|
|
72
|
+
{
|
|
73
|
+
fillRule: "evenodd",
|
|
74
|
+
clipRule: "evenodd",
|
|
75
|
+
d: "M12 4C10.8954 4 10 4.89543 10 6H14C14 4.89543 13.1046 4 12 4ZM8.53513 4C9.22675 2.8044 10.5194 2 12 2C13.4806 2 14.7733 2.8044 15.4649 4H17C18.6569 4 20 5.34315 20 7V19C20 20.6569 18.6569 22 17 22H7C5.34315 22 4 20.6569 4 19V7C4 5.34315 5.34315 4 7 4H8.53513ZM8 6H7C6.44772 6 6 6.44772 6 7V19C6 19.5523 6.44772 20 7 20H17C17.5523 20 18 19.5523 18 19V7C18 6.44772 17.5523 6 17 6H16C16 7.10457 15.1046 8 14 8H10C8.89543 8 8 7.10457 8 6Z"
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
copied ? "Copied!" : "Copy code"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
var import_react41, import_jsx_runtime52;
|
|
86
|
+
var init_CopyButton = __esm({
|
|
87
|
+
"src/components/CopyButton.tsx"() {
|
|
88
|
+
"use strict";
|
|
89
|
+
"use client";
|
|
90
|
+
import_react41 = require("react");
|
|
91
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
33
95
|
// src/components/IFrameLoaderView.tsx
|
|
34
96
|
var import_react46, import_jsx_runtime61, IFrameLoaderView, IFrameLoaderView_default;
|
|
35
97
|
var init_IFrameLoaderView = __esm({
|
|
@@ -3086,67 +3148,18 @@ var QuoteNode_default = QuoteNode;
|
|
|
3086
3148
|
|
|
3087
3149
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3088
3150
|
var import_react42 = __toESM(require("react"));
|
|
3089
|
-
|
|
3090
|
-
// src/components/CopyButton.tsx
|
|
3091
|
-
var import_react41 = require("react");
|
|
3092
|
-
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3093
|
-
function CopyButton({ text }) {
|
|
3094
|
-
const [copied, setCopied] = (0, import_react41.useState)(false);
|
|
3095
|
-
const timeoutRef = (0, import_react41.useRef)(null);
|
|
3096
|
-
(0, import_react41.useEffect)(() => {
|
|
3097
|
-
return () => {
|
|
3098
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3099
|
-
};
|
|
3100
|
-
}, []);
|
|
3101
|
-
const handleCopy = async () => {
|
|
3102
|
-
try {
|
|
3103
|
-
await navigator.clipboard.writeText(text);
|
|
3104
|
-
setCopied(true);
|
|
3105
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3106
|
-
timeoutRef.current = setTimeout(() => setCopied(false), 2e3);
|
|
3107
|
-
} catch (err) {
|
|
3108
|
-
console.error("Failed to copy: ", err);
|
|
3109
|
-
}
|
|
3110
|
-
};
|
|
3111
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
3112
|
-
"button",
|
|
3113
|
-
{
|
|
3114
|
-
onClick: handleCopy,
|
|
3115
|
-
className: "flex gap-1 items-center hover:text-white transition",
|
|
3116
|
-
children: [
|
|
3117
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3118
|
-
"svg",
|
|
3119
|
-
{
|
|
3120
|
-
width: "16",
|
|
3121
|
-
height: "16",
|
|
3122
|
-
viewBox: "0 0 24 24",
|
|
3123
|
-
className: "w-4 h-4",
|
|
3124
|
-
fill: "currentColor",
|
|
3125
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3126
|
-
"path",
|
|
3127
|
-
{
|
|
3128
|
-
fillRule: "evenodd",
|
|
3129
|
-
clipRule: "evenodd",
|
|
3130
|
-
d: "M12 4C10.8954 4 10 4.89543 10 6H14C14 4.89543 13.1046 4 12 4ZM8.53513 4C9.22675 2.8044 10.5194 2 12 2C13.4806 2 14.7733 2.8044 15.4649 4H17C18.6569 4 20 5.34315 20 7V19C20 20.6569 18.6569 22 17 22H7C5.34315 22 4 20.6569 4 19V7C4 5.34315 5.34315 4 7 4H8.53513ZM8 6H7C6.44772 6 6 6.44772 6 7V19C6 19.5523 6.44772 20 7 20H17C17.5523 20 18 19.5523 18 19V7C18 6.44772 17.5523 6 17 6H16C16 7.10457 15.1046 8 14 8H10C8.89543 8 8 7.10457 8 6Z"
|
|
3131
|
-
}
|
|
3132
|
-
)
|
|
3133
|
-
}
|
|
3134
|
-
),
|
|
3135
|
-
copied ? "Copied!" : "Copy code"
|
|
3136
|
-
]
|
|
3137
|
-
}
|
|
3138
|
-
);
|
|
3139
|
-
}
|
|
3140
|
-
|
|
3141
|
-
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3151
|
+
var import_dynamic = __toESM(require("next/dynamic"));
|
|
3142
3152
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3153
|
+
var CopyButton2 = (0, import_dynamic.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
3154
|
+
ssr: false,
|
|
3155
|
+
// optional: fallback UI while loading
|
|
3156
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
3157
|
+
});
|
|
3143
3158
|
var CodeNode = (props) => {
|
|
3144
3159
|
const NodeTypes2 = {
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
// @ts-expect-error custom code
|
|
3149
|
-
["link"]: LinkNode_default
|
|
3160
|
+
text: TextNode_default,
|
|
3161
|
+
linebreak: LineBreakNode_default,
|
|
3162
|
+
link: LinkNode_default
|
|
3150
3163
|
};
|
|
3151
3164
|
const textContent = props.node?.children?.map((node) => {
|
|
3152
3165
|
if (node.type === "text") return node.text || "";
|
|
@@ -3157,11 +3170,19 @@ var CodeNode = (props) => {
|
|
|
3157
3170
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "code-block", children: [
|
|
3158
3171
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center relative text-gray-200 bg-gray-800 px-4 py-2.5 text-xs font-sans justify-between rounded-t-md", children: [
|
|
3159
3172
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: "Code Snippet" }),
|
|
3160
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3173
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CopyButton2, { text: textContent })
|
|
3161
3174
|
] }),
|
|
3162
3175
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("code", { className: "block bg-gray-900 text-gray-100 p-4 rounded-b-md text-sm whitespace-pre-wrap", children: props.node.children && props.node.children.map((node, index) => {
|
|
3163
3176
|
const SelectedNode = NodeTypes2[node.type];
|
|
3164
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react42.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react42.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3178
|
+
SelectedNode,
|
|
3179
|
+
{
|
|
3180
|
+
node,
|
|
3181
|
+
session: props.session,
|
|
3182
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
3183
|
+
routeParameters: props.routeParameters
|
|
3184
|
+
}
|
|
3185
|
+
) }, index);
|
|
3165
3186
|
}) })
|
|
3166
3187
|
] });
|
|
3167
3188
|
};
|
|
@@ -3939,9 +3960,9 @@ var FormContainerNode_default = FormContainerNode;
|
|
|
3939
3960
|
var import_react50 = __toESM(require("react"));
|
|
3940
3961
|
|
|
3941
3962
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3942
|
-
var
|
|
3963
|
+
var import_dynamic2 = __toESM(require("next/dynamic"));
|
|
3943
3964
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3944
|
-
var IframeClient2 = (0,
|
|
3965
|
+
var IframeClient2 = (0, import_dynamic2.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
3945
3966
|
ssr: false
|
|
3946
3967
|
});
|
|
3947
3968
|
var EmbedNode = (props) => {
|
package/dist/index.mjs
CHANGED
|
@@ -2940,67 +2940,18 @@ var QuoteNode_default = QuoteNode;
|
|
|
2940
2940
|
|
|
2941
2941
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2942
2942
|
import React41 from "react";
|
|
2943
|
-
|
|
2944
|
-
// src/components/CopyButton.tsx
|
|
2945
|
-
import { useState as useState8, useRef as useRef3, useEffect as useEffect7 } from "react";
|
|
2943
|
+
import dynamic from "next/dynamic";
|
|
2946
2944
|
import { jsx as jsx52, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2953
|
-
};
|
|
2954
|
-
}, []);
|
|
2955
|
-
const handleCopy = async () => {
|
|
2956
|
-
try {
|
|
2957
|
-
await navigator.clipboard.writeText(text);
|
|
2958
|
-
setCopied(true);
|
|
2959
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2960
|
-
timeoutRef.current = setTimeout(() => setCopied(false), 2e3);
|
|
2961
|
-
} catch (err) {
|
|
2962
|
-
console.error("Failed to copy: ", err);
|
|
2963
|
-
}
|
|
2964
|
-
};
|
|
2965
|
-
return /* @__PURE__ */ jsxs25(
|
|
2966
|
-
"button",
|
|
2967
|
-
{
|
|
2968
|
-
onClick: handleCopy,
|
|
2969
|
-
className: "flex gap-1 items-center hover:text-white transition",
|
|
2970
|
-
children: [
|
|
2971
|
-
/* @__PURE__ */ jsx52(
|
|
2972
|
-
"svg",
|
|
2973
|
-
{
|
|
2974
|
-
width: "16",
|
|
2975
|
-
height: "16",
|
|
2976
|
-
viewBox: "0 0 24 24",
|
|
2977
|
-
className: "w-4 h-4",
|
|
2978
|
-
fill: "currentColor",
|
|
2979
|
-
children: /* @__PURE__ */ jsx52(
|
|
2980
|
-
"path",
|
|
2981
|
-
{
|
|
2982
|
-
fillRule: "evenodd",
|
|
2983
|
-
clipRule: "evenodd",
|
|
2984
|
-
d: "M12 4C10.8954 4 10 4.89543 10 6H14C14 4.89543 13.1046 4 12 4ZM8.53513 4C9.22675 2.8044 10.5194 2 12 2C13.4806 2 14.7733 2.8044 15.4649 4H17C18.6569 4 20 5.34315 20 7V19C20 20.6569 18.6569 22 17 22H7C5.34315 22 4 20.6569 4 19V7C4 5.34315 5.34315 4 7 4H8.53513ZM8 6H7C6.44772 6 6 6.44772 6 7V19C6 19.5523 6.44772 20 7 20H17C17.5523 20 18 19.5523 18 19V7C18 6.44772 17.5523 6 17 6H16C16 7.10457 15.1046 8 14 8H10C8.89543 8 8 7.10457 8 6Z"
|
|
2985
|
-
}
|
|
2986
|
-
)
|
|
2987
|
-
}
|
|
2988
|
-
),
|
|
2989
|
-
copied ? "Copied!" : "Copy code"
|
|
2990
|
-
]
|
|
2991
|
-
}
|
|
2992
|
-
);
|
|
2993
|
-
}
|
|
2994
|
-
|
|
2995
|
-
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2996
|
-
import { jsx as jsx53, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2945
|
+
var CopyButton = dynamic(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
2946
|
+
ssr: false,
|
|
2947
|
+
// optional: fallback UI while loading
|
|
2948
|
+
loading: () => /* @__PURE__ */ jsx52("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
2949
|
+
});
|
|
2997
2950
|
var CodeNode = (props) => {
|
|
2998
2951
|
const NodeTypes2 = {
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
// @ts-expect-error custom code
|
|
3003
|
-
["link"]: LinkNode_default
|
|
2952
|
+
text: TextNode_default,
|
|
2953
|
+
linebreak: LineBreakNode_default,
|
|
2954
|
+
link: LinkNode_default
|
|
3004
2955
|
};
|
|
3005
2956
|
const textContent = props.node?.children?.map((node) => {
|
|
3006
2957
|
if (node.type === "text") return node.text || "";
|
|
@@ -3008,23 +2959,31 @@ var CodeNode = (props) => {
|
|
|
3008
2959
|
if (node.type === "link") return node.text || node.url || "";
|
|
3009
2960
|
return "";
|
|
3010
2961
|
}).join("") ?? "";
|
|
3011
|
-
return /* @__PURE__ */
|
|
3012
|
-
/* @__PURE__ */
|
|
3013
|
-
/* @__PURE__ */
|
|
3014
|
-
/* @__PURE__ */
|
|
2962
|
+
return /* @__PURE__ */ jsxs25("div", { className: "code-block", children: [
|
|
2963
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center relative text-gray-200 bg-gray-800 px-4 py-2.5 text-xs font-sans justify-between rounded-t-md", children: [
|
|
2964
|
+
/* @__PURE__ */ jsx52("span", { children: "Code Snippet" }),
|
|
2965
|
+
/* @__PURE__ */ jsx52(CopyButton, { text: textContent })
|
|
3015
2966
|
] }),
|
|
3016
|
-
/* @__PURE__ */
|
|
2967
|
+
/* @__PURE__ */ jsx52("code", { className: "block bg-gray-900 text-gray-100 p-4 rounded-b-md text-sm whitespace-pre-wrap", children: props.node.children && props.node.children.map((node, index) => {
|
|
3017
2968
|
const SelectedNode = NodeTypes2[node.type];
|
|
3018
|
-
return /* @__PURE__ */
|
|
2969
|
+
return /* @__PURE__ */ jsx52(React41.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx52(
|
|
2970
|
+
SelectedNode,
|
|
2971
|
+
{
|
|
2972
|
+
node,
|
|
2973
|
+
session: props.session,
|
|
2974
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
2975
|
+
routeParameters: props.routeParameters
|
|
2976
|
+
}
|
|
2977
|
+
) }, index);
|
|
3019
2978
|
}) })
|
|
3020
2979
|
] });
|
|
3021
2980
|
};
|
|
3022
2981
|
var CodeNode_default = CodeNode;
|
|
3023
2982
|
|
|
3024
2983
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
3025
|
-
import { jsx as
|
|
2984
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
3026
2985
|
var HorizontalRuleNode = () => {
|
|
3027
|
-
return /* @__PURE__ */
|
|
2986
|
+
return /* @__PURE__ */ jsx53("hr", {});
|
|
3028
2987
|
};
|
|
3029
2988
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3030
2989
|
|
|
@@ -3045,9 +3004,9 @@ var AssetUtility = class {
|
|
|
3045
3004
|
var AssetUtility_default = AssetUtility;
|
|
3046
3005
|
|
|
3047
3006
|
// src/components/HlsPlayer.tsx
|
|
3048
|
-
import React42, { useRef as
|
|
3007
|
+
import React42, { useRef as useRef3, useEffect as useEffect7, useState as useState8, useCallback as useCallback3 } from "react";
|
|
3049
3008
|
import Hls from "hls.js";
|
|
3050
|
-
import { jsx as
|
|
3009
|
+
import { jsx as jsx54, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3051
3010
|
var HlsPlayer = React42.memo(
|
|
3052
3011
|
({
|
|
3053
3012
|
assetUrl,
|
|
@@ -3058,13 +3017,13 @@ var HlsPlayer = React42.memo(
|
|
|
3058
3017
|
loop = false,
|
|
3059
3018
|
playOptions = "autoplay"
|
|
3060
3019
|
}) => {
|
|
3061
|
-
const videoRef =
|
|
3062
|
-
const hlsRef =
|
|
3063
|
-
const [isPlaying, setIsPlaying] =
|
|
3064
|
-
const [isHovered, setIsHovered] =
|
|
3065
|
-
const [isMobile, setIsMobile] =
|
|
3066
|
-
const wasManuallyPausedRef =
|
|
3067
|
-
|
|
3020
|
+
const videoRef = useRef3(null);
|
|
3021
|
+
const hlsRef = useRef3(null);
|
|
3022
|
+
const [isPlaying, setIsPlaying] = useState8(playOptions === "autoplay");
|
|
3023
|
+
const [isHovered, setIsHovered] = useState8(false);
|
|
3024
|
+
const [isMobile, setIsMobile] = useState8(false);
|
|
3025
|
+
const wasManuallyPausedRef = useRef3(false);
|
|
3026
|
+
useEffect7(() => {
|
|
3068
3027
|
const checkMobile = () => {
|
|
3069
3028
|
const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
|
3070
3029
|
const isSmallScreen = window.innerWidth <= 768;
|
|
@@ -3076,7 +3035,7 @@ var HlsPlayer = React42.memo(
|
|
|
3076
3035
|
window.addEventListener("resize", checkMobile);
|
|
3077
3036
|
return () => window.removeEventListener("resize", checkMobile);
|
|
3078
3037
|
}, []);
|
|
3079
|
-
|
|
3038
|
+
useEffect7(() => {
|
|
3080
3039
|
const v = videoRef.current;
|
|
3081
3040
|
if (!v || !assetUrl) return;
|
|
3082
3041
|
if (hlsRef.current) {
|
|
@@ -3125,14 +3084,14 @@ var HlsPlayer = React42.memo(
|
|
|
3125
3084
|
setIsPlaying(false);
|
|
3126
3085
|
}
|
|
3127
3086
|
}, [playOptions, isMobile]);
|
|
3128
|
-
return /* @__PURE__ */
|
|
3087
|
+
return /* @__PURE__ */ jsxs26(
|
|
3129
3088
|
"div",
|
|
3130
3089
|
{
|
|
3131
3090
|
className: "relative w-full aspect-video bg-black",
|
|
3132
3091
|
onMouseEnter: handleMouseEnter,
|
|
3133
3092
|
onMouseLeave: handleMouseLeave,
|
|
3134
3093
|
children: [
|
|
3135
|
-
/* @__PURE__ */
|
|
3094
|
+
/* @__PURE__ */ jsx54(
|
|
3136
3095
|
"video",
|
|
3137
3096
|
{
|
|
3138
3097
|
ref: videoRef,
|
|
@@ -3146,7 +3105,7 @@ var HlsPlayer = React42.memo(
|
|
|
3146
3105
|
onClick: !isMobile && !isPlaying ? handlePlayPause : void 0
|
|
3147
3106
|
}
|
|
3148
3107
|
),
|
|
3149
|
-
!isMobile && playOptions === "playOnHover" && posterUrl && /* @__PURE__ */
|
|
3108
|
+
!isMobile && playOptions === "playOnHover" && posterUrl && /* @__PURE__ */ jsx54(
|
|
3150
3109
|
"img",
|
|
3151
3110
|
{
|
|
3152
3111
|
src: posterUrl,
|
|
@@ -3156,7 +3115,7 @@ var HlsPlayer = React42.memo(
|
|
|
3156
3115
|
className: `absolute inset-0 object-cover transition-opacity ${isHovered ? "opacity-0" : "opacity-100"}`
|
|
3157
3116
|
}
|
|
3158
3117
|
),
|
|
3159
|
-
!isMobile && !isPlaying && /* @__PURE__ */
|
|
3118
|
+
!isMobile && !isPlaying && /* @__PURE__ */ jsx54(
|
|
3160
3119
|
"div",
|
|
3161
3120
|
{
|
|
3162
3121
|
className: "absolute inset-0 flex items-center justify-center cursor-pointer",
|
|
@@ -3173,7 +3132,7 @@ HlsPlayer.displayName = "HlsPlayer";
|
|
|
3173
3132
|
var HlsPlayer_default = HlsPlayer;
|
|
3174
3133
|
|
|
3175
3134
|
// src/components/DeviceAssetSelector.tsx
|
|
3176
|
-
import { jsx as
|
|
3135
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
3177
3136
|
var DeviceAssetSelector = ({
|
|
3178
3137
|
assets,
|
|
3179
3138
|
apiBaseUrl,
|
|
@@ -3248,7 +3207,7 @@ var DeviceAssetSelector = ({
|
|
|
3248
3207
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
3249
3208
|
const renderMedia = () => {
|
|
3250
3209
|
if (isHls) {
|
|
3251
|
-
return /* @__PURE__ */
|
|
3210
|
+
return /* @__PURE__ */ jsx55(
|
|
3252
3211
|
HlsPlayer_default,
|
|
3253
3212
|
{
|
|
3254
3213
|
assetUrl: resolvedAssetUrl,
|
|
@@ -3263,7 +3222,7 @@ var DeviceAssetSelector = ({
|
|
|
3263
3222
|
} else {
|
|
3264
3223
|
return (
|
|
3265
3224
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
3266
|
-
/* @__PURE__ */
|
|
3225
|
+
/* @__PURE__ */ jsx55(
|
|
3267
3226
|
"img",
|
|
3268
3227
|
{
|
|
3269
3228
|
style: styles,
|
|
@@ -3279,17 +3238,17 @@ var DeviceAssetSelector = ({
|
|
|
3279
3238
|
}
|
|
3280
3239
|
};
|
|
3281
3240
|
if (width) {
|
|
3282
|
-
return /* @__PURE__ */
|
|
3241
|
+
return /* @__PURE__ */ jsx55("div", { style: { width }, children: renderMedia() });
|
|
3283
3242
|
}
|
|
3284
3243
|
if (nodeProps?.format) {
|
|
3285
|
-
return /* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ jsx55("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3286
3245
|
}
|
|
3287
3246
|
return renderMedia();
|
|
3288
3247
|
};
|
|
3289
3248
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
3290
3249
|
|
|
3291
3250
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3292
|
-
import { Fragment as Fragment6, jsx as
|
|
3251
|
+
import { Fragment as Fragment6, jsx as jsx56 } from "react/jsx-runtime";
|
|
3293
3252
|
var getNestedValue = (obj, path) => {
|
|
3294
3253
|
if (!obj || !path) return void 0;
|
|
3295
3254
|
return path.split(".").reduce((current, key) => {
|
|
@@ -3329,7 +3288,7 @@ var ImageNode = (props) => {
|
|
|
3329
3288
|
console.error("Error parsing assets in ImageNode:", error);
|
|
3330
3289
|
}
|
|
3331
3290
|
if (assets && assets.length > 0) {
|
|
3332
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ jsx56(Fragment6, { children: /* @__PURE__ */ jsx56(
|
|
3333
3292
|
DeviceAssetSelector_default,
|
|
3334
3293
|
{
|
|
3335
3294
|
device: props.device,
|
|
@@ -3378,7 +3337,7 @@ var ImageNode = (props) => {
|
|
|
3378
3337
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
3379
3338
|
const renderMedia = () => {
|
|
3380
3339
|
if (isHls) {
|
|
3381
|
-
return /* @__PURE__ */
|
|
3340
|
+
return /* @__PURE__ */ jsx56(
|
|
3382
3341
|
HlsPlayer_default,
|
|
3383
3342
|
{
|
|
3384
3343
|
assetUrl: imageUrl,
|
|
@@ -3391,7 +3350,7 @@ var ImageNode = (props) => {
|
|
|
3391
3350
|
}
|
|
3392
3351
|
);
|
|
3393
3352
|
} else {
|
|
3394
|
-
return /* @__PURE__ */
|
|
3353
|
+
return /* @__PURE__ */ jsx56(React43.Fragment, { children: /* @__PURE__ */ jsx56(
|
|
3395
3354
|
"img",
|
|
3396
3355
|
{
|
|
3397
3356
|
style: styles,
|
|
@@ -3406,14 +3365,14 @@ var ImageNode = (props) => {
|
|
|
3406
3365
|
}
|
|
3407
3366
|
};
|
|
3408
3367
|
if (props.node.width) {
|
|
3409
|
-
return /* @__PURE__ */
|
|
3368
|
+
return /* @__PURE__ */ jsx56("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3410
3369
|
}
|
|
3411
3370
|
return renderMedia();
|
|
3412
3371
|
};
|
|
3413
3372
|
var ImageNode_default = ImageNode;
|
|
3414
3373
|
|
|
3415
3374
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3416
|
-
import { Fragment as Fragment7, jsx as
|
|
3375
|
+
import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3417
3376
|
var WidgetNode = (props) => {
|
|
3418
3377
|
const getWidgetParameters = () => {
|
|
3419
3378
|
const widgetInputParameters = {
|
|
@@ -3470,14 +3429,14 @@ var WidgetNode = (props) => {
|
|
|
3470
3429
|
};
|
|
3471
3430
|
const widgetCode = props.node?.widgetCode;
|
|
3472
3431
|
if (!widgetCode) {
|
|
3473
|
-
return /* @__PURE__ */
|
|
3432
|
+
return /* @__PURE__ */ jsx57(Fragment7, { children: "Invalid widget" });
|
|
3474
3433
|
}
|
|
3475
3434
|
const SelectedWidget = getWidget(widgetCode);
|
|
3476
3435
|
if (!SelectedWidget) {
|
|
3477
3436
|
if (process.env.NODE_ENV !== "production") {
|
|
3478
3437
|
console.warn("Widget not found:", widgetCode);
|
|
3479
3438
|
}
|
|
3480
|
-
return /* @__PURE__ */
|
|
3439
|
+
return /* @__PURE__ */ jsxs27(Fragment7, { children: [
|
|
3481
3440
|
"Widget not found: ",
|
|
3482
3441
|
widgetCode
|
|
3483
3442
|
] });
|
|
@@ -3485,7 +3444,7 @@ var WidgetNode = (props) => {
|
|
|
3485
3444
|
const widgetParams = getWidgetParameters();
|
|
3486
3445
|
return (
|
|
3487
3446
|
// eslint-disable-next-line react-hooks/static-components
|
|
3488
|
-
/* @__PURE__ */
|
|
3447
|
+
/* @__PURE__ */ jsx57(
|
|
3489
3448
|
SelectedWidget,
|
|
3490
3449
|
{
|
|
3491
3450
|
params: widgetParams,
|
|
@@ -3501,12 +3460,12 @@ var WidgetNode = (props) => {
|
|
|
3501
3460
|
var WidgetNode_default = WidgetNode;
|
|
3502
3461
|
|
|
3503
3462
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3504
|
-
import React44, { useRef as
|
|
3463
|
+
import React44, { useRef as useRef4, useReducer as useReducer2, useCallback as useCallback4, useEffect as useEffect8 } from "react";
|
|
3505
3464
|
|
|
3506
3465
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3507
|
-
import { jsx as
|
|
3466
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
3508
3467
|
var InputControlNode = (props) => {
|
|
3509
|
-
return /* @__PURE__ */
|
|
3468
|
+
return /* @__PURE__ */ jsx58("div", { children: /* @__PURE__ */ jsx58(
|
|
3510
3469
|
InputControl_default,
|
|
3511
3470
|
{
|
|
3512
3471
|
name: props.node.name,
|
|
@@ -3740,13 +3699,13 @@ var ServiceClient = class {
|
|
|
3740
3699
|
var ServiceClient_default = ServiceClient;
|
|
3741
3700
|
|
|
3742
3701
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3743
|
-
import { jsx as
|
|
3702
|
+
import { jsx as jsx59, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3744
3703
|
var FormContainerNode = (props) => {
|
|
3745
3704
|
const NodeTypes2 = {
|
|
3746
3705
|
["input-control"]: InputControlNode_default
|
|
3747
3706
|
};
|
|
3748
3707
|
const { node } = props;
|
|
3749
|
-
const formRef =
|
|
3708
|
+
const formRef = useRef4(null);
|
|
3750
3709
|
const initialState = {
|
|
3751
3710
|
inputValues: {},
|
|
3752
3711
|
lastPropertyChanged: ""
|
|
@@ -3755,7 +3714,7 @@ var FormContainerNode = (props) => {
|
|
|
3755
3714
|
const handleInputChange = useCallback4((updatedValues) => {
|
|
3756
3715
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
3757
3716
|
}, [dispatch]);
|
|
3758
|
-
|
|
3717
|
+
useEffect8(() => {
|
|
3759
3718
|
const fetchInitialData = async () => {
|
|
3760
3719
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
3761
3720
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -3770,12 +3729,12 @@ var FormContainerNode = (props) => {
|
|
|
3770
3729
|
};
|
|
3771
3730
|
fetchInitialData();
|
|
3772
3731
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3773
|
-
return /* @__PURE__ */
|
|
3732
|
+
return /* @__PURE__ */ jsxs28("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3774
3733
|
node.children && node.children.map((node2, index) => {
|
|
3775
3734
|
{
|
|
3776
3735
|
}
|
|
3777
3736
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3778
|
-
return /* @__PURE__ */
|
|
3737
|
+
return /* @__PURE__ */ jsx59(React44.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx59(
|
|
3779
3738
|
InputControlNode_default,
|
|
3780
3739
|
{
|
|
3781
3740
|
value: formState.inputValues[node2.name],
|
|
@@ -3784,7 +3743,7 @@ var FormContainerNode = (props) => {
|
|
|
3784
3743
|
}
|
|
3785
3744
|
) }, index);
|
|
3786
3745
|
}),
|
|
3787
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
3746
|
+
node.children.length == 0 && /* @__PURE__ */ jsx59("div", { className: "py-0.5 lg:py-1.5" })
|
|
3788
3747
|
] });
|
|
3789
3748
|
};
|
|
3790
3749
|
var FormContainerNode_default = FormContainerNode;
|
|
@@ -3793,9 +3752,9 @@ var FormContainerNode_default = FormContainerNode;
|
|
|
3793
3752
|
import React47 from "react";
|
|
3794
3753
|
|
|
3795
3754
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3796
|
-
import
|
|
3797
|
-
import { jsx as
|
|
3798
|
-
var IframeClient =
|
|
3755
|
+
import dynamic2 from "next/dynamic";
|
|
3756
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3757
|
+
var IframeClient = dynamic2(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
3799
3758
|
ssr: false
|
|
3800
3759
|
});
|
|
3801
3760
|
var EmbedNode = (props) => {
|
|
@@ -3807,13 +3766,13 @@ var EmbedNode = (props) => {
|
|
|
3807
3766
|
} else {
|
|
3808
3767
|
src = props.node.embedSrc;
|
|
3809
3768
|
}
|
|
3810
|
-
return /* @__PURE__ */
|
|
3769
|
+
return /* @__PURE__ */ jsx60("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx60(IframeClient, { src }) });
|
|
3811
3770
|
};
|
|
3812
3771
|
var EmbedNode_default = EmbedNode;
|
|
3813
3772
|
|
|
3814
3773
|
// src/components/Slider.tsx
|
|
3815
|
-
import React45, { useState as
|
|
3816
|
-
import { Fragment as Fragment8, jsx as
|
|
3774
|
+
import React45, { useState as useState9, useEffect as useEffect9, Children, cloneElement } from "react";
|
|
3775
|
+
import { Fragment as Fragment8, jsx as jsx61, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3817
3776
|
var Slider = ({
|
|
3818
3777
|
children,
|
|
3819
3778
|
slidesToShow = 4,
|
|
@@ -3831,13 +3790,13 @@ var Slider = ({
|
|
|
3831
3790
|
pillStyle = "cumulative",
|
|
3832
3791
|
progressPosition = "bottom"
|
|
3833
3792
|
}) => {
|
|
3834
|
-
const [currentSlide, setCurrentSlide] =
|
|
3835
|
-
const [transition, setTransition] =
|
|
3836
|
-
const [slidesToShowState, setSlidesToShowState] =
|
|
3793
|
+
const [currentSlide, setCurrentSlide] = useState9(0);
|
|
3794
|
+
const [transition, setTransition] = useState9(true);
|
|
3795
|
+
const [slidesToShowState, setSlidesToShowState] = useState9(
|
|
3837
3796
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3838
3797
|
);
|
|
3839
|
-
const [isPlaying, setIsPlaying] =
|
|
3840
|
-
|
|
3798
|
+
const [isPlaying, setIsPlaying] = useState9(autoplay);
|
|
3799
|
+
useEffect9(() => {
|
|
3841
3800
|
if (typeof slidesToShow === "number") return;
|
|
3842
3801
|
const handleResize = () => {
|
|
3843
3802
|
if (window.innerWidth >= 1024) {
|
|
@@ -3852,7 +3811,7 @@ var Slider = ({
|
|
|
3852
3811
|
window.addEventListener("resize", handleResize);
|
|
3853
3812
|
return () => window.removeEventListener("resize", handleResize);
|
|
3854
3813
|
}, [slidesToShow]);
|
|
3855
|
-
|
|
3814
|
+
useEffect9(() => {
|
|
3856
3815
|
if (!autoplay) return;
|
|
3857
3816
|
const timer = setInterval(() => {
|
|
3858
3817
|
if (isPlaying) {
|
|
@@ -3910,7 +3869,7 @@ var Slider = ({
|
|
|
3910
3869
|
if (!React45.isValidElement(child)) return null;
|
|
3911
3870
|
const childProps = child.props;
|
|
3912
3871
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3913
|
-
return /* @__PURE__ */
|
|
3872
|
+
return /* @__PURE__ */ jsx61(
|
|
3914
3873
|
"div",
|
|
3915
3874
|
{
|
|
3916
3875
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -3933,14 +3892,14 @@ var Slider = ({
|
|
|
3933
3892
|
return "bottom-4";
|
|
3934
3893
|
}
|
|
3935
3894
|
};
|
|
3936
|
-
return /* @__PURE__ */
|
|
3895
|
+
return /* @__PURE__ */ jsxs29(
|
|
3937
3896
|
"div",
|
|
3938
3897
|
{
|
|
3939
3898
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3940
3899
|
onMouseEnter: handleMouseEnter,
|
|
3941
3900
|
onMouseLeave: handleMouseLeave,
|
|
3942
3901
|
children: [
|
|
3943
|
-
/* @__PURE__ */
|
|
3902
|
+
/* @__PURE__ */ jsx61(
|
|
3944
3903
|
"div",
|
|
3945
3904
|
{
|
|
3946
3905
|
className: "flex h-full",
|
|
@@ -3951,18 +3910,18 @@ var Slider = ({
|
|
|
3951
3910
|
children: slides
|
|
3952
3911
|
}
|
|
3953
3912
|
),
|
|
3954
|
-
show_arrows && /* @__PURE__ */
|
|
3955
|
-
/* @__PURE__ */
|
|
3913
|
+
show_arrows && /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
3914
|
+
/* @__PURE__ */ jsx61(
|
|
3956
3915
|
ArrowButton,
|
|
3957
3916
|
{
|
|
3958
3917
|
direction: "left",
|
|
3959
3918
|
onClick: prevSlide,
|
|
3960
3919
|
visible: infinite_scroll || currentSlide > 0,
|
|
3961
3920
|
className: arrowClassName,
|
|
3962
|
-
children: /* @__PURE__ */
|
|
3921
|
+
children: /* @__PURE__ */ jsx61("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__ */ jsx61("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3963
3922
|
}
|
|
3964
3923
|
),
|
|
3965
|
-
/* @__PURE__ */
|
|
3924
|
+
/* @__PURE__ */ jsxs29(
|
|
3966
3925
|
ArrowButton,
|
|
3967
3926
|
{
|
|
3968
3927
|
direction: "right",
|
|
@@ -3970,13 +3929,13 @@ var Slider = ({
|
|
|
3970
3929
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3971
3930
|
className: arrowClassName,
|
|
3972
3931
|
children: [
|
|
3973
|
-
/* @__PURE__ */
|
|
3932
|
+
/* @__PURE__ */ jsx61("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__ */ jsx61("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3974
3933
|
" "
|
|
3975
3934
|
]
|
|
3976
3935
|
}
|
|
3977
3936
|
)
|
|
3978
3937
|
] }),
|
|
3979
|
-
show_dots && /* @__PURE__ */
|
|
3938
|
+
show_dots && /* @__PURE__ */ jsx61("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__ */ jsx61(
|
|
3980
3939
|
ProgressPill,
|
|
3981
3940
|
{
|
|
3982
3941
|
active: index === currentSlide,
|
|
@@ -4002,7 +3961,7 @@ var ArrowButton = ({
|
|
|
4002
3961
|
visible,
|
|
4003
3962
|
children,
|
|
4004
3963
|
className = ""
|
|
4005
|
-
}) => /* @__PURE__ */
|
|
3964
|
+
}) => /* @__PURE__ */ jsx61(
|
|
4006
3965
|
"button",
|
|
4007
3966
|
{
|
|
4008
3967
|
className: `
|
|
@@ -4028,13 +3987,13 @@ var ProgressPill = ({
|
|
|
4028
3987
|
currentSlide,
|
|
4029
3988
|
totalSlides
|
|
4030
3989
|
}) => {
|
|
4031
|
-
const [progress, setProgress] =
|
|
4032
|
-
|
|
3990
|
+
const [progress, setProgress] = useState9(0);
|
|
3991
|
+
useEffect9(() => {
|
|
4033
3992
|
if (active) {
|
|
4034
3993
|
setProgress(0);
|
|
4035
3994
|
}
|
|
4036
3995
|
}, [active, index]);
|
|
4037
|
-
|
|
3996
|
+
useEffect9(() => {
|
|
4038
3997
|
if (!active || !isPlaying) {
|
|
4039
3998
|
if (!active) {
|
|
4040
3999
|
setProgress(0);
|
|
@@ -4089,7 +4048,7 @@ var ProgressPill = ({
|
|
|
4089
4048
|
const renderProgressBar = () => {
|
|
4090
4049
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
4091
4050
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
4092
|
-
return /* @__PURE__ */
|
|
4051
|
+
return /* @__PURE__ */ jsx61(
|
|
4093
4052
|
"div",
|
|
4094
4053
|
{
|
|
4095
4054
|
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`,
|
|
@@ -4101,7 +4060,7 @@ var ProgressPill = ({
|
|
|
4101
4060
|
};
|
|
4102
4061
|
const renderCumulativeFill = () => {
|
|
4103
4062
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4104
|
-
return /* @__PURE__ */
|
|
4063
|
+
return /* @__PURE__ */ jsx61(
|
|
4105
4064
|
"div",
|
|
4106
4065
|
{
|
|
4107
4066
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4111,7 +4070,7 @@ var ProgressPill = ({
|
|
|
4111
4070
|
}
|
|
4112
4071
|
return null;
|
|
4113
4072
|
};
|
|
4114
|
-
return /* @__PURE__ */
|
|
4073
|
+
return /* @__PURE__ */ jsxs29(
|
|
4115
4074
|
"button",
|
|
4116
4075
|
{
|
|
4117
4076
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4287,10 +4246,10 @@ var PathUtility = class {
|
|
|
4287
4246
|
var PathUtility_default = new PathUtility();
|
|
4288
4247
|
|
|
4289
4248
|
// src/components/NoDataFound.tsx
|
|
4290
|
-
import { jsx as
|
|
4249
|
+
import { jsx as jsx62, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4291
4250
|
var NoDataFound = () => {
|
|
4292
|
-
return /* @__PURE__ */
|
|
4293
|
-
/* @__PURE__ */
|
|
4251
|
+
return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4252
|
+
/* @__PURE__ */ jsx62("div", { className: "mb-5", children: /* @__PURE__ */ jsx62("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx62(
|
|
4294
4253
|
"svg",
|
|
4295
4254
|
{
|
|
4296
4255
|
className: "w-10 h-10",
|
|
@@ -4298,7 +4257,7 @@ var NoDataFound = () => {
|
|
|
4298
4257
|
stroke: "currentColor",
|
|
4299
4258
|
viewBox: "0 0 24 24",
|
|
4300
4259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4301
|
-
children: /* @__PURE__ */
|
|
4260
|
+
children: /* @__PURE__ */ jsx62(
|
|
4302
4261
|
"path",
|
|
4303
4262
|
{
|
|
4304
4263
|
strokeLinecap: "round",
|
|
@@ -4309,15 +4268,15 @@ var NoDataFound = () => {
|
|
|
4309
4268
|
)
|
|
4310
4269
|
}
|
|
4311
4270
|
) }) }),
|
|
4312
|
-
/* @__PURE__ */
|
|
4313
|
-
/* @__PURE__ */
|
|
4271
|
+
/* @__PURE__ */ jsx62("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4272
|
+
/* @__PURE__ */ jsx62("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4314
4273
|
] });
|
|
4315
4274
|
};
|
|
4316
4275
|
var NoDataFound_default = NoDataFound;
|
|
4317
4276
|
|
|
4318
4277
|
// src/components/Pagination.tsx
|
|
4319
4278
|
import { useMemo } from "react";
|
|
4320
|
-
import { jsx as
|
|
4279
|
+
import { jsx as jsx63, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4321
4280
|
var Pagination = (props) => {
|
|
4322
4281
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4323
4282
|
const builder = useMemo(() => {
|
|
@@ -4361,7 +4320,7 @@ var Pagination = (props) => {
|
|
|
4361
4320
|
return range;
|
|
4362
4321
|
};
|
|
4363
4322
|
const paginationRange = getPaginationRange();
|
|
4364
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
4323
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx63(
|
|
4365
4324
|
Hyperlink,
|
|
4366
4325
|
{
|
|
4367
4326
|
linkType: "Link" /* Link */,
|
|
@@ -4376,9 +4335,9 @@ var Pagination = (props) => {
|
|
|
4376
4335
|
);
|
|
4377
4336
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4378
4337
|
if (disabled) {
|
|
4379
|
-
return /* @__PURE__ */
|
|
4338
|
+
return /* @__PURE__ */ jsx63("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 });
|
|
4380
4339
|
}
|
|
4381
|
-
return /* @__PURE__ */
|
|
4340
|
+
return /* @__PURE__ */ jsx63(
|
|
4382
4341
|
Hyperlink,
|
|
4383
4342
|
{
|
|
4384
4343
|
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",
|
|
@@ -4388,35 +4347,35 @@ var Pagination = (props) => {
|
|
|
4388
4347
|
);
|
|
4389
4348
|
};
|
|
4390
4349
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4391
|
-
return /* @__PURE__ */
|
|
4392
|
-
/* @__PURE__ */
|
|
4393
|
-
/* @__PURE__ */
|
|
4350
|
+
return /* @__PURE__ */ jsxs31("div", { className: "py-6 border-t bg-default", children: [
|
|
4351
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4352
|
+
/* @__PURE__ */ jsxs31("div", { className: "text-sm", children: [
|
|
4394
4353
|
"Showing ",
|
|
4395
|
-
/* @__PURE__ */
|
|
4354
|
+
/* @__PURE__ */ jsxs31("span", { className: "font-semibold", children: [
|
|
4396
4355
|
startItem,
|
|
4397
4356
|
"-",
|
|
4398
4357
|
endItem
|
|
4399
4358
|
] }),
|
|
4400
4359
|
" ",
|
|
4401
4360
|
"out of ",
|
|
4402
|
-
/* @__PURE__ */
|
|
4361
|
+
/* @__PURE__ */ jsx63("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4403
4362
|
" results"
|
|
4404
4363
|
] }),
|
|
4405
|
-
totalPages > 1 && /* @__PURE__ */
|
|
4406
|
-
/* @__PURE__ */
|
|
4364
|
+
totalPages > 1 && /* @__PURE__ */ jsxs31("div", { className: "flex items-center space-x-1", children: [
|
|
4365
|
+
/* @__PURE__ */ jsxs31(
|
|
4407
4366
|
NavigationButton,
|
|
4408
4367
|
{
|
|
4409
4368
|
page: activePageNumber - 1,
|
|
4410
4369
|
disabled: activePageNumber === 1,
|
|
4411
4370
|
children: [
|
|
4412
|
-
/* @__PURE__ */
|
|
4413
|
-
/* @__PURE__ */
|
|
4371
|
+
/* @__PURE__ */ jsx63("span", { children: /* @__PURE__ */ jsx63(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4372
|
+
/* @__PURE__ */ jsx63("span", { className: "text-sm", children: "Prev" })
|
|
4414
4373
|
]
|
|
4415
4374
|
}
|
|
4416
4375
|
),
|
|
4417
4376
|
paginationRange.map((item, index) => {
|
|
4418
4377
|
if (item === "...") {
|
|
4419
|
-
return /* @__PURE__ */
|
|
4378
|
+
return /* @__PURE__ */ jsx63(
|
|
4420
4379
|
"span",
|
|
4421
4380
|
{
|
|
4422
4381
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4426,23 +4385,23 @@ var Pagination = (props) => {
|
|
|
4426
4385
|
);
|
|
4427
4386
|
}
|
|
4428
4387
|
const page = item;
|
|
4429
|
-
return /* @__PURE__ */
|
|
4388
|
+
return /* @__PURE__ */ jsx63(PageButton, { page, children: page }, page);
|
|
4430
4389
|
}),
|
|
4431
|
-
/* @__PURE__ */
|
|
4390
|
+
/* @__PURE__ */ jsxs31(
|
|
4432
4391
|
NavigationButton,
|
|
4433
4392
|
{
|
|
4434
4393
|
page: activePageNumber + 1,
|
|
4435
4394
|
disabled: activePageNumber === totalPages,
|
|
4436
4395
|
children: [
|
|
4437
|
-
/* @__PURE__ */
|
|
4438
|
-
/* @__PURE__ */
|
|
4396
|
+
/* @__PURE__ */ jsx63("span", { className: "text-sm", children: "Next" }),
|
|
4397
|
+
/* @__PURE__ */ jsx63("span", { children: /* @__PURE__ */ jsx63(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4439
4398
|
]
|
|
4440
4399
|
}
|
|
4441
4400
|
)
|
|
4442
4401
|
] }),
|
|
4443
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
4444
|
-
/* @__PURE__ */
|
|
4445
|
-
/* @__PURE__ */
|
|
4402
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs31("div", { className: "flex items-center space-x-2", children: [
|
|
4403
|
+
/* @__PURE__ */ jsx63("span", { className: "text-sm", children: "Go to:" }),
|
|
4404
|
+
/* @__PURE__ */ jsx63("div", { className: "relative", children: /* @__PURE__ */ jsx63(
|
|
4446
4405
|
"input",
|
|
4447
4406
|
{
|
|
4448
4407
|
type: "number",
|
|
@@ -4463,9 +4422,9 @@ var Pagination = (props) => {
|
|
|
4463
4422
|
) })
|
|
4464
4423
|
] })
|
|
4465
4424
|
] }),
|
|
4466
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
4467
|
-
/* @__PURE__ */
|
|
4468
|
-
/* @__PURE__ */
|
|
4425
|
+
showPageSizeSelector && /* @__PURE__ */ jsx63("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4426
|
+
/* @__PURE__ */ jsx63("span", { className: "text-sm", children: "Show:" }),
|
|
4427
|
+
/* @__PURE__ */ jsx63("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx63(
|
|
4469
4428
|
Hyperlink,
|
|
4470
4429
|
{
|
|
4471
4430
|
className: `
|
|
@@ -4477,14 +4436,14 @@ var Pagination = (props) => {
|
|
|
4477
4436
|
},
|
|
4478
4437
|
size
|
|
4479
4438
|
)) }),
|
|
4480
|
-
/* @__PURE__ */
|
|
4439
|
+
/* @__PURE__ */ jsx63("span", { className: "text-sm", children: "per page" })
|
|
4481
4440
|
] }) })
|
|
4482
4441
|
] });
|
|
4483
4442
|
};
|
|
4484
4443
|
var Pagination_default = Pagination;
|
|
4485
4444
|
|
|
4486
4445
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4487
|
-
import { jsx as
|
|
4446
|
+
import { jsx as jsx64, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4488
4447
|
function toCamelCase(str) {
|
|
4489
4448
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4490
4449
|
}
|
|
@@ -4666,7 +4625,7 @@ var DivContainer = async (props) => {
|
|
|
4666
4625
|
response = await serviceClient.get(endpoint);
|
|
4667
4626
|
result = response?.result;
|
|
4668
4627
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4669
|
-
return /* @__PURE__ */
|
|
4628
|
+
return /* @__PURE__ */ jsx64(NoDataFound_default, {});
|
|
4670
4629
|
}
|
|
4671
4630
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4672
4631
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -4678,7 +4637,7 @@ var DivContainer = async (props) => {
|
|
|
4678
4637
|
}
|
|
4679
4638
|
const SelectedNode = NodeTypes2[node.type];
|
|
4680
4639
|
if (!SelectedNode) return null;
|
|
4681
|
-
return /* @__PURE__ */
|
|
4640
|
+
return /* @__PURE__ */ jsx64(React47.Fragment, { children: /* @__PURE__ */ jsx64(
|
|
4682
4641
|
SelectedNode,
|
|
4683
4642
|
{
|
|
4684
4643
|
node,
|
|
@@ -4778,9 +4737,9 @@ var DivContainer = async (props) => {
|
|
|
4778
4737
|
props.node.autoFormat && "auto-format",
|
|
4779
4738
|
props.node.bgClass
|
|
4780
4739
|
].filter(Boolean).join(" ");
|
|
4781
|
-
return /* @__PURE__ */
|
|
4782
|
-
/* @__PURE__ */
|
|
4783
|
-
/* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ jsxs32(React47.Fragment, { children: [
|
|
4741
|
+
/* @__PURE__ */ jsx64("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4742
|
+
/* @__PURE__ */ jsx64(React47.Fragment, { children: /* @__PURE__ */ jsx64(
|
|
4784
4743
|
Wrapper,
|
|
4785
4744
|
{
|
|
4786
4745
|
id: guid,
|
|
@@ -4789,18 +4748,18 @@ var DivContainer = async (props) => {
|
|
|
4789
4748
|
...wrapperProps,
|
|
4790
4749
|
children: dataToRender.map(
|
|
4791
4750
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4792
|
-
(child, i) => /* @__PURE__ */
|
|
4751
|
+
(child, i) => /* @__PURE__ */ jsx64(React47.Fragment, { children: child }, i)
|
|
4793
4752
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4794
4753
|
)
|
|
4795
4754
|
}
|
|
4796
4755
|
) }),
|
|
4797
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4756
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx64("div", { children: /* @__PURE__ */ jsx64(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4798
4757
|
] });
|
|
4799
4758
|
};
|
|
4800
4759
|
var DivContainer_default = DivContainer;
|
|
4801
4760
|
|
|
4802
4761
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4803
|
-
import { jsx as
|
|
4762
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
4804
4763
|
var NodeTypes = {
|
|
4805
4764
|
["paragraph"]: ParagraphNode_default,
|
|
4806
4765
|
["heading"]: HeadingNode_default,
|
|
@@ -4827,11 +4786,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4827
4786
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4828
4787
|
rootNode = pageBodyTree.root;
|
|
4829
4788
|
}
|
|
4830
|
-
return /* @__PURE__ */
|
|
4789
|
+
return /* @__PURE__ */ jsx65(React48.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4831
4790
|
{
|
|
4832
4791
|
}
|
|
4833
4792
|
const SelectedNode = NodeTypes[node.type];
|
|
4834
|
-
return /* @__PURE__ */
|
|
4793
|
+
return /* @__PURE__ */ jsx65(React48.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx65(React48.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx65(React48.Fragment, { children: /* @__PURE__ */ jsx65(
|
|
4835
4794
|
SelectedNode,
|
|
4836
4795
|
{
|
|
4837
4796
|
node,
|
|
@@ -4846,7 +4805,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4846
4805
|
assetBaseUrl: props.assetBaseUrl,
|
|
4847
4806
|
device: props.device
|
|
4848
4807
|
}
|
|
4849
|
-
) }) : /* @__PURE__ */
|
|
4808
|
+
) }) : /* @__PURE__ */ jsx65(React48.Fragment, { children: /* @__PURE__ */ jsx65(
|
|
4850
4809
|
SelectedNode,
|
|
4851
4810
|
{
|
|
4852
4811
|
node,
|
package/package.json
CHANGED