@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260825114921 → 0.8.1-dev.20260827063633
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1036 -853
- package/dist/index.mjs +533 -351
- package/dist/server.d.mts +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +758 -575
- package/dist/server.mjs +342 -160
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
import "./chunk-IMNQO57B.mjs";
|
|
47
47
|
|
|
48
48
|
// src/components/controls/view/ViewControl.tsx
|
|
49
|
-
import
|
|
49
|
+
import React16 from "react";
|
|
50
50
|
|
|
51
51
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
52
52
|
var ViewControlTypes = {
|
|
@@ -74,7 +74,8 @@ var ViewControlTypes = {
|
|
|
74
74
|
timeUntilStartsStyled: "timeUntilStartsStyled",
|
|
75
75
|
aiGeneratedSummary: "aiGeneratedSummary",
|
|
76
76
|
booleanView: "booleanView",
|
|
77
|
-
text: "text"
|
|
77
|
+
text: "text",
|
|
78
|
+
commentRenderer: "commentRenderer"
|
|
78
79
|
};
|
|
79
80
|
var ViewControlTypes_default = ViewControlTypes;
|
|
80
81
|
|
|
@@ -405,8 +406,184 @@ var TimeUntilStarts = dynamic4(() => import("./TimeUntilStartsClient-5HGQ5JKM.mj
|
|
|
405
406
|
});
|
|
406
407
|
var TimeUntilStarts_default = TimeUntilStarts;
|
|
407
408
|
|
|
408
|
-
// src/components/controls/view/
|
|
409
|
+
// src/components/controls/view/Commentrenderer.tsx
|
|
410
|
+
import React15 from "react";
|
|
411
|
+
|
|
412
|
+
// src/components/controls/view/commentTypes.ts
|
|
413
|
+
var isTextNode = (node) => {
|
|
414
|
+
return !!node && typeof node === "object" && node.type === "text";
|
|
415
|
+
};
|
|
416
|
+
var asElementNode = (node) => node;
|
|
417
|
+
|
|
418
|
+
// src/components/controls/view/commentParser.ts
|
|
419
|
+
var parseSerializedContent = (raw) => {
|
|
420
|
+
if (raw === null || raw === void 0) {
|
|
421
|
+
return [];
|
|
422
|
+
}
|
|
423
|
+
let value = raw;
|
|
424
|
+
if (typeof raw === "string") {
|
|
425
|
+
const trimmed = raw.trim();
|
|
426
|
+
if (!trimmed) {
|
|
427
|
+
return [];
|
|
428
|
+
}
|
|
429
|
+
if (trimmed.startsWith("{") || trimmed.startsWith("[")) {
|
|
430
|
+
try {
|
|
431
|
+
value = JSON.parse(trimmed);
|
|
432
|
+
} catch {
|
|
433
|
+
return [{ type: "paragraph", children: [{ type: "text", text: raw }] }];
|
|
434
|
+
}
|
|
435
|
+
} else {
|
|
436
|
+
return [{ type: "paragraph", children: [{ type: "text", text: raw }] }];
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
if (Array.isArray(value)) {
|
|
440
|
+
return value;
|
|
441
|
+
}
|
|
442
|
+
if (value && typeof value === "object") {
|
|
443
|
+
const children = value.children;
|
|
444
|
+
if (Array.isArray(children)) {
|
|
445
|
+
return children;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return [];
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
// src/components/controls/view/CommentNodeRenderer.tsx
|
|
452
|
+
import React14 from "react";
|
|
453
|
+
|
|
454
|
+
// src/components/controls/view/CommentImageNode.tsx
|
|
409
455
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
456
|
+
var CommentImageNode = ({ node, assetBaseUrl }) => {
|
|
457
|
+
const rawUrl = typeof node.url === "string" && node.url || typeof node.src === "string" && node.src || typeof node.assetUrl === "string" && node.assetUrl || "";
|
|
458
|
+
if (!rawUrl) {
|
|
459
|
+
return null;
|
|
460
|
+
}
|
|
461
|
+
const resolvedUrl = AssetUtility_default.resolveUrl(assetBaseUrl, rawUrl);
|
|
462
|
+
if (!resolvedUrl) {
|
|
463
|
+
return null;
|
|
464
|
+
}
|
|
465
|
+
console.log("resolvedUrl", resolvedUrl);
|
|
466
|
+
const alt = typeof node.fileName === "string" && node.fileName || typeof node.altText === "string" && node.altText || typeof node.alt === "string" && node.alt || "";
|
|
467
|
+
return /* @__PURE__ */ jsx15(
|
|
468
|
+
"img",
|
|
469
|
+
{
|
|
470
|
+
className: "comment-node-image",
|
|
471
|
+
src: resolvedUrl,
|
|
472
|
+
alt,
|
|
473
|
+
loading: "lazy",
|
|
474
|
+
style: { maxWidth: "100%", height: "auto", display: "block" }
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
};
|
|
478
|
+
var CommentImageNode_default = CommentImageNode;
|
|
479
|
+
|
|
480
|
+
// src/components/controls/view/CommentNodeRenderer.tsx
|
|
481
|
+
import { jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
482
|
+
var TextLeafNode = ({ node }) => {
|
|
483
|
+
let content = node.text;
|
|
484
|
+
if (node.code) content = /* @__PURE__ */ jsx16("code", { className: "comment-node-code", children: content });
|
|
485
|
+
if (node.bold) content = /* @__PURE__ */ jsx16("strong", { children: content });
|
|
486
|
+
if (node.italic) content = /* @__PURE__ */ jsx16("em", { children: content });
|
|
487
|
+
if (node.underline) content = /* @__PURE__ */ jsx16("u", { children: content });
|
|
488
|
+
if (node.strikethrough) content = /* @__PURE__ */ jsx16("s", { children: content });
|
|
489
|
+
return /* @__PURE__ */ jsx16(React14.Fragment, { children: content });
|
|
490
|
+
};
|
|
491
|
+
var renderChildren = (children, keyPrefix, assetBaseUrl) => {
|
|
492
|
+
if (!children || children.length === 0) {
|
|
493
|
+
return null;
|
|
494
|
+
}
|
|
495
|
+
return children.map((child, index) => {
|
|
496
|
+
const childKey = isTextNode(child) ? void 0 : asElementNode(child).id;
|
|
497
|
+
return /* @__PURE__ */ jsx16(
|
|
498
|
+
CommentNodeRenderer,
|
|
499
|
+
{
|
|
500
|
+
node: child,
|
|
501
|
+
assetBaseUrl
|
|
502
|
+
},
|
|
503
|
+
childKey ?? `${keyPrefix}-${index}`
|
|
504
|
+
);
|
|
505
|
+
});
|
|
506
|
+
};
|
|
507
|
+
var headingLevelFromTag = (tag) => {
|
|
508
|
+
const match = typeof tag === "string" ? tag.match(/\d/) : null;
|
|
509
|
+
const parsed = match ? Number(match[0]) : Number(tag);
|
|
510
|
+
return Number.isFinite(parsed) && parsed >= 1 && parsed <= 6 ? parsed : 3;
|
|
511
|
+
};
|
|
512
|
+
var CommentNodeRenderer = ({ node, assetBaseUrl }) => {
|
|
513
|
+
if (!node || typeof node !== "object") {
|
|
514
|
+
return null;
|
|
515
|
+
}
|
|
516
|
+
if (isTextNode(node)) {
|
|
517
|
+
return /* @__PURE__ */ jsx16(TextLeafNode, { node });
|
|
518
|
+
}
|
|
519
|
+
const element = asElementNode(node);
|
|
520
|
+
const key = element.id ?? element.type;
|
|
521
|
+
switch (element.type) {
|
|
522
|
+
case "paragraph":
|
|
523
|
+
return /* @__PURE__ */ jsx16("p", { className: "comment-node-paragraph", children: renderChildren(element.children, key, assetBaseUrl) ?? /* @__PURE__ */ jsx16("br", {}) });
|
|
524
|
+
case "heading": {
|
|
525
|
+
const level = headingLevelFromTag(element.tag ?? element.level);
|
|
526
|
+
const HeadingTag = `h${level}`;
|
|
527
|
+
return /* @__PURE__ */ jsx16(HeadingTag, { className: "comment-node-heading", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
528
|
+
}
|
|
529
|
+
case "list": {
|
|
530
|
+
const ordered = element.listType === "number" || element.ordered === true;
|
|
531
|
+
const ListTag = ordered ? "ol" : "ul";
|
|
532
|
+
return /* @__PURE__ */ jsx16(ListTag, { className: "comment-node-list", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
533
|
+
}
|
|
534
|
+
case "listitem":
|
|
535
|
+
case "list-item":
|
|
536
|
+
return /* @__PURE__ */ jsx16("li", { className: "comment-node-listitem", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
537
|
+
case "quote":
|
|
538
|
+
case "blockquote":
|
|
539
|
+
return /* @__PURE__ */ jsx16("blockquote", { className: "comment-node-quote", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
540
|
+
case "code":
|
|
541
|
+
case "code-block":
|
|
542
|
+
return /* @__PURE__ */ jsx16("pre", { className: "comment-node-codeblock", children: /* @__PURE__ */ jsx16("code", { children: renderChildren(element.children, key, assetBaseUrl) }) });
|
|
543
|
+
case "image":
|
|
544
|
+
return /* @__PURE__ */ jsx16(CommentImageNode_default, { node: element, assetBaseUrl });
|
|
545
|
+
case "link": {
|
|
546
|
+
const url = typeof element.url === "string" ? element.url : "#";
|
|
547
|
+
return /* @__PURE__ */ jsx16("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: "comment-node-link", children: renderChildren(element.children, key, assetBaseUrl) });
|
|
548
|
+
}
|
|
549
|
+
case "mention": {
|
|
550
|
+
const label = element.label ?? element.mentionName ?? element.text ?? "";
|
|
551
|
+
return /* @__PURE__ */ jsxs6("span", { className: "comment-node-mention", children: [
|
|
552
|
+
"@",
|
|
553
|
+
label
|
|
554
|
+
] });
|
|
555
|
+
}
|
|
556
|
+
case "linebreak":
|
|
557
|
+
case "line-break":
|
|
558
|
+
return /* @__PURE__ */ jsx16("br", {});
|
|
559
|
+
default:
|
|
560
|
+
return /* @__PURE__ */ jsx16(React14.Fragment, { children: renderChildren(element.children, key, assetBaseUrl) });
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
var CommentNodeRenderer_default = CommentNodeRenderer;
|
|
564
|
+
|
|
565
|
+
// src/components/controls/view/Commentrenderer.tsx
|
|
566
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
567
|
+
var CommentRenderer = ({ value, className, assetBaseUrl, apiBaseUrl }) => {
|
|
568
|
+
const nodes = React15.useMemo(() => parseSerializedContent(value), [value]);
|
|
569
|
+
if (!nodes || nodes.length === 0) {
|
|
570
|
+
return null;
|
|
571
|
+
}
|
|
572
|
+
const resolvedAssetBaseUrl = assetBaseUrl ?? apiBaseUrl;
|
|
573
|
+
console.log(resolvedAssetBaseUrl, "resolvedAssetBaseUrl");
|
|
574
|
+
return /* @__PURE__ */ jsx17("div", { className: className ?? "comment-renderer", children: nodes.map((node, index) => /* @__PURE__ */ jsx17(
|
|
575
|
+
CommentNodeRenderer_default,
|
|
576
|
+
{
|
|
577
|
+
node,
|
|
578
|
+
assetBaseUrl: resolvedAssetBaseUrl
|
|
579
|
+
},
|
|
580
|
+
node.id ?? `comment-node-${index}`
|
|
581
|
+
)) });
|
|
582
|
+
};
|
|
583
|
+
var Commentrenderer_default = CommentRenderer;
|
|
584
|
+
|
|
585
|
+
// src/components/controls/view/ViewControl.tsx
|
|
586
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
410
587
|
var ViewControl = (props) => {
|
|
411
588
|
const ControlComponents = {
|
|
412
589
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
@@ -433,21 +610,22 @@ var ViewControl = (props) => {
|
|
|
433
610
|
// [ViewControlTypes.timeUntilStartsStyled]: TimeUntilStartsStyled,
|
|
434
611
|
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default,
|
|
435
612
|
[ViewControlTypes_default.booleanView]: BooleanView_default,
|
|
436
|
-
[ViewControlTypes_default.text]: LineTextView_default
|
|
613
|
+
[ViewControlTypes_default.text]: LineTextView_default,
|
|
614
|
+
[ViewControlTypes_default.commentRenderer]: Commentrenderer_default
|
|
437
615
|
};
|
|
438
616
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
439
|
-
return /* @__PURE__ */
|
|
617
|
+
return /* @__PURE__ */ jsx18(React16.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx18(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
440
618
|
};
|
|
441
619
|
var ViewControl_default = ViewControl;
|
|
442
620
|
|
|
443
621
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
444
|
-
import
|
|
622
|
+
import React26 from "react";
|
|
445
623
|
|
|
446
624
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
447
|
-
import
|
|
625
|
+
import React18 from "react";
|
|
448
626
|
|
|
449
627
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
450
|
-
import { jsx as
|
|
628
|
+
import { jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
451
629
|
var TextNode = (props) => {
|
|
452
630
|
function cssStringToJson(cssString) {
|
|
453
631
|
const styleObject = {};
|
|
@@ -502,35 +680,35 @@ var TextNode = (props) => {
|
|
|
502
680
|
});
|
|
503
681
|
}
|
|
504
682
|
function renderWithLineBreaks(text) {
|
|
505
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */
|
|
683
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs7("span", { children: [
|
|
506
684
|
line,
|
|
507
|
-
index < arr.length - 1 && /* @__PURE__ */
|
|
685
|
+
index < arr.length - 1 && /* @__PURE__ */ jsx19("br", {})
|
|
508
686
|
] }, index));
|
|
509
687
|
}
|
|
510
688
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
511
689
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
512
690
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
513
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */
|
|
691
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ jsx19("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ jsx19("sub", { children: content }) : content;
|
|
514
692
|
return (
|
|
515
693
|
// @ts-expect-error custom code
|
|
516
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ jsx19("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
517
695
|
);
|
|
518
696
|
};
|
|
519
697
|
var TextNode_default = TextNode;
|
|
520
698
|
|
|
521
699
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
522
|
-
import { jsx as
|
|
700
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
523
701
|
var LineBreakNode = () => {
|
|
524
|
-
return /* @__PURE__ */
|
|
702
|
+
return /* @__PURE__ */ jsx20("div", { className: "py-0.5 lg:py-1.5" });
|
|
525
703
|
};
|
|
526
704
|
var LineBreakNode_default = LineBreakNode;
|
|
527
705
|
|
|
528
706
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
529
|
-
import
|
|
707
|
+
import React17 from "react";
|
|
530
708
|
|
|
531
709
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
532
710
|
import dynamic5 from "next/dynamic";
|
|
533
|
-
import { jsx as
|
|
711
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
534
712
|
var HlsPlayer2 = dynamic5(() => import("./HlsPlayer-IW52N5RG.mjs"), { ssr: false });
|
|
535
713
|
var getNestedValue = (obj, path) => {
|
|
536
714
|
if (!obj || !path) return void 0;
|
|
@@ -563,7 +741,7 @@ var ImageNode = (props) => {
|
|
|
563
741
|
assets = [image];
|
|
564
742
|
}
|
|
565
743
|
if (assets && assets.length > 0) {
|
|
566
|
-
return /* @__PURE__ */
|
|
744
|
+
return /* @__PURE__ */ jsx21(
|
|
567
745
|
DeviceAssetSelector_default,
|
|
568
746
|
{
|
|
569
747
|
device: props.device,
|
|
@@ -604,7 +782,7 @@ var ImageNode = (props) => {
|
|
|
604
782
|
right: "justify-end"
|
|
605
783
|
};
|
|
606
784
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
607
|
-
const renderMedia = () => isHls ? /* @__PURE__ */
|
|
785
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ jsx21(
|
|
608
786
|
HlsPlayer2,
|
|
609
787
|
{
|
|
610
788
|
assetUrl: imageUrl,
|
|
@@ -617,7 +795,7 @@ var ImageNode = (props) => {
|
|
|
617
795
|
apiBaseUrl: props.apiBaseUrl,
|
|
618
796
|
session: props.session
|
|
619
797
|
}
|
|
620
|
-
) : /* @__PURE__ */
|
|
798
|
+
) : /* @__PURE__ */ jsx21(
|
|
621
799
|
"img",
|
|
622
800
|
{
|
|
623
801
|
style: styles,
|
|
@@ -630,7 +808,7 @@ var ImageNode = (props) => {
|
|
|
630
808
|
}
|
|
631
809
|
);
|
|
632
810
|
if (props.node.width) {
|
|
633
|
-
return /* @__PURE__ */
|
|
811
|
+
return /* @__PURE__ */ jsx21("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
634
812
|
}
|
|
635
813
|
return renderMedia();
|
|
636
814
|
};
|
|
@@ -638,7 +816,7 @@ var ImageNode_default = ImageNode;
|
|
|
638
816
|
|
|
639
817
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
640
818
|
import dynamic6 from "next/dynamic";
|
|
641
|
-
import { Fragment, jsx as
|
|
819
|
+
import { Fragment, jsx as jsx22, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
642
820
|
var LinkNodeButton = dynamic6(() => import("./LinkNodeButton-BEAX4I4C.mjs"), {
|
|
643
821
|
ssr: false
|
|
644
822
|
});
|
|
@@ -689,15 +867,15 @@ var LinkNode = (props) => {
|
|
|
689
867
|
};
|
|
690
868
|
const linkType = node.cssClass ? getLinkTypeFromCssClass(node.cssClass) : void 0;
|
|
691
869
|
const isButton = node.isButton === true;
|
|
692
|
-
const
|
|
870
|
+
const renderChildren2 = () => {
|
|
693
871
|
if (!node.children || node.children.length === 0) return null;
|
|
694
|
-
return /* @__PURE__ */
|
|
872
|
+
return /* @__PURE__ */ jsx22(Fragment, { children: node.children.map((childNode, index) => {
|
|
695
873
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
696
874
|
if (!SelectedNode) {
|
|
697
875
|
console.warn("Unknown node type:", childNode.type);
|
|
698
876
|
return null;
|
|
699
877
|
}
|
|
700
|
-
return /* @__PURE__ */
|
|
878
|
+
return /* @__PURE__ */ jsx22(React17.Fragment, { children: /* @__PURE__ */ jsx22(
|
|
701
879
|
SelectedNode,
|
|
702
880
|
{
|
|
703
881
|
node: childNode,
|
|
@@ -710,15 +888,15 @@ var LinkNode = (props) => {
|
|
|
710
888
|
};
|
|
711
889
|
const renderFallback = () => {
|
|
712
890
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
713
|
-
return /* @__PURE__ */
|
|
891
|
+
return /* @__PURE__ */ jsx22("span", { children: linkText });
|
|
714
892
|
}
|
|
715
893
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
716
|
-
return /* @__PURE__ */
|
|
894
|
+
return /* @__PURE__ */ jsx22("br", {});
|
|
717
895
|
}
|
|
718
896
|
return null;
|
|
719
897
|
};
|
|
720
898
|
if (isButton) {
|
|
721
|
-
return /* @__PURE__ */
|
|
899
|
+
return /* @__PURE__ */ jsxs8(
|
|
722
900
|
LinkNodeButton,
|
|
723
901
|
{
|
|
724
902
|
node,
|
|
@@ -730,20 +908,20 @@ var LinkNode = (props) => {
|
|
|
730
908
|
linkType,
|
|
731
909
|
linkUrl,
|
|
732
910
|
children: [
|
|
733
|
-
|
|
911
|
+
renderChildren2(),
|
|
734
912
|
renderFallback()
|
|
735
913
|
]
|
|
736
914
|
}
|
|
737
915
|
);
|
|
738
916
|
}
|
|
739
|
-
return /* @__PURE__ */
|
|
917
|
+
return /* @__PURE__ */ jsxs8(
|
|
740
918
|
Hyperlink,
|
|
741
919
|
{
|
|
742
920
|
href: linkUrl || "#",
|
|
743
921
|
linkType,
|
|
744
922
|
alt: linkText || node.title || "",
|
|
745
923
|
children: [
|
|
746
|
-
|
|
924
|
+
renderChildren2(),
|
|
747
925
|
renderFallback()
|
|
748
926
|
]
|
|
749
927
|
}
|
|
@@ -752,10 +930,10 @@ var LinkNode = (props) => {
|
|
|
752
930
|
var LinkNode_default = LinkNode;
|
|
753
931
|
|
|
754
932
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
755
|
-
import { jsx as
|
|
933
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
756
934
|
var SVGIconNode = ({ node }) => {
|
|
757
935
|
if (!node?.svgCode) return null;
|
|
758
|
-
return /* @__PURE__ */
|
|
936
|
+
return /* @__PURE__ */ jsx23(
|
|
759
937
|
"span",
|
|
760
938
|
{
|
|
761
939
|
style: {
|
|
@@ -772,7 +950,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
772
950
|
|
|
773
951
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
774
952
|
import katex from "katex";
|
|
775
|
-
import { jsx as
|
|
953
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
776
954
|
var EquationNode = ({ node }) => {
|
|
777
955
|
const { equation, inline } = node;
|
|
778
956
|
let html = "";
|
|
@@ -787,7 +965,7 @@ var EquationNode = ({ node }) => {
|
|
|
787
965
|
});
|
|
788
966
|
}
|
|
789
967
|
if (inline) {
|
|
790
|
-
return /* @__PURE__ */
|
|
968
|
+
return /* @__PURE__ */ jsx24(
|
|
791
969
|
"span",
|
|
792
970
|
{
|
|
793
971
|
className: "katex-inline",
|
|
@@ -795,7 +973,7 @@ var EquationNode = ({ node }) => {
|
|
|
795
973
|
}
|
|
796
974
|
);
|
|
797
975
|
}
|
|
798
|
-
return /* @__PURE__ */
|
|
976
|
+
return /* @__PURE__ */ jsx24(
|
|
799
977
|
"div",
|
|
800
978
|
{
|
|
801
979
|
className: "katex-block my-3 text-center",
|
|
@@ -806,7 +984,7 @@ var EquationNode = ({ node }) => {
|
|
|
806
984
|
var EquationNode_default = EquationNode;
|
|
807
985
|
|
|
808
986
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
809
|
-
import { jsx as
|
|
987
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
810
988
|
function getNestedProperty(obj, path) {
|
|
811
989
|
if (!obj || !path) return null;
|
|
812
990
|
if (path.includes(".")) {
|
|
@@ -819,7 +997,7 @@ function getNestedProperty(obj, path) {
|
|
|
819
997
|
}
|
|
820
998
|
const value = obj[path];
|
|
821
999
|
if (Array.isArray(value)) {
|
|
822
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
1000
|
+
return value.map((item, index) => /* @__PURE__ */ jsx25("div", { children: String(item) }, index));
|
|
823
1001
|
}
|
|
824
1002
|
return value;
|
|
825
1003
|
}
|
|
@@ -882,7 +1060,7 @@ var DatafieldNode = (props) => {
|
|
|
882
1060
|
const dataType = props.node.dataType;
|
|
883
1061
|
if (isEmptyValue) return null;
|
|
884
1062
|
if (dataType === "rawContent") {
|
|
885
|
-
return /* @__PURE__ */
|
|
1063
|
+
return /* @__PURE__ */ jsx25(
|
|
886
1064
|
PageBodyRenderer_default,
|
|
887
1065
|
{
|
|
888
1066
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -898,17 +1076,19 @@ var DatafieldNode = (props) => {
|
|
|
898
1076
|
}
|
|
899
1077
|
);
|
|
900
1078
|
}
|
|
901
|
-
return /* @__PURE__ */
|
|
1079
|
+
return /* @__PURE__ */ jsx25(
|
|
902
1080
|
"span",
|
|
903
1081
|
{
|
|
904
1082
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
905
1083
|
style: styles,
|
|
906
1084
|
title,
|
|
907
|
-
children: /* @__PURE__ */
|
|
1085
|
+
children: /* @__PURE__ */ jsx25(
|
|
908
1086
|
ViewControl_default,
|
|
909
1087
|
{
|
|
910
1088
|
controlType: dataType,
|
|
911
|
-
value: value ?? `@databound[${fieldName}]
|
|
1089
|
+
value: value ?? `@databound[${fieldName}]`,
|
|
1090
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
1091
|
+
assetBaseUrl: props.assetBaseUrl
|
|
912
1092
|
}
|
|
913
1093
|
)
|
|
914
1094
|
}
|
|
@@ -917,7 +1097,7 @@ var DatafieldNode = (props) => {
|
|
|
917
1097
|
var DatafieldNode_default = DatafieldNode;
|
|
918
1098
|
|
|
919
1099
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
920
|
-
import { Fragment as Fragment2, jsx as
|
|
1100
|
+
import { Fragment as Fragment2, jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
921
1101
|
var ParagraphNode = (props) => {
|
|
922
1102
|
const NodeTypes2 = {
|
|
923
1103
|
["text"]: TextNode_default,
|
|
@@ -937,42 +1117,44 @@ var ParagraphNode = (props) => {
|
|
|
937
1117
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
938
1118
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
939
1119
|
if (isInlineOnlyParent) {
|
|
940
|
-
return /* @__PURE__ */
|
|
1120
|
+
return /* @__PURE__ */ jsx26(Fragment2, { children: hasChildren && props.node.children.map((node, index) => {
|
|
941
1121
|
const SelectedNode = NodeTypes2[node.type];
|
|
942
|
-
return /* @__PURE__ */
|
|
1122
|
+
return /* @__PURE__ */ jsx26(React18.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx26(
|
|
943
1123
|
SelectedNode,
|
|
944
1124
|
{
|
|
945
1125
|
node,
|
|
946
1126
|
dataitem: props.dataitem,
|
|
947
1127
|
session: props.session,
|
|
948
1128
|
apiBaseUrl: props.apiBaseUrl,
|
|
1129
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
949
1130
|
routeParameters: props.routeParameters
|
|
950
1131
|
}
|
|
951
1132
|
) }, index);
|
|
952
1133
|
}) });
|
|
953
1134
|
}
|
|
954
|
-
return /* @__PURE__ */
|
|
1135
|
+
return /* @__PURE__ */ jsxs9("div", { className: " " + formatClasses, children: [
|
|
955
1136
|
hasChildren && props.node.children.map((node, index) => {
|
|
956
1137
|
const SelectedNode = NodeTypes2[node.type];
|
|
957
|
-
return /* @__PURE__ */
|
|
1138
|
+
return /* @__PURE__ */ jsx26(React18.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx26(
|
|
958
1139
|
SelectedNode,
|
|
959
1140
|
{
|
|
960
1141
|
node,
|
|
961
1142
|
dataitem: props.dataitem,
|
|
962
1143
|
session: props.session,
|
|
963
1144
|
apiBaseUrl: props.apiBaseUrl,
|
|
1145
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
964
1146
|
routeParameters: props.routeParameters
|
|
965
1147
|
}
|
|
966
1148
|
) }, index);
|
|
967
1149
|
}),
|
|
968
|
-
!hasChildren && /* @__PURE__ */
|
|
1150
|
+
!hasChildren && /* @__PURE__ */ jsx26("div", { className: "py-1.5 lg:py-2" })
|
|
969
1151
|
] });
|
|
970
1152
|
};
|
|
971
1153
|
var ParagraphNode_default = ParagraphNode;
|
|
972
1154
|
|
|
973
1155
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
974
|
-
import
|
|
975
|
-
import { Fragment as Fragment3, jsx as
|
|
1156
|
+
import React19 from "react";
|
|
1157
|
+
import { Fragment as Fragment3, jsx as jsx27 } from "react/jsx-runtime";
|
|
976
1158
|
var HeadingNode = (props) => {
|
|
977
1159
|
const NodeTypes2 = {
|
|
978
1160
|
["text"]: TextNode_default,
|
|
@@ -988,23 +1170,23 @@ var HeadingNode = (props) => {
|
|
|
988
1170
|
{
|
|
989
1171
|
}
|
|
990
1172
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
991
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ jsx27(Fragment3, { children: React19.createElement(
|
|
992
1174
|
HeadingTag,
|
|
993
1175
|
{ className: formatClasses },
|
|
994
1176
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
995
1177
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
996
|
-
return /* @__PURE__ */
|
|
1178
|
+
return /* @__PURE__ */ jsx27(React19.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx27(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, assetBaseUrl: props.assetBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
997
1179
|
})
|
|
998
1180
|
) });
|
|
999
1181
|
};
|
|
1000
1182
|
var HeadingNode_default = HeadingNode;
|
|
1001
1183
|
|
|
1002
1184
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
1003
|
-
import
|
|
1185
|
+
import React21 from "react";
|
|
1004
1186
|
|
|
1005
1187
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
1006
|
-
import
|
|
1007
|
-
import { jsx as
|
|
1188
|
+
import React20 from "react";
|
|
1189
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1008
1190
|
var ListItemNode = (props) => {
|
|
1009
1191
|
const NodeTypes2 = {
|
|
1010
1192
|
text: TextNode_default,
|
|
@@ -1021,66 +1203,66 @@ var ListItemNode = (props) => {
|
|
|
1021
1203
|
liStyle.fontSize = match[1].trim();
|
|
1022
1204
|
}
|
|
1023
1205
|
}
|
|
1024
|
-
return /* @__PURE__ */
|
|
1206
|
+
return /* @__PURE__ */ jsx28("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
1025
1207
|
const SelectedNode = NodeTypes2[node.type];
|
|
1026
1208
|
if (node.type === "linebreak") {
|
|
1027
1209
|
if (!foundFirstBreak) {
|
|
1028
1210
|
foundFirstBreak = true;
|
|
1029
|
-
return /* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ jsx28("div", {}, index);
|
|
1030
1212
|
} else {
|
|
1031
|
-
return /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ jsx28("div", { className: "py-1 lg:py-2" }, index);
|
|
1032
1214
|
}
|
|
1033
1215
|
} else {
|
|
1034
1216
|
foundFirstBreak = false;
|
|
1035
|
-
return /* @__PURE__ */
|
|
1217
|
+
return /* @__PURE__ */ jsx28(React20.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx28(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
1036
1218
|
}
|
|
1037
1219
|
}) });
|
|
1038
1220
|
};
|
|
1039
1221
|
var ListItemNode_default = ListItemNode;
|
|
1040
1222
|
|
|
1041
1223
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
1042
|
-
import { jsx as
|
|
1224
|
+
import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1043
1225
|
var ListNode = (props) => {
|
|
1044
1226
|
const NodeTypes2 = {
|
|
1045
1227
|
listitem: ListItemNode_default
|
|
1046
1228
|
};
|
|
1047
|
-
return /* @__PURE__ */
|
|
1048
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
1229
|
+
return /* @__PURE__ */ jsxs10(React21.Fragment, { children: [
|
|
1230
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx29("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
1049
1231
|
const SelectedNode = NodeTypes2[node.type];
|
|
1050
|
-
return /* @__PURE__ */
|
|
1232
|
+
return /* @__PURE__ */ jsx29(React21.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx29(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
1051
1233
|
}) }),
|
|
1052
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
1234
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx29("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
1053
1235
|
const SelectedNode = NodeTypes2[node.type];
|
|
1054
|
-
return /* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ jsx29(React21.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx29(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
1055
1237
|
}) })
|
|
1056
1238
|
] });
|
|
1057
1239
|
};
|
|
1058
1240
|
var ListNode_default = ListNode;
|
|
1059
1241
|
|
|
1060
1242
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
1061
|
-
import
|
|
1062
|
-
import { jsx as
|
|
1243
|
+
import React22 from "react";
|
|
1244
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1063
1245
|
var QuoteNode = (props) => {
|
|
1064
1246
|
const NodeTypes2 = {
|
|
1065
1247
|
["text"]: TextNode_default,
|
|
1066
1248
|
["linebreak"]: LineBreakNode_default,
|
|
1067
1249
|
["link"]: LinkNode_default
|
|
1068
1250
|
};
|
|
1069
|
-
return /* @__PURE__ */
|
|
1251
|
+
return /* @__PURE__ */ jsx30("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
1070
1252
|
const SelectedNode = NodeTypes2[node.type];
|
|
1071
|
-
return /* @__PURE__ */
|
|
1253
|
+
return /* @__PURE__ */ jsx30(React22.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx30(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
1072
1254
|
}) });
|
|
1073
1255
|
};
|
|
1074
1256
|
var QuoteNode_default = QuoteNode;
|
|
1075
1257
|
|
|
1076
1258
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
1077
|
-
import
|
|
1259
|
+
import React23 from "react";
|
|
1078
1260
|
import dynamic7 from "next/dynamic";
|
|
1079
|
-
import { jsx as
|
|
1261
|
+
import { jsx as jsx31, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1080
1262
|
var CopyButton = dynamic7(() => import("./CopyButton-UPJPMJUB.mjs"), {
|
|
1081
1263
|
ssr: false,
|
|
1082
1264
|
// optional: fallback UI while loading
|
|
1083
|
-
loading: () => /* @__PURE__ */
|
|
1265
|
+
loading: () => /* @__PURE__ */ jsx31("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
1084
1266
|
});
|
|
1085
1267
|
var CodeNode = (props) => {
|
|
1086
1268
|
const NodeTypes2 = {
|
|
@@ -1094,14 +1276,14 @@ var CodeNode = (props) => {
|
|
|
1094
1276
|
if (node.type === "link") return node.text || node.url || "";
|
|
1095
1277
|
return "";
|
|
1096
1278
|
}).join("") ?? "";
|
|
1097
|
-
return /* @__PURE__ */
|
|
1098
|
-
/* @__PURE__ */
|
|
1099
|
-
/* @__PURE__ */
|
|
1100
|
-
/* @__PURE__ */
|
|
1279
|
+
return /* @__PURE__ */ jsxs11("div", { children: [
|
|
1280
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
1281
|
+
/* @__PURE__ */ jsx31("span", { children: "Code Snippet" }),
|
|
1282
|
+
/* @__PURE__ */ jsx31(CopyButton, { text: textContent })
|
|
1101
1283
|
] }),
|
|
1102
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ jsx31("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) => {
|
|
1103
1285
|
const SelectedNode = NodeTypes2[node.type];
|
|
1104
|
-
return /* @__PURE__ */
|
|
1286
|
+
return /* @__PURE__ */ jsx31(React23.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx31(
|
|
1105
1287
|
SelectedNode,
|
|
1106
1288
|
{
|
|
1107
1289
|
node,
|
|
@@ -1116,15 +1298,15 @@ var CodeNode = (props) => {
|
|
|
1116
1298
|
var CodeNode_default = CodeNode;
|
|
1117
1299
|
|
|
1118
1300
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
1119
|
-
import { jsx as
|
|
1301
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1120
1302
|
var HorizontalRuleNode = () => {
|
|
1121
|
-
return /* @__PURE__ */
|
|
1303
|
+
return /* @__PURE__ */ jsx32("hr", {});
|
|
1122
1304
|
};
|
|
1123
1305
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
1124
1306
|
|
|
1125
1307
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
1126
|
-
import
|
|
1127
|
-
import { Fragment as Fragment4, jsx as
|
|
1308
|
+
import React24 from "react";
|
|
1309
|
+
import { Fragment as Fragment4, jsx as jsx33 } from "react/jsx-runtime";
|
|
1128
1310
|
var WidgetNode = (props) => {
|
|
1129
1311
|
const getWidgetParameters = () => {
|
|
1130
1312
|
const widgetInputParameters = {
|
|
@@ -1188,7 +1370,7 @@ var WidgetNode = (props) => {
|
|
|
1188
1370
|
};
|
|
1189
1371
|
const widgetCode = props.node?.widgetCode;
|
|
1190
1372
|
if (!widgetCode) {
|
|
1191
|
-
return /* @__PURE__ */
|
|
1373
|
+
return /* @__PURE__ */ jsx33(Fragment4, { children: "Invalid widget" });
|
|
1192
1374
|
}
|
|
1193
1375
|
const widgetParams = getWidgetParameters();
|
|
1194
1376
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -1197,7 +1379,7 @@ var WidgetNode = (props) => {
|
|
|
1197
1379
|
}
|
|
1198
1380
|
return (
|
|
1199
1381
|
// eslint-disable-next-line react-hooks/static-components
|
|
1200
|
-
/* @__PURE__ */
|
|
1382
|
+
/* @__PURE__ */ jsx33(React24.Fragment, { children: /* @__PURE__ */ jsx33(
|
|
1201
1383
|
WidgetRenderer,
|
|
1202
1384
|
{
|
|
1203
1385
|
params: widgetParams,
|
|
@@ -1215,11 +1397,11 @@ var WidgetNode_default = WidgetNode;
|
|
|
1215
1397
|
|
|
1216
1398
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
1217
1399
|
import dynamic11 from "next/dynamic";
|
|
1218
|
-
import
|
|
1400
|
+
import React25 from "react";
|
|
1219
1401
|
|
|
1220
1402
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
1221
1403
|
import dynamic8 from "next/dynamic";
|
|
1222
|
-
import { jsx as
|
|
1404
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1223
1405
|
var IframeClient = dynamic8(() => import("./IframeClient-WF2KLXZB.mjs"), {
|
|
1224
1406
|
ssr: false
|
|
1225
1407
|
});
|
|
@@ -1232,7 +1414,7 @@ var EmbedNode = (props) => {
|
|
|
1232
1414
|
} else {
|
|
1233
1415
|
src = props.node.embedSrc;
|
|
1234
1416
|
}
|
|
1235
|
-
return /* @__PURE__ */
|
|
1417
|
+
return /* @__PURE__ */ jsx34("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx34(IframeClient, { src }) });
|
|
1236
1418
|
};
|
|
1237
1419
|
var EmbedNode_default = EmbedNode;
|
|
1238
1420
|
|
|
@@ -1425,10 +1607,10 @@ var PathUtility = class {
|
|
|
1425
1607
|
var PathUtility_default = new PathUtility();
|
|
1426
1608
|
|
|
1427
1609
|
// src/components/NoDataFound.tsx
|
|
1428
|
-
import { jsx as
|
|
1610
|
+
import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1429
1611
|
var NoDataFound = () => {
|
|
1430
|
-
return /* @__PURE__ */
|
|
1431
|
-
/* @__PURE__ */
|
|
1612
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
1613
|
+
/* @__PURE__ */ jsx35("div", { className: "mb-5", children: /* @__PURE__ */ jsx35("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx35(
|
|
1432
1614
|
"svg",
|
|
1433
1615
|
{
|
|
1434
1616
|
className: "w-10 h-10",
|
|
@@ -1436,7 +1618,7 @@ var NoDataFound = () => {
|
|
|
1436
1618
|
stroke: "currentColor",
|
|
1437
1619
|
viewBox: "0 0 24 24",
|
|
1438
1620
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1439
|
-
children: /* @__PURE__ */
|
|
1621
|
+
children: /* @__PURE__ */ jsx35(
|
|
1440
1622
|
"path",
|
|
1441
1623
|
{
|
|
1442
1624
|
strokeLinecap: "round",
|
|
@@ -1447,15 +1629,15 @@ var NoDataFound = () => {
|
|
|
1447
1629
|
)
|
|
1448
1630
|
}
|
|
1449
1631
|
) }) }),
|
|
1450
|
-
/* @__PURE__ */
|
|
1451
|
-
/* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ jsx35("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
1633
|
+
/* @__PURE__ */ jsx35("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
1452
1634
|
] });
|
|
1453
1635
|
};
|
|
1454
1636
|
var NoDataFound_default = NoDataFound;
|
|
1455
1637
|
|
|
1456
1638
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
1457
1639
|
import dynamic9 from "next/dynamic";
|
|
1458
|
-
import { Fragment as Fragment5, jsx as
|
|
1640
|
+
import { Fragment as Fragment5, jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1459
1641
|
var HlsPlayer3 = dynamic9(() => import("./HlsPlayer-IW52N5RG.mjs"), { ssr: false });
|
|
1460
1642
|
var deviceToMediaQuery = (device) => {
|
|
1461
1643
|
switch (device) {
|
|
@@ -1611,8 +1793,8 @@ var ImageGalleryNode = (props) => {
|
|
|
1611
1793
|
right: "justify-end"
|
|
1612
1794
|
};
|
|
1613
1795
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
1614
|
-
return /* @__PURE__ */
|
|
1615
|
-
hlsSources.length > 0 && /* @__PURE__ */
|
|
1796
|
+
return /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1797
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx36(Fragment5, { children: /* @__PURE__ */ jsx36(
|
|
1616
1798
|
HlsPlayer3,
|
|
1617
1799
|
{
|
|
1618
1800
|
sources: hlsSources,
|
|
@@ -1627,7 +1809,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1627
1809
|
styles: hlsStyles
|
|
1628
1810
|
}
|
|
1629
1811
|
) }),
|
|
1630
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */
|
|
1812
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ jsx36(Fragment5, { children: staticFallback ? /* @__PURE__ */ jsxs13("picture", { children: [
|
|
1631
1813
|
DEVICE_ORDER.map((deviceKey) => {
|
|
1632
1814
|
const match = staticSources.find(
|
|
1633
1815
|
(img) => img.device === deviceKey
|
|
@@ -1643,7 +1825,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1643
1825
|
if (!srcUrl) {
|
|
1644
1826
|
return null;
|
|
1645
1827
|
}
|
|
1646
|
-
return /* @__PURE__ */
|
|
1828
|
+
return /* @__PURE__ */ jsx36(
|
|
1647
1829
|
"source",
|
|
1648
1830
|
{
|
|
1649
1831
|
media: deviceToMediaQuery(match.device),
|
|
@@ -1668,7 +1850,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1668
1850
|
if (img.borderRadius) {
|
|
1669
1851
|
styles.borderRadius = img.borderRadius;
|
|
1670
1852
|
}
|
|
1671
|
-
return /* @__PURE__ */
|
|
1853
|
+
return /* @__PURE__ */ jsx36(
|
|
1672
1854
|
"img",
|
|
1673
1855
|
{
|
|
1674
1856
|
loading: "lazy",
|
|
@@ -1683,7 +1865,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1683
1865
|
})()
|
|
1684
1866
|
] }) : (
|
|
1685
1867
|
/* Case 2: Only device-specific images exist */
|
|
1686
|
-
/* @__PURE__ */
|
|
1868
|
+
/* @__PURE__ */ jsx36(Fragment5, { children: staticSources.map((img, index) => {
|
|
1687
1869
|
const resolved = resolveImage(img);
|
|
1688
1870
|
const imageUrl = resolved?.imageUrl;
|
|
1689
1871
|
if (!imageUrl) {
|
|
@@ -1710,7 +1892,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1710
1892
|
default:
|
|
1711
1893
|
display = "block";
|
|
1712
1894
|
}
|
|
1713
|
-
return /* @__PURE__ */
|
|
1895
|
+
return /* @__PURE__ */ jsx36(
|
|
1714
1896
|
"img",
|
|
1715
1897
|
{
|
|
1716
1898
|
loading: "lazy",
|
|
@@ -1850,28 +2032,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
1850
2032
|
};
|
|
1851
2033
|
|
|
1852
2034
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
1853
|
-
import { Fragment as Fragment6, jsx as
|
|
2035
|
+
import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1854
2036
|
var getNestedValue5 = (obj, path) => {
|
|
1855
2037
|
if (!obj || !path) return void 0;
|
|
1856
2038
|
return path.split(".").reduce((current, key) => {
|
|
1857
2039
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
1858
2040
|
}, obj);
|
|
1859
2041
|
};
|
|
1860
|
-
var PdfIcon = () => /* @__PURE__ */
|
|
2042
|
+
var PdfIcon = () => /* @__PURE__ */ jsxs14(
|
|
1861
2043
|
"svg",
|
|
1862
2044
|
{
|
|
1863
2045
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1864
2046
|
viewBox: "0 0 48 48",
|
|
1865
2047
|
className: "w-10 h-10",
|
|
1866
2048
|
children: [
|
|
1867
|
-
/* @__PURE__ */
|
|
2049
|
+
/* @__PURE__ */ jsx37(
|
|
1868
2050
|
"path",
|
|
1869
2051
|
{
|
|
1870
2052
|
fill: "#e53935",
|
|
1871
2053
|
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"
|
|
1872
2054
|
}
|
|
1873
2055
|
),
|
|
1874
|
-
/* @__PURE__ */
|
|
2056
|
+
/* @__PURE__ */ jsx37(
|
|
1875
2057
|
"path",
|
|
1876
2058
|
{
|
|
1877
2059
|
fill: "#fff",
|
|
@@ -1881,55 +2063,55 @@ var PdfIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
1881
2063
|
]
|
|
1882
2064
|
}
|
|
1883
2065
|
);
|
|
1884
|
-
var ExcelIcon = () => /* @__PURE__ */
|
|
2066
|
+
var ExcelIcon = () => /* @__PURE__ */ jsxs14(
|
|
1885
2067
|
"svg",
|
|
1886
2068
|
{
|
|
1887
2069
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1888
2070
|
viewBox: "0 0 48 48",
|
|
1889
2071
|
className: "w-10 h-10",
|
|
1890
2072
|
children: [
|
|
1891
|
-
/* @__PURE__ */
|
|
2073
|
+
/* @__PURE__ */ jsx37(
|
|
1892
2074
|
"path",
|
|
1893
2075
|
{
|
|
1894
2076
|
fill: "#169154",
|
|
1895
2077
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
1896
2078
|
}
|
|
1897
2079
|
),
|
|
1898
|
-
/* @__PURE__ */
|
|
2080
|
+
/* @__PURE__ */ jsx37(
|
|
1899
2081
|
"path",
|
|
1900
2082
|
{
|
|
1901
2083
|
fill: "#18482a",
|
|
1902
2084
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
1903
2085
|
}
|
|
1904
2086
|
),
|
|
1905
|
-
/* @__PURE__ */
|
|
1906
|
-
/* @__PURE__ */
|
|
1907
|
-
/* @__PURE__ */
|
|
1908
|
-
/* @__PURE__ */
|
|
2087
|
+
/* @__PURE__ */ jsx37("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
2088
|
+
/* @__PURE__ */ jsx37("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
2089
|
+
/* @__PURE__ */ jsxs14("g", { children: [
|
|
2090
|
+
/* @__PURE__ */ jsx37(
|
|
1909
2091
|
"path",
|
|
1910
2092
|
{
|
|
1911
2093
|
fill: "#29c27f",
|
|
1912
2094
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
1913
2095
|
}
|
|
1914
2096
|
),
|
|
1915
|
-
/* @__PURE__ */
|
|
2097
|
+
/* @__PURE__ */ jsx37(
|
|
1916
2098
|
"path",
|
|
1917
2099
|
{
|
|
1918
2100
|
fill: "#27663f",
|
|
1919
2101
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
1920
2102
|
}
|
|
1921
2103
|
),
|
|
1922
|
-
/* @__PURE__ */
|
|
1923
|
-
/* @__PURE__ */
|
|
2104
|
+
/* @__PURE__ */ jsx37("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
2105
|
+
/* @__PURE__ */ jsx37("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
1924
2106
|
] }),
|
|
1925
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ jsx37(
|
|
1926
2108
|
"path",
|
|
1927
2109
|
{
|
|
1928
2110
|
fill: "#0c7238",
|
|
1929
2111
|
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"
|
|
1930
2112
|
}
|
|
1931
2113
|
),
|
|
1932
|
-
/* @__PURE__ */
|
|
2114
|
+
/* @__PURE__ */ jsx37(
|
|
1933
2115
|
"path",
|
|
1934
2116
|
{
|
|
1935
2117
|
fill: "#fff",
|
|
@@ -1939,7 +2121,7 @@ var ExcelIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
1939
2121
|
]
|
|
1940
2122
|
}
|
|
1941
2123
|
);
|
|
1942
|
-
var WordIcon = () => /* @__PURE__ */
|
|
2124
|
+
var WordIcon = () => /* @__PURE__ */ jsxs14(
|
|
1943
2125
|
"svg",
|
|
1944
2126
|
{
|
|
1945
2127
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1947,14 +2129,14 @@ var WordIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
1947
2129
|
className: "w-10 h-10",
|
|
1948
2130
|
baseProfile: "basic",
|
|
1949
2131
|
children: [
|
|
1950
|
-
/* @__PURE__ */
|
|
2132
|
+
/* @__PURE__ */ jsx37(
|
|
1951
2133
|
"path",
|
|
1952
2134
|
{
|
|
1953
2135
|
fill: "#283593",
|
|
1954
2136
|
d: "M9,33.595l14.911-18.706L41,26v13.306C41,41.346,39.346,43,37.306,43H15.332 C11.835,43,9,40.164,9,36.667C9,36.667,9,33.595,9,33.595z"
|
|
1955
2137
|
}
|
|
1956
2138
|
),
|
|
1957
|
-
/* @__PURE__ */
|
|
2139
|
+
/* @__PURE__ */ jsxs14(
|
|
1958
2140
|
"linearGradient",
|
|
1959
2141
|
{
|
|
1960
2142
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -1965,19 +2147,19 @@ var WordIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
1965
2147
|
gradientTransform: "translate(0 -339.89)",
|
|
1966
2148
|
gradientUnits: "userSpaceOnUse",
|
|
1967
2149
|
children: [
|
|
1968
|
-
/* @__PURE__ */
|
|
1969
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ jsx37("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
2151
|
+
/* @__PURE__ */ jsx37("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
1970
2152
|
]
|
|
1971
2153
|
}
|
|
1972
2154
|
),
|
|
1973
|
-
/* @__PURE__ */
|
|
2155
|
+
/* @__PURE__ */ jsx37(
|
|
1974
2156
|
"path",
|
|
1975
2157
|
{
|
|
1976
2158
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
1977
2159
|
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"
|
|
1978
2160
|
}
|
|
1979
2161
|
),
|
|
1980
|
-
/* @__PURE__ */
|
|
2162
|
+
/* @__PURE__ */ jsx37(
|
|
1981
2163
|
"path",
|
|
1982
2164
|
{
|
|
1983
2165
|
fill: "#1e88e5",
|
|
@@ -1985,21 +2167,21 @@ var WordIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
1985
2167
|
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"
|
|
1986
2168
|
}
|
|
1987
2169
|
),
|
|
1988
|
-
/* @__PURE__ */
|
|
2170
|
+
/* @__PURE__ */ jsx37(
|
|
1989
2171
|
"path",
|
|
1990
2172
|
{
|
|
1991
2173
|
fill: "#00e5ff",
|
|
1992
2174
|
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"
|
|
1993
2175
|
}
|
|
1994
2176
|
),
|
|
1995
|
-
/* @__PURE__ */
|
|
2177
|
+
/* @__PURE__ */ jsx37(
|
|
1996
2178
|
"path",
|
|
1997
2179
|
{
|
|
1998
2180
|
fill: "#1565c0",
|
|
1999
2181
|
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"
|
|
2000
2182
|
}
|
|
2001
2183
|
),
|
|
2002
|
-
/* @__PURE__ */
|
|
2184
|
+
/* @__PURE__ */ jsx37(
|
|
2003
2185
|
"path",
|
|
2004
2186
|
{
|
|
2005
2187
|
fill: "#fff",
|
|
@@ -2009,42 +2191,42 @@ var WordIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2009
2191
|
]
|
|
2010
2192
|
}
|
|
2011
2193
|
);
|
|
2012
|
-
var StandardIcon = () => /* @__PURE__ */
|
|
2194
|
+
var StandardIcon = () => /* @__PURE__ */ jsxs14(
|
|
2013
2195
|
"svg",
|
|
2014
2196
|
{
|
|
2015
2197
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2016
2198
|
viewBox: "0 0 48 48",
|
|
2017
2199
|
className: "w-10 h-10",
|
|
2018
2200
|
children: [
|
|
2019
|
-
/* @__PURE__ */
|
|
2020
|
-
/* @__PURE__ */
|
|
2201
|
+
/* @__PURE__ */ jsx37("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
2202
|
+
/* @__PURE__ */ jsx37("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
2021
2203
|
]
|
|
2022
2204
|
}
|
|
2023
2205
|
);
|
|
2024
|
-
var PowerPointIcon = () => /* @__PURE__ */
|
|
2206
|
+
var PowerPointIcon = () => /* @__PURE__ */ jsxs14(
|
|
2025
2207
|
"svg",
|
|
2026
2208
|
{
|
|
2027
2209
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2028
2210
|
viewBox: "0 0 48 48",
|
|
2029
2211
|
className: "w-10 h-10",
|
|
2030
2212
|
children: [
|
|
2031
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ jsx37(
|
|
2032
2214
|
"path",
|
|
2033
2215
|
{
|
|
2034
2216
|
fill: "#dc4c2c",
|
|
2035
2217
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
2036
2218
|
}
|
|
2037
2219
|
),
|
|
2038
|
-
/* @__PURE__ */
|
|
2039
|
-
/* @__PURE__ */
|
|
2040
|
-
/* @__PURE__ */
|
|
2220
|
+
/* @__PURE__ */ jsx37("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
2221
|
+
/* @__PURE__ */ jsx37("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
2222
|
+
/* @__PURE__ */ jsx37(
|
|
2041
2223
|
"path",
|
|
2042
2224
|
{
|
|
2043
2225
|
fill: "#9b341f",
|
|
2044
2226
|
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"
|
|
2045
2227
|
}
|
|
2046
2228
|
),
|
|
2047
|
-
/* @__PURE__ */
|
|
2229
|
+
/* @__PURE__ */ jsx37(
|
|
2048
2230
|
"path",
|
|
2049
2231
|
{
|
|
2050
2232
|
fill: "#fff",
|
|
@@ -2054,16 +2236,16 @@ var PowerPointIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2054
2236
|
]
|
|
2055
2237
|
}
|
|
2056
2238
|
);
|
|
2057
|
-
var TextIcon = () => /* @__PURE__ */
|
|
2239
|
+
var TextIcon = () => /* @__PURE__ */ jsxs14(
|
|
2058
2240
|
"svg",
|
|
2059
2241
|
{
|
|
2060
2242
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2061
2243
|
viewBox: "0 0 48 48",
|
|
2062
2244
|
className: "w-10 h-10",
|
|
2063
2245
|
children: [
|
|
2064
|
-
/* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */
|
|
2066
|
-
/* @__PURE__ */
|
|
2246
|
+
/* @__PURE__ */ jsx37("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
2247
|
+
/* @__PURE__ */ jsx37("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
2248
|
+
/* @__PURE__ */ jsx37(
|
|
2067
2249
|
"path",
|
|
2068
2250
|
{
|
|
2069
2251
|
fill: "#1976D2",
|
|
@@ -2073,7 +2255,7 @@ var TextIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2073
2255
|
]
|
|
2074
2256
|
}
|
|
2075
2257
|
);
|
|
2076
|
-
var ArchiveIcon = () => /* @__PURE__ */
|
|
2258
|
+
var ArchiveIcon = () => /* @__PURE__ */ jsxs14(
|
|
2077
2259
|
"svg",
|
|
2078
2260
|
{
|
|
2079
2261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2083,14 +2265,14 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2083
2265
|
version: "1.0",
|
|
2084
2266
|
className: "w-10 h-10",
|
|
2085
2267
|
children: [
|
|
2086
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ jsx37("defs", { children: /* @__PURE__ */ jsx37("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ jsx37(
|
|
2087
2269
|
"path",
|
|
2088
2270
|
{
|
|
2089
2271
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
2090
2272
|
"clip-rule": "nonzero"
|
|
2091
2273
|
}
|
|
2092
2274
|
) }) }),
|
|
2093
|
-
/* @__PURE__ */
|
|
2275
|
+
/* @__PURE__ */ jsx37("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ jsx37(
|
|
2094
2276
|
"path",
|
|
2095
2277
|
{
|
|
2096
2278
|
fill: "#ff9100",
|
|
@@ -2099,7 +2281,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2099
2281
|
"fill-rule": "nonzero"
|
|
2100
2282
|
}
|
|
2101
2283
|
) }),
|
|
2102
|
-
/* @__PURE__ */
|
|
2284
|
+
/* @__PURE__ */ jsx37(
|
|
2103
2285
|
"path",
|
|
2104
2286
|
{
|
|
2105
2287
|
fill: "#fbe9e7",
|
|
@@ -2108,7 +2290,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2108
2290
|
"fill-rule": "nonzero"
|
|
2109
2291
|
}
|
|
2110
2292
|
),
|
|
2111
|
-
/* @__PURE__ */
|
|
2293
|
+
/* @__PURE__ */ jsx37(
|
|
2112
2294
|
"path",
|
|
2113
2295
|
{
|
|
2114
2296
|
fill: "#ffe0b2",
|
|
@@ -2117,7 +2299,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2117
2299
|
"fill-rule": "nonzero"
|
|
2118
2300
|
}
|
|
2119
2301
|
),
|
|
2120
|
-
/* @__PURE__ */
|
|
2302
|
+
/* @__PURE__ */ jsx37(
|
|
2121
2303
|
"path",
|
|
2122
2304
|
{
|
|
2123
2305
|
fill: "#ffe0b2",
|
|
@@ -2126,7 +2308,7 @@ var ArchiveIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2126
2308
|
"fill-rule": "nonzero"
|
|
2127
2309
|
}
|
|
2128
2310
|
),
|
|
2129
|
-
/* @__PURE__ */
|
|
2311
|
+
/* @__PURE__ */ jsx37(
|
|
2130
2312
|
"path",
|
|
2131
2313
|
{
|
|
2132
2314
|
fill: "#ffe0b2",
|
|
@@ -2201,8 +2383,8 @@ var DocumentNode = (props) => {
|
|
|
2201
2383
|
}
|
|
2202
2384
|
}
|
|
2203
2385
|
if (documents.length === 0) {
|
|
2204
|
-
return /* @__PURE__ */
|
|
2205
|
-
/* @__PURE__ */
|
|
2386
|
+
return /* @__PURE__ */ jsx37(Fragment6, { children: /* @__PURE__ */ jsxs14("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
2387
|
+
/* @__PURE__ */ jsx37("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx37(
|
|
2206
2388
|
"svg",
|
|
2207
2389
|
{
|
|
2208
2390
|
className: "w-5 h-5",
|
|
@@ -2210,7 +2392,7 @@ var DocumentNode = (props) => {
|
|
|
2210
2392
|
stroke: "currentColor",
|
|
2211
2393
|
viewBox: "0 0 24 24",
|
|
2212
2394
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2213
|
-
children: /* @__PURE__ */
|
|
2395
|
+
children: /* @__PURE__ */ jsx37(
|
|
2214
2396
|
"path",
|
|
2215
2397
|
{
|
|
2216
2398
|
strokeLinecap: "round",
|
|
@@ -2221,11 +2403,11 @@ var DocumentNode = (props) => {
|
|
|
2221
2403
|
)
|
|
2222
2404
|
}
|
|
2223
2405
|
) }),
|
|
2224
|
-
/* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2406
|
+
/* @__PURE__ */ jsx37("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
2407
|
+
/* @__PURE__ */ jsx37("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
2226
2408
|
] }) });
|
|
2227
2409
|
}
|
|
2228
|
-
return /* @__PURE__ */
|
|
2410
|
+
return /* @__PURE__ */ jsx37("div", { className: "", children: documents.map((doc, index) => {
|
|
2229
2411
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
2230
2412
|
props.assetBaseUrl,
|
|
2231
2413
|
doc.assetUrl
|
|
@@ -2243,16 +2425,16 @@ var DocumentNode = (props) => {
|
|
|
2243
2425
|
}
|
|
2244
2426
|
}
|
|
2245
2427
|
const { Icon, extLabel } = getFileDetails(documentUrl);
|
|
2246
|
-
return /* @__PURE__ */
|
|
2428
|
+
return /* @__PURE__ */ jsxs14(
|
|
2247
2429
|
"div",
|
|
2248
2430
|
{
|
|
2249
2431
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
2250
2432
|
children: [
|
|
2251
|
-
/* @__PURE__ */
|
|
2252
|
-
/* @__PURE__ */
|
|
2253
|
-
/* @__PURE__ */
|
|
2433
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center space-x-4", children: [
|
|
2434
|
+
/* @__PURE__ */ jsx37("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft", children: /* @__PURE__ */ jsx37(Icon, {}) }),
|
|
2435
|
+
/* @__PURE__ */ jsx37("div", { className: "flex items-baseline space-x-2", children: /* @__PURE__ */ jsx37("h4", { className: "text-base font-semibold", children: documentTitle }) })
|
|
2254
2436
|
] }),
|
|
2255
|
-
/* @__PURE__ */
|
|
2437
|
+
/* @__PURE__ */ jsxs14(
|
|
2256
2438
|
"a",
|
|
2257
2439
|
{
|
|
2258
2440
|
href: documentUrl,
|
|
@@ -2260,7 +2442,7 @@ var DocumentNode = (props) => {
|
|
|
2260
2442
|
rel: "noopener noreferrer",
|
|
2261
2443
|
className: "inline-flex items-center px-4 py-2 text-sm font-medium bg-default border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors",
|
|
2262
2444
|
children: [
|
|
2263
|
-
/* @__PURE__ */
|
|
2445
|
+
/* @__PURE__ */ jsxs14(
|
|
2264
2446
|
"svg",
|
|
2265
2447
|
{
|
|
2266
2448
|
className: "w-4 h-4 mr-2",
|
|
@@ -2268,7 +2450,7 @@ var DocumentNode = (props) => {
|
|
|
2268
2450
|
stroke: "currentColor",
|
|
2269
2451
|
viewBox: "0 0 24 24",
|
|
2270
2452
|
children: [
|
|
2271
|
-
/* @__PURE__ */
|
|
2453
|
+
/* @__PURE__ */ jsx37(
|
|
2272
2454
|
"path",
|
|
2273
2455
|
{
|
|
2274
2456
|
strokeLinecap: "round",
|
|
@@ -2277,7 +2459,7 @@ var DocumentNode = (props) => {
|
|
|
2277
2459
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
2278
2460
|
}
|
|
2279
2461
|
),
|
|
2280
|
-
/* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ jsx37(
|
|
2281
2463
|
"path",
|
|
2282
2464
|
{
|
|
2283
2465
|
strokeLinecap: "round",
|
|
@@ -2303,13 +2485,13 @@ var DocumentNode_default = DocumentNode;
|
|
|
2303
2485
|
|
|
2304
2486
|
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
2305
2487
|
import dynamic10 from "next/dynamic";
|
|
2306
|
-
import { jsx as
|
|
2488
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2307
2489
|
var IframeClient2 = dynamic10(() => import("./IframeClient-WF2KLXZB.mjs"), {
|
|
2308
2490
|
ssr: false
|
|
2309
2491
|
});
|
|
2310
2492
|
var GoogleMapNode = (props) => {
|
|
2311
2493
|
let src = props.node.embedUrl;
|
|
2312
|
-
return /* @__PURE__ */
|
|
2494
|
+
return /* @__PURE__ */ jsx38("div", { className: "google-map-container", children: src && /* @__PURE__ */ jsx38(
|
|
2313
2495
|
IframeClient2,
|
|
2314
2496
|
{
|
|
2315
2497
|
src,
|
|
@@ -2321,7 +2503,7 @@ var GoogleMapNode = (props) => {
|
|
|
2321
2503
|
var GoogleMapNode_default = GoogleMapNode;
|
|
2322
2504
|
|
|
2323
2505
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2324
|
-
import { jsx as
|
|
2506
|
+
import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2325
2507
|
var Pagination = dynamic11(() => import("./Pagination-T7Z2NXKO.mjs"), { ssr: true });
|
|
2326
2508
|
var DataBindingControls = dynamic11(() => import("./DataBindingControls-ESDLOHNB.mjs"), {
|
|
2327
2509
|
ssr: true
|
|
@@ -2580,7 +2762,7 @@ var DivContainer = async (props) => {
|
|
|
2580
2762
|
response = await serviceClient.get(endpoint);
|
|
2581
2763
|
result = response?.result;
|
|
2582
2764
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
2583
|
-
return /* @__PURE__ */
|
|
2765
|
+
return /* @__PURE__ */ jsx39(NoDataFound_default, {});
|
|
2584
2766
|
}
|
|
2585
2767
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
2586
2768
|
childCollectionData = getNestedValue6(
|
|
@@ -2600,7 +2782,7 @@ var DivContainer = async (props) => {
|
|
|
2600
2782
|
}
|
|
2601
2783
|
const SelectedNode = NodeTypes2[node.type];
|
|
2602
2784
|
if (!SelectedNode) return null;
|
|
2603
|
-
return /* @__PURE__ */
|
|
2785
|
+
return /* @__PURE__ */ jsx39(React25.Fragment, { children: /* @__PURE__ */ jsx39(
|
|
2604
2786
|
SelectedNode,
|
|
2605
2787
|
{
|
|
2606
2788
|
node,
|
|
@@ -2620,7 +2802,7 @@ var DivContainer = async (props) => {
|
|
|
2620
2802
|
}
|
|
2621
2803
|
) }, key);
|
|
2622
2804
|
}
|
|
2623
|
-
function
|
|
2805
|
+
function renderChildren2(nodes, props2, data, key, href) {
|
|
2624
2806
|
if (!nodes) return null;
|
|
2625
2807
|
const childNodes = nodes.map((node, index) => {
|
|
2626
2808
|
if (
|
|
@@ -2737,7 +2919,7 @@ var DivContainer = async (props) => {
|
|
|
2737
2919
|
dataBindingProperties?.showFacets || dataBindingProperties?.showSortOptions || dataBindingProperties?.showSearchBar
|
|
2738
2920
|
);
|
|
2739
2921
|
const WrapperComponent = Wrapper;
|
|
2740
|
-
const renderedContainer = /* @__PURE__ */
|
|
2922
|
+
const renderedContainer = /* @__PURE__ */ jsx39(
|
|
2741
2923
|
WrapperComponent,
|
|
2742
2924
|
{
|
|
2743
2925
|
id: guid,
|
|
@@ -2745,17 +2927,17 @@ var DivContainer = async (props) => {
|
|
|
2745
2927
|
className: classNames || void 0,
|
|
2746
2928
|
...wrapperProps,
|
|
2747
2929
|
children: dataToRender.map(
|
|
2748
|
-
(item, idx) => item?.links?.view && renderLink ?
|
|
2930
|
+
(item, idx) => item?.links?.view && renderLink ? renderChildren2(
|
|
2749
2931
|
props.node.children,
|
|
2750
2932
|
props,
|
|
2751
2933
|
item,
|
|
2752
2934
|
idx,
|
|
2753
2935
|
props.href ? void 0 : item?.links?.view
|
|
2754
|
-
)?.map((child, i) => /* @__PURE__ */
|
|
2936
|
+
)?.map((child, i) => /* @__PURE__ */ jsx39(React25.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
2755
2937
|
)
|
|
2756
2938
|
}
|
|
2757
2939
|
);
|
|
2758
|
-
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */
|
|
2940
|
+
const paginationControl = dataBindingProperties?.enablePagination ? /* @__PURE__ */ jsx39(
|
|
2759
2941
|
Pagination,
|
|
2760
2942
|
{
|
|
2761
2943
|
path: props.path,
|
|
@@ -2763,15 +2945,15 @@ var DivContainer = async (props) => {
|
|
|
2763
2945
|
dataset: response
|
|
2764
2946
|
}
|
|
2765
2947
|
) : null;
|
|
2766
|
-
return /* @__PURE__ */
|
|
2767
|
-
/* @__PURE__ */
|
|
2948
|
+
return /* @__PURE__ */ jsxs15(React25.Fragment, { children: [
|
|
2949
|
+
/* @__PURE__ */ jsx39(
|
|
2768
2950
|
"style",
|
|
2769
2951
|
{
|
|
2770
2952
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
2771
2953
|
}
|
|
2772
2954
|
),
|
|
2773
|
-
showDataBindingControls ? /* @__PURE__ */
|
|
2774
|
-
/* @__PURE__ */
|
|
2955
|
+
showDataBindingControls ? /* @__PURE__ */ jsxs15(React25.Fragment, { children: [
|
|
2956
|
+
/* @__PURE__ */ jsx39(
|
|
2775
2957
|
DataBindingControls,
|
|
2776
2958
|
{
|
|
2777
2959
|
mode: "toolbar",
|
|
@@ -2783,18 +2965,18 @@ var DivContainer = async (props) => {
|
|
|
2783
2965
|
showSearchBar: dataBindingProperties?.showSearchBar
|
|
2784
2966
|
}
|
|
2785
2967
|
),
|
|
2786
|
-
/* @__PURE__ */
|
|
2968
|
+
/* @__PURE__ */ jsxs15(
|
|
2787
2969
|
"div",
|
|
2788
2970
|
{
|
|
2789
2971
|
className: dataBindingProperties?.showFacets ? "grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_18rem]" : void 0,
|
|
2790
2972
|
children: [
|
|
2791
|
-
/* @__PURE__ */
|
|
2973
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
|
|
2792
2974
|
renderedContainer,
|
|
2793
2975
|
paginationControl
|
|
2794
2976
|
] }),
|
|
2795
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */
|
|
2796
|
-
/* @__PURE__ */
|
|
2797
|
-
/* @__PURE__ */
|
|
2977
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ jsxs15("aside", { className: "border bg-default p-3 lg:sticky lg:top-[90px] lg:self-start", children: [
|
|
2978
|
+
/* @__PURE__ */ jsx39("h2", { className: "mb-2 text-lg font-semibold", children: "Filters" }),
|
|
2979
|
+
/* @__PURE__ */ jsx39(
|
|
2798
2980
|
DataBindingControls,
|
|
2799
2981
|
{
|
|
2800
2982
|
mode: "facets",
|
|
@@ -2808,16 +2990,16 @@ var DivContainer = async (props) => {
|
|
|
2808
2990
|
]
|
|
2809
2991
|
}
|
|
2810
2992
|
)
|
|
2811
|
-
] }) : /* @__PURE__ */
|
|
2993
|
+
] }) : /* @__PURE__ */ jsxs15(React25.Fragment, { children: [
|
|
2812
2994
|
renderedContainer,
|
|
2813
|
-
paginationControl && /* @__PURE__ */
|
|
2995
|
+
paginationControl && /* @__PURE__ */ jsx39("div", { children: paginationControl })
|
|
2814
2996
|
] })
|
|
2815
2997
|
] });
|
|
2816
2998
|
};
|
|
2817
2999
|
var DivContainer_default = DivContainer;
|
|
2818
3000
|
|
|
2819
3001
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2820
|
-
import { jsx as
|
|
3002
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2821
3003
|
var NodeTypes = {
|
|
2822
3004
|
["paragraph"]: ParagraphNode_default,
|
|
2823
3005
|
["heading"]: HeadingNode_default,
|
|
@@ -2855,14 +3037,14 @@ var PageBodyRenderer = (props) => {
|
|
|
2855
3037
|
}
|
|
2856
3038
|
return true;
|
|
2857
3039
|
};
|
|
2858
|
-
return /* @__PURE__ */
|
|
3040
|
+
return /* @__PURE__ */ jsx40(React26.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
2859
3041
|
{
|
|
2860
3042
|
}
|
|
2861
3043
|
const SelectedNode = NodeTypes[node.type];
|
|
2862
3044
|
if (!shouldRenderNode(node)) {
|
|
2863
3045
|
return null;
|
|
2864
3046
|
}
|
|
2865
|
-
return /* @__PURE__ */
|
|
3047
|
+
return /* @__PURE__ */ jsx40(React26.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx40(React26.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx40(React26.Fragment, { children: /* @__PURE__ */ jsx40(
|
|
2866
3048
|
SelectedNode,
|
|
2867
3049
|
{
|
|
2868
3050
|
node,
|
|
@@ -2878,7 +3060,7 @@ var PageBodyRenderer = (props) => {
|
|
|
2878
3060
|
device: props.device,
|
|
2879
3061
|
widgetRenderer: props.widgetRenderer
|
|
2880
3062
|
}
|
|
2881
|
-
) }) : /* @__PURE__ */
|
|
3063
|
+
) }) : /* @__PURE__ */ jsx40(React26.Fragment, { children: /* @__PURE__ */ jsx40(
|
|
2882
3064
|
SelectedNode,
|
|
2883
3065
|
{
|
|
2884
3066
|
node,
|
|
@@ -2948,7 +3130,7 @@ function EnterAnimationHydrator() {
|
|
|
2948
3130
|
|
|
2949
3131
|
// src/components/Toast.tsx
|
|
2950
3132
|
import { useCallback, useEffect as useEffect2, useRef, useState } from "react";
|
|
2951
|
-
import { Fragment as Fragment7, jsx as
|
|
3133
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2952
3134
|
var Toast = () => {
|
|
2953
3135
|
const [showToast, setShowToast] = useState(false);
|
|
2954
3136
|
const [message, setMessage] = useState("");
|
|
@@ -2982,8 +3164,8 @@ var Toast = () => {
|
|
|
2982
3164
|
});
|
|
2983
3165
|
};
|
|
2984
3166
|
}, [closeToast, showMessage]);
|
|
2985
|
-
return /* @__PURE__ */
|
|
2986
|
-
/* @__PURE__ */
|
|
3167
|
+
return /* @__PURE__ */ jsx41(Fragment7, { children: showToast && /* @__PURE__ */ jsx41("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__ */ jsxs16("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
3168
|
+
/* @__PURE__ */ jsx41(
|
|
2987
3169
|
"span",
|
|
2988
3170
|
{
|
|
2989
3171
|
className: "font-medium text-inherit text-sm",
|
|
@@ -2991,7 +3173,7 @@ var Toast = () => {
|
|
|
2991
3173
|
children: message
|
|
2992
3174
|
}
|
|
2993
3175
|
),
|
|
2994
|
-
/* @__PURE__ */
|
|
3176
|
+
/* @__PURE__ */ jsx41("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx41(
|
|
2995
3177
|
"svg",
|
|
2996
3178
|
{
|
|
2997
3179
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2999,7 +3181,7 @@ var Toast = () => {
|
|
|
2999
3181
|
fill: "none",
|
|
3000
3182
|
viewBox: "0 0 24 24",
|
|
3001
3183
|
stroke: "currentColor",
|
|
3002
|
-
children: /* @__PURE__ */
|
|
3184
|
+
children: /* @__PURE__ */ jsx41("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
3003
3185
|
}
|
|
3004
3186
|
) })
|
|
3005
3187
|
] }) }) });
|
|
@@ -3009,7 +3191,7 @@ var Toast_default = Toast;
|
|
|
3009
3191
|
// src/components/NavigationTabsV2.tsx
|
|
3010
3192
|
import Link2 from "next/link";
|
|
3011
3193
|
import { usePathname } from "next/navigation";
|
|
3012
|
-
import { jsx as
|
|
3194
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3013
3195
|
function resolveRoutePlaceholders(route, params) {
|
|
3014
3196
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
3015
3197
|
const value = params[key];
|
|
@@ -3034,8 +3216,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
3034
3216
|
isActive: tab.isActive
|
|
3035
3217
|
})) || [];
|
|
3036
3218
|
if (mappedTabs.length === 0) return null;
|
|
3037
|
-
return /* @__PURE__ */
|
|
3038
|
-
return /* @__PURE__ */
|
|
3219
|
+
return /* @__PURE__ */ jsx42("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
3220
|
+
return /* @__PURE__ */ jsx42(Link2, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx42(
|
|
3039
3221
|
"div",
|
|
3040
3222
|
{
|
|
3041
3223
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -3048,51 +3230,51 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
3048
3230
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
3049
3231
|
|
|
3050
3232
|
// src/components/dataForm/DataList.tsx
|
|
3051
|
-
import
|
|
3233
|
+
import React30, { useEffect as useEffect3, useState as useState2, useCallback as useCallback2, useReducer } from "react";
|
|
3052
3234
|
import { useRouter } from "next/navigation";
|
|
3053
3235
|
|
|
3054
3236
|
// src/components/dataForm/NoContentView.tsx
|
|
3055
|
-
import
|
|
3056
|
-
import { jsx as
|
|
3237
|
+
import React28 from "react";
|
|
3238
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3057
3239
|
var NoContentView = (props) => {
|
|
3058
|
-
return /* @__PURE__ */
|
|
3240
|
+
return /* @__PURE__ */ jsx43(React28.Fragment, { children: props.isDataFound === false && props.children });
|
|
3059
3241
|
};
|
|
3060
3242
|
var NoContentView_default = NoContentView;
|
|
3061
3243
|
|
|
3062
3244
|
// src/components/dataForm/ContentView.tsx
|
|
3063
|
-
import
|
|
3064
|
-
import { jsx as
|
|
3245
|
+
import React29 from "react";
|
|
3246
|
+
import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3065
3247
|
var ContentView = (props) => {
|
|
3066
|
-
return /* @__PURE__ */
|
|
3067
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
3068
|
-
/* @__PURE__ */
|
|
3069
|
-
/* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3071
|
-
/* @__PURE__ */
|
|
3072
|
-
/* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ jsxs17(React29.Fragment, { children: [
|
|
3249
|
+
props.isDataFound == null && /* @__PURE__ */ jsx44("div", { className: "", children: /* @__PURE__ */ jsxs17("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3250
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center mb-4", children: [
|
|
3251
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3252
|
+
/* @__PURE__ */ jsxs17("div", { className: "ml-2", children: [
|
|
3253
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3254
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3073
3255
|
] })
|
|
3074
3256
|
] }),
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
3077
|
-
/* @__PURE__ */
|
|
3078
|
-
/* @__PURE__ */
|
|
3079
|
-
/* @__PURE__ */
|
|
3080
|
-
/* @__PURE__ */
|
|
3081
|
-
/* @__PURE__ */
|
|
3257
|
+
/* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3258
|
+
/* @__PURE__ */ jsxs17("div", { className: "animate-pulse", children: [
|
|
3259
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3260
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3261
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3262
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3263
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3082
3264
|
] }),
|
|
3083
|
-
/* @__PURE__ */
|
|
3084
|
-
/* @__PURE__ */
|
|
3085
|
-
/* @__PURE__ */
|
|
3086
|
-
/* @__PURE__ */
|
|
3087
|
-
/* @__PURE__ */
|
|
3088
|
-
/* @__PURE__ */
|
|
3265
|
+
/* @__PURE__ */ jsxs17("div", { className: "animate-pulse", children: [
|
|
3266
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3267
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3268
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3269
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3270
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3089
3271
|
] }),
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
3093
|
-
/* @__PURE__ */
|
|
3094
|
-
/* @__PURE__ */
|
|
3095
|
-
/* @__PURE__ */
|
|
3272
|
+
/* @__PURE__ */ jsxs17("div", { className: "animate-pulse", children: [
|
|
3273
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3274
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3275
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3276
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3277
|
+
/* @__PURE__ */ jsx44("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3096
3278
|
] })
|
|
3097
3279
|
] })
|
|
3098
3280
|
] }) }),
|
|
@@ -3146,7 +3328,7 @@ function FormReducer(state, action) {
|
|
|
3146
3328
|
var FormReducer_default = FormReducer;
|
|
3147
3329
|
|
|
3148
3330
|
// src/components/dataForm/DataList.tsx
|
|
3149
|
-
import { Fragment as Fragment8, jsx as
|
|
3331
|
+
import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3150
3332
|
var DataList = (props) => {
|
|
3151
3333
|
const router = useRouter();
|
|
3152
3334
|
let builder = new OdataBuilder(props.path);
|
|
@@ -3184,7 +3366,7 @@ var DataList = (props) => {
|
|
|
3184
3366
|
if (path.includes(".")) {
|
|
3185
3367
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
3186
3368
|
} else if (Array.isArray(obj[path])) {
|
|
3187
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
3369
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx45("div", { children: item }, index));
|
|
3188
3370
|
} else {
|
|
3189
3371
|
return obj[path];
|
|
3190
3372
|
}
|
|
@@ -3263,30 +3445,30 @@ var DataList = (props) => {
|
|
|
3263
3445
|
const renderPageNumbers = () => {
|
|
3264
3446
|
if (pages <= 10) {
|
|
3265
3447
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
3266
|
-
(page) => /* @__PURE__ */
|
|
3448
|
+
(page) => /* @__PURE__ */ jsx45(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx45(
|
|
3267
3449
|
Hyperlink,
|
|
3268
3450
|
{
|
|
3269
3451
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3270
3452
|
href: builder.getNewPageUrl(page),
|
|
3271
3453
|
children: page
|
|
3272
3454
|
}
|
|
3273
|
-
) : /* @__PURE__ */
|
|
3455
|
+
) : /* @__PURE__ */ jsx45("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
3274
3456
|
);
|
|
3275
3457
|
} else {
|
|
3276
3458
|
const showFirstPages = activePageNumber <= 5;
|
|
3277
3459
|
const showLastPages = activePageNumber > pages - 5;
|
|
3278
3460
|
if (showFirstPages) {
|
|
3279
|
-
return /* @__PURE__ */
|
|
3280
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
3461
|
+
return /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
3462
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx45(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx45(
|
|
3281
3463
|
Hyperlink,
|
|
3282
3464
|
{
|
|
3283
3465
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3284
3466
|
href: builder.getNewPageUrl(page),
|
|
3285
3467
|
children: page
|
|
3286
3468
|
}
|
|
3287
|
-
) : /* @__PURE__ */
|
|
3288
|
-
/* @__PURE__ */
|
|
3289
|
-
/* @__PURE__ */
|
|
3469
|
+
) : /* @__PURE__ */ jsx45("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
3470
|
+
/* @__PURE__ */ jsx45("span", { className: "px-2 py-1", children: "..." }),
|
|
3471
|
+
/* @__PURE__ */ jsx45(
|
|
3290
3472
|
Hyperlink,
|
|
3291
3473
|
{
|
|
3292
3474
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3294,7 +3476,7 @@ var DataList = (props) => {
|
|
|
3294
3476
|
children: pages - 1
|
|
3295
3477
|
}
|
|
3296
3478
|
),
|
|
3297
|
-
/* @__PURE__ */
|
|
3479
|
+
/* @__PURE__ */ jsx45(
|
|
3298
3480
|
Hyperlink,
|
|
3299
3481
|
{
|
|
3300
3482
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3302,7 +3484,7 @@ var DataList = (props) => {
|
|
|
3302
3484
|
children: pages
|
|
3303
3485
|
}
|
|
3304
3486
|
),
|
|
3305
|
-
/* @__PURE__ */
|
|
3487
|
+
/* @__PURE__ */ jsx45("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs18(
|
|
3306
3488
|
"select",
|
|
3307
3489
|
{
|
|
3308
3490
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -3314,18 +3496,18 @@ var DataList = (props) => {
|
|
|
3314
3496
|
}
|
|
3315
3497
|
},
|
|
3316
3498
|
children: [
|
|
3317
|
-
/* @__PURE__ */
|
|
3499
|
+
/* @__PURE__ */ jsx45("option", { className: "", value: "", children: "Jump to" }),
|
|
3318
3500
|
Array.from(
|
|
3319
3501
|
{ length: Math.max(0, pages - 10) },
|
|
3320
3502
|
(_, index) => index + 9
|
|
3321
|
-
).map((page) => /* @__PURE__ */
|
|
3503
|
+
).map((page) => /* @__PURE__ */ jsx45("option", { value: page, children: page }, page))
|
|
3322
3504
|
]
|
|
3323
3505
|
}
|
|
3324
3506
|
) })
|
|
3325
3507
|
] });
|
|
3326
3508
|
} else if (showLastPages) {
|
|
3327
|
-
return /* @__PURE__ */
|
|
3328
|
-
/* @__PURE__ */
|
|
3509
|
+
return /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
3510
|
+
/* @__PURE__ */ jsx45(
|
|
3329
3511
|
Hyperlink,
|
|
3330
3512
|
{
|
|
3331
3513
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3333,7 +3515,7 @@ var DataList = (props) => {
|
|
|
3333
3515
|
children: "1"
|
|
3334
3516
|
}
|
|
3335
3517
|
),
|
|
3336
|
-
/* @__PURE__ */
|
|
3518
|
+
/* @__PURE__ */ jsx45(
|
|
3337
3519
|
Hyperlink,
|
|
3338
3520
|
{
|
|
3339
3521
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3341,21 +3523,21 @@ var DataList = (props) => {
|
|
|
3341
3523
|
children: "2"
|
|
3342
3524
|
}
|
|
3343
3525
|
),
|
|
3344
|
-
/* @__PURE__ */
|
|
3526
|
+
/* @__PURE__ */ jsx45("span", { className: "px-2 py-1", children: "..." }),
|
|
3345
3527
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
3346
|
-
(page) => /* @__PURE__ */
|
|
3528
|
+
(page) => /* @__PURE__ */ jsx45(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx45(
|
|
3347
3529
|
Hyperlink,
|
|
3348
3530
|
{
|
|
3349
3531
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3350
3532
|
href: builder.getNewPageUrl(page),
|
|
3351
3533
|
children: page
|
|
3352
3534
|
}
|
|
3353
|
-
) : /* @__PURE__ */
|
|
3535
|
+
) : /* @__PURE__ */ jsx45("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
3354
3536
|
)
|
|
3355
3537
|
] });
|
|
3356
3538
|
} else {
|
|
3357
|
-
return /* @__PURE__ */
|
|
3358
|
-
/* @__PURE__ */
|
|
3539
|
+
return /* @__PURE__ */ jsxs18(Fragment8, { children: [
|
|
3540
|
+
/* @__PURE__ */ jsx45(
|
|
3359
3541
|
Hyperlink,
|
|
3360
3542
|
{
|
|
3361
3543
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3363,7 +3545,7 @@ var DataList = (props) => {
|
|
|
3363
3545
|
children: "1"
|
|
3364
3546
|
}
|
|
3365
3547
|
),
|
|
3366
|
-
/* @__PURE__ */
|
|
3548
|
+
/* @__PURE__ */ jsx45(
|
|
3367
3549
|
Hyperlink,
|
|
3368
3550
|
{
|
|
3369
3551
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3371,20 +3553,20 @@ var DataList = (props) => {
|
|
|
3371
3553
|
children: "2"
|
|
3372
3554
|
}
|
|
3373
3555
|
),
|
|
3374
|
-
/* @__PURE__ */
|
|
3556
|
+
/* @__PURE__ */ jsx45("span", { className: "px-2 py-1", children: "..." }),
|
|
3375
3557
|
Array.from(
|
|
3376
3558
|
{ length: 5 },
|
|
3377
3559
|
(_, index) => activePageNumber - 2 + index
|
|
3378
|
-
).map((page) => /* @__PURE__ */
|
|
3560
|
+
).map((page) => /* @__PURE__ */ jsx45(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx45(
|
|
3379
3561
|
Hyperlink,
|
|
3380
3562
|
{
|
|
3381
3563
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
3382
3564
|
href: builder.getNewPageUrl(page),
|
|
3383
3565
|
children: page
|
|
3384
3566
|
}
|
|
3385
|
-
) : /* @__PURE__ */
|
|
3386
|
-
/* @__PURE__ */
|
|
3387
|
-
/* @__PURE__ */
|
|
3567
|
+
) : /* @__PURE__ */ jsx45("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
3568
|
+
/* @__PURE__ */ jsx45("span", { className: "px-2 py-1", children: "..." }),
|
|
3569
|
+
/* @__PURE__ */ jsx45(
|
|
3388
3570
|
Hyperlink,
|
|
3389
3571
|
{
|
|
3390
3572
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3392,7 +3574,7 @@ var DataList = (props) => {
|
|
|
3392
3574
|
children: pages - 1
|
|
3393
3575
|
}
|
|
3394
3576
|
),
|
|
3395
|
-
/* @__PURE__ */
|
|
3577
|
+
/* @__PURE__ */ jsx45(
|
|
3396
3578
|
Hyperlink,
|
|
3397
3579
|
{
|
|
3398
3580
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -3400,7 +3582,7 @@ var DataList = (props) => {
|
|
|
3400
3582
|
children: pages
|
|
3401
3583
|
}
|
|
3402
3584
|
),
|
|
3403
|
-
/* @__PURE__ */
|
|
3585
|
+
/* @__PURE__ */ jsx45("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs18(
|
|
3404
3586
|
"select",
|
|
3405
3587
|
{
|
|
3406
3588
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -3412,8 +3594,8 @@ var DataList = (props) => {
|
|
|
3412
3594
|
}
|
|
3413
3595
|
},
|
|
3414
3596
|
children: [
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
3597
|
+
/* @__PURE__ */ jsx45("option", { value: "", children: "Jump to" }),
|
|
3598
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx45("option", { value: page, children: page }, page))
|
|
3417
3599
|
]
|
|
3418
3600
|
}
|
|
3419
3601
|
) })
|
|
@@ -3421,16 +3603,16 @@ var DataList = (props) => {
|
|
|
3421
3603
|
}
|
|
3422
3604
|
}
|
|
3423
3605
|
};
|
|
3424
|
-
return /* @__PURE__ */
|
|
3425
|
-
/* @__PURE__ */
|
|
3426
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
3606
|
+
return /* @__PURE__ */ jsxs18(React30.Fragment, { children: [
|
|
3607
|
+
/* @__PURE__ */ jsxs18(ContentView_default, { isDataFound, children: [
|
|
3608
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs18(
|
|
3427
3609
|
"div",
|
|
3428
3610
|
{
|
|
3429
3611
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
3430
3612
|
children: [
|
|
3431
|
-
props.title ? /* @__PURE__ */
|
|
3432
|
-
/* @__PURE__ */
|
|
3433
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
3613
|
+
props.title ? /* @__PURE__ */ jsx45("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx45("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx45("div", {}),
|
|
3614
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-3", children: [
|
|
3615
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx45(
|
|
3434
3616
|
InputControl_default,
|
|
3435
3617
|
{
|
|
3436
3618
|
name: "Search_input",
|
|
@@ -3442,7 +3624,7 @@ var DataList = (props) => {
|
|
|
3442
3624
|
}
|
|
3443
3625
|
}
|
|
3444
3626
|
),
|
|
3445
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
3627
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx45(
|
|
3446
3628
|
InputControl_default,
|
|
3447
3629
|
{
|
|
3448
3630
|
name: filter.name,
|
|
@@ -3457,15 +3639,15 @@ var DataList = (props) => {
|
|
|
3457
3639
|
},
|
|
3458
3640
|
filter.name
|
|
3459
3641
|
)),
|
|
3460
|
-
props.addLinkHref && /* @__PURE__ */
|
|
3642
|
+
props.addLinkHref && /* @__PURE__ */ jsxs18(
|
|
3461
3643
|
Hyperlink,
|
|
3462
3644
|
{
|
|
3463
3645
|
className: "gap-1",
|
|
3464
3646
|
linkType: "Primary" /* Solid */,
|
|
3465
3647
|
href: props.addLinkHref,
|
|
3466
3648
|
children: [
|
|
3467
|
-
/* @__PURE__ */
|
|
3468
|
-
/* @__PURE__ */
|
|
3649
|
+
/* @__PURE__ */ jsx45(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
3650
|
+
/* @__PURE__ */ jsx45("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
3469
3651
|
]
|
|
3470
3652
|
}
|
|
3471
3653
|
)
|
|
@@ -3473,8 +3655,8 @@ var DataList = (props) => {
|
|
|
3473
3655
|
]
|
|
3474
3656
|
}
|
|
3475
3657
|
),
|
|
3476
|
-
/* @__PURE__ */
|
|
3477
|
-
/* @__PURE__ */
|
|
3658
|
+
/* @__PURE__ */ jsx45("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs18("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
3659
|
+
/* @__PURE__ */ jsx45("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx45("tr", { children: props?.columns?.map((column) => {
|
|
3478
3660
|
let url = builder.getNewOrderByUrl(column.name);
|
|
3479
3661
|
let icon = "chevronUpDown";
|
|
3480
3662
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -3484,18 +3666,18 @@ var DataList = (props) => {
|
|
|
3484
3666
|
icon = "chevronUp";
|
|
3485
3667
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
3486
3668
|
}
|
|
3487
|
-
return /* @__PURE__ */
|
|
3669
|
+
return /* @__PURE__ */ jsx45(
|
|
3488
3670
|
"th",
|
|
3489
3671
|
{
|
|
3490
3672
|
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" : ""),
|
|
3491
|
-
children: /* @__PURE__ */
|
|
3673
|
+
children: /* @__PURE__ */ jsx45(
|
|
3492
3674
|
Hyperlink,
|
|
3493
3675
|
{
|
|
3494
3676
|
href: column.enableSorting ? url : void 0,
|
|
3495
3677
|
className: "!text-neutral-contrast ",
|
|
3496
|
-
children: /* @__PURE__ */
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
column.enableSorting && /* @__PURE__ */
|
|
3678
|
+
children: /* @__PURE__ */ jsxs18("span", { className: "flex items-center space-x-1", children: [
|
|
3679
|
+
/* @__PURE__ */ jsx45("span", { className: "text-black", children: column.label }),
|
|
3680
|
+
column.enableSorting && /* @__PURE__ */ jsx45(Icon_default, { className: "w-4 h-4", name: icon })
|
|
3499
3681
|
] })
|
|
3500
3682
|
}
|
|
3501
3683
|
)
|
|
@@ -3503,22 +3685,22 @@ var DataList = (props) => {
|
|
|
3503
3685
|
column.name
|
|
3504
3686
|
);
|
|
3505
3687
|
}) }) }),
|
|
3506
|
-
/* @__PURE__ */
|
|
3688
|
+
/* @__PURE__ */ jsx45("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
3507
3689
|
let validityClass = "";
|
|
3508
3690
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
3509
3691
|
validityClass = "bg-alert-200";
|
|
3510
3692
|
}
|
|
3511
|
-
return /* @__PURE__ */
|
|
3512
|
-
return /* @__PURE__ */
|
|
3693
|
+
return /* @__PURE__ */ jsx45("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
3694
|
+
return /* @__PURE__ */ jsx45(React30.Fragment, { children: /* @__PURE__ */ jsx45(
|
|
3513
3695
|
"td",
|
|
3514
3696
|
{
|
|
3515
3697
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
3516
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
3698
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx45(
|
|
3517
3699
|
Hyperlink,
|
|
3518
3700
|
{
|
|
3519
3701
|
className: "",
|
|
3520
3702
|
href: `https://${dataitem[column.name]}`,
|
|
3521
|
-
children: /* @__PURE__ */
|
|
3703
|
+
children: /* @__PURE__ */ jsx45(
|
|
3522
3704
|
ViewControl_default,
|
|
3523
3705
|
{
|
|
3524
3706
|
controlType: column.controlType,
|
|
@@ -3531,11 +3713,11 @@ var DataList = (props) => {
|
|
|
3531
3713
|
}
|
|
3532
3714
|
)
|
|
3533
3715
|
}
|
|
3534
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
3716
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx45(
|
|
3535
3717
|
Hyperlink,
|
|
3536
3718
|
{
|
|
3537
3719
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
3538
|
-
children: /* @__PURE__ */
|
|
3720
|
+
children: /* @__PURE__ */ jsx45(
|
|
3539
3721
|
ViewControl_default,
|
|
3540
3722
|
{
|
|
3541
3723
|
controlType: column.controlType,
|
|
@@ -3545,7 +3727,7 @@ var DataList = (props) => {
|
|
|
3545
3727
|
}
|
|
3546
3728
|
)
|
|
3547
3729
|
}
|
|
3548
|
-
) : /* @__PURE__ */
|
|
3730
|
+
) : /* @__PURE__ */ jsx45(
|
|
3549
3731
|
ViewControl_default,
|
|
3550
3732
|
{
|
|
3551
3733
|
controlType: column.controlType,
|
|
@@ -3559,10 +3741,10 @@ var DataList = (props) => {
|
|
|
3559
3741
|
}) }, index);
|
|
3560
3742
|
}) })
|
|
3561
3743
|
] }) }),
|
|
3562
|
-
/* @__PURE__ */
|
|
3563
|
-
/* @__PURE__ */
|
|
3564
|
-
/* @__PURE__ */
|
|
3565
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
3744
|
+
/* @__PURE__ */ jsx45("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
|
|
3745
|
+
/* @__PURE__ */ jsx45("div", { className: "text-gray-700", children: label }),
|
|
3746
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex space-x-2 items-center", children: [
|
|
3747
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx45(
|
|
3566
3748
|
Hyperlink,
|
|
3567
3749
|
{
|
|
3568
3750
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -3570,9 +3752,9 @@ var DataList = (props) => {
|
|
|
3570
3752
|
children: "Prev"
|
|
3571
3753
|
}
|
|
3572
3754
|
),
|
|
3573
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
3755
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx45("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" }),
|
|
3574
3756
|
renderPageNumbers(),
|
|
3575
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
3757
|
+
activePageNumber < pages && /* @__PURE__ */ jsx45(
|
|
3576
3758
|
Hyperlink,
|
|
3577
3759
|
{
|
|
3578
3760
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -3580,19 +3762,19 @@ var DataList = (props) => {
|
|
|
3580
3762
|
children: "Next"
|
|
3581
3763
|
}
|
|
3582
3764
|
),
|
|
3583
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
3765
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx45("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
3584
3766
|
] })
|
|
3585
3767
|
] }) })
|
|
3586
3768
|
] }),
|
|
3587
|
-
/* @__PURE__ */
|
|
3588
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
3769
|
+
/* @__PURE__ */ jsxs18(NoContentView_default, { isDataFound, children: [
|
|
3770
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs18(
|
|
3589
3771
|
"div",
|
|
3590
3772
|
{
|
|
3591
3773
|
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`,
|
|
3592
3774
|
children: [
|
|
3593
|
-
props.title ? /* @__PURE__ */
|
|
3594
|
-
/* @__PURE__ */
|
|
3595
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */
|
|
3775
|
+
props.title ? /* @__PURE__ */ jsx45("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx45("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx45("div", {}),
|
|
3776
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-3", children: [
|
|
3777
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ jsx45(
|
|
3596
3778
|
InputControl_default,
|
|
3597
3779
|
{
|
|
3598
3780
|
name: "Search_input",
|
|
@@ -3604,7 +3786,7 @@ var DataList = (props) => {
|
|
|
3604
3786
|
}
|
|
3605
3787
|
}
|
|
3606
3788
|
),
|
|
3607
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
3789
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx45(
|
|
3608
3790
|
InputControl_default,
|
|
3609
3791
|
{
|
|
3610
3792
|
name: filter.name,
|
|
@@ -3619,15 +3801,15 @@ var DataList = (props) => {
|
|
|
3619
3801
|
},
|
|
3620
3802
|
filter.name
|
|
3621
3803
|
)),
|
|
3622
|
-
props.addLinkHref && /* @__PURE__ */
|
|
3804
|
+
props.addLinkHref && /* @__PURE__ */ jsxs18(
|
|
3623
3805
|
Hyperlink,
|
|
3624
3806
|
{
|
|
3625
3807
|
className: "gap-1",
|
|
3626
3808
|
linkType: "Primary" /* Solid */,
|
|
3627
3809
|
href: props.addLinkHref,
|
|
3628
3810
|
children: [
|
|
3629
|
-
/* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3811
|
+
/* @__PURE__ */ jsx45(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
3812
|
+
/* @__PURE__ */ jsx45("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
3631
3813
|
]
|
|
3632
3814
|
}
|
|
3633
3815
|
)
|
|
@@ -3635,8 +3817,8 @@ var DataList = (props) => {
|
|
|
3635
3817
|
]
|
|
3636
3818
|
}
|
|
3637
3819
|
),
|
|
3638
|
-
/* @__PURE__ */
|
|
3639
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
3821
|
+
/* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx45("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx45("tr", { children: props?.columns?.map((column) => {
|
|
3640
3822
|
let url = builder.getNewOrderByUrl(column.name);
|
|
3641
3823
|
let icon = "chevronUpDown";
|
|
3642
3824
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -3646,18 +3828,18 @@ var DataList = (props) => {
|
|
|
3646
3828
|
icon = "chevronUp";
|
|
3647
3829
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
3648
3830
|
}
|
|
3649
|
-
return /* @__PURE__ */
|
|
3831
|
+
return /* @__PURE__ */ jsx45(
|
|
3650
3832
|
"th",
|
|
3651
3833
|
{
|
|
3652
3834
|
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" : ""),
|
|
3653
|
-
children: /* @__PURE__ */
|
|
3835
|
+
children: /* @__PURE__ */ jsx45(
|
|
3654
3836
|
Hyperlink,
|
|
3655
3837
|
{
|
|
3656
3838
|
href: column.enableSorting ? url : void 0,
|
|
3657
3839
|
className: "text-body-950",
|
|
3658
|
-
children: /* @__PURE__ */
|
|
3659
|
-
/* @__PURE__ */
|
|
3660
|
-
column.enableSorting && /* @__PURE__ */
|
|
3840
|
+
children: /* @__PURE__ */ jsxs18("span", { className: "flex items-center space-x-1", children: [
|
|
3841
|
+
/* @__PURE__ */ jsx45("span", { children: column.label }),
|
|
3842
|
+
column.enableSorting && /* @__PURE__ */ jsx45(Icon_default, { className: "w-4 h-4", name: icon })
|
|
3661
3843
|
] })
|
|
3662
3844
|
}
|
|
3663
3845
|
)
|
|
@@ -3665,7 +3847,7 @@ var DataList = (props) => {
|
|
|
3665
3847
|
column.name
|
|
3666
3848
|
);
|
|
3667
3849
|
}) }) }) }) }),
|
|
3668
|
-
/* @__PURE__ */
|
|
3850
|
+
/* @__PURE__ */ jsx45("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
3669
3851
|
] })
|
|
3670
3852
|
] })
|
|
3671
3853
|
] });
|
|
@@ -3673,9 +3855,9 @@ var DataList = (props) => {
|
|
|
3673
3855
|
var DataList_default = DataList;
|
|
3674
3856
|
|
|
3675
3857
|
// src/components/dataForm/DataListRenderer.tsx
|
|
3676
|
-
import
|
|
3858
|
+
import React31, { useState as useState3, useEffect as useEffect4 } from "react";
|
|
3677
3859
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
3678
|
-
import { jsx as
|
|
3860
|
+
import { jsx as jsx46, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3679
3861
|
var viewControlMap = {
|
|
3680
3862
|
number: ViewControlTypes.number,
|
|
3681
3863
|
lineText: ViewControlTypes.lineText,
|
|
@@ -3770,13 +3952,13 @@ var DataListRenderer = ({
|
|
|
3770
3952
|
isActive: landingPageUrl === pathname
|
|
3771
3953
|
};
|
|
3772
3954
|
});
|
|
3773
|
-
return /* @__PURE__ */
|
|
3955
|
+
return /* @__PURE__ */ jsxs19(React31.Fragment, { children: [
|
|
3774
3956
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
3775
3957
|
// tabs={resolvedTabs}
|
|
3776
3958
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
3777
3959
|
// />
|
|
3778
|
-
/* @__PURE__ */
|
|
3779
|
-
/* @__PURE__ */
|
|
3960
|
+
/* @__PURE__ */ jsx46(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
3961
|
+
/* @__PURE__ */ jsx46(
|
|
3780
3962
|
DataList_default,
|
|
3781
3963
|
{
|
|
3782
3964
|
addLinkHref,
|
|
@@ -3795,10 +3977,10 @@ var DataListRenderer = ({
|
|
|
3795
3977
|
var DataListRenderer_default = DataListRenderer;
|
|
3796
3978
|
|
|
3797
3979
|
// src/components/dataForm/DataForm.tsx
|
|
3798
|
-
import
|
|
3980
|
+
import React33, { useCallback as useCallback4, useEffect as useEffect5, useReducer as useReducer2, useRef as useRef2 } from "react";
|
|
3799
3981
|
|
|
3800
3982
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
3801
|
-
import
|
|
3983
|
+
import React32, { useCallback as useCallback3 } from "react";
|
|
3802
3984
|
|
|
3803
3985
|
// src/components/dataForm/StyleTypes.tsx
|
|
3804
3986
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -3821,7 +4003,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
3821
4003
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
3822
4004
|
|
|
3823
4005
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
3824
|
-
import { jsx as
|
|
4006
|
+
import { jsx as jsx47, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3825
4007
|
var DataFormChildSection = (props) => {
|
|
3826
4008
|
const { section } = props;
|
|
3827
4009
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -3889,14 +4071,14 @@ var DataFormChildSection = (props) => {
|
|
|
3889
4071
|
childItemsToRender,
|
|
3890
4072
|
allChildItems: childItems
|
|
3891
4073
|
});
|
|
3892
|
-
return /* @__PURE__ */
|
|
3893
|
-
section.sectionTitle && /* @__PURE__ */
|
|
3894
|
-
/* @__PURE__ */
|
|
3895
|
-
/* @__PURE__ */
|
|
3896
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */
|
|
3897
|
-
return /* @__PURE__ */
|
|
4074
|
+
return /* @__PURE__ */ jsx47(React32.Fragment, { children: /* @__PURE__ */ jsxs20("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
4075
|
+
section.sectionTitle && /* @__PURE__ */ jsx47("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
4076
|
+
/* @__PURE__ */ jsx47("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs20("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
4077
|
+
/* @__PURE__ */ jsx47("div", { children: /* @__PURE__ */ jsxs20("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
4078
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ jsx47("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
4079
|
+
return /* @__PURE__ */ jsxs20("tr", { className: "", children: [
|
|
3898
4080
|
sectionRow.elements.map((field, index) => {
|
|
3899
|
-
return /* @__PURE__ */
|
|
4081
|
+
return /* @__PURE__ */ jsx47(
|
|
3900
4082
|
"th",
|
|
3901
4083
|
{
|
|
3902
4084
|
className: "py-3 font-normal text-left",
|
|
@@ -3905,21 +4087,21 @@ var DataFormChildSection = (props) => {
|
|
|
3905
4087
|
field.name
|
|
3906
4088
|
);
|
|
3907
4089
|
}),
|
|
3908
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
4090
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx47("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
3909
4091
|
] }, sectionRowIndex);
|
|
3910
4092
|
}) }),
|
|
3911
|
-
/* @__PURE__ */
|
|
4093
|
+
/* @__PURE__ */ jsx47("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
3912
4094
|
const { item, originalIndex } = visibleItem;
|
|
3913
4095
|
const rowKey = originalIndex;
|
|
3914
|
-
return /* @__PURE__ */
|
|
4096
|
+
return /* @__PURE__ */ jsx47(React32.Fragment, { children: section.sectionRows.map(
|
|
3915
4097
|
(sectionRow, sectionRowIndex) => {
|
|
3916
|
-
return /* @__PURE__ */
|
|
4098
|
+
return /* @__PURE__ */ jsxs20(
|
|
3917
4099
|
"tr",
|
|
3918
4100
|
{
|
|
3919
4101
|
className: "",
|
|
3920
4102
|
children: [
|
|
3921
4103
|
sectionRow.elements.map((field, index) => {
|
|
3922
|
-
return /* @__PURE__ */
|
|
4104
|
+
return /* @__PURE__ */ jsx47("td", { children: /* @__PURE__ */ jsx47("div", { className: "flex-1", children: /* @__PURE__ */ jsx47("div", { className: "w-11/12", children: /* @__PURE__ */ jsx47(
|
|
3923
4105
|
InputControl_default,
|
|
3924
4106
|
{
|
|
3925
4107
|
index: filteredIndex,
|
|
@@ -3939,7 +4121,7 @@ var DataFormChildSection = (props) => {
|
|
|
3939
4121
|
}
|
|
3940
4122
|
) }) }) }, field.name);
|
|
3941
4123
|
}),
|
|
3942
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
4124
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx47("td", { children: /* @__PURE__ */ jsx47(
|
|
3943
4125
|
ClientButton_default,
|
|
3944
4126
|
{
|
|
3945
4127
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -3948,7 +4130,7 @@ var DataFormChildSection = (props) => {
|
|
|
3948
4130
|
},
|
|
3949
4131
|
dataRole: "delete",
|
|
3950
4132
|
tabIndex: -1,
|
|
3951
|
-
children: /* @__PURE__ */
|
|
4133
|
+
children: /* @__PURE__ */ jsx47(
|
|
3952
4134
|
Icon_default,
|
|
3953
4135
|
{
|
|
3954
4136
|
className: "w-4 h-4",
|
|
@@ -3965,7 +4147,7 @@ var DataFormChildSection = (props) => {
|
|
|
3965
4147
|
) }, rowKey);
|
|
3966
4148
|
}) })
|
|
3967
4149
|
] }) }),
|
|
3968
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
4150
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx47("div", { className: "ml-1", children: /* @__PURE__ */ jsx47(
|
|
3969
4151
|
ClientButton_default,
|
|
3970
4152
|
{
|
|
3971
4153
|
ButtonType: "Link" /* Link */,
|
|
@@ -3980,7 +4162,7 @@ var DataFormChildSection = (props) => {
|
|
|
3980
4162
|
var DataFormChildSection_default = DataFormChildSection;
|
|
3981
4163
|
|
|
3982
4164
|
// src/components/dataForm/DataForm.tsx
|
|
3983
|
-
import { jsx as
|
|
4165
|
+
import { jsx as jsx48, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3984
4166
|
var DataForm = (props) => {
|
|
3985
4167
|
const formRef = useRef2(null);
|
|
3986
4168
|
console.log(props.dataItem, "dssads");
|
|
@@ -4200,19 +4382,19 @@ var DataForm = (props) => {
|
|
|
4200
4382
|
return false;
|
|
4201
4383
|
}
|
|
4202
4384
|
}
|
|
4203
|
-
return /* @__PURE__ */
|
|
4204
|
-
props.title && /* @__PURE__ */
|
|
4385
|
+
return /* @__PURE__ */ jsx48(React33.Fragment, { children: /* @__PURE__ */ jsxs21("div", { className: "flex-grow flex flex-col", children: [
|
|
4386
|
+
props.title && /* @__PURE__ */ jsx48("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__ */ jsxs21(
|
|
4205
4387
|
"div",
|
|
4206
4388
|
{
|
|
4207
4389
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
4208
4390
|
onClick: () => window.history.back(),
|
|
4209
4391
|
children: [
|
|
4210
|
-
/* @__PURE__ */
|
|
4211
|
-
/* @__PURE__ */
|
|
4392
|
+
/* @__PURE__ */ jsx48(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
4393
|
+
/* @__PURE__ */ jsx48("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
4212
4394
|
]
|
|
4213
4395
|
}
|
|
4214
4396
|
) }),
|
|
4215
|
-
/* @__PURE__ */
|
|
4397
|
+
/* @__PURE__ */ jsx48(
|
|
4216
4398
|
"form",
|
|
4217
4399
|
{
|
|
4218
4400
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -4233,8 +4415,8 @@ var DataForm = (props) => {
|
|
|
4233
4415
|
}
|
|
4234
4416
|
}
|
|
4235
4417
|
},
|
|
4236
|
-
children: /* @__PURE__ */
|
|
4237
|
-
return /* @__PURE__ */
|
|
4418
|
+
children: /* @__PURE__ */ jsx48("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
4419
|
+
return /* @__PURE__ */ jsx48(React33.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs21("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
4238
4420
|
section.sectionRows?.map(
|
|
4239
4421
|
(sectionRow, sectionRowIndex) => {
|
|
4240
4422
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -4245,14 +4427,14 @@ var DataForm = (props) => {
|
|
|
4245
4427
|
sectionRow.visible
|
|
4246
4428
|
);
|
|
4247
4429
|
}
|
|
4248
|
-
return /* @__PURE__ */
|
|
4249
|
-
return /* @__PURE__ */
|
|
4430
|
+
return /* @__PURE__ */ jsx48(React33.Fragment, { children: isVisible && /* @__PURE__ */ jsx48("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
4431
|
+
return /* @__PURE__ */ jsxs21(
|
|
4250
4432
|
"div",
|
|
4251
4433
|
{
|
|
4252
4434
|
className: sectionRow.grow ? "grow" : "",
|
|
4253
4435
|
children: [
|
|
4254
|
-
/* @__PURE__ */
|
|
4255
|
-
/* @__PURE__ */
|
|
4436
|
+
/* @__PURE__ */ jsx48("div", { children: field.controlType }),
|
|
4437
|
+
/* @__PURE__ */ jsx48(
|
|
4256
4438
|
InputControl_default,
|
|
4257
4439
|
{
|
|
4258
4440
|
name: field.name,
|
|
@@ -4282,12 +4464,12 @@ var DataForm = (props) => {
|
|
|
4282
4464
|
}) }) }, sectionRowIndex);
|
|
4283
4465
|
}
|
|
4284
4466
|
),
|
|
4285
|
-
/* @__PURE__ */
|
|
4467
|
+
/* @__PURE__ */ jsx48("div", { children: section.childSections?.map(
|
|
4286
4468
|
(childSection, childSectionIndex) => {
|
|
4287
|
-
return /* @__PURE__ */
|
|
4469
|
+
return /* @__PURE__ */ jsx48("div", { children: childSection.name && evalutateCondition(
|
|
4288
4470
|
formState.inputValues,
|
|
4289
4471
|
childSection.visible
|
|
4290
|
-
) && /* @__PURE__ */
|
|
4472
|
+
) && /* @__PURE__ */ jsx48(
|
|
4291
4473
|
DataFormChildSection_default,
|
|
4292
4474
|
{
|
|
4293
4475
|
section: childSection,
|
|
@@ -4302,8 +4484,8 @@ var DataForm = (props) => {
|
|
|
4302
4484
|
}) })
|
|
4303
4485
|
}
|
|
4304
4486
|
),
|
|
4305
|
-
/* @__PURE__ */
|
|
4306
|
-
/* @__PURE__ */
|
|
4487
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
4488
|
+
/* @__PURE__ */ jsx48("div", { children: props.additionalActions && /* @__PURE__ */ jsx48(
|
|
4307
4489
|
Button_default,
|
|
4308
4490
|
{
|
|
4309
4491
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -4311,7 +4493,7 @@ var DataForm = (props) => {
|
|
|
4311
4493
|
children: props.additionalActions.title
|
|
4312
4494
|
}
|
|
4313
4495
|
) }),
|
|
4314
|
-
/* @__PURE__ */
|
|
4496
|
+
/* @__PURE__ */ jsx48("div", { children: props.onDelete && /* @__PURE__ */ jsx48(
|
|
4315
4497
|
Button_default,
|
|
4316
4498
|
{
|
|
4317
4499
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -4322,7 +4504,7 @@ var DataForm = (props) => {
|
|
|
4322
4504
|
children: "Delete"
|
|
4323
4505
|
}
|
|
4324
4506
|
) }),
|
|
4325
|
-
/* @__PURE__ */
|
|
4507
|
+
/* @__PURE__ */ jsx48("div", { children: props.onClick && /* @__PURE__ */ jsx48(
|
|
4326
4508
|
Button_default,
|
|
4327
4509
|
{
|
|
4328
4510
|
onValidate,
|
|
@@ -4339,7 +4521,7 @@ var DataForm = (props) => {
|
|
|
4339
4521
|
var DataForm_default = DataForm;
|
|
4340
4522
|
|
|
4341
4523
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
4342
|
-
import { jsx as
|
|
4524
|
+
import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4343
4525
|
function getAction(actions, code) {
|
|
4344
4526
|
return actions?.find((a) => a.actionCode === code);
|
|
4345
4527
|
}
|
|
@@ -4365,9 +4547,9 @@ var DataFormRenderer = ({
|
|
|
4365
4547
|
"Delete"
|
|
4366
4548
|
);
|
|
4367
4549
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
4368
|
-
return /* @__PURE__ */
|
|
4369
|
-
widgetProps && /* @__PURE__ */
|
|
4370
|
-
/* @__PURE__ */
|
|
4550
|
+
return /* @__PURE__ */ jsxs22("div", { className: "flex-grow flex flex-col", children: [
|
|
4551
|
+
widgetProps && /* @__PURE__ */ jsx49(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
4552
|
+
/* @__PURE__ */ jsx49(
|
|
4371
4553
|
DataForm_default,
|
|
4372
4554
|
{
|
|
4373
4555
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|