@reltio/components 1.4.1572 → 1.4.1573

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.
Files changed (61) hide show
  1. package/cjs/components/BasicTableView/BasicTable/BasicTable.js +14 -3
  2. package/cjs/components/BasicTableView/BasicTable/CellRenderer/CellRenderer.d.ts +3 -3
  3. package/cjs/components/BasicTableView/BasicTable/CellRenderer/CellRenderer.js +4 -3
  4. package/cjs/components/BasicTableView/BasicTable/helpers/dataHelpers.d.ts +1 -1
  5. package/cjs/components/BasicTableView/BasicTable/helpers/dataHelpers.js +6 -4
  6. package/cjs/components/BasicTableView/BasicTable/hooks/useBasicTableCellRenderer.d.ts +12 -16
  7. package/cjs/components/BasicTableView/BasicTable/hooks/useBasicTableCellRenderer.js +9 -8
  8. package/cjs/components/BasicTableView/BasicTable/hooks/useCollapsibleTableRows.d.ts +3 -2
  9. package/cjs/components/BasicTableView/BasicTable/hooks/useCollapsibleTableRows.js +2 -2
  10. package/cjs/components/BasicTableView/BasicTable/hooks/useDynamicRowCellHeight.d.ts +9 -2
  11. package/cjs/components/BasicTableView/BasicTable/hooks/useDynamicRowCellHeight.js +3 -2
  12. package/cjs/components/BasicTableView/RowCellAutoSizer/RowCellAutoSizer.d.ts +2 -1
  13. package/cjs/components/BasicTableView/RowCellAutoSizer/RowCellAutoSizer.js +1 -1
  14. package/cjs/components/BasicTableView/types/index.d.ts +10 -7
  15. package/cjs/components/crosswalks/AttributesTable/AttributesTable.js +12 -5
  16. package/cjs/components/crosswalks/AttributesTable/cell-renderers/AttributeValuesRenderer.d.ts +3 -7
  17. package/cjs/components/crosswalks/AttributesTable/cell-renderers/CommonRowCellRenderer.d.ts +12 -0
  18. package/cjs/components/crosswalks/AttributesTable/cell-renderers/CommonRowCellRenderer.js +41 -0
  19. package/cjs/components/crosswalks/AttributesTable/cell-renderers/OvValuesRenderer.d.ts +6 -7
  20. package/cjs/components/crosswalks/AttributesTable/cell-renderers/OvValuesRenderer.js +6 -3
  21. package/cjs/components/crosswalks/AttributesTable/cell-renderers/RowCellRenderer.d.ts +7 -10
  22. package/cjs/components/crosswalks/AttributesTable/cell-renderers/RowCellRenderer.js +3 -2
  23. package/cjs/components/crosswalks/AttributesTable/cell-renderers/RuleTypeRenderer.d.ts +2 -7
  24. package/cjs/components/crosswalks/AttributesTable/cell-renderers/WinnerSourcesRenderer.d.ts +2 -4
  25. package/cjs/components/crosswalks/AttributesTable/cell-renderers/styles.d.ts +1 -1
  26. package/cjs/components/crosswalks/AttributesTable/cell-renderers/styles.js +17 -1
  27. package/cjs/components/crosswalks/AttributesTable/helpers.d.ts +5 -10
  28. package/cjs/components/crosswalks/types/AttributesTableData.d.ts +50 -0
  29. package/cjs/components/crosswalks/types/AttributesTableData.js +2 -0
  30. package/cjs/components/crosswalks/types/index.d.ts +1 -0
  31. package/esm/components/BasicTableView/BasicTable/BasicTable.js +15 -4
  32. package/esm/components/BasicTableView/BasicTable/CellRenderer/CellRenderer.d.ts +3 -3
  33. package/esm/components/BasicTableView/BasicTable/CellRenderer/CellRenderer.js +4 -3
  34. package/esm/components/BasicTableView/BasicTable/helpers/dataHelpers.d.ts +1 -1
  35. package/esm/components/BasicTableView/BasicTable/helpers/dataHelpers.js +7 -5
  36. package/esm/components/BasicTableView/BasicTable/hooks/useBasicTableCellRenderer.d.ts +12 -16
  37. package/esm/components/BasicTableView/BasicTable/hooks/useBasicTableCellRenderer.js +9 -8
  38. package/esm/components/BasicTableView/BasicTable/hooks/useCollapsibleTableRows.d.ts +3 -2
  39. package/esm/components/BasicTableView/BasicTable/hooks/useCollapsibleTableRows.js +2 -2
  40. package/esm/components/BasicTableView/BasicTable/hooks/useDynamicRowCellHeight.d.ts +9 -2
  41. package/esm/components/BasicTableView/BasicTable/hooks/useDynamicRowCellHeight.js +3 -2
  42. package/esm/components/BasicTableView/RowCellAutoSizer/RowCellAutoSizer.d.ts +2 -1
  43. package/esm/components/BasicTableView/RowCellAutoSizer/RowCellAutoSizer.js +1 -1
  44. package/esm/components/BasicTableView/types/index.d.ts +10 -7
  45. package/esm/components/crosswalks/AttributesTable/AttributesTable.js +14 -7
  46. package/esm/components/crosswalks/AttributesTable/cell-renderers/AttributeValuesRenderer.d.ts +3 -7
  47. package/esm/components/crosswalks/AttributesTable/cell-renderers/CommonRowCellRenderer.d.ts +12 -0
  48. package/esm/components/crosswalks/AttributesTable/cell-renderers/CommonRowCellRenderer.js +34 -0
  49. package/esm/components/crosswalks/AttributesTable/cell-renderers/OvValuesRenderer.d.ts +6 -7
  50. package/esm/components/crosswalks/AttributesTable/cell-renderers/OvValuesRenderer.js +6 -3
  51. package/esm/components/crosswalks/AttributesTable/cell-renderers/RowCellRenderer.d.ts +7 -10
  52. package/esm/components/crosswalks/AttributesTable/cell-renderers/RowCellRenderer.js +3 -2
  53. package/esm/components/crosswalks/AttributesTable/cell-renderers/RuleTypeRenderer.d.ts +2 -7
  54. package/esm/components/crosswalks/AttributesTable/cell-renderers/WinnerSourcesRenderer.d.ts +2 -4
  55. package/esm/components/crosswalks/AttributesTable/cell-renderers/styles.d.ts +1 -1
  56. package/esm/components/crosswalks/AttributesTable/cell-renderers/styles.js +17 -1
  57. package/esm/components/crosswalks/AttributesTable/helpers.d.ts +5 -10
  58. package/esm/components/crosswalks/types/AttributesTableData.d.ts +50 -0
  59. package/esm/components/crosswalks/types/AttributesTableData.js +1 -0
  60. package/esm/components/crosswalks/types/index.d.ts +1 -0
  61. package/package.json +4 -4
