@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260427052110 → 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 +784 -584
- package/dist/index.mjs +649 -449
- package/package.json +1 -1
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()}`,
|
|
@@ -4531,10 +4779,10 @@ var PathUtility = class {
|
|
|
4531
4779
|
var PathUtility_default = new PathUtility();
|
|
4532
4780
|
|
|
4533
4781
|
// src/components/NoDataFound.tsx
|
|
4534
|
-
var
|
|
4782
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4535
4783
|
var NoDataFound = () => {
|
|
4536
|
-
return /* @__PURE__ */ (0,
|
|
4537
|
-
/* @__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)(
|
|
4538
4786
|
"svg",
|
|
4539
4787
|
{
|
|
4540
4788
|
className: "w-10 h-10",
|
|
@@ -4542,7 +4790,7 @@ var NoDataFound = () => {
|
|
|
4542
4790
|
stroke: "currentColor",
|
|
4543
4791
|
viewBox: "0 0 24 24",
|
|
4544
4792
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4545
|
-
children: /* @__PURE__ */ (0,
|
|
4793
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4546
4794
|
"path",
|
|
4547
4795
|
{
|
|
4548
4796
|
strokeLinecap: "round",
|
|
@@ -4553,70 +4801,19 @@ var NoDataFound = () => {
|
|
|
4553
4801
|
)
|
|
4554
4802
|
}
|
|
4555
4803
|
) }) }),
|
|
4556
|
-
/* @__PURE__ */ (0,
|
|
4557
|
-
/* @__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." })
|
|
4558
4806
|
] });
|
|
4559
4807
|
};
|
|
4560
4808
|
var NoDataFound_default = NoDataFound;
|
|
4561
4809
|
|
|
4562
4810
|
// src/components/Pagination.tsx
|
|
4563
|
-
var
|
|
4564
|
-
|
|
4565
|
-
// src/svg/chevron-updown.tsx
|
|
4566
|
-
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4567
|
-
var ChevronUpDown = (props) => {
|
|
4568
|
-
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" }) });
|
|
4569
|
-
};
|
|
4570
|
-
var chevron_updown_default = ChevronUpDown;
|
|
4571
|
-
|
|
4572
|
-
// src/svg/chevron-down.tsx
|
|
4573
|
-
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4574
|
-
var ChevronDown = (props) => {
|
|
4575
|
-
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" }) });
|
|
4576
|
-
};
|
|
4577
|
-
var chevron_down_default = ChevronDown;
|
|
4578
|
-
|
|
4579
|
-
// src/svg/chevron-up.tsx
|
|
4580
|
-
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4581
|
-
var ChevronUp = (props) => {
|
|
4582
|
-
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" }) });
|
|
4583
|
-
};
|
|
4584
|
-
var chevron_up_default = ChevronUp;
|
|
4585
|
-
|
|
4586
|
-
// src/svg/plus.tsx
|
|
4587
|
-
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4588
|
-
var Plus = (props) => {
|
|
4589
|
-
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" }) });
|
|
4590
|
-
};
|
|
4591
|
-
var plus_default = Plus;
|
|
4592
|
-
|
|
4593
|
-
// src/svg/Icons.tsx
|
|
4594
|
-
var Icons = {
|
|
4595
|
-
chevronUpDown: chevron_updown_default,
|
|
4596
|
-
chevronDown: chevron_down_default,
|
|
4597
|
-
chevronUp: chevron_up_default,
|
|
4598
|
-
plus: plus_default
|
|
4599
|
-
};
|
|
4600
|
-
var Icons_default = Icons;
|
|
4601
|
-
|
|
4602
|
-
// src/svg/Icon.tsx
|
|
4603
|
-
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4604
|
-
var Icon = ({ name, className, ...props }) => {
|
|
4605
|
-
const IconComponent = Icons_default[name];
|
|
4606
|
-
if (!IconComponent) {
|
|
4607
|
-
console.error(`Icon "${name}" not found.`);
|
|
4608
|
-
return null;
|
|
4609
|
-
}
|
|
4610
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconComponent, { ...props, className });
|
|
4611
|
-
};
|
|
4612
|
-
var Icon_default = Icon;
|
|
4613
|
-
|
|
4614
|
-
// src/components/Pagination.tsx
|
|
4811
|
+
var import_react48 = require("react");
|
|
4615
4812
|
init_StyleTypes();
|
|
4616
|
-
var
|
|
4813
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4617
4814
|
var Pagination = (props) => {
|
|
4618
4815
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4619
|
-
const builder = (0,
|
|
4816
|
+
const builder = (0, import_react48.useMemo)(() => {
|
|
4620
4817
|
const b = new OdataBuilder(path);
|
|
4621
4818
|
if (query) b.setQuery(query);
|
|
4622
4819
|
return b;
|
|
@@ -4657,7 +4854,7 @@ var Pagination = (props) => {
|
|
|
4657
4854
|
return range;
|
|
4658
4855
|
};
|
|
4659
4856
|
const paginationRange = getPaginationRange();
|
|
4660
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
4857
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4661
4858
|
Hyperlink,
|
|
4662
4859
|
{
|
|
4663
4860
|
linkType: "Link" /* Link */,
|
|
@@ -4672,9 +4869,9 @@ var Pagination = (props) => {
|
|
|
4672
4869
|
);
|
|
4673
4870
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4674
4871
|
if (disabled) {
|
|
4675
|
-
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 });
|
|
4676
4873
|
}
|
|
4677
|
-
return /* @__PURE__ */ (0,
|
|
4874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4678
4875
|
Hyperlink,
|
|
4679
4876
|
{
|
|
4680
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",
|
|
@@ -4684,35 +4881,35 @@ var Pagination = (props) => {
|
|
|
4684
4881
|
);
|
|
4685
4882
|
};
|
|
4686
4883
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4687
|
-
return /* @__PURE__ */ (0,
|
|
4688
|
-
/* @__PURE__ */ (0,
|
|
4689
|
-
/* @__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: [
|
|
4690
4887
|
"Showing ",
|
|
4691
|
-
/* @__PURE__ */ (0,
|
|
4888
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "font-semibold", children: [
|
|
4692
4889
|
startItem,
|
|
4693
4890
|
"-",
|
|
4694
4891
|
endItem
|
|
4695
4892
|
] }),
|
|
4696
4893
|
" ",
|
|
4697
4894
|
"out of ",
|
|
4698
|
-
/* @__PURE__ */ (0,
|
|
4895
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4699
4896
|
" results"
|
|
4700
4897
|
] }),
|
|
4701
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
4702
|
-
/* @__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)(
|
|
4703
4900
|
NavigationButton,
|
|
4704
4901
|
{
|
|
4705
4902
|
page: activePageNumber - 1,
|
|
4706
4903
|
disabled: activePageNumber === 1,
|
|
4707
4904
|
children: [
|
|
4708
|
-
/* @__PURE__ */ (0,
|
|
4709
|
-
/* @__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" })
|
|
4710
4907
|
]
|
|
4711
4908
|
}
|
|
4712
4909
|
),
|
|
4713
4910
|
paginationRange.map((item, index) => {
|
|
4714
4911
|
if (item === "...") {
|
|
4715
|
-
return /* @__PURE__ */ (0,
|
|
4912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4716
4913
|
"span",
|
|
4717
4914
|
{
|
|
4718
4915
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4722,23 +4919,23 @@ var Pagination = (props) => {
|
|
|
4722
4919
|
);
|
|
4723
4920
|
}
|
|
4724
4921
|
const page = item;
|
|
4725
|
-
return /* @__PURE__ */ (0,
|
|
4922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PageButton, { page, children: page }, page);
|
|
4726
4923
|
}),
|
|
4727
|
-
/* @__PURE__ */ (0,
|
|
4924
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
4728
4925
|
NavigationButton,
|
|
4729
4926
|
{
|
|
4730
4927
|
page: activePageNumber + 1,
|
|
4731
4928
|
disabled: activePageNumber === totalPages,
|
|
4732
4929
|
children: [
|
|
4733
|
-
/* @__PURE__ */ (0,
|
|
4734
|
-
/* @__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" }) })
|
|
4735
4932
|
]
|
|
4736
4933
|
}
|
|
4737
4934
|
)
|
|
4738
4935
|
] }),
|
|
4739
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
4740
|
-
/* @__PURE__ */ (0,
|
|
4741
|
-
/* @__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)(
|
|
4742
4939
|
"input",
|
|
4743
4940
|
{
|
|
4744
4941
|
type: "number",
|
|
@@ -4759,9 +4956,9 @@ var Pagination = (props) => {
|
|
|
4759
4956
|
) })
|
|
4760
4957
|
] })
|
|
4761
4958
|
] }),
|
|
4762
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
4763
|
-
/* @__PURE__ */ (0,
|
|
4764
|
-
/* @__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)(
|
|
4765
4962
|
Hyperlink,
|
|
4766
4963
|
{
|
|
4767
4964
|
className: `
|
|
@@ -4773,7 +4970,7 @@ var Pagination = (props) => {
|
|
|
4773
4970
|
},
|
|
4774
4971
|
size
|
|
4775
4972
|
)) }),
|
|
4776
|
-
/* @__PURE__ */ (0,
|
|
4973
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm", children: "per page" })
|
|
4777
4974
|
] }) })
|
|
4778
4975
|
] });
|
|
4779
4976
|
};
|
|
@@ -4781,7 +4978,7 @@ var Pagination_default = Pagination;
|
|
|
4781
4978
|
|
|
4782
4979
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
4783
4980
|
var import_dynamic5 = __toESM(require("next/dynamic"));
|
|
4784
|
-
var
|
|
4981
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4785
4982
|
var HlsPlayer3 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
4786
4983
|
var deviceToMediaQuery = (device) => {
|
|
4787
4984
|
switch (device) {
|
|
@@ -4850,8 +5047,8 @@ var ImageGalleryNode = (props) => {
|
|
|
4850
5047
|
right: "justify-end"
|
|
4851
5048
|
};
|
|
4852
5049
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
4853
|
-
return /* @__PURE__ */ (0,
|
|
4854
|
-
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)(
|
|
4855
5052
|
HlsPlayer3,
|
|
4856
5053
|
{
|
|
4857
5054
|
sources: hlsSources,
|
|
@@ -4865,14 +5062,14 @@ var ImageGalleryNode = (props) => {
|
|
|
4865
5062
|
session: props.session
|
|
4866
5063
|
}
|
|
4867
5064
|
) }),
|
|
4868
|
-
staticFallback && /* @__PURE__ */ (0,
|
|
5065
|
+
staticFallback && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("picture", { children: [
|
|
4869
5066
|
DEVICE_ORDER.map((deviceKey) => {
|
|
4870
5067
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
4871
5068
|
if (!match) return null;
|
|
4872
5069
|
const srcUrl = resolveImageUrl(match.imageUrl);
|
|
4873
5070
|
if (!srcUrl) return null;
|
|
4874
5071
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
4875
|
-
return /* @__PURE__ */ (0,
|
|
5072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4876
5073
|
"source",
|
|
4877
5074
|
{
|
|
4878
5075
|
media: mediaQuery,
|
|
@@ -4896,7 +5093,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4896
5093
|
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
4897
5094
|
return (
|
|
4898
5095
|
// eslint-disable-next-line @next/next/no-img-element
|
|
4899
|
-
/* @__PURE__ */ (0,
|
|
5096
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4900
5097
|
"img",
|
|
4901
5098
|
{
|
|
4902
5099
|
loading: "lazy",
|
|
@@ -4917,7 +5114,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
4917
5114
|
|
|
4918
5115
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4919
5116
|
var import_link2 = __toESM(require("next/link"));
|
|
4920
|
-
var
|
|
5117
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4921
5118
|
function toCamelCase(str) {
|
|
4922
5119
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4923
5120
|
}
|
|
@@ -5122,7 +5319,7 @@ var DivContainer = async (props) => {
|
|
|
5122
5319
|
response = await serviceClient.get(endpoint);
|
|
5123
5320
|
result = response?.result;
|
|
5124
5321
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
5125
|
-
return /* @__PURE__ */ (0,
|
|
5322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NoDataFound_default, {});
|
|
5126
5323
|
}
|
|
5127
5324
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
5128
5325
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -5139,7 +5336,7 @@ var DivContainer = async (props) => {
|
|
|
5139
5336
|
}
|
|
5140
5337
|
const SelectedNode = NodeTypes2[node.type];
|
|
5141
5338
|
if (!SelectedNode) return null;
|
|
5142
|
-
return /* @__PURE__ */ (0,
|
|
5339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react49.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5143
5340
|
SelectedNode,
|
|
5144
5341
|
{
|
|
5145
5342
|
node,
|
|
@@ -5241,9 +5438,9 @@ var DivContainer = async (props) => {
|
|
|
5241
5438
|
props.node.autoFormat && "auto-format",
|
|
5242
5439
|
props.node.bgClass
|
|
5243
5440
|
].filter(Boolean).join(" ");
|
|
5244
|
-
return /* @__PURE__ */ (0,
|
|
5245
|
-
/* @__PURE__ */ (0,
|
|
5246
|
-
/* @__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)(
|
|
5247
5444
|
Wrapper,
|
|
5248
5445
|
{
|
|
5249
5446
|
id: guid,
|
|
@@ -5252,18 +5449,18 @@ var DivContainer = async (props) => {
|
|
|
5252
5449
|
...wrapperProps,
|
|
5253
5450
|
children: dataToRender.map(
|
|
5254
5451
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
5255
|
-
(child, i) => /* @__PURE__ */ (0,
|
|
5452
|
+
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react49.default.Fragment, { children: child }, i)
|
|
5256
5453
|
) : renderChildren(props.node.children, props, item, idx)
|
|
5257
5454
|
)
|
|
5258
5455
|
}
|
|
5259
5456
|
) }),
|
|
5260
|
-
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 }) })
|
|
5261
5458
|
] });
|
|
5262
5459
|
};
|
|
5263
5460
|
var DivContainer_default = DivContainer;
|
|
5264
5461
|
|
|
5265
5462
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
5266
|
-
var
|
|
5463
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5267
5464
|
var NodeTypes = {
|
|
5268
5465
|
["paragraph"]: ParagraphNode_default,
|
|
5269
5466
|
["heading"]: HeadingNode_default,
|
|
@@ -5291,11 +5488,11 @@ var PageBodyRenderer = (props) => {
|
|
|
5291
5488
|
if (pageBodyTree && pageBodyTree.root) {
|
|
5292
5489
|
rootNode = pageBodyTree.root;
|
|
5293
5490
|
}
|
|
5294
|
-
return /* @__PURE__ */ (0,
|
|
5491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
5295
5492
|
{
|
|
5296
5493
|
}
|
|
5297
5494
|
const SelectedNode = NodeTypes[node.type];
|
|
5298
|
-
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)(
|
|
5299
5496
|
SelectedNode,
|
|
5300
5497
|
{
|
|
5301
5498
|
node,
|
|
@@ -5311,7 +5508,7 @@ var PageBodyRenderer = (props) => {
|
|
|
5311
5508
|
device: props.device,
|
|
5312
5509
|
widgetRenderer: props.widgetRenderer
|
|
5313
5510
|
}
|
|
5314
|
-
) }) : /* @__PURE__ */ (0,
|
|
5511
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5315
5512
|
SelectedNode,
|
|
5316
5513
|
{
|
|
5317
5514
|
node,
|
|
@@ -5332,13 +5529,13 @@ var PageBodyRenderer = (props) => {
|
|
|
5332
5529
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
5333
5530
|
|
|
5334
5531
|
// src/components/Toast.tsx
|
|
5335
|
-
var
|
|
5532
|
+
var import_react51 = require("react");
|
|
5336
5533
|
init_ToastService();
|
|
5337
|
-
var
|
|
5534
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5338
5535
|
var Toast = () => {
|
|
5339
|
-
const [showToast, setShowToast] = (0,
|
|
5340
|
-
const [message, setMessage] = (0,
|
|
5341
|
-
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");
|
|
5342
5539
|
ToastService_default.showError = function(message2) {
|
|
5343
5540
|
setShowToast(true);
|
|
5344
5541
|
setMessage(message2);
|
|
@@ -5377,8 +5574,8 @@ var Toast = () => {
|
|
|
5377
5574
|
const closeToast = () => {
|
|
5378
5575
|
setShowToast(false);
|
|
5379
5576
|
};
|
|
5380
|
-
return /* @__PURE__ */ (0,
|
|
5381
|
-
/* @__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)(
|
|
5382
5579
|
"span",
|
|
5383
5580
|
{
|
|
5384
5581
|
className: "font-medium text-inherit text-sm",
|
|
@@ -5386,7 +5583,7 @@ var Toast = () => {
|
|
|
5386
5583
|
children: message
|
|
5387
5584
|
}
|
|
5388
5585
|
),
|
|
5389
|
-
/* @__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)(
|
|
5390
5587
|
"svg",
|
|
5391
5588
|
{
|
|
5392
5589
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5394,7 +5591,7 @@ var Toast = () => {
|
|
|
5394
5591
|
fill: "none",
|
|
5395
5592
|
viewBox: "0 0 24 24",
|
|
5396
5593
|
stroke: "currentColor",
|
|
5397
|
-
children: /* @__PURE__ */ (0,
|
|
5594
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
5398
5595
|
}
|
|
5399
5596
|
) })
|
|
5400
5597
|
] }) }) });
|
|
@@ -5407,7 +5604,7 @@ init_ToastService();
|
|
|
5407
5604
|
// src/components/NavigationTabsV2.tsx
|
|
5408
5605
|
var import_link3 = __toESM(require("next/link"));
|
|
5409
5606
|
var import_navigation = require("next/navigation");
|
|
5410
|
-
var
|
|
5607
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
5411
5608
|
function resolveRoutePlaceholders(route, params) {
|
|
5412
5609
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
5413
5610
|
const value = params[key];
|
|
@@ -5432,8 +5629,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
5432
5629
|
isActive: tab.isActive
|
|
5433
5630
|
})) || [];
|
|
5434
5631
|
if (mappedTabs.length === 0) return null;
|
|
5435
|
-
return /* @__PURE__ */ (0,
|
|
5436
|
-
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)(
|
|
5437
5634
|
"div",
|
|
5438
5635
|
{
|
|
5439
5636
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -5446,51 +5643,51 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
5446
5643
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
5447
5644
|
|
|
5448
5645
|
// src/components/dataForm/DataList.tsx
|
|
5449
|
-
var
|
|
5646
|
+
var import_react54 = __toESM(require("react"));
|
|
5450
5647
|
var import_navigation2 = require("next/navigation");
|
|
5451
5648
|
|
|
5452
5649
|
// src/components/dataForm/NoContentView.tsx
|
|
5453
|
-
var
|
|
5454
|
-
var
|
|
5650
|
+
var import_react52 = __toESM(require("react"));
|
|
5651
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5455
5652
|
var NoContentView = (props) => {
|
|
5456
|
-
return /* @__PURE__ */ (0,
|
|
5653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react52.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
5457
5654
|
};
|
|
5458
5655
|
var NoContentView_default = NoContentView;
|
|
5459
5656
|
|
|
5460
5657
|
// src/components/dataForm/ContentView.tsx
|
|
5461
|
-
var
|
|
5462
|
-
var
|
|
5658
|
+
var import_react53 = __toESM(require("react"));
|
|
5659
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
5463
5660
|
var ContentView = (props) => {
|
|
5464
|
-
return /* @__PURE__ */ (0,
|
|
5465
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
5466
|
-
/* @__PURE__ */ (0,
|
|
5467
|
-
/* @__PURE__ */ (0,
|
|
5468
|
-
/* @__PURE__ */ (0,
|
|
5469
|
-
/* @__PURE__ */ (0,
|
|
5470
|
-
/* @__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" })
|
|
5471
5668
|
] })
|
|
5472
5669
|
] }),
|
|
5473
|
-
/* @__PURE__ */ (0,
|
|
5474
|
-
/* @__PURE__ */ (0,
|
|
5475
|
-
/* @__PURE__ */ (0,
|
|
5476
|
-
/* @__PURE__ */ (0,
|
|
5477
|
-
/* @__PURE__ */ (0,
|
|
5478
|
-
/* @__PURE__ */ (0,
|
|
5479
|
-
/* @__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" })
|
|
5480
5677
|
] }),
|
|
5481
|
-
/* @__PURE__ */ (0,
|
|
5482
|
-
/* @__PURE__ */ (0,
|
|
5483
|
-
/* @__PURE__ */ (0,
|
|
5484
|
-
/* @__PURE__ */ (0,
|
|
5485
|
-
/* @__PURE__ */ (0,
|
|
5486
|
-
/* @__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" })
|
|
5487
5684
|
] }),
|
|
5488
|
-
/* @__PURE__ */ (0,
|
|
5489
|
-
/* @__PURE__ */ (0,
|
|
5490
|
-
/* @__PURE__ */ (0,
|
|
5491
|
-
/* @__PURE__ */ (0,
|
|
5492
|
-
/* @__PURE__ */ (0,
|
|
5493
|
-
/* @__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" })
|
|
5494
5691
|
] })
|
|
5495
5692
|
] })
|
|
5496
5693
|
] }) }),
|
|
@@ -5501,7 +5698,7 @@ var ContentView_default = ContentView;
|
|
|
5501
5698
|
|
|
5502
5699
|
// src/components/dataForm/DataList.tsx
|
|
5503
5700
|
init_StyleTypes();
|
|
5504
|
-
var
|
|
5701
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
5505
5702
|
var DataList = (props) => {
|
|
5506
5703
|
console.log(props.dataset, "datasetssssss");
|
|
5507
5704
|
const router = (0, import_navigation2.useRouter)();
|
|
@@ -5510,8 +5707,8 @@ var DataList = (props) => {
|
|
|
5510
5707
|
let activePageNumber = 0;
|
|
5511
5708
|
let pages = 0;
|
|
5512
5709
|
console.log(props.addLinkText);
|
|
5513
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
5514
|
-
(0,
|
|
5710
|
+
const [isDataFound, setIsDataFound] = (0, import_react54.useState)(null);
|
|
5711
|
+
(0, import_react54.useEffect)(() => {
|
|
5515
5712
|
if (props?.dataset) {
|
|
5516
5713
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
5517
5714
|
setIsDataFound(true);
|
|
@@ -5524,7 +5721,7 @@ var DataList = (props) => {
|
|
|
5524
5721
|
if (path.includes(".")) {
|
|
5525
5722
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
5526
5723
|
} else if (Array.isArray(obj[path])) {
|
|
5527
|
-
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));
|
|
5528
5725
|
} else {
|
|
5529
5726
|
return obj[path];
|
|
5530
5727
|
}
|
|
@@ -5533,8 +5730,8 @@ var DataList = (props) => {
|
|
|
5533
5730
|
inputValues: {},
|
|
5534
5731
|
lastPropertyChanged: ""
|
|
5535
5732
|
};
|
|
5536
|
-
const [formState, dispatch] = (0,
|
|
5537
|
-
const handleFilterChange = (0,
|
|
5733
|
+
const [formState, dispatch] = (0, import_react54.useReducer)(FormReducer_default, initialState);
|
|
5734
|
+
const handleFilterChange = (0, import_react54.useCallback)(
|
|
5538
5735
|
(updatedValues) => {
|
|
5539
5736
|
dispatch({
|
|
5540
5737
|
type: FORM_INPUT_UPDATE,
|
|
@@ -5580,30 +5777,30 @@ var DataList = (props) => {
|
|
|
5580
5777
|
const renderPageNumbers = () => {
|
|
5581
5778
|
if (pages <= 10) {
|
|
5582
5779
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
5583
|
-
(page) => /* @__PURE__ */ (0,
|
|
5780
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5584
5781
|
Hyperlink,
|
|
5585
5782
|
{
|
|
5586
5783
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5587
5784
|
href: builder.getNewPageUrl(page),
|
|
5588
5785
|
children: page
|
|
5589
5786
|
}
|
|
5590
|
-
) : /* @__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)
|
|
5591
5788
|
);
|
|
5592
5789
|
} else {
|
|
5593
5790
|
const showFirstPages = activePageNumber <= 5;
|
|
5594
5791
|
const showLastPages = activePageNumber > pages - 5;
|
|
5595
5792
|
if (showFirstPages) {
|
|
5596
|
-
return /* @__PURE__ */ (0,
|
|
5597
|
-
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)(
|
|
5598
5795
|
Hyperlink,
|
|
5599
5796
|
{
|
|
5600
5797
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5601
5798
|
href: builder.getNewPageUrl(page),
|
|
5602
5799
|
children: page
|
|
5603
5800
|
}
|
|
5604
|
-
) : /* @__PURE__ */ (0,
|
|
5605
|
-
/* @__PURE__ */ (0,
|
|
5606
|
-
/* @__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)(
|
|
5607
5804
|
Hyperlink,
|
|
5608
5805
|
{
|
|
5609
5806
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5611,7 +5808,7 @@ var DataList = (props) => {
|
|
|
5611
5808
|
children: pages - 1
|
|
5612
5809
|
}
|
|
5613
5810
|
),
|
|
5614
|
-
/* @__PURE__ */ (0,
|
|
5811
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5615
5812
|
Hyperlink,
|
|
5616
5813
|
{
|
|
5617
5814
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5619,7 +5816,7 @@ var DataList = (props) => {
|
|
|
5619
5816
|
children: pages
|
|
5620
5817
|
}
|
|
5621
5818
|
),
|
|
5622
|
-
/* @__PURE__ */ (0,
|
|
5819
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5623
5820
|
"select",
|
|
5624
5821
|
{
|
|
5625
5822
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -5631,18 +5828,18 @@ var DataList = (props) => {
|
|
|
5631
5828
|
}
|
|
5632
5829
|
},
|
|
5633
5830
|
children: [
|
|
5634
|
-
/* @__PURE__ */ (0,
|
|
5831
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
5635
5832
|
Array.from(
|
|
5636
5833
|
{ length: Math.max(0, pages - 10) },
|
|
5637
5834
|
(_, index) => index + 9
|
|
5638
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
5835
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("option", { value: page, children: page }, page))
|
|
5639
5836
|
]
|
|
5640
5837
|
}
|
|
5641
5838
|
) })
|
|
5642
5839
|
] });
|
|
5643
5840
|
} else if (showLastPages) {
|
|
5644
|
-
return /* @__PURE__ */ (0,
|
|
5645
|
-
/* @__PURE__ */ (0,
|
|
5841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
5842
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5646
5843
|
Hyperlink,
|
|
5647
5844
|
{
|
|
5648
5845
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5650,7 +5847,7 @@ var DataList = (props) => {
|
|
|
5650
5847
|
children: "1"
|
|
5651
5848
|
}
|
|
5652
5849
|
),
|
|
5653
|
-
/* @__PURE__ */ (0,
|
|
5850
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5654
5851
|
Hyperlink,
|
|
5655
5852
|
{
|
|
5656
5853
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5658,21 +5855,21 @@ var DataList = (props) => {
|
|
|
5658
5855
|
children: "2"
|
|
5659
5856
|
}
|
|
5660
5857
|
),
|
|
5661
|
-
/* @__PURE__ */ (0,
|
|
5858
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
5662
5859
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
5663
|
-
(page) => /* @__PURE__ */ (0,
|
|
5860
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5664
5861
|
Hyperlink,
|
|
5665
5862
|
{
|
|
5666
5863
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5667
5864
|
href: builder.getNewPageUrl(page),
|
|
5668
5865
|
children: page
|
|
5669
5866
|
}
|
|
5670
|
-
) : /* @__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)
|
|
5671
5868
|
)
|
|
5672
5869
|
] });
|
|
5673
5870
|
} else {
|
|
5674
|
-
return /* @__PURE__ */ (0,
|
|
5675
|
-
/* @__PURE__ */ (0,
|
|
5871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
5872
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5676
5873
|
Hyperlink,
|
|
5677
5874
|
{
|
|
5678
5875
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5680,7 +5877,7 @@ var DataList = (props) => {
|
|
|
5680
5877
|
children: "1"
|
|
5681
5878
|
}
|
|
5682
5879
|
),
|
|
5683
|
-
/* @__PURE__ */ (0,
|
|
5880
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5684
5881
|
Hyperlink,
|
|
5685
5882
|
{
|
|
5686
5883
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5688,20 +5885,20 @@ var DataList = (props) => {
|
|
|
5688
5885
|
children: "2"
|
|
5689
5886
|
}
|
|
5690
5887
|
),
|
|
5691
|
-
/* @__PURE__ */ (0,
|
|
5888
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
5692
5889
|
Array.from(
|
|
5693
5890
|
{ length: 5 },
|
|
5694
5891
|
(_, index) => activePageNumber - 2 + index
|
|
5695
|
-
).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)(
|
|
5696
5893
|
Hyperlink,
|
|
5697
5894
|
{
|
|
5698
5895
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5699
5896
|
href: builder.getNewPageUrl(page),
|
|
5700
5897
|
children: page
|
|
5701
5898
|
}
|
|
5702
|
-
) : /* @__PURE__ */ (0,
|
|
5703
|
-
/* @__PURE__ */ (0,
|
|
5704
|
-
/* @__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)(
|
|
5705
5902
|
Hyperlink,
|
|
5706
5903
|
{
|
|
5707
5904
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5709,7 +5906,7 @@ var DataList = (props) => {
|
|
|
5709
5906
|
children: pages - 1
|
|
5710
5907
|
}
|
|
5711
5908
|
),
|
|
5712
|
-
/* @__PURE__ */ (0,
|
|
5909
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5713
5910
|
Hyperlink,
|
|
5714
5911
|
{
|
|
5715
5912
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5717,7 +5914,7 @@ var DataList = (props) => {
|
|
|
5717
5914
|
children: pages
|
|
5718
5915
|
}
|
|
5719
5916
|
),
|
|
5720
|
-
/* @__PURE__ */ (0,
|
|
5917
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5721
5918
|
"select",
|
|
5722
5919
|
{
|
|
5723
5920
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -5729,8 +5926,8 @@ var DataList = (props) => {
|
|
|
5729
5926
|
}
|
|
5730
5927
|
},
|
|
5731
5928
|
children: [
|
|
5732
|
-
/* @__PURE__ */ (0,
|
|
5733
|
-
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))
|
|
5734
5931
|
]
|
|
5735
5932
|
}
|
|
5736
5933
|
) })
|
|
@@ -5738,16 +5935,16 @@ var DataList = (props) => {
|
|
|
5738
5935
|
}
|
|
5739
5936
|
}
|
|
5740
5937
|
};
|
|
5741
|
-
return /* @__PURE__ */ (0,
|
|
5742
|
-
/* @__PURE__ */ (0,
|
|
5743
|
-
(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)(
|
|
5744
5941
|
"div",
|
|
5745
5942
|
{
|
|
5746
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`,
|
|
5747
5944
|
children: [
|
|
5748
|
-
props.title ? /* @__PURE__ */ (0,
|
|
5749
|
-
/* @__PURE__ */ (0,
|
|
5750
|
-
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)(
|
|
5751
5948
|
InputControl_default,
|
|
5752
5949
|
{
|
|
5753
5950
|
name: filter.name,
|
|
@@ -5762,15 +5959,15 @@ var DataList = (props) => {
|
|
|
5762
5959
|
},
|
|
5763
5960
|
filter.name
|
|
5764
5961
|
)),
|
|
5765
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
5962
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5766
5963
|
Hyperlink,
|
|
5767
5964
|
{
|
|
5768
5965
|
className: "gap-1",
|
|
5769
5966
|
linkType: "Primary" /* Solid */,
|
|
5770
5967
|
href: props.addLinkHref,
|
|
5771
5968
|
children: [
|
|
5772
|
-
/* @__PURE__ */ (0,
|
|
5773
|
-
/* @__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" })
|
|
5774
5971
|
]
|
|
5775
5972
|
}
|
|
5776
5973
|
)
|
|
@@ -5778,8 +5975,8 @@ var DataList = (props) => {
|
|
|
5778
5975
|
]
|
|
5779
5976
|
}
|
|
5780
5977
|
),
|
|
5781
|
-
/* @__PURE__ */ (0,
|
|
5782
|
-
/* @__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) => {
|
|
5783
5980
|
let url = builder.getNewOrderByUrl(column.name);
|
|
5784
5981
|
let icon = "chevronUpDown";
|
|
5785
5982
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -5789,36 +5986,36 @@ var DataList = (props) => {
|
|
|
5789
5986
|
icon = "chevronUp";
|
|
5790
5987
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
5791
5988
|
}
|
|
5792
|
-
return /* @__PURE__ */ (0,
|
|
5989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5793
5990
|
"th",
|
|
5794
5991
|
{
|
|
5795
5992
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
5796
|
-
children: /* @__PURE__ */ (0,
|
|
5797
|
-
/* @__PURE__ */ (0,
|
|
5798
|
-
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 })
|
|
5799
5996
|
] }) })
|
|
5800
5997
|
},
|
|
5801
5998
|
column.name
|
|
5802
5999
|
);
|
|
5803
6000
|
}) }) }),
|
|
5804
|
-
/* @__PURE__ */ (0,
|
|
6001
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
5805
6002
|
let validityClass = "";
|
|
5806
6003
|
console.log("dataitem", dataitem);
|
|
5807
6004
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
5808
6005
|
validityClass = "bg-alert-200";
|
|
5809
6006
|
}
|
|
5810
|
-
return /* @__PURE__ */ (0,
|
|
6007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
5811
6008
|
console.log("column", column);
|
|
5812
|
-
return /* @__PURE__ */ (0,
|
|
6009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5813
6010
|
"td",
|
|
5814
6011
|
{
|
|
5815
6012
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
5816
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
6013
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5817
6014
|
Hyperlink,
|
|
5818
6015
|
{
|
|
5819
6016
|
className: "",
|
|
5820
6017
|
href: `https://${dataitem[column.name]}`,
|
|
5821
|
-
children: /* @__PURE__ */ (0,
|
|
6018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5822
6019
|
ViewControl_default,
|
|
5823
6020
|
{
|
|
5824
6021
|
controlType: column.controlType,
|
|
@@ -5831,11 +6028,11 @@ var DataList = (props) => {
|
|
|
5831
6028
|
}
|
|
5832
6029
|
)
|
|
5833
6030
|
}
|
|
5834
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
6031
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5835
6032
|
Hyperlink,
|
|
5836
6033
|
{
|
|
5837
6034
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
5838
|
-
children: /* @__PURE__ */ (0,
|
|
6035
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5839
6036
|
ViewControl_default,
|
|
5840
6037
|
{
|
|
5841
6038
|
controlType: column.controlType,
|
|
@@ -5845,7 +6042,7 @@ var DataList = (props) => {
|
|
|
5845
6042
|
}
|
|
5846
6043
|
)
|
|
5847
6044
|
}
|
|
5848
|
-
) : /* @__PURE__ */ (0,
|
|
6045
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5849
6046
|
ViewControl_default,
|
|
5850
6047
|
{
|
|
5851
6048
|
controlType: column.controlType,
|
|
@@ -5859,10 +6056,10 @@ var DataList = (props) => {
|
|
|
5859
6056
|
}) }, index);
|
|
5860
6057
|
}) })
|
|
5861
6058
|
] }) }),
|
|
5862
|
-
/* @__PURE__ */ (0,
|
|
5863
|
-
/* @__PURE__ */ (0,
|
|
5864
|
-
/* @__PURE__ */ (0,
|
|
5865
|
-
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)(
|
|
5866
6063
|
Hyperlink,
|
|
5867
6064
|
{
|
|
5868
6065
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -5870,9 +6067,9 @@ var DataList = (props) => {
|
|
|
5870
6067
|
children: "Prev"
|
|
5871
6068
|
}
|
|
5872
6069
|
),
|
|
5873
|
-
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" }),
|
|
5874
6071
|
renderPageNumbers(),
|
|
5875
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
6072
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5876
6073
|
Hyperlink,
|
|
5877
6074
|
{
|
|
5878
6075
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -5880,19 +6077,19 @@ var DataList = (props) => {
|
|
|
5880
6077
|
children: "Next"
|
|
5881
6078
|
}
|
|
5882
6079
|
),
|
|
5883
|
-
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" })
|
|
5884
6081
|
] })
|
|
5885
6082
|
] }) })
|
|
5886
6083
|
] }),
|
|
5887
|
-
/* @__PURE__ */ (0,
|
|
5888
|
-
(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)(
|
|
5889
6086
|
"div",
|
|
5890
6087
|
{
|
|
5891
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`,
|
|
5892
6089
|
children: [
|
|
5893
|
-
props.title ? /* @__PURE__ */ (0,
|
|
5894
|
-
/* @__PURE__ */ (0,
|
|
5895
|
-
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)(
|
|
5896
6093
|
InputControl_default,
|
|
5897
6094
|
{
|
|
5898
6095
|
name: filter.name,
|
|
@@ -5907,15 +6104,15 @@ var DataList = (props) => {
|
|
|
5907
6104
|
},
|
|
5908
6105
|
filter.name
|
|
5909
6106
|
)),
|
|
5910
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
6107
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5911
6108
|
Hyperlink,
|
|
5912
6109
|
{
|
|
5913
6110
|
className: "gap-1",
|
|
5914
6111
|
linkType: "Primary" /* Solid */,
|
|
5915
6112
|
href: props.addLinkHref,
|
|
5916
6113
|
children: [
|
|
5917
|
-
/* @__PURE__ */ (0,
|
|
5918
|
-
/* @__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" })
|
|
5919
6116
|
]
|
|
5920
6117
|
}
|
|
5921
6118
|
)
|
|
@@ -5923,8 +6120,8 @@ var DataList = (props) => {
|
|
|
5923
6120
|
]
|
|
5924
6121
|
}
|
|
5925
6122
|
),
|
|
5926
|
-
/* @__PURE__ */ (0,
|
|
5927
|
-
/* @__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) => {
|
|
5928
6125
|
let url = builder.getNewOrderByUrl(column.name);
|
|
5929
6126
|
let icon = "chevronUpDown";
|
|
5930
6127
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -5934,19 +6131,19 @@ var DataList = (props) => {
|
|
|
5934
6131
|
icon = "chevronUp";
|
|
5935
6132
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
5936
6133
|
}
|
|
5937
|
-
return /* @__PURE__ */ (0,
|
|
6134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5938
6135
|
"th",
|
|
5939
6136
|
{
|
|
5940
6137
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
5941
|
-
children: /* @__PURE__ */ (0,
|
|
5942
|
-
/* @__PURE__ */ (0,
|
|
5943
|
-
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 })
|
|
5944
6141
|
] }) })
|
|
5945
6142
|
},
|
|
5946
6143
|
column.name
|
|
5947
6144
|
);
|
|
5948
6145
|
}) }) }) }) }),
|
|
5949
|
-
/* @__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." })
|
|
5950
6147
|
] })
|
|
5951
6148
|
] })
|
|
5952
6149
|
] });
|
|
@@ -5954,10 +6151,10 @@ var DataList = (props) => {
|
|
|
5954
6151
|
var DataList_default = DataList;
|
|
5955
6152
|
|
|
5956
6153
|
// src/components/dataForm/DataListRenderer.tsx
|
|
5957
|
-
var
|
|
6154
|
+
var import_react55 = __toESM(require("react"));
|
|
5958
6155
|
init_ServiceClient();
|
|
5959
6156
|
var import_navigation3 = require("next/navigation");
|
|
5960
|
-
var
|
|
6157
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
5961
6158
|
var viewControlMap = {
|
|
5962
6159
|
number: ViewControlTypes.number,
|
|
5963
6160
|
lineText: ViewControlTypes.lineText,
|
|
@@ -6011,14 +6208,14 @@ var DataListRenderer = ({
|
|
|
6011
6208
|
widgetProps
|
|
6012
6209
|
}) => {
|
|
6013
6210
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
6014
|
-
const [columns, setColumns] = (0,
|
|
6015
|
-
const [dataset, setDataset] = (0,
|
|
6016
|
-
const [filter, setFilters] = (0,
|
|
6017
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
6018
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
6019
|
-
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)("");
|
|
6020
6217
|
const pathname = (0, import_navigation3.usePathname)();
|
|
6021
|
-
(0,
|
|
6218
|
+
(0, import_react55.useEffect)(() => {
|
|
6022
6219
|
if (!formDefinition) return;
|
|
6023
6220
|
setColumns(mapApiToColumns(formDefinition));
|
|
6024
6221
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -6031,7 +6228,7 @@ var DataListRenderer = ({
|
|
|
6031
6228
|
setAddLinkHref(resolvedAddLinkHref);
|
|
6032
6229
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
6033
6230
|
}, [formDefinition, params]);
|
|
6034
|
-
(0,
|
|
6231
|
+
(0, import_react55.useEffect)(() => {
|
|
6035
6232
|
const fetchData = async () => {
|
|
6036
6233
|
if (!serviceRoute) return;
|
|
6037
6234
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -6043,12 +6240,12 @@ var DataListRenderer = ({
|
|
|
6043
6240
|
};
|
|
6044
6241
|
fetchData();
|
|
6045
6242
|
}, [serviceRoute, query, params]);
|
|
6046
|
-
const [tabItem, setTabItem] = (0,
|
|
6243
|
+
const [tabItem, setTabItem] = (0, import_react55.useState)();
|
|
6047
6244
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
6048
6245
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
6049
|
-
return /* @__PURE__ */ (0,
|
|
6050
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
6051
|
-
/* @__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)(
|
|
6052
6249
|
DataList_default,
|
|
6053
6250
|
{
|
|
6054
6251
|
addLinkHref,
|
|
@@ -6067,12 +6264,12 @@ var DataListRenderer = ({
|
|
|
6067
6264
|
var DataListRenderer_default = DataListRenderer;
|
|
6068
6265
|
|
|
6069
6266
|
// src/components/dataForm/DataForm.tsx
|
|
6070
|
-
var
|
|
6267
|
+
var import_react57 = __toESM(require("react"));
|
|
6071
6268
|
init_Button();
|
|
6072
6269
|
init_StyleTypes();
|
|
6073
6270
|
|
|
6074
6271
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
6075
|
-
var
|
|
6272
|
+
var import_react56 = __toESM(require("react"));
|
|
6076
6273
|
|
|
6077
6274
|
// src/components/dataForm/StyleTypes.tsx
|
|
6078
6275
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -6098,7 +6295,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
6098
6295
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
6099
6296
|
|
|
6100
6297
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
6101
|
-
var
|
|
6298
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6102
6299
|
var DataFormChildSection = (props) => {
|
|
6103
6300
|
const { section } = props;
|
|
6104
6301
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -6110,7 +6307,7 @@ var DataFormChildSection = (props) => {
|
|
|
6110
6307
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
6111
6308
|
};
|
|
6112
6309
|
const childItemsToRender = getChildItemsForRendering();
|
|
6113
|
-
const handleChildInputChange = (0,
|
|
6310
|
+
const handleChildInputChange = (0, import_react56.useCallback)(
|
|
6114
6311
|
(updatedValues) => {
|
|
6115
6312
|
if (isOneToOne) {
|
|
6116
6313
|
props.callback({
|
|
@@ -6137,7 +6334,7 @@ var DataFormChildSection = (props) => {
|
|
|
6137
6334
|
},
|
|
6138
6335
|
[props, isOneToOne, childItemsToRender]
|
|
6139
6336
|
);
|
|
6140
|
-
const onAddRow = (0,
|
|
6337
|
+
const onAddRow = (0, import_react56.useCallback)(() => {
|
|
6141
6338
|
props.callback({
|
|
6142
6339
|
sectionName: props.section.name,
|
|
6143
6340
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -6146,7 +6343,7 @@ var DataFormChildSection = (props) => {
|
|
|
6146
6343
|
rowIndex: -1
|
|
6147
6344
|
});
|
|
6148
6345
|
}, [props]);
|
|
6149
|
-
const onDeleteRow = (0,
|
|
6346
|
+
const onDeleteRow = (0, import_react56.useCallback)(
|
|
6150
6347
|
(filteredIndex) => {
|
|
6151
6348
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
6152
6349
|
if (visibleItem) {
|
|
@@ -6166,14 +6363,14 @@ var DataFormChildSection = (props) => {
|
|
|
6166
6363
|
childItemsToRender,
|
|
6167
6364
|
allChildItems: childItems
|
|
6168
6365
|
});
|
|
6169
|
-
return /* @__PURE__ */ (0,
|
|
6170
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
6171
|
-
/* @__PURE__ */ (0,
|
|
6172
|
-
/* @__PURE__ */ (0,
|
|
6173
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
6174
|
-
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: [
|
|
6175
6372
|
sectionRow.elements.map((field, index) => {
|
|
6176
|
-
return /* @__PURE__ */ (0,
|
|
6373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6177
6374
|
"th",
|
|
6178
6375
|
{
|
|
6179
6376
|
className: "py-3 font-normal text-left",
|
|
@@ -6182,21 +6379,21 @@ var DataFormChildSection = (props) => {
|
|
|
6182
6379
|
field.name
|
|
6183
6380
|
);
|
|
6184
6381
|
}),
|
|
6185
|
-
!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" })
|
|
6186
6383
|
] }, sectionRowIndex);
|
|
6187
6384
|
}) }),
|
|
6188
|
-
/* @__PURE__ */ (0,
|
|
6385
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
6189
6386
|
const { item, originalIndex } = visibleItem;
|
|
6190
6387
|
const rowKey = originalIndex;
|
|
6191
|
-
return /* @__PURE__ */ (0,
|
|
6388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react56.default.Fragment, { children: section.sectionRows.map(
|
|
6192
6389
|
(sectionRow, sectionRowIndex) => {
|
|
6193
|
-
return /* @__PURE__ */ (0,
|
|
6390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
6194
6391
|
"tr",
|
|
6195
6392
|
{
|
|
6196
6393
|
className: "",
|
|
6197
6394
|
children: [
|
|
6198
6395
|
sectionRow.elements.map((field, index) => {
|
|
6199
|
-
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)(
|
|
6200
6397
|
InputControl_default,
|
|
6201
6398
|
{
|
|
6202
6399
|
index: filteredIndex,
|
|
@@ -6216,7 +6413,7 @@ var DataFormChildSection = (props) => {
|
|
|
6216
6413
|
}
|
|
6217
6414
|
) }) }) }, field.name);
|
|
6218
6415
|
}),
|
|
6219
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
6416
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6220
6417
|
ClientButton_default,
|
|
6221
6418
|
{
|
|
6222
6419
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -6225,7 +6422,7 @@ var DataFormChildSection = (props) => {
|
|
|
6225
6422
|
},
|
|
6226
6423
|
dataRole: "delete",
|
|
6227
6424
|
tabIndex: -1,
|
|
6228
|
-
children: /* @__PURE__ */ (0,
|
|
6425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6229
6426
|
Icon_default,
|
|
6230
6427
|
{
|
|
6231
6428
|
className: "w-4 h-4",
|
|
@@ -6242,7 +6439,7 @@ var DataFormChildSection = (props) => {
|
|
|
6242
6439
|
) }, rowKey);
|
|
6243
6440
|
}) })
|
|
6244
6441
|
] }) }),
|
|
6245
|
-
!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)(
|
|
6246
6443
|
ClientButton_default,
|
|
6247
6444
|
{
|
|
6248
6445
|
ButtonType: "Link" /* Link */,
|
|
@@ -6257,9 +6454,9 @@ var DataFormChildSection = (props) => {
|
|
|
6257
6454
|
var DataFormChildSection_default = DataFormChildSection;
|
|
6258
6455
|
|
|
6259
6456
|
// src/components/dataForm/DataForm.tsx
|
|
6260
|
-
var
|
|
6457
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6261
6458
|
var DataForm = (props) => {
|
|
6262
|
-
const formRef = (0,
|
|
6459
|
+
const formRef = (0, import_react57.useRef)(null);
|
|
6263
6460
|
console.log(props.dataItem, "dssads");
|
|
6264
6461
|
const initialState = {
|
|
6265
6462
|
inputValues: {},
|
|
@@ -6268,9 +6465,9 @@ var DataForm = (props) => {
|
|
|
6268
6465
|
const childInitialState = {
|
|
6269
6466
|
inputValues: []
|
|
6270
6467
|
};
|
|
6271
|
-
const [formState, dispatch] = (0,
|
|
6468
|
+
const [formState, dispatch] = (0, import_react57.useReducer)(FormReducer_default, initialState);
|
|
6272
6469
|
console.log(props.sections, "sections");
|
|
6273
|
-
const clearHiddenChildSections = (0,
|
|
6470
|
+
const clearHiddenChildSections = (0, import_react57.useCallback)(
|
|
6274
6471
|
(changedProperty, newValues) => {
|
|
6275
6472
|
if (!props.sections) return;
|
|
6276
6473
|
const allChildSections = [];
|
|
@@ -6308,7 +6505,7 @@ var DataForm = (props) => {
|
|
|
6308
6505
|
},
|
|
6309
6506
|
[props.sections, formState.inputValues]
|
|
6310
6507
|
);
|
|
6311
|
-
const handleInputChange = (0,
|
|
6508
|
+
const handleInputChange = (0, import_react57.useCallback)(
|
|
6312
6509
|
async (updatedValues) => {
|
|
6313
6510
|
dispatch({
|
|
6314
6511
|
type: FORM_INPUT_UPDATE,
|
|
@@ -6323,7 +6520,7 @@ var DataForm = (props) => {
|
|
|
6323
6520
|
},
|
|
6324
6521
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
6325
6522
|
);
|
|
6326
|
-
const fetchData = (0,
|
|
6523
|
+
const fetchData = (0, import_react57.useCallback)(async () => {
|
|
6327
6524
|
if (!props.rules) return;
|
|
6328
6525
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
6329
6526
|
return;
|
|
@@ -6354,7 +6551,7 @@ var DataForm = (props) => {
|
|
|
6354
6551
|
console.error("Error fetching data:", error);
|
|
6355
6552
|
}
|
|
6356
6553
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
6357
|
-
(0,
|
|
6554
|
+
(0, import_react57.useEffect)(() => {
|
|
6358
6555
|
fetchData();
|
|
6359
6556
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
6360
6557
|
function replacePlaceholders(template, context, params) {
|
|
@@ -6374,7 +6571,7 @@ var DataForm = (props) => {
|
|
|
6374
6571
|
}
|
|
6375
6572
|
);
|
|
6376
6573
|
}
|
|
6377
|
-
const handleChildSectionChangeCallback = (0,
|
|
6574
|
+
const handleChildSectionChangeCallback = (0, import_react57.useCallback)(
|
|
6378
6575
|
(params) => {
|
|
6379
6576
|
dispatch({
|
|
6380
6577
|
type: params.actionType,
|
|
@@ -6419,7 +6616,7 @@ var DataForm = (props) => {
|
|
|
6419
6616
|
});
|
|
6420
6617
|
return cloned;
|
|
6421
6618
|
}
|
|
6422
|
-
const onClick = (0,
|
|
6619
|
+
const onClick = (0, import_react57.useCallback)(async () => {
|
|
6423
6620
|
if (props.onClick) {
|
|
6424
6621
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
6425
6622
|
const normalizedValues = normalizeChildSections(
|
|
@@ -6435,21 +6632,21 @@ var DataForm = (props) => {
|
|
|
6435
6632
|
return { isSuccessful: true };
|
|
6436
6633
|
}
|
|
6437
6634
|
}, [formState, props]);
|
|
6438
|
-
const handleAdditionalOnClick = (0,
|
|
6635
|
+
const handleAdditionalOnClick = (0, import_react57.useCallback)(async () => {
|
|
6439
6636
|
if (props.additionalActions?.onClick) {
|
|
6440
6637
|
return await props.additionalActions.onClick(formState);
|
|
6441
6638
|
} else {
|
|
6442
6639
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
6443
6640
|
}
|
|
6444
6641
|
}, [formState, props]);
|
|
6445
|
-
const onDelete = (0,
|
|
6642
|
+
const onDelete = (0, import_react57.useCallback)(async () => {
|
|
6446
6643
|
if (props.onDelete) {
|
|
6447
6644
|
return await props.onDelete(formState);
|
|
6448
6645
|
} else {
|
|
6449
6646
|
return { isSuccessful: true };
|
|
6450
6647
|
}
|
|
6451
6648
|
}, [formState, props]);
|
|
6452
|
-
(0,
|
|
6649
|
+
(0, import_react57.useEffect)(() => {
|
|
6453
6650
|
if (props.dataItem) {
|
|
6454
6651
|
dispatch({
|
|
6455
6652
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -6477,19 +6674,19 @@ var DataForm = (props) => {
|
|
|
6477
6674
|
return false;
|
|
6478
6675
|
}
|
|
6479
6676
|
}
|
|
6480
|
-
return /* @__PURE__ */ (0,
|
|
6481
|
-
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)(
|
|
6482
6679
|
"div",
|
|
6483
6680
|
{
|
|
6484
6681
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
6485
6682
|
onClick: () => window.history.back(),
|
|
6486
6683
|
children: [
|
|
6487
|
-
/* @__PURE__ */ (0,
|
|
6488
|
-
/* @__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 })
|
|
6489
6686
|
]
|
|
6490
6687
|
}
|
|
6491
6688
|
) }),
|
|
6492
|
-
/* @__PURE__ */ (0,
|
|
6689
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6493
6690
|
"form",
|
|
6494
6691
|
{
|
|
6495
6692
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -6510,8 +6707,8 @@ var DataForm = (props) => {
|
|
|
6510
6707
|
}
|
|
6511
6708
|
}
|
|
6512
6709
|
},
|
|
6513
|
-
children: /* @__PURE__ */ (0,
|
|
6514
|
-
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: [
|
|
6515
6712
|
section.sectionRows?.map(
|
|
6516
6713
|
(sectionRow, sectionRowIndex) => {
|
|
6517
6714
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -6522,46 +6719,49 @@ var DataForm = (props) => {
|
|
|
6522
6719
|
sectionRow.visible
|
|
6523
6720
|
);
|
|
6524
6721
|
}
|
|
6525
|
-
return /* @__PURE__ */ (0,
|
|
6526
|
-
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)(
|
|
6527
6724
|
"div",
|
|
6528
6725
|
{
|
|
6529
6726
|
className: sectionRow.grow ? "grow" : "",
|
|
6530
|
-
children:
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6727
|
+
children: [
|
|
6728
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: field.controlType }),
|
|
6729
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6730
|
+
InputControl_default,
|
|
6731
|
+
{
|
|
6732
|
+
name: field.name,
|
|
6733
|
+
controlType: field.controlType,
|
|
6734
|
+
value: getNestedProperty2(
|
|
6735
|
+
formState.inputValues,
|
|
6736
|
+
field.name
|
|
6737
|
+
),
|
|
6738
|
+
callback: handleInputChange,
|
|
6739
|
+
dataSourceDependsOn: field.dataSourceDependsOn,
|
|
6740
|
+
dependentValue: field.dataSourceDependsOn ? formState.inputValues[field.dataSourceDependsOn] : "",
|
|
6741
|
+
dataSource: field.dataSource,
|
|
6742
|
+
dataset: field.dataset,
|
|
6743
|
+
dataKeyFieldName: field.dataKeyFieldName,
|
|
6744
|
+
dataTextFieldName: field.dataTextFieldName,
|
|
6745
|
+
attributes: field.attributes,
|
|
6746
|
+
serviceClient: props.serviceClient,
|
|
6747
|
+
assetsUploadPath: props.dataItem ? props.dataItem["assetsUploadPath"] : null,
|
|
6748
|
+
entityType: field.entityType,
|
|
6749
|
+
uploadInSharedLocation: field.uploadInSharedLocation
|
|
6750
|
+
}
|
|
6751
|
+
)
|
|
6752
|
+
]
|
|
6553
6753
|
},
|
|
6554
6754
|
field.name
|
|
6555
6755
|
);
|
|
6556
6756
|
}) }) }, sectionRowIndex);
|
|
6557
6757
|
}
|
|
6558
6758
|
),
|
|
6559
|
-
/* @__PURE__ */ (0,
|
|
6759
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: section.childSections?.map(
|
|
6560
6760
|
(childSection, childSectionIndex) => {
|
|
6561
|
-
return /* @__PURE__ */ (0,
|
|
6761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
6562
6762
|
formState.inputValues,
|
|
6563
6763
|
childSection.visible
|
|
6564
|
-
) && /* @__PURE__ */ (0,
|
|
6764
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6565
6765
|
DataFormChildSection_default,
|
|
6566
6766
|
{
|
|
6567
6767
|
section: childSection,
|
|
@@ -6576,8 +6776,8 @@ var DataForm = (props) => {
|
|
|
6576
6776
|
}) })
|
|
6577
6777
|
}
|
|
6578
6778
|
),
|
|
6579
|
-
/* @__PURE__ */ (0,
|
|
6580
|
-
/* @__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)(
|
|
6581
6781
|
Button_default,
|
|
6582
6782
|
{
|
|
6583
6783
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -6585,7 +6785,7 @@ var DataForm = (props) => {
|
|
|
6585
6785
|
children: props.additionalActions.title
|
|
6586
6786
|
}
|
|
6587
6787
|
) }),
|
|
6588
|
-
/* @__PURE__ */ (0,
|
|
6788
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6589
6789
|
Button_default,
|
|
6590
6790
|
{
|
|
6591
6791
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -6596,7 +6796,7 @@ var DataForm = (props) => {
|
|
|
6596
6796
|
children: "Delete"
|
|
6597
6797
|
}
|
|
6598
6798
|
) }),
|
|
6599
|
-
/* @__PURE__ */ (0,
|
|
6799
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6600
6800
|
Button_default,
|
|
6601
6801
|
{
|
|
6602
6802
|
onValidate,
|
|
@@ -6614,7 +6814,7 @@ var DataForm_default = DataForm;
|
|
|
6614
6814
|
|
|
6615
6815
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
6616
6816
|
init_ServiceClient();
|
|
6617
|
-
var
|
|
6817
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6618
6818
|
function getAction(actions, code) {
|
|
6619
6819
|
return actions?.find((a) => a.actionCode === code);
|
|
6620
6820
|
}
|
|
@@ -6640,9 +6840,9 @@ var DataFormRenderer = ({
|
|
|
6640
6840
|
"Delete"
|
|
6641
6841
|
);
|
|
6642
6842
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
6643
|
-
return /* @__PURE__ */ (0,
|
|
6644
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
6645
|
-
/* @__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)(
|
|
6646
6846
|
DataForm_default,
|
|
6647
6847
|
{
|
|
6648
6848
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|