akeyless-client-commons 1.0.4 → 1.0.5
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/components/index.d.mts +12 -3
- package/dist/components/index.d.ts +12 -3
- package/dist/components/index.js +332 -279
- package/dist/components/index.mjs +330 -281
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -428,6 +428,9 @@ __export(components_exports, {
|
|
|
428
428
|
Button: function() {
|
|
429
429
|
return Button;
|
|
430
430
|
},
|
|
431
|
+
Checkbox: function() {
|
|
432
|
+
return Checkbox;
|
|
433
|
+
},
|
|
431
434
|
CodeInput: function() {
|
|
432
435
|
return CodeInput;
|
|
433
436
|
},
|
|
@@ -547,9 +550,58 @@ __export(components_exports, {
|
|
|
547
550
|
}
|
|
548
551
|
});
|
|
549
552
|
module.exports = __toCommonJS(components_exports);
|
|
553
|
+
// src/components/utils/Checkboxes.tsx
|
|
554
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
555
|
+
var Checkbox = function(param) {
|
|
556
|
+
var id = param.id, checked = param.checked, setChecked = param.setChecked, _param_rotate = param.rotate, rotate = _param_rotate === void 0 ? true : _param_rotate, style = param.style;
|
|
557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
558
|
+
className: "checkbox-wrapper-51",
|
|
559
|
+
children: [
|
|
560
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
561
|
+
type: "checkbox",
|
|
562
|
+
id: id,
|
|
563
|
+
className: "hidden",
|
|
564
|
+
checked: checked,
|
|
565
|
+
onChange: function() {
|
|
566
|
+
return setChecked(!checked);
|
|
567
|
+
}
|
|
568
|
+
}),
|
|
569
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
|
|
570
|
+
htmlFor: id,
|
|
571
|
+
className: "relative block w-[42px] h-[24px] cursor-pointer transform-gpu",
|
|
572
|
+
children: [
|
|
573
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
574
|
+
className: "relative top-[1px] left-[1px] w-[40px] h-[22px] rounded-[12px] transition-colors duration-200 ease-in-out ".concat(checked ? "bg-[#52d66b]" : "bg-[#c8ccd4]")
|
|
575
|
+
}),
|
|
576
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
577
|
+
className: "absolute ".concat(rotate ? "left-0" : "right-0", " top-0 w-[24px] h-[24px] bg-white rounded-full shadow-md transition-transform duration-200 ease-in-out ").concat(checked ? rotate ? "translate-x-[18px]" : "-translate-x-[18px]" : ""),
|
|
578
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
579
|
+
width: "10px",
|
|
580
|
+
height: "10px",
|
|
581
|
+
viewBox: "0 0 10 10",
|
|
582
|
+
className: "m-[7px] fill-none",
|
|
583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
584
|
+
d: "M5,1 L5,1 C2.790861,1 1,2.790861 1,5 L1,5 C1,7.209139 2.790861,9 5,9 L5,9 C7.209139,9 9,7.209139 9,5 L9,5 C9,2.790861 7.209139,1 5,1 L5,9 L5,1 Z",
|
|
585
|
+
strokeWidth: "2",
|
|
586
|
+
strokeLinecap: "round",
|
|
587
|
+
strokeLinejoin: "round",
|
|
588
|
+
className: "transition-all duration-500 linear",
|
|
589
|
+
stroke: checked ? "#52d66b" : "#c8ccd4",
|
|
590
|
+
style: {
|
|
591
|
+
strokeDasharray: checked ? "25" : "24",
|
|
592
|
+
strokeDashoffset: checked ? "25" : "0"
|
|
593
|
+
}
|
|
594
|
+
})
|
|
595
|
+
})
|
|
596
|
+
})
|
|
597
|
+
]
|
|
598
|
+
})
|
|
599
|
+
]
|
|
600
|
+
});
|
|
601
|
+
};
|
|
550
602
|
// src/components/utils/ErrorBoundary.tsx
|
|
551
603
|
var import_react = __toESM(require("react"));
|
|
552
|
-
var
|
|
604
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
553
605
|
var ErrorBoundary = /*#__PURE__*/ function(_import_react_default_Component) {
|
|
554
606
|
"use strict";
|
|
555
607
|
_inherits(ErrorBoundary, _import_react_default_Component);
|
|
@@ -581,9 +633,9 @@ var ErrorBoundary = /*#__PURE__*/ function(_import_react_default_Component) {
|
|
|
581
633
|
key: "render",
|
|
582
634
|
value: function render() {
|
|
583
635
|
if (this.state.hasError) {
|
|
584
|
-
return this.props.fallback || /* @__PURE__ */ (0,
|
|
636
|
+
return this.props.fallback || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
585
637
|
className: "full center",
|
|
586
|
-
children: /* @__PURE__ */ (0,
|
|
638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h1", {
|
|
587
639
|
children: "\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9...."
|
|
588
640
|
})
|
|
589
641
|
});
|
|
@@ -606,13 +658,13 @@ var ErrorBoundary = /*#__PURE__*/ function(_import_react_default_Component) {
|
|
|
606
658
|
}(import_react.default.Component);
|
|
607
659
|
// src/components/utils/loaders.tsx
|
|
608
660
|
var import_react_spinners = require("react-spinners");
|
|
609
|
-
var
|
|
661
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
610
662
|
var Loader = function(param) {
|
|
611
663
|
var color = param.color, size3 = param.size, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
612
|
-
return /* @__PURE__ */ (0,
|
|
664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", {
|
|
613
665
|
className: "flex items-center justify-center ".concat(className),
|
|
614
666
|
style: style,
|
|
615
|
-
children: /* @__PURE__ */ (0,
|
|
667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_spinners.ClipLoader, {
|
|
616
668
|
loading: true,
|
|
617
669
|
color: color || "#699A2C",
|
|
618
670
|
size: size3 || 18
|
|
@@ -629,10 +681,10 @@ function cn() {
|
|
|
629
681
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
630
682
|
}
|
|
631
683
|
// src/components/utils/global.tsx
|
|
632
|
-
var
|
|
684
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
633
685
|
var Version = function(param) {
|
|
634
686
|
var version = param.version, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
635
|
-
return /* @__PURE__ */ (0,
|
|
687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", {
|
|
636
688
|
className: cn("absolute text-black z-30 bottom-[0px] text-xs right-0 px-1 ", className),
|
|
637
689
|
children: [
|
|
638
690
|
"v",
|
|
@@ -645,21 +697,21 @@ var import_exceljs = __toESM(require("exceljs"));
|
|
|
645
697
|
var import_file_saver = require("file-saver");
|
|
646
698
|
var import_react7 = require("react");
|
|
647
699
|
// src/assets/svg.tsx
|
|
648
|
-
var
|
|
700
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
649
701
|
var RedXSvg = function(param) {
|
|
650
702
|
var height = param.height, width = param.width, viewBox = param.viewBox;
|
|
651
|
-
return /* @__PURE__ */ (0,
|
|
703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", {
|
|
652
704
|
xmlns: "http://www.w3.org/2000/svg",
|
|
653
705
|
width: width || "32",
|
|
654
706
|
height: height || "32",
|
|
655
707
|
viewBox: viewBox || "0 0 32 32",
|
|
656
708
|
fill: "none",
|
|
657
709
|
children: [
|
|
658
|
-
/* @__PURE__ */ (0,
|
|
710
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", {
|
|
659
711
|
d: "M21.0801 10.3C20.6101 9.80996 19.8301 9.79996 19.3401 10.27L15.6101 13.89L11.8801 10.27C11.3901 9.79996 10.6101 9.80996 10.1401 10.3C9.67008 10.79 9.68008 11.57 10.1701 12.04L13.8501 15.61L10.1701 19.18C9.68008 19.65 9.67008 20.43 10.1401 20.92C10.6101 21.41 11.3901 21.42 11.8801 20.95L15.6101 17.33L19.3401 20.95C19.5701 21.17 19.8801 21.3 20.2001 21.3C20.8801 21.29 21.4301 20.73 21.4201 20.04C21.4201 19.72 21.2901 19.41 21.0601 19.19L17.3801 15.62L21.0601 12.05C21.5501 11.58 21.5601 10.8 21.0901 10.31L21.0801 10.3Z",
|
|
660
712
|
fill: "#FF4C2B"
|
|
661
713
|
}),
|
|
662
|
-
/* @__PURE__ */ (0,
|
|
714
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", {
|
|
663
715
|
d: "M15.61 0C6.99 0 0 6.99 0 15.61C0.86 36.32 30.36 36.31 31.22 15.61C31.21 6.99 24.23 0 15.61 0ZM15.61 28.76C8.35 28.76 2.47 22.87 2.46 15.61C3.18 -1.84 28.04 -1.83 28.76 15.61C28.76 22.87 22.87 28.75 15.61 28.76Z",
|
|
664
716
|
fill: "#FF4C2B"
|
|
665
717
|
})
|
|
@@ -668,20 +720,20 @@ var RedXSvg = function(param) {
|
|
|
668
720
|
};
|
|
669
721
|
var RedXSvg2 = function(param) {
|
|
670
722
|
var height = param.height, width = param.width, viewBox = param.viewBox;
|
|
671
|
-
return /* @__PURE__ */ (0,
|
|
723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", {
|
|
672
724
|
xmlns: "http://www.w3.org/2000/svg",
|
|
673
725
|
width: width || "18px",
|
|
674
726
|
height: height || "18px",
|
|
675
727
|
viewBox: viewBox || "0,0,256,256",
|
|
676
728
|
fillRule: "nonzero",
|
|
677
|
-
children: /* @__PURE__ */ (0,
|
|
729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("g", {
|
|
678
730
|
fill: "#e90404",
|
|
679
731
|
fillRule: "nonzero",
|
|
680
732
|
stroke: "none",
|
|
681
733
|
strokeWidth: "1",
|
|
682
|
-
children: /* @__PURE__ */ (0,
|
|
734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("g", {
|
|
683
735
|
transform: "scale(10.66667,10.66667)",
|
|
684
|
-
children: /* @__PURE__ */ (0,
|
|
736
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", {
|
|
685
737
|
d: "M4.99023,3.99023c-0.40692,0.00011 -0.77321,0.24676 -0.92633,0.62377c-0.15312,0.37701 -0.06255,0.80921 0.22907,1.09303l6.29297,6.29297l-6.29297,6.29297c-0.26124,0.25082 -0.36647,0.62327 -0.27511,0.97371c0.09136,0.35044 0.36503,0.62411 0.71547,0.71547c0.35044,0.09136 0.72289,-0.01388 0.97371,-0.27511l6.29297,-6.29297l6.29297,6.29297c0.25082,0.26124 0.62327,0.36648 0.97371,0.27512c0.35044,-0.09136 0.62411,-0.36503 0.71547,-0.71547c0.09136,-0.35044 -0.01388,-0.72289 -0.27512,-0.97371l-6.29297,-6.29297l6.29297,-6.29297c0.29576,-0.28749 0.38469,-0.72707 0.22393,-1.10691c-0.16075,-0.37985 -0.53821,-0.62204 -0.9505,-0.60988c-0.2598,0.00774 -0.50638,0.11632 -0.6875,0.30273l-6.29297,6.29297l-6.29297,-6.29297c-0.18827,-0.19353 -0.4468,-0.30272 -0.7168,-0.30273z"
|
|
686
738
|
})
|
|
687
739
|
})
|
|
@@ -690,18 +742,18 @@ var RedXSvg2 = function(param) {
|
|
|
690
742
|
};
|
|
691
743
|
var GreenVSvg = function(param) {
|
|
692
744
|
var height = param.height, width = param.width, viewBox = param.viewBox;
|
|
693
|
-
return /* @__PURE__ */ (0,
|
|
745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", {
|
|
694
746
|
xmlns: "http://www.w3.org/2000/svg",
|
|
695
747
|
width: width || "32",
|
|
696
748
|
height: height || "32",
|
|
697
749
|
viewBox: viewBox || "0 0 32 32",
|
|
698
750
|
fill: "none",
|
|
699
751
|
children: [
|
|
700
|
-
/* @__PURE__ */ (0,
|
|
752
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", {
|
|
701
753
|
d: "M15.61 0C6.99 0 0.01 6.99 0 15.61C0.86 36.32 30.36 36.31 31.22 15.61C31.21 6.99 24.23 0 15.61 0ZM15.61 28.76C8.35 28.76 2.47 22.87 2.46 15.61C3.18 -1.84 28.04 -1.83 28.76 15.61C28.76 22.87 22.87 28.75 15.61 28.76Z",
|
|
702
754
|
fill: "#3B8F08"
|
|
703
755
|
}),
|
|
704
|
-
/* @__PURE__ */ (0,
|
|
756
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", {
|
|
705
757
|
d: "M21.66 10.15L13.37 18.44L9.58003 14.54C9.10003 14.06 8.32003 14.07 7.84003 14.54C7.38003 15.01 7.36003 15.76 7.82003 16.24L12.48 21.03C12.96 21.52 13.74 21.52 14.23 21.05L23.41 11.87C23.88 11.38 23.87 10.6 23.38 10.13C22.9 9.67003 22.15 9.67003 21.68 10.13L21.66 10.15Z",
|
|
706
758
|
fill: "#3B8F08"
|
|
707
759
|
})
|
|
@@ -709,9 +761,9 @@ var GreenVSvg = function(param) {
|
|
|
709
761
|
});
|
|
710
762
|
};
|
|
711
763
|
// src/assets/table.tsx
|
|
712
|
-
var
|
|
764
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
713
765
|
var sortSvg = function(upside_down) {
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", {
|
|
715
767
|
style: upside_down ? {
|
|
716
768
|
transform: "rotate(180deg)"
|
|
717
769
|
} : {},
|
|
@@ -724,13 +776,13 @@ var sortSvg = function(upside_down) {
|
|
|
724
776
|
preserveAspectRatio: "xMidYMid meet",
|
|
725
777
|
children: [
|
|
726
778
|
" ",
|
|
727
|
-
/* @__PURE__ */ (0,
|
|
779
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("g", {
|
|
728
780
|
transform: "translate(0.000000,1536.000000) scale(0.100000,-0.100000)",
|
|
729
781
|
fill: "#fff",
|
|
730
782
|
stroke: "none",
|
|
731
783
|
children: [
|
|
732
784
|
" ",
|
|
733
|
-
/* @__PURE__ */ (0,
|
|
785
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
734
786
|
d: "M6465 15350 c3 -5 -27 -25 -68 -44 -40 -19 -103 -57 -140 -86 -37 -28 -584 -569 -1215 -1203 -631 -633 -1699 -1705 -2374 -2382 -674 -676 -1237 -1243 -1249 -1260 -13 -16 -37 -46 -53 -65 -36 -41 -108 -185 -126 -250 -32 -119 -30 -352 3 -465 35 -120 102 -231 197 -325 132 -133 288 -208 479 -231 214 -26 418 31 596 166 39 29 703 685 1477 1458 774 772 1432 1421 1461 1441 105 73 239 71 347 -3 52 -36 70 -57 107 -131 17 -33 18 -252 24 -4710 6 -4979 3 -4715 49 -4855 118 -363 507 -605 876 -545 77 13 201 53 245 79 19 12 45 26 59 31 41 18 157 119 206 179 43 53 113 173 127 217 3 11 16 51 29 89 l22 70 6 4690 c5 4887 4 4736 43 4784 6 7 16 23 22 34 20 42 116 103 188 120 42 10 75 13 85 8 10 -5 34 -11 55 -15 20 -4 59 -21 85 -38 26 -17 686 -671 1467 -1453 781 -782 1443 -1439 1470 -1459 68 -49 178 -106 245 -128 30 -10 100 -24 155 -32 87 -12 114 -12 200 1 128 18 187 39 360 131 37 19 178 162 211 212 36 56 94 176 94 194 0 7 7 31 16 52 23 55 23 352 0 406 -9 21 -16 46 -16 56 0 30 -83 185 -130 242 -80 98 -4793 4810 -4865 4865 -66 50 -182 111 -250 132 -16 5 -29 15 -27 21 1 9 -62 12 -249 12 -157 0 -248 -4 -244 -10z"
|
|
735
787
|
}),
|
|
736
788
|
" "
|
|
@@ -741,8 +793,8 @@ var sortSvg = function(upside_down) {
|
|
|
741
793
|
});
|
|
742
794
|
};
|
|
743
795
|
var emptyFilterSvg = function(solid) {
|
|
744
|
-
return /* @__PURE__ */ (0,
|
|
745
|
-
children: solid ? /* @__PURE__ */ (0,
|
|
796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
797
|
+
children: solid ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", {
|
|
746
798
|
version: "1.0",
|
|
747
799
|
xmlns: "http://www.w3.org/2000/svg",
|
|
748
800
|
width: "13",
|
|
@@ -751,13 +803,13 @@ var emptyFilterSvg = function(solid) {
|
|
|
751
803
|
preserveAspectRatio: "xMidYMid meet",
|
|
752
804
|
children: [
|
|
753
805
|
" ",
|
|
754
|
-
/* @__PURE__ */ (0,
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("g", {
|
|
755
807
|
transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
|
|
756
808
|
fill: "#fff",
|
|
757
809
|
stroke: "none",
|
|
758
810
|
children: [
|
|
759
811
|
" ",
|
|
760
|
-
/* @__PURE__ */ (0,
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
761
813
|
d: "M382 8980 c-7 -11 -19 -20 -27 -20 -46 0 -166 -99 -196 -162 -46 -95 -51 -115 -47 -199 3 -70 9 -95 37 -149 42 -85 45 -90 118 -190 34 -47 72 -98 83 -115 12 -16 50 -70 85 -120 143 -200 188 -263 235 -330 27 -38 56 -79 64 -90 8 -11 46 -65 85 -120 38 -55 96 -136 128 -179 32 -44 60 -84 62 -90 2 -6 32 -48 65 -93 34 -45 99 -137 146 -203 47 -66 113 -159 148 -205 34 -46 62 -87 62 -90 0 -4 20 -33 45 -65 25 -32 45 -61 45 -64 0 -3 33 -50 73 -105 39 -54 106 -146 147 -205 41 -58 103 -144 138 -191 34 -46 62 -87 62 -90 0 -3 22 -36 50 -73 27 -37 61 -83 75 -102 14 -19 59 -82 100 -140 41 -58 95 -133 120 -167 25 -34 45 -66 45 -70 0 -4 13 -22 28 -40 15 -17 47 -61 72 -97 25 -37 74 -107 110 -156 36 -50 99 -138 140 -196 41 -58 108 -150 148 -205 39 -54 72 -102 72 -105 0 -3 20 -32 45 -64 25 -32 45 -62 45 -67 0 -5 14 -22 30 -38 17 -16 30 -33 30 -38 0 -5 19 -34 43 -65 90 -122 154 -259 178 -387 11 -56 14 -423 19 -1850 l5 -1780 29 -58 c36 -71 112 -148 168 -171 24 -10 51 -22 60 -27 24 -12 205 -11 213 1 3 6 15 10 25 10 11 0 34 6 52 14 18 8 52 21 76 30 64 24 118 44 165 62 23 8 55 22 70 30 16 8 36 14 46 14 9 0 26 7 37 15 10 8 27 15 37 15 11 0 31 6 45 14 15 8 47 22 72 31 25 9 60 23 78 31 18 8 39 14 47 14 7 0 26 6 42 14 15 8 48 22 73 31 25 10 57 23 72 31 14 8 35 14 45 14 11 0 28 7 39 15 10 8 26 15 35 15 14 0 62 19 197 76 18 8 40 14 48 14 9 0 28 6 42 14 28 15 36 18 235 92 23 9 56 22 72 29 17 7 50 21 75 31 84 34 127 77 181 182 9 18 20 56 24 85 4 28 10 714 14 1522 6 1402 7 1472 25 1520 41 109 110 235 188 344 46 62 88 121 93 130 6 9 30 45 55 80 72 101 159 222 250 351 47 67 113 159 148 205 34 46 62 87 62 90 0 4 27 42 60 85 33 43 60 81 60 84 0 3 22 36 50 73 27 37 60 83 72 101 13 18 30 41 38 52 8 10 35 49 60 85 25 37 73 104 108 150 34 46 62 87 62 90 0 3 33 50 73 103 40 53 81 111 91 127 11 17 45 65 78 107 32 43 58 80 58 83 0 4 20 33 45 65 25 32 45 63 45 70 0 6 7 13 15 16 8 4 15 10 15 16 0 5 26 44 58 86 32 42 70 95 85 117 64 95 144 206 208 292 38 51 69 95 69 99 0 3 13 23 29 43 26 33 92 126 193 271 21 30 48 68 60 85 85 112 108 144 108 150 0 3 27 42 60 85 33 43 60 81 60 85 0 3 28 44 63 90 34 47 82 114 107 151 25 36 50 71 56 77 5 7 32 44 58 82 27 39 62 86 77 106 16 20 29 42 29 48 0 6 4 11 8 11 5 0 25 32 45 71 36 68 37 75 37 175 0 118 -13 163 -69 234 -37 48 -127 112 -173 124 -16 3 -28 13 -28 21 0 13 -486 15 -4103 15 -4091 0 -4102 0 -4115 -20z"
|
|
762
814
|
}),
|
|
763
815
|
" "
|
|
@@ -765,7 +817,7 @@ var emptyFilterSvg = function(solid) {
|
|
|
765
817
|
}),
|
|
766
818
|
" "
|
|
767
819
|
]
|
|
768
|
-
}) : /* @__PURE__ */ (0,
|
|
820
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", {
|
|
769
821
|
version: "1.0",
|
|
770
822
|
xmlns: "http://www.w3.org/2000/svg",
|
|
771
823
|
width: "13",
|
|
@@ -774,13 +826,13 @@ var emptyFilterSvg = function(solid) {
|
|
|
774
826
|
preserveAspectRatio: "xMidYMid meet",
|
|
775
827
|
children: [
|
|
776
828
|
" ",
|
|
777
|
-
/* @__PURE__ */ (0,
|
|
829
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("g", {
|
|
778
830
|
transform: "translate(0.000000,300.000000) scale(0.050000,-0.050000)",
|
|
779
831
|
fill: "#fff",
|
|
780
832
|
stroke: "none",
|
|
781
833
|
children: [
|
|
782
834
|
" ",
|
|
783
|
-
/* @__PURE__ */ (0,
|
|
835
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
784
836
|
d: "M58 5702 c-100 -101 -84 -148 136 -416 107 -130 242 -294 301 -366 58 -71 173 -211 254 -310 81 -99 441 -535 799 -969 l652 -789 0 -1201 c0 -1396 2 -1411 182 -1411 60 0 1302 604 1360 662 36 36 38 79 38 935 0 494 5 925 12 959 8 41 370 495 1110 1393 1202 1459 1158 1394 1040 1513 l-59 58 -2883 0 -2883 0 -59 -58z m5349 -327 c-16 -26 -150 -190 -683 -835 -169 -203 -381 -460 -472 -570 -90 -110 -290 -352 -443 -537 -154 -186 -301 -369 -329 -408 l-50 -70 -6 -913 -5 -913 -410 -205 c-225 -112 -413 -204 -418 -204 -6 0 -12 503 -15 1117 l-6 1118 -50 70 c-27 39 -175 222 -329 408 -153 185 -353 427 -443 537 -91 110 -303 367 -472 570 -533 645 -667 809 -683 835 -12 20 474 25 2407 25 1933 0 2419 -5 2407 -25z"
|
|
785
837
|
}),
|
|
786
838
|
" "
|
|
@@ -792,10 +844,10 @@ var emptyFilterSvg = function(solid) {
|
|
|
792
844
|
});
|
|
793
845
|
};
|
|
794
846
|
var slashFilterSvg = function(solid) {
|
|
795
|
-
return /* @__PURE__ */ (0,
|
|
796
|
-
children: solid ? /* @__PURE__ */ (0,
|
|
847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
848
|
+
children: solid ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
797
849
|
className: "mt-[-4px] mr-[-2px] ",
|
|
798
|
-
children: /* @__PURE__ */ (0,
|
|
850
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", {
|
|
799
851
|
version: "1.0",
|
|
800
852
|
xmlns: "http://www.w3.org/2000/svg",
|
|
801
853
|
width: "18",
|
|
@@ -804,17 +856,17 @@ var slashFilterSvg = function(solid) {
|
|
|
804
856
|
preserveAspectRatio: "xMidYMid meet",
|
|
805
857
|
children: [
|
|
806
858
|
" ",
|
|
807
|
-
/* @__PURE__ */ (0,
|
|
859
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("g", {
|
|
808
860
|
transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
|
|
809
861
|
fill: "#fff",
|
|
810
862
|
stroke: "none",
|
|
811
863
|
children: [
|
|
812
864
|
" ",
|
|
813
|
-
/* @__PURE__ */ (0,
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
814
866
|
d: "M1000 8221 c-71 -27 -103 -47 -149 -92 -122 -123 -144 -294 -58 -456 22 -42 6838 -6858 6880 -6880 162 -86 333 -64 456 58 123 123 144 294 57 458 -10 19 -508 525 -1107 1124 l-1089 1089 1 256 1 257 676 1350 677 1350 115 6 c125 6 173 20 244 68 54 37 89 78 124 145 24 46 27 61 27 161 0 100 -3 115 -28 162 -52 100 -119 157 -225 194 -54 18 -131 19 -2817 19 l-2762 0 -341 340 c-188 186 -356 347 -374 357 -103 55 -220 68 -308 34z"
|
|
815
867
|
}),
|
|
816
868
|
" ",
|
|
817
|
-
/* @__PURE__ */ (0,
|
|
869
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
818
870
|
d: "M2340 5338 c0 -7 146 -305 325 -662 l325 -649 0 -1112 c0 -1043 1 -1114 18 -1160 27 -76 47 -107 94 -154 48 -47 80 -67 153 -93 46 -17 120 -18 1231 -18 1085 0 1186 1 1235 17 30 9 66 24 81 33 68 40 158 146 158 186 0 14 -3600 3624 -3614 3624 -3 0 -6 -6 -6 -12z"
|
|
819
871
|
}),
|
|
820
872
|
" "
|
|
@@ -823,9 +875,9 @@ var slashFilterSvg = function(solid) {
|
|
|
823
875
|
" "
|
|
824
876
|
]
|
|
825
877
|
})
|
|
826
|
-
}) : /* @__PURE__ */ (0,
|
|
878
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
827
879
|
className: "mt-[-4px] mr-[-2px] ",
|
|
828
|
-
children: /* @__PURE__ */ (0,
|
|
880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", {
|
|
829
881
|
version: "1.0",
|
|
830
882
|
xmlns: "http://www.w3.org/2000/svg",
|
|
831
883
|
width: "18",
|
|
@@ -834,17 +886,17 @@ var slashFilterSvg = function(solid) {
|
|
|
834
886
|
preserveAspectRatio: "xMidYMid meet",
|
|
835
887
|
children: [
|
|
836
888
|
" ",
|
|
837
|
-
/* @__PURE__ */ (0,
|
|
889
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("g", {
|
|
838
890
|
transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
|
|
839
891
|
fill: "#fff",
|
|
840
892
|
stroke: "none",
|
|
841
893
|
children: [
|
|
842
894
|
" ",
|
|
843
|
-
/* @__PURE__ */ (0,
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
844
896
|
d: "M1000 8221 c-71 -27 -103 -47 -149 -92 -122 -123 -144 -294 -58 -456 22 -42 6838 -6858 6880 -6880 162 -86 333 -64 456 58 123 123 144 294 57 458 -10 19 -508 525 -1107 1124 l-1089 1089 1 256 1 257 676 1350 677 1350 115 6 c125 6 173 20 244 68 54 37 89 78 124 145 24 46 27 61 27 161 0 100 -3 115 -28 162 -52 100 -119 157 -225 194 -54 18 -131 19 -2817 19 l-2762 0 -341 340 c-188 186 -356 347 -374 357 -103 55 -220 68 -308 34z m5494 -1490 c6 -10 -1204 -2436 -1226 -2458 -13 -13 -168 139 -1247 1217 -677 677 -1231 1236 -1231 1241 0 12 3697 12 3704 0z"
|
|
845
897
|
}),
|
|
846
898
|
" ",
|
|
847
|
-
/* @__PURE__ */ (0,
|
|
899
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
848
900
|
d: "M2340 5338 c0 -7 146 -305 325 -662 l325 -649 0 -1112 c0 -1043 1 -1114 18 -1160 27 -76 47 -107 94 -154 48 -47 80 -67 153 -93 46 -17 120 -18 1231 -18 1085 0 1186 1 1235 17 30 9 66 24 81 33 68 40 158 146 158 185 0 18 -692 715 -709 715 -6 0 -11 -38 -13 -97 l-3 -98 -745 0 -745 0 -3 858 -2 859 -694 694 c-382 382 -697 694 -700 694 -3 0 -6 -6 -6 -12z"
|
|
849
901
|
}),
|
|
850
902
|
" "
|
|
@@ -857,7 +909,7 @@ var slashFilterSvg = function(solid) {
|
|
|
857
909
|
});
|
|
858
910
|
};
|
|
859
911
|
var exportToExcelSvg = function(width, height, viewBox) {
|
|
860
|
-
return /* @__PURE__ */ (0,
|
|
912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", {
|
|
861
913
|
version: "1.0",
|
|
862
914
|
xmlns: "http://www.w3.org/2000/svg",
|
|
863
915
|
width: width || "18",
|
|
@@ -866,21 +918,21 @@ var exportToExcelSvg = function(width, height, viewBox) {
|
|
|
866
918
|
preserveAspectRatio: "xMidYMid meet",
|
|
867
919
|
children: [
|
|
868
920
|
" ",
|
|
869
|
-
/* @__PURE__ */ (0,
|
|
921
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("g", {
|
|
870
922
|
transform: "translate(0.000000,150.000000) scale(0.100000,-0.100000)",
|
|
871
923
|
fill: "#ffffff",
|
|
872
924
|
stroke: "none",
|
|
873
925
|
children: [
|
|
874
926
|
" ",
|
|
875
|
-
/* @__PURE__ */ (0,
|
|
927
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
876
928
|
d: "M205 1418 c-3 -7 -4 -317 -3 -688 l3 -675 435 -3 c239 -1 441 0 449 3 11 4 9 11 -9 30 l-23 25 -396 2 -396 3 0 625 0 625 280 0 280 0 5 -190 5 -190 190 -5 190 -5 5 -175 5 -175 25 0 25 0 3 200 2 199 -202 203 -203 203 -333 0 c-257 0 -334 -3 -337 -12z m828 -235 c70 -70 127 -131 127 -135 0 -5 -60 -7 -132 -6 l-133 3 -3 133 c-1 72 1 132 6 132 4 0 65 -57 135 -127z"
|
|
877
929
|
}),
|
|
878
930
|
" ",
|
|
879
|
-
/* @__PURE__ */ (0,
|
|
931
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
880
932
|
d: "M518 915 c-6 -6 9 -37 42 -90 11 -16 23 -37 27 -45 4 -8 19 -36 35 -61 15 -25 28 -56 28 -68 0 -20 -29 -69 -121 -209 -16 -24 -29 -47 -29 -53 0 -5 31 -9 68 -9 l69 0 42 82 c60 116 66 118 107 35 56 -114 53 -112 127 -115 51 -2 67 0 67 11 0 7 -5 18 -11 24 -11 11 -26 36 -49 78 -6 11 -19 34 -30 50 -11 17 -24 40 -29 52 -5 11 -15 24 -20 28 -26 16 -18 33 97 212 25 39 39 70 34 75 -5 5 -36 8 -68 6 l-59 -3 -42 -84 c-24 -46 -45 -86 -48 -89 -6 -6 -44 40 -45 54 0 6 -13 35 -29 65 l-28 54 -65 3 c-35 2 -67 0 -70 -3z"
|
|
881
933
|
}),
|
|
882
934
|
" ",
|
|
883
|
-
/* @__PURE__ */ (0,
|
|
935
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", {
|
|
884
936
|
d: "M1135 548 c-3 -7 -6 -67 -7 -133 l-3 -120 -55 -3 c-30 -1 -61 -5 -68 -7 -8 -3 28 -53 95 -132 122 -146 129 -153 140 -153 4 0 22 17 38 37 26 32 53 63 175 206 13 15 30 27 38 27 9 0 12 3 8 7 -3 4 -39 9 -79 12 l-72 6 -5 130 -5 130 -98 3 c-72 2 -99 -1 -102 -10z m145 -183 l5 -130 28 -3 c15 -2 27 -8 27 -14 0 -18 -92 -128 -107 -128 -11 1 -97 107 -101 125 -2 8 7 15 25 17 l28 3 3 120 c1 66 4 126 7 133 3 9 18 12 42 10 l38 -3 5 -130z"
|
|
885
937
|
}),
|
|
886
938
|
" "
|
|
@@ -979,7 +1031,7 @@ var getFormElementValue = function(form, name) {
|
|
|
979
1031
|
return ((_form_elements_namedItem = form.elements.namedItem(name)) === null || _form_elements_namedItem === void 0 ? void 0 : _form_elements_namedItem.value) || "";
|
|
980
1032
|
};
|
|
981
1033
|
// src/components/table/Table.tsx
|
|
982
|
-
var
|
|
1034
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
983
1035
|
var TableContext = (0, import_react2.createContext)(null);
|
|
984
1036
|
var TableProvider = function(props) {
|
|
985
1037
|
var // basic props
|
|
@@ -1076,9 +1128,9 @@ var TableProvider = function(props) {
|
|
|
1076
1128
|
handleFilterClick: handleFilterClick,
|
|
1077
1129
|
closeFilterWindow: closeFilterWindow
|
|
1078
1130
|
});
|
|
1079
|
-
return /* @__PURE__ */ (0,
|
|
1131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TableContext.Provider, {
|
|
1080
1132
|
value: providerValues,
|
|
1081
|
-
children: /* @__PURE__ */ (0,
|
|
1133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
|
|
1082
1134
|
className: "flex flex-col gap-2 ".concat(containerClassName),
|
|
1083
1135
|
style: _object_spread_props(_object_spread({}, containerStyle), {
|
|
1084
1136
|
direction: direction
|
|
@@ -1089,40 +1141,40 @@ var TableProvider = function(props) {
|
|
|
1089
1141
|
};
|
|
1090
1142
|
var TableBase = function(props) {
|
|
1091
1143
|
var containerHeaderClassName = props.containerHeaderClassName, optionalElement = props.optionalElement, tableContainerClass = props.tableContainerClass, tableContainerStyle = props.tableContainerStyle, tableStyle = props.tableStyle, includeSearch = props.includeSearch, exportToExcelKeys = props.exportToExcelKeys, sumColumns = props.sumColumns, direction = props.direction, maxRowsLabel1 = props.maxRowsLabel1, maxRowsLabel2 = props.maxRowsLabel2, searchContainerClassName = props.searchContainerClassName;
|
|
1092
|
-
return /* @__PURE__ */ (0,
|
|
1144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(TableProvider, _object_spread_props(_object_spread({}, props), {
|
|
1093
1145
|
children: [
|
|
1094
|
-
/* @__PURE__ */ (0,
|
|
1146
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", {
|
|
1095
1147
|
style: {
|
|
1096
1148
|
direction: direction
|
|
1097
1149
|
},
|
|
1098
1150
|
className: cn("flex justify-start items-center gap-2", containerHeaderClassName || ""),
|
|
1099
1151
|
children: [
|
|
1100
|
-
/* @__PURE__ */ (0,
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", {
|
|
1101
1153
|
className: cn("flex justify-start items-center gap-2", searchContainerClassName),
|
|
1102
1154
|
children: [
|
|
1103
|
-
includeSearch && /* @__PURE__ */ (0,
|
|
1104
|
-
exportToExcelKeys && /* @__PURE__ */ (0,
|
|
1155
|
+
includeSearch && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Search, {}),
|
|
1156
|
+
exportToExcelKeys && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ExportToExcel, {})
|
|
1105
1157
|
]
|
|
1106
1158
|
}),
|
|
1107
|
-
maxRowsLabel1 && maxRowsLabel2 && /* @__PURE__ */ (0,
|
|
1159
|
+
maxRowsLabel1 && maxRowsLabel2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MaxRowsLabel, {}),
|
|
1108
1160
|
optionalElement && optionalElement
|
|
1109
1161
|
]
|
|
1110
1162
|
}),
|
|
1111
|
-
/* @__PURE__ */ (0,
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
|
|
1112
1164
|
style: _object_spread_props(_object_spread({}, tableContainerStyle || {}), {
|
|
1113
1165
|
direction: direction
|
|
1114
1166
|
}),
|
|
1115
1167
|
className: cn("animate-slide-in-up overflow-y-auto", tableContainerClass || ""),
|
|
1116
|
-
children: /* @__PURE__ */ (0,
|
|
1168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("table", {
|
|
1117
1169
|
style: tableStyle,
|
|
1118
1170
|
className: "min-w-full text-sm font-light relative",
|
|
1119
1171
|
children: [
|
|
1120
|
-
/* @__PURE__ */ (0,
|
|
1121
|
-
/* @__PURE__ */ (0,
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TableHead, {}),
|
|
1173
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TableBody, {})
|
|
1122
1174
|
]
|
|
1123
1175
|
})
|
|
1124
1176
|
}),
|
|
1125
|
-
sumColumns && /* @__PURE__ */ (0,
|
|
1177
|
+
sumColumns && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Summary, {})
|
|
1126
1178
|
]
|
|
1127
1179
|
}));
|
|
1128
1180
|
};
|
|
@@ -1352,7 +1404,7 @@ var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
|
|
|
1352
1404
|
var callCenterDomain = isLocal ? "http://localhost:9003/api/call-center" : baseDomain + "/call-center";
|
|
1353
1405
|
// src/components/ui/badge.tsx
|
|
1354
1406
|
var import_class_variance_authority = require("class-variance-authority");
|
|
1355
|
-
var
|
|
1407
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1356
1408
|
var badgeVariants = (0, import_class_variance_authority.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
1357
1409
|
variants: {
|
|
1358
1410
|
variant: {
|
|
@@ -1371,7 +1423,7 @@ function Badge(_param) {
|
|
|
1371
1423
|
"className",
|
|
1372
1424
|
"variant"
|
|
1373
1425
|
]);
|
|
1374
|
-
return /* @__PURE__ */ (0,
|
|
1426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", _object_spread({
|
|
1375
1427
|
className: cn(badgeVariants({
|
|
1376
1428
|
variant: variant
|
|
1377
1429
|
}), className)
|
|
@@ -1381,7 +1433,7 @@ function Badge(_param) {
|
|
|
1381
1433
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
1382
1434
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
1383
1435
|
var React3 = __toESM(require("react"));
|
|
1384
|
-
var
|
|
1436
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1385
1437
|
var buttonVariants = (0, import_class_variance_authority2.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", {
|
|
1386
1438
|
variants: {
|
|
1387
1439
|
variant: {
|
|
@@ -1412,7 +1464,7 @@ var Button = React3.forwardRef(function(_param, ref) {
|
|
|
1412
1464
|
"asChild"
|
|
1413
1465
|
]);
|
|
1414
1466
|
var Comp = asChild ? import_react_slot.Slot : "button";
|
|
1415
|
-
return /* @__PURE__ */ (0,
|
|
1467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Comp, _object_spread({
|
|
1416
1468
|
ref: ref,
|
|
1417
1469
|
"data-slot": "button",
|
|
1418
1470
|
className: cn(buttonVariants({
|
|
@@ -1425,13 +1477,13 @@ var Button = React3.forwardRef(function(_param, ref) {
|
|
|
1425
1477
|
Button.displayName = "Button";
|
|
1426
1478
|
// src/components/ui/input.tsx
|
|
1427
1479
|
var React4 = __toESM(require("react"));
|
|
1428
|
-
var
|
|
1480
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1429
1481
|
var Input = React4.forwardRef(function(_param, ref) {
|
|
1430
1482
|
var className = _param.className, type = _param.type, props = _object_without_properties(_param, [
|
|
1431
1483
|
"className",
|
|
1432
1484
|
"type"
|
|
1433
1485
|
]);
|
|
1434
|
-
return /* @__PURE__ */ (0,
|
|
1486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("input", _object_spread({
|
|
1435
1487
|
type: type,
|
|
1436
1488
|
className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
1437
1489
|
ref: ref
|
|
@@ -1441,7 +1493,7 @@ Input.displayName = "Input";
|
|
|
1441
1493
|
// src/components/ui/progress.tsx
|
|
1442
1494
|
var React5 = __toESM(require("react"));
|
|
1443
1495
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
|
1444
|
-
var
|
|
1496
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1445
1497
|
var ProgressComponent = React5.forwardRef(function(_param, ref) {
|
|
1446
1498
|
var className = _param.className, value = _param.value, containerClassName = _param.containerClassName, indicatorClassName = _param.indicatorClassName, showValueClassName = _param.showValueClassName, _param_showValue = _param.showValue, showValue = _param_showValue === void 0 ? false : _param_showValue, props = _object_without_properties(_param, [
|
|
1447
1499
|
"className",
|
|
@@ -1451,18 +1503,18 @@ var ProgressComponent = React5.forwardRef(function(_param, ref) {
|
|
|
1451
1503
|
"showValueClassName",
|
|
1452
1504
|
"showValue"
|
|
1453
1505
|
]);
|
|
1454
|
-
return /* @__PURE__ */ (0,
|
|
1506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
1455
1507
|
className: cn("relative w-full", containerClassName),
|
|
1456
|
-
children: /* @__PURE__ */ (0,
|
|
1508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
1457
1509
|
ref: ref,
|
|
1458
1510
|
className: cn("w-full h-5 bg-[#e5e7eb] relative overflow-hidden rounded-full", className)
|
|
1459
1511
|
}, props), {
|
|
1460
|
-
children: /* @__PURE__ */ (0,
|
|
1512
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ProgressPrimitive.Indicator, {
|
|
1461
1513
|
className: cn("h-full w-full flex-1 bg-[green] transition-all rounded-full", indicatorClassName),
|
|
1462
1514
|
style: {
|
|
1463
1515
|
transform: "translateX(-".concat(100 - (value || 0), "%)")
|
|
1464
1516
|
},
|
|
1465
|
-
children: showValue && /* @__PURE__ */ (0,
|
|
1517
|
+
children: showValue && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
1466
1518
|
className: cn("absolute right-1 top-[-2px] font-medium text-white", showValueClassName),
|
|
1467
1519
|
children: "".concat(value || 0, "%")
|
|
1468
1520
|
})
|
|
@@ -1485,13 +1537,13 @@ var React7 = __toESM(require("react"));
|
|
|
1485
1537
|
var React6 = __toESM(require("react"));
|
|
1486
1538
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
1487
1539
|
var import_lucide_react = require("lucide-react");
|
|
1488
|
-
var
|
|
1540
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1489
1541
|
var DialogPortal = DialogPrimitive.Portal;
|
|
1490
1542
|
var DialogOverlay = React6.forwardRef(function(_param, ref) {
|
|
1491
1543
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1492
1544
|
"className"
|
|
1493
1545
|
]);
|
|
1494
|
-
return /* @__PURE__ */ (0,
|
|
1546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogPrimitive.Overlay, _object_spread({
|
|
1495
1547
|
ref: ref,
|
|
1496
1548
|
className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)
|
|
1497
1549
|
}, props));
|
|
@@ -1502,22 +1554,22 @@ var DialogContent = React6.forwardRef(function(_param, ref) {
|
|
|
1502
1554
|
"className",
|
|
1503
1555
|
"children"
|
|
1504
1556
|
]);
|
|
1505
|
-
return /* @__PURE__ */ (0,
|
|
1557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogPortal, {
|
|
1506
1558
|
children: [
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1508
|
-
/* @__PURE__ */ (0,
|
|
1559
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogOverlay, {}),
|
|
1560
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogPrimitive.Content, _object_spread_props(_object_spread({
|
|
1509
1561
|
ref: ref,
|
|
1510
1562
|
className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className)
|
|
1511
1563
|
}, props), {
|
|
1512
1564
|
children: [
|
|
1513
1565
|
children,
|
|
1514
|
-
/* @__PURE__ */ (0,
|
|
1566
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DialogPrimitive.Close, {
|
|
1515
1567
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
1516
1568
|
children: [
|
|
1517
|
-
/* @__PURE__ */ (0,
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react.X, {
|
|
1518
1570
|
className: "h-4 w-4"
|
|
1519
1571
|
}),
|
|
1520
|
-
/* @__PURE__ */ (0,
|
|
1572
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", {
|
|
1521
1573
|
className: "sr-only",
|
|
1522
1574
|
children: "Close"
|
|
1523
1575
|
})
|
|
@@ -1533,7 +1585,7 @@ var DialogHeader = function(_param) {
|
|
|
1533
1585
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1534
1586
|
"className"
|
|
1535
1587
|
]);
|
|
1536
|
-
return /* @__PURE__ */ (0,
|
|
1588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", _object_spread({
|
|
1537
1589
|
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className)
|
|
1538
1590
|
}, props));
|
|
1539
1591
|
};
|
|
@@ -1542,7 +1594,7 @@ var DialogFooter = function(_param) {
|
|
|
1542
1594
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1543
1595
|
"className"
|
|
1544
1596
|
]);
|
|
1545
|
-
return /* @__PURE__ */ (0,
|
|
1597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", _object_spread({
|
|
1546
1598
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
1547
1599
|
}, props));
|
|
1548
1600
|
};
|
|
@@ -1551,7 +1603,7 @@ var DialogTitle = React6.forwardRef(function(_param, ref) {
|
|
|
1551
1603
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1552
1604
|
"className"
|
|
1553
1605
|
]);
|
|
1554
|
-
return /* @__PURE__ */ (0,
|
|
1606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogPrimitive.Title, _object_spread({
|
|
1555
1607
|
ref: ref,
|
|
1556
1608
|
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
1557
1609
|
}, props));
|
|
@@ -1561,19 +1613,19 @@ var DialogDescription = React6.forwardRef(function(_param, ref) {
|
|
|
1561
1613
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1562
1614
|
"className"
|
|
1563
1615
|
]);
|
|
1564
|
-
return /* @__PURE__ */ (0,
|
|
1616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DialogPrimitive.Description, _object_spread({
|
|
1565
1617
|
ref: ref,
|
|
1566
1618
|
className: cn("text-sm text-muted-foreground", className)
|
|
1567
1619
|
}, props));
|
|
1568
1620
|
});
|
|
1569
1621
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1570
1622
|
// src/components/ui/command.tsx
|
|
1571
|
-
var
|
|
1623
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1572
1624
|
var Command = React7.forwardRef(function(_param, ref) {
|
|
1573
1625
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1574
1626
|
"className"
|
|
1575
1627
|
]);
|
|
1576
|
-
return /* @__PURE__ */ (0,
|
|
1628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_cmdk.Command, _object_spread({
|
|
1577
1629
|
ref: ref,
|
|
1578
1630
|
className: cn("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground", className)
|
|
1579
1631
|
}, props));
|
|
@@ -1584,16 +1636,16 @@ var CommandInput = React7.forwardRef(function(_param, ref) {
|
|
|
1584
1636
|
"className",
|
|
1585
1637
|
"withSearchIcon"
|
|
1586
1638
|
]);
|
|
1587
|
-
return /* @__PURE__ */ (0,
|
|
1639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", {
|
|
1588
1640
|
className: "flex items-center border-b border-input px-3",
|
|
1589
1641
|
"cmdk-input-wrapper": "",
|
|
1590
1642
|
children: [
|
|
1591
|
-
withSearchIcon && /* @__PURE__ */ (0,
|
|
1643
|
+
withSearchIcon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.Search, {
|
|
1592
1644
|
size: 20,
|
|
1593
1645
|
strokeWidth: 2,
|
|
1594
1646
|
className: "me-3 text-muted-foreground/80"
|
|
1595
1647
|
}),
|
|
1596
|
-
/* @__PURE__ */ (0,
|
|
1648
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_cmdk.Command.Input, _object_spread({
|
|
1597
1649
|
ref: ref,
|
|
1598
1650
|
className: cn("flex h-10 w-full rounded-lg bg-transparent py-2 text-sm outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed disabled:opacity-50", className)
|
|
1599
1651
|
}, props))
|
|
@@ -1605,14 +1657,14 @@ var CommandList = React7.forwardRef(function(_param, ref) {
|
|
|
1605
1657
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1606
1658
|
"className"
|
|
1607
1659
|
]);
|
|
1608
|
-
return /* @__PURE__ */ (0,
|
|
1660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_cmdk.Command.List, _object_spread({
|
|
1609
1661
|
ref: ref,
|
|
1610
1662
|
className: cn("max-h-80 overflow-y-auto overflow-x-hidden", className)
|
|
1611
1663
|
}, props));
|
|
1612
1664
|
});
|
|
1613
1665
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
1614
1666
|
var CommandEmpty = React7.forwardRef(function(props, ref) {
|
|
1615
|
-
return /* @__PURE__ */ (0,
|
|
1667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_cmdk.Command.Empty, _object_spread({
|
|
1616
1668
|
ref: ref,
|
|
1617
1669
|
className: "py-6 text-center text-sm"
|
|
1618
1670
|
}, props));
|
|
@@ -1622,7 +1674,7 @@ var CommandGroup = React7.forwardRef(function(_param, ref) {
|
|
|
1622
1674
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1623
1675
|
"className"
|
|
1624
1676
|
]);
|
|
1625
|
-
return /* @__PURE__ */ (0,
|
|
1677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_cmdk.Command.Group, _object_spread({
|
|
1626
1678
|
ref: ref,
|
|
1627
1679
|
className: cn("overflow-hidden p-2 text-foreground [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className)
|
|
1628
1680
|
}, props));
|
|
@@ -1632,7 +1684,7 @@ var CommandSeparator = React7.forwardRef(function(_param, ref) {
|
|
|
1632
1684
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1633
1685
|
"className"
|
|
1634
1686
|
]);
|
|
1635
|
-
return /* @__PURE__ */ (0,
|
|
1687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_cmdk.Command.Separator, _object_spread({
|
|
1636
1688
|
ref: ref,
|
|
1637
1689
|
className: cn("-mx-1 h-px bg-border", className)
|
|
1638
1690
|
}, props));
|
|
@@ -1642,7 +1694,7 @@ var CommandItem = React7.forwardRef(function(_param, ref) {
|
|
|
1642
1694
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1643
1695
|
"className"
|
|
1644
1696
|
]);
|
|
1645
|
-
return /* @__PURE__ */ (0,
|
|
1697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_cmdk.Command.Item, _object_spread({
|
|
1646
1698
|
ref: ref,
|
|
1647
1699
|
className: cn("relative flex cursor-default select-none items-center gap-3 rounded-md px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className)
|
|
1648
1700
|
}, props));
|
|
@@ -1652,7 +1704,7 @@ var CommandShortcut = function(_param) {
|
|
|
1652
1704
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1653
1705
|
"className"
|
|
1654
1706
|
]);
|
|
1655
|
-
return /* @__PURE__ */ (0,
|
|
1707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("kbd", _object_spread({
|
|
1656
1708
|
className: cn("-me-1 ms-auto inline-flex h-5 max-h-full items-center rounded border border-border bg-background px-1 font-[inherit] text-[0.625rem] font-medium text-muted-foreground/70", className)
|
|
1657
1709
|
}, props));
|
|
1658
1710
|
};
|
|
@@ -3490,7 +3542,7 @@ var flip3 = function(options, deps) {
|
|
|
3490
3542
|
});
|
|
3491
3543
|
};
|
|
3492
3544
|
// src/components/ui/multiselect.tsx
|
|
3493
|
-
var
|
|
3545
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3494
3546
|
var Portal2 = function(param) {
|
|
3495
3547
|
var children = param.children;
|
|
3496
3548
|
return import_react_dom.default.createPortal(children, document.body);
|
|
@@ -3575,7 +3627,7 @@ var CommandEmpty2 = (0, import_react5.forwardRef)(function(_param, forwardedRef)
|
|
|
3575
3627
|
return state.filtered.count === 0;
|
|
3576
3628
|
});
|
|
3577
3629
|
if (!render) return null;
|
|
3578
|
-
return /* @__PURE__ */ (0,
|
|
3630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", _object_spread({
|
|
3579
3631
|
ref: forwardedRef,
|
|
3580
3632
|
className: cn("px-2 py-4 text-center text-sm", className),
|
|
3581
3633
|
"cmdk-empty": "",
|
|
@@ -3854,7 +3906,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
3854
3906
|
})) {
|
|
3855
3907
|
return void 0;
|
|
3856
3908
|
}
|
|
3857
|
-
var Item = /* @__PURE__ */ (0,
|
|
3909
|
+
var Item = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandItem, {
|
|
3858
3910
|
value: inputValue,
|
|
3859
3911
|
className: "cursor-pointer",
|
|
3860
3912
|
onMouseDown: function(e) {
|
|
@@ -3889,14 +3941,14 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
3889
3941
|
var EmptyItem = (0, import_react5.useCallback)(function() {
|
|
3890
3942
|
if (!emptyIndicator) return void 0;
|
|
3891
3943
|
if (onSearch && !creatable && Object.keys(options).length === 0) {
|
|
3892
|
-
return /* @__PURE__ */ (0,
|
|
3944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandItem, {
|
|
3893
3945
|
className: "",
|
|
3894
3946
|
value: "-",
|
|
3895
3947
|
disabled: true,
|
|
3896
3948
|
children: emptyIndicator
|
|
3897
3949
|
});
|
|
3898
3950
|
}
|
|
3899
|
-
return /* @__PURE__ */ (0,
|
|
3951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandEmpty2, {
|
|
3900
3952
|
className: emptyIndicatorClassName,
|
|
3901
3953
|
children: emptyIndicator
|
|
3902
3954
|
});
|
|
@@ -3927,7 +3979,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
3927
3979
|
creatable,
|
|
3928
3980
|
commandProps === null || commandProps === void 0 ? void 0 : commandProps.filter
|
|
3929
3981
|
]);
|
|
3930
|
-
return /* @__PURE__ */ (0,
|
|
3982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Command, _object_spread_props(_object_spread({}, commandProps), {
|
|
3931
3983
|
onKeyDown: function(e) {
|
|
3932
3984
|
var _commandProps_onKeyDown;
|
|
3933
3985
|
handleKeyDown(e);
|
|
@@ -3937,7 +3989,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
3937
3989
|
shouldFilter: (commandProps === null || commandProps === void 0 ? void 0 : commandProps.shouldFilter) !== void 0 ? commandProps.shouldFilter : !onSearch,
|
|
3938
3990
|
filter: commandFilter(),
|
|
3939
3991
|
children: [
|
|
3940
|
-
/* @__PURE__ */ (0,
|
|
3992
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", {
|
|
3941
3993
|
ref: setContainerRef,
|
|
3942
3994
|
className: cn("relative min-h-[38px] py-2 rounded-lg border border-input text-sm transition-shadow focus-within:border-ring focus-within:outline-none focus-within:ring-[3px] focus-within:ring-ring/20 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50", {
|
|
3943
3995
|
"p-1": selected.length !== 0,
|
|
@@ -3948,11 +4000,11 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
3948
4000
|
if (disabled) return;
|
|
3949
4001
|
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
3950
4002
|
},
|
|
3951
|
-
children: /* @__PURE__ */ (0,
|
|
4003
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", {
|
|
3952
4004
|
className: "flex flex-wrap gap-1",
|
|
3953
4005
|
children: [
|
|
3954
4006
|
selected.map(function(option) {
|
|
3955
|
-
return /* @__PURE__ */ (0,
|
|
4007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", {
|
|
3956
4008
|
className: cn("animate-fadeIn relative inline-flex h-7 cursor-default items-center rounded-md border border-solid bg-background pe-7 pl-2 ps-2 text-xs font-medium text-secondary-foreground transition-all hover:bg-background disabled:cursor-not-allowed disabled:opacity-50 data-[fixed]:pe-2 px-1", badgeClassName),
|
|
3957
4009
|
"data-fixed": option.fixed,
|
|
3958
4010
|
"data-disabled": disabled || void 0,
|
|
@@ -3960,7 +4012,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
3960
4012
|
option.label,
|
|
3961
4013
|
!unremovableOptions.find(function(v) {
|
|
3962
4014
|
return (0, import_lodash4.isEqual)(v.value, option.value);
|
|
3963
|
-
}) && /* @__PURE__ */ (0,
|
|
4015
|
+
}) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", {
|
|
3964
4016
|
className: "absolute -inset-y-px -end-px flex size-7 items-center justify-center rounded-e-lg border border-transparent p-0 text-muted-foreground/80 outline-0 transition-colors hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring/70",
|
|
3965
4017
|
onKeyDown: function(e) {
|
|
3966
4018
|
if (e.key === "Enter") {
|
|
@@ -3975,7 +4027,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
3975
4027
|
return handleUnselect(option);
|
|
3976
4028
|
},
|
|
3977
4029
|
"aria-label": "Remove",
|
|
3978
|
-
children: /* @__PURE__ */ (0,
|
|
4030
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.X, {
|
|
3979
4031
|
size: 14,
|
|
3980
4032
|
strokeWidth: 2,
|
|
3981
4033
|
"aria-hidden": "true"
|
|
@@ -3984,7 +4036,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
3984
4036
|
]
|
|
3985
4037
|
}, option.value);
|
|
3986
4038
|
}),
|
|
3987
|
-
/* @__PURE__ */ (0,
|
|
4039
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_cmdk2.Command.Input, _object_spread_props(_object_spread({}, inputProps), {
|
|
3988
4040
|
ref: inputRef,
|
|
3989
4041
|
value: inputValue,
|
|
3990
4042
|
disabled: disabled,
|
|
@@ -4015,7 +4067,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
4015
4067
|
"ml-1": selected.length !== 0
|
|
4016
4068
|
}, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className)
|
|
4017
4069
|
})),
|
|
4018
|
-
/* @__PURE__ */ (0,
|
|
4070
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", {
|
|
4019
4071
|
type: "button",
|
|
4020
4072
|
onClick: function() {
|
|
4021
4073
|
setSelected(selected.filter(function(s) {
|
|
@@ -4029,7 +4081,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
4029
4081
|
return s.fixed;
|
|
4030
4082
|
}).length === selected.length) && "hidden"),
|
|
4031
4083
|
"aria-label": "Clear all",
|
|
4032
|
-
children: /* @__PURE__ */ (0,
|
|
4084
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.X, {
|
|
4033
4085
|
size: 16,
|
|
4034
4086
|
strokeWidth: 2,
|
|
4035
4087
|
"aria-hidden": "true"
|
|
@@ -4038,8 +4090,8 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
4038
4090
|
]
|
|
4039
4091
|
})
|
|
4040
4092
|
}),
|
|
4041
|
-
open && /* @__PURE__ */ (0,
|
|
4042
|
-
children: /* @__PURE__ */ (0,
|
|
4093
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Portal2, {
|
|
4094
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", {
|
|
4043
4095
|
ref: combinedFloatingRef,
|
|
4044
4096
|
style: {
|
|
4045
4097
|
position: strategy,
|
|
@@ -4049,7 +4101,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
4049
4101
|
},
|
|
4050
4102
|
className: cn("z-[9999] overflow-hidden rounded-lg border border-input", dropdownContainerClassName),
|
|
4051
4103
|
"data-state": open ? "open" : "closed",
|
|
4052
|
-
children: /* @__PURE__ */ (0,
|
|
4104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandList, {
|
|
4053
4105
|
className: "bg-popover text-popover-foreground shadow-lg shadow-black/5 outline-none",
|
|
4054
4106
|
onMouseLeave: function() {
|
|
4055
4107
|
setOnScrollbar(false);
|
|
@@ -4061,23 +4113,23 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
4061
4113
|
var _inputRef_current;
|
|
4062
4114
|
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
4063
4115
|
},
|
|
4064
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
4116
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, {
|
|
4065
4117
|
children: loadingIndicator
|
|
4066
|
-
}) : /* @__PURE__ */ (0,
|
|
4118
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, {
|
|
4067
4119
|
children: [
|
|
4068
4120
|
EmptyItem(),
|
|
4069
4121
|
CreatableItem(),
|
|
4070
|
-
!selectFirstItem && /* @__PURE__ */ (0,
|
|
4122
|
+
!selectFirstItem && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandItem, {
|
|
4071
4123
|
value: "-",
|
|
4072
4124
|
className: "hidden"
|
|
4073
4125
|
}),
|
|
4074
4126
|
Object.entries(selectables).map(function(param) {
|
|
4075
4127
|
var _param = _sliced_to_array(param, 2), key = _param[0], dropdowns = _param[1];
|
|
4076
|
-
return /* @__PURE__ */ (0,
|
|
4128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandGroup, {
|
|
4077
4129
|
heading: key,
|
|
4078
4130
|
className: cn("h-full overflow-auto", dropdownClassName),
|
|
4079
4131
|
children: dropdowns.map(function(option) {
|
|
4080
|
-
return /* @__PURE__ */ (0,
|
|
4132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CommandItem, {
|
|
4081
4133
|
value: option.value,
|
|
4082
4134
|
disabled: option.disable,
|
|
4083
4135
|
onMouseDown: function(e) {
|
|
@@ -4108,7 +4160,7 @@ var MultipleSelector = (0, import_react5.forwardRef)(function(param, ref) {
|
|
|
4108
4160
|
})
|
|
4109
4161
|
})
|
|
4110
4162
|
}),
|
|
4111
|
-
/* @__PURE__ */ (0,
|
|
4163
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", {
|
|
4112
4164
|
value: JSON.stringify(selected),
|
|
4113
4165
|
type: "hidden",
|
|
4114
4166
|
name: name
|
|
@@ -4120,16 +4172,16 @@ MultipleSelector.displayName = "MultipleSelector";
|
|
|
4120
4172
|
var multiselect_default = MultipleSelector;
|
|
4121
4173
|
// src/components/ui/popover.tsx
|
|
4122
4174
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
4123
|
-
var
|
|
4175
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
4124
4176
|
function Popover(_param) {
|
|
4125
4177
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4126
|
-
return /* @__PURE__ */ (0,
|
|
4178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverPrimitive.Root, _object_spread({
|
|
4127
4179
|
"data-slot": "popover"
|
|
4128
4180
|
}, props));
|
|
4129
4181
|
}
|
|
4130
4182
|
function PopoverTrigger(_param) {
|
|
4131
4183
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4132
|
-
return /* @__PURE__ */ (0,
|
|
4184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverPrimitive.Trigger, _object_spread({
|
|
4133
4185
|
"data-slot": "popover-trigger"
|
|
4134
4186
|
}, props));
|
|
4135
4187
|
}
|
|
@@ -4140,8 +4192,8 @@ function PopoverContent(_param) {
|
|
|
4140
4192
|
"sideOffset",
|
|
4141
4193
|
"showArrow"
|
|
4142
4194
|
]);
|
|
4143
|
-
return /* @__PURE__ */ (0,
|
|
4144
|
-
children: /* @__PURE__ */ (0,
|
|
4195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverPrimitive.Portal, {
|
|
4196
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(PopoverPrimitive.Content, _object_spread_props(_object_spread({
|
|
4145
4197
|
"data-slot": "popover-content",
|
|
4146
4198
|
align: align,
|
|
4147
4199
|
sideOffset: sideOffset,
|
|
@@ -4149,7 +4201,7 @@ function PopoverContent(_param) {
|
|
|
4149
4201
|
}, props), {
|
|
4150
4202
|
children: [
|
|
4151
4203
|
props.children,
|
|
4152
|
-
showArrow && /* @__PURE__ */ (0,
|
|
4204
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverPrimitive.Arrow, {
|
|
4153
4205
|
className: "fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]"
|
|
4154
4206
|
})
|
|
4155
4207
|
]
|
|
@@ -4159,7 +4211,7 @@ function PopoverContent(_param) {
|
|
|
4159
4211
|
// src/components/ui/SearchSelect.tsx
|
|
4160
4212
|
var import_lucide_react4 = require("lucide-react");
|
|
4161
4213
|
var import_react6 = require("react");
|
|
4162
|
-
var
|
|
4214
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
4163
4215
|
function SearchSelect(param) {
|
|
4164
4216
|
var options = param.options, name = param.name, _param_selectPlaceholder = param.selectPlaceholder, selectPlaceholder = _param_selectPlaceholder === void 0 ? "Select" : _param_selectPlaceholder, defaultValue = param.defaultValue, notFoundLabel = param.notFoundLabel, _param_searchPlaceholder = param.searchPlaceholder, searchPlaceholder = _param_searchPlaceholder === void 0 ? "Search" : _param_searchPlaceholder, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, notFoundLabelClassName = param.notFoundLabelClassName, elementClassName = param.elementClassName, searchClassName = param.searchClassName, selectButtonClassName = param.selectButtonClassName, value = param.value, disabled = param.disabled, onChange = param.onChange, direction = param.direction;
|
|
4165
4217
|
var id = (0, import_react6.useId)();
|
|
@@ -4176,19 +4228,19 @@ function SearchSelect(param) {
|
|
|
4176
4228
|
options,
|
|
4177
4229
|
selectPlaceholder
|
|
4178
4230
|
]);
|
|
4179
|
-
return /* @__PURE__ */ (0,
|
|
4231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", {
|
|
4180
4232
|
style: {
|
|
4181
4233
|
direction: direction
|
|
4182
4234
|
},
|
|
4183
4235
|
className: cn("w-full", elementClassName),
|
|
4184
4236
|
children: [
|
|
4185
|
-
/* @__PURE__ */ (0,
|
|
4237
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Popover, {
|
|
4186
4238
|
open: open,
|
|
4187
4239
|
onOpenChange: setOpen,
|
|
4188
4240
|
children: [
|
|
4189
|
-
/* @__PURE__ */ (0,
|
|
4241
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PopoverTrigger, {
|
|
4190
4242
|
asChild: true,
|
|
4191
|
-
children: /* @__PURE__ */ (0,
|
|
4243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Button, {
|
|
4192
4244
|
id: id,
|
|
4193
4245
|
variant: "outline",
|
|
4194
4246
|
role: "combobox",
|
|
@@ -4196,11 +4248,11 @@ function SearchSelect(param) {
|
|
|
4196
4248
|
disabled: disabled,
|
|
4197
4249
|
className: cn("bg-background hover:bg-background border-input w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]", selectButtonClassName),
|
|
4198
4250
|
children: [
|
|
4199
|
-
/* @__PURE__ */ (0,
|
|
4251
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", {
|
|
4200
4252
|
className: cn("truncate", !selectedValue && "text-muted-foreground"),
|
|
4201
4253
|
children: selectLabel
|
|
4202
4254
|
}),
|
|
4203
|
-
/* @__PURE__ */ (0,
|
|
4255
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronDownIcon, {
|
|
4204
4256
|
size: 16,
|
|
4205
4257
|
className: "text-muted-foreground/80 shrink-0",
|
|
4206
4258
|
"aria-hidden": "true"
|
|
@@ -4208,28 +4260,28 @@ function SearchSelect(param) {
|
|
|
4208
4260
|
]
|
|
4209
4261
|
})
|
|
4210
4262
|
}),
|
|
4211
|
-
/* @__PURE__ */ (0,
|
|
4263
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PopoverContent, {
|
|
4212
4264
|
className: cn("border-input w-full min-w-[var(--radix-popper-anchor-width)] p-0 bg-[#fff]"),
|
|
4213
4265
|
align: "start",
|
|
4214
|
-
children: /* @__PURE__ */ (0,
|
|
4266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Command, {
|
|
4215
4267
|
children: [
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4268
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CommandInput, {
|
|
4217
4269
|
style: {
|
|
4218
4270
|
direction: direction
|
|
4219
4271
|
},
|
|
4220
4272
|
className: cn(searchClassName),
|
|
4221
4273
|
placeholder: searchPlaceholder
|
|
4222
4274
|
}),
|
|
4223
|
-
/* @__PURE__ */ (0,
|
|
4275
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CommandList, {
|
|
4224
4276
|
children: [
|
|
4225
|
-
/* @__PURE__ */ (0,
|
|
4277
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CommandEmpty, {
|
|
4226
4278
|
className: cn("w-full py-2 text-center", notFoundLabelClassName),
|
|
4227
4279
|
children: notFoundLabel
|
|
4228
4280
|
}),
|
|
4229
|
-
/* @__PURE__ */ (0,
|
|
4281
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CommandGroup, {
|
|
4230
4282
|
className: cn("max-h-52 overflow-y-auto", dropdownClassName),
|
|
4231
4283
|
children: options.map(function(option) {
|
|
4232
|
-
return /* @__PURE__ */ (0,
|
|
4284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CommandItem, {
|
|
4233
4285
|
className: cn("hover:bg-[#cccbcb] cursor-pointer", dropdownOptionClassName, selectedValue === option.value && "bg-[#cccbcb]"),
|
|
4234
4286
|
value: JSON.stringify(option),
|
|
4235
4287
|
onSelect: function(currentValue) {
|
|
@@ -4240,7 +4292,7 @@ function SearchSelect(param) {
|
|
|
4240
4292
|
},
|
|
4241
4293
|
children: [
|
|
4242
4294
|
option.label,
|
|
4243
|
-
selectedValue === option.value && /* @__PURE__ */ (0,
|
|
4295
|
+
selectedValue === option.value && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.CheckIcon, {
|
|
4244
4296
|
size: 16,
|
|
4245
4297
|
className: "ml-auto"
|
|
4246
4298
|
})
|
|
@@ -4255,7 +4307,7 @@ function SearchSelect(param) {
|
|
|
4255
4307
|
})
|
|
4256
4308
|
]
|
|
4257
4309
|
}),
|
|
4258
|
-
/* @__PURE__ */ (0,
|
|
4310
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", {
|
|
4259
4311
|
name: name,
|
|
4260
4312
|
type: "hidden",
|
|
4261
4313
|
value: selectedValue
|
|
@@ -4264,7 +4316,7 @@ function SearchSelect(param) {
|
|
|
4264
4316
|
});
|
|
4265
4317
|
}
|
|
4266
4318
|
// src/components/table/components.tsx
|
|
4267
|
-
var
|
|
4319
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
4268
4320
|
var getFixedNumber = function() {
|
|
4269
4321
|
var number = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, fix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 4;
|
|
4270
4322
|
var sum_value = number % 1 === 0 ? number : number.toFixed(fix).replace(/\.?0+$/, "");
|
|
@@ -4274,14 +4326,14 @@ var TableRow2 = function(param) {
|
|
|
4274
4326
|
var item = param.item, index2 = param.index;
|
|
4275
4327
|
var _useTableContext = useTableContext(), rowStyles = _useTableContext.rowStyles, rowClassName = _useTableContext.rowClassName, keysToRender = _useTableContext.keysToRender, onRowClick = _useTableContext.onRowClick, zebraStriping = _useTableContext.zebraStriping;
|
|
4276
4328
|
var zebraClassName = zebraStriping ? index2 % 2 === 0 ? zebraStriping.evenRowClassName || "" : zebraStriping.oddRowClassName || "bg-gray-300" : "";
|
|
4277
|
-
return /* @__PURE__ */ (0,
|
|
4329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tr", {
|
|
4278
4330
|
className: cn("hover:bg-[#808080] hover:text-[#fff]", zebraClassName, rowClassName || ""),
|
|
4279
4331
|
onClick: function() {
|
|
4280
4332
|
return onRowClick && onRowClick(item);
|
|
4281
4333
|
},
|
|
4282
4334
|
style: rowStyles,
|
|
4283
4335
|
children: keysToRender.map(function(key, index3) {
|
|
4284
|
-
return /* @__PURE__ */ (0,
|
|
4336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableCell, {
|
|
4285
4337
|
value: item[key]
|
|
4286
4338
|
}, index3);
|
|
4287
4339
|
})
|
|
@@ -4290,7 +4342,7 @@ var TableRow2 = function(param) {
|
|
|
4290
4342
|
var TableCell = function(param) {
|
|
4291
4343
|
var value = param.value;
|
|
4292
4344
|
var _useTableContext = useTableContext(), cellStyle = _useTableContext.cellStyle, cellClassName = _useTableContext.cellClassName;
|
|
4293
|
-
return /* @__PURE__ */ (0,
|
|
4345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", {
|
|
4294
4346
|
title: [
|
|
4295
4347
|
"string",
|
|
4296
4348
|
"number",
|
|
@@ -4306,55 +4358,55 @@ var Filter = (0, import_react7.memo)(function(param) {
|
|
|
4306
4358
|
var _filters_filterableColumn_dataKey, _filters_filterableColumn_dataKey1, _filterOptions_filterableColumn_dataKey;
|
|
4307
4359
|
var _useTableContext = useTableContext(), direction = _useTableContext.direction, headers = _useTableContext.headers, filters = _useTableContext.filters, filterOptions = _useTableContext.filterOptions, filterPopupsDisplay = _useTableContext.filterPopupsDisplay, handleFilterChange = _useTableContext.handleFilterChange, handleFilterClick = _useTableContext.handleFilterClick, closeFilterWindow = _useTableContext.closeFilterWindow, filterLabel = _useTableContext.filterLabel;
|
|
4308
4360
|
var displayRight = direction === "rtl" && index2 === headers.length - 1 || direction === "ltr" && index2 !== headers.length - 1;
|
|
4309
|
-
return /* @__PURE__ */ (0,
|
|
4361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", {
|
|
4310
4362
|
className: "absolute top-1 right-1 ",
|
|
4311
4363
|
children: [
|
|
4312
|
-
/* @__PURE__ */ (0,
|
|
4364
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", {
|
|
4313
4365
|
title: filterLabel + " " + filterableColumn.header,
|
|
4314
4366
|
className: "text-[12px]",
|
|
4315
4367
|
onClick: function() {
|
|
4316
4368
|
return handleFilterClick(filterableColumn.dataKey);
|
|
4317
4369
|
},
|
|
4318
|
-
children: filterPopupsDisplay === filterableColumn.dataKey ? /* @__PURE__ */ (0,
|
|
4319
|
-
children: ((_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.length) > 0 ? /* @__PURE__ */ (0,
|
|
4370
|
+
children: filterPopupsDisplay === filterableColumn.dataKey ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {
|
|
4371
|
+
children: ((_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {
|
|
4320
4372
|
children: slashFilterSvg(true)
|
|
4321
|
-
}) : /* @__PURE__ */ (0,
|
|
4373
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {
|
|
4322
4374
|
children: emptyFilterSvg(true)
|
|
4323
4375
|
})
|
|
4324
|
-
}) : /* @__PURE__ */ (0,
|
|
4325
|
-
children: ((_filters_filterableColumn_dataKey1 = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey1 === void 0 ? void 0 : _filters_filterableColumn_dataKey1.length) > 0 ? /* @__PURE__ */ (0,
|
|
4376
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {
|
|
4377
|
+
children: ((_filters_filterableColumn_dataKey1 = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey1 === void 0 ? void 0 : _filters_filterableColumn_dataKey1.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {
|
|
4326
4378
|
children: slashFilterSvg()
|
|
4327
|
-
}) : /* @__PURE__ */ (0,
|
|
4379
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {
|
|
4328
4380
|
children: emptyFilterSvg()
|
|
4329
4381
|
})
|
|
4330
4382
|
})
|
|
4331
4383
|
}),
|
|
4332
|
-
/* @__PURE__ */ (0,
|
|
4384
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4333
4385
|
className: "relative",
|
|
4334
|
-
children: filterPopupsDisplay === filterableColumn.dataKey && /* @__PURE__ */ (0,
|
|
4386
|
+
children: filterPopupsDisplay === filterableColumn.dataKey && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", {
|
|
4335
4387
|
className: "absolute top-[-20px] z-20 ".concat(displayRight ? " left-[100%]" : "right-[100%]", " w-44 h-52 text-black bg-white p-1 flex flex-col items-center gap-2 shadow"),
|
|
4336
4388
|
children: [
|
|
4337
|
-
/* @__PURE__ */ (0,
|
|
4389
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", {
|
|
4338
4390
|
className: "flex justify-between items-center border-black border-b-[1px] w-[90%]",
|
|
4339
4391
|
children: [
|
|
4340
|
-
/* @__PURE__ */ (0,
|
|
4392
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4341
4393
|
className: "text-start",
|
|
4342
4394
|
children: filterLabel + " " + filterableColumn.header
|
|
4343
4395
|
}),
|
|
4344
|
-
/* @__PURE__ */ (0,
|
|
4396
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", {
|
|
4345
4397
|
onClick: closeFilterWindow,
|
|
4346
|
-
children: /* @__PURE__ */ (0,
|
|
4398
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RedXSvg2, {})
|
|
4347
4399
|
})
|
|
4348
4400
|
]
|
|
4349
4401
|
}),
|
|
4350
|
-
/* @__PURE__ */ (0,
|
|
4402
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4351
4403
|
className: "overflow-auto h-[80%] flex flex-col gap-1 w-full cursor-pointer ",
|
|
4352
4404
|
children: (_filterOptions_filterableColumn_dataKey = filterOptions[filterableColumn.dataKey]) === null || _filterOptions_filterableColumn_dataKey === void 0 ? void 0 : _filterOptions_filterableColumn_dataKey.map(function(option, i) {
|
|
4353
4405
|
var _filters_filterableColumn_dataKey;
|
|
4354
|
-
return /* @__PURE__ */ (0,
|
|
4406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", {
|
|
4355
4407
|
className: "flex items-center px-2 justify-start hover:bg-[#547f22] hover:text-white",
|
|
4356
4408
|
children: [
|
|
4357
|
-
/* @__PURE__ */ (0,
|
|
4409
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", {
|
|
4358
4410
|
type: "checkbox",
|
|
4359
4411
|
className: "cursor-pointer",
|
|
4360
4412
|
checked: (_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.includes(option),
|
|
@@ -4362,7 +4414,7 @@ var Filter = (0, import_react7.memo)(function(param) {
|
|
|
4362
4414
|
return handleFilterChange(filterableColumn.dataKey, option);
|
|
4363
4415
|
}
|
|
4364
4416
|
}),
|
|
4365
|
-
/* @__PURE__ */ (0,
|
|
4417
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", {
|
|
4366
4418
|
className: "flex-1 text-start px-2",
|
|
4367
4419
|
onClick: function() {
|
|
4368
4420
|
return handleFilterChange(filterableColumn.dataKey, option);
|
|
@@ -4386,32 +4438,32 @@ var TableHead = (0, import_react7.memo)(function() {
|
|
|
4386
4438
|
}, [
|
|
4387
4439
|
sortKeys
|
|
4388
4440
|
]);
|
|
4389
|
-
return /* @__PURE__ */ (0,
|
|
4441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", {
|
|
4390
4442
|
className: cn("bg-[#282828] text-white sticky top-0", headerClassName),
|
|
4391
|
-
children: /* @__PURE__ */ (0,
|
|
4443
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tr", {
|
|
4392
4444
|
style: headerStyle,
|
|
4393
4445
|
children: headers.map(function(header, index2) {
|
|
4394
4446
|
var filterableColumn = filterableColumns.find(function(col) {
|
|
4395
4447
|
return col.header === header;
|
|
4396
4448
|
});
|
|
4397
|
-
return /* @__PURE__ */ (0,
|
|
4449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("th", {
|
|
4398
4450
|
title: sortDisplay ? "".concat(sortLabel, " ").concat(header) : header,
|
|
4399
4451
|
style: headerCellStyle,
|
|
4400
4452
|
className: cn("border-black border-[1px] max-w-[130px] px-2 text-center relative", headerCellClassName),
|
|
4401
4453
|
children: [
|
|
4402
|
-
/* @__PURE__ */ (0,
|
|
4454
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4403
4455
|
className: "px-2 ".concat(sortDisplay ? "cursor-pointer" : ""),
|
|
4404
4456
|
onClick: function() {
|
|
4405
4457
|
return sortDisplay && handleSort(index2);
|
|
4406
4458
|
},
|
|
4407
4459
|
children: header
|
|
4408
4460
|
}),
|
|
4409
|
-
sortDisplay && sortColumn === index2 && (sortOrder === "desc" ? /* @__PURE__ */ (0,
|
|
4461
|
+
sortDisplay && sortColumn === index2 && (sortOrder === "desc" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {
|
|
4410
4462
|
children: sortSvg()
|
|
4411
|
-
}) : /* @__PURE__ */ (0,
|
|
4463
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {
|
|
4412
4464
|
children: sortSvg(true)
|
|
4413
4465
|
})),
|
|
4414
|
-
filterableColumn && /* @__PURE__ */ (0,
|
|
4466
|
+
filterableColumn && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Filter, {
|
|
4415
4467
|
filterableColumn: filterableColumn,
|
|
4416
4468
|
index: index2
|
|
4417
4469
|
})
|
|
@@ -4423,10 +4475,10 @@ var TableHead = (0, import_react7.memo)(function() {
|
|
|
4423
4475
|
}, renderOnce);
|
|
4424
4476
|
var TableBody = (0, import_react7.memo)(function() {
|
|
4425
4477
|
var dataToRender = useTableContext().dataToRender;
|
|
4426
|
-
return /* @__PURE__ */ (0,
|
|
4478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tbody", {
|
|
4427
4479
|
className: "divide-y divide-gray-600",
|
|
4428
4480
|
children: dataToRender.renderedData.map(function(item, index2) {
|
|
4429
|
-
return /* @__PURE__ */ (0,
|
|
4481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableRow2, {
|
|
4430
4482
|
item: item,
|
|
4431
4483
|
index: index2
|
|
4432
4484
|
}, index2);
|
|
@@ -4435,19 +4487,19 @@ var TableBody = (0, import_react7.memo)(function() {
|
|
|
4435
4487
|
}, renderOnce);
|
|
4436
4488
|
var MaxRowsLabel = (0, import_react7.memo)(function() {
|
|
4437
4489
|
var _useTableContext = useTableContext(), data = _useTableContext.data, dataToRender = _useTableContext.dataToRender, maxRowsLabel1 = _useTableContext.maxRowsLabel1, maxRowsLabel2 = _useTableContext.maxRowsLabel2, maxRows = _useTableContext.maxRows, maxRowsContainerClassName = _useTableContext.maxRowsContainerClassName;
|
|
4438
|
-
return /* @__PURE__ */ (0,
|
|
4490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", {
|
|
4439
4491
|
className: cn("flex justify-start items-center text-lg gap-1", maxRowsContainerClassName || ""),
|
|
4440
4492
|
children: [
|
|
4441
|
-
/* @__PURE__ */ (0,
|
|
4493
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4442
4494
|
children: maxRowsLabel1
|
|
4443
4495
|
}),
|
|
4444
|
-
/* @__PURE__ */ (0,
|
|
4496
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4445
4497
|
children: maxRows > dataToRender.renderedData.length ? dataToRender.renderedData.length : maxRows
|
|
4446
4498
|
}),
|
|
4447
|
-
/* @__PURE__ */ (0,
|
|
4499
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4448
4500
|
children: maxRowsLabel2
|
|
4449
4501
|
}),
|
|
4450
|
-
/* @__PURE__ */ (0,
|
|
4502
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4451
4503
|
children: dataToRender.filtered.length
|
|
4452
4504
|
})
|
|
4453
4505
|
]
|
|
@@ -4526,7 +4578,7 @@ var ExportToExcel = (0, import_react7.memo)(function() {
|
|
|
4526
4578
|
return _ref.apply(this, arguments);
|
|
4527
4579
|
};
|
|
4528
4580
|
}();
|
|
4529
|
-
return /* @__PURE__ */ (0,
|
|
4581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", {
|
|
4530
4582
|
onClick: onExportExcelClick,
|
|
4531
4583
|
title: exportExcelTitle,
|
|
4532
4584
|
className: cn("px-2 py-[2px] bg-[#547f22] text-white rounded-lg text-[16px]", exportToExcelClassName),
|
|
@@ -4535,7 +4587,7 @@ var ExportToExcel = (0, import_react7.memo)(function() {
|
|
|
4535
4587
|
}, renderOnce);
|
|
4536
4588
|
var Search = (0, import_react7.memo)(function() {
|
|
4537
4589
|
var _useTableContext = useTableContext(), searchQuery = _useTableContext.searchQuery, handleSearch = _useTableContext.handleSearch, searchPlaceHolder = _useTableContext.searchPlaceHolder, searchInputClassName = _useTableContext.searchInputClassName, searchInputStyle = _useTableContext.searchInputStyle;
|
|
4538
|
-
return /* @__PURE__ */ (0,
|
|
4590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", {
|
|
4539
4591
|
className: cn("w-40 border-black border-[1px] text-lg px-2 ", searchInputClassName),
|
|
4540
4592
|
type: "text",
|
|
4541
4593
|
placeholder: searchPlaceHolder,
|
|
@@ -4546,17 +4598,17 @@ var Search = (0, import_react7.memo)(function() {
|
|
|
4546
4598
|
}, renderOnce);
|
|
4547
4599
|
var Summary = (0, import_react7.memo)(function() {
|
|
4548
4600
|
var _useTableContext = useTableContext(), summaryContainerStyle = _useTableContext.summaryContainerStyle, summaryLabelStyle = _useTableContext.summaryLabelStyle, summaryLabel = _useTableContext.summaryLabel, summaryRowStyle = _useTableContext.summaryRowStyle, sumColumns = _useTableContext.sumColumns, dataToRender = _useTableContext.dataToRender, direction = _useTableContext.direction;
|
|
4549
|
-
return /* @__PURE__ */ (0,
|
|
4601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", {
|
|
4550
4602
|
style: _object_spread_props(_object_spread({}, summaryContainerStyle), {
|
|
4551
4603
|
direction: direction
|
|
4552
4604
|
}),
|
|
4553
4605
|
className: "w-full h-8 flex justify-between items-center px-3 text-[18px] font-bold",
|
|
4554
4606
|
children: [
|
|
4555
|
-
/* @__PURE__ */ (0,
|
|
4607
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4556
4608
|
style: summaryLabelStyle,
|
|
4557
4609
|
children: summaryLabel
|
|
4558
4610
|
}),
|
|
4559
|
-
/* @__PURE__ */ (0,
|
|
4611
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4560
4612
|
style: summaryRowStyle,
|
|
4561
4613
|
className: "flex gap-3",
|
|
4562
4614
|
children: sumColumns.map(function(val) {
|
|
@@ -4564,16 +4616,16 @@ var Summary = (0, import_react7.memo)(function() {
|
|
|
4564
4616
|
return acc + Number(v[val.dataKey]) || 0;
|
|
4565
4617
|
}, 0);
|
|
4566
4618
|
var sum_value = getFixedNumber(sum_res);
|
|
4567
|
-
return /* @__PURE__ */ (0,
|
|
4619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", {
|
|
4568
4620
|
className: "flex gap-1 justify-start",
|
|
4569
4621
|
children: [
|
|
4570
|
-
/* @__PURE__ */ (0,
|
|
4622
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4571
4623
|
children: val.label
|
|
4572
4624
|
}),
|
|
4573
|
-
/* @__PURE__ */ (0,
|
|
4625
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {
|
|
4574
4626
|
children: ":"
|
|
4575
4627
|
}),
|
|
4576
|
-
/* @__PURE__ */ (0,
|
|
4628
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4577
4629
|
children: val.ui ? val.ui(sum_value) : sum_value
|
|
4578
4630
|
})
|
|
4579
4631
|
]
|
|
@@ -4590,7 +4642,7 @@ var TimesUI = function(param) {
|
|
|
4590
4642
|
fromFormat: fromFormat,
|
|
4591
4643
|
tz: tz
|
|
4592
4644
|
});
|
|
4593
|
-
return /* @__PURE__ */ (0,
|
|
4645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4594
4646
|
style: {
|
|
4595
4647
|
direction: "ltr"
|
|
4596
4648
|
},
|
|
@@ -4606,22 +4658,22 @@ var TableButton = function(param) {
|
|
|
4606
4658
|
edit: "fa-light fa-pen-to-square text-xl",
|
|
4607
4659
|
delete: "fa-light fa-trash text-xl"
|
|
4608
4660
|
};
|
|
4609
|
-
return /* @__PURE__ */ (0,
|
|
4610
|
-
children: type === "custom" ? /* @__PURE__ */ (0,
|
|
4661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {
|
|
4662
|
+
children: type === "custom" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", {
|
|
4611
4663
|
className: className,
|
|
4612
4664
|
title: title,
|
|
4613
4665
|
onClick: onClick,
|
|
4614
4666
|
children: children
|
|
4615
|
-
}) : type === "add" ? /* @__PURE__ */ (0,
|
|
4667
|
+
}) : type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, {
|
|
4616
4668
|
title: title,
|
|
4617
4669
|
onClick: onClick,
|
|
4618
|
-
children: /* @__PURE__ */ (0,
|
|
4670
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("i", {
|
|
4619
4671
|
className: cn("fa-regular fa-plus text-2xl", className)
|
|
4620
4672
|
})
|
|
4621
|
-
}) : /* @__PURE__ */ (0,
|
|
4673
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", {
|
|
4622
4674
|
title: title,
|
|
4623
4675
|
onClick: onClick,
|
|
4624
|
-
children: /* @__PURE__ */ (0,
|
|
4676
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("i", {
|
|
4625
4677
|
className: cn(icon[type], className)
|
|
4626
4678
|
})
|
|
4627
4679
|
})
|
|
@@ -4650,14 +4702,14 @@ var DurationUI = function(param) {
|
|
|
4650
4702
|
}, [
|
|
4651
4703
|
duration
|
|
4652
4704
|
]), daysStr = _ref.daysStr, hoursStr = _ref.hoursStr, minutesStr = _ref.minutesStr, secondsStr = _ref.secondsStr;
|
|
4653
|
-
return /* @__PURE__ */ (0,
|
|
4705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", {
|
|
4654
4706
|
title: "".concat(daysStr, " ").concat(daysLabel, " ").concat(hoursStr, " ").concat(hoursLabel, " ").concat(minutesStr, " ").concat(minutesLabel, " ").concat(secondsStr, " ").concat(secondsLabel).trim(),
|
|
4655
4707
|
style: {
|
|
4656
4708
|
direction: "ltr"
|
|
4657
4709
|
},
|
|
4658
4710
|
className: cn("flex gap-1 ".concat(direction === "rtl" ? "justify-end" : "justify-start"), className),
|
|
4659
4711
|
children: [
|
|
4660
|
-
daysStr !== "00" && /* @__PURE__ */ (0,
|
|
4712
|
+
daysStr !== "00" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", {
|
|
4661
4713
|
style: {
|
|
4662
4714
|
display: "inline-block"
|
|
4663
4715
|
},
|
|
@@ -4667,7 +4719,7 @@ var DurationUI = function(param) {
|
|
|
4667
4719
|
daysLabel
|
|
4668
4720
|
]
|
|
4669
4721
|
}),
|
|
4670
|
-
hoursStr !== "00" && /* @__PURE__ */ (0,
|
|
4722
|
+
hoursStr !== "00" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", {
|
|
4671
4723
|
style: {
|
|
4672
4724
|
display: "inline-block"
|
|
4673
4725
|
},
|
|
@@ -4677,7 +4729,7 @@ var DurationUI = function(param) {
|
|
|
4677
4729
|
hoursLabel
|
|
4678
4730
|
]
|
|
4679
4731
|
}),
|
|
4680
|
-
minutesStr !== "00" && /* @__PURE__ */ (0,
|
|
4732
|
+
minutesStr !== "00" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", {
|
|
4681
4733
|
style: {
|
|
4682
4734
|
display: "inline-block"
|
|
4683
4735
|
},
|
|
@@ -4687,7 +4739,7 @@ var DurationUI = function(param) {
|
|
|
4687
4739
|
minutesLabel
|
|
4688
4740
|
]
|
|
4689
4741
|
}),
|
|
4690
|
-
secondsStr !== "00" && /* @__PURE__ */ (0,
|
|
4742
|
+
secondsStr !== "00" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", {
|
|
4691
4743
|
style: {
|
|
4692
4744
|
display: "inline-block"
|
|
4693
4745
|
},
|
|
@@ -4702,7 +4754,7 @@ var DurationUI = function(param) {
|
|
|
4702
4754
|
};
|
|
4703
4755
|
var PhoneUI = function(param) {
|
|
4704
4756
|
var phone = param.phone, direction = param.direction, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
4705
|
-
return /* @__PURE__ */ (0,
|
|
4757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4706
4758
|
style: {
|
|
4707
4759
|
direction: "ltr"
|
|
4708
4760
|
},
|
|
@@ -4713,9 +4765,9 @@ var PhoneUI = function(param) {
|
|
|
4713
4765
|
};
|
|
4714
4766
|
var BooleanUi = function(param) {
|
|
4715
4767
|
var value = param.value, size3 = param.size, className = param.className, falseUi = param.falseUi, trueUi = param.trueUi;
|
|
4716
|
-
return value ? trueUi !== null && trueUi !== void 0 ? trueUi : /* @__PURE__ */ (0,
|
|
4768
|
+
return value ? trueUi !== null && trueUi !== void 0 ? trueUi : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("i", {
|
|
4717
4769
|
className: cn("fa-light fa-check ".concat(size3 === "small" ? "text-lg" : "text-2xl"), className)
|
|
4718
|
-
}) : falseUi !== null && falseUi !== void 0 ? falseUi : /* @__PURE__ */ (0,
|
|
4770
|
+
}) : falseUi !== null && falseUi !== void 0 ? falseUi : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("i", {
|
|
4719
4771
|
className: cn("fa-light fa-xmark ".concat(size3 === "small" ? "text-lg" : "text-2xl"), className)
|
|
4720
4772
|
});
|
|
4721
4773
|
};
|
|
@@ -4725,7 +4777,7 @@ var GeoUi = function(param) {
|
|
|
4725
4777
|
var lat = value.lat || value.latitude;
|
|
4726
4778
|
var googleMapsLink = getLocationUrl(lang, lat);
|
|
4727
4779
|
var langLatUi = linkUi || " ".concat(lang, " ").concat(lat);
|
|
4728
|
-
return /* @__PURE__ */ (0,
|
|
4780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("a", {
|
|
4729
4781
|
href: googleMapsLink,
|
|
4730
4782
|
target: "_blank",
|
|
4731
4783
|
className: cn("_ellipsis", className),
|
|
@@ -4735,7 +4787,7 @@ var GeoUi = function(param) {
|
|
|
4735
4787
|
};
|
|
4736
4788
|
var NumberUI = function(param) {
|
|
4737
4789
|
var number = param.number, direction = param.direction, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
4738
|
-
return /* @__PURE__ */ (0,
|
|
4790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {
|
|
4739
4791
|
style: {
|
|
4740
4792
|
direction: "ltr"
|
|
4741
4793
|
},
|
|
@@ -4753,7 +4805,7 @@ var import_lucide_react5 = require("lucide-react");
|
|
|
4753
4805
|
var import_react8 = require("react");
|
|
4754
4806
|
var RPNInput = __toESM(require("react-phone-number-input"));
|
|
4755
4807
|
var import_flags = __toESM(require("react-phone-number-input/flags"));
|
|
4756
|
-
var
|
|
4808
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4757
4809
|
function InternationalPhonePicker(param) {
|
|
4758
4810
|
var setPhoneValue = param.setPhoneValue, _param_phoneValue = param.phoneValue, phoneValue = _param_phoneValue === void 0 ? "" : _param_phoneValue, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "" : _param_placeholder, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_defaultCountry = param.defaultCountry, defaultCountry = _param_defaultCountry === void 0 ? "IL" : _param_defaultCountry, _param_flagContainerClassName = param.flagContainerClassName, flagContainerClassName = _param_flagContainerClassName === void 0 ? "" : _param_flagContainerClassName, _param_inputClassName = param.inputClassName, inputClassName = _param_inputClassName === void 0 ? "" : _param_inputClassName, defaultValue = param.defaultValue, name = param.name, style = param.style, onEnter = param.onEnter, labelContent = param.labelContent, labelClassName = param.labelClassName, required = param.required, direction = param.direction;
|
|
4759
4811
|
var handleKeyDown = function(e) {
|
|
@@ -4776,19 +4828,19 @@ function InternationalPhonePicker(param) {
|
|
|
4776
4828
|
defaultValue,
|
|
4777
4829
|
setPhoneValue
|
|
4778
4830
|
]);
|
|
4779
|
-
return /* @__PURE__ */ (0,
|
|
4831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", {
|
|
4780
4832
|
style: {
|
|
4781
4833
|
direction: direction
|
|
4782
4834
|
},
|
|
4783
4835
|
className: cn("space-y-2", "".concat(labelContent ? "flex gap-1 items-center" : ""), containerClassName),
|
|
4784
4836
|
children: [
|
|
4785
|
-
labelContent && /* @__PURE__ */ (0,
|
|
4837
|
+
labelContent && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ElementLabel, {
|
|
4786
4838
|
labelContent: labelContent,
|
|
4787
4839
|
labelClassName: labelClassName,
|
|
4788
4840
|
name: name,
|
|
4789
4841
|
required: required
|
|
4790
4842
|
}),
|
|
4791
|
-
/* @__PURE__ */ (0,
|
|
4843
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RPNInput.default, {
|
|
4792
4844
|
style: {
|
|
4793
4845
|
direction: "ltr"
|
|
4794
4846
|
},
|
|
@@ -4821,7 +4873,7 @@ function InternationalPhonePicker(param) {
|
|
|
4821
4873
|
setTempPhoneValue(newValue !== null && newValue !== void 0 ? newValue : "");
|
|
4822
4874
|
}
|
|
4823
4875
|
}),
|
|
4824
|
-
/* @__PURE__ */ (0,
|
|
4876
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("input", {
|
|
4825
4877
|
type: "hidden",
|
|
4826
4878
|
name: name,
|
|
4827
4879
|
value: tempPhoneValue
|
|
@@ -4842,7 +4894,7 @@ var PhoneInput = (0, import_react8.forwardRef)(function(_param, ref) {
|
|
|
4842
4894
|
inputRef.current.focus();
|
|
4843
4895
|
}
|
|
4844
4896
|
}, []);
|
|
4845
|
-
return /* @__PURE__ */ (0,
|
|
4897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Input, _object_spread({
|
|
4846
4898
|
className: cn("-ms-px rounded-s-none shadow-none focus-visible:z-10 h-full", className),
|
|
4847
4899
|
onKeyDown: onKeyDown,
|
|
4848
4900
|
defaultValue: defaultValue,
|
|
@@ -4866,21 +4918,21 @@ var CountrySelect = function(param) {
|
|
|
4866
4918
|
var originalClassName = (0, import_react8.useMemo)(function() {
|
|
4867
4919
|
return "relative inline-flex items-center self-stretch rounded-s-lg border border-input bg-background py-2 pe-2 ps-3 text-muted-foreground transition-shadow focus-within:z-10 focus-within:border-ring focus-within:outline-none focus-within:ring-[3px] focus-within:ring-ring/20 hover:bg-accent hover:text-foreground has-[:disabled]:pointer-events-none has-[:disabled]:opacity-50";
|
|
4868
4920
|
}, []);
|
|
4869
|
-
return /* @__PURE__ */ (0,
|
|
4921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", {
|
|
4870
4922
|
className: cn(originalClassName, className),
|
|
4871
4923
|
children: [
|
|
4872
|
-
/* @__PURE__ */ (0,
|
|
4924
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", {
|
|
4873
4925
|
className: "inline-flex items-center gap-1",
|
|
4874
4926
|
"aria-hidden": "true",
|
|
4875
4927
|
children: [
|
|
4876
|
-
/* @__PURE__ */ (0,
|
|
4928
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FlagComponent, {
|
|
4877
4929
|
country: value,
|
|
4878
4930
|
countryName: value,
|
|
4879
4931
|
"aria-hidden": "true"
|
|
4880
4932
|
}),
|
|
4881
|
-
/* @__PURE__ */ (0,
|
|
4933
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", {
|
|
4882
4934
|
className: "text-muted-foreground/80",
|
|
4883
|
-
children: /* @__PURE__ */ (0,
|
|
4935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react5.ChevronDown, {
|
|
4884
4936
|
size: 16,
|
|
4885
4937
|
strokeWidth: 2,
|
|
4886
4938
|
"aria-hidden": "true"
|
|
@@ -4888,7 +4940,7 @@ var CountrySelect = function(param) {
|
|
|
4888
4940
|
})
|
|
4889
4941
|
]
|
|
4890
4942
|
}),
|
|
4891
|
-
/* @__PURE__ */ (0,
|
|
4943
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("select", {
|
|
4892
4944
|
disabled: disabled,
|
|
4893
4945
|
value: value,
|
|
4894
4946
|
onChange: handleSelect,
|
|
@@ -4898,7 +4950,7 @@ var CountrySelect = function(param) {
|
|
|
4898
4950
|
return x.value;
|
|
4899
4951
|
}).map(function(option, i) {
|
|
4900
4952
|
var _option_value;
|
|
4901
|
-
return /* @__PURE__ */ (0,
|
|
4953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("option", {
|
|
4902
4954
|
className: "text-black",
|
|
4903
4955
|
value: option.value,
|
|
4904
4956
|
children: [
|
|
@@ -4915,18 +4967,18 @@ var CountrySelect = function(param) {
|
|
|
4915
4967
|
var FlagComponent = function(param) {
|
|
4916
4968
|
var country = param.country, countryName = param.countryName;
|
|
4917
4969
|
var Flag = import_flags.default[country];
|
|
4918
|
-
return /* @__PURE__ */ (0,
|
|
4970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", {
|
|
4919
4971
|
className: "w-5 overflow-hidden rounded-sm",
|
|
4920
|
-
children: Flag ? /* @__PURE__ */ (0,
|
|
4972
|
+
children: Flag ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Flag, {
|
|
4921
4973
|
title: countryName
|
|
4922
|
-
}) : /* @__PURE__ */ (0,
|
|
4974
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react5.Phone, {
|
|
4923
4975
|
size: 16,
|
|
4924
4976
|
"aria-hidden": "true"
|
|
4925
4977
|
})
|
|
4926
4978
|
});
|
|
4927
4979
|
};
|
|
4928
4980
|
// src/components/forms/ModularForm/formElements.tsx
|
|
4929
|
-
var
|
|
4981
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
4930
4982
|
var useSortValues = function(options, sortDirection, sortAsNumber) {
|
|
4931
4983
|
var sortOptions = (0, import_react9.useMemo)(function() {
|
|
4932
4984
|
var sorted = sortAsNumber ? options.sort(function(a, b) {
|
|
@@ -4957,17 +5009,17 @@ var InputContainer = function(param) {
|
|
|
4957
5009
|
}, [
|
|
4958
5010
|
handleChangeFunction
|
|
4959
5011
|
]);
|
|
4960
|
-
return /* @__PURE__ */ (0,
|
|
5012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", {
|
|
4961
5013
|
className: cn("center", containerClassName),
|
|
4962
5014
|
children: [
|
|
4963
|
-
labelContent && /* @__PURE__ */ (0,
|
|
5015
|
+
labelContent && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ElementLabel, {
|
|
4964
5016
|
direction: direction,
|
|
4965
5017
|
labelContent: labelContent,
|
|
4966
5018
|
labelClassName: labelClassName,
|
|
4967
5019
|
name: name,
|
|
4968
5020
|
required: required
|
|
4969
5021
|
}),
|
|
4970
|
-
/* @__PURE__ */ (0,
|
|
5022
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, props), {
|
|
4971
5023
|
minLength: minLength,
|
|
4972
5024
|
placeholder: placeholder,
|
|
4973
5025
|
className: cn("w-[70%] bg-inherit border-b-[1px] border-black px-2", elementClassName),
|
|
@@ -4996,37 +5048,37 @@ var SelectContainer = function(param) {
|
|
|
4996
5048
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
4997
5049
|
setIsOpen(false);
|
|
4998
5050
|
};
|
|
4999
|
-
return /* @__PURE__ */ (0,
|
|
5051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", {
|
|
5000
5052
|
className: cn("center", containerClassName),
|
|
5001
5053
|
children: [
|
|
5002
|
-
labelContent && /* @__PURE__ */ (0,
|
|
5054
|
+
labelContent && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ElementLabel, {
|
|
5003
5055
|
direction: direction,
|
|
5004
5056
|
labelContent: labelContent,
|
|
5005
5057
|
labelClassName: labelClassName,
|
|
5006
5058
|
name: name,
|
|
5007
5059
|
required: required
|
|
5008
5060
|
}),
|
|
5009
|
-
/* @__PURE__ */ (0,
|
|
5061
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", {
|
|
5010
5062
|
className: cn("w-[70%] relative", elementClassName),
|
|
5011
5063
|
onClick: function() {
|
|
5012
5064
|
return setIsOpen(!isOpen);
|
|
5013
5065
|
},
|
|
5014
5066
|
children: [
|
|
5015
|
-
/* @__PURE__ */ (0,
|
|
5067
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", {
|
|
5016
5068
|
className: "border-b-[1px] border-black max-h-6 cursor-pointer",
|
|
5017
5069
|
children: ((_options_find = options.find(function(opt) {
|
|
5018
5070
|
return opt.value === selectedValue;
|
|
5019
5071
|
})) === null || _options_find === void 0 ? void 0 : _options_find.label) || selectedValue
|
|
5020
5072
|
}),
|
|
5021
|
-
isOpen ? /* @__PURE__ */ (0,
|
|
5073
|
+
isOpen ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {
|
|
5022
5074
|
className: "fa-light fa-chevron-up absolute top-[1px] left-1 cursor-pointer"
|
|
5023
|
-
}) : /* @__PURE__ */ (0,
|
|
5075
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("i", {
|
|
5024
5076
|
className: "fa-light fa-chevron-down absolute top-[1px] left-1 cursor-pointer"
|
|
5025
5077
|
}),
|
|
5026
|
-
isOpen && /* @__PURE__ */ (0,
|
|
5078
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", {
|
|
5027
5079
|
className: cn("absolute w-full bg-white border border-gray-300 max-h-32 overflow-y-auto z-10", optionsContainerClassName),
|
|
5028
5080
|
children: sortOptions.map(function(option) {
|
|
5029
|
-
return /* @__PURE__ */ (0,
|
|
5081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", {
|
|
5030
5082
|
className: "p-2 cursor-pointer hover:bg-gray-200 ".concat(optionClassName),
|
|
5031
5083
|
onClick: function() {
|
|
5032
5084
|
return handleOptionClick(option.value);
|
|
@@ -5035,7 +5087,7 @@ var SelectContainer = function(param) {
|
|
|
5035
5087
|
}, option.value);
|
|
5036
5088
|
})
|
|
5037
5089
|
}),
|
|
5038
|
-
/* @__PURE__ */ (0,
|
|
5090
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("input", {
|
|
5039
5091
|
value: selectedValue,
|
|
5040
5092
|
type: "hidden",
|
|
5041
5093
|
name: name,
|
|
@@ -5049,17 +5101,17 @@ var SelectContainer = function(param) {
|
|
|
5049
5101
|
function MultiSelect(param) {
|
|
5050
5102
|
var onChange = param.onChange, selectedOptions = param.selectedOptions, emptyOptionsElement = param.emptyOptionsElement, unremovableOptions = param.unremovableOptions, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_styles = param.styles, styles = _param_styles === void 0 ? {} : _param_styles, _param_name = param.name, name = _param_name === void 0 ? "multipleSelect" : _param_name, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "Select items" : _param_placeholder, labelContent = param.labelContent, required = param.required, labelClassName = param.labelClassName, groupBy = param.groupBy, onSearch = param.onSearch, onSearchSync = param.onSearchSync, triggerSearchOnFocus = param.triggerSearchOnFocus, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, direction = param.direction, searchInputProps = param.searchInputProps;
|
|
5051
5103
|
var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
|
|
5052
|
-
return /* @__PURE__ */ (0,
|
|
5104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", {
|
|
5053
5105
|
className: cn("".concat(labelContent ? "flex gap-1 items-center" : ""), styles.containerClassName),
|
|
5054
5106
|
children: [
|
|
5055
|
-
labelContent && /* @__PURE__ */ (0,
|
|
5107
|
+
labelContent && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ElementLabel, {
|
|
5056
5108
|
direction: direction,
|
|
5057
5109
|
labelContent: labelContent,
|
|
5058
5110
|
labelClassName: labelClassName,
|
|
5059
5111
|
name: name,
|
|
5060
5112
|
required: required
|
|
5061
5113
|
}),
|
|
5062
|
-
/* @__PURE__ */ (0,
|
|
5114
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(multiselect_default, {
|
|
5063
5115
|
commandProps: {
|
|
5064
5116
|
label: placeholder
|
|
5065
5117
|
},
|
|
@@ -5079,7 +5131,7 @@ function MultiSelect(param) {
|
|
|
5079
5131
|
className: styles.className,
|
|
5080
5132
|
dropdownClassName: styles.dropdownClassName,
|
|
5081
5133
|
dropdownOptionClassName: styles.dropdownOptionClassName,
|
|
5082
|
-
emptyIndicator: emptyOptionsElement || /* @__PURE__ */ (0,
|
|
5134
|
+
emptyIndicator: emptyOptionsElement || /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", {
|
|
5083
5135
|
className: "text-center text-sm",
|
|
5084
5136
|
children: "all options selected."
|
|
5085
5137
|
}),
|
|
@@ -5093,17 +5145,17 @@ function MultiSelect(param) {
|
|
|
5093
5145
|
var SelectWithSearch = function(param) {
|
|
5094
5146
|
var options = param.options, labelClassName = param.labelClassName, labelContent = param.labelContent, name = param.name, onChange = param.onChange, value = param.value, placeholder = param.placeholder, required = param.required, defaultValue = param.defaultValue, notFoundLabel = param.notFoundLabel, searchPlaceholder = param.searchPlaceholder, containerClassName = param.containerClassName, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, elementClassName = param.elementClassName, notFoundLabelClassName = param.notFoundLabelClassName, searchClassName = param.searchClassName, selectButtonClassName = param.selectButtonClassName, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, disabled = param.disabled, direction = param.direction;
|
|
5095
5147
|
var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
|
|
5096
|
-
return /* @__PURE__ */ (0,
|
|
5148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", {
|
|
5097
5149
|
className: cn("flex justify-between items-center w-full", containerClassName),
|
|
5098
5150
|
children: [
|
|
5099
|
-
labelContent && /* @__PURE__ */ (0,
|
|
5151
|
+
labelContent && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ElementLabel, {
|
|
5100
5152
|
direction: direction,
|
|
5101
5153
|
labelContent: labelContent,
|
|
5102
5154
|
labelClassName: labelClassName,
|
|
5103
5155
|
name: name,
|
|
5104
5156
|
required: required
|
|
5105
5157
|
}),
|
|
5106
|
-
/* @__PURE__ */ (0,
|
|
5158
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SearchSelect, {
|
|
5107
5159
|
direction: direction,
|
|
5108
5160
|
options: sortOptions,
|
|
5109
5161
|
value: value,
|
|
@@ -5126,10 +5178,10 @@ var SelectWithSearch = function(param) {
|
|
|
5126
5178
|
};
|
|
5127
5179
|
var TextAreaContainer = function(param) {
|
|
5128
5180
|
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, placeholder = param.placeholder, props = param.props, minLength = param.minLength, onKeyDown = param.onKeyDown, onChange = param.onChange, direction = param.direction;
|
|
5129
|
-
return /* @__PURE__ */ (0,
|
|
5181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", {
|
|
5130
5182
|
className: cn("flex flex-col gap-2 items-center", containerClassName),
|
|
5131
5183
|
children: [
|
|
5132
|
-
labelContent && /* @__PURE__ */ (0,
|
|
5184
|
+
labelContent && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ElementLabel, {
|
|
5133
5185
|
direction: direction,
|
|
5134
5186
|
labelContent: labelContent,
|
|
5135
5187
|
labelClassName: "w-fit text-xl px-2 border-b-2 border-[#000] text-center ".concat(labelClassName),
|
|
@@ -5137,7 +5189,7 @@ var TextAreaContainer = function(param) {
|
|
|
5137
5189
|
required: required,
|
|
5138
5190
|
withDots: false
|
|
5139
5191
|
}),
|
|
5140
|
-
/* @__PURE__ */ (0,
|
|
5192
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("textarea", _object_spread_props(_object_spread({}, props), {
|
|
5141
5193
|
onChange: onChange,
|
|
5142
5194
|
minLength: minLength,
|
|
5143
5195
|
placeholder: placeholder,
|
|
@@ -5152,28 +5204,28 @@ var TextAreaContainer = function(param) {
|
|
|
5152
5204
|
};
|
|
5153
5205
|
var ElementLabel = function(param) {
|
|
5154
5206
|
var labelContent = param.labelContent, labelClassName = param.labelClassName, name = param.name, required = param.required, _param_withDots = param.withDots, withDots = _param_withDots === void 0 ? true : _param_withDots, direction = param.direction;
|
|
5155
|
-
return /* @__PURE__ */ (0,
|
|
5207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", {
|
|
5156
5208
|
style: {
|
|
5157
5209
|
direction: direction
|
|
5158
5210
|
},
|
|
5159
5211
|
className: cn("text-start w-[30%] flex gap-0.5", labelClassName),
|
|
5160
5212
|
htmlFor: name,
|
|
5161
5213
|
children: [
|
|
5162
|
-
/* @__PURE__ */ (0,
|
|
5214
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", {
|
|
5163
5215
|
children: labelContent
|
|
5164
5216
|
}),
|
|
5165
|
-
required && /* @__PURE__ */ (0,
|
|
5217
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", {
|
|
5166
5218
|
className: "text-red-500",
|
|
5167
5219
|
children: "*"
|
|
5168
5220
|
}),
|
|
5169
|
-
withDots && /* @__PURE__ */ (0,
|
|
5221
|
+
withDots && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", {
|
|
5170
5222
|
children: ":"
|
|
5171
5223
|
})
|
|
5172
5224
|
]
|
|
5173
5225
|
});
|
|
5174
5226
|
};
|
|
5175
5227
|
// src/components/forms/ModularForm/ModularForm.tsx
|
|
5176
|
-
var
|
|
5228
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
5177
5229
|
var ModularForm = function(param) {
|
|
5178
5230
|
var _param_submitFunction = param.submitFunction, submitFunction = _param_submitFunction === void 0 ? /*#__PURE__*/ function() {
|
|
5179
5231
|
var _ref = _async_to_generator(function(form) {
|
|
@@ -5250,41 +5302,41 @@ var ModularForm = function(param) {
|
|
|
5250
5302
|
return _ref.apply(this, arguments);
|
|
5251
5303
|
};
|
|
5252
5304
|
}();
|
|
5253
|
-
return /* @__PURE__ */ (0,
|
|
5305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("form", {
|
|
5254
5306
|
onSubmit: onSubmit,
|
|
5255
5307
|
style: {
|
|
5256
5308
|
direction: direction
|
|
5257
5309
|
},
|
|
5258
5310
|
className: cn("w-[350px] px-5 py-5 flex flex-col gap-5", formClassName),
|
|
5259
5311
|
children: [
|
|
5260
|
-
headerContent && /* @__PURE__ */ (0,
|
|
5312
|
+
headerContent && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
|
|
5261
5313
|
className: cn("border-b-2 border-[#547f22] pb-2 text-start font-bold text-[20px]", headerClassName),
|
|
5262
5314
|
children: headerContent
|
|
5263
5315
|
}),
|
|
5264
5316
|
elements.map(function(element, index2) {
|
|
5265
5317
|
switch(element.type){
|
|
5266
5318
|
case "input":
|
|
5267
|
-
return /* @__PURE__ */ (0,
|
|
5319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(InputContainer, _object_spread_props(_object_spread({}, element), {
|
|
5268
5320
|
direction: direction
|
|
5269
5321
|
}), index2);
|
|
5270
5322
|
case "textarea":
|
|
5271
|
-
return /* @__PURE__ */ (0,
|
|
5323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TextAreaContainer, _object_spread_props(_object_spread({}, element), {
|
|
5272
5324
|
direction: direction
|
|
5273
5325
|
}), index2);
|
|
5274
5326
|
case "select":
|
|
5275
|
-
return /* @__PURE__ */ (0,
|
|
5327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectContainer, _object_spread_props(_object_spread({}, element), {
|
|
5276
5328
|
direction: direction
|
|
5277
5329
|
}), index2);
|
|
5278
5330
|
case "multiSelect":
|
|
5279
|
-
return /* @__PURE__ */ (0,
|
|
5331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MultiSelect, _object_spread_props(_object_spread({}, element), {
|
|
5280
5332
|
direction: direction
|
|
5281
5333
|
}), index2);
|
|
5282
5334
|
case "selectWithSearch":
|
|
5283
|
-
return /* @__PURE__ */ (0,
|
|
5335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectWithSearch, _object_spread_props(_object_spread({}, element), {
|
|
5284
5336
|
direction: direction
|
|
5285
5337
|
}), index2);
|
|
5286
5338
|
case "internationalPhoneInput":
|
|
5287
|
-
return /* @__PURE__ */ (0,
|
|
5339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(InternationalPhonePicker, _object_spread_props(_object_spread({}, element), {
|
|
5288
5340
|
direction: direction
|
|
5289
5341
|
}), index2);
|
|
5290
5342
|
case "custom":
|
|
@@ -5296,20 +5348,20 @@ var ModularForm = function(param) {
|
|
|
5296
5348
|
return null;
|
|
5297
5349
|
}
|
|
5298
5350
|
}),
|
|
5299
|
-
/* @__PURE__ */ (0,
|
|
5351
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", {
|
|
5300
5352
|
className: "flex justify-between w-full",
|
|
5301
5353
|
children: [
|
|
5302
|
-
/* @__PURE__ */ (0,
|
|
5354
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", {
|
|
5303
5355
|
title: errorMsg,
|
|
5304
5356
|
className: "text-[#f22] text-[18px] max-w-[80%] ellipsis",
|
|
5305
5357
|
children: errorMsg
|
|
5306
5358
|
}),
|
|
5307
|
-
/* @__PURE__ */ (0,
|
|
5359
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", {
|
|
5308
5360
|
ref: submitRef,
|
|
5309
5361
|
disabled: isLoading,
|
|
5310
5362
|
className: cn("bg-[#547f22] px-3 py-1 rounded-lg text-white min-w-20", buttonClassName),
|
|
5311
5363
|
type: "submit",
|
|
5312
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
5364
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Loader, {
|
|
5313
5365
|
size: 25,
|
|
5314
5366
|
color: "#fff"
|
|
5315
5367
|
}) : buttonContent
|
|
@@ -5323,7 +5375,7 @@ var ModularForm_default = ModularForm;
|
|
|
5323
5375
|
// src/components/forms/index.tsx
|
|
5324
5376
|
var import_react11 = require("react");
|
|
5325
5377
|
var import_moment2 = __toESM(require("moment"));
|
|
5326
|
-
var
|
|
5378
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
5327
5379
|
var ConfirmForm = function(param) {
|
|
5328
5380
|
var onV = param.onV, onX = param.onX, _param_headline = param.headline, headline = _param_headline === void 0 ? "" : _param_headline, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_buttonsContainerClassName = param.buttonsContainerClassName, buttonsContainerClassName = _param_buttonsContainerClassName === void 0 ? "" : _param_buttonsContainerClassName, _param_headlineClassName = param.headlineClassName, headlineClassName = _param_headlineClassName === void 0 ? "" : _param_headlineClassName;
|
|
5329
5381
|
var onConfirm = /*#__PURE__*/ function() {
|
|
@@ -5406,27 +5458,27 @@ var ConfirmForm = function(param) {
|
|
|
5406
5458
|
return _ref.apply(this, arguments);
|
|
5407
5459
|
};
|
|
5408
5460
|
}();
|
|
5409
|
-
return /* @__PURE__ */ (0,
|
|
5461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", {
|
|
5410
5462
|
style: {
|
|
5411
5463
|
direction: direction,
|
|
5412
5464
|
padding: "30px"
|
|
5413
5465
|
},
|
|
5414
5466
|
className: cn("w-full h-full flex flex-col gap-3", containerClassName),
|
|
5415
5467
|
children: [
|
|
5416
|
-
/* @__PURE__ */ (0,
|
|
5468
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", {
|
|
5417
5469
|
className: cn("text-lg font-bold", headlineClassName),
|
|
5418
5470
|
children: headline
|
|
5419
5471
|
}),
|
|
5420
|
-
/* @__PURE__ */ (0,
|
|
5472
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", {
|
|
5421
5473
|
className: cn("flex justify-center items-center gap-2 w-full", buttonsContainerClassName),
|
|
5422
5474
|
children: [
|
|
5423
|
-
/* @__PURE__ */ (0,
|
|
5475
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", {
|
|
5424
5476
|
onClick: onDenied,
|
|
5425
|
-
children: /* @__PURE__ */ (0,
|
|
5477
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RedXSvg, {})
|
|
5426
5478
|
}),
|
|
5427
|
-
/* @__PURE__ */ (0,
|
|
5479
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", {
|
|
5428
5480
|
onClick: onConfirm,
|
|
5429
|
-
children: /* @__PURE__ */ (0,
|
|
5481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(GreenVSvg, {})
|
|
5430
5482
|
})
|
|
5431
5483
|
]
|
|
5432
5484
|
})
|
|
@@ -5471,19 +5523,19 @@ var DatePicker = function(param) {
|
|
|
5471
5523
|
return _ref.apply(this, arguments);
|
|
5472
5524
|
};
|
|
5473
5525
|
}();
|
|
5474
|
-
return /* @__PURE__ */ (0,
|
|
5526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("form", {
|
|
5475
5527
|
style: {
|
|
5476
5528
|
direction: direction
|
|
5477
5529
|
},
|
|
5478
5530
|
onSubmit: onSubmit,
|
|
5479
5531
|
className: cn("w-full h-10 flex justify-start gap-3 items-center ", formClassName),
|
|
5480
5532
|
children: [
|
|
5481
|
-
/* @__PURE__ */ (0,
|
|
5533
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", {
|
|
5482
5534
|
className: cn("center text-[14px] relative gap-2", labelsClassName),
|
|
5483
5535
|
htmlFor: "from",
|
|
5484
5536
|
children: [
|
|
5485
5537
|
fromText,
|
|
5486
|
-
/* @__PURE__ */ (0,
|
|
5538
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", {
|
|
5487
5539
|
className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
|
|
5488
5540
|
type: "date",
|
|
5489
5541
|
name: "from",
|
|
@@ -5491,12 +5543,12 @@ var DatePicker = function(param) {
|
|
|
5491
5543
|
})
|
|
5492
5544
|
]
|
|
5493
5545
|
}),
|
|
5494
|
-
/* @__PURE__ */ (0,
|
|
5546
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", {
|
|
5495
5547
|
className: cn("center text-[14px] relative gap-2 ", labelsClassName),
|
|
5496
5548
|
htmlFor: "to",
|
|
5497
5549
|
children: [
|
|
5498
5550
|
toText,
|
|
5499
|
-
/* @__PURE__ */ (0,
|
|
5551
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", {
|
|
5500
5552
|
className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
|
|
5501
5553
|
type: "date",
|
|
5502
5554
|
name: "to",
|
|
@@ -5504,12 +5556,12 @@ var DatePicker = function(param) {
|
|
|
5504
5556
|
})
|
|
5505
5557
|
]
|
|
5506
5558
|
}),
|
|
5507
|
-
/* @__PURE__ */ (0,
|
|
5559
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", {
|
|
5508
5560
|
disabled: isLoading,
|
|
5509
5561
|
style: buttonStyle,
|
|
5510
5562
|
className: cn("bg-[#699a2c] text-[#fff] font-[500] w-[75px] h-[27px]", buttonClassName),
|
|
5511
5563
|
type: "submit",
|
|
5512
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
5564
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Loader, {
|
|
5513
5565
|
className: "pt-[2px]",
|
|
5514
5566
|
size: 20,
|
|
5515
5567
|
color: "#fff"
|
|
@@ -5521,7 +5573,7 @@ var DatePicker = function(param) {
|
|
|
5521
5573
|
// src/components/CodeInput.tsx
|
|
5522
5574
|
var import_input_otp = require("input-otp");
|
|
5523
5575
|
var import_react12 = require("react");
|
|
5524
|
-
var
|
|
5576
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
5525
5577
|
function CodeInput(param) {
|
|
5526
5578
|
var codeValue = param.codeValue, setCodeValue = param.setCodeValue, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_slotContainerClassName = param.slotContainerClassName, slotContainerClassName = _param_slotContainerClassName === void 0 ? "" : _param_slotContainerClassName;
|
|
5527
5579
|
var firstInputRef = (0, import_react12.useRef)(null);
|
|
@@ -5530,9 +5582,9 @@ function CodeInput(param) {
|
|
|
5530
5582
|
firstInputRef.current.focus();
|
|
5531
5583
|
}
|
|
5532
5584
|
}, []);
|
|
5533
|
-
return /* @__PURE__ */ (0,
|
|
5585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", {
|
|
5534
5586
|
className: cn("space-y-2 flex justify-center items-center", className),
|
|
5535
|
-
children: /* @__PURE__ */ (0,
|
|
5587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_input_otp.OTPInput, {
|
|
5536
5588
|
ref: firstInputRef,
|
|
5537
5589
|
value: codeValue,
|
|
5538
5590
|
onChange: function(newVal) {
|
|
@@ -5542,10 +5594,10 @@ function CodeInput(param) {
|
|
|
5542
5594
|
maxLength: 6,
|
|
5543
5595
|
render: function(param) {
|
|
5544
5596
|
var slots = param.slots;
|
|
5545
|
-
return /* @__PURE__ */ (0,
|
|
5597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", {
|
|
5546
5598
|
className: cn("flex gap-5", slotContainerClassName),
|
|
5547
5599
|
children: slots.map(function(slot, idx) {
|
|
5548
|
-
return /* @__PURE__ */ (0,
|
|
5600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Slot2, _object_spread({}, slot), idx);
|
|
5549
5601
|
})
|
|
5550
5602
|
});
|
|
5551
5603
|
}
|
|
@@ -5553,11 +5605,11 @@ function CodeInput(param) {
|
|
|
5553
5605
|
});
|
|
5554
5606
|
}
|
|
5555
5607
|
function Slot2(props) {
|
|
5556
|
-
return /* @__PURE__ */ (0,
|
|
5608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", {
|
|
5557
5609
|
className: cn("flex size-9 items-center justify-center rounded-lg border border-input bg-background font-medium text-foreground shadow-sm shadow-black/5 transition-shadow", {
|
|
5558
5610
|
"z-10 border border-ring ring-[3px] ring-ring/20": props.isActive
|
|
5559
5611
|
}),
|
|
5560
|
-
children: props.char !== null && /* @__PURE__ */ (0,
|
|
5612
|
+
children: props.char !== null && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", {
|
|
5561
5613
|
children: props.char
|
|
5562
5614
|
})
|
|
5563
5615
|
});
|
|
@@ -5567,6 +5619,7 @@ function Slot2(props) {
|
|
|
5567
5619
|
Badge: Badge,
|
|
5568
5620
|
BooleanUi: BooleanUi,
|
|
5569
5621
|
Button: Button,
|
|
5622
|
+
Checkbox: Checkbox,
|
|
5570
5623
|
CodeInput: CodeInput,
|
|
5571
5624
|
ConfirmForm: ConfirmForm,
|
|
5572
5625
|
DatePicker: DatePicker,
|