@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260425114015 → 0.8.1-dev.20260427125546
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +768 -563
- package/dist/index.mjs +633 -428
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -277,15 +277,15 @@ var HlsPlayer_exports = {};
|
|
|
277
277
|
__export(HlsPlayer_exports, {
|
|
278
278
|
default: () => HlsPlayer_default
|
|
279
279
|
});
|
|
280
|
-
var
|
|
280
|
+
var import_react32, import_hls, import_jsx_runtime41, HlsPlayer, HlsPlayer_default;
|
|
281
281
|
var init_HlsPlayer = __esm({
|
|
282
282
|
"src/components/HlsPlayer.tsx"() {
|
|
283
283
|
"use strict";
|
|
284
284
|
"use client";
|
|
285
|
-
|
|
285
|
+
import_react32 = __toESM(require("react"));
|
|
286
286
|
import_hls = __toESM(require("hls.js"));
|
|
287
|
-
|
|
288
|
-
HlsPlayer =
|
|
287
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
288
|
+
HlsPlayer = import_react32.default.memo(
|
|
289
289
|
({
|
|
290
290
|
sources,
|
|
291
291
|
assetUrl,
|
|
@@ -297,18 +297,18 @@ var init_HlsPlayer = __esm({
|
|
|
297
297
|
playOptions = "autoplay",
|
|
298
298
|
placementCode = ""
|
|
299
299
|
}) => {
|
|
300
|
-
const videoRef = (0,
|
|
301
|
-
const hlsRef = (0,
|
|
302
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
303
|
-
const [isHovered, setIsHovered] = (0,
|
|
304
|
-
const [isMobile, setIsMobile] = (0,
|
|
305
|
-
const [isControlsVisible, setIsControlsVisible] = (0,
|
|
306
|
-
const [isPosterVisible, setIsPosterVisible] = (0,
|
|
307
|
-
const wasManuallyPausedRef = (0,
|
|
308
|
-
const inactivityTimerRef = (0,
|
|
300
|
+
const videoRef = (0, import_react32.useRef)(null);
|
|
301
|
+
const hlsRef = (0, import_react32.useRef)(null);
|
|
302
|
+
const [isPlaying, setIsPlaying] = (0, import_react32.useState)(playOptions === "autoplay");
|
|
303
|
+
const [isHovered, setIsHovered] = (0, import_react32.useState)(false);
|
|
304
|
+
const [isMobile, setIsMobile] = (0, import_react32.useState)(false);
|
|
305
|
+
const [isControlsVisible, setIsControlsVisible] = (0, import_react32.useState)(true);
|
|
306
|
+
const [isPosterVisible, setIsPosterVisible] = (0, import_react32.useState)(true);
|
|
307
|
+
const wasManuallyPausedRef = (0, import_react32.useRef)(false);
|
|
308
|
+
const inactivityTimerRef = (0, import_react32.useRef)(null);
|
|
309
309
|
const INACTIVITY_DELAY = 2500;
|
|
310
310
|
const resolvedSources = sources && sources.length > 0 ? sources : assetUrl ? [{ src: assetUrl, posterUrl }] : [];
|
|
311
|
-
(0,
|
|
311
|
+
(0, import_react32.useEffect)(() => {
|
|
312
312
|
const checkMobile = () => {
|
|
313
313
|
const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
|
314
314
|
const isSmallScreen = window.innerWidth <= 768;
|
|
@@ -321,7 +321,7 @@ var init_HlsPlayer = __esm({
|
|
|
321
321
|
window.addEventListener("resize", checkMobile);
|
|
322
322
|
return () => window.removeEventListener("resize", checkMobile);
|
|
323
323
|
}, []);
|
|
324
|
-
(0,
|
|
324
|
+
(0, import_react32.useEffect)(() => {
|
|
325
325
|
const v = videoRef.current;
|
|
326
326
|
if (!v) return;
|
|
327
327
|
const onPlaying = () => setIsPosterVisible(false);
|
|
@@ -335,7 +335,7 @@ var init_HlsPlayer = __esm({
|
|
|
335
335
|
v.removeEventListener("pause", onPause);
|
|
336
336
|
};
|
|
337
337
|
}, []);
|
|
338
|
-
const resetInactivityTimer = (0,
|
|
338
|
+
const resetInactivityTimer = (0, import_react32.useCallback)(() => {
|
|
339
339
|
setIsControlsVisible(true);
|
|
340
340
|
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
341
341
|
if (isPlaying) {
|
|
@@ -345,18 +345,18 @@ var init_HlsPlayer = __esm({
|
|
|
345
345
|
);
|
|
346
346
|
}
|
|
347
347
|
}, [isPlaying]);
|
|
348
|
-
(0,
|
|
348
|
+
(0, import_react32.useEffect)(() => {
|
|
349
349
|
if (!isPlaying) {
|
|
350
350
|
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
351
351
|
setIsControlsVisible(true);
|
|
352
352
|
}
|
|
353
353
|
}, [isPlaying]);
|
|
354
|
-
(0,
|
|
354
|
+
(0, import_react32.useEffect)(() => {
|
|
355
355
|
return () => {
|
|
356
356
|
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
357
357
|
};
|
|
358
358
|
}, []);
|
|
359
|
-
(0,
|
|
359
|
+
(0, import_react32.useEffect)(() => {
|
|
360
360
|
const v = videoRef.current;
|
|
361
361
|
if (!v || resolvedSources.length === 0) return;
|
|
362
362
|
if (hlsRef.current) {
|
|
@@ -388,7 +388,7 @@ var init_HlsPlayer = __esm({
|
|
|
388
388
|
v.load();
|
|
389
389
|
}
|
|
390
390
|
}, [JSON.stringify(resolvedSources)]);
|
|
391
|
-
const handlePlayPause = (0,
|
|
391
|
+
const handlePlayPause = (0, import_react32.useCallback)(() => {
|
|
392
392
|
const v = videoRef.current;
|
|
393
393
|
if (!v) return;
|
|
394
394
|
if (v.paused) {
|
|
@@ -400,7 +400,7 @@ var init_HlsPlayer = __esm({
|
|
|
400
400
|
setIsPlaying(false);
|
|
401
401
|
}
|
|
402
402
|
}, []);
|
|
403
|
-
const handleMouseEnter = (0,
|
|
403
|
+
const handleMouseEnter = (0, import_react32.useCallback)(() => {
|
|
404
404
|
if (isMobile) return;
|
|
405
405
|
setIsHovered(true);
|
|
406
406
|
resetInactivityTimer();
|
|
@@ -408,7 +408,7 @@ var init_HlsPlayer = __esm({
|
|
|
408
408
|
videoRef.current.play().then(() => setIsPlaying(true));
|
|
409
409
|
}
|
|
410
410
|
}, [playOptions, isMobile, resetInactivityTimer]);
|
|
411
|
-
const handleMouseLeave = (0,
|
|
411
|
+
const handleMouseLeave = (0, import_react32.useCallback)(() => {
|
|
412
412
|
if (isMobile) return;
|
|
413
413
|
setIsHovered(false);
|
|
414
414
|
if (inactivityTimerRef.current) clearTimeout(inactivityTimerRef.current);
|
|
@@ -419,7 +419,7 @@ var init_HlsPlayer = __esm({
|
|
|
419
419
|
setIsPlaying(false);
|
|
420
420
|
}
|
|
421
421
|
}, [playOptions, isMobile, isPlaying]);
|
|
422
|
-
const handleMouseMove = (0,
|
|
422
|
+
const handleMouseMove = (0, import_react32.useCallback)(() => {
|
|
423
423
|
if (isMobile) return;
|
|
424
424
|
resetInactivityTimer();
|
|
425
425
|
}, [isMobile, resetInactivityTimer]);
|
|
@@ -427,7 +427,7 @@ var init_HlsPlayer = __esm({
|
|
|
427
427
|
const fallbackPoster = posterUrl ?? resolvedSources.find((s) => !s.media)?.posterUrl ?? resolvedSources[0]?.posterUrl;
|
|
428
428
|
const isPlayOnHover = playOptions === "playOnHover";
|
|
429
429
|
if (resolvedSources.length === 0) return null;
|
|
430
|
-
return /* @__PURE__ */ (0,
|
|
430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
431
431
|
"div",
|
|
432
432
|
{
|
|
433
433
|
className: "relative w-full aspect-video bg-black",
|
|
@@ -435,7 +435,7 @@ var init_HlsPlayer = __esm({
|
|
|
435
435
|
onMouseLeave: handleMouseLeave,
|
|
436
436
|
onMouseMove: handleMouseMove,
|
|
437
437
|
children: [
|
|
438
|
-
/* @__PURE__ */ (0,
|
|
438
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
439
439
|
"video",
|
|
440
440
|
{
|
|
441
441
|
ref: videoRef,
|
|
@@ -447,7 +447,7 @@ var init_HlsPlayer = __esm({
|
|
|
447
447
|
loop,
|
|
448
448
|
playsInline: true,
|
|
449
449
|
onClick: !isMobile ? handlePlayPause : void 0,
|
|
450
|
-
children: resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ (0,
|
|
450
|
+
children: resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
451
451
|
"source",
|
|
452
452
|
{
|
|
453
453
|
src,
|
|
@@ -458,7 +458,7 @@ var init_HlsPlayer = __esm({
|
|
|
458
458
|
))
|
|
459
459
|
}
|
|
460
460
|
),
|
|
461
|
-
!isMobile && fallbackPoster && /* @__PURE__ */ (0,
|
|
461
|
+
!isMobile && fallbackPoster && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
462
462
|
"picture",
|
|
463
463
|
{
|
|
464
464
|
className: "absolute inset-0 pointer-events-none",
|
|
@@ -467,8 +467,8 @@ var init_HlsPlayer = __esm({
|
|
|
467
467
|
transition: "opacity 0.4s ease"
|
|
468
468
|
},
|
|
469
469
|
children: [
|
|
470
|
-
posterSources.map(({ media, posterUrl: src }, i) => /* @__PURE__ */ (0,
|
|
471
|
-
/* @__PURE__ */ (0,
|
|
470
|
+
posterSources.map(({ media, posterUrl: src }, i) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("source", { media, srcSet: src }, i)),
|
|
471
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
472
472
|
"img",
|
|
473
473
|
{
|
|
474
474
|
src: fallbackPoster,
|
|
@@ -481,7 +481,7 @@ var init_HlsPlayer = __esm({
|
|
|
481
481
|
]
|
|
482
482
|
}
|
|
483
483
|
),
|
|
484
|
-
!isMobile && !isPlayOnHover && /* @__PURE__ */ (0,
|
|
484
|
+
!isMobile && !isPlayOnHover && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
485
485
|
"div",
|
|
486
486
|
{
|
|
487
487
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none",
|
|
@@ -489,7 +489,7 @@ var init_HlsPlayer = __esm({
|
|
|
489
489
|
opacity: isControlsVisible ? 1 : 0,
|
|
490
490
|
transition: "opacity 0.3s ease"
|
|
491
491
|
},
|
|
492
|
-
children: /* @__PURE__ */ (0,
|
|
492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
493
493
|
"button",
|
|
494
494
|
{
|
|
495
495
|
type: "button",
|
|
@@ -528,13 +528,13 @@ var init_HlsPlayer = __esm({
|
|
|
528
528
|
},
|
|
529
529
|
children: isPlaying ? (
|
|
530
530
|
/* Pause — two rounded bars */
|
|
531
|
-
/* @__PURE__ */ (0,
|
|
532
|
-
/* @__PURE__ */ (0,
|
|
533
|
-
/* @__PURE__ */ (0,
|
|
531
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
532
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("rect", { x: "3.5", y: "2.5", width: "4.5", height: "15", rx: "1.5", fill: "white" }),
|
|
533
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("rect", { x: "12", y: "2.5", width: "4.5", height: "15", rx: "1.5", fill: "white" })
|
|
534
534
|
] })
|
|
535
535
|
) : (
|
|
536
536
|
/* Play — solid triangle, nudged right for optical balance */
|
|
537
|
-
/* @__PURE__ */ (0,
|
|
537
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M5 3.5L17 10L5 16.5V3.5Z", fill: "white" }) })
|
|
538
538
|
)
|
|
539
539
|
}
|
|
540
540
|
)
|
|
@@ -769,28 +769,28 @@ var LinkNodeButton_exports = {};
|
|
|
769
769
|
__export(LinkNodeButton_exports, {
|
|
770
770
|
default: () => LinkNodeButton_default
|
|
771
771
|
});
|
|
772
|
-
var
|
|
772
|
+
var import_react34, import_jsx_runtime44, LinkNodeButton, LinkNodeButton_default;
|
|
773
773
|
var init_LinkNodeButton = __esm({
|
|
774
774
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
775
775
|
"use strict";
|
|
776
776
|
"use client";
|
|
777
|
-
|
|
777
|
+
import_react34 = require("react");
|
|
778
778
|
init_Button();
|
|
779
779
|
init_ServiceClient();
|
|
780
780
|
init_ToastService();
|
|
781
|
-
|
|
781
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
782
782
|
LinkNodeButton = (props) => {
|
|
783
783
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
784
|
-
const [isLoading, setIsLoading] = (0,
|
|
785
|
-
const [error, setError] = (0,
|
|
786
|
-
const extractFieldNames = (0,
|
|
784
|
+
const [isLoading, setIsLoading] = (0, import_react34.useState)(false);
|
|
785
|
+
const [error, setError] = (0, import_react34.useState)(null);
|
|
786
|
+
const extractFieldNames = (0, import_react34.useCallback)((template) => {
|
|
787
787
|
if (!template) return [];
|
|
788
788
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
789
789
|
const matches = Array.from(template.matchAll(regex));
|
|
790
790
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
791
791
|
return fieldNames;
|
|
792
792
|
}, []);
|
|
793
|
-
const replaceTemplateVariables = (0,
|
|
793
|
+
const replaceTemplateVariables = (0, import_react34.useCallback)((template, responseData) => {
|
|
794
794
|
if (!template) return template;
|
|
795
795
|
let result = template;
|
|
796
796
|
const fieldNames = extractFieldNames(template);
|
|
@@ -819,7 +819,7 @@ var init_LinkNodeButton = __esm({
|
|
|
819
819
|
}
|
|
820
820
|
return result;
|
|
821
821
|
}, [props.routeParameters, dataitem, extractFieldNames]);
|
|
822
|
-
const getNestedValue3 = (0,
|
|
822
|
+
const getNestedValue3 = (0, import_react34.useCallback)((obj, path) => {
|
|
823
823
|
if (!obj || !path) return void 0;
|
|
824
824
|
if (obj[path] !== void 0) {
|
|
825
825
|
return obj[path];
|
|
@@ -834,7 +834,7 @@ var init_LinkNodeButton = __esm({
|
|
|
834
834
|
}
|
|
835
835
|
return current;
|
|
836
836
|
}, []);
|
|
837
|
-
const onClick = (0,
|
|
837
|
+
const onClick = (0, import_react34.useCallback)(async (e) => {
|
|
838
838
|
if (!node.postUrl) {
|
|
839
839
|
setError("No POST URL configured for this button");
|
|
840
840
|
return;
|
|
@@ -921,11 +921,11 @@ var init_LinkNodeButton = __esm({
|
|
|
921
921
|
return children;
|
|
922
922
|
}
|
|
923
923
|
if (linkText) {
|
|
924
|
-
return /* @__PURE__ */ (0,
|
|
924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: linkText });
|
|
925
925
|
}
|
|
926
926
|
return node.title || "Button";
|
|
927
927
|
};
|
|
928
|
-
return /* @__PURE__ */ (0,
|
|
928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
929
929
|
Button_default,
|
|
930
930
|
{
|
|
931
931
|
ButtonType: linkType,
|
|
@@ -946,9 +946,9 @@ __export(CopyButton_exports, {
|
|
|
946
946
|
default: () => CopyButton
|
|
947
947
|
});
|
|
948
948
|
function CopyButton({ text }) {
|
|
949
|
-
const [copied, setCopied] = (0,
|
|
950
|
-
const timeoutRef = (0,
|
|
951
|
-
(0,
|
|
949
|
+
const [copied, setCopied] = (0, import_react41.useState)(false);
|
|
950
|
+
const timeoutRef = (0, import_react41.useRef)(null);
|
|
951
|
+
(0, import_react41.useEffect)(() => {
|
|
952
952
|
return () => {
|
|
953
953
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
954
954
|
};
|
|
@@ -963,13 +963,13 @@ function CopyButton({ text }) {
|
|
|
963
963
|
console.error("Failed to copy: ", err);
|
|
964
964
|
}
|
|
965
965
|
};
|
|
966
|
-
return /* @__PURE__ */ (0,
|
|
966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
967
967
|
"button",
|
|
968
968
|
{
|
|
969
969
|
onClick: handleCopy,
|
|
970
970
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
971
971
|
children: [
|
|
972
|
-
/* @__PURE__ */ (0,
|
|
972
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
973
973
|
"svg",
|
|
974
974
|
{
|
|
975
975
|
width: "16",
|
|
@@ -977,7 +977,7 @@ function CopyButton({ text }) {
|
|
|
977
977
|
viewBox: "0 0 24 24",
|
|
978
978
|
className: "w-4 h-4",
|
|
979
979
|
fill: "currentColor",
|
|
980
|
-
children: /* @__PURE__ */ (0,
|
|
980
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
981
981
|
"path",
|
|
982
982
|
{
|
|
983
983
|
fillRule: "evenodd",
|
|
@@ -992,54 +992,54 @@ function CopyButton({ text }) {
|
|
|
992
992
|
}
|
|
993
993
|
);
|
|
994
994
|
}
|
|
995
|
-
var
|
|
995
|
+
var import_react41, import_jsx_runtime54;
|
|
996
996
|
var init_CopyButton = __esm({
|
|
997
997
|
"src/components/CopyButton.tsx"() {
|
|
998
998
|
"use strict";
|
|
999
999
|
"use client";
|
|
1000
|
-
|
|
1001
|
-
|
|
1000
|
+
import_react41 = require("react");
|
|
1001
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1002
1002
|
}
|
|
1003
1003
|
});
|
|
1004
1004
|
|
|
1005
1005
|
// src/components/IFrameLoaderView.tsx
|
|
1006
|
-
var
|
|
1006
|
+
var import_react45, import_jsx_runtime60, IFrameLoaderView, IFrameLoaderView_default;
|
|
1007
1007
|
var init_IFrameLoaderView = __esm({
|
|
1008
1008
|
"src/components/IFrameLoaderView.tsx"() {
|
|
1009
1009
|
"use strict";
|
|
1010
|
-
|
|
1011
|
-
|
|
1010
|
+
import_react45 = __toESM(require("react"));
|
|
1011
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
1012
1012
|
IFrameLoaderView = (props) => {
|
|
1013
|
-
return /* @__PURE__ */ (0,
|
|
1014
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
1015
|
-
/* @__PURE__ */ (0,
|
|
1016
|
-
/* @__PURE__ */ (0,
|
|
1017
|
-
/* @__PURE__ */ (0,
|
|
1018
|
-
/* @__PURE__ */ (0,
|
|
1019
|
-
/* @__PURE__ */ (0,
|
|
1013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react45.default.Fragment, { children: [
|
|
1014
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
1015
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
1016
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "ml-2", children: [
|
|
1018
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
1020
1020
|
] })
|
|
1021
1021
|
] }),
|
|
1022
|
-
/* @__PURE__ */ (0,
|
|
1023
|
-
/* @__PURE__ */ (0,
|
|
1024
|
-
/* @__PURE__ */ (0,
|
|
1025
|
-
/* @__PURE__ */ (0,
|
|
1026
|
-
/* @__PURE__ */ (0,
|
|
1027
|
-
/* @__PURE__ */ (0,
|
|
1028
|
-
/* @__PURE__ */ (0,
|
|
1022
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "animate-pulse", children: [
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1025
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1027
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1028
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1029
1029
|
] }),
|
|
1030
|
-
/* @__PURE__ */ (0,
|
|
1031
|
-
/* @__PURE__ */ (0,
|
|
1032
|
-
/* @__PURE__ */ (0,
|
|
1033
|
-
/* @__PURE__ */ (0,
|
|
1034
|
-
/* @__PURE__ */ (0,
|
|
1035
|
-
/* @__PURE__ */ (0,
|
|
1030
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "animate-pulse", children: [
|
|
1031
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1032
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1033
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1035
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1036
1036
|
] }),
|
|
1037
|
-
/* @__PURE__ */ (0,
|
|
1038
|
-
/* @__PURE__ */ (0,
|
|
1039
|
-
/* @__PURE__ */ (0,
|
|
1040
|
-
/* @__PURE__ */ (0,
|
|
1041
|
-
/* @__PURE__ */ (0,
|
|
1042
|
-
/* @__PURE__ */ (0,
|
|
1037
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "animate-pulse", children: [
|
|
1038
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1039
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1040
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1041
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1042
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1043
1043
|
] })
|
|
1044
1044
|
] })
|
|
1045
1045
|
] }) }),
|
|
@@ -1055,19 +1055,19 @@ var IframeClient_exports = {};
|
|
|
1055
1055
|
__export(IframeClient_exports, {
|
|
1056
1056
|
default: () => IframeClient_default
|
|
1057
1057
|
});
|
|
1058
|
-
var
|
|
1058
|
+
var import_react46, import_jsx_runtime61, IframeClient, IframeClient_default;
|
|
1059
1059
|
var init_IframeClient = __esm({
|
|
1060
1060
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
1061
1061
|
"use strict";
|
|
1062
1062
|
"use client";
|
|
1063
|
-
|
|
1063
|
+
import_react46 = __toESM(require("react"));
|
|
1064
1064
|
init_IFrameLoaderView();
|
|
1065
|
-
|
|
1065
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
1066
1066
|
IframeClient = ({ src }) => {
|
|
1067
|
-
const iframeRef = (0,
|
|
1068
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
1069
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
1070
|
-
(0,
|
|
1067
|
+
const iframeRef = (0, import_react46.useRef)(null);
|
|
1068
|
+
const [iframeHeight, setIframeHeight] = (0, import_react46.useState)("100%");
|
|
1069
|
+
const [isDataFound, setIsDataFound] = (0, import_react46.useState)(null);
|
|
1070
|
+
(0, import_react46.useEffect)(() => {
|
|
1071
1071
|
const handleReceiveMessage = (event) => {
|
|
1072
1072
|
const eventName = event?.data?.eventName;
|
|
1073
1073
|
const payload = event?.data?.payload;
|
|
@@ -1082,7 +1082,7 @@ var init_IframeClient = __esm({
|
|
|
1082
1082
|
window.addEventListener("message", handleReceiveMessage);
|
|
1083
1083
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
1084
1084
|
}, []);
|
|
1085
|
-
(0,
|
|
1085
|
+
(0, import_react46.useEffect)(() => {
|
|
1086
1086
|
const handleResize = () => {
|
|
1087
1087
|
if (iframeRef.current) {
|
|
1088
1088
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -1094,7 +1094,7 @@ var init_IframeClient = __esm({
|
|
|
1094
1094
|
const handleIframeLoad = () => {
|
|
1095
1095
|
setIsDataFound(true);
|
|
1096
1096
|
};
|
|
1097
|
-
return /* @__PURE__ */ (0,
|
|
1097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react46.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
1098
1098
|
"iframe",
|
|
1099
1099
|
{
|
|
1100
1100
|
ref: iframeRef,
|
|
@@ -1544,7 +1544,7 @@ var ViewControl = (props) => {
|
|
|
1544
1544
|
var ViewControl_default = ViewControl;
|
|
1545
1545
|
|
|
1546
1546
|
// src/components/controls/edit/InputControl.tsx
|
|
1547
|
-
var
|
|
1547
|
+
var import_react31 = __toESM(require("react"));
|
|
1548
1548
|
|
|
1549
1549
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
1550
1550
|
var import_react11 = __toESM(require("react"));
|
|
@@ -1714,6 +1714,7 @@ var InputControlType = {
|
|
|
1714
1714
|
moneyInput: "money",
|
|
1715
1715
|
select: "select",
|
|
1716
1716
|
percentageInput: "percentage",
|
|
1717
|
+
asset: "asset",
|
|
1717
1718
|
phoneInput: "phone",
|
|
1718
1719
|
numberInput: "number",
|
|
1719
1720
|
checkboxInput: "boolean",
|
|
@@ -2758,9 +2759,304 @@ var TimeInput = (props) => {
|
|
|
2758
2759
|
};
|
|
2759
2760
|
var TimeInput_default = TimeInput;
|
|
2760
2761
|
|
|
2761
|
-
// src/components/controls/edit/
|
|
2762
|
+
// src/components/controls/edit/AssetUpload.tsx
|
|
2763
|
+
var import_react30 = __toESM(require("react"));
|
|
2764
|
+
init_ClientButton();
|
|
2765
|
+
init_StyleTypes();
|
|
2766
|
+
|
|
2767
|
+
// src/components/utilities/AssetUtility.tsx
|
|
2768
|
+
var AssetUtility = class {
|
|
2769
|
+
constructor() {
|
|
2770
|
+
}
|
|
2771
|
+
static resolveUrl(assetBaseUrl, url) {
|
|
2772
|
+
if (!url) return void 0;
|
|
2773
|
+
if (url.startsWith("http")) return url;
|
|
2774
|
+
if (!assetBaseUrl) return url;
|
|
2775
|
+
return `${assetBaseUrl}/${url}`;
|
|
2776
|
+
}
|
|
2777
|
+
// static getAssetUrl(apiBaseUrl: string) {
|
|
2778
|
+
// let domainName = apiBaseUrl.replace("https://", "");
|
|
2779
|
+
// return `https://cdn.g-assets.com/${domainName}`;
|
|
2780
|
+
// }
|
|
2781
|
+
static getAssetFullPath(apiBaseUrl, relativePath) {
|
|
2782
|
+
const domainName = apiBaseUrl.replace("https://", "");
|
|
2783
|
+
return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
|
|
2784
|
+
}
|
|
2785
|
+
};
|
|
2786
|
+
var AssetUtility_default = AssetUtility;
|
|
2787
|
+
|
|
2788
|
+
// src/components/dataForm/Hyperlink.tsx
|
|
2789
|
+
var import_link = __toESM(require("next/link"));
|
|
2790
|
+
init_StyleTypes();
|
|
2762
2791
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2763
|
-
|
|
2792
|
+
function Hyperlink(props) {
|
|
2793
|
+
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
|
|
2794
|
+
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
2795
|
+
const additionalProps = {};
|
|
2796
|
+
if (target == "_blank") {
|
|
2797
|
+
additionalProps.rel = "noopener noreferrer";
|
|
2798
|
+
}
|
|
2799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2800
|
+
import_link.default,
|
|
2801
|
+
{
|
|
2802
|
+
href: props.href,
|
|
2803
|
+
prefetch: false,
|
|
2804
|
+
className: [linkClass, props.className].filter(Boolean).join(" "),
|
|
2805
|
+
...additionalProps,
|
|
2806
|
+
target,
|
|
2807
|
+
children: props.children
|
|
2808
|
+
}
|
|
2809
|
+
) : props.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: props.className, children: props.children }) });
|
|
2810
|
+
}
|
|
2811
|
+
|
|
2812
|
+
// src/svg/chevron-updown.tsx
|
|
2813
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2814
|
+
var ChevronUpDown = (props) => {
|
|
2815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
2816
|
+
};
|
|
2817
|
+
var chevron_updown_default = ChevronUpDown;
|
|
2818
|
+
|
|
2819
|
+
// src/svg/chevron-down.tsx
|
|
2820
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2821
|
+
var ChevronDown = (props) => {
|
|
2822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
2823
|
+
};
|
|
2824
|
+
var chevron_down_default = ChevronDown;
|
|
2825
|
+
|
|
2826
|
+
// src/svg/chevron-up.tsx
|
|
2827
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2828
|
+
var ChevronUp = (props) => {
|
|
2829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
2830
|
+
};
|
|
2831
|
+
var chevron_up_default = ChevronUp;
|
|
2832
|
+
|
|
2833
|
+
// src/svg/plus.tsx
|
|
2834
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2835
|
+
var Plus = (props) => {
|
|
2836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
2837
|
+
};
|
|
2838
|
+
var plus_default = Plus;
|
|
2839
|
+
|
|
2840
|
+
// src/svg/Icons.tsx
|
|
2841
|
+
var Icons = {
|
|
2842
|
+
chevronUpDown: chevron_updown_default,
|
|
2843
|
+
chevronDown: chevron_down_default,
|
|
2844
|
+
chevronUp: chevron_up_default,
|
|
2845
|
+
plus: plus_default
|
|
2846
|
+
};
|
|
2847
|
+
var Icons_default = Icons;
|
|
2848
|
+
|
|
2849
|
+
// src/svg/Icon.tsx
|
|
2850
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2851
|
+
var Icon = ({ name, className, ...props }) => {
|
|
2852
|
+
const IconComponent = Icons_default[name];
|
|
2853
|
+
if (!IconComponent) {
|
|
2854
|
+
console.error(`Icon "${name}" not found.`);
|
|
2855
|
+
return null;
|
|
2856
|
+
}
|
|
2857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(IconComponent, { ...props, className });
|
|
2858
|
+
};
|
|
2859
|
+
var Icon_default = Icon;
|
|
2860
|
+
|
|
2861
|
+
// src/components/controls/edit/AssetUpload.tsx
|
|
2862
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2863
|
+
var AssetUpload = (props) => {
|
|
2864
|
+
const isDisabled = props.attributes?.disable ?? false;
|
|
2865
|
+
let allValues = [];
|
|
2866
|
+
if (props.value !== void 0 && props.value !== null && props.value !== "") {
|
|
2867
|
+
try {
|
|
2868
|
+
allValues = JSON.parse(props.value.toString());
|
|
2869
|
+
} catch (error) {
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
const getInitialTab = () => {
|
|
2873
|
+
if (allValues.length > 0) {
|
|
2874
|
+
const asset = allValues[0];
|
|
2875
|
+
if (asset.posterUrl) {
|
|
2876
|
+
return "video";
|
|
2877
|
+
} else if (asset.assetUrl) {
|
|
2878
|
+
return "image";
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
return "image";
|
|
2882
|
+
};
|
|
2883
|
+
const [assetType, setAssetType] = import_react30.default.useState(getInitialTab);
|
|
2884
|
+
(0, import_react30.useEffect)(() => {
|
|
2885
|
+
setAssetType(getInitialTab());
|
|
2886
|
+
}, [props.value]);
|
|
2887
|
+
const assetUploadCallback = (newAsset) => {
|
|
2888
|
+
if (isDisabled) return;
|
|
2889
|
+
let updated = [];
|
|
2890
|
+
updated.push({
|
|
2891
|
+
assetUrl: newAsset.assetUrl,
|
|
2892
|
+
title: newAsset.title,
|
|
2893
|
+
posterUrl: newAsset.posterUrl,
|
|
2894
|
+
intrinsicHeight: newAsset.intrinsicHeight,
|
|
2895
|
+
intrinsicWidth: newAsset.intrinsicWidth
|
|
2896
|
+
});
|
|
2897
|
+
props.callback?.({
|
|
2898
|
+
name: props.name,
|
|
2899
|
+
value: JSON.stringify(updated),
|
|
2900
|
+
index: props.index,
|
|
2901
|
+
groupKey: props.groupKey
|
|
2902
|
+
});
|
|
2903
|
+
};
|
|
2904
|
+
const deleteFile = (index) => {
|
|
2905
|
+
if (isDisabled) return;
|
|
2906
|
+
let existingValue = [];
|
|
2907
|
+
if (props.value) {
|
|
2908
|
+
try {
|
|
2909
|
+
existingValue = JSON.parse(props.value.toString());
|
|
2910
|
+
} catch (error) {
|
|
2911
|
+
}
|
|
2912
|
+
}
|
|
2913
|
+
if (existingValue.length > index) {
|
|
2914
|
+
existingValue.splice(index, 1);
|
|
2915
|
+
props.callback?.({
|
|
2916
|
+
name: props.name,
|
|
2917
|
+
value: JSON.stringify(existingValue),
|
|
2918
|
+
index: props.index,
|
|
2919
|
+
groupKey: props.groupKey
|
|
2920
|
+
});
|
|
2921
|
+
}
|
|
2922
|
+
};
|
|
2923
|
+
const textChangeHandler = (index, event) => {
|
|
2924
|
+
if (isDisabled) return;
|
|
2925
|
+
let existingValue = [];
|
|
2926
|
+
if (props.value) {
|
|
2927
|
+
try {
|
|
2928
|
+
existingValue = JSON.parse(props.value.toString());
|
|
2929
|
+
} catch (error) {
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2932
|
+
const text = event.target.value;
|
|
2933
|
+
if (existingValue.length > index) {
|
|
2934
|
+
const updatedArray = [...existingValue];
|
|
2935
|
+
updatedArray[index] = { ...updatedArray[index], title: text };
|
|
2936
|
+
props.callback?.({
|
|
2937
|
+
name: props.name,
|
|
2938
|
+
value: JSON.stringify(updatedArray),
|
|
2939
|
+
index: props.index,
|
|
2940
|
+
groupKey: props.groupKey
|
|
2941
|
+
});
|
|
2942
|
+
}
|
|
2943
|
+
};
|
|
2944
|
+
const getAssetType = (asset) => {
|
|
2945
|
+
if (asset.assetUrl?.endsWith(".m3u8") || asset.posterUrl) return "video";
|
|
2946
|
+
return "image";
|
|
2947
|
+
};
|
|
2948
|
+
const shouldShowDetails = () => {
|
|
2949
|
+
if (allValues.length === 0) return false;
|
|
2950
|
+
const asset = allValues[0];
|
|
2951
|
+
if (assetType === "video") {
|
|
2952
|
+
return Boolean(asset.posterUrl && asset.assetUrl && asset.assetUrl.endsWith(".m3u8"));
|
|
2953
|
+
}
|
|
2954
|
+
if (assetType === "image") {
|
|
2955
|
+
return Boolean(asset.assetUrl && !asset.assetUrl.endsWith(".m3u8"));
|
|
2956
|
+
}
|
|
2957
|
+
return false;
|
|
2958
|
+
};
|
|
2959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react30.default.Fragment, { children: [
|
|
2960
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("label", { className: "block mb-1", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
2961
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
2962
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2963
|
+
ClientButton_default,
|
|
2964
|
+
{
|
|
2965
|
+
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
2966
|
+
ButtonType: "Link" /* Link */,
|
|
2967
|
+
onClick: () => setAssetType("image"),
|
|
2968
|
+
disabled: isDisabled,
|
|
2969
|
+
children: "Image Upload"
|
|
2970
|
+
}
|
|
2971
|
+
),
|
|
2972
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2973
|
+
ClientButton_default,
|
|
2974
|
+
{
|
|
2975
|
+
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
2976
|
+
ButtonType: "Link" /* Link */,
|
|
2977
|
+
onClick: () => setAssetType("video"),
|
|
2978
|
+
disabled: isDisabled,
|
|
2979
|
+
children: "Video Upload"
|
|
2980
|
+
}
|
|
2981
|
+
)
|
|
2982
|
+
] }),
|
|
2983
|
+
shouldShowDetails() && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
2984
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "absolute -top-2.5 left-3 bg-primary-600 text-white text-xs px-2 py-0.5 rounded-full", children: getAssetType(allValues[0]) === "video" ? "Video" : "Image" }),
|
|
2985
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex justify-between items-start gap-5", children: [
|
|
2986
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
2987
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
|
|
2988
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-gray-500", children: "Title" }),
|
|
2989
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2990
|
+
"input",
|
|
2991
|
+
{
|
|
2992
|
+
type: "text",
|
|
2993
|
+
value: digitalAsset.title,
|
|
2994
|
+
onChange: (event) => textChangeHandler(index, event),
|
|
2995
|
+
placeholder: "title",
|
|
2996
|
+
disabled: isDisabled,
|
|
2997
|
+
className: "w-full mt-1 py-1.5 block rounded border-gray-300 shadow-sm bg-white\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-gray-100 disabled:text-gray-400 disabled:cursor-not-allowed"
|
|
2998
|
+
}
|
|
2999
|
+
)
|
|
3000
|
+
] }),
|
|
3001
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
|
|
3002
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-gray-500", children: "Resolution" }),
|
|
3003
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
3004
|
+
digitalAsset.intrinsicWidth,
|
|
3005
|
+
"\xD7",
|
|
3006
|
+
digitalAsset.intrinsicHeight
|
|
3007
|
+
] })
|
|
3008
|
+
] }),
|
|
3009
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
|
|
3010
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
3011
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
3012
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3013
|
+
"img",
|
|
3014
|
+
{
|
|
3015
|
+
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
3016
|
+
alt: digitalAsset.title || "Video poster",
|
|
3017
|
+
className: "w-32 h-auto object-cover rounded border p-1"
|
|
3018
|
+
}
|
|
3019
|
+
),
|
|
3020
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3021
|
+
"img",
|
|
3022
|
+
{
|
|
3023
|
+
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
3024
|
+
alt: digitalAsset.title || "Uploaded image",
|
|
3025
|
+
className: "w-32 h-auto object-cover rounded border p-1"
|
|
3026
|
+
}
|
|
3027
|
+
)
|
|
3028
|
+
] })
|
|
3029
|
+
] }),
|
|
3030
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "col-span-2", children: [
|
|
3031
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
3032
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3033
|
+
Hyperlink,
|
|
3034
|
+
{
|
|
3035
|
+
href: digitalAsset.assetUrl,
|
|
3036
|
+
className: "text-primary-600 underline mt-1 break-all",
|
|
3037
|
+
title: digitalAsset.assetUrl,
|
|
3038
|
+
children: digitalAsset.assetUrl
|
|
3039
|
+
}
|
|
3040
|
+
)
|
|
3041
|
+
] })
|
|
3042
|
+
] }),
|
|
3043
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3044
|
+
"span",
|
|
3045
|
+
{
|
|
3046
|
+
onClick: () => !isDisabled && deleteFile(index),
|
|
3047
|
+
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
3048
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
3049
|
+
}
|
|
3050
|
+
)
|
|
3051
|
+
] }, index)) })
|
|
3052
|
+
] })
|
|
3053
|
+
] });
|
|
3054
|
+
};
|
|
3055
|
+
var AssetUpload_default = AssetUpload;
|
|
3056
|
+
|
|
3057
|
+
// src/components/controls/edit/InputControl.tsx
|
|
3058
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3059
|
+
var InputControl = import_react31.default.forwardRef(
|
|
2764
3060
|
(props, ref) => {
|
|
2765
3061
|
const ControlComponents = {
|
|
2766
3062
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -2778,23 +3074,24 @@ var InputControl = import_react30.default.forwardRef(
|
|
|
2778
3074
|
[InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
|
|
2779
3075
|
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
2780
3076
|
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
2781
|
-
[InputControlType_default.timeInput]: TimeInput_default
|
|
3077
|
+
[InputControlType_default.timeInput]: TimeInput_default,
|
|
3078
|
+
[InputControlType_default.asset]: AssetUpload_default
|
|
2782
3079
|
};
|
|
2783
3080
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
2784
|
-
return /* @__PURE__ */ (0,
|
|
3081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react31.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
2785
3082
|
}
|
|
2786
3083
|
);
|
|
2787
3084
|
InputControl.displayName = "InputControl";
|
|
2788
3085
|
var InputControl_default = InputControl;
|
|
2789
3086
|
|
|
2790
3087
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2791
|
-
var
|
|
3088
|
+
var import_react50 = __toESM(require("react"));
|
|
2792
3089
|
|
|
2793
3090
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2794
|
-
var
|
|
3091
|
+
var import_react36 = __toESM(require("react"));
|
|
2795
3092
|
|
|
2796
3093
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
2797
|
-
var
|
|
3094
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2798
3095
|
var TextNode = (props) => {
|
|
2799
3096
|
function cssStringToJson(cssString) {
|
|
2800
3097
|
const styleObject = {};
|
|
@@ -2852,60 +3149,37 @@ var TextNode = (props) => {
|
|
|
2852
3149
|
});
|
|
2853
3150
|
}
|
|
2854
3151
|
function renderWithLineBreaks(text) {
|
|
2855
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
3152
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { children: [
|
|
2856
3153
|
line,
|
|
2857
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
3154
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("br", {})
|
|
2858
3155
|
] }, index));
|
|
2859
3156
|
}
|
|
2860
3157
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
2861
3158
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
2862
3159
|
return (
|
|
2863
3160
|
// @ts-expect-error custom code
|
|
2864
|
-
/* @__PURE__ */ (0,
|
|
3161
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
|
|
2865
3162
|
);
|
|
2866
3163
|
};
|
|
2867
3164
|
var TextNode_default = TextNode;
|
|
2868
3165
|
|
|
2869
3166
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
2870
|
-
var
|
|
3167
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2871
3168
|
var LineBreakNode = () => {
|
|
2872
|
-
return /* @__PURE__ */ (0,
|
|
3169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
2873
3170
|
};
|
|
2874
3171
|
var LineBreakNode_default = LineBreakNode;
|
|
2875
3172
|
|
|
2876
3173
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2877
|
-
var
|
|
2878
|
-
|
|
2879
|
-
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2880
|
-
var import_react32 = __toESM(require("react"));
|
|
2881
|
-
|
|
2882
|
-
// src/components/utilities/AssetUtility.tsx
|
|
2883
|
-
var AssetUtility = class {
|
|
2884
|
-
constructor() {
|
|
2885
|
-
}
|
|
2886
|
-
static resolveUrl(assetBaseUrl, url) {
|
|
2887
|
-
if (!url) return void 0;
|
|
2888
|
-
if (url.startsWith("http")) return url;
|
|
2889
|
-
if (!assetBaseUrl) return url;
|
|
2890
|
-
return `${assetBaseUrl}/${url}`;
|
|
2891
|
-
}
|
|
2892
|
-
// static getAssetUrl(apiBaseUrl: string) {
|
|
2893
|
-
// let domainName = apiBaseUrl.replace("https://", "");
|
|
2894
|
-
// return `https://cdn.g-assets.com/${domainName}`;
|
|
2895
|
-
// }
|
|
2896
|
-
static getAssetFullPath(apiBaseUrl, relativePath) {
|
|
2897
|
-
const domainName = apiBaseUrl.replace("https://", "");
|
|
2898
|
-
return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
|
|
2899
|
-
}
|
|
2900
|
-
};
|
|
2901
|
-
var AssetUtility_default = AssetUtility;
|
|
3174
|
+
var import_react35 = __toESM(require("react"));
|
|
2902
3175
|
|
|
2903
3176
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3177
|
+
var import_react33 = __toESM(require("react"));
|
|
2904
3178
|
var import_dynamic = __toESM(require("next/dynamic"));
|
|
2905
3179
|
|
|
2906
3180
|
// src/components/DeviceAssetSelector.tsx
|
|
2907
3181
|
init_HlsPlayer();
|
|
2908
|
-
var
|
|
3182
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2909
3183
|
var DeviceAssetSelector = ({
|
|
2910
3184
|
assets,
|
|
2911
3185
|
assetBaseUrl,
|
|
@@ -2980,7 +3254,7 @@ var DeviceAssetSelector = ({
|
|
|
2980
3254
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
2981
3255
|
const renderMedia = () => {
|
|
2982
3256
|
if (isHls) {
|
|
2983
|
-
return /* @__PURE__ */ (0,
|
|
3257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2984
3258
|
HlsPlayer_default,
|
|
2985
3259
|
{
|
|
2986
3260
|
assetUrl: resolvedAssetUrl,
|
|
@@ -2997,7 +3271,7 @@ var DeviceAssetSelector = ({
|
|
|
2997
3271
|
} else {
|
|
2998
3272
|
return (
|
|
2999
3273
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
3000
|
-
/* @__PURE__ */ (0,
|
|
3274
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3001
3275
|
"img",
|
|
3002
3276
|
{
|
|
3003
3277
|
style: styles,
|
|
@@ -3013,17 +3287,17 @@ var DeviceAssetSelector = ({
|
|
|
3013
3287
|
}
|
|
3014
3288
|
};
|
|
3015
3289
|
if (width) {
|
|
3016
|
-
return /* @__PURE__ */ (0,
|
|
3290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { style: { width }, children: renderMedia() });
|
|
3017
3291
|
}
|
|
3018
3292
|
if (nodeProps?.format) {
|
|
3019
|
-
return /* @__PURE__ */ (0,
|
|
3293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3020
3294
|
}
|
|
3021
3295
|
return renderMedia();
|
|
3022
3296
|
};
|
|
3023
3297
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
3024
3298
|
|
|
3025
3299
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3026
|
-
var
|
|
3300
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3027
3301
|
var HlsPlayer2 = (0, import_dynamic.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), {
|
|
3028
3302
|
ssr: false
|
|
3029
3303
|
});
|
|
@@ -3066,7 +3340,7 @@ var ImageNode = (props) => {
|
|
|
3066
3340
|
console.error("Error parsing assets in ImageNode:", error);
|
|
3067
3341
|
}
|
|
3068
3342
|
if (assets && assets.length > 0) {
|
|
3069
|
-
return /* @__PURE__ */ (0,
|
|
3343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3070
3344
|
DeviceAssetSelector_default,
|
|
3071
3345
|
{
|
|
3072
3346
|
device: props.device,
|
|
@@ -3115,7 +3389,7 @@ var ImageNode = (props) => {
|
|
|
3115
3389
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
3116
3390
|
const renderMedia = () => {
|
|
3117
3391
|
if (isHls) {
|
|
3118
|
-
return /* @__PURE__ */ (0,
|
|
3392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3119
3393
|
HlsPlayer2,
|
|
3120
3394
|
{
|
|
3121
3395
|
assetUrl: imageUrl,
|
|
@@ -3130,7 +3404,7 @@ var ImageNode = (props) => {
|
|
|
3130
3404
|
}
|
|
3131
3405
|
);
|
|
3132
3406
|
} else {
|
|
3133
|
-
return /* @__PURE__ */ (0,
|
|
3407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react33.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3134
3408
|
"img",
|
|
3135
3409
|
{
|
|
3136
3410
|
style: styles,
|
|
@@ -3145,7 +3419,7 @@ var ImageNode = (props) => {
|
|
|
3145
3419
|
}
|
|
3146
3420
|
};
|
|
3147
3421
|
if (props.node.width) {
|
|
3148
|
-
return /* @__PURE__ */ (0,
|
|
3422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3149
3423
|
}
|
|
3150
3424
|
return renderMedia();
|
|
3151
3425
|
};
|
|
@@ -3153,34 +3427,8 @@ var ImageNode_default = ImageNode;
|
|
|
3153
3427
|
|
|
3154
3428
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
3155
3429
|
init_StyleTypes();
|
|
3156
|
-
|
|
3157
|
-
// src/components/dataForm/Hyperlink.tsx
|
|
3158
|
-
var import_link = __toESM(require("next/link"));
|
|
3159
|
-
init_StyleTypes();
|
|
3160
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3161
|
-
function Hyperlink(props) {
|
|
3162
|
-
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
|
|
3163
|
-
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
3164
|
-
const additionalProps = {};
|
|
3165
|
-
if (target == "_blank") {
|
|
3166
|
-
additionalProps.rel = "noopener noreferrer";
|
|
3167
|
-
}
|
|
3168
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3169
|
-
import_link.default,
|
|
3170
|
-
{
|
|
3171
|
-
href: props.href,
|
|
3172
|
-
prefetch: false,
|
|
3173
|
-
className: [linkClass, props.className].filter(Boolean).join(" "),
|
|
3174
|
-
...additionalProps,
|
|
3175
|
-
target,
|
|
3176
|
-
children: props.children
|
|
3177
|
-
}
|
|
3178
|
-
) : props.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: props.className, children: props.children }) });
|
|
3179
|
-
}
|
|
3180
|
-
|
|
3181
|
-
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
3182
3430
|
var import_dynamic2 = __toESM(require("next/dynamic"));
|
|
3183
|
-
var
|
|
3431
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3184
3432
|
var LinkNodeButton2 = (0, import_dynamic2.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
3185
3433
|
ssr: false
|
|
3186
3434
|
});
|
|
@@ -3227,13 +3475,13 @@ var LinkNode = (props) => {
|
|
|
3227
3475
|
const isButton = node.isButton === true;
|
|
3228
3476
|
const renderChildren = () => {
|
|
3229
3477
|
if (!node.children || node.children.length === 0) return null;
|
|
3230
|
-
return /* @__PURE__ */ (0,
|
|
3478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: node.children.map((childNode, index) => {
|
|
3231
3479
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
3232
3480
|
if (!SelectedNode) {
|
|
3233
3481
|
console.warn("Unknown node type:", childNode.type);
|
|
3234
3482
|
return null;
|
|
3235
3483
|
}
|
|
3236
|
-
return /* @__PURE__ */ (0,
|
|
3484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react35.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3237
3485
|
SelectedNode,
|
|
3238
3486
|
{
|
|
3239
3487
|
node: childNode,
|
|
@@ -3246,15 +3494,15 @@ var LinkNode = (props) => {
|
|
|
3246
3494
|
};
|
|
3247
3495
|
const renderFallback = () => {
|
|
3248
3496
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
3249
|
-
return /* @__PURE__ */ (0,
|
|
3497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: linkText });
|
|
3250
3498
|
}
|
|
3251
3499
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
3252
|
-
return /* @__PURE__ */ (0,
|
|
3500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("br", {});
|
|
3253
3501
|
}
|
|
3254
3502
|
return null;
|
|
3255
3503
|
};
|
|
3256
3504
|
if (isButton) {
|
|
3257
|
-
return /* @__PURE__ */ (0,
|
|
3505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3258
3506
|
LinkNodeButton2,
|
|
3259
3507
|
{
|
|
3260
3508
|
node,
|
|
@@ -3272,7 +3520,7 @@ var LinkNode = (props) => {
|
|
|
3272
3520
|
}
|
|
3273
3521
|
);
|
|
3274
3522
|
}
|
|
3275
|
-
return /* @__PURE__ */ (0,
|
|
3523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3276
3524
|
Hyperlink,
|
|
3277
3525
|
{
|
|
3278
3526
|
href: linkUrl || "#",
|
|
@@ -3288,10 +3536,10 @@ var LinkNode = (props) => {
|
|
|
3288
3536
|
var LinkNode_default = LinkNode;
|
|
3289
3537
|
|
|
3290
3538
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
3291
|
-
var
|
|
3539
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3292
3540
|
var SVGIconNode = ({ node }) => {
|
|
3293
3541
|
if (!node?.svgCode) return null;
|
|
3294
|
-
return /* @__PURE__ */ (0,
|
|
3542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3295
3543
|
"span",
|
|
3296
3544
|
{
|
|
3297
3545
|
style: {
|
|
@@ -3308,7 +3556,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
3308
3556
|
|
|
3309
3557
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
3310
3558
|
var import_katex = __toESM(require("katex"));
|
|
3311
|
-
var
|
|
3559
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3312
3560
|
var EquationNode = ({ node }) => {
|
|
3313
3561
|
const { equation, inline } = node;
|
|
3314
3562
|
let html = "";
|
|
@@ -3323,7 +3571,7 @@ var EquationNode = ({ node }) => {
|
|
|
3323
3571
|
});
|
|
3324
3572
|
}
|
|
3325
3573
|
if (inline) {
|
|
3326
|
-
return /* @__PURE__ */ (0,
|
|
3574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3327
3575
|
"span",
|
|
3328
3576
|
{
|
|
3329
3577
|
className: "katex-inline",
|
|
@@ -3331,7 +3579,7 @@ var EquationNode = ({ node }) => {
|
|
|
3331
3579
|
}
|
|
3332
3580
|
);
|
|
3333
3581
|
}
|
|
3334
|
-
return /* @__PURE__ */ (0,
|
|
3582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3335
3583
|
"div",
|
|
3336
3584
|
{
|
|
3337
3585
|
className: "katex-block my-3 text-center",
|
|
@@ -3342,7 +3590,7 @@ var EquationNode = ({ node }) => {
|
|
|
3342
3590
|
var EquationNode_default = EquationNode;
|
|
3343
3591
|
|
|
3344
3592
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
3345
|
-
var
|
|
3593
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3346
3594
|
function getNestedProperty(obj, path) {
|
|
3347
3595
|
if (!obj || !path) return null;
|
|
3348
3596
|
if (path.includes(".")) {
|
|
@@ -3355,7 +3603,7 @@ function getNestedProperty(obj, path) {
|
|
|
3355
3603
|
}
|
|
3356
3604
|
const value = obj[path];
|
|
3357
3605
|
if (Array.isArray(value)) {
|
|
3358
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
3606
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: String(item) }, index));
|
|
3359
3607
|
}
|
|
3360
3608
|
return value;
|
|
3361
3609
|
}
|
|
@@ -3416,7 +3664,7 @@ var DatafieldNode = (props) => {
|
|
|
3416
3664
|
const dataType = props.node.dataType;
|
|
3417
3665
|
if (isEmptyValue) return null;
|
|
3418
3666
|
if (dataType === "rawContent") {
|
|
3419
|
-
return /* @__PURE__ */ (0,
|
|
3667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3420
3668
|
PageBodyRenderer_default,
|
|
3421
3669
|
{
|
|
3422
3670
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -3432,12 +3680,12 @@ var DatafieldNode = (props) => {
|
|
|
3432
3680
|
}
|
|
3433
3681
|
);
|
|
3434
3682
|
}
|
|
3435
|
-
return /* @__PURE__ */ (0,
|
|
3683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3436
3684
|
"span",
|
|
3437
3685
|
{
|
|
3438
3686
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
3439
3687
|
style: styles,
|
|
3440
|
-
children: /* @__PURE__ */ (0,
|
|
3688
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3441
3689
|
ViewControl_default,
|
|
3442
3690
|
{
|
|
3443
3691
|
controlType: dataType,
|
|
@@ -3450,7 +3698,7 @@ var DatafieldNode = (props) => {
|
|
|
3450
3698
|
var DatafieldNode_default = DatafieldNode;
|
|
3451
3699
|
|
|
3452
3700
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
3453
|
-
var
|
|
3701
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3454
3702
|
var ParagraphNode = (props) => {
|
|
3455
3703
|
const NodeTypes2 = {
|
|
3456
3704
|
["text"]: TextNode_default,
|
|
@@ -3470,9 +3718,9 @@ var ParagraphNode = (props) => {
|
|
|
3470
3718
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
3471
3719
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
3472
3720
|
if (isInlineOnlyParent) {
|
|
3473
|
-
return /* @__PURE__ */ (0,
|
|
3721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
3474
3722
|
const SelectedNode = NodeTypes2[node.type];
|
|
3475
|
-
return /* @__PURE__ */ (0,
|
|
3723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react36.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3476
3724
|
SelectedNode,
|
|
3477
3725
|
{
|
|
3478
3726
|
node,
|
|
@@ -3484,10 +3732,10 @@ var ParagraphNode = (props) => {
|
|
|
3484
3732
|
) }, index);
|
|
3485
3733
|
}) });
|
|
3486
3734
|
}
|
|
3487
|
-
return /* @__PURE__ */ (0,
|
|
3735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: " " + formatClasses, children: [
|
|
3488
3736
|
hasChildren && props.node.children.map((node, index) => {
|
|
3489
3737
|
const SelectedNode = NodeTypes2[node.type];
|
|
3490
|
-
return /* @__PURE__ */ (0,
|
|
3738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react36.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3491
3739
|
SelectedNode,
|
|
3492
3740
|
{
|
|
3493
3741
|
node,
|
|
@@ -3498,14 +3746,14 @@ var ParagraphNode = (props) => {
|
|
|
3498
3746
|
}
|
|
3499
3747
|
) }, index);
|
|
3500
3748
|
}),
|
|
3501
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
3749
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
3502
3750
|
] });
|
|
3503
3751
|
};
|
|
3504
3752
|
var ParagraphNode_default = ParagraphNode;
|
|
3505
3753
|
|
|
3506
3754
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
3507
|
-
var
|
|
3508
|
-
var
|
|
3755
|
+
var import_react37 = __toESM(require("react"));
|
|
3756
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3509
3757
|
var HeadingNode = (props) => {
|
|
3510
3758
|
const NodeTypes2 = {
|
|
3511
3759
|
["text"]: TextNode_default,
|
|
@@ -3521,23 +3769,23 @@ var HeadingNode = (props) => {
|
|
|
3521
3769
|
{
|
|
3522
3770
|
}
|
|
3523
3771
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
3524
|
-
return /* @__PURE__ */ (0,
|
|
3772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: import_react37.default.createElement(
|
|
3525
3773
|
HeadingTag,
|
|
3526
3774
|
{ className: formatClasses },
|
|
3527
3775
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
3528
3776
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
3529
|
-
return /* @__PURE__ */ (0,
|
|
3777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react37.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3530
3778
|
})
|
|
3531
3779
|
) });
|
|
3532
3780
|
};
|
|
3533
3781
|
var HeadingNode_default = HeadingNode;
|
|
3534
3782
|
|
|
3535
3783
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
3536
|
-
var
|
|
3784
|
+
var import_react39 = __toESM(require("react"));
|
|
3537
3785
|
|
|
3538
3786
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
3539
|
-
var
|
|
3540
|
-
var
|
|
3787
|
+
var import_react38 = __toESM(require("react"));
|
|
3788
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3541
3789
|
var ListItemNode = (props) => {
|
|
3542
3790
|
const NodeTypes2 = {
|
|
3543
3791
|
text: TextNode_default,
|
|
@@ -3554,66 +3802,66 @@ var ListItemNode = (props) => {
|
|
|
3554
3802
|
liStyle.fontSize = match[1].trim();
|
|
3555
3803
|
}
|
|
3556
3804
|
}
|
|
3557
|
-
return /* @__PURE__ */ (0,
|
|
3805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
3558
3806
|
const SelectedNode = NodeTypes2[node.type];
|
|
3559
3807
|
if (node.type === "linebreak") {
|
|
3560
3808
|
if (!foundFirstBreak) {
|
|
3561
3809
|
foundFirstBreak = true;
|
|
3562
|
-
return /* @__PURE__ */ (0,
|
|
3810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", {}, index);
|
|
3563
3811
|
} else {
|
|
3564
|
-
return /* @__PURE__ */ (0,
|
|
3812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
3565
3813
|
}
|
|
3566
3814
|
} else {
|
|
3567
3815
|
foundFirstBreak = false;
|
|
3568
|
-
return /* @__PURE__ */ (0,
|
|
3816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react38.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3569
3817
|
}
|
|
3570
3818
|
}) });
|
|
3571
3819
|
};
|
|
3572
3820
|
var ListItemNode_default = ListItemNode;
|
|
3573
3821
|
|
|
3574
3822
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
3575
|
-
var
|
|
3823
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3576
3824
|
var ListNode = (props) => {
|
|
3577
3825
|
const NodeTypes2 = {
|
|
3578
3826
|
listitem: ListItemNode_default
|
|
3579
3827
|
};
|
|
3580
|
-
return /* @__PURE__ */ (0,
|
|
3581
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
3828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react39.default.Fragment, { children: [
|
|
3829
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3582
3830
|
const SelectedNode = NodeTypes2[node.type];
|
|
3583
|
-
return /* @__PURE__ */ (0,
|
|
3831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react39.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3584
3832
|
}) }),
|
|
3585
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
3833
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3586
3834
|
const SelectedNode = NodeTypes2[node.type];
|
|
3587
|
-
return /* @__PURE__ */ (0,
|
|
3835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react39.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3588
3836
|
}) })
|
|
3589
3837
|
] });
|
|
3590
3838
|
};
|
|
3591
3839
|
var ListNode_default = ListNode;
|
|
3592
3840
|
|
|
3593
3841
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
3594
|
-
var
|
|
3595
|
-
var
|
|
3842
|
+
var import_react40 = __toESM(require("react"));
|
|
3843
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3596
3844
|
var QuoteNode = (props) => {
|
|
3597
3845
|
const NodeTypes2 = {
|
|
3598
3846
|
["text"]: TextNode_default,
|
|
3599
3847
|
["linebreak"]: LineBreakNode_default,
|
|
3600
3848
|
["link"]: LinkNode_default
|
|
3601
3849
|
};
|
|
3602
|
-
return /* @__PURE__ */ (0,
|
|
3850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3603
3851
|
const SelectedNode = NodeTypes2[node.type];
|
|
3604
|
-
return /* @__PURE__ */ (0,
|
|
3852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react40.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3605
3853
|
}) });
|
|
3606
3854
|
};
|
|
3607
3855
|
var QuoteNode_default = QuoteNode;
|
|
3608
3856
|
|
|
3609
3857
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3610
|
-
var
|
|
3858
|
+
var import_react42 = __toESM(require("react"));
|
|
3611
3859
|
var import_dynamic3 = __toESM(require("next/dynamic"));
|
|
3612
|
-
var
|
|
3860
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3613
3861
|
var CopyButton2 = (0, import_dynamic3.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
3614
3862
|
ssr: false,
|
|
3615
3863
|
// optional: fallback UI while loading
|
|
3616
|
-
loading: () => /* @__PURE__ */ (0,
|
|
3864
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
3617
3865
|
});
|
|
3618
3866
|
var CodeNode = (props) => {
|
|
3619
3867
|
const NodeTypes2 = {
|
|
@@ -3627,14 +3875,14 @@ var CodeNode = (props) => {
|
|
|
3627
3875
|
if (node.type === "link") return node.text || node.url || "";
|
|
3628
3876
|
return "";
|
|
3629
3877
|
}).join("") ?? "";
|
|
3630
|
-
return /* @__PURE__ */ (0,
|
|
3631
|
-
/* @__PURE__ */ (0,
|
|
3632
|
-
/* @__PURE__ */ (0,
|
|
3633
|
-
/* @__PURE__ */ (0,
|
|
3878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { children: [
|
|
3879
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
3880
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: "Code Snippet" }),
|
|
3881
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CopyButton2, { text: textContent })
|
|
3634
3882
|
] }),
|
|
3635
|
-
/* @__PURE__ */ (0,
|
|
3883
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("code", { className: "bg-neutral-soft p-4 text-sm whitespace-pre-wrap border border-2 block", children: props.node.children && props.node.children.map((node, index) => {
|
|
3636
3884
|
const SelectedNode = NodeTypes2[node.type];
|
|
3637
|
-
return /* @__PURE__ */ (0,
|
|
3885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react42.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3638
3886
|
SelectedNode,
|
|
3639
3887
|
{
|
|
3640
3888
|
node,
|
|
@@ -3649,15 +3897,15 @@ var CodeNode = (props) => {
|
|
|
3649
3897
|
var CodeNode_default = CodeNode;
|
|
3650
3898
|
|
|
3651
3899
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
3652
|
-
var
|
|
3900
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3653
3901
|
var HorizontalRuleNode = () => {
|
|
3654
|
-
return /* @__PURE__ */ (0,
|
|
3902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("hr", {});
|
|
3655
3903
|
};
|
|
3656
3904
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3657
3905
|
|
|
3658
3906
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3659
|
-
var
|
|
3660
|
-
var
|
|
3907
|
+
var import_react43 = __toESM(require("react"));
|
|
3908
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3661
3909
|
var WidgetNode = (props) => {
|
|
3662
3910
|
const getWidgetParameters = () => {
|
|
3663
3911
|
const widgetInputParameters = {
|
|
@@ -3714,7 +3962,7 @@ var WidgetNode = (props) => {
|
|
|
3714
3962
|
};
|
|
3715
3963
|
const widgetCode = props.node?.widgetCode;
|
|
3716
3964
|
if (!widgetCode) {
|
|
3717
|
-
return /* @__PURE__ */ (0,
|
|
3965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, { children: "Invalid widget" });
|
|
3718
3966
|
}
|
|
3719
3967
|
const widgetParams = getWidgetParameters();
|
|
3720
3968
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -3723,7 +3971,7 @@ var WidgetNode = (props) => {
|
|
|
3723
3971
|
}
|
|
3724
3972
|
return (
|
|
3725
3973
|
// eslint-disable-next-line react-hooks/static-components
|
|
3726
|
-
/* @__PURE__ */ (0,
|
|
3974
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react43.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3727
3975
|
WidgetRenderer,
|
|
3728
3976
|
{
|
|
3729
3977
|
params: widgetParams,
|
|
@@ -3740,12 +3988,12 @@ var WidgetNode = (props) => {
|
|
|
3740
3988
|
var WidgetNode_default = WidgetNode;
|
|
3741
3989
|
|
|
3742
3990
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3743
|
-
var
|
|
3991
|
+
var import_react44 = __toESM(require("react"));
|
|
3744
3992
|
|
|
3745
3993
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3746
|
-
var
|
|
3994
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3747
3995
|
var InputControlNode = (props) => {
|
|
3748
|
-
return /* @__PURE__ */ (0,
|
|
3996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3749
3997
|
InputControl_default,
|
|
3750
3998
|
{
|
|
3751
3999
|
name: props.node.name,
|
|
@@ -3819,22 +4067,22 @@ var FormReducer_default = FormReducer;
|
|
|
3819
4067
|
|
|
3820
4068
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3821
4069
|
init_ServiceClient();
|
|
3822
|
-
var
|
|
4070
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3823
4071
|
var FormContainerNode = (props) => {
|
|
3824
4072
|
const NodeTypes2 = {
|
|
3825
4073
|
["input-control"]: InputControlNode_default
|
|
3826
4074
|
};
|
|
3827
4075
|
const { node } = props;
|
|
3828
|
-
const formRef = (0,
|
|
4076
|
+
const formRef = (0, import_react44.useRef)(null);
|
|
3829
4077
|
const initialState = {
|
|
3830
4078
|
inputValues: {},
|
|
3831
4079
|
lastPropertyChanged: ""
|
|
3832
4080
|
};
|
|
3833
|
-
const [formState, dispatch] = (0,
|
|
3834
|
-
const handleInputChange = (0,
|
|
4081
|
+
const [formState, dispatch] = (0, import_react44.useReducer)(FormReducer_default, initialState);
|
|
4082
|
+
const handleInputChange = (0, import_react44.useCallback)((updatedValues) => {
|
|
3835
4083
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
3836
4084
|
}, [dispatch]);
|
|
3837
|
-
(0,
|
|
4085
|
+
(0, import_react44.useEffect)(() => {
|
|
3838
4086
|
const fetchInitialData = async () => {
|
|
3839
4087
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
3840
4088
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -3849,12 +4097,12 @@ var FormContainerNode = (props) => {
|
|
|
3849
4097
|
};
|
|
3850
4098
|
fetchInitialData();
|
|
3851
4099
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3852
|
-
return /* @__PURE__ */ (0,
|
|
4100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3853
4101
|
node.children && node.children.map((node2, index) => {
|
|
3854
4102
|
{
|
|
3855
4103
|
}
|
|
3856
4104
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3857
|
-
return /* @__PURE__ */ (0,
|
|
4105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react44.default.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3858
4106
|
InputControlNode_default,
|
|
3859
4107
|
{
|
|
3860
4108
|
value: formState.inputValues[node2.name],
|
|
@@ -3863,17 +4111,17 @@ var FormContainerNode = (props) => {
|
|
|
3863
4111
|
}
|
|
3864
4112
|
) }, index);
|
|
3865
4113
|
}),
|
|
3866
|
-
node.children.length == 0 && /* @__PURE__ */ (0,
|
|
4114
|
+
node.children.length == 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "py-0.5 lg:py-1.5" })
|
|
3867
4115
|
] });
|
|
3868
4116
|
};
|
|
3869
4117
|
var FormContainerNode_default = FormContainerNode;
|
|
3870
4118
|
|
|
3871
4119
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3872
|
-
var
|
|
4120
|
+
var import_react49 = __toESM(require("react"));
|
|
3873
4121
|
|
|
3874
4122
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3875
4123
|
var import_dynamic4 = __toESM(require("next/dynamic"));
|
|
3876
|
-
var
|
|
4124
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3877
4125
|
var IframeClient2 = (0, import_dynamic4.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
3878
4126
|
ssr: false
|
|
3879
4127
|
});
|
|
@@ -3886,7 +4134,7 @@ var EmbedNode = (props) => {
|
|
|
3886
4134
|
} else {
|
|
3887
4135
|
src = props.node.embedSrc;
|
|
3888
4136
|
}
|
|
3889
|
-
return /* @__PURE__ */ (0,
|
|
4137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(IframeClient2, { src }) });
|
|
3890
4138
|
};
|
|
3891
4139
|
var EmbedNode_default = EmbedNode;
|
|
3892
4140
|
|
|
@@ -3894,8 +4142,8 @@ var EmbedNode_default = EmbedNode;
|
|
|
3894
4142
|
init_ServiceClient();
|
|
3895
4143
|
|
|
3896
4144
|
// src/components/Slider.tsx
|
|
3897
|
-
var
|
|
3898
|
-
var
|
|
4145
|
+
var import_react47 = __toESM(require("react"));
|
|
4146
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3899
4147
|
var Slider = ({
|
|
3900
4148
|
children,
|
|
3901
4149
|
slidesToShow = 4,
|
|
@@ -3913,13 +4161,13 @@ var Slider = ({
|
|
|
3913
4161
|
pillStyle = "cumulative",
|
|
3914
4162
|
progressPosition = "bottom"
|
|
3915
4163
|
}) => {
|
|
3916
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
3917
|
-
const [transition, setTransition] = (0,
|
|
3918
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
4164
|
+
const [currentSlide, setCurrentSlide] = (0, import_react47.useState)(0);
|
|
4165
|
+
const [transition, setTransition] = (0, import_react47.useState)(true);
|
|
4166
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react47.useState)(
|
|
3919
4167
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3920
4168
|
);
|
|
3921
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
3922
|
-
(0,
|
|
4169
|
+
const [isPlaying, setIsPlaying] = (0, import_react47.useState)(autoplay);
|
|
4170
|
+
(0, import_react47.useEffect)(() => {
|
|
3923
4171
|
if (typeof slidesToShow === "number") return;
|
|
3924
4172
|
const handleResize = () => {
|
|
3925
4173
|
if (window.innerWidth >= 1024) {
|
|
@@ -3934,7 +4182,7 @@ var Slider = ({
|
|
|
3934
4182
|
window.addEventListener("resize", handleResize);
|
|
3935
4183
|
return () => window.removeEventListener("resize", handleResize);
|
|
3936
4184
|
}, [slidesToShow]);
|
|
3937
|
-
(0,
|
|
4185
|
+
(0, import_react47.useEffect)(() => {
|
|
3938
4186
|
if (!autoplay) return;
|
|
3939
4187
|
const timer = setInterval(() => {
|
|
3940
4188
|
if (isPlaying) {
|
|
@@ -3943,7 +4191,7 @@ var Slider = ({
|
|
|
3943
4191
|
}, autoplay_speed);
|
|
3944
4192
|
return () => clearInterval(timer);
|
|
3945
4193
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
3946
|
-
const totalSlides =
|
|
4194
|
+
const totalSlides = import_react47.Children.count(children);
|
|
3947
4195
|
const maxSlide = totalSlides - slidesToShowState;
|
|
3948
4196
|
const nextSlide = () => {
|
|
3949
4197
|
if (currentSlide >= maxSlide) {
|
|
@@ -3988,16 +4236,16 @@ var Slider = ({
|
|
|
3988
4236
|
}
|
|
3989
4237
|
};
|
|
3990
4238
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3991
|
-
const slides =
|
|
3992
|
-
if (!
|
|
4239
|
+
const slides = import_react47.Children.map(children, (child, index) => {
|
|
4240
|
+
if (!import_react47.default.isValidElement(child)) return null;
|
|
3993
4241
|
const childProps = child.props;
|
|
3994
4242
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3995
|
-
return /* @__PURE__ */ (0,
|
|
4243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3996
4244
|
"div",
|
|
3997
4245
|
{
|
|
3998
4246
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
3999
4247
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
4000
|
-
children: (0,
|
|
4248
|
+
children: (0, import_react47.cloneElement)(child, {
|
|
4001
4249
|
className: mergedClassName
|
|
4002
4250
|
})
|
|
4003
4251
|
},
|
|
@@ -4015,14 +4263,14 @@ var Slider = ({
|
|
|
4015
4263
|
return "bottom-4";
|
|
4016
4264
|
}
|
|
4017
4265
|
};
|
|
4018
|
-
return /* @__PURE__ */ (0,
|
|
4266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
4019
4267
|
"div",
|
|
4020
4268
|
{
|
|
4021
4269
|
className: `relative w-full overflow-hidden ${className}`,
|
|
4022
4270
|
onMouseEnter: handleMouseEnter,
|
|
4023
4271
|
onMouseLeave: handleMouseLeave,
|
|
4024
4272
|
children: [
|
|
4025
|
-
/* @__PURE__ */ (0,
|
|
4273
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4026
4274
|
"div",
|
|
4027
4275
|
{
|
|
4028
4276
|
className: "flex h-full",
|
|
@@ -4033,18 +4281,18 @@ var Slider = ({
|
|
|
4033
4281
|
children: slides
|
|
4034
4282
|
}
|
|
4035
4283
|
),
|
|
4036
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
4037
|
-
/* @__PURE__ */ (0,
|
|
4284
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
4285
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4038
4286
|
ArrowButton,
|
|
4039
4287
|
{
|
|
4040
4288
|
direction: "left",
|
|
4041
4289
|
onClick: prevSlide,
|
|
4042
4290
|
visible: infinite_scroll || currentSlide > 0,
|
|
4043
4291
|
className: arrowClassName,
|
|
4044
|
-
children: /* @__PURE__ */ (0,
|
|
4292
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("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__ */ (0, import_jsx_runtime63.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
4045
4293
|
}
|
|
4046
4294
|
),
|
|
4047
|
-
/* @__PURE__ */ (0,
|
|
4295
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
4048
4296
|
ArrowButton,
|
|
4049
4297
|
{
|
|
4050
4298
|
direction: "right",
|
|
@@ -4052,13 +4300,13 @@ var Slider = ({
|
|
|
4052
4300
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
4053
4301
|
className: arrowClassName,
|
|
4054
4302
|
children: [
|
|
4055
|
-
/* @__PURE__ */ (0,
|
|
4303
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("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__ */ (0, import_jsx_runtime63.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
4056
4304
|
" "
|
|
4057
4305
|
]
|
|
4058
4306
|
}
|
|
4059
4307
|
)
|
|
4060
4308
|
] }),
|
|
4061
|
-
show_dots && /* @__PURE__ */ (0,
|
|
4309
|
+
show_dots && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("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__ */ (0, import_jsx_runtime63.jsx)(
|
|
4062
4310
|
ProgressPill,
|
|
4063
4311
|
{
|
|
4064
4312
|
active: index === currentSlide,
|
|
@@ -4084,7 +4332,7 @@ var ArrowButton = ({
|
|
|
4084
4332
|
visible,
|
|
4085
4333
|
children,
|
|
4086
4334
|
className = ""
|
|
4087
|
-
}) => /* @__PURE__ */ (0,
|
|
4335
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4088
4336
|
"button",
|
|
4089
4337
|
{
|
|
4090
4338
|
className: `
|
|
@@ -4110,13 +4358,13 @@ var ProgressPill = ({
|
|
|
4110
4358
|
currentSlide,
|
|
4111
4359
|
totalSlides
|
|
4112
4360
|
}) => {
|
|
4113
|
-
const [progress, setProgress] = (0,
|
|
4114
|
-
(0,
|
|
4361
|
+
const [progress, setProgress] = (0, import_react47.useState)(0);
|
|
4362
|
+
(0, import_react47.useEffect)(() => {
|
|
4115
4363
|
if (active) {
|
|
4116
4364
|
setProgress(0);
|
|
4117
4365
|
}
|
|
4118
4366
|
}, [active, index]);
|
|
4119
|
-
(0,
|
|
4367
|
+
(0, import_react47.useEffect)(() => {
|
|
4120
4368
|
if (!active || !isPlaying) {
|
|
4121
4369
|
if (!active) {
|
|
4122
4370
|
setProgress(0);
|
|
@@ -4171,7 +4419,7 @@ var ProgressPill = ({
|
|
|
4171
4419
|
const renderProgressBar = () => {
|
|
4172
4420
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
4173
4421
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
4174
|
-
return /* @__PURE__ */ (0,
|
|
4422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4175
4423
|
"div",
|
|
4176
4424
|
{
|
|
4177
4425
|
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`,
|
|
@@ -4183,7 +4431,7 @@ var ProgressPill = ({
|
|
|
4183
4431
|
};
|
|
4184
4432
|
const renderCumulativeFill = () => {
|
|
4185
4433
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4186
|
-
return /* @__PURE__ */ (0,
|
|
4434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4187
4435
|
"div",
|
|
4188
4436
|
{
|
|
4189
4437
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4193,7 +4441,7 @@ var ProgressPill = ({
|
|
|
4193
4441
|
}
|
|
4194
4442
|
return null;
|
|
4195
4443
|
};
|
|
4196
|
-
return /* @__PURE__ */ (0,
|
|
4444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
4197
4445
|
"button",
|
|
4198
4446
|
{
|
|
4199
4447
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4519,14 +4767,22 @@ var PathUtility = class {
|
|
|
4519
4767
|
const segments = path.split("/").filter(Boolean);
|
|
4520
4768
|
return segments.length > 0 ? segments[0] : "";
|
|
4521
4769
|
}
|
|
4770
|
+
getFileNameFromUrl(url) {
|
|
4771
|
+
if (!url || url.indexOf("/") === -1) {
|
|
4772
|
+
return url;
|
|
4773
|
+
}
|
|
4774
|
+
const parts = url.split("/");
|
|
4775
|
+
const filename = parts[parts.length - 1];
|
|
4776
|
+
return filename;
|
|
4777
|
+
}
|
|
4522
4778
|
};
|
|
4523
4779
|
var PathUtility_default = new PathUtility();
|
|
4524
4780
|
|
|
4525
4781
|
// src/components/NoDataFound.tsx
|
|
4526
|
-
var
|
|
4782
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4527
4783
|
var NoDataFound = () => {
|
|
4528
|
-
return /* @__PURE__ */ (0,
|
|
4529
|
-
/* @__PURE__ */ (0,
|
|
4784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4785
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4530
4786
|
"svg",
|
|
4531
4787
|
{
|
|
4532
4788
|
className: "w-10 h-10",
|
|
@@ -4534,7 +4790,7 @@ var NoDataFound = () => {
|
|
|
4534
4790
|
stroke: "currentColor",
|
|
4535
4791
|
viewBox: "0 0 24 24",
|
|
4536
4792
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4537
|
-
children: /* @__PURE__ */ (0,
|
|
4793
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4538
4794
|
"path",
|
|
4539
4795
|
{
|
|
4540
4796
|
strokeLinecap: "round",
|
|
@@ -4545,70 +4801,19 @@ var NoDataFound = () => {
|
|
|
4545
4801
|
)
|
|
4546
4802
|
}
|
|
4547
4803
|
) }) }),
|
|
4548
|
-
/* @__PURE__ */ (0,
|
|
4549
|
-
/* @__PURE__ */ (0,
|
|
4804
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4805
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4550
4806
|
] });
|
|
4551
4807
|
};
|
|
4552
4808
|
var NoDataFound_default = NoDataFound;
|
|
4553
4809
|
|
|
4554
4810
|
// src/components/Pagination.tsx
|
|
4555
|
-
var
|
|
4556
|
-
|
|
4557
|
-
// src/svg/chevron-updown.tsx
|
|
4558
|
-
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4559
|
-
var ChevronUpDown = (props) => {
|
|
4560
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
4561
|
-
};
|
|
4562
|
-
var chevron_updown_default = ChevronUpDown;
|
|
4563
|
-
|
|
4564
|
-
// src/svg/chevron-down.tsx
|
|
4565
|
-
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4566
|
-
var ChevronDown = (props) => {
|
|
4567
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
4568
|
-
};
|
|
4569
|
-
var chevron_down_default = ChevronDown;
|
|
4570
|
-
|
|
4571
|
-
// src/svg/chevron-up.tsx
|
|
4572
|
-
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4573
|
-
var ChevronUp = (props) => {
|
|
4574
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
4575
|
-
};
|
|
4576
|
-
var chevron_up_default = ChevronUp;
|
|
4577
|
-
|
|
4578
|
-
// src/svg/plus.tsx
|
|
4579
|
-
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4580
|
-
var Plus = (props) => {
|
|
4581
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
4582
|
-
};
|
|
4583
|
-
var plus_default = Plus;
|
|
4584
|
-
|
|
4585
|
-
// src/svg/Icons.tsx
|
|
4586
|
-
var Icons = {
|
|
4587
|
-
chevronUpDown: chevron_updown_default,
|
|
4588
|
-
chevronDown: chevron_down_default,
|
|
4589
|
-
chevronUp: chevron_up_default,
|
|
4590
|
-
plus: plus_default
|
|
4591
|
-
};
|
|
4592
|
-
var Icons_default = Icons;
|
|
4593
|
-
|
|
4594
|
-
// src/svg/Icon.tsx
|
|
4595
|
-
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4596
|
-
var Icon = ({ name, className, ...props }) => {
|
|
4597
|
-
const IconComponent = Icons_default[name];
|
|
4598
|
-
if (!IconComponent) {
|
|
4599
|
-
console.error(`Icon "${name}" not found.`);
|
|
4600
|
-
return null;
|
|
4601
|
-
}
|
|
4602
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconComponent, { ...props, className });
|
|
4603
|
-
};
|
|
4604
|
-
var Icon_default = Icon;
|
|
4605
|
-
|
|
4606
|
-
// src/components/Pagination.tsx
|
|
4811
|
+
var import_react48 = require("react");
|
|
4607
4812
|
init_StyleTypes();
|
|
4608
|
-
var
|
|
4813
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4609
4814
|
var Pagination = (props) => {
|
|
4610
4815
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4611
|
-
const builder = (0,
|
|
4816
|
+
const builder = (0, import_react48.useMemo)(() => {
|
|
4612
4817
|
const b = new OdataBuilder(path);
|
|
4613
4818
|
if (query) b.setQuery(query);
|
|
4614
4819
|
return b;
|
|
@@ -4649,7 +4854,7 @@ var Pagination = (props) => {
|
|
|
4649
4854
|
return range;
|
|
4650
4855
|
};
|
|
4651
4856
|
const paginationRange = getPaginationRange();
|
|
4652
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
4857
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4653
4858
|
Hyperlink,
|
|
4654
4859
|
{
|
|
4655
4860
|
linkType: "Link" /* Link */,
|
|
@@ -4664,9 +4869,9 @@ var Pagination = (props) => {
|
|
|
4664
4869
|
);
|
|
4665
4870
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4666
4871
|
if (disabled) {
|
|
4667
|
-
return /* @__PURE__ */ (0,
|
|
4872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("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 });
|
|
4668
4873
|
}
|
|
4669
|
-
return /* @__PURE__ */ (0,
|
|
4874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4670
4875
|
Hyperlink,
|
|
4671
4876
|
{
|
|
4672
4877
|
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",
|
|
@@ -4676,35 +4881,35 @@ var Pagination = (props) => {
|
|
|
4676
4881
|
);
|
|
4677
4882
|
};
|
|
4678
4883
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4679
|
-
return /* @__PURE__ */ (0,
|
|
4680
|
-
/* @__PURE__ */ (0,
|
|
4681
|
-
/* @__PURE__ */ (0,
|
|
4884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
4885
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4886
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "text-sm", children: [
|
|
4682
4887
|
"Showing ",
|
|
4683
|
-
/* @__PURE__ */ (0,
|
|
4888
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "font-semibold", children: [
|
|
4684
4889
|
startItem,
|
|
4685
4890
|
"-",
|
|
4686
4891
|
endItem
|
|
4687
4892
|
] }),
|
|
4688
4893
|
" ",
|
|
4689
4894
|
"out of ",
|
|
4690
|
-
/* @__PURE__ */ (0,
|
|
4895
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4691
4896
|
" results"
|
|
4692
4897
|
] }),
|
|
4693
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
4694
|
-
/* @__PURE__ */ (0,
|
|
4898
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
4899
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
4695
4900
|
NavigationButton,
|
|
4696
4901
|
{
|
|
4697
4902
|
page: activePageNumber - 1,
|
|
4698
4903
|
disabled: activePageNumber === 1,
|
|
4699
4904
|
children: [
|
|
4700
|
-
/* @__PURE__ */ (0,
|
|
4701
|
-
/* @__PURE__ */ (0,
|
|
4905
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4906
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
4702
4907
|
]
|
|
4703
4908
|
}
|
|
4704
4909
|
),
|
|
4705
4910
|
paginationRange.map((item, index) => {
|
|
4706
4911
|
if (item === "...") {
|
|
4707
|
-
return /* @__PURE__ */ (0,
|
|
4912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4708
4913
|
"span",
|
|
4709
4914
|
{
|
|
4710
4915
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4714,23 +4919,23 @@ var Pagination = (props) => {
|
|
|
4714
4919
|
);
|
|
4715
4920
|
}
|
|
4716
4921
|
const page = item;
|
|
4717
|
-
return /* @__PURE__ */ (0,
|
|
4922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PageButton, { page, children: page }, page);
|
|
4718
4923
|
}),
|
|
4719
|
-
/* @__PURE__ */ (0,
|
|
4924
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
4720
4925
|
NavigationButton,
|
|
4721
4926
|
{
|
|
4722
4927
|
page: activePageNumber + 1,
|
|
4723
4928
|
disabled: activePageNumber === totalPages,
|
|
4724
4929
|
children: [
|
|
4725
|
-
/* @__PURE__ */ (0,
|
|
4726
|
-
/* @__PURE__ */ (0,
|
|
4930
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
4931
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4727
4932
|
]
|
|
4728
4933
|
}
|
|
4729
4934
|
)
|
|
4730
4935
|
] }),
|
|
4731
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
4732
|
-
/* @__PURE__ */ (0,
|
|
4733
|
-
/* @__PURE__ */ (0,
|
|
4936
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
4937
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
4938
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4734
4939
|
"input",
|
|
4735
4940
|
{
|
|
4736
4941
|
type: "number",
|
|
@@ -4751,9 +4956,9 @@ var Pagination = (props) => {
|
|
|
4751
4956
|
) })
|
|
4752
4957
|
] })
|
|
4753
4958
|
] }),
|
|
4754
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
4755
|
-
/* @__PURE__ */ (0,
|
|
4756
|
-
/* @__PURE__ */ (0,
|
|
4959
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4960
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
4961
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4757
4962
|
Hyperlink,
|
|
4758
4963
|
{
|
|
4759
4964
|
className: `
|
|
@@ -4765,7 +4970,7 @@ var Pagination = (props) => {
|
|
|
4765
4970
|
},
|
|
4766
4971
|
size
|
|
4767
4972
|
)) }),
|
|
4768
|
-
/* @__PURE__ */ (0,
|
|
4973
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "per page" })
|
|
4769
4974
|
] }) })
|
|
4770
4975
|
] });
|
|
4771
4976
|
};
|
|
@@ -4773,7 +4978,7 @@ var Pagination_default = Pagination;
|
|
|
4773
4978
|
|
|
4774
4979
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
4775
4980
|
var import_dynamic5 = __toESM(require("next/dynamic"));
|
|
4776
|
-
var
|
|
4981
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4777
4982
|
var HlsPlayer3 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
4778
4983
|
var deviceToMediaQuery = (device) => {
|
|
4779
4984
|
switch (device) {
|
|
@@ -4842,8 +5047,8 @@ var ImageGalleryNode = (props) => {
|
|
|
4842
5047
|
right: "justify-end"
|
|
4843
5048
|
};
|
|
4844
5049
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
4845
|
-
return /* @__PURE__ */ (0,
|
|
4846
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
5050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
5051
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4847
5052
|
HlsPlayer3,
|
|
4848
5053
|
{
|
|
4849
5054
|
sources: hlsSources,
|
|
@@ -4857,14 +5062,14 @@ var ImageGalleryNode = (props) => {
|
|
|
4857
5062
|
session: props.session
|
|
4858
5063
|
}
|
|
4859
5064
|
) }),
|
|
4860
|
-
staticFallback && /* @__PURE__ */ (0,
|
|
5065
|
+
staticFallback && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("picture", { children: [
|
|
4861
5066
|
DEVICE_ORDER.map((deviceKey) => {
|
|
4862
5067
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
4863
5068
|
if (!match) return null;
|
|
4864
5069
|
const srcUrl = resolveImageUrl(match.imageUrl);
|
|
4865
5070
|
if (!srcUrl) return null;
|
|
4866
5071
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
4867
|
-
return /* @__PURE__ */ (0,
|
|
5072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4868
5073
|
"source",
|
|
4869
5074
|
{
|
|
4870
5075
|
media: mediaQuery,
|
|
@@ -4888,7 +5093,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4888
5093
|
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
4889
5094
|
return (
|
|
4890
5095
|
// eslint-disable-next-line @next/next/no-img-element
|
|
4891
|
-
/* @__PURE__ */ (0,
|
|
5096
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4892
5097
|
"img",
|
|
4893
5098
|
{
|
|
4894
5099
|
loading: "lazy",
|
|
@@ -4909,7 +5114,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
4909
5114
|
|
|
4910
5115
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4911
5116
|
var import_link2 = __toESM(require("next/link"));
|
|
4912
|
-
var
|
|
5117
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4913
5118
|
function toCamelCase(str) {
|
|
4914
5119
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4915
5120
|
}
|
|
@@ -5114,7 +5319,7 @@ var DivContainer = async (props) => {
|
|
|
5114
5319
|
response = await serviceClient.get(endpoint);
|
|
5115
5320
|
result = response?.result;
|
|
5116
5321
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
5117
|
-
return /* @__PURE__ */ (0,
|
|
5322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NoDataFound_default, {});
|
|
5118
5323
|
}
|
|
5119
5324
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
5120
5325
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -5131,7 +5336,7 @@ var DivContainer = async (props) => {
|
|
|
5131
5336
|
}
|
|
5132
5337
|
const SelectedNode = NodeTypes2[node.type];
|
|
5133
5338
|
if (!SelectedNode) return null;
|
|
5134
|
-
return /* @__PURE__ */ (0,
|
|
5339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react49.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5135
5340
|
SelectedNode,
|
|
5136
5341
|
{
|
|
5137
5342
|
node,
|
|
@@ -5233,9 +5438,9 @@ var DivContainer = async (props) => {
|
|
|
5233
5438
|
props.node.autoFormat && "auto-format",
|
|
5234
5439
|
props.node.bgClass
|
|
5235
5440
|
].filter(Boolean).join(" ");
|
|
5236
|
-
return /* @__PURE__ */ (0,
|
|
5237
|
-
/* @__PURE__ */ (0,
|
|
5238
|
-
/* @__PURE__ */ (0,
|
|
5441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react49.default.Fragment, { children: [
|
|
5442
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
5443
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react49.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5239
5444
|
Wrapper,
|
|
5240
5445
|
{
|
|
5241
5446
|
id: guid,
|
|
@@ -5244,18 +5449,18 @@ var DivContainer = async (props) => {
|
|
|
5244
5449
|
...wrapperProps,
|
|
5245
5450
|
children: dataToRender.map(
|
|
5246
5451
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
5247
|
-
(child, i) => /* @__PURE__ */ (0,
|
|
5452
|
+
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react49.default.Fragment, { children: child }, i)
|
|
5248
5453
|
) : renderChildren(props.node.children, props, item, idx)
|
|
5249
5454
|
)
|
|
5250
5455
|
}
|
|
5251
5456
|
) }),
|
|
5252
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
5457
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
5253
5458
|
] });
|
|
5254
5459
|
};
|
|
5255
5460
|
var DivContainer_default = DivContainer;
|
|
5256
5461
|
|
|
5257
5462
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
5258
|
-
var
|
|
5463
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5259
5464
|
var NodeTypes = {
|
|
5260
5465
|
["paragraph"]: ParagraphNode_default,
|
|
5261
5466
|
["heading"]: HeadingNode_default,
|
|
@@ -5283,11 +5488,11 @@ var PageBodyRenderer = (props) => {
|
|
|
5283
5488
|
if (pageBodyTree && pageBodyTree.root) {
|
|
5284
5489
|
rootNode = pageBodyTree.root;
|
|
5285
5490
|
}
|
|
5286
|
-
return /* @__PURE__ */ (0,
|
|
5491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
5287
5492
|
{
|
|
5288
5493
|
}
|
|
5289
5494
|
const SelectedNode = NodeTypes[node.type];
|
|
5290
|
-
return /* @__PURE__ */ (0,
|
|
5495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5291
5496
|
SelectedNode,
|
|
5292
5497
|
{
|
|
5293
5498
|
node,
|
|
@@ -5303,7 +5508,7 @@ var PageBodyRenderer = (props) => {
|
|
|
5303
5508
|
device: props.device,
|
|
5304
5509
|
widgetRenderer: props.widgetRenderer
|
|
5305
5510
|
}
|
|
5306
|
-
) }) : /* @__PURE__ */ (0,
|
|
5511
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5307
5512
|
SelectedNode,
|
|
5308
5513
|
{
|
|
5309
5514
|
node,
|
|
@@ -5324,13 +5529,13 @@ var PageBodyRenderer = (props) => {
|
|
|
5324
5529
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
5325
5530
|
|
|
5326
5531
|
// src/components/Toast.tsx
|
|
5327
|
-
var
|
|
5532
|
+
var import_react51 = require("react");
|
|
5328
5533
|
init_ToastService();
|
|
5329
|
-
var
|
|
5534
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5330
5535
|
var Toast = () => {
|
|
5331
|
-
const [showToast, setShowToast] = (0,
|
|
5332
|
-
const [message, setMessage] = (0,
|
|
5333
|
-
const [messageType, setMessageType] = (0,
|
|
5536
|
+
const [showToast, setShowToast] = (0, import_react51.useState)(false);
|
|
5537
|
+
const [message, setMessage] = (0, import_react51.useState)("");
|
|
5538
|
+
const [messageType, setMessageType] = (0, import_react51.useState)("error");
|
|
5334
5539
|
ToastService_default.showError = function(message2) {
|
|
5335
5540
|
setShowToast(true);
|
|
5336
5541
|
setMessage(message2);
|
|
@@ -5369,8 +5574,8 @@ var Toast = () => {
|
|
|
5369
5574
|
const closeToast = () => {
|
|
5370
5575
|
setShowToast(false);
|
|
5371
5576
|
};
|
|
5372
|
-
return /* @__PURE__ */ (0,
|
|
5373
|
-
/* @__PURE__ */ (0,
|
|
5577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
5578
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5374
5579
|
"span",
|
|
5375
5580
|
{
|
|
5376
5581
|
className: "font-medium text-inherit text-sm",
|
|
@@ -5378,7 +5583,7 @@ var Toast = () => {
|
|
|
5378
5583
|
children: message
|
|
5379
5584
|
}
|
|
5380
5585
|
),
|
|
5381
|
-
/* @__PURE__ */ (0,
|
|
5586
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5382
5587
|
"svg",
|
|
5383
5588
|
{
|
|
5384
5589
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5386,7 +5591,7 @@ var Toast = () => {
|
|
|
5386
5591
|
fill: "none",
|
|
5387
5592
|
viewBox: "0 0 24 24",
|
|
5388
5593
|
stroke: "currentColor",
|
|
5389
|
-
children: /* @__PURE__ */ (0,
|
|
5594
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
5390
5595
|
}
|
|
5391
5596
|
) })
|
|
5392
5597
|
] }) }) });
|
|
@@ -5399,7 +5604,7 @@ init_ToastService();
|
|
|
5399
5604
|
// src/components/NavigationTabsV2.tsx
|
|
5400
5605
|
var import_link3 = __toESM(require("next/link"));
|
|
5401
5606
|
var import_navigation = require("next/navigation");
|
|
5402
|
-
var
|
|
5607
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
5403
5608
|
function resolveRoutePlaceholders(route, params) {
|
|
5404
5609
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
5405
5610
|
const value = params[key];
|
|
@@ -5424,8 +5629,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
5424
5629
|
isActive: tab.isActive
|
|
5425
5630
|
})) || [];
|
|
5426
5631
|
if (mappedTabs.length === 0) return null;
|
|
5427
|
-
return /* @__PURE__ */ (0,
|
|
5428
|
-
return /* @__PURE__ */ (0,
|
|
5632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
5633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5429
5634
|
"div",
|
|
5430
5635
|
{
|
|
5431
5636
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -5438,51 +5643,51 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
5438
5643
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
5439
5644
|
|
|
5440
5645
|
// src/components/dataForm/DataList.tsx
|
|
5441
|
-
var
|
|
5646
|
+
var import_react54 = __toESM(require("react"));
|
|
5442
5647
|
var import_navigation2 = require("next/navigation");
|
|
5443
5648
|
|
|
5444
5649
|
// src/components/dataForm/NoContentView.tsx
|
|
5445
|
-
var
|
|
5446
|
-
var
|
|
5650
|
+
var import_react52 = __toESM(require("react"));
|
|
5651
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5447
5652
|
var NoContentView = (props) => {
|
|
5448
|
-
return /* @__PURE__ */ (0,
|
|
5653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react52.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
5449
5654
|
};
|
|
5450
5655
|
var NoContentView_default = NoContentView;
|
|
5451
5656
|
|
|
5452
5657
|
// src/components/dataForm/ContentView.tsx
|
|
5453
|
-
var
|
|
5454
|
-
var
|
|
5658
|
+
var import_react53 = __toESM(require("react"));
|
|
5659
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
5455
5660
|
var ContentView = (props) => {
|
|
5456
|
-
return /* @__PURE__ */ (0,
|
|
5457
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
5458
|
-
/* @__PURE__ */ (0,
|
|
5459
|
-
/* @__PURE__ */ (0,
|
|
5460
|
-
/* @__PURE__ */ (0,
|
|
5461
|
-
/* @__PURE__ */ (0,
|
|
5462
|
-
/* @__PURE__ */ (0,
|
|
5661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_react53.default.Fragment, { children: [
|
|
5662
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
5663
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
5664
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
5665
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "ml-2", children: [
|
|
5666
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
5667
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
5463
5668
|
] })
|
|
5464
5669
|
] }),
|
|
5465
|
-
/* @__PURE__ */ (0,
|
|
5466
|
-
/* @__PURE__ */ (0,
|
|
5467
|
-
/* @__PURE__ */ (0,
|
|
5468
|
-
/* @__PURE__ */ (0,
|
|
5469
|
-
/* @__PURE__ */ (0,
|
|
5470
|
-
/* @__PURE__ */ (0,
|
|
5471
|
-
/* @__PURE__ */ (0,
|
|
5670
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
5671
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "animate-pulse", children: [
|
|
5672
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5673
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5674
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5675
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5676
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5472
5677
|
] }),
|
|
5473
|
-
/* @__PURE__ */ (0,
|
|
5474
|
-
/* @__PURE__ */ (0,
|
|
5475
|
-
/* @__PURE__ */ (0,
|
|
5476
|
-
/* @__PURE__ */ (0,
|
|
5477
|
-
/* @__PURE__ */ (0,
|
|
5478
|
-
/* @__PURE__ */ (0,
|
|
5678
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "animate-pulse", children: [
|
|
5679
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5680
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5681
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5682
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5683
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5479
5684
|
] }),
|
|
5480
|
-
/* @__PURE__ */ (0,
|
|
5481
|
-
/* @__PURE__ */ (0,
|
|
5482
|
-
/* @__PURE__ */ (0,
|
|
5483
|
-
/* @__PURE__ */ (0,
|
|
5484
|
-
/* @__PURE__ */ (0,
|
|
5485
|
-
/* @__PURE__ */ (0,
|
|
5685
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "animate-pulse", children: [
|
|
5686
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5687
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5688
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5689
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5690
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5486
5691
|
] })
|
|
5487
5692
|
] })
|
|
5488
5693
|
] }) }),
|
|
@@ -5493,7 +5698,7 @@ var ContentView_default = ContentView;
|
|
|
5493
5698
|
|
|
5494
5699
|
// src/components/dataForm/DataList.tsx
|
|
5495
5700
|
init_StyleTypes();
|
|
5496
|
-
var
|
|
5701
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
5497
5702
|
var DataList = (props) => {
|
|
5498
5703
|
console.log(props.dataset, "datasetssssss");
|
|
5499
5704
|
const router = (0, import_navigation2.useRouter)();
|
|
@@ -5502,8 +5707,8 @@ var DataList = (props) => {
|
|
|
5502
5707
|
let activePageNumber = 0;
|
|
5503
5708
|
let pages = 0;
|
|
5504
5709
|
console.log(props.addLinkText);
|
|
5505
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
5506
|
-
(0,
|
|
5710
|
+
const [isDataFound, setIsDataFound] = (0, import_react54.useState)(null);
|
|
5711
|
+
(0, import_react54.useEffect)(() => {
|
|
5507
5712
|
if (props?.dataset) {
|
|
5508
5713
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
5509
5714
|
setIsDataFound(true);
|
|
@@ -5516,7 +5721,7 @@ var DataList = (props) => {
|
|
|
5516
5721
|
if (path.includes(".")) {
|
|
5517
5722
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
5518
5723
|
} else if (Array.isArray(obj[path])) {
|
|
5519
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
5724
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { children: item }, index));
|
|
5520
5725
|
} else {
|
|
5521
5726
|
return obj[path];
|
|
5522
5727
|
}
|
|
@@ -5525,8 +5730,8 @@ var DataList = (props) => {
|
|
|
5525
5730
|
inputValues: {},
|
|
5526
5731
|
lastPropertyChanged: ""
|
|
5527
5732
|
};
|
|
5528
|
-
const [formState, dispatch] = (0,
|
|
5529
|
-
const handleFilterChange = (0,
|
|
5733
|
+
const [formState, dispatch] = (0, import_react54.useReducer)(FormReducer_default, initialState);
|
|
5734
|
+
const handleFilterChange = (0, import_react54.useCallback)(
|
|
5530
5735
|
(updatedValues) => {
|
|
5531
5736
|
dispatch({
|
|
5532
5737
|
type: FORM_INPUT_UPDATE,
|
|
@@ -5572,30 +5777,30 @@ var DataList = (props) => {
|
|
|
5572
5777
|
const renderPageNumbers = () => {
|
|
5573
5778
|
if (pages <= 10) {
|
|
5574
5779
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
5575
|
-
(page) => /* @__PURE__ */ (0,
|
|
5780
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5576
5781
|
Hyperlink,
|
|
5577
5782
|
{
|
|
5578
5783
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5579
5784
|
href: builder.getNewPageUrl(page),
|
|
5580
5785
|
children: page
|
|
5581
5786
|
}
|
|
5582
|
-
) : /* @__PURE__ */ (0,
|
|
5787
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
5583
5788
|
);
|
|
5584
5789
|
} else {
|
|
5585
5790
|
const showFirstPages = activePageNumber <= 5;
|
|
5586
5791
|
const showLastPages = activePageNumber > pages - 5;
|
|
5587
5792
|
if (showFirstPages) {
|
|
5588
|
-
return /* @__PURE__ */ (0,
|
|
5589
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
5793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
5794
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5590
5795
|
Hyperlink,
|
|
5591
5796
|
{
|
|
5592
5797
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5593
5798
|
href: builder.getNewPageUrl(page),
|
|
5594
5799
|
children: page
|
|
5595
5800
|
}
|
|
5596
|
-
) : /* @__PURE__ */ (0,
|
|
5597
|
-
/* @__PURE__ */ (0,
|
|
5598
|
-
/* @__PURE__ */ (0,
|
|
5801
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
5802
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
5803
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5599
5804
|
Hyperlink,
|
|
5600
5805
|
{
|
|
5601
5806
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5603,7 +5808,7 @@ var DataList = (props) => {
|
|
|
5603
5808
|
children: pages - 1
|
|
5604
5809
|
}
|
|
5605
5810
|
),
|
|
5606
|
-
/* @__PURE__ */ (0,
|
|
5811
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5607
5812
|
Hyperlink,
|
|
5608
5813
|
{
|
|
5609
5814
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5611,7 +5816,7 @@ var DataList = (props) => {
|
|
|
5611
5816
|
children: pages
|
|
5612
5817
|
}
|
|
5613
5818
|
),
|
|
5614
|
-
/* @__PURE__ */ (0,
|
|
5819
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5615
5820
|
"select",
|
|
5616
5821
|
{
|
|
5617
5822
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -5623,18 +5828,18 @@ var DataList = (props) => {
|
|
|
5623
5828
|
}
|
|
5624
5829
|
},
|
|
5625
5830
|
children: [
|
|
5626
|
-
/* @__PURE__ */ (0,
|
|
5831
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
5627
5832
|
Array.from(
|
|
5628
5833
|
{ length: Math.max(0, pages - 10) },
|
|
5629
5834
|
(_, index) => index + 9
|
|
5630
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
5835
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("option", { value: page, children: page }, page))
|
|
5631
5836
|
]
|
|
5632
5837
|
}
|
|
5633
5838
|
) })
|
|
5634
5839
|
] });
|
|
5635
5840
|
} else if (showLastPages) {
|
|
5636
|
-
return /* @__PURE__ */ (0,
|
|
5637
|
-
/* @__PURE__ */ (0,
|
|
5841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
5842
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5638
5843
|
Hyperlink,
|
|
5639
5844
|
{
|
|
5640
5845
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5642,7 +5847,7 @@ var DataList = (props) => {
|
|
|
5642
5847
|
children: "1"
|
|
5643
5848
|
}
|
|
5644
5849
|
),
|
|
5645
|
-
/* @__PURE__ */ (0,
|
|
5850
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5646
5851
|
Hyperlink,
|
|
5647
5852
|
{
|
|
5648
5853
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5650,21 +5855,21 @@ var DataList = (props) => {
|
|
|
5650
5855
|
children: "2"
|
|
5651
5856
|
}
|
|
5652
5857
|
),
|
|
5653
|
-
/* @__PURE__ */ (0,
|
|
5858
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
5654
5859
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
5655
|
-
(page) => /* @__PURE__ */ (0,
|
|
5860
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5656
5861
|
Hyperlink,
|
|
5657
5862
|
{
|
|
5658
5863
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5659
5864
|
href: builder.getNewPageUrl(page),
|
|
5660
5865
|
children: page
|
|
5661
5866
|
}
|
|
5662
|
-
) : /* @__PURE__ */ (0,
|
|
5867
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
5663
5868
|
)
|
|
5664
5869
|
] });
|
|
5665
5870
|
} else {
|
|
5666
|
-
return /* @__PURE__ */ (0,
|
|
5667
|
-
/* @__PURE__ */ (0,
|
|
5871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
5872
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5668
5873
|
Hyperlink,
|
|
5669
5874
|
{
|
|
5670
5875
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5672,7 +5877,7 @@ var DataList = (props) => {
|
|
|
5672
5877
|
children: "1"
|
|
5673
5878
|
}
|
|
5674
5879
|
),
|
|
5675
|
-
/* @__PURE__ */ (0,
|
|
5880
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5676
5881
|
Hyperlink,
|
|
5677
5882
|
{
|
|
5678
5883
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5680,20 +5885,20 @@ var DataList = (props) => {
|
|
|
5680
5885
|
children: "2"
|
|
5681
5886
|
}
|
|
5682
5887
|
),
|
|
5683
|
-
/* @__PURE__ */ (0,
|
|
5888
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
5684
5889
|
Array.from(
|
|
5685
5890
|
{ length: 5 },
|
|
5686
5891
|
(_, index) => activePageNumber - 2 + index
|
|
5687
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
5892
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5688
5893
|
Hyperlink,
|
|
5689
5894
|
{
|
|
5690
5895
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5691
5896
|
href: builder.getNewPageUrl(page),
|
|
5692
5897
|
children: page
|
|
5693
5898
|
}
|
|
5694
|
-
) : /* @__PURE__ */ (0,
|
|
5695
|
-
/* @__PURE__ */ (0,
|
|
5696
|
-
/* @__PURE__ */ (0,
|
|
5899
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
5900
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
5901
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5697
5902
|
Hyperlink,
|
|
5698
5903
|
{
|
|
5699
5904
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5701,7 +5906,7 @@ var DataList = (props) => {
|
|
|
5701
5906
|
children: pages - 1
|
|
5702
5907
|
}
|
|
5703
5908
|
),
|
|
5704
|
-
/* @__PURE__ */ (0,
|
|
5909
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5705
5910
|
Hyperlink,
|
|
5706
5911
|
{
|
|
5707
5912
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5709,7 +5914,7 @@ var DataList = (props) => {
|
|
|
5709
5914
|
children: pages
|
|
5710
5915
|
}
|
|
5711
5916
|
),
|
|
5712
|
-
/* @__PURE__ */ (0,
|
|
5917
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5713
5918
|
"select",
|
|
5714
5919
|
{
|
|
5715
5920
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -5721,8 +5926,8 @@ var DataList = (props) => {
|
|
|
5721
5926
|
}
|
|
5722
5927
|
},
|
|
5723
5928
|
children: [
|
|
5724
|
-
/* @__PURE__ */ (0,
|
|
5725
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
5929
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("option", { value: "", children: "Jump to" }),
|
|
5930
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("option", { value: page, children: page }, page))
|
|
5726
5931
|
]
|
|
5727
5932
|
}
|
|
5728
5933
|
) })
|
|
@@ -5730,16 +5935,16 @@ var DataList = (props) => {
|
|
|
5730
5935
|
}
|
|
5731
5936
|
}
|
|
5732
5937
|
};
|
|
5733
|
-
return /* @__PURE__ */ (0,
|
|
5734
|
-
/* @__PURE__ */ (0,
|
|
5735
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
5938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_react54.default.Fragment, { children: [
|
|
5939
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(ContentView_default, { isDataFound, children: [
|
|
5940
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5736
5941
|
"div",
|
|
5737
5942
|
{
|
|
5738
5943
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200 sticky top-0`,
|
|
5739
5944
|
children: [
|
|
5740
|
-
props.title ? /* @__PURE__ */ (0,
|
|
5741
|
-
/* @__PURE__ */ (0,
|
|
5742
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
5945
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", {}),
|
|
5946
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
5947
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5743
5948
|
InputControl_default,
|
|
5744
5949
|
{
|
|
5745
5950
|
name: filter.name,
|
|
@@ -5754,15 +5959,15 @@ var DataList = (props) => {
|
|
|
5754
5959
|
},
|
|
5755
5960
|
filter.name
|
|
5756
5961
|
)),
|
|
5757
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
5962
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5758
5963
|
Hyperlink,
|
|
5759
5964
|
{
|
|
5760
5965
|
className: "gap-1",
|
|
5761
5966
|
linkType: "Primary" /* Solid */,
|
|
5762
5967
|
href: props.addLinkHref,
|
|
5763
5968
|
children: [
|
|
5764
|
-
/* @__PURE__ */ (0,
|
|
5765
|
-
/* @__PURE__ */ (0,
|
|
5969
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
5970
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
5766
5971
|
]
|
|
5767
5972
|
}
|
|
5768
5973
|
)
|
|
@@ -5770,8 +5975,8 @@ var DataList = (props) => {
|
|
|
5770
5975
|
]
|
|
5771
5976
|
}
|
|
5772
5977
|
),
|
|
5773
|
-
/* @__PURE__ */ (0,
|
|
5774
|
-
/* @__PURE__ */ (0,
|
|
5978
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
5979
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
5775
5980
|
let url = builder.getNewOrderByUrl(column.name);
|
|
5776
5981
|
let icon = "chevronUpDown";
|
|
5777
5982
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -5781,36 +5986,36 @@ var DataList = (props) => {
|
|
|
5781
5986
|
icon = "chevronUp";
|
|
5782
5987
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
5783
5988
|
}
|
|
5784
|
-
return /* @__PURE__ */ (0,
|
|
5989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5785
5990
|
"th",
|
|
5786
5991
|
{
|
|
5787
5992
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
5788
|
-
children: /* @__PURE__ */ (0,
|
|
5789
|
-
/* @__PURE__ */ (0,
|
|
5790
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
5993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
5994
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-black", children: column.label }),
|
|
5995
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
5791
5996
|
] }) })
|
|
5792
5997
|
},
|
|
5793
5998
|
column.name
|
|
5794
5999
|
);
|
|
5795
6000
|
}) }) }),
|
|
5796
|
-
/* @__PURE__ */ (0,
|
|
6001
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
5797
6002
|
let validityClass = "";
|
|
5798
6003
|
console.log("dataitem", dataitem);
|
|
5799
6004
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
5800
6005
|
validityClass = "bg-alert-200";
|
|
5801
6006
|
}
|
|
5802
|
-
return /* @__PURE__ */ (0,
|
|
6007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
5803
6008
|
console.log("column", column);
|
|
5804
|
-
return /* @__PURE__ */ (0,
|
|
6009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5805
6010
|
"td",
|
|
5806
6011
|
{
|
|
5807
6012
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
5808
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
6013
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5809
6014
|
Hyperlink,
|
|
5810
6015
|
{
|
|
5811
6016
|
className: "",
|
|
5812
6017
|
href: `https://${dataitem[column.name]}`,
|
|
5813
|
-
children: /* @__PURE__ */ (0,
|
|
6018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5814
6019
|
ViewControl_default,
|
|
5815
6020
|
{
|
|
5816
6021
|
controlType: column.controlType,
|
|
@@ -5823,11 +6028,11 @@ var DataList = (props) => {
|
|
|
5823
6028
|
}
|
|
5824
6029
|
)
|
|
5825
6030
|
}
|
|
5826
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
6031
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5827
6032
|
Hyperlink,
|
|
5828
6033
|
{
|
|
5829
6034
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
5830
|
-
children: /* @__PURE__ */ (0,
|
|
6035
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5831
6036
|
ViewControl_default,
|
|
5832
6037
|
{
|
|
5833
6038
|
controlType: column.controlType,
|
|
@@ -5837,7 +6042,7 @@ var DataList = (props) => {
|
|
|
5837
6042
|
}
|
|
5838
6043
|
)
|
|
5839
6044
|
}
|
|
5840
|
-
) : /* @__PURE__ */ (0,
|
|
6045
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5841
6046
|
ViewControl_default,
|
|
5842
6047
|
{
|
|
5843
6048
|
controlType: column.controlType,
|
|
@@ -5851,10 +6056,10 @@ var DataList = (props) => {
|
|
|
5851
6056
|
}) }, index);
|
|
5852
6057
|
}) })
|
|
5853
6058
|
] }) }),
|
|
5854
|
-
/* @__PURE__ */ (0,
|
|
5855
|
-
/* @__PURE__ */ (0,
|
|
5856
|
-
/* @__PURE__ */ (0,
|
|
5857
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
6059
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
6060
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "text-gray-700", children: label }),
|
|
6061
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
6062
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5858
6063
|
Hyperlink,
|
|
5859
6064
|
{
|
|
5860
6065
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -5862,9 +6067,9 @@ var DataList = (props) => {
|
|
|
5862
6067
|
children: "Prev"
|
|
5863
6068
|
}
|
|
5864
6069
|
),
|
|
5865
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
6070
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "px-3 py-1 rounded-l-md border border-gray-300 bg-gray-200 text-gray-500 hover:bg-gray-200", children: "Prev" }),
|
|
5866
6071
|
renderPageNumbers(),
|
|
5867
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
6072
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5868
6073
|
Hyperlink,
|
|
5869
6074
|
{
|
|
5870
6075
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -5872,19 +6077,19 @@ var DataList = (props) => {
|
|
|
5872
6077
|
children: "Next"
|
|
5873
6078
|
}
|
|
5874
6079
|
),
|
|
5875
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
6080
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
5876
6081
|
] })
|
|
5877
6082
|
] }) })
|
|
5878
6083
|
] }),
|
|
5879
|
-
/* @__PURE__ */ (0,
|
|
5880
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
6084
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
6085
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5881
6086
|
"div",
|
|
5882
6087
|
{
|
|
5883
6088
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200`,
|
|
5884
6089
|
children: [
|
|
5885
|
-
props.title ? /* @__PURE__ */ (0,
|
|
5886
|
-
/* @__PURE__ */ (0,
|
|
5887
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
6090
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", {}),
|
|
6091
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6092
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5888
6093
|
InputControl_default,
|
|
5889
6094
|
{
|
|
5890
6095
|
name: filter.name,
|
|
@@ -5899,15 +6104,15 @@ var DataList = (props) => {
|
|
|
5899
6104
|
},
|
|
5900
6105
|
filter.name
|
|
5901
6106
|
)),
|
|
5902
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
6107
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5903
6108
|
Hyperlink,
|
|
5904
6109
|
{
|
|
5905
6110
|
className: "gap-1",
|
|
5906
6111
|
linkType: "Primary" /* Solid */,
|
|
5907
6112
|
href: props.addLinkHref,
|
|
5908
6113
|
children: [
|
|
5909
|
-
/* @__PURE__ */ (0,
|
|
5910
|
-
/* @__PURE__ */ (0,
|
|
6114
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
6115
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
5911
6116
|
]
|
|
5912
6117
|
}
|
|
5913
6118
|
)
|
|
@@ -5915,8 +6120,8 @@ var DataList = (props) => {
|
|
|
5915
6120
|
]
|
|
5916
6121
|
}
|
|
5917
6122
|
),
|
|
5918
|
-
/* @__PURE__ */ (0,
|
|
5919
|
-
/* @__PURE__ */ (0,
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
6124
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
5920
6125
|
let url = builder.getNewOrderByUrl(column.name);
|
|
5921
6126
|
let icon = "chevronUpDown";
|
|
5922
6127
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -5926,19 +6131,19 @@ var DataList = (props) => {
|
|
|
5926
6131
|
icon = "chevronUp";
|
|
5927
6132
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
5928
6133
|
}
|
|
5929
|
-
return /* @__PURE__ */ (0,
|
|
6134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5930
6135
|
"th",
|
|
5931
6136
|
{
|
|
5932
6137
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
5933
|
-
children: /* @__PURE__ */ (0,
|
|
5934
|
-
/* @__PURE__ */ (0,
|
|
5935
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
6138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
6139
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: column.label }),
|
|
6140
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
5936
6141
|
] }) })
|
|
5937
6142
|
},
|
|
5938
6143
|
column.name
|
|
5939
6144
|
);
|
|
5940
6145
|
}) }) }) }) }),
|
|
5941
|
-
/* @__PURE__ */ (0,
|
|
6146
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
5942
6147
|
] })
|
|
5943
6148
|
] })
|
|
5944
6149
|
] });
|
|
@@ -5946,10 +6151,10 @@ var DataList = (props) => {
|
|
|
5946
6151
|
var DataList_default = DataList;
|
|
5947
6152
|
|
|
5948
6153
|
// src/components/dataForm/DataListRenderer.tsx
|
|
5949
|
-
var
|
|
6154
|
+
var import_react55 = __toESM(require("react"));
|
|
5950
6155
|
init_ServiceClient();
|
|
5951
6156
|
var import_navigation3 = require("next/navigation");
|
|
5952
|
-
var
|
|
6157
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
5953
6158
|
var viewControlMap = {
|
|
5954
6159
|
number: ViewControlTypes.number,
|
|
5955
6160
|
lineText: ViewControlTypes.lineText,
|
|
@@ -6003,14 +6208,14 @@ var DataListRenderer = ({
|
|
|
6003
6208
|
widgetProps
|
|
6004
6209
|
}) => {
|
|
6005
6210
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
6006
|
-
const [columns, setColumns] = (0,
|
|
6007
|
-
const [dataset, setDataset] = (0,
|
|
6008
|
-
const [filter, setFilters] = (0,
|
|
6009
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
6010
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
6011
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
6211
|
+
const [columns, setColumns] = (0, import_react55.useState)([]);
|
|
6212
|
+
const [dataset, setDataset] = (0, import_react55.useState)();
|
|
6213
|
+
const [filter, setFilters] = (0, import_react55.useState)([]);
|
|
6214
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react55.useState)("");
|
|
6215
|
+
const [addLinkText, setAddLinkText] = (0, import_react55.useState)("");
|
|
6216
|
+
const [serviceRoute, setServiceRoute] = (0, import_react55.useState)("");
|
|
6012
6217
|
const pathname = (0, import_navigation3.usePathname)();
|
|
6013
|
-
(0,
|
|
6218
|
+
(0, import_react55.useEffect)(() => {
|
|
6014
6219
|
if (!formDefinition) return;
|
|
6015
6220
|
setColumns(mapApiToColumns(formDefinition));
|
|
6016
6221
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -6023,7 +6228,7 @@ var DataListRenderer = ({
|
|
|
6023
6228
|
setAddLinkHref(resolvedAddLinkHref);
|
|
6024
6229
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
6025
6230
|
}, [formDefinition, params]);
|
|
6026
|
-
(0,
|
|
6231
|
+
(0, import_react55.useEffect)(() => {
|
|
6027
6232
|
const fetchData = async () => {
|
|
6028
6233
|
if (!serviceRoute) return;
|
|
6029
6234
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -6035,12 +6240,12 @@ var DataListRenderer = ({
|
|
|
6035
6240
|
};
|
|
6036
6241
|
fetchData();
|
|
6037
6242
|
}, [serviceRoute, query, params]);
|
|
6038
|
-
const [tabItem, setTabItem] = (0,
|
|
6243
|
+
const [tabItem, setTabItem] = (0, import_react55.useState)();
|
|
6039
6244
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
6040
6245
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
6041
|
-
return /* @__PURE__ */ (0,
|
|
6042
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
6043
|
-
/* @__PURE__ */ (0,
|
|
6246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_react55.default.Fragment, { children: [
|
|
6247
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
6248
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6044
6249
|
DataList_default,
|
|
6045
6250
|
{
|
|
6046
6251
|
addLinkHref,
|
|
@@ -6059,12 +6264,12 @@ var DataListRenderer = ({
|
|
|
6059
6264
|
var DataListRenderer_default = DataListRenderer;
|
|
6060
6265
|
|
|
6061
6266
|
// src/components/dataForm/DataForm.tsx
|
|
6062
|
-
var
|
|
6267
|
+
var import_react57 = __toESM(require("react"));
|
|
6063
6268
|
init_Button();
|
|
6064
6269
|
init_StyleTypes();
|
|
6065
6270
|
|
|
6066
6271
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
6067
|
-
var
|
|
6272
|
+
var import_react56 = __toESM(require("react"));
|
|
6068
6273
|
|
|
6069
6274
|
// src/components/dataForm/StyleTypes.tsx
|
|
6070
6275
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -6090,7 +6295,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
6090
6295
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
6091
6296
|
|
|
6092
6297
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
6093
|
-
var
|
|
6298
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6094
6299
|
var DataFormChildSection = (props) => {
|
|
6095
6300
|
const { section } = props;
|
|
6096
6301
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -6102,7 +6307,7 @@ var DataFormChildSection = (props) => {
|
|
|
6102
6307
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
6103
6308
|
};
|
|
6104
6309
|
const childItemsToRender = getChildItemsForRendering();
|
|
6105
|
-
const handleChildInputChange = (0,
|
|
6310
|
+
const handleChildInputChange = (0, import_react56.useCallback)(
|
|
6106
6311
|
(updatedValues) => {
|
|
6107
6312
|
if (isOneToOne) {
|
|
6108
6313
|
props.callback({
|
|
@@ -6129,7 +6334,7 @@ var DataFormChildSection = (props) => {
|
|
|
6129
6334
|
},
|
|
6130
6335
|
[props, isOneToOne, childItemsToRender]
|
|
6131
6336
|
);
|
|
6132
|
-
const onAddRow = (0,
|
|
6337
|
+
const onAddRow = (0, import_react56.useCallback)(() => {
|
|
6133
6338
|
props.callback({
|
|
6134
6339
|
sectionName: props.section.name,
|
|
6135
6340
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -6138,7 +6343,7 @@ var DataFormChildSection = (props) => {
|
|
|
6138
6343
|
rowIndex: -1
|
|
6139
6344
|
});
|
|
6140
6345
|
}, [props]);
|
|
6141
|
-
const onDeleteRow = (0,
|
|
6346
|
+
const onDeleteRow = (0, import_react56.useCallback)(
|
|
6142
6347
|
(filteredIndex) => {
|
|
6143
6348
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
6144
6349
|
if (visibleItem) {
|
|
@@ -6158,14 +6363,14 @@ var DataFormChildSection = (props) => {
|
|
|
6158
6363
|
childItemsToRender,
|
|
6159
6364
|
allChildItems: childItems
|
|
6160
6365
|
});
|
|
6161
|
-
return /* @__PURE__ */ (0,
|
|
6162
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
6163
|
-
/* @__PURE__ */ (0,
|
|
6164
|
-
/* @__PURE__ */ (0,
|
|
6165
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
6166
|
-
return /* @__PURE__ */ (0,
|
|
6366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
6367
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
6368
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
6369
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
6370
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
6371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("tr", { className: "", children: [
|
|
6167
6372
|
sectionRow.elements.map((field, index) => {
|
|
6168
|
-
return /* @__PURE__ */ (0,
|
|
6373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6169
6374
|
"th",
|
|
6170
6375
|
{
|
|
6171
6376
|
className: "py-3 font-normal text-left",
|
|
@@ -6174,21 +6379,21 @@ var DataFormChildSection = (props) => {
|
|
|
6174
6379
|
field.name
|
|
6175
6380
|
);
|
|
6176
6381
|
}),
|
|
6177
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
6382
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
6178
6383
|
] }, sectionRowIndex);
|
|
6179
6384
|
}) }),
|
|
6180
|
-
/* @__PURE__ */ (0,
|
|
6385
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
6181
6386
|
const { item, originalIndex } = visibleItem;
|
|
6182
6387
|
const rowKey = originalIndex;
|
|
6183
|
-
return /* @__PURE__ */ (0,
|
|
6388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react56.default.Fragment, { children: section.sectionRows.map(
|
|
6184
6389
|
(sectionRow, sectionRowIndex) => {
|
|
6185
|
-
return /* @__PURE__ */ (0,
|
|
6390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
6186
6391
|
"tr",
|
|
6187
6392
|
{
|
|
6188
6393
|
className: "",
|
|
6189
6394
|
children: [
|
|
6190
6395
|
sectionRow.elements.map((field, index) => {
|
|
6191
|
-
return /* @__PURE__ */ (0,
|
|
6396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6192
6397
|
InputControl_default,
|
|
6193
6398
|
{
|
|
6194
6399
|
index: filteredIndex,
|
|
@@ -6208,7 +6413,7 @@ var DataFormChildSection = (props) => {
|
|
|
6208
6413
|
}
|
|
6209
6414
|
) }) }) }, field.name);
|
|
6210
6415
|
}),
|
|
6211
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
6416
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6212
6417
|
ClientButton_default,
|
|
6213
6418
|
{
|
|
6214
6419
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -6217,7 +6422,7 @@ var DataFormChildSection = (props) => {
|
|
|
6217
6422
|
},
|
|
6218
6423
|
dataRole: "delete",
|
|
6219
6424
|
tabIndex: -1,
|
|
6220
|
-
children: /* @__PURE__ */ (0,
|
|
6425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6221
6426
|
Icon_default,
|
|
6222
6427
|
{
|
|
6223
6428
|
className: "w-4 h-4",
|
|
@@ -6234,7 +6439,7 @@ var DataFormChildSection = (props) => {
|
|
|
6234
6439
|
) }, rowKey);
|
|
6235
6440
|
}) })
|
|
6236
6441
|
] }) }),
|
|
6237
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
6442
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6238
6443
|
ClientButton_default,
|
|
6239
6444
|
{
|
|
6240
6445
|
ButtonType: "Link" /* Link */,
|
|
@@ -6249,9 +6454,9 @@ var DataFormChildSection = (props) => {
|
|
|
6249
6454
|
var DataFormChildSection_default = DataFormChildSection;
|
|
6250
6455
|
|
|
6251
6456
|
// src/components/dataForm/DataForm.tsx
|
|
6252
|
-
var
|
|
6457
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6253
6458
|
var DataForm = (props) => {
|
|
6254
|
-
const formRef = (0,
|
|
6459
|
+
const formRef = (0, import_react57.useRef)(null);
|
|
6255
6460
|
console.log(props.dataItem, "dssads");
|
|
6256
6461
|
const initialState = {
|
|
6257
6462
|
inputValues: {},
|
|
@@ -6260,9 +6465,9 @@ var DataForm = (props) => {
|
|
|
6260
6465
|
const childInitialState = {
|
|
6261
6466
|
inputValues: []
|
|
6262
6467
|
};
|
|
6263
|
-
const [formState, dispatch] = (0,
|
|
6468
|
+
const [formState, dispatch] = (0, import_react57.useReducer)(FormReducer_default, initialState);
|
|
6264
6469
|
console.log(props.sections, "sections");
|
|
6265
|
-
const clearHiddenChildSections = (0,
|
|
6470
|
+
const clearHiddenChildSections = (0, import_react57.useCallback)(
|
|
6266
6471
|
(changedProperty, newValues) => {
|
|
6267
6472
|
if (!props.sections) return;
|
|
6268
6473
|
const allChildSections = [];
|
|
@@ -6300,7 +6505,7 @@ var DataForm = (props) => {
|
|
|
6300
6505
|
},
|
|
6301
6506
|
[props.sections, formState.inputValues]
|
|
6302
6507
|
);
|
|
6303
|
-
const handleInputChange = (0,
|
|
6508
|
+
const handleInputChange = (0, import_react57.useCallback)(
|
|
6304
6509
|
async (updatedValues) => {
|
|
6305
6510
|
dispatch({
|
|
6306
6511
|
type: FORM_INPUT_UPDATE,
|
|
@@ -6315,7 +6520,7 @@ var DataForm = (props) => {
|
|
|
6315
6520
|
},
|
|
6316
6521
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
6317
6522
|
);
|
|
6318
|
-
const fetchData = (0,
|
|
6523
|
+
const fetchData = (0, import_react57.useCallback)(async () => {
|
|
6319
6524
|
if (!props.rules) return;
|
|
6320
6525
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
6321
6526
|
return;
|
|
@@ -6346,7 +6551,7 @@ var DataForm = (props) => {
|
|
|
6346
6551
|
console.error("Error fetching data:", error);
|
|
6347
6552
|
}
|
|
6348
6553
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
6349
|
-
(0,
|
|
6554
|
+
(0, import_react57.useEffect)(() => {
|
|
6350
6555
|
fetchData();
|
|
6351
6556
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
6352
6557
|
function replacePlaceholders(template, context, params) {
|
|
@@ -6366,7 +6571,7 @@ var DataForm = (props) => {
|
|
|
6366
6571
|
}
|
|
6367
6572
|
);
|
|
6368
6573
|
}
|
|
6369
|
-
const handleChildSectionChangeCallback = (0,
|
|
6574
|
+
const handleChildSectionChangeCallback = (0, import_react57.useCallback)(
|
|
6370
6575
|
(params) => {
|
|
6371
6576
|
dispatch({
|
|
6372
6577
|
type: params.actionType,
|
|
@@ -6411,7 +6616,7 @@ var DataForm = (props) => {
|
|
|
6411
6616
|
});
|
|
6412
6617
|
return cloned;
|
|
6413
6618
|
}
|
|
6414
|
-
const onClick = (0,
|
|
6619
|
+
const onClick = (0, import_react57.useCallback)(async () => {
|
|
6415
6620
|
if (props.onClick) {
|
|
6416
6621
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
6417
6622
|
const normalizedValues = normalizeChildSections(
|
|
@@ -6427,21 +6632,21 @@ var DataForm = (props) => {
|
|
|
6427
6632
|
return { isSuccessful: true };
|
|
6428
6633
|
}
|
|
6429
6634
|
}, [formState, props]);
|
|
6430
|
-
const handleAdditionalOnClick = (0,
|
|
6635
|
+
const handleAdditionalOnClick = (0, import_react57.useCallback)(async () => {
|
|
6431
6636
|
if (props.additionalActions?.onClick) {
|
|
6432
6637
|
return await props.additionalActions.onClick(formState);
|
|
6433
6638
|
} else {
|
|
6434
6639
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
6435
6640
|
}
|
|
6436
6641
|
}, [formState, props]);
|
|
6437
|
-
const onDelete = (0,
|
|
6642
|
+
const onDelete = (0, import_react57.useCallback)(async () => {
|
|
6438
6643
|
if (props.onDelete) {
|
|
6439
6644
|
return await props.onDelete(formState);
|
|
6440
6645
|
} else {
|
|
6441
6646
|
return { isSuccessful: true };
|
|
6442
6647
|
}
|
|
6443
6648
|
}, [formState, props]);
|
|
6444
|
-
(0,
|
|
6649
|
+
(0, import_react57.useEffect)(() => {
|
|
6445
6650
|
if (props.dataItem) {
|
|
6446
6651
|
dispatch({
|
|
6447
6652
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -6469,19 +6674,19 @@ var DataForm = (props) => {
|
|
|
6469
6674
|
return false;
|
|
6470
6675
|
}
|
|
6471
6676
|
}
|
|
6472
|
-
return /* @__PURE__ */ (0,
|
|
6473
|
-
props.title && /* @__PURE__ */ (0,
|
|
6677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
6678
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6474
6679
|
"div",
|
|
6475
6680
|
{
|
|
6476
6681
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
6477
6682
|
onClick: () => window.history.back(),
|
|
6478
6683
|
children: [
|
|
6479
|
-
/* @__PURE__ */ (0,
|
|
6480
|
-
/* @__PURE__ */ (0,
|
|
6684
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
6685
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
6481
6686
|
]
|
|
6482
6687
|
}
|
|
6483
6688
|
) }),
|
|
6484
|
-
/* @__PURE__ */ (0,
|
|
6689
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6485
6690
|
"form",
|
|
6486
6691
|
{
|
|
6487
6692
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -6502,8 +6707,8 @@ var DataForm = (props) => {
|
|
|
6502
6707
|
}
|
|
6503
6708
|
}
|
|
6504
6709
|
},
|
|
6505
|
-
children: /* @__PURE__ */ (0,
|
|
6506
|
-
return /* @__PURE__ */ (0,
|
|
6710
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
6711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react57.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
6507
6712
|
section.sectionRows?.map(
|
|
6508
6713
|
(sectionRow, sectionRowIndex) => {
|
|
6509
6714
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -6514,14 +6719,14 @@ var DataForm = (props) => {
|
|
|
6514
6719
|
sectionRow.visible
|
|
6515
6720
|
);
|
|
6516
6721
|
}
|
|
6517
|
-
return /* @__PURE__ */ (0,
|
|
6518
|
-
return /* @__PURE__ */ (0,
|
|
6722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react57.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
6723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6519
6724
|
"div",
|
|
6520
6725
|
{
|
|
6521
6726
|
className: sectionRow.grow ? "grow" : "",
|
|
6522
6727
|
children: [
|
|
6523
|
-
/* @__PURE__ */ (0,
|
|
6524
|
-
/* @__PURE__ */ (0,
|
|
6728
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: field.controlType }),
|
|
6729
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6525
6730
|
InputControl_default,
|
|
6526
6731
|
{
|
|
6527
6732
|
name: field.name,
|
|
@@ -6551,12 +6756,12 @@ var DataForm = (props) => {
|
|
|
6551
6756
|
}) }) }, sectionRowIndex);
|
|
6552
6757
|
}
|
|
6553
6758
|
),
|
|
6554
|
-
/* @__PURE__ */ (0,
|
|
6759
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: section.childSections?.map(
|
|
6555
6760
|
(childSection, childSectionIndex) => {
|
|
6556
|
-
return /* @__PURE__ */ (0,
|
|
6761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
6557
6762
|
formState.inputValues,
|
|
6558
6763
|
childSection.visible
|
|
6559
|
-
) && /* @__PURE__ */ (0,
|
|
6764
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6560
6765
|
DataFormChildSection_default,
|
|
6561
6766
|
{
|
|
6562
6767
|
section: childSection,
|
|
@@ -6571,8 +6776,8 @@ var DataForm = (props) => {
|
|
|
6571
6776
|
}) })
|
|
6572
6777
|
}
|
|
6573
6778
|
),
|
|
6574
|
-
/* @__PURE__ */ (0,
|
|
6575
|
-
/* @__PURE__ */ (0,
|
|
6779
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
6780
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6576
6781
|
Button_default,
|
|
6577
6782
|
{
|
|
6578
6783
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -6580,7 +6785,7 @@ var DataForm = (props) => {
|
|
|
6580
6785
|
children: props.additionalActions.title
|
|
6581
6786
|
}
|
|
6582
6787
|
) }),
|
|
6583
|
-
/* @__PURE__ */ (0,
|
|
6788
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6584
6789
|
Button_default,
|
|
6585
6790
|
{
|
|
6586
6791
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -6591,7 +6796,7 @@ var DataForm = (props) => {
|
|
|
6591
6796
|
children: "Delete"
|
|
6592
6797
|
}
|
|
6593
6798
|
) }),
|
|
6594
|
-
/* @__PURE__ */ (0,
|
|
6799
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6595
6800
|
Button_default,
|
|
6596
6801
|
{
|
|
6597
6802
|
onValidate,
|
|
@@ -6609,7 +6814,7 @@ var DataForm_default = DataForm;
|
|
|
6609
6814
|
|
|
6610
6815
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
6611
6816
|
init_ServiceClient();
|
|
6612
|
-
var
|
|
6817
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6613
6818
|
function getAction(actions, code) {
|
|
6614
6819
|
return actions?.find((a) => a.actionCode === code);
|
|
6615
6820
|
}
|
|
@@ -6635,9 +6840,9 @@ var DataFormRenderer = ({
|
|
|
6635
6840
|
"Delete"
|
|
6636
6841
|
);
|
|
6637
6842
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
6638
|
-
return /* @__PURE__ */ (0,
|
|
6639
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
6640
|
-
/* @__PURE__ */ (0,
|
|
6843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
6844
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
6845
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6641
6846
|
DataForm_default,
|
|
6642
6847
|
{
|
|
6643
6848
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|