@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260827034013 → 0.8.1-dev.20260827091356
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.js +1162 -714
- package/dist/index.mjs +804 -360
- package/dist/server.js +945 -497
- package/dist/server.mjs +621 -177
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -450,23 +450,450 @@ var parseSerializedContent = (raw) => {
|
|
|
450
450
|
|
|
451
451
|
// src/components/controls/view/CommentNodeRenderer.tsx
|
|
452
452
|
import React14 from "react";
|
|
453
|
-
|
|
453
|
+
|
|
454
|
+
// src/components/controls/view/CommentImageNode.tsx
|
|
455
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
456
|
+
var CommentImageNode = ({ node, assetBaseUrl }) => {
|
|
457
|
+
const rawUrl = typeof node.url === "string" && node.url || typeof node.src === "string" && node.src || typeof node.assetUrl === "string" && node.assetUrl || "";
|
|
458
|
+
if (!rawUrl) {
|
|
459
|
+
return null;
|
|
460
|
+
}
|
|
461
|
+
const resolvedUrl = AssetUtility_default.resolveUrl(assetBaseUrl, rawUrl);
|
|
462
|
+
if (!resolvedUrl) {
|
|
463
|
+
return null;
|
|
464
|
+
}
|
|
465
|
+
console.log("resolvedUrl", resolvedUrl);
|
|
466
|
+
const alt = typeof node.fileName === "string" && node.fileName || typeof node.altText === "string" && node.altText || typeof node.alt === "string" && node.alt || "";
|
|
467
|
+
return /* @__PURE__ */ jsx15(
|
|
468
|
+
"img",
|
|
469
|
+
{
|
|
470
|
+
className: "comment-node-image",
|
|
471
|
+
src: resolvedUrl,
|
|
472
|
+
alt,
|
|
473
|
+
loading: "lazy",
|
|
474
|
+
style: { maxWidth: "100%", height: "auto", display: "block" }
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
};
|
|
478
|
+
var CommentImageNode_default = CommentImageNode;
|
|
479
|
+
|
|
480
|
+
// src/components/controls/view/FileIcon.tsx
|
|
481
|
+
import { jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
482
|
+
var PdfIcon = () => /* @__PURE__ */ jsxs6(
|
|
483
|
+
"svg",
|
|
484
|
+
{
|
|
485
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
486
|
+
viewBox: "0 0 48 48",
|
|
487
|
+
className: "w-10 h-10",
|
|
488
|
+
children: [
|
|
489
|
+
/* @__PURE__ */ jsx16(
|
|
490
|
+
"path",
|
|
491
|
+
{
|
|
492
|
+
fill: "#e53935",
|
|
493
|
+
d: "M38,42H10c-2.209,0-4-1.791-4-4V10c0-2.209,1.791-4,4-4h28c2.209,0,4,1.791,4,4v28 C42,40.209,40.209,42,38,42z"
|
|
494
|
+
}
|
|
495
|
+
),
|
|
496
|
+
/* @__PURE__ */ jsx16(
|
|
497
|
+
"path",
|
|
498
|
+
{
|
|
499
|
+
fill: "#fff",
|
|
500
|
+
d: "M34.841,26.799c-1.692-1.757-6.314-1.041-7.42-0.911c-1.627-1.562-2.734-3.45-3.124-4.101 c0.586-1.757,0.976-3.515,1.041-5.402c0-1.627-0.651-3.385-2.473-3.385c-0.651,0-1.237,0.391-1.562,0.911 c-0.781,1.367-0.456,4.101,0.781,6.899c-0.716,2.018-1.367,3.97-3.189,7.42c-1.888,0.781-5.858,2.604-6.183,4.556 c-0.13,0.586,0.065,1.172,0.521,1.627C13.688,34.805,14.273,35,14.859,35c2.408,0,4.751-3.32,6.379-6.118 c1.367-0.456,3.515-1.107,5.663-1.497c2.538,2.213,4.751,2.538,5.923,2.538c1.562,0,2.148-0.651,2.343-1.237 C35.492,28.036,35.297,27.32,34.841,26.799z M33.214,27.905c-0.065,0.456-0.651,0.911-1.692,0.651 c-1.237-0.325-2.343-0.911-3.32-1.692c0.846-0.13,2.734-0.325,4.101-0.065C32.824,26.929,33.344,27.254,33.214,27.905z M22.344,14.497c0.13-0.195,0.325-0.325,0.521-0.325c0.586,0,0.716,0.716,0.716,1.302c-0.065,1.367-0.325,2.734-0.781,4.036 C21.824,16.905,22.019,15.083,22.344,14.497z M22.214,27.124c0.521-1.041,1.237-2.864,1.497-3.645 c0.586,0.976,1.562,2.148,2.083,2.669C25.794,26.213,23.776,26.604,22.214,27.124z M18.374,29.728 c-1.497,2.473-3.059,4.036-3.905,4.036c-0.13,0-0.26-0.065-0.391-0.13c-0.195-0.13-0.26-0.325-0.195-0.586 C14.078,32.136,15.77,30.899,18.374,29.728z"
|
|
501
|
+
}
|
|
502
|
+
)
|
|
503
|
+
]
|
|
504
|
+
}
|
|
505
|
+
);
|
|
506
|
+
var ExcelIcon = () => /* @__PURE__ */ jsxs6(
|
|
507
|
+
"svg",
|
|
508
|
+
{
|
|
509
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
510
|
+
viewBox: "0 0 48 48",
|
|
511
|
+
className: "w-10 h-10",
|
|
512
|
+
children: [
|
|
513
|
+
/* @__PURE__ */ jsx16(
|
|
514
|
+
"path",
|
|
515
|
+
{
|
|
516
|
+
fill: "#169154",
|
|
517
|
+
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
518
|
+
}
|
|
519
|
+
),
|
|
520
|
+
/* @__PURE__ */ jsx16(
|
|
521
|
+
"path",
|
|
522
|
+
{
|
|
523
|
+
fill: "#18482a",
|
|
524
|
+
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
525
|
+
}
|
|
526
|
+
),
|
|
527
|
+
/* @__PURE__ */ jsx16("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
528
|
+
/* @__PURE__ */ jsx16("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
529
|
+
/* @__PURE__ */ jsxs6("g", { children: [
|
|
530
|
+
/* @__PURE__ */ jsx16(
|
|
531
|
+
"path",
|
|
532
|
+
{
|
|
533
|
+
fill: "#29c27f",
|
|
534
|
+
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
535
|
+
}
|
|
536
|
+
),
|
|
537
|
+
/* @__PURE__ */ jsx16(
|
|
538
|
+
"path",
|
|
539
|
+
{
|
|
540
|
+
fill: "#27663f",
|
|
541
|
+
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
542
|
+
}
|
|
543
|
+
),
|
|
544
|
+
/* @__PURE__ */ jsx16("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
545
|
+
/* @__PURE__ */ jsx16("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
546
|
+
] }),
|
|
547
|
+
/* @__PURE__ */ jsx16(
|
|
548
|
+
"path",
|
|
549
|
+
{
|
|
550
|
+
fill: "#0c7238",
|
|
551
|
+
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
552
|
+
}
|
|
553
|
+
),
|
|
554
|
+
/* @__PURE__ */ jsx16(
|
|
555
|
+
"path",
|
|
556
|
+
{
|
|
557
|
+
fill: "#fff",
|
|
558
|
+
d: "M9.807 19L12.193 19 14.129 22.754 16.175 19 18.404 19 15.333 24 18.474 29 16.123 29 14.013 25.07 11.912 29 9.526 29 12.719 23.982z"
|
|
559
|
+
}
|
|
560
|
+
)
|
|
561
|
+
]
|
|
562
|
+
}
|
|
563
|
+
);
|
|
564
|
+
var WordIcon = () => /* @__PURE__ */ jsxs6(
|
|
565
|
+
"svg",
|
|
566
|
+
{
|
|
567
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
568
|
+
viewBox: "0 0 48 48",
|
|
569
|
+
className: "w-10 h-10",
|
|
570
|
+
baseProfile: "basic",
|
|
571
|
+
children: [
|
|
572
|
+
/* @__PURE__ */ jsx16(
|
|
573
|
+
"path",
|
|
574
|
+
{
|
|
575
|
+
fill: "#283593",
|
|
576
|
+
d: "M9,33.595l14.911-18.706L41,26v13.306C41,41.346,39.346,43,37.306,43H15.332 C11.835,43,9,40.164,9,36.667C9,36.667,9,33.595,9,33.595z"
|
|
577
|
+
}
|
|
578
|
+
),
|
|
579
|
+
/* @__PURE__ */ jsxs6(
|
|
580
|
+
"linearGradient",
|
|
581
|
+
{
|
|
582
|
+
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
583
|
+
x1: "9",
|
|
584
|
+
x2: "33.506",
|
|
585
|
+
y1: "364.445",
|
|
586
|
+
y2: "364.445",
|
|
587
|
+
gradientTransform: "translate(0 -339.89)",
|
|
588
|
+
gradientUnits: "userSpaceOnUse",
|
|
589
|
+
children: [
|
|
590
|
+
/* @__PURE__ */ jsx16("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
591
|
+
/* @__PURE__ */ jsx16("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
592
|
+
]
|
|
593
|
+
}
|
|
594
|
+
),
|
|
595
|
+
/* @__PURE__ */ jsx16(
|
|
596
|
+
"path",
|
|
597
|
+
{
|
|
598
|
+
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
599
|
+
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
600
|
+
}
|
|
601
|
+
),
|
|
602
|
+
/* @__PURE__ */ jsx16(
|
|
603
|
+
"path",
|
|
604
|
+
{
|
|
605
|
+
fill: "#1e88e5",
|
|
606
|
+
"fill-opacity": ".6",
|
|
607
|
+
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
608
|
+
}
|
|
609
|
+
),
|
|
610
|
+
/* @__PURE__ */ jsx16(
|
|
611
|
+
"path",
|
|
612
|
+
{
|
|
613
|
+
fill: "#00e5ff",
|
|
614
|
+
d: "M9,10.333C9,6.836,11.835,4,15.332,4h21.975C39.346,4,41,5.654,41,7.694v5.611 C41,15.346,39.346,17,37.306,17H15.332C11.835,17,9,19.836,9,23.333C9,23.333,9,10.333,9,10.333z"
|
|
615
|
+
}
|
|
616
|
+
),
|
|
617
|
+
/* @__PURE__ */ jsx16(
|
|
618
|
+
"path",
|
|
619
|
+
{
|
|
620
|
+
fill: "#1565c0",
|
|
621
|
+
d: "M7.5,23h10c1.933,0,3.5,1.567,3.5,3.5v10c0,1.933-1.567,3.5-3.5,3.5h-10C5.567,40,4,38.433,4,36.5 v-10C4,24.567,5.567,23,7.5,23z"
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
/* @__PURE__ */ jsx16(
|
|
625
|
+
"path",
|
|
626
|
+
{
|
|
627
|
+
fill: "#fff",
|
|
628
|
+
d: "M18.327,26.643l-2.092,9.713l-2.501,0.002L12.5,30.529l-1.293,5.829H8.683l-2.01-9.713h2.062 l1.24,6.41l1.232-6.41h2.528l1.291,6.41l1.21-6.41L18.327,26.643L18.327,26.643z"
|
|
629
|
+
}
|
|
630
|
+
)
|
|
631
|
+
]
|
|
632
|
+
}
|
|
633
|
+
);
|
|
634
|
+
var StandardIcon = () => /* @__PURE__ */ jsxs6(
|
|
635
|
+
"svg",
|
|
636
|
+
{
|
|
637
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
638
|
+
viewBox: "0 0 48 48",
|
|
639
|
+
className: "w-10 h-10",
|
|
640
|
+
children: [
|
|
641
|
+
/* @__PURE__ */ jsx16("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
642
|
+
/* @__PURE__ */ jsx16("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
643
|
+
]
|
|
644
|
+
}
|
|
645
|
+
);
|
|
646
|
+
var PowerPointIcon = () => /* @__PURE__ */ jsxs6(
|
|
647
|
+
"svg",
|
|
648
|
+
{
|
|
649
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
650
|
+
viewBox: "0 0 48 48",
|
|
651
|
+
className: "w-10 h-10",
|
|
652
|
+
children: [
|
|
653
|
+
/* @__PURE__ */ jsx16(
|
|
654
|
+
"path",
|
|
655
|
+
{
|
|
656
|
+
fill: "#dc4c2c",
|
|
657
|
+
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
658
|
+
}
|
|
659
|
+
),
|
|
660
|
+
/* @__PURE__ */ jsx16("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
661
|
+
/* @__PURE__ */ jsx16("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
662
|
+
/* @__PURE__ */ jsx16(
|
|
663
|
+
"path",
|
|
664
|
+
{
|
|
665
|
+
fill: "#9b341f",
|
|
666
|
+
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
667
|
+
}
|
|
668
|
+
),
|
|
669
|
+
/* @__PURE__ */ jsx16(
|
|
670
|
+
"path",
|
|
671
|
+
{
|
|
672
|
+
fill: "#fff",
|
|
673
|
+
d: "M14.673,19.012H10v10h2.024v-3.521H14.3c1.876,0,3.397-1.521,3.397-3.397v-0.058 C17.697,20.366,16.343,19.012,14.673,19.012z M15.57,22.358c0,0.859-0.697,1.556-1.556,1.556h-1.99v-3.325h1.99 c0.859,0,1.556,0.697,1.556,1.556V22.358z"
|
|
674
|
+
}
|
|
675
|
+
)
|
|
676
|
+
]
|
|
677
|
+
}
|
|
678
|
+
);
|
|
679
|
+
var TextIcon = () => /* @__PURE__ */ jsxs6(
|
|
680
|
+
"svg",
|
|
681
|
+
{
|
|
682
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
683
|
+
viewBox: "0 0 48 48",
|
|
684
|
+
className: "w-10 h-10",
|
|
685
|
+
children: [
|
|
686
|
+
/* @__PURE__ */ jsx16("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
687
|
+
/* @__PURE__ */ jsx16("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
688
|
+
/* @__PURE__ */ jsx16(
|
|
689
|
+
"path",
|
|
690
|
+
{
|
|
691
|
+
fill: "#1976D2",
|
|
692
|
+
d: "M16 21H33V23H16zM16 25H29V27H16zM16 29H33V31H16zM16 33H29V35H16z"
|
|
693
|
+
}
|
|
694
|
+
)
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
);
|
|
698
|
+
var ArchiveIcon = () => /* @__PURE__ */ jsxs6(
|
|
699
|
+
"svg",
|
|
700
|
+
{
|
|
701
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
702
|
+
zoomAndPan: "magnify",
|
|
703
|
+
viewBox: "0 0 75 74.999997",
|
|
704
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
705
|
+
version: "1.0",
|
|
706
|
+
className: "w-10 h-10",
|
|
707
|
+
children: [
|
|
708
|
+
/* @__PURE__ */ jsx16("defs", { children: /* @__PURE__ */ jsx16("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ jsx16(
|
|
709
|
+
"path",
|
|
710
|
+
{
|
|
711
|
+
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
712
|
+
"clip-rule": "nonzero"
|
|
713
|
+
}
|
|
714
|
+
) }) }),
|
|
715
|
+
/* @__PURE__ */ jsx16("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ jsx16(
|
|
716
|
+
"path",
|
|
717
|
+
{
|
|
718
|
+
fill: "#ff9100",
|
|
719
|
+
d: "M 65.882812 75 L 8.929688 75 L 8.929688 0 L 48.085938 0 L 65.882812 17.855469 Z M 65.882812 75 ",
|
|
720
|
+
"fill-opacity": "1",
|
|
721
|
+
"fill-rule": "nonzero"
|
|
722
|
+
}
|
|
723
|
+
) }),
|
|
724
|
+
/* @__PURE__ */ jsx16(
|
|
725
|
+
"path",
|
|
726
|
+
{
|
|
727
|
+
fill: "#fbe9e7",
|
|
728
|
+
d: "M 63.214844 19.644531 L 46.304688 19.644531 L 46.304688 2.679688 Z M 63.214844 19.644531 ",
|
|
729
|
+
"fill-opacity": "1",
|
|
730
|
+
"fill-rule": "nonzero"
|
|
731
|
+
}
|
|
732
|
+
),
|
|
733
|
+
/* @__PURE__ */ jsx16(
|
|
734
|
+
"path",
|
|
735
|
+
{
|
|
736
|
+
fill: "#ffe0b2",
|
|
737
|
+
d: "M 26.523438 50.59375 L 33.824219 50.59375 L 33.824219 53.570312 L 22.339844 53.570312 L 22.339844 51.410156 L 29.566406 38.789062 L 22.265625 38.789062 L 22.265625 35.796875 L 33.691406 35.796875 L 33.691406 37.910156 Z M 26.523438 50.59375 ",
|
|
738
|
+
"fill-opacity": "1",
|
|
739
|
+
"fill-rule": "nonzero"
|
|
740
|
+
}
|
|
741
|
+
),
|
|
742
|
+
/* @__PURE__ */ jsx16(
|
|
743
|
+
"path",
|
|
744
|
+
{
|
|
745
|
+
fill: "#ffe0b2",
|
|
746
|
+
d: "M 36.183594 35.796875 L 39.757812 35.796875 L 39.757812 53.570312 L 36.183594 53.570312 Z M 36.183594 35.796875 ",
|
|
747
|
+
"fill-opacity": "1",
|
|
748
|
+
"fill-rule": "nonzero"
|
|
749
|
+
}
|
|
750
|
+
),
|
|
751
|
+
/* @__PURE__ */ jsx16(
|
|
752
|
+
"path",
|
|
753
|
+
{
|
|
754
|
+
fill: "#ffe0b2",
|
|
755
|
+
d: "M 46.34375 47.320312 L 46.34375 53.570312 L 42.765625 53.570312 L 42.765625 35.796875 L 48.800781 35.796875 C 50.550781 35.796875 51.953125 36.34375 52.992188 37.433594 C 54.035156 38.523438 54.554688 39.9375 54.554688 41.683594 C 54.554688 43.425781 54.039062 44.796875 53.011719 45.808594 C 51.980469 46.820312 50.550781 47.320312 48.726562 47.320312 Z M 46.34375 44.332031 L 48.800781 44.332031 C 49.484375 44.332031 50.007812 44.105469 50.382812 43.660156 C 50.757812 43.210938 50.941406 42.5625 50.941406 41.707031 C 50.941406 40.816406 50.753906 40.113281 50.371094 39.585938 C 49.988281 39.0625 49.476562 38.796875 48.839844 38.789062 L 46.34375 38.789062 Z M 46.34375 44.332031 ",
|
|
756
|
+
"fill-opacity": "1",
|
|
757
|
+
"fill-rule": "nonzero"
|
|
758
|
+
}
|
|
759
|
+
)
|
|
760
|
+
]
|
|
761
|
+
}
|
|
762
|
+
);
|
|
763
|
+
var getFileDetails = (url) => {
|
|
764
|
+
const extMatch = url.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);
|
|
765
|
+
const ext = extMatch ? extMatch[1].toLowerCase() : "";
|
|
766
|
+
let Icon = StandardIcon;
|
|
767
|
+
let extLabel = "FILE";
|
|
768
|
+
if (ext === "pdf") {
|
|
769
|
+
Icon = PdfIcon;
|
|
770
|
+
extLabel = "PDF";
|
|
771
|
+
} else if (["xls", "xlsx", "csv"].includes(ext)) {
|
|
772
|
+
Icon = ExcelIcon;
|
|
773
|
+
extLabel = "Excel";
|
|
774
|
+
} else if (["doc", "docx"].includes(ext)) {
|
|
775
|
+
Icon = WordIcon;
|
|
776
|
+
extLabel = "Word";
|
|
777
|
+
} else if (["ppt", "pptx"].includes(ext)) {
|
|
778
|
+
Icon = PowerPointIcon;
|
|
779
|
+
extLabel = "PowerPoint";
|
|
780
|
+
} else if (["txt", "rtf"].includes(ext)) {
|
|
781
|
+
Icon = TextIcon;
|
|
782
|
+
extLabel = "Text";
|
|
783
|
+
} else if (["zip", "rar", "7z"].includes(ext)) {
|
|
784
|
+
Icon = ArchiveIcon;
|
|
785
|
+
extLabel = "Archive";
|
|
786
|
+
} else if (ext) {
|
|
787
|
+
extLabel = ext.toUpperCase();
|
|
788
|
+
}
|
|
789
|
+
return { Icon, extLabel };
|
|
790
|
+
};
|
|
791
|
+
var FileIcon = ({ fileName, className }) => {
|
|
792
|
+
const { Icon } = getFileDetails(fileName);
|
|
793
|
+
return /* @__PURE__ */ jsx16("span", { className, children: /* @__PURE__ */ jsx16(Icon, {}) });
|
|
794
|
+
};
|
|
795
|
+
var FileIcon_default = FileIcon;
|
|
796
|
+
|
|
797
|
+
// src/components/controls/view/CommentFileNode.tsx
|
|
798
|
+
import { jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
799
|
+
var formatFileSize = (sizeBytes) => {
|
|
800
|
+
const bytes = typeof sizeBytes === "number" ? sizeBytes : Number(sizeBytes);
|
|
801
|
+
if (!Number.isFinite(bytes) || bytes <= 0) {
|
|
802
|
+
return "";
|
|
803
|
+
}
|
|
804
|
+
if (bytes < 1024) {
|
|
805
|
+
return `${bytes} B`;
|
|
806
|
+
}
|
|
807
|
+
const units = ["KB", "MB", "GB"];
|
|
808
|
+
let value = bytes / 1024;
|
|
809
|
+
let unitIndex = 0;
|
|
810
|
+
while (value >= 1024 && unitIndex < units.length - 1) {
|
|
811
|
+
value /= 1024;
|
|
812
|
+
unitIndex += 1;
|
|
813
|
+
}
|
|
814
|
+
return `${value.toFixed(value < 10 ? 1 : 0)} ${units[unitIndex]}`;
|
|
815
|
+
};
|
|
816
|
+
var CommentFileNode = ({ node, assetBaseUrl }) => {
|
|
817
|
+
const rawUrl = typeof node.url === "string" && node.url || typeof node.src === "string" && node.src || typeof node.assetUrl === "string" && node.assetUrl || "";
|
|
818
|
+
if (!rawUrl) {
|
|
819
|
+
return null;
|
|
820
|
+
}
|
|
821
|
+
const href = AssetUtility_default.resolveUrl(assetBaseUrl, rawUrl);
|
|
822
|
+
if (!href) {
|
|
823
|
+
return null;
|
|
824
|
+
}
|
|
825
|
+
const fileName = typeof node.fileName === "string" && node.fileName || typeof node.name === "string" && node.name || rawUrl.split("/").pop() || "file";
|
|
826
|
+
const sizeLabel = formatFileSize(node.fileSize);
|
|
827
|
+
return /* @__PURE__ */ jsxs7(
|
|
828
|
+
"a",
|
|
829
|
+
{
|
|
830
|
+
href,
|
|
831
|
+
target: "_blank",
|
|
832
|
+
rel: "noopener noreferrer",
|
|
833
|
+
download: fileName,
|
|
834
|
+
className: "comment-node-file",
|
|
835
|
+
style: {
|
|
836
|
+
display: "inline-flex",
|
|
837
|
+
alignItems: "center",
|
|
838
|
+
gap: "8px",
|
|
839
|
+
padding: "8px 12px",
|
|
840
|
+
border: "1px solid rgba(0,0,0,0.12)",
|
|
841
|
+
borderRadius: "8px",
|
|
842
|
+
textDecoration: "none",
|
|
843
|
+
color: "inherit",
|
|
844
|
+
maxWidth: "100%"
|
|
845
|
+
},
|
|
846
|
+
children: [
|
|
847
|
+
/* @__PURE__ */ jsx17(FileIcon_default, { fileName, className: "comment-node-file-icon" }),
|
|
848
|
+
/* @__PURE__ */ jsxs7(
|
|
849
|
+
"span",
|
|
850
|
+
{
|
|
851
|
+
className: "comment-node-file-text",
|
|
852
|
+
style: { display: "flex", flexDirection: "column", minWidth: 0 },
|
|
853
|
+
children: [
|
|
854
|
+
/* @__PURE__ */ jsx17(
|
|
855
|
+
"span",
|
|
856
|
+
{
|
|
857
|
+
className: "comment-node-file-name",
|
|
858
|
+
style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
859
|
+
children: fileName
|
|
860
|
+
}
|
|
861
|
+
),
|
|
862
|
+
sizeLabel ? /* @__PURE__ */ jsx17("span", { className: "comment-node-file-size", style: { fontSize: "0.8em", opacity: 0.7 }, children: sizeLabel }) : null
|
|
863
|
+
]
|
|
864
|
+
}
|
|
865
|
+
)
|
|
866
|
+
]
|
|
867
|
+
}
|
|
868
|
+
);
|
|
869
|
+
};
|
|
870
|
+
var CommentFileNode_default = CommentFileNode;
|
|
871
|
+
|
|
872
|
+
// src/components/controls/view/CommentNodeRenderer.tsx
|
|
873
|
+
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
454
874
|
var TextLeafNode = ({ node }) => {
|
|
455
875
|
let content = node.text;
|
|
456
|
-
if (node.code) content = /* @__PURE__ */
|
|
457
|
-
if (node.bold) content = /* @__PURE__ */
|
|
458
|
-
if (node.italic) content = /* @__PURE__ */
|
|
459
|
-
if (node.underline) content = /* @__PURE__ */
|
|
460
|
-
if (node.strikethrough) content = /* @__PURE__ */
|
|
461
|
-
return /* @__PURE__ */
|
|
876
|
+
if (node.code) content = /* @__PURE__ */ jsx18("code", { className: "comment-node-code", children: content });
|
|
877
|
+
if (node.bold) content = /* @__PURE__ */ jsx18("strong", { children: content });
|
|
878
|
+
if (node.italic) content = /* @__PURE__ */ jsx18("em", { children: content });
|
|
879
|
+
if (node.underline) content = /* @__PURE__ */ jsx18("u", { children: content });
|
|
880
|
+
if (node.strikethrough) content = /* @__PURE__ */ jsx18("s", { children: content });
|
|
881
|
+
return /* @__PURE__ */ jsx18(React14.Fragment, { children: content });
|
|
462
882
|
};
|
|
463
|
-
var renderChildren = (children, keyPrefix) => {
|
|
883
|
+
var renderChildren = (children, keyPrefix, assetBaseUrl) => {
|
|
464
884
|
if (!children || children.length === 0) {
|
|
465
885
|
return null;
|
|
466
886
|
}
|
|
467
887
|
return children.map((child, index) => {
|
|
468
888
|
const childKey = isTextNode(child) ? void 0 : asElementNode(child).id;
|
|
469
|
-
return /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ jsx18(
|
|
890
|
+
CommentNodeRenderer,
|
|
891
|
+
{
|
|
892
|
+
node: child,
|
|
893
|
+
assetBaseUrl
|
|
894
|
+
},
|
|
895
|
+
childKey ?? `${keyPrefix}-${index}`
|
|
896
|
+
);
|
|
470
897
|
});
|
|
471
898
|
};
|
|
472
899
|
var headingLevelFromTag = (tag) => {
|
|
@@ -474,70 +901,83 @@ var headingLevelFromTag = (tag) => {
|
|
|
474
901
|
const parsed = match ? Number(match[0]) : Number(tag);
|
|
475
902
|
return Number.isFinite(parsed) && parsed >= 1 && parsed <= 6 ? parsed : 3;
|
|
476
903
|
};
|
|
477
|
-
var CommentNodeRenderer = ({ node }) => {
|
|
904
|
+
var CommentNodeRenderer = ({ node, assetBaseUrl }) => {
|
|
478
905
|
if (!node || typeof node !== "object") {
|
|
479
906
|
return null;
|
|
480
907
|
}
|
|
481
908
|
if (isTextNode(node)) {
|
|
482
|
-
return /* @__PURE__ */
|
|
909
|
+
return /* @__PURE__ */ jsx18(TextLeafNode, { node });
|
|
483
910
|
}
|
|
484
911
|
const element = asElementNode(node);
|
|
485
912
|
const key = element.id ?? element.type;
|
|
486
913
|
switch (element.type) {
|
|
487
914
|
case "paragraph":
|
|
488
|
-
return /* @__PURE__ */
|
|
915
|
+
return /* @__PURE__ */ jsx18("p", { className: "comment-node-paragraph", children: renderChildren(element.children, key, assetBaseUrl) ?? /* @__PURE__ */ jsx18("br", {}) });
|
|
489
916
|
case "heading": {
|
|
490
917
|
const level = headingLevelFromTag(element.tag ?? element.level);
|
|
491
918
|
const HeadingTag = `h${level}`;
|
|
492
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ jsx18(HeadingTag, { className: "comment-node-heading", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
493
920
|
}
|
|
494
921
|
case "list": {
|
|
495
922
|
const ordered = element.listType === "number" || element.ordered === true;
|
|
496
923
|
const ListTag = ordered ? "ol" : "ul";
|
|
497
|
-
return /* @__PURE__ */
|
|
924
|
+
return /* @__PURE__ */ jsx18(ListTag, { className: "comment-node-list", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
498
925
|
}
|
|
499
926
|
case "listitem":
|
|
500
927
|
case "list-item":
|
|
501
|
-
return /* @__PURE__ */
|
|
928
|
+
return /* @__PURE__ */ jsx18("li", { className: "comment-node-listitem", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
502
929
|
case "quote":
|
|
503
930
|
case "blockquote":
|
|
504
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ jsx18("blockquote", { className: "comment-node-quote", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
505
932
|
case "code":
|
|
506
933
|
case "code-block":
|
|
507
|
-
return /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ jsx18("pre", { className: "comment-node-codeblock", children: /* @__PURE__ */ jsx18("code", { children: renderChildren(element.children, key, assetBaseUrl) }) });
|
|
935
|
+
case "image":
|
|
936
|
+
return /* @__PURE__ */ jsx18(CommentImageNode_default, { node: element, assetBaseUrl });
|
|
937
|
+
case "file":
|
|
938
|
+
return /* @__PURE__ */ jsx18(CommentFileNode_default, { node: element, assetBaseUrl });
|
|
508
939
|
case "link": {
|
|
509
940
|
const url = typeof element.url === "string" ? element.url : "#";
|
|
510
|
-
return /* @__PURE__ */
|
|
941
|
+
return /* @__PURE__ */ jsx18("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: "comment-node-link", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
511
942
|
}
|
|
512
943
|
case "mention": {
|
|
513
944
|
const label = element.label ?? element.mentionName ?? element.text ?? "";
|
|
514
|
-
return /* @__PURE__ */
|
|
945
|
+
return /* @__PURE__ */ jsxs8("span", { className: "comment-node-mention", children: [
|
|
515
946
|
"@",
|
|
516
947
|
label
|
|
517
948
|
] });
|
|
518
949
|
}
|
|
519
950
|
case "linebreak":
|
|
520
951
|
case "line-break":
|
|
521
|
-
return /* @__PURE__ */
|
|
952
|
+
return /* @__PURE__ */ jsx18("br", {});
|
|
522
953
|
default:
|
|
523
|
-
return /* @__PURE__ */
|
|
954
|
+
return /* @__PURE__ */ jsx18(React14.Fragment, { children: renderChildren(element.children, key, assetBaseUrl) });
|
|
524
955
|
}
|
|
525
956
|
};
|
|
526
957
|
var CommentNodeRenderer_default = CommentNodeRenderer;
|
|
527
958
|
|
|
528
959
|
// src/components/controls/view/Commentrenderer.tsx
|
|
529
|
-
import { jsx as
|
|
530
|
-
var CommentRenderer = ({ value, className }) => {
|
|
960
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
961
|
+
var CommentRenderer = ({ value, className, assetBaseUrl, apiBaseUrl }) => {
|
|
531
962
|
const nodes = React15.useMemo(() => parseSerializedContent(value), [value]);
|
|
532
963
|
if (!nodes || nodes.length === 0) {
|
|
533
964
|
return null;
|
|
534
965
|
}
|
|
535
|
-
|
|
966
|
+
const resolvedAssetBaseUrl = assetBaseUrl ?? apiBaseUrl;
|
|
967
|
+
console.log(resolvedAssetBaseUrl, "resolvedAssetBaseUrl");
|
|
968
|
+
return /* @__PURE__ */ jsx19("div", { className: className ?? "comment-renderer", children: nodes.map((node, index) => /* @__PURE__ */ jsx19(
|
|
969
|
+
CommentNodeRenderer_default,
|
|
970
|
+
{
|
|
971
|
+
node,
|
|
972
|
+
assetBaseUrl: resolvedAssetBaseUrl
|
|
973
|
+
},
|
|
974
|
+
node.id ?? `comment-node-${index}`
|
|
975
|
+
)) });
|
|
536
976
|
};
|
|
537
977
|
var Commentrenderer_default = CommentRenderer;
|
|
538
978
|
|
|
539
979
|
// src/components/controls/view/ViewControl.tsx
|
|
540
|
-
import { jsx as
|
|
980
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
541
981
|
var ViewControl = (props) => {
|
|
542
982
|
const ControlComponents = {
|
|
543
983
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
@@ -568,7 +1008,7 @@ var ViewControl = (props) => {
|
|
|
568
1008
|
[ViewControlTypes_default.commentRenderer]: Commentrenderer_default
|
|
569
1009
|
};
|
|
570
1010
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
571
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ jsx20(React16.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx20(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
572
1012
|
};
|
|
573
1013
|
var ViewControl_default = ViewControl;
|
|
574
1014
|
|
|
@@ -579,7 +1019,7 @@ import React26 from "react";
|
|
|
579
1019
|
import React18 from "react";
|
|
580
1020
|
|
|
581
1021
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
582
|
-
import { jsx as
|
|
1022
|
+
import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
583
1023
|
var TextNode = (props) => {
|
|
584
1024
|
function cssStringToJson(cssString) {
|
|
585
1025
|
const styleObject = {};
|
|
@@ -634,26 +1074,26 @@ var TextNode = (props) => {
|
|
|
634
1074
|
});
|
|
635
1075
|
}
|
|
636
1076
|
function renderWithLineBreaks(text) {
|
|
637
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */
|
|
1077
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs9("span", { children: [
|
|
638
1078
|
line,
|
|
639
|
-
index < arr.length - 1 && /* @__PURE__ */
|
|
1079
|
+
index < arr.length - 1 && /* @__PURE__ */ jsx21("br", {})
|
|
640
1080
|
] }, index));
|
|
641
1081
|
}
|
|
642
1082
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
643
1083
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
644
1084
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
645
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */
|
|
1085
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ jsx21("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ jsx21("sub", { children: content }) : content;
|
|
646
1086
|
return (
|
|
647
1087
|
// @ts-expect-error custom code
|
|
648
|
-
/* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ jsx21("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
649
1089
|
);
|
|
650
1090
|
};
|
|
651
1091
|
var TextNode_default = TextNode;
|
|
652
1092
|
|
|
653
1093
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
654
|
-
import { jsx as
|
|
1094
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
655
1095
|
var LineBreakNode = () => {
|
|
656
|
-
return /* @__PURE__ */
|
|
1096
|
+
return /* @__PURE__ */ jsx22("div", { className: "py-0.5 lg:py-1.5" });
|
|
657
1097
|
};
|
|
658
1098
|
var LineBreakNode_default = LineBreakNode;
|
|
659
1099
|
|
|
@@ -662,7 +1102,7 @@ import React17 from "react";
|
|
|
662
1102
|
|
|
663
1103
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
664
1104
|
import dynamic5 from "next/dynamic";
|
|
665
|
-
import { jsx as
|
|
1105
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
666
1106
|
var HlsPlayer2 = dynamic5(() => import("./HlsPlayer-IW52N5RG.mjs"), { ssr: false });
|
|
667
1107
|
var getNestedValue = (obj, path) => {
|
|
668
1108
|
if (!obj || !path) return void 0;
|
|
@@ -695,7 +1135,7 @@ var ImageNode = (props) => {
|
|
|
695
1135
|
assets = [image];
|
|
696
1136
|
}
|
|
697
1137
|
if (assets && assets.length > 0) {
|
|
698
|
-
return /* @__PURE__ */
|
|
1138
|
+
return /* @__PURE__ */ jsx23(
|
|
699
1139
|
DeviceAssetSelector_default,
|
|
700
1140
|
{
|
|
701
1141
|
device: props.device,
|
|
@@ -736,7 +1176,7 @@ var ImageNode = (props) => {
|
|
|
736
1176
|
right: "justify-end"
|
|
737
1177
|
};
|
|
738
1178
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
739
|
-
const renderMedia = () => isHls ? /* @__PURE__ */
|
|
1179
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ jsx23(
|
|
740
1180
|
HlsPlayer2,
|
|
741
1181
|
{
|
|
742
1182
|
assetUrl: imageUrl,
|
|
@@ -749,7 +1189,7 @@ var ImageNode = (props) => {
|
|
|
749
1189
|
apiBaseUrl: props.apiBaseUrl,
|
|
750
1190
|
session: props.session
|
|
751
1191
|
}
|
|
752
|
-
) : /* @__PURE__ */
|
|
1192
|
+
) : /* @__PURE__ */ jsx23(
|
|
753
1193
|
"img",
|
|
754
1194
|
{
|
|
755
1195
|
style: styles,
|
|
@@ -762,7 +1202,7 @@ var ImageNode = (props) => {
|
|
|
762
1202
|
}
|
|
763
1203
|
);
|
|
764
1204
|
if (props.node.width) {
|
|
765
|
-
return /* @__PURE__ */
|
|
1205
|
+
return /* @__PURE__ */ jsx23("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
766
1206
|
}
|
|
767
1207
|
return renderMedia();
|
|
768
1208
|
};
|
|
@@ -770,7 +1210,7 @@ var ImageNode_default = ImageNode;
|
|
|
770
1210
|
|
|
771
1211
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
772
1212
|
import dynamic6 from "next/dynamic";
|
|
773
|
-
import { Fragment, jsx as
|
|
1213
|
+
import { Fragment, jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
774
1214
|
var LinkNodeButton = dynamic6(() => import("./LinkNodeButton-BEAX4I4C.mjs"), {
|
|
775
1215
|
ssr: false
|
|
776
1216
|
});
|
|
@@ -823,13 +1263,13 @@ var LinkNode = (props) => {
|
|
|
823
1263
|
const isButton = node.isButton === true;
|
|
824
1264
|
const renderChildren2 = () => {
|
|
825
1265
|
if (!node.children || node.children.length === 0) return null;
|
|
826
|
-
return /* @__PURE__ */
|
|
1266
|
+
return /* @__PURE__ */ jsx24(Fragment, { children: node.children.map((childNode, index) => {
|
|
827
1267
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
828
1268
|
if (!SelectedNode) {
|
|
829
1269
|
console.warn("Unknown node type:", childNode.type);
|
|
830
1270
|
return null;
|
|
831
1271
|
}
|
|
832
|
-
return /* @__PURE__ */
|
|
1272
|
+
return /* @__PURE__ */ jsx24(React17.Fragment, { children: /* @__PURE__ */ jsx24(
|
|
833
1273
|
SelectedNode,
|
|
834
1274
|
{
|
|
835
1275
|
node: childNode,
|
|
@@ -842,15 +1282,15 @@ var LinkNode = (props) => {
|
|
|
842
1282
|
};
|
|
843
1283
|
const renderFallback = () => {
|
|
844
1284
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
845
|
-
return /* @__PURE__ */
|
|
1285
|
+
return /* @__PURE__ */ jsx24("span", { children: linkText });
|
|
846
1286
|
}
|
|
847
1287
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
848
|
-
return /* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ jsx24("br", {});
|
|
849
1289
|
}
|
|
850
1290
|
return null;
|
|
851
1291
|
};
|
|
852
1292
|
if (isButton) {
|
|
853
|
-
return /* @__PURE__ */
|
|
1293
|
+
return /* @__PURE__ */ jsxs10(
|
|
854
1294
|
LinkNodeButton,
|
|
855
1295
|
{
|
|
856
1296
|
node,
|
|
@@ -868,7 +1308,7 @@ var LinkNode = (props) => {
|
|
|
868
1308
|
}
|
|
869
1309
|
);
|
|
870
1310
|
}
|
|
871
|
-
return /* @__PURE__ */
|
|
1311
|
+
return /* @__PURE__ */ jsxs10(
|
|
872
1312
|
Hyperlink,
|
|
873
1313
|
{
|
|
874
1314
|
href: linkUrl || "#",
|
|
@@ -884,10 +1324,10 @@ var LinkNode = (props) => {
|
|
|
884
1324
|
var LinkNode_default = LinkNode;
|
|
885
1325
|
|
|
886
1326
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
887
|
-
import { jsx as
|
|
1327
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
888
1328
|
var SVGIconNode = ({ node }) => {
|
|
889
1329
|
if (!node?.svgCode) return null;
|
|
890
|
-
return /* @__PURE__ */
|
|
1330
|
+
return /* @__PURE__ */ jsx25(
|
|
891
1331
|
"span",
|
|
892
1332
|
{
|
|
893
1333
|
style: {
|
|
@@ -904,7 +1344,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
904
1344
|
|
|
905
1345
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
906
1346
|
import katex from "katex";
|
|
907
|
-
import { jsx as
|
|
1347
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
908
1348
|
var EquationNode = ({ node }) => {
|
|
909
1349
|
const { equation, inline } = node;
|
|
910
1350
|
let html = "";
|
|
@@ -919,7 +1359,7 @@ var EquationNode = ({ node }) => {
|
|
|
919
1359
|
});
|
|
920
1360
|
}
|
|
921
1361
|
if (inline) {
|
|
922
|
-
return /* @__PURE__ */
|
|
1362
|
+
return /* @__PURE__ */ jsx26(
|
|
923
1363
|
"span",
|
|
924
1364
|
{
|
|
925
1365
|
className: "katex-inline",
|
|
@@ -927,7 +1367,7 @@ var EquationNode = ({ node }) => {
|
|
|
927
1367
|
}
|
|
928
1368
|
);
|
|
929
1369
|
}
|
|
930
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ jsx26(
|
|
931
1371
|
"div",
|
|
932
1372
|
{
|
|
933
1373
|
className: "katex-block my-3 text-center",
|
|
@@ -938,7 +1378,7 @@ var EquationNode = ({ node }) => {
|
|
|
938
1378
|
var EquationNode_default = EquationNode;
|
|
939
1379
|
|
|
940
1380
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
941
|
-
import { jsx as
|
|
1381
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
942
1382
|
function getNestedProperty(obj, path) {
|
|
943
1383
|
if (!obj || !path) return null;
|
|
944
1384
|
if (path.includes(".")) {
|
|
@@ -951,7 +1391,7 @@ function getNestedProperty(obj, path) {
|
|
|
951
1391
|
}
|
|
952
1392
|
const value = obj[path];
|
|
953
1393
|
if (Array.isArray(value)) {
|
|
954
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
1394
|
+
return value.map((item, index) => /* @__PURE__ */ jsx27("div", { children: String(item) }, index));
|
|
955
1395
|
}
|
|
956
1396
|
return value;
|
|
957
1397
|
}
|
|
@@ -1014,7 +1454,7 @@ var DatafieldNode = (props) => {
|
|
|
1014
1454
|
const dataType = props.node.dataType;
|
|
1015
1455
|
if (isEmptyValue) return null;
|
|
1016
1456
|
if (dataType === "rawContent") {
|
|
1017
|
-
return /* @__PURE__ */
|
|
1457
|
+
return /* @__PURE__ */ jsx27(
|
|
1018
1458
|
PageBodyRenderer_default,
|
|
1019
1459
|
{
|
|
1020
1460
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -1030,17 +1470,19 @@ var DatafieldNode = (props) => {
|
|
|
1030
1470
|
}
|
|
1031
1471
|
);
|
|
1032
1472
|
}
|
|
1033
|
-
return /* @__PURE__ */
|
|
1473
|
+
return /* @__PURE__ */ jsx27(
|
|
1034
1474
|
"span",
|
|
1035
1475
|
{
|
|
1036
1476
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
1037
1477
|
style: styles,
|
|
1038
1478
|
title,
|
|
1039
|
-
children: /* @__PURE__ */
|
|
1479
|
+
children: /* @__PURE__ */ jsx27(
|
|
1040
1480
|
ViewControl_default,
|
|
1041
1481
|
{
|
|
1042
1482
|
controlType: dataType,
|
|
1043
|
-
value: value ?? `@databound[${fieldName}]
|
|
1483
|
+
value: value ?? `@databound[${fieldName}]`,
|
|
1484
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
1485
|
+
assetBaseUrl: props.assetBaseUrl
|
|
1044
1486
|
}
|
|
1045
1487
|
)
|
|
1046
1488
|
}
|
|
@@ -1049,7 +1491,7 @@ var DatafieldNode = (props) => {
|
|
|
1049
1491
|
var DatafieldNode_default = DatafieldNode;
|
|
1050
1492
|
|
|
1051
1493
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
1052
|
-
import { Fragment as Fragment2, jsx as
|
|
1494
|
+
import { Fragment as Fragment2, jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1053
1495
|
var ParagraphNode = (props) => {
|
|
1054
1496
|
const NodeTypes2 = {
|
|
1055
1497
|
["text"]: TextNode_default,
|
|
@@ -1069,42 +1511,44 @@ var ParagraphNode = (props) => {
|
|
|
1069
1511
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
1070
1512
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
1071
1513
|
if (isInlineOnlyParent) {
|
|
1072
|
-
return /* @__PURE__ */
|
|
1514
|
+
return /* @__PURE__ */ jsx28(Fragment2, { children: hasChildren && props.node.children.map((node, index) => {
|
|
1073
1515
|
const SelectedNode = NodeTypes2[node.type];
|
|
1074
|
-
return /* @__PURE__ */
|
|
1516
|
+
return /* @__PURE__ */ jsx28(React18.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx28(
|
|
1075
1517
|
SelectedNode,
|
|
1076
1518
|
{
|
|
1077
1519
|
node,
|
|
1078
1520
|
dataitem: props.dataitem,
|
|
1079
1521
|
session: props.session,
|
|
1080
1522
|
apiBaseUrl: props.apiBaseUrl,
|
|
1523
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
1081
1524
|
routeParameters: props.routeParameters
|
|
1082
1525
|
}
|
|
1083
1526
|
) }, index);
|
|
1084
1527
|
}) });
|
|
1085
1528
|
}
|
|
1086
|
-
return /* @__PURE__ */
|
|
1529
|
+
return /* @__PURE__ */ jsxs11("div", { className: " " + formatClasses, children: [
|
|
1087
1530
|
hasChildren && props.node.children.map((node, index) => {
|
|
1088
1531
|
const SelectedNode = NodeTypes2[node.type];
|
|
1089
|
-
return /* @__PURE__ */
|
|
1532
|
+
return /* @__PURE__ */ jsx28(React18.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx28(
|
|
1090
1533
|
SelectedNode,
|
|
1091
1534
|
{
|
|
1092
1535
|
node,
|
|
1093
1536
|
dataitem: props.dataitem,
|
|
1094
1537
|
session: props.session,
|
|
1095
1538
|
apiBaseUrl: props.apiBaseUrl,
|
|
1539
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
1096
1540
|
routeParameters: props.routeParameters
|
|
1097
1541
|
}
|
|
1098
1542
|
) }, index);
|
|
1099
1543
|
}),
|
|
1100
|
-
!hasChildren && /* @__PURE__ */
|
|
1544
|
+
!hasChildren && /* @__PURE__ */ jsx28("div", { className: "py-1.5 lg:py-2" })
|
|
1101
1545
|
] });
|
|
1102
1546
|
};
|
|
1103
1547
|
var ParagraphNode_default = ParagraphNode;
|
|
1104
1548
|
|
|
1105
1549
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
1106
1550
|
import React19 from "react";
|
|
1107
|
-
import { Fragment as Fragment3, jsx as
|
|
1551
|
+
import { Fragment as Fragment3, jsx as jsx29 } from "react/jsx-runtime";
|
|
1108
1552
|
var HeadingNode = (props) => {
|
|
1109
1553
|
const NodeTypes2 = {
|
|
1110
1554
|
["text"]: TextNode_default,
|
|
@@ -1120,12 +1564,12 @@ var HeadingNode = (props) => {
|
|
|
1120
1564
|
{
|
|
1121
1565
|
}
|
|
1122
1566
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
1123
|
-
return /* @__PURE__ */
|
|
1567
|
+
return /* @__PURE__ */ jsx29(Fragment3, { children: React19.createElement(
|
|
1124
1568
|
HeadingTag,
|
|
1125
1569
|
{ className: formatClasses },
|
|
1126
1570
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
1127
1571
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
1128
|
-
return /* @__PURE__ */
|
|
1572
|
+
return /* @__PURE__ */ jsx29(React19.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx29(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, assetBaseUrl: props.assetBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
1129
1573
|
})
|
|
1130
1574
|
) });
|
|
1131
1575
|
};
|
|
@@ -1136,7 +1580,7 @@ import React21 from "react";
|
|
|
1136
1580
|
|
|
1137
1581
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
1138
1582
|
import React20 from "react";
|
|
1139
|
-
import { jsx as
|
|
1583
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1140
1584
|
var ListItemNode = (props) => {
|
|
1141
1585
|
const NodeTypes2 = {
|
|
1142
1586
|
text: TextNode_default,
|
|
@@ -1153,37 +1597,37 @@ var ListItemNode = (props) => {
|
|
|
1153
1597
|
liStyle.fontSize = match[1].trim();
|
|
1154
1598
|
}
|
|
1155
1599
|
}
|
|
1156
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ jsx30("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
1157
1601
|
const SelectedNode = NodeTypes2[node.type];
|
|
1158
1602
|
if (node.type === "linebreak") {
|
|
1159
1603
|
if (!foundFirstBreak) {
|
|
1160
1604
|
foundFirstBreak = true;
|
|
1161
|
-
return /* @__PURE__ */
|
|
1605
|
+
return /* @__PURE__ */ jsx30("div", {}, index);
|
|
1162
1606
|
} else {
|
|
1163
|
-
return /* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ jsx30("div", { className: "py-1 lg:py-2" }, index);
|
|
1164
1608
|
}
|
|
1165
1609
|
} else {
|
|
1166
1610
|
foundFirstBreak = false;
|
|
1167
|
-
return /* @__PURE__ */
|
|
1611
|
+
return /* @__PURE__ */ jsx30(React20.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx30(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
1168
1612
|
}
|
|
1169
1613
|
}) });
|
|
1170
1614
|
};
|
|
1171
1615
|
var ListItemNode_default = ListItemNode;
|
|
1172
1616
|
|
|
1173
1617
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
1174
|
-
import { jsx as
|
|
1618
|
+
import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1175
1619
|
var ListNode = (props) => {
|
|
1176
1620
|
const NodeTypes2 = {
|
|
1177
1621
|
listitem: ListItemNode_default
|
|
1178
1622
|
};
|
|
1179
|
-
return /* @__PURE__ */
|
|
1180
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ jsxs12(React21.Fragment, { children: [
|
|
1624
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx31("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
1181
1625
|
const SelectedNode = NodeTypes2[node.type];
|
|
1182
|
-
return /* @__PURE__ */
|
|
1626
|
+
return /* @__PURE__ */ jsx31(React21.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx31(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
1183
1627
|
}) }),
|
|
1184
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
1628
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx31("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
1185
1629
|
const SelectedNode = NodeTypes2[node.type];
|
|
1186
|
-
return /* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ jsx31(React21.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx31(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
1187
1631
|
}) })
|
|
1188
1632
|
] });
|
|
1189
1633
|
};
|
|
@@ -1191,16 +1635,16 @@ var ListNode_default = ListNode;
|
|
|
1191
1635
|
|
|
1192
1636
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
1193
1637
|
import React22 from "react";
|
|
1194
|
-
import { jsx as
|
|
1638
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1195
1639
|
var QuoteNode = (props) => {
|
|
1196
1640
|
const NodeTypes2 = {
|
|
1197
1641
|
["text"]: TextNode_default,
|
|
1198
1642
|
["linebreak"]: LineBreakNode_default,
|
|
1199
1643
|
["link"]: LinkNode_default
|
|
1200
1644
|
};
|
|
1201
|
-
return /* @__PURE__ */
|
|
1645
|
+
return /* @__PURE__ */ jsx32("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
1202
1646
|
const SelectedNode = NodeTypes2[node.type];
|
|
1203
|
-
return /* @__PURE__ */
|
|
1647
|
+
return /* @__PURE__ */ jsx32(React22.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx32(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
1204
1648
|
}) });
|
|
1205
1649
|
};
|
|
1206
1650
|
var QuoteNode_default = QuoteNode;
|
|
@@ -1208,11 +1652,11 @@ var QuoteNode_default = QuoteNode;
|
|
|
1208
1652
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
1209
1653
|
import React23 from "react";
|
|
1210
1654
|
import dynamic7 from "next/dynamic";
|
|
1211
|
-
import { jsx as
|
|
1655
|
+
import { jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1212
1656
|
var CopyButton = dynamic7(() => import("./CopyButton-UPJPMJUB.mjs"), {
|
|
1213
1657
|
ssr: false,
|
|
1214
1658
|
// optional: fallback UI while loading
|
|
1215
|
-
loading: () => /* @__PURE__ */
|
|
1659
|
+
loading: () => /* @__PURE__ */ jsx33("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
1216
1660
|
});
|
|
1217
1661
|
var CodeNode = (props) => {
|
|
1218
1662
|
const NodeTypes2 = {
|
|
@@ -1226,14 +1670,14 @@ var CodeNode = (props) => {
|
|
|
1226
1670
|
if (node.type === "link") return node.text || node.url || "";
|
|
1227
1671
|
return "";
|
|
1228
1672
|
}).join("") ?? "";
|
|
1229
|
-
return /* @__PURE__ */
|
|
1230
|
-
/* @__PURE__ */
|
|
1231
|
-
/* @__PURE__ */
|
|
1232
|
-
/* @__PURE__ */
|
|
1673
|
+
return /* @__PURE__ */ jsxs13("div", { children: [
|
|
1674
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
1675
|
+
/* @__PURE__ */ jsx33("span", { children: "Code Snippet" }),
|
|
1676
|
+
/* @__PURE__ */ jsx33(CopyButton, { text: textContent })
|
|
1233
1677
|
] }),
|
|
1234
|
-
/* @__PURE__ */
|
|
1678
|
+
/* @__PURE__ */ jsx33("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) => {
|
|
1235
1679
|
const SelectedNode = NodeTypes2[node.type];
|
|
1236
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ jsx33(React23.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx33(
|
|
1237
1681
|
SelectedNode,
|
|
1238
1682
|
{
|
|
1239
1683
|
node,
|
|
@@ -1248,15 +1692,15 @@ var CodeNode = (props) => {
|
|
|
1248
1692
|
var CodeNode_default = CodeNode;
|
|
1249
1693
|
|
|
1250
1694
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
1251
|
-
import { jsx as
|
|
1695
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1252
1696
|
var HorizontalRuleNode = () => {
|
|
1253
|
-
return /* @__PURE__ */
|
|
1697
|
+
return /* @__PURE__ */ jsx34("hr", {});
|
|
1254
1698
|
};
|
|
1255
1699
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
1256
1700
|
|
|
1257
1701
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
1258
1702
|
import React24 from "react";
|
|
1259
|
-
import { Fragment as Fragment4, jsx as
|
|
1703
|
+
import { Fragment as Fragment4, jsx as jsx35 } from "react/jsx-runtime";
|
|
1260
1704
|
var WidgetNode = (props) => {
|
|
1261
1705
|
const getWidgetParameters = () => {
|
|
1262
1706
|
const widgetInputParameters = {
|
|
@@ -1320,7 +1764,7 @@ var WidgetNode = (props) => {
|
|
|
1320
1764
|
};
|
|
1321
1765
|
const widgetCode = props.node?.widgetCode;
|
|
1322
1766
|
if (!widgetCode) {
|
|
1323
|
-
return /* @__PURE__ */
|
|
1767
|
+
return /* @__PURE__ */ jsx35(Fragment4, { children: "Invalid widget" });
|
|
1324
1768
|
}
|
|
1325
1769
|
const widgetParams = getWidgetParameters();
|
|
1326
1770
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -1329,7 +1773,7 @@ var WidgetNode = (props) => {
|
|
|
1329
1773
|
}
|
|
1330
1774
|
return (
|
|
1331
1775
|
// eslint-disable-next-line react-hooks/static-components
|
|
1332
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ jsx35(React24.Fragment, { children: /* @__PURE__ */ jsx35(
|
|
1333
1777
|
WidgetRenderer,
|
|
1334
1778
|
{
|
|
1335
1779
|
params: widgetParams,
|
|
@@ -1351,7 +1795,7 @@ import React25 from "react";
|
|
|
1351
1795
|
|
|
1352
1796
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
1353
1797
|
import dynamic8 from "next/dynamic";
|
|
1354
|
-
import { jsx as
|
|
1798
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1355
1799
|
var IframeClient = dynamic8(() => import("./IframeClient-WF2KLXZB.mjs"), {
|
|
1356
1800
|
ssr: false
|
|
1357
1801
|
});
|
|
@@ -1364,7 +1808,7 @@ var EmbedNode = (props) => {
|
|
|
1364
1808
|
} else {
|
|
1365
1809
|
src = props.node.embedSrc;
|
|
1366
1810
|
}
|
|
1367
|
-
return /* @__PURE__ */
|
|
1811
|
+
return /* @__PURE__ */ jsx36("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx36(IframeClient, { src }) });
|
|
1368
1812
|
};
|
|
1369
1813
|
var EmbedNode_default = EmbedNode;
|
|
1370
1814
|
|
|
@@ -1557,10 +2001,10 @@ var PathUtility = class {
|
|
|
1557
2001
|
var PathUtility_default = new PathUtility();
|
|
1558
2002
|
|
|
1559
2003
|
// src/components/NoDataFound.tsx
|
|
1560
|
-
import { jsx as
|
|
2004
|
+
import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1561
2005
|
var NoDataFound = () => {
|
|
1562
|
-
return /* @__PURE__ */
|
|
1563
|
-
/* @__PURE__ */
|
|
2006
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
2007
|
+
/* @__PURE__ */ jsx37("div", { className: "mb-5", children: /* @__PURE__ */ jsx37("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx37(
|
|
1564
2008
|
"svg",
|
|
1565
2009
|
{
|
|
1566
2010
|
className: "w-10 h-10",
|
|
@@ -1568,7 +2012,7 @@ var NoDataFound = () => {
|
|
|
1568
2012
|
stroke: "currentColor",
|
|
1569
2013
|
viewBox: "0 0 24 24",
|
|
1570
2014
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1571
|
-
children: /* @__PURE__ */
|
|
2015
|
+
children: /* @__PURE__ */ jsx37(
|
|
1572
2016
|
"path",
|
|
1573
2017
|
{
|
|
1574
2018
|
strokeLinecap: "round",
|
|
@@ -1579,15 +2023,15 @@ var NoDataFound = () => {
|
|
|
1579
2023
|
)
|
|
1580
2024
|
}
|
|
1581
2025
|
) }) }),
|
|
1582
|
-
/* @__PURE__ */
|
|
1583
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ jsx37("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
2027
|
+
/* @__PURE__ */ jsx37("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
1584
2028
|
] });
|
|
1585
2029
|
};
|
|
1586
2030
|
var NoDataFound_default = NoDataFound;
|
|
1587
2031
|
|
|
1588
2032
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
1589
2033
|
import dynamic9 from "next/dynamic";
|
|
1590
|
-
import { Fragment as Fragment5, jsx as
|
|
2034
|
+
import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1591
2035
|
var HlsPlayer3 = dynamic9(() => import("./HlsPlayer-IW52N5RG.mjs"), { ssr: false });
|
|
1592
2036
|
var deviceToMediaQuery = (device) => {
|
|
1593
2037
|
switch (device) {
|
|
@@ -1743,8 +2187,8 @@ var ImageGalleryNode = (props) => {
|
|
|
1743
2187
|
right: "justify-end"
|
|
1744
2188
|
};
|
|
1745
2189
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
1746
|
-
return /* @__PURE__ */
|
|
1747
|
-
hlsSources.length > 0 && /* @__PURE__ */
|
|
2190
|
+
return /* @__PURE__ */ jsxs15(Fragment5, { children: [
|
|
2191
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx38(Fragment5, { children: /* @__PURE__ */ jsx38(
|
|
1748
2192
|
HlsPlayer3,
|
|
1749
2193
|
{
|
|
1750
2194
|
sources: hlsSources,
|
|
@@ -1759,7 +2203,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1759
2203
|
styles: hlsStyles
|
|
1760
2204
|
}
|
|
1761
2205
|
) }),
|
|
1762
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */
|
|
2206
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ jsx38(Fragment5, { children: staticFallback ? /* @__PURE__ */ jsxs15("picture", { children: [
|
|
1763
2207
|
DEVICE_ORDER.map((deviceKey) => {
|
|
1764
2208
|
const match = staticSources.find(
|
|
1765
2209
|
(img) => img.device === deviceKey
|
|
@@ -1775,7 +2219,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1775
2219
|
if (!srcUrl) {
|
|
1776
2220
|
return null;
|
|
1777
2221
|
}
|
|
1778
|
-
return /* @__PURE__ */
|
|
2222
|
+
return /* @__PURE__ */ jsx38(
|
|
1779
2223
|
"source",
|
|
1780
2224
|
{
|
|
1781
2225
|
media: deviceToMediaQuery(match.device),
|
|
@@ -1800,7 +2244,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1800
2244
|
if (img.borderRadius) {
|
|
1801
2245
|
styles.borderRadius = img.borderRadius;
|
|
1802
2246
|
}
|
|
1803
|
-
return /* @__PURE__ */
|
|
2247
|
+
return /* @__PURE__ */ jsx38(
|
|
1804
2248
|
"img",
|
|
1805
2249
|
{
|
|
1806
2250
|
loading: "lazy",
|
|
@@ -1815,7 +2259,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1815
2259
|
})()
|
|
1816
2260
|
] }) : (
|
|
1817
2261
|
/* Case 2: Only device-specific images exist */
|
|
1818
|
-
/* @__PURE__ */
|
|
2262
|
+
/* @__PURE__ */ jsx38(Fragment5, { children: staticSources.map((img, index) => {
|
|
1819
2263
|
const resolved = resolveImage(img);
|
|
1820
2264
|
const imageUrl = resolved?.imageUrl;
|
|
1821
2265
|
if (!imageUrl) {
|
|
@@ -1842,7 +2286,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1842
2286
|
default:
|
|
1843
2287
|
display = "block";
|
|
1844
2288
|
}
|
|
1845
|
-
return /* @__PURE__ */
|
|
2289
|
+
return /* @__PURE__ */ jsx38(
|
|
1846
2290
|
"img",
|
|
1847
2291
|
{
|
|
1848
2292
|
loading: "lazy",
|
|
@@ -1982,28 +2426,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
1982
2426
|
};
|
|
1983
2427
|
|
|
1984
2428
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
1985
|
-
import { Fragment as Fragment6, jsx as
|
|
2429
|
+
import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1986
2430
|
var getNestedValue5 = (obj, path) => {
|
|
1987
2431
|
if (!obj || !path) return void 0;
|
|
1988
2432
|
return path.split(".").reduce((current, key) => {
|
|
1989
2433
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
1990
2434
|
}, obj);
|
|
1991
2435
|
};
|
|
1992
|
-
var
|
|
2436
|
+
var PdfIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
1993
2437
|
"svg",
|
|
1994
2438
|
{
|
|
1995
2439
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1996
2440
|
viewBox: "0 0 48 48",
|
|
1997
2441
|
className: "w-10 h-10",
|
|
1998
2442
|
children: [
|
|
1999
|
-
/* @__PURE__ */
|
|
2443
|
+
/* @__PURE__ */ jsx39(
|
|
2000
2444
|
"path",
|
|
2001
2445
|
{
|
|
2002
2446
|
fill: "#e53935",
|
|
2003
2447
|
d: "M38,42H10c-2.209,0-4-1.791-4-4V10c0-2.209,1.791-4,4-4h28c2.209,0,4,1.791,4,4v28 C42,40.209,40.209,42,38,42z"
|
|
2004
2448
|
}
|
|
2005
2449
|
),
|
|
2006
|
-
/* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ jsx39(
|
|
2007
2451
|
"path",
|
|
2008
2452
|
{
|
|
2009
2453
|
fill: "#fff",
|
|
@@ -2013,55 +2457,55 @@ var PdfIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2013
2457
|
]
|
|
2014
2458
|
}
|
|
2015
2459
|
);
|
|
2016
|
-
var
|
|
2460
|
+
var ExcelIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
2017
2461
|
"svg",
|
|
2018
2462
|
{
|
|
2019
2463
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2020
2464
|
viewBox: "0 0 48 48",
|
|
2021
2465
|
className: "w-10 h-10",
|
|
2022
2466
|
children: [
|
|
2023
|
-
/* @__PURE__ */
|
|
2467
|
+
/* @__PURE__ */ jsx39(
|
|
2024
2468
|
"path",
|
|
2025
2469
|
{
|
|
2026
2470
|
fill: "#169154",
|
|
2027
2471
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
2028
2472
|
}
|
|
2029
2473
|
),
|
|
2030
|
-
/* @__PURE__ */
|
|
2474
|
+
/* @__PURE__ */ jsx39(
|
|
2031
2475
|
"path",
|
|
2032
2476
|
{
|
|
2033
2477
|
fill: "#18482a",
|
|
2034
2478
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
2035
2479
|
}
|
|
2036
2480
|
),
|
|
2037
|
-
/* @__PURE__ */
|
|
2038
|
-
/* @__PURE__ */
|
|
2039
|
-
/* @__PURE__ */
|
|
2040
|
-
/* @__PURE__ */
|
|
2481
|
+
/* @__PURE__ */ jsx39("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
2482
|
+
/* @__PURE__ */ jsx39("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
2483
|
+
/* @__PURE__ */ jsxs16("g", { children: [
|
|
2484
|
+
/* @__PURE__ */ jsx39(
|
|
2041
2485
|
"path",
|
|
2042
2486
|
{
|
|
2043
2487
|
fill: "#29c27f",
|
|
2044
2488
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
2045
2489
|
}
|
|
2046
2490
|
),
|
|
2047
|
-
/* @__PURE__ */
|
|
2491
|
+
/* @__PURE__ */ jsx39(
|
|
2048
2492
|
"path",
|
|
2049
2493
|
{
|
|
2050
2494
|
fill: "#27663f",
|
|
2051
2495
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
2052
2496
|
}
|
|
2053
2497
|
),
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2498
|
+
/* @__PURE__ */ jsx39("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
2499
|
+
/* @__PURE__ */ jsx39("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
2056
2500
|
] }),
|
|
2057
|
-
/* @__PURE__ */
|
|
2501
|
+
/* @__PURE__ */ jsx39(
|
|
2058
2502
|
"path",
|
|
2059
2503
|
{
|
|
2060
2504
|
fill: "#0c7238",
|
|
2061
2505
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
2062
2506
|
}
|
|
2063
2507
|
),
|
|
2064
|
-
/* @__PURE__ */
|
|
2508
|
+
/* @__PURE__ */ jsx39(
|
|
2065
2509
|
"path",
|
|
2066
2510
|
{
|
|
2067
2511
|
fill: "#fff",
|
|
@@ -2071,7 +2515,7 @@ var ExcelIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2071
2515
|
]
|
|
2072
2516
|
}
|
|
2073
2517
|
);
|
|
2074
|
-
var
|
|
2518
|
+
var WordIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
2075
2519
|
"svg",
|
|
2076
2520
|
{
|
|
2077
2521
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2079,14 +2523,14 @@ var WordIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2079
2523
|
className: "w-10 h-10",
|
|
2080
2524
|
baseProfile: "basic",
|
|
2081
2525
|
children: [
|
|
2082
|
-
/* @__PURE__ */
|
|
2526
|
+
/* @__PURE__ */ jsx39(
|
|
2083
2527
|
"path",
|
|
2084
2528
|
{
|
|
2085
2529
|
fill: "#283593",
|
|
2086
2530
|
d: "M9,33.595l14.911-18.706L41,26v13.306C41,41.346,39.346,43,37.306,43H15.332 C11.835,43,9,40.164,9,36.667C9,36.667,9,33.595,9,33.595z"
|
|
2087
2531
|
}
|
|
2088
2532
|
),
|
|
2089
|
-
/* @__PURE__ */
|
|
2533
|
+
/* @__PURE__ */ jsxs16(
|
|
2090
2534
|
"linearGradient",
|
|
2091
2535
|
{
|
|
2092
2536
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -2097,19 +2541,19 @@ var WordIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2097
2541
|
gradientTransform: "translate(0 -339.89)",
|
|
2098
2542
|
gradientUnits: "userSpaceOnUse",
|
|
2099
2543
|
children: [
|
|
2100
|
-
/* @__PURE__ */
|
|
2101
|
-
/* @__PURE__ */
|
|
2544
|
+
/* @__PURE__ */ jsx39("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
2545
|
+
/* @__PURE__ */ jsx39("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
2102
2546
|
]
|
|
2103
2547
|
}
|
|
2104
2548
|
),
|
|
2105
|
-
/* @__PURE__ */
|
|
2549
|
+
/* @__PURE__ */ jsx39(
|
|
2106
2550
|
"path",
|
|
2107
2551
|
{
|
|
2108
2552
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
2109
2553
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
2110
2554
|
}
|
|
2111
2555
|
),
|
|
2112
|
-
/* @__PURE__ */
|
|
2556
|
+
/* @__PURE__ */ jsx39(
|
|
2113
2557
|
"path",
|
|
2114
2558
|
{
|
|
2115
2559
|
fill: "#1e88e5",
|
|
@@ -2117,21 +2561,21 @@ var WordIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2117
2561
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
2118
2562
|
}
|
|
2119
2563
|
),
|
|
2120
|
-
/* @__PURE__ */
|
|
2564
|
+
/* @__PURE__ */ jsx39(
|
|
2121
2565
|
"path",
|
|
2122
2566
|
{
|
|
2123
2567
|
fill: "#00e5ff",
|
|
2124
2568
|
d: "M9,10.333C9,6.836,11.835,4,15.332,4h21.975C39.346,4,41,5.654,41,7.694v5.611 C41,15.346,39.346,17,37.306,17H15.332C11.835,17,9,19.836,9,23.333C9,23.333,9,10.333,9,10.333z"
|
|
2125
2569
|
}
|
|
2126
2570
|
),
|
|
2127
|
-
/* @__PURE__ */
|
|
2571
|
+
/* @__PURE__ */ jsx39(
|
|
2128
2572
|
"path",
|
|
2129
2573
|
{
|
|
2130
2574
|
fill: "#1565c0",
|
|
2131
2575
|
d: "M7.5,23h10c1.933,0,3.5,1.567,3.5,3.5v10c0,1.933-1.567,3.5-3.5,3.5h-10C5.567,40,4,38.433,4,36.5 v-10C4,24.567,5.567,23,7.5,23z"
|
|
2132
2576
|
}
|
|
2133
2577
|
),
|
|
2134
|
-
/* @__PURE__ */
|
|
2578
|
+
/* @__PURE__ */ jsx39(
|
|
2135
2579
|
"path",
|
|
2136
2580
|
{
|
|
2137
2581
|
fill: "#fff",
|
|
@@ -2141,42 +2585,42 @@ var WordIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2141
2585
|
]
|
|
2142
2586
|
}
|
|
2143
2587
|
);
|
|
2144
|
-
var
|
|
2588
|
+
var StandardIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
2145
2589
|
"svg",
|
|
2146
2590
|
{
|
|
2147
2591
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2148
2592
|
viewBox: "0 0 48 48",
|
|
2149
2593
|
className: "w-10 h-10",
|
|
2150
2594
|
children: [
|
|
2151
|
-
/* @__PURE__ */
|
|
2152
|
-
/* @__PURE__ */
|
|
2595
|
+
/* @__PURE__ */ jsx39("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
2596
|
+
/* @__PURE__ */ jsx39("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
2153
2597
|
]
|
|
2154
2598
|
}
|
|
2155
2599
|
);
|
|
2156
|
-
var
|
|
2600
|
+
var PowerPointIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
2157
2601
|
"svg",
|
|
2158
2602
|
{
|
|
2159
2603
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2160
2604
|
viewBox: "0 0 48 48",
|
|
2161
2605
|
className: "w-10 h-10",
|
|
2162
2606
|
children: [
|
|
2163
|
-
/* @__PURE__ */
|
|
2607
|
+
/* @__PURE__ */ jsx39(
|
|
2164
2608
|
"path",
|
|
2165
2609
|
{
|
|
2166
2610
|
fill: "#dc4c2c",
|
|
2167
2611
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
2168
2612
|
}
|
|
2169
2613
|
),
|
|
2170
|
-
/* @__PURE__ */
|
|
2171
|
-
/* @__PURE__ */
|
|
2172
|
-
/* @__PURE__ */
|
|
2614
|
+
/* @__PURE__ */ jsx39("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
2615
|
+
/* @__PURE__ */ jsx39("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
2616
|
+
/* @__PURE__ */ jsx39(
|
|
2173
2617
|
"path",
|
|
2174
2618
|
{
|
|
2175
2619
|
fill: "#9b341f",
|
|
2176
2620
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
2177
2621
|
}
|
|
2178
2622
|
),
|
|
2179
|
-
/* @__PURE__ */
|
|
2623
|
+
/* @__PURE__ */ jsx39(
|
|
2180
2624
|
"path",
|
|
2181
2625
|
{
|
|
2182
2626
|
fill: "#fff",
|
|
@@ -2186,16 +2630,16 @@ var PowerPointIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2186
2630
|
]
|
|
2187
2631
|
}
|
|
2188
2632
|
);
|
|
2189
|
-
var
|
|
2633
|
+
var TextIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
2190
2634
|
"svg",
|
|
2191
2635
|
{
|
|
2192
2636
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2193
2637
|
viewBox: "0 0 48 48",
|
|
2194
2638
|
className: "w-10 h-10",
|
|
2195
2639
|
children: [
|
|
2196
|
-
/* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2640
|
+
/* @__PURE__ */ jsx39("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
2641
|
+
/* @__PURE__ */ jsx39("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
2642
|
+
/* @__PURE__ */ jsx39(
|
|
2199
2643
|
"path",
|
|
2200
2644
|
{
|
|
2201
2645
|
fill: "#1976D2",
|
|
@@ -2205,7 +2649,7 @@ var TextIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2205
2649
|
]
|
|
2206
2650
|
}
|
|
2207
2651
|
);
|
|
2208
|
-
var
|
|
2652
|
+
var ArchiveIcon2 = () => /* @__PURE__ */ jsxs16(
|
|
2209
2653
|
"svg",
|
|
2210
2654
|
{
|
|
2211
2655
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2215,14 +2659,14 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2215
2659
|
version: "1.0",
|
|
2216
2660
|
className: "w-10 h-10",
|
|
2217
2661
|
children: [
|
|
2218
|
-
/* @__PURE__ */
|
|
2662
|
+
/* @__PURE__ */ jsx39("defs", { children: /* @__PURE__ */ jsx39("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ jsx39(
|
|
2219
2663
|
"path",
|
|
2220
2664
|
{
|
|
2221
2665
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
2222
2666
|
"clip-rule": "nonzero"
|
|
2223
2667
|
}
|
|
2224
2668
|
) }) }),
|
|
2225
|
-
/* @__PURE__ */
|
|
2669
|
+
/* @__PURE__ */ jsx39("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ jsx39(
|
|
2226
2670
|
"path",
|
|
2227
2671
|
{
|
|
2228
2672
|
fill: "#ff9100",
|
|
@@ -2231,7 +2675,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2231
2675
|
"fill-rule": "nonzero"
|
|
2232
2676
|
}
|
|
2233
2677
|
) }),
|
|
2234
|
-
/* @__PURE__ */
|
|
2678
|
+
/* @__PURE__ */ jsx39(
|
|
2235
2679
|
"path",
|
|
2236
2680
|
{
|
|
2237
2681
|
fill: "#fbe9e7",
|
|
@@ -2240,7 +2684,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2240
2684
|
"fill-rule": "nonzero"
|
|
2241
2685
|
}
|
|
2242
2686
|
),
|
|
2243
|
-
/* @__PURE__ */
|
|
2687
|
+
/* @__PURE__ */ jsx39(
|
|
2244
2688
|
"path",
|
|
2245
2689
|
{
|
|
2246
2690
|
fill: "#ffe0b2",
|
|
@@ -2249,7 +2693,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2249
2693
|
"fill-rule": "nonzero"
|
|
2250
2694
|
}
|
|
2251
2695
|
),
|
|
2252
|
-
/* @__PURE__ */
|
|
2696
|
+
/* @__PURE__ */ jsx39(
|
|
2253
2697
|
"path",
|
|
2254
2698
|
{
|
|
2255
2699
|
fill: "#ffe0b2",
|
|
@@ -2258,7 +2702,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2258
2702
|
"fill-rule": "nonzero"
|
|
2259
2703
|
}
|
|
2260
2704
|
),
|
|
2261
|
-
/* @__PURE__ */
|
|
2705
|
+
/* @__PURE__ */ jsx39(
|
|
2262
2706
|
"path",
|
|
2263
2707
|
{
|
|
2264
2708
|
fill: "#ffe0b2",
|
|
@@ -2270,28 +2714,28 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2270
2714
|
]
|
|
2271
2715
|
}
|
|
2272
2716
|
);
|
|
2273
|
-
var
|
|
2717
|
+
var getFileDetails2 = (url) => {
|
|
2274
2718
|
const extMatch = url.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);
|
|
2275
2719
|
const ext = extMatch ? extMatch[1].toLowerCase() : "";
|
|
2276
|
-
let Icon =
|
|
2720
|
+
let Icon = StandardIcon2;
|
|
2277
2721
|
let extLabel = "FILE";
|
|
2278
2722
|
if (ext === "pdf") {
|
|
2279
|
-
Icon =
|
|
2723
|
+
Icon = PdfIcon2;
|
|
2280
2724
|
extLabel = "PDF";
|
|
2281
2725
|
} else if (["xls", "xlsx", "csv"].includes(ext)) {
|
|
2282
|
-
Icon =
|
|
2726
|
+
Icon = ExcelIcon2;
|
|
2283
2727
|
extLabel = "Excel";
|
|
2284
2728
|
} else if (["doc", "docx"].includes(ext)) {
|
|
2285
|
-
Icon =
|
|
2729
|
+
Icon = WordIcon2;
|
|
2286
2730
|
extLabel = "Word";
|
|
2287
2731
|
} else if (["ppt", "pptx"].includes(ext)) {
|
|
2288
|
-
Icon =
|
|
2732
|
+
Icon = PowerPointIcon2;
|
|
2289
2733
|
extLabel = "PowerPoint";
|
|
2290
2734
|
} else if (["txt", "rtf"].includes(ext)) {
|
|
2291
|
-
Icon =
|
|
2735
|
+
Icon = TextIcon2;
|
|
2292
2736
|
extLabel = "Text";
|
|
2293
2737
|
} else if (["zip", "rar", "7z"].includes(ext)) {
|
|
2294
|
-
Icon =
|
|
2738
|
+
Icon = ArchiveIcon2;
|
|
2295
2739
|
extLabel = "Archive";
|
|
2296
2740
|
} else if (ext) {
|
|
2297
2741
|
extLabel = ext.toUpperCase();
|
|
@@ -2333,8 +2777,8 @@ var DocumentNode = (props) => {
|
|
|
2333
2777
|
}
|
|
2334
2778
|
}
|
|
2335
2779
|
if (documents.length === 0) {
|
|
2336
|
-
return /* @__PURE__ */
|
|
2337
|
-
/* @__PURE__ */
|
|
2780
|
+
return /* @__PURE__ */ jsx39(Fragment6, { children: /* @__PURE__ */ jsxs16("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
2781
|
+
/* @__PURE__ */ jsx39("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx39(
|
|
2338
2782
|
"svg",
|
|
2339
2783
|
{
|
|
2340
2784
|
className: "w-5 h-5",
|
|
@@ -2342,7 +2786,7 @@ var DocumentNode = (props) => {
|
|
|
2342
2786
|
stroke: "currentColor",
|
|
2343
2787
|
viewBox: "0 0 24 24",
|
|
2344
2788
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2345
|
-
children: /* @__PURE__ */
|
|
2789
|
+
children: /* @__PURE__ */ jsx39(
|
|
2346
2790
|
"path",
|
|
2347
2791
|
{
|
|
2348
2792
|
strokeLinecap: "round",
|
|
@@ -2353,11 +2797,11 @@ var DocumentNode = (props) => {
|
|
|
2353
2797
|
)
|
|
2354
2798
|
}
|
|
2355
2799
|
) }),
|
|
2356
|
-
/* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2800
|
+
/* @__PURE__ */ jsx39("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
2801
|
+
/* @__PURE__ */ jsx39("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
2358
2802
|
] }) });
|
|
2359
2803
|
}
|
|
2360
|
-
return /* @__PURE__ */
|
|
2804
|
+
return /* @__PURE__ */ jsx39("div", { className: "", children: documents.map((doc, index) => {
|
|
2361
2805
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
2362
2806
|
props.assetBaseUrl,
|
|
2363
2807
|
doc.assetUrl
|
|
@@ -2374,17 +2818,17 @@ var DocumentNode = (props) => {
|
|
|
2374
2818
|
documentTitle = documentUrl.split("/").pop()?.replace(/\.[^/.]+$/, "") || "Document";
|
|
2375
2819
|
}
|
|
2376
2820
|
}
|
|
2377
|
-
const { Icon, extLabel } =
|
|
2378
|
-
return /* @__PURE__ */
|
|
2821
|
+
const { Icon, extLabel } = getFileDetails2(documentUrl);
|
|
2822
|
+
return /* @__PURE__ */ jsxs16(
|
|
2379
2823
|
"div",
|
|
2380
2824
|
{
|
|
2381
2825
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
2382
2826
|
children: [
|
|
2383
|
-
/* @__PURE__ */
|
|
2384
|
-
/* @__PURE__ */
|
|
2385
|
-
/* @__PURE__ */
|
|
2827
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center space-x-4", children: [
|
|
2828
|
+
/* @__PURE__ */ jsx39("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft", children: /* @__PURE__ */ jsx39(Icon, {}) }),
|
|
2829
|
+
/* @__PURE__ */ jsx39("div", { className: "flex items-baseline space-x-2", children: /* @__PURE__ */ jsx39("h4", { className: "text-base font-semibold", children: documentTitle }) })
|
|
2386
2830
|
] }),
|
|
2387
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ jsxs16(
|
|
2388
2832
|
"a",
|
|
2389
2833
|
{
|
|
2390
2834
|
href: documentUrl,
|
|
@@ -2392,7 +2836,7 @@ var DocumentNode = (props) => {
|
|
|
2392
2836
|
rel: "noopener noreferrer",
|
|
2393
2837
|
className: "inline-flex items-center px-4 py-2 text-sm font-medium bg-default border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors",
|
|
2394
2838
|
children: [
|
|
2395
|
-
/* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ jsxs16(
|
|
2396
2840
|
"svg",
|
|
2397
2841
|
{
|
|
2398
2842
|
className: "w-4 h-4 mr-2",
|
|
@@ -2400,7 +2844,7 @@ var DocumentNode = (props) => {
|
|
|
2400
2844
|
stroke: "currentColor",
|
|
2401
2845
|
viewBox: "0 0 24 24",
|
|
2402
2846
|
children: [
|
|
2403
|
-
/* @__PURE__ */
|
|
2847
|
+
/* @__PURE__ */ jsx39(
|
|
2404
2848
|
"path",
|
|
2405
2849
|
{
|
|
2406
2850
|
strokeLinecap: "round",
|
|
@@ -2409,7 +2853,7 @@ var DocumentNode = (props) => {
|
|
|
2409
2853
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
2410
2854
|
}
|
|
2411
2855
|
),
|
|
2412
|
-
/* @__PURE__ */
|
|
2856
|
+
/* @__PURE__ */ jsx39(
|
|
2413
2857
|
"path",
|
|
2414
2858
|
{
|
|
2415
2859
|
strokeLinecap: "round",
|
|
@@ -2435,13 +2879,13 @@ var DocumentNode_default = DocumentNode;
|
|
|
2435
2879
|
|
|
2436
2880
|
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
2437
2881
|
import dynamic10 from "next/dynamic";
|
|
2438
|
-
import { jsx as
|
|
2882
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2439
2883
|
var IframeClient2 = dynamic10(() => import("./IframeClient-WF2KLXZB.mjs"), {
|
|
2440
2884
|
ssr: false
|
|
2441
2885
|
});
|
|
2442
2886
|
var GoogleMapNode = (props) => {
|
|
2443
2887
|
let src = props.node.embedUrl;
|
|
2444
|
-
return /* @__PURE__ */
|
|
2888
|
+
return /* @__PURE__ */ jsx40("div", { className: "google-map-container", children: src && /* @__PURE__ */ jsx40(
|
|
2445
2889
|
IframeClient2,
|
|
2446
2890
|
{
|
|
2447
2891
|
src,
|
|
@@ -2453,7 +2897,7 @@ var GoogleMapNode = (props) => {
|
|
|
2453
2897
|
var GoogleMapNode_default = GoogleMapNode;
|
|
2454
2898
|
|
|
2455
2899
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2456
|
-
import { jsx as
|
|
2900
|
+
import { jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2457
2901
|
var Pagination = dynamic11(() => import("./Pagination-T7Z2NXKO.mjs"), { ssr: true });
|
|
2458
2902
|
var DataBindingControls = dynamic11(() => import("./DataBindingControls-ESDLOHNB.mjs"), {
|
|
2459
2903
|
ssr: true
|
|
@@ -2712,7 +3156,7 @@ var DivContainer = async (props) => {
|
|
|
2712
3156
|
response = await serviceClient.get(endpoint);
|
|
2713
3157
|
result = response?.result;
|
|
2714
3158
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
2715
|
-
return /* @__PURE__ */
|
|
3159
|
+
return /* @__PURE__ */ jsx41(NoDataFound_default, {});
|
|
2716
3160
|
}
|
|
2717
3161
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
2718
3162
|
childCollectionData = getNestedValue6(
|
|
@@ -2732,7 +3176,7 @@ var DivContainer = async (props) => {
|
|
|
2732
3176
|
}
|
|
2733
3177
|
const SelectedNode = NodeTypes2[node.type];
|
|
2734
3178
|
if (!SelectedNode) return null;
|
|
2735
|
-
return /* @__PURE__ */
|
|
3179
|
+
return /* @__PURE__ */ jsx41(React25.Fragment, { children: /* @__PURE__ */ jsx41(
|
|
2736
3180
|
SelectedNode,
|
|
2737
3181
|
{
|
|
2738
3182
|
node,
|
|
@@ -2869,7 +3313,7 @@ var DivContainer = async (props) => {
|
|
|
2869
3313
|
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
2870
3314
|
);
|
|
2871
3315
|
const WrapperComponent = Wrapper;
|
|
2872
|
-
const renderedContainer = /* @__PURE__ */
|
|
3316
|
+
const renderedContainer = /* @__PURE__ */ jsx41(
|
|
2873
3317
|
WrapperComponent,
|
|
2874
3318
|
{
|
|
2875
3319
|
id: guid,
|
|
@@ -2883,11 +3327,11 @@ var DivContainer = async (props) => {
|
|
|
2883
3327
|
item,
|
|
2884
3328
|
idx,
|
|
2885
3329
|
props.href ? void 0 : item?.links?.view
|
|
2886
|
-
)?.map((child, i) => /* @__PURE__ */
|
|
3330
|
+
)?.map((child, i) => /* @__PURE__ */ jsx41(React25.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
2887
3331
|
)
|
|
2888
3332
|
}
|
|
2889
3333
|
);
|
|
2890
|
-
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */
|
|
3334
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ jsx41(
|
|
2891
3335
|
Pagination,
|
|
2892
3336
|
{
|
|
2893
3337
|
path: props.path,
|
|
@@ -2895,15 +3339,15 @@ var DivContainer = async (props) => {
|
|
|
2895
3339
|
dataset: response
|
|
2896
3340
|
}
|
|
2897
3341
|
) : null;
|
|
2898
|
-
return /* @__PURE__ */
|
|
2899
|
-
/* @__PURE__ */
|
|
3342
|
+
return /* @__PURE__ */ jsxs17(React25.Fragment, { children: [
|
|
3343
|
+
/* @__PURE__ */ jsx41(
|
|
2900
3344
|
"style",
|
|
2901
3345
|
{
|
|
2902
3346
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
2903
3347
|
}
|
|
2904
3348
|
),
|
|
2905
|
-
showDataBindingControls ? /* @__PURE__ */
|
|
2906
|
-
/* @__PURE__ */
|
|
3349
|
+
showDataBindingControls ? /* @__PURE__ */ jsxs17(React25.Fragment, { children: [
|
|
3350
|
+
/* @__PURE__ */ jsx41(
|
|
2907
3351
|
DataBindingControls,
|
|
2908
3352
|
{
|
|
2909
3353
|
mode: "toolbar",
|
|
@@ -2915,18 +3359,18 @@ var DivContainer = async (props) => {
|
|
|
2915
3359
|
showSearchBar: dataBindingProperties?.showSearchBar
|
|
2916
3360
|
}
|
|
2917
3361
|
),
|
|
2918
|
-
/* @__PURE__ */
|
|
3362
|
+
/* @__PURE__ */ jsxs17(
|
|
2919
3363
|
"div",
|
|
2920
3364
|
{
|
|
2921
3365
|
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
2922
3366
|
children: [
|
|
2923
|
-
/* @__PURE__ */
|
|
3367
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0", children: [
|
|
2924
3368
|
renderedContainer,
|
|
2925
3369
|
paginationControl
|
|
2926
3370
|
] }),
|
|
2927
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
/* @__PURE__ */
|
|
3371
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ jsxs17("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
3372
|
+
/* @__PURE__ */ jsx41("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
3373
|
+
/* @__PURE__ */ jsx41(
|
|
2930
3374
|
DataBindingControls,
|
|
2931
3375
|
{
|
|
2932
3376
|
mode: "facets",
|
|
@@ -2940,16 +3384,16 @@ var DivContainer = async (props) => {
|
|
|
2940
3384
|
]
|
|
2941
3385
|
}
|
|
2942
3386
|
)
|
|
2943
|
-
] }) : /* @__PURE__ */
|
|
3387
|
+
] }) : /* @__PURE__ */ jsxs17(React25.Fragment, { children: [
|
|
2944
3388
|
renderedContainer,
|
|
2945
|
-
paginationControl && /* @__PURE__ */
|
|
3389
|
+
paginationControl && /* @__PURE__ */ jsx41("div", { children: paginationControl })
|
|
2946
3390
|
] })
|
|
2947
3391
|
] });
|
|
2948
3392
|
};
|
|
2949
3393
|
var DivContainer_default = DivContainer;
|
|
2950
3394
|
|
|
2951
3395
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2952
|
-
import { jsx as
|
|
3396
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2953
3397
|
var NodeTypes = {
|
|
2954
3398
|
["paragraph"]: ParagraphNode_default,
|
|
2955
3399
|
["heading"]: HeadingNode_default,
|
|
@@ -2987,14 +3431,14 @@ var PageBodyRenderer = (props) => {
|
|
|
2987
3431
|
}
|
|
2988
3432
|
return true;
|
|
2989
3433
|
};
|
|
2990
|
-
return /* @__PURE__ */
|
|
3434
|
+
return /* @__PURE__ */ jsx42(React26.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
2991
3435
|
{
|
|
2992
3436
|
}
|
|
2993
3437
|
const SelectedNode = NodeTypes[node.type];
|
|
2994
3438
|
if (!shouldRenderNode(node)) {
|
|
2995
3439
|
return null;
|
|
2996
3440
|
}
|
|
2997
|
-
return /* @__PURE__ */
|
|
3441
|
+
return /* @__PURE__ */ jsx42(React26.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx42(React26.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx42(React26.Fragment, { children: /* @__PURE__ */ jsx42(
|
|
2998
3442
|
SelectedNode,
|
|
2999
3443
|
{
|
|
3000
3444
|
node,
|
|
@@ -3010,7 +3454,7 @@ var PageBodyRenderer = (props) => {
|
|
|
3010
3454
|
device: props.device,
|
|
3011
3455
|
widgetRenderer: props.widgetRenderer
|
|
3012
3456
|
}
|
|
3013
|
-
) }) : /* @__PURE__ */
|
|
3457
|
+
) }) : /* @__PURE__ */ jsx42(React26.Fragment, { children: /* @__PURE__ */ jsx42(
|
|
3014
3458
|
SelectedNode,
|
|
3015
3459
|
{
|
|
3016
3460
|
node,
|
|
@@ -3080,7 +3524,7 @@ function EnterAnimationHydrator() {
|
|
|
3080
3524
|
|
|
3081
3525
|
// src/components/Toast.tsx
|
|
3082
3526
|
import { useCallback, useEffect as useEffect2, useRef, useState } from "react";
|
|
3083
|
-
import { Fragment as Fragment7, jsx as
|
|
3527
|
+
import { Fragment as Fragment7, jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3084
3528
|
var Toast = () => {
|
|
3085
3529
|
const [showToast, setShowToast] = useState(false);
|
|
3086
3530
|
const [message, setMessage] = useState("");
|
|
@@ -3114,8 +3558,8 @@ var Toast = () => {
|
|
|
3114
3558
|
});
|
|
3115
3559
|
};
|
|
3116
3560
|
}, [closeToast, showMessage]);
|
|
3117
|
-
return /* @__PURE__ */
|
|
3118
|
-
/* @__PURE__ */
|
|
3561
|
+
return /* @__PURE__ */ jsx43(Fragment7, { children: showToast && /* @__PURE__ */ jsx43("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__ */ jsxs18("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
3562
|
+
/* @__PURE__ */ jsx43(
|
|
3119
3563
|
"span",
|
|
3120
3564
|
{
|
|
3121
3565
|
className: "font-medium text-inherit text-sm",
|
|
@@ -3123,7 +3567,7 @@ var Toast = () => {
|
|
|
3123
3567
|
children: message
|
|
3124
3568
|
}
|
|
3125
3569
|
),
|
|
3126
|
-
/* @__PURE__ */
|
|
3570
|
+
/* @__PURE__ */ jsx43("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx43(
|
|
3127
3571
|
"svg",
|
|
3128
3572
|
{
|
|
3129
3573
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3131,7 +3575,7 @@ var Toast = () => {
|
|
|
3131
3575
|
fill: "none",
|
|
3132
3576
|
viewBox: "0 0 24 24",
|
|
3133
3577
|
stroke: "currentColor",
|
|
3134
|
-
children: /* @__PURE__ */
|
|
3578
|
+
children: /* @__PURE__ */ jsx43("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
3135
3579
|
}
|
|
3136
3580
|
) })
|
|
3137
3581
|
] }) }) });
|
|
@@ -3141,7 +3585,7 @@ var Toast_default = Toast;
|
|
|
3141
3585
|
// src/components/NavigationTabsV2.tsx
|
|
3142
3586
|
import Link2 from "next/link";
|
|
3143
3587
|
import { usePathname } from "next/navigation";
|
|
3144
|
-
import { jsx as
|
|
3588
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3145
3589
|
function resolveRoutePlaceholders(route, params) {
|
|
3146
3590
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
3147
3591
|
const value = params[key];
|
|
@@ -3166,8 +3610,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
3166
3610
|
isActive: tab.isActive
|
|
3167
3611
|
})) || [];
|
|
3168
3612
|
if (mappedTabs.length === 0) return null;
|
|
3169
|
-
return /* @__PURE__ */
|
|
3170
|
-
return /* @__PURE__ */
|
|
3613
|
+
return /* @__PURE__ */ jsx44("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
3614
|
+
return /* @__PURE__ */ jsx44(Link2, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx44(
|
|
3171
3615
|
"div",
|
|
3172
3616
|
{
|
|
3173
3617
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -3185,46 +3629,46 @@ import { useRouter } from "next/navigation";
|
|
|
3185
3629
|
|
|
3186
3630
|
// src/components/dataForm/NoContentView.tsx
|
|
3187
3631
|
import React28 from "react";
|
|
3188
|
-
import { jsx as
|
|
3632
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3189
3633
|
var NoContentView = (props) => {
|
|
3190
|
-
return /* @__PURE__ */
|
|
3634
|
+
return /* @__PURE__ */ jsx45(React28.Fragment, { children: props.isDataFound === false && props.children });
|
|
3191
3635
|
};
|
|
3192
3636
|
var NoContentView_default = NoContentView;
|
|
3193
3637
|
|
|
3194
3638
|
// src/components/dataForm/ContentView.tsx
|
|
3195
3639
|
import React29 from "react";
|
|
3196
|
-
import { jsx as
|
|
3640
|
+
import { jsx as jsx46, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3197
3641
|
var ContentView = (props) => {
|
|
3198
|
-
return /* @__PURE__ */
|
|
3199
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
3200
|
-
/* @__PURE__ */
|
|
3201
|
-
/* @__PURE__ */
|
|
3202
|
-
/* @__PURE__ */
|
|
3203
|
-
/* @__PURE__ */
|
|
3204
|
-
/* @__PURE__ */
|
|
3642
|
+
return /* @__PURE__ */ jsxs19(React29.Fragment, { children: [
|
|
3643
|
+
props.isDataFound == null && /* @__PURE__ */ jsx46("div", { className: "", children: /* @__PURE__ */ jsxs19("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3644
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center mb-4", children: [
|
|
3645
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3646
|
+
/* @__PURE__ */ jsxs19("div", { className: "ml-2", children: [
|
|
3647
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3648
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3205
3649
|
] })
|
|
3206
3650
|
] }),
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3209
|
-
/* @__PURE__ */
|
|
3210
|
-
/* @__PURE__ */
|
|
3211
|
-
/* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3213
|
-
/* @__PURE__ */
|
|
3651
|
+
/* @__PURE__ */ jsxs19("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3652
|
+
/* @__PURE__ */ jsxs19("div", { className: "animate-pulse", children: [
|
|
3653
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3654
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3655
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3656
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3657
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3214
3658
|
] }),
|
|
3215
|
-
/* @__PURE__ */
|
|
3216
|
-
/* @__PURE__ */
|
|
3217
|
-
/* @__PURE__ */
|
|
3218
|
-
/* @__PURE__ */
|
|
3219
|
-
/* @__PURE__ */
|
|
3220
|
-
/* @__PURE__ */
|
|
3659
|
+
/* @__PURE__ */ jsxs19("div", { className: "animate-pulse", children: [
|
|
3660
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3661
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3662
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3663
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3664
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3221
3665
|
] }),
|
|
3222
|
-
/* @__PURE__ */
|
|
3223
|
-
/* @__PURE__ */
|
|
3224
|
-
/* @__PURE__ */
|
|
3225
|
-
/* @__PURE__ */
|
|
3226
|
-
/* @__PURE__ */
|
|
3227
|
-
/* @__PURE__ */
|
|
3666
|
+
/* @__PURE__ */ jsxs19("div", { className: "animate-pulse", children: [
|
|
3667
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3668
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3669
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3670
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3671
|
+
/* @__PURE__ */ jsx46("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3228
3672
|
] })
|
|
3229
3673
|
] })
|
|
3230
3674
|
] }) }),
|
|
@@ -3278,7 +3722,7 @@ function FormReducer(state, action) {
|
|
|
3278
3722
|
var FormReducer_default = FormReducer;
|
|
3279
3723
|
|
|
3280
3724
|
// src/components/dataForm/DataList.tsx
|
|
3281
|
-
import { Fragment as Fragment8, jsx as
|
|
3725
|
+
import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3282
3726
|
var DataList = (props) => {
|
|
3283
3727
|
const router = useRouter();
|
|
3284
3728
|
let builder = new OdataBuilder(props.path);
|
|
@@ -3316,7 +3760,7 @@ var DataList = (props) => {
|
|
|
3316
3760
|
if (path.includes(".")) {
|
|
3317
3761
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
3318
3762
|
} else if (Array.isArray(obj[path])) {
|
|
3319
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
3763
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx47("div", { children: item }, index));
|
|
3320
3764
|
} else {
|
|
3321
3765
|
return obj[path];
|
|
3322
3766
|
}
|
|
@@ -3395,30 +3839,30 @@ var DataList = (props) => {
|
|
|
3395
3839
|
const renderPageNumbers = () => {
|
|
3396
3840
|
if (pages <= 10) {
|
|
3397
3841
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
3398
|
-
(page) => /* @__PURE__ */
|
|
3842
|
+
(page) => /* @__PURE__ */ jsx47(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx47(
|
|
3399
3843
|
Hyperlink,
|
|
3400
3844
|
{
|
|
3401
3845
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3402
3846
|
href: builder.getNewPageUrl(page),
|
|
3403
3847
|
children: page
|
|
3404
3848
|
}
|
|
3405
|
-
) : /* @__PURE__ */
|
|
3849
|
+
) : /* @__PURE__ */ jsx47("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
3406
3850
|
);
|
|
3407
3851
|
} else {
|
|
3408
3852
|
const showFirstPages = activePageNumber <= 5;
|
|
3409
3853
|
const showLastPages = activePageNumber > pages - 5;
|
|
3410
3854
|
if (showFirstPages) {
|
|
3411
|
-
return /* @__PURE__ */
|
|
3412
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
3855
|
+
return /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
3856
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx47(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx47(
|
|
3413
3857
|
Hyperlink,
|
|
3414
3858
|
{
|
|
3415
3859
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3416
3860
|
href: builder.getNewPageUrl(page),
|
|
3417
3861
|
children: page
|
|
3418
3862
|
}
|
|
3419
|
-
) : /* @__PURE__ */
|
|
3420
|
-
/* @__PURE__ */
|
|
3421
|
-
/* @__PURE__ */
|
|
3863
|
+
) : /* @__PURE__ */ jsx47("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
3864
|
+
/* @__PURE__ */ jsx47("span", { className: "px-2 py-1", children: "..." }),
|
|
3865
|
+
/* @__PURE__ */ jsx47(
|
|
3422
3866
|
Hyperlink,
|
|
3423
3867
|
{
|
|
3424
3868
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3426,7 +3870,7 @@ var DataList = (props) => {
|
|
|
3426
3870
|
children: pages - 1
|
|
3427
3871
|
}
|
|
3428
3872
|
),
|
|
3429
|
-
/* @__PURE__ */
|
|
3873
|
+
/* @__PURE__ */ jsx47(
|
|
3430
3874
|
Hyperlink,
|
|
3431
3875
|
{
|
|
3432
3876
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3434,7 +3878,7 @@ var DataList = (props) => {
|
|
|
3434
3878
|
children: pages
|
|
3435
3879
|
}
|
|
3436
3880
|
),
|
|
3437
|
-
/* @__PURE__ */
|
|
3881
|
+
/* @__PURE__ */ jsx47("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs20(
|
|
3438
3882
|
"select",
|
|
3439
3883
|
{
|
|
3440
3884
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -3446,18 +3890,18 @@ var DataList = (props) => {
|
|
|
3446
3890
|
}
|
|
3447
3891
|
},
|
|
3448
3892
|
children: [
|
|
3449
|
-
/* @__PURE__ */
|
|
3893
|
+
/* @__PURE__ */ jsx47("option", { className: "", value: "", children: "Jump to" }),
|
|
3450
3894
|
Array.from(
|
|
3451
3895
|
{ length: Math.max(0, pages - 10) },
|
|
3452
3896
|
(_, index) => index + 9
|
|
3453
|
-
).map((page) => /* @__PURE__ */
|
|
3897
|
+
).map((page) => /* @__PURE__ */ jsx47("option", { value: page, children: page }, page))
|
|
3454
3898
|
]
|
|
3455
3899
|
}
|
|
3456
3900
|
) })
|
|
3457
3901
|
] });
|
|
3458
3902
|
} else if (showLastPages) {
|
|
3459
|
-
return /* @__PURE__ */
|
|
3460
|
-
/* @__PURE__ */
|
|
3903
|
+
return /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
3904
|
+
/* @__PURE__ */ jsx47(
|
|
3461
3905
|
Hyperlink,
|
|
3462
3906
|
{
|
|
3463
3907
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3465,7 +3909,7 @@ var DataList = (props) => {
|
|
|
3465
3909
|
children: "1"
|
|
3466
3910
|
}
|
|
3467
3911
|
),
|
|
3468
|
-
/* @__PURE__ */
|
|
3912
|
+
/* @__PURE__ */ jsx47(
|
|
3469
3913
|
Hyperlink,
|
|
3470
3914
|
{
|
|
3471
3915
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3473,21 +3917,21 @@ var DataList = (props) => {
|
|
|
3473
3917
|
children: "2"
|
|
3474
3918
|
}
|
|
3475
3919
|
),
|
|
3476
|
-
/* @__PURE__ */
|
|
3920
|
+
/* @__PURE__ */ jsx47("span", { className: "px-2 py-1", children: "..." }),
|
|
3477
3921
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
3478
|
-
(page) => /* @__PURE__ */
|
|
3922
|
+
(page) => /* @__PURE__ */ jsx47(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx47(
|
|
3479
3923
|
Hyperlink,
|
|
3480
3924
|
{
|
|
3481
3925
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3482
3926
|
href: builder.getNewPageUrl(page),
|
|
3483
3927
|
children: page
|
|
3484
3928
|
}
|
|
3485
|
-
) : /* @__PURE__ */
|
|
3929
|
+
) : /* @__PURE__ */ jsx47("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
3486
3930
|
)
|
|
3487
3931
|
] });
|
|
3488
3932
|
} else {
|
|
3489
|
-
return /* @__PURE__ */
|
|
3490
|
-
/* @__PURE__ */
|
|
3933
|
+
return /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
3934
|
+
/* @__PURE__ */ jsx47(
|
|
3491
3935
|
Hyperlink,
|
|
3492
3936
|
{
|
|
3493
3937
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3495,7 +3939,7 @@ var DataList = (props) => {
|
|
|
3495
3939
|
children: "1"
|
|
3496
3940
|
}
|
|
3497
3941
|
),
|
|
3498
|
-
/* @__PURE__ */
|
|
3942
|
+
/* @__PURE__ */ jsx47(
|
|
3499
3943
|
Hyperlink,
|
|
3500
3944
|
{
|
|
3501
3945
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3503,20 +3947,20 @@ var DataList = (props) => {
|
|
|
3503
3947
|
children: "2"
|
|
3504
3948
|
}
|
|
3505
3949
|
),
|
|
3506
|
-
/* @__PURE__ */
|
|
3950
|
+
/* @__PURE__ */ jsx47("span", { className: "px-2 py-1", children: "..." }),
|
|
3507
3951
|
Array.from(
|
|
3508
3952
|
{ length: 5 },
|
|
3509
3953
|
(_, index) => activePageNumber - 2 + index
|
|
3510
|
-
).map((page) => /* @__PURE__ */
|
|
3954
|
+
).map((page) => /* @__PURE__ */ jsx47(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx47(
|
|
3511
3955
|
Hyperlink,
|
|
3512
3956
|
{
|
|
3513
3957
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3514
3958
|
href: builder.getNewPageUrl(page),
|
|
3515
3959
|
children: page
|
|
3516
3960
|
}
|
|
3517
|
-
) : /* @__PURE__ */
|
|
3518
|
-
/* @__PURE__ */
|
|
3519
|
-
/* @__PURE__ */
|
|
3961
|
+
) : /* @__PURE__ */ jsx47("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
3962
|
+
/* @__PURE__ */ jsx47("span", { className: "px-2 py-1", children: "..." }),
|
|
3963
|
+
/* @__PURE__ */ jsx47(
|
|
3520
3964
|
Hyperlink,
|
|
3521
3965
|
{
|
|
3522
3966
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3524,7 +3968,7 @@ var DataList = (props) => {
|
|
|
3524
3968
|
children: pages - 1
|
|
3525
3969
|
}
|
|
3526
3970
|
),
|
|
3527
|
-
/* @__PURE__ */
|
|
3971
|
+
/* @__PURE__ */ jsx47(
|
|
3528
3972
|
Hyperlink,
|
|
3529
3973
|
{
|
|
3530
3974
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3532,7 +3976,7 @@ var DataList = (props) => {
|
|
|
3532
3976
|
children: pages
|
|
3533
3977
|
}
|
|
3534
3978
|
),
|
|
3535
|
-
/* @__PURE__ */
|
|
3979
|
+
/* @__PURE__ */ jsx47("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs20(
|
|
3536
3980
|
"select",
|
|
3537
3981
|
{
|
|
3538
3982
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -3544,8 +3988,8 @@ var DataList = (props) => {
|
|
|
3544
3988
|
}
|
|
3545
3989
|
},
|
|
3546
3990
|
children: [
|
|
3547
|
-
/* @__PURE__ */
|
|
3548
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
3991
|
+
/* @__PURE__ */ jsx47("option", { value: "", children: "Jump to" }),
|
|
3992
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx47("option", { value: page, children: page }, page))
|
|
3549
3993
|
]
|
|
3550
3994
|
}
|
|
3551
3995
|
) })
|
|
@@ -3553,16 +3997,16 @@ var DataList = (props) => {
|
|
|
3553
3997
|
}
|
|
3554
3998
|
}
|
|
3555
3999
|
};
|
|
3556
|
-
return /* @__PURE__ */
|
|
3557
|
-
/* @__PURE__ */
|
|
3558
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
4000
|
+
return /* @__PURE__ */ jsxs20(React30.Fragment, { children: [
|
|
4001
|
+
/* @__PURE__ */ jsxs20(ContentView_default, { isDataFound, children: [
|
|
4002
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs20(
|
|
3559
4003
|
"div",
|
|
3560
4004
|
{
|
|
3561
4005
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
3562
4006
|
children: [
|
|
3563
|
-
props.title ? /* @__PURE__ */
|
|
3564
|
-
/* @__PURE__ */
|
|
3565
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
4007
|
+
props.title ? /* @__PURE__ */ jsx47("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx47("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx47("div", {}),
|
|
4008
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-3", children: [
|
|
4009
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx47(
|
|
3566
4010
|
InputControl_default,
|
|
3567
4011
|
{
|
|
3568
4012
|
name: "Search_input",
|
|
@@ -3574,7 +4018,7 @@ var DataList = (props) => {
|
|
|
3574
4018
|
}
|
|
3575
4019
|
}
|
|
3576
4020
|
),
|
|
3577
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4021
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx47(
|
|
3578
4022
|
InputControl_default,
|
|
3579
4023
|
{
|
|
3580
4024
|
name: filter.name,
|
|
@@ -3589,15 +4033,15 @@ var DataList = (props) => {
|
|
|
3589
4033
|
},
|
|
3590
4034
|
filter.name
|
|
3591
4035
|
)),
|
|
3592
|
-
props.addLinkHref && /* @__PURE__ */
|
|
4036
|
+
props.addLinkHref && /* @__PURE__ */ jsxs20(
|
|
3593
4037
|
Hyperlink,
|
|
3594
4038
|
{
|
|
3595
4039
|
className: "gap-1",
|
|
3596
4040
|
linkType: "Primary" /* Solid */,
|
|
3597
4041
|
href: props.addLinkHref,
|
|
3598
4042
|
children: [
|
|
3599
|
-
/* @__PURE__ */
|
|
3600
|
-
/* @__PURE__ */
|
|
4043
|
+
/* @__PURE__ */ jsx47(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4044
|
+
/* @__PURE__ */ jsx47("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
3601
4045
|
]
|
|
3602
4046
|
}
|
|
3603
4047
|
)
|
|
@@ -3605,8 +4049,8 @@ var DataList = (props) => {
|
|
|
3605
4049
|
]
|
|
3606
4050
|
}
|
|
3607
4051
|
),
|
|
3608
|
-
/* @__PURE__ */
|
|
3609
|
-
/* @__PURE__ */
|
|
4052
|
+
/* @__PURE__ */ jsx47("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs20("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
4053
|
+
/* @__PURE__ */ jsx47("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx47("tr", { children: props?.columns?.map((column) => {
|
|
3610
4054
|
let url = builder.getNewOrderByUrl(column.name);
|
|
3611
4055
|
let icon = "chevronUpDown";
|
|
3612
4056
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -3616,18 +4060,18 @@ var DataList = (props) => {
|
|
|
3616
4060
|
icon = "chevronUp";
|
|
3617
4061
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
3618
4062
|
}
|
|
3619
|
-
return /* @__PURE__ */
|
|
4063
|
+
return /* @__PURE__ */ jsx47(
|
|
3620
4064
|
"th",
|
|
3621
4065
|
{
|
|
3622
4066
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
3623
|
-
children: /* @__PURE__ */
|
|
4067
|
+
children: /* @__PURE__ */ jsx47(
|
|
3624
4068
|
Hyperlink,
|
|
3625
4069
|
{
|
|
3626
4070
|
href: column.enableSorting ? url : void 0,
|
|
3627
4071
|
className: "!text-neutral-contrast ",
|
|
3628
|
-
children: /* @__PURE__ */
|
|
3629
|
-
/* @__PURE__ */
|
|
3630
|
-
column.enableSorting && /* @__PURE__ */
|
|
4072
|
+
children: /* @__PURE__ */ jsxs20("span", { className: "flex items-center space-x-1", children: [
|
|
4073
|
+
/* @__PURE__ */ jsx47("span", { className: "text-black", children: column.label }),
|
|
4074
|
+
column.enableSorting && /* @__PURE__ */ jsx47(Icon_default, { className: "w-4 h-4", name: icon })
|
|
3631
4075
|
] })
|
|
3632
4076
|
}
|
|
3633
4077
|
)
|
|
@@ -3635,22 +4079,22 @@ var DataList = (props) => {
|
|
|
3635
4079
|
column.name
|
|
3636
4080
|
);
|
|
3637
4081
|
}) }) }),
|
|
3638
|
-
/* @__PURE__ */
|
|
4082
|
+
/* @__PURE__ */ jsx47("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
3639
4083
|
let validityClass = "";
|
|
3640
4084
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
3641
4085
|
validityClass = "bg-alert-200";
|
|
3642
4086
|
}
|
|
3643
|
-
return /* @__PURE__ */
|
|
3644
|
-
return /* @__PURE__ */
|
|
4087
|
+
return /* @__PURE__ */ jsx47("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
4088
|
+
return /* @__PURE__ */ jsx47(React30.Fragment, { children: /* @__PURE__ */ jsx47(
|
|
3645
4089
|
"td",
|
|
3646
4090
|
{
|
|
3647
4091
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
3648
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
4092
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx47(
|
|
3649
4093
|
Hyperlink,
|
|
3650
4094
|
{
|
|
3651
4095
|
className: "",
|
|
3652
4096
|
href: `https://${dataitem[column.name]}`,
|
|
3653
|
-
children: /* @__PURE__ */
|
|
4097
|
+
children: /* @__PURE__ */ jsx47(
|
|
3654
4098
|
ViewControl_default,
|
|
3655
4099
|
{
|
|
3656
4100
|
controlType: column.controlType,
|
|
@@ -3663,11 +4107,11 @@ var DataList = (props) => {
|
|
|
3663
4107
|
}
|
|
3664
4108
|
)
|
|
3665
4109
|
}
|
|
3666
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
4110
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx47(
|
|
3667
4111
|
Hyperlink,
|
|
3668
4112
|
{
|
|
3669
4113
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
3670
|
-
children: /* @__PURE__ */
|
|
4114
|
+
children: /* @__PURE__ */ jsx47(
|
|
3671
4115
|
ViewControl_default,
|
|
3672
4116
|
{
|
|
3673
4117
|
controlType: column.controlType,
|
|
@@ -3677,7 +4121,7 @@ var DataList = (props) => {
|
|
|
3677
4121
|
}
|
|
3678
4122
|
)
|
|
3679
4123
|
}
|
|
3680
|
-
) : /* @__PURE__ */
|
|
4124
|
+
) : /* @__PURE__ */ jsx47(
|
|
3681
4125
|
ViewControl_default,
|
|
3682
4126
|
{
|
|
3683
4127
|
controlType: column.controlType,
|
|
@@ -3691,10 +4135,10 @@ var DataList = (props) => {
|
|
|
3691
4135
|
}) }, index);
|
|
3692
4136
|
}) })
|
|
3693
4137
|
] }) }),
|
|
3694
|
-
/* @__PURE__ */
|
|
3695
|
-
/* @__PURE__ */
|
|
3696
|
-
/* @__PURE__ */
|
|
3697
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
4138
|
+
/* @__PURE__ */ jsx47("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between", children: [
|
|
4139
|
+
/* @__PURE__ */ jsx47("div", { className: "text-gray-700", children: label }),
|
|
4140
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex space-x-2 items-center", children: [
|
|
4141
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx47(
|
|
3698
4142
|
Hyperlink,
|
|
3699
4143
|
{
|
|
3700
4144
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -3702,9 +4146,9 @@ var DataList = (props) => {
|
|
|
3702
4146
|
children: "Prev"
|
|
3703
4147
|
}
|
|
3704
4148
|
),
|
|
3705
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
4149
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx47("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" }),
|
|
3706
4150
|
renderPageNumbers(),
|
|
3707
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
4151
|
+
activePageNumber < pages && /* @__PURE__ */ jsx47(
|
|
3708
4152
|
Hyperlink,
|
|
3709
4153
|
{
|
|
3710
4154
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -3712,19 +4156,19 @@ var DataList = (props) => {
|
|
|
3712
4156
|
children: "Next"
|
|
3713
4157
|
}
|
|
3714
4158
|
),
|
|
3715
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
4159
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx47("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
3716
4160
|
] })
|
|
3717
4161
|
] }) })
|
|
3718
4162
|
] }),
|
|
3719
|
-
/* @__PURE__ */
|
|
3720
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
4163
|
+
/* @__PURE__ */ jsxs20(NoContentView_default, { isDataFound, children: [
|
|
4164
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs20(
|
|
3721
4165
|
"div",
|
|
3722
4166
|
{
|
|
3723
4167
|
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`,
|
|
3724
4168
|
children: [
|
|
3725
|
-
props.title ? /* @__PURE__ */
|
|
3726
|
-
/* @__PURE__ */
|
|
3727
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
4169
|
+
props.title ? /* @__PURE__ */ jsx47("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx47("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx47("div", {}),
|
|
4170
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-3", children: [
|
|
4171
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx47(
|
|
3728
4172
|
InputControl_default,
|
|
3729
4173
|
{
|
|
3730
4174
|
name: "Search_input",
|
|
@@ -3736,7 +4180,7 @@ var DataList = (props) => {
|
|
|
3736
4180
|
}
|
|
3737
4181
|
}
|
|
3738
4182
|
),
|
|
3739
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4183
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx47(
|
|
3740
4184
|
InputControl_default,
|
|
3741
4185
|
{
|
|
3742
4186
|
name: filter.name,
|
|
@@ -3751,15 +4195,15 @@ var DataList = (props) => {
|
|
|
3751
4195
|
},
|
|
3752
4196
|
filter.name
|
|
3753
4197
|
)),
|
|
3754
|
-
props.addLinkHref && /* @__PURE__ */
|
|
4198
|
+
props.addLinkHref && /* @__PURE__ */ jsxs20(
|
|
3755
4199
|
Hyperlink,
|
|
3756
4200
|
{
|
|
3757
4201
|
className: "gap-1",
|
|
3758
4202
|
linkType: "Primary" /* Solid */,
|
|
3759
4203
|
href: props.addLinkHref,
|
|
3760
4204
|
children: [
|
|
3761
|
-
/* @__PURE__ */
|
|
3762
|
-
/* @__PURE__ */
|
|
4205
|
+
/* @__PURE__ */ jsx47(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4206
|
+
/* @__PURE__ */ jsx47("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
3763
4207
|
]
|
|
3764
4208
|
}
|
|
3765
4209
|
)
|
|
@@ -3767,8 +4211,8 @@ var DataList = (props) => {
|
|
|
3767
4211
|
]
|
|
3768
4212
|
}
|
|
3769
4213
|
),
|
|
3770
|
-
/* @__PURE__ */
|
|
3771
|
-
/* @__PURE__ */
|
|
4214
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
4215
|
+
/* @__PURE__ */ jsx47("div", { children: /* @__PURE__ */ jsx47("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx47("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx47("tr", { children: props?.columns?.map((column) => {
|
|
3772
4216
|
let url = builder.getNewOrderByUrl(column.name);
|
|
3773
4217
|
let icon = "chevronUpDown";
|
|
3774
4218
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -3778,18 +4222,18 @@ var DataList = (props) => {
|
|
|
3778
4222
|
icon = "chevronUp";
|
|
3779
4223
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
3780
4224
|
}
|
|
3781
|
-
return /* @__PURE__ */
|
|
4225
|
+
return /* @__PURE__ */ jsx47(
|
|
3782
4226
|
"th",
|
|
3783
4227
|
{
|
|
3784
4228
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
3785
|
-
children: /* @__PURE__ */
|
|
4229
|
+
children: /* @__PURE__ */ jsx47(
|
|
3786
4230
|
Hyperlink,
|
|
3787
4231
|
{
|
|
3788
4232
|
href: column.enableSorting ? url : void 0,
|
|
3789
4233
|
className: "text-body-950",
|
|
3790
|
-
children: /* @__PURE__ */
|
|
3791
|
-
/* @__PURE__ */
|
|
3792
|
-
column.enableSorting && /* @__PURE__ */
|
|
4234
|
+
children: /* @__PURE__ */ jsxs20("span", { className: "flex items-center space-x-1", children: [
|
|
4235
|
+
/* @__PURE__ */ jsx47("span", { children: column.label }),
|
|
4236
|
+
column.enableSorting && /* @__PURE__ */ jsx47(Icon_default, { className: "w-4 h-4", name: icon })
|
|
3793
4237
|
] })
|
|
3794
4238
|
}
|
|
3795
4239
|
)
|
|
@@ -3797,7 +4241,7 @@ var DataList = (props) => {
|
|
|
3797
4241
|
column.name
|
|
3798
4242
|
);
|
|
3799
4243
|
}) }) }) }) }),
|
|
3800
|
-
/* @__PURE__ */
|
|
4244
|
+
/* @__PURE__ */ jsx47("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
3801
4245
|
] })
|
|
3802
4246
|
] })
|
|
3803
4247
|
] });
|
|
@@ -3807,7 +4251,7 @@ var DataList_default = DataList;
|
|
|
3807
4251
|
// src/components/dataForm/DataListRenderer.tsx
|
|
3808
4252
|
import React31, { useState as useState3, useEffect as useEffect4 } from "react";
|
|
3809
4253
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
3810
|
-
import { jsx as
|
|
4254
|
+
import { jsx as jsx48, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3811
4255
|
var viewControlMap = {
|
|
3812
4256
|
number: ViewControlTypes.number,
|
|
3813
4257
|
lineText: ViewControlTypes.lineText,
|
|
@@ -3902,13 +4346,13 @@ var DataListRenderer = ({
|
|
|
3902
4346
|
isActive: landingPageUrl === pathname
|
|
3903
4347
|
};
|
|
3904
4348
|
});
|
|
3905
|
-
return /* @__PURE__ */
|
|
4349
|
+
return /* @__PURE__ */ jsxs21(React31.Fragment, { children: [
|
|
3906
4350
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
3907
4351
|
// tabs={resolvedTabs}
|
|
3908
4352
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
3909
4353
|
// />
|
|
3910
|
-
/* @__PURE__ */
|
|
3911
|
-
/* @__PURE__ */
|
|
4354
|
+
/* @__PURE__ */ jsx48(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
4355
|
+
/* @__PURE__ */ jsx48(
|
|
3912
4356
|
DataList_default,
|
|
3913
4357
|
{
|
|
3914
4358
|
addLinkHref,
|
|
@@ -3953,7 +4397,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
3953
4397
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
3954
4398
|
|
|
3955
4399
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
3956
|
-
import { jsx as
|
|
4400
|
+
import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3957
4401
|
var DataFormChildSection = (props) => {
|
|
3958
4402
|
const { section } = props;
|
|
3959
4403
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -4021,14 +4465,14 @@ var DataFormChildSection = (props) => {
|
|
|
4021
4465
|
childItemsToRender,
|
|
4022
4466
|
allChildItems: childItems
|
|
4023
4467
|
});
|
|
4024
|
-
return /* @__PURE__ */
|
|
4025
|
-
section.sectionTitle && /* @__PURE__ */
|
|
4026
|
-
/* @__PURE__ */
|
|
4027
|
-
/* @__PURE__ */
|
|
4028
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */
|
|
4029
|
-
return /* @__PURE__ */
|
|
4468
|
+
return /* @__PURE__ */ jsx49(React32.Fragment, { children: /* @__PURE__ */ jsxs22("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
4469
|
+
section.sectionTitle && /* @__PURE__ */ jsx49("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
4470
|
+
/* @__PURE__ */ jsx49("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs22("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
4471
|
+
/* @__PURE__ */ jsx49("div", { children: /* @__PURE__ */ jsxs22("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
4472
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ jsx49("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
4473
|
+
return /* @__PURE__ */ jsxs22("tr", { className: "", children: [
|
|
4030
4474
|
sectionRow.elements.map((field, index) => {
|
|
4031
|
-
return /* @__PURE__ */
|
|
4475
|
+
return /* @__PURE__ */ jsx49(
|
|
4032
4476
|
"th",
|
|
4033
4477
|
{
|
|
4034
4478
|
className: "py-3 font-normal text-left",
|
|
@@ -4037,21 +4481,21 @@ var DataFormChildSection = (props) => {
|
|
|
4037
4481
|
field.name
|
|
4038
4482
|
);
|
|
4039
4483
|
}),
|
|
4040
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
4484
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx49("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
4041
4485
|
] }, sectionRowIndex);
|
|
4042
4486
|
}) }),
|
|
4043
|
-
/* @__PURE__ */
|
|
4487
|
+
/* @__PURE__ */ jsx49("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
4044
4488
|
const { item, originalIndex } = visibleItem;
|
|
4045
4489
|
const rowKey = originalIndex;
|
|
4046
|
-
return /* @__PURE__ */
|
|
4490
|
+
return /* @__PURE__ */ jsx49(React32.Fragment, { children: section.sectionRows.map(
|
|
4047
4491
|
(sectionRow, sectionRowIndex) => {
|
|
4048
|
-
return /* @__PURE__ */
|
|
4492
|
+
return /* @__PURE__ */ jsxs22(
|
|
4049
4493
|
"tr",
|
|
4050
4494
|
{
|
|
4051
4495
|
className: "",
|
|
4052
4496
|
children: [
|
|
4053
4497
|
sectionRow.elements.map((field, index) => {
|
|
4054
|
-
return /* @__PURE__ */
|
|
4498
|
+
return /* @__PURE__ */ jsx49("td", { children: /* @__PURE__ */ jsx49("div", { className: "flex-1", children: /* @__PURE__ */ jsx49("div", { className: "w-11/12", children: /* @__PURE__ */ jsx49(
|
|
4055
4499
|
InputControl_default,
|
|
4056
4500
|
{
|
|
4057
4501
|
index: filteredIndex,
|
|
@@ -4071,7 +4515,7 @@ var DataFormChildSection = (props) => {
|
|
|
4071
4515
|
}
|
|
4072
4516
|
) }) }) }, field.name);
|
|
4073
4517
|
}),
|
|
4074
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
4518
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx49("td", { children: /* @__PURE__ */ jsx49(
|
|
4075
4519
|
ClientButton_default,
|
|
4076
4520
|
{
|
|
4077
4521
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -4080,7 +4524,7 @@ var DataFormChildSection = (props) => {
|
|
|
4080
4524
|
},
|
|
4081
4525
|
dataRole: "delete",
|
|
4082
4526
|
tabIndex: -1,
|
|
4083
|
-
children: /* @__PURE__ */
|
|
4527
|
+
children: /* @__PURE__ */ jsx49(
|
|
4084
4528
|
Icon_default,
|
|
4085
4529
|
{
|
|
4086
4530
|
className: "w-4 h-4",
|
|
@@ -4097,7 +4541,7 @@ var DataFormChildSection = (props) => {
|
|
|
4097
4541
|
) }, rowKey);
|
|
4098
4542
|
}) })
|
|
4099
4543
|
] }) }),
|
|
4100
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
4544
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx49("div", { className: "ml-1", children: /* @__PURE__ */ jsx49(
|
|
4101
4545
|
ClientButton_default,
|
|
4102
4546
|
{
|
|
4103
4547
|
ButtonType: "Link" /* Link */,
|
|
@@ -4112,7 +4556,7 @@ var DataFormChildSection = (props) => {
|
|
|
4112
4556
|
var DataFormChildSection_default = DataFormChildSection;
|
|
4113
4557
|
|
|
4114
4558
|
// src/components/dataForm/DataForm.tsx
|
|
4115
|
-
import { jsx as
|
|
4559
|
+
import { jsx as jsx50, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4116
4560
|
var DataForm = (props) => {
|
|
4117
4561
|
const formRef = useRef2(null);
|
|
4118
4562
|
console.log(props.dataItem, "dssads");
|
|
@@ -4332,19 +4776,19 @@ var DataForm = (props) => {
|
|
|
4332
4776
|
return false;
|
|
4333
4777
|
}
|
|
4334
4778
|
}
|
|
4335
|
-
return /* @__PURE__ */
|
|
4336
|
-
props.title && /* @__PURE__ */
|
|
4779
|
+
return /* @__PURE__ */ jsx50(React33.Fragment, { children: /* @__PURE__ */ jsxs23("div", { className: "flex-grow flex flex-col", children: [
|
|
4780
|
+
props.title && /* @__PURE__ */ jsx50("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__ */ jsxs23(
|
|
4337
4781
|
"div",
|
|
4338
4782
|
{
|
|
4339
4783
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
4340
4784
|
onClick: () => window.history.back(),
|
|
4341
4785
|
children: [
|
|
4342
|
-
/* @__PURE__ */
|
|
4343
|
-
/* @__PURE__ */
|
|
4786
|
+
/* @__PURE__ */ jsx50(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
4787
|
+
/* @__PURE__ */ jsx50("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
4344
4788
|
]
|
|
4345
4789
|
}
|
|
4346
4790
|
) }),
|
|
4347
|
-
/* @__PURE__ */
|
|
4791
|
+
/* @__PURE__ */ jsx50(
|
|
4348
4792
|
"form",
|
|
4349
4793
|
{
|
|
4350
4794
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -4365,8 +4809,8 @@ var DataForm = (props) => {
|
|
|
4365
4809
|
}
|
|
4366
4810
|
}
|
|
4367
4811
|
},
|
|
4368
|
-
children: /* @__PURE__ */
|
|
4369
|
-
return /* @__PURE__ */
|
|
4812
|
+
children: /* @__PURE__ */ jsx50("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
4813
|
+
return /* @__PURE__ */ jsx50(React33.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs23("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
4370
4814
|
section.sectionRows?.map(
|
|
4371
4815
|
(sectionRow, sectionRowIndex) => {
|
|
4372
4816
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -4377,14 +4821,14 @@ var DataForm = (props) => {
|
|
|
4377
4821
|
sectionRow.visible
|
|
4378
4822
|
);
|
|
4379
4823
|
}
|
|
4380
|
-
return /* @__PURE__ */
|
|
4381
|
-
return /* @__PURE__ */
|
|
4824
|
+
return /* @__PURE__ */ jsx50(React33.Fragment, { children: isVisible && /* @__PURE__ */ jsx50("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
4825
|
+
return /* @__PURE__ */ jsxs23(
|
|
4382
4826
|
"div",
|
|
4383
4827
|
{
|
|
4384
4828
|
className: sectionRow.grow ? "grow" : "",
|
|
4385
4829
|
children: [
|
|
4386
|
-
/* @__PURE__ */
|
|
4387
|
-
/* @__PURE__ */
|
|
4830
|
+
/* @__PURE__ */ jsx50("div", { children: field.controlType }),
|
|
4831
|
+
/* @__PURE__ */ jsx50(
|
|
4388
4832
|
InputControl_default,
|
|
4389
4833
|
{
|
|
4390
4834
|
name: field.name,
|
|
@@ -4414,12 +4858,12 @@ var DataForm = (props) => {
|
|
|
4414
4858
|
}) }) }, sectionRowIndex);
|
|
4415
4859
|
}
|
|
4416
4860
|
),
|
|
4417
|
-
/* @__PURE__ */
|
|
4861
|
+
/* @__PURE__ */ jsx50("div", { children: section.childSections?.map(
|
|
4418
4862
|
(childSection, childSectionIndex) => {
|
|
4419
|
-
return /* @__PURE__ */
|
|
4863
|
+
return /* @__PURE__ */ jsx50("div", { children: childSection.name && evalutateCondition(
|
|
4420
4864
|
formState.inputValues,
|
|
4421
4865
|
childSection.visible
|
|
4422
|
-
) && /* @__PURE__ */
|
|
4866
|
+
) && /* @__PURE__ */ jsx50(
|
|
4423
4867
|
DataFormChildSection_default,
|
|
4424
4868
|
{
|
|
4425
4869
|
section: childSection,
|
|
@@ -4434,8 +4878,8 @@ var DataForm = (props) => {
|
|
|
4434
4878
|
}) })
|
|
4435
4879
|
}
|
|
4436
4880
|
),
|
|
4437
|
-
/* @__PURE__ */
|
|
4438
|
-
/* @__PURE__ */
|
|
4881
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
4882
|
+
/* @__PURE__ */ jsx50("div", { children: props.additionalActions && /* @__PURE__ */ jsx50(
|
|
4439
4883
|
Button_default,
|
|
4440
4884
|
{
|
|
4441
4885
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -4443,7 +4887,7 @@ var DataForm = (props) => {
|
|
|
4443
4887
|
children: props.additionalActions.title
|
|
4444
4888
|
}
|
|
4445
4889
|
) }),
|
|
4446
|
-
/* @__PURE__ */
|
|
4890
|
+
/* @__PURE__ */ jsx50("div", { children: props.onDelete && /* @__PURE__ */ jsx50(
|
|
4447
4891
|
Button_default,
|
|
4448
4892
|
{
|
|
4449
4893
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -4454,7 +4898,7 @@ var DataForm = (props) => {
|
|
|
4454
4898
|
children: "Delete"
|
|
4455
4899
|
}
|
|
4456
4900
|
) }),
|
|
4457
|
-
/* @__PURE__ */
|
|
4901
|
+
/* @__PURE__ */ jsx50("div", { children: props.onClick && /* @__PURE__ */ jsx50(
|
|
4458
4902
|
Button_default,
|
|
4459
4903
|
{
|
|
4460
4904
|
onValidate,
|
|
@@ -4471,7 +4915,7 @@ var DataForm = (props) => {
|
|
|
4471
4915
|
var DataForm_default = DataForm;
|
|
4472
4916
|
|
|
4473
4917
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
4474
|
-
import { jsx as
|
|
4918
|
+
import { jsx as jsx51, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4475
4919
|
function getAction(actions, code) {
|
|
4476
4920
|
return actions?.find((a) => a.actionCode === code);
|
|
4477
4921
|
}
|
|
@@ -4497,9 +4941,9 @@ var DataFormRenderer = ({
|
|
|
4497
4941
|
"Delete"
|
|
4498
4942
|
);
|
|
4499
4943
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
4500
|
-
return /* @__PURE__ */
|
|
4501
|
-
widgetProps && /* @__PURE__ */
|
|
4502
|
-
/* @__PURE__ */
|
|
4944
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex-grow flex flex-col", children: [
|
|
4945
|
+
widgetProps && /* @__PURE__ */ jsx51(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
4946
|
+
/* @__PURE__ */ jsx51(
|
|
4503
4947
|
DataForm_default,
|
|
4504
4948
|
{
|
|
4505
4949
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|