akeyless-client-commons 1.1.5 → 1.1.6
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 +11 -6
- package/dist/components/index.d.ts +11 -6
- package/dist/components/index.js +14 -0
- package/dist/components/index.mjs +243 -233
- package/package.json +1 -1
|
@@ -1105,7 +1105,7 @@ var Loader = function(param) {
|
|
|
1105
1105
|
});
|
|
1106
1106
|
};
|
|
1107
1107
|
// src/components/utils/global.tsx
|
|
1108
|
-
import { jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1108
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1109
1109
|
var Version = function(param) {
|
|
1110
1110
|
var version = param.version, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
1111
1111
|
return /* @__PURE__ */ jsxs2("div", {
|
|
@@ -1116,9 +1116,19 @@ var Version = function(param) {
|
|
|
1116
1116
|
]
|
|
1117
1117
|
});
|
|
1118
1118
|
};
|
|
1119
|
+
var LeftToRightDiv = function(param) {
|
|
1120
|
+
var direction = param.direction, className = param.className, value = param.value;
|
|
1121
|
+
return /* @__PURE__ */ jsx4("div", {
|
|
1122
|
+
style: {
|
|
1123
|
+
direction: "ltr"
|
|
1124
|
+
},
|
|
1125
|
+
className: cn("_ellipsis ".concat(direction === "rtl" ? "text-right" : "text-left"), className),
|
|
1126
|
+
children: value
|
|
1127
|
+
});
|
|
1128
|
+
};
|
|
1119
1129
|
// src/components/utils/LoginWithGoogle.tsx
|
|
1120
1130
|
import { useState as useState2 } from "react";
|
|
1121
|
-
import { jsx as
|
|
1131
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1122
1132
|
var GoogleSvg = function(param) {
|
|
1123
1133
|
var _param_width = param.width, width = _param_width === void 0 ? "20px" : _param_width, _param_height = param.height, height = _param_height === void 0 ? "20px" : _param_height, _param_viewBox = param.viewBox, viewBox = _param_viewBox === void 0 ? "0 0 256 266" : _param_viewBox;
|
|
1124
1134
|
return /* @__PURE__ */ jsxs3("svg", {
|
|
@@ -1128,19 +1138,19 @@ var GoogleSvg = function(param) {
|
|
|
1128
1138
|
viewBox: viewBox,
|
|
1129
1139
|
preserveAspectRatio: "xMidYMid",
|
|
1130
1140
|
children: [
|
|
1131
|
-
/* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ jsx5("path", {
|
|
1132
1142
|
d: "M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",
|
|
1133
1143
|
fill: "#4285F4"
|
|
1134
1144
|
}),
|
|
1135
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ jsx5("path", {
|
|
1136
1146
|
d: "M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",
|
|
1137
1147
|
fill: "#34A853"
|
|
1138
1148
|
}),
|
|
1139
|
-
/* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ jsx5("path", {
|
|
1140
1150
|
d: "M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",
|
|
1141
1151
|
fill: "#FBBC05"
|
|
1142
1152
|
}),
|
|
1143
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ jsx5("path", {
|
|
1144
1154
|
d: "M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",
|
|
1145
1155
|
fill: "#EB4335"
|
|
1146
1156
|
})
|
|
@@ -1225,7 +1235,7 @@ var LoginWithGoogleButton = function(param) {
|
|
|
1225
1235
|
return _ref.apply(this, arguments);
|
|
1226
1236
|
};
|
|
1227
1237
|
}();
|
|
1228
|
-
return /* @__PURE__ */
|
|
1238
|
+
return /* @__PURE__ */ jsx5("div", {
|
|
1229
1239
|
className: cn("flex justify-center", containerClassName),
|
|
1230
1240
|
children: /* @__PURE__ */ jsxs3("button", _object_spread_props(_object_spread({}, buttonProps), {
|
|
1231
1241
|
type: "button",
|
|
@@ -1236,7 +1246,7 @@ var LoginWithGoogleButton = function(param) {
|
|
|
1236
1246
|
disabled: isLoading,
|
|
1237
1247
|
children: [
|
|
1238
1248
|
label,
|
|
1239
|
-
isLoading ? /* @__PURE__ */
|
|
1249
|
+
isLoading ? /* @__PURE__ */ jsx5(Loader, _object_spread({}, loaderProps)) : /* @__PURE__ */ jsx5(GoogleSvg, _object_spread({}, googleSvgProps))
|
|
1240
1250
|
]
|
|
1241
1251
|
}))
|
|
1242
1252
|
});
|
|
@@ -1244,7 +1254,7 @@ var LoginWithGoogleButton = function(param) {
|
|
|
1244
1254
|
// src/components/table/components.tsx
|
|
1245
1255
|
import { memo, useEffect as useEffect7, useMemo as useMemo6 } from "react";
|
|
1246
1256
|
// src/assets/svg.tsx
|
|
1247
|
-
import { jsx as
|
|
1257
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1248
1258
|
var RedXSvg = function(param) {
|
|
1249
1259
|
var height = param.height, width = param.width, viewBox = param.viewBox;
|
|
1250
1260
|
return /* @__PURE__ */ jsxs4("svg", {
|
|
@@ -1254,11 +1264,11 @@ var RedXSvg = function(param) {
|
|
|
1254
1264
|
viewBox: viewBox || "0 0 32 32",
|
|
1255
1265
|
fill: "none",
|
|
1256
1266
|
children: [
|
|
1257
|
-
/* @__PURE__ */
|
|
1267
|
+
/* @__PURE__ */ jsx6("path", {
|
|
1258
1268
|
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",
|
|
1259
1269
|
fill: "#FF4C2B"
|
|
1260
1270
|
}),
|
|
1261
|
-
/* @__PURE__ */
|
|
1271
|
+
/* @__PURE__ */ jsx6("path", {
|
|
1262
1272
|
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",
|
|
1263
1273
|
fill: "#FF4C2B"
|
|
1264
1274
|
})
|
|
@@ -1267,20 +1277,20 @@ var RedXSvg = function(param) {
|
|
|
1267
1277
|
};
|
|
1268
1278
|
var RedXSvg2 = function(param) {
|
|
1269
1279
|
var height = param.height, width = param.width, viewBox = param.viewBox;
|
|
1270
|
-
return /* @__PURE__ */
|
|
1280
|
+
return /* @__PURE__ */ jsx6("svg", {
|
|
1271
1281
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1272
1282
|
width: width || "18px",
|
|
1273
1283
|
height: height || "18px",
|
|
1274
1284
|
viewBox: viewBox || "0,0,256,256",
|
|
1275
1285
|
fillRule: "nonzero",
|
|
1276
|
-
children: /* @__PURE__ */
|
|
1286
|
+
children: /* @__PURE__ */ jsx6("g", {
|
|
1277
1287
|
fill: "#e90404",
|
|
1278
1288
|
fillRule: "nonzero",
|
|
1279
1289
|
stroke: "none",
|
|
1280
1290
|
strokeWidth: "1",
|
|
1281
|
-
children: /* @__PURE__ */
|
|
1291
|
+
children: /* @__PURE__ */ jsx6("g", {
|
|
1282
1292
|
transform: "scale(10.66667,10.66667)",
|
|
1283
|
-
children: /* @__PURE__ */
|
|
1293
|
+
children: /* @__PURE__ */ jsx6("path", {
|
|
1284
1294
|
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"
|
|
1285
1295
|
})
|
|
1286
1296
|
})
|
|
@@ -1296,11 +1306,11 @@ var GreenVSvg = function(param) {
|
|
|
1296
1306
|
viewBox: viewBox || "0 0 32 32",
|
|
1297
1307
|
fill: "none",
|
|
1298
1308
|
children: [
|
|
1299
|
-
/* @__PURE__ */
|
|
1309
|
+
/* @__PURE__ */ jsx6("path", {
|
|
1300
1310
|
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",
|
|
1301
1311
|
fill: "#3B8F08"
|
|
1302
1312
|
}),
|
|
1303
|
-
/* @__PURE__ */
|
|
1313
|
+
/* @__PURE__ */ jsx6("path", {
|
|
1304
1314
|
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",
|
|
1305
1315
|
fill: "#3B8F08"
|
|
1306
1316
|
})
|
|
@@ -1308,7 +1318,7 @@ var GreenVSvg = function(param) {
|
|
|
1308
1318
|
});
|
|
1309
1319
|
};
|
|
1310
1320
|
// src/assets/table.tsx
|
|
1311
|
-
import { Fragment, jsx as
|
|
1321
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1312
1322
|
var sortSvg = function(upside_down) {
|
|
1313
1323
|
return /* @__PURE__ */ jsxs5("svg", {
|
|
1314
1324
|
style: upside_down ? {
|
|
@@ -1329,7 +1339,7 @@ var sortSvg = function(upside_down) {
|
|
|
1329
1339
|
stroke: "none",
|
|
1330
1340
|
children: [
|
|
1331
1341
|
" ",
|
|
1332
|
-
/* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1333
1343
|
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"
|
|
1334
1344
|
}),
|
|
1335
1345
|
" "
|
|
@@ -1340,7 +1350,7 @@ var sortSvg = function(upside_down) {
|
|
|
1340
1350
|
});
|
|
1341
1351
|
};
|
|
1342
1352
|
var emptyFilterSvg = function(solid) {
|
|
1343
|
-
return /* @__PURE__ */
|
|
1353
|
+
return /* @__PURE__ */ jsx7(Fragment, {
|
|
1344
1354
|
children: solid ? /* @__PURE__ */ jsxs5("svg", {
|
|
1345
1355
|
version: "1.0",
|
|
1346
1356
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1356,7 +1366,7 @@ var emptyFilterSvg = function(solid) {
|
|
|
1356
1366
|
stroke: "none",
|
|
1357
1367
|
children: [
|
|
1358
1368
|
" ",
|
|
1359
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1360
1370
|
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"
|
|
1361
1371
|
}),
|
|
1362
1372
|
" "
|
|
@@ -1379,7 +1389,7 @@ var emptyFilterSvg = function(solid) {
|
|
|
1379
1389
|
stroke: "none",
|
|
1380
1390
|
children: [
|
|
1381
1391
|
" ",
|
|
1382
|
-
/* @__PURE__ */
|
|
1392
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1383
1393
|
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"
|
|
1384
1394
|
}),
|
|
1385
1395
|
" "
|
|
@@ -1391,8 +1401,8 @@ var emptyFilterSvg = function(solid) {
|
|
|
1391
1401
|
});
|
|
1392
1402
|
};
|
|
1393
1403
|
var slashFilterSvg = function(solid) {
|
|
1394
|
-
return /* @__PURE__ */
|
|
1395
|
-
children: solid ? /* @__PURE__ */
|
|
1404
|
+
return /* @__PURE__ */ jsx7(Fragment, {
|
|
1405
|
+
children: solid ? /* @__PURE__ */ jsx7("div", {
|
|
1396
1406
|
className: "mt-[-4px] mr-[-2px] ",
|
|
1397
1407
|
children: /* @__PURE__ */ jsxs5("svg", {
|
|
1398
1408
|
version: "1.0",
|
|
@@ -1409,11 +1419,11 @@ var slashFilterSvg = function(solid) {
|
|
|
1409
1419
|
stroke: "none",
|
|
1410
1420
|
children: [
|
|
1411
1421
|
" ",
|
|
1412
|
-
/* @__PURE__ */
|
|
1422
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1413
1423
|
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"
|
|
1414
1424
|
}),
|
|
1415
1425
|
" ",
|
|
1416
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1417
1427
|
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"
|
|
1418
1428
|
}),
|
|
1419
1429
|
" "
|
|
@@ -1422,7 +1432,7 @@ var slashFilterSvg = function(solid) {
|
|
|
1422
1432
|
" "
|
|
1423
1433
|
]
|
|
1424
1434
|
})
|
|
1425
|
-
}) : /* @__PURE__ */
|
|
1435
|
+
}) : /* @__PURE__ */ jsx7("div", {
|
|
1426
1436
|
className: "mt-[-4px] mr-[-2px] ",
|
|
1427
1437
|
children: /* @__PURE__ */ jsxs5("svg", {
|
|
1428
1438
|
version: "1.0",
|
|
@@ -1439,11 +1449,11 @@ var slashFilterSvg = function(solid) {
|
|
|
1439
1449
|
stroke: "none",
|
|
1440
1450
|
children: [
|
|
1441
1451
|
" ",
|
|
1442
|
-
/* @__PURE__ */
|
|
1452
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1443
1453
|
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"
|
|
1444
1454
|
}),
|
|
1445
1455
|
" ",
|
|
1446
|
-
/* @__PURE__ */
|
|
1456
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1447
1457
|
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"
|
|
1448
1458
|
}),
|
|
1449
1459
|
" "
|
|
@@ -1471,15 +1481,15 @@ var exportToExcelSvg = function(width, height, viewBox) {
|
|
|
1471
1481
|
stroke: "none",
|
|
1472
1482
|
children: [
|
|
1473
1483
|
" ",
|
|
1474
|
-
/* @__PURE__ */
|
|
1484
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1475
1485
|
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"
|
|
1476
1486
|
}),
|
|
1477
1487
|
" ",
|
|
1478
|
-
/* @__PURE__ */
|
|
1488
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1479
1489
|
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"
|
|
1480
1490
|
}),
|
|
1481
1491
|
" ",
|
|
1482
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ jsx7("path", {
|
|
1483
1493
|
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"
|
|
1484
1494
|
}),
|
|
1485
1495
|
" "
|
|
@@ -1496,7 +1506,7 @@ import { debounce, isEqual as isEqual3 } from "lodash";
|
|
|
1496
1506
|
// src/components/table/Table.tsx
|
|
1497
1507
|
import React3, { createContext, useMemo } from "react";
|
|
1498
1508
|
import { isEqual as isEqual2 } from "lodash";
|
|
1499
|
-
import { jsx as
|
|
1509
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1500
1510
|
var TableContext = createContext(null);
|
|
1501
1511
|
var TableProvider = function(props) {
|
|
1502
1512
|
var // basic props
|
|
@@ -1605,9 +1615,9 @@ var TableProvider = function(props) {
|
|
|
1605
1615
|
closeFilterWindow: closeFilterWindow
|
|
1606
1616
|
});
|
|
1607
1617
|
var gapClassName = Boolean(includeSearch || exportToExcelKeys || showDisplayAllRowsButton || optionalElement);
|
|
1608
|
-
return /* @__PURE__ */
|
|
1618
|
+
return /* @__PURE__ */ jsx8(TableContext.Provider, {
|
|
1609
1619
|
value: providerValues,
|
|
1610
|
-
children: /* @__PURE__ */
|
|
1620
|
+
children: /* @__PURE__ */ jsx8("div", {
|
|
1611
1621
|
className: cn("flex flex-col w-full h-full", gapClassName ? "gap-2" : "", containerClassName),
|
|
1612
1622
|
style: _object_spread_props(_object_spread({}, containerStyle), {
|
|
1613
1623
|
direction: direction
|
|
@@ -1629,16 +1639,16 @@ var TableBase = function(props) {
|
|
|
1629
1639
|
/* @__PURE__ */ jsxs6("div", {
|
|
1630
1640
|
className: cn("flex justify-start items-center gap-2", searchContainerClassName),
|
|
1631
1641
|
children: [
|
|
1632
|
-
includeSearch && /* @__PURE__ */
|
|
1633
|
-
exportToExcelKeys && /* @__PURE__ */
|
|
1634
|
-
showDisplayAllRowsButton && /* @__PURE__ */
|
|
1642
|
+
includeSearch && /* @__PURE__ */ jsx8(Search, {}),
|
|
1643
|
+
exportToExcelKeys && /* @__PURE__ */ jsx8(ExportToExcel, {}),
|
|
1644
|
+
showDisplayAllRowsButton && /* @__PURE__ */ jsx8(DisplayAllRowsButton, {}),
|
|
1635
1645
|
optionalElement && optionalElement
|
|
1636
1646
|
]
|
|
1637
1647
|
}),
|
|
1638
|
-
maxRowsLabel1 && maxRowsLabel2 && /* @__PURE__ */
|
|
1648
|
+
maxRowsLabel1 && maxRowsLabel2 && /* @__PURE__ */ jsx8(MaxRowsLabel, {})
|
|
1639
1649
|
]
|
|
1640
1650
|
}),
|
|
1641
|
-
/* @__PURE__ */
|
|
1651
|
+
/* @__PURE__ */ jsx8("div", {
|
|
1642
1652
|
style: _object_spread_props(_object_spread({}, tableContainerStyle || {}), {
|
|
1643
1653
|
direction: direction
|
|
1644
1654
|
}),
|
|
@@ -1647,12 +1657,12 @@ var TableBase = function(props) {
|
|
|
1647
1657
|
style: tableStyle,
|
|
1648
1658
|
className: "min-w-full text-sm relative",
|
|
1649
1659
|
children: [
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
/* @__PURE__ */
|
|
1660
|
+
/* @__PURE__ */ jsx8(TableHead, {}),
|
|
1661
|
+
/* @__PURE__ */ jsx8(TableBody, {})
|
|
1652
1662
|
]
|
|
1653
1663
|
})
|
|
1654
1664
|
}),
|
|
1655
|
-
sumColumns && /* @__PURE__ */
|
|
1665
|
+
sumColumns && /* @__PURE__ */ jsx8(Summary, {})
|
|
1656
1666
|
]
|
|
1657
1667
|
}));
|
|
1658
1668
|
};
|
|
@@ -1784,7 +1794,7 @@ var useSearch = function() {
|
|
|
1784
1794
|
};
|
|
1785
1795
|
// src/components/ui/badge.tsx
|
|
1786
1796
|
import { cva } from "class-variance-authority";
|
|
1787
|
-
import { jsx as
|
|
1797
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1788
1798
|
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", {
|
|
1789
1799
|
variants: {
|
|
1790
1800
|
variant: {
|
|
@@ -1803,7 +1813,7 @@ function Badge(_param) {
|
|
|
1803
1813
|
"className",
|
|
1804
1814
|
"variant"
|
|
1805
1815
|
]);
|
|
1806
|
-
return /* @__PURE__ */
|
|
1816
|
+
return /* @__PURE__ */ jsx9("div", _object_spread({
|
|
1807
1817
|
className: cn(badgeVariants({
|
|
1808
1818
|
variant: variant
|
|
1809
1819
|
}), className)
|
|
@@ -1813,7 +1823,7 @@ function Badge(_param) {
|
|
|
1813
1823
|
import { Slot } from "@radix-ui/react-slot";
|
|
1814
1824
|
import { cva as cva2 } from "class-variance-authority";
|
|
1815
1825
|
import * as React4 from "react";
|
|
1816
|
-
import { jsx as
|
|
1826
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1817
1827
|
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]", {
|
|
1818
1828
|
variants: {
|
|
1819
1829
|
variant: {
|
|
@@ -1844,7 +1854,7 @@ var Button = React4.forwardRef(function(_param, ref) {
|
|
|
1844
1854
|
"asChild"
|
|
1845
1855
|
]);
|
|
1846
1856
|
var Comp = asChild ? Slot : "button";
|
|
1847
|
-
return /* @__PURE__ */
|
|
1857
|
+
return /* @__PURE__ */ jsx10(Comp, _object_spread({
|
|
1848
1858
|
ref: ref,
|
|
1849
1859
|
"data-slot": "button",
|
|
1850
1860
|
className: cn(buttonVariants({
|
|
@@ -1857,13 +1867,13 @@ var Button = React4.forwardRef(function(_param, ref) {
|
|
|
1857
1867
|
Button.displayName = "Button";
|
|
1858
1868
|
// src/components/ui/input.tsx
|
|
1859
1869
|
import * as React5 from "react";
|
|
1860
|
-
import { jsx as
|
|
1870
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1861
1871
|
var Input = React5.forwardRef(function(_param, ref) {
|
|
1862
1872
|
var className = _param.className, type = _param.type, props = _object_without_properties(_param, [
|
|
1863
1873
|
"className",
|
|
1864
1874
|
"type"
|
|
1865
1875
|
]);
|
|
1866
|
-
return /* @__PURE__ */
|
|
1876
|
+
return /* @__PURE__ */ jsx11("input", _object_spread({
|
|
1867
1877
|
type: type,
|
|
1868
1878
|
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),
|
|
1869
1879
|
ref: ref
|
|
@@ -1873,7 +1883,7 @@ Input.displayName = "Input";
|
|
|
1873
1883
|
// src/components/ui/progress.tsx
|
|
1874
1884
|
import * as React6 from "react";
|
|
1875
1885
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
1876
|
-
import { jsx as
|
|
1886
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1877
1887
|
var ProgressComponent = React6.forwardRef(function(_param, ref) {
|
|
1878
1888
|
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, [
|
|
1879
1889
|
"className",
|
|
@@ -1883,18 +1893,18 @@ var ProgressComponent = React6.forwardRef(function(_param, ref) {
|
|
|
1883
1893
|
"showValueClassName",
|
|
1884
1894
|
"showValue"
|
|
1885
1895
|
]);
|
|
1886
|
-
return /* @__PURE__ */
|
|
1896
|
+
return /* @__PURE__ */ jsx12("div", {
|
|
1887
1897
|
className: cn("relative w-full", containerClassName),
|
|
1888
|
-
children: /* @__PURE__ */
|
|
1898
|
+
children: /* @__PURE__ */ jsx12(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
1889
1899
|
ref: ref,
|
|
1890
1900
|
className: cn("w-full h-5 bg-[#e5e7eb] relative overflow-hidden rounded-full", className)
|
|
1891
1901
|
}, props), {
|
|
1892
|
-
children: /* @__PURE__ */
|
|
1902
|
+
children: /* @__PURE__ */ jsx12(ProgressPrimitive.Indicator, {
|
|
1893
1903
|
className: cn("h-full w-full flex-1 bg-[green] transition-all rounded-full", indicatorClassName),
|
|
1894
1904
|
style: {
|
|
1895
1905
|
transform: "translateX(-".concat(100 - (value || 0), "%)")
|
|
1896
1906
|
},
|
|
1897
|
-
children: showValue && /* @__PURE__ */
|
|
1907
|
+
children: showValue && /* @__PURE__ */ jsx12("div", {
|
|
1898
1908
|
className: cn("absolute right-1 top-[-2px] font-medium text-white", showValueClassName),
|
|
1899
1909
|
children: "".concat(value || 0, "%")
|
|
1900
1910
|
})
|
|
@@ -1917,13 +1927,13 @@ import * as React8 from "react";
|
|
|
1917
1927
|
import * as React7 from "react";
|
|
1918
1928
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
1919
1929
|
import { X } from "lucide-react";
|
|
1920
|
-
import { jsx as
|
|
1930
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1921
1931
|
var DialogPortal = DialogPrimitive.Portal;
|
|
1922
1932
|
var DialogOverlay = React7.forwardRef(function(_param, ref) {
|
|
1923
1933
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1924
1934
|
"className"
|
|
1925
1935
|
]);
|
|
1926
|
-
return /* @__PURE__ */
|
|
1936
|
+
return /* @__PURE__ */ jsx13(DialogPrimitive.Overlay, _object_spread({
|
|
1927
1937
|
ref: ref,
|
|
1928
1938
|
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)
|
|
1929
1939
|
}, props));
|
|
@@ -1936,7 +1946,7 @@ var DialogContent = React7.forwardRef(function(_param, ref) {
|
|
|
1936
1946
|
]);
|
|
1937
1947
|
return /* @__PURE__ */ jsxs7(DialogPortal, {
|
|
1938
1948
|
children: [
|
|
1939
|
-
/* @__PURE__ */
|
|
1949
|
+
/* @__PURE__ */ jsx13(DialogOverlay, {}),
|
|
1940
1950
|
/* @__PURE__ */ jsxs7(DialogPrimitive.Content, _object_spread_props(_object_spread({
|
|
1941
1951
|
ref: ref,
|
|
1942
1952
|
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)
|
|
@@ -1946,10 +1956,10 @@ var DialogContent = React7.forwardRef(function(_param, ref) {
|
|
|
1946
1956
|
/* @__PURE__ */ jsxs7(DialogPrimitive.Close, {
|
|
1947
1957
|
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",
|
|
1948
1958
|
children: [
|
|
1949
|
-
/* @__PURE__ */
|
|
1959
|
+
/* @__PURE__ */ jsx13(X, {
|
|
1950
1960
|
className: "h-4 w-4"
|
|
1951
1961
|
}),
|
|
1952
|
-
/* @__PURE__ */
|
|
1962
|
+
/* @__PURE__ */ jsx13("span", {
|
|
1953
1963
|
className: "sr-only",
|
|
1954
1964
|
children: "Close"
|
|
1955
1965
|
})
|
|
@@ -1965,7 +1975,7 @@ var DialogHeader = function(_param) {
|
|
|
1965
1975
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1966
1976
|
"className"
|
|
1967
1977
|
]);
|
|
1968
|
-
return /* @__PURE__ */
|
|
1978
|
+
return /* @__PURE__ */ jsx13("div", _object_spread({
|
|
1969
1979
|
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className)
|
|
1970
1980
|
}, props));
|
|
1971
1981
|
};
|
|
@@ -1974,7 +1984,7 @@ var DialogFooter = function(_param) {
|
|
|
1974
1984
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1975
1985
|
"className"
|
|
1976
1986
|
]);
|
|
1977
|
-
return /* @__PURE__ */
|
|
1987
|
+
return /* @__PURE__ */ jsx13("div", _object_spread({
|
|
1978
1988
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
1979
1989
|
}, props));
|
|
1980
1990
|
};
|
|
@@ -1983,7 +1993,7 @@ var DialogTitle = React7.forwardRef(function(_param, ref) {
|
|
|
1983
1993
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1984
1994
|
"className"
|
|
1985
1995
|
]);
|
|
1986
|
-
return /* @__PURE__ */
|
|
1996
|
+
return /* @__PURE__ */ jsx13(DialogPrimitive.Title, _object_spread({
|
|
1987
1997
|
ref: ref,
|
|
1988
1998
|
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
1989
1999
|
}, props));
|
|
@@ -1993,19 +2003,19 @@ var DialogDescription = React7.forwardRef(function(_param, ref) {
|
|
|
1993
2003
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1994
2004
|
"className"
|
|
1995
2005
|
]);
|
|
1996
|
-
return /* @__PURE__ */
|
|
2006
|
+
return /* @__PURE__ */ jsx13(DialogPrimitive.Description, _object_spread({
|
|
1997
2007
|
ref: ref,
|
|
1998
2008
|
className: cn("text-sm text-muted-foreground", className)
|
|
1999
2009
|
}, props));
|
|
2000
2010
|
});
|
|
2001
2011
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
2002
2012
|
// src/components/ui/command.tsx
|
|
2003
|
-
import { jsx as
|
|
2013
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2004
2014
|
var Command = React8.forwardRef(function(_param, ref) {
|
|
2005
2015
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2006
2016
|
"className"
|
|
2007
2017
|
]);
|
|
2008
|
-
return /* @__PURE__ */
|
|
2018
|
+
return /* @__PURE__ */ jsx14(CommandPrimitive, _object_spread({
|
|
2009
2019
|
ref: ref,
|
|
2010
2020
|
className: cn("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground", className)
|
|
2011
2021
|
}, props));
|
|
@@ -2020,12 +2030,12 @@ var CommandInput = React8.forwardRef(function(_param, ref) {
|
|
|
2020
2030
|
className: "flex items-center border-b border-input px-3",
|
|
2021
2031
|
"cmdk-input-wrapper": "",
|
|
2022
2032
|
children: [
|
|
2023
|
-
withSearchIcon && /* @__PURE__ */
|
|
2033
|
+
withSearchIcon && /* @__PURE__ */ jsx14(Search2, {
|
|
2024
2034
|
size: 20,
|
|
2025
2035
|
strokeWidth: 2,
|
|
2026
2036
|
className: "me-3 text-muted-foreground/80"
|
|
2027
2037
|
}),
|
|
2028
|
-
/* @__PURE__ */
|
|
2038
|
+
/* @__PURE__ */ jsx14(CommandPrimitive.Input, _object_spread({
|
|
2029
2039
|
ref: ref,
|
|
2030
2040
|
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)
|
|
2031
2041
|
}, props))
|
|
@@ -2037,14 +2047,14 @@ var CommandList = React8.forwardRef(function(_param, ref) {
|
|
|
2037
2047
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2038
2048
|
"className"
|
|
2039
2049
|
]);
|
|
2040
|
-
return /* @__PURE__ */
|
|
2050
|
+
return /* @__PURE__ */ jsx14(CommandPrimitive.List, _object_spread({
|
|
2041
2051
|
ref: ref,
|
|
2042
2052
|
className: cn("max-h-80 overflow-y-auto overflow-x-hidden", className)
|
|
2043
2053
|
}, props));
|
|
2044
2054
|
});
|
|
2045
2055
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
2046
2056
|
var CommandEmpty = React8.forwardRef(function(props, ref) {
|
|
2047
|
-
return /* @__PURE__ */
|
|
2057
|
+
return /* @__PURE__ */ jsx14(CommandPrimitive.Empty, _object_spread({
|
|
2048
2058
|
ref: ref,
|
|
2049
2059
|
className: "py-6 text-center text-sm"
|
|
2050
2060
|
}, props));
|
|
@@ -2054,7 +2064,7 @@ var CommandGroup = React8.forwardRef(function(_param, ref) {
|
|
|
2054
2064
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2055
2065
|
"className"
|
|
2056
2066
|
]);
|
|
2057
|
-
return /* @__PURE__ */
|
|
2067
|
+
return /* @__PURE__ */ jsx14(CommandPrimitive.Group, _object_spread({
|
|
2058
2068
|
ref: ref,
|
|
2059
2069
|
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)
|
|
2060
2070
|
}, props));
|
|
@@ -2064,7 +2074,7 @@ var CommandSeparator = React8.forwardRef(function(_param, ref) {
|
|
|
2064
2074
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2065
2075
|
"className"
|
|
2066
2076
|
]);
|
|
2067
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ jsx14(CommandPrimitive.Separator, _object_spread({
|
|
2068
2078
|
ref: ref,
|
|
2069
2079
|
className: cn("-mx-1 h-px bg-border", className)
|
|
2070
2080
|
}, props));
|
|
@@ -2074,7 +2084,7 @@ var CommandItem = React8.forwardRef(function(_param, ref) {
|
|
|
2074
2084
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2075
2085
|
"className"
|
|
2076
2086
|
]);
|
|
2077
|
-
return /* @__PURE__ */
|
|
2087
|
+
return /* @__PURE__ */ jsx14(CommandPrimitive.Item, _object_spread({
|
|
2078
2088
|
ref: ref,
|
|
2079
2089
|
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)
|
|
2080
2090
|
}, props));
|
|
@@ -2084,7 +2094,7 @@ var CommandShortcut = function(_param) {
|
|
|
2084
2094
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2085
2095
|
"className"
|
|
2086
2096
|
]);
|
|
2087
|
-
return /* @__PURE__ */
|
|
2097
|
+
return /* @__PURE__ */ jsx14("kbd", _object_spread({
|
|
2088
2098
|
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)
|
|
2089
2099
|
}, props));
|
|
2090
2100
|
};
|
|
@@ -3922,7 +3932,7 @@ var flip3 = function(options, deps) {
|
|
|
3922
3932
|
});
|
|
3923
3933
|
};
|
|
3924
3934
|
// src/components/ui/multiselect.tsx
|
|
3925
|
-
import { Fragment as Fragment2, jsx as
|
|
3935
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3926
3936
|
var Portal2 = function(param) {
|
|
3927
3937
|
var children = param.children;
|
|
3928
3938
|
return ReactDOM2.createPortal(children, document.body);
|
|
@@ -4007,7 +4017,7 @@ var CommandEmpty2 = forwardRef6(function(_param, forwardedRef) {
|
|
|
4007
4017
|
return state.filtered.count === 0;
|
|
4008
4018
|
});
|
|
4009
4019
|
if (!render) return null;
|
|
4010
|
-
return /* @__PURE__ */
|
|
4020
|
+
return /* @__PURE__ */ jsx15("div", _object_spread({
|
|
4011
4021
|
ref: forwardedRef,
|
|
4012
4022
|
className: cn("px-2 py-4 text-center text-sm", className),
|
|
4013
4023
|
"cmdk-empty": "",
|
|
@@ -4286,7 +4296,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4286
4296
|
})) {
|
|
4287
4297
|
return void 0;
|
|
4288
4298
|
}
|
|
4289
|
-
var Item = /* @__PURE__ */
|
|
4299
|
+
var Item = /* @__PURE__ */ jsx15(CommandItem, {
|
|
4290
4300
|
value: inputValue,
|
|
4291
4301
|
className: "cursor-pointer",
|
|
4292
4302
|
onMouseDown: function(e) {
|
|
@@ -4321,14 +4331,14 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4321
4331
|
var EmptyItem = useCallback4(function() {
|
|
4322
4332
|
if (!emptyIndicator) return void 0;
|
|
4323
4333
|
if (onSearch && !createNewOptionLabel && Object.keys(options).length === 0) {
|
|
4324
|
-
return /* @__PURE__ */
|
|
4334
|
+
return /* @__PURE__ */ jsx15(CommandItem, {
|
|
4325
4335
|
className: "",
|
|
4326
4336
|
value: "-",
|
|
4327
4337
|
disabled: true,
|
|
4328
4338
|
children: emptyIndicator
|
|
4329
4339
|
});
|
|
4330
4340
|
}
|
|
4331
|
-
return /* @__PURE__ */
|
|
4341
|
+
return /* @__PURE__ */ jsx15(CommandEmpty2, {
|
|
4332
4342
|
className: emptyIndicatorClassName,
|
|
4333
4343
|
children: emptyIndicator
|
|
4334
4344
|
});
|
|
@@ -4369,7 +4379,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4369
4379
|
shouldFilter: (commandProps === null || commandProps === void 0 ? void 0 : commandProps.shouldFilter) !== void 0 ? commandProps.shouldFilter : !onSearch,
|
|
4370
4380
|
filter: commandFilter(),
|
|
4371
4381
|
children: [
|
|
4372
|
-
/* @__PURE__ */
|
|
4382
|
+
/* @__PURE__ */ jsx15("div", {
|
|
4373
4383
|
ref: setContainerRef,
|
|
4374
4384
|
className: cn("flex-1 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", {
|
|
4375
4385
|
"p-1": selected.length !== 0,
|
|
@@ -4392,7 +4402,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4392
4402
|
option.label,
|
|
4393
4403
|
!unremovableOptions.find(function(v) {
|
|
4394
4404
|
return isEqual4(v.value, option.value);
|
|
4395
|
-
}) && /* @__PURE__ */
|
|
4405
|
+
}) && /* @__PURE__ */ jsx15("button", {
|
|
4396
4406
|
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",
|
|
4397
4407
|
onKeyDown: function(e) {
|
|
4398
4408
|
if (e.key === "Enter") {
|
|
@@ -4407,7 +4417,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4407
4417
|
return handleUnselect(option);
|
|
4408
4418
|
},
|
|
4409
4419
|
"aria-label": "Remove",
|
|
4410
|
-
children: /* @__PURE__ */
|
|
4420
|
+
children: /* @__PURE__ */ jsx15(X2, {
|
|
4411
4421
|
size: 14,
|
|
4412
4422
|
strokeWidth: 2,
|
|
4413
4423
|
"aria-hidden": "true"
|
|
@@ -4416,7 +4426,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4416
4426
|
]
|
|
4417
4427
|
}, option.value);
|
|
4418
4428
|
}),
|
|
4419
|
-
/* @__PURE__ */
|
|
4429
|
+
/* @__PURE__ */ jsx15(CommandPrimitive2.Input, _object_spread_props(_object_spread({}, inputProps), {
|
|
4420
4430
|
ref: inputRef,
|
|
4421
4431
|
value: inputValue,
|
|
4422
4432
|
disabled: disabled,
|
|
@@ -4447,7 +4457,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4447
4457
|
"ml-1": selected.length !== 0
|
|
4448
4458
|
}, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className)
|
|
4449
4459
|
})),
|
|
4450
|
-
/* @__PURE__ */
|
|
4460
|
+
/* @__PURE__ */ jsx15("button", {
|
|
4451
4461
|
type: "button",
|
|
4452
4462
|
onClick: function() {
|
|
4453
4463
|
setSelected(selected.filter(function(s) {
|
|
@@ -4461,7 +4471,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4461
4471
|
return s.fixed;
|
|
4462
4472
|
}).length === selected.length) && "hidden"),
|
|
4463
4473
|
"aria-label": "Clear all",
|
|
4464
|
-
children: /* @__PURE__ */
|
|
4474
|
+
children: /* @__PURE__ */ jsx15(X2, {
|
|
4465
4475
|
size: 16,
|
|
4466
4476
|
strokeWidth: 2,
|
|
4467
4477
|
"aria-hidden": "true"
|
|
@@ -4470,8 +4480,8 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4470
4480
|
]
|
|
4471
4481
|
})
|
|
4472
4482
|
}),
|
|
4473
|
-
open && /* @__PURE__ */
|
|
4474
|
-
children: /* @__PURE__ */
|
|
4483
|
+
open && /* @__PURE__ */ jsx15(Portal2, {
|
|
4484
|
+
children: /* @__PURE__ */ jsx15("div", {
|
|
4475
4485
|
ref: combinedFloatingRef,
|
|
4476
4486
|
style: {
|
|
4477
4487
|
position: strategy,
|
|
@@ -4481,7 +4491,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4481
4491
|
},
|
|
4482
4492
|
className: cn("z-[9999] overflow-hidden rounded-lg border border-input", dropdownContainerClassName),
|
|
4483
4493
|
"data-state": open ? "open" : "closed",
|
|
4484
|
-
children: /* @__PURE__ */
|
|
4494
|
+
children: /* @__PURE__ */ jsx15(CommandList, {
|
|
4485
4495
|
className: "bg-popover text-popover-foreground shadow-lg shadow-black/5 outline-none",
|
|
4486
4496
|
onMouseLeave: function() {
|
|
4487
4497
|
setOnScrollbar(false);
|
|
@@ -4493,23 +4503,23 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4493
4503
|
var _inputRef_current;
|
|
4494
4504
|
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
4495
4505
|
},
|
|
4496
|
-
children: isLoading ? /* @__PURE__ */
|
|
4506
|
+
children: isLoading ? /* @__PURE__ */ jsx15(Fragment2, {
|
|
4497
4507
|
children: loadingIndicator
|
|
4498
4508
|
}) : /* @__PURE__ */ jsxs9(Fragment2, {
|
|
4499
4509
|
children: [
|
|
4500
4510
|
EmptyItem(),
|
|
4501
4511
|
CreatableItem(),
|
|
4502
|
-
!selectFirstItem && /* @__PURE__ */
|
|
4512
|
+
!selectFirstItem && /* @__PURE__ */ jsx15(CommandItem, {
|
|
4503
4513
|
value: "-",
|
|
4504
4514
|
className: "hidden"
|
|
4505
4515
|
}),
|
|
4506
4516
|
Object.entries(selectables).map(function(param) {
|
|
4507
4517
|
var _param = _sliced_to_array(param, 2), key = _param[0], dropdowns = _param[1];
|
|
4508
|
-
return /* @__PURE__ */
|
|
4518
|
+
return /* @__PURE__ */ jsx15(CommandGroup, {
|
|
4509
4519
|
heading: key,
|
|
4510
4520
|
className: cn("h-full overflow-auto", dropdownClassName),
|
|
4511
4521
|
children: dropdowns.map(function(option) {
|
|
4512
|
-
return /* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsx15(CommandItem, {
|
|
4513
4523
|
value: option.value,
|
|
4514
4524
|
disabled: option.disable,
|
|
4515
4525
|
onMouseDown: function(e) {
|
|
@@ -4545,7 +4555,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4545
4555
|
})
|
|
4546
4556
|
})
|
|
4547
4557
|
}),
|
|
4548
|
-
/* @__PURE__ */
|
|
4558
|
+
/* @__PURE__ */ jsx15("input", {
|
|
4549
4559
|
value: JSON.stringify(selected),
|
|
4550
4560
|
type: "hidden",
|
|
4551
4561
|
name: name
|
|
@@ -4557,16 +4567,16 @@ MultipleSelector.displayName = "MultipleSelector";
|
|
|
4557
4567
|
var multiselect_default = MultipleSelector;
|
|
4558
4568
|
// src/components/ui/popover.tsx
|
|
4559
4569
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4560
|
-
import { jsx as
|
|
4570
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
4561
4571
|
function Popover(_param) {
|
|
4562
4572
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4563
|
-
return /* @__PURE__ */
|
|
4573
|
+
return /* @__PURE__ */ jsx16(PopoverPrimitive.Root, _object_spread({
|
|
4564
4574
|
"data-slot": "popover"
|
|
4565
4575
|
}, props));
|
|
4566
4576
|
}
|
|
4567
4577
|
function PopoverTrigger(_param) {
|
|
4568
4578
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4569
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ jsx16(PopoverPrimitive.Trigger, _object_spread({
|
|
4570
4580
|
"data-slot": "popover-trigger"
|
|
4571
4581
|
}, props));
|
|
4572
4582
|
}
|
|
@@ -4577,7 +4587,7 @@ function PopoverContent(_param) {
|
|
|
4577
4587
|
"sideOffset",
|
|
4578
4588
|
"showArrow"
|
|
4579
4589
|
]);
|
|
4580
|
-
return /* @__PURE__ */
|
|
4590
|
+
return /* @__PURE__ */ jsx16(PopoverPrimitive.Portal, {
|
|
4581
4591
|
children: /* @__PURE__ */ jsxs10(PopoverPrimitive.Content, _object_spread_props(_object_spread({
|
|
4582
4592
|
"data-slot": "popover-content",
|
|
4583
4593
|
align: align,
|
|
@@ -4586,7 +4596,7 @@ function PopoverContent(_param) {
|
|
|
4586
4596
|
}, props), {
|
|
4587
4597
|
children: [
|
|
4588
4598
|
props.children,
|
|
4589
|
-
showArrow && /* @__PURE__ */
|
|
4599
|
+
showArrow && /* @__PURE__ */ jsx16(PopoverPrimitive.Arrow, {
|
|
4590
4600
|
className: "fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]"
|
|
4591
4601
|
})
|
|
4592
4602
|
]
|
|
@@ -4596,7 +4606,7 @@ function PopoverContent(_param) {
|
|
|
4596
4606
|
// src/components/ui/SearchSelect.tsx
|
|
4597
4607
|
import { CheckIcon, ChevronDownIcon } from "lucide-react";
|
|
4598
4608
|
import { useCallback as useCallback5, useEffect as useEffect6, useId, useMemo as useMemo5, useState as useState6 } from "react";
|
|
4599
|
-
import { jsx as
|
|
4609
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4600
4610
|
function SearchSelect(param) {
|
|
4601
4611
|
var options = param.options, name = param.name, _param_selectPlaceholder = param.selectPlaceholder, selectPlaceholder = _param_selectPlaceholder === void 0 ? "Select" : _param_selectPlaceholder, defaultValue = param.defaultValue, _param_searchPlaceholder = param.searchPlaceholder, searchPlaceholder = _param_searchPlaceholder === void 0 ? "Search" : _param_searchPlaceholder, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, notFoundLabel = param.notFoundLabel, notFoundLabelClassName = param.notFoundLabelClassName, elementClassName = param.elementClassName, searchClassName = param.searchClassName, buttonClassName = param.buttonClassName, buttonFocusClassName = param.buttonFocusClassName, value = param.value, disabled = param.disabled, onChange = param.onChange, direction = param.direction, createNewOptionLabel = param.createNewOptionLabel, createNewOptionContainerClassName = param.createNewOptionContainerClassName;
|
|
4602
4612
|
var id = useId();
|
|
@@ -4671,7 +4681,7 @@ function SearchSelect(param) {
|
|
|
4671
4681
|
if (!isOpen) setSearchQuery("");
|
|
4672
4682
|
},
|
|
4673
4683
|
children: [
|
|
4674
|
-
/* @__PURE__ */
|
|
4684
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, {
|
|
4675
4685
|
asChild: true,
|
|
4676
4686
|
children: /* @__PURE__ */ jsxs11(Button, {
|
|
4677
4687
|
id: id,
|
|
@@ -4681,11 +4691,11 @@ function SearchSelect(param) {
|
|
|
4681
4691
|
disabled: disabled,
|
|
4682
4692
|
className: cn("border-input w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]", buttonClassName, open && buttonFocusClassName),
|
|
4683
4693
|
children: [
|
|
4684
|
-
/* @__PURE__ */
|
|
4694
|
+
/* @__PURE__ */ jsx17("span", {
|
|
4685
4695
|
className: cn("truncate", !selectedValue && "text-muted-foreground"),
|
|
4686
4696
|
children: selectLabel
|
|
4687
4697
|
}),
|
|
4688
|
-
/* @__PURE__ */
|
|
4698
|
+
/* @__PURE__ */ jsx17(ChevronDownIcon, {
|
|
4689
4699
|
size: 16,
|
|
4690
4700
|
className: "text-muted-foreground/80 shrink-0",
|
|
4691
4701
|
"aria-hidden": "true"
|
|
@@ -4693,12 +4703,12 @@ function SearchSelect(param) {
|
|
|
4693
4703
|
]
|
|
4694
4704
|
})
|
|
4695
4705
|
}),
|
|
4696
|
-
/* @__PURE__ */
|
|
4706
|
+
/* @__PURE__ */ jsx17(PopoverContent, {
|
|
4697
4707
|
className: cn("border-input w-full min-w-[var(--radix-popper-anchor-width)] p-0 bg-[#fff]"),
|
|
4698
4708
|
align: "start",
|
|
4699
4709
|
children: /* @__PURE__ */ jsxs11(Command, {
|
|
4700
4710
|
children: [
|
|
4701
|
-
/* @__PURE__ */
|
|
4711
|
+
/* @__PURE__ */ jsx17(CommandInput, {
|
|
4702
4712
|
style: {
|
|
4703
4713
|
direction: direction
|
|
4704
4714
|
},
|
|
@@ -4714,21 +4724,21 @@ function SearchSelect(param) {
|
|
|
4714
4724
|
}
|
|
4715
4725
|
}
|
|
4716
4726
|
}),
|
|
4717
|
-
/* @__PURE__ */
|
|
4718
|
-
children: filteredOptions.length === 0 && searchQuery !== "" ? createNewOptionLabel ? /* @__PURE__ */
|
|
4727
|
+
/* @__PURE__ */ jsx17(CommandList, {
|
|
4728
|
+
children: filteredOptions.length === 0 && searchQuery !== "" ? createNewOptionLabel ? /* @__PURE__ */ jsx17(CommandEmpty, {
|
|
4719
4729
|
style: {
|
|
4720
4730
|
direction: direction
|
|
4721
4731
|
},
|
|
4722
4732
|
onClick: addNewOption,
|
|
4723
4733
|
className: cn("hover:bg-[#cccbcb] cursor-pointer w-full", createNewOptionContainerClassName),
|
|
4724
|
-
children: /* @__PURE__ */
|
|
4734
|
+
children: /* @__PURE__ */ jsx17("div", {
|
|
4725
4735
|
className: cn("w-full h-10 flex items-center px-2", notFoundLabelClassName),
|
|
4726
4736
|
children: "".concat(createNewOptionLabel, " : ").concat(searchQuery)
|
|
4727
4737
|
})
|
|
4728
|
-
}) : /* @__PURE__ */
|
|
4738
|
+
}) : /* @__PURE__ */ jsx17(CommandEmpty, {
|
|
4729
4739
|
className: cn("w-full py-2 text-center", notFoundLabelClassName),
|
|
4730
4740
|
children: notFoundLabel
|
|
4731
|
-
}) : /* @__PURE__ */
|
|
4741
|
+
}) : /* @__PURE__ */ jsx17(CommandGroup, {
|
|
4732
4742
|
className: cn("max-h-52 overflow-y-auto", dropdownClassName),
|
|
4733
4743
|
children: filteredOptions.map(function(option) {
|
|
4734
4744
|
return /* @__PURE__ */ jsxs11(CommandItem, {
|
|
@@ -4746,7 +4756,7 @@ function SearchSelect(param) {
|
|
|
4746
4756
|
},
|
|
4747
4757
|
children: [
|
|
4748
4758
|
option.label,
|
|
4749
|
-
selectedValue === option.value && /* @__PURE__ */
|
|
4759
|
+
selectedValue === option.value && /* @__PURE__ */ jsx17(CheckIcon, {
|
|
4750
4760
|
size: 16,
|
|
4751
4761
|
className: "me-auto"
|
|
4752
4762
|
})
|
|
@@ -4760,7 +4770,7 @@ function SearchSelect(param) {
|
|
|
4760
4770
|
})
|
|
4761
4771
|
]
|
|
4762
4772
|
}),
|
|
4763
|
-
/* @__PURE__ */
|
|
4773
|
+
/* @__PURE__ */ jsx17("input", {
|
|
4764
4774
|
name: name,
|
|
4765
4775
|
type: "hidden",
|
|
4766
4776
|
value: selectedValue
|
|
@@ -4848,7 +4858,7 @@ var exportToExcel = /*#__PURE__*/ function() {
|
|
|
4848
4858
|
};
|
|
4849
4859
|
}();
|
|
4850
4860
|
// src/components/table/components.tsx
|
|
4851
|
-
import { Fragment as Fragment3, jsx as
|
|
4861
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4852
4862
|
var Filter = memo(function(param) {
|
|
4853
4863
|
var filterableColumn = param.filterableColumn, index2 = param.index;
|
|
4854
4864
|
var _filters_filterableColumn_dataKey, _filters_filterableColumn_dataKey1, _filterOptions_filterableColumn_dataKey;
|
|
@@ -4857,27 +4867,27 @@ var Filter = memo(function(param) {
|
|
|
4857
4867
|
return /* @__PURE__ */ jsxs12("div", {
|
|
4858
4868
|
className: "absolute top-1 right-1 ",
|
|
4859
4869
|
children: [
|
|
4860
|
-
/* @__PURE__ */
|
|
4870
|
+
/* @__PURE__ */ jsx18("button", {
|
|
4861
4871
|
title: filterLabel + " " + filterableColumn.header,
|
|
4862
4872
|
className: "text-[12px]",
|
|
4863
4873
|
onClick: function() {
|
|
4864
4874
|
return handleFilterClick(filterableColumn.dataKey);
|
|
4865
4875
|
},
|
|
4866
|
-
children: filterPopupsDisplay === filterableColumn.dataKey ? /* @__PURE__ */
|
|
4867
|
-
children: ((_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.length) > 0 ? /* @__PURE__ */
|
|
4876
|
+
children: filterPopupsDisplay === filterableColumn.dataKey ? /* @__PURE__ */ jsx18(Fragment3, {
|
|
4877
|
+
children: ((_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.length) > 0 ? /* @__PURE__ */ jsx18(Fragment3, {
|
|
4868
4878
|
children: slashFilterSvg(true)
|
|
4869
|
-
}) : /* @__PURE__ */
|
|
4879
|
+
}) : /* @__PURE__ */ jsx18(Fragment3, {
|
|
4870
4880
|
children: emptyFilterSvg(true)
|
|
4871
4881
|
})
|
|
4872
|
-
}) : /* @__PURE__ */
|
|
4873
|
-
children: ((_filters_filterableColumn_dataKey1 = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey1 === void 0 ? void 0 : _filters_filterableColumn_dataKey1.length) > 0 ? /* @__PURE__ */
|
|
4882
|
+
}) : /* @__PURE__ */ jsx18(Fragment3, {
|
|
4883
|
+
children: ((_filters_filterableColumn_dataKey1 = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey1 === void 0 ? void 0 : _filters_filterableColumn_dataKey1.length) > 0 ? /* @__PURE__ */ jsx18(Fragment3, {
|
|
4874
4884
|
children: slashFilterSvg()
|
|
4875
|
-
}) : /* @__PURE__ */
|
|
4885
|
+
}) : /* @__PURE__ */ jsx18(Fragment3, {
|
|
4876
4886
|
children: emptyFilterSvg()
|
|
4877
4887
|
})
|
|
4878
4888
|
})
|
|
4879
4889
|
}),
|
|
4880
|
-
/* @__PURE__ */
|
|
4890
|
+
/* @__PURE__ */ jsx18("div", {
|
|
4881
4891
|
className: "relative",
|
|
4882
4892
|
children: filterPopupsDisplay === filterableColumn.dataKey && /* @__PURE__ */ jsxs12("div", {
|
|
4883
4893
|
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"),
|
|
@@ -4885,17 +4895,17 @@ var Filter = memo(function(param) {
|
|
|
4885
4895
|
/* @__PURE__ */ jsxs12("div", {
|
|
4886
4896
|
className: "flex justify-between items-center border-black border-b-[1px] w-[90%]",
|
|
4887
4897
|
children: [
|
|
4888
|
-
/* @__PURE__ */
|
|
4898
|
+
/* @__PURE__ */ jsx18("div", {
|
|
4889
4899
|
className: "text-start",
|
|
4890
4900
|
children: filterLabel + " " + filterableColumn.header
|
|
4891
4901
|
}),
|
|
4892
|
-
/* @__PURE__ */
|
|
4902
|
+
/* @__PURE__ */ jsx18("button", {
|
|
4893
4903
|
onClick: closeFilterWindow,
|
|
4894
|
-
children: /* @__PURE__ */
|
|
4904
|
+
children: /* @__PURE__ */ jsx18(RedXSvg2, {})
|
|
4895
4905
|
})
|
|
4896
4906
|
]
|
|
4897
4907
|
}),
|
|
4898
|
-
/* @__PURE__ */
|
|
4908
|
+
/* @__PURE__ */ jsx18("div", {
|
|
4899
4909
|
className: "overflow-auto h-[80%] flex flex-col gap-1 w-full cursor-pointer ",
|
|
4900
4910
|
children: (_filterOptions_filterableColumn_dataKey = filterOptions[filterableColumn.dataKey]) === null || _filterOptions_filterableColumn_dataKey === void 0 ? void 0 : _filterOptions_filterableColumn_dataKey.sort(function(a, b) {
|
|
4901
4911
|
return a.localeCompare(b);
|
|
@@ -4904,7 +4914,7 @@ var Filter = memo(function(param) {
|
|
|
4904
4914
|
return /* @__PURE__ */ jsxs12("div", {
|
|
4905
4915
|
className: "flex items-center px-2 justify-start hover:bg-[#547f22] hover:text-white",
|
|
4906
4916
|
children: [
|
|
4907
|
-
/* @__PURE__ */
|
|
4917
|
+
/* @__PURE__ */ jsx18("input", {
|
|
4908
4918
|
type: "checkbox",
|
|
4909
4919
|
className: "cursor-pointer",
|
|
4910
4920
|
checked: (_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.includes(option),
|
|
@@ -4912,7 +4922,7 @@ var Filter = memo(function(param) {
|
|
|
4912
4922
|
return handleFilterChange(filterableColumn.dataKey, option);
|
|
4913
4923
|
}
|
|
4914
4924
|
}),
|
|
4915
|
-
/* @__PURE__ */
|
|
4925
|
+
/* @__PURE__ */ jsx18("button", {
|
|
4916
4926
|
className: "flex-1 text-start px-2",
|
|
4917
4927
|
onClick: function() {
|
|
4918
4928
|
return handleFilterChange(filterableColumn.dataKey, option);
|
|
@@ -4934,16 +4944,16 @@ var MaxRowsLabel = memo(function() {
|
|
|
4934
4944
|
return /* @__PURE__ */ jsxs12("div", {
|
|
4935
4945
|
className: cn("flex justify-start items-center text-lg gap-1", maxRowsContainerClassName || ""),
|
|
4936
4946
|
children: [
|
|
4937
|
-
/* @__PURE__ */
|
|
4947
|
+
/* @__PURE__ */ jsx18("div", {
|
|
4938
4948
|
children: maxRowsLabel1
|
|
4939
4949
|
}),
|
|
4940
|
-
/* @__PURE__ */
|
|
4950
|
+
/* @__PURE__ */ jsx18("div", {
|
|
4941
4951
|
children: displayAllRows || maxRows > dataToRender.renderedData.length ? dataToRender.renderedData.length : maxRows
|
|
4942
4952
|
}),
|
|
4943
|
-
/* @__PURE__ */
|
|
4953
|
+
/* @__PURE__ */ jsx18("div", {
|
|
4944
4954
|
children: maxRowsLabel2
|
|
4945
4955
|
}),
|
|
4946
|
-
/* @__PURE__ */
|
|
4956
|
+
/* @__PURE__ */ jsx18("div", {
|
|
4947
4957
|
children: dataToRender.filtered.length
|
|
4948
4958
|
})
|
|
4949
4959
|
]
|
|
@@ -5037,7 +5047,7 @@ var ExportToExcel = memo(function() {
|
|
|
5037
5047
|
return _ref.apply(this, arguments);
|
|
5038
5048
|
};
|
|
5039
5049
|
}();
|
|
5040
|
-
return /* @__PURE__ */
|
|
5050
|
+
return /* @__PURE__ */ jsx18("button", {
|
|
5041
5051
|
onClick: onExportExcelClick,
|
|
5042
5052
|
title: exportExcelTitle,
|
|
5043
5053
|
className: cn("px-2 py-[2px] bg-[#547f22] text-white rounded-lg text-[16px]", exportToExcelClassName),
|
|
@@ -5046,7 +5056,7 @@ var ExportToExcel = memo(function() {
|
|
|
5046
5056
|
}, renderOnce);
|
|
5047
5057
|
var Search = memo(function() {
|
|
5048
5058
|
var _useTableContext = useTableContext(), searchQuery = _useTableContext.searchQuery, handleSearch = _useTableContext.handleSearch, searchPlaceHolder = _useTableContext.searchPlaceHolder, searchInputClassName = _useTableContext.searchInputClassName, searchInputStyle = _useTableContext.searchInputStyle;
|
|
5049
|
-
return /* @__PURE__ */
|
|
5059
|
+
return /* @__PURE__ */ jsx18("input", {
|
|
5050
5060
|
className: cn("border-black border-[1px] text-lg px-2 w-11/12", searchInputClassName),
|
|
5051
5061
|
type: "search",
|
|
5052
5062
|
placeholder: searchPlaceHolder,
|
|
@@ -5062,9 +5072,9 @@ var TableHead = memo(function() {
|
|
|
5062
5072
|
}, [
|
|
5063
5073
|
sortKeys
|
|
5064
5074
|
]);
|
|
5065
|
-
return /* @__PURE__ */
|
|
5075
|
+
return /* @__PURE__ */ jsx18("thead", {
|
|
5066
5076
|
className: cn("bg-black/50 text-white sticky z-10 top-0", headerClassName),
|
|
5067
|
-
children: /* @__PURE__ */
|
|
5077
|
+
children: /* @__PURE__ */ jsx18("tr", {
|
|
5068
5078
|
style: headerStyle,
|
|
5069
5079
|
children: headers.map(function(header, index2) {
|
|
5070
5080
|
var filterableColumn = filterableColumns.find(function(col) {
|
|
@@ -5075,19 +5085,19 @@ var TableHead = memo(function() {
|
|
|
5075
5085
|
style: headerCellStyle,
|
|
5076
5086
|
className: cn("px-2 text-center h-6 relative w-fit max-w-[130px]", headerCellClassName),
|
|
5077
5087
|
children: [
|
|
5078
|
-
/* @__PURE__ */
|
|
5088
|
+
/* @__PURE__ */ jsx18("div", {
|
|
5079
5089
|
className: "px-2 ".concat(sortDisplay ? "cursor-pointer" : ""),
|
|
5080
5090
|
onClick: function() {
|
|
5081
5091
|
return sortDisplay && handleSort(index2);
|
|
5082
5092
|
},
|
|
5083
5093
|
children: header
|
|
5084
5094
|
}),
|
|
5085
|
-
sortDisplay && sortColumn === index2 && (sortOrder === "desc" ? /* @__PURE__ */
|
|
5095
|
+
sortDisplay && sortColumn === index2 && (sortOrder === "desc" ? /* @__PURE__ */ jsx18(Fragment3, {
|
|
5086
5096
|
children: sortSvg()
|
|
5087
|
-
}) : /* @__PURE__ */
|
|
5097
|
+
}) : /* @__PURE__ */ jsx18(Fragment3, {
|
|
5088
5098
|
children: sortSvg(true)
|
|
5089
5099
|
})),
|
|
5090
|
-
filterableColumn && /* @__PURE__ */
|
|
5100
|
+
filterableColumn && /* @__PURE__ */ jsx18(Filter, {
|
|
5091
5101
|
filterableColumn: filterableColumn,
|
|
5092
5102
|
index: index2
|
|
5093
5103
|
})
|
|
@@ -5099,10 +5109,10 @@ var TableHead = memo(function() {
|
|
|
5099
5109
|
}, renderOnce);
|
|
5100
5110
|
var TableBody = memo(function() {
|
|
5101
5111
|
var _useTableContext = useTableContext(), dataToRender = _useTableContext.dataToRender, tableBodyClassName = _useTableContext.tableBodyClassName;
|
|
5102
|
-
return /* @__PURE__ */
|
|
5112
|
+
return /* @__PURE__ */ jsx18("tbody", {
|
|
5103
5113
|
className: cn("divide-y divide-gray-600", tableBodyClassName),
|
|
5104
5114
|
children: dataToRender.renderedData.map(function(item, index2) {
|
|
5105
|
-
return /* @__PURE__ */
|
|
5115
|
+
return /* @__PURE__ */ jsx18(TableRow2, {
|
|
5106
5116
|
item: item,
|
|
5107
5117
|
index: index2
|
|
5108
5118
|
}, index2);
|
|
@@ -5113,7 +5123,7 @@ var TableRow2 = function(param) {
|
|
|
5113
5123
|
var item = param.item, index2 = param.index;
|
|
5114
5124
|
var _useTableContext = useTableContext(), rowStyles = _useTableContext.rowStyles, _useTableContext_rowClassName = _useTableContext.rowClassName, rowClassName = _useTableContext_rowClassName === void 0 ? "" : _useTableContext_rowClassName, keysToRender = _useTableContext.keysToRender, onRowClick = _useTableContext.onRowClick, zebraStriping = _useTableContext.zebraStriping, selectedRow = _useTableContext.selectedRow, rowClassNameFunction = _useTableContext.rowClassNameFunction;
|
|
5115
5125
|
var zebraClassName = zebraStriping ? index2 % 2 === 0 ? zebraStriping.evenRowClassName || "" : zebraStriping.oddRowClassName || "bg-gray-300" : "";
|
|
5116
|
-
return /* @__PURE__ */
|
|
5126
|
+
return /* @__PURE__ */ jsx18("tr", {
|
|
5117
5127
|
className: cn("hover:bg-[#808080] hover:text-[#fff]", zebraClassName, rowClassName, (rowClassNameFunction === null || rowClassNameFunction === void 0 ? void 0 : rowClassNameFunction(item)) || "", (selectedRow === null || selectedRow === void 0 ? void 0 : selectedRow.rowIndex) === index2 ? (selectedRow === null || selectedRow === void 0 ? void 0 : selectedRow.className) || "" : ""),
|
|
5118
5128
|
onClick: function() {
|
|
5119
5129
|
(selectedRow === null || selectedRow === void 0 ? void 0 : selectedRow.onChange) && selectedRow.onChange(index2);
|
|
@@ -5121,7 +5131,7 @@ var TableRow2 = function(param) {
|
|
|
5121
5131
|
},
|
|
5122
5132
|
style: rowStyles,
|
|
5123
5133
|
children: keysToRender.map(function(key, index3) {
|
|
5124
|
-
return /* @__PURE__ */
|
|
5134
|
+
return /* @__PURE__ */ jsx18(TableCell, {
|
|
5125
5135
|
value: item[key]
|
|
5126
5136
|
}, index3);
|
|
5127
5137
|
})
|
|
@@ -5130,7 +5140,7 @@ var TableRow2 = function(param) {
|
|
|
5130
5140
|
var TableCell = function(param) {
|
|
5131
5141
|
var value = param.value;
|
|
5132
5142
|
var _useTableContext = useTableContext(), cellStyle = _useTableContext.cellStyle, cellClassName = _useTableContext.cellClassName;
|
|
5133
|
-
return /* @__PURE__ */
|
|
5143
|
+
return /* @__PURE__ */ jsx18("td", {
|
|
5134
5144
|
title: [
|
|
5135
5145
|
"string",
|
|
5136
5146
|
"number",
|
|
@@ -5149,11 +5159,11 @@ var Summary = memo(function() {
|
|
|
5149
5159
|
}),
|
|
5150
5160
|
className: "w-full h-8 flex justify-between items-center px-3 text-[18px] font-bold",
|
|
5151
5161
|
children: [
|
|
5152
|
-
/* @__PURE__ */
|
|
5162
|
+
/* @__PURE__ */ jsx18("div", {
|
|
5153
5163
|
style: summaryLabelStyle,
|
|
5154
5164
|
children: summaryLabel
|
|
5155
5165
|
}),
|
|
5156
|
-
/* @__PURE__ */
|
|
5166
|
+
/* @__PURE__ */ jsx18("div", {
|
|
5157
5167
|
style: summaryRowStyle,
|
|
5158
5168
|
className: "flex gap-3",
|
|
5159
5169
|
children: sumColumns.map(function(val) {
|
|
@@ -5164,13 +5174,13 @@ var Summary = memo(function() {
|
|
|
5164
5174
|
return /* @__PURE__ */ jsxs12("div", {
|
|
5165
5175
|
className: "flex gap-1 justify-start",
|
|
5166
5176
|
children: [
|
|
5167
|
-
/* @__PURE__ */
|
|
5177
|
+
/* @__PURE__ */ jsx18("div", {
|
|
5168
5178
|
children: val.label
|
|
5169
5179
|
}),
|
|
5170
|
-
/* @__PURE__ */
|
|
5180
|
+
/* @__PURE__ */ jsx18("span", {
|
|
5171
5181
|
children: ":"
|
|
5172
5182
|
}),
|
|
5173
|
-
/* @__PURE__ */
|
|
5183
|
+
/* @__PURE__ */ jsx18("div", {
|
|
5174
5184
|
children: val.ui ? val.ui(sum_value) : sum_value
|
|
5175
5185
|
})
|
|
5176
5186
|
]
|
|
@@ -5188,7 +5198,7 @@ var TimesUI = function(param) {
|
|
|
5188
5198
|
tz: tz,
|
|
5189
5199
|
defaultReturnedValue: defaultReturnedValue
|
|
5190
5200
|
});
|
|
5191
|
-
return /* @__PURE__ */
|
|
5201
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
5192
5202
|
style: {
|
|
5193
5203
|
direction: "ltr"
|
|
5194
5204
|
},
|
|
@@ -5205,27 +5215,27 @@ var TableButton = function(param) {
|
|
|
5205
5215
|
delete: "fa-light fa-trash"
|
|
5206
5216
|
};
|
|
5207
5217
|
var baseClassName = "transition-transform duration-500 scale-100 disabled:hover:cursor-not-allowed disabled:text-black/40 hover:scale-110 disabled:hover:scale-100";
|
|
5208
|
-
return /* @__PURE__ */
|
|
5209
|
-
children: type === "custom" ? /* @__PURE__ */
|
|
5218
|
+
return /* @__PURE__ */ jsx18(Fragment3, {
|
|
5219
|
+
children: type === "custom" ? /* @__PURE__ */ jsx18("button", {
|
|
5210
5220
|
disabled: disabled,
|
|
5211
5221
|
className: cn(baseClassName, className, buttonClassName),
|
|
5212
5222
|
title: title,
|
|
5213
5223
|
onClick: onClick,
|
|
5214
5224
|
children: children
|
|
5215
|
-
}) : type === "add" ? /* @__PURE__ */
|
|
5225
|
+
}) : type === "add" ? /* @__PURE__ */ jsx18(Button, {
|
|
5216
5226
|
disabled: disabled,
|
|
5217
5227
|
className: cn(baseClassName, buttonClassName),
|
|
5218
5228
|
title: title,
|
|
5219
5229
|
onClick: onClick,
|
|
5220
|
-
children: /* @__PURE__ */
|
|
5230
|
+
children: /* @__PURE__ */ jsx18("i", {
|
|
5221
5231
|
className: cn("fa-light fa-plus text-2xl", className)
|
|
5222
5232
|
})
|
|
5223
|
-
}) : /* @__PURE__ */
|
|
5233
|
+
}) : /* @__PURE__ */ jsx18("button", {
|
|
5224
5234
|
disabled: disabled,
|
|
5225
5235
|
className: cn(baseClassName, buttonClassName),
|
|
5226
5236
|
title: title,
|
|
5227
5237
|
onClick: onClick,
|
|
5228
|
-
children: /* @__PURE__ */
|
|
5238
|
+
children: /* @__PURE__ */ jsx18("i", {
|
|
5229
5239
|
className: cn(icon[type], className)
|
|
5230
5240
|
})
|
|
5231
5241
|
})
|
|
@@ -5309,7 +5319,7 @@ var PhoneUI = function(param) {
|
|
|
5309
5319
|
useEffect7(function() {
|
|
5310
5320
|
var dir = document.body.style.direction;
|
|
5311
5321
|
}, []);
|
|
5312
|
-
return /* @__PURE__ */
|
|
5322
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
5313
5323
|
style: {
|
|
5314
5324
|
direction: "ltr"
|
|
5315
5325
|
},
|
|
@@ -5320,9 +5330,9 @@ var PhoneUI = function(param) {
|
|
|
5320
5330
|
};
|
|
5321
5331
|
var BooleanUi = function(param) {
|
|
5322
5332
|
var value = param.value, size3 = param.size, className = param.className, falseUi = param.falseUi, trueUi = param.trueUi;
|
|
5323
|
-
return value ? trueUi !== null && trueUi !== void 0 ? trueUi : /* @__PURE__ */
|
|
5333
|
+
return value ? trueUi !== null && trueUi !== void 0 ? trueUi : /* @__PURE__ */ jsx18("i", {
|
|
5324
5334
|
className: cn("fa-light fa-check ".concat(size3 === "small" ? "text-lg" : "text-2xl"), className)
|
|
5325
|
-
}) : falseUi !== null && falseUi !== void 0 ? falseUi : /* @__PURE__ */
|
|
5335
|
+
}) : falseUi !== null && falseUi !== void 0 ? falseUi : /* @__PURE__ */ jsx18("i", {
|
|
5326
5336
|
className: cn("fa-light fa-xmark ".concat(size3 === "small" ? "text-lg" : "text-2xl"), className)
|
|
5327
5337
|
});
|
|
5328
5338
|
};
|
|
@@ -5332,7 +5342,7 @@ var GeoUi = function(param) {
|
|
|
5332
5342
|
var lat = value.lat || value.latitude;
|
|
5333
5343
|
var googleMapsLink = getLocationUrl(lang, lat);
|
|
5334
5344
|
var langLatUi = linkUi || " ".concat(lang, " ").concat(lat);
|
|
5335
|
-
return /* @__PURE__ */
|
|
5345
|
+
return /* @__PURE__ */ jsx18("a", {
|
|
5336
5346
|
href: googleMapsLink,
|
|
5337
5347
|
target: "_blank",
|
|
5338
5348
|
className: cn("_ellipsis text-blue-500 hover:text-blue-700 underline", className),
|
|
@@ -5342,7 +5352,7 @@ var GeoUi = function(param) {
|
|
|
5342
5352
|
};
|
|
5343
5353
|
var NumberUI = function(param) {
|
|
5344
5354
|
var number = param.number, direction = param.direction, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
5345
|
-
return /* @__PURE__ */
|
|
5355
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
5346
5356
|
style: {
|
|
5347
5357
|
direction: "ltr"
|
|
5348
5358
|
},
|
|
@@ -5372,7 +5382,7 @@ import { ChevronDown, Phone } from "lucide-react";
|
|
|
5372
5382
|
import { forwardRef as forwardRef7, useEffect as useEffect9, useMemo as useMemo8, useRef as useRef5, useState as useState8 } from "react";
|
|
5373
5383
|
import * as RPNInput from "react-phone-number-input";
|
|
5374
5384
|
import flags from "react-phone-number-input/flags";
|
|
5375
|
-
import { jsx as
|
|
5385
|
+
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
5376
5386
|
function InternationalPhonePicker(param) {
|
|
5377
5387
|
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, _param_defaultFocus = param.defaultFocus, defaultFocus = _param_defaultFocus === void 0 ? true : _param_defaultFocus, labelsCommonClassName = param.labelsCommonClassName, minLength = param.minLength, disabled = param.disabled;
|
|
5378
5388
|
var handleKeyDown = function(e) {
|
|
@@ -5401,14 +5411,14 @@ function InternationalPhonePicker(param) {
|
|
|
5401
5411
|
},
|
|
5402
5412
|
className: cn("".concat(labelContent ? "flex justify-start items-center gap-3 w-full" : "w-full"), containerClassName),
|
|
5403
5413
|
children: [
|
|
5404
|
-
labelContent && /* @__PURE__ */
|
|
5414
|
+
labelContent && /* @__PURE__ */ jsx19(ElementLabel, {
|
|
5405
5415
|
labelsCommonClassName: labelsCommonClassName,
|
|
5406
5416
|
labelContent: labelContent,
|
|
5407
5417
|
labelClassName: labelClassName,
|
|
5408
5418
|
name: name,
|
|
5409
5419
|
required: required
|
|
5410
5420
|
}),
|
|
5411
|
-
/* @__PURE__ */
|
|
5421
|
+
/* @__PURE__ */ jsx19(RPNInput.default, {
|
|
5412
5422
|
disabled: disabled,
|
|
5413
5423
|
style: {
|
|
5414
5424
|
direction: "ltr"
|
|
@@ -5444,7 +5454,7 @@ function InternationalPhonePicker(param) {
|
|
|
5444
5454
|
setTempPhoneValue(newValue !== null && newValue !== void 0 ? newValue : "");
|
|
5445
5455
|
}
|
|
5446
5456
|
}),
|
|
5447
|
-
/* @__PURE__ */
|
|
5457
|
+
/* @__PURE__ */ jsx19("input", {
|
|
5448
5458
|
type: "hidden",
|
|
5449
5459
|
name: name,
|
|
5450
5460
|
value: tempPhoneValue
|
|
@@ -5467,7 +5477,7 @@ var PhoneInput = forwardRef7(function(_param, ref) {
|
|
|
5467
5477
|
inputRef.current.focus();
|
|
5468
5478
|
}
|
|
5469
5479
|
}, []);
|
|
5470
|
-
return /* @__PURE__ */
|
|
5480
|
+
return /* @__PURE__ */ jsx19(Input, _object_spread({
|
|
5471
5481
|
className: cn("-ms-px rounded-s-none shadow-none focus-visible:z-10 h-full", className),
|
|
5472
5482
|
onKeyDown: onKeyDown,
|
|
5473
5483
|
defaultValue: defaultValue,
|
|
@@ -5500,14 +5510,14 @@ var CountrySelect = function(param) {
|
|
|
5500
5510
|
className: "inline-flex items-center gap-1",
|
|
5501
5511
|
"aria-hidden": "true",
|
|
5502
5512
|
children: [
|
|
5503
|
-
/* @__PURE__ */
|
|
5513
|
+
/* @__PURE__ */ jsx19(FlagComponent, {
|
|
5504
5514
|
country: value,
|
|
5505
5515
|
countryName: value,
|
|
5506
5516
|
"aria-hidden": "true"
|
|
5507
5517
|
}),
|
|
5508
|
-
/* @__PURE__ */
|
|
5518
|
+
/* @__PURE__ */ jsx19("span", {
|
|
5509
5519
|
className: "text-muted-foreground/80",
|
|
5510
|
-
children: /* @__PURE__ */
|
|
5520
|
+
children: /* @__PURE__ */ jsx19(ChevronDown, {
|
|
5511
5521
|
size: 16,
|
|
5512
5522
|
strokeWidth: 2,
|
|
5513
5523
|
"aria-hidden": "true"
|
|
@@ -5515,7 +5525,7 @@ var CountrySelect = function(param) {
|
|
|
5515
5525
|
})
|
|
5516
5526
|
]
|
|
5517
5527
|
}),
|
|
5518
|
-
/* @__PURE__ */
|
|
5528
|
+
/* @__PURE__ */ jsx19("select", {
|
|
5519
5529
|
disabled: disabled,
|
|
5520
5530
|
value: value,
|
|
5521
5531
|
onChange: handleSelect,
|
|
@@ -5542,18 +5552,18 @@ var CountrySelect = function(param) {
|
|
|
5542
5552
|
var FlagComponent = function(param) {
|
|
5543
5553
|
var country = param.country, countryName = param.countryName;
|
|
5544
5554
|
var Flag = flags[country];
|
|
5545
|
-
return /* @__PURE__ */
|
|
5555
|
+
return /* @__PURE__ */ jsx19("span", {
|
|
5546
5556
|
className: "w-5 overflow-hidden rounded-sm",
|
|
5547
|
-
children: Flag ? /* @__PURE__ */
|
|
5557
|
+
children: Flag ? /* @__PURE__ */ jsx19(Flag, {
|
|
5548
5558
|
title: countryName
|
|
5549
|
-
}) : /* @__PURE__ */
|
|
5559
|
+
}) : /* @__PURE__ */ jsx19(Phone, {
|
|
5550
5560
|
size: 16,
|
|
5551
5561
|
"aria-hidden": "true"
|
|
5552
5562
|
})
|
|
5553
5563
|
});
|
|
5554
5564
|
};
|
|
5555
5565
|
// src/components/forms/ModularForm/formElements.tsx
|
|
5556
|
-
import { jsx as
|
|
5566
|
+
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5557
5567
|
var defaultFormElementContainerClassName = "flex justify-start items-center gap-3 w-full";
|
|
5558
5568
|
var defaultFormElementBorderClassName = "border-[1px] border-gray-300 hover:border-black rounded-sm";
|
|
5559
5569
|
var useSortValues = function(options, sortDirection, sortAsNumber) {
|
|
@@ -5609,8 +5619,8 @@ var InputContainer = function(param) {
|
|
|
5609
5619
|
required,
|
|
5610
5620
|
labelStyle
|
|
5611
5621
|
]);
|
|
5612
|
-
return /* @__PURE__ */
|
|
5613
|
-
children: /* @__PURE__ */
|
|
5622
|
+
return /* @__PURE__ */ jsx20(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5623
|
+
children: /* @__PURE__ */ jsx20("input", _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, props), {
|
|
5614
5624
|
title: title,
|
|
5615
5625
|
minLength: minLength,
|
|
5616
5626
|
placeholder: placeholder,
|
|
@@ -5662,7 +5672,7 @@ var SelectContainer = function(param) {
|
|
|
5662
5672
|
required,
|
|
5663
5673
|
labelStyle
|
|
5664
5674
|
]);
|
|
5665
|
-
return /* @__PURE__ */
|
|
5675
|
+
return /* @__PURE__ */ jsx20(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5666
5676
|
children: /* @__PURE__ */ jsxs14("div", {
|
|
5667
5677
|
title: title,
|
|
5668
5678
|
style: {
|
|
@@ -5673,21 +5683,21 @@ var SelectContainer = function(param) {
|
|
|
5673
5683
|
return setIsOpen(!isOpen);
|
|
5674
5684
|
},
|
|
5675
5685
|
children: [
|
|
5676
|
-
/* @__PURE__ */
|
|
5686
|
+
/* @__PURE__ */ jsx20("div", {
|
|
5677
5687
|
className: cn("h-9 max-h-9 py-2 px-3 flex items-center justify-center cursor-pointer", defaultFormElementBorderClassName, selectClassName),
|
|
5678
5688
|
children: ((_options_find = options.find(function(opt) {
|
|
5679
5689
|
return opt.value === selectedValue;
|
|
5680
5690
|
})) === null || _options_find === void 0 ? void 0 : _options_find.label) || selectedValue
|
|
5681
5691
|
}),
|
|
5682
|
-
isOpen ? /* @__PURE__ */
|
|
5692
|
+
isOpen ? /* @__PURE__ */ jsx20("i", {
|
|
5683
5693
|
className: cn("fa-light fa-chevron-up absolute top-3 ".concat(direction === "ltr" ? "right-2" : "left-2", " cursor-pointer"), iconClassName)
|
|
5684
|
-
}) : /* @__PURE__ */
|
|
5694
|
+
}) : /* @__PURE__ */ jsx20("i", {
|
|
5685
5695
|
className: cn("fa-light fa-chevron-down absolute top-3 ".concat(direction === "ltr" ? "right-2" : "left-2", " cursor-pointer"), iconClassName)
|
|
5686
5696
|
}),
|
|
5687
|
-
isOpen && /* @__PURE__ */
|
|
5697
|
+
isOpen && /* @__PURE__ */ jsx20("div", {
|
|
5688
5698
|
className: cn("absolute w-full bg-white border border-gray-300 max-h-32 overflow-y-auto z-10", optionsContainerClassName),
|
|
5689
5699
|
children: sortOptions.map(function(option) {
|
|
5690
|
-
return /* @__PURE__ */
|
|
5700
|
+
return /* @__PURE__ */ jsx20("div", {
|
|
5691
5701
|
className: "p-2 cursor-pointer hover:bg-gray-200 ".concat(optionClassName),
|
|
5692
5702
|
onClick: function() {
|
|
5693
5703
|
return handleOptionClick(option.value);
|
|
@@ -5696,7 +5706,7 @@ var SelectContainer = function(param) {
|
|
|
5696
5706
|
}, option.value);
|
|
5697
5707
|
})
|
|
5698
5708
|
}),
|
|
5699
|
-
/* @__PURE__ */
|
|
5709
|
+
/* @__PURE__ */ jsx20("input", {
|
|
5700
5710
|
value: selectedValue,
|
|
5701
5711
|
type: "hidden",
|
|
5702
5712
|
name: name,
|
|
@@ -5733,8 +5743,8 @@ function MultiSelect(param) {
|
|
|
5733
5743
|
required,
|
|
5734
5744
|
labelStyle
|
|
5735
5745
|
]);
|
|
5736
|
-
return /* @__PURE__ */
|
|
5737
|
-
children: /* @__PURE__ */
|
|
5746
|
+
return /* @__PURE__ */ jsx20(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5747
|
+
children: /* @__PURE__ */ jsx20(multiselect_default, {
|
|
5738
5748
|
closeDropdownOnSelect: closeDropdownOnSelect,
|
|
5739
5749
|
commandProps: {
|
|
5740
5750
|
label: placeholder
|
|
@@ -5756,7 +5766,7 @@ function MultiSelect(param) {
|
|
|
5756
5766
|
className: cn(defaultFormElementBorderClassName, styles.className),
|
|
5757
5767
|
dropdownClassName: styles.dropdownClassName,
|
|
5758
5768
|
dropdownOptionClassName: styles.dropdownOptionClassName,
|
|
5759
|
-
emptyIndicator: emptyOptionsElement || /* @__PURE__ */
|
|
5769
|
+
emptyIndicator: emptyOptionsElement || /* @__PURE__ */ jsx20("p", {
|
|
5760
5770
|
className: "text-center text-sm",
|
|
5761
5771
|
children: "all options selected."
|
|
5762
5772
|
}),
|
|
@@ -5792,8 +5802,8 @@ var SelectWithSearch = function(param) {
|
|
|
5792
5802
|
required,
|
|
5793
5803
|
labelStyle
|
|
5794
5804
|
]);
|
|
5795
|
-
return /* @__PURE__ */
|
|
5796
|
-
children: /* @__PURE__ */
|
|
5805
|
+
return /* @__PURE__ */ jsx20(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5806
|
+
children: /* @__PURE__ */ jsx20(SearchSelect, {
|
|
5797
5807
|
direction: direction,
|
|
5798
5808
|
createNewOptionLabel: createNewOptionLabel,
|
|
5799
5809
|
createNewOptionContainerClassName: createNewOptionContainerClassName,
|
|
@@ -5841,8 +5851,8 @@ var TextAreaContainer = function(param) {
|
|
|
5841
5851
|
required,
|
|
5842
5852
|
labelStyle
|
|
5843
5853
|
]);
|
|
5844
|
-
return /* @__PURE__ */
|
|
5845
|
-
children: /* @__PURE__ */
|
|
5854
|
+
return /* @__PURE__ */ jsx20(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5855
|
+
children: /* @__PURE__ */ jsx20("textarea", _object_spread_props(_object_spread({}, props), {
|
|
5846
5856
|
value: value,
|
|
5847
5857
|
onChange: onChange,
|
|
5848
5858
|
dir: direction,
|
|
@@ -5858,7 +5868,7 @@ var TextAreaContainer = function(param) {
|
|
|
5858
5868
|
};
|
|
5859
5869
|
var FormSeparator = function(param) {
|
|
5860
5870
|
var props = param.props, children = param.children;
|
|
5861
|
-
return /* @__PURE__ */
|
|
5871
|
+
return /* @__PURE__ */ jsx20("div", _object_spread_props(_object_spread({}, props), {
|
|
5862
5872
|
className: cn("border-b-[1px] border-gray-300 h-[1px]", props === null || props === void 0 ? void 0 : props.className),
|
|
5863
5873
|
children: children
|
|
5864
5874
|
}));
|
|
@@ -5888,8 +5898,8 @@ var CheckboxContainer = function(param) {
|
|
|
5888
5898
|
required,
|
|
5889
5899
|
labelStyle
|
|
5890
5900
|
]);
|
|
5891
|
-
return /* @__PURE__ */
|
|
5892
|
-
children: /* @__PURE__ */
|
|
5901
|
+
return /* @__PURE__ */ jsx20(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5902
|
+
children: /* @__PURE__ */ jsx20(Checkbox, {
|
|
5893
5903
|
id: id,
|
|
5894
5904
|
name: name,
|
|
5895
5905
|
checked: checked,
|
|
@@ -5951,7 +5961,7 @@ var DurationPicker = function(param) {
|
|
|
5951
5961
|
onChange === null || onChange === void 0 ? void 0 : onChange(durationToSeconds(update));
|
|
5952
5962
|
};
|
|
5953
5963
|
};
|
|
5954
|
-
return /* @__PURE__ */
|
|
5964
|
+
return /* @__PURE__ */ jsx20(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5955
5965
|
children: /* @__PURE__ */ jsxs14("div", {
|
|
5956
5966
|
title: title,
|
|
5957
5967
|
className: cn("flex gap-1.5 text-sm", elementClassName),
|
|
@@ -5961,11 +5971,11 @@ var DurationPicker = function(param) {
|
|
|
5961
5971
|
return /* @__PURE__ */ jsxs14("div", {
|
|
5962
5972
|
className: "flex flex-col border p-0.5 rounded-md",
|
|
5963
5973
|
children: [
|
|
5964
|
-
!hideLabels && /* @__PURE__ */
|
|
5974
|
+
!hideLabels && /* @__PURE__ */ jsx20("label", {
|
|
5965
5975
|
className: "mb-1 ps-1 capitalize text-start border-b-[1px] border-b-gray-300",
|
|
5966
5976
|
children: field.slice(0, 1)
|
|
5967
5977
|
}),
|
|
5968
|
-
/* @__PURE__ */
|
|
5978
|
+
/* @__PURE__ */ jsx20("input", {
|
|
5969
5979
|
type: "number",
|
|
5970
5980
|
inputMode: "numeric",
|
|
5971
5981
|
min: 0,
|
|
@@ -5983,7 +5993,7 @@ var DurationPicker = function(param) {
|
|
|
5983
5993
|
]
|
|
5984
5994
|
}, field);
|
|
5985
5995
|
}),
|
|
5986
|
-
/* @__PURE__ */
|
|
5996
|
+
/* @__PURE__ */ jsx20("input", {
|
|
5987
5997
|
name: name,
|
|
5988
5998
|
type: "hidden",
|
|
5989
5999
|
value: durationToSeconds(duration)
|
|
@@ -5997,7 +6007,7 @@ var FormElementContainer = function(param) {
|
|
|
5997
6007
|
return /* @__PURE__ */ jsxs14("div", {
|
|
5998
6008
|
className: cn(defaultContainerClassName ? defaultFormElementContainerClassName : "", containerClassName),
|
|
5999
6009
|
children: [
|
|
6000
|
-
labelContent && /* @__PURE__ */
|
|
6010
|
+
labelContent && /* @__PURE__ */ jsx20(ElementLabel, {
|
|
6001
6011
|
labelStyle: labelStyle,
|
|
6002
6012
|
labelsCommonClassName: labelsCommonClassName,
|
|
6003
6013
|
withDots: labelWithDots,
|
|
@@ -6022,11 +6032,11 @@ var ElementLabel = function(param) {
|
|
|
6022
6032
|
title: labelContent,
|
|
6023
6033
|
children: [
|
|
6024
6034
|
labelContent,
|
|
6025
|
-
required && /* @__PURE__ */
|
|
6035
|
+
required && /* @__PURE__ */ jsx20("div", {
|
|
6026
6036
|
className: "text-red-500",
|
|
6027
6037
|
children: "*"
|
|
6028
6038
|
}),
|
|
6029
|
-
withDots && /* @__PURE__ */
|
|
6039
|
+
withDots && /* @__PURE__ */ jsx20("div", {
|
|
6030
6040
|
children: ":"
|
|
6031
6041
|
})
|
|
6032
6042
|
]
|
|
@@ -6092,11 +6102,11 @@ var ElementsContainer = memo2(function(props) {
|
|
|
6092
6102
|
ref: containerRef,
|
|
6093
6103
|
className: cn("flex flex-col gap-1", className),
|
|
6094
6104
|
children: [
|
|
6095
|
-
headline && /* @__PURE__ */
|
|
6105
|
+
headline && /* @__PURE__ */ jsx20("div", {
|
|
6096
6106
|
className: cn("text-start text-primary font-bold border-b-[1px] border-gray-400 pb-0.5", headlineClassName),
|
|
6097
6107
|
children: headline
|
|
6098
6108
|
}),
|
|
6099
|
-
/* @__PURE__ */
|
|
6109
|
+
/* @__PURE__ */ jsx20("div", {
|
|
6100
6110
|
className: cn("flex flex-col gap-1.5", childrenContainerClassName),
|
|
6101
6111
|
children: enhancedChildren
|
|
6102
6112
|
})
|
|
@@ -6105,7 +6115,7 @@ var ElementsContainer = memo2(function(props) {
|
|
|
6105
6115
|
}, propsAreEqual);
|
|
6106
6116
|
ElementsContainer.displayName = "ElementsContainer";
|
|
6107
6117
|
// src/components/forms/ModularForm/ModularForm.tsx
|
|
6108
|
-
import { jsx as
|
|
6118
|
+
import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
6109
6119
|
var ModularForm = function(param) {
|
|
6110
6120
|
var _param_submitFunction = param.submitFunction, submitFunction = _param_submitFunction === void 0 ? /*#__PURE__*/ function() {
|
|
6111
6121
|
var _ref = _async_to_generator(function(form) {
|
|
@@ -6220,64 +6230,64 @@ var ModularForm = function(param) {
|
|
|
6220
6230
|
},
|
|
6221
6231
|
className: cn("w-[350px] px-5 py-5 flex flex-col gap-4", className),
|
|
6222
6232
|
children: [
|
|
6223
|
-
headerContent && /* @__PURE__ */
|
|
6233
|
+
headerContent && /* @__PURE__ */ jsx21("div", {
|
|
6224
6234
|
className: cn("border-b-2 border-[#547f22] pb-2 text-start font-bold text-[20px]", headerClassName),
|
|
6225
6235
|
children: headerContent
|
|
6226
6236
|
}),
|
|
6227
|
-
/* @__PURE__ */
|
|
6237
|
+
/* @__PURE__ */ jsx21("div", {
|
|
6228
6238
|
className: cn("w-full flex flex-col gap-5", elementsContainerClassName),
|
|
6229
6239
|
children: elements.map(function(element, index2) {
|
|
6230
6240
|
switch(element.type){
|
|
6231
6241
|
case "input":
|
|
6232
|
-
return /* @__PURE__ */
|
|
6242
|
+
return /* @__PURE__ */ jsx21(InputContainer, _object_spread_props(_object_spread({
|
|
6233
6243
|
direction: direction
|
|
6234
6244
|
}, element), {
|
|
6235
6245
|
labelsCommonClassName: labelsCommonClassName
|
|
6236
6246
|
}), index2);
|
|
6237
6247
|
case "textarea":
|
|
6238
|
-
return /* @__PURE__ */
|
|
6248
|
+
return /* @__PURE__ */ jsx21(TextAreaContainer, _object_spread_props(_object_spread({
|
|
6239
6249
|
direction: element.direction || direction
|
|
6240
6250
|
}, element), {
|
|
6241
6251
|
labelsCommonClassName: labelsCommonClassName
|
|
6242
6252
|
}), index2);
|
|
6243
6253
|
case "select":
|
|
6244
|
-
return /* @__PURE__ */
|
|
6254
|
+
return /* @__PURE__ */ jsx21(SelectContainer, _object_spread_props(_object_spread({
|
|
6245
6255
|
direction: direction
|
|
6246
6256
|
}, element), {
|
|
6247
6257
|
labelsCommonClassName: labelsCommonClassName
|
|
6248
6258
|
}), index2);
|
|
6249
6259
|
case "checkbox":
|
|
6250
|
-
return /* @__PURE__ */
|
|
6260
|
+
return /* @__PURE__ */ jsx21(CheckboxContainer, _object_spread_props(_object_spread({
|
|
6251
6261
|
direction: direction
|
|
6252
6262
|
}, element), {
|
|
6253
6263
|
labelsCommonClassName: labelsCommonClassName
|
|
6254
6264
|
}), index2);
|
|
6255
6265
|
case "multiSelect":
|
|
6256
|
-
return /* @__PURE__ */
|
|
6266
|
+
return /* @__PURE__ */ jsx21(MultiSelect, _object_spread_props(_object_spread({
|
|
6257
6267
|
direction: direction
|
|
6258
6268
|
}, element), {
|
|
6259
6269
|
labelsCommonClassName: labelsCommonClassName
|
|
6260
6270
|
}), index2);
|
|
6261
6271
|
case "selectWithSearch":
|
|
6262
|
-
return /* @__PURE__ */
|
|
6272
|
+
return /* @__PURE__ */ jsx21(SelectWithSearch, _object_spread_props(_object_spread({
|
|
6263
6273
|
direction: direction
|
|
6264
6274
|
}, element), {
|
|
6265
6275
|
labelsCommonClassName: labelsCommonClassName
|
|
6266
6276
|
}), index2);
|
|
6267
6277
|
case "internationalPhoneInput":
|
|
6268
|
-
return /* @__PURE__ */
|
|
6278
|
+
return /* @__PURE__ */ jsx21(InternationalPhonePicker, _object_spread_props(_object_spread({
|
|
6269
6279
|
direction: direction
|
|
6270
6280
|
}, element), {
|
|
6271
6281
|
labelsCommonClassName: labelsCommonClassName
|
|
6272
6282
|
}), index2);
|
|
6273
6283
|
case "duration":
|
|
6274
|
-
return /* @__PURE__ */
|
|
6284
|
+
return /* @__PURE__ */ jsx21(DurationPicker, _object_spread_props(_object_spread({
|
|
6275
6285
|
direction: direction
|
|
6276
6286
|
}, element), {
|
|
6277
6287
|
labelsCommonClassName: labelsCommonClassName
|
|
6278
6288
|
}), index2);
|
|
6279
6289
|
case "separator":
|
|
6280
|
-
return /* @__PURE__ */
|
|
6290
|
+
return /* @__PURE__ */ jsx21(FormSeparator, _object_spread_props(_object_spread({
|
|
6281
6291
|
direction: direction
|
|
6282
6292
|
}, element), {
|
|
6283
6293
|
children: element.children
|
|
@@ -6295,12 +6305,12 @@ var ModularForm = function(param) {
|
|
|
6295
6305
|
/* @__PURE__ */ jsxs15("div", {
|
|
6296
6306
|
className: cn("flex justify-between w-full", footerClassName),
|
|
6297
6307
|
children: [
|
|
6298
|
-
/* @__PURE__ */
|
|
6308
|
+
/* @__PURE__ */ jsx21("div", {
|
|
6299
6309
|
title: errorMsg,
|
|
6300
6310
|
className: cn("text-[#f22] text-[18px] max-w-[80%] ellipsis", errorClassName),
|
|
6301
6311
|
children: errorMsg
|
|
6302
6312
|
}),
|
|
6303
|
-
/* @__PURE__ */
|
|
6313
|
+
/* @__PURE__ */ jsx21("button", {
|
|
6304
6314
|
ref: submitRef,
|
|
6305
6315
|
disabled: isLoading,
|
|
6306
6316
|
onClick: function(e) {
|
|
@@ -6308,7 +6318,7 @@ var ModularForm = function(param) {
|
|
|
6308
6318
|
},
|
|
6309
6319
|
className: cn("bg-[#547f22] px-3 py-1.5 rounded-lg text-white min-w-20", buttonClassName),
|
|
6310
6320
|
type: "submit",
|
|
6311
|
-
children: isLoading ? /* @__PURE__ */
|
|
6321
|
+
children: isLoading ? /* @__PURE__ */ jsx21(Loader, _object_spread({
|
|
6312
6322
|
size: 18,
|
|
6313
6323
|
color: "#fff"
|
|
6314
6324
|
}, loaderProps)) : buttonContent
|
|
@@ -6322,7 +6332,7 @@ var ModularForm_default = ModularForm;
|
|
|
6322
6332
|
// src/components/forms/index.tsx
|
|
6323
6333
|
import { useState as useState11 } from "react";
|
|
6324
6334
|
import moment3 from "moment";
|
|
6325
|
-
import { jsx as
|
|
6335
|
+
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
6326
6336
|
var ConfirmForm = function(param) {
|
|
6327
6337
|
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, _param_cancelButtonClassName = param.cancelButtonClassName, cancelButtonClassName = _param_cancelButtonClassName === void 0 ? "" : _param_cancelButtonClassName, _param_confirmButtonClassName = param.confirmButtonClassName, confirmButtonClassName = _param_confirmButtonClassName === void 0 ? "" : _param_confirmButtonClassName, _param_cancelButtonProps = param.cancelButtonProps, cancelButtonProps = _param_cancelButtonProps === void 0 ? {} : _param_cancelButtonProps, _param_confirmButtonProps = param.confirmButtonProps, confirmButtonProps = _param_confirmButtonProps === void 0 ? {} : _param_confirmButtonProps, cancelElement = param.cancelElement, confirmElement = param.confirmElement;
|
|
6328
6338
|
return /* @__PURE__ */ jsxs16("div", {
|
|
@@ -6332,23 +6342,23 @@ var ConfirmForm = function(param) {
|
|
|
6332
6342
|
},
|
|
6333
6343
|
className: cn("w-full h-full flex flex-col gap-3", containerClassName),
|
|
6334
6344
|
children: [
|
|
6335
|
-
/* @__PURE__ */
|
|
6345
|
+
/* @__PURE__ */ jsx22("div", {
|
|
6336
6346
|
className: cn("text-lg font-bold", headlineClassName),
|
|
6337
6347
|
children: headline
|
|
6338
6348
|
}),
|
|
6339
6349
|
/* @__PURE__ */ jsxs16("div", {
|
|
6340
6350
|
className: cn("flex justify-center items-center gap-2 w-full", buttonsContainerClassName),
|
|
6341
6351
|
children: [
|
|
6342
|
-
/* @__PURE__ */
|
|
6352
|
+
/* @__PURE__ */ jsx22("button", {
|
|
6343
6353
|
className: cn("disabled:cursor-not-allowed opacity-70", cancelButtonClassName),
|
|
6344
6354
|
onClick: onX,
|
|
6345
|
-
children: cancelElement || /* @__PURE__ */
|
|
6355
|
+
children: cancelElement || /* @__PURE__ */ jsx22(RedXSvg, {})
|
|
6346
6356
|
}),
|
|
6347
|
-
/* @__PURE__ */
|
|
6357
|
+
/* @__PURE__ */ jsx22("button", _object_spread_props(_object_spread({
|
|
6348
6358
|
className: cn("disabled:cursor-not-allowed opacity-70", confirmButtonClassName)
|
|
6349
6359
|
}, confirmButtonProps), {
|
|
6350
6360
|
onClick: onV,
|
|
6351
|
-
children: confirmElement || /* @__PURE__ */
|
|
6361
|
+
children: confirmElement || /* @__PURE__ */ jsx22(GreenVSvg, {})
|
|
6352
6362
|
}))
|
|
6353
6363
|
]
|
|
6354
6364
|
})
|
|
@@ -6405,7 +6415,7 @@ var DatePicker = function(param) {
|
|
|
6405
6415
|
htmlFor: "from",
|
|
6406
6416
|
children: [
|
|
6407
6417
|
fromText,
|
|
6408
|
-
/* @__PURE__ */
|
|
6418
|
+
/* @__PURE__ */ jsx22("input", {
|
|
6409
6419
|
className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
|
|
6410
6420
|
type: "date",
|
|
6411
6421
|
name: "from",
|
|
@@ -6418,7 +6428,7 @@ var DatePicker = function(param) {
|
|
|
6418
6428
|
htmlFor: "to",
|
|
6419
6429
|
children: [
|
|
6420
6430
|
toText,
|
|
6421
|
-
/* @__PURE__ */
|
|
6431
|
+
/* @__PURE__ */ jsx22("input", {
|
|
6422
6432
|
className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
|
|
6423
6433
|
type: "date",
|
|
6424
6434
|
name: "to",
|
|
@@ -6426,12 +6436,12 @@ var DatePicker = function(param) {
|
|
|
6426
6436
|
})
|
|
6427
6437
|
]
|
|
6428
6438
|
}),
|
|
6429
|
-
/* @__PURE__ */
|
|
6439
|
+
/* @__PURE__ */ jsx22("button", {
|
|
6430
6440
|
disabled: isLoading,
|
|
6431
6441
|
style: buttonStyle,
|
|
6432
6442
|
className: cn("bg-[#699a2c] text-[#fff] font-[500] w-[75px] h-[27px]", buttonClassName),
|
|
6433
6443
|
type: "submit",
|
|
6434
|
-
children: isLoading ? /* @__PURE__ */
|
|
6444
|
+
children: isLoading ? /* @__PURE__ */ jsx22(Loader, {
|
|
6435
6445
|
className: "pt-[2px]",
|
|
6436
6446
|
size: 20,
|
|
6437
6447
|
color: "#fff"
|
|
@@ -6443,7 +6453,7 @@ var DatePicker = function(param) {
|
|
|
6443
6453
|
// src/components/CodeInput.tsx
|
|
6444
6454
|
import { OTPInput } from "input-otp";
|
|
6445
6455
|
import { useEffect as useEffect11, useRef as useRef8 } from "react";
|
|
6446
|
-
import { jsx as
|
|
6456
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
6447
6457
|
function CodeInput(param) {
|
|
6448
6458
|
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, _param_direction = param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction;
|
|
6449
6459
|
var firstInputRef = useRef8(null);
|
|
@@ -6452,12 +6462,12 @@ function CodeInput(param) {
|
|
|
6452
6462
|
firstInputRef.current.focus();
|
|
6453
6463
|
}
|
|
6454
6464
|
}, []);
|
|
6455
|
-
return /* @__PURE__ */
|
|
6465
|
+
return /* @__PURE__ */ jsx23("div", {
|
|
6456
6466
|
style: {
|
|
6457
6467
|
direction: direction
|
|
6458
6468
|
},
|
|
6459
6469
|
className: cn("space-y-2 flex justify-center items-center", className),
|
|
6460
|
-
children: /* @__PURE__ */
|
|
6470
|
+
children: /* @__PURE__ */ jsx23(OTPInput, {
|
|
6461
6471
|
ref: firstInputRef,
|
|
6462
6472
|
value: codeValue,
|
|
6463
6473
|
onChange: function(newVal) {
|
|
@@ -6467,10 +6477,10 @@ function CodeInput(param) {
|
|
|
6467
6477
|
maxLength: 6,
|
|
6468
6478
|
render: function(param) {
|
|
6469
6479
|
var slots = param.slots;
|
|
6470
|
-
return /* @__PURE__ */
|
|
6480
|
+
return /* @__PURE__ */ jsx23("div", {
|
|
6471
6481
|
className: cn("flex gap-5", slotContainerClassName),
|
|
6472
6482
|
children: slots.map(function(slot, idx) {
|
|
6473
|
-
return /* @__PURE__ */
|
|
6483
|
+
return /* @__PURE__ */ jsx23(Slot2, _object_spread({}, slot), idx);
|
|
6474
6484
|
})
|
|
6475
6485
|
});
|
|
6476
6486
|
}
|
|
@@ -6478,14 +6488,14 @@ function CodeInput(param) {
|
|
|
6478
6488
|
});
|
|
6479
6489
|
}
|
|
6480
6490
|
function Slot2(props) {
|
|
6481
|
-
return /* @__PURE__ */
|
|
6491
|
+
return /* @__PURE__ */ jsx23("div", {
|
|
6482
6492
|
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", {
|
|
6483
6493
|
"z-10 border border-ring ring-[3px] ring-ring/20": props.isActive
|
|
6484
6494
|
}),
|
|
6485
|
-
children: props.char !== null && /* @__PURE__ */
|
|
6495
|
+
children: props.char !== null && /* @__PURE__ */ jsx23("div", {
|
|
6486
6496
|
children: props.char
|
|
6487
6497
|
})
|
|
6488
6498
|
});
|
|
6489
6499
|
}
|
|
6490
|
-
export { Badge, BooleanUi, Button, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DatePicker, DisplayAllRowsButton, DurationPicker, DurationUI, ElementLabel, ElementsContainer, ErrorBoundary, ExportToExcel, Filter, FormElementContainer, FormSeparator, GeoUi, Input, InputContainer, InternationalPhonePicker, Loader, LoginWithGoogleButton, 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, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
|
|
6500
|
+
export { Badge, BooleanUi, Button, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DatePicker, DisplayAllRowsButton, DurationPicker, DurationUI, ElementLabel, ElementsContainer, ErrorBoundary, ExportToExcel, Filter, FormElementContainer, FormSeparator, GeoUi, Input, InputContainer, InternationalPhonePicker, LeftToRightDiv, Loader, LoginWithGoogleButton, 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, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
|
|
6491
6501
|
//# sourceMappingURL=index.mjs.map
|