@@ -1,9 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { CrosswalkBase } from '@reltio/mdm-sdk';
2
+ import { WinnerSources } from '../../types';
3
3
  type Props = {
4
- value: {
5
- crosswalks: CrosswalkBase[];
6
- };
4
+ value: WinnerSources;
7
5
  };
8
6
  declare const WinnerSourcesRenderer: ({ value: { crosswalks } }: Props) => JSX.Element;
9
7
  export default WinnerSourcesRenderer;
@@ -1 +1 @@
1
- export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"count" | "popupTitle" | "closeButton" | "headCell" | "sourceIcon" | "coloredCell" | "rowCell" | "cellValueWrapper" | "attributeTitle" | "ovValue" | "ruleType" | "ruleTypeLabel" | "rulePopup" | "popupItem" | "popupTitleWrapper" | "popupItemsWrapper" | "winnerSourceItemWrapper" | "winnerSourceItem" | "winnerSourceItemLabel">;
1
+ export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"count" | "popupTitle" | "closeButton" | "headCell" | "dragIndicator" | "dragIndicatorIcon" | "sourceIcon" | "ruleType" | "coloredCell" | "rowCell" | "cellValueWrapper" | "attributeTitle" | "ovValue" | "ruleTypeLabel" | "rulePopup" | "popupItem" | "popupTitleWrapper" | "popupItemsWrapper" | "winnerSourceItemWrapper" | "winnerSourceItem" | "winnerSourceItemLabel">;
@@ -24,10 +24,26 @@ export var useStyles = makeStyles(function (theme) { return ({
24
24
  overflow: 'hidden'
25
25
  },
26
26
  cellValueWrapper: {
27
+ position: 'relative',
27
28
  padding: '15px 15px 0 15px',
28
29
  '&:last-child': {
29
30
  paddingBottom: '15px'
30
- }
31
+ },
32
+ '&:hover $dragIndicator': {
33
+ display: 'block'
34
+ },
35
+ },
36
+ dragIndicator: {
37
+ display: 'none',
38
+ position: 'absolute',
39
+ top: '15px',
40
+ left: 0,
41
+ cursor: 'grab'
42
+ },
43
+ dragIndicatorIcon: {
44
+ fill: theme.palette.text.secondary,
45
+ width: '14px',
46
+ height: '14px'
31
47
  },
32
48
  attributeTitle: {
33
49
  display: 'block',
@@ -1,6 +1,6 @@
1
- import { AttributeType, AttributeValue, Metadata, RecordAttributesType, SurvivorStrategy } from '@reltio/mdm-sdk';
1
+ import { AttributeType, AttributeValue, Crosswalk, Metadata, RecordAttributesType } from '@reltio/mdm-sdk';
2
2
  import { CrosswalksMap } from '../../attributes/inline';
3
- import { CrosswalksByOwnerTypeMap } from '../types';
3
+ import { CrosswalksByOwnerTypeMap, AttributesTableRowValue, RuleTypeValues } from '../types';
4
4
  export declare const COLUMNS_DATA: ({
5
5
  id: string;
6
6
  readonly label: string;
@@ -28,12 +28,7 @@ export declare const COLUMNS_DATA: ({
28
28
  })[];
29
29
  export declare const DEFAULT_VISIBLE_COLUMNS: string[];
30
30
  export declare const countAttributeValues: (type: string, values: AttributeValue[], crosswalksMap: CrosswalksMap) => number;
31
- export declare const getRuleTypeValues: (metadata: Metadata, attributeType: AttributeType, parentTypeUri: string, activeSurvivorshipGroupUri?: string) => {
32
- ruleType: SurvivorStrategy;
33
- sourcesUriOrder: any;
34
- primaryAttributeUri: any;
35
- comparisonAttributeUri: any;
36
- };
37
- export declare const getWinnerCrosswalks: (attributeValues: AttributeValue[], crosswalksMap: CrosswalksMap) => any;
31
+ export declare const getRuleTypeValues: (metadata: Metadata, attributeType: AttributeType, parentTypeUri: string, activeSurvivorshipGroupUri?: string) => RuleTypeValues;
32
+ export declare const getWinnerCrosswalks: (attributeValues: AttributeValue[], crosswalksMap: CrosswalksMap) => Crosswalk[];
38
33
  export declare const getBasicTableColumnsData: any;
39
- export declare const getBasicTableRowsData: (metadata: Metadata, parentTypeUri: string, attrTypes: AttributeType[], columns: string[], crosswalksMap: CrosswalksByOwnerTypeMap, attributes: RecordAttributesType, activeSurvivorshipGroupUri?: string) => any[];
34
+ export declare const getBasicTableRowsData: (metadata: Metadata, parentTypeUri: string, attrTypes: AttributeType[], columns: string[], crosswalksMap: CrosswalksByOwnerTypeMap, attributes: RecordAttributesType, activeSurvivorshipGroupUri?: string) => AttributesTableRowValue[];
@@ -0,0 +1,50 @@
1
+ /// <reference types="react" />
2
+ import { AttributeType, AttributeValue, Crosswalk, SurvivorStrategy } from '@reltio/mdm-sdk';
3
+ import { ColumnData, RenderRowCellProps } from '../../BasicTableView/types';
4
+ import { CrosswalksMap } from '../../attributes/inline';
5
+ export type RuleTypeValues = {
6
+ ruleType: SurvivorStrategy;
7
+ primaryAttributeUri?: string;
8
+ comparisonAttributeUri?: string;
9
+ sourcesUriOrder?: string[];
10
+ };
11
+ export type OvValues = {
12
+ attributeType: AttributeType;
13
+ values: AttributeValue[];
14
+ };
15
+ export type AttributeValues = {
16
+ attributeType: AttributeType;
17
+ attributeValues: AttributeValue[];
18
+ crosswalksMap: CrosswalksMap;
19
+ };
20
+ export type WinnerSources = {
21
+ crosswalks: Crosswalk[];
22
+ };
23
+ export type AttributesTableRowValue = {
24
+ count: number;
25
+ ovValues: OvValues;
26
+ rawValue: AttributeValue[];
27
+ ruleType?: RuleTypeValues;
28
+ values?: AttributeValues;
29
+ winnerSources?: WinnerSources;
30
+ };
31
+ export type AttributesTableColumnData = ColumnData & {
32
+ id: keyof AttributesTableRowValue;
33
+ };
34
+ export type GetRowCellKeyProps = {
35
+ rowValue: AttributesTableRowValue;
36
+ columnData: AttributesTableColumnData;
37
+ cellIndex: number;
38
+ rowIndex: number;
39
+ };
40
+ type CellValueRendererProps = {
41
+ value: unknown;
42
+ rowValue: AttributesTableRowValue;
43
+ [key: string]: unknown;
44
+ };
45
+ export type RowCellRendererProps = RenderRowCellProps & {
46
+ CellValueRenderer: (props: CellValueRendererProps) => JSX.Element;
47
+ columnData: AttributesTableColumnData;
48
+ rowValue: AttributesTableRowValue;
49
+ };
50
+ export {};
@@ -5,3 +5,4 @@ export type { CrosswalksByTypes } from './CrosswalksByTypes';
5
5
  export type { AddCrosswalkEvent } from './AddCrosswalkEvent';
6
6
  export type { DeleteCrosswalkEvent } from './DeleteCrosswalkEvent';
7
7
  export type { EditCrosswalkEvent } from './EditCrosswalkEvent';
8
+ export type { AttributesTableColumnData, AttributesTableRowValue, RuleTypeValues, GetRowCellKeyProps, RowCellRendererProps, AttributeValues, OvValues, WinnerSources } from './AttributesTableData';
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1572",
3
+ "version": "1.4.1573",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
7
7
  "dependencies": {
8
8
  "@date-io/moment": "^1.3.5",
9
9
  "@react-google-maps/api": "2.7.0",
10
- "@reltio/mdm-module": "^1.4.1572",
11
- "@reltio/mdm-sdk": "^1.4.1572",
10
+ "@reltio/mdm-module": "^1.4.1573",
11
+ "@reltio/mdm-sdk": "^1.4.1573",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",
@@ -19,7 +19,7 @@
19
19
  "prop-types": "^15.6.2",
20
20
  "ramda": "^0.28.0",
21
21
  "react-autosuggest": "^9.4.3",
22
- "react-components": "bitbucket:reltio-ondemand/react-components#v3.17.1",
22
+ "react-components": "bitbucket:reltio-ondemand/react-components#v3.17.2",
23
23
  "react-dnd": "^9.4.0",
24
24
  "react-dnd-html5-backend": "^10.0.2",
25
25
  "react-grid-layout": "^1.1.1",