@reltio/dashboard 1.4.1585 → 1.4.1586-mui5
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/.DS_Store +0 -0
- package/index.ts +12 -0
- package/package.json +42 -25
- package/public/bundle.js +205 -0
- package/public/bundle.js.LICENSE.txt +59 -0
- package/public/package.json +26 -0
- package/public/types/components/DashboardConfigItem/styles.d.ts +1 -0
- package/{types → public/types}/components/DashboardError/styles.d.ts +1 -1
- package/public/types/components/DashboardLayout/styles.d.ts +1 -0
- package/public/types/components/DashboardLayoutItem/styles.d.ts +1 -0
- package/public/types/components/DashboardLayoutPanel/styles.d.ts +1 -0
- package/public/types/components/DashboardLinearLoader/styles.d.ts +1 -0
- package/{types → public/types}/components/DashboardNoData/styles.d.ts +1 -1
- package/public/types/components/DashboardPerspectiveHeader/styles.d.ts +2 -0
- package/{types → public/types}/components/DashboardPopupMenu/DashboardPopupMenu.d.ts +1 -1
- package/public/types/components/DashboardPopupMenu/styles.d.ts +1 -0
- package/public/types/components/EntityTable/cell-renderers/styles.d.ts +1 -0
- package/{types → public/types}/components/EntityTable/styles.d.ts +1 -1
- package/public/types/components/LayoutItemContent/styles.d.ts +1 -0
- package/public/types/components/LayoutItemHeader/styles.d.ts +1 -0
- package/public/types/components/LayoutItemView/styles.d.ts +1 -0
- package/public/types/components/StatsChart/customized/styles.d.ts +1 -0
- package/public/types/components/WorkflowTaskItem/styles.d.ts +1 -0
- package/public/types/perspective/styles.d.ts +1 -0
- package/public/types/views/chartBased/styles.d.ts +1 -0
- package/public/types/views/custom/styles.d.ts +1 -0
- package/public/types/views/tableBased/styles.d.ts +1 -0
- package/scripts/build/index.js +21 -0
- package/src/HOCs/withPagination.tsx +39 -0
- package/src/components/DashboardConfigItem/DashboardConfigItem.tsx +101 -0
- package/src/components/DashboardConfigItem/__tests__/DashboardConfigItem.specs.tsx +81 -0
- package/src/components/DashboardConfigItem/icons/barChart.svg +12 -0
- package/src/components/DashboardConfigItem/icons/bubbleChart.svg +18 -0
- package/src/components/DashboardConfigItem/icons/customChart.svg +66 -0
- package/src/components/DashboardConfigItem/icons/donutChart.svg +33 -0
- package/src/components/DashboardConfigItem/icons/geomap.svg +23 -0
- package/src/components/DashboardConfigItem/icons/lineChart.svg +16 -0
- package/src/components/DashboardConfigItem/icons/pieChart.svg +27 -0
- package/src/components/DashboardConfigItem/icons/tableWithBars.svg +27 -0
- package/src/components/DashboardConfigItem/icons/treemap.svg +15 -0
- package/src/components/DashboardConfigItem/icons/wordCloud.svg +27 -0
- package/src/components/DashboardConfigItem/styles.ts +56 -0
- package/src/components/DashboardError/DashboardError.tsx +34 -0
- package/src/components/DashboardError/__tests__/DashboardError.test.js +34 -0
- package/src/components/DashboardError/icons/error.svg +113 -0
- package/src/components/DashboardError/styles.ts +30 -0
- package/src/components/DashboardLayout/DashboardLayout.tsx +59 -0
- package/src/components/DashboardLayout/__tests__/DashboardLayout.specs.tsx +56 -0
- package/src/components/DashboardLayout/styles.ts +30 -0
- package/src/components/DashboardLayoutItem/DashboardLayoutItem.tsx +59 -0
- package/src/components/DashboardLayoutItem/__tests__/DashboardLayoutItem.specs.tsx +145 -0
- package/src/components/DashboardLayoutItem/styles.ts +10 -0
- package/src/components/DashboardLayoutPanel/DashboardLayoutPanel.tsx +59 -0
- package/src/components/DashboardLayoutPanel/__tests__/DashboardLayoutPanel.specs.tsx +58 -0
- package/src/components/DashboardLayoutPanel/styles.ts +43 -0
- package/src/components/DashboardLinearLoader/DashboardLinearLoader.tsx +10 -0
- package/src/components/DashboardLinearLoader/__tests__/DashboardLinearLoader.test.js +12 -0
- package/src/components/DashboardLinearLoader/styles.ts +11 -0
- package/src/components/DashboardNoData/.DS_Store +0 -0
- package/src/components/DashboardNoData/DashboardNoData.tsx +21 -0
- package/src/components/DashboardNoData/__tests__/DashboardNoData.test.js +15 -0
- package/src/components/DashboardNoData/icons/noData.svg +68 -0
- package/src/components/DashboardNoData/styles.ts +21 -0
- package/src/components/DashboardPerspectiveHeader/DashboardPerspectiveHeader.tsx +43 -0
- package/src/components/DashboardPerspectiveHeader/__tests__/DashboardPerspectiveHeader.specs.tsx +41 -0
- package/src/components/DashboardPerspectiveHeader/styles.ts +24 -0
- package/src/components/DashboardPopupMenu/DashboardPopupMenu.tsx +75 -0
- package/src/components/DashboardPopupMenu/__tests__/DashboardPopupMenu.test.tsx +51 -0
- package/src/components/DashboardPopupMenu/styles.ts +20 -0
- package/src/components/EntityTable/EntityTable.tsx +49 -0
- package/src/components/EntityTable/__tests__/EntityTable.test.tsx +33 -0
- package/src/components/EntityTable/cell-renderers/EntityLabelRenderer.tsx +24 -0
- package/src/components/EntityTable/cell-renderers/HeadCellRenderer.tsx +34 -0
- package/src/components/EntityTable/cell-renderers/__tests__/EntityLabelRenderer.test.tsx +25 -0
- package/src/components/EntityTable/cell-renderers/styles.ts +46 -0
- package/src/components/EntityTable/styles.ts +19 -0
- package/src/components/LayoutItemContent/LayoutItemContent.tsx +63 -0
- package/src/components/LayoutItemContent/__tests__/LayoutItemContent.test.tsx +71 -0
- package/src/components/LayoutItemContent/styles.ts +36 -0
- package/src/components/LayoutItemHeader/LayoutItemHeader.tsx +86 -0
- package/src/components/LayoutItemHeader/__tests__/LayoutItemHeader.specs.tsx +48 -0
- package/src/components/LayoutItemHeader/styles.ts +44 -0
- package/src/components/LayoutItemView/LayoutItemView.tsx +24 -0
- package/src/components/LayoutItemView/styles.ts +11 -0
- package/src/components/StatsChart/StatsChart.tsx +77 -0
- package/src/components/StatsChart/__tests__/StatsChart.test.tsx +106 -0
- package/src/components/StatsChart/customized/CustomAxisTick.tsx +28 -0
- package/src/components/StatsChart/customized/CustomLegend.tsx +37 -0
- package/src/components/StatsChart/customized/CustomTooltip.tsx +41 -0
- package/src/components/StatsChart/customized/styles.ts +53 -0
- package/src/components/StatsChart/getStatsChartSettings.ts +65 -0
- package/src/components/WorkflowTaskItem/WorkflowTaskItem.tsx +67 -0
- package/src/components/WorkflowTaskItem/WorkflowTaskObject.tsx +54 -0
- package/src/components/WorkflowTaskItem/__tests__/WorkflowTaskItem.test.tsx +73 -0
- package/src/components/WorkflowTaskItem/__tests__/WorkflowTaskObject.test.tsx +95 -0
- package/src/components/WorkflowTaskItem/styles.ts +74 -0
- package/src/components/WorkflowTasksList/WorkflowTasksList.tsx +34 -0
- package/src/components/WorkflowTasksList/__tests__/WorkflowTasksList.test.tsx +98 -0
- package/src/components/index.ts +8 -0
- package/src/contexts/DashboardViewIdContext/index.ts +5 -0
- package/src/hooks/__tests__/useActivititesRequest.specs.tsx +106 -0
- package/src/hooks/__tests__/useEntityByTypeRequest.specs.tsx +280 -0
- package/src/hooks/__tests__/useFacetRequest.specs.tsx +437 -0
- package/src/hooks/__tests__/useFilteredEntitiesRequest.specs.tsx +103 -0
- package/src/hooks/__tests__/useSavedSearchesRequest.specs.tsx +201 -0
- package/src/hooks/__tests__/useStatsRequest.specs.tsx +212 -0
- package/src/hooks/__tests__/useWorkflowTasksRequest.specs.tsx +388 -0
- package/src/hooks/useActivitiesRequest.ts +50 -0
- package/src/hooks/useEntityByTypeRequest.ts +67 -0
- package/src/hooks/useFacetRequest.ts +117 -0
- package/src/hooks/useFilteredEntitiesRequest.ts +57 -0
- package/src/hooks/useSavedSearchesRequest.ts +82 -0
- package/src/hooks/useStatsRequest.ts +47 -0
- package/src/hooks/useWorkflowTasksRequest.ts +66 -0
- package/src/index.ts +25 -0
- package/src/perspective/DashboardPerspectiveView.tsx +132 -0
- package/src/perspective/__tests__/DashboardPerspectiveView.specs.tsx +276 -0
- package/src/perspective/__tests__/data/metadata.data.ts +33 -0
- package/src/perspective/__tests__/data/store.data.ts +15 -0
- package/src/perspective/__tests__/helpers.specs.ts +33 -0
- package/src/perspective/helpers.ts +19 -0
- package/src/perspective/index.tsx +65 -0
- package/src/perspective/styles.ts +16 -0
- package/src/services/__tests__/facets.specs.ts +42 -0
- package/src/services/__tests__/filters.specs.ts +60 -0
- package/src/services/__tests__/period.test.ts +33 -0
- package/src/services/__tests__/stats.test.ts +319 -0
- package/src/services/entityTypes.ts +66 -0
- package/src/services/facets.ts +178 -0
- package/src/services/filters.ts +87 -0
- package/src/services/period.ts +33 -0
- package/src/services/savedSearches.ts +20 -0
- package/src/services/stats.ts +191 -0
- package/src/services/workflowTasks.ts +116 -0
- package/src/types/ActivitiesViewFacetConfig.ts +5 -0
- package/src/types/CustomActionViewFacetConfig.ts +5 -0
- package/src/types/DashboardPerspectiveConfig.ts +18 -0
- package/src/types/DashboardSavedState.ts +7 -0
- package/src/types/EntityByTypeViewFacetConfig.ts +7 -0
- package/src/types/EntityData.ts +4 -0
- package/src/types/FilteredEntitiesFacetConfig.ts +6 -0
- package/src/types/FilteredSavedSearchesFacetConfig.ts +6 -0
- package/src/types/PeriodStep.ts +4 -0
- package/src/types/SavedSearchData.ts +6 -0
- package/src/types/SearchOptions.ts +10 -0
- package/src/types/StatsData.ts +14 -0
- package/src/types/WorkflowTasks.ts +26 -0
- package/src/types/index.ts +14 -0
- package/src/views/ViewsFactory.tsx +79 -0
- package/src/views/__tests__/ViewsFactory.specs.tsx +70 -0
- package/src/views/chartBased/DashboardFacet.tsx +71 -0
- package/src/views/chartBased/EntitiesByTypeViewFacet.tsx +60 -0
- package/src/views/chartBased/ProfileStatsFacet.tsx +54 -0
- package/src/views/chartBased/__tests__/DashboardFacet.specs.tsx +358 -0
- package/src/views/chartBased/__tests__/EntitiesByTypeViewFacet.specs.tsx +101 -0
- package/src/views/chartBased/__tests__/ProfileStatsFacet.specs.tsx +106 -0
- package/src/views/chartBased/styles.ts +13 -0
- package/src/views/custom/CustomActionViewFacet.tsx +36 -0
- package/src/views/custom/NotificationInboxFacet.tsx +86 -0
- package/src/views/custom/__tests__/CustomActionViewFacet.specs.tsx +35 -0
- package/src/views/custom/__tests__/NotificationInboxFacet.specs.tsx +144 -0
- package/src/views/custom/styles.ts +31 -0
- package/src/views/tableBased/ActivitiesViewFacet.tsx +79 -0
- package/src/views/tableBased/FilteredEntitiesViewFacet.tsx +67 -0
- package/src/views/tableBased/FilteredSavedSearchesFacet.tsx +85 -0
- package/src/views/tableBased/__tests__/ActivitiesViewFacet.specs.tsx +113 -0
- package/src/views/tableBased/__tests__/FIlteredEntitiesViewFacet.specs.tsx +90 -0
- package/src/views/tableBased/__tests__/FilteredSavedSearchesFacet.specs.tsx +133 -0
- package/src/views/tableBased/helpers.ts +8 -0
- package/src/views/tableBased/styles.ts +7 -0
- package/stories/Dashboards.stories.js +118 -0
- package/stories/utils/dashboardPerspectiveConfig.js +78 -0
- package/stories/utils/dashboardsViewConfig.js +17 -0
- package/stories/utils/mdmStore.js +73 -0
- package/stories/utils/responses.js +10 -0
- package/tsconfig.json +14 -0
- package/webpack.config.js +10 -0
- package/bundle.js +0 -2
- package/bundle.js.LICENSE.txt +0 -22
- package/types/components/DashboardConfigItem/styles.d.ts +0 -1
- package/types/components/DashboardLayout/styles.d.ts +0 -1
- package/types/components/DashboardLayoutItem/styles.d.ts +0 -1
- package/types/components/DashboardLayoutPanel/styles.d.ts +0 -1
- package/types/components/DashboardLinearLoader/styles.d.ts +0 -1
- package/types/components/DashboardPerspectiveHeader/styles.d.ts +0 -2
- package/types/components/DashboardPopupMenu/styles.d.ts +0 -1
- package/types/components/EntityTable/cell-renderers/styles.d.ts +0 -1
- package/types/components/LayoutItemContent/styles.d.ts +0 -1
- package/types/components/LayoutItemHeader/styles.d.ts +0 -1
- package/types/components/LayoutItemView/styles.d.ts +0 -1
- package/types/components/StatsChart/customized/styles.d.ts +0 -1
- package/types/components/WorkflowTaskItem/styles.d.ts +0 -1
- package/types/perspective/styles.d.ts +0 -1
- package/types/views/chartBased/styles.d.ts +0 -1
- package/types/views/custom/styles.d.ts +0 -1
- package/types/views/tableBased/styles.d.ts +0 -1
- /package/{types → public/types}/HOCs/withPagination.d.ts +0 -0
- /package/{types → public/types}/components/DashboardConfigItem/DashboardConfigItem.d.ts +0 -0
- /package/{types → public/types}/components/DashboardError/DashboardError.d.ts +0 -0
- /package/{types → public/types}/components/DashboardLayout/DashboardLayout.d.ts +0 -0
- /package/{types → public/types}/components/DashboardLayoutItem/DashboardLayoutItem.d.ts +0 -0
- /package/{types → public/types}/components/DashboardLayoutPanel/DashboardLayoutPanel.d.ts +0 -0
- /package/{types → public/types}/components/DashboardLinearLoader/DashboardLinearLoader.d.ts +0 -0
- /package/{types → public/types}/components/DashboardNoData/DashboardNoData.d.ts +0 -0
- /package/{types → public/types}/components/DashboardPerspectiveHeader/DashboardPerspectiveHeader.d.ts +0 -0
- /package/{types → public/types}/components/EntityTable/EntityTable.d.ts +0 -0
- /package/{types → public/types}/components/EntityTable/cell-renderers/EntityLabelRenderer.d.ts +0 -0
- /package/{types → public/types}/components/EntityTable/cell-renderers/HeadCellRenderer.d.ts +0 -0
- /package/{types → public/types}/components/LayoutItemContent/LayoutItemContent.d.ts +0 -0
- /package/{types → public/types}/components/LayoutItemHeader/LayoutItemHeader.d.ts +0 -0
- /package/{types → public/types}/components/LayoutItemView/LayoutItemView.d.ts +0 -0
- /package/{types → public/types}/components/StatsChart/StatsChart.d.ts +0 -0
- /package/{types → public/types}/components/StatsChart/customized/CustomAxisTick.d.ts +0 -0
- /package/{types → public/types}/components/StatsChart/customized/CustomLegend.d.ts +0 -0
- /package/{types → public/types}/components/StatsChart/customized/CustomTooltip.d.ts +0 -0
- /package/{types → public/types}/components/StatsChart/getStatsChartSettings.d.ts +0 -0
- /package/{types → public/types}/components/WorkflowTaskItem/WorkflowTaskItem.d.ts +0 -0
- /package/{types → public/types}/components/WorkflowTaskItem/WorkflowTaskObject.d.ts +0 -0
- /package/{types → public/types}/components/WorkflowTasksList/WorkflowTasksList.d.ts +0 -0
- /package/{types → public/types}/components/index.d.ts +0 -0
- /package/{types → public/types}/contexts/DashboardViewIdContext/index.d.ts +0 -0
- /package/{types → public/types}/hooks/useActivitiesRequest.d.ts +0 -0
- /package/{types → public/types}/hooks/useEntityByTypeRequest.d.ts +0 -0
- /package/{types → public/types}/hooks/useFacetRequest.d.ts +0 -0
- /package/{types → public/types}/hooks/useFilteredEntitiesRequest.d.ts +0 -0
- /package/{types → public/types}/hooks/useSavedSearchesRequest.d.ts +0 -0
- /package/{types → public/types}/hooks/useStatsRequest.d.ts +0 -0
- /package/{types → public/types}/hooks/useWorkflowTasksRequest.d.ts +0 -0
- /package/{types → public/types}/index.d.ts +0 -0
- /package/{types → public/types}/perspective/DashboardPerspectiveView.d.ts +0 -0
- /package/{types → public/types}/perspective/helpers.d.ts +0 -0
- /package/{types → public/types}/perspective/index.d.ts +0 -0
- /package/{types → public/types}/services/entityTypes.d.ts +0 -0
- /package/{types → public/types}/services/facets.d.ts +0 -0
- /package/{types → public/types}/services/filters.d.ts +0 -0
- /package/{types → public/types}/services/period.d.ts +0 -0
- /package/{types → public/types}/services/savedSearches.d.ts +0 -0
- /package/{types → public/types}/services/stats.d.ts +0 -0
- /package/{types → public/types}/services/workflowTasks.d.ts +0 -0
- /package/{types → public/types}/types/ActivitiesViewFacetConfig.d.ts +0 -0
- /package/{types → public/types}/types/CustomActionViewFacetConfig.d.ts +0 -0
- /package/{types → public/types}/types/DashboardPerspectiveConfig.d.ts +0 -0
- /package/{types → public/types}/types/DashboardSavedState.d.ts +0 -0
- /package/{types → public/types}/types/EntityByTypeViewFacetConfig.d.ts +0 -0
- /package/{types → public/types}/types/EntityData.d.ts +0 -0
- /package/{types → public/types}/types/FilteredEntitiesFacetConfig.d.ts +0 -0
- /package/{types → public/types}/types/FilteredSavedSearchesFacetConfig.d.ts +0 -0
- /package/{types → public/types}/types/PeriodStep.d.ts +0 -0
- /package/{types → public/types}/types/SavedSearchData.d.ts +0 -0
- /package/{types → public/types}/types/SearchOptions.d.ts +0 -0
- /package/{types → public/types}/types/StatsData.d.ts +0 -0
- /package/{types → public/types}/types/WorkflowTasks.d.ts +0 -0
- /package/{types → public/types}/types/index.d.ts +0 -0
- /package/{types → public/types}/views/ViewsFactory.d.ts +0 -0
- /package/{types → public/types}/views/chartBased/DashboardFacet.d.ts +0 -0
- /package/{types → public/types}/views/chartBased/EntitiesByTypeViewFacet.d.ts +0 -0
- /package/{types → public/types}/views/chartBased/ProfileStatsFacet.d.ts +0 -0
- /package/{types → public/types}/views/custom/CustomActionViewFacet.d.ts +0 -0
- /package/{types → public/types}/views/custom/NotificationInboxFacet.d.ts +0 -0
- /package/{types → public/types}/views/tableBased/ActivitiesViewFacet.d.ts +0 -0
- /package/{types → public/types}/views/tableBased/FilteredEntitiesViewFacet.d.ts +0 -0
- /package/{types → public/types}/views/tableBased/FilteredSavedSearchesFacet.d.ts +0 -0
- /package/{types → public/types}/views/tableBased/helpers.d.ts +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import i18n from 'ui-i18n';
|
|
3
|
+
import Typography from '@mui/material/Typography';
|
|
4
|
+
import ReplayIcon from '@mui/icons-material/Replay';
|
|
5
|
+
import Button from '@mui/material/Button';
|
|
6
|
+
import ErrorIcon from './icons/error.svg';
|
|
7
|
+
import {useStyles} from './styles';
|
|
8
|
+
|
|
9
|
+
type DashboardErrorProps = {
|
|
10
|
+
height?: number;
|
|
11
|
+
onRefresh?: () => void;
|
|
12
|
+
message?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const DashboardError = ({height, onRefresh, message}: DashboardErrorProps) => {
|
|
16
|
+
const styles = useStyles({height});
|
|
17
|
+
return (
|
|
18
|
+
<div className={styles.errorContainer}>
|
|
19
|
+
<ErrorIcon className={styles.errorIcon} />
|
|
20
|
+
<Typography>{message}</Typography>
|
|
21
|
+
{onRefresh && (
|
|
22
|
+
<Button
|
|
23
|
+
className={styles.refreshButton}
|
|
24
|
+
startIcon={<ReplayIcon color="primary" className={styles.refreshIcon} />}
|
|
25
|
+
onClick={onRefresh}
|
|
26
|
+
>
|
|
27
|
+
<Typography variant="button">{i18n.text('Refresh')}</Typography>
|
|
28
|
+
</Button>
|
|
29
|
+
)}
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default DashboardError;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {shallow} from 'enzyme';
|
|
3
|
+
import Typography from '@mui/material/Typography';
|
|
4
|
+
import Button from '@mui/material/Button';
|
|
5
|
+
|
|
6
|
+
import DashboardError from '../DashboardError';
|
|
7
|
+
import ErrorIcon from '../icons/error.svg';
|
|
8
|
+
|
|
9
|
+
describe('DashboardError tests', () => {
|
|
10
|
+
it('should render DashboardError', () => {
|
|
11
|
+
const onRefresh = jest.fn();
|
|
12
|
+
const wrapper = shallow(<DashboardError message={'Error Loading Data'} onRefresh={onRefresh} />);
|
|
13
|
+
const button = wrapper.find(Button);
|
|
14
|
+
|
|
15
|
+
expect(wrapper.find('.errorContainer').length).toBe(1);
|
|
16
|
+
expect(wrapper.find(ErrorIcon).length).toBe(1);
|
|
17
|
+
expect(wrapper.find(Typography).first().text()).toBe('Error Loading Data');
|
|
18
|
+
expect(button).toHaveLength(1);
|
|
19
|
+
expect(button.text().includes('Refresh')).toBe(true);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should call onRefresh prop when click on Refresh button', () => {
|
|
23
|
+
const onRefresh = jest.fn();
|
|
24
|
+
const wrapper = shallow(<DashboardError onRefresh={onRefresh} />);
|
|
25
|
+
wrapper.find(Button).simulate('click');
|
|
26
|
+
expect(onRefresh).toBeCalled();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('should not render button when onRefresh prop is undefined', () => {
|
|
30
|
+
const wrapper = shallow(<DashboardError />);
|
|
31
|
+
const button = wrapper.find(Button);
|
|
32
|
+
expect(button).toHaveLength(0);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<svg width="88" height="88" viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="mask0" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="88" height="88">
|
|
3
|
+
<path d="M44 88C68.3005 88 88 68.3005 88 44C88 19.6995 68.3005 0 44 0C19.6995 0 0 19.6995 0 44C0 68.3005 19.6995 88 44 88Z" fill="white"/>
|
|
4
|
+
</mask>
|
|
5
|
+
<g mask="url(#mask0)">
|
|
6
|
+
<path d="M44 88C68.3005 88 88 68.3005 88 44C88 19.6995 68.3005 0 44 0C19.6995 0 0 19.6995 0 44C0 68.3005 19.6995 88 44 88Z" fill="#CAC4D5" fill-opacity="0.3"/>
|
|
7
|
+
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M19.987 6.73083L69.4355 12.8023C69.8111 12.8485 70.0781 13.1913 70.0317 13.5691L62.1873 77.4572C62.1409 77.8346 61.7977 78.1029 61.4208 78.0567L7.21427 71.4009C6.83729 71.3547 6.56946 71.0095 6.61511 70.6377L7.02348 67.3117L19.987 6.73083Z" fill="white"/>
|
|
8
|
+
<path opacity="0.2" fill-rule="evenodd" clip-rule="evenodd" d="M1.26706 25.9213L47.1265 6.45515C47.4748 6.30729 47.8775 6.4707 48.0262 6.82109L73.1768 66.0721C73.3253 66.422 73.1547 66.7972 72.7913 66.9114L22.3393 82.7659C21.9779 82.8795 21.5823 82.6849 21.452 82.321L1.26706 25.9213Z" fill="white"/>
|
|
9
|
+
<path d="M65.6311 9.22949H11.0171C10.6374 9.22949 10.3296 9.5373 10.3296 9.91699V74.2867C10.3296 74.6664 10.6374 74.9742 11.0171 74.9742H65.6311C66.0108 74.9742 66.3186 74.6664 66.3186 74.2867V9.91699C66.3186 9.5373 66.0108 9.22949 65.6311 9.22949Z" fill="#F9F9F9"/>
|
|
10
|
+
<path opacity="0.1" fill-rule="evenodd" clip-rule="evenodd" d="M14.8853 34.95L17.9899 33.2839L25.3003 29.2586L34.1521 32.7315L42.0411 27.5081L50.0776 24.8803L58.191 30.0726L61.5428 19.8184V36.7847H14.9355L14.8853 34.95Z" fill="#9C6CF0"/>
|
|
11
|
+
<path opacity="0.2" fill-rule="evenodd" clip-rule="evenodd" d="M14.8853 32.3311L17.9899 28.5698L25.3003 32.8802L34.1521 34.5364L42.0411 32.3311L50.0776 34.1582L58.191 21.5146L61.5428 22.2574V36.3602H14.9355L14.8853 32.3311Z" fill="#FA82AA"/>
|
|
12
|
+
<path opacity="0.2" fill-rule="evenodd" clip-rule="evenodd" d="M14.8853 34.9461L17.9899 35.3781L25.3003 36.3872L34.1521 31.2705L42.0411 34.9461L50.0776 36.7846L58.191 34.9461L61.5428 35.7573V36.7846H14.9355L14.8853 34.9461Z" fill="#4DBEE9"/>
|
|
13
|
+
<path opacity="0.1" fill-rule="evenodd" clip-rule="evenodd" d="M61.5428 35.288L61.4925 36.7846H14.8853L14.8853 31.5464L18.2371 31.2705L26.3505 35.9667L34.3869 35.288L42.2759 36.1071L51.1278 35.492L58.4381 33.891L61.5428 35.288Z" fill="#4DBEE9"/>
|
|
14
|
+
<path d="M21.0357 40.1777H15.9458C15.5944 40.1777 15.3096 40.4626 15.3096 40.814C15.3096 41.1654 15.5944 41.4502 15.9458 41.4502H21.0357C21.3871 41.4502 21.672 41.1654 21.672 40.814C21.672 40.4626 21.3871 40.1777 21.0357 40.1777Z" fill="#ACACAC"/>
|
|
15
|
+
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M16.582 55.8721C17.2848 55.8721 17.8545 56.4418 17.8545 57.1445V69.021C17.8545 69.7238 17.2848 70.2935 16.582 70.2935C15.8793 70.2935 15.3096 69.7238 15.3096 69.021V57.1445C15.3096 56.4418 15.8793 55.8721 16.582 55.8721Z" fill="#BDBDBD"/>
|
|
16
|
+
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M25.9136 55.8721C26.6164 55.8721 27.1861 56.4418 27.1861 57.1445V69.021C27.1861 69.7238 26.6164 70.2935 25.9136 70.2935C25.2108 70.2935 24.6411 69.7238 24.6411 69.021V57.1445C24.6411 56.4418 25.2108 55.8721 25.9136 55.8721Z" fill="#BDBDBD"/>
|
|
17
|
+
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M39.9107 55.8721C40.6134 55.8721 41.1831 56.4418 41.1831 57.1445V69.021C41.1831 69.7238 40.6134 70.2935 39.9107 70.2935C39.2079 70.2935 38.6382 69.7238 38.6382 69.021V57.1445C38.6382 56.4418 39.2079 55.8721 39.9107 55.8721Z" fill="#BDBDBD"/>
|
|
18
|
+
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M21.2476 55.8721C21.9503 55.8721 22.5201 56.4418 22.5201 57.1445V69.021C22.5201 69.7238 21.9503 70.2935 21.2476 70.2935C20.5448 70.2935 19.9751 69.7238 19.9751 69.021V57.1445C19.9751 56.4418 20.5448 55.8721 21.2476 55.8721Z" fill="#BDBDBD"/>
|
|
19
|
+
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M35.2451 55.8721C35.9479 55.8721 36.5176 56.4418 36.5176 57.1445V69.021C36.5176 69.7238 35.9479 70.2935 35.2451 70.2935C34.5424 70.2935 33.9727 69.7238 33.9727 69.021V57.1445C33.9727 56.4418 34.5424 55.8721 35.2451 55.8721Z" fill="#BDBDBD"/>
|
|
20
|
+
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M30.5791 55.8721C31.2819 55.8721 31.8516 56.4418 31.8516 57.1445V69.021C31.8516 69.7238 31.2819 70.2935 30.5791 70.2935C29.8763 70.2935 29.3066 69.7238 29.3066 69.021V57.1445C29.3066 56.4418 29.8763 55.8721 30.5791 55.8721Z" fill="#BDBDBD"/>
|
|
21
|
+
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M44.5767 55.8721C45.2794 55.8721 45.8492 56.4418 45.8492 57.1445V69.021C45.8492 69.7238 45.2794 70.2935 44.5767 70.2935C43.8739 70.2935 43.3042 69.7238 43.3042 69.021V57.1445C43.3042 56.4418 43.8739 55.8721 44.5767 55.8721Z" fill="#BDBDBD"/>
|
|
22
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.582 65.6279C17.2848 65.6279 17.8545 66.1976 17.8545 66.9004V69.0212C17.8545 69.724 17.2848 70.2937 16.582 70.2937C15.8793 70.2937 15.3096 69.724 15.3096 69.0212V66.9004C15.3096 66.1976 15.8793 65.6279 16.582 65.6279Z" fill="#4DBEE9"/>
|
|
23
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.9136 62.6582C26.6164 62.6582 27.1861 63.2279 27.1861 63.9307V69.0206C27.1861 69.7234 26.6164 70.2931 25.9136 70.2931C25.2108 70.2931 24.6411 69.7234 24.6411 69.0206V63.9307C24.6411 63.2279 25.2108 62.6582 25.9136 62.6582Z" fill="#4DBEE9"/>
|
|
24
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M39.9107 65.6279C40.6134 65.6279 41.1831 66.1976 41.1831 66.9004V69.0212C41.1831 69.724 40.6134 70.2937 39.9107 70.2937C39.2079 70.2937 38.6382 69.724 38.6382 69.0212V66.9004C38.6382 66.1976 39.2079 65.6279 39.9107 65.6279Z" fill="#4DBEE9"/>
|
|
25
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2476 66.4766C21.9503 66.4766 22.5201 67.0463 22.5201 67.749V69.0215C22.5201 69.7243 21.9503 70.294 21.2476 70.294C20.5448 70.294 19.9751 69.7243 19.9751 69.0215V67.749C19.9751 67.0463 20.5448 66.4766 21.2476 66.4766Z" fill="#4DBEE9"/>
|
|
26
|
+
<path d="M36.5176 65.6279C36.5176 64.9252 35.9479 64.3555 35.2451 64.3555C34.5424 64.3555 33.9727 64.9252 33.9727 65.6279V69.0212C33.9727 69.724 34.5424 70.2937 35.2451 70.2937C35.9479 70.2937 36.5176 69.724 36.5176 69.0212V65.6279Z" fill="#4DBEE9"/>
|
|
27
|
+
<path d="M31.8516 62.2344C31.8516 61.5316 31.2819 60.9619 30.5791 60.9619C29.8763 60.9619 29.3066 61.5316 29.3066 62.2344V69.0209C29.3066 69.7237 29.8763 70.2934 30.5791 70.2934C31.2819 70.2934 31.8516 69.7237 31.8516 69.0209V62.2344Z" fill="#4DBEE9"/>
|
|
28
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M44.5767 60.9619C45.2794 60.9619 45.8492 61.5316 45.8492 62.2344V69.0209C45.8492 69.7237 45.2794 70.2934 44.5767 70.2934C43.8739 70.2934 43.3042 69.7237 43.3042 69.0209V62.2344C43.3042 61.5316 43.8739 60.9619 44.5767 60.9619Z" fill="#4DBEE9"/>
|
|
29
|
+
<path d="M18.9146 18.5459C19.9687 18.5459 20.8233 17.6914 20.8233 16.6372C20.8233 15.5831 19.9687 14.7285 18.9146 14.7285C17.8604 14.7285 17.0059 15.5831 17.0059 16.6372C17.0059 17.6914 17.8604 18.5459 18.9146 18.5459Z" fill="#9C6CF0"/>
|
|
30
|
+
<path opacity="0.5" d="M34.1846 18.5459C35.2388 18.5459 36.0933 17.6914 36.0933 16.6372C36.0933 15.5831 35.2388 14.7285 34.1846 14.7285C33.1304 14.7285 32.2759 15.5831 32.2759 16.6372C32.2759 17.6914 33.1304 18.5459 34.1846 18.5459Z" fill="#4DBEE9"/>
|
|
31
|
+
<path opacity="0.3" d="M49.4541 18.5459C50.5083 18.5459 51.3628 17.6914 51.3628 16.6372C51.3628 15.5831 50.5083 14.7285 49.4541 14.7285C48.4 14.7285 47.5454 15.5831 47.5454 16.6372C47.5454 17.6914 48.4 18.5459 49.4541 18.5459Z" fill="#4DBEE9"/>
|
|
32
|
+
<path opacity="0.8" d="M26.5498 18.5459C27.604 18.5459 28.4585 17.6914 28.4585 16.6372C28.4585 15.5831 27.604 14.7285 26.5498 14.7285C25.4957 14.7285 24.6411 15.5831 24.6411 16.6372C24.6411 17.6914 25.4957 18.5459 26.5498 18.5459Z" fill="#FB6597"/>
|
|
33
|
+
<path d="M41.8194 18.5459C42.8735 18.5459 43.7281 17.6914 43.7281 16.6372C43.7281 15.5831 42.8735 14.7285 41.8194 14.7285C40.7652 14.7285 39.9106 15.5831 39.9106 16.6372C39.9106 17.6914 40.7652 18.5459 41.8194 18.5459Z" fill="#4DBEE9"/>
|
|
34
|
+
<path opacity="0.2" d="M57.0894 18.5459C58.1435 18.5459 58.9981 17.6914 58.9981 16.6372C58.9981 15.5831 58.1435 14.7285 57.0894 14.7285C56.0352 14.7285 55.1807 15.5831 55.1807 16.6372C55.1807 17.6914 56.0352 18.5459 57.0894 18.5459Z" fill="#4DBEE9"/>
|
|
35
|
+
<path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M16.5819 19.8184H21.2476C21.4819 19.8184 21.6718 20.0083 21.6718 20.2425C21.6718 20.4768 21.4819 20.6667 21.2476 20.6667H16.5819C16.3476 20.6667 16.1577 20.4768 16.1577 20.2425C16.1577 20.0083 16.3476 19.8184 16.5819 19.8184Z" fill="#ACACAC"/>
|
|
36
|
+
<path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M31.8514 19.8184H36.5172C36.7514 19.8184 36.9413 20.0083 36.9413 20.2425C36.9413 20.4768 36.7514 20.6667 36.5172 20.6667H31.8514C31.6171 20.6667 31.4272 20.4768 31.4272 20.2425C31.4272 20.0083 31.6171 19.8184 31.8514 19.8184Z" fill="#ACACAC"/>
|
|
37
|
+
<path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M47.1214 19.8184H51.7872C52.0214 19.8184 52.2113 20.0083 52.2113 20.2425C52.2113 20.4768 52.0214 20.6667 51.7872 20.6667H47.1214C46.8872 20.6667 46.6973 20.4768 46.6973 20.2425C46.6973 20.0083 46.8872 19.8184 47.1214 19.8184Z" fill="#ACACAC"/>
|
|
38
|
+
<path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M24.2166 19.8184H28.8824C29.1166 19.8184 29.3065 20.0083 29.3065 20.2425C29.3065 20.4768 29.1166 20.6667 28.8824 20.6667H24.2166C23.9824 20.6667 23.7925 20.4768 23.7925 20.2425C23.7925 20.0083 23.9824 19.8184 24.2166 19.8184Z" fill="#ACACAC"/>
|
|
39
|
+
<path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M39.4862 19.8184H44.1519C44.3862 19.8184 44.5761 20.0083 44.5761 20.2425C44.5761 20.4768 44.3862 20.6667 44.1519 20.6667H39.4862C39.2519 20.6667 39.062 20.4768 39.062 20.2425C39.062 20.0083 39.2519 19.8184 39.4862 19.8184Z" fill="#ACACAC"/>
|
|
40
|
+
<path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M54.7562 19.8184H59.4219C59.6562 19.8184 59.8461 20.0083 59.8461 20.2425C59.8461 20.4768 59.6562 20.6667 59.4219 20.6667H54.7562C54.5219 20.6667 54.332 20.4768 54.332 20.2425C54.332 20.0083 54.5219 19.8184 54.7562 19.8184Z" fill="#ACACAC"/>
|
|
41
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9458 43.5713H21.0357C21.3871 43.5713 21.672 43.8561 21.672 44.2075C21.672 44.5589 21.3871 44.8438 21.0357 44.8438H15.9458C15.5944 44.8438 15.3096 44.5589 15.3096 44.2075C15.3096 43.8561 15.5944 43.5713 15.9458 43.5713Z" fill="#E9E9E9"/>
|
|
42
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9458 46.1162H21.0357C21.3871 46.1162 21.672 46.4011 21.672 46.7524C21.672 47.1038 21.3871 47.3887 21.0357 47.3887H15.9458C15.5944 47.3887 15.3096 47.1038 15.3096 46.7524C15.3096 46.4011 15.5944 46.1162 15.9458 46.1162Z" fill="#E9E9E9"/>
|
|
43
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9458 48.6611H21.0357C21.3871 48.6611 21.672 48.946 21.672 49.2974C21.672 49.6488 21.3871 49.9336 21.0357 49.9336H15.9458C15.5944 49.9336 15.3096 49.6488 15.3096 49.2974C15.3096 48.946 15.5944 48.6611 15.9458 48.6611Z" fill="#E9E9E9"/>
|
|
44
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5806 43.5713H28.6705C29.0219 43.5713 29.3067 43.8561 29.3067 44.2075C29.3067 44.5589 29.0219 44.8438 28.6705 44.8438H23.5806C23.2292 44.8438 22.9443 44.5589 22.9443 44.2075C22.9443 43.8561 23.2292 43.5713 23.5806 43.5713Z" fill="#E9E9E9"/>
|
|
45
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5806 46.1162H28.6705C29.0219 46.1162 29.3067 46.4011 29.3067 46.7524C29.3067 47.1038 29.0219 47.3887 28.6705 47.3887H23.5806C23.2292 47.3887 22.9443 47.1038 22.9443 46.7524C22.9443 46.4011 23.2292 46.1162 23.5806 46.1162Z" fill="#E9E9E9"/>
|
|
46
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5806 48.6611H28.6705C29.0219 48.6611 29.3067 48.946 29.3067 49.2974C29.3067 49.6488 29.0219 49.9336 28.6705 49.9336H23.5806C23.2292 49.9336 22.9443 49.6488 22.9443 49.2974C22.9443 48.946 23.2292 48.6611 23.5806 48.6611Z" fill="#E9E9E9"/>
|
|
47
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.4541 43.5713H60.4823C60.8336 43.5713 61.1185 43.8561 61.1185 44.2075C61.1185 44.5589 60.8336 44.8438 60.4823 44.8438H49.4541C49.1027 44.8438 48.8179 44.5589 48.8179 44.2075C48.8179 43.8561 49.1027 43.5713 49.4541 43.5713Z" fill="#E9E9E9"/>
|
|
48
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.4541 46.1162H60.4823C60.8336 46.1162 61.1185 46.4011 61.1185 46.7524C61.1185 47.1038 60.8336 47.3887 60.4823 47.3887H49.4541C49.1027 47.3887 48.8179 47.1038 48.8179 46.7524C48.8179 46.4011 49.1027 46.1162 49.4541 46.1162Z" fill="#E9E9E9"/>
|
|
49
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.4541 48.6611H60.4823C60.8336 48.6611 61.1185 48.946 61.1185 49.2974C61.1185 49.6488 60.8336 49.9336 60.4823 49.9336H49.4541C49.1027 49.9336 48.8179 49.6488 48.8179 49.2974C48.8179 48.946 49.1027 48.6611 49.4541 48.6611Z" fill="#E9E9E9"/>
|
|
50
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.2153 43.5713H46.4851C46.8365 43.5713 47.1213 43.8561 47.1213 44.2075C47.1213 44.5589 46.8365 44.8438 46.4851 44.8438H31.2153C30.864 44.8438 30.5791 44.5589 30.5791 44.2075C30.5791 43.8561 30.864 43.5713 31.2153 43.5713Z" fill="#E9E9E9"/>
|
|
51
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.2153 46.1162H46.4851C46.8365 46.1162 47.1213 46.4011 47.1213 46.7524C47.1213 47.1038 46.8365 47.3887 46.4851 47.3887H31.2153C30.864 47.3887 30.5791 47.1038 30.5791 46.7524C30.5791 46.4011 30.864 46.1162 31.2153 46.1162Z" fill="#E9E9E9"/>
|
|
52
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.2153 48.6611H46.4851C46.8365 48.6611 47.1213 48.946 47.1213 49.2974C47.1213 49.6488 46.8365 49.9336 46.4851 49.9336H31.2153C30.864 49.9336 30.5791 49.6488 30.5791 49.2974C30.5791 48.946 30.864 48.6611 31.2153 48.6611Z" fill="#E9E9E9"/>
|
|
53
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9458 51.2061H21.0357C21.3871 51.2061 21.672 51.4909 21.672 51.8423C21.672 52.1937 21.3871 52.4785 21.0357 52.4785H15.9458C15.5944 52.4785 15.3096 52.1937 15.3096 51.8423C15.3096 51.4909 15.5944 51.2061 15.9458 51.2061Z" fill="#E9E9E9"/>
|
|
54
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5806 51.2061H28.6705C29.0219 51.2061 29.3067 51.4909 29.3067 51.8423C29.3067 52.1937 29.0219 52.4785 28.6705 52.4785H23.5806C23.2292 52.4785 22.9443 52.1937 22.9443 51.8423C22.9443 51.4909 23.2292 51.2061 23.5806 51.2061Z" fill="#E9E9E9"/>
|
|
55
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.4541 51.2061H60.4823C60.8336 51.2061 61.1185 51.4909 61.1185 51.8423C61.1185 52.1937 60.8336 52.4785 60.4823 52.4785H49.4541C49.1027 52.4785 48.8179 52.1937 48.8179 51.8423C48.8179 51.4909 49.1027 51.2061 49.4541 51.2061Z" fill="#E9E9E9"/>
|
|
56
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.2153 51.2061H46.4851C46.8365 51.2061 47.1213 51.4909 47.1213 51.8423C47.1213 52.1937 46.8365 52.4785 46.4851 52.4785H31.2153C30.864 52.4785 30.5791 52.1937 30.5791 51.8423C30.5791 51.4909 30.864 51.2061 31.2153 51.2061Z" fill="#E9E9E9"/>
|
|
57
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.8784 55.8721H54.9683C55.3197 55.8721 55.6046 56.1569 55.6046 56.5083C55.6046 56.8597 55.3197 57.1445 54.9683 57.1445H49.8784C49.527 57.1445 49.2422 56.8597 49.2422 56.5083C49.2422 56.1569 49.527 55.8721 49.8784 55.8721Z" fill="#ACACAC"/>
|
|
58
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.8784 59.6895H60.9066C61.2579 59.6895 61.5428 59.9743 61.5428 60.3257C61.5428 60.6771 61.2579 60.9619 60.9066 60.9619H49.8784C49.527 60.9619 49.2422 60.6771 49.2422 60.3257C49.2422 59.9743 49.527 59.6895 49.8784 59.6895Z" fill="#E9E9E9"/>
|
|
59
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.8784 62.2344H60.9066C61.2579 62.2344 61.5428 62.5192 61.5428 62.8706C61.5428 63.222 61.2579 63.5069 60.9066 63.5069H49.8784C49.527 63.5069 49.2422 63.222 49.2422 62.8706C49.2422 62.5192 49.527 62.2344 49.8784 62.2344Z" fill="#E9E9E9"/>
|
|
60
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.8784 64.7793H60.9066C61.2579 64.7793 61.5428 65.0642 61.5428 65.4155C61.5428 65.7669 61.2579 66.0518 60.9066 66.0518H49.8784C49.527 66.0518 49.2422 65.7669 49.2422 65.4155C49.2422 65.0642 49.527 64.7793 49.8784 64.7793Z" fill="#E9E9E9"/>
|
|
61
|
+
<path d="M54.9683 67.3242H49.8784C49.527 67.3242 49.2422 67.6091 49.2422 67.9605C49.2422 68.3118 49.527 68.5967 49.8784 68.5967H54.9683C55.3197 68.5967 55.6046 68.3118 55.6046 67.9605C55.6046 67.6091 55.3197 67.3242 54.9683 67.3242Z" fill="#E9E9E9"/>
|
|
62
|
+
<g filter="url(#error__filter0_d)">
|
|
63
|
+
<path d="M57.4062 74.25C66.8986 74.25 74.5938 66.5549 74.5938 57.0625C74.5938 47.5701 66.8986 39.875 57.4062 39.875C47.9139 39.875 40.2188 47.5701 40.2188 57.0625C40.2188 66.5549 47.9139 74.25 57.4062 74.25Z" fill="black"/>
|
|
64
|
+
</g>
|
|
65
|
+
<path d="M57.4062 74.25C66.8986 74.25 74.5938 66.5549 74.5938 57.0625C74.5938 47.5701 66.8986 39.875 57.4062 39.875C47.9139 39.875 40.2188 47.5701 40.2188 57.0625C40.2188 66.5549 47.9139 74.25 57.4062 74.25Z" fill="#F25252"/>
|
|
66
|
+
<path opacity="0.15" fill-rule="evenodd" clip-rule="evenodd" d="M57.4062 34.7188C69.7464 34.7188 79.75 44.7224 79.75 57.0625C79.75 69.4026 69.7464 79.4062 57.4062 79.4062C45.0661 79.4062 35.0625 69.4026 35.0625 57.0625C35.0625 44.7224 45.0661 34.7188 57.4062 34.7188ZM57.2344 37.125C46.3181 37.125 37.4688 45.9744 37.4688 56.8906C37.4688 67.8069 46.3181 76.6562 57.2344 76.6562C68.1506 76.6562 77 67.8069 77 56.8906C77 45.9744 68.1506 37.125 57.2344 37.125Z" fill="#F25252"/>
|
|
67
|
+
<path opacity="0.3" fill-rule="evenodd" clip-rule="evenodd" d="M57.4062 38.8438C67.4682 38.8438 75.625 47.0006 75.625 57.0625C75.625 67.1244 67.4682 75.2812 57.4062 75.2812C47.3443 75.2812 39.1875 67.1244 39.1875 57.0625C39.1875 47.0006 47.3443 38.8438 57.4062 38.8438ZM57.4062 40.887C48.4728 40.887 41.2307 48.129 41.2307 57.0625C41.2307 65.996 48.4728 73.238 57.4062 73.238C66.3397 73.238 73.5818 65.996 73.5818 57.0625C73.5818 48.129 66.3397 40.887 57.4062 40.887Z" fill="#F25252"/>
|
|
68
|
+
<path opacity="0.05" fill-rule="evenodd" clip-rule="evenodd" d="M57.4062 26.4688C74.3027 26.4688 88 40.166 88 57.0625C88 73.959 74.3027 87.6562 57.4062 87.6562C40.5098 87.6562 26.8125 73.959 26.8125 57.0625C26.8125 40.166 40.5098 26.4688 57.4062 26.4688ZM57.2344 29.9062C42.3313 29.9062 30.25 41.9876 30.25 56.8906C30.25 71.7937 42.3313 83.875 57.2344 83.875C72.1374 83.875 84.2188 71.7937 84.2188 56.8906C84.2188 41.9876 72.1374 29.9062 57.2344 29.9062Z" fill="#F25252"/>
|
|
69
|
+
<path d="M57.4062 71.8438C65.5697 71.8438 72.1875 65.226 72.1875 57.0625C72.1875 48.899 65.5697 42.2812 57.4062 42.2812C49.2428 42.2812 42.625 48.899 42.625 57.0625C42.625 65.226 49.2428 71.8438 57.4062 71.8438Z" fill="#FF6A6A"/>
|
|
70
|
+
<path opacity="0.05" fill-rule="evenodd" clip-rule="evenodd" d="M58.2981 46.4482L75.1804 63.3306L66.066 75.4091H64.0373L56.4551 67.8268L57.4611 64.6492L58.2981 46.4482Z" fill="url(#error__paint0_linear)"/>
|
|
71
|
+
<g filter="url(#error__filter1_d)">
|
|
72
|
+
<path d="M57.4062 68.0625C58.3555 68.0625 59.125 67.293 59.125 66.3438C59.125 65.3945 58.3555 64.625 57.4062 64.625C56.457 64.625 55.6875 65.3945 55.6875 66.3438C55.6875 67.293 56.457 68.0625 57.4062 68.0625Z" fill="black"/>
|
|
73
|
+
</g>
|
|
74
|
+
<path d="M57.4062 68.0625C58.3555 68.0625 59.125 67.293 59.125 66.3438C59.125 65.3945 58.3555 64.625 57.4062 64.625C56.457 64.625 55.6875 65.3945 55.6875 66.3438C55.6875 67.293 56.457 68.0625 57.4062 68.0625Z" fill="white"/>
|
|
75
|
+
<g filter="url(#error__filter2_d)">
|
|
76
|
+
<path d="M57.4062 46.0625C58.3555 46.0625 59.125 46.832 59.125 47.7812V60.1562C59.125 61.1055 58.3555 61.875 57.4062 61.875C56.457 61.875 55.6875 61.1055 55.6875 60.1562V47.7812C55.6875 46.832 56.457 46.0625 57.4062 46.0625Z" fill="black"/>
|
|
77
|
+
</g>
|
|
78
|
+
<path d="M57.4062 46.0625C58.3555 46.0625 59.125 46.832 59.125 47.7812V60.1562C59.125 61.1055 58.3555 61.875 57.4062 61.875C56.457 61.875 55.6875 61.1055 55.6875 60.1562V47.7812C55.6875 46.832 56.457 46.0625 57.4062 46.0625Z" fill="white"/>
|
|
79
|
+
</g>
|
|
80
|
+
<defs>
|
|
81
|
+
<filter id="error__filter0_d" x="36.2188" y="37.875" width="42.375" height="42.375" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
82
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
83
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
|
84
|
+
<feOffset dy="2"/>
|
|
85
|
+
<feGaussianBlur stdDeviation="2"/>
|
|
86
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
|
|
87
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
|
88
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
|
89
|
+
</filter>
|
|
90
|
+
<filter id="error__filter1_d" x="51.6875" y="62.625" width="11.4375" height="11.4375" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
91
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
92
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
|
93
|
+
<feOffset dy="2"/>
|
|
94
|
+
<feGaussianBlur stdDeviation="2"/>
|
|
95
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
|
|
96
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
|
97
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
|
98
|
+
</filter>
|
|
99
|
+
<filter id="error__filter2_d" x="51.6875" y="44.0625" width="11.4375" height="23.8125" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
100
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
101
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
|
102
|
+
<feOffset dy="2"/>
|
|
103
|
+
<feGaussianBlur stdDeviation="2"/>
|
|
104
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
|
|
105
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
|
106
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
|
107
|
+
</filter>
|
|
108
|
+
<linearGradient id="error__paint0_linear" x1="68.4379" y1="71.5709" x2="60.1189" y2="58.8006" gradientUnits="userSpaceOnUse">
|
|
109
|
+
<stop stop-opacity="0"/>
|
|
110
|
+
<stop offset="1"/>
|
|
111
|
+
</linearGradient>
|
|
112
|
+
</defs>
|
|
113
|
+
</svg>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {makeStyles} from '@mui/styles';
|
|
2
|
+
|
|
3
|
+
type ErrorContainerProps = {
|
|
4
|
+
height?: number;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const useStyles = makeStyles((theme) => ({
|
|
8
|
+
errorContainer: ({height}: ErrorContainerProps) => ({
|
|
9
|
+
height: height ? `${height}px` : 'auto',
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexDirection: 'column',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
color: 'rgba(0, 0, 0, 0.54)'
|
|
15
|
+
}),
|
|
16
|
+
errorIcon: {
|
|
17
|
+
height: '88px',
|
|
18
|
+
width: '88px',
|
|
19
|
+
marginBottom: '20px',
|
|
20
|
+
paddingTop: '36px'
|
|
21
|
+
},
|
|
22
|
+
refreshButton: {
|
|
23
|
+
color: theme.palette.primary.main,
|
|
24
|
+
marginTop: '10px'
|
|
25
|
+
},
|
|
26
|
+
refreshIcon: {
|
|
27
|
+
width: '24px',
|
|
28
|
+
height: '24px'
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, {memo} from 'react';
|
|
2
|
+
import {ReltioGridLayoutItem} from '@reltio/mdm-sdk';
|
|
3
|
+
import {ReltioGridLayout} from '@reltio/components';
|
|
4
|
+
import {DashboardView} from '../../types';
|
|
5
|
+
import {DashboardLayoutItem} from '../DashboardLayoutItem/DashboardLayoutItem';
|
|
6
|
+
import {DashboardLayoutPanel} from '../DashboardLayoutPanel/DashboardLayoutPanel';
|
|
7
|
+
import {useStyles} from './styles';
|
|
8
|
+
|
|
9
|
+
type DashboardLayoutProps = {
|
|
10
|
+
views: DashboardView[];
|
|
11
|
+
layout?: ReltioGridLayoutItem[];
|
|
12
|
+
onLayoutChanged: (layout: ReltioGridLayoutItem[]) => void;
|
|
13
|
+
openConfigPanel?: boolean;
|
|
14
|
+
onCloseConfigPanel: () => void;
|
|
15
|
+
onRemove: (id: string) => void;
|
|
16
|
+
onAdd: (id: string) => void;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const DashboardLayout = ({
|
|
20
|
+
views,
|
|
21
|
+
layout,
|
|
22
|
+
onLayoutChanged,
|
|
23
|
+
openConfigPanel = false,
|
|
24
|
+
onCloseConfigPanel,
|
|
25
|
+
onRemove,
|
|
26
|
+
onAdd
|
|
27
|
+
}: DashboardLayoutProps) => {
|
|
28
|
+
const styles = useStyles();
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className={styles.pageWrapper} data-reltio-id="reltio-dashboard-layout">
|
|
32
|
+
<div className={styles.content}>
|
|
33
|
+
<div className={styles.mainPanel} data-reltio-id="reltio-dashboard-grid">
|
|
34
|
+
<ReltioGridLayout
|
|
35
|
+
LayoutItem={DashboardLayoutItem}
|
|
36
|
+
views={views}
|
|
37
|
+
layout={layout}
|
|
38
|
+
onLayoutChanged={onLayoutChanged}
|
|
39
|
+
onRemove={onRemove}
|
|
40
|
+
draggableHandle=".viewDraggableHandle"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
{openConfigPanel && (
|
|
44
|
+
<div className={styles.rightPanel}>
|
|
45
|
+
<DashboardLayoutPanel
|
|
46
|
+
views={views}
|
|
47
|
+
layout={layout}
|
|
48
|
+
onAdd={onAdd}
|
|
49
|
+
onRemove={onRemove}
|
|
50
|
+
onClose={onCloseConfigPanel}
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
)}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default memo(DashboardLayout);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {shallow, mount} from 'enzyme';
|
|
3
|
+
import {ViewStatus} from '../../../types';
|
|
4
|
+
import DashboardLayout from '../DashboardLayout';
|
|
5
|
+
import DashboardConfigItem from '../../DashboardConfigItem/DashboardConfigItem';
|
|
6
|
+
import {ReltioGridLayout} from '@reltio/components';
|
|
7
|
+
import * as reactRedux from 'react-redux';
|
|
8
|
+
|
|
9
|
+
describe('DashboardLayout tests', () => {
|
|
10
|
+
const onLayoutChangedSpy = jest.fn();
|
|
11
|
+
const onAddSpy = jest.fn();
|
|
12
|
+
const onRemoveSpy = jest.fn();
|
|
13
|
+
const defaultProps = {
|
|
14
|
+
views: [
|
|
15
|
+
{config: {id: 'view1', title: 'title1', component: 'Component'}, status: ViewStatus.PERSISTED},
|
|
16
|
+
{config: {id: 'view2', title: 'title2', component: 'Component'}, status: ViewStatus.PERSISTED},
|
|
17
|
+
{config: {id: 'view3', title: 'title3', component: 'Component'}, status: ViewStatus.PERSISTED}
|
|
18
|
+
],
|
|
19
|
+
layout: [
|
|
20
|
+
{id: 'view1', height: 1, x: 0, y: 0, width: 1},
|
|
21
|
+
{id: 'view2', height: 1, x: 0, y: 1, width: 1}
|
|
22
|
+
],
|
|
23
|
+
openConfigPanel: false,
|
|
24
|
+
onLayoutChanged: onLayoutChangedSpy,
|
|
25
|
+
onAdd: onAddSpy,
|
|
26
|
+
onRemove: onRemoveSpy,
|
|
27
|
+
onCloseConfigPanel: jest.fn()
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
it('should render DashboardLayout', () => {
|
|
31
|
+
const wrapper = shallow(<DashboardLayout {...defaultProps} />);
|
|
32
|
+
const grid = wrapper.find(ReltioGridLayout);
|
|
33
|
+
expect(grid.length).toBe(1);
|
|
34
|
+
expect(grid.prop('views')).toEqual(defaultProps.views);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('should render configuration panel if openConfigPanel is true', () => {
|
|
38
|
+
const wrapper = shallow(<DashboardLayout {...defaultProps} />);
|
|
39
|
+
expect(wrapper.find('DashboardLayoutPanel')).toHaveLength(0);
|
|
40
|
+
wrapper.setProps({openConfigPanel: true});
|
|
41
|
+
expect(wrapper.find('DashboardLayoutPanel')).toHaveLength(1);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('should proper adding and removing a view', () => {
|
|
45
|
+
jest.spyOn(reactRedux, 'useSelector').mockImplementation((selector) => selector({}));
|
|
46
|
+
|
|
47
|
+
const wrapper = mount(<DashboardLayout {...defaultProps} />);
|
|
48
|
+
wrapper.setProps({openConfigPanel: true});
|
|
49
|
+
wrapper.find(DashboardConfigItem).at(2).find('BasicView').simulate('mouseenter');
|
|
50
|
+
wrapper.find(DashboardConfigItem).at(2).find('button').simulate('click');
|
|
51
|
+
expect(onAddSpy).toHaveBeenCalledWith(defaultProps.views[2].config.id);
|
|
52
|
+
wrapper.find(DashboardConfigItem).at(1).find('BasicView').simulate('mouseenter');
|
|
53
|
+
wrapper.find(DashboardConfigItem).at(1).find('button').simulate('click');
|
|
54
|
+
expect(onRemoveSpy).toHaveBeenCalledWith(defaultProps.views[1].config.id);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {makeStyles} from '@mui/styles';
|
|
2
|
+
|
|
3
|
+
const configWidth = 490;
|
|
4
|
+
|
|
5
|
+
export const useStyles = makeStyles({
|
|
6
|
+
pageWrapper: {
|
|
7
|
+
height: '100%',
|
|
8
|
+
overflow: 'hidden',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column'
|
|
11
|
+
},
|
|
12
|
+
content: {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
height: '100%'
|
|
16
|
+
},
|
|
17
|
+
rightPanel: {
|
|
18
|
+
overflowY: 'auto',
|
|
19
|
+
backgroundColor: '#FFF',
|
|
20
|
+
borderLeft: 'solid 1px rgba(0, 0, 0, 0.12)',
|
|
21
|
+
width: `${configWidth}px`,
|
|
22
|
+
minWidth: `${configWidth}px`,
|
|
23
|
+
maxWidth: `${configWidth}px`
|
|
24
|
+
},
|
|
25
|
+
mainPanel: {
|
|
26
|
+
flex: '1 1 auto',
|
|
27
|
+
overflow: 'auto',
|
|
28
|
+
backgroundColor: '#F9F9F9'
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import ViewsFactory from '../../views/ViewsFactory';
|
|
4
|
+
import {ReactGridLayoutItem} from '@reltio/components';
|
|
5
|
+
import {useSelector} from 'react-redux';
|
|
6
|
+
import {DashboardView, ViewStatus} from '../../types';
|
|
7
|
+
import mdmModule from '@reltio/mdm-module';
|
|
8
|
+
import {useStyles} from './styles';
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
className?: string;
|
|
12
|
+
isFullscreen: boolean;
|
|
13
|
+
style: React.CSSProperties;
|
|
14
|
+
onRemove: (id: string) => void;
|
|
15
|
+
onToggleFullscreen: (id: string) => void;
|
|
16
|
+
views: DashboardView[];
|
|
17
|
+
layoutItemConfig: ReactGridLayoutItem;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const DashboardLayoutItem = ({
|
|
22
|
+
layoutItemConfig,
|
|
23
|
+
views,
|
|
24
|
+
onToggleFullscreen,
|
|
25
|
+
onRemove,
|
|
26
|
+
isFullscreen,
|
|
27
|
+
children: ResizeComponent,
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
}: Props) => {
|
|
31
|
+
const styles = useStyles();
|
|
32
|
+
const view = views.find(({config}) => layoutItemConfig.i === config.id);
|
|
33
|
+
const isWorkflowEnabled = useSelector(mdmModule.selectors.isWorkflowEnabled);
|
|
34
|
+
if (!view) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const {config, status} = view;
|
|
38
|
+
const isUpdated = status === ViewStatus.UPDATED;
|
|
39
|
+
const isNotificationView = config.component === ViewsFactory.ViewTypes.NotificationInboxFacet;
|
|
40
|
+
if (isNotificationView && !isWorkflowEnabled) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div data-reltio-id="reltio-dashboard-layout-item" className={classnames(styles.item, className)} {...props}>
|
|
46
|
+
<div className={styles.overflowContainer}>
|
|
47
|
+
{ViewsFactory.getComponent({
|
|
48
|
+
type: config.component,
|
|
49
|
+
config,
|
|
50
|
+
onToggleFullscreen,
|
|
51
|
+
isUpdated,
|
|
52
|
+
isFullscreen,
|
|
53
|
+
onRemove
|
|
54
|
+
})}
|
|
55
|
+
{ResizeComponent}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {Provider} from 'react-redux';
|
|
3
|
+
import {ViewStatus} from '../../../types';
|
|
4
|
+
import {ChartTypes, getFacets, getTasksForTenant} from '@reltio/mdm-sdk';
|
|
5
|
+
import {render, screen, waitForElementToBeRemoved} from '@testing-library/react';
|
|
6
|
+
import userEvent from '@testing-library/user-event';
|
|
7
|
+
import {createTestStore} from '../../../../../../__mocks__/store-utils';
|
|
8
|
+
import ViewsFactory from '../../../views/ViewsFactory';
|
|
9
|
+
import {DashboardLayoutItem} from '../DashboardLayoutItem';
|
|
10
|
+
|
|
11
|
+
const createInitialState = ({tenant = 'tenant', workflow = {}} = {}) => ({
|
|
12
|
+
metadata: {
|
|
13
|
+
[tenant]: {
|
|
14
|
+
entityTypes: [
|
|
15
|
+
{
|
|
16
|
+
uri: 'configuration/entityTypes/HCP',
|
|
17
|
+
label: 'HCP',
|
|
18
|
+
attributes: [],
|
|
19
|
+
abstract: false,
|
|
20
|
+
businessCardAttributeURIs: []
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
ui: {
|
|
26
|
+
newConfig: {
|
|
27
|
+
properties: {workflow}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
tenant: {id: tenant}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
jest.mock('@reltio/mdm-sdk', () => ({
|
|
34
|
+
...jest.requireActual<Record<string, unknown>>('@reltio/mdm-sdk'),
|
|
35
|
+
getFacets: jest.fn(),
|
|
36
|
+
getTasksForTenant: jest.fn()
|
|
37
|
+
}));
|
|
38
|
+
|
|
39
|
+
describe('DashboardLayoutItems tests', () => {
|
|
40
|
+
const config = {
|
|
41
|
+
id: 'ViewID',
|
|
42
|
+
component: ViewsFactory.ViewTypes.EntitiesByTypeViewFacet,
|
|
43
|
+
chartType: ChartTypes.BAR,
|
|
44
|
+
title: 'Facet'
|
|
45
|
+
};
|
|
46
|
+
const views = [{config, status: ViewStatus.PERSISTED}];
|
|
47
|
+
const layoutItemConfig = {i: 'ViewID', x: 0, y: 0, w: 100, h: 100};
|
|
48
|
+
const emptyResponse = {data: [], total: 0};
|
|
49
|
+
const initialProps = {
|
|
50
|
+
children: <div data-reltio-id="resize-component" />,
|
|
51
|
+
views,
|
|
52
|
+
layoutItemConfig,
|
|
53
|
+
style: {},
|
|
54
|
+
isFullscreen: false,
|
|
55
|
+
onRemove: jest.fn(),
|
|
56
|
+
onToggleFullscreen: jest.fn()
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
beforeAll(() => {
|
|
60
|
+
(getTasksForTenant as jest.Mock).mockResolvedValue(emptyResponse);
|
|
61
|
+
(getFacets as jest.Mock).mockResolvedValue(emptyResponse);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const setUp = ({initialState = createInitialState(), props = {}} = {}) => {
|
|
65
|
+
const user = userEvent.setup();
|
|
66
|
+
const store = createTestStore(initialState);
|
|
67
|
+
const Providers = ({children}: {children: React.ReactNode}) => <Provider store={store}>{children}</Provider>;
|
|
68
|
+
return {user, ...render(<DashboardLayoutItem {...initialProps} {...props} />, {wrapper: Providers})};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
it('should create layout item based on config', async () => {
|
|
72
|
+
setUp();
|
|
73
|
+
await waitForElementToBeRemoved(screen.queryByTestId('dashboard-item-loader'));
|
|
74
|
+
expect(screen.getByText(views[0].config.title)).toBeInTheDocument();
|
|
75
|
+
expect(screen.getByRole('button')).toBeInTheDocument();
|
|
76
|
+
expect(screen.queryByText('Updated')).not.toBeInTheDocument();
|
|
77
|
+
expect(screen.getByTestId('resize-component')).toBeInTheDocument();
|
|
78
|
+
expect(screen.getByTestId(`layout-item-${views[0].config.id}`)).toBeInTheDocument();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('should not render if view is not found', () => {
|
|
82
|
+
const props = {views: []};
|
|
83
|
+
const {container} = setUp({props});
|
|
84
|
+
expect(container).toBeEmptyDOMElement();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('should pass styles correctly', async () => {
|
|
88
|
+
const props = {style: {backgroundColor: 'red'}};
|
|
89
|
+
setUp({props});
|
|
90
|
+
await waitForElementToBeRemoved(screen.queryByTestId('dashboard-item-loader'));
|
|
91
|
+
expect(screen.getByTestId('reltio-dashboard-layout-item')).toHaveStyle('backgroundColor: red');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it('should pass onRemove prop correctly', async () => {
|
|
95
|
+
const props = {onRemove: jest.fn()};
|
|
96
|
+
const {user} = setUp({props});
|
|
97
|
+
await waitForElementToBeRemoved(screen.queryByTestId('dashboard-item-loader'));
|
|
98
|
+
await user.click(screen.getByRole('button'));
|
|
99
|
+
await user.click(screen.getByText('Remove'));
|
|
100
|
+
expect(props.onRemove).toBeCalledWith(views[0].config.id);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('should pass isFullscreen and onToggleFullscreen prop correctly', async () => {
|
|
104
|
+
const props = {onToggleFullscreen: jest.fn(), isFullscreen: true};
|
|
105
|
+
const {user} = setUp({props});
|
|
106
|
+
await waitForElementToBeRemoved(screen.queryByTestId('dashboard-item-loader'));
|
|
107
|
+
await user.click(screen.getByRole('button'));
|
|
108
|
+
await user.click(screen.getByText('Exit fullscreen'));
|
|
109
|
+
expect(props.onToggleFullscreen).toBeCalledWith(views[0].config.id);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('should pass isUpdated prop correctly', async () => {
|
|
113
|
+
const props = {views: [{...views[0], status: ViewStatus.UPDATED}]};
|
|
114
|
+
setUp({props});
|
|
115
|
+
await waitForElementToBeRemoved(screen.queryByTestId('dashboard-item-loader'));
|
|
116
|
+
expect(screen.getByText('Updated')).toBeInTheDocument();
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
describe('notifications inbox facet', () => {
|
|
120
|
+
const config = {
|
|
121
|
+
id: 'ViewID',
|
|
122
|
+
title: 'test',
|
|
123
|
+
component: ViewsFactory.ViewTypes.NotificationInboxFacet,
|
|
124
|
+
config: 'config'
|
|
125
|
+
};
|
|
126
|
+
const props = {views: [{config, status: ViewStatus.PERSISTED}]};
|
|
127
|
+
|
|
128
|
+
it('should not render notifications inbox facet if workflow is disabled', () => {
|
|
129
|
+
const {container} = setUp({props});
|
|
130
|
+
expect(container).toBeEmptyDOMElement();
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it('should render notifications inbox facet if workflow is enabled', async () => {
|
|
134
|
+
const initialState = createInitialState({
|
|
135
|
+
workflow: {
|
|
136
|
+
path: 'newWorkflowPath',
|
|
137
|
+
enabled: true
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
setUp({props, initialState});
|
|
141
|
+
await waitForElementToBeRemoved(screen.queryByTestId('dashboard-item-loader'));
|
|
142
|
+
expect(screen.getByTestId(`layout-item-${config.id}`)).toBeInTheDocument();
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
});
|