@databiosphere/findable-ui 4.0.0 → 6.0.0

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.
Files changed (184) hide show
  1. package/README.md +5 -1
  2. package/lib/components/ComponentCreator/ComponentCreator.d.ts +4 -2
  3. package/lib/components/ComponentCreator/ComponentCreator.js +6 -8
  4. package/lib/components/Detail/components/DetailViewTable/detailViewTable.d.ts +3 -3
  5. package/lib/components/Detail/components/DetailViewTable/detailViewTable.js +1 -1
  6. package/lib/components/Detail/components/Table/common/utils.d.ts +2 -2
  7. package/lib/components/Detail/components/Table/components/TableBody/tableBody.d.ts +3 -3
  8. package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +3 -3
  9. package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +2 -4
  10. package/lib/components/Detail/components/Table/components/TableRows/tableRows.d.ts +2 -2
  11. package/lib/components/Detail/components/Table/components/TableRows/tableRows.js +2 -1
  12. package/lib/components/Detail/components/Table/table.d.ts +3 -4
  13. package/lib/components/Detail/components/Table/table.js +2 -1
  14. package/lib/components/Filter/components/Filters/filters.d.ts +1 -1
  15. package/lib/components/Index/components/Cell/cell.d.ts +3 -0
  16. package/lib/components/Index/components/Cell/cell.js +3 -0
  17. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +3 -0
  18. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +3 -0
  19. package/lib/components/Index/components/NTag/nTag.d.ts +3 -0
  20. package/lib/components/Index/components/NTag/nTag.js +3 -0
  21. package/lib/components/Index/components/NTagCell/nTagCell.d.ts +6 -1
  22. package/lib/components/Index/components/NTagCell/nTagCell.js +6 -2
  23. package/lib/components/Layout/components/Outline/common/constants.d.ts +1 -1
  24. package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.d.ts +1 -1
  25. package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.js +13 -1
  26. package/lib/components/Links/components/Link/link.d.ts +3 -1
  27. package/lib/components/Links/components/Link/link.js +4 -4
  28. package/lib/components/Table/common/gridTable.styles.js +8 -2
  29. package/lib/components/Table/common/utils.d.ts +19 -14
  30. package/lib/components/Table/common/utils.js +26 -11
  31. package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.d.ts +3 -3
  32. package/lib/components/Table/components/PaginationSummary/paginationSummary.js +9 -8
  33. package/lib/components/Table/components/TableBody/tableBody.d.ts +3 -3
  34. package/lib/components/Table/components/TableCell/common/utils.d.ts +3 -3
  35. package/lib/components/Table/components/TableCell/components/BasicCell/basicCell.d.ts +7 -0
  36. package/lib/components/Table/components/TableCell/components/BasicCell/basicCell.js +55 -0
  37. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.d.ts +6 -0
  38. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.js +93 -0
  39. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.d.ts +5 -0
  40. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.js +16 -0
  41. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.d.ts +7 -0
  42. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.js +24 -0
  43. package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.d.ts +9 -0
  44. package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.js +53 -0
  45. package/lib/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.d.ts +2 -2
  46. package/lib/components/Table/components/TableHead/components/HeadSelectionCell/headSelectionCell.d.ts +2 -2
  47. package/lib/components/Table/components/TableHead/tableHead.d.ts +3 -3
  48. package/lib/components/Table/components/TableRow/tableRow.styles.d.ts +16 -0
  49. package/lib/components/Table/components/TableRow/tableRow.styles.js +22 -0
  50. package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +3 -3
  51. package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +3 -2
  52. package/lib/components/Table/components/TableRows/tableRows.d.ts +3 -3
  53. package/lib/components/Table/components/TableRows/tableRows.js +3 -1
  54. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.d.ts +2 -0
  55. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.js +12 -0
  56. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.d.ts +9 -0
  57. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.js +32 -0
  58. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.d.ts +6 -0
  59. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.js +35 -0
  60. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.d.ts +12 -0
  61. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.js +32 -0
  62. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.d.ts +5 -0
  63. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.js +50 -0
  64. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.d.ts +7 -0
  65. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.js +16 -0
  66. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.d.ts +5 -0
  67. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.js +17 -0
  68. package/lib/components/Table/components/TableToolbar/components/RowPreview/rowPreview.d.ts +8 -0
  69. package/lib/components/Table/components/TableToolbar/components/RowPreview/rowPreview.js +14 -0
  70. package/lib/components/Table/components/TableToolbar/components/RowSelection/rowSelection.d.ts +3 -3
  71. package/lib/components/Table/components/TableToolbar/tableToolbar.d.ts +3 -3
  72. package/lib/components/Table/components/TableToolbar/tableToolbar.js +9 -6
  73. package/lib/components/Table/features/RowPreview/constants.d.ts +2 -0
  74. package/lib/components/Table/features/RowPreview/constants.js +45 -0
  75. package/lib/components/Table/features/RowPreview/entities.d.ts +22 -0
  76. package/lib/components/Table/features/RowPreview/entities.js +2 -0
  77. package/lib/components/Table/features/RowPreview/utils.d.ts +33 -0
  78. package/lib/components/Table/features/RowPreview/utils.js +89 -0
  79. package/lib/components/Table/features/entities.d.ts +7 -0
  80. package/lib/components/Table/features/entities.js +2 -0
  81. package/lib/components/Table/table.d.ts +4 -12
  82. package/lib/components/Table/table.js +27 -39
  83. package/lib/components/TableCreator/common/entities.d.ts +1 -1
  84. package/lib/components/TableCreator/tableCreator.d.ts +2 -9
  85. package/lib/components/TableCreator/tableCreator.js +4 -4
  86. package/lib/components/common/Button/button.d.ts +1 -1
  87. package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.d.ts +7 -0
  88. package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.js +17 -0
  89. package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.d.ts +5 -0
  90. package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.js +17 -0
  91. package/lib/components/common/Drawer/components/drawer.styles.d.ts +5 -0
  92. package/lib/components/common/Drawer/components/drawer.styles.js +11 -0
  93. package/lib/components/common/Drawer/drawer.d.ts +7 -0
  94. package/lib/components/common/Drawer/drawer.js +24 -0
  95. package/lib/components/common/Grid/grid.d.ts +1 -1
  96. package/lib/components/common/Typography/common/entities.d.ts +2 -0
  97. package/lib/components/common/Typography/common/entities.js +2 -0
  98. package/lib/config/entities.d.ts +8 -26
  99. package/lib/providers/exploreState/entities.d.ts +3 -2
  100. package/lib/providers/exploreState/initializer/constants.js +1 -3
  101. package/lib/providers/exploreState/initializer/utils.js +2 -2
  102. package/lib/providers/exploreState/payloads/entities.d.ts +7 -11
  103. package/lib/providers/exploreState/utils.d.ts +12 -10
  104. package/lib/providers/exploreState/utils.js +20 -24
  105. package/lib/providers/exploreState.d.ts +12 -32
  106. package/lib/providers/exploreState.js +48 -36
  107. package/lib/styles/common/mixins/colors.d.ts +2 -1
  108. package/lib/styles/common/mixins/colors.js +3 -1
  109. package/lib/theme/common/components.js +11 -2
  110. package/lib/theme/common/palette.d.ts +3 -1
  111. package/lib/theme/common/palette.js +4 -1
  112. package/lib/views/ExploreView/exploreView.js +4 -6
  113. package/package.json +2 -2
  114. package/src/components/ComponentCreator/ComponentCreator.tsx +6 -1
  115. package/src/components/Detail/components/DetailViewTable/detailViewTable.tsx +4 -4
  116. package/src/components/Detail/components/Table/common/utils.ts +2 -2
  117. package/src/components/Detail/components/Table/components/TableBody/tableBody.tsx +3 -3
  118. package/src/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +5 -7
  119. package/src/components/Detail/components/Table/components/TableRows/tableRows.tsx +10 -6
  120. package/src/components/Detail/components/Table/table.tsx +6 -3
  121. package/src/components/Filter/components/Filters/filters.tsx +1 -1
  122. package/src/components/Index/components/Cell/cell.tsx +4 -0
  123. package/src/components/Index/components/NTag/components/Tooltip/tooltip.tsx +4 -0
  124. package/src/components/Index/components/NTag/nTag.tsx +4 -0
  125. package/src/components/Index/components/NTagCell/nTagCell.tsx +22 -3
  126. package/src/components/Layout/components/Outline/common/constants.ts +1 -1
  127. package/src/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.tsx +18 -2
  128. package/src/components/Links/components/Link/link.tsx +15 -2
  129. package/src/components/Table/common/gridTable.styles.ts +8 -2
  130. package/src/components/Table/common/utils.ts +55 -24
  131. package/src/components/Table/components/DownloadEntityResults/downloadEntityResults.tsx +3 -3
  132. package/src/components/Table/components/PaginationSummary/paginationSummary.tsx +11 -9
  133. package/src/components/Table/components/TableBody/tableBody.tsx +3 -3
  134. package/src/components/Table/components/TableCell/common/utils.ts +3 -3
  135. package/src/components/Table/components/TableCell/components/BasicCell/basicCell.tsx +52 -0
  136. package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.ts +11 -0
  137. package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.tsx +86 -0
  138. package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.tsx +21 -0
  139. package/src/components/Table/components/TableCell/components/NTagCell/nTagCell.tsx +70 -0
  140. package/src/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.tsx +2 -3
  141. package/src/components/Table/components/TableHead/components/HeadSelectionCell/headSelectionCell.tsx +2 -3
  142. package/src/components/Table/components/TableHead/tableHead.tsx +3 -3
  143. package/src/components/Table/components/TableRow/tableRow.styles.ts +22 -0
  144. package/src/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +8 -6
  145. package/src/components/Table/components/TableRows/tableRows.tsx +9 -6
  146. package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.ts +11 -0
  147. package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.ts +31 -0
  148. package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.tsx +52 -0
  149. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.ts +48 -0
  150. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.tsx +53 -0
  151. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.ts +12 -0
  152. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.tsx +25 -0
  153. package/src/components/Table/components/TableToolbar/components/RowPreview/rowPreview.tsx +19 -0
  154. package/src/components/Table/components/TableToolbar/components/RowSelection/rowSelection.tsx +3 -3
  155. package/src/components/Table/components/TableToolbar/tableToolbar.tsx +9 -4
  156. package/src/components/Table/features/RowPreview/constants.ts +65 -0
  157. package/src/components/Table/features/RowPreview/entities.ts +25 -0
  158. package/src/components/Table/features/RowPreview/utils.ts +93 -0
  159. package/src/components/Table/features/entities.ts +13 -0
  160. package/src/components/Table/table.tsx +41 -51
  161. package/src/components/TableCreator/common/entities.ts +1 -1
  162. package/src/components/TableCreator/tableCreator.tsx +15 -22
  163. package/src/components/common/Button/button.tsx +1 -2
  164. package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.ts +12 -0
  165. package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.tsx +27 -0
  166. package/src/components/common/Drawer/components/drawer.styles.ts +6 -0
  167. package/src/components/common/Drawer/drawer.tsx +21 -0
  168. package/src/components/common/Grid/grid.tsx +1 -3
  169. package/src/components/common/Section/components/CollapsableSection/collapsableSection.tsx +1 -2
  170. package/src/components/common/Typography/common/entities.ts +5 -0
  171. package/src/config/entities.ts +8 -38
  172. package/src/providers/exploreState/entities.ts +7 -2
  173. package/src/providers/exploreState/initializer/constants.ts +1 -3
  174. package/src/providers/exploreState/initializer/utils.ts +3 -3
  175. package/src/providers/exploreState/payloads/entities.ts +8 -18
  176. package/src/providers/exploreState/utils.ts +25 -36
  177. package/src/providers/exploreState.tsx +95 -69
  178. package/src/styles/common/mixins/colors.ts +4 -1
  179. package/src/theme/common/components.ts +12 -0
  180. package/src/theme/common/palette.ts +4 -5
  181. package/src/theme/theme.ts +1 -2
  182. package/src/views/ExploreView/exploreView.tsx +3 -25
  183. package/types/data-explorer-ui.d.ts +21 -2
  184. package/src/hooks/useEntityListRelatedView.ts +0 -78
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getInitialTableColumnVisibility = exports.sortingFn = exports.isColumnSortActive = exports.isCollapsableRowDisabled = exports.isClientFilteringEnabled = exports.isAnyRowSelected = exports.getTableSortLabelProps = exports.getPinnedCellIndex = exports.getInitialTableStateSorting = exports.getInitialState = exports.getGridTemplateColumns = exports.getFacetedUniqueValuesWithArrayValues = exports.getEditColumnOptions = exports.generateDownloadBlob = exports.getColumnSortDirection = exports.buildCategoryViews = exports.arrIncludesSome = void 0;
6
+ exports.getInitialTableColumnVisibility = exports.sortingFn = exports.isColumnSortActive = exports.isCollapsableRowDisabled = exports.isClientFilteringEnabled = exports.isAnyRowSelected = exports.getTableStatePagination = exports.getTableSortLabelProps = exports.getPinnedCellIndex = exports.getInitialTableStateSorting = exports.getInitialState = exports.getGridTemplateColumns = exports.getFacetedUniqueValuesWithArrayValues = exports.getEditColumnOptions = exports.generateDownloadBlob = exports.getColumnSortDirection = exports.buildCategoryViews = exports.arrIncludesSome = void 0;
7
7
  const SouthRounded_1 = __importDefault(require("@mui/icons-material/SouthRounded"));
