@reltio/components 1.4.2262 → 1.4.2264
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/AttributeVerificationStatus/helpers.js +4 -4
- package/BarChart/BarChart.js +3 -1
- package/BarChart/helpers.d.ts +1 -1
- package/BarChart/helpers.js +2 -2
- package/CollaborationItem/components/RepliedComment/styles.js +2 -1
- package/CollaborationItem/components/SendMessageArea/styles.js +4 -3
- package/EmptyState/EmptyState.js +1 -1
- package/EmptyState/styles.d.ts +1 -1
- package/EmptyState/styles.js +3 -0
- package/FileDropZone/FileDropZone.module.css.js +1 -1
- package/ImageActionsOverlay/styles.js +3 -2
- package/ImageAttributesLineEditor/styles.js +2 -2
- package/ReltioMap/components/EntityMarker/EntityMarker.js +8 -4
- package/ReltioMap/components/EntityMarker/EntityMarker.spec.js +10 -5
- package/ReltioMap/components/EntityMarker/icons/marker-hover.inline.svg.d.ts +1 -1
- package/ReltioMap/components/EntityMarker/icons/marker-hover.inline.svg.js +1 -1
- package/ReltioMap/components/EntityMarker/icons/marker.inline.svg.d.ts +1 -1
- package/ReltioMap/components/EntityMarker/icons/marker.inline.svg.js +1 -1
- package/ResizablePanes/styles.js +4 -3
- package/SidePanelEmptyState/styles.d.ts +1 -1
- package/SidePanelEmptyState/styles.js +2 -1
- package/TableWithBars/components/NumberCellValueRenderer/styles.js +1 -1
- package/UploadImageDialog/components/TargetBox/TargetBox.module.css.js +1 -1
- package/cjs/AttributeVerificationStatus/helpers.js +8 -8
- package/cjs/BarChart/BarChart.js +3 -1
- package/cjs/BarChart/helpers.d.ts +1 -1
- package/cjs/BarChart/helpers.js +2 -2
- package/cjs/CollaborationItem/components/RepliedComment/styles.js +2 -1
- package/cjs/CollaborationItem/components/SendMessageArea/styles.js +4 -3
- package/cjs/EmptyState/EmptyState.js +1 -1
- package/cjs/EmptyState/styles.d.ts +1 -1
- package/cjs/EmptyState/styles.js +3 -0
- package/cjs/FileDropZone/FileDropZone.module.css.js +1 -1
- package/cjs/ImageActionsOverlay/styles.js +3 -2
- package/cjs/ImageAttributesLineEditor/styles.js +2 -2
- package/cjs/ReltioMap/components/EntityMarker/EntityMarker.js +8 -4
- package/cjs/ReltioMap/components/EntityMarker/EntityMarker.spec.js +8 -3
- package/cjs/ReltioMap/components/EntityMarker/icons/marker-hover.inline.svg.d.ts +1 -1
- package/cjs/ReltioMap/components/EntityMarker/icons/marker-hover.inline.svg.js +3 -2
- package/cjs/ReltioMap/components/EntityMarker/icons/marker.inline.svg.d.ts +1 -1
- package/cjs/ReltioMap/components/EntityMarker/icons/marker.inline.svg.js +3 -2
- package/cjs/ResizablePanes/styles.js +4 -3
- package/cjs/SidePanelEmptyState/styles.d.ts +1 -1
- package/cjs/SidePanelEmptyState/styles.js +2 -1
- package/cjs/TableWithBars/components/NumberCellValueRenderer/styles.js +1 -1
- package/cjs/UploadImageDialog/components/TargetBox/TargetBox.module.css.js +1 -1
- package/cjs/constants/theme.js +6 -5
- package/cjs/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.js +4 -2
- package/cjs/features/graph/rendering/canvas/nodeArc.js +4 -2
- package/cjs/features/workflow/ChangeRequestEditor/components/EditorStatusChip/EditorStatusChip.module.css.js +1 -1
- package/cjs/features/workflow/ReviewDCRButton/ReviewDCRButton.js +2 -2
- package/cjs/icons/AttributesList.js +1 -1
- package/cjs/icons/EmptyLoading.js +1 -1
- package/cjs/icons/NoActivations.js +13 -13
- package/cjs/icons/NoData.js +2 -2
- package/cjs/icons/NoLogs.js +1 -1
- package/cjs/icons/RequestSummary.js +4 -4
- package/cjs/icons/ReviewDcr.d.ts +3 -0
- package/cjs/icons/ReviewDcr.js +22 -0
- package/cjs/icons/SelectAttributes.js +1 -1
- package/cjs/icons/SuggestedChanges.js +6 -6
- package/cjs/icons/UploadIcon.js +1 -1
- package/cjs/icons/VerificationInvalid.d.ts +3 -0
- package/cjs/icons/{VerificationOutdatedIcon.js → VerificationInvalid.js} +4 -4
- package/cjs/icons/VerificationMaybe.d.ts +3 -0
- package/cjs/icons/VerificationMaybe.js +22 -0
- package/cjs/icons/VerificationOutdated.d.ts +3 -0
- package/cjs/icons/{VerificationValidIcon.js → VerificationOutdated.js} +4 -4
- package/cjs/icons/VerificationValid.d.ts +3 -0
- package/cjs/icons/VerificationValid.js +22 -0
- package/cjs/icons/index.d.ts +12 -3
- package/cjs/icons/index.js +26 -8
- package/constants/theme.js +6 -5
- package/features/graph/DataModelGraph/hooks/useEdgeLabelsRenderer.js +4 -2
- package/features/graph/rendering/canvas/nodeArc.js +4 -2
- package/features/workflow/ChangeRequestEditor/components/EditorStatusChip/EditorStatusChip.module.css.js +1 -1
- package/features/workflow/ReviewDCRButton/ReviewDCRButton.js +1 -1
- package/icons/AttributesList.js +1 -1
- package/icons/EmptyLoading.js +1 -1
- package/icons/NoActivations.js +13 -13
- package/icons/NoData.js +2 -2
- package/icons/NoLogs.js +1 -1
- package/icons/RequestSummary.js +4 -4
- package/icons/ReviewDcr.d.ts +3 -0
- package/icons/ReviewDcr.js +17 -0
- package/icons/SelectAttributes.js +1 -1
- package/icons/SuggestedChanges.js +6 -6
- package/icons/UploadIcon.js +1 -1
- package/icons/VerificationInvalid.d.ts +3 -0
- package/icons/VerificationInvalid.js +17 -0
- package/icons/VerificationMaybe.d.ts +3 -0
- package/icons/VerificationMaybe.js +17 -0
- package/icons/VerificationOutdated.d.ts +3 -0
- package/icons/VerificationOutdated.js +17 -0
- package/icons/VerificationValid.d.ts +3 -0
- package/icons/VerificationValid.js +17 -0
- package/icons/index.d.ts +12 -3
- package/icons/index.js +12 -3
- package/package.json +2 -2
- package/cjs/icons/ReviewDCR.d.ts +0 -3
- package/cjs/icons/ReviewDCR.js +0 -22
- package/cjs/icons/VerificationInvalidIcon.d.ts +0 -3
- package/cjs/icons/VerificationInvalidIcon.js +0 -22
- package/cjs/icons/VerificationMaybeIcon.d.ts +0 -3
- package/cjs/icons/VerificationMaybeIcon.js +0 -22
- package/cjs/icons/VerificationOutdatedIcon.d.ts +0 -3
- package/cjs/icons/VerificationValidIcon.d.ts +0 -3
- package/icons/ReviewDCR.d.ts +0 -3
- package/icons/ReviewDCR.js +0 -17
- package/icons/VerificationInvalidIcon.d.ts +0 -3
- package/icons/VerificationInvalidIcon.js +0 -17
- package/icons/VerificationMaybeIcon.d.ts +0 -3
- package/icons/VerificationMaybeIcon.js +0 -17
- package/icons/VerificationOutdatedIcon.d.ts +0 -3
- package/icons/VerificationOutdatedIcon.js +0 -17
- package/icons/VerificationValidIcon.d.ts +0 -3
- package/icons/VerificationValidIcon.js +0 -17
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import i18n from 'ui-i18n';
|
|
2
2
|
import { InputVerificationAttribute } from '@reltio/mdm-sdk';
|
|
3
3
|
import { EmptyStub } from '../EmptyStub';
|
|
4
|
-
import VerificationInvalidIcon from '../icons/
|
|
5
|
-
import VerificationValidIcon from '../icons/
|
|
6
|
-
import VerificationOutdatedIcon from '../icons/
|
|
7
|
-
import VerificationMaybeIcon from '../icons/
|
|
4
|
+
import VerificationInvalidIcon from '../icons/VerificationInvalid';
|
|
5
|
+
import VerificationValidIcon from '../icons/VerificationValid';
|
|
6
|
+
import VerificationOutdatedIcon from '../icons/VerificationOutdated';
|
|
7
|
+
import VerificationMaybeIcon from '../icons/VerificationMaybe';
|
|
8
8
|
import { VerificationStatus } from '../contexts/AttributesVerificationContext/helpers';
|
|
9
9
|
export var getIconByVerificationStatus = function (verificationStatus) {
|
|
10
10
|
switch (verificationStatus) {
|
package/BarChart/BarChart.js
CHANGED
|
@@ -21,6 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React from 'react';
|
|
24
|
+
import { useTheme } from '@mui/material/styles';
|
|
24
25
|
import { Bar, Rectangle, BarChart as BarChartWidget, CartesianGrid, Tooltip, XAxis, YAxis } from 'recharts';
|
|
25
26
|
import { ChartTooltip } from '../ChartTooltip';
|
|
26
27
|
import { useClickableChartStyle } from '../hooks/useClickableChartStyle';
|
|
@@ -28,7 +29,8 @@ import { useDynamicYAxisWidth } from '../hooks/useDynamicYAxisWidth';
|
|
|
28
29
|
import { getBarChartSettings } from './helpers';
|
|
29
30
|
export var BarChart = function (_a) {
|
|
30
31
|
var width = _a.width, height = _a.height, data = _a.data, _b = _a.options, options = _b === void 0 ? {} : _b, onItemClick = _a.onItemClick;
|
|
31
|
-
var
|
|
32
|
+
var theme = useTheme();
|
|
33
|
+
var _c = getBarChartSettings(options, theme.palette.primary.main), barChart = _c.barChart, cartesianGrid = _c.cartesianGrid, bar = _c.bar, tooltip = _c.tooltip, xAxis = _c.xAxis, yAxis = _c.yAxis;
|
|
32
34
|
var _d = useDynamicYAxisWidth({ chartYAxisProps: yAxis }), chartRef = _d.chartRef, dynamicYAxisWidth = __rest(_d, ["chartRef"]);
|
|
33
35
|
var onBarClick = onItemClick && (function (_a) {
|
|
34
36
|
var group = _a.group;
|
package/BarChart/helpers.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ type BarChartSettings = {
|
|
|
9
9
|
cartesianGrid: Omit<CartesianGridProps, 'ref'>;
|
|
10
10
|
tooltip: TooltipProps<number, string>;
|
|
11
11
|
};
|
|
12
|
-
export declare const getBarChartSettings: ({ margin, isHorizontal, isLabelRotated }: BarChartOptions) => BarChartSettings;
|
|
12
|
+
export declare const getBarChartSettings: ({ margin, isHorizontal, isLabelRotated }: BarChartOptions, barColor: string) => BarChartSettings;
|
|
13
13
|
export {};
|
package/BarChart/helpers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { formatNumberAsMetric } from '@reltio/mdm-sdk';
|
|
2
|
-
export var getBarChartSettings = function (_a) {
|
|
2
|
+
export var getBarChartSettings = function (_a, barColor) {
|
|
3
3
|
var margin = _a.margin, isHorizontal = _a.isHorizontal, isLabelRotated = _a.isLabelRotated;
|
|
4
4
|
return {
|
|
5
5
|
barChart: {
|
|
@@ -9,7 +9,7 @@ export var getBarChartSettings = function (_a) {
|
|
|
9
9
|
},
|
|
10
10
|
bar: {
|
|
11
11
|
dataKey: 'value',
|
|
12
|
-
fill:
|
|
12
|
+
fill: barColor
|
|
13
13
|
},
|
|
14
14
|
xAxis: {
|
|
15
15
|
type: isHorizontal ? 'number' : 'category',
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
|
+
import { alpha } from '@mui/material/styles';
|
|
2
3
|
export var useStyles = makeStyles(function (theme) { return ({
|
|
3
4
|
root: {
|
|
4
5
|
display: 'flex',
|
|
5
6
|
padding: '8px',
|
|
6
7
|
borderRadius: '4px',
|
|
7
|
-
backgroundColor:
|
|
8
|
+
backgroundColor: alpha(theme.palette.primary.main, 0.06)
|
|
8
9
|
},
|
|
9
10
|
avatar: {
|
|
10
11
|
marginRight: '8px'
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
|
-
|
|
2
|
+
import { alpha } from '@mui/material/styles';
|
|
3
|
+
export var useStyles = makeStyles(function (theme) { return ({
|
|
3
4
|
root: function (_a) {
|
|
4
5
|
var isEditing = _a.isEditing;
|
|
5
6
|
return ({
|
|
6
7
|
padding: isEditing ? '6px 6px 6px 0' : ' 6px 6px 6px 8px',
|
|
7
8
|
borderRadius: '4px',
|
|
8
|
-
backgroundColor: isEditing ? 'transparent' :
|
|
9
|
+
backgroundColor: isEditing ? 'transparent' : alpha(theme.palette.primary.main, 0.06)
|
|
9
10
|
});
|
|
10
11
|
},
|
|
11
12
|
textField: function (_a) {
|
|
@@ -33,4 +34,4 @@ export var useStyles = makeStyles({
|
|
|
33
34
|
marginLeft: '8px'
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
});
|
|
37
|
+
}); });
|
package/EmptyState/EmptyState.js
CHANGED
|
@@ -31,7 +31,7 @@ export var EmptyState = function (_a) {
|
|
|
31
31
|
var styles = useStyles();
|
|
32
32
|
var showButton = access && buttonTitle;
|
|
33
33
|
return (React.createElement("div", { className: classnames(styles.root, styles["root_".concat(variant)]) },
|
|
34
|
-
React.createElement(LogoRenderer, { className: styles[
|
|
34
|
+
React.createElement(LogoRenderer, { className: classnames(styles.logo, styles[variant]) }),
|
|
35
35
|
React.createElement("div", { className: styles.textBox },
|
|
36
36
|
React.createElement(Typography, { variant: "h5", classes: { h5: styles.text } }, text),
|
|
37
37
|
secondaryText && (React.createElement(Typography, { variant: "subtitle1", classes: { subtitle1: styles.secondaryText } }, secondaryText))),
|
package/EmptyState/styles.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"button" | "text" | "small" | "root" | "embedded" | "root_small" | "full" | "textBox" | "secondaryText">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"button" | "text" | "small" | "root" | "embedded" | "root_small" | "logo" | "full" | "textBox" | "secondaryText">;
|
package/EmptyState/styles.js
CHANGED
|
@@ -3,7 +3,7 @@ if (typeof document !== 'undefined') {
|
|
|
3
3
|
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
4
|
const style = document.createElement('style');
|
|
5
5
|
style.type = 'text/css'
|
|
6
|
-
style.innerHTML = `.FileDropZone-root--9QbaV{cursor:pointer}.FileDropZone-active--FUwfs{background-color:
|
|
6
|
+
style.innerHTML = `.FileDropZone-root--9QbaV{cursor:pointer}.FileDropZone-active--FUwfs{background-color:color-mix(in srgb,var(--mui-palette-primary-main) 12%,transparent)}`;
|
|
7
7
|
head.appendChild(style);
|
|
8
8
|
}
|
|
9
9
|
export default styles;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
|
-
|
|
2
|
+
import { alpha } from '@mui/material/styles';
|
|
3
|
+
export var useStyles = makeStyles(function (theme) { return ({
|
|
3
4
|
overlay: {
|
|
4
5
|
position: 'absolute',
|
|
5
6
|
top: 0,
|
|
@@ -16,7 +17,7 @@ export var useStyles = makeStyles(function () { return ({
|
|
|
16
17
|
userSelect: 'none'
|
|
17
18
|
},
|
|
18
19
|
selected: {
|
|
19
|
-
backgroundColor:
|
|
20
|
+
backgroundColor: alpha(theme.palette.primary.main, 0.6)
|
|
20
21
|
},
|
|
21
22
|
selectionMode: {
|
|
22
23
|
cursor: 'pointer',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
|
-
export var useStyles = makeStyles(function () { return ({
|
|
2
|
+
export var useStyles = makeStyles(function (theme) { return ({
|
|
3
3
|
root: {
|
|
4
4
|
width: '100%'
|
|
5
5
|
},
|
|
@@ -20,7 +20,7 @@ export var useStyles = makeStyles(function () { return ({
|
|
|
20
20
|
width: imageWidth,
|
|
21
21
|
height: imageHeight,
|
|
22
22
|
cursor: 'pointer',
|
|
23
|
-
border:
|
|
23
|
+
border: "1px dashed ".concat(theme.palette.primary.main),
|
|
24
24
|
boxSizing: 'border-box',
|
|
25
25
|
marginRight: imageMargin,
|
|
26
26
|
display: 'flex',
|
|
@@ -23,26 +23,30 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import React, { memo, useCallback, useContext, useState, useRef, useMemo } from 'react';
|
|
24
24
|
import { pathEq } from 'ramda';
|
|
25
25
|
import { AdvancedMarker } from '@vis.gl/react-google-maps';
|
|
26
|
+
import { lighten, useTheme } from '@mui/material/styles';
|
|
26
27
|
import { ProfileCard } from '../../../ProfileCard';
|
|
27
28
|
import { Popper } from '../../../Popper';
|
|
28
29
|
import { debounce, svg2Url } from '@reltio/mdm-sdk';
|
|
29
30
|
import { EntityMarkerContext } from '../../../contexts/EntityMarkerContext';
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
31
|
+
import { createMarker } from './icons/marker.inline.svg';
|
|
32
|
+
import { createHoveredMarker } from './icons/marker-hover.inline.svg';
|
|
32
33
|
import { useStyles } from './styles';
|
|
33
34
|
var HIDE_DEBOUNCE_INTERVAL = 50;
|
|
34
35
|
var MARKER_HEIGHT = 32;
|
|
35
36
|
var MARKER_CARD_MARGIN = 8;
|
|
36
|
-
var
|
|
37
|
-
var markerIcon = svg2Url(MARKER);
|
|
37
|
+
var MARKER_LIGHTEN = 0.3;
|
|
38
38
|
var EntityMarker = function (_a) {
|
|
39
39
|
var _b;
|
|
40
40
|
var marker = _a.marker, onClick = _a.onClick, clusterer = _a.clusterer, disabled = _a.disabled, otherProps = __rest(_a, ["marker", "onClick", "clusterer", "disabled"]);
|
|
41
41
|
var styles = useStyles();
|
|
42
|
+
var theme = useTheme();
|
|
42
43
|
var _c = useState(false), hovered = _c[0], setHovered = _c[1];
|
|
43
44
|
var activeEntityUri = useContext(EntityMarkerContext).activeEntityUri;
|
|
44
45
|
var isActive = pathEq(['entity', 'uri'], activeEntityUri, marker);
|
|
45
46
|
var position = useMemo(function () { return ({ lat: marker.point.lat, lng: marker.point.lng }); }, [marker.point]);
|
|
47
|
+
var markerColor = useMemo(function () { return lighten(theme.palette.primary.main, MARKER_LIGHTEN); }, [theme.palette.primary.main]);
|
|
48
|
+
var markerIcon = useMemo(function () { return svg2Url(createMarker(markerColor)); }, [markerColor]);
|
|
49
|
+
var hoveredMarkerIcon = useMemo(function () { return svg2Url(createHoveredMarker(markerColor)); }, [markerColor]);
|
|
46
50
|
var setHoveredDebounced = useCallback(debounce(setHovered, HIDE_DEBOUNCE_INTERVAL), []);
|
|
47
51
|
var onMouseOver = useCallback(function () { return setHoveredDebounced(true); }, [setHoveredDebounced]);
|
|
48
52
|
var onMouseOut = useCallback(function () { return setHoveredDebounced(false); }, [setHoveredDebounced]);
|
|
@@ -48,13 +48,16 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
import React from 'react';
|
|
49
49
|
import { render, screen } from '@testing-library/react';
|
|
50
50
|
import userEvent from '@testing-library/user-event';
|
|
51
|
+
import { createTheme, lighten, ThemeProvider } from '@mui/material/styles';
|
|
51
52
|
import { svg2Url } from '@reltio/mdm-sdk';
|
|
53
|
+
import { theme as reltioTheme } from '../../../constants';
|
|
52
54
|
import EntityMarker from './EntityMarker';
|
|
53
55
|
import { EntityMarkerContext } from '../../../contexts/EntityMarkerContext';
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
+
import { createHoveredMarker } from './icons/marker-hover.inline.svg';
|
|
57
|
+
import { createMarker } from './icons/marker.inline.svg';
|
|
56
58
|
import { MdmModuleProvider } from '../../../contexts/MdmModuleContext';
|
|
57
59
|
jest.mock('@reltio/mdm-sdk', function () { return (__assign(__assign({}, jest.requireActual('@reltio/mdm-sdk')), { debounce: jest.fn(function (fn, _delay) { return jest.requireActual('@reltio/mdm-sdk').debounce(fn, 0); }) })); });
|
|
60
|
+
var muiTheme = createTheme(reltioTheme);
|
|
58
61
|
jest.mock('@vis.gl/react-google-maps', function () {
|
|
59
62
|
// The only reason why all the mock stuff inlcuding 'requre' inside the jest.mock is that
|
|
60
63
|
// mocks with forwardRef doesn't work outside (in beforeEach/beforeAll)
|
|
@@ -73,8 +76,9 @@ jest.mock('@vis.gl/react-google-maps', function () {
|
|
|
73
76
|
AdvancedMarker.displayName = 'AdvancedMarker';
|
|
74
77
|
return __assign(__assign({}, jest.requireActual('@vis.gl/react-google-maps')), { AdvancedMarker: AdvancedMarker });
|
|
75
78
|
});
|
|
76
|
-
var
|
|
77
|
-
var
|
|
79
|
+
var markerColor = lighten(muiTheme.palette.primary.main, 0.3);
|
|
80
|
+
var hoveredMarkerIcon = svg2Url(createHoveredMarker(markerColor));
|
|
81
|
+
var markerIcon = svg2Url(createMarker(markerColor));
|
|
78
82
|
describe('EntityMarker', function () {
|
|
79
83
|
var mockMarker = {
|
|
80
84
|
id: 'someId',
|
|
@@ -90,7 +94,8 @@ describe('EntityMarker', function () {
|
|
|
90
94
|
if (contextValue === void 0) { contextValue = {}; }
|
|
91
95
|
var Providers = function (_a) {
|
|
92
96
|
var children = _a.children;
|
|
93
|
-
return (React.createElement(
|
|
97
|
+
return (React.createElement(ThemeProvider, { theme: muiTheme },
|
|
98
|
+
React.createElement(MdmModuleProvider, { values: { metadata: metadata } }, children)));
|
|
94
99
|
};
|
|
95
100
|
return render(React.createElement(EntityMarkerContext.Provider, { value: contextValue },
|
|
96
101
|
React.createElement(EntityMarker, __assign({}, props))), { wrapper: Providers });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const createHoveredMarker: (color: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var
|
|
1
|
+
export var createHoveredMarker = function (color) { return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"22px\" height=\"32px\" viewBox=\"0 0 22 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx=\"50%\" cy=\"50.2950175%\" fx=\"50%\" fy=\"50.2950175%\" r=\"49.7049825%\" gradientTransform=\"translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)\" id=\"radialGradient-1\">\n <stop stop-color=\"#000000\" offset=\"0%\"></stop>\n <stop stop-color=\"#000000\" stop-opacity=\"0\" offset=\"100%\"></stop>\n </radialGradient>\n <path d=\"M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z\" id=\"path-2\"></path>\n </defs>\n <g id=\"View-/-Map-/-Marker-/-Large-(hover)\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <ellipse id=\"Oval\" fill=\"url(#radialGradient-1)\" opacity=\"0.32\" cx=\"11\" cy=\"28.5\" rx=\"6\" ry=\"4.66666667\"></ellipse>\n <mask id=\"mask-3\" fill=\"white\">\n <use xlink:href=\"#path-2\"></use>\n </mask>\n <use id=\"Path-2\" fill=\"#FFFFFF\" xlink:href=\"#path-2\"></use>\n <rect id=\"Entity-type\" fill=\"".concat(color, "\" mask=\"url(#mask-3)\" x=\"0\" y=\"0\" width=\"22\" height=\"32\"></rect>\n <path d=\"M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z\" id=\"Path\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" mask=\"url(#mask-3)\"></path>\n </g>\n</svg>"); };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const createMarker: (color: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var
|
|
1
|
+
export var createMarker = function (color) { return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"22px\" height=\"32px\" viewBox=\"0 0 22 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx=\"50%\" cy=\"50.2950175%\" fx=\"50%\" fy=\"50.2950175%\" r=\"49.7049825%\" gradientTransform=\"translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)\" id=\"radialGradient-1\">\n <stop stop-color=\"#000000\" offset=\"0%\"></stop>\n <stop stop-color=\"#000000\" stop-opacity=\"0\" offset=\"100%\"></stop>\n </radialGradient>\n <path d=\"M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z\" id=\"path-2\"></path>\n </defs>\n <g id=\"View-/-Map-/-Marker-/-Large\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <ellipse id=\"Oval\" fill=\"url(#radialGradient-1)\" opacity=\"0.12\" cx=\"11\" cy=\"28.5\" rx=\"4.5\" ry=\"3.5\"></ellipse>\n <path d=\"M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z\" id=\"Path-3\" fill=\"#FFFFFF\"></path>\n <mask id=\"mask-3\" fill=\"white\">\n <use xlink:href=\"#path-2\"></use>\n </mask>\n <use id=\"Path-2\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" xlink:href=\"#path-2\"></use>\n <rect id=\"Entity-type\" fill=\"".concat(color, "\" mask=\"url(#mask-3)\" x=\"0\" y=\"0\" width=\"22\" height=\"32\"></rect>\n </g>\n</svg>"); };
|
package/ResizablePanes/styles.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
|
-
|
|
2
|
+
import { alpha } from '@mui/material/styles';
|
|
3
|
+
export var useStyles = makeStyles(function (theme) { return ({
|
|
3
4
|
container: {
|
|
4
5
|
position: 'relative'
|
|
5
6
|
},
|
|
@@ -31,7 +32,7 @@ export var useStyles = makeStyles(function () { return ({
|
|
|
31
32
|
},
|
|
32
33
|
'&:not($disabled):hover': {
|
|
33
34
|
cursor: 'ns-resize',
|
|
34
|
-
backgroundImage:
|
|
35
|
+
backgroundImage: "linear-gradient(".concat(alpha(theme.palette.primary.main, 0), ", ").concat(alpha(theme.palette.primary.main, 0.35), ", ").concat(theme.palette.primary.main, ")"),
|
|
35
36
|
backgroundSize: '100% 3px'
|
|
36
37
|
}
|
|
37
38
|
},
|
|
@@ -48,7 +49,7 @@ export var useStyles = makeStyles(function () { return ({
|
|
|
48
49
|
},
|
|
49
50
|
'&:not($disabled):hover': {
|
|
50
51
|
cursor: 'ew-resize',
|
|
51
|
-
backgroundImage:
|
|
52
|
+
backgroundImage: "linear-gradient(to left, ".concat(alpha(theme.palette.primary.main, 0.35), ", ").concat(theme.palette.primary.main, ", ").concat(alpha(theme.palette.primary.main, 0.35), ")"),
|
|
52
53
|
backgroundSize: '3px 100%'
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"text" | "root" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"text" | "root" | "logo" | "textBox" | "secondaryText">;
|
|
@@ -3,7 +3,7 @@ if (typeof document !== 'undefined') {
|
|
|
3
3
|
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
4
|
const style = document.createElement('style');
|
|
5
5
|
style.type = 'text/css'
|
|
6
|
-
style.innerHTML = `.TargetBox-root--T8Dyg{padding:36px 0 29px}.TargetBox-icon--qfl13{height:190px;margin-bottom:24px;pointer-events:none;width:190px}.TargetBox-title--zQaNU{color:var(--mui-palette-text-primary);font-size:20px;font-weight:500;line-height:24px;margin-bottom:8px}.TargetBox-description--Jyqo5{color:var(--mui-palette-text-secondary);font-size:14px;line-height:16px;margin-bottom:24px}`;
|
|
6
|
+
style.innerHTML = `.TargetBox-root--T8Dyg{padding:36px 0 29px}.TargetBox-icon--qfl13{color:var(--mui-palette-primary-main);height:190px;margin-bottom:24px;pointer-events:none;width:190px}.TargetBox-title--zQaNU{color:var(--mui-palette-text-primary);font-size:20px;font-weight:500;line-height:24px;margin-bottom:8px}.TargetBox-description--Jyqo5{color:var(--mui-palette-text-secondary);font-size:14px;line-height:16px;margin-bottom:24px}`;
|
|
7
7
|
head.appendChild(style);
|
|
8
8
|
}
|
|
9
9
|
export default styles;
|
|
@@ -7,22 +7,22 @@ exports.getTooltipTitleByVerificationStatus = exports.getIconByVerificationStatu
|
|
|
7
7
|
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
8
8
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
9
9
|
var EmptyStub_1 = require("../EmptyStub");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
10
|
+
var VerificationInvalid_1 = __importDefault(require("../icons/VerificationInvalid"));
|
|
11
|
+
var VerificationValid_1 = __importDefault(require("../icons/VerificationValid"));
|
|
12
|
+
var VerificationOutdated_1 = __importDefault(require("../icons/VerificationOutdated"));
|
|
13
|
+
var VerificationMaybe_1 = __importDefault(require("../icons/VerificationMaybe"));
|
|
14
14
|
var helpers_1 = require("../contexts/AttributesVerificationContext/helpers");
|
|
15
15
|
var getIconByVerificationStatus = function (verificationStatus) {
|
|
16
16
|
switch (verificationStatus) {
|
|
17
17
|
case helpers_1.VerificationStatus.VALID:
|
|
18
|
-
return
|
|
18
|
+
return VerificationValid_1.default;
|
|
19
19
|
case helpers_1.VerificationStatus.INVALID:
|
|
20
|
-
return
|
|
20
|
+
return VerificationInvalid_1.default;
|
|
21
21
|
case helpers_1.VerificationStatus.OUTDATED:
|
|
22
|
-
return
|
|
22
|
+
return VerificationOutdated_1.default;
|
|
23
23
|
case helpers_1.VerificationStatus.MAYBE:
|
|
24
24
|
case helpers_1.VerificationStatus.ACCEPT_ALL:
|
|
25
|
-
return
|
|
25
|
+
return VerificationMaybe_1.default;
|
|
26
26
|
default:
|
|
27
27
|
return EmptyStub_1.EmptyStub;
|
|
28
28
|
}
|
package/cjs/BarChart/BarChart.js
CHANGED
|
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.BarChart = void 0;
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var styles_1 = require("@mui/material/styles");
|
|
30
31
|
var recharts_1 = require("recharts");
|
|
31
32
|
var ChartTooltip_1 = require("../ChartTooltip");
|
|
32
33
|
var useClickableChartStyle_1 = require("../hooks/useClickableChartStyle");
|
|
@@ -34,7 +35,8 @@ var useDynamicYAxisWidth_1 = require("../hooks/useDynamicYAxisWidth");
|
|
|
34
35
|
var helpers_1 = require("./helpers");
|
|
35
36
|
var BarChart = function (_a) {
|
|
36
37
|
var width = _a.width, height = _a.height, data = _a.data, _b = _a.options, options = _b === void 0 ? {} : _b, onItemClick = _a.onItemClick;
|
|
37
|
-
var
|
|
38
|
+
var theme = (0, styles_1.useTheme)();
|
|
39
|
+
var _c = (0, helpers_1.getBarChartSettings)(options, theme.palette.primary.main), barChart = _c.barChart, cartesianGrid = _c.cartesianGrid, bar = _c.bar, tooltip = _c.tooltip, xAxis = _c.xAxis, yAxis = _c.yAxis;
|
|
38
40
|
var _d = (0, useDynamicYAxisWidth_1.useDynamicYAxisWidth)({ chartYAxisProps: yAxis }), chartRef = _d.chartRef, dynamicYAxisWidth = __rest(_d, ["chartRef"]);
|
|
39
41
|
var onBarClick = onItemClick && (function (_a) {
|
|
40
42
|
var group = _a.group;
|
|
@@ -9,5 +9,5 @@ type BarChartSettings = {
|
|
|
9
9
|
cartesianGrid: Omit<CartesianGridProps, 'ref'>;
|
|
10
10
|
tooltip: TooltipProps<number, string>;
|
|
11
11
|
};
|
|
12
|
-
export declare const getBarChartSettings: ({ margin, isHorizontal, isLabelRotated }: BarChartOptions) => BarChartSettings;
|
|
12
|
+
export declare const getBarChartSettings: ({ margin, isHorizontal, isLabelRotated }: BarChartOptions, barColor: string) => BarChartSettings;
|
|
13
13
|
export {};
|
package/cjs/BarChart/helpers.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getBarChartSettings = void 0;
|
|
4
4
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
5
|
-
var getBarChartSettings = function (_a) {
|
|
5
|
+
var getBarChartSettings = function (_a, barColor) {
|
|
6
6
|
var margin = _a.margin, isHorizontal = _a.isHorizontal, isLabelRotated = _a.isLabelRotated;
|
|
7
7
|
return {
|
|
8
8
|
barChart: {
|
|
@@ -12,7 +12,7 @@ var getBarChartSettings = function (_a) {
|
|
|
12
12
|
},
|
|
13
13
|
bar: {
|
|
14
14
|
dataKey: 'value',
|
|
15
|
-
fill:
|
|
15
|
+
fill: barColor
|
|
16
16
|
},
|
|
17
17
|
xAxis: {
|
|
18
18
|
type: isHorizontal ? 'number' : 'category',
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useStyles = void 0;
|
|
4
4
|
var styles_1 = require("@mui/styles");
|
|
5
|
+
var styles_2 = require("@mui/material/styles");
|
|
5
6
|
exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
6
7
|
root: {
|
|
7
8
|
display: 'flex',
|
|
8
9
|
padding: '8px',
|
|
9
10
|
borderRadius: '4px',
|
|
10
|
-
backgroundColor:
|
|
11
|
+
backgroundColor: (0, styles_2.alpha)(theme.palette.primary.main, 0.06)
|
|
11
12
|
},
|
|
12
13
|
avatar: {
|
|
13
14
|
marginRight: '8px'
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useStyles = void 0;
|
|
4
4
|
var styles_1 = require("@mui/styles");
|
|
5
|
-
|
|
5
|
+
var styles_2 = require("@mui/material/styles");
|
|
6
|
+
exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
6
7
|
root: function (_a) {
|
|
7
8
|
var isEditing = _a.isEditing;
|
|
8
9
|
return ({
|
|
9
10
|
padding: isEditing ? '6px 6px 6px 0' : ' 6px 6px 6px 8px',
|
|
10
11
|
borderRadius: '4px',
|
|
11
|
-
backgroundColor: isEditing ? 'transparent' :
|
|
12
|
+
backgroundColor: isEditing ? 'transparent' : (0, styles_2.alpha)(theme.palette.primary.main, 0.06)
|
|
12
13
|
});
|
|
13
14
|
},
|
|
14
15
|
textField: function (_a) {
|
|
@@ -36,4 +37,4 @@ exports.useStyles = (0, styles_1.makeStyles)({
|
|
|
36
37
|
marginLeft: '8px'
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
});
|
|
40
|
+
}); });
|
|
@@ -37,7 +37,7 @@ var EmptyState = function (_a) {
|
|
|
37
37
|
var styles = (0, styles_1.useStyles)();
|
|
38
38
|
var showButton = access && buttonTitle;
|
|
39
39
|
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.root, styles["root_".concat(variant)]) },
|
|
40
|
-
react_1.default.createElement(LogoRenderer, { className: styles[
|
|
40
|
+
react_1.default.createElement(LogoRenderer, { className: (0, classnames_1.default)(styles.logo, styles[variant]) }),
|
|
41
41
|
react_1.default.createElement("div", { className: styles.textBox },
|
|
42
42
|
react_1.default.createElement(Typography_1.default, { variant: "h5", classes: { h5: styles.text } }, text),
|
|
43
43
|
secondaryText && (react_1.default.createElement(Typography_1.default, { variant: "subtitle1", classes: { subtitle1: styles.secondaryText } }, secondaryText))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"button" | "text" | "small" | "root" | "embedded" | "root_small" | "full" | "textBox" | "secondaryText">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"button" | "text" | "small" | "root" | "embedded" | "root_small" | "logo" | "full" | "textBox" | "secondaryText">;
|
package/cjs/EmptyState/styles.js
CHANGED
|
@@ -3,7 +3,7 @@ if (typeof document !== 'undefined') {
|
|
|
3
3
|
const head = document.head || document.getElementsByTagName('head')[0]
|
|
4
4
|
const style = document.createElement('style');
|
|
5
5
|
style.type = 'text/css'
|
|
6
|
-
style.innerHTML = `.FileDropZone-root--9QbaV{cursor:pointer}.FileDropZone-active--FUwfs{background-color:
|
|
6
|
+
style.innerHTML = `.FileDropZone-root--9QbaV{cursor:pointer}.FileDropZone-active--FUwfs{background-color:color-mix(in srgb,var(--mui-palette-primary-main) 12%,transparent)}`;
|
|
7
7
|
head.appendChild(style);
|
|
8
8
|
}
|
|
9
9
|
module.exports = styles;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useStyles = void 0;
|
|
4
4
|
var styles_1 = require("@mui/styles");
|
|
5
|
-
|
|
5
|
+
var styles_2 = require("@mui/material/styles");
|
|
6
|
+
exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
6
7
|
overlay: {
|
|
7
8
|
position: 'absolute',
|
|
8
9
|
top: 0,
|
|
@@ -19,7 +20,7 @@ exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
|
|
|
19
20
|
userSelect: 'none'
|
|
20
21
|
},
|
|
21
22
|
selected: {
|
|
22
|
-
backgroundColor:
|
|
23
|
+
backgroundColor: (0, styles_2.alpha)(theme.palette.primary.main, 0.6)
|
|
23
24
|
},
|
|
24
25
|
selectionMode: {
|
|
25
26
|
cursor: 'pointer',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useStyles = void 0;
|
|
4
4
|
var styles_1 = require("@mui/styles");
|
|
5
|
-
exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
|
|
5
|
+
exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
6
6
|
root: {
|
|
7
7
|
width: '100%'
|
|
8
8
|
},
|
|
@@ -23,7 +23,7 @@ exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
|
|
|
23
23
|
width: imageWidth,
|
|
24
24
|
height: imageHeight,
|
|
25
25
|
cursor: 'pointer',
|
|
26
|
-
border:
|
|
26
|
+
border: "1px dashed ".concat(theme.palette.primary.main),
|
|
27
27
|
boxSizing: 'border-box',
|
|
28
28
|
marginRight: imageMargin,
|
|
29
29
|
display: 'flex',
|
|
@@ -48,26 +48,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
48
48
|
var react_1 = __importStar(require("react"));
|
|
49
49
|
var ramda_1 = require("ramda");
|
|
50
50
|
var react_google_maps_1 = require("@vis.gl/react-google-maps");
|
|
51
|
+
var styles_1 = require("@mui/material/styles");
|
|
51
52
|
var ProfileCard_1 = require("../../../ProfileCard");
|
|
52
53
|
var Popper_1 = require("../../../Popper");
|
|
53
54
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
54
55
|
var EntityMarkerContext_1 = require("../../../contexts/EntityMarkerContext");
|
|
55
56
|
var marker_inline_svg_1 = require("./icons/marker.inline.svg");
|
|
56
57
|
var marker_hover_inline_svg_1 = require("./icons/marker-hover.inline.svg");
|
|
57
|
-
var
|
|
58
|
+
var styles_2 = require("./styles");
|
|
58
59
|
var HIDE_DEBOUNCE_INTERVAL = 50;
|
|
59
60
|
var MARKER_HEIGHT = 32;
|
|
60
61
|
var MARKER_CARD_MARGIN = 8;
|
|
61
|
-
var
|
|
62
|
-
var markerIcon = (0, mdm_sdk_1.svg2Url)(marker_inline_svg_1.MARKER);
|
|
62
|
+
var MARKER_LIGHTEN = 0.3;
|
|
63
63
|
var EntityMarker = function (_a) {
|
|
64
64
|
var _b;
|
|
65
65
|
var marker = _a.marker, onClick = _a.onClick, clusterer = _a.clusterer, disabled = _a.disabled, otherProps = __rest(_a, ["marker", "onClick", "clusterer", "disabled"]);
|
|
66
|
-
var styles = (0,
|
|
66
|
+
var styles = (0, styles_2.useStyles)();
|
|
67
|
+
var theme = (0, styles_1.useTheme)();
|
|
67
68
|
var _c = (0, react_1.useState)(false), hovered = _c[0], setHovered = _c[1];
|
|
68
69
|
var activeEntityUri = (0, react_1.useContext)(EntityMarkerContext_1.EntityMarkerContext).activeEntityUri;
|
|
69
70
|
var isActive = (0, ramda_1.pathEq)(['entity', 'uri'], activeEntityUri, marker);
|
|
70
71
|
var position = (0, react_1.useMemo)(function () { return ({ lat: marker.point.lat, lng: marker.point.lng }); }, [marker.point]);
|
|
72
|
+
var markerColor = (0, react_1.useMemo)(function () { return (0, styles_1.lighten)(theme.palette.primary.main, MARKER_LIGHTEN); }, [theme.palette.primary.main]);
|
|
73
|
+
var markerIcon = (0, react_1.useMemo)(function () { return (0, mdm_sdk_1.svg2Url)((0, marker_inline_svg_1.createMarker)(markerColor)); }, [markerColor]);
|
|
74
|
+
var hoveredMarkerIcon = (0, react_1.useMemo)(function () { return (0, mdm_sdk_1.svg2Url)((0, marker_hover_inline_svg_1.createHoveredMarker)(markerColor)); }, [markerColor]);
|
|
71
75
|
var setHoveredDebounced = (0, react_1.useCallback)((0, mdm_sdk_1.debounce)(setHovered, HIDE_DEBOUNCE_INTERVAL), []);
|
|
72
76
|
var onMouseOver = (0, react_1.useCallback)(function () { return setHoveredDebounced(true); }, [setHoveredDebounced]);
|
|
73
77
|
var onMouseOut = (0, react_1.useCallback)(function () { return setHoveredDebounced(false); }, [setHoveredDebounced]);
|