@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260526111119 → 0.8.1-dev.20260526122912
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +743 -670
- package/dist/index.mjs +562 -489
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-DOKQUUH3.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/controls/view/ViewControl.tsx
|
|
13
|
-
import
|
|
13
|
+
import React11 from "react";
|
|
14
14
|
|
|
15
15
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
16
16
|
var ViewControlTypes = {
|
|
@@ -207,18 +207,18 @@ var MediaAsset = (props) => {
|
|
|
207
207
|
return null;
|
|
208
208
|
}
|
|
209
209
|
console.log(props.customProps?.tag, "Tag in MediaAsset");
|
|
210
|
-
return /* @__PURE__ */ jsx4(React3.Fragment, { children:
|
|
210
|
+
return /* @__PURE__ */ jsx4(React3.Fragment, { children: /* @__PURE__ */ jsx4(
|
|
211
211
|
DeviceAssetSelector_default,
|
|
212
212
|
{
|
|
213
213
|
assets,
|
|
214
214
|
apiBaseUrl: props.apiBaseUrl,
|
|
215
|
-
assetBaseUrl: props.assetBaseUrl,
|
|
215
|
+
assetBaseUrl: props.assetBaseUrl ? props.assetBaseUrl : props.apiBaseUrl,
|
|
216
216
|
session: props,
|
|
217
217
|
width: props.width,
|
|
218
218
|
customProps: props.customProps,
|
|
219
219
|
tag: props.customProps?.tag
|
|
220
220
|
}
|
|
221
|
-
)
|
|
221
|
+
) });
|
|
222
222
|
};
|
|
223
223
|
var Asset_default = MediaAsset;
|
|
224
224
|
|
|
@@ -334,14 +334,87 @@ var DateTimeView = dynamic2(() => import("./DateTimeViewClient-22GW4AD7.mjs"), {
|
|
|
334
334
|
});
|
|
335
335
|
var DateTimeVew_default = DateTimeView;
|
|
336
336
|
|
|
337
|
-
// src/components/controls/view/
|
|
337
|
+
// src/components/controls/view/TimeUntilStarts.tsx
|
|
338
|
+
import { useState, useEffect } from "react";
|
|
338
339
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
340
|
+
var TimeUntilStarts = (props) => {
|
|
341
|
+
const calculateTimeDifference = (startDate) => {
|
|
342
|
+
const now = /* @__PURE__ */ new Date();
|
|
343
|
+
const nowUtc = new Date(now.getTime() + now.getTimezoneOffset() * 6e4);
|
|
344
|
+
const startDateUtc = new Date(startDate);
|
|
345
|
+
const diffMs = startDateUtc.getTime() - nowUtc.getTime();
|
|
346
|
+
const isPast = diffMs < 0;
|
|
347
|
+
const absoluteDiffMs = Math.abs(diffMs);
|
|
348
|
+
const diffDays = Math.floor(absoluteDiffMs / (1e3 * 60 * 60 * 24));
|
|
349
|
+
const diffHours = Math.floor(
|
|
350
|
+
absoluteDiffMs % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)
|
|
351
|
+
);
|
|
352
|
+
const diffMinutes = Math.floor(
|
|
353
|
+
absoluteDiffMs % (1e3 * 60 * 60) / (1e3 * 60)
|
|
354
|
+
);
|
|
355
|
+
if (absoluteDiffMs < 6e4) {
|
|
356
|
+
return "Just now";
|
|
357
|
+
}
|
|
358
|
+
let timeParts = [
|
|
359
|
+
{ value: diffDays, unit: "days" },
|
|
360
|
+
{ value: diffHours, unit: "hours" },
|
|
361
|
+
{ value: diffMinutes, unit: "minutes" }
|
|
362
|
+
];
|
|
363
|
+
timeParts = timeParts.filter((part) => part.value > 0);
|
|
364
|
+
if (isPast) {
|
|
365
|
+
if (diffDays > 0) {
|
|
366
|
+
return `${diffDays} day(s) ago`;
|
|
367
|
+
} else if (diffHours > 0) {
|
|
368
|
+
return `${diffHours} hour(s) ago`;
|
|
369
|
+
} else if (diffMinutes > 0) {
|
|
370
|
+
return `${diffMinutes} minute(s) ago`;
|
|
371
|
+
} else {
|
|
372
|
+
return "Just now";
|
|
373
|
+
}
|
|
374
|
+
} else {
|
|
375
|
+
if (timeParts.length > 2) {
|
|
376
|
+
timeParts = timeParts.slice(0, 2);
|
|
377
|
+
}
|
|
378
|
+
const displayString = timeParts.map((part) => `${part.value} ${part.unit}`).join(" ");
|
|
379
|
+
return displayString ? `Starting in ${displayString}` : "Started";
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
const isValidDate = (date) => {
|
|
383
|
+
return !isNaN(Date.parse(date));
|
|
384
|
+
};
|
|
385
|
+
const [timeUntilStart, setTimeUntilStart] = useState(() => {
|
|
386
|
+
if (props.value && isValidDate(props.value)) {
|
|
387
|
+
return calculateTimeDifference(props.value);
|
|
388
|
+
}
|
|
389
|
+
return "";
|
|
390
|
+
});
|
|
391
|
+
useEffect(() => {
|
|
392
|
+
if (props.value && isValidDate(props.value)) {
|
|
393
|
+
setTimeUntilStart(calculateTimeDifference(props.value));
|
|
394
|
+
const initialTimeout = setTimeout(() => {
|
|
395
|
+
const interval = setInterval(() => {
|
|
396
|
+
setTimeUntilStart(calculateTimeDifference(props.value));
|
|
397
|
+
}, 6e4);
|
|
398
|
+
return () => clearInterval(interval);
|
|
399
|
+
}, 5e3);
|
|
400
|
+
return () => clearTimeout(initialTimeout);
|
|
401
|
+
} else {
|
|
402
|
+
setTimeUntilStart("");
|
|
403
|
+
}
|
|
404
|
+
}, [props.value]);
|
|
405
|
+
return /* @__PURE__ */ jsx11("div", { children: timeUntilStart });
|
|
406
|
+
};
|
|
407
|
+
var TimeUntilStarts_default = TimeUntilStarts;
|
|
408
|
+
|
|
409
|
+
// src/components/controls/view/ViewControl.tsx
|
|
410
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
339
411
|
var ViewControl = (props) => {
|
|
340
412
|
const ControlComponents = {
|
|
341
413
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
342
414
|
[ViewControlTypes_default.asset]: Asset_default,
|
|
343
415
|
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
344
416
|
[ViewControlTypes_default.boolean]: BooleanView_default,
|
|
417
|
+
[ViewControlTypes_default.timeUntilStarts]: TimeUntilStarts_default,
|
|
345
418
|
[ViewControlTypes_default.money]: MoneyView_default,
|
|
346
419
|
[ViewControlTypes_default.date]: DateView_default,
|
|
347
420
|
[ViewControlTypes_default.time]: DateView_default,
|
|
@@ -357,16 +430,16 @@ var ViewControl = (props) => {
|
|
|
357
430
|
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default
|
|
358
431
|
};
|
|
359
432
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
360
|
-
return /* @__PURE__ */
|
|
433
|
+
return /* @__PURE__ */ jsx12(React11.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx12(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
361
434
|
};
|
|
362
435
|
var ViewControl_default = ViewControl;
|
|
363
436
|
|
|
364
437
|
// src/components/controls/edit/InputControl.tsx
|
|
365
|
-
import
|
|
438
|
+
import React29 from "react";
|
|
366
439
|
|
|
367
440
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
368
|
-
import
|
|
369
|
-
import { jsx as
|
|
441
|
+
import React12 from "react";
|
|
442
|
+
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
370
443
|
var MultilineTextInput = (props) => {
|
|
371
444
|
const textChangeHandler = (event) => {
|
|
372
445
|
const text = event.target.value;
|
|
@@ -385,11 +458,11 @@ var MultilineTextInput = (props) => {
|
|
|
385
458
|
if (props.value !== void 0 && props.value !== null) {
|
|
386
459
|
value = props.value;
|
|
387
460
|
}
|
|
388
|
-
return /* @__PURE__ */
|
|
389
|
-
/* @__PURE__ */
|
|
461
|
+
return /* @__PURE__ */ jsx13(React12.Fragment, { children: /* @__PURE__ */ jsxs5("label", { className: "block mb-1", children: [
|
|
462
|
+
/* @__PURE__ */ jsx13("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
390
463
|
" ",
|
|
391
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
464
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "bg-error-weak", children: "*" }),
|
|
465
|
+
/* @__PURE__ */ jsx13(
|
|
393
466
|
"textarea",
|
|
394
467
|
{
|
|
395
468
|
name: props.name,
|
|
@@ -406,14 +479,14 @@ var MultilineTextInput = (props) => {
|
|
|
406
479
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm input"
|
|
407
480
|
}
|
|
408
481
|
),
|
|
409
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ jsx13("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
410
483
|
] }) });
|
|
411
484
|
};
|
|
412
485
|
var MultilineTextInput_default = MultilineTextInput;
|
|
413
486
|
|
|
414
487
|
// src/components/controls/edit/LineTextInput.tsx
|
|
415
|
-
import
|
|
416
|
-
import { jsx as
|
|
488
|
+
import React13 from "react";
|
|
489
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
417
490
|
var LineTextInput = (props) => {
|
|
418
491
|
const textChangeHandler = (event) => {
|
|
419
492
|
const text = event.target.value;
|
|
@@ -432,11 +505,11 @@ var LineTextInput = (props) => {
|
|
|
432
505
|
if (props.value !== void 0 && props.value !== null) {
|
|
433
506
|
value = props.value;
|
|
434
507
|
}
|
|
435
|
-
return /* @__PURE__ */
|
|
436
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ jsx14(React13.Fragment, { children: /* @__PURE__ */ jsxs6("label", { className: "block", children: [
|
|
509
|
+
props?.attributes?.label && /* @__PURE__ */ jsx14("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
437
510
|
" ",
|
|
438
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
439
|
-
/* @__PURE__ */
|
|
511
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "bg-error-weak", children: "*" }),
|
|
512
|
+
/* @__PURE__ */ jsx14(
|
|
440
513
|
"input",
|
|
441
514
|
{
|
|
442
515
|
type: "text",
|
|
@@ -456,14 +529,14 @@ var LineTextInput = (props) => {
|
|
|
456
529
|
`
|
|
457
530
|
}
|
|
458
531
|
),
|
|
459
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
460
533
|
] }) });
|
|
461
534
|
};
|
|
462
535
|
var LineTextInput_default = LineTextInput;
|
|
463
536
|
|
|
464
537
|
// src/components/controls/edit/MoneyInput.tsx
|
|
465
|
-
import
|
|
466
|
-
import { jsx as
|
|
538
|
+
import React14 from "react";
|
|
539
|
+
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
467
540
|
var MoneyInput = (props) => {
|
|
468
541
|
const textChangeHandler = (event) => {
|
|
469
542
|
const rawValue = event.target.value;
|
|
@@ -492,11 +565,11 @@ var MoneyInput = (props) => {
|
|
|
492
565
|
e.preventDefault();
|
|
493
566
|
}
|
|
494
567
|
};
|
|
495
|
-
return /* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
568
|
+
return /* @__PURE__ */ jsx15(React14.Fragment, { children: /* @__PURE__ */ jsxs7("label", { className: "block mb-1", children: [
|
|
569
|
+
/* @__PURE__ */ jsx15("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
497
570
|
" ",
|
|
498
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
571
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "bg-error-weak", children: "*" }),
|
|
572
|
+
/* @__PURE__ */ jsx15(
|
|
500
573
|
"input",
|
|
501
574
|
{
|
|
502
575
|
type: "number",
|
|
@@ -516,7 +589,7 @@ var MoneyInput = (props) => {
|
|
|
516
589
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
517
590
|
}
|
|
518
591
|
),
|
|
519
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
520
593
|
] }) });
|
|
521
594
|
};
|
|
522
595
|
var MoneyInput_default = MoneyInput;
|
|
@@ -547,10 +620,10 @@ var InputControlType = {
|
|
|
547
620
|
var InputControlType_default = InputControlType;
|
|
548
621
|
|
|
549
622
|
// src/components/controls/edit/Select.tsx
|
|
550
|
-
import { useState, useEffect } from "react";
|
|
551
|
-
import { jsx as
|
|
623
|
+
import { useState as useState2, useEffect as useEffect2 } from "react";
|
|
624
|
+
import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
552
625
|
var Select = (props) => {
|
|
553
|
-
const [list, setList] =
|
|
626
|
+
const [list, setList] = useState2([]);
|
|
554
627
|
const getSafeValue = (val) => {
|
|
555
628
|
if (val === null || val === void 0) return "";
|
|
556
629
|
if (typeof val === "boolean") return val ? "1" : "0";
|
|
@@ -579,7 +652,7 @@ var Select = (props) => {
|
|
|
579
652
|
groupKey: props.groupKey
|
|
580
653
|
});
|
|
581
654
|
};
|
|
582
|
-
|
|
655
|
+
useEffect2(() => {
|
|
583
656
|
async function fetchData() {
|
|
584
657
|
if (props.dataset) {
|
|
585
658
|
setList(props.dataset);
|
|
@@ -607,9 +680,9 @@ var Select = (props) => {
|
|
|
607
680
|
]);
|
|
608
681
|
const value = getSafeValue(props.value);
|
|
609
682
|
return /* @__PURE__ */ jsxs8("label", { className: "block", children: [
|
|
610
|
-
props.attributes?.label && /* @__PURE__ */
|
|
683
|
+
props.attributes?.label && /* @__PURE__ */ jsx16("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
611
684
|
" ",
|
|
612
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */
|
|
685
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ jsx16("span", { className: "bg-error-weak", children: "*" }),
|
|
613
686
|
/* @__PURE__ */ jsxs8(
|
|
614
687
|
"select",
|
|
615
688
|
{
|
|
@@ -621,23 +694,23 @@ var Select = (props) => {
|
|
|
621
694
|
disabled: props.attributes?.readOnly,
|
|
622
695
|
className: "peer select py-1.5 block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none",
|
|
623
696
|
children: [
|
|
624
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ jsx16("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
625
698
|
list.map((item, index) => {
|
|
626
699
|
const keyField = props.dataKeyFieldName;
|
|
627
700
|
const textField = props.dataTextFieldName;
|
|
628
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ jsx16("option", { value: item[keyField], children: item[textField] }, index);
|
|
629
702
|
})
|
|
630
703
|
]
|
|
631
704
|
}
|
|
632
705
|
),
|
|
633
|
-
/* @__PURE__ */
|
|
706
|
+
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
634
707
|
] });
|
|
635
708
|
};
|
|
636
709
|
var Select_default = Select;
|
|
637
710
|
|
|
638
711
|
// src/components/controls/edit/PercentageInput.tsx
|
|
639
|
-
import
|
|
640
|
-
import { jsx as
|
|
712
|
+
import React16 from "react";
|
|
713
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
641
714
|
var PercentageInput = (props) => {
|
|
642
715
|
const textChangeHandler = (event) => {
|
|
643
716
|
const rawValue = event.target.value;
|
|
@@ -666,11 +739,11 @@ var PercentageInput = (props) => {
|
|
|
666
739
|
e.preventDefault();
|
|
667
740
|
}
|
|
668
741
|
};
|
|
669
|
-
return /* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */
|
|
742
|
+
return /* @__PURE__ */ jsx17(React16.Fragment, { children: /* @__PURE__ */ jsxs9("label", { className: "block mb-1", children: [
|
|
743
|
+
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
671
744
|
" ",
|
|
672
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
745
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "bg-error-weak", children: "*" }),
|
|
746
|
+
/* @__PURE__ */ jsx17(
|
|
674
747
|
"input",
|
|
675
748
|
{
|
|
676
749
|
type: "number",
|
|
@@ -689,14 +762,14 @@ var PercentageInput = (props) => {
|
|
|
689
762
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
690
763
|
}
|
|
691
764
|
),
|
|
692
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
693
766
|
] }) });
|
|
694
767
|
};
|
|
695
768
|
var PercentageInput_default = PercentageInput;
|
|
696
769
|
|
|
697
770
|
// src/components/controls/edit/PhoneInput.tsx
|
|
698
|
-
import
|
|
699
|
-
import { jsx as
|
|
771
|
+
import React17 from "react";
|
|
772
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
700
773
|
var PhoneInput = (props) => {
|
|
701
774
|
const textChangeHandler = (event) => {
|
|
702
775
|
const text = event.target.value;
|
|
@@ -715,13 +788,13 @@ var PhoneInput = (props) => {
|
|
|
715
788
|
if (props.value !== void 0 && props.value !== null) {
|
|
716
789
|
value = props.value;
|
|
717
790
|
}
|
|
718
|
-
return /* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */
|
|
791
|
+
return /* @__PURE__ */ jsx18(React17.Fragment, { children: /* @__PURE__ */ jsxs10("label", { className: "block mb-1", children: [
|
|
792
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
720
793
|
" ",
|
|
721
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
794
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx18("span", { className: "bg-error-weak", children: "*" }),
|
|
722
795
|
/* @__PURE__ */ jsxs10("div", { className: "flex items-center rounded border ", children: [
|
|
723
|
-
/* @__PURE__ */
|
|
724
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ jsx18("span", { className: "px-3", children: props.prefix }),
|
|
797
|
+
/* @__PURE__ */ jsx18(
|
|
725
798
|
"input",
|
|
726
799
|
{
|
|
727
800
|
type: "text",
|
|
@@ -739,14 +812,14 @@ var PhoneInput = (props) => {
|
|
|
739
812
|
}
|
|
740
813
|
)
|
|
741
814
|
] }),
|
|
742
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
743
816
|
] }) });
|
|
744
817
|
};
|
|
745
818
|
var PhoneInput_default = PhoneInput;
|
|
746
819
|
|
|
747
820
|
// src/components/controls/edit/NumberInput.tsx
|
|
748
|
-
import
|
|
749
|
-
import { jsx as
|
|
821
|
+
import React18 from "react";
|
|
822
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
750
823
|
var NumberInput = (props) => {
|
|
751
824
|
const textChangeHandler = (event) => {
|
|
752
825
|
const text = event.target.value;
|
|
@@ -769,11 +842,11 @@ var NumberInput = (props) => {
|
|
|
769
842
|
if (props.value !== void 0 && props.value !== null) {
|
|
770
843
|
value = props.value;
|
|
771
844
|
}
|
|
772
|
-
return /* @__PURE__ */
|
|
773
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
845
|
+
return /* @__PURE__ */ jsx19(React18.Fragment, { children: /* @__PURE__ */ jsxs11("label", { className: "block", children: [
|
|
846
|
+
props?.attributes?.label && /* @__PURE__ */ jsx19("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
774
847
|
" ",
|
|
775
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
776
|
-
/* @__PURE__ */
|
|
848
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx19("span", { className: "bg-error-weak", children: "*" }),
|
|
849
|
+
/* @__PURE__ */ jsx19(
|
|
777
850
|
"input",
|
|
778
851
|
{
|
|
779
852
|
type: "number",
|
|
@@ -792,14 +865,14 @@ var NumberInput = (props) => {
|
|
|
792
865
|
className: "peer py-1.5 block w-full rounded shadow-sm number-input input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
793
866
|
}
|
|
794
867
|
),
|
|
795
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
796
869
|
] }) });
|
|
797
870
|
};
|
|
798
871
|
var NumberInput_default = NumberInput;
|
|
799
872
|
|
|
800
873
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
801
|
-
import
|
|
802
|
-
import { jsx as
|
|
874
|
+
import React19 from "react";
|
|
875
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
803
876
|
var CheckboxInput = (props) => {
|
|
804
877
|
const textChangeHandler = (event) => {
|
|
805
878
|
let text = event.target.checked;
|
|
@@ -816,11 +889,11 @@ var CheckboxInput = (props) => {
|
|
|
816
889
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
817
890
|
value = true;
|
|
818
891
|
}
|
|
819
|
-
return /* @__PURE__ */
|
|
820
|
-
/* @__PURE__ */
|
|
892
|
+
return /* @__PURE__ */ jsx20(React19.Fragment, { children: /* @__PURE__ */ jsxs12("label", { className: "inline-block mb-1", children: [
|
|
893
|
+
/* @__PURE__ */ jsx20("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
821
894
|
" ",
|
|
822
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
895
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "bg-error-weak", children: "*" }),
|
|
896
|
+
/* @__PURE__ */ jsx20(
|
|
824
897
|
"input",
|
|
825
898
|
{
|
|
826
899
|
type: "checkbox",
|
|
@@ -837,14 +910,14 @@ var CheckboxInput = (props) => {
|
|
|
837
910
|
className: "peer mt-1 py-1.5 block rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
838
911
|
}
|
|
839
912
|
),
|
|
840
|
-
/* @__PURE__ */
|
|
913
|
+
/* @__PURE__ */ jsx20("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
841
914
|
] }) });
|
|
842
915
|
};
|
|
843
916
|
var CheckboxInput_default = CheckboxInput;
|
|
844
917
|
|
|
845
918
|
// src/components/controls/edit/OtpInput.tsx
|
|
846
|
-
import
|
|
847
|
-
import { jsx as
|
|
919
|
+
import React20 from "react";
|
|
920
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
848
921
|
var OtpInput = (props) => {
|
|
849
922
|
const textChangeHandler = (event) => {
|
|
850
923
|
const text = event.target.value;
|
|
@@ -866,11 +939,11 @@ var OtpInput = (props) => {
|
|
|
866
939
|
if (props.value !== void 0 && props.value !== null) {
|
|
867
940
|
value = props.value;
|
|
868
941
|
}
|
|
869
|
-
return /* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
942
|
+
return /* @__PURE__ */ jsx21(React20.Fragment, { children: /* @__PURE__ */ jsxs13("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
943
|
+
/* @__PURE__ */ jsx21("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
871
944
|
" ",
|
|
872
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
873
|
-
/* @__PURE__ */
|
|
945
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx21("span", { className: "bg-error-weak", children: "*" }),
|
|
946
|
+
/* @__PURE__ */ jsx21(
|
|
874
947
|
"input",
|
|
875
948
|
{
|
|
876
949
|
type: "text",
|
|
@@ -890,14 +963,14 @@ var OtpInput = (props) => {
|
|
|
890
963
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm tracking-[1.25em] text-center"
|
|
891
964
|
}
|
|
892
965
|
),
|
|
893
|
-
/* @__PURE__ */
|
|
966
|
+
/* @__PURE__ */ jsx21("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
894
967
|
] }) });
|
|
895
968
|
};
|
|
896
969
|
var OtpInput_default = OtpInput;
|
|
897
970
|
|
|
898
971
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
899
|
-
import
|
|
900
|
-
import { jsx as
|
|
972
|
+
import React21 from "react";
|
|
973
|
+
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
901
974
|
var DateTimeInput = (props) => {
|
|
902
975
|
const textChangeHandler = (event) => {
|
|
903
976
|
const localDate = new Date(event.target.value);
|
|
@@ -929,12 +1002,12 @@ var DateTimeInput = (props) => {
|
|
|
929
1002
|
e.preventDefault();
|
|
930
1003
|
}
|
|
931
1004
|
};
|
|
932
|
-
return /* @__PURE__ */
|
|
933
|
-
/* @__PURE__ */
|
|
1005
|
+
return /* @__PURE__ */ jsx22(React21.Fragment, { children: /* @__PURE__ */ jsxs14("label", { className: "block mb-1", children: [
|
|
1006
|
+
/* @__PURE__ */ jsx22("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
934
1007
|
" ",
|
|
935
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1008
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx22("span", { className: "bg-error-weak", children: "*" }),
|
|
936
1009
|
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
|
|
937
|
-
/* @__PURE__ */
|
|
1010
|
+
/* @__PURE__ */ jsx22(
|
|
938
1011
|
"input",
|
|
939
1012
|
{
|
|
940
1013
|
type: "datetime-local",
|
|
@@ -952,19 +1025,19 @@ var DateTimeInput = (props) => {
|
|
|
952
1025
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
953
1026
|
}
|
|
954
1027
|
),
|
|
955
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ jsx22("span", { children: timeZoneAbbr })
|
|
956
1029
|
] }),
|
|
957
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ jsx22("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
958
1031
|
] }) });
|
|
959
1032
|
};
|
|
960
1033
|
var DateTimeInput_default = DateTimeInput;
|
|
961
1034
|
|
|
962
1035
|
// src/components/controls/edit/ColorInput.tsx
|
|
963
|
-
import
|
|
964
|
-
import { jsx as
|
|
1036
|
+
import React22, { useEffect as useEffect3 } from "react";
|
|
1037
|
+
import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
965
1038
|
var ColorInput = (props) => {
|
|
966
|
-
const [color, setColor] =
|
|
967
|
-
|
|
1039
|
+
const [color, setColor] = React22.useState("#3b82f6");
|
|
1040
|
+
useEffect3(() => {
|
|
968
1041
|
if (props.value !== void 0 && props.value !== null) {
|
|
969
1042
|
if (typeof props.value === "string") {
|
|
970
1043
|
setColor(props.value);
|
|
@@ -984,10 +1057,10 @@ var ColorInput = (props) => {
|
|
|
984
1057
|
}
|
|
985
1058
|
};
|
|
986
1059
|
return /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
987
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ jsx23("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
988
1061
|
" ",
|
|
989
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
990
|
-
/* @__PURE__ */
|
|
1062
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx23("span", { className: "bg-error-weak", children: "*" }),
|
|
1063
|
+
/* @__PURE__ */ jsx23(
|
|
991
1064
|
"input",
|
|
992
1065
|
{
|
|
993
1066
|
type: "color",
|
|
@@ -1000,21 +1073,21 @@ var ColorInput = (props) => {
|
|
|
1000
1073
|
className: `w-[78px] h-12 block cursor-pointer`
|
|
1001
1074
|
}
|
|
1002
1075
|
),
|
|
1003
|
-
props?.attributes?.errorMessage && /* @__PURE__ */
|
|
1076
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ jsx23("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
1004
1077
|
] });
|
|
1005
1078
|
};
|
|
1006
1079
|
var ColorInput_default = ColorInput;
|
|
1007
1080
|
|
|
1008
1081
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
1009
|
-
import { useEffect as
|
|
1010
|
-
import { jsx as
|
|
1082
|
+
import { useEffect as useEffect4, useRef, useState as useState3 } from "react";
|
|
1083
|
+
import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1011
1084
|
var SelectWithSearchInput = (props) => {
|
|
1012
|
-
const [isOpen, setIsOpen] =
|
|
1013
|
-
const [searchTerm, setSearchTerm] =
|
|
1014
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
1015
|
-
const [selectedItem, setSelectedItem] =
|
|
1016
|
-
const [list, setList] =
|
|
1017
|
-
|
|
1085
|
+
const [isOpen, setIsOpen] = useState3(false);
|
|
1086
|
+
const [searchTerm, setSearchTerm] = useState3("");
|
|
1087
|
+
const [highlightedIndex, setHighlightedIndex] = useState3(-1);
|
|
1088
|
+
const [selectedItem, setSelectedItem] = useState3(null);
|
|
1089
|
+
const [list, setList] = useState3([]);
|
|
1090
|
+
useEffect4(() => {
|
|
1018
1091
|
async function fetchData() {
|
|
1019
1092
|
if (props.dataset) {
|
|
1020
1093
|
setList(props.dataset);
|
|
@@ -1069,7 +1142,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
1069
1142
|
}
|
|
1070
1143
|
};
|
|
1071
1144
|
const dropdownRef = useRef(null);
|
|
1072
|
-
|
|
1145
|
+
useEffect4(() => {
|
|
1073
1146
|
if (highlightedIndex >= 0 && dropdownRef.current) {
|
|
1074
1147
|
const highlightedItem = dropdownRef.current.children[highlightedIndex];
|
|
1075
1148
|
highlightedItem?.scrollIntoView({
|
|
@@ -1083,10 +1156,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
1083
1156
|
props.attributes?.label,
|
|
1084
1157
|
" ",
|
|
1085
1158
|
" ",
|
|
1086
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1159
|
+
props?.attributes?.required && /* @__PURE__ */ jsx24("span", { className: "bg-error-weak", children: "*" })
|
|
1087
1160
|
] }),
|
|
1088
1161
|
/* @__PURE__ */ jsxs16("div", { className: "relative", children: [
|
|
1089
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ jsx24(
|
|
1090
1163
|
"input",
|
|
1091
1164
|
{
|
|
1092
1165
|
type: "text",
|
|
@@ -1102,13 +1175,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
1102
1175
|
className: "peer py-1.5 select block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1103
1176
|
}
|
|
1104
1177
|
),
|
|
1105
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ jsx24(
|
|
1106
1179
|
"button",
|
|
1107
1180
|
{
|
|
1108
1181
|
type: "button",
|
|
1109
1182
|
onClick: () => setIsOpen(!isOpen),
|
|
1110
1183
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1111
|
-
children: /* @__PURE__ */
|
|
1184
|
+
children: /* @__PURE__ */ jsx24(
|
|
1112
1185
|
"svg",
|
|
1113
1186
|
{
|
|
1114
1187
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1117,7 +1190,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
1117
1190
|
strokeWidth: 1.5,
|
|
1118
1191
|
stroke: "currentColor",
|
|
1119
1192
|
className: "w-full h-full",
|
|
1120
|
-
children: /* @__PURE__ */
|
|
1193
|
+
children: /* @__PURE__ */ jsx24(
|
|
1121
1194
|
"path",
|
|
1122
1195
|
{
|
|
1123
1196
|
strokeLinecap: "round",
|
|
@@ -1130,12 +1203,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
1130
1203
|
}
|
|
1131
1204
|
)
|
|
1132
1205
|
] }),
|
|
1133
|
-
isOpen && /* @__PURE__ */
|
|
1206
|
+
isOpen && /* @__PURE__ */ jsx24(
|
|
1134
1207
|
"div",
|
|
1135
1208
|
{
|
|
1136
1209
|
ref: dropdownRef,
|
|
1137
1210
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
1138
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1211
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx24(
|
|
1139
1212
|
"button",
|
|
1140
1213
|
{
|
|
1141
1214
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1143,10 +1216,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
1143
1216
|
role: "option",
|
|
1144
1217
|
tabIndex: -1,
|
|
1145
1218
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1146
|
-
children: /* @__PURE__ */
|
|
1219
|
+
children: /* @__PURE__ */ jsx24("span", { children: item[props.dataTextFieldName] })
|
|
1147
1220
|
},
|
|
1148
1221
|
item[props.dataKeyFieldName]
|
|
1149
|
-
)) : /* @__PURE__ */
|
|
1222
|
+
)) : /* @__PURE__ */ jsx24("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1150
1223
|
}
|
|
1151
1224
|
)
|
|
1152
1225
|
] });
|
|
@@ -1154,27 +1227,27 @@ var SelectWithSearchInput = (props) => {
|
|
|
1154
1227
|
var SelectWithSearchInput_default = SelectWithSearchInput;
|
|
1155
1228
|
|
|
1156
1229
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
1157
|
-
import
|
|
1158
|
-
useEffect as
|
|
1230
|
+
import React24, {
|
|
1231
|
+
useEffect as useEffect5,
|
|
1159
1232
|
useRef as useRef2,
|
|
1160
|
-
useState as
|
|
1233
|
+
useState as useState4,
|
|
1161
1234
|
useCallback
|
|
1162
1235
|
} from "react";
|
|
1163
|
-
import { jsx as
|
|
1236
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1164
1237
|
var SelectWithSearchPanel = (props) => {
|
|
1165
|
-
const [isOpen, setIsOpen] =
|
|
1166
|
-
const [searchTerm, setSearchTerm] =
|
|
1167
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
1168
|
-
const [list, setList] =
|
|
1238
|
+
const [isOpen, setIsOpen] = useState4(false);
|
|
1239
|
+
const [searchTerm, setSearchTerm] = useState4("");
|
|
1240
|
+
const [highlightedIndex, setHighlightedIndex] = useState4(0);
|
|
1241
|
+
const [list, setList] = useState4([]);
|
|
1169
1242
|
const listRef = useRef2(null);
|
|
1170
|
-
const [isError, setIsError] =
|
|
1243
|
+
const [isError, setIsError] = useState4(false);
|
|
1171
1244
|
const containerRef = useRef2(null);
|
|
1172
|
-
const [isCreateOpen, setIsCreateOpen] =
|
|
1173
|
-
const [formData, setFormData] =
|
|
1245
|
+
const [isCreateOpen, setIsCreateOpen] = useState4(false);
|
|
1246
|
+
const [formData, setFormData] = useState4({});
|
|
1174
1247
|
const getNestedValue3 = (obj, path) => {
|
|
1175
1248
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
1176
1249
|
};
|
|
1177
|
-
|
|
1250
|
+
useEffect5(() => {
|
|
1178
1251
|
const handleClickOutside = (event) => {
|
|
1179
1252
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
1180
1253
|
setIsOpen(false);
|
|
@@ -1185,7 +1258,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1185
1258
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1186
1259
|
};
|
|
1187
1260
|
}, []);
|
|
1188
|
-
|
|
1261
|
+
useEffect5(() => {
|
|
1189
1262
|
async function fetchData() {
|
|
1190
1263
|
if (props.dataset) {
|
|
1191
1264
|
setList(props.dataset);
|
|
@@ -1227,7 +1300,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1227
1300
|
audioCtx.close();
|
|
1228
1301
|
}, 250);
|
|
1229
1302
|
};
|
|
1230
|
-
|
|
1303
|
+
useEffect5(() => {
|
|
1231
1304
|
const filteredItems2 = list?.filter(
|
|
1232
1305
|
(item) => item[props?.dataTextFieldName]?.toLowerCase().includes(searchTerm?.toLowerCase())
|
|
1233
1306
|
);
|
|
@@ -1301,9 +1374,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1301
1374
|
props.attributes?.label,
|
|
1302
1375
|
" ",
|
|
1303
1376
|
" ",
|
|
1304
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1377
|
+
props?.attributes?.required && /* @__PURE__ */ jsx25("span", { className: "bg-error-weak", children: "*" })
|
|
1305
1378
|
] }),
|
|
1306
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsx25(
|
|
1307
1380
|
"input",
|
|
1308
1381
|
{
|
|
1309
1382
|
type: "text",
|
|
@@ -1317,14 +1390,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1317
1390
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
1318
1391
|
}
|
|
1319
1392
|
) }),
|
|
1320
|
-
/* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ jsx25("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ jsxs17(React24.Fragment, { children: [
|
|
1321
1394
|
/* @__PURE__ */ jsxs17("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
1322
|
-
/* @__PURE__ */
|
|
1395
|
+
/* @__PURE__ */ jsx25("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ jsxs17("h5", { className: "text-md text-white font-medium", children: [
|
|
1323
1396
|
"Select a",
|
|
1324
1397
|
" ",
|
|
1325
1398
|
props.attributes?.label || props.attributes?.heading
|
|
1326
1399
|
] }) }),
|
|
1327
|
-
/* @__PURE__ */
|
|
1400
|
+
/* @__PURE__ */ jsx25("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200 h-10", children: props.createFields && props.createFields.length > 0 && /* @__PURE__ */ jsx25(
|
|
1328
1401
|
"button",
|
|
1329
1402
|
{
|
|
1330
1403
|
type: "button",
|
|
@@ -1338,11 +1411,11 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1338
1411
|
) })
|
|
1339
1412
|
] }),
|
|
1340
1413
|
isCreateOpen && /* @__PURE__ */ jsxs17("div", { className: "fixed right-0 w-1/4 h-full top-[62px] bg-white shadow-lg border-l border-gray-200 z-50", children: [
|
|
1341
|
-
/* @__PURE__ */
|
|
1414
|
+
/* @__PURE__ */ jsx25("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ jsxs17("h5", { className: "text-md font-medium text-white", children: [
|
|
1342
1415
|
"Create New ",
|
|
1343
1416
|
props.attributes?.label
|
|
1344
1417
|
] }) }),
|
|
1345
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ jsx25("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ jsx25(
|
|
1346
1419
|
"button",
|
|
1347
1420
|
{
|
|
1348
1421
|
type: "button",
|
|
@@ -1353,8 +1426,8 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1353
1426
|
) }),
|
|
1354
1427
|
/* @__PURE__ */ jsxs17("div", { className: "p-4", children: [
|
|
1355
1428
|
props.createFields?.map((field) => /* @__PURE__ */ jsxs17("div", { className: "mb-4", children: [
|
|
1356
|
-
/* @__PURE__ */
|
|
1357
|
-
/* @__PURE__ */
|
|
1429
|
+
/* @__PURE__ */ jsx25("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
1430
|
+
/* @__PURE__ */ jsx25(
|
|
1358
1431
|
"input",
|
|
1359
1432
|
{
|
|
1360
1433
|
type: field.type,
|
|
@@ -1379,13 +1452,13 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1379
1452
|
] })
|
|
1380
1453
|
] })
|
|
1381
1454
|
] }),
|
|
1382
|
-
/* @__PURE__ */
|
|
1455
|
+
/* @__PURE__ */ jsx25(
|
|
1383
1456
|
"div",
|
|
1384
1457
|
{
|
|
1385
1458
|
ref: listRef,
|
|
1386
1459
|
className: "fixed z-10 right-0 mt-[130px] top-0 w-1/4 bg-white border-l border-gray-200 shadow-lg overflow-y-auto",
|
|
1387
1460
|
style: { height: "calc(100vh - 130px)" },
|
|
1388
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1461
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsx25(
|
|
1389
1462
|
"button",
|
|
1390
1463
|
{
|
|
1391
1464
|
onClick: (e) => {
|
|
@@ -1395,9 +1468,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1395
1468
|
role: "option",
|
|
1396
1469
|
tabIndex: -1,
|
|
1397
1470
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1398
|
-
children: /* @__PURE__ */
|
|
1471
|
+
children: /* @__PURE__ */ jsx25("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
1399
1472
|
}
|
|
1400
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */
|
|
1473
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx25("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1401
1474
|
}
|
|
1402
1475
|
)
|
|
1403
1476
|
] }) })
|
|
@@ -1406,13 +1479,13 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1406
1479
|
var SelectWithSearchPanel_default = SelectWithSearchPanel;
|
|
1407
1480
|
|
|
1408
1481
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
1409
|
-
import
|
|
1410
|
-
useState as
|
|
1411
|
-
useEffect as
|
|
1482
|
+
import React25, {
|
|
1483
|
+
useState as useState5,
|
|
1484
|
+
useEffect as useEffect6
|
|
1412
1485
|
} from "react";
|
|
1413
|
-
import { jsx as
|
|
1486
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1414
1487
|
var BooleanSelect = (props) => {
|
|
1415
|
-
const [list, setList] =
|
|
1488
|
+
const [list, setList] = useState5();
|
|
1416
1489
|
const textChangeHandler = (event) => {
|
|
1417
1490
|
const text = event.target.value;
|
|
1418
1491
|
const boolValue = text?.toLowerCase() === "true" || text === "1";
|
|
@@ -1425,7 +1498,7 @@ var BooleanSelect = (props) => {
|
|
|
1425
1498
|
});
|
|
1426
1499
|
}
|
|
1427
1500
|
};
|
|
1428
|
-
|
|
1501
|
+
useEffect6(() => {
|
|
1429
1502
|
async function fetchData() {
|
|
1430
1503
|
console.log("in select");
|
|
1431
1504
|
if (props.dataset) {
|
|
@@ -1459,10 +1532,10 @@ var BooleanSelect = (props) => {
|
|
|
1459
1532
|
if (props.value !== void 0 && props.value !== null) {
|
|
1460
1533
|
value = props.value;
|
|
1461
1534
|
}
|
|
1462
|
-
return /* @__PURE__ */
|
|
1463
|
-
/* @__PURE__ */
|
|
1535
|
+
return /* @__PURE__ */ jsx26(React25.Fragment, { children: /* @__PURE__ */ jsxs18("label", { className: "block", children: [
|
|
1536
|
+
/* @__PURE__ */ jsx26("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1464
1537
|
" ",
|
|
1465
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1538
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx26("span", { className: "bg-error-weak", children: "*" }),
|
|
1466
1539
|
/* @__PURE__ */ jsxs18(
|
|
1467
1540
|
"select",
|
|
1468
1541
|
{
|
|
@@ -1475,9 +1548,9 @@ var BooleanSelect = (props) => {
|
|
|
1475
1548
|
disabled: props?.attributes?.readOnly,
|
|
1476
1549
|
className: "peer mt-1 py-1.5 block w-full text-black rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n ",
|
|
1477
1550
|
children: [
|
|
1478
|
-
/* @__PURE__ */
|
|
1551
|
+
/* @__PURE__ */ jsx26("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1479
1552
|
list && list.map((item, i) => {
|
|
1480
|
-
return /* @__PURE__ */
|
|
1553
|
+
return /* @__PURE__ */ jsx26(
|
|
1481
1554
|
"option",
|
|
1482
1555
|
{
|
|
1483
1556
|
className: "fac-select-option",
|
|
@@ -1490,14 +1563,14 @@ var BooleanSelect = (props) => {
|
|
|
1490
1563
|
]
|
|
1491
1564
|
}
|
|
1492
1565
|
),
|
|
1493
|
-
/* @__PURE__ */
|
|
1566
|
+
/* @__PURE__ */ jsx26("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1494
1567
|
] }) });
|
|
1495
1568
|
};
|
|
1496
1569
|
var BooleanSelect_default = BooleanSelect;
|
|
1497
1570
|
|
|
1498
1571
|
// src/components/controls/edit/EmailInput.tsx
|
|
1499
|
-
import
|
|
1500
|
-
import { jsx as
|
|
1572
|
+
import React26 from "react";
|
|
1573
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1501
1574
|
var EmailInput = (props) => {
|
|
1502
1575
|
const textChangeHandler = (event) => {
|
|
1503
1576
|
const text = event.target.value;
|
|
@@ -1522,11 +1595,11 @@ var EmailInput = (props) => {
|
|
|
1522
1595
|
if (props.value !== void 0 && props.value !== null) {
|
|
1523
1596
|
value = props.value;
|
|
1524
1597
|
}
|
|
1525
|
-
return /* @__PURE__ */
|
|
1526
|
-
/* @__PURE__ */
|
|
1598
|
+
return /* @__PURE__ */ jsx27(React26.Fragment, { children: /* @__PURE__ */ jsxs19("label", { className: "block mb-1", children: [
|
|
1599
|
+
/* @__PURE__ */ jsx27("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
1527
1600
|
" ",
|
|
1528
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1529
|
-
/* @__PURE__ */
|
|
1601
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx27("span", { className: "bg-error-weak", children: "*" }),
|
|
1602
|
+
/* @__PURE__ */ jsx27(
|
|
1530
1603
|
"input",
|
|
1531
1604
|
{
|
|
1532
1605
|
type: "email",
|
|
@@ -1542,14 +1615,14 @@ var EmailInput = (props) => {
|
|
|
1542
1615
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
1543
1616
|
}
|
|
1544
1617
|
),
|
|
1545
|
-
/* @__PURE__ */
|
|
1618
|
+
/* @__PURE__ */ jsx27("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1546
1619
|
] }) });
|
|
1547
1620
|
};
|
|
1548
1621
|
var EmailInput_default = EmailInput;
|
|
1549
1622
|
|
|
1550
1623
|
// src/components/controls/edit/TimeInput.tsx
|
|
1551
|
-
import
|
|
1552
|
-
import { jsx as
|
|
1624
|
+
import React27 from "react";
|
|
1625
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1553
1626
|
var TimeInput = (props) => {
|
|
1554
1627
|
const timeChangeHandler = (event) => {
|
|
1555
1628
|
const timeValue = event.target.value;
|
|
@@ -1562,11 +1635,11 @@ var TimeInput = (props) => {
|
|
|
1562
1635
|
});
|
|
1563
1636
|
}
|
|
1564
1637
|
};
|
|
1565
|
-
return /* @__PURE__ */
|
|
1566
|
-
/* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ jsx28(React27.Fragment, { children: /* @__PURE__ */ jsxs20("label", { className: "block mb-1", children: [
|
|
1639
|
+
/* @__PURE__ */ jsx28("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1567
1640
|
" ",
|
|
1568
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1569
|
-
/* @__PURE__ */
|
|
1641
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx28("span", { className: "bg-error-weak", children: "*" }),
|
|
1642
|
+
/* @__PURE__ */ jsx28("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx28(
|
|
1570
1643
|
"input",
|
|
1571
1644
|
{
|
|
1572
1645
|
type: "time",
|
|
@@ -1579,17 +1652,17 @@ var TimeInput = (props) => {
|
|
|
1579
1652
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
|
|
1580
1653
|
}
|
|
1581
1654
|
) }),
|
|
1582
|
-
/* @__PURE__ */
|
|
1655
|
+
/* @__PURE__ */ jsx28("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1583
1656
|
] }) });
|
|
1584
1657
|
};
|
|
1585
1658
|
var TimeInput_default = TimeInput;
|
|
1586
1659
|
|
|
1587
1660
|
// src/components/controls/edit/AssetUpload.tsx
|
|
1588
|
-
import
|
|
1661
|
+
import React28, { useEffect as useEffect7 } from "react";
|
|
1589
1662
|
|
|
1590
1663
|
// src/components/dataForm/Hyperlink.tsx
|
|
1591
1664
|
import Link from "next/link";
|
|
1592
|
-
import { Fragment, jsx as
|
|
1665
|
+
import { Fragment, jsx as jsx29 } from "react/jsx-runtime";
|
|
1593
1666
|
function Hyperlink(props) {
|
|
1594
1667
|
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
|
|
1595
1668
|
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
@@ -1597,7 +1670,7 @@ function Hyperlink(props) {
|
|
|
1597
1670
|
if (target == "_blank") {
|
|
1598
1671
|
additionalProps.rel = "noopener noreferrer";
|
|
1599
1672
|
}
|
|
1600
|
-
return /* @__PURE__ */
|
|
1673
|
+
return /* @__PURE__ */ jsx29(Fragment, { children: props.href ? /* @__PURE__ */ jsx29(
|
|
1601
1674
|
Link,
|
|
1602
1675
|
{
|
|
1603
1676
|
href: props.href,
|
|
@@ -1607,34 +1680,34 @@ function Hyperlink(props) {
|
|
|
1607
1680
|
target,
|
|
1608
1681
|
children: props.children
|
|
1609
1682
|
}
|
|
1610
|
-
) : props.isHeading ? /* @__PURE__ */
|
|
1683
|
+
) : props.isHeading ? /* @__PURE__ */ jsx29("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx29("span", { className: props.className, children: props.children }) });
|
|
1611
1684
|
}
|
|
1612
1685
|
|
|
1613
1686
|
// src/svg/chevron-updown.tsx
|
|
1614
|
-
import { jsx as
|
|
1687
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1615
1688
|
var ChevronUpDown = (props) => {
|
|
1616
|
-
return /* @__PURE__ */
|
|
1689
|
+
return /* @__PURE__ */ jsx30("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx30("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
1617
1690
|
};
|
|
1618
1691
|
var chevron_updown_default = ChevronUpDown;
|
|
1619
1692
|
|
|
1620
1693
|
// src/svg/chevron-down.tsx
|
|
1621
|
-
import { jsx as
|
|
1694
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1622
1695
|
var ChevronDown = (props) => {
|
|
1623
|
-
return /* @__PURE__ */
|
|
1696
|
+
return /* @__PURE__ */ jsx31("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx31("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
1624
1697
|
};
|
|
1625
1698
|
var chevron_down_default = ChevronDown;
|
|
1626
1699
|
|
|
1627
1700
|
// src/svg/chevron-up.tsx
|
|
1628
|
-
import { jsx as
|
|
1701
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1629
1702
|
var ChevronUp = (props) => {
|
|
1630
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ jsx32("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx32("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
1631
1704
|
};
|
|
1632
1705
|
var chevron_up_default = ChevronUp;
|
|
1633
1706
|
|
|
1634
1707
|
// src/svg/plus.tsx
|
|
1635
|
-
import { jsx as
|
|
1708
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1636
1709
|
var Plus = (props) => {
|
|
1637
|
-
return /* @__PURE__ */
|
|
1710
|
+
return /* @__PURE__ */ jsx33("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx33("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
1638
1711
|
};
|
|
1639
1712
|
var plus_default = Plus;
|
|
1640
1713
|
|
|
@@ -1648,19 +1721,19 @@ var Icons = {
|
|
|
1648
1721
|
var Icons_default = Icons;
|
|
1649
1722
|
|
|
1650
1723
|
// src/svg/Icon.tsx
|
|
1651
|
-
import { jsx as
|
|
1724
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1652
1725
|
var Icon = ({ name, className, ...props }) => {
|
|
1653
1726
|
const IconComponent = Icons_default[name];
|
|
1654
1727
|
if (!IconComponent) {
|
|
1655
1728
|
console.error(`Icon "${name}" not found.`);
|
|
1656
1729
|
return null;
|
|
1657
1730
|
}
|
|
1658
|
-
return /* @__PURE__ */
|
|
1731
|
+
return /* @__PURE__ */ jsx34(IconComponent, { ...props, className });
|
|
1659
1732
|
};
|
|
1660
1733
|
var Icon_default = Icon;
|
|
1661
1734
|
|
|
1662
1735
|
// src/components/controls/edit/AssetUpload.tsx
|
|
1663
|
-
import { jsx as
|
|
1736
|
+
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1664
1737
|
var AssetUpload = (props) => {
|
|
1665
1738
|
const isDisabled = props.attributes?.disable ?? false;
|
|
1666
1739
|
let allValues = [];
|
|
@@ -1681,8 +1754,8 @@ var AssetUpload = (props) => {
|
|
|
1681
1754
|
}
|
|
1682
1755
|
return "image";
|
|
1683
1756
|
};
|
|
1684
|
-
const [assetType, setAssetType] =
|
|
1685
|
-
|
|
1757
|
+
const [assetType, setAssetType] = React28.useState(getInitialTab);
|
|
1758
|
+
useEffect7(() => {
|
|
1686
1759
|
setAssetType(getInitialTab());
|
|
1687
1760
|
}, [props.value]);
|
|
1688
1761
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -1757,10 +1830,10 @@ var AssetUpload = (props) => {
|
|
|
1757
1830
|
}
|
|
1758
1831
|
return false;
|
|
1759
1832
|
};
|
|
1760
|
-
return /* @__PURE__ */ jsxs21(
|
|
1761
|
-
/* @__PURE__ */
|
|
1833
|
+
return /* @__PURE__ */ jsxs21(React28.Fragment, { children: [
|
|
1834
|
+
/* @__PURE__ */ jsx35("label", { className: "block mb-1", children: /* @__PURE__ */ jsx35("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
1762
1835
|
/* @__PURE__ */ jsxs21("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
1763
|
-
/* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ jsx35(
|
|
1764
1837
|
ClientButton_default,
|
|
1765
1838
|
{
|
|
1766
1839
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -1770,7 +1843,7 @@ var AssetUpload = (props) => {
|
|
|
1770
1843
|
children: "Image Upload"
|
|
1771
1844
|
}
|
|
1772
1845
|
),
|
|
1773
|
-
/* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ jsx35(
|
|
1774
1847
|
ClientButton_default,
|
|
1775
1848
|
{
|
|
1776
1849
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -1782,12 +1855,12 @@ var AssetUpload = (props) => {
|
|
|
1782
1855
|
)
|
|
1783
1856
|
] }),
|
|
1784
1857
|
shouldShowDetails() && /* @__PURE__ */ jsxs21("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
1785
|
-
/* @__PURE__ */
|
|
1786
|
-
/* @__PURE__ */
|
|
1858
|
+
/* @__PURE__ */ jsx35("span", { className: "absolute -top-2.5 left-3 bg-primary-600 text-white text-xs px-2 py-0.5 rounded-full", children: getAssetType(allValues[0]) === "video" ? "Video" : "Image" }),
|
|
1859
|
+
/* @__PURE__ */ jsx35("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ jsxs21("div", { className: "flex justify-between items-start gap-5", children: [
|
|
1787
1860
|
/* @__PURE__ */ jsxs21("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
1788
1861
|
/* @__PURE__ */ jsxs21("div", { children: [
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
/* @__PURE__ */
|
|
1862
|
+
/* @__PURE__ */ jsx35("p", { className: "text-gray-500", children: "Title" }),
|
|
1863
|
+
/* @__PURE__ */ jsx35(
|
|
1791
1864
|
"input",
|
|
1792
1865
|
{
|
|
1793
1866
|
type: "text",
|
|
@@ -1800,7 +1873,7 @@ var AssetUpload = (props) => {
|
|
|
1800
1873
|
)
|
|
1801
1874
|
] }),
|
|
1802
1875
|
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ jsxs21("div", { children: [
|
|
1803
|
-
/* @__PURE__ */
|
|
1876
|
+
/* @__PURE__ */ jsx35("p", { className: "text-gray-500", children: "Resolution" }),
|
|
1804
1877
|
/* @__PURE__ */ jsxs21("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
1805
1878
|
digitalAsset.intrinsicWidth,
|
|
1806
1879
|
"\xD7",
|
|
@@ -1808,9 +1881,9 @@ var AssetUpload = (props) => {
|
|
|
1808
1881
|
] })
|
|
1809
1882
|
] }),
|
|
1810
1883
|
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ jsxs21("div", { children: [
|
|
1811
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ jsx35("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
1812
1885
|
/* @__PURE__ */ jsxs21("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
1813
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */
|
|
1886
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ jsx35(
|
|
1814
1887
|
"img",
|
|
1815
1888
|
{
|
|
1816
1889
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -1818,7 +1891,7 @@ var AssetUpload = (props) => {
|
|
|
1818
1891
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
1819
1892
|
}
|
|
1820
1893
|
),
|
|
1821
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */
|
|
1894
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ jsx35(
|
|
1822
1895
|
"img",
|
|
1823
1896
|
{
|
|
1824
1897
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -1829,8 +1902,8 @@ var AssetUpload = (props) => {
|
|
|
1829
1902
|
] })
|
|
1830
1903
|
] }),
|
|
1831
1904
|
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ jsxs21("div", { className: "col-span-2", children: [
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
/* @__PURE__ */
|
|
1905
|
+
/* @__PURE__ */ jsx35("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
1906
|
+
/* @__PURE__ */ jsx35(
|
|
1834
1907
|
Hyperlink,
|
|
1835
1908
|
{
|
|
1836
1909
|
href: digitalAsset.assetUrl,
|
|
@@ -1841,12 +1914,12 @@ var AssetUpload = (props) => {
|
|
|
1841
1914
|
)
|
|
1842
1915
|
] })
|
|
1843
1916
|
] }),
|
|
1844
|
-
/* @__PURE__ */
|
|
1917
|
+
/* @__PURE__ */ jsx35(
|
|
1845
1918
|
"span",
|
|
1846
1919
|
{
|
|
1847
1920
|
onClick: () => !isDisabled && deleteFile(index),
|
|
1848
1921
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
1849
|
-
children: /* @__PURE__ */
|
|
1922
|
+
children: /* @__PURE__ */ jsx35(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
1850
1923
|
}
|
|
1851
1924
|
)
|
|
1852
1925
|
] }, index)) })
|
|
@@ -1856,8 +1929,8 @@ var AssetUpload = (props) => {
|
|
|
1856
1929
|
var AssetUpload_default = AssetUpload;
|
|
1857
1930
|
|
|
1858
1931
|
// src/components/controls/edit/InputControl.tsx
|
|
1859
|
-
import { jsx as
|
|
1860
|
-
var InputControl =
|
|
1932
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1933
|
+
var InputControl = React29.forwardRef(
|
|
1861
1934
|
(props, ref) => {
|
|
1862
1935
|
const ControlComponents = {
|
|
1863
1936
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -1879,20 +1952,20 @@ var InputControl = React28.forwardRef(
|
|
|
1879
1952
|
[InputControlType_default.asset]: AssetUpload_default
|
|
1880
1953
|
};
|
|
1881
1954
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
1882
|
-
return /* @__PURE__ */
|
|
1955
|
+
return /* @__PURE__ */ jsx36(React29.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx36(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
1883
1956
|
}
|
|
1884
1957
|
);
|
|
1885
1958
|
InputControl.displayName = "InputControl";
|
|
1886
1959
|
var InputControl_default = InputControl;
|
|
1887
1960
|
|
|
1888
1961
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
1889
|
-
import
|
|
1962
|
+
import React42 from "react";
|
|
1890
1963
|
|
|
1891
1964
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
1892
|
-
import
|
|
1965
|
+
import React31 from "react";
|
|
1893
1966
|
|
|
1894
1967
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
1895
|
-
import { jsx as
|
|
1968
|
+
import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1896
1969
|
var TextNode = (props) => {
|
|
1897
1970
|
function cssStringToJson(cssString) {
|
|
1898
1971
|
const styleObject = {};
|
|
@@ -1949,33 +2022,33 @@ var TextNode = (props) => {
|
|
|
1949
2022
|
function renderWithLineBreaks(text) {
|
|
1950
2023
|
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs22("span", { children: [
|
|
1951
2024
|
line,
|
|
1952
|
-
index < arr.length - 1 && /* @__PURE__ */
|
|
2025
|
+
index < arr.length - 1 && /* @__PURE__ */ jsx37("br", {})
|
|
1953
2026
|
] }, index));
|
|
1954
2027
|
}
|
|
1955
2028
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
1956
2029
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
1957
2030
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
1958
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */
|
|
2031
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ jsx37("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ jsx37("sub", { children: content }) : content;
|
|
1959
2032
|
return (
|
|
1960
2033
|
// @ts-expect-error custom code
|
|
1961
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ jsx37("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
1962
2035
|
);
|
|
1963
2036
|
};
|
|
1964
2037
|
var TextNode_default = TextNode;
|
|
1965
2038
|
|
|
1966
2039
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
1967
|
-
import { jsx as
|
|
2040
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1968
2041
|
var LineBreakNode = () => {
|
|
1969
|
-
return /* @__PURE__ */
|
|
2042
|
+
return /* @__PURE__ */ jsx38("div", { className: "py-0.5 lg:py-1.5" });
|
|
1970
2043
|
};
|
|
1971
2044
|
var LineBreakNode_default = LineBreakNode;
|
|
1972
2045
|
|
|
1973
2046
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
1974
|
-
import
|
|
2047
|
+
import React30 from "react";
|
|
1975
2048
|
|
|
1976
2049
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
1977
2050
|
import dynamic3 from "next/dynamic";
|
|
1978
|
-
import { jsx as
|
|
2051
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1979
2052
|
var HlsPlayer = dynamic3(() => import("./HlsPlayer-G27NMG7A.mjs"), { ssr: false });
|
|
1980
2053
|
var getNestedValue = (obj, path) => {
|
|
1981
2054
|
if (!obj || !path) return void 0;
|
|
@@ -2008,7 +2081,7 @@ var ImageNode = (props) => {
|
|
|
2008
2081
|
assets = [image];
|
|
2009
2082
|
}
|
|
2010
2083
|
if (assets && assets.length > 0) {
|
|
2011
|
-
return /* @__PURE__ */
|
|
2084
|
+
return /* @__PURE__ */ jsx39(
|
|
2012
2085
|
DeviceAssetSelector_default,
|
|
2013
2086
|
{
|
|
2014
2087
|
device: props.device,
|
|
@@ -2049,7 +2122,7 @@ var ImageNode = (props) => {
|
|
|
2049
2122
|
right: "justify-end"
|
|
2050
2123
|
};
|
|
2051
2124
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
2052
|
-
const renderMedia = () => isHls ? /* @__PURE__ */
|
|
2125
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ jsx39(
|
|
2053
2126
|
HlsPlayer,
|
|
2054
2127
|
{
|
|
2055
2128
|
assetUrl: imageUrl,
|
|
@@ -2062,7 +2135,7 @@ var ImageNode = (props) => {
|
|
|
2062
2135
|
apiBaseUrl: props.apiBaseUrl,
|
|
2063
2136
|
session: props.session
|
|
2064
2137
|
}
|
|
2065
|
-
) : /* @__PURE__ */
|
|
2138
|
+
) : /* @__PURE__ */ jsx39(
|
|
2066
2139
|
"img",
|
|
2067
2140
|
{
|
|
2068
2141
|
style: styles,
|
|
@@ -2075,7 +2148,7 @@ var ImageNode = (props) => {
|
|
|
2075
2148
|
}
|
|
2076
2149
|
);
|
|
2077
2150
|
if (props.node.width) {
|
|
2078
|
-
return /* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ jsx39("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
2079
2152
|
}
|
|
2080
2153
|
return renderMedia();
|
|
2081
2154
|
};
|
|
@@ -2083,7 +2156,7 @@ var ImageNode_default = ImageNode;
|
|
|
2083
2156
|
|
|
2084
2157
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2085
2158
|
import dynamic4 from "next/dynamic";
|
|
2086
|
-
import { Fragment as Fragment2, jsx as
|
|
2159
|
+
import { Fragment as Fragment2, jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2087
2160
|
var LinkNodeButton = dynamic4(() => import("./LinkNodeButton-WDDPNYWI.mjs"), {
|
|
2088
2161
|
ssr: false
|
|
2089
2162
|
});
|
|
@@ -2130,13 +2203,13 @@ var LinkNode = (props) => {
|
|
|
2130
2203
|
const isButton = node.isButton === true;
|
|
2131
2204
|
const renderChildren = () => {
|
|
2132
2205
|
if (!node.children || node.children.length === 0) return null;
|
|
2133
|
-
return /* @__PURE__ */
|
|
2206
|
+
return /* @__PURE__ */ jsx40(Fragment2, { children: node.children.map((childNode, index) => {
|
|
2134
2207
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2135
2208
|
if (!SelectedNode) {
|
|
2136
2209
|
console.warn("Unknown node type:", childNode.type);
|
|
2137
2210
|
return null;
|
|
2138
2211
|
}
|
|
2139
|
-
return /* @__PURE__ */
|
|
2212
|
+
return /* @__PURE__ */ jsx40(React30.Fragment, { children: /* @__PURE__ */ jsx40(
|
|
2140
2213
|
SelectedNode,
|
|
2141
2214
|
{
|
|
2142
2215
|
node: childNode,
|
|
@@ -2149,10 +2222,10 @@ var LinkNode = (props) => {
|
|
|
2149
2222
|
};
|
|
2150
2223
|
const renderFallback = () => {
|
|
2151
2224
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
2152
|
-
return /* @__PURE__ */
|
|
2225
|
+
return /* @__PURE__ */ jsx40("span", { children: linkText });
|
|
2153
2226
|
}
|
|
2154
2227
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
2155
|
-
return /* @__PURE__ */
|
|
2228
|
+
return /* @__PURE__ */ jsx40("br", {});
|
|
2156
2229
|
}
|
|
2157
2230
|
return null;
|
|
2158
2231
|
};
|
|
@@ -2191,10 +2264,10 @@ var LinkNode = (props) => {
|
|
|
2191
2264
|
var LinkNode_default = LinkNode;
|
|
2192
2265
|
|
|
2193
2266
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
2194
|
-
import { jsx as
|
|
2267
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2195
2268
|
var SVGIconNode = ({ node }) => {
|
|
2196
2269
|
if (!node?.svgCode) return null;
|
|
2197
|
-
return /* @__PURE__ */
|
|
2270
|
+
return /* @__PURE__ */ jsx41(
|
|
2198
2271
|
"span",
|
|
2199
2272
|
{
|
|
2200
2273
|
style: {
|
|
@@ -2211,7 +2284,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
2211
2284
|
|
|
2212
2285
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
2213
2286
|
import katex from "katex";
|
|
2214
|
-
import { jsx as
|
|
2287
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2215
2288
|
var EquationNode = ({ node }) => {
|
|
2216
2289
|
const { equation, inline } = node;
|
|
2217
2290
|
let html = "";
|
|
@@ -2226,7 +2299,7 @@ var EquationNode = ({ node }) => {
|
|
|
2226
2299
|
});
|
|
2227
2300
|
}
|
|
2228
2301
|
if (inline) {
|
|
2229
|
-
return /* @__PURE__ */
|
|
2302
|
+
return /* @__PURE__ */ jsx42(
|
|
2230
2303
|
"span",
|
|
2231
2304
|
{
|
|
2232
2305
|
className: "katex-inline",
|
|
@@ -2234,7 +2307,7 @@ var EquationNode = ({ node }) => {
|
|
|
2234
2307
|
}
|
|
2235
2308
|
);
|
|
2236
2309
|
}
|
|
2237
|
-
return /* @__PURE__ */
|
|
2310
|
+
return /* @__PURE__ */ jsx42(
|
|
2238
2311
|
"div",
|
|
2239
2312
|
{
|
|
2240
2313
|
className: "katex-block my-3 text-center",
|
|
@@ -2245,7 +2318,7 @@ var EquationNode = ({ node }) => {
|
|
|
2245
2318
|
var EquationNode_default = EquationNode;
|
|
2246
2319
|
|
|
2247
2320
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
2248
|
-
import { jsx as
|
|
2321
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2249
2322
|
function getNestedProperty(obj, path) {
|
|
2250
2323
|
if (!obj || !path) return null;
|
|
2251
2324
|
if (path.includes(".")) {
|
|
@@ -2258,7 +2331,7 @@ function getNestedProperty(obj, path) {
|
|
|
2258
2331
|
}
|
|
2259
2332
|
const value = obj[path];
|
|
2260
2333
|
if (Array.isArray(value)) {
|
|
2261
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
2334
|
+
return value.map((item, index) => /* @__PURE__ */ jsx43("div", { children: String(item) }, index));
|
|
2262
2335
|
}
|
|
2263
2336
|
return value;
|
|
2264
2337
|
}
|
|
@@ -2319,7 +2392,7 @@ var DatafieldNode = (props) => {
|
|
|
2319
2392
|
const dataType = props.node.dataType;
|
|
2320
2393
|
if (isEmptyValue) return null;
|
|
2321
2394
|
if (dataType === "rawContent") {
|
|
2322
|
-
return /* @__PURE__ */
|
|
2395
|
+
return /* @__PURE__ */ jsx43(
|
|
2323
2396
|
PageBodyRenderer_default,
|
|
2324
2397
|
{
|
|
2325
2398
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -2335,12 +2408,12 @@ var DatafieldNode = (props) => {
|
|
|
2335
2408
|
}
|
|
2336
2409
|
);
|
|
2337
2410
|
}
|
|
2338
|
-
return /* @__PURE__ */
|
|
2411
|
+
return /* @__PURE__ */ jsx43(
|
|
2339
2412
|
"span",
|
|
2340
2413
|
{
|
|
2341
2414
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
2342
2415
|
style: styles,
|
|
2343
|
-
children: /* @__PURE__ */
|
|
2416
|
+
children: /* @__PURE__ */ jsx43(
|
|
2344
2417
|
ViewControl_default,
|
|
2345
2418
|
{
|
|
2346
2419
|
controlType: dataType,
|
|
@@ -2353,7 +2426,7 @@ var DatafieldNode = (props) => {
|
|
|
2353
2426
|
var DatafieldNode_default = DatafieldNode;
|
|
2354
2427
|
|
|
2355
2428
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2356
|
-
import { Fragment as Fragment3, jsx as
|
|
2429
|
+
import { Fragment as Fragment3, jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2357
2430
|
var ParagraphNode = (props) => {
|
|
2358
2431
|
const NodeTypes2 = {
|
|
2359
2432
|
["text"]: TextNode_default,
|
|
@@ -2373,9 +2446,9 @@ var ParagraphNode = (props) => {
|
|
|
2373
2446
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
2374
2447
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
2375
2448
|
if (isInlineOnlyParent) {
|
|
2376
|
-
return /* @__PURE__ */
|
|
2449
|
+
return /* @__PURE__ */ jsx44(Fragment3, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2377
2450
|
const SelectedNode = NodeTypes2[node.type];
|
|
2378
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ jsx44(React31.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(
|
|
2379
2452
|
SelectedNode,
|
|
2380
2453
|
{
|
|
2381
2454
|
node,
|
|
@@ -2390,7 +2463,7 @@ var ParagraphNode = (props) => {
|
|
|
2390
2463
|
return /* @__PURE__ */ jsxs24("div", { className: " " + formatClasses, children: [
|
|
2391
2464
|
hasChildren && props.node.children.map((node, index) => {
|
|
2392
2465
|
const SelectedNode = NodeTypes2[node.type];
|
|
2393
|
-
return /* @__PURE__ */
|
|
2466
|
+
return /* @__PURE__ */ jsx44(React31.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(
|
|
2394
2467
|
SelectedNode,
|
|
2395
2468
|
{
|
|
2396
2469
|
node,
|
|
@@ -2401,14 +2474,14 @@ var ParagraphNode = (props) => {
|
|
|
2401
2474
|
}
|
|
2402
2475
|
) }, index);
|
|
2403
2476
|
}),
|
|
2404
|
-
!hasChildren && /* @__PURE__ */
|
|
2477
|
+
!hasChildren && /* @__PURE__ */ jsx44("div", { className: "py-1.5 lg:py-2" })
|
|
2405
2478
|
] });
|
|
2406
2479
|
};
|
|
2407
2480
|
var ParagraphNode_default = ParagraphNode;
|
|
2408
2481
|
|
|
2409
2482
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2410
|
-
import
|
|
2411
|
-
import { Fragment as Fragment4, jsx as
|
|
2483
|
+
import React32 from "react";
|
|
2484
|
+
import { Fragment as Fragment4, jsx as jsx45 } from "react/jsx-runtime";
|
|
2412
2485
|
var HeadingNode = (props) => {
|
|
2413
2486
|
const NodeTypes2 = {
|
|
2414
2487
|
["text"]: TextNode_default,
|
|
@@ -2424,23 +2497,23 @@ var HeadingNode = (props) => {
|
|
|
2424
2497
|
{
|
|
2425
2498
|
}
|
|
2426
2499
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
2427
|
-
return /* @__PURE__ */
|
|
2500
|
+
return /* @__PURE__ */ jsx45(Fragment4, { children: React32.createElement(
|
|
2428
2501
|
HeadingTag,
|
|
2429
2502
|
{ className: formatClasses },
|
|
2430
2503
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2431
2504
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2432
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ jsx45(React32.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2433
2506
|
})
|
|
2434
2507
|
) });
|
|
2435
2508
|
};
|
|
2436
2509
|
var HeadingNode_default = HeadingNode;
|
|
2437
2510
|
|
|
2438
2511
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2439
|
-
import
|
|
2512
|
+
import React34 from "react";
|
|
2440
2513
|
|
|
2441
2514
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2442
|
-
import
|
|
2443
|
-
import { jsx as
|
|
2515
|
+
import React33 from "react";
|
|
2516
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
2444
2517
|
var ListItemNode = (props) => {
|
|
2445
2518
|
const NodeTypes2 = {
|
|
2446
2519
|
text: TextNode_default,
|
|
@@ -2457,66 +2530,66 @@ var ListItemNode = (props) => {
|
|
|
2457
2530
|
liStyle.fontSize = match[1].trim();
|
|
2458
2531
|
}
|
|
2459
2532
|
}
|
|
2460
|
-
return /* @__PURE__ */
|
|
2533
|
+
return /* @__PURE__ */ jsx46("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
2461
2534
|
const SelectedNode = NodeTypes2[node.type];
|
|
2462
2535
|
if (node.type === "linebreak") {
|
|
2463
2536
|
if (!foundFirstBreak) {
|
|
2464
2537
|
foundFirstBreak = true;
|
|
2465
|
-
return /* @__PURE__ */
|
|
2538
|
+
return /* @__PURE__ */ jsx46("div", {}, index);
|
|
2466
2539
|
} else {
|
|
2467
|
-
return /* @__PURE__ */
|
|
2540
|
+
return /* @__PURE__ */ jsx46("div", { className: "py-1 lg:py-2" }, index);
|
|
2468
2541
|
}
|
|
2469
2542
|
} else {
|
|
2470
2543
|
foundFirstBreak = false;
|
|
2471
|
-
return /* @__PURE__ */
|
|
2544
|
+
return /* @__PURE__ */ jsx46(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2472
2545
|
}
|
|
2473
2546
|
}) });
|
|
2474
2547
|
};
|
|
2475
2548
|
var ListItemNode_default = ListItemNode;
|
|
2476
2549
|
|
|
2477
2550
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2478
|
-
import { jsx as
|
|
2551
|
+
import { jsx as jsx47, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2479
2552
|
var ListNode = (props) => {
|
|
2480
2553
|
const NodeTypes2 = {
|
|
2481
2554
|
listitem: ListItemNode_default
|
|
2482
2555
|
};
|
|
2483
|
-
return /* @__PURE__ */ jsxs25(
|
|
2484
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
2556
|
+
return /* @__PURE__ */ jsxs25(React34.Fragment, { children: [
|
|
2557
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx47("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2485
2558
|
const SelectedNode = NodeTypes2[node.type];
|
|
2486
|
-
return /* @__PURE__ */
|
|
2559
|
+
return /* @__PURE__ */ jsx47(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2487
2560
|
}) }),
|
|
2488
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
2561
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx47("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2489
2562
|
const SelectedNode = NodeTypes2[node.type];
|
|
2490
|
-
return /* @__PURE__ */
|
|
2563
|
+
return /* @__PURE__ */ jsx47(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2491
2564
|
}) })
|
|
2492
2565
|
] });
|
|
2493
2566
|
};
|
|
2494
2567
|
var ListNode_default = ListNode;
|
|
2495
2568
|
|
|
2496
2569
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
2497
|
-
import
|
|
2498
|
-
import { jsx as
|
|
2570
|
+
import React35 from "react";
|
|
2571
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2499
2572
|
var QuoteNode = (props) => {
|
|
2500
2573
|
const NodeTypes2 = {
|
|
2501
2574
|
["text"]: TextNode_default,
|
|
2502
2575
|
["linebreak"]: LineBreakNode_default,
|
|
2503
2576
|
["link"]: LinkNode_default
|
|
2504
2577
|
};
|
|
2505
|
-
return /* @__PURE__ */
|
|
2578
|
+
return /* @__PURE__ */ jsx48("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2506
2579
|
const SelectedNode = NodeTypes2[node.type];
|
|
2507
|
-
return /* @__PURE__ */
|
|
2580
|
+
return /* @__PURE__ */ jsx48(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2508
2581
|
}) });
|
|
2509
2582
|
};
|
|
2510
2583
|
var QuoteNode_default = QuoteNode;
|
|
2511
2584
|
|
|
2512
2585
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2513
|
-
import
|
|
2586
|
+
import React36 from "react";
|
|
2514
2587
|
import dynamic5 from "next/dynamic";
|
|
2515
|
-
import { jsx as
|
|
2588
|
+
import { jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2516
2589
|
var CopyButton = dynamic5(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
2517
2590
|
ssr: false,
|
|
2518
2591
|
// optional: fallback UI while loading
|
|
2519
|
-
loading: () => /* @__PURE__ */
|
|
2592
|
+
loading: () => /* @__PURE__ */ jsx49("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
2520
2593
|
});
|
|
2521
2594
|
var CodeNode = (props) => {
|
|
2522
2595
|
const NodeTypes2 = {
|
|
@@ -2532,12 +2605,12 @@ var CodeNode = (props) => {
|
|
|
2532
2605
|
}).join("") ?? "";
|
|
2533
2606
|
return /* @__PURE__ */ jsxs26("div", { children: [
|
|
2534
2607
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
2535
|
-
/* @__PURE__ */
|
|
2536
|
-
/* @__PURE__ */
|
|
2608
|
+
/* @__PURE__ */ jsx49("span", { children: "Code Snippet" }),
|
|
2609
|
+
/* @__PURE__ */ jsx49(CopyButton, { text: textContent })
|
|
2537
2610
|
] }),
|
|
2538
|
-
/* @__PURE__ */
|
|
2611
|
+
/* @__PURE__ */ jsx49("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) => {
|
|
2539
2612
|
const SelectedNode = NodeTypes2[node.type];
|
|
2540
|
-
return /* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ jsx49(React36.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx49(
|
|
2541
2614
|
SelectedNode,
|
|
2542
2615
|
{
|
|
2543
2616
|
node,
|
|
@@ -2552,15 +2625,15 @@ var CodeNode = (props) => {
|
|
|
2552
2625
|
var CodeNode_default = CodeNode;
|
|
2553
2626
|
|
|
2554
2627
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
2555
|
-
import { jsx as
|
|
2628
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2556
2629
|
var HorizontalRuleNode = () => {
|
|
2557
|
-
return /* @__PURE__ */
|
|
2630
|
+
return /* @__PURE__ */ jsx50("hr", {});
|
|
2558
2631
|
};
|
|
2559
2632
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
2560
2633
|
|
|
2561
2634
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
2562
|
-
import
|
|
2563
|
-
import { Fragment as Fragment5, jsx as
|
|
2635
|
+
import React37 from "react";
|
|
2636
|
+
import { Fragment as Fragment5, jsx as jsx51 } from "react/jsx-runtime";
|
|
2564
2637
|
var WidgetNode = (props) => {
|
|
2565
2638
|
const getWidgetParameters = () => {
|
|
2566
2639
|
const widgetInputParameters = {
|
|
@@ -2624,7 +2697,7 @@ var WidgetNode = (props) => {
|
|
|
2624
2697
|
};
|
|
2625
2698
|
const widgetCode = props.node?.widgetCode;
|
|
2626
2699
|
if (!widgetCode) {
|
|
2627
|
-
return /* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ jsx51(Fragment5, { children: "Invalid widget" });
|
|
2628
2701
|
}
|
|
2629
2702
|
const widgetParams = getWidgetParameters();
|
|
2630
2703
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -2633,7 +2706,7 @@ var WidgetNode = (props) => {
|
|
|
2633
2706
|
}
|
|
2634
2707
|
return (
|
|
2635
2708
|
// eslint-disable-next-line react-hooks/static-components
|
|
2636
|
-
/* @__PURE__ */
|
|
2709
|
+
/* @__PURE__ */ jsx51(React37.Fragment, { children: /* @__PURE__ */ jsx51(
|
|
2637
2710
|
WidgetRenderer,
|
|
2638
2711
|
{
|
|
2639
2712
|
params: widgetParams,
|
|
@@ -2650,12 +2723,12 @@ var WidgetNode = (props) => {
|
|
|
2650
2723
|
var WidgetNode_default = WidgetNode;
|
|
2651
2724
|
|
|
2652
2725
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
2653
|
-
import
|
|
2726
|
+
import React38, { useRef as useRef3, useReducer, useCallback as useCallback2, useEffect as useEffect8 } from "react";
|
|
2654
2727
|
|
|
2655
2728
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
2656
|
-
import { jsx as
|
|
2729
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2657
2730
|
var InputControlNode = (props) => {
|
|
2658
|
-
return /* @__PURE__ */
|
|
2731
|
+
return /* @__PURE__ */ jsx52("div", { children: /* @__PURE__ */ jsx52(
|
|
2659
2732
|
InputControl_default,
|
|
2660
2733
|
{
|
|
2661
2734
|
name: props.node.name,
|
|
@@ -2728,7 +2801,7 @@ function FormReducer(state, action) {
|
|
|
2728
2801
|
var FormReducer_default = FormReducer;
|
|
2729
2802
|
|
|
2730
2803
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
2731
|
-
import { jsx as
|
|
2804
|
+
import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2732
2805
|
var FormContainerNode = (props) => {
|
|
2733
2806
|
const NodeTypes2 = {
|
|
2734
2807
|
["input-control"]: InputControlNode_default
|
|
@@ -2743,7 +2816,7 @@ var FormContainerNode = (props) => {
|
|
|
2743
2816
|
const handleInputChange = useCallback2((updatedValues) => {
|
|
2744
2817
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
2745
2818
|
}, [dispatch]);
|
|
2746
|
-
|
|
2819
|
+
useEffect8(() => {
|
|
2747
2820
|
const fetchInitialData = async () => {
|
|
2748
2821
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
2749
2822
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -2763,7 +2836,7 @@ var FormContainerNode = (props) => {
|
|
|
2763
2836
|
{
|
|
2764
2837
|
}
|
|
2765
2838
|
const SelectedNode = NodeTypes2[node2.type];
|
|
2766
|
-
return /* @__PURE__ */
|
|
2839
|
+
return /* @__PURE__ */ jsx53(React38.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx53(
|
|
2767
2840
|
InputControlNode_default,
|
|
2768
2841
|
{
|
|
2769
2842
|
value: formState.inputValues[node2.name],
|
|
@@ -2772,17 +2845,17 @@ var FormContainerNode = (props) => {
|
|
|
2772
2845
|
}
|
|
2773
2846
|
) }, index);
|
|
2774
2847
|
}),
|
|
2775
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
2848
|
+
node.children.length == 0 && /* @__PURE__ */ jsx53("div", { className: "py-0.5 lg:py-1.5" })
|
|
2776
2849
|
] });
|
|
2777
2850
|
};
|
|
2778
2851
|
var FormContainerNode_default = FormContainerNode;
|
|
2779
2852
|
|
|
2780
2853
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2781
|
-
import
|
|
2854
|
+
import React41 from "react";
|
|
2782
2855
|
|
|
2783
2856
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
2784
2857
|
import dynamic6 from "next/dynamic";
|
|
2785
|
-
import { jsx as
|
|
2858
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2786
2859
|
var IframeClient = dynamic6(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
2787
2860
|
ssr: false
|
|
2788
2861
|
});
|
|
@@ -2795,13 +2868,13 @@ var EmbedNode = (props) => {
|
|
|
2795
2868
|
} else {
|
|
2796
2869
|
src = props.node.embedSrc;
|
|
2797
2870
|
}
|
|
2798
|
-
return /* @__PURE__ */
|
|
2871
|
+
return /* @__PURE__ */ jsx54("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx54(IframeClient, { src }) });
|
|
2799
2872
|
};
|
|
2800
2873
|
var EmbedNode_default = EmbedNode;
|
|
2801
2874
|
|
|
2802
2875
|
// src/components/Slider.tsx
|
|
2803
|
-
import
|
|
2804
|
-
import { Fragment as Fragment6, jsx as
|
|
2876
|
+
import React39, { useState as useState6, useEffect as useEffect9, Children, cloneElement } from "react";
|
|
2877
|
+
import { Fragment as Fragment6, jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2805
2878
|
var Slider = ({
|
|
2806
2879
|
children,
|
|
2807
2880
|
slidesToShow = 4,
|
|
@@ -2819,13 +2892,13 @@ var Slider = ({
|
|
|
2819
2892
|
pillStyle = "cumulative",
|
|
2820
2893
|
progressPosition = "bottom"
|
|
2821
2894
|
}) => {
|
|
2822
|
-
const [currentSlide, setCurrentSlide] =
|
|
2823
|
-
const [transition, setTransition] =
|
|
2824
|
-
const [slidesToShowState, setSlidesToShowState] =
|
|
2895
|
+
const [currentSlide, setCurrentSlide] = useState6(0);
|
|
2896
|
+
const [transition, setTransition] = useState6(true);
|
|
2897
|
+
const [slidesToShowState, setSlidesToShowState] = useState6(
|
|
2825
2898
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
2826
2899
|
);
|
|
2827
|
-
const [isPlaying, setIsPlaying] =
|
|
2828
|
-
|
|
2900
|
+
const [isPlaying, setIsPlaying] = useState6(autoplay);
|
|
2901
|
+
useEffect9(() => {
|
|
2829
2902
|
if (typeof slidesToShow === "number") return;
|
|
2830
2903
|
const handleResize = () => {
|
|
2831
2904
|
if (window.innerWidth >= 1024) {
|
|
@@ -2840,7 +2913,7 @@ var Slider = ({
|
|
|
2840
2913
|
window.addEventListener("resize", handleResize);
|
|
2841
2914
|
return () => window.removeEventListener("resize", handleResize);
|
|
2842
2915
|
}, [slidesToShow]);
|
|
2843
|
-
|
|
2916
|
+
useEffect9(() => {
|
|
2844
2917
|
if (!autoplay) return;
|
|
2845
2918
|
const timer = setInterval(() => {
|
|
2846
2919
|
if (isPlaying) {
|
|
@@ -2895,10 +2968,10 @@ var Slider = ({
|
|
|
2895
2968
|
};
|
|
2896
2969
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
2897
2970
|
const slides = Children.map(children, (child, index) => {
|
|
2898
|
-
if (!
|
|
2971
|
+
if (!React39.isValidElement(child)) return null;
|
|
2899
2972
|
const childProps = child.props;
|
|
2900
2973
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
2901
|
-
return /* @__PURE__ */
|
|
2974
|
+
return /* @__PURE__ */ jsx55(
|
|
2902
2975
|
"div",
|
|
2903
2976
|
{
|
|
2904
2977
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -2928,7 +3001,7 @@ var Slider = ({
|
|
|
2928
3001
|
onMouseEnter: handleMouseEnter,
|
|
2929
3002
|
onMouseLeave: handleMouseLeave,
|
|
2930
3003
|
children: [
|
|
2931
|
-
/* @__PURE__ */
|
|
3004
|
+
/* @__PURE__ */ jsx55(
|
|
2932
3005
|
"div",
|
|
2933
3006
|
{
|
|
2934
3007
|
className: "flex h-full",
|
|
@@ -2940,14 +3013,14 @@ var Slider = ({
|
|
|
2940
3013
|
}
|
|
2941
3014
|
),
|
|
2942
3015
|
show_arrows && /* @__PURE__ */ jsxs28(Fragment6, { children: [
|
|
2943
|
-
/* @__PURE__ */
|
|
3016
|
+
/* @__PURE__ */ jsx55(
|
|
2944
3017
|
ArrowButton,
|
|
2945
3018
|
{
|
|
2946
3019
|
direction: "left",
|
|
2947
3020
|
onClick: prevSlide,
|
|
2948
3021
|
visible: infinite_scroll || currentSlide > 0,
|
|
2949
3022
|
className: arrowClassName,
|
|
2950
|
-
children: /* @__PURE__ */
|
|
3023
|
+
children: /* @__PURE__ */ jsx55("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx55("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
2951
3024
|
}
|
|
2952
3025
|
),
|
|
2953
3026
|
/* @__PURE__ */ jsxs28(
|
|
@@ -2958,13 +3031,13 @@ var Slider = ({
|
|
|
2958
3031
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
2959
3032
|
className: arrowClassName,
|
|
2960
3033
|
children: [
|
|
2961
|
-
/* @__PURE__ */
|
|
3034
|
+
/* @__PURE__ */ jsx55("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx55("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
2962
3035
|
" "
|
|
2963
3036
|
]
|
|
2964
3037
|
}
|
|
2965
3038
|
)
|
|
2966
3039
|
] }),
|
|
2967
|
-
show_dots && /* @__PURE__ */
|
|
3040
|
+
show_dots && /* @__PURE__ */ jsx55("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ jsx55(
|
|
2968
3041
|
ProgressPill,
|
|
2969
3042
|
{
|
|
2970
3043
|
active: index === currentSlide,
|
|
@@ -2990,7 +3063,7 @@ var ArrowButton = ({
|
|
|
2990
3063
|
visible,
|
|
2991
3064
|
children,
|
|
2992
3065
|
className = ""
|
|
2993
|
-
}) => /* @__PURE__ */
|
|
3066
|
+
}) => /* @__PURE__ */ jsx55(
|
|
2994
3067
|
"button",
|
|
2995
3068
|
{
|
|
2996
3069
|
className: `
|
|
@@ -3016,13 +3089,13 @@ var ProgressPill = ({
|
|
|
3016
3089
|
currentSlide,
|
|
3017
3090
|
totalSlides
|
|
3018
3091
|
}) => {
|
|
3019
|
-
const [progress, setProgress] =
|
|
3020
|
-
|
|
3092
|
+
const [progress, setProgress] = useState6(0);
|
|
3093
|
+
useEffect9(() => {
|
|
3021
3094
|
if (active) {
|
|
3022
3095
|
setProgress(0);
|
|
3023
3096
|
}
|
|
3024
3097
|
}, [active, index]);
|
|
3025
|
-
|
|
3098
|
+
useEffect9(() => {
|
|
3026
3099
|
if (!active || !isPlaying) {
|
|
3027
3100
|
if (!active) {
|
|
3028
3101
|
setProgress(0);
|
|
@@ -3077,7 +3150,7 @@ var ProgressPill = ({
|
|
|
3077
3150
|
const renderProgressBar = () => {
|
|
3078
3151
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3079
3152
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3080
|
-
return /* @__PURE__ */
|
|
3153
|
+
return /* @__PURE__ */ jsx55(
|
|
3081
3154
|
"div",
|
|
3082
3155
|
{
|
|
3083
3156
|
className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
|
|
@@ -3089,7 +3162,7 @@ var ProgressPill = ({
|
|
|
3089
3162
|
};
|
|
3090
3163
|
const renderCumulativeFill = () => {
|
|
3091
3164
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
3092
|
-
return /* @__PURE__ */
|
|
3165
|
+
return /* @__PURE__ */ jsx55(
|
|
3093
3166
|
"div",
|
|
3094
3167
|
{
|
|
3095
3168
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -3437,10 +3510,10 @@ var PathUtility = class {
|
|
|
3437
3510
|
var PathUtility_default = new PathUtility();
|
|
3438
3511
|
|
|
3439
3512
|
// src/components/NoDataFound.tsx
|
|
3440
|
-
import { jsx as
|
|
3513
|
+
import { jsx as jsx56, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3441
3514
|
var NoDataFound = () => {
|
|
3442
3515
|
return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
3443
|
-
/* @__PURE__ */
|
|
3516
|
+
/* @__PURE__ */ jsx56("div", { className: "mb-5", children: /* @__PURE__ */ jsx56("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx56(
|
|
3444
3517
|
"svg",
|
|
3445
3518
|
{
|
|
3446
3519
|
className: "w-10 h-10",
|
|
@@ -3448,7 +3521,7 @@ var NoDataFound = () => {
|
|
|
3448
3521
|
stroke: "currentColor",
|
|
3449
3522
|
viewBox: "0 0 24 24",
|
|
3450
3523
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3451
|
-
children: /* @__PURE__ */
|
|
3524
|
+
children: /* @__PURE__ */ jsx56(
|
|
3452
3525
|
"path",
|
|
3453
3526
|
{
|
|
3454
3527
|
strokeLinecap: "round",
|
|
@@ -3459,15 +3532,15 @@ var NoDataFound = () => {
|
|
|
3459
3532
|
)
|
|
3460
3533
|
}
|
|
3461
3534
|
) }) }),
|
|
3462
|
-
/* @__PURE__ */
|
|
3463
|
-
/* @__PURE__ */
|
|
3535
|
+
/* @__PURE__ */ jsx56("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
3536
|
+
/* @__PURE__ */ jsx56("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
3464
3537
|
] });
|
|
3465
3538
|
};
|
|
3466
3539
|
var NoDataFound_default = NoDataFound;
|
|
3467
3540
|
|
|
3468
3541
|
// src/components/Pagination.tsx
|
|
3469
3542
|
import { useMemo } from "react";
|
|
3470
|
-
import { jsx as
|
|
3543
|
+
import { jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3471
3544
|
var Pagination = (props) => {
|
|
3472
3545
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3473
3546
|
const builder = useMemo(() => {
|
|
@@ -3511,7 +3584,7 @@ var Pagination = (props) => {
|
|
|
3511
3584
|
return range;
|
|
3512
3585
|
};
|
|
3513
3586
|
const paginationRange = getPaginationRange();
|
|
3514
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
3587
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx57(
|
|
3515
3588
|
Hyperlink,
|
|
3516
3589
|
{
|
|
3517
3590
|
linkType: "Link" /* Link */,
|
|
@@ -3526,9 +3599,9 @@ var Pagination = (props) => {
|
|
|
3526
3599
|
);
|
|
3527
3600
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
3528
3601
|
if (disabled) {
|
|
3529
|
-
return /* @__PURE__ */
|
|
3602
|
+
return /* @__PURE__ */ jsx57("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
|
|
3530
3603
|
}
|
|
3531
|
-
return /* @__PURE__ */
|
|
3604
|
+
return /* @__PURE__ */ jsx57(
|
|
3532
3605
|
Hyperlink,
|
|
3533
3606
|
{
|
|
3534
3607
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
|
|
@@ -3549,7 +3622,7 @@ var Pagination = (props) => {
|
|
|
3549
3622
|
] }),
|
|
3550
3623
|
" ",
|
|
3551
3624
|
"out of ",
|
|
3552
|
-
/* @__PURE__ */
|
|
3625
|
+
/* @__PURE__ */ jsx57("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
3553
3626
|
" results"
|
|
3554
3627
|
] }),
|
|
3555
3628
|
totalPages > 1 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-1", children: [
|
|
@@ -3559,14 +3632,14 @@ var Pagination = (props) => {
|
|
|
3559
3632
|
page: activePageNumber - 1,
|
|
3560
3633
|
disabled: activePageNumber === 1,
|
|
3561
3634
|
children: [
|
|
3562
|
-
/* @__PURE__ */
|
|
3563
|
-
/* @__PURE__ */
|
|
3635
|
+
/* @__PURE__ */ jsx57("span", { children: /* @__PURE__ */ jsx57(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
3636
|
+
/* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Prev" })
|
|
3564
3637
|
]
|
|
3565
3638
|
}
|
|
3566
3639
|
),
|
|
3567
3640
|
paginationRange.map((item, index) => {
|
|
3568
3641
|
if (item === "...") {
|
|
3569
|
-
return /* @__PURE__ */
|
|
3642
|
+
return /* @__PURE__ */ jsx57(
|
|
3570
3643
|
"span",
|
|
3571
3644
|
{
|
|
3572
3645
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -3576,7 +3649,7 @@ var Pagination = (props) => {
|
|
|
3576
3649
|
);
|
|
3577
3650
|
}
|
|
3578
3651
|
const page = item;
|
|
3579
|
-
return /* @__PURE__ */
|
|
3652
|
+
return /* @__PURE__ */ jsx57(PageButton, { page, children: page }, page);
|
|
3580
3653
|
}),
|
|
3581
3654
|
/* @__PURE__ */ jsxs30(
|
|
3582
3655
|
NavigationButton,
|
|
@@ -3584,15 +3657,15 @@ var Pagination = (props) => {
|
|
|
3584
3657
|
page: activePageNumber + 1,
|
|
3585
3658
|
disabled: activePageNumber === totalPages,
|
|
3586
3659
|
children: [
|
|
3587
|
-
/* @__PURE__ */
|
|
3588
|
-
/* @__PURE__ */
|
|
3660
|
+
/* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Next" }),
|
|
3661
|
+
/* @__PURE__ */ jsx57("span", { children: /* @__PURE__ */ jsx57(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
3589
3662
|
]
|
|
3590
3663
|
}
|
|
3591
3664
|
)
|
|
3592
3665
|
] }),
|
|
3593
3666
|
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-2", children: [
|
|
3594
|
-
/* @__PURE__ */
|
|
3595
|
-
/* @__PURE__ */
|
|
3667
|
+
/* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Go to:" }),
|
|
3668
|
+
/* @__PURE__ */ jsx57("div", { className: "relative", children: /* @__PURE__ */ jsx57(
|
|
3596
3669
|
"input",
|
|
3597
3670
|
{
|
|
3598
3671
|
type: "number",
|
|
@@ -3613,9 +3686,9 @@ var Pagination = (props) => {
|
|
|
3613
3686
|
) })
|
|
3614
3687
|
] })
|
|
3615
3688
|
] }),
|
|
3616
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
3617
|
-
/* @__PURE__ */
|
|
3618
|
-
/* @__PURE__ */
|
|
3689
|
+
showPageSizeSelector && /* @__PURE__ */ jsx57("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
3690
|
+
/* @__PURE__ */ jsx57("span", { className: "text-sm", children: "Show:" }),
|
|
3691
|
+
/* @__PURE__ */ jsx57("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx57(
|
|
3619
3692
|
Hyperlink,
|
|
3620
3693
|
{
|
|
3621
3694
|
className: `
|
|
@@ -3627,7 +3700,7 @@ var Pagination = (props) => {
|
|
|
3627
3700
|
},
|
|
3628
3701
|
size
|
|
3629
3702
|
)) }),
|
|
3630
|
-
/* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ jsx57("span", { className: "text-sm", children: "per page" })
|
|
3631
3704
|
] }) })
|
|
3632
3705
|
] });
|
|
3633
3706
|
};
|
|
@@ -3635,7 +3708,7 @@ var Pagination_default = Pagination;
|
|
|
3635
3708
|
|
|
3636
3709
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
3637
3710
|
import dynamic7 from "next/dynamic";
|
|
3638
|
-
import { Fragment as Fragment7, jsx as
|
|
3711
|
+
import { Fragment as Fragment7, jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3639
3712
|
var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-G27NMG7A.mjs"), { ssr: false });
|
|
3640
3713
|
var deviceToMediaQuery = (device) => {
|
|
3641
3714
|
switch (device) {
|
|
@@ -3705,7 +3778,7 @@ var ImageGalleryNode = (props) => {
|
|
|
3705
3778
|
};
|
|
3706
3779
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
3707
3780
|
return /* @__PURE__ */ jsxs31(Fragment7, { children: [
|
|
3708
|
-
hlsSources.length > 0 && /* @__PURE__ */
|
|
3781
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx58(Fragment7, { children: /* @__PURE__ */ jsx58(
|
|
3709
3782
|
HlsPlayer2,
|
|
3710
3783
|
{
|
|
3711
3784
|
sources: hlsSources,
|
|
@@ -3719,14 +3792,14 @@ var ImageGalleryNode = (props) => {
|
|
|
3719
3792
|
session: props.session
|
|
3720
3793
|
}
|
|
3721
3794
|
) }),
|
|
3722
|
-
staticFallback && /* @__PURE__ */
|
|
3795
|
+
staticFallback && /* @__PURE__ */ jsx58(Fragment7, { children: /* @__PURE__ */ jsxs31("picture", { children: [
|
|
3723
3796
|
DEVICE_ORDER.map((deviceKey) => {
|
|
3724
3797
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
3725
3798
|
if (!match) return null;
|
|
3726
3799
|
const srcUrl = resolveImageUrl(match.imageUrl);
|
|
3727
3800
|
if (!srcUrl) return null;
|
|
3728
3801
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
3729
|
-
return /* @__PURE__ */
|
|
3802
|
+
return /* @__PURE__ */ jsx58(
|
|
3730
3803
|
"source",
|
|
3731
3804
|
{
|
|
3732
3805
|
media: mediaQuery,
|
|
@@ -3750,7 +3823,7 @@ var ImageGalleryNode = (props) => {
|
|
|
3750
3823
|
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
3751
3824
|
return (
|
|
3752
3825
|
// eslint-disable-next-line @next/next/no-img-element
|
|
3753
|
-
/* @__PURE__ */
|
|
3826
|
+
/* @__PURE__ */ jsx58(
|
|
3754
3827
|
"img",
|
|
3755
3828
|
{
|
|
3756
3829
|
loading: "lazy",
|
|
@@ -3771,7 +3844,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
3771
3844
|
|
|
3772
3845
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3773
3846
|
import Link2 from "next/link";
|
|
3774
|
-
import { jsx as
|
|
3847
|
+
import { jsx as jsx59, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3775
3848
|
function toCamelCase(str) {
|
|
3776
3849
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
3777
3850
|
}
|
|
@@ -3978,7 +4051,7 @@ var DivContainer = async (props) => {
|
|
|
3978
4051
|
response = await serviceClient.get(endpoint);
|
|
3979
4052
|
result = response?.result;
|
|
3980
4053
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
3981
|
-
return /* @__PURE__ */
|
|
4054
|
+
return /* @__PURE__ */ jsx59(NoDataFound_default, {});
|
|
3982
4055
|
}
|
|
3983
4056
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
3984
4057
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -3995,7 +4068,7 @@ var DivContainer = async (props) => {
|
|
|
3995
4068
|
}
|
|
3996
4069
|
const SelectedNode = NodeTypes2[node.type];
|
|
3997
4070
|
if (!SelectedNode) return null;
|
|
3998
|
-
return /* @__PURE__ */
|
|
4071
|
+
return /* @__PURE__ */ jsx59(React41.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
3999
4072
|
SelectedNode,
|
|
4000
4073
|
{
|
|
4001
4074
|
node,
|
|
@@ -4097,9 +4170,9 @@ var DivContainer = async (props) => {
|
|
|
4097
4170
|
props.node.autoFormat && "auto-format",
|
|
4098
4171
|
props.node.bgClass
|
|
4099
4172
|
].filter(Boolean).join(" ");
|
|
4100
|
-
return /* @__PURE__ */ jsxs32(
|
|
4101
|
-
/* @__PURE__ */
|
|
4102
|
-
/* @__PURE__ */
|
|
4173
|
+
return /* @__PURE__ */ jsxs32(React41.Fragment, { children: [
|
|
4174
|
+
/* @__PURE__ */ jsx59("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4175
|
+
/* @__PURE__ */ jsx59(React41.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4103
4176
|
Wrapper,
|
|
4104
4177
|
{
|
|
4105
4178
|
id: guid,
|
|
@@ -4108,18 +4181,18 @@ var DivContainer = async (props) => {
|
|
|
4108
4181
|
...wrapperProps,
|
|
4109
4182
|
children: dataToRender.map(
|
|
4110
4183
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4111
|
-
(child, i) => /* @__PURE__ */
|
|
4184
|
+
(child, i) => /* @__PURE__ */ jsx59(React41.Fragment, { children: child }, i)
|
|
4112
4185
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4113
4186
|
)
|
|
4114
4187
|
}
|
|
4115
4188
|
) }),
|
|
4116
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4189
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx59("div", { children: /* @__PURE__ */ jsx59(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4117
4190
|
] });
|
|
4118
4191
|
};
|
|
4119
4192
|
var DivContainer_default = DivContainer;
|
|
4120
4193
|
|
|
4121
4194
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4122
|
-
import { jsx as
|
|
4195
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
4123
4196
|
var NodeTypes = {
|
|
4124
4197
|
["paragraph"]: ParagraphNode_default,
|
|
4125
4198
|
["heading"]: HeadingNode_default,
|
|
@@ -4147,11 +4220,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4147
4220
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4148
4221
|
rootNode = pageBodyTree.root;
|
|
4149
4222
|
}
|
|
4150
|
-
return /* @__PURE__ */
|
|
4223
|
+
return /* @__PURE__ */ jsx60(React42.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4151
4224
|
{
|
|
4152
4225
|
}
|
|
4153
4226
|
const SelectedNode = NodeTypes[node.type];
|
|
4154
|
-
return /* @__PURE__ */
|
|
4227
|
+
return /* @__PURE__ */ jsx60(React42.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx60(React42.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx60(React42.Fragment, { children: /* @__PURE__ */ jsx60(
|
|
4155
4228
|
SelectedNode,
|
|
4156
4229
|
{
|
|
4157
4230
|
node,
|
|
@@ -4167,7 +4240,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4167
4240
|
device: props.device,
|
|
4168
4241
|
widgetRenderer: props.widgetRenderer
|
|
4169
4242
|
}
|
|
4170
|
-
) }) : /* @__PURE__ */
|
|
4243
|
+
) }) : /* @__PURE__ */ jsx60(React42.Fragment, { children: /* @__PURE__ */ jsx60(
|
|
4171
4244
|
SelectedNode,
|
|
4172
4245
|
{
|
|
4173
4246
|
node,
|
|
@@ -4188,12 +4261,12 @@ var PageBodyRenderer = (props) => {
|
|
|
4188
4261
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
4189
4262
|
|
|
4190
4263
|
// src/components/Toast.tsx
|
|
4191
|
-
import { useState as
|
|
4192
|
-
import { Fragment as Fragment8, jsx as
|
|
4264
|
+
import { useState as useState8 } from "react";
|
|
4265
|
+
import { Fragment as Fragment8, jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4193
4266
|
var Toast = () => {
|
|
4194
|
-
const [showToast, setShowToast] =
|
|
4195
|
-
const [message, setMessage] =
|
|
4196
|
-
const [messageType, setMessageType] =
|
|
4267
|
+
const [showToast, setShowToast] = useState8(false);
|
|
4268
|
+
const [message, setMessage] = useState8("");
|
|
4269
|
+
const [messageType, setMessageType] = useState8("error");
|
|
4197
4270
|
ToastService_default.showError = function(message2) {
|
|
4198
4271
|
setShowToast(true);
|
|
4199
4272
|
setMessage(message2);
|
|
@@ -4232,8 +4305,8 @@ var Toast = () => {
|
|
|
4232
4305
|
const closeToast = () => {
|
|
4233
4306
|
setShowToast(false);
|
|
4234
4307
|
};
|
|
4235
|
-
return /* @__PURE__ */
|
|
4236
|
-
/* @__PURE__ */
|
|
4308
|
+
return /* @__PURE__ */ jsx61(Fragment8, { children: showToast && /* @__PURE__ */ jsx61("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__ */ jsxs33("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
4309
|
+
/* @__PURE__ */ jsx61(
|
|
4237
4310
|
"span",
|
|
4238
4311
|
{
|
|
4239
4312
|
className: "font-medium text-inherit text-sm",
|
|
@@ -4241,7 +4314,7 @@ var Toast = () => {
|
|
|
4241
4314
|
children: message
|
|
4242
4315
|
}
|
|
4243
4316
|
),
|
|
4244
|
-
/* @__PURE__ */
|
|
4317
|
+
/* @__PURE__ */ jsx61("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx61(
|
|
4245
4318
|
"svg",
|
|
4246
4319
|
{
|
|
4247
4320
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4249,7 +4322,7 @@ var Toast = () => {
|
|
|
4249
4322
|
fill: "none",
|
|
4250
4323
|
viewBox: "0 0 24 24",
|
|
4251
4324
|
stroke: "currentColor",
|
|
4252
|
-
children: /* @__PURE__ */
|
|
4325
|
+
children: /* @__PURE__ */ jsx61("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
4253
4326
|
}
|
|
4254
4327
|
) })
|
|
4255
4328
|
] }) }) });
|
|
@@ -4259,7 +4332,7 @@ var Toast_default = Toast;
|
|
|
4259
4332
|
// src/components/NavigationTabsV2.tsx
|
|
4260
4333
|
import Link3 from "next/link";
|
|
4261
4334
|
import { usePathname } from "next/navigation";
|
|
4262
|
-
import { jsx as
|
|
4335
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4263
4336
|
function resolveRoutePlaceholders(route, params) {
|
|
4264
4337
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
4265
4338
|
const value = params[key];
|
|
@@ -4284,8 +4357,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4284
4357
|
isActive: tab.isActive
|
|
4285
4358
|
})) || [];
|
|
4286
4359
|
if (mappedTabs.length === 0) return null;
|
|
4287
|
-
return /* @__PURE__ */
|
|
4288
|
-
return /* @__PURE__ */
|
|
4360
|
+
return /* @__PURE__ */ jsx62("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
4361
|
+
return /* @__PURE__ */ jsx62(Link3, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx62(
|
|
4289
4362
|
"div",
|
|
4290
4363
|
{
|
|
4291
4364
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -4298,51 +4371,51 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4298
4371
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
4299
4372
|
|
|
4300
4373
|
// src/components/dataForm/DataList.tsx
|
|
4301
|
-
import
|
|
4374
|
+
import React46, { useEffect as useEffect10, useState as useState9, useCallback as useCallback3, useReducer as useReducer2 } from "react";
|
|
4302
4375
|
import { useRouter } from "next/navigation";
|
|
4303
4376
|
|
|
4304
4377
|
// src/components/dataForm/NoContentView.tsx
|
|
4305
|
-
import
|
|
4306
|
-
import { jsx as
|
|
4378
|
+
import React44 from "react";
|
|
4379
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
4307
4380
|
var NoContentView = (props) => {
|
|
4308
|
-
return /* @__PURE__ */
|
|
4381
|
+
return /* @__PURE__ */ jsx63(React44.Fragment, { children: props.isDataFound === false && props.children });
|
|
4309
4382
|
};
|
|
4310
4383
|
var NoContentView_default = NoContentView;
|
|
4311
4384
|
|
|
4312
4385
|
// src/components/dataForm/ContentView.tsx
|
|
4313
|
-
import
|
|
4314
|
-
import { jsx as
|
|
4386
|
+
import React45 from "react";
|
|
4387
|
+
import { jsx as jsx64, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4315
4388
|
var ContentView = (props) => {
|
|
4316
|
-
return /* @__PURE__ */ jsxs34(
|
|
4317
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
4389
|
+
return /* @__PURE__ */ jsxs34(React45.Fragment, { children: [
|
|
4390
|
+
props.isDataFound == null && /* @__PURE__ */ jsx64("div", { className: "", children: /* @__PURE__ */ jsxs34("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
4318
4391
|
/* @__PURE__ */ jsxs34("div", { className: "flex items-center mb-4", children: [
|
|
4319
|
-
/* @__PURE__ */
|
|
4392
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
4320
4393
|
/* @__PURE__ */ jsxs34("div", { className: "ml-2", children: [
|
|
4321
|
-
/* @__PURE__ */
|
|
4322
|
-
/* @__PURE__ */
|
|
4394
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
4395
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
4323
4396
|
] })
|
|
4324
4397
|
] }),
|
|
4325
4398
|
/* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
4326
4399
|
/* @__PURE__ */ jsxs34("div", { className: "animate-pulse", children: [
|
|
4327
|
-
/* @__PURE__ */
|
|
4328
|
-
/* @__PURE__ */
|
|
4329
|
-
/* @__PURE__ */
|
|
4330
|
-
/* @__PURE__ */
|
|
4331
|
-
/* @__PURE__ */
|
|
4400
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4401
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4402
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4403
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4404
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4332
4405
|
] }),
|
|
4333
4406
|
/* @__PURE__ */ jsxs34("div", { className: "animate-pulse", children: [
|
|
4334
|
-
/* @__PURE__ */
|
|
4335
|
-
/* @__PURE__ */
|
|
4336
|
-
/* @__PURE__ */
|
|
4337
|
-
/* @__PURE__ */
|
|
4338
|
-
/* @__PURE__ */
|
|
4407
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4408
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4409
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4410
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4411
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4339
4412
|
] }),
|
|
4340
4413
|
/* @__PURE__ */ jsxs34("div", { className: "animate-pulse", children: [
|
|
4341
|
-
/* @__PURE__ */
|
|
4342
|
-
/* @__PURE__ */
|
|
4343
|
-
/* @__PURE__ */
|
|
4344
|
-
/* @__PURE__ */
|
|
4345
|
-
/* @__PURE__ */
|
|
4414
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4415
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4416
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4417
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4418
|
+
/* @__PURE__ */ jsx64("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4346
4419
|
] })
|
|
4347
4420
|
] })
|
|
4348
4421
|
] }) }),
|
|
@@ -4352,7 +4425,7 @@ var ContentView = (props) => {
|
|
|
4352
4425
|
var ContentView_default = ContentView;
|
|
4353
4426
|
|
|
4354
4427
|
// src/components/dataForm/DataList.tsx
|
|
4355
|
-
import { Fragment as Fragment9, jsx as
|
|
4428
|
+
import { Fragment as Fragment9, jsx as jsx65, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4356
4429
|
var DataList = (props) => {
|
|
4357
4430
|
console.log(props.dataset, "datasetssssss");
|
|
4358
4431
|
const router = useRouter();
|
|
@@ -4361,8 +4434,8 @@ var DataList = (props) => {
|
|
|
4361
4434
|
let activePageNumber = 0;
|
|
4362
4435
|
let pages = 0;
|
|
4363
4436
|
console.log(props.addLinkText);
|
|
4364
|
-
const [isDataFound, setIsDataFound] =
|
|
4365
|
-
|
|
4437
|
+
const [isDataFound, setIsDataFound] = useState9(null);
|
|
4438
|
+
useEffect10(() => {
|
|
4366
4439
|
if (props?.dataset) {
|
|
4367
4440
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
4368
4441
|
setIsDataFound(true);
|
|
@@ -4375,7 +4448,7 @@ var DataList = (props) => {
|
|
|
4375
4448
|
if (path.includes(".")) {
|
|
4376
4449
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
4377
4450
|
} else if (Array.isArray(obj[path])) {
|
|
4378
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
4451
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx65("div", { children: item }, index));
|
|
4379
4452
|
} else {
|
|
4380
4453
|
return obj[path];
|
|
4381
4454
|
}
|
|
@@ -4431,30 +4504,30 @@ var DataList = (props) => {
|
|
|
4431
4504
|
const renderPageNumbers = () => {
|
|
4432
4505
|
if (pages <= 10) {
|
|
4433
4506
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
4434
|
-
(page) => /* @__PURE__ */
|
|
4507
|
+
(page) => /* @__PURE__ */ jsx65(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx65(
|
|
4435
4508
|
Hyperlink,
|
|
4436
4509
|
{
|
|
4437
4510
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4438
4511
|
href: builder.getNewPageUrl(page),
|
|
4439
4512
|
children: page
|
|
4440
4513
|
}
|
|
4441
|
-
) : /* @__PURE__ */
|
|
4514
|
+
) : /* @__PURE__ */ jsx65("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
4442
4515
|
);
|
|
4443
4516
|
} else {
|
|
4444
4517
|
const showFirstPages = activePageNumber <= 5;
|
|
4445
4518
|
const showLastPages = activePageNumber > pages - 5;
|
|
4446
4519
|
if (showFirstPages) {
|
|
4447
4520
|
return /* @__PURE__ */ jsxs35(Fragment9, { children: [
|
|
4448
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
4521
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx65(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx65(
|
|
4449
4522
|
Hyperlink,
|
|
4450
4523
|
{
|
|
4451
4524
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4452
4525
|
href: builder.getNewPageUrl(page),
|
|
4453
4526
|
children: page
|
|
4454
4527
|
}
|
|
4455
|
-
) : /* @__PURE__ */
|
|
4456
|
-
/* @__PURE__ */
|
|
4457
|
-
/* @__PURE__ */
|
|
4528
|
+
) : /* @__PURE__ */ jsx65("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
4529
|
+
/* @__PURE__ */ jsx65("span", { className: "px-2 py-1", children: "..." }),
|
|
4530
|
+
/* @__PURE__ */ jsx65(
|
|
4458
4531
|
Hyperlink,
|
|
4459
4532
|
{
|
|
4460
4533
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4462,7 +4535,7 @@ var DataList = (props) => {
|
|
|
4462
4535
|
children: pages - 1
|
|
4463
4536
|
}
|
|
4464
4537
|
),
|
|
4465
|
-
/* @__PURE__ */
|
|
4538
|
+
/* @__PURE__ */ jsx65(
|
|
4466
4539
|
Hyperlink,
|
|
4467
4540
|
{
|
|
4468
4541
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4470,7 +4543,7 @@ var DataList = (props) => {
|
|
|
4470
4543
|
children: pages
|
|
4471
4544
|
}
|
|
4472
4545
|
),
|
|
4473
|
-
/* @__PURE__ */
|
|
4546
|
+
/* @__PURE__ */ jsx65("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs35(
|
|
4474
4547
|
"select",
|
|
4475
4548
|
{
|
|
4476
4549
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4482,18 +4555,18 @@ var DataList = (props) => {
|
|
|
4482
4555
|
}
|
|
4483
4556
|
},
|
|
4484
4557
|
children: [
|
|
4485
|
-
/* @__PURE__ */
|
|
4558
|
+
/* @__PURE__ */ jsx65("option", { className: "", value: "", children: "Jump to" }),
|
|
4486
4559
|
Array.from(
|
|
4487
4560
|
{ length: Math.max(0, pages - 10) },
|
|
4488
4561
|
(_, index) => index + 9
|
|
4489
|
-
).map((page) => /* @__PURE__ */
|
|
4562
|
+
).map((page) => /* @__PURE__ */ jsx65("option", { value: page, children: page }, page))
|
|
4490
4563
|
]
|
|
4491
4564
|
}
|
|
4492
4565
|
) })
|
|
4493
4566
|
] });
|
|
4494
4567
|
} else if (showLastPages) {
|
|
4495
4568
|
return /* @__PURE__ */ jsxs35(Fragment9, { children: [
|
|
4496
|
-
/* @__PURE__ */
|
|
4569
|
+
/* @__PURE__ */ jsx65(
|
|
4497
4570
|
Hyperlink,
|
|
4498
4571
|
{
|
|
4499
4572
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4501,7 +4574,7 @@ var DataList = (props) => {
|
|
|
4501
4574
|
children: "1"
|
|
4502
4575
|
}
|
|
4503
4576
|
),
|
|
4504
|
-
/* @__PURE__ */
|
|
4577
|
+
/* @__PURE__ */ jsx65(
|
|
4505
4578
|
Hyperlink,
|
|
4506
4579
|
{
|
|
4507
4580
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4509,21 +4582,21 @@ var DataList = (props) => {
|
|
|
4509
4582
|
children: "2"
|
|
4510
4583
|
}
|
|
4511
4584
|
),
|
|
4512
|
-
/* @__PURE__ */
|
|
4585
|
+
/* @__PURE__ */ jsx65("span", { className: "px-2 py-1", children: "..." }),
|
|
4513
4586
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
4514
|
-
(page) => /* @__PURE__ */
|
|
4587
|
+
(page) => /* @__PURE__ */ jsx65(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx65(
|
|
4515
4588
|
Hyperlink,
|
|
4516
4589
|
{
|
|
4517
4590
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4518
4591
|
href: builder.getNewPageUrl(page),
|
|
4519
4592
|
children: page
|
|
4520
4593
|
}
|
|
4521
|
-
) : /* @__PURE__ */
|
|
4594
|
+
) : /* @__PURE__ */ jsx65("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
4522
4595
|
)
|
|
4523
4596
|
] });
|
|
4524
4597
|
} else {
|
|
4525
4598
|
return /* @__PURE__ */ jsxs35(Fragment9, { children: [
|
|
4526
|
-
/* @__PURE__ */
|
|
4599
|
+
/* @__PURE__ */ jsx65(
|
|
4527
4600
|
Hyperlink,
|
|
4528
4601
|
{
|
|
4529
4602
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4531,7 +4604,7 @@ var DataList = (props) => {
|
|
|
4531
4604
|
children: "1"
|
|
4532
4605
|
}
|
|
4533
4606
|
),
|
|
4534
|
-
/* @__PURE__ */
|
|
4607
|
+
/* @__PURE__ */ jsx65(
|
|
4535
4608
|
Hyperlink,
|
|
4536
4609
|
{
|
|
4537
4610
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4539,20 +4612,20 @@ var DataList = (props) => {
|
|
|
4539
4612
|
children: "2"
|
|
4540
4613
|
}
|
|
4541
4614
|
),
|
|
4542
|
-
/* @__PURE__ */
|
|
4615
|
+
/* @__PURE__ */ jsx65("span", { className: "px-2 py-1", children: "..." }),
|
|
4543
4616
|
Array.from(
|
|
4544
4617
|
{ length: 5 },
|
|
4545
4618
|
(_, index) => activePageNumber - 2 + index
|
|
4546
|
-
).map((page) => /* @__PURE__ */
|
|
4619
|
+
).map((page) => /* @__PURE__ */ jsx65(React46.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx65(
|
|
4547
4620
|
Hyperlink,
|
|
4548
4621
|
{
|
|
4549
4622
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4550
4623
|
href: builder.getNewPageUrl(page),
|
|
4551
4624
|
children: page
|
|
4552
4625
|
}
|
|
4553
|
-
) : /* @__PURE__ */
|
|
4554
|
-
/* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4626
|
+
) : /* @__PURE__ */ jsx65("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
4627
|
+
/* @__PURE__ */ jsx65("span", { className: "px-2 py-1", children: "..." }),
|
|
4628
|
+
/* @__PURE__ */ jsx65(
|
|
4556
4629
|
Hyperlink,
|
|
4557
4630
|
{
|
|
4558
4631
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4560,7 +4633,7 @@ var DataList = (props) => {
|
|
|
4560
4633
|
children: pages - 1
|
|
4561
4634
|
}
|
|
4562
4635
|
),
|
|
4563
|
-
/* @__PURE__ */
|
|
4636
|
+
/* @__PURE__ */ jsx65(
|
|
4564
4637
|
Hyperlink,
|
|
4565
4638
|
{
|
|
4566
4639
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4568,7 +4641,7 @@ var DataList = (props) => {
|
|
|
4568
4641
|
children: pages
|
|
4569
4642
|
}
|
|
4570
4643
|
),
|
|
4571
|
-
/* @__PURE__ */
|
|
4644
|
+
/* @__PURE__ */ jsx65("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs35(
|
|
4572
4645
|
"select",
|
|
4573
4646
|
{
|
|
4574
4647
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4580,8 +4653,8 @@ var DataList = (props) => {
|
|
|
4580
4653
|
}
|
|
4581
4654
|
},
|
|
4582
4655
|
children: [
|
|
4583
|
-
/* @__PURE__ */
|
|
4584
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
4656
|
+
/* @__PURE__ */ jsx65("option", { value: "", children: "Jump to" }),
|
|
4657
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx65("option", { value: page, children: page }, page))
|
|
4585
4658
|
]
|
|
4586
4659
|
}
|
|
4587
4660
|
) })
|
|
@@ -4589,16 +4662,16 @@ var DataList = (props) => {
|
|
|
4589
4662
|
}
|
|
4590
4663
|
}
|
|
4591
4664
|
};
|
|
4592
|
-
return /* @__PURE__ */ jsxs35(
|
|
4665
|
+
return /* @__PURE__ */ jsxs35(React46.Fragment, { children: [
|
|
4593
4666
|
/* @__PURE__ */ jsxs35(ContentView_default, { isDataFound, children: [
|
|
4594
4667
|
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs35(
|
|
4595
4668
|
"div",
|
|
4596
4669
|
{
|
|
4597
4670
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200 sticky top-0`,
|
|
4598
4671
|
children: [
|
|
4599
|
-
props.title ? /* @__PURE__ */
|
|
4672
|
+
props.title ? /* @__PURE__ */ jsx65("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx65("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx65("div", {}),
|
|
4600
4673
|
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-3", children: [
|
|
4601
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4674
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx65(
|
|
4602
4675
|
InputControl_default,
|
|
4603
4676
|
{
|
|
4604
4677
|
name: filter.name,
|
|
@@ -4620,8 +4693,8 @@ var DataList = (props) => {
|
|
|
4620
4693
|
linkType: "Primary" /* Solid */,
|
|
4621
4694
|
href: props.addLinkHref,
|
|
4622
4695
|
children: [
|
|
4623
|
-
/* @__PURE__ */
|
|
4624
|
-
/* @__PURE__ */
|
|
4696
|
+
/* @__PURE__ */ jsx65(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4697
|
+
/* @__PURE__ */ jsx65("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
4625
4698
|
]
|
|
4626
4699
|
}
|
|
4627
4700
|
)
|
|
@@ -4629,8 +4702,8 @@ var DataList = (props) => {
|
|
|
4629
4702
|
]
|
|
4630
4703
|
}
|
|
4631
4704
|
),
|
|
4632
|
-
/* @__PURE__ */
|
|
4633
|
-
/* @__PURE__ */
|
|
4705
|
+
/* @__PURE__ */ jsx65("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs35("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
4706
|
+
/* @__PURE__ */ jsx65("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx65("tr", { children: props?.columns?.map((column) => {
|
|
4634
4707
|
let url = builder.getNewOrderByUrl(column.name);
|
|
4635
4708
|
let icon = "chevronUpDown";
|
|
4636
4709
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -4640,18 +4713,18 @@ var DataList = (props) => {
|
|
|
4640
4713
|
icon = "chevronUp";
|
|
4641
4714
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
4642
4715
|
}
|
|
4643
|
-
return /* @__PURE__ */
|
|
4716
|
+
return /* @__PURE__ */ jsx65(
|
|
4644
4717
|
"th",
|
|
4645
4718
|
{
|
|
4646
4719
|
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" : ""),
|
|
4647
|
-
children: /* @__PURE__ */
|
|
4720
|
+
children: /* @__PURE__ */ jsx65(
|
|
4648
4721
|
Hyperlink,
|
|
4649
4722
|
{
|
|
4650
4723
|
href: column.enableSorting ? url : void 0,
|
|
4651
4724
|
className: "!text-neutral-contrast ",
|
|
4652
4725
|
children: /* @__PURE__ */ jsxs35("span", { className: "flex items-center space-x-1", children: [
|
|
4653
|
-
/* @__PURE__ */
|
|
4654
|
-
column.enableSorting && /* @__PURE__ */
|
|
4726
|
+
/* @__PURE__ */ jsx65("span", { className: "text-black", children: column.label }),
|
|
4727
|
+
column.enableSorting && /* @__PURE__ */ jsx65(Icon_default, { className: "w-4 h-4", name: icon })
|
|
4655
4728
|
] })
|
|
4656
4729
|
}
|
|
4657
4730
|
)
|
|
@@ -4659,24 +4732,24 @@ var DataList = (props) => {
|
|
|
4659
4732
|
column.name
|
|
4660
4733
|
);
|
|
4661
4734
|
}) }) }),
|
|
4662
|
-
/* @__PURE__ */
|
|
4735
|
+
/* @__PURE__ */ jsx65("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
4663
4736
|
let validityClass = "";
|
|
4664
4737
|
console.log("dataitem", dataitem);
|
|
4665
4738
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
4666
4739
|
validityClass = "bg-alert-200";
|
|
4667
4740
|
}
|
|
4668
|
-
return /* @__PURE__ */
|
|
4741
|
+
return /* @__PURE__ */ jsx65("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
4669
4742
|
console.log("column", column);
|
|
4670
|
-
return /* @__PURE__ */
|
|
4743
|
+
return /* @__PURE__ */ jsx65(React46.Fragment, { children: /* @__PURE__ */ jsx65(
|
|
4671
4744
|
"td",
|
|
4672
4745
|
{
|
|
4673
4746
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
4674
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
4747
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx65(
|
|
4675
4748
|
Hyperlink,
|
|
4676
4749
|
{
|
|
4677
4750
|
className: "",
|
|
4678
4751
|
href: `https://${dataitem[column.name]}`,
|
|
4679
|
-
children: /* @__PURE__ */
|
|
4752
|
+
children: /* @__PURE__ */ jsx65(
|
|
4680
4753
|
ViewControl_default,
|
|
4681
4754
|
{
|
|
4682
4755
|
controlType: column.controlType,
|
|
@@ -4689,11 +4762,11 @@ var DataList = (props) => {
|
|
|
4689
4762
|
}
|
|
4690
4763
|
)
|
|
4691
4764
|
}
|
|
4692
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
4765
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx65(
|
|
4693
4766
|
Hyperlink,
|
|
4694
4767
|
{
|
|
4695
4768
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
4696
|
-
children: /* @__PURE__ */
|
|
4769
|
+
children: /* @__PURE__ */ jsx65(
|
|
4697
4770
|
ViewControl_default,
|
|
4698
4771
|
{
|
|
4699
4772
|
controlType: column.controlType,
|
|
@@ -4703,7 +4776,7 @@ var DataList = (props) => {
|
|
|
4703
4776
|
}
|
|
4704
4777
|
)
|
|
4705
4778
|
}
|
|
4706
|
-
) : /* @__PURE__ */
|
|
4779
|
+
) : /* @__PURE__ */ jsx65(
|
|
4707
4780
|
ViewControl_default,
|
|
4708
4781
|
{
|
|
4709
4782
|
controlType: column.controlType,
|
|
@@ -4717,10 +4790,10 @@ var DataList = (props) => {
|
|
|
4717
4790
|
}) }, index);
|
|
4718
4791
|
}) })
|
|
4719
4792
|
] }) }),
|
|
4720
|
-
/* @__PURE__ */
|
|
4721
|
-
/* @__PURE__ */
|
|
4793
|
+
/* @__PURE__ */ jsx65("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between", children: [
|
|
4794
|
+
/* @__PURE__ */ jsx65("div", { className: "text-gray-700", children: label }),
|
|
4722
4795
|
/* @__PURE__ */ jsxs35("div", { className: "flex space-x-2 items-center", children: [
|
|
4723
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
4796
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx65(
|
|
4724
4797
|
Hyperlink,
|
|
4725
4798
|
{
|
|
4726
4799
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -4728,9 +4801,9 @@ var DataList = (props) => {
|
|
|
4728
4801
|
children: "Prev"
|
|
4729
4802
|
}
|
|
4730
4803
|
),
|
|
4731
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
4804
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx65("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" }),
|
|
4732
4805
|
renderPageNumbers(),
|
|
4733
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
4806
|
+
activePageNumber < pages && /* @__PURE__ */ jsx65(
|
|
4734
4807
|
Hyperlink,
|
|
4735
4808
|
{
|
|
4736
4809
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -4738,7 +4811,7 @@ var DataList = (props) => {
|
|
|
4738
4811
|
children: "Next"
|
|
4739
4812
|
}
|
|
4740
4813
|
),
|
|
4741
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
4814
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx65("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
4742
4815
|
] })
|
|
4743
4816
|
] }) })
|
|
4744
4817
|
] }),
|
|
@@ -4748,9 +4821,9 @@ var DataList = (props) => {
|
|
|
4748
4821
|
{
|
|
4749
4822
|
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`,
|
|
4750
4823
|
children: [
|
|
4751
|
-
props.title ? /* @__PURE__ */
|
|
4824
|
+
props.title ? /* @__PURE__ */ jsx65("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx65("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx65("div", {}),
|
|
4752
4825
|
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-3", children: [
|
|
4753
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4826
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx65(
|
|
4754
4827
|
InputControl_default,
|
|
4755
4828
|
{
|
|
4756
4829
|
name: filter.name,
|
|
@@ -4772,8 +4845,8 @@ var DataList = (props) => {
|
|
|
4772
4845
|
linkType: "Primary" /* Solid */,
|
|
4773
4846
|
href: props.addLinkHref,
|
|
4774
4847
|
children: [
|
|
4775
|
-
/* @__PURE__ */
|
|
4776
|
-
/* @__PURE__ */
|
|
4848
|
+
/* @__PURE__ */ jsx65(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4849
|
+
/* @__PURE__ */ jsx65("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
4777
4850
|
]
|
|
4778
4851
|
}
|
|
4779
4852
|
)
|
|
@@ -4782,7 +4855,7 @@ var DataList = (props) => {
|
|
|
4782
4855
|
}
|
|
4783
4856
|
),
|
|
4784
4857
|
/* @__PURE__ */ jsxs35("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
4785
|
-
/* @__PURE__ */
|
|
4858
|
+
/* @__PURE__ */ jsx65("div", { children: /* @__PURE__ */ jsx65("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx65("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx65("tr", { children: props?.columns?.map((column) => {
|
|
4786
4859
|
let url = builder.getNewOrderByUrl(column.name);
|
|
4787
4860
|
let icon = "chevronUpDown";
|
|
4788
4861
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -4792,18 +4865,18 @@ var DataList = (props) => {
|
|
|
4792
4865
|
icon = "chevronUp";
|
|
4793
4866
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
4794
4867
|
}
|
|
4795
|
-
return /* @__PURE__ */
|
|
4868
|
+
return /* @__PURE__ */ jsx65(
|
|
4796
4869
|
"th",
|
|
4797
4870
|
{
|
|
4798
4871
|
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" : ""),
|
|
4799
|
-
children: /* @__PURE__ */
|
|
4872
|
+
children: /* @__PURE__ */ jsx65(
|
|
4800
4873
|
Hyperlink,
|
|
4801
4874
|
{
|
|
4802
4875
|
href: column.enableSorting ? url : void 0,
|
|
4803
4876
|
className: "text-body-950",
|
|
4804
4877
|
children: /* @__PURE__ */ jsxs35("span", { className: "flex items-center space-x-1", children: [
|
|
4805
|
-
/* @__PURE__ */
|
|
4806
|
-
column.enableSorting && /* @__PURE__ */
|
|
4878
|
+
/* @__PURE__ */ jsx65("span", { children: column.label }),
|
|
4879
|
+
column.enableSorting && /* @__PURE__ */ jsx65(Icon_default, { className: "w-4 h-4", name: icon })
|
|
4807
4880
|
] })
|
|
4808
4881
|
}
|
|
4809
4882
|
)
|
|
@@ -4811,7 +4884,7 @@ var DataList = (props) => {
|
|
|
4811
4884
|
column.name
|
|
4812
4885
|
);
|
|
4813
4886
|
}) }) }) }) }),
|
|
4814
|
-
/* @__PURE__ */
|
|
4887
|
+
/* @__PURE__ */ jsx65("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
4815
4888
|
] })
|
|
4816
4889
|
] })
|
|
4817
4890
|
] });
|
|
@@ -4819,9 +4892,9 @@ var DataList = (props) => {
|
|
|
4819
4892
|
var DataList_default = DataList;
|
|
4820
4893
|
|
|
4821
4894
|
// src/components/dataForm/DataListRenderer.tsx
|
|
4822
|
-
import
|
|
4895
|
+
import React47, { useState as useState10, useEffect as useEffect11 } from "react";
|
|
4823
4896
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
4824
|
-
import { jsx as
|
|
4897
|
+
import { jsx as jsx66, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4825
4898
|
var viewControlMap = {
|
|
4826
4899
|
number: ViewControlTypes.number,
|
|
4827
4900
|
lineText: ViewControlTypes.lineText,
|
|
@@ -4875,14 +4948,14 @@ var DataListRenderer = ({
|
|
|
4875
4948
|
widgetProps
|
|
4876
4949
|
}) => {
|
|
4877
4950
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
4878
|
-
const [columns, setColumns] =
|
|
4879
|
-
const [dataset, setDataset] =
|
|
4880
|
-
const [filter, setFilters] =
|
|
4881
|
-
const [addLinkHref, setAddLinkHref] =
|
|
4882
|
-
const [addLinkText, setAddLinkText] =
|
|
4883
|
-
const [serviceRoute, setServiceRoute] =
|
|
4951
|
+
const [columns, setColumns] = useState10([]);
|
|
4952
|
+
const [dataset, setDataset] = useState10();
|
|
4953
|
+
const [filter, setFilters] = useState10([]);
|
|
4954
|
+
const [addLinkHref, setAddLinkHref] = useState10("");
|
|
4955
|
+
const [addLinkText, setAddLinkText] = useState10("");
|
|
4956
|
+
const [serviceRoute, setServiceRoute] = useState10("");
|
|
4884
4957
|
const pathname = usePathname2();
|
|
4885
|
-
|
|
4958
|
+
useEffect11(() => {
|
|
4886
4959
|
if (!formDefinition) return;
|
|
4887
4960
|
setColumns(mapApiToColumns(formDefinition));
|
|
4888
4961
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -4895,7 +4968,7 @@ var DataListRenderer = ({
|
|
|
4895
4968
|
setAddLinkHref(resolvedAddLinkHref);
|
|
4896
4969
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
4897
4970
|
}, [formDefinition, params]);
|
|
4898
|
-
|
|
4971
|
+
useEffect11(() => {
|
|
4899
4972
|
const fetchData = async () => {
|
|
4900
4973
|
if (!serviceRoute) return;
|
|
4901
4974
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -4907,12 +4980,12 @@ var DataListRenderer = ({
|
|
|
4907
4980
|
};
|
|
4908
4981
|
fetchData();
|
|
4909
4982
|
}, [serviceRoute, query, params]);
|
|
4910
|
-
const [tabItem, setTabItem] =
|
|
4983
|
+
const [tabItem, setTabItem] = useState10();
|
|
4911
4984
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
4912
4985
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
4913
|
-
return /* @__PURE__ */ jsxs36(
|
|
4914
|
-
widgetProps && /* @__PURE__ */
|
|
4915
|
-
/* @__PURE__ */
|
|
4986
|
+
return /* @__PURE__ */ jsxs36(React47.Fragment, { children: [
|
|
4987
|
+
widgetProps && /* @__PURE__ */ jsx66(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
4988
|
+
/* @__PURE__ */ jsx66(
|
|
4916
4989
|
DataList_default,
|
|
4917
4990
|
{
|
|
4918
4991
|
addLinkHref,
|
|
@@ -4931,10 +5004,10 @@ var DataListRenderer = ({
|
|
|
4931
5004
|
var DataListRenderer_default = DataListRenderer;
|
|
4932
5005
|
|
|
4933
5006
|
// src/components/dataForm/DataForm.tsx
|
|
4934
|
-
import
|
|
5007
|
+
import React49, { useCallback as useCallback5, useEffect as useEffect12, useReducer as useReducer3, useRef as useRef4 } from "react";
|
|
4935
5008
|
|
|
4936
5009
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
4937
|
-
import
|
|
5010
|
+
import React48, { useCallback as useCallback4 } from "react";
|
|
4938
5011
|
|
|
4939
5012
|
// src/components/dataForm/StyleTypes.tsx
|
|
4940
5013
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -4957,7 +5030,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
4957
5030
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
4958
5031
|
|
|
4959
5032
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
4960
|
-
import { jsx as
|
|
5033
|
+
import { jsx as jsx67, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4961
5034
|
var DataFormChildSection = (props) => {
|
|
4962
5035
|
const { section } = props;
|
|
4963
5036
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -5025,14 +5098,14 @@ var DataFormChildSection = (props) => {
|
|
|
5025
5098
|
childItemsToRender,
|
|
5026
5099
|
allChildItems: childItems
|
|
5027
5100
|
});
|
|
5028
|
-
return /* @__PURE__ */
|
|
5029
|
-
section.sectionTitle && /* @__PURE__ */
|
|
5030
|
-
/* @__PURE__ */
|
|
5031
|
-
/* @__PURE__ */
|
|
5032
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */
|
|
5101
|
+
return /* @__PURE__ */ jsx67(React48.Fragment, { children: /* @__PURE__ */ jsxs37("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
5102
|
+
section.sectionTitle && /* @__PURE__ */ jsx67("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
5103
|
+
/* @__PURE__ */ jsx67("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
5104
|
+
/* @__PURE__ */ jsx67("div", { children: /* @__PURE__ */ jsxs37("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
5105
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ jsx67("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
5033
5106
|
return /* @__PURE__ */ jsxs37("tr", { className: "", children: [
|
|
5034
5107
|
sectionRow.elements.map((field, index) => {
|
|
5035
|
-
return /* @__PURE__ */
|
|
5108
|
+
return /* @__PURE__ */ jsx67(
|
|
5036
5109
|
"th",
|
|
5037
5110
|
{
|
|
5038
5111
|
className: "py-3 font-normal text-left",
|
|
@@ -5041,13 +5114,13 @@ var DataFormChildSection = (props) => {
|
|
|
5041
5114
|
field.name
|
|
5042
5115
|
);
|
|
5043
5116
|
}),
|
|
5044
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5117
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx67("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
5045
5118
|
] }, sectionRowIndex);
|
|
5046
5119
|
}) }),
|
|
5047
|
-
/* @__PURE__ */
|
|
5120
|
+
/* @__PURE__ */ jsx67("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
5048
5121
|
const { item, originalIndex } = visibleItem;
|
|
5049
5122
|
const rowKey = originalIndex;
|
|
5050
|
-
return /* @__PURE__ */
|
|
5123
|
+
return /* @__PURE__ */ jsx67(React48.Fragment, { children: section.sectionRows.map(
|
|
5051
5124
|
(sectionRow, sectionRowIndex) => {
|
|
5052
5125
|
return /* @__PURE__ */ jsxs37(
|
|
5053
5126
|
"tr",
|
|
@@ -5055,7 +5128,7 @@ var DataFormChildSection = (props) => {
|
|
|
5055
5128
|
className: "",
|
|
5056
5129
|
children: [
|
|
5057
5130
|
sectionRow.elements.map((field, index) => {
|
|
5058
|
-
return /* @__PURE__ */
|
|
5131
|
+
return /* @__PURE__ */ jsx67("td", { children: /* @__PURE__ */ jsx67("div", { className: "flex-1", children: /* @__PURE__ */ jsx67("div", { className: "w-11/12", children: /* @__PURE__ */ jsx67(
|
|
5059
5132
|
InputControl_default,
|
|
5060
5133
|
{
|
|
5061
5134
|
index: filteredIndex,
|
|
@@ -5075,7 +5148,7 @@ var DataFormChildSection = (props) => {
|
|
|
5075
5148
|
}
|
|
5076
5149
|
) }) }) }, field.name);
|
|
5077
5150
|
}),
|
|
5078
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5151
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx67("td", { children: /* @__PURE__ */ jsx67(
|
|
5079
5152
|
ClientButton_default,
|
|
5080
5153
|
{
|
|
5081
5154
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -5084,7 +5157,7 @@ var DataFormChildSection = (props) => {
|
|
|
5084
5157
|
},
|
|
5085
5158
|
dataRole: "delete",
|
|
5086
5159
|
tabIndex: -1,
|
|
5087
|
-
children: /* @__PURE__ */
|
|
5160
|
+
children: /* @__PURE__ */ jsx67(
|
|
5088
5161
|
Icon_default,
|
|
5089
5162
|
{
|
|
5090
5163
|
className: "w-4 h-4",
|
|
@@ -5101,7 +5174,7 @@ var DataFormChildSection = (props) => {
|
|
|
5101
5174
|
) }, rowKey);
|
|
5102
5175
|
}) })
|
|
5103
5176
|
] }) }),
|
|
5104
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5177
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx67("div", { className: "ml-1", children: /* @__PURE__ */ jsx67(
|
|
5105
5178
|
ClientButton_default,
|
|
5106
5179
|
{
|
|
5107
5180
|
ButtonType: "Link" /* Link */,
|
|
@@ -5116,7 +5189,7 @@ var DataFormChildSection = (props) => {
|
|
|
5116
5189
|
var DataFormChildSection_default = DataFormChildSection;
|
|
5117
5190
|
|
|
5118
5191
|
// src/components/dataForm/DataForm.tsx
|
|
5119
|
-
import { jsx as
|
|
5192
|
+
import { jsx as jsx68, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5120
5193
|
var DataForm = (props) => {
|
|
5121
5194
|
const formRef = useRef4(null);
|
|
5122
5195
|
console.log(props.dataItem, "dssads");
|
|
@@ -5213,7 +5286,7 @@ var DataForm = (props) => {
|
|
|
5213
5286
|
console.error("Error fetching data:", error);
|
|
5214
5287
|
}
|
|
5215
5288
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
5216
|
-
|
|
5289
|
+
useEffect12(() => {
|
|
5217
5290
|
fetchData();
|
|
5218
5291
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
5219
5292
|
function replacePlaceholders(template, context, params) {
|
|
@@ -5308,7 +5381,7 @@ var DataForm = (props) => {
|
|
|
5308
5381
|
return { isSuccessful: true };
|
|
5309
5382
|
}
|
|
5310
5383
|
}, [formState, props]);
|
|
5311
|
-
|
|
5384
|
+
useEffect12(() => {
|
|
5312
5385
|
if (props.dataItem) {
|
|
5313
5386
|
dispatch({
|
|
5314
5387
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -5336,19 +5409,19 @@ var DataForm = (props) => {
|
|
|
5336
5409
|
return false;
|
|
5337
5410
|
}
|
|
5338
5411
|
}
|
|
5339
|
-
return /* @__PURE__ */
|
|
5340
|
-
props.title && /* @__PURE__ */
|
|
5412
|
+
return /* @__PURE__ */ jsx68(React49.Fragment, { children: /* @__PURE__ */ jsxs38("div", { className: "flex-grow flex flex-col", children: [
|
|
5413
|
+
props.title && /* @__PURE__ */ jsx68("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__ */ jsxs38(
|
|
5341
5414
|
"div",
|
|
5342
5415
|
{
|
|
5343
5416
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
5344
5417
|
onClick: () => window.history.back(),
|
|
5345
5418
|
children: [
|
|
5346
|
-
/* @__PURE__ */
|
|
5347
|
-
/* @__PURE__ */
|
|
5419
|
+
/* @__PURE__ */ jsx68(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
5420
|
+
/* @__PURE__ */ jsx68("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
5348
5421
|
]
|
|
5349
5422
|
}
|
|
5350
5423
|
) }),
|
|
5351
|
-
/* @__PURE__ */
|
|
5424
|
+
/* @__PURE__ */ jsx68(
|
|
5352
5425
|
"form",
|
|
5353
5426
|
{
|
|
5354
5427
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -5369,8 +5442,8 @@ var DataForm = (props) => {
|
|
|
5369
5442
|
}
|
|
5370
5443
|
}
|
|
5371
5444
|
},
|
|
5372
|
-
children: /* @__PURE__ */
|
|
5373
|
-
return /* @__PURE__ */
|
|
5445
|
+
children: /* @__PURE__ */ jsx68("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
5446
|
+
return /* @__PURE__ */ jsx68(React49.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs38("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
5374
5447
|
section.sectionRows?.map(
|
|
5375
5448
|
(sectionRow, sectionRowIndex) => {
|
|
5376
5449
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -5381,14 +5454,14 @@ var DataForm = (props) => {
|
|
|
5381
5454
|
sectionRow.visible
|
|
5382
5455
|
);
|
|
5383
5456
|
}
|
|
5384
|
-
return /* @__PURE__ */
|
|
5457
|
+
return /* @__PURE__ */ jsx68(React49.Fragment, { children: isVisible && /* @__PURE__ */ jsx68("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
5385
5458
|
return /* @__PURE__ */ jsxs38(
|
|
5386
5459
|
"div",
|
|
5387
5460
|
{
|
|
5388
5461
|
className: sectionRow.grow ? "grow" : "",
|
|
5389
5462
|
children: [
|
|
5390
|
-
/* @__PURE__ */
|
|
5391
|
-
/* @__PURE__ */
|
|
5463
|
+
/* @__PURE__ */ jsx68("div", { children: field.controlType }),
|
|
5464
|
+
/* @__PURE__ */ jsx68(
|
|
5392
5465
|
InputControl_default,
|
|
5393
5466
|
{
|
|
5394
5467
|
name: field.name,
|
|
@@ -5418,12 +5491,12 @@ var DataForm = (props) => {
|
|
|
5418
5491
|
}) }) }, sectionRowIndex);
|
|
5419
5492
|
}
|
|
5420
5493
|
),
|
|
5421
|
-
/* @__PURE__ */
|
|
5494
|
+
/* @__PURE__ */ jsx68("div", { children: section.childSections?.map(
|
|
5422
5495
|
(childSection, childSectionIndex) => {
|
|
5423
|
-
return /* @__PURE__ */
|
|
5496
|
+
return /* @__PURE__ */ jsx68("div", { children: childSection.name && evalutateCondition(
|
|
5424
5497
|
formState.inputValues,
|
|
5425
5498
|
childSection.visible
|
|
5426
|
-
) && /* @__PURE__ */
|
|
5499
|
+
) && /* @__PURE__ */ jsx68(
|
|
5427
5500
|
DataFormChildSection_default,
|
|
5428
5501
|
{
|
|
5429
5502
|
section: childSection,
|
|
@@ -5439,7 +5512,7 @@ var DataForm = (props) => {
|
|
|
5439
5512
|
}
|
|
5440
5513
|
),
|
|
5441
5514
|
/* @__PURE__ */ jsxs38("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
5442
|
-
/* @__PURE__ */
|
|
5515
|
+
/* @__PURE__ */ jsx68("div", { children: props.additionalActions && /* @__PURE__ */ jsx68(
|
|
5443
5516
|
Button_default,
|
|
5444
5517
|
{
|
|
5445
5518
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5447,7 +5520,7 @@ var DataForm = (props) => {
|
|
|
5447
5520
|
children: props.additionalActions.title
|
|
5448
5521
|
}
|
|
5449
5522
|
) }),
|
|
5450
|
-
/* @__PURE__ */
|
|
5523
|
+
/* @__PURE__ */ jsx68("div", { children: props.onDelete && /* @__PURE__ */ jsx68(
|
|
5451
5524
|
Button_default,
|
|
5452
5525
|
{
|
|
5453
5526
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5458,7 +5531,7 @@ var DataForm = (props) => {
|
|
|
5458
5531
|
children: "Delete"
|
|
5459
5532
|
}
|
|
5460
5533
|
) }),
|
|
5461
|
-
/* @__PURE__ */
|
|
5534
|
+
/* @__PURE__ */ jsx68("div", { children: props.onClick && /* @__PURE__ */ jsx68(
|
|
5462
5535
|
Button_default,
|
|
5463
5536
|
{
|
|
5464
5537
|
onValidate,
|
|
@@ -5475,7 +5548,7 @@ var DataForm = (props) => {
|
|
|
5475
5548
|
var DataForm_default = DataForm;
|
|
5476
5549
|
|
|
5477
5550
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
5478
|
-
import { jsx as
|
|
5551
|
+
import { jsx as jsx69, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5479
5552
|
function getAction(actions, code) {
|
|
5480
5553
|
return actions?.find((a) => a.actionCode === code);
|
|
5481
5554
|
}
|
|
@@ -5502,8 +5575,8 @@ var DataFormRenderer = ({
|
|
|
5502
5575
|
);
|
|
5503
5576
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
5504
5577
|
return /* @__PURE__ */ jsxs39("div", { className: "flex-grow flex flex-col", children: [
|
|
5505
|
-
widgetProps && /* @__PURE__ */
|
|
5506
|
-
/* @__PURE__ */
|
|
5578
|
+
widgetProps && /* @__PURE__ */ jsx69(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
5579
|
+
/* @__PURE__ */ jsx69(
|
|
5507
5580
|
DataForm_default,
|
|
5508
5581
|
{
|
|
5509
5582
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|