8
8
  const react_table_1 = require("@tanstack/react-table");
9
9
  const useExploreMode_1 = require("../../../hooks/useExploreMode");
@@ -140,19 +140,21 @@ exports.getEditColumnOptions = getEditColumnOptions;
140
140
  * @returns Unique category term counts keyed by category terms.
141
141
  */
142
142
  function getFacetedUniqueValuesWithArrayValues() {
143
- return (table, columnId) => (0, react_table_1.memo)(() => [table.getColumn(columnId).getFacetedRowModel()], (facetedRowModel) => {
143
+ return (table, columnId) => (0, react_table_1.memo)(() => { var _a; return [(_a = table.getColumn(columnId)) === null || _a === void 0 ? void 0 : _a.getFacetedRowModel()]; }, (facetedRowModel) => {
144
144
  var _a;
145
145
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- This type matches react table getFacetedUniqueValues return type.
146
146
  const facetedUniqueValues = new Map();
147
- for (let i = 0; i < facetedRowModel.flatRows.length; i++) {
148
- const value = (_a = facetedRowModel.flatRows[i]) === null || _a === void 0 ? void 0 : _a.getValue(columnId);
149
- if (Array.isArray(value)) {
150
- value.map((val) => {
151
- updateCountByTerms(facetedUniqueValues, val);
152
- });
153
- }
154
- else {
155
- updateCountByTerms(facetedUniqueValues, value);
147
+ if (facetedRowModel) {
148
+ for (let i = 0; i < facetedRowModel.flatRows.length; i++) {
149
+ const value = (_a = facetedRowModel === null || facetedRowModel === void 0 ? void 0 : facetedRowModel.flatRows[i]) === null || _a === void 0 ? void 0 : _a.getValue(columnId);
150
+ if (Array.isArray(value)) {
151
+ value.map((val) => {
152
+ updateCountByTerms(facetedUniqueValues, val);
153
+ });
154
+ }
155
+ else {
156
+ updateCountByTerms(facetedUniqueValues, value);
157
+ }
156
158
  }
157
159
  }
158
160
  return facetedUniqueValues;
@@ -244,6 +246,19 @@ function getTableSortLabelProps(column) {
244
246
  };
245
247
  }
246
248
  exports.getTableSortLabelProps = getTableSortLabelProps;
249
+ /**
250
+ * Returns table state pagination.
251
+ * @param pageIndex - Explore state page index.
252
+ * @param pageSize - Explore state page size.
253
+ * @returns table state pagination.
254
+ */
255
+ function getTableStatePagination(pageIndex = 0, pageSize) {
256
+ return {
257
+ pageIndex,
258
+ pageSize,
259
+ };
260
+ }
261
+ exports.getTableStatePagination = getTableStatePagination;
247
262
  /**
248
263
  * Returns the list of visible table headers.
249
264
  * @param rows - Table rows.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { Row } from "@tanstack/react-table";
3
- export interface DownloadEntityResultsProps<T> {
2
+ import { Row, RowData } from "@tanstack/react-table";
3
+ export interface DownloadEntityResultsProps<T extends RowData> {
4
4
  entityName: string;
5
5
  rows: Row<T>[];
6
6
  }
7
- export declare const DownloadEntityResults: <T extends object>({ entityName, rows, }: DownloadEntityResultsProps<T>) => JSX.Element;
7
+ export declare const DownloadEntityResults: <T extends unknown>({ entityName, rows, }: DownloadEntityResultsProps<T>) => JSX.Element;
@@ -7,13 +7,14 @@ exports.PaginationSummary = void 0;
7
7
  const material_1 = require("@mui/material");
8
8
  const react_1 = __importDefault(require("react"));
9
9
  const PaginationSummary = ({ firstResult, lastResult, totalResult, }) => {
10
- return (react_1.default.createElement("div", null,
11
- react_1.default.createElement(material_1.Typography, { variant: "text-body-400" }, "Results "),
12
- react_1.default.createElement(material_1.Typography, { variant: "text-body-small-500" },
13
- firstResult,
14
- " - ",
15
- lastResult),
16
- react_1.default.createElement(material_1.Typography, { variant: "text-body-400" }, " of "),
17
- react_1.default.createElement(material_1.Typography, { variant: "text-body-small-500" }, totalResult)));
10
+ return (react_1.default.createElement(material_1.Fade, { in: totalResult > 0 },
11
+ react_1.default.createElement("div", null,
12
+ react_1.default.createElement(material_1.Typography, { variant: "text-body-400" }, "Results "),
13
+ react_1.default.createElement(material_1.Typography, { variant: "text-body-small-500" },
14
+ firstResult,
15
+ " - ",
16
+ lastResult),
17
+ react_1.default.createElement(material_1.Typography, { variant: "text-body-400" }, " of "),
18
+ react_1.default.createElement(material_1.Typography, { variant: "text-body-small-500" }, totalResult))));
18
19
  };
19
20
  exports.PaginationSummary = PaginationSummary;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { Table } from "@tanstack/react-table";
2
+ import { RowData, Table } from "@tanstack/react-table";
3
3
  import { ROW_DIRECTION } from "../../common/entities";
4
- export interface TableBodyProps<T> {
4
+ export interface TableBodyProps<T extends RowData> {
5
5
  rowDirection: ROW_DIRECTION;
6
6
  tableInstance: Table<T>;
7
7
  }
8
- export declare const TableBody: <T extends object>({ rowDirection, tableInstance, }: TableBodyProps<T>) => JSX.Element;
8
+ export declare const TableBody: <T extends unknown>({ rowDirection, tableInstance, }: TableBodyProps<T>) => JSX.Element;
@@ -1,8 +1,8 @@
1
- import { TableCellProps as MTableCellProps } from "@mui/material/TableCell/TableCell";
2
- import { CoreCell, CoreHeader } from "@tanstack/table-core";
1
+ import { TableCellProps as MTableCellProps } from "@mui/material";
2
+ import { CoreCell, CoreHeader, RowData } from "@tanstack/react-table";
3
3
  /**
4
4
  * Returns table cell padding based on the cell ID.
5
5
  * @param id - Cell ID.
6
6
  * @returns table cell padding.
7
7
  */
8
- export declare function getTableCellPadding<T extends object, TValue>(id: CoreHeader<T, TValue>["id"] | CoreCell<T, TValue>["id"]): MTableCellProps["padding"];
8
+ export declare function getTableCellPadding<T extends RowData, TValue>(id: CoreHeader<T, TValue>["id"] | CoreCell<T, TValue>["id"]): MTableCellProps["padding"];
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from "react";
2
+ import { TypographyProps } from "../../../../../common/Typography/common/entities";
3
+ export interface BasicCellProps {
4
+ TypographyProps?: TypographyProps;
5
+ value?: ReactNode;
6
+ }
7
+ export declare const BasicCell: ({ TypographyProps, value, }: BasicCellProps) => JSX.Element | null;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.BasicCell = void 0;
27
+ const material_1 = require("@mui/material");
28
+ const react_1 = __importStar(require("react"));
29
+ const entities_1 = require("../../../../../../apis/azul/common/entities");
30
+ const BasicCell = ({ TypographyProps, value = entities_1.LABEL.UNSPECIFIED, }) => {
31
+ if (isValueNumberOrString(value)) {
32
+ return (react_1.default.createElement(material_1.Typography, Object.assign({ variant: "inherit" }, TypographyProps), value));
33
+ }
34
+ if (isValueArray(value)) {
35
+ return (react_1.default.createElement(react_1.Fragment, null, value.map((v) => (react_1.default.createElement(material_1.Typography, Object.assign({ key: v, variant: "inherit" }, TypographyProps), v)))));
36
+ }
37
+ return null;
38
+ };
39
+ exports.BasicCell = BasicCell;
40
+ /**
41
+ * Returns true if value is an array of strings.
42
+ * @param value - Value.
43
+ * @returns value is an array of strings.
44
+ */
45
+ function isValueArray(value) {
46
+ return Array.isArray(value) && value.every(isValueNumberOrString);
47
+ }
48
+ /**
49
+ * Returns true if value is a number or a string.
50
+ * @param value - Value.
51
+ * @returns true if value is a number or a string.
52
+ */
53
+ function isValueNumberOrString(value) {
54
+ return typeof value === "number" || typeof value === "string";
55
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { TooltipProps as MTooltipProps } from "@mui/material";
3
+ export interface TooltipProps extends MTooltipProps {
4
+ className?: string;
5
+ }
6
+ export declare const Tooltip: ({ children, className, title, ...props }: TooltipProps) => JSX.Element;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Tooltip = void 0;
38
+ const material_1 = require("@mui/material");
39
+ const core_1 = require("@popperjs/core");
40
+ const react_1 = __importStar(require("react"));
41
+ const tooltip_styles_1 = require("./tooltip.styles");
42
+ const DEFAULT_FLIP_MODIFIER = {
43
+ enabled: true,
44
+ name: "flip",
45
+ options: {
46
+ fallbackPlacements: ["bottom", "right", "left"],
47
+ },
48
+ };
49
+ const DEFAULT_PREVENT_OVERFLOW_MODIFIER = {
50
+ enabled: true,
51
+ name: "preventOverflow",
52
+ options: {
53
+ padding: 16,
54
+ },
55
+ };
56
+ const Tooltip = (_a) => {
57
+ var { children, className, title } = _a, props = __rest(_a, ["children", "className", "title"]) /* Spread props to allow for Mui Tooltip specific prop overrides. */;
58
+ const [maxHeight, setMaxHeight] = (0, react_1.useState)();
59
+ const modifiers = (0, react_1.useMemo)(() => [
60
+ {
61
+ enabled: true,
62
+ fn: ({ state }) => setMaxHeight(calculateMaxHeight(state)),
63
+ name: "maxHeight",
64
+ phase: "main",
65
+ requiresIfExists: ["offset"],
66
+ },
67
+ DEFAULT_FLIP_MODIFIER,
68
+ DEFAULT_PREVENT_OVERFLOW_MODIFIER,
69
+ ], []);
70
+ return (react_1.default.createElement(material_1.Tooltip, Object.assign({ arrow: true, className: className, onClose: () => setMaxHeight(undefined), slotProps: {
71
+ popper: { modifiers },
72
+ tooltip: { style: { display: "flex", maxHeight, padding: 0 } },
73
+ }, title: react_1.default.createElement(tooltip_styles_1.TooltipContent, null, title) }, props), children));
74
+ };
75
+ exports.Tooltip = Tooltip;
76
+ /**
77
+ * Calculate the max height of the tooltip based on the current popper modifier state.
78
+ * @param state - Popper modifier state.
79
+ * @returns tooltip maximum height.
80
+ */
81
+ function calculateMaxHeight(state) {
82
+ const overflow = (0, core_1.detectOverflow)(state);
83
+ const { placement } = state;
84
+ if (placement === "left" || placement === "right") {
85
+ return window.innerHeight - 32;
86
+ }
87
+ if (placement === "top") {
88
+ return state.rects.popper.height - overflow.top - 24;
89
+ }
90
+ if (placement === "bottom") {
91
+ return state.rects.popper.height - overflow.bottom - 24;
92
+ }
93
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const TooltipContent: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TooltipContent = void 0;
7
+ const styled_1 = __importDefault(require("@emotion/styled"));
8
+ exports.TooltipContent = styled_1.default.span `
9
+ overflow: scroll;
10
+ overscroll-behavior: none;
11
+ padding: 8px 12px;
12
+
13
+ &::-webkit-scrollbar {
14
+ display: none;
15
+ }
16
+ `;
@@ -0,0 +1,7 @@
1
+ import { ReactElement } from "react";
2
+ export interface NTagProps {
3
+ className?: string;
4
+ Tag: ReactElement;
5
+ TooltipTitle: ReactElement;
6
+ }
7
+ export declare const NTag: ({ className, Tag, TooltipTitle, ...props }: NTagProps) => JSX.Element;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.NTag = void 0;
18
+ const react_1 = __importDefault(require("react"));
19
+ const tooltip_1 = require("./components/Tooltip/tooltip");
20
+ const NTag = (_a) => {
21
+ var { className, Tag, TooltipTitle } = _a, props = __rest(_a, ["className", "Tag", "TooltipTitle"]) /* Spread props to allow for Mui Tooltip specific prop overrides. */;
22
+ return (react_1.default.createElement(tooltip_1.Tooltip, Object.assign({ className: className, title: TooltipTitle }, props), Tag));
23
+ };
24
+ exports.NTag = NTag;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { TypographyProps } from "../../../../../common/Typography/common/entities";
3
+ export declare type MetadataValue = string;
4
+ export interface NTagCellProps {
5
+ label: string;
6
+ TypographyProps?: TypographyProps;
7
+ values: MetadataValue[];
8
+ }
9
+ export declare const NTagCell: ({ label, TypographyProps, values, }: NTagCellProps) => JSX.Element;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.NTagCell = void 0;
27
+ const material_1 = require("@mui/material");
28
+ const react_1 = __importStar(require("react"));
29
+ const typography_1 = require("../../../../../../theme/common/typography");
30
+ const nTag_1 = require("./components/NTag/nTag");
31
+ // Template constants
32
+ const MAX_DISPLAYABLE_VALUES = 1;
33
+ /**
34
+ * String-concatenates the specified list of metadata values to a string value, joined by a comma ",".
35
+ * @param metadataValues - List of metadata values.
36
+ * @returns the metadata values in a string, each value joined by a comma.
37
+ */
38
+ function stringifyMetadataValues(metadataValues) {
39
+ return metadataValues.join(", ");
40
+ }
41
+ /**
42
+ * Renders tag for NTag component.
43
+ * Tooltip children require forward ref.
44
+ */
45
+ const Tag = (0, react_1.forwardRef)(function Tag(props, ref) {
46
+ return react_1.default.createElement(material_1.Chip, Object.assign({ ref: ref }, props));
47
+ });
48
+ const NTagCell = ({ label, TypographyProps, values, }) => {
49
+ const metadataCount = values.length;
50
+ const showNTag = metadataCount > MAX_DISPLAYABLE_VALUES;
51
+ return (react_1.default.createElement(react_1.default.Fragment, null, showNTag ? (react_1.default.createElement(nTag_1.NTag, { Tag: react_1.default.createElement(Tag, { label: `${metadataCount} ${label}`, variant: "ntag" }), TooltipTitle: react_1.default.createElement(material_1.Typography, { display: "block", variant: typography_1.TEXT_BODY_SMALL_400 }, stringifyMetadataValues(values)) })) : (values.map((value, v) => (react_1.default.createElement(material_1.Typography, Object.assign({ key: `${value}${v}`, variant: "inherit" }, TypographyProps), value))))));
52
+ };
53
+ exports.NTagCell = NTagCell;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Row } from "@tanstack/react-table";
3
- export interface RowSelectionCellProps<T> {
2
+ import { Row, RowData } from "@tanstack/react-table";
3
+ export interface RowSelectionCellProps<T extends RowData> {
4
4
  row: Row<T>;
5
5
  }
6
6
  export declare const RowSelectionCell: <T extends unknown>({ row, }: RowSelectionCellProps<T>) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Table } from "@tanstack/react-table";
3
- export interface HeadSelectionCellProps<T> {
2
+ import { RowData, Table } from "@tanstack/react-table";
3
+ export interface HeadSelectionCellProps<T extends RowData> {
4
4
  tableInstance: Table<T>;
5
5
  }
6
6
  export declare const HeadSelectionCell: <T extends unknown>({ tableInstance, }: HeadSelectionCellProps<T>) => JSX.Element;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { Table } from "@tanstack/react-table";
2
+ import { RowData, Table } from "@tanstack/react-table";
3
3
  import { ROW_DIRECTION } from "../../common/entities";
4
- export interface TableHeadProps<T> {
4
+ export interface TableHeadProps<T extends RowData> {
5
5
  rowDirection: ROW_DIRECTION;
6
6
  tableInstance: Table<T>;
7
7
  }
8
- export declare const TableHead: <T extends object>({ rowDirection, tableInstance, }: TableHeadProps<T>) => JSX.Element;
8
+ export declare const TableHead: <T extends unknown>({ rowDirection, tableInstance, }: TableHeadProps<T>) => JSX.Element;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ interface Props {
3
+ isPreview?: boolean;
4
+ }
5
+ export declare const TableRow: import("@emotion/styled").StyledComponent<{
6
+ children?: import("react").ReactNode;
7
+ classes?: Partial<import("@mui/material").TableRowClasses> | undefined;
8
+ hover?: boolean | undefined;
9
+ selected?: boolean | undefined;
10
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
11
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & {
12
+ ref?: ((instance: HTMLTableRowElement | null) => void) | import("react").RefObject<HTMLTableRowElement> | null | undefined;
13
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "selected" | "hover"> & {
14
+ theme?: import("@emotion/react").Theme | undefined;
15
+ } & Props, {}, {}>;
16
+ export {};
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TableRow = void 0;
7
+ const react_1 = require("@emotion/react");
8
+ const styled_1 = __importDefault(require("@emotion/styled"));
9
+ const material_1 = require("@mui/material");
10
+ const colors_1 = require("../../../../styles/common/mixins/colors");
11
+ exports.TableRow = (0, styled_1.default)(material_1.TableRow, {
12
+ shouldForwardProp: (prop) => prop !== "isPreview",
13
+ }) `
14
+ && {
15
+ transition: background-color 300ms ease-in;
16
+
17
+ ${(props) => props.isPreview &&
18
+ (0, react_1.css) `
19
+ background-color: ${(0, colors_1.primaryLightest)(props)};
20
+ `}
21
+ }
22
+ `;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { Table } from "@tanstack/react-table";
2
+ import { RowData, Table } from "@tanstack/react-table";
3
3
  import { Virtualizer } from "@tanstack/react-virtual";
4
- export interface CollapsableRowsProps<T> {
4
+ export interface CollapsableRowsProps<T extends RowData> {
5
5
  tableInstance: Table<T>;
6
6
  virtualizer: Virtualizer<Window, Element>;
7
7
  }
8
- export declare const CollapsableRows: <T extends object>({ tableInstance, virtualizer, }: CollapsableRowsProps<T>) => JSX.Element;
8
+ export declare const CollapsableRows: <T extends unknown>({ tableInstance, virtualizer, }: CollapsableRowsProps<T>) => JSX.Element;
@@ -24,17 +24,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.CollapsableRows = void 0;
27
- const material_1 = require("@mui/material");
28
27
  const react_1 = __importStar(require("react"));
29
28
  const utils_1 = require("../../../../common/utils");
30
29
  const collapsableCell_1 = require("../../../TableCell/components/CollapsableCell/collapsableCell");
30
+ const tableRow_styles_1 = require("../../../TableRow/tableRow.styles");
31
31
  const CollapsableRows = ({ tableInstance, virtualizer, }) => {
32
32
  const { getRowModel } = tableInstance;
33
33
  const { rows } = getRowModel();
34
34
  const virtualItems = virtualizer.getVirtualItems();
35
35
  return (react_1.default.createElement(react_1.Fragment, null, virtualItems.map((virtualRow) => {
36
36
  const row = rows[virtualRow.index];
37
- return (react_1.default.createElement(material_1.TableRow, { key: row.id, "data-index": virtualRow.index, ref: virtualizer.measureElement },
37
+ const { getIsPreview } = row;
38
+ return (react_1.default.createElement(tableRow_styles_1.TableRow, { key: row.id, "data-index": virtualRow.index, isPreview: getIsPreview(), ref: virtualizer.measureElement },
38
39
  react_1.default.createElement(collapsableCell_1.CollapsableCell, { isDisabled: (0, utils_1.isCollapsableRowDisabled)(tableInstance), row: row })));
39
40
  })));
40
41
  };
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { Table } from "@tanstack/react-table";
2
+ import { RowData, Table } from "@tanstack/react-table";
3
3
  import { Virtualizer } from "@tanstack/react-virtual";
4
- export interface TableRowsProps<T> {
4
+ export interface TableRowsProps<T extends RowData> {
5
5
  tableInstance: Table<T>;
6
6
  virtualizer: Virtualizer<Window, Element>;
7
7
  }
8
- export declare const TableRows: <T extends object>({ tableInstance, virtualizer, }: TableRowsProps<T>) => JSX.Element;
8
+ export declare const TableRows: <T extends unknown>({ tableInstance, virtualizer, }: TableRowsProps<T>) => JSX.Element;
@@ -28,13 +28,15 @@ const material_1 = require("@mui/material");
28
28
  const react_table_1 = require("@tanstack/react-table");
29
29
  const react_1 = __importStar(require("react"));
30
30
  const utils_1 = require("../TableCell/common/utils");
31
+ const tableRow_styles_1 = require("../TableRow/tableRow.styles");
31
32
  const TableRows = ({ tableInstance, virtualizer, }) => {
32
33
  const { getRowModel } = tableInstance;
33
34
  const { rows } = getRowModel();
34
35
  const virtualItems = virtualizer.getVirtualItems();
35
36
  return (react_1.default.createElement(react_1.Fragment, null, virtualItems.map((virtualRow) => {
36
37
  const row = rows[virtualRow.index];
37
- return (react_1.default.createElement(material_1.TableRow, { key: row.id, "data-index": virtualRow.index, ref: virtualizer.measureElement }, row.getVisibleCells().map((cell) => (react_1.default.createElement(material_1.TableCell, { key: cell.id, padding: (0, utils_1.getTableCellPadding)(cell.column.id) }, (0, react_table_1.flexRender)(cell.column.columnDef.cell, cell.getContext()))))));
38
+ const { getIsPreview } = row;
39
+ return (react_1.default.createElement(tableRow_styles_1.TableRow, { key: row.id, "data-index": virtualRow.index, isPreview: getIsPreview(), ref: virtualizer.measureElement }, row.getVisibleCells().map((cell) => (react_1.default.createElement(material_1.TableCell, { key: cell.id, padding: (0, utils_1.getTableCellPadding)(cell.column.id) }, (0, react_table_1.flexRender)(cell.column.columnDef.cell, cell.getContext()))))));
38
40
  })));
39
41
  };
40
42
  exports.TableRows = TableRows;
@@ -0,0 +1,2 @@
1
+ import { DrawerProps as MDrawerProps } from "@mui/material";
2
+ export declare const DEFAULT_DRAWER_PROPS: Partial<MDrawerProps>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_DRAWER_PROPS = void 0;
4
+ exports.DEFAULT_DRAWER_PROPS = {
5
+ PaperProps: {
6
+ elevation: 2,
7
+ },
8
+ anchor: "right",
9
+ disableEnforceFocus: true,
10
+ disableScrollLock: true,
11
+ hideBackdrop: true,
12
+ };
@@ -0,0 +1,9 @@
1
+ import { DrawerProps as MDrawerProps } from "@mui/material";
2
+ import { RowData, Table } from "@tanstack/react-table";
3
+ import { ReactNode } from "react";
4
+ export interface RowDrawerProps<T extends RowData> extends Omit<MDrawerProps, "content" | "title"> {
5
+ className?: string;
6
+ tableInstance: Table<T>;
7
+ title: ReactNode;
8
+ }
9
+ export declare const RowDrawer: <T extends unknown>({ children, className, tableInstance, title, ...props }: RowDrawerProps<T>) => JSX.Element;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.RowDrawer = void 0;
18
+ const material_1 = require("@mui/material");
19
+ const react_1 = __importDefault(require("react"));
20
+ const typography_1 = require("../../../../../../../../theme/common/typography");
21
+ const drawer_styles_1 = require("../../../../../../../common/Drawer/components/drawer.styles");
22
+ const constants_1 = require("./common/constants");
23
+ const rowDrawer_styles_1 = require("./rowDrawer.styles");
24
+ const RowDrawer = (_a) => {
25
+ var { children, className, tableInstance, title } = _a, props = __rest(_a, ["children", "className", "tableInstance", "title"]) /* Spread props to allow for Mui Drawer specific prop overrides. */;
26
+ const { getIsRowPreview, resetRowPreview, toggleRowPreview } = tableInstance;
27
+ return (react_1.default.createElement(rowDrawer_styles_1.Drawer, Object.assign({}, constants_1.DEFAULT_DRAWER_PROPS, { className: className, onTransitionExited: resetRowPreview, open: getIsRowPreview() }, props),
28
+ react_1.default.createElement(rowDrawer_styles_1.DrawerTitle, { onClose: () => toggleRowPreview === null || toggleRowPreview === void 0 ? void 0 : toggleRowPreview(), title: typeof title === "string" ? (react_1.default.createElement(material_1.Typography, { component: "div", noWrap: true, variant: typography_1.TEXT_HEADING_SMALL }, title)) : (title) }),
29
+ react_1.default.createElement(material_1.Divider, null),
30
+ react_1.default.createElement(drawer_styles_1.DrawerContent, null, children)));
31
+ };
32
+ exports.RowDrawer = RowDrawer;
@@ -0,0 +1,6 @@
1
+ export declare const Drawer: import("@emotion/styled").StyledComponent<import("../../../../../../../common/Drawer/drawer").DrawerProps & {
2
+ theme?: import("@emotion/react").Theme | undefined;
3
+ }, {}, {}>;
4
+ export declare const DrawerTitle: import("@emotion/styled").StyledComponent<import("../../../../../../../common/Drawer/components/DrawerTitle/drawerTitle").DrawerTitleProps & {
5
+ theme?: import("@emotion/react").Theme | undefined;
6
+ }, {}, {}>;