akeyless-client-commons 1.0.2 → 1.0.3
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 +12 -3
- package/dist/components/index.d.ts +12 -3
- package/dist/components/index.js +332 -279
- package/dist/components/index.mjs +330 -281
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/components/utils/
|
|
1
|
+
// src/components/utils/Checkboxes.tsx
|
|
2
2
|
function _array_like_to_array(arr, len) {
|
|
3
3
|
if (len == null || len > arr.length) len = arr.length;
|
|
4
4
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -358,8 +358,57 @@ function _ts_generator(thisArg, body) {
|
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
362
|
+
var Checkbox = function(param) {
|
|
363
|
+
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;
|
|
364
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
365
|
+
className: "checkbox-wrapper-51",
|
|
366
|
+
children: [
|
|
367
|
+
/* @__PURE__ */ jsx("input", {
|
|
368
|
+
type: "checkbox",
|
|
369
|
+
id: id,
|
|
370
|
+
className: "hidden",
|
|
371
|
+
checked: checked,
|
|
372
|
+
onChange: function() {
|
|
373
|
+
return setChecked(!checked);
|
|
374
|
+
}
|
|
375
|
+
}),
|
|
376
|
+
/* @__PURE__ */ jsxs("label", {
|
|
377
|
+
htmlFor: id,
|
|
378
|
+
className: "relative block w-[42px] h-[24px] cursor-pointer transform-gpu",
|
|
379
|
+
children: [
|
|
380
|
+
/* @__PURE__ */ jsx("div", {
|
|
381
|
+
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]")
|
|
382
|
+
}),
|
|
383
|
+
/* @__PURE__ */ jsx("span", {
|
|
384
|
+
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]" : ""),
|
|
385
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
386
|
+
width: "10px",
|
|
387
|
+
height: "10px",
|
|
388
|
+
viewBox: "0 0 10 10",
|
|
389
|
+
className: "m-[7px] fill-none",
|
|
390
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
391
|
+
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",
|
|
392
|
+
strokeWidth: "2",
|
|
393
|
+
strokeLinecap: "round",
|
|
394
|
+
strokeLinejoin: "round",
|
|
395
|
+
className: "transition-all duration-500 linear",
|
|
396
|
+
stroke: checked ? "#52d66b" : "#c8ccd4",
|
|
397
|
+
style: {
|
|
398
|
+
strokeDasharray: checked ? "25" : "24",
|
|
399
|
+
strokeDashoffset: checked ? "25" : "0"
|
|
400
|
+
}
|
|
401
|
+
})
|
|
402
|
+
})
|
|
403
|
+
})
|
|
404
|
+
]
|
|
405
|
+
})
|
|
406
|
+
]
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
// src/components/utils/ErrorBoundary.tsx
|
|
361
410
|
import React from "react";
|
|
362
|
-
import { jsx } from "react/jsx-runtime";
|
|
411
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
363
412
|
var ErrorBoundary = /*#__PURE__*/ function(_React_Component) {
|
|
364
413
|
"use strict";
|
|
365
414
|
_inherits(ErrorBoundary, _React_Component);
|
|
@@ -391,9 +440,9 @@ var ErrorBoundary = /*#__PURE__*/ function(_React_Component) {
|
|
|
391
440
|
key: "render",
|
|
392
441
|
value: function render() {
|
|
393
442
|
if (this.state.hasError) {
|
|
394
|
-
return this.props.fallback || /* @__PURE__ */
|
|
443
|
+
return this.props.fallback || /* @__PURE__ */ jsx2("div", {
|
|
395
444
|
className: "full center",
|
|
396
|
-
children: /* @__PURE__ */
|
|
445
|
+
children: /* @__PURE__ */ jsx2("h1", {
|
|
397
446
|
children: "\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9...."
|
|
398
447
|
})
|
|
399
448
|
});
|
|
@@ -416,13 +465,13 @@ var ErrorBoundary = /*#__PURE__*/ function(_React_Component) {
|
|
|
416
465
|
}(React.Component);
|
|
417
466
|
// src/components/utils/loaders.tsx
|
|
418
467
|
import { ClipLoader } from "react-spinners";
|
|
419
|
-
import { jsx as
|
|
468
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
420
469
|
var Loader = function(param) {
|
|
421
470
|
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;
|
|
422
|
-
return /* @__PURE__ */
|
|
471
|
+
return /* @__PURE__ */ jsx3("div", {
|
|
423
472
|
className: "flex items-center justify-center ".concat(className),
|
|
424
473
|
style: style,
|
|
425
|
-
children: /* @__PURE__ */
|
|
474
|
+
children: /* @__PURE__ */ jsx3(ClipLoader, {
|
|
426
475
|
loading: true,
|
|
427
476
|
color: color || "#699A2C",
|
|
428
477
|
size: size3 || 18
|
|
@@ -439,10 +488,10 @@ function cn() {
|
|
|
439
488
|
return twMerge(clsx(inputs));
|
|
440
489
|
}
|
|
441
490
|
// src/components/utils/global.tsx
|
|
442
|
-
import { jsxs } from "react/jsx-runtime";
|
|
491
|
+
import { jsxs as jsxs2 } from "react/jsx-runtime";
|
|
443
492
|
var Version = function(param) {
|
|
444
493
|
var version = param.version, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
445
|
-
return /* @__PURE__ */
|
|
494
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
446
495
|
className: cn("absolute text-black z-30 bottom-[0px] text-xs right-0 px-1 ", className),
|
|
447
496
|
children: [
|
|
448
497
|
"v",
|
|
@@ -455,21 +504,21 @@ import ExcelJS from "exceljs";
|
|
|
455
504
|
import { saveAs } from "file-saver";
|
|
456
505
|
import { memo, useMemo as useMemo6 } from "react";
|
|
457
506
|
// src/assets/svg.tsx
|
|
458
|
-
import { jsx as
|
|
507
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
459
508
|
var RedXSvg = function(param) {
|
|
460
509
|
var height = param.height, width = param.width, viewBox = param.viewBox;
|
|
461
|
-
return /* @__PURE__ */
|
|
510
|
+
return /* @__PURE__ */ jsxs3("svg", {
|
|
462
511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
463
512
|
width: width || "32",
|
|
464
513
|
height: height || "32",
|
|
465
514
|
viewBox: viewBox || "0 0 32 32",
|
|
466
515
|
fill: "none",
|
|
467
516
|
children: [
|
|
468
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ jsx4("path", {
|
|
469
518
|
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",
|
|
470
519
|
fill: "#FF4C2B"
|
|
471
520
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ jsx4("path", {
|
|
473
522
|
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",
|
|
474
523
|
fill: "#FF4C2B"
|
|
475
524
|
})
|
|
@@ -478,20 +527,20 @@ var RedXSvg = function(param) {
|
|
|
478
527
|
};
|
|
479
528
|
var RedXSvg2 = function(param) {
|
|
480
529
|
var height = param.height, width = param.width, viewBox = param.viewBox;
|
|
481
|
-
return /* @__PURE__ */
|
|
530
|
+
return /* @__PURE__ */ jsx4("svg", {
|
|
482
531
|
xmlns: "http://www.w3.org/2000/svg",
|
|
483
532
|
width: width || "18px",
|
|
484
533
|
height: height || "18px",
|
|
485
534
|
viewBox: viewBox || "0,0,256,256",
|
|
486
535
|
fillRule: "nonzero",
|
|
487
|
-
children: /* @__PURE__ */
|
|
536
|
+
children: /* @__PURE__ */ jsx4("g", {
|
|
488
537
|
fill: "#e90404",
|
|
489
538
|
fillRule: "nonzero",
|
|
490
539
|
stroke: "none",
|
|
491
540
|
strokeWidth: "1",
|
|
492
|
-
children: /* @__PURE__ */
|
|
541
|
+
children: /* @__PURE__ */ jsx4("g", {
|
|
493
542
|
transform: "scale(10.66667,10.66667)",
|
|
494
|
-
children: /* @__PURE__ */
|
|
543
|
+
children: /* @__PURE__ */ jsx4("path", {
|
|
495
544
|
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"
|
|
496
545
|
})
|
|
497
546
|
})
|
|
@@ -500,18 +549,18 @@ var RedXSvg2 = function(param) {
|
|
|
500
549
|
};
|
|
501
550
|
var GreenVSvg = function(param) {
|
|
502
551
|
var height = param.height, width = param.width, viewBox = param.viewBox;
|
|
503
|
-
return /* @__PURE__ */
|
|
552
|
+
return /* @__PURE__ */ jsxs3("svg", {
|
|
504
553
|
xmlns: "http://www.w3.org/2000/svg",
|
|
505
554
|
width: width || "32",
|
|
506
555
|
height: height || "32",
|
|
507
556
|
viewBox: viewBox || "0 0 32 32",
|
|
508
557
|
fill: "none",
|
|
509
558
|
children: [
|
|
510
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ jsx4("path", {
|
|
511
560
|
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",
|
|
512
561
|
fill: "#3B8F08"
|
|
513
562
|
}),
|
|
514
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ jsx4("path", {
|
|
515
564
|
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",
|
|
516
565
|
fill: "#3B8F08"
|
|
517
566
|
})
|
|
@@ -519,9 +568,9 @@ var GreenVSvg = function(param) {
|
|
|
519
568
|
});
|
|
520
569
|
};
|
|
521
570
|
// src/assets/table.tsx
|
|
522
|
-
import { Fragment, jsx as
|
|
571
|
+
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
523
572
|
var sortSvg = function(upside_down) {
|
|
524
|
-
return /* @__PURE__ */
|
|
573
|
+
return /* @__PURE__ */ jsxs4("svg", {
|
|
525
574
|
style: upside_down ? {
|
|
526
575
|
transform: "rotate(180deg)"
|
|
527
576
|
} : {},
|
|
@@ -534,13 +583,13 @@ var sortSvg = function(upside_down) {
|
|
|
534
583
|
preserveAspectRatio: "xMidYMid meet",
|
|
535
584
|
children: [
|
|
536
585
|
" ",
|
|
537
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ jsxs4("g", {
|
|
538
587
|
transform: "translate(0.000000,1536.000000) scale(0.100000,-0.100000)",
|
|
539
588
|
fill: "#fff",
|
|
540
589
|
stroke: "none",
|
|
541
590
|
children: [
|
|
542
591
|
" ",
|
|
543
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ jsx5("path", {
|
|
544
593
|
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"
|
|
545
594
|
}),
|
|
546
595
|
" "
|
|
@@ -551,8 +600,8 @@ var sortSvg = function(upside_down) {
|
|
|
551
600
|
});
|
|
552
601
|
};
|
|
553
602
|
var emptyFilterSvg = function(solid) {
|
|
554
|
-
return /* @__PURE__ */
|
|
555
|
-
children: solid ? /* @__PURE__ */
|
|
603
|
+
return /* @__PURE__ */ jsx5(Fragment, {
|
|
604
|
+
children: solid ? /* @__PURE__ */ jsxs4("svg", {
|
|
556
605
|
version: "1.0",
|
|
557
606
|
xmlns: "http://www.w3.org/2000/svg",
|
|
558
607
|
width: "13",
|
|
@@ -561,13 +610,13 @@ var emptyFilterSvg = function(solid) {
|
|
|
561
610
|
preserveAspectRatio: "xMidYMid meet",
|
|
562
611
|
children: [
|
|
563
612
|
" ",
|
|
564
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ jsxs4("g", {
|
|
565
614
|
transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
|
|
566
615
|
fill: "#fff",
|
|
567
616
|
stroke: "none",
|
|
568
617
|
children: [
|
|
569
618
|
" ",
|
|
570
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ jsx5("path", {
|
|
571
620
|
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"
|
|
572
621
|
}),
|
|
573
622
|
" "
|
|
@@ -575,7 +624,7 @@ var emptyFilterSvg = function(solid) {
|
|
|
575
624
|
}),
|
|
576
625
|
" "
|
|
577
626
|
]
|
|
578
|
-
}) : /* @__PURE__ */
|
|
627
|
+
}) : /* @__PURE__ */ jsxs4("svg", {
|
|
579
628
|
version: "1.0",
|
|
580
629
|
xmlns: "http://www.w3.org/2000/svg",
|
|
581
630
|
width: "13",
|
|
@@ -584,13 +633,13 @@ var emptyFilterSvg = function(solid) {
|
|
|
584
633
|
preserveAspectRatio: "xMidYMid meet",
|
|
585
634
|
children: [
|
|
586
635
|
" ",
|
|
587
|
-
/* @__PURE__ */
|
|
636
|
+
/* @__PURE__ */ jsxs4("g", {
|
|
588
637
|
transform: "translate(0.000000,300.000000) scale(0.050000,-0.050000)",
|
|
589
638
|
fill: "#fff",
|
|
590
639
|
stroke: "none",
|
|
591
640
|
children: [
|
|
592
641
|
" ",
|
|
593
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ jsx5("path", {
|
|
594
643
|
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"
|
|
595
644
|
}),
|
|
596
645
|
" "
|
|
@@ -602,10 +651,10 @@ var emptyFilterSvg = function(solid) {
|
|
|
602
651
|
});
|
|
603
652
|
};
|
|
604
653
|
var slashFilterSvg = function(solid) {
|
|
605
|
-
return /* @__PURE__ */
|
|
606
|
-
children: solid ? /* @__PURE__ */
|
|
654
|
+
return /* @__PURE__ */ jsx5(Fragment, {
|
|
655
|
+
children: solid ? /* @__PURE__ */ jsx5("div", {
|
|
607
656
|
className: "mt-[-4px] mr-[-2px] ",
|
|
608
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ jsxs4("svg", {
|
|
609
658
|
version: "1.0",
|
|
610
659
|
xmlns: "http://www.w3.org/2000/svg",
|
|
611
660
|
width: "18",
|
|
@@ -614,17 +663,17 @@ var slashFilterSvg = function(solid) {
|
|
|
614
663
|
preserveAspectRatio: "xMidYMid meet",
|
|
615
664
|
children: [
|
|
616
665
|
" ",
|
|
617
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ jsxs4("g", {
|
|
618
667
|
transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
|
|
619
668
|
fill: "#fff",
|
|
620
669
|
stroke: "none",
|
|
621
670
|
children: [
|
|
622
671
|
" ",
|
|
623
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ jsx5("path", {
|
|
624
673
|
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"
|
|
625
674
|
}),
|
|
626
675
|
" ",
|
|
627
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ jsx5("path", {
|
|
628
677
|
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"
|
|
629
678
|
}),
|
|
630
679
|
" "
|
|
@@ -633,9 +682,9 @@ var slashFilterSvg = function(solid) {
|
|
|
633
682
|
" "
|
|
634
683
|
]
|
|
635
684
|
})
|
|
636
|
-
}) : /* @__PURE__ */
|
|
685
|
+
}) : /* @__PURE__ */ jsx5("div", {
|
|
637
686
|
className: "mt-[-4px] mr-[-2px] ",
|
|
638
|
-
children: /* @__PURE__ */
|
|
687
|
+
children: /* @__PURE__ */ jsxs4("svg", {
|
|
639
688
|
version: "1.0",
|
|
640
689
|
xmlns: "http://www.w3.org/2000/svg",
|
|
641
690
|
width: "18",
|
|
@@ -644,17 +693,17 @@ var slashFilterSvg = function(solid) {
|
|
|
644
693
|
preserveAspectRatio: "xMidYMid meet",
|
|
645
694
|
children: [
|
|
646
695
|
" ",
|
|
647
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ jsxs4("g", {
|
|
648
697
|
transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
|
|
649
698
|
fill: "#fff",
|
|
650
699
|
stroke: "none",
|
|
651
700
|
children: [
|
|
652
701
|
" ",
|
|
653
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ jsx5("path", {
|
|
654
703
|
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"
|
|
655
704
|
}),
|
|
656
705
|
" ",
|
|
657
|
-
/* @__PURE__ */
|
|
706
|
+
/* @__PURE__ */ jsx5("path", {
|
|
658
707
|
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"
|
|
659
708
|
}),
|
|
660
709
|
" "
|
|
@@ -667,7 +716,7 @@ var slashFilterSvg = function(solid) {
|
|
|
667
716
|
});
|
|
668
717
|
};
|
|
669
718
|
var exportToExcelSvg = function(width, height, viewBox) {
|
|
670
|
-
return /* @__PURE__ */
|
|
719
|
+
return /* @__PURE__ */ jsxs4("svg", {
|
|
671
720
|
version: "1.0",
|
|
672
721
|
xmlns: "http://www.w3.org/2000/svg",
|
|
673
722
|
width: width || "18",
|
|
@@ -676,21 +725,21 @@ var exportToExcelSvg = function(width, height, viewBox) {
|
|
|
676
725
|
preserveAspectRatio: "xMidYMid meet",
|
|
677
726
|
children: [
|
|
678
727
|
" ",
|
|
679
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ jsxs4("g", {
|
|
680
729
|
transform: "translate(0.000000,150.000000) scale(0.100000,-0.100000)",
|
|
681
730
|
fill: "#ffffff",
|
|
682
731
|
stroke: "none",
|
|
683
732
|
children: [
|
|
684
733
|
" ",
|
|
685
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ jsx5("path", {
|
|
686
735
|
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"
|
|
687
736
|
}),
|
|
688
737
|
" ",
|
|
689
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ jsx5("path", {
|
|
690
739
|
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"
|
|
691
740
|
}),
|
|
692
741
|
" ",
|
|
693
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ jsx5("path", {
|
|
694
743
|
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"
|
|
695
744
|
}),
|
|
696
745
|
" "
|
|
@@ -789,7 +838,7 @@ var getFormElementValue = function(form, name) {
|
|
|
789
838
|
return ((_form_elements_namedItem = form.elements.namedItem(name)) === null || _form_elements_namedItem === void 0 ? void 0 : _form_elements_namedItem.value) || "";
|
|
790
839
|
};
|
|
791
840
|
// src/components/table/Table.tsx
|
|
792
|
-
import { jsx as
|
|
841
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
793
842
|
var TableContext = createContext(null);
|
|
794
843
|
var TableProvider = function(props) {
|
|
795
844
|
var // basic props
|
|
@@ -886,9 +935,9 @@ var TableProvider = function(props) {
|
|
|
886
935
|
handleFilterClick: handleFilterClick,
|
|
887
936
|
closeFilterWindow: closeFilterWindow
|
|
888
937
|
});
|
|
889
|
-
return /* @__PURE__ */
|
|
938
|
+
return /* @__PURE__ */ jsx6(TableContext.Provider, {
|
|
890
939
|
value: providerValues,
|
|
891
|
-
children: /* @__PURE__ */
|
|
940
|
+
children: /* @__PURE__ */ jsx6("div", {
|
|
892
941
|
className: "flex flex-col gap-2 ".concat(containerClassName),
|
|
893
942
|
style: _object_spread_props(_object_spread({}, containerStyle), {
|
|
894
943
|
direction: direction
|
|
@@ -899,40 +948,40 @@ var TableProvider = function(props) {
|
|
|
899
948
|
};
|
|
900
949
|
var TableBase = function(props) {
|
|
901
950
|
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;
|
|
902
|
-
return /* @__PURE__ */
|
|
951
|
+
return /* @__PURE__ */ jsxs5(TableProvider, _object_spread_props(_object_spread({}, props), {
|
|
903
952
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
905
954
|
style: {
|
|
906
955
|
direction: direction
|
|
907
956
|
},
|
|
908
957
|
className: cn("flex justify-start items-center gap-2", containerHeaderClassName || ""),
|
|
909
958
|
children: [
|
|
910
|
-
/* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
911
960
|
className: cn("flex justify-start items-center gap-2", searchContainerClassName),
|
|
912
961
|
children: [
|
|
913
|
-
includeSearch && /* @__PURE__ */
|
|
914
|
-
exportToExcelKeys && /* @__PURE__ */
|
|
962
|
+
includeSearch && /* @__PURE__ */ jsx6(Search, {}),
|
|
963
|
+
exportToExcelKeys && /* @__PURE__ */ jsx6(ExportToExcel, {})
|
|
915
964
|
]
|
|
916
965
|
}),
|
|
917
|
-
maxRowsLabel1 && maxRowsLabel2 && /* @__PURE__ */
|
|
966
|
+
maxRowsLabel1 && maxRowsLabel2 && /* @__PURE__ */ jsx6(MaxRowsLabel, {}),
|
|
918
967
|
optionalElement && optionalElement
|
|
919
968
|
]
|
|
920
969
|
}),
|
|
921
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ jsx6("div", {
|
|
922
971
|
style: _object_spread_props(_object_spread({}, tableContainerStyle || {}), {
|
|
923
972
|
direction: direction
|
|
924
973
|
}),
|
|
925
974
|
className: cn("animate-slide-in-up overflow-y-auto", tableContainerClass || ""),
|
|
926
|
-
children: /* @__PURE__ */
|
|
975
|
+
children: /* @__PURE__ */ jsxs5("table", {
|
|
927
976
|
style: tableStyle,
|
|
928
977
|
className: "min-w-full text-sm font-light relative",
|
|
929
978
|
children: [
|
|
930
|
-
/* @__PURE__ */
|
|
931
|
-
/* @__PURE__ */
|
|
979
|
+
/* @__PURE__ */ jsx6(TableHead, {}),
|
|
980
|
+
/* @__PURE__ */ jsx6(TableBody, {})
|
|
932
981
|
]
|
|
933
982
|
})
|
|
934
983
|
}),
|
|
935
|
-
sumColumns && /* @__PURE__ */
|
|
984
|
+
sumColumns && /* @__PURE__ */ jsx6(Summary, {})
|
|
936
985
|
]
|
|
937
986
|
}));
|
|
938
987
|
};
|
|
@@ -1160,7 +1209,7 @@ var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
|
|
|
1160
1209
|
var callCenterDomain = isLocal ? "http://localhost:9003/api/call-center" : baseDomain + "/call-center";
|
|
1161
1210
|
// src/components/ui/badge.tsx
|
|
1162
1211
|
import { cva } from "class-variance-authority";
|
|
1163
|
-
import { jsx as
|
|
1212
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1164
1213
|
var badgeVariants = 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", {
|
|
1165
1214
|
variants: {
|
|
1166
1215
|
variant: {
|
|
@@ -1179,7 +1228,7 @@ function Badge(_param) {
|
|
|
1179
1228
|
"className",
|
|
1180
1229
|
"variant"
|
|
1181
1230
|
]);
|
|
1182
|
-
return /* @__PURE__ */
|
|
1231
|
+
return /* @__PURE__ */ jsx7("div", _object_spread({
|
|
1183
1232
|
className: cn(badgeVariants({
|
|
1184
1233
|
variant: variant
|
|
1185
1234
|
}), className)
|
|
@@ -1189,7 +1238,7 @@ function Badge(_param) {
|
|
|
1189
1238
|
import { Slot } from "@radix-ui/react-slot";
|
|
1190
1239
|
import { cva as cva2 } from "class-variance-authority";
|
|
1191
1240
|
import * as React3 from "react";
|
|
1192
|
-
import { jsx as
|
|
1241
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1193
1242
|
var buttonVariants = cva2("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]", {
|
|
1194
1243
|
variants: {
|
|
1195
1244
|
variant: {
|
|
@@ -1220,7 +1269,7 @@ var Button = React3.forwardRef(function(_param, ref) {
|
|
|
1220
1269
|
"asChild"
|
|
1221
1270
|
]);
|
|
1222
1271
|
var Comp = asChild ? Slot : "button";
|
|
1223
|
-
return /* @__PURE__ */
|
|
1272
|
+
return /* @__PURE__ */ jsx8(Comp, _object_spread({
|
|
1224
1273
|
ref: ref,
|
|
1225
1274
|
"data-slot": "button",
|
|
1226
1275
|
className: cn(buttonVariants({
|
|
@@ -1233,13 +1282,13 @@ var Button = React3.forwardRef(function(_param, ref) {
|
|
|
1233
1282
|
Button.displayName = "Button";
|
|
1234
1283
|
// src/components/ui/input.tsx
|
|
1235
1284
|
import * as React4 from "react";
|
|
1236
|
-
import { jsx as
|
|
1285
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1237
1286
|
var Input = React4.forwardRef(function(_param, ref) {
|
|
1238
1287
|
var className = _param.className, type = _param.type, props = _object_without_properties(_param, [
|
|
1239
1288
|
"className",
|
|
1240
1289
|
"type"
|
|
1241
1290
|
]);
|
|
1242
|
-
return /* @__PURE__ */
|
|
1291
|
+
return /* @__PURE__ */ jsx9("input", _object_spread({
|
|
1243
1292
|
type: type,
|
|
1244
1293
|
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),
|
|
1245
1294
|
ref: ref
|
|
@@ -1249,7 +1298,7 @@ Input.displayName = "Input";
|
|
|
1249
1298
|
// src/components/ui/progress.tsx
|
|
1250
1299
|
import * as React5 from "react";
|
|
1251
1300
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
1252
|
-
import { jsx as
|
|
1301
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1253
1302
|
var ProgressComponent = React5.forwardRef(function(_param, ref) {
|
|
1254
1303
|
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, [
|
|
1255
1304
|
"className",
|
|
@@ -1259,18 +1308,18 @@ var ProgressComponent = React5.forwardRef(function(_param, ref) {
|
|
|
1259
1308
|
"showValueClassName",
|
|
1260
1309
|
"showValue"
|
|
1261
1310
|
]);
|
|
1262
|
-
return /* @__PURE__ */
|
|
1311
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
1263
1312
|
className: cn("relative w-full", containerClassName),
|
|
1264
|
-
children: /* @__PURE__ */
|
|
1313
|
+
children: /* @__PURE__ */ jsx10(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
1265
1314
|
ref: ref,
|
|
1266
1315
|
className: cn("w-full h-5 bg-[#e5e7eb] relative overflow-hidden rounded-full", className)
|
|
1267
1316
|
}, props), {
|
|
1268
|
-
children: /* @__PURE__ */
|
|
1317
|
+
children: /* @__PURE__ */ jsx10(ProgressPrimitive.Indicator, {
|
|
1269
1318
|
className: cn("h-full w-full flex-1 bg-[green] transition-all rounded-full", indicatorClassName),
|
|
1270
1319
|
style: {
|
|
1271
1320
|
transform: "translateX(-".concat(100 - (value || 0), "%)")
|
|
1272
1321
|
},
|
|
1273
|
-
children: showValue && /* @__PURE__ */
|
|
1322
|
+
children: showValue && /* @__PURE__ */ jsx10("div", {
|
|
1274
1323
|
className: cn("absolute right-1 top-[-2px] font-medium text-white", showValueClassName),
|
|
1275
1324
|
children: "".concat(value || 0, "%")
|
|
1276
1325
|
})
|
|
@@ -1293,13 +1342,13 @@ import * as React7 from "react";
|
|
|
1293
1342
|
import * as React6 from "react";
|
|
1294
1343
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
1295
1344
|
import { X } from "lucide-react";
|
|
1296
|
-
import { jsx as
|
|
1345
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1297
1346
|
var DialogPortal = DialogPrimitive.Portal;
|
|
1298
1347
|
var DialogOverlay = React6.forwardRef(function(_param, ref) {
|
|
1299
1348
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1300
1349
|
"className"
|
|
1301
1350
|
]);
|
|
1302
|
-
return /* @__PURE__ */
|
|
1351
|
+
return /* @__PURE__ */ jsx11(DialogPrimitive.Overlay, _object_spread({
|
|
1303
1352
|
ref: ref,
|
|
1304
1353
|
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)
|
|
1305
1354
|
}, props));
|
|
@@ -1310,22 +1359,22 @@ var DialogContent = React6.forwardRef(function(_param, ref) {
|
|
|
1310
1359
|
"className",
|
|
1311
1360
|
"children"
|
|
1312
1361
|
]);
|
|
1313
|
-
return /* @__PURE__ */
|
|
1362
|
+
return /* @__PURE__ */ jsxs6(DialogPortal, {
|
|
1314
1363
|
children: [
|
|
1315
|
-
/* @__PURE__ */
|
|
1316
|
-
/* @__PURE__ */
|
|
1364
|
+
/* @__PURE__ */ jsx11(DialogOverlay, {}),
|
|
1365
|
+
/* @__PURE__ */ jsxs6(DialogPrimitive.Content, _object_spread_props(_object_spread({
|
|
1317
1366
|
ref: ref,
|
|
1318
1367
|
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)
|
|
1319
1368
|
}, props), {
|
|
1320
1369
|
children: [
|
|
1321
1370
|
children,
|
|
1322
|
-
/* @__PURE__ */
|
|
1371
|
+
/* @__PURE__ */ jsxs6(DialogPrimitive.Close, {
|
|
1323
1372
|
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",
|
|
1324
1373
|
children: [
|
|
1325
|
-
/* @__PURE__ */
|
|
1374
|
+
/* @__PURE__ */ jsx11(X, {
|
|
1326
1375
|
className: "h-4 w-4"
|
|
1327
1376
|
}),
|
|
1328
|
-
/* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ jsx11("span", {
|
|
1329
1378
|
className: "sr-only",
|
|
1330
1379
|
children: "Close"
|
|
1331
1380
|
})
|
|
@@ -1341,7 +1390,7 @@ var DialogHeader = function(_param) {
|
|
|
1341
1390
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1342
1391
|
"className"
|
|
1343
1392
|
]);
|
|
1344
|
-
return /* @__PURE__ */
|
|
1393
|
+
return /* @__PURE__ */ jsx11("div", _object_spread({
|
|
1345
1394
|
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className)
|
|
1346
1395
|
}, props));
|
|
1347
1396
|
};
|
|
@@ -1350,7 +1399,7 @@ var DialogFooter = function(_param) {
|
|
|
1350
1399
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1351
1400
|
"className"
|
|
1352
1401
|
]);
|
|
1353
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ jsx11("div", _object_spread({
|
|
1354
1403
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
1355
1404
|
}, props));
|
|
1356
1405
|
};
|
|
@@ -1359,7 +1408,7 @@ var DialogTitle = React6.forwardRef(function(_param, ref) {
|
|
|
1359
1408
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1360
1409
|
"className"
|
|
1361
1410
|
]);
|
|
1362
|
-
return /* @__PURE__ */
|
|
1411
|
+
return /* @__PURE__ */ jsx11(DialogPrimitive.Title, _object_spread({
|
|
1363
1412
|
ref: ref,
|
|
1364
1413
|
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
1365
1414
|
}, props));
|
|
@@ -1369,19 +1418,19 @@ var DialogDescription = React6.forwardRef(function(_param, ref) {
|
|
|
1369
1418
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1370
1419
|
"className"
|
|
1371
1420
|
]);
|
|
1372
|
-
return /* @__PURE__ */
|
|
1421
|
+
return /* @__PURE__ */ jsx11(DialogPrimitive.Description, _object_spread({
|
|
1373
1422
|
ref: ref,
|
|
1374
1423
|
className: cn("text-sm text-muted-foreground", className)
|
|
1375
1424
|
}, props));
|
|
1376
1425
|
});
|
|
1377
1426
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1378
1427
|
// src/components/ui/command.tsx
|
|
1379
|
-
import { jsx as
|
|
1428
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1380
1429
|
var Command = React7.forwardRef(function(_param, ref) {
|
|
1381
1430
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1382
1431
|
"className"
|
|
1383
1432
|
]);
|
|
1384
|
-
return /* @__PURE__ */
|
|
1433
|
+
return /* @__PURE__ */ jsx12(CommandPrimitive, _object_spread({
|
|
1385
1434
|
ref: ref,
|
|
1386
1435
|
className: cn("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground", className)
|
|
1387
1436
|
}, props));
|
|
@@ -1392,16 +1441,16 @@ var CommandInput = React7.forwardRef(function(_param, ref) {
|
|
|
1392
1441
|
"className",
|
|
1393
1442
|
"withSearchIcon"
|
|
1394
1443
|
]);
|
|
1395
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ jsxs7("div", {
|
|
1396
1445
|
className: "flex items-center border-b border-input px-3",
|
|
1397
1446
|
"cmdk-input-wrapper": "",
|
|
1398
1447
|
children: [
|
|
1399
|
-
withSearchIcon && /* @__PURE__ */
|
|
1448
|
+
withSearchIcon && /* @__PURE__ */ jsx12(Search2, {
|
|
1400
1449
|
size: 20,
|
|
1401
1450
|
strokeWidth: 2,
|
|
1402
1451
|
className: "me-3 text-muted-foreground/80"
|
|
1403
1452
|
}),
|
|
1404
|
-
/* @__PURE__ */
|
|
1453
|
+
/* @__PURE__ */ jsx12(CommandPrimitive.Input, _object_spread({
|
|
1405
1454
|
ref: ref,
|
|
1406
1455
|
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)
|
|
1407
1456
|
}, props))
|
|
@@ -1413,14 +1462,14 @@ var CommandList = React7.forwardRef(function(_param, ref) {
|
|
|
1413
1462
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1414
1463
|
"className"
|
|
1415
1464
|
]);
|
|
1416
|
-
return /* @__PURE__ */
|
|
1465
|
+
return /* @__PURE__ */ jsx12(CommandPrimitive.List, _object_spread({
|
|
1417
1466
|
ref: ref,
|
|
1418
1467
|
className: cn("max-h-80 overflow-y-auto overflow-x-hidden", className)
|
|
1419
1468
|
}, props));
|
|
1420
1469
|
});
|
|
1421
1470
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
1422
1471
|
var CommandEmpty = React7.forwardRef(function(props, ref) {
|
|
1423
|
-
return /* @__PURE__ */
|
|
1472
|
+
return /* @__PURE__ */ jsx12(CommandPrimitive.Empty, _object_spread({
|
|
1424
1473
|
ref: ref,
|
|
1425
1474
|
className: "py-6 text-center text-sm"
|
|
1426
1475
|
}, props));
|
|
@@ -1430,7 +1479,7 @@ var CommandGroup = React7.forwardRef(function(_param, ref) {
|
|
|
1430
1479
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1431
1480
|
"className"
|
|
1432
1481
|
]);
|
|
1433
|
-
return /* @__PURE__ */
|
|
1482
|
+
return /* @__PURE__ */ jsx12(CommandPrimitive.Group, _object_spread({
|
|
1434
1483
|
ref: ref,
|
|
1435
1484
|
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)
|
|
1436
1485
|
}, props));
|
|
@@ -1440,7 +1489,7 @@ var CommandSeparator = React7.forwardRef(function(_param, ref) {
|
|
|
1440
1489
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1441
1490
|
"className"
|
|
1442
1491
|
]);
|
|
1443
|
-
return /* @__PURE__ */
|
|
1492
|
+
return /* @__PURE__ */ jsx12(CommandPrimitive.Separator, _object_spread({
|
|
1444
1493
|
ref: ref,
|
|
1445
1494
|
className: cn("-mx-1 h-px bg-border", className)
|
|
1446
1495
|
}, props));
|
|
@@ -1450,7 +1499,7 @@ var CommandItem = React7.forwardRef(function(_param, ref) {
|
|
|
1450
1499
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1451
1500
|
"className"
|
|
1452
1501
|
]);
|
|
1453
|
-
return /* @__PURE__ */
|
|
1502
|
+
return /* @__PURE__ */ jsx12(CommandPrimitive.Item, _object_spread({
|
|
1454
1503
|
ref: ref,
|
|
1455
1504
|
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)
|
|
1456
1505
|
}, props));
|
|
@@ -1460,7 +1509,7 @@ var CommandShortcut = function(_param) {
|
|
|
1460
1509
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1461
1510
|
"className"
|
|
1462
1511
|
]);
|
|
1463
|
-
return /* @__PURE__ */
|
|
1512
|
+
return /* @__PURE__ */ jsx12("kbd", _object_spread({
|
|
1464
1513
|
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)
|
|
1465
1514
|
}, props));
|
|
1466
1515
|
};
|
|
@@ -3298,7 +3347,7 @@ var flip3 = function(options, deps) {
|
|
|
3298
3347
|
});
|
|
3299
3348
|
};
|
|
3300
3349
|
// src/components/ui/multiselect.tsx
|
|
3301
|
-
import { Fragment as Fragment2, jsx as
|
|
3350
|
+
import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3302
3351
|
var Portal2 = function(param) {
|
|
3303
3352
|
var children = param.children;
|
|
3304
3353
|
return ReactDOM2.createPortal(children, document.body);
|
|
@@ -3383,7 +3432,7 @@ var CommandEmpty2 = forwardRef6(function(_param, forwardedRef) {
|
|
|
3383
3432
|
return state.filtered.count === 0;
|
|
3384
3433
|
});
|
|
3385
3434
|
if (!render) return null;
|
|
3386
|
-
return /* @__PURE__ */
|
|
3435
|
+
return /* @__PURE__ */ jsx13("div", _object_spread({
|
|
3387
3436
|
ref: forwardedRef,
|
|
3388
3437
|
className: cn("px-2 py-4 text-center text-sm", className),
|
|
3389
3438
|
"cmdk-empty": "",
|
|
@@ -3662,7 +3711,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3662
3711
|
})) {
|
|
3663
3712
|
return void 0;
|
|
3664
3713
|
}
|
|
3665
|
-
var Item = /* @__PURE__ */
|
|
3714
|
+
var Item = /* @__PURE__ */ jsx13(CommandItem, {
|
|
3666
3715
|
value: inputValue,
|
|
3667
3716
|
className: "cursor-pointer",
|
|
3668
3717
|
onMouseDown: function(e) {
|
|
@@ -3697,14 +3746,14 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3697
3746
|
var EmptyItem = useCallback2(function() {
|
|
3698
3747
|
if (!emptyIndicator) return void 0;
|
|
3699
3748
|
if (onSearch && !creatable && Object.keys(options).length === 0) {
|
|
3700
|
-
return /* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ jsx13(CommandItem, {
|
|
3701
3750
|
className: "",
|
|
3702
3751
|
value: "-",
|
|
3703
3752
|
disabled: true,
|
|
3704
3753
|
children: emptyIndicator
|
|
3705
3754
|
});
|
|
3706
3755
|
}
|
|
3707
|
-
return /* @__PURE__ */
|
|
3756
|
+
return /* @__PURE__ */ jsx13(CommandEmpty2, {
|
|
3708
3757
|
className: emptyIndicatorClassName,
|
|
3709
3758
|
children: emptyIndicator
|
|
3710
3759
|
});
|
|
@@ -3735,7 +3784,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3735
3784
|
creatable,
|
|
3736
3785
|
commandProps === null || commandProps === void 0 ? void 0 : commandProps.filter
|
|
3737
3786
|
]);
|
|
3738
|
-
return /* @__PURE__ */
|
|
3787
|
+
return /* @__PURE__ */ jsxs8(Command, _object_spread_props(_object_spread({}, commandProps), {
|
|
3739
3788
|
onKeyDown: function(e) {
|
|
3740
3789
|
var _commandProps_onKeyDown;
|
|
3741
3790
|
handleKeyDown(e);
|
|
@@ -3745,7 +3794,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3745
3794
|
shouldFilter: (commandProps === null || commandProps === void 0 ? void 0 : commandProps.shouldFilter) !== void 0 ? commandProps.shouldFilter : !onSearch,
|
|
3746
3795
|
filter: commandFilter(),
|
|
3747
3796
|
children: [
|
|
3748
|
-
/* @__PURE__ */
|
|
3797
|
+
/* @__PURE__ */ jsx13("div", {
|
|
3749
3798
|
ref: setContainerRef,
|
|
3750
3799
|
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", {
|
|
3751
3800
|
"p-1": selected.length !== 0,
|
|
@@ -3756,11 +3805,11 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3756
3805
|
if (disabled) return;
|
|
3757
3806
|
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
3758
3807
|
},
|
|
3759
|
-
children: /* @__PURE__ */
|
|
3808
|
+
children: /* @__PURE__ */ jsxs8("div", {
|
|
3760
3809
|
className: "flex flex-wrap gap-1",
|
|
3761
3810
|
children: [
|
|
3762
3811
|
selected.map(function(option) {
|
|
3763
|
-
return /* @__PURE__ */
|
|
3812
|
+
return /* @__PURE__ */ jsxs8("div", {
|
|
3764
3813
|
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),
|
|
3765
3814
|
"data-fixed": option.fixed,
|
|
3766
3815
|
"data-disabled": disabled || void 0,
|
|
@@ -3768,7 +3817,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3768
3817
|
option.label,
|
|
3769
3818
|
!unremovableOptions.find(function(v) {
|
|
3770
3819
|
return isEqual4(v.value, option.value);
|
|
3771
|
-
}) && /* @__PURE__ */
|
|
3820
|
+
}) && /* @__PURE__ */ jsx13("button", {
|
|
3772
3821
|
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",
|
|
3773
3822
|
onKeyDown: function(e) {
|
|
3774
3823
|
if (e.key === "Enter") {
|
|
@@ -3783,7 +3832,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3783
3832
|
return handleUnselect(option);
|
|
3784
3833
|
},
|
|
3785
3834
|
"aria-label": "Remove",
|
|
3786
|
-
children: /* @__PURE__ */
|
|
3835
|
+
children: /* @__PURE__ */ jsx13(X2, {
|
|
3787
3836
|
size: 14,
|
|
3788
3837
|
strokeWidth: 2,
|
|
3789
3838
|
"aria-hidden": "true"
|
|
@@ -3792,7 +3841,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3792
3841
|
]
|
|
3793
3842
|
}, option.value);
|
|
3794
3843
|
}),
|
|
3795
|
-
/* @__PURE__ */
|
|
3844
|
+
/* @__PURE__ */ jsx13(CommandPrimitive2.Input, _object_spread_props(_object_spread({}, inputProps), {
|
|
3796
3845
|
ref: inputRef,
|
|
3797
3846
|
value: inputValue,
|
|
3798
3847
|
disabled: disabled,
|
|
@@ -3823,7 +3872,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3823
3872
|
"ml-1": selected.length !== 0
|
|
3824
3873
|
}, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className)
|
|
3825
3874
|
})),
|
|
3826
|
-
/* @__PURE__ */
|
|
3875
|
+
/* @__PURE__ */ jsx13("button", {
|
|
3827
3876
|
type: "button",
|
|
3828
3877
|
onClick: function() {
|
|
3829
3878
|
setSelected(selected.filter(function(s) {
|
|
@@ -3837,7 +3886,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3837
3886
|
return s.fixed;
|
|
3838
3887
|
}).length === selected.length) && "hidden"),
|
|
3839
3888
|
"aria-label": "Clear all",
|
|
3840
|
-
children: /* @__PURE__ */
|
|
3889
|
+
children: /* @__PURE__ */ jsx13(X2, {
|
|
3841
3890
|
size: 16,
|
|
3842
3891
|
strokeWidth: 2,
|
|
3843
3892
|
"aria-hidden": "true"
|
|
@@ -3846,8 +3895,8 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3846
3895
|
]
|
|
3847
3896
|
})
|
|
3848
3897
|
}),
|
|
3849
|
-
open && /* @__PURE__ */
|
|
3850
|
-
children: /* @__PURE__ */
|
|
3898
|
+
open && /* @__PURE__ */ jsx13(Portal2, {
|
|
3899
|
+
children: /* @__PURE__ */ jsx13("div", {
|
|
3851
3900
|
ref: combinedFloatingRef,
|
|
3852
3901
|
style: {
|
|
3853
3902
|
position: strategy,
|
|
@@ -3857,7 +3906,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3857
3906
|
},
|
|
3858
3907
|
className: cn("z-[9999] overflow-hidden rounded-lg border border-input", dropdownContainerClassName),
|
|
3859
3908
|
"data-state": open ? "open" : "closed",
|
|
3860
|
-
children: /* @__PURE__ */
|
|
3909
|
+
children: /* @__PURE__ */ jsx13(CommandList, {
|
|
3861
3910
|
className: "bg-popover text-popover-foreground shadow-lg shadow-black/5 outline-none",
|
|
3862
3911
|
onMouseLeave: function() {
|
|
3863
3912
|
setOnScrollbar(false);
|
|
@@ -3869,23 +3918,23 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3869
3918
|
var _inputRef_current;
|
|
3870
3919
|
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
3871
3920
|
},
|
|
3872
|
-
children: isLoading ? /* @__PURE__ */
|
|
3921
|
+
children: isLoading ? /* @__PURE__ */ jsx13(Fragment2, {
|
|
3873
3922
|
children: loadingIndicator
|
|
3874
|
-
}) : /* @__PURE__ */
|
|
3923
|
+
}) : /* @__PURE__ */ jsxs8(Fragment2, {
|
|
3875
3924
|
children: [
|
|
3876
3925
|
EmptyItem(),
|
|
3877
3926
|
CreatableItem(),
|
|
3878
|
-
!selectFirstItem && /* @__PURE__ */
|
|
3927
|
+
!selectFirstItem && /* @__PURE__ */ jsx13(CommandItem, {
|
|
3879
3928
|
value: "-",
|
|
3880
3929
|
className: "hidden"
|
|
3881
3930
|
}),
|
|
3882
3931
|
Object.entries(selectables).map(function(param) {
|
|
3883
3932
|
var _param = _sliced_to_array(param, 2), key = _param[0], dropdowns = _param[1];
|
|
3884
|
-
return /* @__PURE__ */
|
|
3933
|
+
return /* @__PURE__ */ jsx13(CommandGroup, {
|
|
3885
3934
|
heading: key,
|
|
3886
3935
|
className: cn("h-full overflow-auto", dropdownClassName),
|
|
3887
3936
|
children: dropdowns.map(function(option) {
|
|
3888
|
-
return /* @__PURE__ */
|
|
3937
|
+
return /* @__PURE__ */ jsx13(CommandItem, {
|
|
3889
3938
|
value: option.value,
|
|
3890
3939
|
disabled: option.disable,
|
|
3891
3940
|
onMouseDown: function(e) {
|
|
@@ -3916,7 +3965,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
3916
3965
|
})
|
|
3917
3966
|
})
|
|
3918
3967
|
}),
|
|
3919
|
-
/* @__PURE__ */
|
|
3968
|
+
/* @__PURE__ */ jsx13("input", {
|
|
3920
3969
|
value: JSON.stringify(selected),
|
|
3921
3970
|
type: "hidden",
|
|
3922
3971
|
name: name
|
|
@@ -3928,16 +3977,16 @@ MultipleSelector.displayName = "MultipleSelector";
|
|
|
3928
3977
|
var multiselect_default = MultipleSelector;
|
|
3929
3978
|
// src/components/ui/popover.tsx
|
|
3930
3979
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3931
|
-
import { jsx as
|
|
3980
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3932
3981
|
function Popover(_param) {
|
|
3933
3982
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
3934
|
-
return /* @__PURE__ */
|
|
3983
|
+
return /* @__PURE__ */ jsx14(PopoverPrimitive.Root, _object_spread({
|
|
3935
3984
|
"data-slot": "popover"
|
|
3936
3985
|
}, props));
|
|
3937
3986
|
}
|
|
3938
3987
|
function PopoverTrigger(_param) {
|
|
3939
3988
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
3940
|
-
return /* @__PURE__ */
|
|
3989
|
+
return /* @__PURE__ */ jsx14(PopoverPrimitive.Trigger, _object_spread({
|
|
3941
3990
|
"data-slot": "popover-trigger"
|
|
3942
3991
|
}, props));
|
|
3943
3992
|
}
|
|
@@ -3948,8 +3997,8 @@ function PopoverContent(_param) {
|
|
|
3948
3997
|
"sideOffset",
|
|
3949
3998
|
"showArrow"
|
|
3950
3999
|
]);
|
|
3951
|
-
return /* @__PURE__ */
|
|
3952
|
-
children: /* @__PURE__ */
|
|
4000
|
+
return /* @__PURE__ */ jsx14(PopoverPrimitive.Portal, {
|
|
4001
|
+
children: /* @__PURE__ */ jsxs9(PopoverPrimitive.Content, _object_spread_props(_object_spread({
|
|
3953
4002
|
"data-slot": "popover-content",
|
|
3954
4003
|
align: align,
|
|
3955
4004
|
sideOffset: sideOffset,
|
|
@@ -3957,7 +4006,7 @@ function PopoverContent(_param) {
|
|
|
3957
4006
|
}, props), {
|
|
3958
4007
|
children: [
|
|
3959
4008
|
props.children,
|
|
3960
|
-
showArrow && /* @__PURE__ */
|
|
4009
|
+
showArrow && /* @__PURE__ */ jsx14(PopoverPrimitive.Arrow, {
|
|
3961
4010
|
className: "fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]"
|
|
3962
4011
|
})
|
|
3963
4012
|
]
|
|
@@ -3967,7 +4016,7 @@ function PopoverContent(_param) {
|
|
|
3967
4016
|
// src/components/ui/SearchSelect.tsx
|
|
3968
4017
|
import { CheckIcon, ChevronDownIcon } from "lucide-react";
|
|
3969
4018
|
import { useId, useMemo as useMemo5, useState as useState5 } from "react";
|
|
3970
|
-
import { jsx as
|
|
4019
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3971
4020
|
function SearchSelect(param) {
|
|
3972
4021
|
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;
|
|
3973
4022
|
var id = useId();
|
|
@@ -3984,19 +4033,19 @@ function SearchSelect(param) {
|
|
|
3984
4033
|
options,
|
|
3985
4034
|
selectPlaceholder
|
|
3986
4035
|
]);
|
|
3987
|
-
return /* @__PURE__ */
|
|
4036
|
+
return /* @__PURE__ */ jsxs10("div", {
|
|
3988
4037
|
style: {
|
|
3989
4038
|
direction: direction
|
|
3990
4039
|
},
|
|
3991
4040
|
className: cn("w-full", elementClassName),
|
|
3992
4041
|
children: [
|
|
3993
|
-
/* @__PURE__ */
|
|
4042
|
+
/* @__PURE__ */ jsxs10(Popover, {
|
|
3994
4043
|
open: open,
|
|
3995
4044
|
onOpenChange: setOpen,
|
|
3996
4045
|
children: [
|
|
3997
|
-
/* @__PURE__ */
|
|
4046
|
+
/* @__PURE__ */ jsx15(PopoverTrigger, {
|
|
3998
4047
|
asChild: true,
|
|
3999
|
-
children: /* @__PURE__ */
|
|
4048
|
+
children: /* @__PURE__ */ jsxs10(Button, {
|
|
4000
4049
|
id: id,
|
|
4001
4050
|
variant: "outline",
|
|
4002
4051
|
role: "combobox",
|
|
@@ -4004,11 +4053,11 @@ function SearchSelect(param) {
|
|
|
4004
4053
|
disabled: disabled,
|
|
4005
4054
|
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),
|
|
4006
4055
|
children: [
|
|
4007
|
-
/* @__PURE__ */
|
|
4056
|
+
/* @__PURE__ */ jsx15("span", {
|
|
4008
4057
|
className: cn("truncate", !selectedValue && "text-muted-foreground"),
|
|
4009
4058
|
children: selectLabel
|
|
4010
4059
|
}),
|
|
4011
|
-
/* @__PURE__ */
|
|
4060
|
+
/* @__PURE__ */ jsx15(ChevronDownIcon, {
|
|
4012
4061
|
size: 16,
|
|
4013
4062
|
className: "text-muted-foreground/80 shrink-0",
|
|
4014
4063
|
"aria-hidden": "true"
|
|
@@ -4016,28 +4065,28 @@ function SearchSelect(param) {
|
|
|
4016
4065
|
]
|
|
4017
4066
|
})
|
|
4018
4067
|
}),
|
|
4019
|
-
/* @__PURE__ */
|
|
4068
|
+
/* @__PURE__ */ jsx15(PopoverContent, {
|
|
4020
4069
|
className: cn("border-input w-full min-w-[var(--radix-popper-anchor-width)] p-0 bg-[#fff]"),
|
|
4021
4070
|
align: "start",
|
|
4022
|
-
children: /* @__PURE__ */
|
|
4071
|
+
children: /* @__PURE__ */ jsxs10(Command, {
|
|
4023
4072
|
children: [
|
|
4024
|
-
/* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ jsx15(CommandInput, {
|
|
4025
4074
|
style: {
|
|
4026
4075
|
direction: direction
|
|
4027
4076
|
},
|
|
4028
4077
|
className: cn(searchClassName),
|
|
4029
4078
|
placeholder: searchPlaceholder
|
|
4030
4079
|
}),
|
|
4031
|
-
/* @__PURE__ */
|
|
4080
|
+
/* @__PURE__ */ jsxs10(CommandList, {
|
|
4032
4081
|
children: [
|
|
4033
|
-
/* @__PURE__ */
|
|
4082
|
+
/* @__PURE__ */ jsx15(CommandEmpty, {
|
|
4034
4083
|
className: cn("w-full py-2 text-center", notFoundLabelClassName),
|
|
4035
4084
|
children: notFoundLabel
|
|
4036
4085
|
}),
|
|
4037
|
-
/* @__PURE__ */
|
|
4086
|
+
/* @__PURE__ */ jsx15(CommandGroup, {
|
|
4038
4087
|
className: cn("max-h-52 overflow-y-auto", dropdownClassName),
|
|
4039
4088
|
children: options.map(function(option) {
|
|
4040
|
-
return /* @__PURE__ */
|
|
4089
|
+
return /* @__PURE__ */ jsxs10(CommandItem, {
|
|
4041
4090
|
className: cn("hover:bg-[#cccbcb] cursor-pointer", dropdownOptionClassName, selectedValue === option.value && "bg-[#cccbcb]"),
|
|
4042
4091
|
value: JSON.stringify(option),
|
|
4043
4092
|
onSelect: function(currentValue) {
|
|
@@ -4048,7 +4097,7 @@ function SearchSelect(param) {
|
|
|
4048
4097
|
},
|
|
4049
4098
|
children: [
|
|
4050
4099
|
option.label,
|
|
4051
|
-
selectedValue === option.value && /* @__PURE__ */
|
|
4100
|
+
selectedValue === option.value && /* @__PURE__ */ jsx15(CheckIcon, {
|
|
4052
4101
|
size: 16,
|
|
4053
4102
|
className: "ml-auto"
|
|
4054
4103
|
})
|
|
@@ -4063,7 +4112,7 @@ function SearchSelect(param) {
|
|
|
4063
4112
|
})
|
|
4064
4113
|
]
|
|
4065
4114
|
}),
|
|
4066
|
-
/* @__PURE__ */
|
|
4115
|
+
/* @__PURE__ */ jsx15("input", {
|
|
4067
4116
|
name: name,
|
|
4068
4117
|
type: "hidden",
|
|
4069
4118
|
value: selectedValue
|
|
@@ -4072,7 +4121,7 @@ function SearchSelect(param) {
|
|
|
4072
4121
|
});
|
|
4073
4122
|
}
|
|
4074
4123
|
// src/components/table/components.tsx
|
|
4075
|
-
import { Fragment as Fragment3, jsx as
|
|
4124
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4076
4125
|
var getFixedNumber = function() {
|
|
4077
4126
|
var number = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, fix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 4;
|
|
4078
4127
|
var sum_value = number % 1 === 0 ? number : number.toFixed(fix).replace(/\.?0+$/, "");
|
|
@@ -4082,14 +4131,14 @@ var TableRow2 = function(param) {
|
|
|
4082
4131
|
var item = param.item, index2 = param.index;
|
|
4083
4132
|
var _useTableContext = useTableContext(), rowStyles = _useTableContext.rowStyles, rowClassName = _useTableContext.rowClassName, keysToRender = _useTableContext.keysToRender, onRowClick = _useTableContext.onRowClick, zebraStriping = _useTableContext.zebraStriping;
|
|
4084
4133
|
var zebraClassName = zebraStriping ? index2 % 2 === 0 ? zebraStriping.evenRowClassName || "" : zebraStriping.oddRowClassName || "bg-gray-300" : "";
|
|
4085
|
-
return /* @__PURE__ */
|
|
4134
|
+
return /* @__PURE__ */ jsx16("tr", {
|
|
4086
4135
|
className: cn("hover:bg-[#808080] hover:text-[#fff]", zebraClassName, rowClassName || ""),
|
|
4087
4136
|
onClick: function() {
|
|
4088
4137
|
return onRowClick && onRowClick(item);
|
|
4089
4138
|
},
|
|
4090
4139
|
style: rowStyles,
|
|
4091
4140
|
children: keysToRender.map(function(key, index3) {
|
|
4092
|
-
return /* @__PURE__ */
|
|
4141
|
+
return /* @__PURE__ */ jsx16(TableCell, {
|
|
4093
4142
|
value: item[key]
|
|
4094
4143
|
}, index3);
|
|
4095
4144
|
})
|
|
@@ -4098,7 +4147,7 @@ var TableRow2 = function(param) {
|
|
|
4098
4147
|
var TableCell = function(param) {
|
|
4099
4148
|
var value = param.value;
|
|
4100
4149
|
var _useTableContext = useTableContext(), cellStyle = _useTableContext.cellStyle, cellClassName = _useTableContext.cellClassName;
|
|
4101
|
-
return /* @__PURE__ */
|
|
4150
|
+
return /* @__PURE__ */ jsx16("td", {
|
|
4102
4151
|
title: [
|
|
4103
4152
|
"string",
|
|
4104
4153
|
"number",
|
|
@@ -4114,55 +4163,55 @@ var Filter = memo(function(param) {
|
|
|
4114
4163
|
var _filters_filterableColumn_dataKey, _filters_filterableColumn_dataKey1, _filterOptions_filterableColumn_dataKey;
|
|
4115
4164
|
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;
|
|
4116
4165
|
var displayRight = direction === "rtl" && index2 === headers.length - 1 || direction === "ltr" && index2 !== headers.length - 1;
|
|
4117
|
-
return /* @__PURE__ */
|
|
4166
|
+
return /* @__PURE__ */ jsxs11("div", {
|
|
4118
4167
|
className: "absolute top-1 right-1 ",
|
|
4119
4168
|
children: [
|
|
4120
|
-
/* @__PURE__ */
|
|
4169
|
+
/* @__PURE__ */ jsx16("button", {
|
|
4121
4170
|
title: filterLabel + " " + filterableColumn.header,
|
|
4122
4171
|
className: "text-[12px]",
|
|
4123
4172
|
onClick: function() {
|
|
4124
4173
|
return handleFilterClick(filterableColumn.dataKey);
|
|
4125
4174
|
},
|
|
4126
|
-
children: filterPopupsDisplay === filterableColumn.dataKey ? /* @__PURE__ */
|
|
4127
|
-
children: ((_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.length) > 0 ? /* @__PURE__ */
|
|
4175
|
+
children: filterPopupsDisplay === filterableColumn.dataKey ? /* @__PURE__ */ jsx16(Fragment3, {
|
|
4176
|
+
children: ((_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.length) > 0 ? /* @__PURE__ */ jsx16(Fragment3, {
|
|
4128
4177
|
children: slashFilterSvg(true)
|
|
4129
|
-
}) : /* @__PURE__ */
|
|
4178
|
+
}) : /* @__PURE__ */ jsx16(Fragment3, {
|
|
4130
4179
|
children: emptyFilterSvg(true)
|
|
4131
4180
|
})
|
|
4132
|
-
}) : /* @__PURE__ */
|
|
4133
|
-
children: ((_filters_filterableColumn_dataKey1 = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey1 === void 0 ? void 0 : _filters_filterableColumn_dataKey1.length) > 0 ? /* @__PURE__ */
|
|
4181
|
+
}) : /* @__PURE__ */ jsx16(Fragment3, {
|
|
4182
|
+
children: ((_filters_filterableColumn_dataKey1 = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey1 === void 0 ? void 0 : _filters_filterableColumn_dataKey1.length) > 0 ? /* @__PURE__ */ jsx16(Fragment3, {
|
|
4134
4183
|
children: slashFilterSvg()
|
|
4135
|
-
}) : /* @__PURE__ */
|
|
4184
|
+
}) : /* @__PURE__ */ jsx16(Fragment3, {
|
|
4136
4185
|
children: emptyFilterSvg()
|
|
4137
4186
|
})
|
|
4138
4187
|
})
|
|
4139
4188
|
}),
|
|
4140
|
-
/* @__PURE__ */
|
|
4189
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4141
4190
|
className: "relative",
|
|
4142
|
-
children: filterPopupsDisplay === filterableColumn.dataKey && /* @__PURE__ */
|
|
4191
|
+
children: filterPopupsDisplay === filterableColumn.dataKey && /* @__PURE__ */ jsxs11("div", {
|
|
4143
4192
|
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"),
|
|
4144
4193
|
children: [
|
|
4145
|
-
/* @__PURE__ */
|
|
4194
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
4146
4195
|
className: "flex justify-between items-center border-black border-b-[1px] w-[90%]",
|
|
4147
4196
|
children: [
|
|
4148
|
-
/* @__PURE__ */
|
|
4197
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4149
4198
|
className: "text-start",
|
|
4150
4199
|
children: filterLabel + " " + filterableColumn.header
|
|
4151
4200
|
}),
|
|
4152
|
-
/* @__PURE__ */
|
|
4201
|
+
/* @__PURE__ */ jsx16("button", {
|
|
4153
4202
|
onClick: closeFilterWindow,
|
|
4154
|
-
children: /* @__PURE__ */
|
|
4203
|
+
children: /* @__PURE__ */ jsx16(RedXSvg2, {})
|
|
4155
4204
|
})
|
|
4156
4205
|
]
|
|
4157
4206
|
}),
|
|
4158
|
-
/* @__PURE__ */
|
|
4207
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4159
4208
|
className: "overflow-auto h-[80%] flex flex-col gap-1 w-full cursor-pointer ",
|
|
4160
4209
|
children: (_filterOptions_filterableColumn_dataKey = filterOptions[filterableColumn.dataKey]) === null || _filterOptions_filterableColumn_dataKey === void 0 ? void 0 : _filterOptions_filterableColumn_dataKey.map(function(option, i) {
|
|
4161
4210
|
var _filters_filterableColumn_dataKey;
|
|
4162
|
-
return /* @__PURE__ */
|
|
4211
|
+
return /* @__PURE__ */ jsxs11("div", {
|
|
4163
4212
|
className: "flex items-center px-2 justify-start hover:bg-[#547f22] hover:text-white",
|
|
4164
4213
|
children: [
|
|
4165
|
-
/* @__PURE__ */
|
|
4214
|
+
/* @__PURE__ */ jsx16("input", {
|
|
4166
4215
|
type: "checkbox",
|
|
4167
4216
|
className: "cursor-pointer",
|
|
4168
4217
|
checked: (_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.includes(option),
|
|
@@ -4170,7 +4219,7 @@ var Filter = memo(function(param) {
|
|
|
4170
4219
|
return handleFilterChange(filterableColumn.dataKey, option);
|
|
4171
4220
|
}
|
|
4172
4221
|
}),
|
|
4173
|
-
/* @__PURE__ */
|
|
4222
|
+
/* @__PURE__ */ jsx16("button", {
|
|
4174
4223
|
className: "flex-1 text-start px-2",
|
|
4175
4224
|
onClick: function() {
|
|
4176
4225
|
return handleFilterChange(filterableColumn.dataKey, option);
|
|
@@ -4194,32 +4243,32 @@ var TableHead = memo(function() {
|
|
|
4194
4243
|
}, [
|
|
4195
4244
|
sortKeys
|
|
4196
4245
|
]);
|
|
4197
|
-
return /* @__PURE__ */
|
|
4246
|
+
return /* @__PURE__ */ jsx16("thead", {
|
|
4198
4247
|
className: cn("bg-[#282828] text-white sticky top-0", headerClassName),
|
|
4199
|
-
children: /* @__PURE__ */
|
|
4248
|
+
children: /* @__PURE__ */ jsx16("tr", {
|
|
4200
4249
|
style: headerStyle,
|
|
4201
4250
|
children: headers.map(function(header, index2) {
|
|
4202
4251
|
var filterableColumn = filterableColumns.find(function(col) {
|
|
4203
4252
|
return col.header === header;
|
|
4204
4253
|
});
|
|
4205
|
-
return /* @__PURE__ */
|
|
4254
|
+
return /* @__PURE__ */ jsxs11("th", {
|
|
4206
4255
|
title: sortDisplay ? "".concat(sortLabel, " ").concat(header) : header,
|
|
4207
4256
|
style: headerCellStyle,
|
|
4208
4257
|
className: cn("border-black border-[1px] max-w-[130px] px-2 text-center relative", headerCellClassName),
|
|
4209
4258
|
children: [
|
|
4210
|
-
/* @__PURE__ */
|
|
4259
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4211
4260
|
className: "px-2 ".concat(sortDisplay ? "cursor-pointer" : ""),
|
|
4212
4261
|
onClick: function() {
|
|
4213
4262
|
return sortDisplay && handleSort(index2);
|
|
4214
4263
|
},
|
|
4215
4264
|
children: header
|
|
4216
4265
|
}),
|
|
4217
|
-
sortDisplay && sortColumn === index2 && (sortOrder === "desc" ? /* @__PURE__ */
|
|
4266
|
+
sortDisplay && sortColumn === index2 && (sortOrder === "desc" ? /* @__PURE__ */ jsx16(Fragment3, {
|
|
4218
4267
|
children: sortSvg()
|
|
4219
|
-
}) : /* @__PURE__ */
|
|
4268
|
+
}) : /* @__PURE__ */ jsx16(Fragment3, {
|
|
4220
4269
|
children: sortSvg(true)
|
|
4221
4270
|
})),
|
|
4222
|
-
filterableColumn && /* @__PURE__ */
|
|
4271
|
+
filterableColumn && /* @__PURE__ */ jsx16(Filter, {
|
|
4223
4272
|
filterableColumn: filterableColumn,
|
|
4224
4273
|
index: index2
|
|
4225
4274
|
})
|
|
@@ -4231,10 +4280,10 @@ var TableHead = memo(function() {
|
|
|
4231
4280
|
}, renderOnce);
|
|
4232
4281
|
var TableBody = memo(function() {
|
|
4233
4282
|
var dataToRender = useTableContext().dataToRender;
|
|
4234
|
-
return /* @__PURE__ */
|
|
4283
|
+
return /* @__PURE__ */ jsx16("tbody", {
|
|
4235
4284
|
className: "divide-y divide-gray-600",
|
|
4236
4285
|
children: dataToRender.renderedData.map(function(item, index2) {
|
|
4237
|
-
return /* @__PURE__ */
|
|
4286
|
+
return /* @__PURE__ */ jsx16(TableRow2, {
|
|
4238
4287
|
item: item,
|
|
4239
4288
|
index: index2
|
|
4240
4289
|
}, index2);
|
|
@@ -4243,19 +4292,19 @@ var TableBody = memo(function() {
|
|
|
4243
4292
|
}, renderOnce);
|
|
4244
4293
|
var MaxRowsLabel = memo(function() {
|
|
4245
4294
|
var _useTableContext = useTableContext(), data = _useTableContext.data, dataToRender = _useTableContext.dataToRender, maxRowsLabel1 = _useTableContext.maxRowsLabel1, maxRowsLabel2 = _useTableContext.maxRowsLabel2, maxRows = _useTableContext.maxRows, maxRowsContainerClassName = _useTableContext.maxRowsContainerClassName;
|
|
4246
|
-
return /* @__PURE__ */
|
|
4295
|
+
return /* @__PURE__ */ jsxs11("div", {
|
|
4247
4296
|
className: cn("flex justify-start items-center text-lg gap-1", maxRowsContainerClassName || ""),
|
|
4248
4297
|
children: [
|
|
4249
|
-
/* @__PURE__ */
|
|
4298
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4250
4299
|
children: maxRowsLabel1
|
|
4251
4300
|
}),
|
|
4252
|
-
/* @__PURE__ */
|
|
4301
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4253
4302
|
children: maxRows > dataToRender.renderedData.length ? dataToRender.renderedData.length : maxRows
|
|
4254
4303
|
}),
|
|
4255
|
-
/* @__PURE__ */
|
|
4304
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4256
4305
|
children: maxRowsLabel2
|
|
4257
4306
|
}),
|
|
4258
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4259
4308
|
children: dataToRender.filtered.length
|
|
4260
4309
|
})
|
|
4261
4310
|
]
|
|
@@ -4334,7 +4383,7 @@ var ExportToExcel = memo(function() {
|
|
|
4334
4383
|
return _ref.apply(this, arguments);
|
|
4335
4384
|
};
|
|
4336
4385
|
}();
|
|
4337
|
-
return /* @__PURE__ */
|
|
4386
|
+
return /* @__PURE__ */ jsx16("button", {
|
|
4338
4387
|
onClick: onExportExcelClick,
|
|
4339
4388
|
title: exportExcelTitle,
|
|
4340
4389
|
className: cn("px-2 py-[2px] bg-[#547f22] text-white rounded-lg text-[16px]", exportToExcelClassName),
|
|
@@ -4343,7 +4392,7 @@ var ExportToExcel = memo(function() {
|
|
|
4343
4392
|
}, renderOnce);
|
|
4344
4393
|
var Search = memo(function() {
|
|
4345
4394
|
var _useTableContext = useTableContext(), searchQuery = _useTableContext.searchQuery, handleSearch = _useTableContext.handleSearch, searchPlaceHolder = _useTableContext.searchPlaceHolder, searchInputClassName = _useTableContext.searchInputClassName, searchInputStyle = _useTableContext.searchInputStyle;
|
|
4346
|
-
return /* @__PURE__ */
|
|
4395
|
+
return /* @__PURE__ */ jsx16("input", {
|
|
4347
4396
|
className: cn("w-40 border-black border-[1px] text-lg px-2 ", searchInputClassName),
|
|
4348
4397
|
type: "text",
|
|
4349
4398
|
placeholder: searchPlaceHolder,
|
|
@@ -4354,17 +4403,17 @@ var Search = memo(function() {
|
|
|
4354
4403
|
}, renderOnce);
|
|
4355
4404
|
var Summary = memo(function() {
|
|
4356
4405
|
var _useTableContext = useTableContext(), summaryContainerStyle = _useTableContext.summaryContainerStyle, summaryLabelStyle = _useTableContext.summaryLabelStyle, summaryLabel = _useTableContext.summaryLabel, summaryRowStyle = _useTableContext.summaryRowStyle, sumColumns = _useTableContext.sumColumns, dataToRender = _useTableContext.dataToRender, direction = _useTableContext.direction;
|
|
4357
|
-
return /* @__PURE__ */
|
|
4406
|
+
return /* @__PURE__ */ jsxs11("div", {
|
|
4358
4407
|
style: _object_spread_props(_object_spread({}, summaryContainerStyle), {
|
|
4359
4408
|
direction: direction
|
|
4360
4409
|
}),
|
|
4361
4410
|
className: "w-full h-8 flex justify-between items-center px-3 text-[18px] font-bold",
|
|
4362
4411
|
children: [
|
|
4363
|
-
/* @__PURE__ */
|
|
4412
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4364
4413
|
style: summaryLabelStyle,
|
|
4365
4414
|
children: summaryLabel
|
|
4366
4415
|
}),
|
|
4367
|
-
/* @__PURE__ */
|
|
4416
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4368
4417
|
style: summaryRowStyle,
|
|
4369
4418
|
className: "flex gap-3",
|
|
4370
4419
|
children: sumColumns.map(function(val) {
|
|
@@ -4372,16 +4421,16 @@ var Summary = memo(function() {
|
|
|
4372
4421
|
return acc + Number(v[val.dataKey]) || 0;
|
|
4373
4422
|
}, 0);
|
|
4374
4423
|
var sum_value = getFixedNumber(sum_res);
|
|
4375
|
-
return /* @__PURE__ */
|
|
4424
|
+
return /* @__PURE__ */ jsxs11("div", {
|
|
4376
4425
|
className: "flex gap-1 justify-start",
|
|
4377
4426
|
children: [
|
|
4378
|
-
/* @__PURE__ */
|
|
4427
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4379
4428
|
children: val.label
|
|
4380
4429
|
}),
|
|
4381
|
-
/* @__PURE__ */
|
|
4430
|
+
/* @__PURE__ */ jsx16("span", {
|
|
4382
4431
|
children: ":"
|
|
4383
4432
|
}),
|
|
4384
|
-
/* @__PURE__ */
|
|
4433
|
+
/* @__PURE__ */ jsx16("div", {
|
|
4385
4434
|
children: val.ui ? val.ui(sum_value) : sum_value
|
|
4386
4435
|
})
|
|
4387
4436
|
]
|
|
@@ -4398,7 +4447,7 @@ var TimesUI = function(param) {
|
|
|
4398
4447
|
fromFormat: fromFormat,
|
|
4399
4448
|
tz: tz
|
|
4400
4449
|
});
|
|
4401
|
-
return /* @__PURE__ */
|
|
4450
|
+
return /* @__PURE__ */ jsx16("div", {
|
|
4402
4451
|
style: {
|
|
4403
4452
|
direction: "ltr"
|
|
4404
4453
|
},
|
|
@@ -4414,22 +4463,22 @@ var TableButton = function(param) {
|
|
|
4414
4463
|
edit: "fa-light fa-pen-to-square text-xl",
|
|
4415
4464
|
delete: "fa-light fa-trash text-xl"
|
|
4416
4465
|
};
|
|
4417
|
-
return /* @__PURE__ */
|
|
4418
|
-
children: type === "custom" ? /* @__PURE__ */
|
|
4466
|
+
return /* @__PURE__ */ jsx16(Fragment3, {
|
|
4467
|
+
children: type === "custom" ? /* @__PURE__ */ jsx16("button", {
|
|
4419
4468
|
className: className,
|
|
4420
4469
|
title: title,
|
|
4421
4470
|
onClick: onClick,
|
|
4422
4471
|
children: children
|
|
4423
|
-
}) : type === "add" ? /* @__PURE__ */
|
|
4472
|
+
}) : type === "add" ? /* @__PURE__ */ jsx16(Button, {
|
|
4424
4473
|
title: title,
|
|
4425
4474
|
onClick: onClick,
|
|
4426
|
-
children: /* @__PURE__ */
|
|
4475
|
+
children: /* @__PURE__ */ jsx16("i", {
|
|
4427
4476
|
className: cn("fa-regular fa-plus text-2xl", className)
|
|
4428
4477
|
})
|
|
4429
|
-
}) : /* @__PURE__ */
|
|
4478
|
+
}) : /* @__PURE__ */ jsx16("button", {
|
|
4430
4479
|
title: title,
|
|
4431
4480
|
onClick: onClick,
|
|
4432
|
-
children: /* @__PURE__ */
|
|
4481
|
+
children: /* @__PURE__ */ jsx16("i", {
|
|
4433
4482
|
className: cn(icon[type], className)
|
|
4434
4483
|
})
|
|
4435
4484
|
})
|
|
@@ -4458,14 +4507,14 @@ var DurationUI = function(param) {
|
|
|
4458
4507
|
}, [
|
|
4459
4508
|
duration
|
|
4460
4509
|
]), daysStr = _useMemo6.daysStr, hoursStr = _useMemo6.hoursStr, minutesStr = _useMemo6.minutesStr, secondsStr = _useMemo6.secondsStr;
|
|
4461
|
-
return /* @__PURE__ */
|
|
4510
|
+
return /* @__PURE__ */ jsxs11("div", {
|
|
4462
4511
|
title: "".concat(daysStr, " ").concat(daysLabel, " ").concat(hoursStr, " ").concat(hoursLabel, " ").concat(minutesStr, " ").concat(minutesLabel, " ").concat(secondsStr, " ").concat(secondsLabel).trim(),
|
|
4463
4512
|
style: {
|
|
4464
4513
|
direction: "ltr"
|
|
4465
4514
|
},
|
|
4466
4515
|
className: cn("flex gap-1 ".concat(direction === "rtl" ? "justify-end" : "justify-start"), className),
|
|
4467
4516
|
children: [
|
|
4468
|
-
daysStr !== "00" && /* @__PURE__ */
|
|
4517
|
+
daysStr !== "00" && /* @__PURE__ */ jsxs11("span", {
|
|
4469
4518
|
style: {
|
|
4470
4519
|
display: "inline-block"
|
|
4471
4520
|
},
|
|
@@ -4475,7 +4524,7 @@ var DurationUI = function(param) {
|
|
|
4475
4524
|
daysLabel
|
|
4476
4525
|
]
|
|
4477
4526
|
}),
|
|
4478
|
-
hoursStr !== "00" && /* @__PURE__ */
|
|
4527
|
+
hoursStr !== "00" && /* @__PURE__ */ jsxs11("span", {
|
|
4479
4528
|
style: {
|
|
4480
4529
|
display: "inline-block"
|
|
4481
4530
|
},
|
|
@@ -4485,7 +4534,7 @@ var DurationUI = function(param) {
|
|
|
4485
4534
|
hoursLabel
|
|
4486
4535
|
]
|
|
4487
4536
|
}),
|
|
4488
|
-
minutesStr !== "00" && /* @__PURE__ */
|
|
4537
|
+
minutesStr !== "00" && /* @__PURE__ */ jsxs11("span", {
|
|
4489
4538
|
style: {
|
|
4490
4539
|
display: "inline-block"
|
|
4491
4540
|
},
|
|
@@ -4495,7 +4544,7 @@ var DurationUI = function(param) {
|
|
|
4495
4544
|
minutesLabel
|
|
4496
4545
|
]
|
|
4497
4546
|
}),
|
|
4498
|
-
secondsStr !== "00" && /* @__PURE__ */
|
|
4547
|
+
secondsStr !== "00" && /* @__PURE__ */ jsxs11("span", {
|
|
4499
4548
|
style: {
|
|
4500
4549
|
display: "inline-block"
|
|
4501
4550
|
},
|
|
@@ -4510,7 +4559,7 @@ var DurationUI = function(param) {
|
|
|
4510
4559
|
};
|
|
4511
4560
|
var PhoneUI = function(param) {
|
|
4512
4561
|
var phone = param.phone, direction = param.direction, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
4513
|
-
return /* @__PURE__ */
|
|
4562
|
+
return /* @__PURE__ */ jsx16("div", {
|
|
4514
4563
|
style: {
|
|
4515
4564
|
direction: "ltr"
|
|
4516
4565
|
},
|
|
@@ -4521,9 +4570,9 @@ var PhoneUI = function(param) {
|
|
|
4521
4570
|
};
|
|
4522
4571
|
var BooleanUi = function(param) {
|
|
4523
4572
|
var value = param.value, size3 = param.size, className = param.className, falseUi = param.falseUi, trueUi = param.trueUi;
|
|
4524
|
-
return value ? trueUi !== null && trueUi !== void 0 ? trueUi : /* @__PURE__ */
|
|
4573
|
+
return value ? trueUi !== null && trueUi !== void 0 ? trueUi : /* @__PURE__ */ jsx16("i", {
|
|
4525
4574
|
className: cn("fa-light fa-check ".concat(size3 === "small" ? "text-lg" : "text-2xl"), className)
|
|
4526
|
-
}) : falseUi !== null && falseUi !== void 0 ? falseUi : /* @__PURE__ */
|
|
4575
|
+
}) : falseUi !== null && falseUi !== void 0 ? falseUi : /* @__PURE__ */ jsx16("i", {
|
|
4527
4576
|
className: cn("fa-light fa-xmark ".concat(size3 === "small" ? "text-lg" : "text-2xl"), className)
|
|
4528
4577
|
});
|
|
4529
4578
|
};
|
|
@@ -4533,7 +4582,7 @@ var GeoUi = function(param) {
|
|
|
4533
4582
|
var lat = value.lat || value.latitude;
|
|
4534
4583
|
var googleMapsLink = getLocationUrl(lang, lat);
|
|
4535
4584
|
var langLatUi = linkUi || " ".concat(lang, " ").concat(lat);
|
|
4536
|
-
return /* @__PURE__ */
|
|
4585
|
+
return /* @__PURE__ */ jsx16("a", {
|
|
4537
4586
|
href: googleMapsLink,
|
|
4538
4587
|
target: "_blank",
|
|
4539
4588
|
className: cn("_ellipsis", className),
|
|
@@ -4543,7 +4592,7 @@ var GeoUi = function(param) {
|
|
|
4543
4592
|
};
|
|
4544
4593
|
var NumberUI = function(param) {
|
|
4545
4594
|
var number = param.number, direction = param.direction, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
4546
|
-
return /* @__PURE__ */
|
|
4595
|
+
return /* @__PURE__ */ jsx16("div", {
|
|
4547
4596
|
style: {
|
|
4548
4597
|
direction: "ltr"
|
|
4549
4598
|
},
|
|
@@ -4561,7 +4610,7 @@ import { ChevronDown, Phone } from "lucide-react";
|
|
|
4561
4610
|
import { forwardRef as forwardRef7, useEffect as useEffect5, useMemo as useMemo7, useRef as useRef4, useState as useState6 } from "react";
|
|
4562
4611
|
import * as RPNInput from "react-phone-number-input";
|
|
4563
4612
|
import flags from "react-phone-number-input/flags";
|
|
4564
|
-
import { jsx as
|
|
4613
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4565
4614
|
function InternationalPhonePicker(param) {
|
|
4566
4615
|
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;
|
|
4567
4616
|
var handleKeyDown = function(e) {
|
|
@@ -4584,19 +4633,19 @@ function InternationalPhonePicker(param) {
|
|
|
4584
4633
|
defaultValue,
|
|
4585
4634
|
setPhoneValue
|
|
4586
4635
|
]);
|
|
4587
|
-
return /* @__PURE__ */
|
|
4636
|
+
return /* @__PURE__ */ jsxs12("div", {
|
|
4588
4637
|
style: {
|
|
4589
4638
|
direction: direction
|
|
4590
4639
|
},
|
|
4591
4640
|
className: cn("space-y-2", "".concat(labelContent ? "flex gap-1 items-center" : ""), containerClassName),
|
|
4592
4641
|
children: [
|
|
4593
|
-
labelContent && /* @__PURE__ */
|
|
4642
|
+
labelContent && /* @__PURE__ */ jsx17(ElementLabel, {
|
|
4594
4643
|
labelContent: labelContent,
|
|
4595
4644
|
labelClassName: labelClassName,
|
|
4596
4645
|
name: name,
|
|
4597
4646
|
required: required
|
|
4598
4647
|
}),
|
|
4599
|
-
/* @__PURE__ */
|
|
4648
|
+
/* @__PURE__ */ jsx17(RPNInput.default, {
|
|
4600
4649
|
style: {
|
|
4601
4650
|
direction: "ltr"
|
|
4602
4651
|
},
|
|
@@ -4629,7 +4678,7 @@ function InternationalPhonePicker(param) {
|
|
|
4629
4678
|
setTempPhoneValue(newValue !== null && newValue !== void 0 ? newValue : "");
|
|
4630
4679
|
}
|
|
4631
4680
|
}),
|
|
4632
|
-
/* @__PURE__ */
|
|
4681
|
+
/* @__PURE__ */ jsx17("input", {
|
|
4633
4682
|
type: "hidden",
|
|
4634
4683
|
name: name,
|
|
4635
4684
|
value: tempPhoneValue
|
|
@@ -4650,7 +4699,7 @@ var PhoneInput = forwardRef7(function(_param, ref) {
|
|
|
4650
4699
|
inputRef.current.focus();
|
|
4651
4700
|
}
|
|
4652
4701
|
}, []);
|
|
4653
|
-
return /* @__PURE__ */
|
|
4702
|
+
return /* @__PURE__ */ jsx17(Input, _object_spread({
|
|
4654
4703
|
className: cn("-ms-px rounded-s-none shadow-none focus-visible:z-10 h-full", className),
|
|
4655
4704
|
onKeyDown: onKeyDown,
|
|
4656
4705
|
defaultValue: defaultValue,
|
|
@@ -4674,21 +4723,21 @@ var CountrySelect = function(param) {
|
|
|
4674
4723
|
var originalClassName = useMemo7(function() {
|
|
4675
4724
|
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";
|
|
4676
4725
|
}, []);
|
|
4677
|
-
return /* @__PURE__ */
|
|
4726
|
+
return /* @__PURE__ */ jsxs12("div", {
|
|
4678
4727
|
className: cn(originalClassName, className),
|
|
4679
4728
|
children: [
|
|
4680
|
-
/* @__PURE__ */
|
|
4729
|
+
/* @__PURE__ */ jsxs12("div", {
|
|
4681
4730
|
className: "inline-flex items-center gap-1",
|
|
4682
4731
|
"aria-hidden": "true",
|
|
4683
4732
|
children: [
|
|
4684
|
-
/* @__PURE__ */
|
|
4733
|
+
/* @__PURE__ */ jsx17(FlagComponent, {
|
|
4685
4734
|
country: value,
|
|
4686
4735
|
countryName: value,
|
|
4687
4736
|
"aria-hidden": "true"
|
|
4688
4737
|
}),
|
|
4689
|
-
/* @__PURE__ */
|
|
4738
|
+
/* @__PURE__ */ jsx17("span", {
|
|
4690
4739
|
className: "text-muted-foreground/80",
|
|
4691
|
-
children: /* @__PURE__ */
|
|
4740
|
+
children: /* @__PURE__ */ jsx17(ChevronDown, {
|
|
4692
4741
|
size: 16,
|
|
4693
4742
|
strokeWidth: 2,
|
|
4694
4743
|
"aria-hidden": "true"
|
|
@@ -4696,7 +4745,7 @@ var CountrySelect = function(param) {
|
|
|
4696
4745
|
})
|
|
4697
4746
|
]
|
|
4698
4747
|
}),
|
|
4699
|
-
/* @__PURE__ */
|
|
4748
|
+
/* @__PURE__ */ jsx17("select", {
|
|
4700
4749
|
disabled: disabled,
|
|
4701
4750
|
value: value,
|
|
4702
4751
|
onChange: handleSelect,
|
|
@@ -4706,7 +4755,7 @@ var CountrySelect = function(param) {
|
|
|
4706
4755
|
return x.value;
|
|
4707
4756
|
}).map(function(option, i) {
|
|
4708
4757
|
var _option_value;
|
|
4709
|
-
return /* @__PURE__ */
|
|
4758
|
+
return /* @__PURE__ */ jsxs12("option", {
|
|
4710
4759
|
className: "text-black",
|
|
4711
4760
|
value: option.value,
|
|
4712
4761
|
children: [
|
|
@@ -4723,18 +4772,18 @@ var CountrySelect = function(param) {
|
|
|
4723
4772
|
var FlagComponent = function(param) {
|
|
4724
4773
|
var country = param.country, countryName = param.countryName;
|
|
4725
4774
|
var Flag = flags[country];
|
|
4726
|
-
return /* @__PURE__ */
|
|
4775
|
+
return /* @__PURE__ */ jsx17("span", {
|
|
4727
4776
|
className: "w-5 overflow-hidden rounded-sm",
|
|
4728
|
-
children: Flag ? /* @__PURE__ */
|
|
4777
|
+
children: Flag ? /* @__PURE__ */ jsx17(Flag, {
|
|
4729
4778
|
title: countryName
|
|
4730
|
-
}) : /* @__PURE__ */
|
|
4779
|
+
}) : /* @__PURE__ */ jsx17(Phone, {
|
|
4731
4780
|
size: 16,
|
|
4732
4781
|
"aria-hidden": "true"
|
|
4733
4782
|
})
|
|
4734
4783
|
});
|
|
4735
4784
|
};
|
|
4736
4785
|
// src/components/forms/ModularForm/formElements.tsx
|
|
4737
|
-
import { jsx as
|
|
4786
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4738
4787
|
var useSortValues = function(options, sortDirection, sortAsNumber) {
|
|
4739
4788
|
var sortOptions = useMemo8(function() {
|
|
4740
4789
|
var sorted = sortAsNumber ? options.sort(function(a, b) {
|
|
@@ -4765,17 +4814,17 @@ var InputContainer = function(param) {
|
|
|
4765
4814
|
}, [
|
|
4766
4815
|
handleChangeFunction
|
|
4767
4816
|
]);
|
|
4768
|
-
return /* @__PURE__ */
|
|
4817
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
4769
4818
|
className: cn("center", containerClassName),
|
|
4770
4819
|
children: [
|
|
4771
|
-
labelContent && /* @__PURE__ */
|
|
4820
|
+
labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
|
|
4772
4821
|
direction: direction,
|
|
4773
4822
|
labelContent: labelContent,
|
|
4774
4823
|
labelClassName: labelClassName,
|
|
4775
4824
|
name: name,
|
|
4776
4825
|
required: required
|
|
4777
4826
|
}),
|
|
4778
|
-
/* @__PURE__ */
|
|
4827
|
+
/* @__PURE__ */ jsx18("input", _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, props), {
|
|
4779
4828
|
minLength: minLength,
|
|
4780
4829
|
placeholder: placeholder,
|
|
4781
4830
|
className: cn("w-[70%] bg-inherit border-b-[1px] border-black px-2", elementClassName),
|
|
@@ -4804,37 +4853,37 @@ var SelectContainer = function(param) {
|
|
|
4804
4853
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
4805
4854
|
setIsOpen(false);
|
|
4806
4855
|
};
|
|
4807
|
-
return /* @__PURE__ */
|
|
4856
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
4808
4857
|
className: cn("center", containerClassName),
|
|
4809
4858
|
children: [
|
|
4810
|
-
labelContent && /* @__PURE__ */
|
|
4859
|
+
labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
|
|
4811
4860
|
direction: direction,
|
|
4812
4861
|
labelContent: labelContent,
|
|
4813
4862
|
labelClassName: labelClassName,
|
|
4814
4863
|
name: name,
|
|
4815
4864
|
required: required
|
|
4816
4865
|
}),
|
|
4817
|
-
/* @__PURE__ */
|
|
4866
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
4818
4867
|
className: cn("w-[70%] relative", elementClassName),
|
|
4819
4868
|
onClick: function() {
|
|
4820
4869
|
return setIsOpen(!isOpen);
|
|
4821
4870
|
},
|
|
4822
4871
|
children: [
|
|
4823
|
-
/* @__PURE__ */
|
|
4872
|
+
/* @__PURE__ */ jsx18("div", {
|
|
4824
4873
|
className: "border-b-[1px] border-black max-h-6 cursor-pointer",
|
|
4825
4874
|
children: ((_options_find = options.find(function(opt) {
|
|
4826
4875
|
return opt.value === selectedValue;
|
|
4827
4876
|
})) === null || _options_find === void 0 ? void 0 : _options_find.label) || selectedValue
|
|
4828
4877
|
}),
|
|
4829
|
-
isOpen ? /* @__PURE__ */
|
|
4878
|
+
isOpen ? /* @__PURE__ */ jsx18("i", {
|
|
4830
4879
|
className: "fa-light fa-chevron-up absolute top-[1px] left-1 cursor-pointer"
|
|
4831
|
-
}) : /* @__PURE__ */
|
|
4880
|
+
}) : /* @__PURE__ */ jsx18("i", {
|
|
4832
4881
|
className: "fa-light fa-chevron-down absolute top-[1px] left-1 cursor-pointer"
|
|
4833
4882
|
}),
|
|
4834
|
-
isOpen && /* @__PURE__ */
|
|
4883
|
+
isOpen && /* @__PURE__ */ jsx18("div", {
|
|
4835
4884
|
className: cn("absolute w-full bg-white border border-gray-300 max-h-32 overflow-y-auto z-10", optionsContainerClassName),
|
|
4836
4885
|
children: sortOptions.map(function(option) {
|
|
4837
|
-
return /* @__PURE__ */
|
|
4886
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
4838
4887
|
className: "p-2 cursor-pointer hover:bg-gray-200 ".concat(optionClassName),
|
|
4839
4888
|
onClick: function() {
|
|
4840
4889
|
return handleOptionClick(option.value);
|
|
@@ -4843,7 +4892,7 @@ var SelectContainer = function(param) {
|
|
|
4843
4892
|
}, option.value);
|
|
4844
4893
|
})
|
|
4845
4894
|
}),
|
|
4846
|
-
/* @__PURE__ */
|
|
4895
|
+
/* @__PURE__ */ jsx18("input", {
|
|
4847
4896
|
value: selectedValue,
|
|
4848
4897
|
type: "hidden",
|
|
4849
4898
|
name: name,
|
|
@@ -4857,17 +4906,17 @@ var SelectContainer = function(param) {
|
|
|
4857
4906
|
function MultiSelect(param) {
|
|
4858
4907
|
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;
|
|
4859
4908
|
var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
|
|
4860
|
-
return /* @__PURE__ */
|
|
4909
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
4861
4910
|
className: cn("".concat(labelContent ? "flex gap-1 items-center" : ""), styles.containerClassName),
|
|
4862
4911
|
children: [
|
|
4863
|
-
labelContent && /* @__PURE__ */
|
|
4912
|
+
labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
|
|
4864
4913
|
direction: direction,
|
|
4865
4914
|
labelContent: labelContent,
|
|
4866
4915
|
labelClassName: labelClassName,
|
|
4867
4916
|
name: name,
|
|
4868
4917
|
required: required
|
|
4869
4918
|
}),
|
|
4870
|
-
/* @__PURE__ */
|
|
4919
|
+
/* @__PURE__ */ jsx18(multiselect_default, {
|
|
4871
4920
|
commandProps: {
|
|
4872
4921
|
label: placeholder
|
|
4873
4922
|
},
|
|
@@ -4887,7 +4936,7 @@ function MultiSelect(param) {
|
|
|
4887
4936
|
className: styles.className,
|
|
4888
4937
|
dropdownClassName: styles.dropdownClassName,
|
|
4889
4938
|
dropdownOptionClassName: styles.dropdownOptionClassName,
|
|
4890
|
-
emptyIndicator: emptyOptionsElement || /* @__PURE__ */
|
|
4939
|
+
emptyIndicator: emptyOptionsElement || /* @__PURE__ */ jsx18("p", {
|
|
4891
4940
|
className: "text-center text-sm",
|
|
4892
4941
|
children: "all options selected."
|
|
4893
4942
|
}),
|
|
@@ -4901,17 +4950,17 @@ function MultiSelect(param) {
|
|
|
4901
4950
|
var SelectWithSearch = function(param) {
|
|
4902
4951
|
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;
|
|
4903
4952
|
var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
|
|
4904
|
-
return /* @__PURE__ */
|
|
4953
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
4905
4954
|
className: cn("flex justify-between items-center w-full", containerClassName),
|
|
4906
4955
|
children: [
|
|
4907
|
-
labelContent && /* @__PURE__ */
|
|
4956
|
+
labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
|
|
4908
4957
|
direction: direction,
|
|
4909
4958
|
labelContent: labelContent,
|
|
4910
4959
|
labelClassName: labelClassName,
|
|
4911
4960
|
name: name,
|
|
4912
4961
|
required: required
|
|
4913
4962
|
}),
|
|
4914
|
-
/* @__PURE__ */
|
|
4963
|
+
/* @__PURE__ */ jsx18(SearchSelect, {
|
|
4915
4964
|
direction: direction,
|
|
4916
4965
|
options: sortOptions,
|
|
4917
4966
|
value: value,
|
|
@@ -4934,10 +4983,10 @@ var SelectWithSearch = function(param) {
|
|
|
4934
4983
|
};
|
|
4935
4984
|
var TextAreaContainer = function(param) {
|
|
4936
4985
|
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;
|
|
4937
|
-
return /* @__PURE__ */
|
|
4986
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
4938
4987
|
className: cn("flex flex-col gap-2 items-center", containerClassName),
|
|
4939
4988
|
children: [
|
|
4940
|
-
labelContent && /* @__PURE__ */
|
|
4989
|
+
labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
|
|
4941
4990
|
direction: direction,
|
|
4942
4991
|
labelContent: labelContent,
|
|
4943
4992
|
labelClassName: "w-fit text-xl px-2 border-b-2 border-[#000] text-center ".concat(labelClassName),
|
|
@@ -4945,7 +4994,7 @@ var TextAreaContainer = function(param) {
|
|
|
4945
4994
|
required: required,
|
|
4946
4995
|
withDots: false
|
|
4947
4996
|
}),
|
|
4948
|
-
/* @__PURE__ */
|
|
4997
|
+
/* @__PURE__ */ jsx18("textarea", _object_spread_props(_object_spread({}, props), {
|
|
4949
4998
|
onChange: onChange,
|
|
4950
4999
|
minLength: minLength,
|
|
4951
5000
|
placeholder: placeholder,
|
|
@@ -4960,28 +5009,28 @@ var TextAreaContainer = function(param) {
|
|
|
4960
5009
|
};
|
|
4961
5010
|
var ElementLabel = function(param) {
|
|
4962
5011
|
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;
|
|
4963
|
-
return /* @__PURE__ */
|
|
5012
|
+
return /* @__PURE__ */ jsxs13("label", {
|
|
4964
5013
|
style: {
|
|
4965
5014
|
direction: direction
|
|
4966
5015
|
},
|
|
4967
5016
|
className: cn("text-start w-[30%] flex gap-0.5", labelClassName),
|
|
4968
5017
|
htmlFor: name,
|
|
4969
5018
|
children: [
|
|
4970
|
-
/* @__PURE__ */
|
|
5019
|
+
/* @__PURE__ */ jsx18("div", {
|
|
4971
5020
|
children: labelContent
|
|
4972
5021
|
}),
|
|
4973
|
-
required && /* @__PURE__ */
|
|
5022
|
+
required && /* @__PURE__ */ jsx18("div", {
|
|
4974
5023
|
className: "text-red-500",
|
|
4975
5024
|
children: "*"
|
|
4976
5025
|
}),
|
|
4977
|
-
withDots && /* @__PURE__ */
|
|
5026
|
+
withDots && /* @__PURE__ */ jsx18("div", {
|
|
4978
5027
|
children: ":"
|
|
4979
5028
|
})
|
|
4980
5029
|
]
|
|
4981
5030
|
});
|
|
4982
5031
|
};
|
|
4983
5032
|
// src/components/forms/ModularForm/ModularForm.tsx
|
|
4984
|
-
import { jsx as
|
|
5033
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4985
5034
|
var ModularForm = function(param) {
|
|
4986
5035
|
var _param_submitFunction = param.submitFunction, submitFunction = _param_submitFunction === void 0 ? /*#__PURE__*/ function() {
|
|
4987
5036
|
var _ref = _async_to_generator(function(form) {
|
|
@@ -5058,41 +5107,41 @@ var ModularForm = function(param) {
|
|
|
5058
5107
|
return _ref.apply(this, arguments);
|
|
5059
5108
|
};
|
|
5060
5109
|
}();
|
|
5061
|
-
return /* @__PURE__ */
|
|
5110
|
+
return /* @__PURE__ */ jsxs14("form", {
|
|
5062
5111
|
onSubmit: onSubmit,
|
|
5063
5112
|
style: {
|
|
5064
5113
|
direction: direction
|
|
5065
5114
|
},
|
|
5066
5115
|
className: cn("w-[350px] px-5 py-5 flex flex-col gap-5", formClassName),
|
|
5067
5116
|
children: [
|
|
5068
|
-
headerContent && /* @__PURE__ */
|
|
5117
|
+
headerContent && /* @__PURE__ */ jsx19("div", {
|
|
5069
5118
|
className: cn("border-b-2 border-[#547f22] pb-2 text-start font-bold text-[20px]", headerClassName),
|
|
5070
5119
|
children: headerContent
|
|
5071
5120
|
}),
|
|
5072
5121
|
elements.map(function(element, index2) {
|
|
5073
5122
|
switch(element.type){
|
|
5074
5123
|
case "input":
|
|
5075
|
-
return /* @__PURE__ */
|
|
5124
|
+
return /* @__PURE__ */ jsx19(InputContainer, _object_spread_props(_object_spread({}, element), {
|
|
5076
5125
|
direction: direction
|
|
5077
5126
|
}), index2);
|
|
5078
5127
|
case "textarea":
|
|
5079
|
-
return /* @__PURE__ */
|
|
5128
|
+
return /* @__PURE__ */ jsx19(TextAreaContainer, _object_spread_props(_object_spread({}, element), {
|
|
5080
5129
|
direction: direction
|
|
5081
5130
|
}), index2);
|
|
5082
5131
|
case "select":
|
|
5083
|
-
return /* @__PURE__ */
|
|
5132
|
+
return /* @__PURE__ */ jsx19(SelectContainer, _object_spread_props(_object_spread({}, element), {
|
|
5084
5133
|
direction: direction
|
|
5085
5134
|
}), index2);
|
|
5086
5135
|
case "multiSelect":
|
|
5087
|
-
return /* @__PURE__ */
|
|
5136
|
+
return /* @__PURE__ */ jsx19(MultiSelect, _object_spread_props(_object_spread({}, element), {
|
|
5088
5137
|
direction: direction
|
|
5089
5138
|
}), index2);
|
|
5090
5139
|
case "selectWithSearch":
|
|
5091
|
-
return /* @__PURE__ */
|
|
5140
|
+
return /* @__PURE__ */ jsx19(SelectWithSearch, _object_spread_props(_object_spread({}, element), {
|
|
5092
5141
|
direction: direction
|
|
5093
5142
|
}), index2);
|
|
5094
5143
|
case "internationalPhoneInput":
|
|
5095
|
-
return /* @__PURE__ */
|
|
5144
|
+
return /* @__PURE__ */ jsx19(InternationalPhonePicker, _object_spread_props(_object_spread({}, element), {
|
|
5096
5145
|
direction: direction
|
|
5097
5146
|
}), index2);
|
|
5098
5147
|
case "custom":
|
|
@@ -5104,20 +5153,20 @@ var ModularForm = function(param) {
|
|
|
5104
5153
|
return null;
|
|
5105
5154
|
}
|
|
5106
5155
|
}),
|
|
5107
|
-
/* @__PURE__ */
|
|
5156
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
5108
5157
|
className: "flex justify-between w-full",
|
|
5109
5158
|
children: [
|
|
5110
|
-
/* @__PURE__ */
|
|
5159
|
+
/* @__PURE__ */ jsx19("div", {
|
|
5111
5160
|
title: errorMsg,
|
|
5112
5161
|
className: "text-[#f22] text-[18px] max-w-[80%] ellipsis",
|
|
5113
5162
|
children: errorMsg
|
|
5114
5163
|
}),
|
|
5115
|
-
/* @__PURE__ */
|
|
5164
|
+
/* @__PURE__ */ jsx19("button", {
|
|
5116
5165
|
ref: submitRef,
|
|
5117
5166
|
disabled: isLoading,
|
|
5118
5167
|
className: cn("bg-[#547f22] px-3 py-1 rounded-lg text-white min-w-20", buttonClassName),
|
|
5119
5168
|
type: "submit",
|
|
5120
|
-
children: isLoading ? /* @__PURE__ */
|
|
5169
|
+
children: isLoading ? /* @__PURE__ */ jsx19(Loader, {
|
|
5121
5170
|
size: 25,
|
|
5122
5171
|
color: "#fff"
|
|
5123
5172
|
}) : buttonContent
|
|
@@ -5131,7 +5180,7 @@ var ModularForm_default = ModularForm;
|
|
|
5131
5180
|
// src/components/forms/index.tsx
|
|
5132
5181
|
import { useState as useState9 } from "react";
|
|
5133
5182
|
import moment3 from "moment";
|
|
5134
|
-
import { jsx as
|
|
5183
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5135
5184
|
var ConfirmForm = function(param) {
|
|
5136
5185
|
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;
|
|
5137
5186
|
var onConfirm = /*#__PURE__*/ function() {
|
|
@@ -5214,27 +5263,27 @@ var ConfirmForm = function(param) {
|
|
|
5214
5263
|
return _ref.apply(this, arguments);
|
|
5215
5264
|
};
|
|
5216
5265
|
}();
|
|
5217
|
-
return /* @__PURE__ */
|
|
5266
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
5218
5267
|
style: {
|
|
5219
5268
|
direction: direction,
|
|
5220
5269
|
padding: "30px"
|
|
5221
5270
|
},
|
|
5222
5271
|
className: cn("w-full h-full flex flex-col gap-3", containerClassName),
|
|
5223
5272
|
children: [
|
|
5224
|
-
/* @__PURE__ */
|
|
5273
|
+
/* @__PURE__ */ jsx20("div", {
|
|
5225
5274
|
className: cn("text-lg font-bold", headlineClassName),
|
|
5226
5275
|
children: headline
|
|
5227
5276
|
}),
|
|
5228
|
-
/* @__PURE__ */
|
|
5277
|
+
/* @__PURE__ */ jsxs15("div", {
|
|
5229
5278
|
className: cn("flex justify-center items-center gap-2 w-full", buttonsContainerClassName),
|
|
5230
5279
|
children: [
|
|
5231
|
-
/* @__PURE__ */
|
|
5280
|
+
/* @__PURE__ */ jsx20("button", {
|
|
5232
5281
|
onClick: onDenied,
|
|
5233
|
-
children: /* @__PURE__ */
|
|
5282
|
+
children: /* @__PURE__ */ jsx20(RedXSvg, {})
|
|
5234
5283
|
}),
|
|
5235
|
-
/* @__PURE__ */
|
|
5284
|
+
/* @__PURE__ */ jsx20("button", {
|
|
5236
5285
|
onClick: onConfirm,
|
|
5237
|
-
children: /* @__PURE__ */
|
|
5286
|
+
children: /* @__PURE__ */ jsx20(GreenVSvg, {})
|
|
5238
5287
|
})
|
|
5239
5288
|
]
|
|
5240
5289
|
})
|
|
@@ -5279,19 +5328,19 @@ var DatePicker = function(param) {
|
|
|
5279
5328
|
return _ref.apply(this, arguments);
|
|
5280
5329
|
};
|
|
5281
5330
|
}();
|
|
5282
|
-
return /* @__PURE__ */
|
|
5331
|
+
return /* @__PURE__ */ jsxs15("form", {
|
|
5283
5332
|
style: {
|
|
5284
5333
|
direction: direction
|
|
5285
5334
|
},
|
|
5286
5335
|
onSubmit: onSubmit,
|
|
5287
5336
|
className: cn("w-full h-10 flex justify-start gap-3 items-center ", formClassName),
|
|
5288
5337
|
children: [
|
|
5289
|
-
/* @__PURE__ */
|
|
5338
|
+
/* @__PURE__ */ jsxs15("label", {
|
|
5290
5339
|
className: cn("center text-[14px] relative gap-2", labelsClassName),
|
|
5291
5340
|
htmlFor: "from",
|
|
5292
5341
|
children: [
|
|
5293
5342
|
fromText,
|
|
5294
|
-
/* @__PURE__ */
|
|
5343
|
+
/* @__PURE__ */ jsx20("input", {
|
|
5295
5344
|
className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
|
|
5296
5345
|
type: "date",
|
|
5297
5346
|
name: "from",
|
|
@@ -5299,12 +5348,12 @@ var DatePicker = function(param) {
|
|
|
5299
5348
|
})
|
|
5300
5349
|
]
|
|
5301
5350
|
}),
|
|
5302
|
-
/* @__PURE__ */
|
|
5351
|
+
/* @__PURE__ */ jsxs15("label", {
|
|
5303
5352
|
className: cn("center text-[14px] relative gap-2 ", labelsClassName),
|
|
5304
5353
|
htmlFor: "to",
|
|
5305
5354
|
children: [
|
|
5306
5355
|
toText,
|
|
5307
|
-
/* @__PURE__ */
|
|
5356
|
+
/* @__PURE__ */ jsx20("input", {
|
|
5308
5357
|
className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
|
|
5309
5358
|
type: "date",
|
|
5310
5359
|
name: "to",
|
|
@@ -5312,12 +5361,12 @@ var DatePicker = function(param) {
|
|
|
5312
5361
|
})
|
|
5313
5362
|
]
|
|
5314
5363
|
}),
|
|
5315
|
-
/* @__PURE__ */
|
|
5364
|
+
/* @__PURE__ */ jsx20("button", {
|
|
5316
5365
|
disabled: isLoading,
|
|
5317
5366
|
style: buttonStyle,
|
|
5318
5367
|
className: cn("bg-[#699a2c] text-[#fff] font-[500] w-[75px] h-[27px]", buttonClassName),
|
|
5319
5368
|
type: "submit",
|
|
5320
|
-
children: isLoading ? /* @__PURE__ */
|
|
5369
|
+
children: isLoading ? /* @__PURE__ */ jsx20(Loader, {
|
|
5321
5370
|
className: "pt-[2px]",
|
|
5322
5371
|
size: 20,
|
|
5323
5372
|
color: "#fff"
|
|
@@ -5329,7 +5378,7 @@ var DatePicker = function(param) {
|
|
|
5329
5378
|
// src/components/CodeInput.tsx
|
|
5330
5379
|
import { OTPInput } from "input-otp";
|
|
5331
5380
|
import { useEffect as useEffect6, useRef as useRef5 } from "react";
|
|
5332
|
-
import { jsx as
|
|
5381
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
5333
5382
|
function CodeInput(param) {
|
|
5334
5383
|
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;
|
|
5335
5384
|
var firstInputRef = useRef5(null);
|
|
@@ -5338,9 +5387,9 @@ function CodeInput(param) {
|
|
|
5338
5387
|
firstInputRef.current.focus();
|
|
5339
5388
|
}
|
|
5340
5389
|
}, []);
|
|
5341
|
-
return /* @__PURE__ */
|
|
5390
|
+
return /* @__PURE__ */ jsx21("div", {
|
|
5342
5391
|
className: cn("space-y-2 flex justify-center items-center", className),
|
|
5343
|
-
children: /* @__PURE__ */
|
|
5392
|
+
children: /* @__PURE__ */ jsx21(OTPInput, {
|
|
5344
5393
|
ref: firstInputRef,
|
|
5345
5394
|
value: codeValue,
|
|
5346
5395
|
onChange: function(newVal) {
|
|
@@ -5350,10 +5399,10 @@ function CodeInput(param) {
|
|
|
5350
5399
|
maxLength: 6,
|
|
5351
5400
|
render: function(param) {
|
|
5352
5401
|
var slots = param.slots;
|
|
5353
|
-
return /* @__PURE__ */
|
|
5402
|
+
return /* @__PURE__ */ jsx21("div", {
|
|
5354
5403
|
className: cn("flex gap-5", slotContainerClassName),
|
|
5355
5404
|
children: slots.map(function(slot, idx) {
|
|
5356
|
-
return /* @__PURE__ */
|
|
5405
|
+
return /* @__PURE__ */ jsx21(Slot2, _object_spread({}, slot), idx);
|
|
5357
5406
|
})
|
|
5358
5407
|
});
|
|
5359
5408
|
}
|
|
@@ -5361,14 +5410,14 @@ function CodeInput(param) {
|
|
|
5361
5410
|
});
|
|
5362
5411
|
}
|
|
5363
5412
|
function Slot2(props) {
|
|
5364
|
-
return /* @__PURE__ */
|
|
5413
|
+
return /* @__PURE__ */ jsx21("div", {
|
|
5365
5414
|
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", {
|
|
5366
5415
|
"z-10 border border-ring ring-[3px] ring-ring/20": props.isActive
|
|
5367
5416
|
}),
|
|
5368
|
-
children: props.char !== null && /* @__PURE__ */
|
|
5417
|
+
children: props.char !== null && /* @__PURE__ */ jsx21("div", {
|
|
5369
5418
|
children: props.char
|
|
5370
5419
|
})
|
|
5371
5420
|
});
|
|
5372
5421
|
}
|
|
5373
|
-
export { Badge, BooleanUi, Button, CodeInput, ConfirmForm, DatePicker, DurationUI, ElementLabel, ErrorBoundary, ExportToExcel, Filter, GeoUi, Input, InputContainer, InternationalPhonePicker, Loader, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, getFixedNumber, useDebounce, useSortValues };
|
|
5422
|
+
export { Badge, BooleanUi, Button, Checkbox, CodeInput, ConfirmForm, DatePicker, DurationUI, ElementLabel, ErrorBoundary, ExportToExcel, Filter, GeoUi, Input, InputContainer, InternationalPhonePicker, Loader, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, getFixedNumber, useDebounce, useSortValues };
|
|
5374
5423
|
//# sourceMappingURL=index.mjs.map
|