@reltio/components 1.4.2000 → 1.4.2002
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/cjs/RCTree/RCTree.d.ts +17 -14
- package/cjs/RCTree/RCTree.js +24 -8
- package/cjs/RCTree/RCTreeLevelLines.d.ts +4 -0
- package/cjs/RCTree/RCTreeLevelLines.js +32 -0
- package/cjs/RCTree/RCTreeSwitchRenderer.d.ts +7 -0
- package/cjs/RCTree/{DefaultSwitchRenderer.js → RCTreeSwitchRenderer.js} +3 -3
- package/cjs/RCTree/helper.d.ts +10 -5
- package/cjs/RCTree/helper.js +49 -3
- package/cjs/RCTree/index.d.ts +2 -0
- package/cjs/RCTree/index.js +5 -1
- package/cjs/RCTree/levelLinesStyles.d.ts +5 -0
- package/cjs/RCTree/levelLinesStyles.js +53 -0
- package/cjs/RCTree/styles.d.ts +1 -1
- package/cjs/RCTree/styles.js +63 -30
- package/cjs/RCTree/types.d.ts +3 -2
- package/cjs/RCTree/useDnd.d.ts +16 -16
- package/cjs/features/crosswalks/AttributesTable/AttributesTable.test.js +6 -4
- package/cjs/features/crosswalks/CrosswalkAttributes/CrosswalkAttributes.test.js +16 -20
- package/cjs/features/crosswalks/CrosswalkEditor/CrosswalkEditor.test.js +4 -5
- package/cjs/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +4 -5
- package/cjs/features/workflow/ReassignButton/components/ReassignDialog/styles.d.ts +1 -1
- package/cjs/index.d.ts +1 -2
- package/cjs/index.js +7 -7
- package/esm/RCTree/RCTree.d.ts +17 -14
- package/esm/RCTree/RCTree.js +26 -10
- package/esm/RCTree/RCTreeLevelLines.d.ts +4 -0
- package/esm/RCTree/RCTreeLevelLines.js +25 -0
- package/esm/RCTree/RCTreeSwitchRenderer.d.ts +7 -0
- package/esm/RCTree/{DefaultSwitchRenderer.js → RCTreeSwitchRenderer.js} +1 -1
- package/esm/RCTree/helper.d.ts +10 -5
- package/esm/RCTree/helper.js +44 -1
- package/esm/RCTree/index.d.ts +2 -0
- package/esm/RCTree/index.js +2 -0
- package/esm/RCTree/levelLinesStyles.d.ts +5 -0
- package/esm/RCTree/levelLinesStyles.js +50 -0
- package/esm/RCTree/styles.d.ts +1 -1
- package/esm/RCTree/styles.js +63 -30
- package/esm/RCTree/types.d.ts +3 -2
- package/esm/RCTree/useDnd.d.ts +16 -16
- package/esm/features/crosswalks/AttributesTable/AttributesTable.test.js +6 -4
- package/esm/features/crosswalks/CrosswalkAttributes/CrosswalkAttributes.test.js +17 -21
- package/esm/features/crosswalks/CrosswalkEditor/CrosswalkEditor.test.js +5 -6
- package/esm/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +5 -6
- package/esm/features/workflow/ReassignButton/components/ReassignDialog/styles.d.ts +1 -1
- package/esm/index.d.ts +1 -2
- package/esm/index.js +1 -2
- package/package.json +2 -2
- package/cjs/RCTree/DefaultSwitchRenderer.d.ts +0 -7
- package/cjs/SaveSegmentDialog/SaveSegmentDialog.d.ts +0 -11
- package/cjs/SaveSegmentDialog/SaveSegmentDialog.js +0 -132
- package/cjs/SaveSegmentDialog/SaveSegmentDialog.test.d.ts +0 -1
- package/cjs/SaveSegmentDialog/SaveSegmentDialog.test.js +0 -214
- package/cjs/SaveSegmentDialog/index.d.ts +0 -1
- package/cjs/SaveSegmentDialog/index.js +0 -5
- package/cjs/SaveSegmentDialog/styles.d.ts +0 -1
- package/cjs/SaveSegmentDialog/styles.js +0 -15
- package/esm/RCTree/DefaultSwitchRenderer.d.ts +0 -7
- package/esm/SaveSegmentDialog/SaveSegmentDialog.d.ts +0 -11
- package/esm/SaveSegmentDialog/SaveSegmentDialog.js +0 -102
- package/esm/SaveSegmentDialog/SaveSegmentDialog.test.d.ts +0 -1
- package/esm/SaveSegmentDialog/SaveSegmentDialog.test.js +0 -209
- package/esm/SaveSegmentDialog/index.d.ts +0 -1
- package/esm/SaveSegmentDialog/index.js +0 -1
- package/esm/SaveSegmentDialog/styles.d.ts +0 -1
- package/esm/SaveSegmentDialog/styles.js +0 -12
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { makeStyles } from '@mui/styles';
|
|
2
|
+
import { DEPTH_LEVEL_INDENT } from './helper';
|
|
3
|
+
export var useStyles = makeStyles(function () { return ({
|
|
4
|
+
levelLines: function (_a) {
|
|
5
|
+
var level = _a.level;
|
|
6
|
+
return ({
|
|
7
|
+
position: 'absolute',
|
|
8
|
+
left: "-".concat(level * DEPTH_LEVEL_INDENT, "px"),
|
|
9
|
+
display: 'flex',
|
|
10
|
+
paddingLeft: '7px',
|
|
11
|
+
cursor: 'initial',
|
|
12
|
+
bottom: 0,
|
|
13
|
+
top: 0,
|
|
14
|
+
zIndex: -1
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
levelLine: {
|
|
18
|
+
paddingLeft: '16px',
|
|
19
|
+
height: '100%',
|
|
20
|
+
position: 'relative'
|
|
21
|
+
},
|
|
22
|
+
showLine: {
|
|
23
|
+
'&:after': {
|
|
24
|
+
content: '""',
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
height: '100%',
|
|
27
|
+
width: '1px',
|
|
28
|
+
left: '0',
|
|
29
|
+
top: '0',
|
|
30
|
+
bottom: '0',
|
|
31
|
+
backgroundColor: 'rgba(0, 122, 193, 0.3)'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
lastLevelLine: {
|
|
35
|
+
'&:after': {
|
|
36
|
+
height: '14px'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
horizontalLine: {
|
|
40
|
+
'&:before': {
|
|
41
|
+
content: '""',
|
|
42
|
+
height: '1px',
|
|
43
|
+
width: '4px',
|
|
44
|
+
position: 'absolute',
|
|
45
|
+
top: '14px',
|
|
46
|
+
left: '0',
|
|
47
|
+
backgroundColor: 'rgba(0, 122, 193, 0.3)'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}); });
|
package/esm/RCTree/styles.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"expandButton" | "collapseButton" | "dropIndicator" | "switcherButtonWrapper" | "switcherButton" | "treeWrapper" | "dropNotAllowed" | "draggedChildrenNode" | "dragHandle" | "dragHandleDragging" | "@global">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"expandButton" | "titleWrapper" | "collapseButton" | "dropIndicator" | "switcherButtonWrapper" | "switcherButton" | "treeContainer" | "treeWrapper" | "dropNotAllowed" | "draggedChildrenNode" | "dragHandle" | "dragHandleDragging" | "@global">;
|
package/esm/RCTree/styles.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
export var useStyles = makeStyles(function (theme) { return ({
|
|
3
3
|
switcherButtonWrapper: {
|
|
4
|
-
paddingTop: '
|
|
5
|
-
paddingLeft: '
|
|
4
|
+
paddingTop: '13px',
|
|
5
|
+
paddingLeft: '2px',
|
|
6
6
|
width: '12px',
|
|
7
7
|
height: '12px',
|
|
8
|
-
cursor: 'pointer'
|
|
8
|
+
cursor: 'pointer',
|
|
9
|
+
marginLeft: '2px'
|
|
9
10
|
},
|
|
10
11
|
switcherButton: {
|
|
11
12
|
transition: 'transform .15s ease',
|
|
@@ -21,8 +22,12 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
21
22
|
expandButton: {
|
|
22
23
|
transform: ' rotate(-90deg)'
|
|
23
24
|
},
|
|
25
|
+
treeContainer: {
|
|
26
|
+
height: '100%'
|
|
27
|
+
},
|
|
24
28
|
treeWrapper: {
|
|
25
|
-
border: 'none'
|
|
29
|
+
border: 'none',
|
|
30
|
+
height: '100%'
|
|
26
31
|
},
|
|
27
32
|
dropIndicator: {
|
|
28
33
|
'&:before': {
|
|
@@ -33,11 +38,8 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
33
38
|
top: 0,
|
|
34
39
|
right: '23px',
|
|
35
40
|
bottom: 0,
|
|
36
|
-
left: '-
|
|
41
|
+
left: '-16px',
|
|
37
42
|
zIndex: 1
|
|
38
|
-
},
|
|
39
|
-
'&>div': {
|
|
40
|
-
opacity: 0
|
|
41
43
|
}
|
|
42
44
|
},
|
|
43
45
|
dropNotAllowed: {
|
|
@@ -52,17 +54,18 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
52
54
|
dragHandle: {
|
|
53
55
|
cursor: 'move',
|
|
54
56
|
color: theme.palette.text.secondary,
|
|
55
|
-
width: '16px'
|
|
57
|
+
width: '16px',
|
|
58
|
+
marginLeft: '5px',
|
|
59
|
+
marginTop: '3px'
|
|
56
60
|
},
|
|
57
61
|
dragHandleDragging: {
|
|
58
62
|
visibility: 'hidden'
|
|
59
63
|
},
|
|
64
|
+
titleWrapper: {
|
|
65
|
+
paddingRight: '11px'
|
|
66
|
+
},
|
|
60
67
|
/* rc-tree/assets/index.css */
|
|
61
68
|
'@global': {
|
|
62
|
-
'.rc-tree': {
|
|
63
|
-
margin: 0,
|
|
64
|
-
border: '1px solid transparent'
|
|
65
|
-
},
|
|
66
69
|
'.rc-tree-focused:not(.rc-tree-active-focused)': {
|
|
67
70
|
borderColor: 'cyan'
|
|
68
71
|
},
|
|
@@ -116,9 +119,6 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
116
119
|
verticalAlign: 'top',
|
|
117
120
|
display: 'none!important'
|
|
118
121
|
},
|
|
119
|
-
'.rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher-noop': {
|
|
120
|
-
cursor: 'auto'
|
|
121
|
-
},
|
|
122
122
|
'.rc-tree .rc-tree-treenode span.rc-tree-checkbox': {
|
|
123
123
|
width: '13px',
|
|
124
124
|
height: '13px',
|
|
@@ -128,9 +128,7 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
128
128
|
'.rc-tree .rc-tree-treenode span.rc-tree-checkbox-checked': {
|
|
129
129
|
backgroundPosition: '-14px 0'
|
|
130
130
|
},
|
|
131
|
-
'.rc-tree .rc-tree-treenode span.rc-tree-checkbox-indeterminate': {
|
|
132
|
-
backgroundPosition: '-14px -28px'
|
|
133
|
-
},
|
|
131
|
+
'.rc-tree .rc-tree-treenode span.rc-tree-checkbox-indeterminate': {},
|
|
134
132
|
'.rc-tree .rc-tree-treenode span.rc-tree-checkbox-disabled': {
|
|
135
133
|
backgroundPosition: '0 -56px'
|
|
136
134
|
},
|
|
@@ -198,16 +196,24 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
198
196
|
marginRight: '2px',
|
|
199
197
|
verticalAlign: 'top'
|
|
200
198
|
},
|
|
201
|
-
'.rc-tree-indent': {
|
|
202
|
-
display: 'inline-block',
|
|
203
|
-
height: 0,
|
|
204
|
-
verticalAlign: 'bottom'
|
|
205
|
-
},
|
|
206
199
|
'.rc-tree-indent-unit': {
|
|
207
200
|
display: 'inline-block',
|
|
208
201
|
width: '16px'
|
|
209
202
|
},
|
|
210
203
|
//Custom styles
|
|
204
|
+
'.rc-tree': {
|
|
205
|
+
margin: 0
|
|
206
|
+
},
|
|
207
|
+
'.rc-tree-indent': {
|
|
208
|
+
display: 'inline-block',
|
|
209
|
+
height: 0,
|
|
210
|
+
verticalAlign: 'bottom',
|
|
211
|
+
whiteSpace: 'nowrap'
|
|
212
|
+
},
|
|
213
|
+
'.rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher-noop': {
|
|
214
|
+
cursor: 'auto',
|
|
215
|
+
minWidth: '16px'
|
|
216
|
+
},
|
|
211
217
|
'.rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper': {
|
|
212
218
|
position: 'relative',
|
|
213
219
|
display: 'inline-block',
|
|
@@ -217,22 +223,21 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
217
223
|
verticalAlign: 'top',
|
|
218
224
|
cursor: 'pointer',
|
|
219
225
|
height: 'auto',
|
|
220
|
-
paddingRight: '11px',
|
|
221
226
|
flexGrow: 1
|
|
222
227
|
},
|
|
223
228
|
'.rc-tree .rc-tree-treenode': {
|
|
224
229
|
margin: 0,
|
|
225
230
|
padding: '0 0 0 18px',
|
|
226
|
-
lineHeight: '
|
|
231
|
+
lineHeight: '10px',
|
|
227
232
|
listStyle: 'none',
|
|
228
233
|
outline: 0,
|
|
234
|
+
display: 'flex',
|
|
235
|
+
minHeight: '28px',
|
|
236
|
+
zIndex: 0,
|
|
229
237
|
'&:hover': {
|
|
230
238
|
backgroundColor: 'rgba(0,0,0,0.06)'
|
|
231
239
|
}
|
|
232
240
|
},
|
|
233
|
-
'.rc-tree-treenode': {
|
|
234
|
-
display: 'flex'
|
|
235
|
-
},
|
|
236
241
|
'.rc-tree-icon_loading': {
|
|
237
242
|
display: 'none !important'
|
|
238
243
|
},
|
|
@@ -244,13 +249,41 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
244
249
|
display: 'inline-flex',
|
|
245
250
|
justifyContent: 'center',
|
|
246
251
|
width: '16px',
|
|
247
|
-
visibility: 'hidden'
|
|
252
|
+
visibility: 'hidden',
|
|
253
|
+
lineHeight: '12px'
|
|
248
254
|
},
|
|
249
255
|
'.rc-tree-treenode-draggable:hover .rc-tree-draggable-icon': {
|
|
250
256
|
visibility: 'visible'
|
|
251
257
|
},
|
|
252
258
|
'.rc-tree-switcher-noop': {
|
|
253
259
|
width: '16px'
|
|
260
|
+
},
|
|
261
|
+
'.rc-tree-switcher': {
|
|
262
|
+
position: 'relative',
|
|
263
|
+
cursor: 'pointer'
|
|
264
|
+
},
|
|
265
|
+
'.rc-tree-switcher.rc-tree-switcher_open': {
|
|
266
|
+
'&:after': {
|
|
267
|
+
content: '""',
|
|
268
|
+
position: 'absolute',
|
|
269
|
+
top: '28px',
|
|
270
|
+
bottom: 0,
|
|
271
|
+
width: '1px',
|
|
272
|
+
left: '7px',
|
|
273
|
+
backgroundColor: 'rgba(0, 122, 193, 0.3)'
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
'.rc-tree-list': {
|
|
277
|
+
height: '100%'
|
|
278
|
+
},
|
|
279
|
+
'.rc-tree-list-holder': {
|
|
280
|
+
height: '100%'
|
|
281
|
+
},
|
|
282
|
+
'.rc-tree-list-scrollbar-vertical': {
|
|
283
|
+
width: '6px !important'
|
|
284
|
+
},
|
|
285
|
+
'.rc-tree-list-scrollbar-thumb': {
|
|
286
|
+
background: 'rgba(0,0,0,.2) !important'
|
|
254
287
|
}
|
|
255
288
|
}
|
|
256
289
|
}); });
|
package/esm/RCTree/types.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ export type RCTreeNode = {
|
|
|
5
5
|
expanded?: boolean;
|
|
6
6
|
children?: RCTreeNode[];
|
|
7
7
|
};
|
|
8
|
-
export type InternalRCNode = {
|
|
9
|
-
value:
|
|
8
|
+
export type InternalRCNode<Node extends RCTreeNode = RCTreeNode> = {
|
|
9
|
+
value: Node;
|
|
10
10
|
pos?: string;
|
|
11
|
+
expanded?: boolean;
|
|
11
12
|
} & FieldDataNode<{
|
|
12
13
|
key: string;
|
|
13
14
|
title?: string;
|
package/esm/RCTree/useDnd.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { DragEvent } from 'react';
|
|
2
2
|
import { InternalRCNode, RCTreeNode } from './types';
|
|
3
|
-
type Props = {
|
|
4
|
-
treeData:
|
|
3
|
+
type Props<Node extends RCTreeNode> = {
|
|
4
|
+
treeData: Node[];
|
|
5
5
|
containerRef: React.RefObject<HTMLDivElement>;
|
|
6
6
|
expandNode: (pos: string, expanded: boolean) => void;
|
|
7
|
-
onLoadChildren?: (treeNode:
|
|
8
|
-
onChange?: (node:
|
|
9
|
-
onDrop?: (treeData:
|
|
7
|
+
onLoadChildren?: (treeNode: Node) => Promise<void>;
|
|
8
|
+
onChange?: (node: Node[]) => void;
|
|
9
|
+
onDrop?: (treeData: Node[], dragNode: Node, parentNode: Node) => void;
|
|
10
10
|
canDrop?: (params: {
|
|
11
|
-
nextParent:
|
|
12
|
-
node:
|
|
11
|
+
nextParent: Node;
|
|
12
|
+
node: Node;
|
|
13
13
|
}) => boolean;
|
|
14
14
|
canDrag?: (params: {
|
|
15
|
-
node:
|
|
15
|
+
node: Node;
|
|
16
16
|
}) => boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare const useDnd: ({ treeData, containerRef, expandNode, onLoadChildren, onChange, onDrop: onDropProp, canDrop, canDrag }: Props) => {
|
|
18
|
+
export declare const useDnd: <Node extends RCTreeNode>({ treeData, containerRef, expandNode, onLoadChildren, onChange, onDrop: onDropProp, canDrop, canDrag }: Props<Node>) => {
|
|
19
19
|
treeProps: {
|
|
20
20
|
onDragStart: ({ node }: {
|
|
21
|
-
node: InternalRCNode
|
|
21
|
+
node: InternalRCNode<Node>;
|
|
22
22
|
}) => void;
|
|
23
23
|
onDragOver: ({ event, node }: {
|
|
24
24
|
event: DragEvent<HTMLDivElement>;
|
|
25
|
-
node: InternalRCNode
|
|
25
|
+
node: InternalRCNode<Node>;
|
|
26
26
|
}) => void;
|
|
27
27
|
onDragLeave: ({ event, node }: {
|
|
28
28
|
event: any;
|
|
@@ -31,13 +31,13 @@ export declare const useDnd: ({ treeData, containerRef, expandNode, onLoadChildr
|
|
|
31
31
|
onDrop: () => void;
|
|
32
32
|
dropIndicatorRender: () => any;
|
|
33
33
|
allowDrop: ({ dragNode, dropNode }: {
|
|
34
|
-
dragNode: InternalRCNode
|
|
35
|
-
dropNode: InternalRCNode
|
|
34
|
+
dragNode: InternalRCNode<Node>;
|
|
35
|
+
dropNode: InternalRCNode<Node>;
|
|
36
36
|
}) => boolean;
|
|
37
37
|
};
|
|
38
|
-
nodeDraggable: (node: InternalRCNode) => boolean;
|
|
39
|
-
dropNode: InternalRCNode
|
|
40
|
-
dragNode: InternalRCNode
|
|
38
|
+
nodeDraggable: (node: InternalRCNode<Node>) => boolean;
|
|
39
|
+
dropNode: InternalRCNode<Node>;
|
|
40
|
+
dragNode: InternalRCNode<Node>;
|
|
41
41
|
dropPositionInfo: {
|
|
42
42
|
pos: string;
|
|
43
43
|
dropPosition: number;
|
|
@@ -697,7 +697,7 @@ describe('attribute table tests', function () {
|
|
|
697
697
|
}); });
|
|
698
698
|
});
|
|
699
699
|
it('should add attribute to beginning on simple attribute select', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
700
|
-
var onAdd, onSelectAttributeTypes, user;
|
|
700
|
+
var onAdd, onSelectAttributeTypes, user, backdrop;
|
|
701
701
|
return __generator(this, function (_a) {
|
|
702
702
|
switch (_a.label) {
|
|
703
703
|
case 0:
|
|
@@ -712,7 +712,8 @@ describe('attribute table tests', function () {
|
|
|
712
712
|
return [4 /*yield*/, user.click(screen.getByText('String Label 2'))];
|
|
713
713
|
case 2:
|
|
714
714
|
_a.sent();
|
|
715
|
-
|
|
715
|
+
backdrop = screen.getByRole('presentation').children[0];
|
|
716
|
+
return [4 /*yield*/, user.click(backdrop)];
|
|
716
717
|
case 3:
|
|
717
718
|
_a.sent();
|
|
718
719
|
expect(onSelectAttributeTypes).toHaveBeenCalledWith(__spreadArray([
|
|
@@ -729,7 +730,7 @@ describe('attribute table tests', function () {
|
|
|
729
730
|
});
|
|
730
731
|
}); });
|
|
731
732
|
it('should add attribute to beginning on nested attribute select', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
732
|
-
var onAdd, onSelectAttributeTypes, user, selectedNested;
|
|
733
|
+
var onAdd, onSelectAttributeTypes, user, backdrop, selectedNested;
|
|
733
734
|
return __generator(this, function (_a) {
|
|
734
735
|
switch (_a.label) {
|
|
735
736
|
case 0:
|
|
@@ -742,7 +743,8 @@ describe('attribute table tests', function () {
|
|
|
742
743
|
return [4 /*yield*/, user.click(screen.getByText('Nested'))];
|
|
743
744
|
case 2:
|
|
744
745
|
_a.sent();
|
|
745
|
-
|
|
746
|
+
backdrop = screen.getByRole('presentation').children[0];
|
|
747
|
+
return [4 /*yield*/, user.click(backdrop)];
|
|
746
748
|
case 3:
|
|
747
749
|
_a.sent();
|
|
748
750
|
selectedNested = {
|
|
@@ -46,7 +46,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
import React from 'react';
|
|
49
|
-
import { render, within, screen
|
|
49
|
+
import { render, within, screen } from '@testing-library/react';
|
|
50
50
|
import userEvent from '@testing-library/user-event';
|
|
51
51
|
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
52
52
|
import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
|
|
@@ -126,7 +126,7 @@ describe('CrosswalkAttributes tests', function () {
|
|
|
126
126
|
expect(screen.getByRole('textbox')).toBeInTheDocument();
|
|
127
127
|
});
|
|
128
128
|
it('should render deleteDate editor when it is added from MoreAttributesButton selector', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
129
|
-
var user;
|
|
129
|
+
var user, backdrop;
|
|
130
130
|
return __generator(this, function (_a) {
|
|
131
131
|
switch (_a.label) {
|
|
132
132
|
case 0:
|
|
@@ -137,12 +137,11 @@ describe('CrosswalkAttributes tests', function () {
|
|
|
137
137
|
return [4 /*yield*/, user.click(screen.getByText('Delete Date'))];
|
|
138
138
|
case 2:
|
|
139
139
|
_a.sent();
|
|
140
|
-
|
|
140
|
+
backdrop = screen.getByRole('presentation').children[0];
|
|
141
|
+
return [4 /*yield*/, user.click(backdrop)];
|
|
141
142
|
case 3:
|
|
142
143
|
_a.sent();
|
|
143
|
-
return [4 /*yield*/,
|
|
144
|
-
expect(screen.getByText('Delete Date:')).toBeInTheDocument();
|
|
145
|
-
})];
|
|
144
|
+
return [4 /*yield*/, screen.findByText('Delete Date:')];
|
|
146
145
|
case 4:
|
|
147
146
|
_a.sent();
|
|
148
147
|
return [4 /*yield*/, user.hover(screen.getByLabelText('Delete attribute'))];
|
|
@@ -174,7 +173,7 @@ describe('CrosswalkAttributes tests', function () {
|
|
|
174
173
|
});
|
|
175
174
|
}); });
|
|
176
175
|
it('should render sourceTable editor when it is added from MoreAttributesButton selector', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
177
|
-
var user;
|
|
176
|
+
var user, backdrop;
|
|
178
177
|
return __generator(this, function (_a) {
|
|
179
178
|
switch (_a.label) {
|
|
180
179
|
case 0:
|
|
@@ -185,12 +184,11 @@ describe('CrosswalkAttributes tests', function () {
|
|
|
185
184
|
return [4 /*yield*/, user.click(screen.getByText('Source Table'))];
|
|
186
185
|
case 2:
|
|
187
186
|
_a.sent();
|
|
188
|
-
|
|
187
|
+
backdrop = screen.getByRole('presentation').children[0];
|
|
188
|
+
return [4 /*yield*/, user.click(backdrop)];
|
|
189
189
|
case 3:
|
|
190
190
|
_a.sent();
|
|
191
|
-
return [4 /*yield*/,
|
|
192
|
-
expect(screen.getByText('Source Table:')).toBeInTheDocument();
|
|
193
|
-
})];
|
|
191
|
+
return [4 /*yield*/, screen.findByText('Source Table:')];
|
|
194
192
|
case 4:
|
|
195
193
|
_a.sent();
|
|
196
194
|
return [4 /*yield*/, user.hover(screen.getByLabelText('Delete attribute'))];
|
|
@@ -202,7 +200,7 @@ describe('CrosswalkAttributes tests', function () {
|
|
|
202
200
|
});
|
|
203
201
|
}); });
|
|
204
202
|
it('should provide correct value to sourceTable editor and call props.onEditAttribute on editing', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
205
|
-
var user;
|
|
203
|
+
var user, backdrop;
|
|
206
204
|
return __generator(this, function (_a) {
|
|
207
205
|
switch (_a.label) {
|
|
208
206
|
case 0:
|
|
@@ -213,12 +211,11 @@ describe('CrosswalkAttributes tests', function () {
|
|
|
213
211
|
return [4 /*yield*/, user.click(screen.getByText('Source Table'))];
|
|
214
212
|
case 2:
|
|
215
213
|
_a.sent();
|
|
216
|
-
|
|
214
|
+
backdrop = screen.getByRole('presentation').children[0];
|
|
215
|
+
return [4 /*yield*/, user.click(backdrop)];
|
|
217
216
|
case 3:
|
|
218
217
|
_a.sent();
|
|
219
|
-
return [4 /*yield*/,
|
|
220
|
-
expect(screen.getByText('Source Table:')).toBeInTheDocument();
|
|
221
|
-
})];
|
|
218
|
+
return [4 /*yield*/, screen.findByText('Source Table:')];
|
|
222
219
|
case 4:
|
|
223
220
|
_a.sent();
|
|
224
221
|
return [4 /*yield*/, user.type(screen.getAllByRole('textbox')[1], 'new sourceTable')];
|
|
@@ -300,7 +297,7 @@ describe('CrosswalkAttributes tests', function () {
|
|
|
300
297
|
});
|
|
301
298
|
}); });
|
|
302
299
|
it('should not call props.onDeleteAttribute when confirm deleting attribute if attribute is not set', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
303
|
-
var user;
|
|
300
|
+
var user, backdrop;
|
|
304
301
|
return __generator(this, function (_a) {
|
|
305
302
|
switch (_a.label) {
|
|
306
303
|
case 0:
|
|
@@ -311,12 +308,11 @@ describe('CrosswalkAttributes tests', function () {
|
|
|
311
308
|
return [4 /*yield*/, user.click(screen.getByText('Delete Date'))];
|
|
312
309
|
case 2:
|
|
313
310
|
_a.sent();
|
|
314
|
-
|
|
311
|
+
backdrop = screen.getByRole('presentation').children[0];
|
|
312
|
+
return [4 /*yield*/, user.click(backdrop)];
|
|
315
313
|
case 3:
|
|
316
314
|
_a.sent();
|
|
317
|
-
return [4 /*yield*/,
|
|
318
|
-
expect(screen.getByText('Delete Date:')).toBeInTheDocument();
|
|
319
|
-
})];
|
|
315
|
+
return [4 /*yield*/, screen.findByText('Delete Date:')];
|
|
320
316
|
case 4:
|
|
321
317
|
_a.sent();
|
|
322
318
|
return [4 /*yield*/, user.click(within(screen.getByLabelText('Delete attribute')).getByRole('button'))];
|
|
@@ -46,7 +46,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
import React from 'react';
|
|
49
|
-
import { render, screen
|
|
49
|
+
import { render, screen } from '@testing-library/react';
|
|
50
50
|
import userEvent from '@testing-library/user-event';
|
|
51
51
|
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
52
52
|
import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
|
|
@@ -155,7 +155,7 @@ describe('CrosswalkEditor tests', function () {
|
|
|
155
155
|
});
|
|
156
156
|
}); });
|
|
157
157
|
it('should call onAdd with correct params if deleteDate and sourceTable params are filled', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
158
|
-
var user;
|
|
158
|
+
var user, backdrop;
|
|
159
159
|
return __generator(this, function (_a) {
|
|
160
160
|
switch (_a.label) {
|
|
161
161
|
case 0:
|
|
@@ -169,12 +169,11 @@ describe('CrosswalkEditor tests', function () {
|
|
|
169
169
|
return [4 /*yield*/, user.click(screen.getByText('Source Table'))];
|
|
170
170
|
case 3:
|
|
171
171
|
_a.sent();
|
|
172
|
-
|
|
172
|
+
backdrop = screen.getByRole('presentation').children[0];
|
|
173
|
+
return [4 /*yield*/, user.click(backdrop)];
|
|
173
174
|
case 4:
|
|
174
175
|
_a.sent();
|
|
175
|
-
return [4 /*yield*/,
|
|
176
|
-
expect(screen.getByText('Delete Date:')).toBeInTheDocument();
|
|
177
|
-
})];
|
|
176
|
+
return [4 /*yield*/, screen.findByText('Delete Date:')];
|
|
178
177
|
case 5:
|
|
179
178
|
_a.sent();
|
|
180
179
|
return [4 /*yield*/, user.type(screen.getAllByRole('textbox')[1], 's')];
|
|
@@ -46,7 +46,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
import React from 'react';
|
|
49
|
-
import { render, within, screen
|
|
49
|
+
import { render, within, screen } from '@testing-library/react';
|
|
50
50
|
import userEvent from '@testing-library/user-event';
|
|
51
51
|
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
52
52
|
import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
|
|
@@ -367,7 +367,7 @@ describe('CrosswalkRow tests', function () {
|
|
|
367
367
|
});
|
|
368
368
|
}); });
|
|
369
369
|
it('should call props.onEdit when calling CrosswalkAttributes onEditAttribute prop', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
370
|
-
var dateString, newDeleteDate, user;
|
|
370
|
+
var dateString, newDeleteDate, user, backdrop;
|
|
371
371
|
return __generator(this, function (_a) {
|
|
372
372
|
switch (_a.label) {
|
|
373
373
|
case 0:
|
|
@@ -383,12 +383,11 @@ describe('CrosswalkRow tests', function () {
|
|
|
383
383
|
return [4 /*yield*/, user.click(screen.getByText('Delete Date'))];
|
|
384
384
|
case 3:
|
|
385
385
|
_a.sent();
|
|
386
|
-
|
|
386
|
+
backdrop = screen.getByRole('presentation').children[0];
|
|
387
|
+
return [4 /*yield*/, user.click(backdrop)];
|
|
387
388
|
case 4:
|
|
388
389
|
_a.sent();
|
|
389
|
-
return [4 /*yield*/,
|
|
390
|
-
expect(screen.getByText('Delete Date:')).toBeInTheDocument();
|
|
391
|
-
})];
|
|
390
|
+
return [4 /*yield*/, screen.findByText('Delete Date:')];
|
|
392
391
|
case 5:
|
|
393
392
|
_a.sent();
|
|
394
393
|
return [4 /*yield*/, user.type(screen.getByRole('textbox'), dateString + 'A')];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"caption" | "disabled" | "title" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"caption" | "disabled" | "title" | "currentAssignee" | "dialogText" | "dialogContent">;
|
package/esm/index.d.ts
CHANGED
|
@@ -106,7 +106,6 @@ export { DropDownEditor } from './DropDownEditor';
|
|
|
106
106
|
export { EmptySearchResult } from './EmptySearchResult';
|
|
107
107
|
export { FileTypeEditor } from './FileTypeEditor';
|
|
108
108
|
export { MaskingSwitcher } from './MaskingSwitcher';
|
|
109
|
-
export { SaveSegmentDialog } from './SaveSegmentDialog';
|
|
110
109
|
export { EmptyStub } from './EmptyStub';
|
|
111
110
|
export { ProfileBandNavigation } from './ProfileBandNavigation';
|
|
112
111
|
export { ScreenProfileBand } from './ScreenProfileBand';
|
|
@@ -151,7 +150,7 @@ export { QueryBuilderRow } from './QueryBuilderRow';
|
|
|
151
150
|
export { QueryBuilderRowsGroup } from './QueryBuilderRowsGroup';
|
|
152
151
|
export { MultiSelect } from './MultiSelect';
|
|
153
152
|
export { ReactSortableTree, reactSortableTreeHelpers } from './ReactSortableTree';
|
|
154
|
-
export { RCTree } from './RCTree';
|
|
153
|
+
export { RCTree, RCTreeLevelLines, RCTreeSwitchRenderer } from './RCTree';
|
|
155
154
|
export { ReltioGridLayout } from './ReltioGridLayout';
|
|
156
155
|
export { ResizablePanes } from './ResizablePanes';
|
|
157
156
|
export { ProfileResizablePanes } from './ProfileResizablePanes';
|
package/esm/index.js
CHANGED
|
@@ -107,7 +107,6 @@ export { DropDownEditor } from './DropDownEditor';
|
|
|
107
107
|
export { EmptySearchResult } from './EmptySearchResult';
|
|
108
108
|
export { FileTypeEditor } from './FileTypeEditor';
|
|
109
109
|
export { MaskingSwitcher } from './MaskingSwitcher';
|
|
110
|
-
export { SaveSegmentDialog } from './SaveSegmentDialog';
|
|
111
110
|
export { EmptyStub } from './EmptyStub';
|
|
112
111
|
export { ProfileBandNavigation } from './ProfileBandNavigation';
|
|
113
112
|
export { ScreenProfileBand } from './ScreenProfileBand';
|
|
@@ -152,7 +151,7 @@ export { QueryBuilderRow } from './QueryBuilderRow';
|
|
|
152
151
|
export { QueryBuilderRowsGroup } from './QueryBuilderRowsGroup';
|
|
153
152
|
export { MultiSelect } from './MultiSelect';
|
|
154
153
|
export { ReactSortableTree, reactSortableTreeHelpers } from './ReactSortableTree';
|
|
155
|
-
export { RCTree } from './RCTree';
|
|
154
|
+
export { RCTree, RCTreeLevelLines, RCTreeSwitchRenderer } from './RCTree';
|
|
156
155
|
export { ReltioGridLayout } from './ReltioGridLayout';
|
|
157
156
|
export { ResizablePanes } from './ResizablePanes';
|
|
158
157
|
export { ProfileResizablePanes } from './ProfileResizablePanes';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2002",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
10
|
"@react-sigma/core": "3.4.0",
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1891",
|
|
12
12
|
"d3-cloud": "^1.2.5",
|
|
13
13
|
"d3-geo": "^2.0.1",
|
|
14
14
|
"d3-hierarchy": "^2.0.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SavedSearchData } from '@reltio/mdm-sdk';
|
|
3
|
-
type Props = {
|
|
4
|
-
data?: SavedSearchData;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
isSaving: boolean;
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
onSave: (name: string, description: string, isPublic: boolean) => void;
|
|
9
|
-
};
|
|
10
|
-
export declare const SaveSegmentDialog: ({ data, isOpen, isSaving, onClose, onSave }: Props) => React.JSX.Element;
|
|
11
|
-
export {};
|