@eztrak/shared 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -33,6 +33,7 @@ __export(src_exports, {
33
33
  CardSkeleton: () => CardSkeleton,
34
34
  CustomCellEditor: () => CustomCellEditor,
35
35
  CustomPagination: () => CustomPagination,
36
+ DropdownFilter: () => DropdownFilter,
36
37
  EztrakTabs: () => EztrakTabs,
37
38
  Loader: () => Loader,
38
39
  Modal: () => Modal,
@@ -50,6 +51,7 @@ __export(src_exports, {
50
51
  convertCommaDataToArray: () => convertCommaDataToArray,
51
52
  currencyFormatter: () => currencyFormatter,
52
53
  deserializeJson: () => deserializeJson,
54
+ dropdownStyles: () => dropdownStyles,
53
55
  flattenTableData: () => flattenTableData,
54
56
  formatDate: () => formatDate,
55
57
  formatDateTime: () => formatDateTime,
@@ -1062,9 +1064,130 @@ function CustomPagination({
1062
1064
  );
1063
1065
  }
1064
1066
 
1065
- // src/components/search-filters/ResetFiltersButton.tsx
1067
+ // src/components/search-filters/DropdownFilter.tsx
1068
+ var import_react_select = __toESM(require("react-select"));
1066
1069
  var import_react_router_dom2 = require("react-router-dom");
1070
+
1071
+ // src/components/search-filters/dropdownStyles.ts
1072
+ var themeColors = {
1073
+ primary: "#FF7335",
1074
+ primaryHover: "#E65C2E",
1075
+ lightBackground: "#FFF3EB",
1076
+ textColor: "black",
1077
+ white: "white"
1078
+ };
1079
+ var dropdownStyles = (_borderRadius = "5px") => ({
1080
+ control: (provided, state) => ({
1081
+ ...provided,
1082
+ fontSize: "14px",
1083
+ padding: "4px 8px",
1084
+ minWidth: "180px",
1085
+ borderRadius: "5px",
1086
+ cursor: "pointer",
1087
+ borderColor: state.isFocused ? themeColors.primary : "#e0e0e0",
1088
+ boxShadow: state.isFocused ? "0 0 0 2px rgba(255, 115, 53, 0.3)" : "none",
1089
+ "&:hover": {
1090
+ borderColor: themeColors.primary
1091
+ },
1092
+ transition: "border-color 0.2s, box-shadow 0.2s",
1093
+ zIndex: 50
1094
+ }),
1095
+ option: (provided, state) => ({
1096
+ ...provided,
1097
+ fontSize: "14px",
1098
+ backgroundColor: state.isSelected ? themeColors.primary : state.isFocused ? themeColors.lightBackground : themeColors.white,
1099
+ borderRadius: "5px",
1100
+ cursor: "pointer",
1101
+ borderColor: state.isFocused ? themeColors.primary : "#e0e0e0",
1102
+ color: state.isSelected ? themeColors.white : state.isFocused ? themeColors.primary : themeColors.textColor,
1103
+ "&:hover": {
1104
+ backgroundColor: themeColors.lightBackground,
1105
+ color: themeColors.primary
1106
+ },
1107
+ "&:active": {
1108
+ backgroundColor: themeColors.primary,
1109
+ color: themeColors.white
1110
+ },
1111
+ transition: "background-color 0.2s, color 0.2s",
1112
+ zIndex: 50
1113
+ }),
1114
+ singleValue: (provided) => ({
1115
+ ...provided,
1116
+ color: themeColors.textColor,
1117
+ zIndex: 50
1118
+ }),
1119
+ menu: (provided) => ({
1120
+ ...provided,
1121
+ borderRadius: "5px",
1122
+ boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)",
1123
+ marginTop: "4px",
1124
+ zIndex: 50
1125
+ }),
1126
+ dropdownIndicator: (provided) => ({
1127
+ ...provided,
1128
+ color: themeColors.primary,
1129
+ "&:hover": {
1130
+ color: themeColors.primaryHover
1131
+ },
1132
+ zIndex: 50
1133
+ }),
1134
+ indicatorSeparator: () => ({
1135
+ display: "none"
1136
+ })
1137
+ });
1138
+
1139
+ // src/components/search-filters/DropdownFilter.tsx
1067
1140
  var import_jsx_runtime3 = require("react/jsx-runtime");
1141
+ function DropdownFilter({
1142
+ name,
1143
+ valueKey = "id",
1144
+ options,
1145
+ placeholder,
1146
+ borderRadius = "20px",
1147
+ className,
1148
+ isClearable = true,
1149
+ isSearchable = true,
1150
+ isDisabled = false,
1151
+ isLoading = false,
1152
+ ...otherProps
1153
+ }) {
1154
+ const [searchParams, setSearchParams] = (0, import_react_router_dom2.useSearchParams)();
1155
+ const currentValue = searchParams.get(name);
1156
+ const selectedOption = currentValue ? options?.find(
1157
+ (option) => option[valueKey]?.toString() === currentValue
1158
+ ) ?? null : null;
1159
+ const handleChange = (selected) => {
1160
+ setSearchParams((prev) => {
1161
+ if (!selected || selected[valueKey] === "") {
1162
+ prev.delete(name);
1163
+ } else {
1164
+ prev.set(name, String(selected[valueKey]));
1165
+ }
1166
+ return prev;
1167
+ });
1168
+ };
1169
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn(className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1170
+ import_react_select.default,
1171
+ {
1172
+ placeholder: placeholder ?? `Select ${name}`,
1173
+ value: selectedOption,
1174
+ onChange: handleChange,
1175
+ options,
1176
+ isClearable,
1177
+ isSearchable,
1178
+ isDisabled,
1179
+ isLoading,
1180
+ getOptionValue: (option) => String(option[valueKey] ?? ""),
1181
+ getOptionLabel: (option) => String(option.label ?? option.name ?? option[valueKey] ?? ""),
1182
+ styles: dropdownStyles(borderRadius),
1183
+ ...otherProps
1184
+ }
1185
+ ) });
1186
+ }
1187
+
1188
+ // src/components/search-filters/ResetFiltersButton.tsx
1189
+ var import_react_router_dom3 = require("react-router-dom");
1190
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1068
1191
  var BASE_STYLES = "inline-flex items-center gap-1.5 px-5 py-3 rounded-md text-sm font-medium transition-colors duration-200 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50";
1069
1192
  var VARIANTS = {
1070
1193
  primary: "bg-white text-secondary border border-secondary hover:bg-lightGray hover:text-black",
@@ -1079,7 +1202,7 @@ function ResetIcon({
1079
1202
  size = 16,
1080
1203
  className
1081
1204
  }) {
1082
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1205
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1083
1206
  "svg",
1084
1207
  {
1085
1208
  width: size,
@@ -1093,10 +1216,10 @@ function ResetIcon({
1093
1216
  "aria-hidden": "true",
1094
1217
  className,
1095
1218
  children: [
1096
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
1097
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 3v5h-5" }),
1098
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
1099
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 16H3v5" })
1219
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
1220
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M21 3v5h-5" }),
1221
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
1222
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8 16H3v5" })
1100
1223
  ]
1101
1224
  }
1102
1225
  );
@@ -1110,13 +1233,13 @@ function ResetFiltersButton({
1110
1233
  onReset,
1111
1234
  disabled = false
1112
1235
  }) {
1113
- const [, setSearchParams] = (0, import_react_router_dom2.useSearchParams)();
1236
+ const [, setSearchParams] = (0, import_react_router_dom3.useSearchParams)();
1114
1237
  const handleReset = () => {
1115
1238
  setSearchParams({}, { replace: true });
1116
1239
  onReset?.();
1117
1240
  };
1118
- const resolvedIcon = icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ResetIcon, { size: 16 }) : icon;
1119
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1241
+ const resolvedIcon = icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ResetIcon, { size: 16 }) : icon;
1242
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1120
1243
  "button",
1121
1244
  {
1122
1245
  type: "button",
@@ -1134,8 +1257,8 @@ function ResetFiltersButton({
1134
1257
  // src/components/search-filters/SearchInput.tsx
1135
1258
  var import_react4 = require("react");
1136
1259
  var import_fi = require("react-icons/fi");
1137
- var import_react_router_dom3 = require("react-router-dom");
1138
- var import_jsx_runtime4 = require("react/jsx-runtime");
1260
+ var import_react_router_dom4 = require("react-router-dom");
1261
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1139
1262
  function SearchInput({
1140
1263
  placeholder = "Search...",
1141
1264
  searchBtn = "",
@@ -1152,7 +1275,7 @@ function SearchInput({
1152
1275
  defaultValue,
1153
1276
  ...props
1154
1277
  }) {
1155
- const [searchParams, setSearchParams] = (0, import_react_router_dom3.useSearchParams)();
1278
+ const [searchParams, setSearchParams] = (0, import_react_router_dom4.useSearchParams)();
1156
1279
  const queryParam = searchParams.get(defaultParam) || defaultValue || "";
1157
1280
  const [inputValue, setInputValue] = (0, import_react4.useState)(queryParam);
1158
1281
  const debounceTimerRef = (0, import_react4.useRef)(null);
@@ -1204,7 +1327,7 @@ function SearchInput({
1204
1327
  }
1205
1328
  };
1206
1329
  }, []);
1207
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1330
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1208
1331
  "form",
1209
1332
  {
1210
1333
  onSubmit: handleSearch,
@@ -1213,7 +1336,7 @@ function SearchInput({
1213
1336
  searchWrapperClass
1214
1337
  ),
1215
1338
  children: [
1216
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1339
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1217
1340
  "button",
1218
1341
  {
1219
1342
  type: "submit",
@@ -1221,7 +1344,7 @@ function SearchInput({
1221
1344
  "bg-white text-secondary rounded-full flex items-center justify-center w-10 h-10",
1222
1345
  searchBtn
1223
1346
  ),
1224
- children: customIcon ? customIcon : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1347
+ children: customIcon ? customIcon : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1225
1348
  import_fi.FiSearch,
1226
1349
  {
1227
1350
  className: cn("h-5 w-5 text-gray-400", searchIconClassName)
@@ -1229,7 +1352,7 @@ function SearchInput({
1229
1352
  )
1230
1353
  }
1231
1354
  ),
1232
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1355
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1233
1356
  "input",
1234
1357
  {
1235
1358
  value: inputValue,
@@ -1254,9 +1377,9 @@ var import_fa = require("react-icons/fa");
1254
1377
  var import_io5 = require("react-icons/io5");
1255
1378
 
1256
1379
  // src/components/Loader/Loader.tsx
1257
- var import_jsx_runtime5 = require("react/jsx-runtime");
1380
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1258
1381
  var Loader = ({ className, color = "#F54C00", size = "50px", speed = "1s" }) => {
1259
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: `loader`, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1382
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: `loader`, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1260
1383
  "div",
1261
1384
  {
1262
1385
  className: `spinner ${className}`,
@@ -1273,7 +1396,7 @@ var Loader = ({ className, color = "#F54C00", size = "50px", speed = "1s" }) =>
1273
1396
  };
1274
1397
 
1275
1398
  // src/components/modal/Modal.tsx
1276
- var import_jsx_runtime6 = require("react/jsx-runtime");
1399
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1277
1400
  function Modal({
1278
1401
  isOpen,
1279
1402
  onClose,
@@ -1314,7 +1437,7 @@ function Modal({
1314
1437
  document.body.style.overflow = "unset";
1315
1438
  };
1316
1439
  }, [isOpen, onClose, closeOnEscape]);
1317
- const modalContent = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_framer_motion.AnimatePresence, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1440
+ const modalContent = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_framer_motion.AnimatePresence, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1318
1441
  "div",
1319
1442
  {
1320
1443
  className: "fixed inset-0 bg-gray-500 bg-opacity-50 flex justify-center items-center z-1000 p-4",
@@ -1333,7 +1456,7 @@ function Modal({
1333
1456
  zIndex
1334
1457
  },
1335
1458
  children: [
1336
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1459
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1337
1460
  import_framer_motion.motion.div,
1338
1461
  {
1339
1462
  ref: modalRef,
@@ -1354,7 +1477,7 @@ function Modal({
1354
1477
  // Ensure modal doesn't exceed viewport height
1355
1478
  },
1356
1479
  children: [
1357
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1480
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1358
1481
  "div",
1359
1482
  {
1360
1483
  style: {
@@ -1362,43 +1485,43 @@ function Modal({
1362
1485
  },
1363
1486
  className: "sticky top-0 z-10 flex justify-between items-center bg-white text-2xl p-8 pb-4 rounded-t-3xl",
1364
1487
  children: [
1365
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "font-semibold", children: title }),
1366
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center space-x-4", children: [
1367
- onPrint && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1488
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "font-semibold", children: title }),
1489
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center space-x-4", children: [
1490
+ onPrint && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1368
1491
  "button",
1369
1492
  {
1370
1493
  onClick: onPrint,
1371
1494
  className: "flex items-center gap-1 hover:text-gray-300 text-sm border p-1 rounded",
1372
1495
  children: [
1373
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fa.FaPrint, { name: "FaPrint" }),
1374
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "Print" })
1496
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_fa.FaPrint, { name: "FaPrint" }),
1497
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "Print" })
1375
1498
  ]
1376
1499
  }
1377
1500
  ),
1378
- onExport && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1501
+ onExport && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1379
1502
  "button",
1380
1503
  {
1381
1504
  onClick: onExport,
1382
1505
  className: "flex items-center gap-1 hover:text-gray-300 text-sm border p-1 rounded",
1383
1506
  children: [
1384
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fa.FaFileExport, {}),
1385
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "Export" })
1507
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_fa.FaFileExport, {}),
1508
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "Export" })
1386
1509
  ]
1387
1510
  }
1388
1511
  ),
1389
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1512
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1390
1513
  "button",
1391
1514
  {
1392
1515
  onClick: onClose,
1393
1516
  className: "px-2 hover:opacity-70 transition-opacity",
1394
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_io5.IoCloseCircleOutline, { color: "#8898AA", size: 25 })
1517
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_io5.IoCloseCircleOutline, { color: "#8898AA", size: 25 })
1395
1518
  }
1396
1519
  )
1397
1520
  ] })
1398
1521
  ]
