@gen3/frontend 0.11.12 → 0.11.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +341 -237
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts +16 -10
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js +24 -13
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js +43 -30
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js.map +1 -1
- package/dist/dts/components/Providers/Gen3Provider.d.ts +141 -4
- package/dist/dts/components/Providers/Gen3Provider.d.ts.map +1 -1
- package/dist/dts/components/charts/Charts.d.ts.map +1 -1
- package/dist/dts/components/charts/Charts.js +27 -31
- package/dist/dts/components/charts/Charts.js.map +1 -1
- package/dist/dts/components/charts/CollapsableCharts.d.ts +2 -2
- package/dist/dts/components/charts/CollapsableCharts.d.ts.map +1 -1
- package/dist/dts/components/charts/CollapsableCharts.js +2 -2
- package/dist/dts/components/charts/CollapsableCharts.js.map +1 -1
- package/dist/dts/components/charts/createChart.d.ts.map +1 -1
- package/dist/dts/components/charts/createChart.js +7 -12
- package/dist/dts/components/charts/createChart.js.map +1 -1
- package/dist/dts/components/charts/echarts/HorizontalBarChart.d.ts.map +1 -1
- package/dist/dts/components/charts/echarts/HorizontalBarChart.js +7 -4
- package/dist/dts/components/charts/echarts/HorizontalBarChart.js.map +1 -1
- package/dist/dts/components/facets/EnumFacet.d.ts +1 -1
- package/dist/dts/components/facets/EnumFacet.d.ts.map +1 -1
- package/dist/dts/components/facets/EnumFacet.js +6 -6
- package/dist/dts/components/facets/EnumFacet.js.map +1 -1
- package/dist/dts/components/facets/FacetEnumList.d.ts +2 -0
- package/dist/dts/components/facets/FacetEnumList.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetEnumList.js +24 -18
- package/dist/dts/components/facets/FacetEnumList.js.map +1 -1
- package/dist/dts/components/facets/createFacetCard.d.ts.map +1 -1
- package/dist/dts/components/facets/createFacetCard.js +4 -4
- package/dist/dts/components/facets/createFacetCard.js.map +1 -1
- package/dist/dts/components/facets/types.d.ts +4 -0
- package/dist/dts/components/facets/types.d.ts.map +1 -1
- package/dist/dts/components/facets/types.js.map +1 -1
- package/dist/dts/components/facets/utils.d.ts.map +1 -1
- package/dist/dts/components/facets/utils.js +18 -0
- package/dist/dts/components/facets/utils.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.js +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +14 -14
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts.map +1 -1
- package/dist/dts/features/Analysis/TextDescription.d.ts.map +1 -1
- package/dist/dts/features/Analysis/TextDescription.js +3 -19
- package/dist/dts/features/Analysis/TextDescription.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.js +3 -13
- package/dist/dts/features/CohortBuilder/CohortBuilder.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.js +28 -21
- package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/registerApp.js +1 -1
- package/dist/dts/features/CohortDiscovery/registerApp.js.map +1 -1
- package/dist/dts/features/CohortSimilarity/cohortSimilarityApi.d.ts +10 -10
- package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js +1 -0
- package/dist/dts/features/Discovery/DataLoaders/MDSAllLocal/DataLoader.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.js +1 -1
- package/dist/dts/features/Discovery/DiscoveryIndexPanel.js.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable.d.ts.map +1 -1
- package/dist/dts/features/Discovery/DiscoveryTable.js +30 -5
- package/dist/dts/features/Discovery/DiscoveryTable.js.map +1 -1
- package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts +1 -0
- package/dist/dts/features/Discovery/TableRenderers/CellRenderers.d.ts.map +1 -1
- package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js +10 -0
- package/dist/dts/features/Discovery/TableRenderers/CellRenderers.js.map +1 -1
- package/dist/dts/features/Discovery/types.d.ts +7 -0
- package/dist/dts/features/Discovery/types.d.ts.map +1 -1
- package/dist/dts/features/Discovery/types.js.map +1 -1
- package/dist/esm/index.js +342 -238
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +170 -17
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { FloatingPosition } from '@mantine/core';
|
|
2
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { FloatingPosition } from '@mantine/core';
|
|
3
3
|
interface DropdownWithIconProps {
|
|
4
4
|
/**
|
|
5
5
|
* if true, doesn't set width to be "target"
|
|
6
6
|
*/
|
|
7
|
-
disableTargetWidth?:
|
|
7
|
+
disableTargetWidth?: boolean;
|
|
8
8
|
/**
|
|
9
|
-
* Left
|
|
9
|
+
* Left Section for the target button, can be undefined too
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
LeftSection?: JSX.Element;
|
|
12
12
|
/**
|
|
13
|
-
* Right
|
|
13
|
+
* Right Section for the target button, can be undefined too (default to dropdown icon)
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
RightSection?: JSX.Element;
|
|
16
16
|
/**
|
|
17
17
|
* Content for target button
|
|
18
18
|
*/
|
|
@@ -29,6 +29,8 @@ interface DropdownWithIconProps {
|
|
|
29
29
|
onClick?: () => void;
|
|
30
30
|
icon?: JSX.Element;
|
|
31
31
|
disabled?: boolean;
|
|
32
|
+
isLoading?: boolean;
|
|
33
|
+
loadingTooltip?: string;
|
|
32
34
|
}>;
|
|
33
35
|
/**
|
|
34
36
|
* only provide menuLabelText if we want label for dropdown elements
|
|
@@ -53,16 +55,20 @@ interface DropdownWithIconProps {
|
|
|
53
55
|
/**
|
|
54
56
|
* custom test id
|
|
55
57
|
*/
|
|
56
|
-
|
|
58
|
+
customTargetButtonDataTestId?: string;
|
|
57
59
|
/**
|
|
58
|
-
tooltip
|
|
60
|
+
target button's tooltip
|
|
59
61
|
*/
|
|
60
|
-
|
|
62
|
+
targetButtonTooltip?: string;
|
|
61
63
|
/**
|
|
62
64
|
* aria-label for the button
|
|
63
65
|
*/
|
|
64
66
|
buttonAriaLabel?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Determines whether Menu should be closed when item is clicked
|
|
69
|
+
*/
|
|
70
|
+
closeOnItemClick?: boolean;
|
|
65
71
|
}
|
|
66
|
-
export declare const DropdownWithIcon: ({ disableTargetWidth,
|
|
72
|
+
export declare const DropdownWithIcon: ({ disableTargetWidth, LeftSection, RightSection, TargetButtonChildren, targetButtonDisabled, dropdownElements, menuLabelText, menuLabelCustomClass, customPosition, fullHeight, zIndex, customTargetButtonDataTestId, targetButtonTooltip, buttonAriaLabel, closeOnItemClick, }: DropdownWithIconProps) => JSX.Element;
|
|
67
73
|
export {};
|
|
68
74
|
//# sourceMappingURL=DropdownWithIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownWithIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DropdownWithIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAU,MAAM,OAAO,CAAC;AACjD,OAAO,EAIL,gBAAgB,EAEjB,MAAM,eAAe,CAAC;AAOvB,UAAU,qBAAqB;IAC7B;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC3B;;OAEG;IACH,oBAAoB,EAAE,SAAS,CAAC;IAChC;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,gBAAgB,EAAE,KAAK,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC,CAAC;IACH;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,4BAA4B,CAAC,EAAE,MAAM,CAAC;IAEtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,GAAI,iRAwB9B,qBAAqB,KAAG,GAAG,CAAC,OA4F9B,CAAC"}
|
|
@@ -9,23 +9,34 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import
|
|
14
|
-
import { Button, Menu } from '@mantine/core';
|
|
15
|
-
import { Tooltip } from '@mantine/core';
|
|
16
|
-
import { IoMdArrowDropdown as Dropdown } from 'react-icons/io';
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useRef } from 'react';
|
|
14
|
+
import { Button, Menu, Tooltip, } from '@mantine/core';
|
|
17
15
|
import { focusStyles } from '../../utils';
|
|
16
|
+
import { IoMdArrowDropdown as DropdownIcon } from 'react-icons/io';
|
|
17
|
+
var ADDITIONAL_DOWNLOAD_MESSAGE = 'A previous download is being processed. Additional downloads may be started.';
|
|
18
18
|
export var DropdownWithIcon = function (_a) {
|
|
19
|
-
var disableTargetWidth = _a.disableTargetWidth,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var title = _a.title, onClick = _a.onClick, icon = _a.icon, disabled = _a.disabled;
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
var disableTargetWidth = _a.disableTargetWidth, LeftSection = _a.LeftSection, _b = _a.RightSection, RightSection = _b === void 0 ? (_jsx("div", { className: "border-l pl-1 -mr-2", children: _jsx(DropdownIcon, { size: "1.25em", "aria-hidden": "true", "data-testid": "dropdown-icon" }) })) : _b, TargetButtonChildren = _a.TargetButtonChildren, targetButtonDisabled = _a.targetButtonDisabled, dropdownElements = _a.dropdownElements, menuLabelText = _a.menuLabelText, menuLabelCustomClass = _a.menuLabelCustomClass, customPosition = _a.customPosition, fullHeight = _a.fullHeight, _c = _a.zIndex, zIndex = _c === void 0 ? 900 : _c, _d = _a.customTargetButtonDataTestId, customTargetButtonDataTestId = _d === void 0 ? undefined : _d, _e = _a.targetButtonTooltip, targetButtonTooltip = _e === void 0 ? undefined : _e, _f = _a.buttonAriaLabel, buttonAriaLabel = _f === void 0 ? undefined : _f, _g = _a.closeOnItemClick, closeOnItemClick = _g === void 0 ? true : _g;
|
|
20
|
+
var targetRef = useRef(null);
|
|
21
|
+
return (_jsxs(Menu, __assign({ width: !disableTargetWidth ? 'target' : null }, (customPosition && { position: customPosition }), { zIndex: zIndex, closeOnItemClick: closeOnItemClick, children: [_jsx(Menu.Target, { children: _jsx(Tooltip, { label: targetButtonTooltip, disabled: !targetButtonTooltip, children: _jsx(Button, __assign({ variant: "outline", color: "primary", className: "flex items-center bg-base-max border-primary data-disabled:opacity-50 data-disabled:bg-base-max data-disabled:text-primary ".concat(focusStyles) }, (LeftSection && { leftSection: LeftSection }), { rightSection: RightSection, disabled: targetButtonDisabled, classNames: {
|
|
22
|
+
root: "".concat(fullHeight ? 'h-full' : undefined),
|
|
23
|
+
}, ref: targetRef, "aria-label": buttonAriaLabel, "data-testid": customTargetButtonDataTestId !== null && customTargetButtonDataTestId !== void 0 ? customTargetButtonDataTestId : 'menu-elem', children: TargetButtonChildren })) }) }), _jsxs(Menu.Dropdown, { "data-testid": "dropdown-menu-options", className: "border-1 border-secondary", children: [menuLabelText && (_jsxs(_Fragment, { children: [_jsx(Menu.Label, { className: menuLabelCustomClass !== null && menuLabelCustomClass !== void 0 ? menuLabelCustomClass : 'font-bold', "data-testid": "menu-label", children: menuLabelText }), _jsx(Menu.Divider, {})] })), dropdownElements.map(function (_a, idx) {
|
|
24
|
+
var title = _a.title, onClick = _a.onClick, icon = _a.icon, disabled = _a.disabled, isLoading = _a.isLoading, loadingTooltip = _a.loadingTooltip;
|
|
25
|
+
var menuItem = (_jsx(Menu.Item, { onClick: function () {
|
|
26
|
+
var _a;
|
|
27
|
+
if (onClick) {
|
|
27
28
|
onClick();
|
|
29
|
+
}
|
|
30
|
+
// This is done inorder to set the last focused element as the menu target element
|
|
31
|
+
// This is done to return focus to the target element if the modal is closed with ESC
|
|
32
|
+
if (targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) {
|
|
33
|
+
(_a = targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
34
|
+
}
|
|
28
35
|
}, "data-testid": "".concat(title, "-").concat(idx), leftSection: icon && icon, disabled: disabled, children: title }, "".concat(title, "-").concat(idx)));
|
|
36
|
+
if (isLoading) {
|
|
37
|
+
return (_jsx(Tooltip, { label: loadingTooltip || ADDITIONAL_DOWNLOAD_MESSAGE, position: "right", withArrow: true, multiline: true, w: 400, children: _jsx("div", { children: menuItem }) }, "".concat(title, "-").concat(idx)));
|
|
38
|
+
}
|
|
39
|
+
return menuItem;
|
|
29
40
|
})] })] })));
|
|
30
41
|
};
|
|
31
42
|
//# sourceMappingURL=DropdownWithIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownWithIcon.js","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"DropdownWithIcon.js","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAa,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,OAAO,GAGR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnE,IAAM,2BAA2B,GAC/B,8EAA8E,CAAC;AA0EjF,MAAM,CAAC,IAAM,gBA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,EAAE,cAAc,IAAI,2BAA2B,EACpD,QAAQ,EAAC,OAAO,EAChB,SAAS,QACT,SAAS,QACT,CAAC,EAAE,GAAG,YAEN,wBAAM,QAAQ,GAAO,IAPhB,UAAG,KAAK,cAAI,GAAG,CAAE,CAQd,CACX,CAAC;wBACJ,CAAC;wBAED,OAAO,QAAQ,CAAC;oBAClB,CAAC,CACF,IACa,KACX,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -35,7 +35,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
|
-
import { render } from '@testing-library/react';
|
|
38
|
+
import { render, waitFor } from '@testing-library/react';
|
|
39
39
|
import { DropdownWithIcon } from './DropdownWithIcon';
|
|
40
40
|
import userEvent from '@testing-library/user-event';
|
|
41
41
|
describe('<DropdownWithIcon />', function () {
|
|
@@ -44,39 +44,43 @@ describe('<DropdownWithIcon />', function () {
|
|
|
44
44
|
expect(getByTestId('dropdown-icon')).toBeDefined();
|
|
45
45
|
});
|
|
46
46
|
it('if right icon is provided, provided icon should render', function () {
|
|
47
|
-
var getByLabelText = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }],
|
|
47
|
+
var getByLabelText = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }], RightSection: _jsx("div", { "aria-label": "test-icon", className: "border-l pl-1 -mr-2" }) })).getByLabelText;
|
|
48
48
|
expect(getByLabelText('test-icon')).toBeDefined();
|
|
49
49
|
});
|
|
50
50
|
it('target button should be disabled if targetButtonDisabled props is true', function () {
|
|
51
|
-
var
|
|
52
|
-
expect(
|
|
51
|
+
var getByRole = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }], targetButtonDisabled: true })).getByRole;
|
|
52
|
+
expect(getByRole('button', { name: 'test' })).toBeDisabled();
|
|
53
53
|
});
|
|
54
54
|
it('target button should NOT be disabled if targetButtonDisabled props is not provided/undefined', function () {
|
|
55
|
-
var
|
|
56
|
-
expect(
|
|
55
|
+
var getByRole = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }] })).getByRole;
|
|
56
|
+
expect(getByRole('button', { name: 'test' })).not.toBeDisabled();
|
|
57
57
|
});
|
|
58
58
|
it('menu label should be present when menuLabelText is provided ', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
-
var _a, getByText, getByTestId;
|
|
59
|
+
var _a, getByText, getByRole, getByTestId;
|
|
60
60
|
return __generator(this, function (_b) {
|
|
61
61
|
switch (_b.label) {
|
|
62
62
|
case 0:
|
|
63
|
-
_a = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }], menuLabelText: "test menu label text" })), getByText = _a.getByText, getByTestId = _a.getByTestId;
|
|
64
|
-
return [4 /*yield*/, userEvent.click(
|
|
63
|
+
_a = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }], menuLabelText: "test menu label text" })), getByText = _a.getByText, getByRole = _a.getByRole, getByTestId = _a.getByTestId;
|
|
64
|
+
return [4 /*yield*/, userEvent.click(getByRole('button', { name: 'test' }))];
|
|
65
65
|
case 1:
|
|
66
66
|
_b.sent();
|
|
67
|
-
expect(getByTestId('menu-label')).toBeDefined();
|
|
67
|
+
return [4 /*yield*/, waitFor(function () { return expect(getByTestId('menu-label')).toBeDefined(); }, {
|
|
68
|
+
timeout: 2000,
|
|
69
|
+
})];
|
|
70
|
+
case 2:
|
|
71
|
+
_b.sent();
|
|
68
72
|
expect(getByText('test menu label text')).toBeInTheDocument();
|
|
69
73
|
return [2 /*return*/];
|
|
70
74
|
}
|
|
71
75
|
});
|
|
72
76
|
}); });
|
|
73
77
|
it('menu label should NOT be present when menuLabelText is NOT provided ', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
74
|
-
var _a, queryByTestId,
|
|
78
|
+
var _a, queryByTestId, getByRole;
|
|
75
79
|
return __generator(this, function (_b) {
|
|
76
80
|
switch (_b.label) {
|
|
77
81
|
case 0:
|
|
78
|
-
_a = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }] })), queryByTestId = _a.queryByTestId,
|
|
79
|
-
return [4 /*yield*/, userEvent.click(
|
|
82
|
+
_a = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }] })), queryByTestId = _a.queryByTestId, getByRole = _a.getByRole;
|
|
83
|
+
return [4 /*yield*/, userEvent.click(getByRole('button', { name: 'test' }))];
|
|
80
84
|
case 1:
|
|
81
85
|
_b.sent();
|
|
82
86
|
expect(queryByTestId('menu-label')).toBeNull();
|
|
@@ -85,40 +89,49 @@ describe('<DropdownWithIcon />', function () {
|
|
|
85
89
|
});
|
|
86
90
|
}); });
|
|
87
91
|
it('onClick should be called menu clicked on menu items only when provided', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
88
|
-
var mockOnClickCallBack1, getByTestId, firstMenuItem;
|
|
89
|
-
return __generator(this, function (
|
|
90
|
-
switch (
|
|
92
|
+
var mockOnClickCallBack1, _a, getByTestId, getByRole, firstMenuItem;
|
|
93
|
+
return __generator(this, function (_b) {
|
|
94
|
+
switch (_b.label) {
|
|
91
95
|
case 0:
|
|
92
96
|
mockOnClickCallBack1 = jest.fn();
|
|
93
|
-
|
|
97
|
+
_a = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [
|
|
94
98
|
{ title: 'test', onClick: mockOnClickCallBack1 },
|
|
95
99
|
{ title: 'test2' },
|
|
96
|
-
] })).getByTestId;
|
|
97
|
-
return [4 /*yield*/, userEvent.click(
|
|
100
|
+
] })), getByTestId = _a.getByTestId, getByRole = _a.getByRole;
|
|
101
|
+
return [4 /*yield*/, userEvent.click(getByRole('button', { name: 'test' }))];
|
|
98
102
|
case 1:
|
|
99
|
-
|
|
103
|
+
_b.sent();
|
|
104
|
+
return [4 /*yield*/, waitFor(function () { return expect(getByTestId('test-0')).toBeInTheDocument(); }, {
|
|
105
|
+
timeout: 2000,
|
|
106
|
+
})];
|
|
107
|
+
case 2:
|
|
108
|
+
_b.sent();
|
|
100
109
|
firstMenuItem = getByTestId('test-0');
|
|
101
110
|
return [4 /*yield*/, userEvent.click(firstMenuItem)];
|
|
102
|
-
case
|
|
103
|
-
|
|
111
|
+
case 3:
|
|
112
|
+
_b.sent();
|
|
104
113
|
expect(mockOnClickCallBack1).toBeCalled();
|
|
105
114
|
return [2 /*return*/];
|
|
106
115
|
}
|
|
107
116
|
});
|
|
108
117
|
}); });
|
|
109
118
|
it('test menu item disabled', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
110
|
-
var getByTestId;
|
|
111
|
-
return __generator(this, function (
|
|
112
|
-
switch (
|
|
119
|
+
var _a, getByRole, getByTestId;
|
|
120
|
+
return __generator(this, function (_b) {
|
|
121
|
+
switch (_b.label) {
|
|
113
122
|
case 0:
|
|
114
|
-
|
|
123
|
+
_a = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [
|
|
115
124
|
{ title: 'itemD', disabled: true },
|
|
116
125
|
{ title: 'itemE' },
|
|
117
|
-
] })).getByTestId;
|
|
118
|
-
return [4 /*yield*/, userEvent.click(
|
|
126
|
+
] })), getByRole = _a.getByRole, getByTestId = _a.getByTestId;
|
|
127
|
+
return [4 /*yield*/, userEvent.click(getByRole('button', { name: 'test' }))];
|
|
119
128
|
case 1:
|
|
120
|
-
|
|
121
|
-
expect(getByTestId('itemD-0')).toBeDisabled();
|
|
129
|
+
_b.sent();
|
|
130
|
+
return [4 /*yield*/, waitFor(function () { return expect(getByTestId('itemD-0')).toBeDisabled(); }, {
|
|
131
|
+
timeout: 2000,
|
|
132
|
+
})];
|
|
133
|
+
case 2:
|
|
134
|
+
_b.sent();
|
|
122
135
|
expect(getByTestId('itemE-1')).not.toBeDisabled();
|
|
123
136
|
return [2 /*return*/];
|
|
124
137
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownWithIcon.unit.test.js","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.unit.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownWithIcon.unit.test.js","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.unit.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,QAAQ,CAAC,sBAAsB,EAAE;IAC/B,EAAE,CAAC,kEAAkE,EAAE;QAC7D,IAAA,WAAW,GAAK,MAAM,CAC5B,KAAC,gBAAgB,IACf,oBAAoB,EAAC,MAAM,EAC3B,gBAAgB,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,GACzD,CACH,YALkB,CAKjB;QAEF,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE;QACnD,IAAA,cAAc,GAAK,MAAM,CAC/B,KAAC,gBAAgB,IACf,oBAAoB,EAAC,MAAM,EAC3B,gBAAgB,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAA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,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;;;;SACnD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -9,10 +9,147 @@ interface Gen3ProviderProps {
|
|
|
9
9
|
modalsConfig: ModalsConfig;
|
|
10
10
|
children?: ReactNode | undefined;
|
|
11
11
|
}
|
|
12
|
-
export declare const createMantineTheme: (fonts: Fonts, colors: Record<string, TenStringArray>) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
export declare const createMantineTheme: (fonts: Fonts, colors: Record<string, TenStringArray>) => {
|
|
13
|
+
focusRing?: "auto" | "always" | "never" | undefined;
|
|
14
|
+
scale?: number | undefined;
|
|
15
|
+
fontSmoothing?: boolean | undefined;
|
|
16
|
+
white?: string | undefined;
|
|
17
|
+
black?: string | undefined;
|
|
18
|
+
colors?: {
|
|
19
|
+
[x: string & {}]: import("@mantine/core").MantineColorsTuple | undefined;
|
|
20
|
+
dark?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
21
|
+
gray?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
22
|
+
red?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
23
|
+
pink?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
24
|
+
grape?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
25
|
+
violet?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
26
|
+
indigo?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
27
|
+
blue?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
28
|
+
cyan?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
29
|
+
green?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
30
|
+
lime?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
31
|
+
yellow?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
32
|
+
orange?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
33
|
+
teal?: import("@mantine/core").MantineColorsTuple | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
primaryShade?: import("@mantine/core").MantineColorShade | {
|
|
36
|
+
light?: import("@mantine/core").MantineColorShade | undefined;
|
|
37
|
+
dark?: import("@mantine/core").MantineColorShade | undefined;
|
|
38
|
+
} | undefined;
|
|
39
|
+
primaryColor?: string | undefined;
|
|
40
|
+
variantColorResolver?: import("@mantine/core").VariantColorsResolver | undefined;
|
|
41
|
+
autoContrast?: boolean | undefined;
|
|
42
|
+
luminanceThreshold?: number | undefined;
|
|
43
|
+
fontFamily?: string | undefined;
|
|
44
|
+
fontFamilyMonospace?: string | undefined;
|
|
45
|
+
headings?: {
|
|
46
|
+
fontFamily?: string | undefined;
|
|
47
|
+
fontWeight?: string | undefined;
|
|
48
|
+
textWrap?: "wrap" | "balance" | "nowrap" | "pretty" | "stable" | undefined;
|
|
49
|
+
sizes?: {
|
|
50
|
+
h1?: {
|
|
51
|
+
fontSize?: string | undefined;
|
|
52
|
+
fontWeight?: string | undefined;
|
|
53
|
+
lineHeight?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
h2?: {
|
|
56
|
+
fontSize?: string | undefined;
|
|
57
|
+
fontWeight?: string | undefined;
|
|
58
|
+
lineHeight?: string | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
h3?: {
|
|
61
|
+
fontSize?: string | undefined;
|
|
62
|
+
fontWeight?: string | undefined;
|
|
63
|
+
lineHeight?: string | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
h4?: {
|
|
66
|
+
fontSize?: string | undefined;
|
|
67
|
+
fontWeight?: string | undefined;
|
|
68
|
+
lineHeight?: string | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
h5?: {
|
|
71
|
+
fontSize?: string | undefined;
|
|
72
|
+
fontWeight?: string | undefined;
|
|
73
|
+
lineHeight?: string | undefined;
|
|
74
|
+
} | undefined;
|
|
75
|
+
h6?: {
|
|
76
|
+
fontSize?: string | undefined;
|
|
77
|
+
fontWeight?: string | undefined;
|
|
78
|
+
lineHeight?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
radius?: {
|
|
83
|
+
[x: string & {}]: string | undefined;
|
|
84
|
+
xl?: string | undefined;
|
|
85
|
+
xs?: string | undefined;
|
|
86
|
+
sm?: string | undefined;
|
|
87
|
+
md?: string | undefined;
|
|
88
|
+
lg?: string | undefined;
|
|
89
|
+
} | undefined;
|
|
90
|
+
defaultRadius?: import("@mantine/core").MantineRadius | undefined;
|
|
91
|
+
spacing?: {
|
|
92
|
+
[x: number]: string | undefined;
|
|
93
|
+
[x: string & {}]: string | undefined;
|
|
94
|
+
xl?: string | undefined;
|
|
95
|
+
xs?: string | undefined;
|
|
96
|
+
sm?: string | undefined;
|
|
97
|
+
md?: string | undefined;
|
|
98
|
+
lg?: string | undefined;
|
|
99
|
+
} | undefined;
|
|
100
|
+
fontSizes?: {
|
|
101
|
+
[x: string & {}]: string | undefined;
|
|
102
|
+
xl?: string | undefined;
|
|
103
|
+
xs?: string | undefined;
|
|
104
|
+
sm?: string | undefined;
|
|
105
|
+
md?: string | undefined;
|
|
106
|
+
lg?: string | undefined;
|
|
107
|
+
} | undefined;
|
|
108
|
+
lineHeights?: {
|
|
109
|
+
[x: string & {}]: string | undefined;
|
|
110
|
+
xl?: string | undefined;
|
|
111
|
+
xs?: string | undefined;
|
|
112
|
+
sm?: string | undefined;
|
|
113
|
+
md?: string | undefined;
|
|
114
|
+
lg?: string | undefined;
|
|
115
|
+
} | undefined;
|
|
116
|
+
breakpoints?: {
|
|
117
|
+
[x: string & {}]: string | undefined;
|
|
118
|
+
xl?: string | undefined;
|
|
119
|
+
xs?: string | undefined;
|
|
120
|
+
sm?: string | undefined;
|
|
121
|
+
md?: string | undefined;
|
|
122
|
+
lg?: string | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
shadows?: {
|
|
125
|
+
[x: string & {}]: string | undefined;
|
|
126
|
+
xl?: string | undefined;
|
|
127
|
+
xs?: string | undefined;
|
|
128
|
+
sm?: string | undefined;
|
|
129
|
+
md?: string | undefined;
|
|
130
|
+
lg?: string | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
respectReducedMotion?: boolean | undefined;
|
|
133
|
+
cursorType?: "default" | "pointer" | undefined;
|
|
134
|
+
defaultGradient?: {
|
|
135
|
+
from?: string | undefined;
|
|
136
|
+
to?: string | undefined;
|
|
137
|
+
deg?: number | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
activeClassName?: string | undefined;
|
|
140
|
+
focusClassName?: string | undefined;
|
|
141
|
+
components?: {
|
|
142
|
+
[x: string]: {
|
|
143
|
+
classNames?: any;
|
|
144
|
+
styles?: any;
|
|
145
|
+
vars?: any;
|
|
146
|
+
defaultProps?: any;
|
|
147
|
+
} | undefined;
|
|
148
|
+
} | undefined;
|
|
149
|
+
other?: {
|
|
150
|
+
[x: string]: any;
|
|
151
|
+
} | undefined;
|
|
152
|
+
};
|
|
16
153
|
/**
|
|
17
154
|
* Gen3Provider wraps around the entire app and provides general configurations
|
|
18
155
|
* for the whole website like color scheme, icons, fonts, and sessionConfigs like
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gen3Provider.d.ts","sourceRoot":"","sources":["../../../../src/components/Providers/Gen3Provider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAI3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAElE,UAAU,iBAAiB;IACzB,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAC9B,aAAa,EAAE,oBAAoB,CAAC;IACpC,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC;AAGD,eAAO,MAAM,kBAAkB,GAC7B,OAAO,KAAK,EACZ,QAAQ,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"Gen3Provider.d.ts","sourceRoot":"","sources":["../../../../src/components/Providers/Gen3Provider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAI3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAElE,UAAU,iBAAiB;IACzB,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAC9B,aAAa,EAAE,oBAAoB,CAAC;IACpC,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC;AAGD,eAAO,MAAM,kBAAkB,GAC7B,OAAO,KAAK,EACZ,QAAQ,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDvC,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,YAAY,GAAI,mDAKnB,iBAAiB,4CAiBnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Charts.d.ts","sourceRoot":"","sources":["../../../../src/components/charts/Charts.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,gBAAgB,EAEjB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Charts.d.ts","sourceRoot":"","sources":["../../../../src/components/charts/Charts.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,gBAAgB,EAEjB,MAAM,YAAY,CAAC;AAoBpB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQvC,UAAU,WAAW;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAwHD,QAAA,MAAM,MAAM,GAAI,mEAQb,WAAW,4CAkGb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -3,9 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { fieldNameToTitle, } from '@gen3/core';
|
|
4
4
|
import { Icon } from '@iconify-icon/react';
|
|
5
5
|
import { useDisclosure } from '@mantine/hooks';
|
|
6
|
-
import {
|
|
7
|
-
// ActionIcon,
|
|
8
|
-
Card, Grid, Group, Text, LoadingOverlay, Table, ColorSwatch, Modal, Button, useMantineTheme, } from '@mantine/core';
|
|
6
|
+
import { Card, Grid, Group, Text, LoadingOverlay, Table, ColorSwatch, Modal, Button, useMantineTheme, } from '@mantine/core';
|
|
9
7
|
import { createChart } from './createChart';
|
|
10
8
|
import { computeRowSpan } from './utils';
|
|
11
9
|
import ErrorCard from '../../components/MessageCards/ErrorCard';
|
|
@@ -23,6 +21,28 @@ var chartColors = [
|
|
|
23
21
|
'#9a60b4',
|
|
24
22
|
'#ea7ccc',
|
|
25
23
|
];
|
|
24
|
+
var LegendRows = function (_a) {
|
|
25
|
+
var data = _a.data;
|
|
26
|
+
var moreThanMaxRows = data.length > MAX_LEGEND_ROWS;
|
|
27
|
+
var limitedRows = moreThanMaxRows ? data.slice(0, MAX_LEGEND_ROWS) : data;
|
|
28
|
+
return limitedRows.map(function (element, elIndex) { return (_jsxs(Table.Tr, { children: [_jsxs(Table.Td, { children: [_jsx(ColorSwatch, { className: "inline-block mr-2 align-middle", size: "1em", radius: "xs", color: (chartColors === null || chartColors === void 0 ? void 0 : chartColors[elIndex % chartColors.length]) || '' }), element.key] }), _jsx(Table.Td, { className: "text-right", children: element.count })] }, elIndex)); });
|
|
29
|
+
};
|
|
30
|
+
var LegendOverflow = function (_a) {
|
|
31
|
+
var _b;
|
|
32
|
+
var chart = _a.chart, data = _a.data, chartTitle = _a.chartTitle, counts = _a.counts;
|
|
33
|
+
var _c = useDisclosure(false), openedMoreRows = _c[0], _d = _c[1], openMoreRows = _d.open, closeMoreRows = _d.close;
|
|
34
|
+
var theme = useMantineTheme();
|
|
35
|
+
return (_jsxs(React.Fragment, { children: [_jsx(Modal, { opened: openedMoreRows, onClose: closeMoreRows, title: chartTitle, size: "xl", children: _jsxs(Grid, { children: [_jsx(Grid.Col, { span: 6, children: createChart(chart.chartType, {
|
|
36
|
+
data: data === undefined ? [] : data,
|
|
37
|
+
total: counts !== null && counts !== void 0 ? counts : 1,
|
|
38
|
+
valueType: (_b = chart.valueType) !== null && _b !== void 0 ? _b : 'count',
|
|
39
|
+
label: chart.label,
|
|
40
|
+
showLegendInChart: chart.showLegendInChart,
|
|
41
|
+
}) }, "modal-col-1"), _jsx(Grid.Col, { span: 6, children: _jsx("div", { className: "border-solid border-[1px] border-[var(--mantine-color-gray-3)] h-full p-1", children: _jsx(Table, { withRowBorders: false, classNames: {
|
|
42
|
+
table: '',
|
|
43
|
+
td: 'p-1 leading-3',
|
|
44
|
+
}, children: _jsx(Table.Tbody, { children: data.map(function (element, elIndex) { return (_jsxs(Table.Tr, { children: [_jsxs(Table.Td, { children: [_jsx(ColorSwatch, { className: "inline-block mr-2 align-middle", size: "1em", radius: "xs", color: (chartColors === null || chartColors === void 0 ? void 0 : chartColors[elIndex % chartColors.length]) || '' }), element.key] }), _jsx(Table.Td, { className: "text-right", children: element.count })] }, elIndex)); }) }) }) }) }, "modal-col-2")] }) }), _jsxs(Button, { variant: "subtle", onClick: openMoreRows, leftSection: _jsx(Icon, { icon: "gen3:open-in-modal", height: 24, width: 24, color: theme.colors.accent[5] }), className: "text-black hover:text-black", children: [data.length - MAX_LEGEND_ROWS, " more"] })] }));
|
|
45
|
+
};
|
|
26
46
|
//The Charts component maps the data from ChartsProps into a grid of createChart() ReactNodes
|
|
27
47
|
var Charts = function (_a) {
|
|
28
48
|
var _b;
|
|
@@ -35,43 +55,19 @@ var Charts = function (_a) {
|
|
|
35
55
|
if (Object.keys(data).length > 0 && !(field in data)) {
|
|
36
56
|
return _jsx(ErrorCard, { message: "".concat(field, " not found in data") });
|
|
37
57
|
}
|
|
38
|
-
var LegendRows = function (_a) {
|
|
39
|
-
var data = _a.data;
|
|
40
|
-
var moreThanMaxRows = data.length > MAX_LEGEND_ROWS;
|
|
41
|
-
var limitedRows = moreThanMaxRows
|
|
42
|
-
? data.slice(0, MAX_LEGEND_ROWS)
|
|
43
|
-
: data;
|
|
44
|
-
return limitedRows.map(function (element, elIndex) { return (_jsxs(Table.Tr, { children: [_jsxs(Table.Td, { children: [_jsx(ColorSwatch, { className: "inline-block mr-2 align-middle", size: "1em", radius: "xs", color: (chartColors === null || chartColors === void 0 ? void 0 : chartColors[elIndex % chartColors.length]) || '' }), element.key] }), _jsx(Table.Td, { className: "text-right", children: element.count })] }, elIndex)); });
|
|
45
|
-
};
|
|
46
|
-
var LegendOverflow = function (_a) {
|
|
47
|
-
var _b;
|
|
48
|
-
var chart = _a.chart, data = _a.data, chartTitle = _a.chartTitle;
|
|
49
|
-
var _c = useDisclosure(false), openedMoreRows = _c[0], _d = _c[1], openMoreRows = _d.open, closeMoreRows = _d.close;
|
|
50
|
-
var theme = useMantineTheme();
|
|
51
|
-
return (_jsxs(React.Fragment, { children: [_jsx(Modal, { opened: openedMoreRows, onClose: closeMoreRows, title: chartTitle, size: "xl", children: _jsxs(Grid, { children: [_jsx(Grid.Col, { span: 6, children: createChart(chart.chartType, {
|
|
52
|
-
data: data === undefined ? [] : data,
|
|
53
|
-
total: counts !== null && counts !== void 0 ? counts : 1,
|
|
54
|
-
valueType: (_b = chart.valueType) !== null && _b !== void 0 ? _b : 'count',
|
|
55
|
-
label: chart.label,
|
|
56
|
-
showLegendInChart: chart.showLegendInChart,
|
|
57
|
-
}) }, "modal-col-1"), _jsx(Grid.Col, { span: 6, children: _jsx("div", { className: "border-solid border-[1px] border-[var(--mantine-color-gray-3)] h-full p-1", children: _jsx(Table, { withRowBorders: false, classNames: {
|
|
58
|
-
table: '',
|
|
59
|
-
td: 'p-1 leading-3',
|
|
60
|
-
}, children: _jsx(Table.Tbody, { children: data.map(function (element, elIndex) { return (_jsxs(Table.Tr, { children: [_jsxs(Table.Td, { children: [_jsx(ColorSwatch, { className: "inline-block mr-2 align-middle", size: "1em", radius: "xs", color: (chartColors === null || chartColors === void 0 ? void 0 : chartColors[elIndex % chartColors.length]) ||
|
|
61
|
-
'' }), element.key] }), _jsx(Table.Td, { className: "text-right", children: element.count })] }, elIndex)); }) }) }) }) }, "modal-col-2")] }) }), _jsxs(Button, { variant: "subtle", onClick: openMoreRows, leftSection: _jsx(Icon, { icon: "gen3:open-in-modal", height: 24, width: 24, color: theme.colors.accent[5] }), className: "text-black hover:text-black", children: [data.length - MAX_LEGEND_ROWS, " more"] })] }));
|
|
62
|
-
};
|
|
63
58
|
var dataKeys = field in data && (data === null || data === void 0 ? void 0 : data[field].length) > 0
|
|
64
59
|
? Object.keys(data[field][0])
|
|
65
60
|
: [];
|
|
66
61
|
var chartTitle = (_a = charts[field].title) !== null && _a !== void 0 ? _a : fieldNameToTitle(field);
|
|
67
|
-
var
|
|
62
|
+
var numberOfDataItems = (data === null || data === void 0 ? void 0 : data[field]) && data[field].length;
|
|
63
|
+
var moreThanMaxRows = numberOfDataItems > MAX_LEGEND_ROWS;
|
|
68
64
|
return (_jsx(Grid.Col, { span: spans[indexNum], children: _jsxs(Card, { shadow: "md", withBorder: style === 'box', className: "h-full", children: [_jsx(Card.Section, { inheritPadding: true, py: "xs", withBorder: style === 'box', children: _jsx(Group, { justify: "space-between", children: _jsx(Text, { fw: 900, className: "".concat(style === 'box' ? 'font-bold [text-shadow:_1px_0_#000]' : ''), children: chartTitle }) }) }), _jsx(LoadingOverlay, { visible: !isSuccess }), createChart(charts[field].chartType, {
|
|
69
65
|
data: data === undefined ? [] : data[field],
|
|
70
66
|
total: counts !== null && counts !== void 0 ? counts : 1,
|
|
71
67
|
valueType: (_b = charts[field].valueType) !== null && _b !== void 0 ? _b : 'count',
|
|
72
68
|
label: charts[field].label,
|
|
73
69
|
showLegendInChart: charts[field].showLegendInChart,
|
|
74
|
-
}), showLegends && (_jsx(Card.Section, { inheritPadding: true, py: "xs", withBorder: style === 'box', children: _jsxs(Table, { withRowBorders: false, classNames: {
|
|
70
|
+
}), numberOfDataItems > 0 && showLegends && (_jsx(Card.Section, { inheritPadding: true, py: "xs", withBorder: style === 'box', children: _jsxs(Table, { withRowBorders: false, classNames: {
|
|
75
71
|
td: 'p-1 leading-3',
|
|
76
72
|
th: 'p-1 leading-3 [text-shadow:_1px_0_#000]',
|
|
77
73
|
thead: 'border-b',
|
|
@@ -79,7 +75,7 @@ var Charts = function (_a) {
|
|
|
79
75
|
}, children: [_jsx(Table.Thead, { children: _jsx(Table.Tr, { children: dataKeys.map(function (el, i) {
|
|
80
76
|
var _a, _b;
|
|
81
77
|
return (_jsx(Table.Th, { className: "last:text-right", children: ((_b = (_a = charts[field]) === null || _a === void 0 ? void 0 : _a.dataLabels) === null || _b === void 0 ? void 0 : _b[el]) || (_jsx(React.Fragment, { children: "\u00A0" })) }, i));
|
|
82
|
-
}) }) }), _jsx(Table.Tbody, { children: data === undefined ? '' : _jsx(LegendRows, { data: data[field] }) })] }) })), showLegends && moreThanMaxRows && (_jsx(Card.Section, { inheritPadding: true, withBorder: style === 'box', className: "text-right p-1", children: _jsx(LegendOverflow, { chart: charts[field], data: data[field], chartTitle: chartTitle }) }))] }) }, "".concat(indexNum, "-charts-").concat(field, "-col")));
|
|
78
|
+
}) }) }), _jsx(Table.Tbody, { children: data === undefined ? '' : _jsx(LegendRows, { data: data[field] }) })] }) })), showLegends && moreThanMaxRows && (_jsx(Card.Section, { inheritPadding: true, withBorder: style === 'box', className: "text-right p-1", children: _jsx(LegendOverflow, { chart: charts[field], data: data[field], chartTitle: chartTitle, counts: counts !== null && counts !== void 0 ? counts : 0 }) }))] }) }, "".concat(indexNum, "-charts-").concat(field, "-col")));
|
|
83
79
|
};
|
|
84
80
|
return (_jsx(Grid, { className: "w-full", children: data && ((_b = Object.keys(charts)) === null || _b === void 0 ? void 0 : _b.map(chartCard)) }));
|
|
85
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Charts.js","sourceRoot":"","sources":["../../../../src/components/charts/Charts.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,gBAAgB,GAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO
|
|
1
|
+
{"version":3,"file":"Charts.js","sourceRoot":"","sources":["../../../../src/components/charts/Charts.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,gBAAgB,GAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EA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KAAC,KAAK,CAAC,KAAK,cACT,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAC,UAAU,IAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAI,GAChD,IACR,GACK,CAChB,EACA,WAAW,IAAI,eAAe,IAAI,CACjC,KAAC,IAAI,CAAC,OAAO,IACX,cAAc,QACd,UAAU,EAAE,KAAK,KAAK,KAAK,EAC3B,SAAS,EAAC,gBAAgB,YAE1B,KAAC,cAAc,IACb,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EACpB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,EACjB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,CAAC,GACnB,GACW,CAChB,IACI,IAnE6B,UAAG,QAAQ,qBAAW,KAAK,SAAM,CAoE5D,CACZ,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,YACrB,IAAI,KAAI,MAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,0CAAE,GAAG,CAAC,SAAS,CAAC,CAAA,GACvC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -4,9 +4,9 @@ interface ChartsPanelProps {
|
|
|
4
4
|
config: CollapsableChartsPanelConfiguration;
|
|
5
5
|
data: AggregationsData;
|
|
6
6
|
isFetching?: boolean;
|
|
7
|
-
isSuccess
|
|
7
|
+
isSuccess: boolean;
|
|
8
8
|
isError?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const CollapsableCharts: ({ config, data }: ChartsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const CollapsableCharts: ({ config, data, isError, isFetching, isSuccess, }: ChartsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default CollapsableCharts;
|
|
12
12
|
//# sourceMappingURL=CollapsableCharts.d.ts.map
|