@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260808070128 → 0.8.1-dev.20260808091030
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{IframeClient-RGJFZ5P2.mjs → IframeClient-E6VGPN6S.mjs} +13 -6
- package/dist/{IframeClient-J22NMEVY.mjs → IframeClient-J64QAFNK.mjs} +13 -6
- package/dist/TimeUntilStartsClient-4C7NDEAD.mjs +76 -0
- package/dist/TimeUntilStartsClient-5HGQ5JKM.mjs +78 -0
- package/dist/index.js +116 -91
- package/dist/index.mjs +327 -392
- package/dist/server.js +110 -85
- package/dist/server.mjs +140 -205
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import "./chunk-IMNQO57B.mjs";
|
|
42
42
|
|
|
43
43
|
// src/components/controls/view/ViewControl.tsx
|
|
44
|
-
import
|
|
44
|
+
import React13 from "react";
|
|
45
45
|
|
|
46
46
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
47
47
|
var ViewControlTypes = {
|
|
@@ -378,79 +378,14 @@ var DateTimeView = dynamic3(() => import("./DateTimeViewClient-M7V35KUW.mjs"), {
|
|
|
378
378
|
var DateTimeVew_default = DateTimeView;
|
|
379
379
|
|
|
380
380
|
// src/components/controls/view/TimeUntilStarts.tsx
|
|
381
|
-
import
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
const now = /* @__PURE__ */ new Date();
|
|
386
|
-
const nowUtc = new Date(now.getTime() + now.getTimezoneOffset() * 6e4);
|
|
387
|
-
const startDateUtc = new Date(startDate);
|
|
388
|
-
const diffMs = startDateUtc.getTime() - nowUtc.getTime();
|
|
389
|
-
const isPast = diffMs < 0;
|
|
390
|
-
const absoluteDiffMs = Math.abs(diffMs);
|
|
391
|
-
const diffDays = Math.floor(absoluteDiffMs / (1e3 * 60 * 60 * 24));
|
|
392
|
-
const diffHours = Math.floor(
|
|
393
|
-
absoluteDiffMs % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)
|
|
394
|
-
);
|
|
395
|
-
const diffMinutes = Math.floor(
|
|
396
|
-
absoluteDiffMs % (1e3 * 60 * 60) / (1e3 * 60)
|
|
397
|
-
);
|
|
398
|
-
if (absoluteDiffMs < 6e4) {
|
|
399
|
-
return "Just now";
|
|
400
|
-
}
|
|
401
|
-
let timeParts = [
|
|
402
|
-
{ value: diffDays, unit: "days" },
|
|
403
|
-
{ value: diffHours, unit: "hours" },
|
|
404
|
-
{ value: diffMinutes, unit: "minutes" }
|
|
405
|
-
];
|
|
406
|
-
timeParts = timeParts.filter((part) => part.value > 0);
|
|
407
|
-
if (isPast) {
|
|
408
|
-
if (diffDays > 0) {
|
|
409
|
-
return `${diffDays} day(s) ago`;
|
|
410
|
-
} else if (diffHours > 0) {
|
|
411
|
-
return `${diffHours} hour(s) ago`;
|
|
412
|
-
} else if (diffMinutes > 0) {
|
|
413
|
-
return `${diffMinutes} minute(s) ago`;
|
|
414
|
-
} else {
|
|
415
|
-
return "Just now";
|
|
416
|
-
}
|
|
417
|
-
} else {
|
|
418
|
-
if (timeParts.length > 2) {
|
|
419
|
-
timeParts = timeParts.slice(0, 2);
|
|
420
|
-
}
|
|
421
|
-
const displayString = timeParts.map((part) => `${part.value} ${part.unit}`).join(" ");
|
|
422
|
-
return displayString ? `Starting in ${displayString}` : "Started";
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
const isValidDate = (date) => {
|
|
426
|
-
return !isNaN(Date.parse(date));
|
|
427
|
-
};
|
|
428
|
-
const [timeUntilStart, setTimeUntilStart] = useState(() => {
|
|
429
|
-
if (props.value && isValidDate(props.value)) {
|
|
430
|
-
return calculateTimeDifference(props.value);
|
|
431
|
-
}
|
|
432
|
-
return "";
|
|
433
|
-
});
|
|
434
|
-
useEffect(() => {
|
|
435
|
-
if (props.value && isValidDate(props.value)) {
|
|
436
|
-
setTimeUntilStart(calculateTimeDifference(props.value));
|
|
437
|
-
const initialTimeout = setTimeout(() => {
|
|
438
|
-
const interval = setInterval(() => {
|
|
439
|
-
setTimeUntilStart(calculateTimeDifference(props.value));
|
|
440
|
-
}, 6e4);
|
|
441
|
-
return () => clearInterval(interval);
|
|
442
|
-
}, 5e3);
|
|
443
|
-
return () => clearTimeout(initialTimeout);
|
|
444
|
-
} else {
|
|
445
|
-
setTimeUntilStart("");
|
|
446
|
-
}
|
|
447
|
-
}, [props.value]);
|
|
448
|
-
return /* @__PURE__ */ jsx14("div", { children: timeUntilStart });
|
|
449
|
-
};
|
|
381
|
+
import dynamic4 from "next/dynamic";
|
|
382
|
+
var TimeUntilStarts = dynamic4(() => import("./TimeUntilStartsClient-5HGQ5JKM.mjs"), {
|
|
383
|
+
ssr: false
|
|
384
|
+
});
|
|
450
385
|
var TimeUntilStarts_default = TimeUntilStarts;
|
|
451
386
|
|
|
452
387
|
// src/components/controls/view/ViewControl.tsx
|
|
453
|
-
import { jsx as
|
|
388
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
454
389
|
var ViewControl = (props) => {
|
|
455
390
|
const ControlComponents = {
|
|
456
391
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
@@ -472,32 +407,32 @@ var ViewControl = (props) => {
|
|
|
472
407
|
[ViewControlTypes_default.status]: StatusView_default,
|
|
473
408
|
[ViewControlTypes_default.statusBg]: StatusBgView_default,
|
|
474
409
|
[ViewControlTypes_default.progressIndicator]: ProgressIndicator_default,
|
|
475
|
-
|
|
410
|
+
[ViewControlTypes_default.timeUntilStarts]: TimeUntilStarts_default,
|
|
476
411
|
// [ViewControlTypes.timeUntilStartsStyled]: TimeUntilStartsStyled,
|
|
477
412
|
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default,
|
|
478
413
|
[ViewControlTypes_default.booleanView]: BooleanView_default,
|
|
479
414
|
[ViewControlTypes_default.text]: LineTextView_default
|
|
480
415
|
};
|
|
481
416
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
482
|
-
return /* @__PURE__ */
|
|
417
|
+
return /* @__PURE__ */ jsx14(React13.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx14(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
483
418
|
};
|
|
484
419
|
var ViewControl_default = ViewControl;
|
|
485
420
|
|
|
486
421
|
// src/components/controls/edit/InputControl.tsx
|
|
487
|
-
import
|
|
488
|
-
var InputControl =
|
|
422
|
+
import dynamic5 from "next/dynamic";
|
|
423
|
+
var InputControl = dynamic5(() => import("./InputControlClient-XR37ZIQ2.mjs"), {
|
|
489
424
|
ssr: false
|
|
490
425
|
});
|
|
491
426
|
var InputControl_default = InputControl;
|
|
492
427
|
|
|
493
428
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
494
|
-
import
|
|
429
|
+
import React23 from "react";
|
|
495
430
|
|
|
496
431
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
497
|
-
import
|
|
432
|
+
import React15 from "react";
|
|
498
433
|
|
|
499
434
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
500
|
-
import { jsx as
|
|
435
|
+
import { jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
501
436
|
var TextNode = (props) => {
|
|
502
437
|
function cssStringToJson(cssString) {
|
|
503
438
|
const styleObject = {};
|
|
@@ -554,34 +489,34 @@ var TextNode = (props) => {
|
|
|
554
489
|
function renderWithLineBreaks(text) {
|
|
555
490
|
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs5("span", { children: [
|
|
556
491
|
line,
|
|
557
|
-
index < arr.length - 1 && /* @__PURE__ */
|
|
492
|
+
index < arr.length - 1 && /* @__PURE__ */ jsx15("br", {})
|
|
558
493
|
] }, index));
|
|
559
494
|
}
|
|
560
495
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
561
496
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
562
497
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
563
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */
|
|
498
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ jsx15("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ jsx15("sub", { children: content }) : content;
|
|
564
499
|
return (
|
|
565
500
|
// @ts-expect-error custom code
|
|
566
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ jsx15("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
567
502
|
);
|
|
568
503
|
};
|
|
569
504
|
var TextNode_default = TextNode;
|
|
570
505
|
|
|
571
506
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
572
|
-
import { jsx as
|
|
507
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
573
508
|
var LineBreakNode = () => {
|
|
574
|
-
return /* @__PURE__ */
|
|
509
|
+
return /* @__PURE__ */ jsx16("div", { className: "py-0.5 lg:py-1.5" });
|
|
575
510
|
};
|
|
576
511
|
var LineBreakNode_default = LineBreakNode;
|
|
577
512
|
|
|
578
513
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
579
|
-
import
|
|
514
|
+
import React14 from "react";
|
|
580
515
|
|
|
581
516
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
582
|
-
import
|
|
583
|
-
import { jsx as
|
|
584
|
-
var HlsPlayer2 =
|
|
517
|
+
import dynamic6 from "next/dynamic";
|
|
518
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
519
|
+
var HlsPlayer2 = dynamic6(() => import("./HlsPlayer-IW52N5RG.mjs"), { ssr: false });
|
|
585
520
|
var getNestedValue = (obj, path) => {
|
|
586
521
|
if (!obj || !path) return void 0;
|
|
587
522
|
return path.split(".").reduce((current, key) => {
|
|
@@ -613,7 +548,7 @@ var ImageNode = (props) => {
|
|
|
613
548
|
assets = [image];
|
|
614
549
|
}
|
|
615
550
|
if (assets && assets.length > 0) {
|
|
616
|
-
return /* @__PURE__ */
|
|
551
|
+
return /* @__PURE__ */ jsx17(
|
|
617
552
|
DeviceAssetSelector_default,
|
|
618
553
|
{
|
|
619
554
|
device: props.device,
|
|
@@ -654,7 +589,7 @@ var ImageNode = (props) => {
|
|
|
654
589
|
right: "justify-end"
|
|
655
590
|
};
|
|
656
591
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
657
|
-
const renderMedia = () => isHls ? /* @__PURE__ */
|
|
592
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ jsx17(
|
|
658
593
|
HlsPlayer2,
|
|
659
594
|
{
|
|
660
595
|
assetUrl: imageUrl,
|
|
@@ -667,7 +602,7 @@ var ImageNode = (props) => {
|
|
|
667
602
|
apiBaseUrl: props.apiBaseUrl,
|
|
668
603
|
session: props.session
|
|
669
604
|
}
|
|
670
|
-
) : /* @__PURE__ */
|
|
605
|
+
) : /* @__PURE__ */ jsx17(
|
|
671
606
|
"img",
|
|
672
607
|
{
|
|
673
608
|
style: styles,
|
|
@@ -680,16 +615,16 @@ var ImageNode = (props) => {
|
|
|
680
615
|
}
|
|
681
616
|
);
|
|
682
617
|
if (props.node.width) {
|
|
683
|
-
return /* @__PURE__ */
|
|
618
|
+
return /* @__PURE__ */ jsx17("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
684
619
|
}
|
|
685
620
|
return renderMedia();
|
|
686
621
|
};
|
|
687
622
|
var ImageNode_default = ImageNode;
|
|
688
623
|
|
|
689
624
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
690
|
-
import
|
|
691
|
-
import { Fragment, jsx as
|
|
692
|
-
var LinkNodeButton =
|
|
625
|
+
import dynamic7 from "next/dynamic";
|
|
626
|
+
import { Fragment, jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
627
|
+
var LinkNodeButton = dynamic7(() => import("./LinkNodeButton-AOEDCCL7.mjs"), {
|
|
693
628
|
ssr: false
|
|
694
629
|
});
|
|
695
630
|
function getNestedValue2(obj, path) {
|
|
@@ -741,13 +676,13 @@ var LinkNode = (props) => {
|
|
|
741
676
|
const isButton = node.isButton === true;
|
|
742
677
|
const renderChildren = () => {
|
|
743
678
|
if (!node.children || node.children.length === 0) return null;
|
|
744
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ jsx18(Fragment, { children: node.children.map((childNode, index) => {
|
|
745
680
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
746
681
|
if (!SelectedNode) {
|
|
747
682
|
console.warn("Unknown node type:", childNode.type);
|
|
748
683
|
return null;
|
|
749
684
|
}
|
|
750
|
-
return /* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ jsx18(React14.Fragment, { children: /* @__PURE__ */ jsx18(
|
|
751
686
|
SelectedNode,
|
|
752
687
|
{
|
|
753
688
|
node: childNode,
|
|
@@ -760,10 +695,10 @@ var LinkNode = (props) => {
|
|
|
760
695
|
};
|
|
761
696
|
const renderFallback = () => {
|
|
762
697
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
763
|
-
return /* @__PURE__ */
|
|
698
|
+
return /* @__PURE__ */ jsx18("span", { children: linkText });
|
|
764
699
|
}
|
|
765
700
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
766
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ jsx18("br", {});
|
|
767
702
|
}
|
|
768
703
|
return null;
|
|
769
704
|
};
|
|
@@ -802,10 +737,10 @@ var LinkNode = (props) => {
|
|
|
802
737
|
var LinkNode_default = LinkNode;
|
|
803
738
|
|
|
804
739
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
805
|
-
import { jsx as
|
|
740
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
806
741
|
var SVGIconNode = ({ node }) => {
|
|
807
742
|
if (!node?.svgCode) return null;
|
|
808
|
-
return /* @__PURE__ */
|
|
743
|
+
return /* @__PURE__ */ jsx19(
|
|
809
744
|
"span",
|
|
810
745
|
{
|
|
811
746
|
style: {
|
|
@@ -822,7 +757,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
822
757
|
|
|
823
758
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
824
759
|
import katex from "katex";
|
|
825
|
-
import { jsx as
|
|
760
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
826
761
|
var EquationNode = ({ node }) => {
|
|
827
762
|
const { equation, inline } = node;
|
|
828
763
|
let html = "";
|
|
@@ -837,7 +772,7 @@ var EquationNode = ({ node }) => {
|
|
|
837
772
|
});
|
|
838
773
|
}
|
|
839
774
|
if (inline) {
|
|
840
|
-
return /* @__PURE__ */
|
|
775
|
+
return /* @__PURE__ */ jsx20(
|
|
841
776
|
"span",
|
|
842
777
|
{
|
|
843
778
|
className: "katex-inline",
|
|
@@ -845,7 +780,7 @@ var EquationNode = ({ node }) => {
|
|
|
845
780
|
}
|
|
846
781
|
);
|
|
847
782
|
}
|
|
848
|
-
return /* @__PURE__ */
|
|
783
|
+
return /* @__PURE__ */ jsx20(
|
|
849
784
|
"div",
|
|
850
785
|
{
|
|
851
786
|
className: "katex-block my-3 text-center",
|
|
@@ -856,7 +791,7 @@ var EquationNode = ({ node }) => {
|
|
|
856
791
|
var EquationNode_default = EquationNode;
|
|
857
792
|
|
|
858
793
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
859
|
-
import { jsx as
|
|
794
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
860
795
|
function getNestedProperty(obj, path) {
|
|
861
796
|
if (!obj || !path) return null;
|
|
862
797
|
if (path.includes(".")) {
|
|
@@ -869,7 +804,7 @@ function getNestedProperty(obj, path) {
|
|
|
869
804
|
}
|
|
870
805
|
const value = obj[path];
|
|
871
806
|
if (Array.isArray(value)) {
|
|
872
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
807
|
+
return value.map((item, index) => /* @__PURE__ */ jsx21("div", { children: String(item) }, index));
|
|
873
808
|
}
|
|
874
809
|
return value;
|
|
875
810
|
}
|
|
@@ -930,7 +865,7 @@ var DatafieldNode = (props) => {
|
|
|
930
865
|
const dataType = props.node.dataType;
|
|
931
866
|
if (isEmptyValue) return null;
|
|
932
867
|
if (dataType === "rawContent") {
|
|
933
|
-
return /* @__PURE__ */
|
|
868
|
+
return /* @__PURE__ */ jsx21(
|
|
934
869
|
PageBodyRenderer_default,
|
|
935
870
|
{
|
|
936
871
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -946,12 +881,12 @@ var DatafieldNode = (props) => {
|
|
|
946
881
|
}
|
|
947
882
|
);
|
|
948
883
|
}
|
|
949
|
-
return /* @__PURE__ */
|
|
884
|
+
return /* @__PURE__ */ jsx21(
|
|
950
885
|
"span",
|
|
951
886
|
{
|
|
952
887
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
953
888
|
style: styles,
|
|
954
|
-
children: /* @__PURE__ */
|
|
889
|
+
children: /* @__PURE__ */ jsx21(
|
|
955
890
|
ViewControl_default,
|
|
956
891
|
{
|
|
957
892
|
controlType: dataType,
|
|
@@ -964,7 +899,7 @@ var DatafieldNode = (props) => {
|
|
|
964
899
|
var DatafieldNode_default = DatafieldNode;
|
|
965
900
|
|
|
966
901
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
967
|
-
import { Fragment as Fragment2, jsx as
|
|
902
|
+
import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
968
903
|
var ParagraphNode = (props) => {
|
|
969
904
|
const NodeTypes2 = {
|
|
970
905
|
["text"]: TextNode_default,
|
|
@@ -984,9 +919,9 @@ var ParagraphNode = (props) => {
|
|
|
984
919
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
985
920
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
986
921
|
if (isInlineOnlyParent) {
|
|
987
|
-
return /* @__PURE__ */
|
|
922
|
+
return /* @__PURE__ */ jsx22(Fragment2, { children: hasChildren && props.node.children.map((node, index) => {
|
|
988
923
|
const SelectedNode = NodeTypes2[node.type];
|
|
989
|
-
return /* @__PURE__ */
|
|
924
|
+
return /* @__PURE__ */ jsx22(React15.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx22(
|
|
990
925
|
SelectedNode,
|
|
991
926
|
{
|
|
992
927
|
node,
|
|
@@ -1001,7 +936,7 @@ var ParagraphNode = (props) => {
|
|
|
1001
936
|
return /* @__PURE__ */ jsxs7("div", { className: " " + formatClasses, children: [
|
|
1002
937
|
hasChildren && props.node.children.map((node, index) => {
|
|
1003
938
|
const SelectedNode = NodeTypes2[node.type];
|
|
1004
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ jsx22(React15.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx22(
|
|
1005
940
|
SelectedNode,
|
|
1006
941
|
{
|
|
1007
942
|
node,
|
|
@@ -1012,14 +947,14 @@ var ParagraphNode = (props) => {
|
|
|
1012
947
|
}
|
|
1013
948
|
) }, index);
|
|
1014
949
|
}),
|
|
1015
|
-
!hasChildren && /* @__PURE__ */
|
|
950
|
+
!hasChildren && /* @__PURE__ */ jsx22("div", { className: "py-1.5 lg:py-2" })
|
|
1016
951
|
] });
|
|
1017
952
|
};
|
|
1018
953
|
var ParagraphNode_default = ParagraphNode;
|
|
1019
954
|
|
|
1020
955
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
1021
|
-
import
|
|
1022
|
-
import { Fragment as Fragment3, jsx as
|
|
956
|
+
import React16 from "react";
|
|
957
|
+
import { Fragment as Fragment3, jsx as jsx23 } from "react/jsx-runtime";
|
|
1023
958
|
var HeadingNode = (props) => {
|
|
1024
959
|
const NodeTypes2 = {
|
|
1025
960
|
["text"]: TextNode_default,
|
|
@@ -1035,23 +970,23 @@ var HeadingNode = (props) => {
|
|
|
1035
970
|
{
|
|
1036
971
|
}
|
|
1037
972
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
1038
|
-
return /* @__PURE__ */
|
|
973
|
+
return /* @__PURE__ */ jsx23(Fragment3, { children: React16.createElement(
|
|
1039
974
|
HeadingTag,
|
|
1040
975
|
{ className: formatClasses },
|
|
1041
976
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
1042
977
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
1043
|
-
return /* @__PURE__ */
|
|
978
|
+
return /* @__PURE__ */ jsx23(React16.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx23(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
1044
979
|
})
|
|
1045
980
|
) });
|
|
1046
981
|
};
|
|
1047
982
|
var HeadingNode_default = HeadingNode;
|
|
1048
983
|
|
|
1049
984
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
1050
|
-
import
|
|
985
|
+
import React18 from "react";
|
|
1051
986
|
|
|
1052
987
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
1053
|
-
import
|
|
1054
|
-
import { jsx as
|
|
988
|
+
import React17 from "react";
|
|
989
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1055
990
|
var ListItemNode = (props) => {
|
|
1056
991
|
const NodeTypes2 = {
|
|
1057
992
|
text: TextNode_default,
|
|
@@ -1068,66 +1003,66 @@ var ListItemNode = (props) => {
|
|
|
1068
1003
|
liStyle.fontSize = match[1].trim();
|
|
1069
1004
|
}
|
|
1070
1005
|
}
|
|
1071
|
-
return /* @__PURE__ */
|
|
1006
|
+
return /* @__PURE__ */ jsx24("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
1072
1007
|
const SelectedNode = NodeTypes2[node.type];
|
|
1073
1008
|
if (node.type === "linebreak") {
|
|
1074
1009
|
if (!foundFirstBreak) {
|
|
1075
1010
|
foundFirstBreak = true;
|
|
1076
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ jsx24("div", {}, index);
|
|
1077
1012
|
} else {
|
|
1078
|
-
return /* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ jsx24("div", { className: "py-1 lg:py-2" }, index);
|
|
1079
1014
|
}
|
|
1080
1015
|
} else {
|
|
1081
1016
|
foundFirstBreak = false;
|
|
1082
|
-
return /* @__PURE__ */
|
|
1017
|
+
return /* @__PURE__ */ jsx24(React17.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx24(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
1083
1018
|
}
|
|
1084
1019
|
}) });
|
|
1085
1020
|
};
|
|
1086
1021
|
var ListItemNode_default = ListItemNode;
|
|
1087
1022
|
|
|
1088
1023
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
1089
|
-
import { jsx as
|
|
1024
|
+
import { jsx as jsx25, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1090
1025
|
var ListNode = (props) => {
|
|
1091
1026
|
const NodeTypes2 = {
|
|
1092
1027
|
listitem: ListItemNode_default
|
|
1093
1028
|
};
|
|
1094
|
-
return /* @__PURE__ */ jsxs8(
|
|
1095
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
1029
|
+
return /* @__PURE__ */ jsxs8(React18.Fragment, { children: [
|
|
1030
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx25("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
1096
1031
|
const SelectedNode = NodeTypes2[node.type];
|
|
1097
|
-
return /* @__PURE__ */
|
|
1032
|
+
return /* @__PURE__ */ jsx25(React18.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx25(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
1098
1033
|
}) }),
|
|
1099
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
1034
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx25("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
1100
1035
|
const SelectedNode = NodeTypes2[node.type];
|
|
1101
|
-
return /* @__PURE__ */
|
|
1036
|
+
return /* @__PURE__ */ jsx25(React18.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx25(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
1102
1037
|
}) })
|
|
1103
1038
|
] });
|
|
1104
1039
|
};
|
|
1105
1040
|
var ListNode_default = ListNode;
|
|
1106
1041
|
|
|
1107
1042
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
1108
|
-
import
|
|
1109
|
-
import { jsx as
|
|
1043
|
+
import React19 from "react";
|
|
1044
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1110
1045
|
var QuoteNode = (props) => {
|
|
1111
1046
|
const NodeTypes2 = {
|
|
1112
1047
|
["text"]: TextNode_default,
|
|
1113
1048
|
["linebreak"]: LineBreakNode_default,
|
|
1114
1049
|
["link"]: LinkNode_default
|
|
1115
1050
|
};
|
|
1116
|
-
return /* @__PURE__ */
|
|
1051
|
+
return /* @__PURE__ */ jsx26("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
1117
1052
|
const SelectedNode = NodeTypes2[node.type];
|
|
1118
|
-
return /* @__PURE__ */
|
|
1053
|
+
return /* @__PURE__ */ jsx26(React19.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx26(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
1119
1054
|
}) });
|
|
1120
1055
|
};
|
|
1121
1056
|
var QuoteNode_default = QuoteNode;
|
|
1122
1057
|
|
|
1123
1058
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
1124
|
-
import
|
|
1125
|
-
import
|
|
1126
|
-
import { jsx as
|
|
1127
|
-
var CopyButton =
|
|
1059
|
+
import React20 from "react";
|
|
1060
|
+
import dynamic8 from "next/dynamic";
|
|
1061
|
+
import { jsx as jsx27, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1062
|
+
var CopyButton = dynamic8(() => import("./CopyButton-UPJPMJUB.mjs"), {
|
|
1128
1063
|
ssr: false,
|
|
1129
1064
|
// optional: fallback UI while loading
|
|
1130
|
-
loading: () => /* @__PURE__ */
|
|
1065
|
+
loading: () => /* @__PURE__ */ jsx27("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
1131
1066
|
});
|
|
1132
1067
|
var CodeNode = (props) => {
|
|
1133
1068
|
const NodeTypes2 = {
|
|
@@ -1143,12 +1078,12 @@ var CodeNode = (props) => {
|
|
|
1143
1078
|
}).join("") ?? "";
|
|
1144
1079
|
return /* @__PURE__ */ jsxs9("div", { children: [
|
|
1145
1080
|
/* @__PURE__ */ jsxs9("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ jsx27("span", { children: "Code Snippet" }),
|
|
1082
|
+
/* @__PURE__ */ jsx27(CopyButton, { text: textContent })
|
|
1148
1083
|
] }),
|
|
1149
|
-
/* @__PURE__ */
|
|
1084
|
+
/* @__PURE__ */ jsx27("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) => {
|
|
1150
1085
|
const SelectedNode = NodeTypes2[node.type];
|
|
1151
|
-
return /* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ jsx27(React20.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx27(
|
|
1152
1087
|
SelectedNode,
|
|
1153
1088
|
{
|
|
1154
1089
|
node,
|
|
@@ -1163,15 +1098,15 @@ var CodeNode = (props) => {
|
|
|
1163
1098
|
var CodeNode_default = CodeNode;
|
|
1164
1099
|
|
|
1165
1100
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
1166
|
-
import { jsx as
|
|
1101
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1167
1102
|
var HorizontalRuleNode = () => {
|
|
1168
|
-
return /* @__PURE__ */
|
|
1103
|
+
return /* @__PURE__ */ jsx28("hr", {});
|
|
1169
1104
|
};
|
|
1170
1105
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
1171
1106
|
|
|
1172
1107
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
1173
|
-
import
|
|
1174
|
-
import { Fragment as Fragment4, jsx as
|
|
1108
|
+
import React21 from "react";
|
|
1109
|
+
import { Fragment as Fragment4, jsx as jsx29 } from "react/jsx-runtime";
|
|
1175
1110
|
var WidgetNode = (props) => {
|
|
1176
1111
|
const getWidgetParameters = () => {
|
|
1177
1112
|
const widgetInputParameters = {
|
|
@@ -1235,7 +1170,7 @@ var WidgetNode = (props) => {
|
|
|
1235
1170
|
};
|
|
1236
1171
|
const widgetCode = props.node?.widgetCode;
|
|
1237
1172
|
if (!widgetCode) {
|
|
1238
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ jsx29(Fragment4, { children: "Invalid widget" });
|
|
1239
1174
|
}
|
|
1240
1175
|
const widgetParams = getWidgetParameters();
|
|
1241
1176
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -1244,7 +1179,7 @@ var WidgetNode = (props) => {
|
|
|
1244
1179
|
}
|
|
1245
1180
|
return (
|
|
1246
1181
|
// eslint-disable-next-line react-hooks/static-components
|
|
1247
|
-
/* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ jsx29(React21.Fragment, { children: /* @__PURE__ */ jsx29(
|
|
1248
1183
|
WidgetRenderer,
|
|
1249
1184
|
{
|
|
1250
1185
|
params: widgetParams,
|
|
@@ -1261,13 +1196,13 @@ var WidgetNode = (props) => {
|
|
|
1261
1196
|
var WidgetNode_default = WidgetNode;
|
|
1262
1197
|
|
|
1263
1198
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
1264
|
-
import
|
|
1265
|
-
import
|
|
1199
|
+
import dynamic11 from "next/dynamic";
|
|
1200
|
+
import React22 from "react";
|
|
1266
1201
|
|
|
1267
1202
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
1268
|
-
import
|
|
1269
|
-
import { jsx as
|
|
1270
|
-
var IframeClient =
|
|
1203
|
+
import dynamic9 from "next/dynamic";
|
|
1204
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1205
|
+
var IframeClient = dynamic9(() => import("./IframeClient-E6VGPN6S.mjs"), {
|
|
1271
1206
|
ssr: false
|
|
1272
1207
|
});
|
|
1273
1208
|
var EmbedNode = (props) => {
|
|
@@ -1279,7 +1214,7 @@ var EmbedNode = (props) => {
|
|
|
1279
1214
|
} else {
|
|
1280
1215
|
src = props.node.embedSrc;
|
|
1281
1216
|
}
|
|
1282
|
-
return /* @__PURE__ */
|
|
1217
|
+
return /* @__PURE__ */ jsx30("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx30(IframeClient, { src }) });
|
|
1283
1218
|
};
|
|
1284
1219
|
var EmbedNode_default = EmbedNode;
|
|
1285
1220
|
|
|
@@ -1472,10 +1407,10 @@ var PathUtility = class {
|
|
|
1472
1407
|
var PathUtility_default = new PathUtility();
|
|
1473
1408
|
|
|
1474
1409
|
// src/components/NoDataFound.tsx
|
|
1475
|
-
import { jsx as
|
|
1410
|
+
import { jsx as jsx31, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1476
1411
|
var NoDataFound = () => {
|
|
1477
1412
|
return /* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
1478
|
-
/* @__PURE__ */
|
|
1413
|
+
/* @__PURE__ */ jsx31("div", { className: "mb-5", children: /* @__PURE__ */ jsx31("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx31(
|
|
1479
1414
|
"svg",
|
|
1480
1415
|
{
|
|
1481
1416
|
className: "w-10 h-10",
|
|
@@ -1483,7 +1418,7 @@ var NoDataFound = () => {
|
|
|
1483
1418
|
stroke: "currentColor",
|
|
1484
1419
|
viewBox: "0 0 24 24",
|
|
1485
1420
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1486
|
-
children: /* @__PURE__ */
|
|
1421
|
+
children: /* @__PURE__ */ jsx31(
|
|
1487
1422
|
"path",
|
|
1488
1423
|
{
|
|
1489
1424
|
strokeLinecap: "round",
|
|
@@ -1494,16 +1429,16 @@ var NoDataFound = () => {
|
|
|
1494
1429
|
)
|
|
1495
1430
|
}
|
|
1496
1431
|
) }) }),
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
/* @__PURE__ */
|
|
1432
|
+
/* @__PURE__ */ jsx31("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
1433
|
+
/* @__PURE__ */ jsx31("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
1499
1434
|
] });
|
|
1500
1435
|
};
|
|
1501
1436
|
var NoDataFound_default = NoDataFound;
|
|
1502
1437
|
|
|
1503
1438
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
1504
|
-
import
|
|
1505
|
-
import { Fragment as Fragment5, jsx as
|
|
1506
|
-
var HlsPlayer3 =
|
|
1439
|
+
import dynamic10 from "next/dynamic";
|
|
1440
|
+
import { Fragment as Fragment5, jsx as jsx32, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1441
|
+
var HlsPlayer3 = dynamic10(() => import("./HlsPlayer-IW52N5RG.mjs"), { ssr: false });
|
|
1507
1442
|
var deviceToMediaQuery = (device) => {
|
|
1508
1443
|
switch (device) {
|
|
1509
1444
|
case "lg":
|
|
@@ -1659,7 +1594,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1659
1594
|
};
|
|
1660
1595
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
1661
1596
|
return /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
1662
|
-
hlsSources.length > 0 && /* @__PURE__ */
|
|
1597
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx32(Fragment5, { children: /* @__PURE__ */ jsx32(
|
|
1663
1598
|
HlsPlayer3,
|
|
1664
1599
|
{
|
|
1665
1600
|
sources: hlsSources,
|
|
@@ -1674,7 +1609,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1674
1609
|
styles: hlsStyles
|
|
1675
1610
|
}
|
|
1676
1611
|
) }),
|
|
1677
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */
|
|
1612
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ jsx32(Fragment5, { children: staticFallback ? /* @__PURE__ */ jsxs11("picture", { children: [
|
|
1678
1613
|
DEVICE_ORDER.map((deviceKey) => {
|
|
1679
1614
|
const match = staticSources.find(
|
|
1680
1615
|
(img) => img.device === deviceKey
|
|
@@ -1690,7 +1625,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1690
1625
|
if (!srcUrl) {
|
|
1691
1626
|
return null;
|
|
1692
1627
|
}
|
|
1693
|
-
return /* @__PURE__ */
|
|
1628
|
+
return /* @__PURE__ */ jsx32(
|
|
1694
1629
|
"source",
|
|
1695
1630
|
{
|
|
1696
1631
|
media: deviceToMediaQuery(match.device),
|
|
@@ -1715,7 +1650,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1715
1650
|
if (img.borderRadius) {
|
|
1716
1651
|
styles.borderRadius = img.borderRadius;
|
|
1717
1652
|
}
|
|
1718
|
-
return /* @__PURE__ */
|
|
1653
|
+
return /* @__PURE__ */ jsx32(
|
|
1719
1654
|
"img",
|
|
1720
1655
|
{
|
|
1721
1656
|
loading: "lazy",
|
|
@@ -1730,7 +1665,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1730
1665
|
})()
|
|
1731
1666
|
] }) : (
|
|
1732
1667
|
/* Case 2: Only device-specific images exist */
|
|
1733
|
-
/* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ jsx32(Fragment5, { children: staticSources.map((img, index) => {
|
|
1734
1669
|
const resolved = resolveImage(img);
|
|
1735
1670
|
const imageUrl = resolved?.imageUrl;
|
|
1736
1671
|
if (!imageUrl) {
|
|
@@ -1757,7 +1692,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1757
1692
|
default:
|
|
1758
1693
|
display = "block";
|
|
1759
1694
|
}
|
|
1760
|
-
return /* @__PURE__ */
|
|
1695
|
+
return /* @__PURE__ */ jsx32(
|
|
1761
1696
|
"img",
|
|
1762
1697
|
{
|
|
1763
1698
|
loading: "lazy",
|
|
@@ -1897,7 +1832,7 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
1897
1832
|
};
|
|
1898
1833
|
|
|
1899
1834
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
1900
|
-
import { Fragment as Fragment6, jsx as
|
|
1835
|
+
import { Fragment as Fragment6, jsx as jsx33, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1901
1836
|
var getNestedValue5 = (obj, path) => {
|
|
1902
1837
|
if (!obj || !path) return void 0;
|
|
1903
1838
|
return path.split(".").reduce((current, key) => {
|
|
@@ -1911,14 +1846,14 @@ var PdfIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
1911
1846
|
viewBox: "0 0 48 48",
|
|
1912
1847
|
className: "w-10 h-10",
|
|
1913
1848
|
children: [
|
|
1914
|
-
/* @__PURE__ */
|
|
1849
|
+
/* @__PURE__ */ jsx33(
|
|
1915
1850
|
"path",
|
|
1916
1851
|
{
|
|
1917
1852
|
fill: "#e53935",
|
|
1918
1853
|
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"
|
|
1919
1854
|
}
|
|
1920
1855
|
),
|
|
1921
|
-
/* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ jsx33(
|
|
1922
1857
|
"path",
|
|
1923
1858
|
{
|
|
1924
1859
|
fill: "#fff",
|
|
@@ -1935,48 +1870,48 @@ var ExcelIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
1935
1870
|
viewBox: "0 0 48 48",
|
|
1936
1871
|
className: "w-10 h-10",
|
|
1937
1872
|
children: [
|
|
1938
|
-
/* @__PURE__ */
|
|
1873
|
+
/* @__PURE__ */ jsx33(
|
|
1939
1874
|
"path",
|
|
1940
1875
|
{
|
|
1941
1876
|
fill: "#169154",
|
|
1942
1877
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
1943
1878
|
}
|
|
1944
1879
|
),
|
|
1945
|
-
/* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ jsx33(
|
|
1946
1881
|
"path",
|
|
1947
1882
|
{
|
|
1948
1883
|
fill: "#18482a",
|
|
1949
1884
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
1950
1885
|
}
|
|
1951
1886
|
),
|
|
1952
|
-
/* @__PURE__ */
|
|
1953
|
-
/* @__PURE__ */
|
|
1887
|
+
/* @__PURE__ */ jsx33("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
1888
|
+
/* @__PURE__ */ jsx33("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
1954
1889
|
/* @__PURE__ */ jsxs12("g", { children: [
|
|
1955
|
-
/* @__PURE__ */
|
|
1890
|
+
/* @__PURE__ */ jsx33(
|
|
1956
1891
|
"path",
|
|
1957
1892
|
{
|
|
1958
1893
|
fill: "#29c27f",
|
|
1959
1894
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
1960
1895
|
}
|
|
1961
1896
|
),
|
|
1962
|
-
/* @__PURE__ */
|
|
1897
|
+
/* @__PURE__ */ jsx33(
|
|
1963
1898
|
"path",
|
|
1964
1899
|
{
|
|
1965
1900
|
fill: "#27663f",
|
|
1966
1901
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
1967
1902
|
}
|
|
1968
1903
|
),
|
|
1969
|
-
/* @__PURE__ */
|
|
1970
|
-
/* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ jsx33("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
1905
|
+
/* @__PURE__ */ jsx33("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
1971
1906
|
] }),
|
|
1972
|
-
/* @__PURE__ */
|
|
1907
|
+
/* @__PURE__ */ jsx33(
|
|
1973
1908
|
"path",
|
|
1974
1909
|
{
|
|
1975
1910
|
fill: "#0c7238",
|
|
1976
1911
|
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"
|
|
1977
1912
|
}
|
|
1978
1913
|
),
|
|
1979
|
-
/* @__PURE__ */
|
|
1914
|
+
/* @__PURE__ */ jsx33(
|
|
1980
1915
|
"path",
|
|
1981
1916
|
{
|
|
1982
1917
|
fill: "#fff",
|
|
@@ -1994,7 +1929,7 @@ var WordIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
1994
1929
|
className: "w-10 h-10",
|
|
1995
1930
|
baseProfile: "basic",
|
|
1996
1931
|
children: [
|
|
1997
|
-
/* @__PURE__ */
|
|
1932
|
+
/* @__PURE__ */ jsx33(
|
|
1998
1933
|
"path",
|
|
1999
1934
|
{
|
|
2000
1935
|
fill: "#283593",
|
|
@@ -2012,19 +1947,19 @@ var WordIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2012
1947
|
gradientTransform: "translate(0 -339.89)",
|
|
2013
1948
|
gradientUnits: "userSpaceOnUse",
|
|
2014
1949
|
children: [
|
|
2015
|
-
/* @__PURE__ */
|
|
2016
|
-
/* @__PURE__ */
|
|
1950
|
+
/* @__PURE__ */ jsx33("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
1951
|
+
/* @__PURE__ */ jsx33("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
2017
1952
|
]
|
|
2018
1953
|
}
|
|
2019
1954
|
),
|
|
2020
|
-
/* @__PURE__ */
|
|
1955
|
+
/* @__PURE__ */ jsx33(
|
|
2021
1956
|
"path",
|
|
2022
1957
|
{
|
|
2023
1958
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
2024
1959
|
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"
|
|
2025
1960
|
}
|
|
2026
1961
|
),
|
|
2027
|
-
/* @__PURE__ */
|
|
1962
|
+
/* @__PURE__ */ jsx33(
|
|
2028
1963
|
"path",
|
|
2029
1964
|
{
|
|
2030
1965
|
fill: "#1e88e5",
|
|
@@ -2032,21 +1967,21 @@ var WordIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2032
1967
|
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"
|
|
2033
1968
|
}
|
|
2034
1969
|
),
|
|
2035
|
-
/* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ jsx33(
|
|
2036
1971
|
"path",
|
|
2037
1972
|
{
|
|
2038
1973
|
fill: "#00e5ff",
|
|
2039
1974
|
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"
|
|
2040
1975
|
}
|
|
2041
1976
|
),
|
|
2042
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ jsx33(
|
|
2043
1978
|
"path",
|
|
2044
1979
|
{
|
|
2045
1980
|
fill: "#1565c0",
|
|
2046
1981
|
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"
|
|
2047
1982
|
}
|
|
2048
1983
|
),
|
|
2049
|
-
/* @__PURE__ */
|
|
1984
|
+
/* @__PURE__ */ jsx33(
|
|
2050
1985
|
"path",
|
|
2051
1986
|
{
|
|
2052
1987
|
fill: "#fff",
|
|
@@ -2063,8 +1998,8 @@ var StandardIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2063
1998
|
viewBox: "0 0 48 48",
|
|
2064
1999
|
className: "w-10 h-10",
|
|
2065
2000
|
children: [
|
|
2066
|
-
/* @__PURE__ */
|
|
2067
|
-
/* @__PURE__ */
|
|
2001
|
+
/* @__PURE__ */ jsx33("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
2002
|
+
/* @__PURE__ */ jsx33("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
2068
2003
|
]
|
|
2069
2004
|
}
|
|
2070
2005
|
);
|
|
@@ -2075,23 +2010,23 @@ var PowerPointIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2075
2010
|
viewBox: "0 0 48 48",
|
|
2076
2011
|
className: "w-10 h-10",
|
|
2077
2012
|
children: [
|
|
2078
|
-
/* @__PURE__ */
|
|
2013
|
+
/* @__PURE__ */ jsx33(
|
|
2079
2014
|
"path",
|
|
2080
2015
|
{
|
|
2081
2016
|
fill: "#dc4c2c",
|
|
2082
2017
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
2083
2018
|
}
|
|
2084
2019
|
),
|
|
2085
|
-
/* @__PURE__ */
|
|
2086
|
-
/* @__PURE__ */
|
|
2087
|
-
/* @__PURE__ */
|
|
2020
|
+
/* @__PURE__ */ jsx33("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
2021
|
+
/* @__PURE__ */ jsx33("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
2022
|
+
/* @__PURE__ */ jsx33(
|
|
2088
2023
|
"path",
|
|
2089
2024
|
{
|
|
2090
2025
|
fill: "#9b341f",
|
|
2091
2026
|
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"
|
|
2092
2027
|
}
|
|
2093
2028
|
),
|
|
2094
|
-
/* @__PURE__ */
|
|
2029
|
+
/* @__PURE__ */ jsx33(
|
|
2095
2030
|
"path",
|
|
2096
2031
|
{
|
|
2097
2032
|
fill: "#fff",
|
|
@@ -2108,9 +2043,9 @@ var TextIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2108
2043
|
viewBox: "0 0 48 48",
|
|
2109
2044
|
className: "w-10 h-10",
|
|
2110
2045
|
children: [
|
|
2111
|
-
/* @__PURE__ */
|
|
2112
|
-
/* @__PURE__ */
|
|
2113
|
-
/* @__PURE__ */
|
|
2046
|
+
/* @__PURE__ */ jsx33("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
2047
|
+
/* @__PURE__ */ jsx33("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
2048
|
+
/* @__PURE__ */ jsx33(
|
|
2114
2049
|
"path",
|
|
2115
2050
|
{
|
|
2116
2051
|
fill: "#1976D2",
|
|
@@ -2130,14 +2065,14 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2130
2065
|
version: "1.0",
|
|
2131
2066
|
className: "w-10 h-10",
|
|
2132
2067
|
children: [
|
|
2133
|
-
/* @__PURE__ */
|
|
2068
|
+
/* @__PURE__ */ jsx33("defs", { children: /* @__PURE__ */ jsx33("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ jsx33(
|
|
2134
2069
|
"path",
|
|
2135
2070
|
{
|
|
2136
2071
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
2137
2072
|
"clip-rule": "nonzero"
|
|
2138
2073
|
}
|
|
2139
2074
|
) }) }),
|
|
2140
|
-
/* @__PURE__ */
|
|
2075
|
+
/* @__PURE__ */ jsx33("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ jsx33(
|
|
2141
2076
|
"path",
|
|
2142
2077
|
{
|
|
2143
2078
|
fill: "#ff9100",
|
|
@@ -2146,7 +2081,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2146
2081
|
"fill-rule": "nonzero"
|
|
2147
2082
|
}
|
|
2148
2083
|
) }),
|
|
2149
|
-
/* @__PURE__ */
|
|
2084
|
+
/* @__PURE__ */ jsx33(
|
|
2150
2085
|
"path",
|
|
2151
2086
|
{
|
|
2152
2087
|
fill: "#fbe9e7",
|
|
@@ -2155,7 +2090,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2155
2090
|
"fill-rule": "nonzero"
|
|
2156
2091
|
}
|
|
2157
2092
|
),
|
|
2158
|
-
/* @__PURE__ */
|
|
2093
|
+
/* @__PURE__ */ jsx33(
|
|
2159
2094
|
"path",
|
|
2160
2095
|
{
|
|
2161
2096
|
fill: "#ffe0b2",
|
|
@@ -2164,7 +2099,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2164
2099
|
"fill-rule": "nonzero"
|
|
2165
2100
|
}
|
|
2166
2101
|
),
|
|
2167
|
-
/* @__PURE__ */
|
|
2102
|
+
/* @__PURE__ */ jsx33(
|
|
2168
2103
|
"path",
|
|
2169
2104
|
{
|
|
2170
2105
|
fill: "#ffe0b2",
|
|
@@ -2173,7 +2108,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2173
2108
|
"fill-rule": "nonzero"
|
|
2174
2109
|
}
|
|
2175
2110
|
),
|
|
2176
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ jsx33(
|
|
2177
2112
|
"path",
|
|
2178
2113
|
{
|
|
2179
2114
|
fill: "#ffe0b2",
|
|
@@ -2249,8 +2184,8 @@ var DocumentNode = (props) => {
|
|
|
2249
2184
|
}
|
|
2250
2185
|
}
|
|
2251
2186
|
if (documents.length === 0) {
|
|
2252
|
-
return /* @__PURE__ */
|
|
2253
|
-
/* @__PURE__ */
|
|
2187
|
+
return /* @__PURE__ */ jsx33(Fragment6, { children: /* @__PURE__ */ jsxs12("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
2188
|
+
/* @__PURE__ */ jsx33("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx33(
|
|
2254
2189
|
"svg",
|
|
2255
2190
|
{
|
|
2256
2191
|
className: "w-5 h-5",
|
|
@@ -2258,7 +2193,7 @@ var DocumentNode = (props) => {
|
|
|
2258
2193
|
stroke: "currentColor",
|
|
2259
2194
|
viewBox: "0 0 24 24",
|
|
2260
2195
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2261
|
-
children: /* @__PURE__ */
|
|
2196
|
+
children: /* @__PURE__ */ jsx33(
|
|
2262
2197
|
"path",
|
|
2263
2198
|
{
|
|
2264
2199
|
strokeLinecap: "round",
|
|
@@ -2269,11 +2204,11 @@ var DocumentNode = (props) => {
|
|
|
2269
2204
|
)
|
|
2270
2205
|
}
|
|
2271
2206
|
) }),
|
|
2272
|
-
/* @__PURE__ */
|
|
2273
|
-
/* @__PURE__ */
|
|
2207
|
+
/* @__PURE__ */ jsx33("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
2208
|
+
/* @__PURE__ */ jsx33("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
2274
2209
|
] }) });
|
|
2275
2210
|
}
|
|
2276
|
-
return /* @__PURE__ */
|
|
2211
|
+
return /* @__PURE__ */ jsx33("div", { className: "", children: documents.map((doc, index) => {
|
|
2277
2212
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
2278
2213
|
props.assetBaseUrl,
|
|
2279
2214
|
doc.assetUrl
|
|
@@ -2297,8 +2232,8 @@ var DocumentNode = (props) => {
|
|
|
2297
2232
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
2298
2233
|
children: [
|
|
2299
2234
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center space-x-4", children: [
|
|
2300
|
-
/* @__PURE__ */
|
|
2301
|
-
/* @__PURE__ */
|
|
2235
|
+
/* @__PURE__ */ jsx33("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft", children: /* @__PURE__ */ jsx33(Icon, {}) }),
|
|
2236
|
+
/* @__PURE__ */ jsx33("div", { className: "flex items-baseline space-x-2", children: /* @__PURE__ */ jsx33("h4", { className: "text-base font-semibold", children: documentTitle }) })
|
|
2302
2237
|
] }),
|
|
2303
2238
|
/* @__PURE__ */ jsxs12(
|
|
2304
2239
|
"a",
|
|
@@ -2316,7 +2251,7 @@ var DocumentNode = (props) => {
|
|
|
2316
2251
|
stroke: "currentColor",
|
|
2317
2252
|
viewBox: "0 0 24 24",
|
|
2318
2253
|
children: [
|
|
2319
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ jsx33(
|
|
2320
2255
|
"path",
|
|
2321
2256
|
{
|
|
2322
2257
|
strokeLinecap: "round",
|
|
@@ -2325,7 +2260,7 @@ var DocumentNode = (props) => {
|
|
|
2325
2260
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
2326
2261
|
}
|
|
2327
2262
|
),
|
|
2328
|
-
/* @__PURE__ */
|
|
2263
|
+
/* @__PURE__ */ jsx33(
|
|
2329
2264
|
"path",
|
|
2330
2265
|
{
|
|
2331
2266
|
strokeLinecap: "round",
|
|
@@ -2350,9 +2285,9 @@ var DocumentNode = (props) => {
|
|
|
2350
2285
|
var DocumentNode_default = DocumentNode;
|
|
2351
2286
|
|
|
2352
2287
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2353
|
-
import { jsx as
|
|
2354
|
-
var Pagination =
|
|
2355
|
-
var Slider =
|
|
2288
|
+
import { jsx as jsx34, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2289
|
+
var Pagination = dynamic11(() => import("./Pagination-YKNCYVXV.mjs"), { ssr: true });
|
|
2290
|
+
var Slider = dynamic11(() => import("./Slider-554BKC7N.mjs"), {
|
|
2356
2291
|
ssr: false
|
|
2357
2292
|
});
|
|
2358
2293
|
function toCamelCase(str) {
|
|
@@ -2605,7 +2540,7 @@ var DivContainer = async (props) => {
|
|
|
2605
2540
|
response = await serviceClient.get(endpoint);
|
|
2606
2541
|
result = response?.result;
|
|
2607
2542
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
2608
|
-
return /* @__PURE__ */
|
|
2543
|
+
return /* @__PURE__ */ jsx34(NoDataFound_default, {});
|
|
2609
2544
|
}
|
|
2610
2545
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
2611
2546
|
childCollectionData = getNestedValue6(
|
|
@@ -2625,7 +2560,7 @@ var DivContainer = async (props) => {
|
|
|
2625
2560
|
}
|
|
2626
2561
|
const SelectedNode = NodeTypes2[node.type];
|
|
2627
2562
|
if (!SelectedNode) return null;
|
|
2628
|
-
return /* @__PURE__ */
|
|
2563
|
+
return /* @__PURE__ */ jsx34(React22.Fragment, { children: /* @__PURE__ */ jsx34(
|
|
2629
2564
|
SelectedNode,
|
|
2630
2565
|
{
|
|
2631
2566
|
node,
|
|
@@ -2758,14 +2693,14 @@ var DivContainer = async (props) => {
|
|
|
2758
2693
|
noLinkColor && "no-link-color",
|
|
2759
2694
|
!!props.node.enterAnimation && "enter-animation"
|
|
2760
2695
|
].filter(Boolean).join(" ");
|
|
2761
|
-
return /* @__PURE__ */ jsxs13(
|
|
2762
|
-
/* @__PURE__ */
|
|
2696
|
+
return /* @__PURE__ */ jsxs13(React22.Fragment, { children: [
|
|
2697
|
+
/* @__PURE__ */ jsx34(
|
|
2763
2698
|
"style",
|
|
2764
2699
|
{
|
|
2765
2700
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
2766
2701
|
}
|
|
2767
2702
|
),
|
|
2768
|
-
/* @__PURE__ */
|
|
2703
|
+
/* @__PURE__ */ jsx34(
|
|
2769
2704
|
Wrapper,
|
|
2770
2705
|
{
|
|
2771
2706
|
id: guid,
|
|
@@ -2779,11 +2714,11 @@ var DivContainer = async (props) => {
|
|
|
2779
2714
|
item,
|
|
2780
2715
|
idx,
|
|
2781
2716
|
props.href ? void 0 : item?.links?.view
|
|
2782
|
-
)?.map((child, i) => /* @__PURE__ */
|
|
2717
|
+
)?.map((child, i) => /* @__PURE__ */ jsx34(React22.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
2783
2718
|
)
|
|
2784
2719
|
}
|
|
2785
2720
|
),
|
|
2786
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
2721
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(
|
|
2787
2722
|
Pagination,
|
|
2788
2723
|
{
|
|
2789
2724
|
path: props.path,
|
|
@@ -2796,7 +2731,7 @@ var DivContainer = async (props) => {
|
|
|
2796
2731
|
var DivContainer_default = DivContainer;
|
|
2797
2732
|
|
|
2798
2733
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2799
|
-
import { jsx as
|
|
2734
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2800
2735
|
var NodeTypes = {
|
|
2801
2736
|
["paragraph"]: ParagraphNode_default,
|
|
2802
2737
|
["heading"]: HeadingNode_default,
|
|
@@ -2833,14 +2768,14 @@ var PageBodyRenderer = (props) => {
|
|
|
2833
2768
|
}
|
|
2834
2769
|
return true;
|
|
2835
2770
|
};
|
|
2836
|
-
return /* @__PURE__ */
|
|
2771
|
+
return /* @__PURE__ */ jsx35(React23.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
2837
2772
|
{
|
|
2838
2773
|
}
|
|
2839
2774
|
const SelectedNode = NodeTypes[node.type];
|
|
2840
2775
|
if (!shouldRenderNode(node)) {
|
|
2841
2776
|
return null;
|
|
2842
2777
|
}
|
|
2843
|
-
return /* @__PURE__ */
|
|
2778
|
+
return /* @__PURE__ */ jsx35(React23.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx35(React23.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx35(React23.Fragment, { children: /* @__PURE__ */ jsx35(
|
|
2844
2779
|
SelectedNode,
|
|
2845
2780
|
{
|
|
2846
2781
|
node,
|
|
@@ -2856,7 +2791,7 @@ var PageBodyRenderer = (props) => {
|
|
|
2856
2791
|
device: props.device,
|
|
2857
2792
|
widgetRenderer: props.widgetRenderer
|
|
2858
2793
|
}
|
|
2859
|
-
) }) : /* @__PURE__ */
|
|
2794
|
+
) }) : /* @__PURE__ */ jsx35(React23.Fragment, { children: /* @__PURE__ */ jsx35(
|
|
2860
2795
|
SelectedNode,
|
|
2861
2796
|
{
|
|
2862
2797
|
node,
|
|
@@ -2877,10 +2812,10 @@ var PageBodyRenderer = (props) => {
|
|
|
2877
2812
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
2878
2813
|
|
|
2879
2814
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
2880
|
-
import { useEffect
|
|
2815
|
+
import { useEffect } from "react";
|
|
2881
2816
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
2882
2817
|
function EnterAnimationHydrator() {
|
|
2883
|
-
|
|
2818
|
+
useEffect(() => {
|
|
2884
2819
|
let observer;
|
|
2885
2820
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
2886
2821
|
const revealAnimatedElements = () => {
|
|
@@ -2925,12 +2860,12 @@ function EnterAnimationHydrator() {
|
|
|
2925
2860
|
}
|
|
2926
2861
|
|
|
2927
2862
|
// src/components/Toast.tsx
|
|
2928
|
-
import { useCallback, useEffect as
|
|
2929
|
-
import { Fragment as Fragment7, jsx as
|
|
2863
|
+
import { useCallback, useEffect as useEffect2, useRef, useState } from "react";
|
|
2864
|
+
import { Fragment as Fragment7, jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2930
2865
|
var Toast = () => {
|
|
2931
|
-
const [showToast, setShowToast] =
|
|
2932
|
-
const [message, setMessage] =
|
|
2933
|
-
const [messageType, setMessageType] =
|
|
2866
|
+
const [showToast, setShowToast] = useState(false);
|
|
2867
|
+
const [message, setMessage] = useState("");
|
|
2868
|
+
const [messageType, setMessageType] = useState("error");
|
|
2934
2869
|
const timeoutRef = useRef(null);
|
|
2935
2870
|
const closeToast = useCallback(() => {
|
|
2936
2871
|
if (timeoutRef.current) {
|
|
@@ -2951,7 +2886,7 @@ var Toast = () => {
|
|
|
2951
2886
|
timeoutRef.current = null;
|
|
2952
2887
|
}, 4e3);
|
|
2953
2888
|
}, []);
|
|
2954
|
-
|
|
2889
|
+
useEffect2(() => {
|
|
2955
2890
|
ToastService_default.initialize(showMessage, closeToast);
|
|
2956
2891
|
return () => {
|
|
2957
2892
|
closeToast();
|
|
@@ -2960,8 +2895,8 @@ var Toast = () => {
|
|
|
2960
2895
|
});
|
|
2961
2896
|
};
|
|
2962
2897
|
}, [closeToast, showMessage]);
|
|
2963
|
-
return /* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
2898
|
+
return /* @__PURE__ */ jsx36(Fragment7, { children: showToast && /* @__PURE__ */ jsx36("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__ */ jsxs14("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
2899
|
+
/* @__PURE__ */ jsx36(
|
|
2965
2900
|
"span",
|
|
2966
2901
|
{
|
|
2967
2902
|
className: "font-medium text-inherit text-sm",
|
|
@@ -2969,7 +2904,7 @@ var Toast = () => {
|
|
|
2969
2904
|
children: message
|
|
2970
2905
|
}
|
|
2971
2906
|
),
|
|
2972
|
-
/* @__PURE__ */
|
|
2907
|
+
/* @__PURE__ */ jsx36("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx36(
|
|
2973
2908
|
"svg",
|
|
2974
2909
|
{
|
|
2975
2910
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2977,7 +2912,7 @@ var Toast = () => {
|
|
|
2977
2912
|
fill: "none",
|
|
2978
2913
|
viewBox: "0 0 24 24",
|
|
2979
2914
|
stroke: "currentColor",
|
|
2980
|
-
children: /* @__PURE__ */
|
|
2915
|
+
children: /* @__PURE__ */ jsx36("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
2981
2916
|
}
|
|
2982
2917
|
) })
|
|
2983
2918
|
] }) }) });
|
|
@@ -2987,7 +2922,7 @@ var Toast_default = Toast;
|
|
|
2987
2922
|
// src/components/NavigationTabsV2.tsx
|
|
2988
2923
|
import Link2 from "next/link";
|
|
2989
2924
|
import { usePathname } from "next/navigation";
|
|
2990
|
-
import { jsx as
|
|
2925
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2991
2926
|
function resolveRoutePlaceholders(route, params) {
|
|
2992
2927
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
2993
2928
|
const value = params[key];
|
|
@@ -3012,8 +2947,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
3012
2947
|
isActive: tab.isActive
|
|
3013
2948
|
})) || [];
|
|
3014
2949
|
if (mappedTabs.length === 0) return null;
|
|
3015
|
-
return /* @__PURE__ */
|
|
3016
|
-
return /* @__PURE__ */
|
|
2950
|
+
return /* @__PURE__ */ jsx37("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
2951
|
+
return /* @__PURE__ */ jsx37(Link2, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx37(
|
|
3017
2952
|
"div",
|
|
3018
2953
|
{
|
|
3019
2954
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -3026,51 +2961,51 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
3026
2961
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
3027
2962
|
|
|
3028
2963
|
// src/components/dataForm/DataList.tsx
|
|
3029
|
-
import
|
|
2964
|
+
import React27, { useEffect as useEffect3, useState as useState2, useCallback as useCallback2, useReducer } from "react";
|
|
3030
2965
|
import { useRouter } from "next/navigation";
|
|
3031
2966
|
|
|
3032
2967
|
// src/components/dataForm/NoContentView.tsx
|
|
3033
|
-
import
|
|
3034
|
-
import { jsx as
|
|
2968
|
+
import React25 from "react";
|
|
2969
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3035
2970
|
var NoContentView = (props) => {
|
|
3036
|
-
return /* @__PURE__ */
|
|
2971
|
+
return /* @__PURE__ */ jsx38(React25.Fragment, { children: props.isDataFound === false && props.children });
|
|
3037
2972
|
};
|
|
3038
2973
|
var NoContentView_default = NoContentView;
|
|
3039
2974
|
|
|
3040
2975
|
// src/components/dataForm/ContentView.tsx
|
|
3041
|
-
import
|
|
3042
|
-
import { jsx as
|
|
2976
|
+
import React26 from "react";
|
|
2977
|
+
import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3043
2978
|
var ContentView = (props) => {
|
|
3044
|
-
return /* @__PURE__ */ jsxs15(
|
|
3045
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
2979
|
+
return /* @__PURE__ */ jsxs15(React26.Fragment, { children: [
|
|
2980
|
+
props.isDataFound == null && /* @__PURE__ */ jsx39("div", { className: "", children: /* @__PURE__ */ jsxs15("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3046
2981
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center mb-4", children: [
|
|
3047
|
-
/* @__PURE__ */
|
|
2982
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3048
2983
|
/* @__PURE__ */ jsxs15("div", { className: "ml-2", children: [
|
|
3049
|
-
/* @__PURE__ */
|
|
3050
|
-
/* @__PURE__ */
|
|
2984
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
2985
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3051
2986
|
] })
|
|
3052
2987
|
] }),
|
|
3053
2988
|
/* @__PURE__ */ jsxs15("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3054
2989
|
/* @__PURE__ */ jsxs15("div", { className: "animate-pulse", children: [
|
|
3055
|
-
/* @__PURE__ */
|
|
3056
|
-
/* @__PURE__ */
|
|
3057
|
-
/* @__PURE__ */
|
|
3058
|
-
/* @__PURE__ */
|
|
3059
|
-
/* @__PURE__ */
|
|
2990
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
2991
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
2992
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
2993
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
2994
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3060
2995
|
] }),
|
|
3061
2996
|
/* @__PURE__ */ jsxs15("div", { className: "animate-pulse", children: [
|
|
3062
|
-
/* @__PURE__ */
|
|
3063
|
-
/* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3066
|
-
/* @__PURE__ */
|
|
2997
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
2998
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
2999
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3000
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3001
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3067
3002
|
] }),
|
|
3068
3003
|
/* @__PURE__ */ jsxs15("div", { className: "animate-pulse", children: [
|
|
3069
|
-
/* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3071
|
-
/* @__PURE__ */
|
|
3072
|
-
/* @__PURE__ */
|
|
3073
|
-
/* @__PURE__ */
|
|
3004
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3005
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3006
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3007
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3008
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3074
3009
|
] })
|
|
3075
3010
|
] })
|
|
3076
3011
|
] }) }),
|
|
@@ -3124,7 +3059,7 @@ function FormReducer(state, action) {
|
|
|
3124
3059
|
var FormReducer_default = FormReducer;
|
|
3125
3060
|
|
|
3126
3061
|
// src/components/dataForm/DataList.tsx
|
|
3127
|
-
import { Fragment as Fragment8, jsx as
|
|
3062
|
+
import { Fragment as Fragment8, jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3128
3063
|
var DataList = (props) => {
|
|
3129
3064
|
const router = useRouter();
|
|
3130
3065
|
let builder = new OdataBuilder(props.path);
|
|
@@ -3132,9 +3067,9 @@ var DataList = (props) => {
|
|
|
3132
3067
|
let activePageNumber = 0;
|
|
3133
3068
|
let pages = 0;
|
|
3134
3069
|
console.log(props.addLinkText);
|
|
3135
|
-
const [isDataFound, setIsDataFound] =
|
|
3136
|
-
const [searchTerm, setSearchTerm] =
|
|
3137
|
-
|
|
3070
|
+
const [isDataFound, setIsDataFound] = useState2(null);
|
|
3071
|
+
const [searchTerm, setSearchTerm] = useState2(props.query?.searchTerm ?? "");
|
|
3072
|
+
useEffect3(() => {
|
|
3138
3073
|
if (props?.dataset) {
|
|
3139
3074
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
3140
3075
|
setIsDataFound(true);
|
|
@@ -3143,7 +3078,7 @@ var DataList = (props) => {
|
|
|
3143
3078
|
}
|
|
3144
3079
|
}
|
|
3145
3080
|
}, [props.dataset]);
|
|
3146
|
-
|
|
3081
|
+
useEffect3(() => {
|
|
3147
3082
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
3148
3083
|
const filterQuery = props.query["$filter"];
|
|
3149
3084
|
props.filters.forEach((filter) => {
|
|
@@ -3162,7 +3097,7 @@ var DataList = (props) => {
|
|
|
3162
3097
|
if (path.includes(".")) {
|
|
3163
3098
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
3164
3099
|
} else if (Array.isArray(obj[path])) {
|
|
3165
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
3100
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx40("div", { children: item }, index));
|
|
3166
3101
|
} else {
|
|
3167
3102
|
return obj[path];
|
|
3168
3103
|
}
|
|
@@ -3206,7 +3141,7 @@ var DataList = (props) => {
|
|
|
3206
3141
|
},
|
|
3207
3142
|
[dispatch, props, router]
|
|
3208
3143
|
);
|
|
3209
|
-
|
|
3144
|
+
useEffect3(() => {
|
|
3210
3145
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
3211
3146
|
return;
|
|
3212
3147
|
}
|
|
@@ -3241,30 +3176,30 @@ var DataList = (props) => {
|
|
|
3241
3176
|
const renderPageNumbers = () => {
|
|
3242
3177
|
if (pages <= 10) {
|
|
3243
3178
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
3244
|
-
(page) => /* @__PURE__ */
|
|
3179
|
+
(page) => /* @__PURE__ */ jsx40(React27.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx40(
|
|
3245
3180
|
Hyperlink,
|
|
3246
3181
|
{
|
|
3247
3182
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3248
3183
|
href: builder.getNewPageUrl(page),
|
|
3249
3184
|
children: page
|
|
3250
3185
|
}
|
|
3251
|
-
) : /* @__PURE__ */
|
|
3186
|
+
) : /* @__PURE__ */ jsx40("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
3252
3187
|
);
|
|
3253
3188
|
} else {
|
|
3254
3189
|
const showFirstPages = activePageNumber <= 5;
|
|
3255
3190
|
const showLastPages = activePageNumber > pages - 5;
|
|
3256
3191
|
if (showFirstPages) {
|
|
3257
3192
|
return /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
3258
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
3193
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx40(React27.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx40(
|
|
3259
3194
|
Hyperlink,
|
|
3260
3195
|
{
|
|
3261
3196
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3262
3197
|
href: builder.getNewPageUrl(page),
|
|
3263
3198
|
children: page
|
|
3264
3199
|
}
|
|
3265
|
-
) : /* @__PURE__ */
|
|
3266
|
-
/* @__PURE__ */
|
|
3267
|
-
/* @__PURE__ */
|
|
3200
|
+
) : /* @__PURE__ */ jsx40("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
3201
|
+
/* @__PURE__ */ jsx40("span", { className: "px-2 py-1", children: "..." }),
|
|
3202
|
+
/* @__PURE__ */ jsx40(
|
|
3268
3203
|
Hyperlink,
|
|
3269
3204
|
{
|
|
3270
3205
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3272,7 +3207,7 @@ var DataList = (props) => {
|
|
|
3272
3207
|
children: pages - 1
|
|
3273
3208
|
}
|
|
3274
3209
|
),
|
|
3275
|
-
/* @__PURE__ */
|
|
3210
|
+
/* @__PURE__ */ jsx40(
|
|
3276
3211
|
Hyperlink,
|
|
3277
3212
|
{
|
|
3278
3213
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3280,7 +3215,7 @@ var DataList = (props) => {
|
|
|
3280
3215
|
children: pages
|
|
3281
3216
|
}
|
|
3282
3217
|
),
|
|
3283
|
-
/* @__PURE__ */
|
|
3218
|
+
/* @__PURE__ */ jsx40("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs16(
|
|
3284
3219
|
"select",
|
|
3285
3220
|
{
|
|
3286
3221
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -3292,18 +3227,18 @@ var DataList = (props) => {
|
|
|
3292
3227
|
}
|
|
3293
3228
|
},
|
|
3294
3229
|
children: [
|
|
3295
|
-
/* @__PURE__ */
|
|
3230
|
+
/* @__PURE__ */ jsx40("option", { className: "", value: "", children: "Jump to" }),
|
|
3296
3231
|
Array.from(
|
|
3297
3232
|
{ length: Math.max(0, pages - 10) },
|
|
3298
3233
|
(_, index) => index + 9
|
|
3299
|
-
).map((page) => /* @__PURE__ */
|
|
3234
|
+
).map((page) => /* @__PURE__ */ jsx40("option", { value: page, children: page }, page))
|
|
3300
3235
|
]
|
|
3301
3236
|
}
|
|
3302
3237
|
) })
|
|
3303
3238
|
] });
|
|
3304
3239
|
} else if (showLastPages) {
|
|
3305
3240
|
return /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
3306
|
-
/* @__PURE__ */
|
|
3241
|
+
/* @__PURE__ */ jsx40(
|
|
3307
3242
|
Hyperlink,
|
|
3308
3243
|
{
|
|
3309
3244
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3311,7 +3246,7 @@ var DataList = (props) => {
|
|
|
3311
3246
|
children: "1"
|
|
3312
3247
|
}
|
|
3313
3248
|
),
|
|
3314
|
-
/* @__PURE__ */
|
|
3249
|
+
/* @__PURE__ */ jsx40(
|
|
3315
3250
|
Hyperlink,
|
|
3316
3251
|
{
|
|
3317
3252
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3319,21 +3254,21 @@ var DataList = (props) => {
|
|
|
3319
3254
|
children: "2"
|
|
3320
3255
|
}
|
|
3321
3256
|
),
|
|
3322
|
-
/* @__PURE__ */
|
|
3257
|
+
/* @__PURE__ */ jsx40("span", { className: "px-2 py-1", children: "..." }),
|
|
3323
3258
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
3324
|
-
(page) => /* @__PURE__ */
|
|
3259
|
+
(page) => /* @__PURE__ */ jsx40(React27.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx40(
|
|
3325
3260
|
Hyperlink,
|
|
3326
3261
|
{
|
|
3327
3262
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3328
3263
|
href: builder.getNewPageUrl(page),
|
|
3329
3264
|
children: page
|
|
3330
3265
|
}
|
|
3331
|
-
) : /* @__PURE__ */
|
|
3266
|
+
) : /* @__PURE__ */ jsx40("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
3332
3267
|
)
|
|
3333
3268
|
] });
|
|
3334
3269
|
} else {
|
|
3335
3270
|
return /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
3336
|
-
/* @__PURE__ */
|
|
3271
|
+
/* @__PURE__ */ jsx40(
|
|
3337
3272
|
Hyperlink,
|
|
3338
3273
|
{
|
|
3339
3274
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3341,7 +3276,7 @@ var DataList = (props) => {
|
|
|
3341
3276
|
children: "1"
|
|
3342
3277
|
}
|
|
3343
3278
|
),
|
|
3344
|
-
/* @__PURE__ */
|
|
3279
|
+
/* @__PURE__ */ jsx40(
|
|
3345
3280
|
Hyperlink,
|
|
3346
3281
|
{
|
|
3347
3282
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3349,20 +3284,20 @@ var DataList = (props) => {
|
|
|
3349
3284
|
children: "2"
|
|
3350
3285
|
}
|
|
3351
3286
|
),
|
|
3352
|
-
/* @__PURE__ */
|
|
3287
|
+
/* @__PURE__ */ jsx40("span", { className: "px-2 py-1", children: "..." }),
|
|
3353
3288
|
Array.from(
|
|
3354
3289
|
{ length: 5 },
|
|
3355
3290
|
(_, index) => activePageNumber - 2 + index
|
|
3356
|
-
).map((page) => /* @__PURE__ */
|
|
3291
|
+
).map((page) => /* @__PURE__ */ jsx40(React27.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx40(
|
|
3357
3292
|
Hyperlink,
|
|
3358
3293
|
{
|
|
3359
3294
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3360
3295
|
href: builder.getNewPageUrl(page),
|
|
3361
3296
|
children: page
|
|
3362
3297
|
}
|
|
3363
|
-
) : /* @__PURE__ */
|
|
3364
|
-
/* @__PURE__ */
|
|
3365
|
-
/* @__PURE__ */
|
|
3298
|
+
) : /* @__PURE__ */ jsx40("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
3299
|
+
/* @__PURE__ */ jsx40("span", { className: "px-2 py-1", children: "..." }),
|
|
3300
|
+
/* @__PURE__ */ jsx40(
|
|
3366
3301
|
Hyperlink,
|
|
3367
3302
|
{
|
|
3368
3303
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3370,7 +3305,7 @@ var DataList = (props) => {
|
|
|
3370
3305
|
children: pages - 1
|
|
3371
3306
|
}
|
|
3372
3307
|
),
|
|
3373
|
-
/* @__PURE__ */
|
|
3308
|
+
/* @__PURE__ */ jsx40(
|
|
3374
3309
|
Hyperlink,
|
|
3375
3310
|
{
|
|
3376
3311
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3378,7 +3313,7 @@ var DataList = (props) => {
|
|
|
3378
3313
|
children: pages
|
|
3379
3314
|
}
|
|
3380
3315
|
),
|
|
3381
|
-
/* @__PURE__ */
|
|
3316
|
+
/* @__PURE__ */ jsx40("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs16(
|
|
3382
3317
|
"select",
|
|
3383
3318
|
{
|
|
3384
3319
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -3390,8 +3325,8 @@ var DataList = (props) => {
|
|
|
3390
3325
|
}
|
|
3391
3326
|
},
|
|
3392
3327
|
children: [
|
|
3393
|
-
/* @__PURE__ */
|
|
3394
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
3328
|
+
/* @__PURE__ */ jsx40("option", { value: "", children: "Jump to" }),
|
|
3329
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx40("option", { value: page, children: page }, page))
|
|
3395
3330
|
]
|
|
3396
3331
|
}
|
|
3397
3332
|
) })
|
|
@@ -3399,16 +3334,16 @@ var DataList = (props) => {
|
|
|
3399
3334
|
}
|
|
3400
3335
|
}
|
|
3401
3336
|
};
|
|
3402
|
-
return /* @__PURE__ */ jsxs16(
|
|
3337
|
+
return /* @__PURE__ */ jsxs16(React27.Fragment, { children: [
|
|
3403
3338
|
/* @__PURE__ */ jsxs16(ContentView_default, { isDataFound, children: [
|
|
3404
3339
|
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs16(
|
|
3405
3340
|
"div",
|
|
3406
3341
|
{
|
|
3407
3342
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
3408
3343
|
children: [
|
|
3409
|
-
props.title ? /* @__PURE__ */
|
|
3344
|
+
props.title ? /* @__PURE__ */ jsx40("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx40("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx40("div", {}),
|
|
3410
3345
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-3", children: [
|
|
3411
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
3346
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx40(
|
|
3412
3347
|
InputControl_default,
|
|
3413
3348
|
{
|
|
3414
3349
|
name: "Search_input",
|
|
@@ -3420,7 +3355,7 @@ var DataList = (props) => {
|
|
|
3420
3355
|
}
|
|
3421
3356
|
}
|
|
3422
3357
|
),
|
|
3423
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
3358
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx40(
|
|
3424
3359
|
InputControl_default,
|
|
3425
3360
|
{
|
|
3426
3361
|
name: filter.name,
|
|
@@ -3442,8 +3377,8 @@ var DataList = (props) => {
|
|
|
3442
3377
|
linkType: "Primary" /* Solid */,
|
|
3443
3378
|
href: props.addLinkHref,
|
|
3444
3379
|
children: [
|
|
3445
|
-
/* @__PURE__ */
|
|
3446
|
-
/* @__PURE__ */
|
|
3380
|
+
/* @__PURE__ */ jsx40(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
3381
|
+
/* @__PURE__ */ jsx40("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
3447
3382
|
]
|
|
3448
3383
|
}
|
|
3449
3384
|
)
|
|
@@ -3451,8 +3386,8 @@ var DataList = (props) => {
|
|
|
3451
3386
|
]
|
|
3452
3387
|
}
|
|
3453
3388
|
),
|
|
3454
|
-
/* @__PURE__ */
|
|
3455
|
-
/* @__PURE__ */
|
|
3389
|
+
/* @__PURE__ */ jsx40("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs16("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
3390
|
+
/* @__PURE__ */ jsx40("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx40("tr", { children: props?.columns?.map((column) => {
|
|
3456
3391
|
let url = builder.getNewOrderByUrl(column.name);
|
|
3457
3392
|
let icon = "chevronUpDown";
|
|
3458
3393
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -3462,18 +3397,18 @@ var DataList = (props) => {
|
|
|
3462
3397
|
icon = "chevronUp";
|
|
3463
3398
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
3464
3399
|
}
|
|
3465
|
-
return /* @__PURE__ */
|
|
3400
|
+
return /* @__PURE__ */ jsx40(
|
|
3466
3401
|
"th",
|
|
3467
3402
|
{
|
|
3468
3403
|
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" : ""),
|
|
3469
|
-
children: /* @__PURE__ */
|
|
3404
|
+
children: /* @__PURE__ */ jsx40(
|
|
3470
3405
|
Hyperlink,
|
|
3471
3406
|
{
|
|
3472
3407
|
href: column.enableSorting ? url : void 0,
|
|
3473
3408
|
className: "!text-neutral-contrast ",
|
|
3474
3409
|
children: /* @__PURE__ */ jsxs16("span", { className: "flex items-center space-x-1", children: [
|
|
3475
|
-
/* @__PURE__ */
|
|
3476
|
-
column.enableSorting && /* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ jsx40("span", { className: "text-black", children: column.label }),
|
|
3411
|
+
column.enableSorting && /* @__PURE__ */ jsx40(Icon_default, { className: "w-4 h-4", name: icon })
|
|
3477
3412
|
] })
|
|
3478
3413
|
}
|
|
3479
3414
|
)
|
|
@@ -3481,24 +3416,24 @@ var DataList = (props) => {
|
|
|
3481
3416
|
column.name
|
|
3482
3417
|
);
|
|
3483
3418
|
}) }) }),
|
|
3484
|
-
/* @__PURE__ */
|
|
3419
|
+
/* @__PURE__ */ jsx40("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
3485
3420
|
let validityClass = "";
|
|
3486
3421
|
console.log("dataitem", dataitem);
|
|
3487
3422
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
3488
3423
|
validityClass = "bg-alert-200";
|
|
3489
3424
|
}
|
|
3490
|
-
return /* @__PURE__ */
|
|
3425
|
+
return /* @__PURE__ */ jsx40("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
3491
3426
|
console.log("column", column);
|
|
3492
|
-
return /* @__PURE__ */
|
|
3427
|
+
return /* @__PURE__ */ jsx40(React27.Fragment, { children: /* @__PURE__ */ jsx40(
|
|
3493
3428
|
"td",
|
|
3494
3429
|
{
|
|
3495
3430
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
3496
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
3431
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx40(
|
|
3497
3432
|
Hyperlink,
|
|
3498
3433
|
{
|
|
3499
3434
|
className: "",
|
|
3500
3435
|
href: `https://${dataitem[column.name]}`,
|
|
3501
|
-
children: /* @__PURE__ */
|
|
3436
|
+
children: /* @__PURE__ */ jsx40(
|
|
3502
3437
|
ViewControl_default,
|
|
3503
3438
|
{
|
|
3504
3439
|
controlType: column.controlType,
|
|
@@ -3511,11 +3446,11 @@ var DataList = (props) => {
|
|
|
3511
3446
|
}
|
|
3512
3447
|
)
|
|
3513
3448
|
}
|
|
3514
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
3449
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx40(
|
|
3515
3450
|
Hyperlink,
|
|
3516
3451
|
{
|
|
3517
3452
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
3518
|
-
children: /* @__PURE__ */
|
|
3453
|
+
children: /* @__PURE__ */ jsx40(
|
|
3519
3454
|
ViewControl_default,
|
|
3520
3455
|
{
|
|
3521
3456
|
controlType: column.controlType,
|
|
@@ -3525,7 +3460,7 @@ var DataList = (props) => {
|
|
|
3525
3460
|
}
|
|
3526
3461
|
)
|
|
3527
3462
|
}
|
|
3528
|
-
) : /* @__PURE__ */
|
|
3463
|
+
) : /* @__PURE__ */ jsx40(
|
|
3529
3464
|
ViewControl_default,
|
|
3530
3465
|
{
|
|
3531
3466
|
controlType: column.controlType,
|
|
@@ -3539,10 +3474,10 @@ var DataList = (props) => {
|
|
|
3539
3474
|
}) }, index);
|
|
3540
3475
|
}) })
|
|
3541
3476
|
] }) }),
|
|
3542
|
-
/* @__PURE__ */
|
|
3543
|
-
/* @__PURE__ */
|
|
3477
|
+
/* @__PURE__ */ jsx40("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between", children: [
|
|
3478
|
+
/* @__PURE__ */ jsx40("div", { className: "text-gray-700", children: label }),
|
|
3544
3479
|
/* @__PURE__ */ jsxs16("div", { className: "flex space-x-2 items-center", children: [
|
|
3545
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
3480
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx40(
|
|
3546
3481
|
Hyperlink,
|
|
3547
3482
|
{
|
|
3548
3483
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -3550,9 +3485,9 @@ var DataList = (props) => {
|
|
|
3550
3485
|
children: "Prev"
|
|
3551
3486
|
}
|
|
3552
3487
|
),
|
|
3553
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
3488
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx40("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" }),
|
|
3554
3489
|
renderPageNumbers(),
|
|
3555
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
3490
|
+
activePageNumber < pages && /* @__PURE__ */ jsx40(
|
|
3556
3491
|
Hyperlink,
|
|
3557
3492
|
{
|
|
3558
3493
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -3560,7 +3495,7 @@ var DataList = (props) => {
|
|
|
3560
3495
|
children: "Next"
|
|
3561
3496
|
}
|
|
3562
3497
|
),
|
|
3563
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
3498
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx40("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
3564
3499
|
] })
|
|
3565
3500
|
] }) })
|
|
3566
3501
|
] }),
|
|
@@ -3570,9 +3505,9 @@ var DataList = (props) => {
|
|
|
3570
3505
|
{
|
|
3571
3506
|
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`,
|
|
3572
3507
|
children: [
|
|
3573
|
-
props.title ? /* @__PURE__ */
|
|
3508
|
+
props.title ? /* @__PURE__ */ jsx40("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx40("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx40("div", {}),
|
|
3574
3509
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-3", children: [
|
|
3575
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
3510
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx40(
|
|
3576
3511
|
InputControl_default,
|
|
3577
3512
|
{
|
|
3578
3513
|
name: "Search_input",
|
|
@@ -3584,7 +3519,7 @@ var DataList = (props) => {
|
|
|
3584
3519
|
}
|
|
3585
3520
|
}
|
|
3586
3521
|
),
|
|
3587
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
3522
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx40(
|
|
3588
3523
|
InputControl_default,
|
|
3589
3524
|
{
|
|
3590
3525
|
name: filter.name,
|
|
@@ -3606,8 +3541,8 @@ var DataList = (props) => {
|
|
|
3606
3541
|
linkType: "Primary" /* Solid */,
|
|
3607
3542
|
href: props.addLinkHref,
|
|
3608
3543
|
children: [
|
|
3609
|
-
/* @__PURE__ */
|
|
3610
|
-
/* @__PURE__ */
|
|
3544
|
+
/* @__PURE__ */ jsx40(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
3545
|
+
/* @__PURE__ */ jsx40("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
3611
3546
|
]
|
|
3612
3547
|
}
|
|
3613
3548
|
)
|
|
@@ -3616,7 +3551,7 @@ var DataList = (props) => {
|
|
|
3616
3551
|
}
|
|
3617
3552
|
),
|
|
3618
3553
|
/* @__PURE__ */ jsxs16("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
3619
|
-
/* @__PURE__ */
|
|
3554
|
+
/* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx40("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx40("tr", { children: props?.columns?.map((column) => {
|
|
3620
3555
|
let url = builder.getNewOrderByUrl(column.name);
|
|
3621
3556
|
let icon = "chevronUpDown";
|
|
3622
3557
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -3626,18 +3561,18 @@ var DataList = (props) => {
|
|
|
3626
3561
|
icon = "chevronUp";
|
|
3627
3562
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
3628
3563
|
}
|
|
3629
|
-
return /* @__PURE__ */
|
|
3564
|
+
return /* @__PURE__ */ jsx40(
|
|
3630
3565
|
"th",
|
|
3631
3566
|
{
|
|
3632
3567
|
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" : ""),
|
|
3633
|
-
children: /* @__PURE__ */
|
|
3568
|
+
children: /* @__PURE__ */ jsx40(
|
|
3634
3569
|
Hyperlink,
|
|
3635
3570
|
{
|
|
3636
3571
|
href: column.enableSorting ? url : void 0,
|
|
3637
3572
|
className: "text-body-950",
|
|
3638
3573
|
children: /* @__PURE__ */ jsxs16("span", { className: "flex items-center space-x-1", children: [
|
|
3639
|
-
/* @__PURE__ */
|
|
3640
|
-
column.enableSorting && /* @__PURE__ */
|
|
3574
|
+
/* @__PURE__ */ jsx40("span", { children: column.label }),
|
|
3575
|
+
column.enableSorting && /* @__PURE__ */ jsx40(Icon_default, { className: "w-4 h-4", name: icon })
|
|
3641
3576
|
] })
|
|
3642
3577
|
}
|
|
3643
3578
|
)
|
|
@@ -3645,7 +3580,7 @@ var DataList = (props) => {
|
|
|
3645
3580
|
column.name
|
|
3646
3581
|
);
|
|
3647
3582
|
}) }) }) }) }),
|
|
3648
|
-
/* @__PURE__ */
|
|
3583
|
+
/* @__PURE__ */ jsx40("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
3649
3584
|
] })
|
|
3650
3585
|
] })
|
|
3651
3586
|
] });
|
|
@@ -3653,9 +3588,9 @@ var DataList = (props) => {
|
|
|
3653
3588
|
var DataList_default = DataList;
|
|
3654
3589
|
|
|
3655
3590
|
// src/components/dataForm/DataListRenderer.tsx
|
|
3656
|
-
import
|
|
3591
|
+
import React28, { useState as useState3, useEffect as useEffect4 } from "react";
|
|
3657
3592
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
3658
|
-
import { jsx as
|
|
3593
|
+
import { jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3659
3594
|
var viewControlMap = {
|
|
3660
3595
|
number: ViewControlTypes.number,
|
|
3661
3596
|
lineText: ViewControlTypes.lineText,
|
|
@@ -3710,14 +3645,14 @@ var DataListRenderer = ({
|
|
|
3710
3645
|
widgetProps
|
|
3711
3646
|
}) => {
|
|
3712
3647
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
3713
|
-
const [columns, setColumns] =
|
|
3714
|
-
const [dataset, setDataset] =
|
|
3715
|
-
const [filter, setFilters] =
|
|
3716
|
-
const [addLinkHref, setAddLinkHref] =
|
|
3717
|
-
const [addLinkText, setAddLinkText] =
|
|
3718
|
-
const [serviceRoute, setServiceRoute] =
|
|
3648
|
+
const [columns, setColumns] = useState3([]);
|
|
3649
|
+
const [dataset, setDataset] = useState3();
|
|
3650
|
+
const [filter, setFilters] = useState3([]);
|
|
3651
|
+
const [addLinkHref, setAddLinkHref] = useState3("");
|
|
3652
|
+
const [addLinkText, setAddLinkText] = useState3("");
|
|
3653
|
+
const [serviceRoute, setServiceRoute] = useState3("");
|
|
3719
3654
|
const pathname = usePathname2();
|
|
3720
|
-
|
|
3655
|
+
useEffect4(() => {
|
|
3721
3656
|
if (!formDefinition) return;
|
|
3722
3657
|
setColumns(mapApiToColumns(formDefinition));
|
|
3723
3658
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -3730,7 +3665,7 @@ var DataListRenderer = ({
|
|
|
3730
3665
|
setAddLinkHref(resolvedAddLinkHref);
|
|
3731
3666
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
3732
3667
|
}, [formDefinition, params]);
|
|
3733
|
-
|
|
3668
|
+
useEffect4(() => {
|
|
3734
3669
|
const fetchData = async () => {
|
|
3735
3670
|
if (!serviceRoute) return;
|
|
3736
3671
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -3750,13 +3685,13 @@ var DataListRenderer = ({
|
|
|
3750
3685
|
isActive: landingPageUrl === pathname
|
|
3751
3686
|
};
|
|
3752
3687
|
});
|
|
3753
|
-
return /* @__PURE__ */ jsxs17(
|
|
3688
|
+
return /* @__PURE__ */ jsxs17(React28.Fragment, { children: [
|
|
3754
3689
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
3755
3690
|
// tabs={resolvedTabs}
|
|
3756
3691
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
3757
3692
|
// />
|
|
3758
|
-
/* @__PURE__ */
|
|
3759
|
-
/* @__PURE__ */
|
|
3693
|
+
/* @__PURE__ */ jsx41(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
3694
|
+
/* @__PURE__ */ jsx41(
|
|
3760
3695
|
DataList_default,
|
|
3761
3696
|
{
|
|
3762
3697
|
addLinkHref,
|
|
@@ -3775,10 +3710,10 @@ var DataListRenderer = ({
|
|
|
3775
3710
|
var DataListRenderer_default = DataListRenderer;
|
|
3776
3711
|
|
|
3777
3712
|
// src/components/dataForm/DataForm.tsx
|
|
3778
|
-
import
|
|
3713
|
+
import React30, { useCallback as useCallback4, useEffect as useEffect5, useReducer as useReducer2, useRef as useRef2 } from "react";
|
|
3779
3714
|
|
|
3780
3715
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
3781
|
-
import
|
|
3716
|
+
import React29, { useCallback as useCallback3 } from "react";
|
|
3782
3717
|
|
|
3783
3718
|
// src/components/dataForm/StyleTypes.tsx
|
|
3784
3719
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -3801,7 +3736,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
3801
3736
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
3802
3737
|
|
|
3803
3738
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
3804
|
-
import { jsx as
|
|
3739
|
+
import { jsx as jsx42, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3805
3740
|
var DataFormChildSection = (props) => {
|
|
3806
3741
|
const { section } = props;
|
|
3807
3742
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -3869,14 +3804,14 @@ var DataFormChildSection = (props) => {
|
|
|
3869
3804
|
childItemsToRender,
|
|
3870
3805
|
allChildItems: childItems
|
|
3871
3806
|
});
|
|
3872
|
-
return /* @__PURE__ */
|
|
3873
|
-
section.sectionTitle && /* @__PURE__ */
|
|
3874
|
-
/* @__PURE__ */
|
|
3875
|
-
/* @__PURE__ */
|
|
3876
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */
|
|
3807
|
+
return /* @__PURE__ */ jsx42(React29.Fragment, { children: /* @__PURE__ */ jsxs18("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
3808
|
+
section.sectionTitle && /* @__PURE__ */ jsx42("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
3809
|
+
/* @__PURE__ */ jsx42("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
3810
|
+
/* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsxs18("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
3811
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ jsx42("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
3877
3812
|
return /* @__PURE__ */ jsxs18("tr", { className: "", children: [
|
|
3878
3813
|
sectionRow.elements.map((field, index) => {
|
|
3879
|
-
return /* @__PURE__ */
|
|
3814
|
+
return /* @__PURE__ */ jsx42(
|
|
3880
3815
|
"th",
|
|
3881
3816
|
{
|
|
3882
3817
|
className: "py-3 font-normal text-left",
|
|
@@ -3885,13 +3820,13 @@ var DataFormChildSection = (props) => {
|
|
|
3885
3820
|
field.name
|
|
3886
3821
|
);
|
|
3887
3822
|
}),
|
|
3888
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
3823
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx42("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
3889
3824
|
] }, sectionRowIndex);
|
|
3890
3825
|
}) }),
|
|
3891
|
-
/* @__PURE__ */
|
|
3826
|
+
/* @__PURE__ */ jsx42("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
3892
3827
|
const { item, originalIndex } = visibleItem;
|
|
3893
3828
|
const rowKey = originalIndex;
|
|
3894
|
-
return /* @__PURE__ */
|
|
3829
|
+
return /* @__PURE__ */ jsx42(React29.Fragment, { children: section.sectionRows.map(
|
|
3895
3830
|
(sectionRow, sectionRowIndex) => {
|
|
3896
3831
|
return /* @__PURE__ */ jsxs18(
|
|
3897
3832
|
"tr",
|
|
@@ -3899,7 +3834,7 @@ var DataFormChildSection = (props) => {
|
|
|
3899
3834
|
className: "",
|
|
3900
3835
|
children: [
|
|
3901
3836
|
sectionRow.elements.map((field, index) => {
|
|
3902
|
-
return /* @__PURE__ */
|
|
3837
|
+
return /* @__PURE__ */ jsx42("td", { children: /* @__PURE__ */ jsx42("div", { className: "flex-1", children: /* @__PURE__ */ jsx42("div", { className: "w-11/12", children: /* @__PURE__ */ jsx42(
|
|
3903
3838
|
InputControl_default,
|
|
3904
3839
|
{
|
|
3905
3840
|
index: filteredIndex,
|
|
@@ -3919,7 +3854,7 @@ var DataFormChildSection = (props) => {
|
|
|
3919
3854
|
}
|
|
3920
3855
|
) }) }) }, field.name);
|
|
3921
3856
|
}),
|
|
3922
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
3857
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx42("td", { children: /* @__PURE__ */ jsx42(
|
|
3923
3858
|
ClientButton_default,
|
|
3924
3859
|
{
|
|
3925
3860
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -3928,7 +3863,7 @@ var DataFormChildSection = (props) => {
|
|
|
3928
3863
|
},
|
|
3929
3864
|
dataRole: "delete",
|
|
3930
3865
|
tabIndex: -1,
|
|
3931
|
-
children: /* @__PURE__ */
|
|
3866
|
+
children: /* @__PURE__ */ jsx42(
|
|
3932
3867
|
Icon_default,
|
|
3933
3868
|
{
|
|
3934
3869
|
className: "w-4 h-4",
|
|
@@ -3945,7 +3880,7 @@ var DataFormChildSection = (props) => {
|
|
|
3945
3880
|
) }, rowKey);
|
|
3946
3881
|
}) })
|
|
3947
3882
|
] }) }),
|
|
3948
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
3883
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx42("div", { className: "ml-1", children: /* @__PURE__ */ jsx42(
|
|
3949
3884
|
ClientButton_default,
|
|
3950
3885
|
{
|
|
3951
3886
|
ButtonType: "Link" /* Link */,
|
|
@@ -3960,7 +3895,7 @@ var DataFormChildSection = (props) => {
|
|
|
3960
3895
|
var DataFormChildSection_default = DataFormChildSection;
|
|
3961
3896
|
|
|
3962
3897
|
// src/components/dataForm/DataForm.tsx
|
|
3963
|
-
import { jsx as
|
|
3898
|
+
import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3964
3899
|
var DataForm = (props) => {
|
|
3965
3900
|
const formRef = useRef2(null);
|
|
3966
3901
|
console.log(props.dataItem, "dssads");
|
|
@@ -4057,7 +3992,7 @@ var DataForm = (props) => {
|
|
|
4057
3992
|
console.error("Error fetching data:", error);
|
|
4058
3993
|
}
|
|
4059
3994
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
4060
|
-
|
|
3995
|
+
useEffect5(() => {
|
|
4061
3996
|
fetchData();
|
|
4062
3997
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
4063
3998
|
function replacePlaceholders(template, context, params) {
|
|
@@ -4152,7 +4087,7 @@ var DataForm = (props) => {
|
|
|
4152
4087
|
return { isSuccessful: true };
|
|
4153
4088
|
}
|
|
4154
4089
|
}, [formState, props]);
|
|
4155
|
-
|
|
4090
|
+
useEffect5(() => {
|
|
4156
4091
|
if (props.dataItem) {
|
|
4157
4092
|
dispatch({
|
|
4158
4093
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -4180,19 +4115,19 @@ var DataForm = (props) => {
|
|
|
4180
4115
|
return false;
|
|
4181
4116
|
}
|
|
4182
4117
|
}
|
|
4183
|
-
return /* @__PURE__ */
|
|
4184
|
-
props.title && /* @__PURE__ */
|
|
4118
|
+
return /* @__PURE__ */ jsx43(React30.Fragment, { children: /* @__PURE__ */ jsxs19("div", { className: "flex-grow flex flex-col", children: [
|
|
4119
|
+
props.title && /* @__PURE__ */ jsx43("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__ */ jsxs19(
|
|
4185
4120
|
"div",
|
|
4186
4121
|
{
|
|
4187
4122
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
4188
4123
|
onClick: () => window.history.back(),
|
|
4189
4124
|
children: [
|
|
4190
|
-
/* @__PURE__ */
|
|
4191
|
-
/* @__PURE__ */
|
|
4125
|
+
/* @__PURE__ */ jsx43(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
4126
|
+
/* @__PURE__ */ jsx43("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
4192
4127
|
]
|
|
4193
4128
|
}
|
|
4194
4129
|
) }),
|
|
4195
|
-
/* @__PURE__ */
|
|
4130
|
+
/* @__PURE__ */ jsx43(
|
|
4196
4131
|
"form",
|
|
4197
4132
|
{
|
|
4198
4133
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -4213,8 +4148,8 @@ var DataForm = (props) => {
|
|
|
4213
4148
|
}
|
|
4214
4149
|
}
|
|
4215
4150
|
},
|
|
4216
|
-
children: /* @__PURE__ */
|
|
4217
|
-
return /* @__PURE__ */
|
|
4151
|
+
children: /* @__PURE__ */ jsx43("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
4152
|
+
return /* @__PURE__ */ jsx43(React30.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs19("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
4218
4153
|
section.sectionRows?.map(
|
|
4219
4154
|
(sectionRow, sectionRowIndex) => {
|
|
4220
4155
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -4225,14 +4160,14 @@ var DataForm = (props) => {
|
|
|
4225
4160
|
sectionRow.visible
|
|
4226
4161
|
);
|
|
4227
4162
|
}
|
|
4228
|
-
return /* @__PURE__ */
|
|
4163
|
+
return /* @__PURE__ */ jsx43(React30.Fragment, { children: isVisible && /* @__PURE__ */ jsx43("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
4229
4164
|
return /* @__PURE__ */ jsxs19(
|
|
4230
4165
|
"div",
|
|
4231
4166
|
{
|
|
4232
4167
|
className: sectionRow.grow ? "grow" : "",
|
|
4233
4168
|
children: [
|
|
4234
|
-
/* @__PURE__ */
|
|
4235
|
-
/* @__PURE__ */
|
|
4169
|
+
/* @__PURE__ */ jsx43("div", { children: field.controlType }),
|
|
4170
|
+
/* @__PURE__ */ jsx43(
|
|
4236
4171
|
InputControl_default,
|
|
4237
4172
|
{
|
|
4238
4173
|
name: field.name,
|
|
@@ -4262,12 +4197,12 @@ var DataForm = (props) => {
|
|
|
4262
4197
|
}) }) }, sectionRowIndex);
|
|
4263
4198
|
}
|
|
4264
4199
|
),
|
|
4265
|
-
/* @__PURE__ */
|
|
4200
|
+
/* @__PURE__ */ jsx43("div", { children: section.childSections?.map(
|
|
4266
4201
|
(childSection, childSectionIndex) => {
|
|
4267
|
-
return /* @__PURE__ */
|
|
4202
|
+
return /* @__PURE__ */ jsx43("div", { children: childSection.name && evalutateCondition(
|
|
4268
4203
|
formState.inputValues,
|
|
4269
4204
|
childSection.visible
|
|
4270
|
-
) && /* @__PURE__ */
|
|
4205
|
+
) && /* @__PURE__ */ jsx43(
|
|
4271
4206
|
DataFormChildSection_default,
|
|
4272
4207
|
{
|
|
4273
4208
|
section: childSection,
|
|
@@ -4283,7 +4218,7 @@ var DataForm = (props) => {
|
|
|
4283
4218
|
}
|
|
4284
4219
|
),
|
|
4285
4220
|
/* @__PURE__ */ jsxs19("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
4286
|
-
/* @__PURE__ */
|
|
4221
|
+
/* @__PURE__ */ jsx43("div", { children: props.additionalActions && /* @__PURE__ */ jsx43(
|
|
4287
4222
|
Button_default,
|
|
4288
4223
|
{
|
|
4289
4224
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -4291,7 +4226,7 @@ var DataForm = (props) => {
|
|
|
4291
4226
|
children: props.additionalActions.title
|
|
4292
4227
|
}
|
|
4293
4228
|
) }),
|
|
4294
|
-
/* @__PURE__ */
|
|
4229
|
+
/* @__PURE__ */ jsx43("div", { children: props.onDelete && /* @__PURE__ */ jsx43(
|
|
4295
4230
|
Button_default,
|
|
4296
4231
|
{
|
|
4297
4232
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -4302,7 +4237,7 @@ var DataForm = (props) => {
|
|
|
4302
4237
|
children: "Delete"
|
|
4303
4238
|
}
|
|
4304
4239
|
) }),
|
|
4305
|
-
/* @__PURE__ */
|
|
4240
|
+
/* @__PURE__ */ jsx43("div", { children: props.onClick && /* @__PURE__ */ jsx43(
|
|
4306
4241
|
Button_default,
|
|
4307
4242
|
{
|
|
4308
4243
|
onValidate,
|
|
@@ -4319,7 +4254,7 @@ var DataForm = (props) => {
|
|
|
4319
4254
|
var DataForm_default = DataForm;
|
|
4320
4255
|
|
|
4321
4256
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
4322
|
-
import { jsx as
|
|
4257
|
+
import { jsx as jsx44, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4323
4258
|
function getAction(actions, code) {
|
|
4324
4259
|
return actions?.find((a) => a.actionCode === code);
|
|
4325
4260
|
}
|
|
@@ -4346,8 +4281,8 @@ var DataFormRenderer = ({
|
|
|
4346
4281
|
);
|
|
4347
4282
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
4348
4283
|
return /* @__PURE__ */ jsxs20("div", { className: "flex-grow flex flex-col", children: [
|
|
4349
|
-
widgetProps && /* @__PURE__ */
|
|
4350
|
-
/* @__PURE__ */
|
|
4284
|
+
widgetProps && /* @__PURE__ */ jsx44(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
4285
|
+
/* @__PURE__ */ jsx44(
|
|
4351
4286
|
DataForm_default,
|
|
4352
4287
|
{
|
|
4353
4288
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|