@dmsi/wedgekit-react 0.0.864 → 0.0.865
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/chunk-3N34VVYD.js +154 -0
- package/dist/{chunk-57HL5K5I.js → chunk-4DPSNQCM.js} +1 -1
- package/dist/{chunk-BH4UKMXV.js → chunk-5NRKL5CJ.js} +3 -3
- package/dist/{chunk-A57PKP6Z.js → chunk-E7XBOMT4.js} +6 -6
- package/dist/{chunk-CJPGHBV5.js → chunk-EGECC3PQ.js} +1 -1
- package/dist/{chunk-ZL6NXIGS.js → chunk-HT57FLRW.js} +1 -1
- package/dist/{chunk-BXEE6VGQ.js → chunk-KLH67DTH.js} +6 -23
- package/dist/{chunk-C5DKGJ4E.js → chunk-KOKA2IJC.js} +4 -4
- package/dist/{chunk-IPQIZG7U.js → chunk-N36EJLRW.js} +1 -1
- package/dist/{chunk-RFF2EFBX.js → chunk-OM7QLLI2.js} +2 -2
- package/dist/{chunk-FXJ7C6RF.js → chunk-PE3EZP56.js} +1 -1
- package/dist/chunk-WVGXD7HT.js +19 -0
- package/dist/{chunk-7OLDYFKY.js → chunk-X3NDEFVA.js} +1 -1
- package/dist/chunk-YV5FS7NV.js +89 -0
- package/dist/chunk-Z2HPSFEQ.js +14 -0
- package/dist/{chunk-RTZO2OU7.js → chunk-Z7XANQ47.js} +1 -1
- package/dist/components/CalendarRange.cjs +65 -46
- package/dist/components/CalendarRange.css +13 -0
- package/dist/components/CalendarRange.js +17 -14
- package/dist/components/CompactImagesPreview.js +3 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +23 -4
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +13 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +17 -14
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +32 -13
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +13 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +17 -14
- package/dist/components/DataGrid/PinnedColumns.cjs +48 -29
- package/dist/components/DataGrid/PinnedColumns.css +13 -0
- package/dist/components/DataGrid/PinnedColumns.js +17 -14
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +24 -5
- package/dist/components/DataGrid/TableBody/LoadingCell.css +13 -0
- package/dist/components/DataGrid/TableBody/LoadingCell.js +17 -14
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +30 -11
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +13 -0
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +17 -14
- package/dist/components/DataGrid/TableBody/index.cjs +45 -26
- package/dist/components/DataGrid/TableBody/index.css +13 -0
- package/dist/components/DataGrid/TableBody/index.js +17 -14
- package/dist/components/DataGrid/index.cjs +135 -116
- package/dist/components/DataGrid/index.css +13 -0
- package/dist/components/DataGrid/index.js +17 -14
- package/dist/components/DataGrid/utils.cjs +24 -5
- package/dist/components/DataGrid/utils.css +13 -0
- package/dist/components/DataGrid/utils.js +17 -14
- package/dist/components/DataGridCell.js +6 -5
- package/dist/components/DateInput.cjs +85 -66
- package/dist/components/DateInput.css +13 -0
- package/dist/components/DateInput.js +17 -14
- package/dist/components/DateRangeInput.cjs +84 -65
- package/dist/components/DateRangeInput.css +13 -0
- package/dist/components/DateRangeInput.js +17 -14
- package/dist/components/EmblaCarousel/ArrowButtons.cjs +147 -0
- package/dist/components/EmblaCarousel/ArrowButtons.js +9 -0
- package/dist/components/EmblaCarousel/SelectedSnapDisplay.cjs +38 -0
- package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +7 -0
- package/dist/components/EmblaCarousel/index.cjs +266 -2
- package/dist/components/EmblaCarousel/index.js +4 -1
- package/dist/components/Menu.js +4 -3
- package/dist/components/MenuOption.js +3 -2
- package/dist/components/MobileDataGrid/ColumnList.css +13 -0
- package/dist/components/MobileDataGrid/ColumnList.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +31 -12
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +13 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +17 -14
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +39 -20
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +13 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +17 -14
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -4
- package/dist/components/MobileDataGrid/index.cjs +151 -132
- package/dist/components/MobileDataGrid/index.css +13 -0
- package/dist/components/MobileDataGrid/index.js +17 -14
- package/dist/components/Modal.js +3 -2
- package/dist/components/NestedMenu.js +3 -2
- package/dist/components/PDFViewer/DownloadIcon.js +4 -3
- package/dist/components/PDFViewer/index.js +5 -4
- package/dist/components/Password.js +3 -2
- package/dist/components/ProductImagePreview/index.js +4 -3
- package/dist/components/ProjectBar.js +2 -1
- package/dist/components/Stepper.js +3 -2
- package/dist/components/Tooltip.js +3 -2
- package/dist/components/index.cjs +222 -2
- package/dist/components/index.css +13 -0
- package/dist/components/index.js +17 -14
- package/dist/components/useMenuSystem.js +3 -2
- package/dist/hooks/index.js +5 -3
- package/dist/index.css +13 -0
- package/package.json +3 -3
- package/dist/chunk-SZ47M32R.js +0 -13
|
@@ -4951,49 +4951,68 @@ var import_react35 = require("react");
|
|
|
4951
4951
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4952
4952
|
|
|
4953
4953
|
// src/components/EmblaCarousel/index.tsx
|
|
4954
|
+
var import_react38 = require("react");
|
|
4954
4955
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"), 1);
|
|
4956
|
+
|
|
4957
|
+
// src/components/EmblaCarousel/SelectedSnapDisplay.tsx
|
|
4955
4958
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4956
4959
|
|
|
4960
|
+
// src/components/EmblaCarousel/useSelectedSnapDisplay.ts
|
|
4961
|
+
var import_react36 = require("react");
|
|
4962
|
+
|
|
4963
|
+
// src/components/EmblaCarousel/ArrowButtons.tsx
|
|
4964
|
+
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
4965
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4966
|
+
var arrowButtonStyles = (0, import_clsx38.default)(
|
|
4967
|
+
"appearance-none bg-transparent border cursor-pointer p-2 flex items-center justify-center size-9 rounded-full transition-colors duration-300 ease-in-out"
|
|
4968
|
+
);
|
|
4969
|
+
|
|
4970
|
+
// src/components/EmblaCarousel/usePrevNextButtons.ts
|
|
4971
|
+
var import_react37 = require("react");
|
|
4972
|
+
|
|
4973
|
+
// src/components/EmblaCarousel/index.tsx
|
|
4974
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4975
|
+
|
|
4957
4976
|
// src/components/DataGrid/index.tsx
|
|
4958
|
-
var
|
|
4977
|
+
var import_react43 = __toESM(require("react"), 1);
|
|
4959
4978
|
var import_react_table3 = require("@tanstack/react-table");
|
|
4960
4979
|
var import_core = require("@dnd-kit/core");
|
|
4961
4980
|
var import_sortable2 = require("@dnd-kit/sortable");
|
|
4962
4981
|
var import_modifiers = require("@dnd-kit/modifiers");
|
|
4963
4982
|
var import_react_virtual2 = require("@tanstack/react-virtual");
|
|
4964
|
-
var
|
|
4983
|
+
var import_clsx43 = __toESM(require("clsx"), 1);
|
|
4965
4984
|
|
|
4966
4985
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
4967
4986
|
var import_react_table2 = require("@tanstack/react-table");
|
|
4968
|
-
var
|
|
4987
|
+
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
4969
4988
|
|
|
4970
4989
|
// src/components/DataGrid/utils.tsx
|
|
4971
|
-
var
|
|
4972
|
-
var
|
|
4990
|
+
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
4991
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4973
4992
|
function getSortIcon(sort, nextSort = false) {
|
|
4974
|
-
const iconClassName = (0,
|
|
4993
|
+
const iconClassName = (0, import_clsx39.default)(
|
|
4975
4994
|
"text-icon-on-action-primary-normal",
|
|
4976
4995
|
nextSort && "hidden group-hover:block"
|
|
4977
4996
|
);
|
|
4978
4997
|
if (sort === "asc")
|
|
4979
|
-
return /* @__PURE__ */ (0,
|
|
4998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_upward" });
|
|
4980
4999
|
if (sort === "desc")
|
|
4981
|
-
return /* @__PURE__ */ (0,
|
|
5000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_downward" });
|
|
4982
5001
|
return null;
|
|
4983
5002
|
}
|
|
4984
5003
|
|
|
4985
5004
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
4986
|
-
var
|
|
5005
|
+
var import_react42 = __toESM(require("react"), 1);
|
|
4987
5006
|
|
|
4988
5007
|
// src/components/DataGrid/TableBody/index.tsx
|
|
4989
5008
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
4990
|
-
var
|
|
5009
|
+
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
4991
5010
|
|
|
4992
5011
|
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
4993
|
-
var
|
|
5012
|
+
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
4994
5013
|
var import_react_table = require("@tanstack/react-table");
|
|
4995
|
-
var
|
|
4996
|
-
var
|
|
5014
|
+
var import_react39 = __toESM(require("react"), 1);
|
|
5015
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4997
5016
|
var valueFormatters = {
|
|
4998
5017
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
4999
5018
|
currency: (value) => formatCurrencyDisplay(value)
|
|
@@ -5030,10 +5049,10 @@ function TableBodyRow({
|
|
|
5030
5049
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
5031
5050
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
5032
5051
|
const isHovered = hoveredRowId === row.id;
|
|
5033
|
-
return /* @__PURE__ */ (0,
|
|
5052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
5034
5053
|
"tr",
|
|
5035
5054
|
{
|
|
5036
|
-
className: (0,
|
|
5055
|
+
className: (0, import_clsx40.default)(
|
|
5037
5056
|
"min-h-10",
|
|
5038
5057
|
"transition-colors",
|
|
5039
5058
|
showFilterRow && !disabled ? "even:bg-background-grouped-primary-normal odd:bg-background-grouped-secondary-normal" : "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
|
|
@@ -5054,7 +5073,7 @@ function TableBodyRow({
|
|
|
5054
5073
|
children: [
|
|
5055
5074
|
!locked && virtualPaddingLeft ? (
|
|
5056
5075
|
// fake empty column to the left for virtualization scroll padding
|
|
5057
|
-
/* @__PURE__ */ (0,
|
|
5076
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
|
|
5058
5077
|
) : null,
|
|
5059
5078
|
columns.map((column) => {
|
|
5060
5079
|
var _a2, _b, _c, _d;
|
|
@@ -5065,17 +5084,17 @@ function TableBodyRow({
|
|
|
5065
5084
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
5066
5085
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
5067
5086
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
5068
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0,
|
|
5087
|
+
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react39.default.Fragment, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5069
5088
|
CellElement,
|
|
5070
5089
|
{
|
|
5071
5090
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
5072
5091
|
testid: testid ? `${testid}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
5073
5092
|
cell,
|
|
5074
|
-
className: (0,
|
|
5093
|
+
className: (0, import_clsx40.default)({
|
|
5075
5094
|
"justify-start": cellAlignment === "left",
|
|
5076
5095
|
"justify-end": cellAlignment === "right"
|
|
5077
5096
|
}),
|
|
5078
|
-
children: /* @__PURE__ */ (0,
|
|
5097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5079
5098
|
Tooltip,
|
|
5080
5099
|
{
|
|
5081
5100
|
id: id ? `${id}-tooltip-${cell.id}` : void 0,
|
|
@@ -5083,7 +5102,7 @@ function TableBodyRow({
|
|
|
5083
5102
|
showOnTruncation: true,
|
|
5084
5103
|
message: cellValue,
|
|
5085
5104
|
position: "bottom",
|
|
5086
|
-
children: /* @__PURE__ */ (0,
|
|
5105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Paragraph, { addOverflow: true, tall: true, children: cellValue })
|
|
5087
5106
|
}
|
|
5088
5107
|
)
|
|
5089
5108
|
},
|
|
@@ -5092,7 +5111,7 @@ function TableBodyRow({
|
|
|
5092
5111
|
}),
|
|
5093
5112
|
!locked && virtualPaddingRight ? (
|
|
5094
5113
|
// fake empty column to the right for virtualization scroll padding
|
|
5095
|
-
/* @__PURE__ */ (0,
|
|
5114
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("td", { style: { display: "flex", width: virtualPaddingRight } })
|
|
5096
5115
|
) : null
|
|
5097
5116
|
]
|
|
5098
5117
|
},
|
|
@@ -5101,7 +5120,7 @@ function TableBodyRow({
|
|
|
5101
5120
|
}
|
|
5102
5121
|
|
|
5103
5122
|
// src/components/DataGrid/TableBody/LoadingCell.tsx
|
|
5104
|
-
var
|
|
5123
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5105
5124
|
function LoadingCell({
|
|
5106
5125
|
id,
|
|
5107
5126
|
testid,
|
|
@@ -5109,16 +5128,16 @@ function LoadingCell({
|
|
|
5109
5128
|
}) {
|
|
5110
5129
|
const key = `loading-${column.id}`;
|
|
5111
5130
|
if (column.cell === "checkbox") {
|
|
5112
|
-
return /* @__PURE__ */ (0,
|
|
5131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, testid: testid ? `${testid}-${key}-checkbox` : void 0, disabled: true }) }, key);
|
|
5113
5132
|
}
|
|
5114
5133
|
if (column.cell === "input") {
|
|
5115
|
-
return /* @__PURE__ */ (0,
|
|
5134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5116
5135
|
DataGridCell,
|
|
5117
5136
|
{
|
|
5118
5137
|
id: id ? `${id}-${key}` : void 0,
|
|
5119
5138
|
testid: testid ? `${testid}-${key}` : void 0,
|
|
5120
5139
|
component: "input",
|
|
5121
|
-
children: /* @__PURE__ */ (0,
|
|
5140
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5122
5141
|
Input,
|
|
5123
5142
|
{
|
|
5124
5143
|
id: id ? `${id}-${key}-input` : void 0,
|
|
@@ -5132,11 +5151,11 @@ function LoadingCell({
|
|
|
5132
5151
|
key
|
|
5133
5152
|
);
|
|
5134
5153
|
}
|
|
5135
|
-
return /* @__PURE__ */ (0,
|
|
5154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
|
|
5136
5155
|
}
|
|
5137
5156
|
|
|
5138
5157
|
// src/components/DataGrid/TableBody/index.tsx
|
|
5139
|
-
var
|
|
5158
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5140
5159
|
function TableBody({
|
|
5141
5160
|
id,
|
|
5142
5161
|
testid,
|
|
@@ -5174,10 +5193,10 @@ function TableBody({
|
|
|
5174
5193
|
} else {
|
|
5175
5194
|
headerGroups = table.getCenterHeaderGroups();
|
|
5176
5195
|
}
|
|
5177
|
-
return /* @__PURE__ */ (0,
|
|
5196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
5178
5197
|
"tbody",
|
|
5179
5198
|
{
|
|
5180
|
-
className: (0,
|
|
5199
|
+
className: (0, import_clsx41.default)(locked ? "shadow-16" : ""),
|
|
5181
5200
|
style: {
|
|
5182
5201
|
display: "grid",
|
|
5183
5202
|
height: `${showFilterRow ? rowVirtualizer.getTotalSize() + 40 : rowVirtualizer.getTotalSize()}px`,
|
|
@@ -5186,7 +5205,7 @@ function TableBody({
|
|
|
5186
5205
|
// needed for absolute positioning of rows
|
|
5187
5206
|
},
|
|
5188
5207
|
children: [
|
|
5189
|
-
showFilterRow && /* @__PURE__ */ (0,
|
|
5208
|
+
showFilterRow && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5190
5209
|
"tr",
|
|
5191
5210
|
{
|
|
5192
5211
|
style: {
|
|
@@ -5202,7 +5221,7 @@ function TableBody({
|
|
|
5202
5221
|
children: headerGroups.flatMap(
|
|
5203
5222
|
(x) => x.headers.map((header) => {
|
|
5204
5223
|
var _a, _b, _c, _d, _e;
|
|
5205
|
-
return /* @__PURE__ */ (0,
|
|
5224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5206
5225
|
CellElement,
|
|
5207
5226
|
{
|
|
5208
5227
|
id: id ? `${id}-filter-cell-${header.id}` : void 0,
|
|
@@ -5213,7 +5232,7 @@ function TableBody({
|
|
|
5213
5232
|
children: header.column.getCanFilter() && ((_e = (_c = (_b = header.column.columnDef.meta) == null ? void 0 : _b.filterRowCell) == null ? void 0 : _c.call(_b, {
|
|
5214
5233
|
header,
|
|
5215
5234
|
table
|
|
5216
|
-
})) != null ? _e : /* @__PURE__ */ (0,
|
|
5235
|
+
})) != null ? _e : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5217
5236
|
Search,
|
|
5218
5237
|
{
|
|
5219
5238
|
id: id ? `${id}-filter-search-${header.id}` : void 0,
|
|
@@ -5234,7 +5253,7 @@ function TableBody({
|
|
|
5234
5253
|
),
|
|
5235
5254
|
virtualRows.map((virtualRow) => {
|
|
5236
5255
|
const row = rows[virtualRow.index];
|
|
5237
|
-
return /* @__PURE__ */ (0,
|
|
5256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5238
5257
|
TableBodyRow,
|
|
5239
5258
|
{
|
|
5240
5259
|
id,
|
|
@@ -5256,7 +5275,7 @@ function TableBody({
|
|
|
5256
5275
|
row.id
|
|
5257
5276
|
);
|
|
5258
5277
|
}),
|
|
5259
|
-
!pagination && isLoadingMore && hasMore && /* @__PURE__ */ (0,
|
|
5278
|
+
!pagination && isLoadingMore && hasMore && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5260
5279
|
"tr",
|
|
5261
5280
|
{
|
|
5262
5281
|
style: {
|
|
@@ -5266,7 +5285,7 @@ function TableBody({
|
|
|
5266
5285
|
transform: `translateY(${virtualRows[virtualRows.length - 1].start + 40}px)`
|
|
5267
5286
|
},
|
|
5268
5287
|
className: "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
|
|
5269
|
-
children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0,
|
|
5288
|
+
children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5270
5289
|
LoadingCell,
|
|
5271
5290
|
{
|
|
5272
5291
|
id,
|
|
@@ -5283,20 +5302,20 @@ function TableBody({
|
|
|
5283
5302
|
}
|
|
5284
5303
|
|
|
5285
5304
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
5286
|
-
var
|
|
5305
|
+
var import_react41 = require("react");
|
|
5287
5306
|
|
|
5288
5307
|
// src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
|
|
5289
|
-
var
|
|
5290
|
-
var
|
|
5308
|
+
var import_react40 = require("react");
|
|
5309
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5291
5310
|
function ColumnSelectorMenuOption({
|
|
5292
5311
|
id,
|
|
5293
5312
|
testid,
|
|
5294
5313
|
column,
|
|
5295
5314
|
toggleColumnVisibility
|
|
5296
5315
|
}) {
|
|
5297
|
-
const [isVisible, setIsVisible] = (0,
|
|
5316
|
+
const [isVisible, setIsVisible] = (0, import_react40.useState)(column.getIsVisible());
|
|
5298
5317
|
const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
|
|
5299
|
-
return /* @__PURE__ */ (0,
|
|
5318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5300
5319
|
Checkbox,
|
|
5301
5320
|
{
|
|
5302
5321
|
id: id ? `${id}-checkbox` : void 0,
|
|
@@ -5312,7 +5331,7 @@ function ColumnSelectorMenuOption({
|
|
|
5312
5331
|
}
|
|
5313
5332
|
|
|
5314
5333
|
// src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
|
|
5315
|
-
var
|
|
5334
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5316
5335
|
function ColumnSelectorHeaderCell({
|
|
5317
5336
|
id,
|
|
5318
5337
|
testid,
|
|
@@ -5320,9 +5339,9 @@ function ColumnSelectorHeaderCell({
|
|
|
5320
5339
|
toggleColumnVisibility,
|
|
5321
5340
|
resetColumnVisibility
|
|
5322
5341
|
}) {
|
|
5323
|
-
const ref = (0,
|
|
5324
|
-
const [show, setShow] = (0,
|
|
5325
|
-
return /* @__PURE__ */ (0,
|
|
5342
|
+
const ref = (0, import_react41.useRef)(null);
|
|
5343
|
+
const [show, setShow] = (0, import_react41.useState)(false);
|
|
5344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
5326
5345
|
DataGridCell,
|
|
5327
5346
|
{
|
|
5328
5347
|
id,
|
|
@@ -5332,7 +5351,7 @@ function ColumnSelectorHeaderCell({
|
|
|
5332
5351
|
color: "text-secondary-normal",
|
|
5333
5352
|
ref,
|
|
5334
5353
|
children: [
|
|
5335
|
-
/* @__PURE__ */ (0,
|
|
5354
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5336
5355
|
Button,
|
|
5337
5356
|
{
|
|
5338
5357
|
id: id ? `${id}-button` : void 0,
|
|
@@ -5340,10 +5359,10 @@ function ColumnSelectorHeaderCell({
|
|
|
5340
5359
|
onClick: () => setShow((prev) => !prev),
|
|
5341
5360
|
variant: "navigation",
|
|
5342
5361
|
iconOnly: true,
|
|
5343
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
5362
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { name: "tune" })
|
|
5344
5363
|
}
|
|
5345
5364
|
),
|
|
5346
|
-
/* @__PURE__ */ (0,
|
|
5365
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
5347
5366
|
Menu,
|
|
5348
5367
|
{
|
|
5349
5368
|
id: id ? `${id}-menu` : void 0,
|
|
@@ -5354,7 +5373,7 @@ function ColumnSelectorHeaderCell({
|
|
|
5354
5373
|
setShow,
|
|
5355
5374
|
calculateMinMaxHeight: true,
|
|
5356
5375
|
children: [
|
|
5357
|
-
/* @__PURE__ */ (0,
|
|
5376
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5358
5377
|
Button,
|
|
5359
5378
|
{
|
|
5360
5379
|
id: id ? `${id}-reset-button` : void 0,
|
|
@@ -5370,7 +5389,7 @@ function ColumnSelectorHeaderCell({
|
|
|
5370
5389
|
table.getAllColumns().filter((x) => {
|
|
5371
5390
|
var _a;
|
|
5372
5391
|
return (_a = x.columnDef.meta) == null ? void 0 : _a.inVisibilityMenu;
|
|
5373
|
-
}).map((column) => /* @__PURE__ */ (0,
|
|
5392
|
+
}).map((column) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5374
5393
|
ColumnSelectorMenuOption,
|
|
5375
5394
|
{
|
|
5376
5395
|
id: id ? `${id}-option-${column.id}` : void 0,
|
|
@@ -5389,7 +5408,7 @@ function ColumnSelectorHeaderCell({
|
|
|
5389
5408
|
}
|
|
5390
5409
|
|
|
5391
5410
|
// src/components/DataGrid/PinnedColumns.tsx
|
|
5392
|
-
var
|
|
5411
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5393
5412
|
function PinnedColumns(_a) {
|
|
5394
5413
|
var _b = _a, {
|
|
5395
5414
|
id,
|
|
@@ -5421,17 +5440,17 @@ function PinnedColumns(_a) {
|
|
|
5421
5440
|
const pinnedTestId = testid ? `${pinDirection}-pinned-${testid}` : void 0;
|
|
5422
5441
|
const hasAnyHeaders = ((_a2 = headerGroups[0]) == null ? void 0 : _a2.headers.length) > 0;
|
|
5423
5442
|
if (!hasAnyHeaders && !enableColumnSelector) return;
|
|
5424
|
-
return /* @__PURE__ */ (0,
|
|
5443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5425
5444
|
"table",
|
|
5426
5445
|
{
|
|
5427
|
-
className: (0,
|
|
5446
|
+
className: (0, import_clsx42.default)(
|
|
5428
5447
|
"flex flex-col min-h-min sticky z-20",
|
|
5429
5448
|
pinDirection === "left" ? "left-0" : "right-0"
|
|
5430
5449
|
),
|
|
5431
5450
|
"data-testid": pinnedTestId,
|
|
5432
5451
|
children: [
|
|
5433
|
-
/* @__PURE__ */ (0,
|
|
5434
|
-
return /* @__PURE__ */ (0,
|
|
5452
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("thead", { className: "sticky top-0 z-20 grid", children: headerGroups.map((headerGroup) => {
|
|
5453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5435
5454
|
"tr",
|
|
5436
5455
|
{
|
|
5437
5456
|
"data-testid": pinnedTestId ? `${pinnedTestId}-header-row-${headerGroup.id}` : void 0,
|
|
@@ -5446,7 +5465,7 @@ function PinnedColumns(_a) {
|
|
|
5446
5465
|
const cellAlignment = (_c = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
5447
5466
|
if (typeof header.column.columnDef.header === "string") {
|
|
5448
5467
|
const customHeaderWidth = (_d = header.column.columnDef.meta) == null ? void 0 : _d.headerWidth;
|
|
5449
|
-
return /* @__PURE__ */ (0,
|
|
5468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5450
5469
|
DataCellHeader,
|
|
5451
5470
|
{
|
|
5452
5471
|
locked: true,
|
|
@@ -5454,7 +5473,7 @@ function PinnedColumns(_a) {
|
|
|
5454
5473
|
header,
|
|
5455
5474
|
center: centerHeader,
|
|
5456
5475
|
width: customHeaderWidth,
|
|
5457
|
-
className: (0,
|
|
5476
|
+
className: (0, import_clsx42.default)(
|
|
5458
5477
|
header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
|
|
5459
5478
|
"group",
|
|
5460
5479
|
{
|
|
@@ -5463,11 +5482,11 @@ function PinnedColumns(_a) {
|
|
|
5463
5482
|
}
|
|
5464
5483
|
),
|
|
5465
5484
|
children: [
|
|
5466
|
-
/* @__PURE__ */ (0,
|
|
5485
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
|
|
5467
5486
|
getSortIcon(header.column.getIsSorted()),
|
|
5468
5487
|
!header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
|
|
5469
|
-
header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0,
|
|
5470
|
-
!((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0,
|
|
5488
|
+
header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
|
|
5489
|
+
!((_e = header.column.columnDef.meta) == null ? void 0 : _e.locked) && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5471
5490
|
"div",
|
|
5472
5491
|
{
|
|
5473
5492
|
onDoubleClick: (e) => {
|
|
@@ -5490,7 +5509,7 @@ function PinnedColumns(_a) {
|
|
|
5490
5509
|
header.id
|
|
5491
5510
|
);
|
|
5492
5511
|
}
|
|
5493
|
-
return /* @__PURE__ */ (0,
|
|
5512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react42.default.Fragment, { children: ((_f = header.column.columnDef.meta) == null ? void 0 : _f.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5494
5513
|
Checkbox,
|
|
5495
5514
|
{
|
|
5496
5515
|
checked: allSelectedAcrossPages,
|
|
@@ -5502,7 +5521,7 @@ function PinnedColumns(_a) {
|
|
|
5502
5521
|
header.getContext()
|
|
5503
5522
|
) }, header.id);
|
|
5504
5523
|
}),
|
|
5505
|
-
enableColumnSelector && /* @__PURE__ */ (0,
|
|
5524
|
+
enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5506
5525
|
ColumnSelectorHeaderCell,
|
|
5507
5526
|
{
|
|
5508
5527
|
id: id ? `${id}-column-selector` : void 0,
|
|
@@ -5519,7 +5538,7 @@ function PinnedColumns(_a) {
|
|
|
5519
5538
|
headerGroup.id
|
|
5520
5539
|
);
|
|
5521
5540
|
}) }),
|
|
5522
|
-
/* @__PURE__ */ (0,
|
|
5541
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5523
5542
|
TableBody,
|
|
5524
5543
|
__spreadProps(__spreadValues({
|
|
5525
5544
|
testid: pinnedTestId
|
|
@@ -5537,7 +5556,7 @@ function PinnedColumns(_a) {
|
|
|
5537
5556
|
}
|
|
5538
5557
|
|
|
5539
5558
|
// src/components/DataGrid/index.tsx
|
|
5540
|
-
var
|
|
5559
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5541
5560
|
var PAGE_SIZE_OPTIONS = [5, 10, 15, 20, 25, 30, 35];
|
|
5542
5561
|
var NO_RESULTS_HEIGHT = "h-[185px]";
|
|
5543
5562
|
function DataGrid({
|
|
@@ -5571,24 +5590,24 @@ function DataGrid({
|
|
|
5571
5590
|
ref
|
|
5572
5591
|
}) {
|
|
5573
5592
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
5574
|
-
(0,
|
|
5593
|
+
(0, import_react43.useImperativeHandle)(ref, () => ({
|
|
5575
5594
|
getSavedLayout: () => {
|
|
5576
5595
|
return getSavedLayout();
|
|
5577
5596
|
}
|
|
5578
5597
|
}));
|
|
5579
|
-
const [localSorting, setLocalSorting] = (0,
|
|
5580
|
-
const [localColumnFilters, setLocalColumnFilters] = (0,
|
|
5581
|
-
const [localRowSelection, setLocalRowSelection] = (0,
|
|
5582
|
-
const [hoveredRowId, setHoveredRowId] = (0,
|
|
5598
|
+
const [localSorting, setLocalSorting] = (0, import_react43.useState)([]);
|
|
5599
|
+
const [localColumnFilters, setLocalColumnFilters] = (0, import_react43.useState)([]);
|
|
5600
|
+
const [localRowSelection, setLocalRowSelection] = (0, import_react43.useState)({});
|
|
5601
|
+
const [hoveredRowId, setHoveredRowId] = (0, import_react43.useState)(null);
|
|
5583
5602
|
const {
|
|
5584
5603
|
columns: tableColumns,
|
|
5585
5604
|
setColumns: setTableColumns,
|
|
5586
5605
|
getSavedLayout
|
|
5587
5606
|
} = useTableLayout(columns, id != null ? id : testid);
|
|
5588
|
-
const [columnOrder, setColumnOrder] = (0,
|
|
5607
|
+
const [columnOrder, setColumnOrder] = (0, import_react43.useState)(
|
|
5589
5608
|
tableColumns.map((c) => c.id)
|
|
5590
5609
|
);
|
|
5591
|
-
const [columnVisibility, setColumnVisibility] = (0,
|
|
5610
|
+
const [columnVisibility, setColumnVisibility] = (0, import_react43.useState)(
|
|
5592
5611
|
Object.fromEntries(
|
|
5593
5612
|
tableColumns.filter((column) => !!column.id).map((column) => {
|
|
5594
5613
|
var _a2, _b2;
|
|
@@ -5596,7 +5615,7 @@ function DataGrid({
|
|
|
5596
5615
|
})
|
|
5597
5616
|
)
|
|
5598
5617
|
);
|
|
5599
|
-
const updateColumnVisibility = (0,
|
|
5618
|
+
const updateColumnVisibility = (0, import_react43.useCallback)(
|
|
5600
5619
|
(updateOrder) => {
|
|
5601
5620
|
setColumnVisibility(
|
|
5602
5621
|
Object.fromEntries(
|
|
@@ -5610,7 +5629,7 @@ function DataGrid({
|
|
|
5610
5629
|
},
|
|
5611
5630
|
[tableColumns]
|
|
5612
5631
|
);
|
|
5613
|
-
const resetDefaultColumnVisibility = (0,
|
|
5632
|
+
const resetDefaultColumnVisibility = (0, import_react43.useCallback)(() => {
|
|
5614
5633
|
setTableColumns((prev) => {
|
|
5615
5634
|
columns.forEach((column) => {
|
|
5616
5635
|
var _a2, _b2;
|
|
@@ -5626,7 +5645,7 @@ function DataGrid({
|
|
|
5626
5645
|
return [...prev];
|
|
5627
5646
|
}, true);
|
|
5628
5647
|
}, [columns, setTableColumns]);
|
|
5629
|
-
(0,
|
|
5648
|
+
(0, import_react43.useEffect)(() => {
|
|
5630
5649
|
updateColumnVisibility(true);
|
|
5631
5650
|
}, [updateColumnVisibility]);
|
|
5632
5651
|
const sortingState = pagination ? externalSorting != null ? externalSorting : localSorting : localSorting;
|
|
@@ -5642,7 +5661,7 @@ function DataGrid({
|
|
|
5642
5661
|
(onColumnFiltersChange != null ? onColumnFiltersChange : setLocalColumnFilters)(value);
|
|
5643
5662
|
} : setLocalColumnFilters;
|
|
5644
5663
|
const rowSelection = externalRowSelection != null ? externalRowSelection : localRowSelection;
|
|
5645
|
-
const setRowSelection = (0,
|
|
5664
|
+
const setRowSelection = (0, import_react43.useCallback)(
|
|
5646
5665
|
(updaterOrValue) => {
|
|
5647
5666
|
if (pagination) {
|
|
5648
5667
|
const value = typeof updaterOrValue === "function" ? updaterOrValue(externalRowSelection != null ? externalRowSelection : {}) : updaterOrValue;
|
|
@@ -5656,9 +5675,9 @@ function DataGrid({
|
|
|
5656
5675
|
},
|
|
5657
5676
|
[externalRowSelection, onRowSelectionChange, pagination]
|
|
5658
5677
|
);
|
|
5659
|
-
const dndId = (0,
|
|
5660
|
-
const containerRef =
|
|
5661
|
-
const toggleColumnVisibility = (0,
|
|
5678
|
+
const dndId = (0, import_react43.useId)();
|
|
5679
|
+
const containerRef = import_react43.default.useRef(null);
|
|
5680
|
+
const toggleColumnVisibility = (0, import_react43.useCallback)(
|
|
5662
5681
|
(columnId, isVisible) => {
|
|
5663
5682
|
setTableColumns((prev) => {
|
|
5664
5683
|
const persistedIndex = prev.findIndex((col) => col.id === columnId);
|
|
@@ -5793,7 +5812,7 @@ function DataGrid({
|
|
|
5793
5812
|
virtualPaddingRight = columnVirtualizer.getTotalSize() - ((_e = (_d = virtualColumns[virtualColumns.length - 1]) == null ? void 0 : _d.end) != null ? _e : 0);
|
|
5794
5813
|
}
|
|
5795
5814
|
const empty = table.getRowModel().rows.length === 0;
|
|
5796
|
-
return /* @__PURE__ */ (0,
|
|
5815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5797
5816
|
import_core.DndContext,
|
|
5798
5817
|
{
|
|
5799
5818
|
id: dndId,
|
|
@@ -5801,28 +5820,28 @@ function DataGrid({
|
|
|
5801
5820
|
modifiers: [import_modifiers.restrictToHorizontalAxis],
|
|
5802
5821
|
onDragEnd: handleDragEnd,
|
|
5803
5822
|
sensors,
|
|
5804
|
-
children: /* @__PURE__ */ (0,
|
|
5823
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5805
5824
|
import_sortable2.SortableContext,
|
|
5806
5825
|
{
|
|
5807
5826
|
items: sortableColumnOrder,
|
|
5808
5827
|
strategy: import_sortable2.horizontalListSortingStrategy,
|
|
5809
|
-
children: /* @__PURE__ */ (0,
|
|
5828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5810
5829
|
"div",
|
|
5811
5830
|
{
|
|
5812
5831
|
id,
|
|
5813
5832
|
"data-testid": testid,
|
|
5814
5833
|
className: "flex flex-col grow-0 h-fit w-full rounded border border-border-primary-normal overflow-hidden text-text-primary-normal",
|
|
5815
5834
|
children: [
|
|
5816
|
-
/* @__PURE__ */ (0,
|
|
5835
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5817
5836
|
"div",
|
|
5818
5837
|
{
|
|
5819
|
-
className: (0,
|
|
5838
|
+
className: (0, import_clsx43.default)(
|
|
5820
5839
|
"flex overflow-auto scrollbar-thin relative contain-paint will-change-transform",
|
|
5821
5840
|
empty ? "overflow-y-hidden" : "min-h-[120px]"
|
|
5822
5841
|
),
|
|
5823
5842
|
ref: containerRef,
|
|
5824
5843
|
children: [
|
|
5825
|
-
/* @__PURE__ */ (0,
|
|
5844
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5826
5845
|
PinnedColumns,
|
|
5827
5846
|
{
|
|
5828
5847
|
testid,
|
|
@@ -5837,8 +5856,8 @@ function DataGrid({
|
|
|
5837
5856
|
setHoveredRowId
|
|
5838
5857
|
}
|
|
5839
5858
|
),
|
|
5840
|
-
/* @__PURE__ */ (0,
|
|
5841
|
-
/* @__PURE__ */ (0,
|
|
5859
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
5860
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("thead", { className: "sticky top-0 z-10 grid", children: table.getCenterHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5842
5861
|
"tr",
|
|
5843
5862
|
{
|
|
5844
5863
|
"data-testid": testid ? `${testid}-header-row-${headerGroup.id}` : void 0,
|
|
@@ -5846,7 +5865,7 @@ function DataGrid({
|
|
|
5846
5865
|
children: [
|
|
5847
5866
|
virtualPaddingLeft ? (
|
|
5848
5867
|
// fake empty column to the left for virtualization scroll padding
|
|
5849
|
-
/* @__PURE__ */ (0,
|
|
5868
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5850
5869
|
"th",
|
|
5851
5870
|
{
|
|
5852
5871
|
style: { display: "flex", width: virtualPaddingLeft }
|
|
@@ -5862,7 +5881,7 @@ function DataGrid({
|
|
|
5862
5881
|
if (typeof header.column.columnDef.header === "string") {
|
|
5863
5882
|
const cellValue = (_a2 = table.getRowModel().rows[0]) == null ? void 0 : _a2.getValue(header.column.id);
|
|
5864
5883
|
const cellAlignment = (_c2 = (_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.align) != null ? _c2 : typeof cellValue === "number" ? "right" : "left";
|
|
5865
|
-
return /* @__PURE__ */ (0,
|
|
5884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5866
5885
|
DraggableCellHeader,
|
|
5867
5886
|
{
|
|
5868
5887
|
minWidth: `${header.column.getSize()}px`,
|
|
@@ -5871,7 +5890,7 @@ function DataGrid({
|
|
|
5871
5890
|
header,
|
|
5872
5891
|
locked: (_d2 = header.column.columnDef.meta) == null ? void 0 : _d2.locked,
|
|
5873
5892
|
center: centerHeader,
|
|
5874
|
-
className: (0,
|
|
5893
|
+
className: (0, import_clsx43.default)(
|
|
5875
5894
|
header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
|
|
5876
5895
|
"group",
|
|
5877
5896
|
{
|
|
@@ -5881,15 +5900,15 @@ function DataGrid({
|
|
|
5881
5900
|
),
|
|
5882
5901
|
useMenuDefaultMinWidth,
|
|
5883
5902
|
children: [
|
|
5884
|
-
cellAlignment === "left" && /* @__PURE__ */ (0,
|
|
5903
|
+
cellAlignment === "left" && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
|
|
5885
5904
|
getSortIcon(header.column.getIsSorted()),
|
|
5886
5905
|
!header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(
|
|
5887
5906
|
header.column.getNextSortingOrder(),
|
|
5888
5907
|
true
|
|
5889
5908
|
),
|
|
5890
|
-
header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0,
|
|
5891
|
-
cellAlignment === "right" && /* @__PURE__ */ (0,
|
|
5892
|
-
/* @__PURE__ */ (0,
|
|
5909
|
+
header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
|
|
5910
|
+
cellAlignment === "right" && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
|
|
5911
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5893
5912
|
"div",
|
|
5894
5913
|
{
|
|
5895
5914
|
onDoubleClick: (e) => {
|
|
@@ -5912,7 +5931,7 @@ function DataGrid({
|
|
|
5912
5931
|
header.id
|
|
5913
5932
|
);
|
|
5914
5933
|
}
|
|
5915
|
-
return /* @__PURE__ */ (0,
|
|
5934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react43.default.Fragment, { children: ((_e2 = header.column.columnDef.meta) == null ? void 0 : _e2.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5916
5935
|
DataGridCell,
|
|
5917
5936
|
{
|
|
5918
5937
|
id: id ? `${id}-header-${header.id}` : void 0,
|
|
@@ -5920,7 +5939,7 @@ function DataGrid({
|
|
|
5920
5939
|
type: "header",
|
|
5921
5940
|
component: "checkbox",
|
|
5922
5941
|
locked: true,
|
|
5923
|
-
children: /* @__PURE__ */ (0,
|
|
5942
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5924
5943
|
Checkbox,
|
|
5925
5944
|
{
|
|
5926
5945
|
id: id ? `${id}-select-all-checkbox` : void 0,
|
|
@@ -5938,7 +5957,7 @@ function DataGrid({
|
|
|
5938
5957
|
}),
|
|
5939
5958
|
virtualPaddingRight ? (
|
|
5940
5959
|
//fake empty column to the right for virtualization scroll padding
|
|
5941
|
-
/* @__PURE__ */ (0,
|
|
5960
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5942
5961
|
"th",
|
|
5943
5962
|
{
|
|
5944
5963
|
style: { display: "flex", width: virtualPaddingRight }
|
|
@@ -5949,7 +5968,7 @@ function DataGrid({
|
|
|
5949
5968
|
},
|
|
5950
5969
|
headerGroup.id
|
|
5951
5970
|
)) }),
|
|
5952
|
-
/* @__PURE__ */ (0,
|
|
5971
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5953
5972
|
TableBody,
|
|
5954
5973
|
{
|
|
5955
5974
|
id,
|
|
@@ -5971,7 +5990,7 @@ function DataGrid({
|
|
|
5971
5990
|
}
|
|
5972
5991
|
)
|
|
5973
5992
|
] }),
|
|
5974
|
-
/* @__PURE__ */ (0,
|
|
5993
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5975
5994
|
PinnedColumns,
|
|
5976
5995
|
{
|
|
5977
5996
|
id,
|
|
@@ -5993,10 +6012,10 @@ function DataGrid({
|
|
|
5993
6012
|
]
|
|
5994
6013
|
}
|
|
5995
6014
|
),
|
|
5996
|
-
empty && /* @__PURE__ */ (0,
|
|
6015
|
+
empty && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5997
6016
|
"div",
|
|
5998
6017
|
{
|
|
5999
|
-
className: (0,
|
|
6018
|
+
className: (0, import_clsx43.default)(
|
|
6000
6019
|
NO_RESULTS_HEIGHT,
|
|
6001
6020
|
"flex flex-col items-center justify-center",
|
|
6002
6021
|
componentGap,
|
|
@@ -6004,7 +6023,7 @@ function DataGrid({
|
|
|
6004
6023
|
),
|
|
6005
6024
|
"data-testid": testid ? `${testid}-no-results` : void 0,
|
|
6006
6025
|
children: [
|
|
6007
|
-
/* @__PURE__ */ (0,
|
|
6026
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6008
6027
|
"img",
|
|
6009
6028
|
{
|
|
6010
6029
|
src: (_g = (_f = no_results_image_default) == null ? void 0 : _f.src) != null ? _g : no_results_image_default,
|
|
@@ -6014,15 +6033,15 @@ function DataGrid({
|
|
|
6014
6033
|
height: 120
|
|
6015
6034
|
}
|
|
6016
6035
|
),
|
|
6017
|
-
/* @__PURE__ */ (0,
|
|
6018
|
-
/* @__PURE__ */ (0,
|
|
6036
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Subheader, { color: "text-secondary-normal", children: "No Results" }),
|
|
6037
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Paragraph, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
|
|
6019
6038
|
]
|
|
6020
6039
|
}
|
|
6021
6040
|
),
|
|
6022
|
-
!hideStatusBar && /* @__PURE__ */ (0,
|
|
6023
|
-
pagination && /* @__PURE__ */ (0,
|
|
6024
|
-
/* @__PURE__ */ (0,
|
|
6025
|
-
/* @__PURE__ */ (0,
|
|
6041
|
+
!hideStatusBar && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "p-2 pt-[7px] border-t border-border-primary-normal h-full min-h-[34px]", children: [
|
|
6042
|
+
pagination && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex justify-between items-center", children: [
|
|
6043
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-1 w-min", children: [
|
|
6044
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6026
6045
|
Select,
|
|
6027
6046
|
{
|
|
6028
6047
|
id: id ? `${id}-pagesize-select` : void 0,
|
|
@@ -6033,12 +6052,12 @@ function DataGrid({
|
|
|
6033
6052
|
var _a2;
|
|
6034
6053
|
return (_a2 = pagination.onPageSizeChange) == null ? void 0 : _a2.call(pagination, Number(e.target.value));
|
|
6035
6054
|
},
|
|
6036
|
-
renderMenu: (props) => /* @__PURE__ */ (0,
|
|
6055
|
+
renderMenu: (props) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6037
6056
|
Menu,
|
|
6038
6057
|
__spreadProps(__spreadValues({}, props), {
|
|
6039
6058
|
id: id ? `${id}-pagesize-menu` : void 0,
|
|
6040
6059
|
testid: testid ? `${testid}-pagesize-menu` : void 0,
|
|
6041
|
-
children: PAGE_SIZE_OPTIONS.map((option) => /* @__PURE__ */ (0,
|
|
6060
|
+
children: PAGE_SIZE_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6042
6061
|
MenuOption,
|
|
6043
6062
|
{
|
|
6044
6063
|
id: id ? `${id}-pagesize-option-${option}` : void 0,
|
|
@@ -6055,22 +6074,22 @@ function DataGrid({
|
|
|
6055
6074
|
)
|
|
6056
6075
|
}
|
|
6057
6076
|
),
|
|
6058
|
-
/* @__PURE__ */ (0,
|
|
6077
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Label, { children: "Per Page" })
|
|
6059
6078
|
] }),
|
|
6060
|
-
/* @__PURE__ */ (0,
|
|
6061
|
-
/* @__PURE__ */ (0,
|
|
6079
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6062
6081
|
Button,
|
|
6063
6082
|
{
|
|
6064
6083
|
id: id ? `${id}-prev-page-button` : void 0,
|
|
6065
6084
|
testid: testid ? `${testid}-prev-page-button` : void 0,
|
|
6066
6085
|
iconOnly: true,
|
|
6067
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
6086
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: "chevron_left" }),
|
|
6068
6087
|
onClick: () => pagination.onPageChange(pagination.pageIndex - 1),
|
|
6069
6088
|
variant: "tertiary",
|
|
6070
6089
|
disabled: pagination.pageIndex === 0
|
|
6071
6090
|
}
|
|
6072
6091
|
),
|
|
6073
|
-
/* @__PURE__ */ (0,
|
|
6092
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Paragraph, { children: [
|
|
6074
6093
|
pagination.pageIndex * pagination.pageSize + 1,
|
|
6075
6094
|
" -",
|
|
6076
6095
|
" ",
|
|
@@ -6082,13 +6101,13 @@ function DataGrid({
|
|
|
6082
6101
|
"of ",
|
|
6083
6102
|
pagination.total
|
|
6084
6103
|
] }),
|
|
6085
|
-
/* @__PURE__ */ (0,
|
|
6104
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6086
6105
|
Button,
|
|
6087
6106
|
{
|
|
6088
6107
|
id: id ? `${id}-next-page-button` : void 0,
|
|
6089
6108
|
testid: testid ? `${testid}-next-page-button` : void 0,
|
|
6090
6109
|
iconOnly: true,
|
|
6091
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
6110
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: "chevron_right" }),
|
|
6092
6111
|
onClick: () => pagination.onPageChange(pagination.pageIndex + 1),
|
|
6093
6112
|
variant: "tertiary",
|
|
6094
6113
|
disabled: (pagination.pageIndex + 1) * pagination.pageSize >= pagination.total
|
|
@@ -6096,7 +6115,7 @@ function DataGrid({
|
|
|
6096
6115
|
)
|
|
6097
6116
|
] })
|
|
6098
6117
|
] }),
|
|
6099
|
-
status && /* @__PURE__ */ (0,
|
|
6118
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6100
6119
|
Paragraph,
|
|
6101
6120
|
{
|
|
6102
6121
|
testid: testid ? `${testid}-status-text` : void 0,
|