@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260326063413 → 0.8.1-dev.20260326064607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +477 -466
- package/dist/index.mjs +375 -364
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -302,36 +302,47 @@ var ProgressIndicator = (props) => {
|
|
|
302
302
|
};
|
|
303
303
|
var ProgressIndicator_default = ProgressIndicator;
|
|
304
304
|
|
|
305
|
-
// src/components/controls/view/
|
|
305
|
+
// src/components/controls/view/AiGeneratedSummary.tsx
|
|
306
306
|
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
307
|
-
var
|
|
308
|
-
(
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
]
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
307
|
+
var AiGeneratedSummary = (props) => {
|
|
308
|
+
const lines = props.value?.split("\n").filter((line) => line.trim() !== "") || [];
|
|
309
|
+
return /* @__PURE__ */ jsxs5("details", { className: "group rounded-xl border-2 bg-white shadow-sm border-p overflow-hidden", children: [
|
|
310
|
+
/* @__PURE__ */ jsx8("summary", { className: "flex items-start justify-between cursor-pointer list-none", children: /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-3 ", children: [
|
|
311
|
+
/* @__PURE__ */ jsx8("div", { className: "bg-primary-base bg-transparent rounded mt-1 p-1", children: /* @__PURE__ */ jsx8("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5", children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z" }) }) }),
|
|
312
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
313
|
+
/* @__PURE__ */ jsx8("h3", { className: "text-lg font-semibold ", children: "Quick Read" }),
|
|
314
|
+
/* @__PURE__ */ jsx8("p", { className: "text-sm text-gray-500 mb-0", children: "Summary is AI-generated, author-reviewed" })
|
|
315
|
+
] })
|
|
316
|
+
] }) }),
|
|
317
|
+
/* @__PURE__ */ jsx8("div", { children: /* @__PURE__ */ jsx8("ul", { className: "list-disc pl-6 space-y-3 text-gray-700", children: lines.map((line, index) => /* @__PURE__ */ jsx8("li", { className: "m-0", children: line }, index)) }) })
|
|
318
|
+
] });
|
|
319
|
+
};
|
|
320
|
+
var AiGeneratedSummary_default = AiGeneratedSummary;
|
|
321
|
+
|
|
322
|
+
// src/components/controls/view/ViewControl.tsx
|
|
323
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
324
|
+
var ViewControl = (props) => {
|
|
325
|
+
const ControlComponents = {
|
|
326
|
+
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
327
|
+
// [ViewControlTypes.asset]: Asset,
|
|
328
|
+
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
329
|
+
[ViewControlTypes_default.money]: MoneyView_default,
|
|
330
|
+
[ViewControlTypes_default.date]: DateView_default,
|
|
331
|
+
[ViewControlTypes_default.time]: DateView_default,
|
|
332
|
+
[ViewControlTypes_default.datetime]: DateView_default,
|
|
333
|
+
[ViewControlTypes_default.number]: NumberView_default,
|
|
334
|
+
[ViewControlTypes_default.multilineText]: MultilineTextView_default,
|
|
335
|
+
[ViewControlTypes_default.moneyText]: MoneyView_default,
|
|
336
|
+
[ViewControlTypes_default.percentage]: PercentageView_default,
|
|
337
|
+
// [ViewControlTypes.statusBg]: StatusBg,
|
|
338
|
+
[ViewControlTypes_default.progressIndicator]: ProgressIndicator_default,
|
|
339
|
+
// [ViewControlTypes.timeUntilStarts]: TimeUntilStarts,
|
|
340
|
+
// [ViewControlTypes.timeUntilStartsStyled]: TimeUntilStartsStyled,
|
|
341
|
+
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default
|
|
342
|
+
};
|
|
343
|
+
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
344
|
+
return /* @__PURE__ */ jsx9(React9.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx9(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
345
|
+
};
|
|
335
346
|
var ViewControl_default = ViewControl;
|
|
336
347
|
|
|
337
348
|
// src/components/controls/edit/InputControl.tsx
|
|
@@ -339,7 +350,7 @@ import React29 from "react";
|
|
|
339
350
|
|
|
340
351
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
341
352
|
import React10 from "react";
|
|
342
|
-
import { jsx as
|
|
353
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
343
354
|
var MultilineTextInput = (props) => {
|
|
344
355
|
const textChangeHandler = (event) => {
|
|
345
356
|
const text = event.target.value;
|
|
@@ -358,11 +369,11 @@ var MultilineTextInput = (props) => {
|
|
|
358
369
|
if (props.value !== void 0 && props.value !== null) {
|
|
359
370
|
value = props.value;
|
|
360
371
|
}
|
|
361
|
-
return /* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ jsx10(React10.Fragment, { children: /* @__PURE__ */ jsxs6("label", { className: "block mb-1", children: [
|
|
373
|
+
/* @__PURE__ */ jsx10("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
363
374
|
" ",
|
|
364
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */
|
|
375
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx10("span", { className: "text-alert", children: "*" }),
|
|
376
|
+
/* @__PURE__ */ jsx10(
|
|
366
377
|
"textarea",
|
|
367
378
|
{
|
|
368
379
|
name: props.name,
|
|
@@ -379,14 +390,14 @@ var MultilineTextInput = (props) => {
|
|
|
379
390
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
380
391
|
}
|
|
381
392
|
),
|
|
382
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ jsx10("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
383
394
|
] }) });
|
|
384
395
|
};
|
|
385
396
|
var MultilineTextInput_default = MultilineTextInput;
|
|
386
397
|
|
|
387
398
|
// src/components/controls/edit/LineTextInput.tsx
|
|
388
399
|
import React11 from "react";
|
|
389
|
-
import { jsx as
|
|
400
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
390
401
|
var LineTextInput = (props) => {
|
|
391
402
|
const textChangeHandler = (event) => {
|
|
392
403
|
const text = event.target.value;
|
|
@@ -405,11 +416,11 @@ var LineTextInput = (props) => {
|
|
|
405
416
|
if (props.value !== void 0 && props.value !== null) {
|
|
406
417
|
value = props.value;
|
|
407
418
|
}
|
|
408
|
-
return /* @__PURE__ */
|
|
409
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
419
|
+
return /* @__PURE__ */ jsx11(React11.Fragment, { children: /* @__PURE__ */ jsxs7("label", { className: "block", children: [
|
|
420
|
+
props?.attributes?.label && /* @__PURE__ */ jsx11("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
410
421
|
" ",
|
|
411
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
422
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx11("span", { className: "text-alert", children: "*" }),
|
|
423
|
+
/* @__PURE__ */ jsx11(
|
|
413
424
|
"input",
|
|
414
425
|
{
|
|
415
426
|
type: "text",
|
|
@@ -431,14 +442,14 @@ var LineTextInput = (props) => {
|
|
|
431
442
|
`
|
|
432
443
|
}
|
|
433
444
|
),
|
|
434
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
435
446
|
] }) });
|
|
436
447
|
};
|
|
437
448
|
var LineTextInput_default = LineTextInput;
|
|
438
449
|
|
|
439
450
|
// src/components/controls/edit/MoneyInput.tsx
|
|
440
451
|
import React12 from "react";
|
|
441
|
-
import { jsx as
|
|
452
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
442
453
|
var MoneyInput = (props) => {
|
|
443
454
|
const textChangeHandler = (event) => {
|
|
444
455
|
const rawValue = event.target.value;
|
|
@@ -467,11 +478,11 @@ var MoneyInput = (props) => {
|
|
|
467
478
|
e.preventDefault();
|
|
468
479
|
}
|
|
469
480
|
};
|
|
470
|
-
return /* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
481
|
+
return /* @__PURE__ */ jsx12(React12.Fragment, { children: /* @__PURE__ */ jsxs8("label", { className: "block mb-1", children: [
|
|
482
|
+
/* @__PURE__ */ jsx12("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
472
483
|
" ",
|
|
473
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */
|
|
484
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx12("span", { className: "text-alert", children: "*" }),
|
|
485
|
+
/* @__PURE__ */ jsx12(
|
|
475
486
|
"input",
|
|
476
487
|
{
|
|
477
488
|
type: "number",
|
|
@@ -491,7 +502,7 @@ var MoneyInput = (props) => {
|
|
|
491
502
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
492
503
|
}
|
|
493
504
|
),
|
|
494
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ jsx12("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
495
506
|
] }) });
|
|
496
507
|
};
|
|
497
508
|
var MoneyInput_default = MoneyInput;
|
|
@@ -522,7 +533,7 @@ var InputControlType_default = InputControlType;
|
|
|
522
533
|
|
|
523
534
|
// src/components/controls/edit/Select.tsx
|
|
524
535
|
import { useState, useEffect } from "react";
|
|
525
|
-
import { jsx as
|
|
536
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
526
537
|
var Select = (props) => {
|
|
527
538
|
const [list, setList] = useState([]);
|
|
528
539
|
const getSafeValue = (val) => {
|
|
@@ -581,8 +592,8 @@ var Select = (props) => {
|
|
|
581
592
|
]);
|
|
582
593
|
const value = getSafeValue(props.value);
|
|
583
594
|
return /* @__PURE__ */ jsxs9("label", { className: "block", children: [
|
|
584
|
-
props.attributes?.label && /* @__PURE__ */
|
|
585
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */
|
|
595
|
+
props.attributes?.label && /* @__PURE__ */ jsx13("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
596
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "text-alert", children: "*" }),
|
|
586
597
|
/* @__PURE__ */ jsxs9(
|
|
587
598
|
"select",
|
|
588
599
|
{
|
|
@@ -594,23 +605,23 @@ var Select = (props) => {
|
|
|
594
605
|
disabled: props.attributes?.readOnly,
|
|
595
606
|
className: "peer 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",
|
|
596
607
|
children: [
|
|
597
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ jsx13("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
598
609
|
list.map((item, index) => {
|
|
599
610
|
const keyField = props.dataKeyFieldName;
|
|
600
611
|
const textField = props.dataTextFieldName;
|
|
601
|
-
return /* @__PURE__ */
|
|
612
|
+
return /* @__PURE__ */ jsx13("option", { value: item[keyField], children: item[textField] }, index);
|
|
602
613
|
})
|
|
603
614
|
]
|
|
604
615
|
}
|
|
605
616
|
),
|
|
606
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ jsx13("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
607
618
|
] });
|
|
608
619
|
};
|
|
609
620
|
var Select_default = Select;
|
|
610
621
|
|
|
611
622
|
// src/components/controls/edit/PercentageInput.tsx
|
|
612
623
|
import React14 from "react";
|
|
613
|
-
import { jsx as
|
|
624
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
614
625
|
var PercentageInput = (props) => {
|
|
615
626
|
const textChangeHandler = (event) => {
|
|
616
627
|
const rawValue = event.target.value;
|
|
@@ -639,11 +650,11 @@ var PercentageInput = (props) => {
|
|
|
639
650
|
e.preventDefault();
|
|
640
651
|
}
|
|
641
652
|
};
|
|
642
|
-
return /* @__PURE__ */
|
|
643
|
-
/* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ jsx14(React14.Fragment, { children: /* @__PURE__ */ jsxs10("label", { className: "block mb-1", children: [
|
|
654
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
644
655
|
" ",
|
|
645
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
646
|
-
/* @__PURE__ */
|
|
656
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "text-alert", children: "*" }),
|
|
657
|
+
/* @__PURE__ */ jsx14(
|
|
647
658
|
"input",
|
|
648
659
|
{
|
|
649
660
|
type: "number",
|
|
@@ -662,14 +673,14 @@ var PercentageInput = (props) => {
|
|
|
662
673
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
663
674
|
}
|
|
664
675
|
),
|
|
665
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
666
677
|
] }) });
|
|
667
678
|
};
|
|
668
679
|
var PercentageInput_default = PercentageInput;
|
|
669
680
|
|
|
670
681
|
// src/components/controls/edit/PhoneInput.tsx
|
|
671
682
|
import React15 from "react";
|
|
672
|
-
import { jsx as
|
|
683
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
673
684
|
var PhoneInput = (props) => {
|
|
674
685
|
const textChangeHandler = (event) => {
|
|
675
686
|
const text = event.target.value;
|
|
@@ -688,11 +699,11 @@ var PhoneInput = (props) => {
|
|
|
688
699
|
if (props.value !== void 0 && props.value !== null) {
|
|
689
700
|
value = props.value;
|
|
690
701
|
}
|
|
691
|
-
return /* @__PURE__ */
|
|
692
|
-
/* @__PURE__ */
|
|
702
|
+
return /* @__PURE__ */ jsx15(React15.Fragment, { children: /* @__PURE__ */ jsxs11("label", { className: "block mb-1", children: [
|
|
703
|
+
/* @__PURE__ */ jsx15("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
693
704
|
/* @__PURE__ */ jsxs11("div", { className: "flex items-center bg-gray-100 rounded border border-gray-300 \n focus-within:border-indigo-300 focus-within:ring focus-within:ring-indigo-200 focus-within:ring-opacity-50", children: [
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ jsx15("span", { className: "px-3 text-gray-700", children: props.prefix }),
|
|
706
|
+
/* @__PURE__ */ jsx15(
|
|
696
707
|
"input",
|
|
697
708
|
{
|
|
698
709
|
type: "text",
|
|
@@ -710,14 +721,14 @@ var PhoneInput = (props) => {
|
|
|
710
721
|
}
|
|
711
722
|
)
|
|
712
723
|
] }),
|
|
713
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
714
725
|
] }) });
|
|
715
726
|
};
|
|
716
727
|
var PhoneInput_default = PhoneInput;
|
|
717
728
|
|
|
718
729
|
// src/components/controls/edit/NumberInput.tsx
|
|
719
730
|
import React16 from "react";
|
|
720
|
-
import { jsx as
|
|
731
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
721
732
|
var NumberInput = (props) => {
|
|
722
733
|
const textChangeHandler = (event) => {
|
|
723
734
|
const text = event.target.value;
|
|
@@ -740,11 +751,11 @@ var NumberInput = (props) => {
|
|
|
740
751
|
if (props.value !== void 0 && props.value !== null) {
|
|
741
752
|
value = props.value;
|
|
742
753
|
}
|
|
743
|
-
return /* @__PURE__ */
|
|
744
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
754
|
+
return /* @__PURE__ */ jsx16(React16.Fragment, { children: /* @__PURE__ */ jsxs12("label", { className: "block", children: [
|
|
755
|
+
props?.attributes?.label && /* @__PURE__ */ jsx16("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
745
756
|
" ",
|
|
746
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
747
|
-
/* @__PURE__ */
|
|
757
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx16("span", { className: "text-alert", children: "*" }),
|
|
758
|
+
/* @__PURE__ */ jsx16(
|
|
748
759
|
"input",
|
|
749
760
|
{
|
|
750
761
|
type: "number",
|
|
@@ -763,14 +774,14 @@ var NumberInput = (props) => {
|
|
|
763
774
|
className: "peer py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
764
775
|
}
|
|
765
776
|
),
|
|
766
|
-
/* @__PURE__ */
|
|
777
|
+
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
767
778
|
] }) });
|
|
768
779
|
};
|
|
769
780
|
var NumberInput_default = NumberInput;
|
|
770
781
|
|
|
771
782
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
772
783
|
import React17 from "react";
|
|
773
|
-
import { jsx as
|
|
784
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
774
785
|
var CheckboxInput = (props) => {
|
|
775
786
|
const textChangeHandler = (event) => {
|
|
776
787
|
let text = event.target.checked;
|
|
@@ -789,11 +800,11 @@ var CheckboxInput = (props) => {
|
|
|
789
800
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
790
801
|
value = true;
|
|
791
802
|
}
|
|
792
|
-
return /* @__PURE__ */
|
|
793
|
-
/* @__PURE__ */
|
|
803
|
+
return /* @__PURE__ */ jsx17(React17.Fragment, { children: /* @__PURE__ */ jsxs13("label", { className: "block mb-1", children: [
|
|
804
|
+
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
794
805
|
" ",
|
|
795
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
806
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "text-alert", children: "*" }),
|
|
807
|
+
/* @__PURE__ */ jsx17(
|
|
797
808
|
"input",
|
|
798
809
|
{
|
|
799
810
|
type: "checkbox",
|
|
@@ -810,14 +821,14 @@ var CheckboxInput = (props) => {
|
|
|
810
821
|
className: "peer mt-1 py-1.5 block 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 "
|
|
811
822
|
}
|
|
812
823
|
),
|
|
813
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
814
825
|
] }) });
|
|
815
826
|
};
|
|
816
827
|
var CheckboxInput_default = CheckboxInput;
|
|
817
828
|
|
|
818
829
|
// src/components/controls/edit/OtpInput.tsx
|
|
819
830
|
import React18 from "react";
|
|
820
|
-
import { jsx as
|
|
831
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
821
832
|
var OtpInput = (props) => {
|
|
822
833
|
const textChangeHandler = (event) => {
|
|
823
834
|
const text = event.target.value;
|
|
@@ -839,9 +850,9 @@ var OtpInput = (props) => {
|
|
|
839
850
|
if (props.value !== void 0 && props.value !== null) {
|
|
840
851
|
value = props.value;
|
|
841
852
|
}
|
|
842
|
-
return /* @__PURE__ */
|
|
843
|
-
/* @__PURE__ */
|
|
844
|
-
/* @__PURE__ */
|
|
853
|
+
return /* @__PURE__ */ jsx18(React18.Fragment, { children: /* @__PURE__ */ jsxs14("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
854
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
855
|
+
/* @__PURE__ */ jsx18(
|
|
845
856
|
"input",
|
|
846
857
|
{
|
|
847
858
|
type: "text",
|
|
@@ -861,7 +872,7 @@ var OtpInput = (props) => {
|
|
|
861
872
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm tracking-[1.25em] text-center\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
862
873
|
}
|
|
863
874
|
),
|
|
864
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
865
876
|
] }) });
|
|
866
877
|
};
|
|
867
878
|
var OtpInput_default = OtpInput;
|
|
@@ -944,7 +955,7 @@ var DateTimeUtility_default = DateTimeUtility;
|
|
|
944
955
|
|
|
945
956
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
946
957
|
import React19 from "react";
|
|
947
|
-
import { jsx as
|
|
958
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
948
959
|
var DateTimeInput = (props) => {
|
|
949
960
|
const textChangeHandler = (event) => {
|
|
950
961
|
const localDate = new Date(event.target.value);
|
|
@@ -979,12 +990,12 @@ var DateTimeInput = (props) => {
|
|
|
979
990
|
timeZoneAbbr = now2.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
980
991
|
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
981
992
|
}
|
|
982
|
-
return /* @__PURE__ */
|
|
983
|
-
/* @__PURE__ */
|
|
993
|
+
return /* @__PURE__ */ jsx19(React19.Fragment, { children: /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
994
|
+
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
984
995
|
" ",
|
|
985
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
996
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx19("span", { className: "text-alert", children: "*" }),
|
|
986
997
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
987
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ jsx19(
|
|
988
999
|
"input",
|
|
989
1000
|
{
|
|
990
1001
|
type: "datetime-local",
|
|
@@ -1001,16 +1012,16 @@ var DateTimeInput = (props) => {
|
|
|
1001
1012
|
className: "peer mt-1 py-1.5 block w-full 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 "
|
|
1002
1013
|
}
|
|
1003
1014
|
),
|
|
1004
|
-
/* @__PURE__ */
|
|
1015
|
+
/* @__PURE__ */ jsx19("span", { children: timeZoneAbbr })
|
|
1005
1016
|
] }),
|
|
1006
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1007
1018
|
] }) });
|
|
1008
1019
|
};
|
|
1009
1020
|
var DateTimeInput_default = DateTimeInput;
|
|
1010
1021
|
|
|
1011
1022
|
// src/components/controls/edit/ColorInput.tsx
|
|
1012
1023
|
import React20, { useEffect as useEffect2 } from "react";
|
|
1013
|
-
import { jsx as
|
|
1024
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1014
1025
|
var ColorInput = (props) => {
|
|
1015
1026
|
const [color, setColor] = React20.useState("#3b82f6");
|
|
1016
1027
|
useEffect2(() => {
|
|
@@ -1033,10 +1044,10 @@ var ColorInput = (props) => {
|
|
|
1033
1044
|
}
|
|
1034
1045
|
};
|
|
1035
1046
|
return /* @__PURE__ */ jsxs16("label", { className: "block mb-1", children: [
|
|
1036
|
-
/* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ jsx20("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1037
1048
|
" ",
|
|
1038
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1039
|
-
/* @__PURE__ */
|
|
1049
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "text-alert", children: "*" }),
|
|
1050
|
+
/* @__PURE__ */ jsx20(
|
|
1040
1051
|
"input",
|
|
1041
1052
|
{
|
|
1042
1053
|
type: "color",
|
|
@@ -1049,14 +1060,14 @@ var ColorInput = (props) => {
|
|
|
1049
1060
|
className: `w-[88px] h-12 block cursor-pointer focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50`
|
|
1050
1061
|
}
|
|
1051
1062
|
),
|
|
1052
|
-
props?.attributes?.errorMessage && /* @__PURE__ */
|
|
1063
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1 text-alert text-sm", children: props.attributes.errorMessage })
|
|
1053
1064
|
] });
|
|
1054
1065
|
};
|
|
1055
1066
|
var ColorInput_default = ColorInput;
|
|
1056
1067
|
|
|
1057
1068
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
1058
1069
|
import { useEffect as useEffect3, useRef, useState as useState2 } from "react";
|
|
1059
|
-
import { jsx as
|
|
1070
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1060
1071
|
var SelectWithSearchInput = (props) => {
|
|
1061
1072
|
const [isOpen, setIsOpen] = useState2(false);
|
|
1062
1073
|
const [searchTerm, setSearchTerm] = useState2("");
|
|
@@ -1128,11 +1139,11 @@ var SelectWithSearchInput = (props) => {
|
|
|
1128
1139
|
}
|
|
1129
1140
|
}, [highlightedIndex]);
|
|
1130
1141
|
return /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
1131
|
-
/* @__PURE__ */
|
|
1142
|
+
/* @__PURE__ */ jsx21("label", { children: props.attributes?.label }),
|
|
1132
1143
|
" ",
|
|
1133
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1144
|
+
props?.attributes?.required && /* @__PURE__ */ jsx21("span", { className: "text-alert", children: "*" }),
|
|
1134
1145
|
/* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
1135
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ jsx21(
|
|
1136
1147
|
"input",
|
|
1137
1148
|
{
|
|
1138
1149
|
type: "text",
|
|
@@ -1148,13 +1159,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
1148
1159
|
className: "peer 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\n "
|
|
1149
1160
|
}
|
|
1150
1161
|
),
|
|
1151
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ jsx21(
|
|
1152
1163
|
"button",
|
|
1153
1164
|
{
|
|
1154
1165
|
type: "button",
|
|
1155
1166
|
onClick: () => setIsOpen(!isOpen),
|
|
1156
1167
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1157
|
-
children: /* @__PURE__ */
|
|
1168
|
+
children: /* @__PURE__ */ jsx21(
|
|
1158
1169
|
"svg",
|
|
1159
1170
|
{
|
|
1160
1171
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1163,7 +1174,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
1163
1174
|
strokeWidth: 1.5,
|
|
1164
1175
|
stroke: "currentColor",
|
|
1165
1176
|
className: "w-full h-full",
|
|
1166
|
-
children: /* @__PURE__ */
|
|
1177
|
+
children: /* @__PURE__ */ jsx21(
|
|
1167
1178
|
"path",
|
|
1168
1179
|
{
|
|
1169
1180
|
strokeLinecap: "round",
|
|
@@ -1176,12 +1187,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
1176
1187
|
}
|
|
1177
1188
|
)
|
|
1178
1189
|
] }),
|
|
1179
|
-
isOpen && /* @__PURE__ */
|
|
1190
|
+
isOpen && /* @__PURE__ */ jsx21(
|
|
1180
1191
|
"div",
|
|
1181
1192
|
{
|
|
1182
1193
|
ref: dropdownRef,
|
|
1183
1194
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
1184
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1195
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx21(
|
|
1185
1196
|
"button",
|
|
1186
1197
|
{
|
|
1187
1198
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1189,10 +1200,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
1189
1200
|
role: "option",
|
|
1190
1201
|
tabIndex: -1,
|
|
1191
1202
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1192
|
-
children: /* @__PURE__ */
|
|
1203
|
+
children: /* @__PURE__ */ jsx21("span", { children: item[props.dataTextFieldName] })
|
|
1193
1204
|
},
|
|
1194
1205
|
item[props.dataKeyFieldName]
|
|
1195
|
-
)) : /* @__PURE__ */
|
|
1206
|
+
)) : /* @__PURE__ */ jsx21("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1196
1207
|
}
|
|
1197
1208
|
)
|
|
1198
1209
|
] });
|
|
@@ -1258,7 +1269,7 @@ import { useState as useState3 } from "react";
|
|
|
1258
1269
|
|
|
1259
1270
|
// src/components/ClientButton.tsx
|
|
1260
1271
|
import React22 from "react";
|
|
1261
|
-
import { jsx as
|
|
1272
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1262
1273
|
var ClientButton = (props) => {
|
|
1263
1274
|
const execute = async (event) => {
|
|
1264
1275
|
if (props.onClick !== void 0) {
|
|
@@ -1268,7 +1279,7 @@ var ClientButton = (props) => {
|
|
|
1268
1279
|
}
|
|
1269
1280
|
};
|
|
1270
1281
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1271
|
-
return /* @__PURE__ */
|
|
1282
|
+
return /* @__PURE__ */ jsx22(React22.Fragment, { children: /* @__PURE__ */ jsx22(
|
|
1272
1283
|
"button",
|
|
1273
1284
|
{
|
|
1274
1285
|
type: "button",
|
|
@@ -1281,7 +1292,7 @@ var ClientButton = (props) => {
|
|
|
1281
1292
|
var ClientButton_default = ClientButton;
|
|
1282
1293
|
|
|
1283
1294
|
// src/components/Confirm.tsx
|
|
1284
|
-
import { Fragment, jsx as
|
|
1295
|
+
import { Fragment, jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1285
1296
|
var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
1286
1297
|
const [showModal, setShowModal] = useState3(true);
|
|
1287
1298
|
const handleConfirmAction = () => {
|
|
@@ -1296,13 +1307,13 @@ var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
|
1296
1307
|
onCancel();
|
|
1297
1308
|
}
|
|
1298
1309
|
};
|
|
1299
|
-
return /* @__PURE__ */
|
|
1300
|
-
/* @__PURE__ */
|
|
1310
|
+
return /* @__PURE__ */ jsx23(Fragment, { children: showModal && /* @__PURE__ */ jsxs18("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
|
|
1311
|
+
/* @__PURE__ */ jsx23("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1301
1312
|
/* @__PURE__ */ jsxs18("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1302
|
-
/* @__PURE__ */
|
|
1303
|
-
/* @__PURE__ */
|
|
1313
|
+
/* @__PURE__ */ jsx23("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1314
|
+
/* @__PURE__ */ jsx23("p", { className: "mb-4", children: message }),
|
|
1304
1315
|
/* @__PURE__ */ jsxs18("div", { className: "flex justify-end gap-8", children: [
|
|
1305
|
-
/* @__PURE__ */
|
|
1316
|
+
/* @__PURE__ */ jsx23(
|
|
1306
1317
|
ClientButton_default,
|
|
1307
1318
|
{
|
|
1308
1319
|
onClick: handleCancelAction,
|
|
@@ -1310,7 +1321,7 @@ var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
|
1310
1321
|
children: "Cancel"
|
|
1311
1322
|
}
|
|
1312
1323
|
),
|
|
1313
|
-
/* @__PURE__ */
|
|
1324
|
+
/* @__PURE__ */ jsx23(
|
|
1314
1325
|
ClientButton_default,
|
|
1315
1326
|
{
|
|
1316
1327
|
onClick: handleConfirmAction,
|
|
@@ -1326,7 +1337,7 @@ var Confirm_default = Confirm;
|
|
|
1326
1337
|
}
|
|
1327
1338
|
|
|
1328
1339
|
// src/components/Button.tsx
|
|
1329
|
-
import { jsx as
|
|
1340
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1330
1341
|
var Button = (props) => {
|
|
1331
1342
|
const [inProgress, setInProgress] = useState4(false);
|
|
1332
1343
|
const [isActionPerformed, setIsActionPerformed] = useState4(false);
|
|
@@ -1375,7 +1386,7 @@ var Button = (props) => {
|
|
|
1375
1386
|
return new Promise((resolve) => {
|
|
1376
1387
|
const onConfirm = () => resolve(true);
|
|
1377
1388
|
const onCancel = () => resolve(false);
|
|
1378
|
-
setShowModal(/* @__PURE__ */
|
|
1389
|
+
setShowModal(/* @__PURE__ */ jsx24(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
1379
1390
|
});
|
|
1380
1391
|
};
|
|
1381
1392
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
@@ -1392,9 +1403,9 @@ var Button = (props) => {
|
|
|
1392
1403
|
className: buttonClass + " relative " + props.className,
|
|
1393
1404
|
children: [
|
|
1394
1405
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
1395
|
-
inProgress && /* @__PURE__ */
|
|
1396
|
-
/* @__PURE__ */
|
|
1397
|
-
/* @__PURE__ */
|
|
1406
|
+
inProgress && /* @__PURE__ */ jsx24(React24.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ jsx24("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ jsxs19("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
1407
|
+
/* @__PURE__ */ jsx24("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1408
|
+
/* @__PURE__ */ jsx24("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
1398
1409
|
] }) })
|
|
1399
1410
|
]
|
|
1400
1411
|
}
|
|
@@ -1411,7 +1422,7 @@ import React25, {
|
|
|
1411
1422
|
useState as useState5,
|
|
1412
1423
|
useCallback
|
|
1413
1424
|
} from "react";
|
|
1414
|
-
import { jsx as
|
|
1425
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1415
1426
|
var SelectWithSearchPanel = (props) => {
|
|
1416
1427
|
const [isOpen, setIsOpen] = useState5(false);
|
|
1417
1428
|
const [searchTerm, setSearchTerm] = useState5("");
|
|
@@ -1548,8 +1559,8 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1548
1559
|
return formData;
|
|
1549
1560
|
}, []);
|
|
1550
1561
|
return /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
|
|
1551
|
-
/* @__PURE__ */
|
|
1552
|
-
/* @__PURE__ */
|
|
1562
|
+
/* @__PURE__ */ jsx25("label", { className: "text-sm mb-1 font-medium", children: props.attributes?.label }),
|
|
1563
|
+
/* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsx25(
|
|
1553
1564
|
"input",
|
|
1554
1565
|
{
|
|
1555
1566
|
type: "text",
|
|
@@ -1563,14 +1574,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1563
1574
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
1564
1575
|
}
|
|
1565
1576
|
) }),
|
|
1566
|
-
/* @__PURE__ */
|
|
1577
|
+
/* @__PURE__ */ jsx25("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ jsxs20(React25.Fragment, { children: [
|
|
1567
1578
|
/* @__PURE__ */ jsxs20("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
1568
|
-
/* @__PURE__ */
|
|
1579
|
+
/* @__PURE__ */ jsx25("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ jsxs20("h5", { className: "text-md text-white font-medium", children: [
|
|
1569
1580
|
"Select a",
|
|
1570
1581
|
" ",
|
|
1571
1582
|
props.attributes?.label || props.attributes?.heading
|
|
1572
1583
|
] }) }),
|
|
1573
|
-
/* @__PURE__ */
|
|
1584
|
+
/* @__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(
|
|
1574
1585
|
"button",
|
|
1575
1586
|
{
|
|
1576
1587
|
type: "button",
|
|
@@ -1584,11 +1595,11 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1584
1595
|
) })
|
|
1585
1596
|
] }),
|
|
1586
1597
|
isCreateOpen && /* @__PURE__ */ jsxs20("div", { className: "fixed right-0 w-1/4 h-full top-[62px] bg-white shadow-lg border-l border-gray-200 z-50", children: [
|
|
1587
|
-
/* @__PURE__ */
|
|
1598
|
+
/* @__PURE__ */ jsx25("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ jsxs20("h5", { className: "text-md font-medium text-white", children: [
|
|
1588
1599
|
"Create New ",
|
|
1589
1600
|
props.attributes?.label
|
|
1590
1601
|
] }) }),
|
|
1591
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ jsx25("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ jsx25(
|
|
1592
1603
|
"button",
|
|
1593
1604
|
{
|
|
1594
1605
|
type: "button",
|
|
@@ -1599,8 +1610,8 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1599
1610
|
) }),
|
|
1600
1611
|
/* @__PURE__ */ jsxs20("div", { className: "p-4", children: [
|
|
1601
1612
|
props.createFields?.map((field) => /* @__PURE__ */ jsxs20("div", { className: "mb-4", children: [
|
|
1602
|
-
/* @__PURE__ */
|
|
1603
|
-
/* @__PURE__ */
|
|
1613
|
+
/* @__PURE__ */ jsx25("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
1614
|
+
/* @__PURE__ */ jsx25(
|
|
1604
1615
|
"input",
|
|
1605
1616
|
{
|
|
1606
1617
|
type: field.type,
|
|
@@ -1625,13 +1636,13 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1625
1636
|
] })
|
|
1626
1637
|
] })
|
|
1627
1638
|
] }),
|
|
1628
|
-
/* @__PURE__ */
|
|
1639
|
+
/* @__PURE__ */ jsx25(
|
|
1629
1640
|
"div",
|
|
1630
1641
|
{
|
|
1631
1642
|
ref: listRef,
|
|
1632
1643
|
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",
|
|
1633
1644
|
style: { height: "calc(100vh - 130px)" },
|
|
1634
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1645
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsx25(
|
|
1635
1646
|
"button",
|
|
1636
1647
|
{
|
|
1637
1648
|
onClick: (e) => {
|
|
@@ -1641,9 +1652,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1641
1652
|
role: "option",
|
|
1642
1653
|
tabIndex: -1,
|
|
1643
1654
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1644
|
-
children: /* @__PURE__ */
|
|
1655
|
+
children: /* @__PURE__ */ jsx25("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
1645
1656
|
}
|
|
1646
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */
|
|
1657
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx25("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1647
1658
|
}
|
|
1648
1659
|
)
|
|
1649
1660
|
] }) })
|
|
@@ -1656,7 +1667,7 @@ import React26, {
|
|
|
1656
1667
|
useState as useState6,
|
|
1657
1668
|
useEffect as useEffect5
|
|
1658
1669
|
} from "react";
|
|
1659
|
-
import { jsx as
|
|
1670
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1660
1671
|
var BooleanSelect = (props) => {
|
|
1661
1672
|
const [list, setList] = useState6();
|
|
1662
1673
|
const textChangeHandler = (event) => {
|
|
@@ -1705,10 +1716,10 @@ var BooleanSelect = (props) => {
|
|
|
1705
1716
|
if (props.value !== void 0 && props.value !== null) {
|
|
1706
1717
|
value = props.value;
|
|
1707
1718
|
}
|
|
1708
|
-
return /* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1719
|
+
return /* @__PURE__ */ jsx26(React26.Fragment, { children: /* @__PURE__ */ jsxs21("label", { className: "block", children: [
|
|
1720
|
+
/* @__PURE__ */ jsx26("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1710
1721
|
" ",
|
|
1711
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1722
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx26("span", { className: "text-alert", children: "*" }),
|
|
1712
1723
|
/* @__PURE__ */ jsxs21(
|
|
1713
1724
|
"select",
|
|
1714
1725
|
{
|
|
@@ -1721,9 +1732,9 @@ var BooleanSelect = (props) => {
|
|
|
1721
1732
|
disabled: props?.attributes?.readOnly,
|
|
1722
1733
|
className: "peer mt-1 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\n ",
|
|
1723
1734
|
children: [
|
|
1724
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ jsx26("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1725
1736
|
list && list.map((item, i) => {
|
|
1726
|
-
return /* @__PURE__ */
|
|
1737
|
+
return /* @__PURE__ */ jsx26(
|
|
1727
1738
|
"option",
|
|
1728
1739
|
{
|
|
1729
1740
|
className: "fac-select-option",
|
|
@@ -1736,14 +1747,14 @@ var BooleanSelect = (props) => {
|
|
|
1736
1747
|
]
|
|
1737
1748
|
}
|
|
1738
1749
|
),
|
|
1739
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ jsx26("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1740
1751
|
] }) });
|
|
1741
1752
|
};
|
|
1742
1753
|
var BooleanSelect_default = BooleanSelect;
|
|
1743
1754
|
|
|
1744
1755
|
// src/components/controls/edit/EmailInput.tsx
|
|
1745
1756
|
import React27 from "react";
|
|
1746
|
-
import { jsx as
|
|
1757
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1747
1758
|
var EmailInput = (props) => {
|
|
1748
1759
|
const textChangeHandler = (event) => {
|
|
1749
1760
|
const text = event.target.value;
|
|
@@ -1768,11 +1779,11 @@ var EmailInput = (props) => {
|
|
|
1768
1779
|
if (props.value !== void 0 && props.value !== null) {
|
|
1769
1780
|
value = props.value;
|
|
1770
1781
|
}
|
|
1771
|
-
return /* @__PURE__ */
|
|
1772
|
-
/* @__PURE__ */
|
|
1782
|
+
return /* @__PURE__ */ jsx27(React27.Fragment, { children: /* @__PURE__ */ jsxs22("label", { className: "block mb-1", children: [
|
|
1783
|
+
/* @__PURE__ */ jsx27("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
1773
1784
|
" ",
|
|
1774
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1775
|
-
/* @__PURE__ */
|
|
1785
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx27("span", { className: "text-alert", children: "*" }),
|
|
1786
|
+
/* @__PURE__ */ jsx27(
|
|
1776
1787
|
"input",
|
|
1777
1788
|
{
|
|
1778
1789
|
type: "email",
|
|
@@ -1788,14 +1799,14 @@ var EmailInput = (props) => {
|
|
|
1788
1799
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus-within:border-neutral-300 focus-within:ring focus-within:ring-neutral-300 focus-within:ring-opacity-50 transition-all duration-500 ease-in-out"
|
|
1789
1800
|
}
|
|
1790
1801
|
),
|
|
1791
|
-
/* @__PURE__ */
|
|
1802
|
+
/* @__PURE__ */ jsx27("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1792
1803
|
] }) });
|
|
1793
1804
|
};
|
|
1794
1805
|
var EmailInput_default = EmailInput;
|
|
1795
1806
|
|
|
1796
1807
|
// src/components/controls/edit/TimeInput.tsx
|
|
1797
1808
|
import React28 from "react";
|
|
1798
|
-
import { jsx as
|
|
1809
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1799
1810
|
var TimeInput = (props) => {
|
|
1800
1811
|
const timeChangeHandler = (event) => {
|
|
1801
1812
|
const timeValue = event.target.value;
|
|
@@ -1808,10 +1819,10 @@ var TimeInput = (props) => {
|
|
|
1808
1819
|
});
|
|
1809
1820
|
}
|
|
1810
1821
|
};
|
|
1811
|
-
return /* @__PURE__ */
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1814
|
-
/* @__PURE__ */
|
|
1822
|
+
return /* @__PURE__ */ jsx28(React28.Fragment, { children: /* @__PURE__ */ jsxs23("label", { className: "block mb-1", children: [
|
|
1823
|
+
/* @__PURE__ */ jsx28("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1824
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx28("span", { className: "text-alert", children: "*" }),
|
|
1825
|
+
/* @__PURE__ */ jsx28("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx28(
|
|
1815
1826
|
"input",
|
|
1816
1827
|
{
|
|
1817
1828
|
type: "time",
|
|
@@ -1824,13 +1835,13 @@ var TimeInput = (props) => {
|
|
|
1824
1835
|
className: "peer mt-1 py-1.5 block w-full 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"
|
|
1825
1836
|
}
|
|
1826
1837
|
) }),
|
|
1827
|
-
/* @__PURE__ */
|
|
1838
|
+
/* @__PURE__ */ jsx28("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1828
1839
|
] }) });
|
|
1829
1840
|
};
|
|
1830
1841
|
var TimeInput_default = TimeInput;
|
|
1831
1842
|
|
|
1832
1843
|
// src/components/controls/edit/InputControl.tsx
|
|
1833
|
-
import { jsx as
|
|
1844
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1834
1845
|
var InputControl = React29.forwardRef(
|
|
1835
1846
|
(props, ref) => {
|
|
1836
1847
|
const ControlComponents = {
|
|
@@ -1852,7 +1863,7 @@ var InputControl = React29.forwardRef(
|
|
|
1852
1863
|
[InputControlType_default.timeInput]: TimeInput_default
|
|
1853
1864
|
};
|
|
1854
1865
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
1855
|
-
return /* @__PURE__ */
|
|
1866
|
+
return /* @__PURE__ */ jsx29(React29.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx29(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
1856
1867
|
}
|
|
1857
1868
|
);
|
|
1858
1869
|
InputControl.displayName = "InputControl";
|
|
@@ -1864,46 +1875,46 @@ import { useRouter } from "next/navigation";
|
|
|
1864
1875
|
|
|
1865
1876
|
// src/components/dataForm/NoContentView.tsx
|
|
1866
1877
|
import React30 from "react";
|
|
1867
|
-
import { jsx as
|
|
1878
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1868
1879
|
var NoContentView = (props) => {
|
|
1869
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ jsx30(React30.Fragment, { children: props.isDataFound === false && props.children });
|
|
1870
1881
|
};
|
|
1871
1882
|
var NoContentView_default = NoContentView;
|
|
1872
1883
|
|
|
1873
1884
|
// src/components/dataForm/ContentView.tsx
|
|
1874
1885
|
import React31 from "react";
|
|
1875
|
-
import { jsx as
|
|
1886
|
+
import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1876
1887
|
var ContentView = (props) => {
|
|
1877
1888
|
return /* @__PURE__ */ jsxs24(React31.Fragment, { children: [
|
|
1878
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
1889
|
+
props.isDataFound == null && /* @__PURE__ */ jsx31("div", { className: "", children: /* @__PURE__ */ jsxs24("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
1879
1890
|
/* @__PURE__ */ jsxs24("div", { className: "flex items-center mb-4", children: [
|
|
1880
|
-
/* @__PURE__ */
|
|
1891
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
1881
1892
|
/* @__PURE__ */ jsxs24("div", { className: "ml-2", children: [
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
/* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
1894
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
1884
1895
|
] })
|
|
1885
1896
|
] }),
|
|
1886
1897
|
/* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
1887
1898
|
/* @__PURE__ */ jsxs24("div", { className: "animate-pulse", children: [
|
|
1888
|
-
/* @__PURE__ */
|
|
1889
|
-
/* @__PURE__ */
|
|
1890
|
-
/* @__PURE__ */
|
|
1891
|
-
/* @__PURE__ */
|
|
1892
|
-
/* @__PURE__ */
|
|
1899
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1900
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1901
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1902
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1903
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1893
1904
|
] }),
|
|
1894
1905
|
/* @__PURE__ */ jsxs24("div", { className: "animate-pulse", children: [
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */
|
|
1897
|
-
/* @__PURE__ */
|
|
1898
|
-
/* @__PURE__ */
|
|
1899
|
-
/* @__PURE__ */
|
|
1906
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1907
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1908
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1909
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1910
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1900
1911
|
] }),
|
|
1901
1912
|
/* @__PURE__ */ jsxs24("div", { className: "animate-pulse", children: [
|
|
1902
|
-
/* @__PURE__ */
|
|
1903
|
-
/* @__PURE__ */
|
|
1904
|
-
/* @__PURE__ */
|
|
1905
|
-
/* @__PURE__ */
|
|
1906
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1914
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1915
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1916
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1917
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1907
1918
|
] })
|
|
1908
1919
|
] })
|
|
1909
1920
|
] }) }),
|
|
@@ -1914,7 +1925,7 @@ var ContentView_default = ContentView;
|
|
|
1914
1925
|
|
|
1915
1926
|
// src/components/dataForm/Hyperlink.tsx
|
|
1916
1927
|
import Link from "next/link";
|
|
1917
|
-
import { Fragment as Fragment2, jsx as
|
|
1928
|
+
import { Fragment as Fragment2, jsx as jsx32 } from "react/jsx-runtime";
|
|
1918
1929
|
function Hyperlink(props) {
|
|
1919
1930
|
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : "";
|
|
1920
1931
|
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
@@ -1922,7 +1933,7 @@ function Hyperlink(props) {
|
|
|
1922
1933
|
if (target == "_blank") {
|
|
1923
1934
|
additionalProps.rel = "noopener noreferrer";
|
|
1924
1935
|
}
|
|
1925
|
-
return /* @__PURE__ */
|
|
1936
|
+
return /* @__PURE__ */ jsx32(Fragment2, { children: props.href ? /* @__PURE__ */ jsx32(
|
|
1926
1937
|
Link,
|
|
1927
1938
|
{
|
|
1928
1939
|
href: props.href,
|
|
@@ -1932,7 +1943,7 @@ function Hyperlink(props) {
|
|
|
1932
1943
|
target,
|
|
1933
1944
|
children: props.children
|
|
1934
1945
|
}
|
|
1935
|
-
) : props.isHeading ? /* @__PURE__ */
|
|
1946
|
+
) : props.isHeading ? /* @__PURE__ */ jsx32("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx32("span", { className: props.className, children: props.children }) });
|
|
1936
1947
|
}
|
|
1937
1948
|
|
|
1938
1949
|
// src/clients/OdataBuilder.tsx
|
|
@@ -2090,30 +2101,30 @@ var OdataBuilder = class {
|
|
|
2090
2101
|
};
|
|
2091
2102
|
|
|
2092
2103
|
// src/svg/chevron-updown.tsx
|
|
2093
|
-
import { jsx as
|
|
2104
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2094
2105
|
var ChevronUpDown = (props) => {
|
|
2095
|
-
return /* @__PURE__ */
|
|
2106
|
+
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: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
2096
2107
|
};
|
|
2097
2108
|
var chevron_updown_default = ChevronUpDown;
|
|
2098
2109
|
|
|
2099
2110
|
// src/svg/chevron-down.tsx
|
|
2100
|
-
import { jsx as
|
|
2111
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2101
2112
|
var ChevronDown = (props) => {
|
|
2102
|
-
return /* @__PURE__ */
|
|
2113
|
+
return /* @__PURE__ */ jsx34("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__ */ jsx34("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
2103
2114
|
};
|
|
2104
2115
|
var chevron_down_default = ChevronDown;
|
|
2105
2116
|
|
|
2106
2117
|
// src/svg/chevron-up.tsx
|
|
2107
|
-
import { jsx as
|
|
2118
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2108
2119
|
var ChevronUp = (props) => {
|
|
2109
|
-
return /* @__PURE__ */
|
|
2120
|
+
return /* @__PURE__ */ jsx35("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__ */ jsx35("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
2110
2121
|
};
|
|
2111
2122
|
var chevron_up_default = ChevronUp;
|
|
2112
2123
|
|
|
2113
2124
|
// src/svg/plus.tsx
|
|
2114
|
-
import { jsx as
|
|
2125
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2115
2126
|
var Plus = (props) => {
|
|
2116
|
-
return /* @__PURE__ */
|
|
2127
|
+
return /* @__PURE__ */ jsx36("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__ */ jsx36("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
2117
2128
|
};
|
|
2118
2129
|
var plus_default = Plus;
|
|
2119
2130
|
|
|
@@ -2127,14 +2138,14 @@ var Icons = {
|
|
|
2127
2138
|
var Icons_default = Icons;
|
|
2128
2139
|
|
|
2129
2140
|
// src/svg/Icon.tsx
|
|
2130
|
-
import { jsx as
|
|
2141
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2131
2142
|
var Icon = ({ name, className, ...props }) => {
|
|
2132
2143
|
const IconComponent = Icons_default[name];
|
|
2133
2144
|
if (!IconComponent) {
|
|
2134
2145
|
console.error(`Icon "${name}" not found.`);
|
|
2135
2146
|
return null;
|
|
2136
2147
|
}
|
|
2137
|
-
return /* @__PURE__ */
|
|
2148
|
+
return /* @__PURE__ */ jsx37(IconComponent, { ...props, className });
|
|
2138
2149
|
};
|
|
2139
2150
|
var Icon_default = Icon;
|
|
2140
2151
|
|
|
@@ -2183,7 +2194,7 @@ function FormReducer(state, action) {
|
|
|
2183
2194
|
var FormReducer_default = FormReducer;
|
|
2184
2195
|
|
|
2185
2196
|
// src/components/dataForm/DataList.tsx
|
|
2186
|
-
import { Fragment as Fragment3, jsx as
|
|
2197
|
+
import { Fragment as Fragment3, jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2187
2198
|
var DataList = (props) => {
|
|
2188
2199
|
console.log(props.dataset, "datasetssssss");
|
|
2189
2200
|
const router = useRouter();
|
|
@@ -2206,7 +2217,7 @@ var DataList = (props) => {
|
|
|
2206
2217
|
if (path.includes(".")) {
|
|
2207
2218
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
2208
2219
|
} else if (Array.isArray(obj[path])) {
|
|
2209
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
2220
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx38("div", { children: item }, index));
|
|
2210
2221
|
} else {
|
|
2211
2222
|
return obj[path];
|
|
2212
2223
|
}
|
|
@@ -2262,30 +2273,30 @@ var DataList = (props) => {
|
|
|
2262
2273
|
const renderPageNumbers = () => {
|
|
2263
2274
|
if (pages <= 10) {
|
|
2264
2275
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
2265
|
-
(page) => /* @__PURE__ */
|
|
2276
|
+
(page) => /* @__PURE__ */ jsx38(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx38(
|
|
2266
2277
|
Hyperlink,
|
|
2267
2278
|
{
|
|
2268
2279
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2269
2280
|
href: builder.getNewPageUrl(page),
|
|
2270
2281
|
children: page
|
|
2271
2282
|
}
|
|
2272
|
-
) : /* @__PURE__ */
|
|
2283
|
+
) : /* @__PURE__ */ jsx38("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
2273
2284
|
);
|
|
2274
2285
|
} else {
|
|
2275
2286
|
const showFirstPages = activePageNumber <= 5;
|
|
2276
2287
|
const showLastPages = activePageNumber > pages - 5;
|
|
2277
2288
|
if (showFirstPages) {
|
|
2278
2289
|
return /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
2279
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
2290
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx38(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx38(
|
|
2280
2291
|
Hyperlink,
|
|
2281
2292
|
{
|
|
2282
2293
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2283
2294
|
href: builder.getNewPageUrl(page),
|
|
2284
2295
|
children: page
|
|
2285
2296
|
}
|
|
2286
|
-
) : /* @__PURE__ */
|
|
2287
|
-
/* @__PURE__ */
|
|
2288
|
-
/* @__PURE__ */
|
|
2297
|
+
) : /* @__PURE__ */ jsx38("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
2298
|
+
/* @__PURE__ */ jsx38("span", { className: "px-2 py-1", children: "..." }),
|
|
2299
|
+
/* @__PURE__ */ jsx38(
|
|
2289
2300
|
Hyperlink,
|
|
2290
2301
|
{
|
|
2291
2302
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2293,7 +2304,7 @@ var DataList = (props) => {
|
|
|
2293
2304
|
children: pages - 1
|
|
2294
2305
|
}
|
|
2295
2306
|
),
|
|
2296
|
-
/* @__PURE__ */
|
|
2307
|
+
/* @__PURE__ */ jsx38(
|
|
2297
2308
|
Hyperlink,
|
|
2298
2309
|
{
|
|
2299
2310
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2301,7 +2312,7 @@ var DataList = (props) => {
|
|
|
2301
2312
|
children: pages
|
|
2302
2313
|
}
|
|
2303
2314
|
),
|
|
2304
|
-
/* @__PURE__ */
|
|
2315
|
+
/* @__PURE__ */ jsx38("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs25(
|
|
2305
2316
|
"select",
|
|
2306
2317
|
{
|
|
2307
2318
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2313,18 +2324,18 @@ var DataList = (props) => {
|
|
|
2313
2324
|
}
|
|
2314
2325
|
},
|
|
2315
2326
|
children: [
|
|
2316
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ jsx38("option", { className: "", value: "", children: "Jump to" }),
|
|
2317
2328
|
Array.from(
|
|
2318
2329
|
{ length: Math.max(0, pages - 10) },
|
|
2319
2330
|
(_, index) => index + 9
|
|
2320
|
-
).map((page) => /* @__PURE__ */
|
|
2331
|
+
).map((page) => /* @__PURE__ */ jsx38("option", { value: page, children: page }, page))
|
|
2321
2332
|
]
|
|
2322
2333
|
}
|
|
2323
2334
|
) })
|
|
2324
2335
|
] });
|
|
2325
2336
|
} else if (showLastPages) {
|
|
2326
2337
|
return /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
2327
|
-
/* @__PURE__ */
|
|
2338
|
+
/* @__PURE__ */ jsx38(
|
|
2328
2339
|
Hyperlink,
|
|
2329
2340
|
{
|
|
2330
2341
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2332,7 +2343,7 @@ var DataList = (props) => {
|
|
|
2332
2343
|
children: "1"
|
|
2333
2344
|
}
|
|
2334
2345
|
),
|
|
2335
|
-
/* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ jsx38(
|
|
2336
2347
|
Hyperlink,
|
|
2337
2348
|
{
|
|
2338
2349
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2340,21 +2351,21 @@ var DataList = (props) => {
|
|
|
2340
2351
|
children: "2"
|
|
2341
2352
|
}
|
|
2342
2353
|
),
|
|
2343
|
-
/* @__PURE__ */
|
|
2354
|
+
/* @__PURE__ */ jsx38("span", { className: "px-2 py-1", children: "..." }),
|
|
2344
2355
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
2345
|
-
(page) => /* @__PURE__ */
|
|
2356
|
+
(page) => /* @__PURE__ */ jsx38(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx38(
|
|
2346
2357
|
Hyperlink,
|
|
2347
2358
|
{
|
|
2348
2359
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2349
2360
|
href: builder.getNewPageUrl(page),
|
|
2350
2361
|
children: page
|
|
2351
2362
|
}
|
|
2352
|
-
) : /* @__PURE__ */
|
|
2363
|
+
) : /* @__PURE__ */ jsx38("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
2353
2364
|
)
|
|
2354
2365
|
] });
|
|
2355
2366
|
} else {
|
|
2356
2367
|
return /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
2357
|
-
/* @__PURE__ */
|
|
2368
|
+
/* @__PURE__ */ jsx38(
|
|
2358
2369
|
Hyperlink,
|
|
2359
2370
|
{
|
|
2360
2371
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2362,7 +2373,7 @@ var DataList = (props) => {
|
|
|
2362
2373
|
children: "1"
|
|
2363
2374
|
}
|
|
2364
2375
|
),
|
|
2365
|
-
/* @__PURE__ */
|
|
2376
|
+
/* @__PURE__ */ jsx38(
|
|
2366
2377
|
Hyperlink,
|
|
2367
2378
|
{
|
|
2368
2379
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2370,20 +2381,20 @@ var DataList = (props) => {
|
|
|
2370
2381
|
children: "2"
|
|
2371
2382
|
}
|
|
2372
2383
|
),
|
|
2373
|
-
/* @__PURE__ */
|
|
2384
|
+
/* @__PURE__ */ jsx38("span", { className: "px-2 py-1", children: "..." }),
|
|
2374
2385
|
Array.from(
|
|
2375
2386
|
{ length: 5 },
|
|
2376
2387
|
(_, index) => activePageNumber - 2 + index
|
|
2377
|
-
).map((page) => /* @__PURE__ */
|
|
2388
|
+
).map((page) => /* @__PURE__ */ jsx38(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx38(
|
|
2378
2389
|
Hyperlink,
|
|
2379
2390
|
{
|
|
2380
2391
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2381
2392
|
href: builder.getNewPageUrl(page),
|
|
2382
2393
|
children: page
|
|
2383
2394
|
}
|
|
2384
|
-
) : /* @__PURE__ */
|
|
2385
|
-
/* @__PURE__ */
|
|
2386
|
-
/* @__PURE__ */
|
|
2395
|
+
) : /* @__PURE__ */ jsx38("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
2396
|
+
/* @__PURE__ */ jsx38("span", { className: "px-2 py-1", children: "..." }),
|
|
2397
|
+
/* @__PURE__ */ jsx38(
|
|
2387
2398
|
Hyperlink,
|
|
2388
2399
|
{
|
|
2389
2400
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2391,7 +2402,7 @@ var DataList = (props) => {
|
|
|
2391
2402
|
children: pages - 1
|
|
2392
2403
|
}
|
|
2393
2404
|
),
|
|
2394
|
-
/* @__PURE__ */
|
|
2405
|
+
/* @__PURE__ */ jsx38(
|
|
2395
2406
|
Hyperlink,
|
|
2396
2407
|
{
|
|
2397
2408
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2399,7 +2410,7 @@ var DataList = (props) => {
|
|
|
2399
2410
|
children: pages
|
|
2400
2411
|
}
|
|
2401
2412
|
),
|
|
2402
|
-
/* @__PURE__ */
|
|
2413
|
+
/* @__PURE__ */ jsx38("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs25(
|
|
2403
2414
|
"select",
|
|
2404
2415
|
{
|
|
2405
2416
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2411,8 +2422,8 @@ var DataList = (props) => {
|
|
|
2411
2422
|
}
|
|
2412
2423
|
},
|
|
2413
2424
|
children: [
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
2425
|
+
/* @__PURE__ */ jsx38("option", { value: "", children: "Jump to" }),
|
|
2426
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx38("option", { value: page, children: page }, page))
|
|
2416
2427
|
]
|
|
2417
2428
|
}
|
|
2418
2429
|
) })
|
|
@@ -2427,9 +2438,9 @@ var DataList = (props) => {
|
|
|
2427
2438
|
{
|
|
2428
2439
|
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`,
|
|
2429
2440
|
children: [
|
|
2430
|
-
props.title ? /* @__PURE__ */
|
|
2441
|
+
props.title ? /* @__PURE__ */ jsx38("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx38("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx38("div", {}),
|
|
2431
2442
|
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
|
|
2432
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
2443
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx38(
|
|
2433
2444
|
InputControl_default,
|
|
2434
2445
|
{
|
|
2435
2446
|
name: filter.name,
|
|
@@ -2451,8 +2462,8 @@ var DataList = (props) => {
|
|
|
2451
2462
|
linkType: "Primary" /* Solid */,
|
|
2452
2463
|
href: props.addLinkHref,
|
|
2453
2464
|
children: [
|
|
2454
|
-
/* @__PURE__ */
|
|
2455
|
-
/* @__PURE__ */
|
|
2465
|
+
/* @__PURE__ */ jsx38(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
2466
|
+
/* @__PURE__ */ jsx38("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
2456
2467
|
]
|
|
2457
2468
|
}
|
|
2458
2469
|
)
|
|
@@ -2460,8 +2471,8 @@ var DataList = (props) => {
|
|
|
2460
2471
|
]
|
|
2461
2472
|
}
|
|
2462
2473
|
),
|
|
2463
|
-
/* @__PURE__ */
|
|
2464
|
-
/* @__PURE__ */
|
|
2474
|
+
/* @__PURE__ */ jsx38("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs25("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
2475
|
+
/* @__PURE__ */ jsx38("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx38("tr", { children: props?.columns?.map((column) => {
|
|
2465
2476
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2466
2477
|
let icon = "chevronUpDown";
|
|
2467
2478
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -2471,36 +2482,36 @@ var DataList = (props) => {
|
|
|
2471
2482
|
icon = "chevronUp";
|
|
2472
2483
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
2473
2484
|
}
|
|
2474
|
-
return /* @__PURE__ */
|
|
2485
|
+
return /* @__PURE__ */ jsx38(
|
|
2475
2486
|
"th",
|
|
2476
2487
|
{
|
|
2477
2488
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
2478
|
-
children: /* @__PURE__ */
|
|
2479
|
-
/* @__PURE__ */
|
|
2480
|
-
column.enableSorting && /* @__PURE__ */
|
|
2489
|
+
children: /* @__PURE__ */ jsx38(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center space-x-1", children: [
|
|
2490
|
+
/* @__PURE__ */ jsx38("span", { className: "text-black", children: column.label }),
|
|
2491
|
+
column.enableSorting && /* @__PURE__ */ jsx38(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2481
2492
|
] }) })
|
|
2482
2493
|
},
|
|
2483
2494
|
column.name
|
|
2484
2495
|
);
|
|
2485
2496
|
}) }) }),
|
|
2486
|
-
/* @__PURE__ */
|
|
2497
|
+
/* @__PURE__ */ jsx38("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
2487
2498
|
let validityClass = "";
|
|
2488
2499
|
console.log("dataitem", dataitem);
|
|
2489
2500
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
2490
2501
|
validityClass = "bg-alert-200";
|
|
2491
2502
|
}
|
|
2492
|
-
return /* @__PURE__ */
|
|
2503
|
+
return /* @__PURE__ */ jsx38("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
2493
2504
|
console.log("column", column);
|
|
2494
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ jsx38(React32.Fragment, { children: /* @__PURE__ */ jsx38(
|
|
2495
2506
|
"td",
|
|
2496
2507
|
{
|
|
2497
2508
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
2498
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
2509
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx38(
|
|
2499
2510
|
Hyperlink,
|
|
2500
2511
|
{
|
|
2501
2512
|
className: "",
|
|
2502
2513
|
href: `https://${dataitem[column.name]}`,
|
|
2503
|
-
children: /* @__PURE__ */
|
|
2514
|
+
children: /* @__PURE__ */ jsx38(
|
|
2504
2515
|
ViewControl_default,
|
|
2505
2516
|
{
|
|
2506
2517
|
controlType: column.controlType,
|
|
@@ -2513,11 +2524,11 @@ var DataList = (props) => {
|
|
|
2513
2524
|
}
|
|
2514
2525
|
)
|
|
2515
2526
|
}
|
|
2516
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
2527
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx38(
|
|
2517
2528
|
Hyperlink,
|
|
2518
2529
|
{
|
|
2519
2530
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
2520
|
-
children: /* @__PURE__ */
|
|
2531
|
+
children: /* @__PURE__ */ jsx38(
|
|
2521
2532
|
ViewControl_default,
|
|
2522
2533
|
{
|
|
2523
2534
|
controlType: column.controlType,
|
|
@@ -2527,7 +2538,7 @@ var DataList = (props) => {
|
|
|
2527
2538
|
}
|
|
2528
2539
|
)
|
|
2529
2540
|
}
|
|
2530
|
-
) : /* @__PURE__ */
|
|
2541
|
+
) : /* @__PURE__ */ jsx38(
|
|
2531
2542
|
ViewControl_default,
|
|
2532
2543
|
{
|
|
2533
2544
|
controlType: column.controlType,
|
|
@@ -2541,10 +2552,10 @@ var DataList = (props) => {
|
|
|
2541
2552
|
}) }, index);
|
|
2542
2553
|
}) })
|
|
2543
2554
|
] }) }),
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
-
/* @__PURE__ */
|
|
2555
|
+
/* @__PURE__ */ jsx38("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between", children: [
|
|
2556
|
+
/* @__PURE__ */ jsx38("div", { className: "text-gray-700", children: label }),
|
|
2546
2557
|
/* @__PURE__ */ jsxs25("div", { className: "flex space-x-2 items-center", children: [
|
|
2547
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
2558
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx38(
|
|
2548
2559
|
Hyperlink,
|
|
2549
2560
|
{
|
|
2550
2561
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -2552,9 +2563,9 @@ var DataList = (props) => {
|
|
|
2552
2563
|
children: "Prev"
|
|
2553
2564
|
}
|
|
2554
2565
|
),
|
|
2555
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
2566
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx38("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" }),
|
|
2556
2567
|
renderPageNumbers(),
|
|
2557
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
2568
|
+
activePageNumber < pages && /* @__PURE__ */ jsx38(
|
|
2558
2569
|
Hyperlink,
|
|
2559
2570
|
{
|
|
2560
2571
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -2562,7 +2573,7 @@ var DataList = (props) => {
|
|
|
2562
2573
|
children: "Next"
|
|
2563
2574
|
}
|
|
2564
2575
|
),
|
|
2565
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
2576
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx38("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
2566
2577
|
] })
|
|
2567
2578
|
] }) })
|
|
2568
2579
|
] }),
|
|
@@ -2572,9 +2583,9 @@ var DataList = (props) => {
|
|
|
2572
2583
|
{
|
|
2573
2584
|
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`,
|
|
2574
2585
|
children: [
|
|
2575
|
-
props.title ? /* @__PURE__ */
|
|
2586
|
+
props.title ? /* @__PURE__ */ jsx38("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx38("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx38("div", {}),
|
|
2576
2587
|
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
|
|
2577
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
2588
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx38(
|
|
2578
2589
|
InputControl_default,
|
|
2579
2590
|
{
|
|
2580
2591
|
name: filter.name,
|
|
@@ -2596,8 +2607,8 @@ var DataList = (props) => {
|
|
|
2596
2607
|
linkType: "Primary" /* Solid */,
|
|
2597
2608
|
href: props.addLinkHref,
|
|
2598
2609
|
children: [
|
|
2599
|
-
/* @__PURE__ */
|
|
2600
|
-
/* @__PURE__ */
|
|
2610
|
+
/* @__PURE__ */ jsx38(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
2611
|
+
/* @__PURE__ */ jsx38("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
2601
2612
|
]
|
|
2602
2613
|
}
|
|
2603
2614
|
)
|
|
@@ -2606,7 +2617,7 @@ var DataList = (props) => {
|
|
|
2606
2617
|
}
|
|
2607
2618
|
),
|
|
2608
2619
|
/* @__PURE__ */ jsxs25("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
2609
|
-
/* @__PURE__ */
|
|
2620
|
+
/* @__PURE__ */ jsx38("div", { children: /* @__PURE__ */ jsx38("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx38("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx38("tr", { children: props?.columns?.map((column) => {
|
|
2610
2621
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2611
2622
|
let icon = "chevronUpDown";
|
|
2612
2623
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -2616,19 +2627,19 @@ var DataList = (props) => {
|
|
|
2616
2627
|
icon = "chevronUp";
|
|
2617
2628
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
2618
2629
|
}
|
|
2619
|
-
return /* @__PURE__ */
|
|
2630
|
+
return /* @__PURE__ */ jsx38(
|
|
2620
2631
|
"th",
|
|
2621
2632
|
{
|
|
2622
2633
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
2623
|
-
children: /* @__PURE__ */
|
|
2624
|
-
/* @__PURE__ */
|
|
2625
|
-
column.enableSorting && /* @__PURE__ */
|
|
2634
|
+
children: /* @__PURE__ */ jsx38(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center space-x-1", children: [
|
|
2635
|
+
/* @__PURE__ */ jsx38("span", { children: column.label }),
|
|
2636
|
+
column.enableSorting && /* @__PURE__ */ jsx38(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2626
2637
|
] }) })
|
|
2627
2638
|
},
|
|
2628
2639
|
column.name
|
|
2629
2640
|
);
|
|
2630
2641
|
}) }) }) }) }),
|
|
2631
|
-
/* @__PURE__ */
|
|
2642
|
+
/* @__PURE__ */ jsx38("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
2632
2643
|
] })
|
|
2633
2644
|
] })
|
|
2634
2645
|
] });
|
|
@@ -2642,7 +2653,7 @@ import React45 from "react";
|
|
|
2642
2653
|
import React34 from "react";
|
|
2643
2654
|
|
|
2644
2655
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
2645
|
-
import { jsx as
|
|
2656
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2646
2657
|
var TextNode = (props) => {
|
|
2647
2658
|
function cssStringToJson(cssString) {
|
|
2648
2659
|
const styleObject = {};
|
|
@@ -2702,22 +2713,22 @@ var TextNode = (props) => {
|
|
|
2702
2713
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
2703
2714
|
return (
|
|
2704
2715
|
// @ts-expect-error custom code
|
|
2705
|
-
/* @__PURE__ */
|
|
2716
|
+
/* @__PURE__ */ jsx39("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text })
|
|
2706
2717
|
);
|
|
2707
2718
|
};
|
|
2708
2719
|
var TextNode_default = TextNode;
|
|
2709
2720
|
|
|
2710
2721
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
2711
|
-
import { jsx as
|
|
2722
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2712
2723
|
var LineBreakNode = () => {
|
|
2713
|
-
return /* @__PURE__ */
|
|
2724
|
+
return /* @__PURE__ */ jsx40("div", { className: "py-0.5 lg:py-1.5" });
|
|
2714
2725
|
};
|
|
2715
2726
|
var LineBreakNode_default = LineBreakNode;
|
|
2716
2727
|
|
|
2717
2728
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2718
2729
|
import React33 from "react";
|
|
2719
2730
|
import Link2 from "next/link";
|
|
2720
|
-
import { jsx as
|
|
2731
|
+
import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2721
2732
|
var LinkNode = (props) => {
|
|
2722
2733
|
const NodeTypes2 = {
|
|
2723
2734
|
["text"]: TextNode_default
|
|
@@ -2728,18 +2739,18 @@ var LinkNode = (props) => {
|
|
|
2728
2739
|
return /* @__PURE__ */ jsxs26(Link2, { className: formatClasses, href: props.node.url, title: props.node.title, children: [
|
|
2729
2740
|
props.node.children && props.node.children.map((node, index) => {
|
|
2730
2741
|
const SelectedNode = NodeTypes2[node.type];
|
|
2731
|
-
return /* @__PURE__ */
|
|
2742
|
+
return /* @__PURE__ */ jsx41(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx41(SelectedNode, { node }) }, index);
|
|
2732
2743
|
}),
|
|
2733
|
-
props.node.children.length == 0 && /* @__PURE__ */
|
|
2744
|
+
props.node.children.length == 0 && /* @__PURE__ */ jsx41("br", {})
|
|
2734
2745
|
] });
|
|
2735
2746
|
};
|
|
2736
2747
|
var LinkNode_default = LinkNode;
|
|
2737
2748
|
|
|
2738
2749
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
2739
|
-
import { jsx as
|
|
2750
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2740
2751
|
var SVGIconNode = ({ node }) => {
|
|
2741
2752
|
if (!node?.svgCode) return null;
|
|
2742
|
-
return /* @__PURE__ */
|
|
2753
|
+
return /* @__PURE__ */ jsx42(
|
|
2743
2754
|
"span",
|
|
2744
2755
|
{
|
|
2745
2756
|
style: {
|
|
@@ -2756,7 +2767,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
2756
2767
|
|
|
2757
2768
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
2758
2769
|
import katex from "katex";
|
|
2759
|
-
import { jsx as
|
|
2770
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2760
2771
|
var EquationNode = ({ node }) => {
|
|
2761
2772
|
const { equation, inline } = node;
|
|
2762
2773
|
let html = "";
|
|
@@ -2771,7 +2782,7 @@ var EquationNode = ({ node }) => {
|
|
|
2771
2782
|
});
|
|
2772
2783
|
}
|
|
2773
2784
|
if (inline) {
|
|
2774
|
-
return /* @__PURE__ */
|
|
2785
|
+
return /* @__PURE__ */ jsx43(
|
|
2775
2786
|
"span",
|
|
2776
2787
|
{
|
|
2777
2788
|
className: "katex-inline",
|
|
@@ -2779,7 +2790,7 @@ var EquationNode = ({ node }) => {
|
|
|
2779
2790
|
}
|
|
2780
2791
|
);
|
|
2781
2792
|
}
|
|
2782
|
-
return /* @__PURE__ */
|
|
2793
|
+
return /* @__PURE__ */ jsx43(
|
|
2783
2794
|
"div",
|
|
2784
2795
|
{
|
|
2785
2796
|
className: "katex-block my-3 text-center",
|
|
@@ -2790,7 +2801,7 @@ var EquationNode = ({ node }) => {
|
|
|
2790
2801
|
var EquationNode_default = EquationNode;
|
|
2791
2802
|
|
|
2792
2803
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
2793
|
-
import { jsx as
|
|
2804
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2794
2805
|
function getNestedProperty(obj, path) {
|
|
2795
2806
|
if (!obj || !path) return null;
|
|
2796
2807
|
if (path.includes(".")) {
|
|
@@ -2803,7 +2814,7 @@ function getNestedProperty(obj, path) {
|
|
|
2803
2814
|
}
|
|
2804
2815
|
const value = obj[path];
|
|
2805
2816
|
if (Array.isArray(value)) {
|
|
2806
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
2817
|
+
return value.map((item, index) => /* @__PURE__ */ jsx44("div", { children: String(item) }, index));
|
|
2807
2818
|
}
|
|
2808
2819
|
return value;
|
|
2809
2820
|
}
|
|
@@ -2864,7 +2875,7 @@ var DatafieldNode = (props) => {
|
|
|
2864
2875
|
const dataType = props.node.dataType;
|
|
2865
2876
|
if (isEmptyValue) return null;
|
|
2866
2877
|
if (dataType === "rawContent") {
|
|
2867
|
-
return /* @__PURE__ */
|
|
2878
|
+
return /* @__PURE__ */ jsx44(
|
|
2868
2879
|
PageBodyRenderer_default,
|
|
2869
2880
|
{
|
|
2870
2881
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -2879,12 +2890,12 @@ var DatafieldNode = (props) => {
|
|
|
2879
2890
|
}
|
|
2880
2891
|
);
|
|
2881
2892
|
}
|
|
2882
|
-
return /* @__PURE__ */
|
|
2893
|
+
return /* @__PURE__ */ jsx44(
|
|
2883
2894
|
"span",
|
|
2884
2895
|
{
|
|
2885
2896
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
2886
2897
|
style: styles,
|
|
2887
|
-
children: /* @__PURE__ */
|
|
2898
|
+
children: /* @__PURE__ */ jsx44(
|
|
2888
2899
|
ViewControl_default,
|
|
2889
2900
|
{
|
|
2890
2901
|
controlType: dataType,
|
|
@@ -2897,7 +2908,7 @@ var DatafieldNode = (props) => {
|
|
|
2897
2908
|
var DatafieldNode_default = DatafieldNode;
|
|
2898
2909
|
|
|
2899
2910
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2900
|
-
import { Fragment as Fragment4, jsx as
|
|
2911
|
+
import { Fragment as Fragment4, jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2901
2912
|
var ParagraphNode = (props) => {
|
|
2902
2913
|
const NodeTypes2 = {
|
|
2903
2914
|
["text"]: TextNode_default,
|
|
@@ -2917,9 +2928,9 @@ var ParagraphNode = (props) => {
|
|
|
2917
2928
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
2918
2929
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
2919
2930
|
if (isInlineOnlyParent) {
|
|
2920
|
-
return /* @__PURE__ */
|
|
2931
|
+
return /* @__PURE__ */ jsx45(Fragment4, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2921
2932
|
const SelectedNode = NodeTypes2[node.type];
|
|
2922
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ jsx45(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(
|
|
2923
2934
|
SelectedNode,
|
|
2924
2935
|
{
|
|
2925
2936
|
node,
|
|
@@ -2934,7 +2945,7 @@ var ParagraphNode = (props) => {
|
|
|
2934
2945
|
return /* @__PURE__ */ jsxs27("div", { className: " " + formatClasses, children: [
|
|
2935
2946
|
hasChildren && props.node.children.map((node, index) => {
|
|
2936
2947
|
const SelectedNode = NodeTypes2[node.type];
|
|
2937
|
-
return /* @__PURE__ */
|
|
2948
|
+
return /* @__PURE__ */ jsx45(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(
|
|
2938
2949
|
SelectedNode,
|
|
2939
2950
|
{
|
|
2940
2951
|
node,
|
|
@@ -2945,14 +2956,14 @@ var ParagraphNode = (props) => {
|
|
|
2945
2956
|
}
|
|
2946
2957
|
) }, index);
|
|
2947
2958
|
}),
|
|
2948
|
-
!hasChildren && /* @__PURE__ */
|
|
2959
|
+
!hasChildren && /* @__PURE__ */ jsx45("div", { className: "py-1.5 lg:py-2" })
|
|
2949
2960
|
] });
|
|
2950
2961
|
};
|
|
2951
2962
|
var ParagraphNode_default = ParagraphNode;
|
|
2952
2963
|
|
|
2953
2964
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2954
2965
|
import React35 from "react";
|
|
2955
|
-
import { Fragment as Fragment5, jsx as
|
|
2966
|
+
import { Fragment as Fragment5, jsx as jsx46 } from "react/jsx-runtime";
|
|
2956
2967
|
var HeadingNode = (props) => {
|
|
2957
2968
|
const NodeTypes2 = {
|
|
2958
2969
|
["text"]: TextNode_default,
|
|
@@ -2968,12 +2979,12 @@ var HeadingNode = (props) => {
|
|
|
2968
2979
|
{
|
|
2969
2980
|
}
|
|
2970
2981
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
2971
|
-
return /* @__PURE__ */
|
|
2982
|
+
return /* @__PURE__ */ jsx46(Fragment5, { children: React35.createElement(
|
|
2972
2983
|
HeadingTag,
|
|
2973
2984
|
{ className: formatClasses },
|
|
2974
2985
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2975
2986
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2976
|
-
return /* @__PURE__ */
|
|
2987
|
+
return /* @__PURE__ */ jsx46(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2977
2988
|
})
|
|
2978
2989
|
) });
|
|
2979
2990
|
};
|
|
@@ -2984,7 +2995,7 @@ import React37 from "react";
|
|
|
2984
2995
|
|
|
2985
2996
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2986
2997
|
import React36 from "react";
|
|
2987
|
-
import { jsx as
|
|
2998
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2988
2999
|
var ListItemNode = (props) => {
|
|
2989
3000
|
const NodeTypes2 = {
|
|
2990
3001
|
text: TextNode_default,
|
|
@@ -3001,37 +3012,37 @@ var ListItemNode = (props) => {
|
|
|
3001
3012
|
liStyle.fontSize = match[1].trim();
|
|
3002
3013
|
}
|
|
3003
3014
|
}
|
|
3004
|
-
return /* @__PURE__ */
|
|
3015
|
+
return /* @__PURE__ */ jsx47("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
3005
3016
|
const SelectedNode = NodeTypes2[node.type];
|
|
3006
3017
|
if (node.type === "linebreak") {
|
|
3007
3018
|
if (!foundFirstBreak) {
|
|
3008
3019
|
foundFirstBreak = true;
|
|
3009
|
-
return /* @__PURE__ */
|
|
3020
|
+
return /* @__PURE__ */ jsx47("div", {}, index);
|
|
3010
3021
|
} else {
|
|
3011
|
-
return /* @__PURE__ */
|
|
3022
|
+
return /* @__PURE__ */ jsx47("div", { className: "py-1 lg:py-2" }, index);
|
|
3012
3023
|
}
|
|
3013
3024
|
} else {
|
|
3014
3025
|
foundFirstBreak = false;
|
|
3015
|
-
return /* @__PURE__ */
|
|
3026
|
+
return /* @__PURE__ */ jsx47(React36.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3016
3027
|
}
|
|
3017
3028
|
}) });
|
|
3018
3029
|
};
|
|
3019
3030
|
var ListItemNode_default = ListItemNode;
|
|
3020
3031
|
|
|
3021
3032
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
3022
|
-
import { jsx as
|
|
3033
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3023
3034
|
var ListNode = (props) => {
|
|
3024
3035
|
const NodeTypes2 = {
|
|
3025
3036
|
listitem: ListItemNode_default
|
|
3026
3037
|
};
|
|
3027
3038
|
return /* @__PURE__ */ jsxs28(React37.Fragment, { children: [
|
|
3028
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
3039
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx48("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3029
3040
|
const SelectedNode = NodeTypes2[node.type];
|
|
3030
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsx48(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3031
3042
|
}) }),
|
|
3032
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
3043
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx48("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3033
3044
|
const SelectedNode = NodeTypes2[node.type];
|
|
3034
|
-
return /* @__PURE__ */
|
|
3045
|
+
return /* @__PURE__ */ jsx48(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3035
3046
|
}) })
|
|
3036
3047
|
] });
|
|
3037
3048
|
};
|
|
@@ -3039,16 +3050,16 @@ var ListNode_default = ListNode;
|
|
|
3039
3050
|
|
|
3040
3051
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
3041
3052
|
import React38 from "react";
|
|
3042
|
-
import { jsx as
|
|
3053
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
3043
3054
|
var QuoteNode = (props) => {
|
|
3044
3055
|
const NodeTypes2 = {
|
|
3045
3056
|
["text"]: TextNode_default,
|
|
3046
3057
|
["linebreak"]: LineBreakNode_default,
|
|
3047
3058
|
["link"]: LinkNode_default
|
|
3048
3059
|
};
|
|
3049
|
-
return /* @__PURE__ */
|
|
3060
|
+
return /* @__PURE__ */ jsx49("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3050
3061
|
const SelectedNode = NodeTypes2[node.type];
|
|
3051
|
-
return /* @__PURE__ */
|
|
3062
|
+
return /* @__PURE__ */ jsx49(React38.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx49(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3052
3063
|
}) });
|
|
3053
3064
|
};
|
|
3054
3065
|
var QuoteNode_default = QuoteNode;
|
|
@@ -3056,11 +3067,11 @@ var QuoteNode_default = QuoteNode;
|
|
|
3056
3067
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3057
3068
|
import React39 from "react";
|
|
3058
3069
|
import dynamic from "next/dynamic";
|
|
3059
|
-
import { jsx as
|
|
3070
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3060
3071
|
var CopyButton = dynamic(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
3061
3072
|
ssr: false,
|
|
3062
3073
|
// optional: fallback UI while loading
|
|
3063
|
-
loading: () => /* @__PURE__ */
|
|
3074
|
+
loading: () => /* @__PURE__ */ jsx50("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
3064
3075
|
});
|
|
3065
3076
|
var CodeNode = (props) => {
|
|
3066
3077
|
const NodeTypes2 = {
|
|
@@ -3076,12 +3087,12 @@ var CodeNode = (props) => {
|
|
|
3076
3087
|
}).join("") ?? "";
|
|
3077
3088
|
return /* @__PURE__ */ jsxs29("div", { children: [
|
|
3078
3089
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
3079
|
-
/* @__PURE__ */
|
|
3080
|
-
/* @__PURE__ */
|
|
3090
|
+
/* @__PURE__ */ jsx50("span", { children: "Code Snippet" }),
|
|
3091
|
+
/* @__PURE__ */ jsx50(CopyButton, { text: textContent })
|
|
3081
3092
|
] }),
|
|
3082
|
-
/* @__PURE__ */
|
|
3093
|
+
/* @__PURE__ */ jsx50("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) => {
|
|
3083
3094
|
const SelectedNode = NodeTypes2[node.type];
|
|
3084
|
-
return /* @__PURE__ */
|
|
3095
|
+
return /* @__PURE__ */ jsx50(React39.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx50(
|
|
3085
3096
|
SelectedNode,
|
|
3086
3097
|
{
|
|
3087
3098
|
node,
|
|
@@ -3096,9 +3107,9 @@ var CodeNode = (props) => {
|
|
|
3096
3107
|
var CodeNode_default = CodeNode;
|
|
3097
3108
|
|
|
3098
3109
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
3099
|
-
import { jsx as
|
|
3110
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
3100
3111
|
var HorizontalRuleNode = () => {
|
|
3101
|
-
return /* @__PURE__ */
|
|
3112
|
+
return /* @__PURE__ */ jsx51("hr", {});
|
|
3102
3113
|
};
|
|
3103
3114
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3104
3115
|
|
|
@@ -3130,7 +3141,7 @@ var AssetUtility_default = AssetUtility;
|
|
|
3130
3141
|
import dynamic2 from "next/dynamic";
|
|
3131
3142
|
|
|
3132
3143
|
// src/components/DeviceAssetSelector.tsx
|
|
3133
|
-
import { jsx as
|
|
3144
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
3134
3145
|
var DeviceAssetSelector = ({
|
|
3135
3146
|
assets,
|
|
3136
3147
|
assetBaseUrl,
|
|
@@ -3205,7 +3216,7 @@ var DeviceAssetSelector = ({
|
|
|
3205
3216
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
3206
3217
|
const renderMedia = () => {
|
|
3207
3218
|
if (isHls) {
|
|
3208
|
-
return /* @__PURE__ */
|
|
3219
|
+
return /* @__PURE__ */ jsx52(
|
|
3209
3220
|
HlsPlayer_default,
|
|
3210
3221
|
{
|
|
3211
3222
|
assetUrl: resolvedAssetUrl,
|
|
@@ -3222,7 +3233,7 @@ var DeviceAssetSelector = ({
|
|
|
3222
3233
|
} else {
|
|
3223
3234
|
return (
|
|
3224
3235
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
3225
|
-
/* @__PURE__ */
|
|
3236
|
+
/* @__PURE__ */ jsx52(
|
|
3226
3237
|
"img",
|
|
3227
3238
|
{
|
|
3228
3239
|
style: styles,
|
|
@@ -3238,17 +3249,17 @@ var DeviceAssetSelector = ({
|
|
|
3238
3249
|
}
|
|
3239
3250
|
};
|
|
3240
3251
|
if (width) {
|
|
3241
|
-
return /* @__PURE__ */
|
|
3252
|
+
return /* @__PURE__ */ jsx52("div", { style: { width }, children: renderMedia() });
|
|
3242
3253
|
}
|
|
3243
3254
|
if (nodeProps?.format) {
|
|
3244
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ jsx52("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3245
3256
|
}
|
|
3246
3257
|
return renderMedia();
|
|
3247
3258
|
};
|
|
3248
3259
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
3249
3260
|
|
|
3250
3261
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3251
|
-
import { Fragment as Fragment6, jsx as
|
|
3262
|
+
import { Fragment as Fragment6, jsx as jsx53 } from "react/jsx-runtime";
|
|
3252
3263
|
var HlsPlayer = dynamic2(() => import("./HlsPlayer-FFEIK6FG.mjs"), {
|
|
3253
3264
|
ssr: false
|
|
3254
3265
|
});
|
|
@@ -3291,7 +3302,7 @@ var ImageNode = (props) => {
|
|
|
3291
3302
|
console.error("Error parsing assets in ImageNode:", error);
|
|
3292
3303
|
}
|
|
3293
3304
|
if (assets && assets.length > 0) {
|
|
3294
|
-
return /* @__PURE__ */
|
|
3305
|
+
return /* @__PURE__ */ jsx53(Fragment6, { children: /* @__PURE__ */ jsx53(
|
|
3295
3306
|
DeviceAssetSelector_default,
|
|
3296
3307
|
{
|
|
3297
3308
|
device: props.device,
|
|
@@ -3340,7 +3351,7 @@ var ImageNode = (props) => {
|
|
|
3340
3351
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
3341
3352
|
const renderMedia = () => {
|
|
3342
3353
|
if (isHls) {
|
|
3343
|
-
return /* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ jsx53(
|
|
3344
3355
|
HlsPlayer,
|
|
3345
3356
|
{
|
|
3346
3357
|
assetUrl: imageUrl,
|
|
@@ -3355,7 +3366,7 @@ var ImageNode = (props) => {
|
|
|
3355
3366
|
}
|
|
3356
3367
|
);
|
|
3357
3368
|
} else {
|
|
3358
|
-
return /* @__PURE__ */
|
|
3369
|
+
return /* @__PURE__ */ jsx53(React40.Fragment, { children: /* @__PURE__ */ jsx53(
|
|
3359
3370
|
"img",
|
|
3360
3371
|
{
|
|
3361
3372
|
style: styles,
|
|
@@ -3370,14 +3381,14 @@ var ImageNode = (props) => {
|
|
|
3370
3381
|
}
|
|
3371
3382
|
};
|
|
3372
3383
|
if (props.node.width) {
|
|
3373
|
-
return /* @__PURE__ */
|
|
3384
|
+
return /* @__PURE__ */ jsx53("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3374
3385
|
}
|
|
3375
3386
|
return renderMedia();
|
|
3376
3387
|
};
|
|
3377
3388
|
var ImageNode_default = ImageNode;
|
|
3378
3389
|
|
|
3379
3390
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3380
|
-
import { Fragment as Fragment7, jsx as
|
|
3391
|
+
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3381
3392
|
var WidgetNode = (props) => {
|
|
3382
3393
|
const getWidgetParameters = () => {
|
|
3383
3394
|
const widgetInputParameters = {
|
|
@@ -3434,7 +3445,7 @@ var WidgetNode = (props) => {
|
|
|
3434
3445
|
};
|
|
3435
3446
|
const widgetCode = props.node?.widgetCode;
|
|
3436
3447
|
if (!widgetCode) {
|
|
3437
|
-
return /* @__PURE__ */
|
|
3448
|
+
return /* @__PURE__ */ jsx54(Fragment7, { children: "Invalid widget" });
|
|
3438
3449
|
}
|
|
3439
3450
|
const SelectedWidget = getWidget(widgetCode);
|
|
3440
3451
|
if (!SelectedWidget) {
|
|
@@ -3449,7 +3460,7 @@ var WidgetNode = (props) => {
|
|
|
3449
3460
|
const widgetParams = getWidgetParameters();
|
|
3450
3461
|
return (
|
|
3451
3462
|
// eslint-disable-next-line react-hooks/static-components
|
|
3452
|
-
/* @__PURE__ */
|
|
3463
|
+
/* @__PURE__ */ jsx54(
|
|
3453
3464
|
SelectedWidget,
|
|
3454
3465
|
{
|
|
3455
3466
|
params: widgetParams,
|
|
@@ -3468,9 +3479,9 @@ var WidgetNode_default = WidgetNode;
|
|
|
3468
3479
|
import React41, { useRef as useRef3, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect7 } from "react";
|
|
3469
3480
|
|
|
3470
3481
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3471
|
-
import { jsx as
|
|
3482
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
3472
3483
|
var InputControlNode = (props) => {
|
|
3473
|
-
return /* @__PURE__ */
|
|
3484
|
+
return /* @__PURE__ */ jsx55("div", { children: /* @__PURE__ */ jsx55(
|
|
3474
3485
|
InputControl_default,
|
|
3475
3486
|
{
|
|
3476
3487
|
name: props.node.name,
|
|
@@ -3704,7 +3715,7 @@ var ServiceClient = class {
|
|
|
3704
3715
|
var ServiceClient_default = ServiceClient;
|
|
3705
3716
|
|
|
3706
3717
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3707
|
-
import { jsx as
|
|
3718
|
+
import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3708
3719
|
var FormContainerNode = (props) => {
|
|
3709
3720
|
const NodeTypes2 = {
|
|
3710
3721
|
["input-control"]: InputControlNode_default
|
|
@@ -3739,7 +3750,7 @@ var FormContainerNode = (props) => {
|
|
|
3739
3750
|
{
|
|
3740
3751
|
}
|
|
3741
3752
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3742
|
-
return /* @__PURE__ */
|
|
3753
|
+
return /* @__PURE__ */ jsx56(React41.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx56(
|
|
3743
3754
|
InputControlNode_default,
|
|
3744
3755
|
{
|
|
3745
3756
|
value: formState.inputValues[node2.name],
|
|
@@ -3748,7 +3759,7 @@ var FormContainerNode = (props) => {
|
|
|
3748
3759
|
}
|
|
3749
3760
|
) }, index);
|
|
3750
3761
|
}),
|
|
3751
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
3762
|
+
node.children.length == 0 && /* @__PURE__ */ jsx56("div", { className: "py-0.5 lg:py-1.5" })
|
|
3752
3763
|
] });
|
|
3753
3764
|
};
|
|
3754
3765
|
var FormContainerNode_default = FormContainerNode;
|
|
@@ -3758,7 +3769,7 @@ import React44 from "react";
|
|
|
3758
3769
|
|
|
3759
3770
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3760
3771
|
import dynamic3 from "next/dynamic";
|
|
3761
|
-
import { jsx as
|
|
3772
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
3762
3773
|
var IframeClient = dynamic3(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
3763
3774
|
ssr: false
|
|
3764
3775
|
});
|
|
@@ -3771,13 +3782,13 @@ var EmbedNode = (props) => {
|
|
|
3771
3782
|
} else {
|
|
3772
3783
|
src = props.node.embedSrc;
|
|
3773
3784
|
}
|
|
3774
|
-
return /* @__PURE__ */
|
|
3785
|
+
return /* @__PURE__ */ jsx57("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx57(IframeClient, { src }) });
|
|
3775
3786
|
};
|
|
3776
3787
|
var EmbedNode_default = EmbedNode;
|
|
3777
3788
|
|
|
3778
3789
|
// src/components/Slider.tsx
|
|
3779
3790
|
import React42, { useState as useState8, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3780
|
-
import { Fragment as Fragment8, jsx as
|
|
3791
|
+
import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3781
3792
|
var Slider = ({
|
|
3782
3793
|
children,
|
|
3783
3794
|
slidesToShow = 4,
|
|
@@ -3874,7 +3885,7 @@ var Slider = ({
|
|
|
3874
3885
|
if (!React42.isValidElement(child)) return null;
|
|
3875
3886
|
const childProps = child.props;
|
|
3876
3887
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3877
|
-
return /* @__PURE__ */
|
|
3888
|
+
return /* @__PURE__ */ jsx58(
|
|
3878
3889
|
"div",
|
|
3879
3890
|
{
|
|
3880
3891
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -3904,7 +3915,7 @@ var Slider = ({
|
|
|
3904
3915
|
onMouseEnter: handleMouseEnter,
|
|
3905
3916
|
onMouseLeave: handleMouseLeave,
|
|
3906
3917
|
children: [
|
|
3907
|
-
/* @__PURE__ */
|
|
3918
|
+
/* @__PURE__ */ jsx58(
|
|
3908
3919
|
"div",
|
|
3909
3920
|
{
|
|
3910
3921
|
className: "flex h-full",
|
|
@@ -3916,14 +3927,14 @@ var Slider = ({
|
|
|
3916
3927
|
}
|
|
3917
3928
|
),
|
|
3918
3929
|
show_arrows && /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
3919
|
-
/* @__PURE__ */
|
|
3930
|
+
/* @__PURE__ */ jsx58(
|
|
3920
3931
|
ArrowButton,
|
|
3921
3932
|
{
|
|
3922
3933
|
direction: "left",
|
|
3923
3934
|
onClick: prevSlide,
|
|
3924
3935
|
visible: infinite_scroll || currentSlide > 0,
|
|
3925
3936
|
className: arrowClassName,
|
|
3926
|
-
children: /* @__PURE__ */
|
|
3937
|
+
children: /* @__PURE__ */ jsx58("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__ */ jsx58("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3927
3938
|
}
|
|
3928
3939
|
),
|
|
3929
3940
|
/* @__PURE__ */ jsxs32(
|
|
@@ -3934,13 +3945,13 @@ var Slider = ({
|
|
|
3934
3945
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3935
3946
|
className: arrowClassName,
|
|
3936
3947
|
children: [
|
|
3937
|
-
/* @__PURE__ */
|
|
3948
|
+
/* @__PURE__ */ jsx58("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__ */ jsx58("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3938
3949
|
" "
|
|
3939
3950
|
]
|
|
3940
3951
|
}
|
|
3941
3952
|
)
|
|
3942
3953
|
] }),
|
|
3943
|
-
show_dots && /* @__PURE__ */
|
|
3954
|
+
show_dots && /* @__PURE__ */ jsx58("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__ */ jsx58(
|
|
3944
3955
|
ProgressPill,
|
|
3945
3956
|
{
|
|
3946
3957
|
active: index === currentSlide,
|
|
@@ -3966,7 +3977,7 @@ var ArrowButton = ({
|
|
|
3966
3977
|
visible,
|
|
3967
3978
|
children,
|
|
3968
3979
|
className = ""
|
|
3969
|
-
}) => /* @__PURE__ */
|
|
3980
|
+
}) => /* @__PURE__ */ jsx58(
|
|
3970
3981
|
"button",
|
|
3971
3982
|
{
|
|
3972
3983
|
className: `
|
|
@@ -4053,7 +4064,7 @@ var ProgressPill = ({
|
|
|
4053
4064
|
const renderProgressBar = () => {
|
|
4054
4065
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
4055
4066
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
4056
|
-
return /* @__PURE__ */
|
|
4067
|
+
return /* @__PURE__ */ jsx58(
|
|
4057
4068
|
"div",
|
|
4058
4069
|
{
|
|
4059
4070
|
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`,
|
|
@@ -4065,7 +4076,7 @@ var ProgressPill = ({
|
|
|
4065
4076
|
};
|
|
4066
4077
|
const renderCumulativeFill = () => {
|
|
4067
4078
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4068
|
-
return /* @__PURE__ */
|
|
4079
|
+
return /* @__PURE__ */ jsx58(
|
|
4069
4080
|
"div",
|
|
4070
4081
|
{
|
|
4071
4082
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4251,10 +4262,10 @@ var PathUtility = class {
|
|
|
4251
4262
|
var PathUtility_default = new PathUtility();
|
|
4252
4263
|
|
|
4253
4264
|
// src/components/NoDataFound.tsx
|
|
4254
|
-
import { jsx as
|
|
4265
|
+
import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4255
4266
|
var NoDataFound = () => {
|
|
4256
4267
|
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4257
|
-
/* @__PURE__ */
|
|
4268
|
+
/* @__PURE__ */ jsx59("div", { className: "mb-5", children: /* @__PURE__ */ jsx59("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx59(
|
|
4258
4269
|
"svg",
|
|
4259
4270
|
{
|
|
4260
4271
|
className: "w-10 h-10",
|
|
@@ -4262,7 +4273,7 @@ var NoDataFound = () => {
|
|
|
4262
4273
|
stroke: "currentColor",
|
|
4263
4274
|
viewBox: "0 0 24 24",
|
|
4264
4275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4265
|
-
children: /* @__PURE__ */
|
|
4276
|
+
children: /* @__PURE__ */ jsx59(
|
|
4266
4277
|
"path",
|
|
4267
4278
|
{
|
|
4268
4279
|
strokeLinecap: "round",
|
|
@@ -4273,15 +4284,15 @@ var NoDataFound = () => {
|
|
|
4273
4284
|
)
|
|
4274
4285
|
}
|
|
4275
4286
|
) }) }),
|
|
4276
|
-
/* @__PURE__ */
|
|
4277
|
-
/* @__PURE__ */
|
|
4287
|
+
/* @__PURE__ */ jsx59("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4288
|
+
/* @__PURE__ */ jsx59("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4278
4289
|
] });
|
|
4279
4290
|
};
|
|
4280
4291
|
var NoDataFound_default = NoDataFound;
|
|
4281
4292
|
|
|
4282
4293
|
// src/components/Pagination.tsx
|
|
4283
4294
|
import { useMemo } from "react";
|
|
4284
|
-
import { jsx as
|
|
4295
|
+
import { jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4285
4296
|
var Pagination = (props) => {
|
|
4286
4297
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4287
4298
|
const builder = useMemo(() => {
|
|
@@ -4325,7 +4336,7 @@ var Pagination = (props) => {
|
|
|
4325
4336
|
return range;
|
|
4326
4337
|
};
|
|
4327
4338
|
const paginationRange = getPaginationRange();
|
|
4328
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
4339
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx60(
|
|
4329
4340
|
Hyperlink,
|
|
4330
4341
|
{
|
|
4331
4342
|
linkType: "Link" /* Link */,
|
|
@@ -4340,9 +4351,9 @@ var Pagination = (props) => {
|
|
|
4340
4351
|
);
|
|
4341
4352
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4342
4353
|
if (disabled) {
|
|
4343
|
-
return /* @__PURE__ */
|
|
4354
|
+
return /* @__PURE__ */ jsx60("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 });
|
|
4344
4355
|
}
|
|
4345
|
-
return /* @__PURE__ */
|
|
4356
|
+
return /* @__PURE__ */ jsx60(
|
|
4346
4357
|
Hyperlink,
|
|
4347
4358
|
{
|
|
4348
4359
|
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",
|
|
@@ -4363,7 +4374,7 @@ var Pagination = (props) => {
|
|
|
4363
4374
|
] }),
|
|
4364
4375
|
" ",
|
|
4365
4376
|
"out of ",
|
|
4366
|
-
/* @__PURE__ */
|
|
4377
|
+
/* @__PURE__ */ jsx60("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4367
4378
|
" results"
|
|
4368
4379
|
] }),
|
|
4369
4380
|
totalPages > 1 && /* @__PURE__ */ jsxs34("div", { className: "flex items-center space-x-1", children: [
|
|
@@ -4373,14 +4384,14 @@ var Pagination = (props) => {
|
|
|
4373
4384
|
page: activePageNumber - 1,
|
|
4374
4385
|
disabled: activePageNumber === 1,
|
|
4375
4386
|
children: [
|
|
4376
|
-
/* @__PURE__ */
|
|
4377
|
-
/* @__PURE__ */
|
|
4387
|
+
/* @__PURE__ */ jsx60("span", { children: /* @__PURE__ */ jsx60(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4388
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "Prev" })
|
|
4378
4389
|
]
|
|
4379
4390
|
}
|
|
4380
4391
|
),
|
|
4381
4392
|
paginationRange.map((item, index) => {
|
|
4382
4393
|
if (item === "...") {
|
|
4383
|
-
return /* @__PURE__ */
|
|
4394
|
+
return /* @__PURE__ */ jsx60(
|
|
4384
4395
|
"span",
|
|
4385
4396
|
{
|
|
4386
4397
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4390,7 +4401,7 @@ var Pagination = (props) => {
|
|
|
4390
4401
|
);
|
|
4391
4402
|
}
|
|
4392
4403
|
const page = item;
|
|
4393
|
-
return /* @__PURE__ */
|
|
4404
|
+
return /* @__PURE__ */ jsx60(PageButton, { page, children: page }, page);
|
|
4394
4405
|
}),
|
|
4395
4406
|
/* @__PURE__ */ jsxs34(
|
|
4396
4407
|
NavigationButton,
|
|
@@ -4398,15 +4409,15 @@ var Pagination = (props) => {
|
|
|
4398
4409
|
page: activePageNumber + 1,
|
|
4399
4410
|
disabled: activePageNumber === totalPages,
|
|
4400
4411
|
children: [
|
|
4401
|
-
/* @__PURE__ */
|
|
4402
|
-
/* @__PURE__ */
|
|
4412
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "Next" }),
|
|
4413
|
+
/* @__PURE__ */ jsx60("span", { children: /* @__PURE__ */ jsx60(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4403
4414
|
]
|
|
4404
4415
|
}
|
|
4405
4416
|
)
|
|
4406
4417
|
] }),
|
|
4407
4418
|
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs34("div", { className: "flex items-center space-x-2", children: [
|
|
4408
|
-
/* @__PURE__ */
|
|
4409
|
-
/* @__PURE__ */
|
|
4419
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "Go to:" }),
|
|
4420
|
+
/* @__PURE__ */ jsx60("div", { className: "relative", children: /* @__PURE__ */ jsx60(
|
|
4410
4421
|
"input",
|
|
4411
4422
|
{
|
|
4412
4423
|
type: "number",
|
|
@@ -4427,9 +4438,9 @@ var Pagination = (props) => {
|
|
|
4427
4438
|
) })
|
|
4428
4439
|
] })
|
|
4429
4440
|
] }),
|
|
4430
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
4431
|
-
/* @__PURE__ */
|
|
4432
|
-
/* @__PURE__ */
|
|
4441
|
+
showPageSizeSelector && /* @__PURE__ */ jsx60("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4442
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "Show:" }),
|
|
4443
|
+
/* @__PURE__ */ jsx60("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx60(
|
|
4433
4444
|
Hyperlink,
|
|
4434
4445
|
{
|
|
4435
4446
|
className: `
|
|
@@ -4441,7 +4452,7 @@ var Pagination = (props) => {
|
|
|
4441
4452
|
},
|
|
4442
4453
|
size
|
|
4443
4454
|
)) }),
|
|
4444
|
-
/* @__PURE__ */
|
|
4455
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "per page" })
|
|
4445
4456
|
] }) })
|
|
4446
4457
|
] });
|
|
4447
4458
|
};
|
|
@@ -4449,7 +4460,7 @@ var Pagination_default = Pagination;
|
|
|
4449
4460
|
|
|
4450
4461
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
4451
4462
|
import dynamic4 from "next/dynamic";
|
|
4452
|
-
import { jsx as
|
|
4463
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
4453
4464
|
var HlsPlayer1 = dynamic4(() => import("./HlsPlayer-FFEIK6FG.mjs"), {
|
|
4454
4465
|
ssr: false
|
|
4455
4466
|
});
|
|
@@ -4486,7 +4497,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4486
4497
|
right: "justify-end"
|
|
4487
4498
|
};
|
|
4488
4499
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
4489
|
-
return /* @__PURE__ */
|
|
4500
|
+
return /* @__PURE__ */ jsx61("div", { className: `flex flex-wrap gap-4 ${formatClasses}`, children: visibleImages.map((img, idx) => {
|
|
4490
4501
|
const imageUrl = resolveImageUrl(img.imageUrl);
|
|
4491
4502
|
if (!imageUrl) return null;
|
|
4492
4503
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
|
@@ -4494,7 +4505,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4494
4505
|
const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
|
|
4495
4506
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
4496
4507
|
const alt = img.title || "Gallery image";
|
|
4497
|
-
return /* @__PURE__ */
|
|
4508
|
+
return /* @__PURE__ */ jsx61("div", { className: "max-w-full", children: isHls ? /* @__PURE__ */ jsx61(
|
|
4498
4509
|
HlsPlayer1,
|
|
4499
4510
|
{
|
|
4500
4511
|
assetUrl: imageUrl,
|
|
@@ -4509,7 +4520,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4509
4520
|
}
|
|
4510
4521
|
) : (
|
|
4511
4522
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
4512
|
-
/* @__PURE__ */
|
|
4523
|
+
/* @__PURE__ */ jsx61(
|
|
4513
4524
|
"img",
|
|
4514
4525
|
{
|
|
4515
4526
|
loading: "lazy",
|
|
@@ -4526,7 +4537,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4526
4537
|
var ImageGalleryNode_default = ImageGalleryNode;
|
|
4527
4538
|
|
|
4528
4539
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4529
|
-
import { jsx as
|
|
4540
|
+
import { jsx as jsx62, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4530
4541
|
function toCamelCase(str) {
|
|
4531
4542
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4532
4543
|
}
|
|
@@ -4709,7 +4720,7 @@ var DivContainer = async (props) => {
|
|
|
4709
4720
|
response = await serviceClient.get(endpoint);
|
|
4710
4721
|
result = response?.result;
|
|
4711
4722
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4712
|
-
return /* @__PURE__ */
|
|
4723
|
+
return /* @__PURE__ */ jsx62(NoDataFound_default, {});
|
|
4713
4724
|
}
|
|
4714
4725
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4715
4726
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -4721,7 +4732,7 @@ var DivContainer = async (props) => {
|
|
|
4721
4732
|
}
|
|
4722
4733
|
const SelectedNode = NodeTypes2[node.type];
|
|
4723
4734
|
if (!SelectedNode) return null;
|
|
4724
|
-
return /* @__PURE__ */
|
|
4735
|
+
return /* @__PURE__ */ jsx62(React44.Fragment, { children: /* @__PURE__ */ jsx62(
|
|
4725
4736
|
SelectedNode,
|
|
4726
4737
|
{
|
|
4727
4738
|
node,
|
|
@@ -4822,8 +4833,8 @@ var DivContainer = async (props) => {
|
|
|
4822
4833
|
props.node.bgClass
|
|
4823
4834
|
].filter(Boolean).join(" ");
|
|
4824
4835
|
return /* @__PURE__ */ jsxs35(React44.Fragment, { children: [
|
|
4825
|
-
/* @__PURE__ */
|
|
4826
|
-
/* @__PURE__ */
|
|
4836
|
+
/* @__PURE__ */ jsx62("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4837
|
+
/* @__PURE__ */ jsx62(React44.Fragment, { children: /* @__PURE__ */ jsx62(
|
|
4827
4838
|
Wrapper,
|
|
4828
4839
|
{
|
|
4829
4840
|
id: guid,
|
|
@@ -4832,18 +4843,18 @@ var DivContainer = async (props) => {
|
|
|
4832
4843
|
...wrapperProps,
|
|
4833
4844
|
children: dataToRender.map(
|
|
4834
4845
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4835
|
-
(child, i) => /* @__PURE__ */
|
|
4846
|
+
(child, i) => /* @__PURE__ */ jsx62(React44.Fragment, { children: child }, i)
|
|
4836
4847
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4837
4848
|
)
|
|
4838
4849
|
}
|
|
4839
4850
|
) }),
|
|
4840
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4851
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx62("div", { children: /* @__PURE__ */ jsx62(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4841
4852
|
] });
|
|
4842
4853
|
};
|
|
4843
4854
|
var DivContainer_default = DivContainer;
|
|
4844
4855
|
|
|
4845
4856
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4846
|
-
import { jsx as
|
|
4857
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
4847
4858
|
var NodeTypes = {
|
|
4848
4859
|
["paragraph"]: ParagraphNode_default,
|
|
4849
4860
|
["heading"]: HeadingNode_default,
|
|
@@ -4871,11 +4882,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4871
4882
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4872
4883
|
rootNode = pageBodyTree.root;
|
|
4873
4884
|
}
|
|
4874
|
-
return /* @__PURE__ */
|
|
4885
|
+
return /* @__PURE__ */ jsx63(React45.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4875
4886
|
{
|
|
4876
4887
|
}
|
|
4877
4888
|
const SelectedNode = NodeTypes[node.type];
|
|
4878
|
-
return /* @__PURE__ */
|
|
4889
|
+
return /* @__PURE__ */ jsx63(React45.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx63(React45.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx63(React45.Fragment, { children: /* @__PURE__ */ jsx63(
|
|
4879
4890
|
SelectedNode,
|
|
4880
4891
|
{
|
|
4881
4892
|
node,
|
|
@@ -4890,7 +4901,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4890
4901
|
assetBaseUrl: props.assetBaseUrl,
|
|
4891
4902
|
device: props.device
|
|
4892
4903
|
}
|
|
4893
|
-
) }) : /* @__PURE__ */
|
|
4904
|
+
) }) : /* @__PURE__ */ jsx63(React45.Fragment, { children: /* @__PURE__ */ jsx63(
|
|
4894
4905
|
SelectedNode,
|
|
4895
4906
|
{
|
|
4896
4907
|
node,
|