1399
1522
  }
1400
1523
  ),
1401
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1524
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1402
1525
  "div",
1403
1526
  {
1404
1527
  className: cn(
@@ -1408,7 +1531,7 @@ function Modal({
1408
1531
  children
1409
1532
  }
1410
1533
  ),
1411
- footer && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1534
+ footer && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1412
1535
  "div",
1413
1536
  {
1414
1537
  className: cn("sticky bottom-0 flex justify-end p-4 space-x-4 border-t bg-white ", footerClassName),
@@ -1422,7 +1545,7 @@ function Modal({
1422
1545
  ]
1423
1546
  }
1424
1547
  ),
1425
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1548
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1426
1549
  "div",
1427
1550
  {
1428
1551
  className: "fixed inset-0 flex items-center justify-center bg-gray-200/60",
@@ -1431,7 +1554,7 @@ function Modal({
1431
1554
  "aria-live": "polite",
1432
1555
  role: "status",
1433
1556
  onClick: (e) => e.stopPropagation(),
1434
- children: customLoader ? customLoader : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Loader, { size: "48px" })
1557
+ children: customLoader ? customLoader : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Loader, { size: "48px" })
1435
1558
  }
1436
1559
  )
1437
1560
  ]
@@ -1447,7 +1570,7 @@ function Modal({
1447
1570
  }
1448
1571
 
1449
1572
  // src/components/skeleton/CardSkeleton.tsx
1450
- var import_jsx_runtime7 = require("react/jsx-runtime");
1573
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1451
1574
  var DEFAULT_LINE_WIDTHS = ["w-32", "w-48"];
1452
1575
  function shouldShowAvatar(variant, showAvatar) {
1453
1576
  return showAvatar ?? variant === "profile";
@@ -1456,7 +1579,7 @@ function shouldShowImage(variant, showImage) {
1456
1579
  return showImage ?? variant === "image";
1457
1580
  }
1458
1581
  function AvatarSkeleton({ className }) {
1459
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1582
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1460
1583
  "svg",
1461
1584
  {
1462
1585
  className: cn("w-10 h-10 text-gray-200 dark:text-gray-700", className),
@@ -1464,7 +1587,7 @@ function AvatarSkeleton({ className }) {
1464
1587
  xmlns: "http://www.w3.org/2000/svg",
1465
1588
  fill: "currentColor",
1466
1589
  viewBox: "0 0 20 20",
1467
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z" })
1590
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z" })
1468
1591
  }
1469
1592
  );
1470
1593
  }
@@ -1473,7 +1596,7 @@ function SkeletonBlock({
1473
1596
  className,
1474
1597
  isFirst
1475
1598
  }) {
1476
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1599
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1477
1600
  "div",
1478
1601
  {
1479
1602
  className: cn(
@@ -1505,14 +1628,14 @@ function CardSkeleton({
1505
1628
  const skeletons = Array.from({ length: Math.max(1, count) }, (_, index) => {
1506
1629
  const renderAvatar = shouldShowAvatar(variant, showAvatar);
1507
1630
  const renderImage = shouldShowImage(variant, showImage);
1508
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1631
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1509
1632
  "div",
1510
1633
  {
1511
1634
  className: cn("animate-pulse md:p-6 dark:border-gray-700", className),
1512
1635
  style: { animationDuration, ...style },
1513
1636
  ...props,
1514
1637
  children: [
1515
- renderImage ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1638
+ renderImage ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1516
1639
  "div",
1517
1640
  {
1518
1641
  className: cn(
@@ -1521,9 +1644,9 @@ function CardSkeleton({
1521
1644
  )
1522
1645
  }
1523
1646
  ) : null,
1524
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("flex items-center mt-4 gap-4", contentClassName), children: [
1525
- renderAvatar ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AvatarSkeleton, { className: avatarClassName }) : null,
1526
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: Array.from({ length: Math.max(1, lines) }, (_2, lineIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1647
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("flex items-center mt-4 gap-4", contentClassName), children: [
1648
+ renderAvatar ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AvatarSkeleton, { className: avatarClassName }) : null,
1649
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children: Array.from({ length: Math.max(1, lines) }, (_2, lineIndex) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1527
1650
  SkeletonBlock,
1528
1651
  {
1529
1652
  widthClass: lineWidths[lineIndex] ?? lineWidths[lineWidths.length - 1] ?? DEFAULT_LINE_WIDTHS[1],
@@ -1533,19 +1656,19 @@ function CardSkeleton({
1533
1656
  lineIndex
1534
1657
  )) })
1535
1658
  ] }),
1536
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: srLabel })
1659
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "sr-only", children: srLabel })
1537
1660
  ]
1538
1661
  },
1539
1662
  index
1540
1663
  );
1541
1664
  });
1542
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: skeletons });
1665
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: skeletons });
1543
1666
  }
