@databiosphere/findable-ui 3.1.0 → 4.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/lib/components/Detail/components/DetailViewTable/detailViewTable.d.ts +3 -2
- package/lib/components/Detail/components/DetailViewTable/detailViewTable.js +14 -2
- package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +4 -1
- package/lib/components/Detail/components/Table/components/TableRows/tableRows.d.ts +1 -1
- package/lib/components/Detail/components/Table/components/TableRows/tableRows.js +21 -2
- package/lib/components/Detail/components/Table/table.d.ts +3 -1
- package/lib/components/Detail/components/Table/table.js +3 -7
- package/lib/components/Links/common/constants.d.ts +1 -0
- package/lib/components/Links/common/constants.js +4 -0
- package/lib/components/Links/common/entities.d.ts +8 -0
- package/lib/components/Links/common/utils.d.ts +13 -0
- package/lib/components/Links/common/utils.js +21 -1
- package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.d.ts +7 -0
- package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.js +148 -0
- package/lib/components/Links/components/Link/link.d.ts +2 -2
- package/lib/components/Links/components/Link/link.js +22 -6
- package/lib/components/Table/common/gridTable.styles.js +9 -1
- package/lib/components/Table/common/utils.d.ts +6 -0
- package/lib/components/Table/common/utils.js +10 -1
- package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.d.ts +4 -3
- package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.js +21 -3
- package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.styles.js +4 -0
- package/lib/components/Table/components/TableHead/tableHead.js +4 -1
- package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +2 -1
- package/lib/components/TableCreator/common/utils.js +1 -5
- package/lib/components/common/CustomIcon/components/AddLinkIcon/addLinkIcon.d.ts +3 -0
- package/lib/components/common/CustomIcon/components/AddLinkIcon/addLinkIcon.js +25 -0
- package/lib/components/common/CustomIcon/components/UnLinkIcon/unLinkIcon.d.ts +3 -0
- package/lib/components/common/CustomIcon/components/UnLinkIcon/unLinkIcon.js +25 -0
- package/lib/components/common/Progress/components/CircularProgress/circularProgress.d.ts +7 -0
- package/lib/components/common/Progress/components/CircularProgress/circularProgress.js +28 -0
- package/lib/components/common/Progress/components/CircularProgress/circularProgress.styles.d.ts +5 -0
- package/lib/components/common/Progress/components/CircularProgress/circularProgress.styles.js +11 -0
- package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.d.ts +7 -0
- package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.js +44 -0
- package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.styles.d.ts +3 -0
- package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.styles.js +32 -0
- package/lib/providers/exploreState/initializer/constants.d.ts +2 -0
- package/lib/providers/exploreState/initializer/constants.js +7 -1
- package/lib/providers/exploreState/initializer/utils.js +1 -8
- package/lib/providers/exploreState/payloads/entities.d.ts +8 -1
- package/lib/providers/exploreState/utils.d.ts +4 -2
- package/lib/providers/exploreState/utils.js +4 -4
- package/lib/providers/exploreState.d.ts +10 -2
- package/lib/providers/exploreState.js +13 -0
- package/lib/styles/common/mixins/colors.d.ts +3 -3
- package/lib/styles/common/mixins/colors.js +7 -7
- package/lib/theme/common/components.d.ts +6 -0
- package/lib/theme/common/components.js +31 -1
- package/lib/theme/theme.js +1 -0
- package/package.json +1 -1
- package/src/components/Detail/components/DetailViewTable/detailViewTable.tsx +4 -2
- package/src/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +6 -1
- package/src/components/Detail/components/Table/components/TableRows/tableRows.tsx +29 -6
- package/src/components/Detail/components/Table/table.tsx +6 -1
- package/src/components/Links/common/constants.ts +1 -0
- package/src/components/Links/common/entities.ts +11 -0
- package/src/components/Links/common/utils.ts +28 -0
- package/src/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.tsx +172 -0
- package/src/components/Links/components/Link/link.tsx +36 -14
- package/src/components/Table/common/gridTable.styles.ts +9 -1
- package/src/components/Table/common/utils.ts +9 -0
- package/src/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.styles.ts +4 -0
- package/src/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.tsx +26 -4
- package/src/components/Table/components/TableHead/tableHead.tsx +32 -21
- package/src/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +5 -1
- package/src/components/TableCreator/common/utils.ts +1 -0
- package/src/components/common/CustomIcon/components/AddLinkIcon/addLinkIcon.tsx +18 -0
- package/src/components/common/CustomIcon/components/UnLinkIcon/unLinkIcon.tsx +18 -0
- package/src/components/common/Progress/components/CircularProgress/circularProgress.styles.ts +6 -0
- package/src/components/common/Progress/components/CircularProgress/circularProgress.tsx +26 -0
- package/src/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.styles.ts +33 -0
- package/src/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.tsx +23 -0
- package/src/providers/exploreState/initializer/constants.ts +8 -0
- package/src/providers/exploreState/initializer/utils.ts +6 -9
- package/src/providers/exploreState/payloads/entities.ts +8 -0
- package/src/providers/exploreState/utils.ts +11 -7
- package/src/providers/exploreState.tsx +33 -0
- package/src/styles/common/mixins/colors.ts +6 -6
- package/src/theme/common/components.ts +32 -0
- package/src/theme/theme.ts +1 -0
- package/types/data-explorer-ui.d.ts +12 -0
- package/src/components/Detail/components/Table/components/TableHead/tableHead.tsx +0 -34
|
@@ -0,0 +1,25 @@
|
|
|
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.AddLinkIcon = void 0;
|
|
18
|
+
const material_1 = require("@mui/material");
|
|
19
|
+
const react_1 = __importDefault(require("react"));
|
|
20
|
+
const AddLinkIcon = (_a) => {
|
|
21
|
+
var { fontSize = "xsmall", viewBox = "0 0 18 18" } = _a, props = __rest(_a, ["fontSize", "viewBox"]) /* Spread props to allow for Mui SvgIconProps specific prop overrides e.g. "htmlColor". */;
|
|
22
|
+
return (react_1.default.createElement(material_1.SvgIcon, Object.assign({ fontSize: fontSize, viewBox: viewBox }, props),
|
|
23
|
+
react_1.default.createElement("path", { d: "M12.8248 12.6004H11.4561C11.2811 12.6004 11.1279 12.5357 10.9967 12.4063C10.8654 12.277 10.7998 12.1166 10.7998 11.9254C10.7998 11.7504 10.8645 11.5941 10.9939 11.4566C11.1232 11.3191 11.2836 11.2504 11.4748 11.2504H12.8248V9.90039C12.8248 9.70914 12.8891 9.54883 13.0177 9.41945C13.1464 9.29008 13.3057 9.22539 13.4959 9.22539C13.686 9.22539 13.8459 9.29008 13.9755 9.41945C14.1052 9.54883 14.1701 9.70914 14.1701 9.90039V11.2504H15.5233C15.7149 11.2504 15.8756 11.3151 16.0054 11.4445C16.135 11.5738 16.1998 11.7341 16.1998 11.9254C16.1998 12.1166 16.135 12.277 16.0054 12.4063C15.8756 12.5357 15.7149 12.6004 15.5233 12.6004H14.1701V13.9504C14.1701 14.1416 14.1052 14.302 13.9755 14.4313C13.8459 14.5607 13.686 14.6254 13.4959 14.6254C13.3057 14.6254 13.1464 14.5607 13.0177 14.4313C12.8891 14.302 12.8248 14.1416 12.8248 13.9504V12.6004ZM7.4248 12.6004H5.3998C4.4038 12.6004 3.5548 12.249 2.8528 11.5461C2.1508 10.8433 1.7998 9.99333 1.7998 8.99608C1.7998 7.99895 2.1508 7.15039 2.8528 6.45039C3.5548 5.75039 4.4038 5.40039 5.3998 5.40039H7.4248C7.5998 5.40039 7.75605 5.46914 7.89355 5.60664C8.03105 5.74414 8.0998 5.90352 8.0998 6.08477C8.0998 6.26602 8.03105 6.42227 7.89355 6.55352C7.75605 6.68477 7.5998 6.75039 7.4248 6.75039H5.3998C4.7748 6.75039 4.24355 6.96914 3.80605 7.40664C3.36855 7.84414 3.1498 8.37539 3.1498 9.00039C3.1498 9.62539 3.36855 10.1566 3.80605 10.5941C4.24355 11.0316 4.7748 11.2504 5.3998 11.2504H7.4248C7.5998 11.2504 7.75605 11.3191 7.89355 11.4566C8.03105 11.5941 8.0998 11.7535 8.0998 11.9348C8.0998 12.116 8.03105 12.2723 7.89355 12.4035C7.75605 12.5348 7.5998 12.6004 7.4248 12.6004ZM6.98005 9.67539C6.78905 9.67539 6.62793 9.61108 6.49668 9.48245C6.36543 9.35383 6.2998 9.19445 6.2998 9.00433C6.2998 8.8142 6.36443 8.65352 6.49368 8.52227C6.62293 8.39102 6.78305 8.32539 6.97405 8.32539H11.0196C11.2106 8.32539 11.3717 8.3897 11.5029 8.51833C11.6342 8.64695 11.6998 8.80633 11.6998 8.99645C11.6998 9.18658 11.6352 9.34727 11.5059 9.47852C11.3767 9.60977 11.2166 9.67539 11.0256 9.67539H6.98005ZM16.1998 9.00039H14.8498C14.8498 8.37539 14.6311 7.84414 14.1936 7.40664C13.7561 6.96914 13.2248 6.75039 12.5998 6.75039H10.5561C10.3811 6.75039 10.2279 6.6857 10.0967 6.55633C9.96543 6.42695 9.8998 6.26664 9.8998 6.07539C9.8998 5.90039 9.96449 5.74414 10.0939 5.60664C10.2232 5.46914 10.3836 5.40039 10.5748 5.40039H12.5998C13.5958 5.40039 14.4448 5.75139 15.1468 6.45339C15.8488 7.15539 16.1998 8.00439 16.1998 9.00039Z", fill: "currentColor" })));
|
|
24
|
+
};
|
|
25
|
+
exports.AddLinkIcon = AddLinkIcon;
|
|
@@ -0,0 +1,25 @@
|
|
|
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.UnLinkIcon = void 0;
|
|
18
|
+
const material_1 = require("@mui/material");
|
|
19
|
+
const react_1 = __importDefault(require("react"));
|
|
20
|
+
const UnLinkIcon = (_a) => {
|
|
21
|
+
var { fontSize = "xsmall", viewBox = "0 0 18 18" } = _a, props = __rest(_a, ["fontSize", "viewBox"]) /* Spread props to allow for Mui SvgIconProps specific prop overrides e.g. "htmlColor". */;
|
|
22
|
+
return (react_1.default.createElement(material_1.SvgIcon, Object.assign({ fontSize: fontSize, viewBox: viewBox }, props),
|
|
23
|
+
react_1.default.createElement("path", { d: "M11.4561 9.52501L10.2373 8.325H11.0196C11.2123 8.325 11.3738 8.38968 11.5042 8.51905C11.6346 8.64843 11.6998 8.80875 11.6998 9C11.6998 9.11245 11.6748 9.21253 11.6248 9.30001C11.5748 9.38749 11.5123 9.46246 11.4373 9.52501H11.4561ZM14.8873 15.825C14.7498 15.9625 14.5904 16.0312 14.4092 16.0312C14.2279 16.0312 14.0685 15.9625 13.9311 15.825L2.15605 4.06874C2.01856 3.93124 1.94981 3.77187 1.94981 3.59062C1.94981 3.40937 2.01856 3.25 2.15605 3.11249C2.29355 2.97499 2.45293 2.90625 2.63418 2.90625C2.81543 2.90625 2.97481 2.97499 3.1123 3.11249L14.8873 14.8875C15.0248 15.025 15.0935 15.1812 15.0935 15.3562C15.0935 15.5313 15.0248 15.6875 14.8873 15.825ZM5.3998 12.6C4.4038 12.6 3.5548 12.249 2.8528 11.547C2.1508 10.845 1.7998 9.99598 1.7998 9C1.7998 8.20087 2.03731 7.48855 2.51231 6.86305C2.9873 6.23768 3.6623 5.74374 4.53731 5.38125L5.8498 6.75H5.41855C4.78105 6.75 4.24356 6.96874 3.80606 7.40625C3.36856 7.84375 3.1498 8.37499 3.1498 9C3.1498 9.625 3.36856 10.1563 3.80606 10.5938C4.24356 11.0313 4.77481 11.25 5.3998 11.25H7.4248C7.61605 11.25 7.77636 11.3143 7.90575 11.4429C8.03512 11.5715 8.0998 11.7309 8.0998 11.9211C8.0998 12.1112 8.03512 12.2719 7.90575 12.4031C7.77636 12.5343 7.61605 12.6 7.4248 12.6H5.3998ZM6.97274 9.67495C6.78661 9.67495 6.62793 9.61069 6.49668 9.48208C6.36543 9.35347 6.2998 9.19408 6.2998 9.00391C6.2998 8.81381 6.3645 8.65312 6.49387 8.52187C6.62325 8.39062 6.78355 8.325 6.9748 8.325H7.34981L8.68105 9.67495H6.97274ZM13.6686 11.775C13.5686 11.625 13.5342 11.4594 13.5654 11.2781C13.5966 11.0969 13.6873 10.9563 13.8373 10.8562C14.1498 10.6437 14.3967 10.375 14.5779 10.05C14.7592 9.72499 14.8498 9.37498 14.8498 9C14.8498 8.37499 14.631 7.84375 14.1935 7.40625C13.756 6.96874 13.2248 6.75 12.5998 6.75H10.5748C10.3836 6.75 10.2233 6.68568 10.0938 6.55705C9.96451 6.42844 9.8998 6.26905 9.8998 6.07893C9.8998 5.8888 9.96451 5.72812 10.0938 5.59687C10.2233 5.46563 10.3836 5.4 10.5748 5.4H12.5998C13.5958 5.4 14.4448 5.751 15.1468 6.453C15.8488 7.155 16.1998 8.00399 16.1998 9C16.1998 9.6034 16.0561 10.1667 15.7685 10.69C15.4811 11.2133 15.0873 11.6375 14.5873 11.9625C14.4373 12.0625 14.2716 12.0937 14.0904 12.0563C13.9092 12.0187 13.7685 11.925 13.6686 11.775Z", fill: "currentColor" })));
|
|
24
|
+
};
|
|
25
|
+
exports.UnLinkIcon = UnLinkIcon;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CircularProgressProps as MCircularProgressProps } from "@mui/material";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
export interface CircularProgressProps extends MCircularProgressProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
Track?: ElementType<CircularProgressProps>;
|
|
6
|
+
}
|
|
7
|
+
export declare const CircularProgress: ({ className, value, Track, ...props }: CircularProgressProps) => JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
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.CircularProgress = void 0;
|
|
18
|
+
const material_1 = require("@mui/material");
|
|
19
|
+
const react_1 = __importDefault(require("react"));
|
|
20
|
+
const circularProgress_styles_1 = require("./circularProgress.styles");
|
|
21
|
+
const circularProgressTrack_1 = require("./components/CircularProgressTrack/circularProgressTrack");
|
|
22
|
+
const CircularProgress = (_a) => {
|
|
23
|
+
var { className, value, Track = circularProgressTrack_1.CircularProgressTrack } = _a, props = __rest(_a, ["className", "value", "Track"]) /* Spread props to allow for CircularProgress specific props e.g. "disableShrink". */;
|
|
24
|
+
return (react_1.default.createElement(circularProgress_styles_1.ProgressPositioner, { className: className },
|
|
25
|
+
react_1.default.createElement(Track, Object.assign({}, props)),
|
|
26
|
+
react_1.default.createElement(material_1.CircularProgress, Object.assign({ value: value }, props))));
|
|
27
|
+
};
|
|
28
|
+
exports.CircularProgress = CircularProgress;
|
package/lib/components/common/Progress/components/CircularProgress/circularProgress.styles.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ProgressPositioner: 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<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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.ProgressPositioner = void 0;
|
|
7
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
exports.ProgressPositioner = styled_1.default.div `
|
|
9
|
+
display: flex;
|
|
10
|
+
position: relative; /* positions track */
|
|
11
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CircularProgressProps as MCircularProgressProps } from "@mui/material";
|
|
3
|
+
export interface CircularProgressTrackProps extends MCircularProgressProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
track?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const CircularProgressTrack: ({ className, track, value, ...props }: CircularProgressTrackProps) => JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
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.CircularProgressTrack = void 0;
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
39
|
+
const circularProgressTrack_styles_1 = require("./circularProgressTrack.styles");
|
|
40
|
+
const CircularProgressTrack = (_a) => {
|
|
41
|
+
var { className, track = true, value = 100 } = _a, props = __rest(_a, ["className", "track", "value"]) /* Spread props to allow for CircularProgress specific props e.g. "disableShrink". */;
|
|
42
|
+
return (react_1.default.createElement(react_1.Fragment, null, track && (react_1.default.createElement(circularProgressTrack_styles_1.CircularProgress, Object.assign({ className: className, value: value }, props)))));
|
|
43
|
+
};
|
|
44
|
+
exports.CircularProgressTrack = CircularProgressTrack;
|
|
@@ -0,0 +1,32 @@
|
|
|
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.CircularProgress = void 0;
|
|
7
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const colors_1 = require("../../../../../../../styles/common/mixins/colors");
|
|
10
|
+
exports.CircularProgress = (0, styled_1.default)(material_1.CircularProgress) `
|
|
11
|
+
color: ${colors_1.smokeLight};
|
|
12
|
+
left: 0;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
z-index: 0;
|
|
16
|
+
|
|
17
|
+
&.MuiCircularProgress-colorAlert {
|
|
18
|
+
color: ${colors_1.alertLight};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.MuiCircularProgress-colorInfo {
|
|
22
|
+
color: ${colors_1.infoLight};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.MuiCircularProgress-colorSuccess {
|
|
26
|
+
color: ${colors_1.successLight};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.MuiCircularProgress-colorWarning {
|
|
30
|
+
color: ${colors_1.warningLight};
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { CategoryGroup } from "../../../config/entities";
|
|
1
2
|
import { ExploreState, PaginationState } from "../../exploreState";
|
|
2
3
|
import { EntityState } from "../entities";
|
|
4
|
+
export declare const DEFAULT_CATEGORY_GROUP_SAVED_FILTERS: CategoryGroup;
|
|
3
5
|
export declare const DEFAULT_ENTITY_STATE: EntityState;
|
|
4
6
|
export declare const DEFAULT_PAGINATION_STATE: PaginationState;
|
|
5
7
|
export declare const INITIAL_STATE: ExploreState;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.INITIAL_STATE = exports.DEFAULT_PAGINATION_STATE = exports.DEFAULT_ENTITY_STATE = void 0;
|
|
3
|
+
exports.INITIAL_STATE = exports.DEFAULT_PAGINATION_STATE = exports.DEFAULT_ENTITY_STATE = exports.DEFAULT_CATEGORY_GROUP_SAVED_FILTERS = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
exports.DEFAULT_CATEGORY_GROUP_SAVED_FILTERS = {
|
|
6
|
+
categoryConfigs: [
|
|
7
|
+
{ key: constants_1.SELECT_CATEGORY_KEY.SAVED_FILTERS, label: "Saved Filters" },
|
|
8
|
+
],
|
|
9
|
+
};
|
|
4
10
|
exports.DEFAULT_ENTITY_STATE = {
|
|
5
11
|
categoryViews: [],
|
|
6
12
|
filterState: [],
|
|
@@ -16,14 +16,7 @@ function buildCategoryGroups(categoryGroupConfig) {
|
|
|
16
16
|
const { categoryGroups, savedFilters } = categoryGroupConfig;
|
|
17
17
|
if (!savedFilters)
|
|
18
18
|
return categoryGroups;
|
|
19
|
-
|
|
20
|
-
const savedFiltersCategoryGroup = {
|
|
21
|
-
categoryConfigs: [
|
|
22
|
-
{ key: constants_2.SELECT_CATEGORY_KEY.SAVED_FILTERS, label: "Saved Filters" },
|
|
23
|
-
],
|
|
24
|
-
};
|
|
25
|
-
clonedCategoryGroups.unshift(savedFiltersCategoryGroup);
|
|
26
|
-
return clonedCategoryGroups;
|
|
19
|
+
return [constants_3.DEFAULT_CATEGORY_GROUP_SAVED_FILTERS, ...categoryGroups];
|
|
27
20
|
}
|
|
28
21
|
/**
|
|
29
22
|
* Returns the saved filters as select categories.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColumnSort, RowSelectionState, VisibilityState } from "@tanstack/react-table";
|
|
2
|
-
import { CategoryKey, CategoryValueKey, PaginationDirectionType, SelectCategory } from "../../../common/entities";
|
|
2
|
+
import { CategoryKey, CategoryValueKey, PaginationDirectionType, SelectCategory, SelectedFilter } from "../../../common/entities";
|
|
3
3
|
import { ENTITY_VIEW, ListItems, PaginationResponse, RelatedListItems } from "../../exploreState";
|
|
4
4
|
import { ListItem } from "../entities";
|
|
5
5
|
/**
|
|
@@ -48,6 +48,13 @@ export declare type ToggleEntityViewPayload = ENTITY_VIEW;
|
|
|
48
48
|
* Update column visibility payload.
|
|
49
49
|
*/
|
|
50
50
|
export declare type UpdateColumnVisibilityPayload = VisibilityState;
|
|
51
|
+
/**
|
|
52
|
+
* Update entity filters payload.
|
|
53
|
+
*/
|
|
54
|
+
export interface UpdateEntityFiltersPayload {
|
|
55
|
+
entityListType: string;
|
|
56
|
+
filters: SelectedFilter[];
|
|
57
|
+
}
|
|
51
58
|
/**
|
|
52
59
|
* Update entity view access payload.
|
|
53
60
|
*/
|
|
@@ -70,9 +70,10 @@ export declare function resetPage(paginationState: PaginationState): PaginationS
|
|
|
70
70
|
/**
|
|
71
71
|
* Resets row selection for the current entity and entities that share the same category group config key.
|
|
72
72
|
* @param state - Explore state.
|
|
73
|
+
* @param categoryGroupConfigKey - Category group config key.
|
|
73
74
|
* @returns entity page state mapper with row selection reset.
|
|
74
75
|
*/
|
|
75
|
-
export declare function resetRowSelection(state: ExploreState): EntityPageStateMapper;
|
|
76
|
+
export declare function resetRowSelection(state: ExploreState, categoryGroupConfigKey?: string): EntityPageStateMapper;
|
|
76
77
|
/**
|
|
77
78
|
* Updates entity page state for the given entity path.
|
|
78
79
|
* @param entityPath - Entity path.
|
|
@@ -93,9 +94,10 @@ export declare function updateEntityPageStateSorting(state: ExploreState, sortin
|
|
|
93
94
|
* Updates entity state by category group config key.
|
|
94
95
|
* @param state - Explore state.
|
|
95
96
|
* @param nextEntityState - Partial next entity state.
|
|
97
|
+
* @param categoryGroupConfigKey - Category group config key.
|
|
96
98
|
* @returns updated entity state by category group config key.
|
|
97
99
|
*/
|
|
98
|
-
export declare function updateEntityStateByCategoryGroupConfigKey(state: ExploreState, nextEntityState: Partial<EntityState
|
|
100
|
+
export declare function updateEntityStateByCategoryGroupConfigKey(state: ExploreState, nextEntityState: Partial<EntityState>, categoryGroupConfigKey?: string): void;
|
|
99
101
|
/**
|
|
100
102
|
* Updates the entity page state for each entity with row selection enabled,
|
|
101
103
|
* by updating the visibility of the "select" column based on user access and resetting row selection state.
|
|
@@ -118,10 +118,10 @@ exports.resetPage = resetPage;
|
|
|
118
118
|
/**
|
|
119
119
|
* Resets row selection for the current entity and entities that share the same category group config key.
|
|
120
120
|
* @param state - Explore state.
|
|
121
|
+
* @param categoryGroupConfigKey - Category group config key.
|
|
121
122
|
* @returns entity page state mapper with row selection reset.
|
|
122
123
|
*/
|
|
123
|
-
function resetRowSelection(state) {
|
|
124
|
-
const categoryGroupConfigKey = getEntityCategoryGroupConfigKey(state.tabValue, state.entityPageState);
|
|
124
|
+
function resetRowSelection(state, categoryGroupConfigKey = getEntityCategoryGroupConfigKey(state.tabValue, state.entityPageState)) {
|
|
125
125
|
return Object.entries(state.entityPageState).reduce((acc, [entityPath, entityPageState]) => {
|
|
126
126
|
if (entityPageState.categoryGroupConfigKey === categoryGroupConfigKey) {
|
|
127
127
|
return Object.assign(Object.assign({}, acc), { [entityPath]: Object.assign(Object.assign({}, entityPageState), { rowSelection: {} }) });
|
|
@@ -173,10 +173,10 @@ exports.updateEntityPageStateSorting = updateEntityPageStateSorting;
|
|
|
173
173
|
* Updates entity state by category group config key.
|
|
174
174
|
* @param state - Explore state.
|
|
175
175
|
* @param nextEntityState - Partial next entity state.
|
|
176
|
+
* @param categoryGroupConfigKey - Category group config key.
|
|
176
177
|
* @returns updated entity state by category group config key.
|
|
177
178
|
*/
|
|
178
|
-
function updateEntityStateByCategoryGroupConfigKey(state, nextEntityState) {
|
|
179
|
-
const categoryGroupConfigKey = getEntityCategoryGroupConfigKey(state.tabValue, state.entityPageState);
|
|
179
|
+
function updateEntityStateByCategoryGroupConfigKey(state, nextEntityState, categoryGroupConfigKey = getEntityCategoryGroupConfigKey(state.tabValue, state.entityPageState)) {
|
|
180
180
|
const entityState = getEntityState(state, categoryGroupConfigKey);
|
|
181
181
|
if (entityState) {
|
|
182
182
|
setEntityStateByCategoryGroupConfigKey(categoryGroupConfigKey, state, Object.assign(Object.assign({}, entityState), nextEntityState));
|
|
@@ -3,7 +3,7 @@ import { AzulSearchIndex } from "../apis/azul/common/entities";
|
|
|
3
3
|
import { SelectCategoryView, SelectedFilter } from "../common/entities";
|
|
4
4
|
import { CategoryGroup, SiteConfig } from "../config/entities";
|
|
5
5
|
import { EntityPageStateMapper, EntityStateByCategoryGroupConfigKey, ListItem } from "./exploreState/entities";
|
|
6
|
-
import { ApplySavedFilterPayload, PaginateTablePayload, PatchExploreResponsePayload, ProcessExploreResponsePayload, ProcessRelatedResponsePayload, ResetExploreResponsePayload, ToggleEntityViewPayload, UpdateColumnVisibilityPayload, UpdateEntityViewAccessPayload, UpdateFilterPayload, UpdateRowSelectionPayload, UpdateSortingPayload } from "./exploreState/payloads/entities";
|
|
6
|
+
import { ApplySavedFilterPayload, PaginateTablePayload, PatchExploreResponsePayload, ProcessExploreResponsePayload, ProcessRelatedResponsePayload, ResetExploreResponsePayload, ToggleEntityViewPayload, UpdateColumnVisibilityPayload, UpdateEntityFiltersPayload, UpdateEntityViewAccessPayload, UpdateFilterPayload, UpdateRowSelectionPayload, UpdateSortingPayload } from "./exploreState/payloads/entities";
|
|
7
7
|
export declare type CatalogState = string | undefined;
|
|
8
8
|
/**
|
|
9
9
|
* Entity view.
|
|
@@ -114,6 +114,7 @@ export declare enum ExploreActionKind {
|
|
|
114
114
|
SelectEntityType = "SELECT_ENTITY_TYPE",
|
|
115
115
|
ToggleEntityView = "TOGGLE_ENTITY_VIEW",
|
|
116
116
|
UpdateColumnVisibility = "UPDATE_COLUMN_VISIBILITY",
|
|
117
|
+
UpdateEntityFilters = "UPDATE_ENTITY_FILTERS",
|
|
117
118
|
UpdateEntityViewAccess = "UPDATE_ENTITY_VIEW_ACCESS",
|
|
118
119
|
UpdateFilter = "UPDATE_FILTER",
|
|
119
120
|
UpdateRowSelection = "UPDATE_ROW_SELECTION",
|
|
@@ -122,7 +123,7 @@ export declare enum ExploreActionKind {
|
|
|
122
123
|
/**
|
|
123
124
|
* Explore action.
|
|
124
125
|
*/
|
|
125
|
-
export declare type ExploreAction = ApplySavedFilterAction | ClearFiltersAction | PaginateTableAction | PatchExploreResponseAction | ProcessExploreResponseAction | ProcessRelatedResponseAction | ResetExploreResponseAction | ResetStateAction | SelectEntityTypeAction | ToggleEntityViewAction | UpdateColumnVisibilityAction | UpdateEntityViewAccessAction | UpdateFilterAction | UpdateRowSelectionAction | UpdateSortingAction;
|
|
126
|
+
export declare type ExploreAction = ApplySavedFilterAction | ClearFiltersAction | PaginateTableAction | PatchExploreResponseAction | ProcessExploreResponseAction | ProcessRelatedResponseAction | ResetExploreResponseAction | ResetStateAction | SelectEntityTypeAction | ToggleEntityViewAction | UpdateColumnVisibilityAction | UpdateEntityFiltersAction | UpdateEntityViewAccessAction | UpdateFilterAction | UpdateRowSelectionAction | UpdateSortingAction;
|
|
126
127
|
/**
|
|
127
128
|
* Apply saved filter action.
|
|
128
129
|
*/
|
|
@@ -200,6 +201,13 @@ declare type UpdateColumnVisibilityAction = {
|
|
|
200
201
|
payload: UpdateColumnVisibilityPayload;
|
|
201
202
|
type: ExploreActionKind.UpdateColumnVisibility;
|
|
202
203
|
};
|
|
204
|
+
/**
|
|
205
|
+
* Update entity filters action.
|
|
206
|
+
*/
|
|
207
|
+
declare type UpdateEntityFiltersAction = {
|
|
208
|
+
payload: UpdateEntityFiltersPayload;
|
|
209
|
+
type: ExploreActionKind.UpdateEntityFilters;
|
|
210
|
+
};
|
|
203
211
|
/**
|
|
204
212
|
* Update entity view access action.
|
|
205
213
|
*/
|
|
@@ -104,6 +104,7 @@ var ExploreActionKind;
|
|
|
104
104
|
ExploreActionKind["SelectEntityType"] = "SELECT_ENTITY_TYPE";
|
|
105
105
|
ExploreActionKind["ToggleEntityView"] = "TOGGLE_ENTITY_VIEW";
|
|
106
106
|
ExploreActionKind["UpdateColumnVisibility"] = "UPDATE_COLUMN_VISIBILITY";
|
|
107
|
+
ExploreActionKind["UpdateEntityFilters"] = "UPDATE_ENTITY_FILTERS";
|
|
107
108
|
ExploreActionKind["UpdateEntityViewAccess"] = "UPDATE_ENTITY_VIEW_ACCESS";
|
|
108
109
|
ExploreActionKind["UpdateFilter"] = "UPDATE_FILTER";
|
|
109
110
|
ExploreActionKind["UpdateRowSelection"] = "UPDATE_ROW_SELECTION";
|
|
@@ -224,6 +225,18 @@ function exploreReducer(state, action, exploreContext) {
|
|
|
224
225
|
case ExploreActionKind.UpdateColumnVisibility: {
|
|
225
226
|
return Object.assign(Object.assign({}, state), { entityPageState: (0, utils_2.updateEntityPageState)(state.tabValue, state.entityPageState, { columnsVisibility: payload }) });
|
|
226
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Update entity filters.
|
|
230
|
+
*/
|
|
231
|
+
case ExploreActionKind.UpdateEntityFilters: {
|
|
232
|
+
const { entityListType, filters: filterState } = payload;
|
|
233
|
+
const categoryGroupConfigKey = (0, utils_2.getEntityCategoryGroupConfigKey)(entityListType, state.entityPageState);
|
|
234
|
+
(0, utils_2.updateEntityStateByCategoryGroupConfigKey)(state, {
|
|
235
|
+
filterState,
|
|
236
|
+
savedFilterState: [], // Clear saved filter state.
|
|
237
|
+
}, categoryGroupConfigKey);
|
|
238
|
+
return Object.assign(Object.assign({}, state), { entityPageState: (0, utils_2.resetRowSelection)(state, categoryGroupConfigKey) });
|
|
239
|
+
}
|
|
227
240
|
/**
|
|
228
241
|
* Update entity view access
|
|
229
242
|
**/
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { CommonColors, PaletteColor } from "@mui/material/styles/createPalette";
|
|
2
2
|
import { ThemeProps } from "../../../theme/theme";
|
|
3
|
+
export declare const alertLight: ({ theme }: ThemeProps) => PaletteColor["light"];
|
|
3
4
|
export declare const alertLightest: ({ theme, }: ThemeProps) => PaletteColor["lightest"];
|
|
4
5
|
export declare const alertMain: ({ theme }: ThemeProps) => PaletteColor["main"];
|
|
5
6
|
export declare const errorMain: ({ theme }: ThemeProps) => PaletteColor["main"];
|
|
6
|
-
export declare const infoDark: ({ theme }: ThemeProps) => PaletteColor["dark"];
|
|
7
7
|
export declare const infoLight: ({ theme }: ThemeProps) => PaletteColor["light"];
|
|
8
8
|
export declare const infoLightest: ({ theme }: ThemeProps) => PaletteColor["lightest"];
|
|
9
9
|
export declare const infoMain: ({ theme }: ThemeProps) => PaletteColor["main"];
|
|
10
|
-
export declare const inkDark: ({ theme }: ThemeProps) => PaletteColor["dark"];
|
|
11
10
|
export declare const inkLight: ({ theme }: ThemeProps) => PaletteColor["light"];
|
|
12
|
-
export declare const inkLightest: ({ theme }: ThemeProps) => PaletteColor["lightest"];
|
|
13
11
|
export declare const inkMain: ({ theme }: ThemeProps) => PaletteColor["main"];
|
|
14
12
|
export declare const primaryDark: ({ theme }: ThemeProps) => PaletteColor["dark"];
|
|
15
13
|
export declare const primaryMain: ({ theme }: ThemeProps) => PaletteColor["main"];
|
|
@@ -17,8 +15,10 @@ export declare const smokeDark: ({ theme }: ThemeProps) => PaletteColor["dark"];
|
|
|
17
15
|
export declare const smokeLight: ({ theme }: ThemeProps) => PaletteColor["light"];
|
|
18
16
|
export declare const smokeLightest: ({ theme, }: ThemeProps) => PaletteColor["lightest"];
|
|
19
17
|
export declare const smokeMain: ({ theme }: ThemeProps) => PaletteColor["main"];
|
|
18
|
+
export declare const successLight: ({ theme }: ThemeProps) => PaletteColor["light"];
|
|
20
19
|
export declare const successLightest: ({ theme, }: ThemeProps) => PaletteColor["lightest"];
|
|
21
20
|
export declare const successMain: ({ theme }: ThemeProps) => PaletteColor["main"];
|
|
21
|
+
export declare const warningLight: ({ theme }: ThemeProps) => PaletteColor["light"];
|
|
22
22
|
export declare const warningLightest: ({ theme, }: ThemeProps) => PaletteColor["lightest"];
|
|
23
23
|
export declare const warningMain: ({ theme }: ThemeProps) => PaletteColor["main"];
|
|
24
24
|
export declare const white: ({ theme }: ThemeProps) => CommonColors["white"];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.white = exports.warningMain = exports.warningLightest = exports.successMain = exports.successLightest = exports.smokeMain = exports.smokeLightest = exports.smokeLight = exports.smokeDark = exports.primaryMain = exports.primaryDark = exports.inkMain = exports.
|
|
3
|
+
exports.white = exports.warningMain = exports.warningLightest = exports.warningLight = exports.successMain = exports.successLightest = exports.successLight = exports.smokeMain = exports.smokeLightest = exports.smokeLight = exports.smokeDark = exports.primaryMain = exports.primaryDark = exports.inkMain = exports.inkLight = exports.infoMain = exports.infoLightest = exports.infoLight = exports.errorMain = exports.alertMain = exports.alertLightest = exports.alertLight = void 0;
|
|
4
4
|
// Alert
|
|
5
|
+
const alertLight = ({ theme }) => theme.palette.alert.light;
|
|
6
|
+
exports.alertLight = alertLight;
|
|
5
7
|
const alertLightest = ({ theme, }) => theme.palette.alert.lightest;
|
|
6
8
|
exports.alertLightest = alertLightest;
|
|
7
9
|
const alertMain = ({ theme }) => theme.palette.alert.main;
|
|
@@ -10,8 +12,6 @@ exports.alertMain = alertMain;
|
|
|
10
12
|
const errorMain = ({ theme }) => theme.palette.error.main;
|
|
11
13
|
exports.errorMain = errorMain;
|
|
12
14
|
// Info
|
|
13
|
-
const infoDark = ({ theme }) => theme.palette.info.dark;
|
|
14
|
-
exports.infoDark = infoDark;
|
|
15
15
|
const infoLight = ({ theme }) => theme.palette.info.light;
|
|
16
16
|
exports.infoLight = infoLight;
|
|
17
17
|
const infoLightest = ({ theme }) => theme.palette.info.lightest;
|
|
@@ -19,12 +19,8 @@ exports.infoLightest = infoLightest;
|
|
|
19
19
|
const infoMain = ({ theme }) => theme.palette.info.main;
|
|
20
20
|
exports.infoMain = infoMain;
|
|
21
21
|
// Ink
|
|
22
|
-
const inkDark = ({ theme }) => theme.palette.ink.dark;
|
|
23
|
-
exports.inkDark = inkDark;
|
|
24
22
|
const inkLight = ({ theme }) => theme.palette.ink.light;
|
|
25
23
|
exports.inkLight = inkLight;
|
|
26
|
-
const inkLightest = ({ theme }) => theme.palette.ink.lightest;
|
|
27
|
-
exports.inkLightest = inkLightest;
|
|
28
24
|
const inkMain = ({ theme }) => theme.palette.ink.main;
|
|
29
25
|
exports.inkMain = inkMain;
|
|
30
26
|
// Primary
|
|
@@ -42,11 +38,15 @@ exports.smokeLightest = smokeLightest;
|
|
|
42
38
|
const smokeMain = ({ theme }) => theme.palette.smoke.main;
|
|
43
39
|
exports.smokeMain = smokeMain;
|
|
44
40
|
// Success
|
|
41
|
+
const successLight = ({ theme }) => theme.palette.success.light;
|
|
42
|
+
exports.successLight = successLight;
|
|
45
43
|
const successLightest = ({ theme, }) => theme.palette.success.lightest;
|
|
46
44
|
exports.successLightest = successLightest;
|
|
47
45
|
const successMain = ({ theme }) => theme.palette.success.main;
|
|
48
46
|
exports.successMain = successMain;
|
|
49
47
|
// Warning
|
|
48
|
+
const warningLight = ({ theme }) => theme.palette.warning.light;
|
|
49
|
+
exports.warningLight = warningLight;
|
|
50
50
|
const warningLightest = ({ theme, }) => theme.palette.warning.lightest;
|
|
51
51
|
exports.warningLightest = warningLightest;
|
|
52
52
|
const warningMain = ({ theme }) => theme.palette.warning.main;
|
|
@@ -75,6 +75,12 @@ export declare const MuiCheckbox: (theme: Theme) => Components["MuiCheckbox"];
|
|
|
75
75
|
* @returns MuiChip component theme styles.
|
|
76
76
|
*/
|
|
77
77
|
export declare const MuiChip: (theme: Theme) => Components["MuiChip"];
|
|
78
|
+
/**
|
|
79
|
+
* MuiCircularProgress Component
|
|
80
|
+
* @param theme - Theme.
|
|
81
|
+
* @returns MuiCircularProgress component theme styles.
|
|
82
|
+
*/
|
|
83
|
+
export declare const MuiCircularProgress: (theme: Theme) => Components["MuiCircularProgress"];
|
|
78
84
|
/**
|
|
79
85
|
* MuiCssBaseline Component
|
|
80
86
|
* @param theme - Theme.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MuiTypography = exports.MuiTooltip = exports.MuiToolbar = exports.MuiToggleButtonGroup = exports.MuiToggleButton = exports.MuiTabs = exports.MuiTableSortLabel = exports.MuiTableCell = exports.MuiTab = exports.MuiSvgIcon = exports.MuiSelect = exports.MuiRadio = exports.MuiPaper = exports.MuiOutlinedInput = exports.MuiMenuItem = exports.MuiListSubheader = exports.MuiListItemText = exports.MuiListItemButton = exports.MuiLink = exports.MuiInputBase = exports.MuiIconButton = exports.MuiFormHelperText = exports.MuiFormGroup = exports.MuiFormControlLabel = exports.MuiDrawer = exports.MuiDivider = exports.MuiDialogTitle = exports.MuiDialogContent = exports.MuiDialogActions = exports.MuiDialog = exports.MuiCssBaseline = exports.MuiChip = exports.MuiCheckbox = exports.MuiCard = exports.MuiButtonGroup = exports.MuiButtonBase = exports.MuiButton = exports.MuiBreadcrumbs = exports.MuiBackdrop = exports.MuiAppBar = exports.MuiAlertTitle = exports.MuiAlert = exports.MuiAccordionSummary = exports.MuiAccordionDetails = exports.MuiAccordion = void 0;
|
|
3
|
+
exports.MuiTypography = exports.MuiTooltip = exports.MuiToolbar = exports.MuiToggleButtonGroup = exports.MuiToggleButton = exports.MuiTabs = exports.MuiTableSortLabel = exports.MuiTableCell = exports.MuiTab = exports.MuiSvgIcon = exports.MuiSelect = exports.MuiRadio = exports.MuiPaper = exports.MuiOutlinedInput = exports.MuiMenuItem = exports.MuiListSubheader = exports.MuiListItemText = exports.MuiListItemButton = exports.MuiLink = exports.MuiInputBase = exports.MuiIconButton = exports.MuiFormHelperText = exports.MuiFormGroup = exports.MuiFormControlLabel = exports.MuiDrawer = exports.MuiDivider = exports.MuiDialogTitle = exports.MuiDialogContent = exports.MuiDialogActions = exports.MuiDialog = exports.MuiCssBaseline = exports.MuiCircularProgress = exports.MuiChip = exports.MuiCheckbox = exports.MuiCard = exports.MuiButtonGroup = exports.MuiButtonBase = exports.MuiButton = exports.MuiBreadcrumbs = exports.MuiBackdrop = exports.MuiAppBar = exports.MuiAlertTitle = exports.MuiAlert = exports.MuiAccordionSummary = exports.MuiAccordionDetails = exports.MuiAccordion = void 0;
|
|
4
4
|
const errorIcon_1 = require("../../components/common/CustomIcon/components/ErrorIcon/errorIcon");
|
|
5
5
|
const infoIcon_1 = require("../../components/common/CustomIcon/components/InfoIcon/infoIcon");
|
|
6
6
|
const successIcon_1 = require("../../components/common/CustomIcon/components/SuccessIcon/successIcon");
|
|
@@ -552,6 +552,31 @@ const MuiChip = (theme) => {
|
|
|
552
552
|
};
|
|
553
553
|
};
|
|
554
554
|
exports.MuiChip = MuiChip;
|
|
555
|
+
/**
|
|
556
|
+
* MuiCircularProgress Component
|
|
557
|
+
* @param theme - Theme.
|
|
558
|
+
* @returns MuiCircularProgress component theme styles.
|
|
559
|
+
*/
|
|
560
|
+
const MuiCircularProgress = (theme) => {
|
|
561
|
+
return {
|
|
562
|
+
styleOverrides: {
|
|
563
|
+
circle: {
|
|
564
|
+
strokeLinecap: "round",
|
|
565
|
+
},
|
|
566
|
+
},
|
|
567
|
+
variants: [
|
|
568
|
+
{
|
|
569
|
+
props: {
|
|
570
|
+
color: "alert",
|
|
571
|
+
},
|
|
572
|
+
style: {
|
|
573
|
+
color: theme.palette.alert.main,
|
|
574
|
+
},
|
|
575
|
+
},
|
|
576
|
+
],
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
exports.MuiCircularProgress = MuiCircularProgress;
|
|
555
580
|
/**
|
|
556
581
|
* MuiCssBaseline Component
|
|
557
582
|
* @param theme - Theme.
|
|
@@ -851,6 +876,11 @@ exports.MuiLink = {
|
|
|
851
876
|
defaultProps: {
|
|
852
877
|
underline: "hover",
|
|
853
878
|
},
|
|
879
|
+
styleOverrides: {
|
|
880
|
+
root: {
|
|
881
|
+
cursor: "pointer",
|
|
882
|
+
},
|
|
883
|
+
},
|
|
854
884
|
};
|
|
855
885
|
/**
|
|
856
886
|
* MuiListItemButton Component
|
package/lib/theme/theme.js
CHANGED
|
@@ -96,6 +96,7 @@ function createAppTheme(customOptions) {
|
|
|
96
96
|
MuiCard: C.MuiCard,
|
|
97
97
|
MuiCheckbox: C.MuiCheckbox(theme),
|
|
98
98
|
MuiChip: C.MuiChip(theme),
|
|
99
|
+
MuiCircularProgress: C.MuiCircularProgress(theme),
|
|
99
100
|
MuiCssBaseline: C.MuiCssBaseline(theme),
|
|
100
101
|
MuiDialog: C.MuiDialog(theme),
|
|
101
102
|
MuiDialogActions: C.MuiDialogActions,
|
package/package.json
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "../../../common/Paper/paper.styles";
|
|
9
9
|
import { NoResults } from "../../../NoResults/noResults";
|
|
10
10
|
import { Toolbar } from "../../../Table/components/TableToolbar/tableToolbar.styles";
|
|
11
|
-
import { Table } from "../Table/table";
|
|
11
|
+
import { Table, TableProps } from "../Table/table";
|
|
12
12
|
|
|
13
|
-
interface DetailViewTableProps<T extends object> {
|
|
13
|
+
interface DetailViewTableProps<T extends object> extends TableProps<T> {
|
|
14
14
|
className?: string;
|
|
15
15
|
columns: ColumnDef<T>[];
|
|
16
16
|
gridTemplateColumns: string;
|
|
@@ -28,6 +28,7 @@ export const DetailViewTable = <T extends object>({
|
|
|
28
28
|
noResultsTitle,
|
|
29
29
|
Paper = RoundedPaper,
|
|
30
30
|
tools,
|
|
31
|
+
...tableProps
|
|
31
32
|
}: DetailViewTableProps<T>): JSX.Element => {
|
|
32
33
|
return items.length > 0 ? (
|
|
33
34
|
<Paper className={className}>
|
|
@@ -37,6 +38,7 @@ export const DetailViewTable = <T extends object>({
|
|
|
37
38
|
columns={columns}
|
|
38
39
|
gridTemplateColumns={gridTemplateColumns}
|
|
39
40
|
items={items}
|
|
41
|
+
{...tableProps}
|
|
40
42
|
/>
|
|
41
43
|
</GridPaper>
|
|
42
44
|
</Paper>
|
|
@@ -2,6 +2,7 @@ import { TableRow } from "@mui/material";
|
|
|
2
2
|
import { Table } from "@tanstack/react-table";
|
|
3
3
|
import React, { Fragment } from "react";
|
|
4
4
|
import { v4 as uuid4 } from "uuid";
|
|
5
|
+
import { isCollapsableRowDisabled } from "../../../../../../../Table/common/utils";
|
|
5
6
|
import { CollapsableCell } from "../../../../../../../Table/components/TableCell/components/CollapsableCell/collapsableCell";
|
|
6
7
|
|
|
7
8
|
export interface CollapsableRowsProps<T> {
|
|
@@ -17,9 +18,13 @@ export const CollapsableRows = <T extends object>({
|
|
|
17
18
|
return (
|
|
18
19
|
<Fragment>
|
|
19
20
|
{rows.map((row) => {
|
|
21
|
+
if (row.depth > 0) return null; // Hide sub rows.
|
|
20
22
|
return (
|
|
21
23
|
<TableRow key={`${uuid}${row.id}`}>
|
|
22
|
-
<CollapsableCell
|
|
24
|
+
<CollapsableCell
|
|
25
|
+
isDisabled={isCollapsableRowDisabled(tableInstance)}
|
|
26
|
+
row={row}
|
|
27
|
+
/>
|
|
23
28
|
</TableRow>
|
|
24
29
|
);
|
|
25
30
|
})}
|