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