1544
1667
 
1545
1668
  // src/components/tooltip/ToolTip.tsx
1546
1669
  var import_react6 = require("react");
1547
1670
  var import_react_tooltip = require("react-tooltip");
1548
- var import_jsx_runtime8 = require("react/jsx-runtime");
1671
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1549
1672
  var defaultTooltipStyle = {
1550
1673
  color: "#fff",
1551
1674
  borderRadius: "5px",
@@ -1572,10 +1695,10 @@ function ToolTip({
1572
1695
  const tooltipId = `eztrak-tooltip-${generatedId.replace(/:/g, "")}`;
1573
1696
  const tooltipText = String(text ?? "");
1574
1697
  if (disabled || !tooltipText) {
1575
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className, children });
1698
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className, children });
1576
1699
  }
1577
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1578
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1700
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1701
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1579
1702
  "span",
1580
1703
  {
1581
1704
  className,
@@ -1585,7 +1708,7 @@ function ToolTip({
1585
1708
  children
1586
1709
  }
1587
1710
  ),
1588
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1711
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1589
1712
  import_react_tooltip.Tooltip,
1590
1713
  {
1591
1714
  id: tooltipId,
@@ -1601,7 +1724,7 @@ function ToolTip({
1601
1724
  }
1602
1725
 
1603
1726
  // src/components/tooltip/TooltipText.tsx
1604
- var import_jsx_runtime9 = require("react/jsx-runtime");
1727
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1605
1728
  function TooltipText({
1606
1729
  text = "",
1607
1730
  maxLength = 20,
@@ -1621,7 +1744,7 @@ function TooltipText({
1621
1744
  const displayText = truncateText(fullText, maxLength);
1622
1745
  const isTruncated = displayText !== fullText;
1623
1746
  const tooltipDisabled = !showTooltip || !hasValue || tooltipWhenTruncatedOnly && !isTruncated;
1624
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1747
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1625
1748
  ToolTip,
1626
1749
  {
1627
1750
  text: fullText,
@@ -1633,7 +1756,7 @@ function TooltipText({
1633
1756
  tooltipStyle,
1634
1757
  wrapperTabIndex: tooltipDisabled ? void 0 : 0,
1635
1758
  disabled: tooltipDisabled,
1636
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn("inline-block max-w-full align-bottom", textClassName), children: displayText })
1759
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: cn("inline-block max-w-full align-bottom", textClassName), children: displayText })
1637
1760
  }
1638
1761
  );
1639
1762
  }
@@ -1641,9 +1764,9 @@ function TooltipText({
1641
1764
  // src/components/cell-editor/CustomCellEditor.tsx
1642
1765
  var import_react7 = require("react");
1643
1766
  var import_react_hot_toast2 = __toESM(require("react-hot-toast"));
1644
- var import_jsx_runtime10 = require("react/jsx-runtime");
1767
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1645
1768
  function ButtonSpinner() {
1646
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1769
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1647
1770
  "svg",
1648
1771
  {
1649
1772
  className: "animate-spin",
@@ -1653,7 +1776,7 @@ function ButtonSpinner() {
1653
1776
  fill: "none",
1654
1777
  "aria-hidden": true,
1655
1778
  children: [
1656
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1779
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1657
1780
  "circle",
1658
1781
  {
1659
1782
  cx: "12",
@@ -1664,7 +1787,7 @@ function ButtonSpinner() {
1664
1787
  strokeOpacity: "0.25"
1665
1788
  }
1666
1789
  ),
1667
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1790
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1668
1791
  "path",
1669
1792
  {
1670
1793
  d: "M12 2a10 10 0 0 1 10 10",
@@ -1800,7 +1923,7 @@ var CustomCellEditor = (0, import_react7.forwardRef)(
1800
1923
  const defaultInputClass = "w-48 px-2 py-1 text-sm border border-gray-200 rounded-md bg-white focus:outline-none focus:ring-1 focus:ring-blue-400";
1801
1924
  const defaultSaveBtnClass = "px-3 py-1 text-sm font-medium text-white bg-green-500 rounded-md hover:bg-green-600 disabled:opacity-50 whitespace-nowrap shrink-0";
1802
1925
  const defaultCancelBtnClass = "px-3 py-1 text-sm font-medium text-white bg-red-500 rounded-md hover:bg-red-600 disabled:opacity-50 whitespace-nowrap shrink-0";
1803
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1926
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1804
1927
  "div",
1805
1928
  {
1806
1929
  className: cn(
@@ -1809,7 +1932,7 @@ var CustomCellEditor = (0, import_react7.forwardRef)(
1809
1932
  ),
1810
1933
  style: containerStyle,
1811
1934
  children: [
1812
- isDropdown ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1935
+ isDropdown ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1813
1936
  "select",
1814
1937
  {
1815
1938
  ref: selectRef,
@@ -1819,11 +1942,11 @@ var CustomCellEditor = (0, import_react7.forwardRef)(
1819
1942
  className: inputClassName ?? defaultInputClass,
1820
1943
  disabled: isLoading,
1821
1944
  children: [
1822
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: "", disabled: true, children: "Select option..." }),
1823
- normalizedOptions.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: opt.value, children: opt.label }, opt.value))
1945
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: "", disabled: true, children: "Select option..." }),
1946
+ normalizedOptions.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: opt.value, children: opt.label }, opt.value))
1824
1947
  ]
1825
1948
  }
1826
- ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1949
+ ) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1827
1950
  "input",
1828
1951
  {
1829
1952
  ref: inputRef,
@@ -1836,7 +1959,7 @@ var CustomCellEditor = (0, import_react7.forwardRef)(
1836
1959
  disabled: isLoading
1837
1960
  }
1838
1961
  ),
1839
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1962
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1840
1963
  "button",
1841
1964
  {
1842
1965
  type: "button",
@@ -1845,10 +1968,10 @@ var CustomCellEditor = (0, import_react7.forwardRef)(
1845
1968
  className: saveButtonClassName ?? (saveButtonStyle ? void 0 : defaultSaveBtnClass),
1846
1969
  style: saveButtonStyle,
1847
1970
  title: "Save (Enter)",
1848
- children: isLoading ? loadingIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ButtonSpinner, {}) : saveButtonContent ?? "Save"
1971
+ children: isLoading ? loadingIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ButtonSpinner, {}) : saveButtonContent ?? "Save"
1849
1972
  }
1850
1973
  ),
1851
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1974
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1852
1975
  "button",
1853
1976
  {
1854
1977
  type: "button",
@@ -1871,6 +1994,7 @@ CustomCellEditor.displayName = "CustomCellEditor";
1871
1994
  CardSkeleton,
1872
1995
  CustomCellEditor,
1873
1996
  CustomPagination,
1997
+ DropdownFilter,
1874
1998
  EztrakTabs,
1875
1999
  Loader,
1876
2000
  Modal,
@@ -1888,6 +2012,7 @@ CustomCellEditor.displayName = "CustomCellEditor";
1888
2012
  convertCommaDataToArray,
1889
2013
  currencyFormatter,
1890
2014
  deserializeJson,
2015
+ dropdownStyles,
1891
2016
  flattenTableData,
1892
2017
  formatDate,
1893
2018
  formatDateTime,