@databiosphere/findable-ui 5.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.
- package/README.md +5 -1
- package/lib/components/ComponentCreator/ComponentCreator.d.ts +4 -2
- package/lib/components/ComponentCreator/ComponentCreator.js +6 -8
- package/lib/components/Detail/components/DetailViewTable/detailViewTable.d.ts +3 -3
- package/lib/components/Detail/components/DetailViewTable/detailViewTable.js +1 -1
- package/lib/components/Detail/components/Table/common/utils.d.ts +2 -2
- package/lib/components/Detail/components/Table/components/TableBody/tableBody.d.ts +3 -3
- package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +3 -3
- package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +2 -4
- package/lib/components/Detail/components/Table/components/TableRows/tableRows.d.ts +2 -2
- package/lib/components/Detail/components/Table/components/TableRows/tableRows.js +2 -1
- package/lib/components/Detail/components/Table/table.d.ts +3 -4
- package/lib/components/Detail/components/Table/table.js +2 -1
- package/lib/components/Filter/components/Filters/filters.d.ts +1 -1
- package/lib/components/Index/components/Cell/cell.d.ts +3 -0
- package/lib/components/Index/components/Cell/cell.js +3 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +3 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +3 -0
- package/lib/components/Index/components/NTag/nTag.d.ts +3 -0
- package/lib/components/Index/components/NTag/nTag.js +3 -0
- package/lib/components/Index/components/NTagCell/nTagCell.d.ts +6 -1
- package/lib/components/Index/components/NTagCell/nTagCell.js +6 -2
- package/lib/components/Layout/components/Outline/common/constants.d.ts +1 -1
- package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.d.ts +1 -1
- package/lib/components/Links/components/Link/link.d.ts +3 -1
- package/lib/components/Links/components/Link/link.js +4 -4
- package/lib/components/Table/common/gridTable.styles.js +8 -2
- package/lib/components/Table/common/utils.d.ts +19 -14
- package/lib/components/Table/common/utils.js +26 -11
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.d.ts +3 -3
- package/lib/components/Table/components/PaginationSummary/paginationSummary.js +9 -8
- package/lib/components/Table/components/TableBody/tableBody.d.ts +3 -3
- package/lib/components/Table/components/TableCell/common/utils.d.ts +3 -3
- package/lib/components/Table/components/TableCell/components/BasicCell/basicCell.d.ts +7 -0
- package/lib/components/Table/components/TableCell/components/BasicCell/basicCell.js +55 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.d.ts +6 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.js +93 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.d.ts +5 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.js +16 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.d.ts +7 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.js +24 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.d.ts +9 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.js +53 -0
- package/lib/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.d.ts +2 -2
- package/lib/components/Table/components/TableHead/components/HeadSelectionCell/headSelectionCell.d.ts +2 -2
- package/lib/components/Table/components/TableHead/tableHead.d.ts +3 -3
- package/lib/components/Table/components/TableRow/tableRow.styles.d.ts +16 -0
- package/lib/components/Table/components/TableRow/tableRow.styles.js +22 -0
- package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +3 -3
- package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +3 -2
- package/lib/components/Table/components/TableRows/tableRows.d.ts +3 -3
- package/lib/components/Table/components/TableRows/tableRows.js +3 -1
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.d.ts +2 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.js +12 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.d.ts +9 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.js +32 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.d.ts +6 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.js +35 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.d.ts +12 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.js +32 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.d.ts +5 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.js +50 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.d.ts +7 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.js +16 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.d.ts +5 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.js +17 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/rowPreview.d.ts +8 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/rowPreview.js +14 -0
- package/lib/components/Table/components/TableToolbar/components/RowSelection/rowSelection.d.ts +3 -3
- package/lib/components/Table/components/TableToolbar/tableToolbar.d.ts +3 -3
- package/lib/components/Table/components/TableToolbar/tableToolbar.js +9 -6
- package/lib/components/Table/features/RowPreview/constants.d.ts +2 -0
- package/lib/components/Table/features/RowPreview/constants.js +45 -0
- package/lib/components/Table/features/RowPreview/entities.d.ts +22 -0
- package/lib/components/Table/features/RowPreview/entities.js +2 -0
- package/lib/components/Table/features/RowPreview/utils.d.ts +33 -0
- package/lib/components/Table/features/RowPreview/utils.js +89 -0
- package/lib/components/Table/features/entities.d.ts +7 -0
- package/lib/components/Table/features/entities.js +2 -0
- package/lib/components/Table/table.d.ts +4 -12
- package/lib/components/Table/table.js +26 -38
- package/lib/components/TableCreator/common/entities.d.ts +1 -1
- package/lib/components/TableCreator/tableCreator.d.ts +2 -9
- package/lib/components/TableCreator/tableCreator.js +4 -4
- package/lib/components/common/Button/button.d.ts +1 -1
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.d.ts +7 -0
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.js +17 -0
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.d.ts +5 -0
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.js +17 -0
- package/lib/components/common/Drawer/components/drawer.styles.d.ts +5 -0
- package/lib/components/common/Drawer/components/drawer.styles.js +11 -0
- package/lib/components/common/Drawer/drawer.d.ts +7 -0
- package/lib/components/common/Drawer/drawer.js +24 -0
- package/lib/components/common/Grid/grid.d.ts +1 -1
- package/lib/components/common/Typography/common/entities.d.ts +2 -0
- package/lib/components/common/Typography/common/entities.js +2 -0
- package/lib/config/entities.d.ts +7 -25
- package/lib/providers/exploreState/entities.d.ts +3 -2
- package/lib/providers/exploreState/initializer/constants.js +1 -3
- package/lib/providers/exploreState/initializer/utils.js +1 -0
- package/lib/providers/exploreState/payloads/entities.d.ts +6 -11
- package/lib/providers/exploreState/utils.d.ts +12 -10
- package/lib/providers/exploreState/utils.js +20 -24
- package/lib/providers/exploreState.d.ts +12 -32
- package/lib/providers/exploreState.js +47 -36
- package/lib/styles/common/mixins/colors.d.ts +2 -1
- package/lib/styles/common/mixins/colors.js +3 -1
- package/lib/theme/common/components.js +11 -2
- package/lib/theme/common/palette.d.ts +3 -1
- package/lib/theme/common/palette.js +4 -1
- package/lib/views/ExploreView/exploreView.js +4 -6
- package/package.json +2 -2
- package/src/components/ComponentCreator/ComponentCreator.tsx +6 -1
- package/src/components/Detail/components/DetailViewTable/detailViewTable.tsx +4 -4
- package/src/components/Detail/components/Table/common/utils.ts +2 -2
- package/src/components/Detail/components/Table/components/TableBody/tableBody.tsx +3 -3
- package/src/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +5 -7
- package/src/components/Detail/components/Table/components/TableRows/tableRows.tsx +10 -6
- package/src/components/Detail/components/Table/table.tsx +6 -3
- package/src/components/Filter/components/Filters/filters.tsx +1 -1
- package/src/components/Index/components/Cell/cell.tsx +4 -0
- package/src/components/Index/components/NTag/components/Tooltip/tooltip.tsx +4 -0
- package/src/components/Index/components/NTag/nTag.tsx +4 -0
- package/src/components/Index/components/NTagCell/nTagCell.tsx +22 -3
- package/src/components/Layout/components/Outline/common/constants.ts +1 -1
- package/src/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.tsx +1 -1
- package/src/components/Links/components/Link/link.tsx +15 -2
- package/src/components/Table/common/gridTable.styles.ts +8 -2
- package/src/components/Table/common/utils.ts +55 -24
- package/src/components/Table/components/DownloadEntityResults/downloadEntityResults.tsx +3 -3
- package/src/components/Table/components/PaginationSummary/paginationSummary.tsx +11 -9
- package/src/components/Table/components/TableBody/tableBody.tsx +3 -3
- package/src/components/Table/components/TableCell/common/utils.ts +3 -3
- package/src/components/Table/components/TableCell/components/BasicCell/basicCell.tsx +52 -0
- package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.ts +11 -0
- package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.tsx +86 -0
- package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.tsx +21 -0
- package/src/components/Table/components/TableCell/components/NTagCell/nTagCell.tsx +70 -0
- package/src/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.tsx +2 -3
- package/src/components/Table/components/TableHead/components/HeadSelectionCell/headSelectionCell.tsx +2 -3
- package/src/components/Table/components/TableHead/tableHead.tsx +3 -3
- package/src/components/Table/components/TableRow/tableRow.styles.ts +22 -0
- package/src/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +8 -6
- package/src/components/Table/components/TableRows/tableRows.tsx +9 -6
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.ts +11 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.ts +31 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.tsx +52 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.ts +48 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.tsx +53 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.ts +12 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.tsx +25 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/rowPreview.tsx +19 -0
- package/src/components/Table/components/TableToolbar/components/RowSelection/rowSelection.tsx +3 -3
- package/src/components/Table/components/TableToolbar/tableToolbar.tsx +9 -4
- package/src/components/Table/features/RowPreview/constants.ts +65 -0
- package/src/components/Table/features/RowPreview/entities.ts +25 -0
- package/src/components/Table/features/RowPreview/utils.ts +93 -0
- package/src/components/Table/features/entities.ts +13 -0
- package/src/components/Table/table.tsx +40 -50
- package/src/components/TableCreator/common/entities.ts +1 -1
- package/src/components/TableCreator/tableCreator.tsx +15 -22
- package/src/components/common/Button/button.tsx +1 -2
- package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.ts +12 -0
- package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.tsx +27 -0
- package/src/components/common/Drawer/components/drawer.styles.ts +6 -0
- package/src/components/common/Drawer/drawer.tsx +21 -0
- package/src/components/common/Grid/grid.tsx +1 -3
- package/src/components/common/Section/components/CollapsableSection/collapsableSection.tsx +1 -2
- package/src/components/common/Typography/common/entities.ts +5 -0
- package/src/config/entities.ts +7 -37
- package/src/providers/exploreState/entities.ts +7 -2
- package/src/providers/exploreState/initializer/constants.ts +1 -3
- package/src/providers/exploreState/initializer/utils.ts +2 -1
- package/src/providers/exploreState/payloads/entities.ts +7 -18
- package/src/providers/exploreState/utils.ts +25 -36
- package/src/providers/exploreState.tsx +93 -73
- package/src/styles/common/mixins/colors.ts +4 -1
- package/src/theme/common/components.ts +12 -0
- package/src/theme/common/palette.ts +4 -5
- package/src/theme/theme.ts +1 -2
- package/src/views/ExploreView/exploreView.tsx +3 -25
- package/types/data-explorer-ui.d.ts +21 -2
- package/src/hooks/useEntityListRelatedView.ts +0 -78
|
@@ -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(
|
|
11
|
-
react_1.default.createElement(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
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
|
|
2
|
-
import { CoreCell, CoreHeader } from "@tanstack/table
|
|
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
|
|
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,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;
|
package/lib/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.d.ts
CHANGED
|
@@ -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
|
|
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
|
+
`;
|
package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts
CHANGED
|
@@ -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
|
|
8
|
+
export declare const CollapsableRows: <T extends unknown>({ tableInstance, virtualizer, }: CollapsableRowsProps<T>) => JSX.Element;
|
package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
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,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
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,35 @@
|
|
|
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.DrawerTitle = exports.Drawer = void 0;
|
|
7
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const breakpoints_1 = require("../../../../../../../../styles/common/mixins/breakpoints");
|
|
9
|
+
const colors_1 = require("../../../../../../../../styles/common/mixins/colors");
|
|
10
|
+
const drawerTitle_1 = require("../../../../../../../common/Drawer/components/DrawerTitle/drawerTitle");
|
|
11
|
+
const drawer_1 = require("../../../../../../../common/Drawer/drawer");
|
|
12
|
+
exports.Drawer = (0, styled_1.default)(drawer_1.Drawer) `
|
|
13
|
+
&.MuiDrawer-modal {
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
|
|
16
|
+
.MuiDrawer-paper {
|
|
17
|
+
border-left: 1px solid ${colors_1.smokeMain};
|
|
18
|
+
box-shadow: -8px 0 8px -4px #10182808, 0 20px 24px -4px #10182814;
|
|
19
|
+
pointer-events: all;
|
|
20
|
+
max-width: min(506px, 84vw);
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
${breakpoints_1.mediaTabletUp} {
|
|
25
|
+
.MuiDrawer-paper {
|
|
26
|
+
max-width: min(506px, 50vw);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
exports.DrawerTitle = (0, styled_1.default)(drawerTitle_1.DrawerTitle) `
|
|
32
|
+
.MuiTypography-text-heading-small {
|
|
33
|
+
font-size: 20px;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RowData, Table } from "@tanstack/react-table";
|
|
3
|
+
import { ListConfig } from "../../../../../../../../../../config/entities";
|
|
4
|
+
interface RowDetailProps<T extends RowData> {
|
|
5
|
+
className?: string;
|
|
6
|
+
columns: ListConfig<T>["columns"];
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
minColumns?: number;
|
|
9
|
+
tableInstance: Table<T>;
|
|
10
|
+
}
|
|
11
|
+
export declare const RowDetail: <T extends unknown>({ className, columns, expanded, minColumns, tableInstance, }: RowDetailProps<T>) => JSX.Element | null;
|
|
12
|
+
export {};
|