@reltio/sources 1.4.1584 → 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/index.ts +1 -0
- package/package.json +38 -21
- package/public/bundle.js +205 -0
- package/public/bundle.js.LICENSE.txt +79 -0
- package/public/package.json +22 -0
- package/scripts/build/index.js +20 -0
- package/src/components/CrosswalkTreeView/CrosswalkTreeView.tsx +47 -0
- package/src/components/CrosswalkTreeView/__tests__/CrosswalkTreeView.spec.tsx +72 -0
- package/src/components/CrosswalkTreeView/__tests__/helpers.spec.ts +961 -0
- package/src/components/CrosswalkTreeView/helpers.ts +91 -0
- package/src/components/CrosswalkTreeView/styles.ts +10 -0
- package/src/components/EmptyState/EmptyState.tsx +20 -0
- package/src/components/EmptyState/__tests__/EmptyState.test.tsx +13 -0
- package/src/components/EmptyState/icons/EmptySources.svg +43 -0
- package/src/components/EmptyState/styles.ts +19 -0
- package/src/components/LegendTable/LegendTable.tsx +124 -0
- package/src/components/LegendTable/LegendTableRow/ContributorRow/ContributorRow.tsx +46 -0
- package/src/components/LegendTable/LegendTableRow/ContributorRow/__tests__/ContributorRow.test.tsx +103 -0
- package/src/components/LegendTable/LegendTableRow/ContributorRow/styles.ts +31 -0
- package/src/components/LegendTable/LegendTableRow/LegendTableRow.tsx +179 -0
- package/src/components/LegendTable/LegendTableRow/__tests__/LegendTableRow.test.tsx +371 -0
- package/src/components/LegendTable/LegendTableRow/styles.ts +31 -0
- package/src/components/LegendTable/__tests__/LegendTable.test.tsx +273 -0
- package/src/components/LegendTable/__tests__/helpers.test.ts +541 -0
- package/src/components/LegendTable/helpers.ts +64 -0
- package/src/components/LegendTable/styles.ts +17 -0
- package/src/components/LegendView/LegendView.tsx +201 -0
- package/src/components/LegendView/__tests__/LegendView.test.tsx +307 -0
- package/src/components/LegendView/styles.ts +51 -0
- package/src/components/RightSidePanel/RightSidePanel.tsx +25 -0
- package/src/components/RightSidePanel/__tests__/RightSidePanel.test.tsx +28 -0
- package/src/components/RightSidePanel/styles.ts +14 -0
- package/src/components/RulesestsSelector/RulesestsSelector.tsx +31 -0
- package/src/components/RulesestsSelector/RulesetOption/RulesetOption.tsx +25 -0
- package/src/components/RulesestsSelector/RulesetOption/__tests__/RulesetOption.test.tsx +25 -0
- package/src/components/RulesestsSelector/RulesetOption/styles.ts +27 -0
- package/src/components/RulesestsSelector/RulesetsMenuList/RulesetsMenuList.tsx +14 -0
- package/src/components/RulesestsSelector/__tests__/RulesetsSelector.test.tsx +91 -0
- package/src/components/RulesestsSelector/styles.ts +7 -0
- package/src/components/SankeyChart/Link.tsx +31 -0
- package/src/components/SankeyChart/MergeTooltip.tsx +37 -0
- package/src/components/SankeyChart/Node.tsx +137 -0
- package/src/components/SankeyChart/SankeyChart.tsx +103 -0
- package/src/components/SankeyChart/__tests__/Link.spec.tsx +127 -0
- package/src/components/SankeyChart/__tests__/MergeTooltip.spec.tsx +22 -0
- package/src/components/SankeyChart/__tests__/Node.spec.tsx +248 -0
- package/src/components/SankeyChart/__tests__/SankeyChart.spec.tsx +161 -0
- package/src/components/SankeyChart/__tests__/__snapshots__/SankeyChart.spec.tsx.snap +183 -0
- package/src/components/SankeyChart/sankey.ts +322 -0
- package/src/components/SankeyChart/styles.ts +41 -0
- package/src/components/SankeyChart/useSankey.tsx +44 -0
- package/src/components/SelectableTree/SelectableTree.tsx +46 -0
- package/src/components/SelectableTree/__tests__/SelectableTree.test.tsx +28 -0
- package/src/components/SelectableTree/__tests__/__snapshots__/SelectableTree.test.tsx.snap +59 -0
- package/src/components/SelectableTree/styles.ts +42 -0
- package/src/components/SourcesView/SourcesView.tsx +318 -0
- package/src/components/SourcesView/__tests__/IntegrationSourcesView.spec.tsx +199 -0
- package/src/components/SourcesView/__tests__/SourcesView.spec.tsx +903 -0
- package/src/components/SourcesView/__tests__/data/metadata.data.ts +27 -0
- package/src/components/SourcesView/__tests__/data/store.data.ts +65 -0
- package/src/components/SourcesView/icons/LegendIcon.svg +8 -0
- package/src/components/SourcesView/index.tsx +57 -0
- package/src/components/SourcesView/styles.ts +44 -0
- package/src/components/TreeActionSnackbar/TreeActionSnackbar.tsx +38 -0
- package/src/components/TreeActionSnackbar/__tests__/TreeActionSnackbar.test.tsx +38 -0
- package/src/components/TreeActionSnackbar/styles.ts +11 -0
- package/src/components/UnmergeDialog/UnmergeDialog.tsx +78 -0
- package/src/components/UnmergeDialog/__tests__/UnmergeDialog.test.tsx +124 -0
- package/src/components/UnmergeDialog/__tests__/testData.data.ts +271 -0
- package/src/components/UnmergeDialog/styles.ts +34 -0
- package/src/components/UnsubscribeDialog/UnsubscribeDialog.tsx +64 -0
- package/src/components/UnsubscribeDialog/__tests__/UnsubscribeDialog.test.tsx +59 -0
- package/src/components/UnsubscribeDialog/styles.ts +31 -0
- package/src/hooks/__tests__/useCrosswalkTree.specs.tsx +68 -0
- package/src/hooks/__tests__/useCrosswalkTreeActions.specs.ts +110 -0
- package/src/hooks/__tests__/useCrosswalksDisplay.specs.tsx +213 -0
- package/src/hooks/__tests__/useEntityWithSurvivorshipGroups.specs.ts +160 -0
- package/src/hooks/useCrosswalkTree.ts +38 -0
- package/src/hooks/useCrosswalkTreeActions.ts +83 -0
- package/src/hooks/useCrosswalksDisplay.ts +110 -0
- package/src/hooks/useEntityWithSurvivorshipGroups.tsx +51 -0
- package/src/icons/notMatch.svg +14 -0
- package/src/index.ts +1 -0
- package/src/services/errors.ts +11 -0
- package/src/types/LegendMode.ts +5 -0
- package/src/types/SankeyChartData.ts +31 -0
- package/src/types/SourcesSavedState.ts +3 -0
- package/src/types/UnmergeContributorEvent.ts +7 -0
- package/src/types/UnsubscribeContributorEvent.ts +6 -0
- package/src/types/index.ts +4 -0
- package/tsconfig.json +4 -0
- package/webpack.config.js +10 -0
- package/bundle.js +0 -2
- package/bundle.js.LICENSE.txt +0 -42
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @license React
|
|
9
|
+
* react-is.production.min.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @mui/material v5.13.4
|
|
19
|
+
*
|
|
20
|
+
* @license MIT
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @mui/styled-engine v5.13.2
|
|
27
|
+
*
|
|
28
|
+
* @license MIT
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A better abstraction over CSS.
|
|
35
|
+
*
|
|
36
|
+
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
|
|
37
|
+
* @website https://github.com/cssinjs/jss
|
|
38
|
+
* @license MIT
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* React Router DOM v6.2.1
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Remix Software Inc.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
48
|
+
*
|
|
49
|
+
* @license MIT
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* React Router v6.2.1
|
|
54
|
+
*
|
|
55
|
+
* Copyright (c) Remix Software Inc.
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the MIT license found in the
|
|
58
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
59
|
+
*
|
|
60
|
+
* @license MIT
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
/** @license React v16.13.1
|
|
64
|
+
* react-is.production.min.js
|
|
65
|
+
*
|
|
66
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the MIT license found in the
|
|
69
|
+
* LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/** @license React v17.0.2
|
|
73
|
+
* react-jsx-runtime.production.min.js
|
|
74
|
+
*
|
|
75
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the MIT license found in the
|
|
78
|
+
* LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@reltio/sources",
|
|
3
|
+
"version": "1.4.1586-mui5",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
|
+
"main": "bundle.js",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@date-io/moment": "^1.3.5",
|
|
8
|
+
"@reltio/mdm-module": "^1.4.1586-mui5",
|
|
9
|
+
"@reltio/mdm-sdk": "^1.4.1586-mui5",
|
|
10
|
+
"classnames": "^2.2.5",
|
|
11
|
+
"object-hash": "^2.1.1",
|
|
12
|
+
"prop-types": "^15.6.2",
|
|
13
|
+
"ramda": "^0.28.0",
|
|
14
|
+
"react-redux": "^7.2.3",
|
|
15
|
+
"react-resize-detector": "^4.2.0",
|
|
16
|
+
"redux": "^4.1.2",
|
|
17
|
+
"ui-i18n": "bitbucket:reltio-ondemand/ui-i18n#v1.4.0"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
const outputDir = path.resolve(process.cwd(), 'public');
|
|
5
|
+
const generatePackageJson = () => {
|
|
6
|
+
const packageJson = require('../../package.json');
|
|
7
|
+
const result = {
|
|
8
|
+
name: packageJson.name,
|
|
9
|
+
version: packageJson.version,
|
|
10
|
+
license: 'SEE LICENSE IN LICENSE FILE',
|
|
11
|
+
main: 'bundle.js',
|
|
12
|
+
dependencies: packageJson.dependencies,
|
|
13
|
+
peerDependencies: packageJson.peerDependencies,
|
|
14
|
+
publishConfig: packageJson.publishConfig
|
|
15
|
+
};
|
|
16
|
+
const source = JSON.stringify(result, null, 2);
|
|
17
|
+
fs.writeFileSync(path.join(outputDir, 'package.json'), source);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
generatePackageJson();
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, {memo} from 'react';
|
|
2
|
+
import ReactResizeDetector from 'react-resize-detector';
|
|
3
|
+
import {noop} from '@reltio/components';
|
|
4
|
+
import SankeyChart from '../SankeyChart/SankeyChart';
|
|
5
|
+
import {getSankeyData} from './helpers';
|
|
6
|
+
import {CrosswalkBase, CrosswalkTree} from '@reltio/mdm-sdk';
|
|
7
|
+
import {useStyles} from './styles';
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
crosswalkTree: CrosswalkTree;
|
|
11
|
+
entityLabel?: string;
|
|
12
|
+
visibleCrosswalks?: CrosswalkBase[];
|
|
13
|
+
accentContributors?: boolean;
|
|
14
|
+
disableUnmerge?: boolean;
|
|
15
|
+
onUnmerge?: (contributorUri: string) => void;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const CrosswalkTreeView = ({
|
|
19
|
+
crosswalkTree,
|
|
20
|
+
entityLabel,
|
|
21
|
+
visibleCrosswalks,
|
|
22
|
+
accentContributors,
|
|
23
|
+
disableUnmerge = false,
|
|
24
|
+
onUnmerge = noop
|
|
25
|
+
}: Props) => {
|
|
26
|
+
const styles = useStyles();
|
|
27
|
+
const sankeyData = getSankeyData(crosswalkTree, entityLabel, visibleCrosswalks);
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={styles.graph} data-reltio-id="reltio-crosswalk-tree">
|
|
31
|
+
<ReactResizeDetector refreshMode="debounce" refreshRate={100} handleWidth handleHeight>
|
|
32
|
+
{({width = 0, height = 200}: {width: number; height: number}) => (
|
|
33
|
+
<SankeyChart
|
|
34
|
+
width={width}
|
|
35
|
+
height={height}
|
|
36
|
+
data={sankeyData}
|
|
37
|
+
accentContributors={accentContributors}
|
|
38
|
+
disableUnmerge={disableUnmerge}
|
|
39
|
+
onUnmerge={onUnmerge}
|
|
40
|
+
/>
|
|
41
|
+
)}
|
|
42
|
+
</ReactResizeDetector>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default memo(CrosswalkTreeView);
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {mount} from 'enzyme';
|
|
3
|
+
import CrosswalkTreeView from '../CrosswalkTreeView';
|
|
4
|
+
import {EmptyStub} from '@reltio/components';
|
|
5
|
+
import * as SankeyChartImport from '../../SankeyChart/SankeyChart';
|
|
6
|
+
import SankeyChart from '../../SankeyChart/SankeyChart';
|
|
7
|
+
import * as helpers from '../helpers';
|
|
8
|
+
|
|
9
|
+
describe('CrosswalkTreeView', () => {
|
|
10
|
+
const crosswalkTree = {
|
|
11
|
+
merges: [
|
|
12
|
+
{
|
|
13
|
+
time: 1619116318362,
|
|
14
|
+
mergeReason: 'Merge by hand',
|
|
15
|
+
mergeRules: '',
|
|
16
|
+
user: 'carina.alabanza@reltio.com',
|
|
17
|
+
losers: [
|
|
18
|
+
{
|
|
19
|
+
uri: 'entities/1u04ksx9',
|
|
20
|
+
crosswalks: [
|
|
21
|
+
{
|
|
22
|
+
uri: 'entities/1O8x1gO0/crosswalks/2rinpYq8x',
|
|
23
|
+
type: 'configuration/sources/Reltio',
|
|
24
|
+
ownerType: 'entity',
|
|
25
|
+
value: '1u04ksx9'
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
uri: 'entities/1O8x1gO0',
|
|
33
|
+
crosswalks: [
|
|
34
|
+
{
|
|
35
|
+
uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
|
|
36
|
+
type: 'configuration/sources/Reltio',
|
|
37
|
+
ownerType: 'entity',
|
|
38
|
+
value: '1O8x1gO0'
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const props = {
|
|
44
|
+
crosswalkTree,
|
|
45
|
+
accentContributors: true,
|
|
46
|
+
entityLabel: 'testLabel',
|
|
47
|
+
visibleCrosswalks: [
|
|
48
|
+
{
|
|
49
|
+
uri: 'entities/1O8x1gO0/crosswalks/2gghyKRrU',
|
|
50
|
+
type: 'configuration/sources/Reltio',
|
|
51
|
+
ownerType: 'entity',
|
|
52
|
+
value: '1O8x1gO0'
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
disableUnmerge: false
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const SANKEY_DATA_MOCK = {nodes: [], links: []};
|
|
59
|
+
|
|
60
|
+
beforeEach(() => {
|
|
61
|
+
jest.spyOn(helpers, 'getSankeyData').mockReturnValue(SANKEY_DATA_MOCK);
|
|
62
|
+
jest.spyOn(SankeyChartImport, 'default').mockImplementation(EmptyStub);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('should render correctly', () => {
|
|
66
|
+
const wrapper = mount(<CrosswalkTreeView {...props} />);
|
|
67
|
+
expect(helpers.getSankeyData).toBeCalledWith(props.crosswalkTree, props.entityLabel, props.visibleCrosswalks);
|
|
68
|
+
expect(wrapper.find(SankeyChart).prop('data')).toBe(SANKEY_DATA_MOCK);
|
|
69
|
+
expect(wrapper.find(SankeyChart).prop('accentContributors')).toBe(props.accentContributors);
|
|
70
|
+
expect(wrapper.find(SankeyChart).prop('disableUnmerge')).toBe(props.disableUnmerge);
|
|
71
|
+
});
|
|
72
|
+
});
|