@truedat/core 7.0.6 → 7.0.8
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/package.json +3 -3
- package/src/components/DropdownMenuItem.js +5 -2
- package/src/components/__tests__/DropdownMenuItem.spec.js +6 -2
- package/src/components/__tests__/FilterMultilevelDropdown.spec.js +12 -4
- package/src/components/__tests__/HierarchyFilterDropdown.spec.js +9 -3
- package/src/components/__tests__/TreeSelector.spec.js +6 -6
- package/src/components/__tests__/__snapshots__/DomainSelector.spec.js.snap +6 -6
- package/src/components/__tests__/__snapshots__/DropdownMenuItem.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/FilterMultilevelDropdown.spec.js.snap +2 -2
- package/src/components/__tests__/__snapshots__/HierarchyFilterDropdown.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/HierarchyNodeFinder.spec.js.snap +5 -5
- package/src/components/__tests__/__snapshots__/HierarchySelector.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/TreeSelector.spec.js.snap +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.8",
|
|
4
4
|
"description": "Truedat Web Core",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@testing-library/react": "^12.0.0",
|
|
37
37
|
"@testing-library/react-hooks": "^8.0.1",
|
|
38
38
|
"@testing-library/user-event": "^13.2.1",
|
|
39
|
-
"@truedat/test": "7.0.
|
|
39
|
+
"@truedat/test": "7.0.8",
|
|
40
40
|
"babel-jest": "^28.1.0",
|
|
41
41
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
42
42
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"react-dom": ">= 16.8.6 < 17",
|
|
119
119
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "ff536a41caac4df0cfa13df66dc2805b3bb7637a"
|
|
122
122
|
}
|
|
@@ -35,9 +35,12 @@ export const DropdownMenuItem = ({
|
|
|
35
35
|
>
|
|
36
36
|
<div style={{ marginLeft: `${8 * level}px` }}>
|
|
37
37
|
{canOpen ? (
|
|
38
|
-
<Icon
|
|
38
|
+
<Icon
|
|
39
|
+
name={open ? "chevron circle right" : "chevron circle down"}
|
|
40
|
+
onClick={handleOpen}
|
|
41
|
+
/>
|
|
39
42
|
) : (
|
|
40
|
-
<Icon />
|
|
43
|
+
<Icon name="circle" />
|
|
41
44
|
)}
|
|
42
45
|
{check && (
|
|
43
46
|
<Icon name={selected ? "check square outline" : "square outline"} />
|
|
@@ -33,14 +33,18 @@ describe("<DropdownMenuItem />", () => {
|
|
|
33
33
|
messages: {},
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
userEvent.click(
|
|
36
|
+
userEvent.click(
|
|
37
|
+
container.querySelector('[class="chevron circle down icon"]')
|
|
38
|
+
);
|
|
37
39
|
await waitFor(() => {
|
|
38
40
|
expect(onOpen).toHaveBeenCalledWith(id);
|
|
39
41
|
});
|
|
40
42
|
rerender(<DropdownMenuItem {...{ ...props, open: true }} />);
|
|
41
43
|
|
|
42
44
|
await waitFor(() => {
|
|
43
|
-
expect(
|
|
45
|
+
expect(
|
|
46
|
+
container.querySelector('[class="chevron circle right icon"]')
|
|
47
|
+
).toBeTruthy();
|
|
44
48
|
});
|
|
45
49
|
});
|
|
46
50
|
|
|
@@ -66,15 +66,21 @@ describe("<FilterMultilevelDropdown />", () => {
|
|
|
66
66
|
|
|
67
67
|
userEvent.click(getByRole("listbox"));
|
|
68
68
|
|
|
69
|
-
userEvent.click(
|
|
69
|
+
userEvent.click(
|
|
70
|
+
container.querySelector('[class="chevron circle down icon"]')
|
|
71
|
+
);
|
|
70
72
|
await waitFor(() => {
|
|
71
73
|
expect(getByRole("option", { name: /Domain 2/i })).toBeTruthy();
|
|
72
74
|
});
|
|
73
|
-
userEvent.click(
|
|
75
|
+
userEvent.click(
|
|
76
|
+
container.querySelector('[class="chevron circle right icon"]')
|
|
77
|
+
);
|
|
74
78
|
await waitFor(() => {
|
|
75
79
|
expect(queryByText(/Domain 2/)).toBeFalsy();
|
|
76
80
|
});
|
|
77
|
-
userEvent.click(
|
|
81
|
+
userEvent.click(
|
|
82
|
+
container.querySelector('[class="chevron circle down icon"]')
|
|
83
|
+
);
|
|
78
84
|
// Select value
|
|
79
85
|
userEvent.click(getByRole("option", { name: /Domain 2/i }));
|
|
80
86
|
await waitFor(() => {
|
|
@@ -120,7 +126,9 @@ describe("<FilterMultilevelDropdown />", () => {
|
|
|
120
126
|
expect(getByRole("option", { name: /Domain 3/i })).toBeTruthy();
|
|
121
127
|
});
|
|
122
128
|
|
|
123
|
-
userEvent.click(
|
|
129
|
+
userEvent.click(
|
|
130
|
+
container.querySelector('[class="chevron circle down icon"]')
|
|
131
|
+
);
|
|
124
132
|
|
|
125
133
|
await waitFor(() => {
|
|
126
134
|
expect(getByRole("option", { name: /Domain 1/i })).toBeTruthy();
|
|
@@ -98,15 +98,21 @@ describe("<HierarchyFilterDropdown />", () => {
|
|
|
98
98
|
|
|
99
99
|
userEvent.click(getByRole("listbox"));
|
|
100
100
|
|
|
101
|
-
userEvent.click(
|
|
101
|
+
userEvent.click(
|
|
102
|
+
container.querySelector('[class="chevron circle down icon"]')
|
|
103
|
+
);
|
|
102
104
|
await waitFor(() => {
|
|
103
105
|
expect(getByRole("option", { name: /bar/i })).toBeTruthy();
|
|
104
106
|
});
|
|
105
|
-
userEvent.click(
|
|
107
|
+
userEvent.click(
|
|
108
|
+
container.querySelector('[class="chevron circle right icon"]')
|
|
109
|
+
);
|
|
106
110
|
await waitFor(() => {
|
|
107
111
|
expect(queryByText(/bar/)).toBeFalsy();
|
|
108
112
|
});
|
|
109
|
-
userEvent.click(
|
|
113
|
+
userEvent.click(
|
|
114
|
+
container.querySelector('[class="chevron circle down icon"]')
|
|
115
|
+
);
|
|
110
116
|
// Select value
|
|
111
117
|
userEvent.click(getByRole("option", { name: /bar/i }));
|
|
112
118
|
await waitFor(() => {
|
|
@@ -101,7 +101,7 @@ describe("<TreeSelector />", () => {
|
|
|
101
101
|
|
|
102
102
|
userEvent.click(
|
|
103
103
|
getByRole("option", { name: /foo/i }).querySelector(
|
|
104
|
-
'i[class="
|
|
104
|
+
'i[class="chevron circle down icon"]'
|
|
105
105
|
)
|
|
106
106
|
);
|
|
107
107
|
|
|
@@ -111,7 +111,7 @@ describe("<TreeSelector />", () => {
|
|
|
111
111
|
|
|
112
112
|
userEvent.click(
|
|
113
113
|
getByRole("option", { name: /bar/i }).querySelector(
|
|
114
|
-
'i[class="
|
|
114
|
+
'i[class="chevron circle down icon"]'
|
|
115
115
|
)
|
|
116
116
|
);
|
|
117
117
|
|
|
@@ -148,7 +148,7 @@ describe("<TreeSelector />", () => {
|
|
|
148
148
|
|
|
149
149
|
userEvent.click(
|
|
150
150
|
getByRole("option", { name: /foo/i }).querySelector(
|
|
151
|
-
'i[class="
|
|
151
|
+
'i[class="chevron circle down icon"]'
|
|
152
152
|
)
|
|
153
153
|
);
|
|
154
154
|
|
|
@@ -183,7 +183,7 @@ describe("<TreeSelector />", () => {
|
|
|
183
183
|
|
|
184
184
|
userEvent.click(
|
|
185
185
|
getByRole("option", { name: /foo/i }).querySelector(
|
|
186
|
-
'i[class="
|
|
186
|
+
'i[class="chevron circle down icon"]'
|
|
187
187
|
)
|
|
188
188
|
);
|
|
189
189
|
|
|
@@ -193,7 +193,7 @@ describe("<TreeSelector />", () => {
|
|
|
193
193
|
|
|
194
194
|
userEvent.click(
|
|
195
195
|
getByRole("option", { name: /bar/i }).querySelector(
|
|
196
|
-
'i[class="
|
|
196
|
+
'i[class="chevron circle down icon"]'
|
|
197
197
|
)
|
|
198
198
|
);
|
|
199
199
|
|
|
@@ -229,7 +229,7 @@ describe("<TreeSelector />", () => {
|
|
|
229
229
|
|
|
230
230
|
userEvent.click(
|
|
231
231
|
getByRole("option", { name: /foo/i }).querySelector(
|
|
232
|
-
'i[class="
|
|
232
|
+
'i[class="chevron circle down icon"]'
|
|
233
233
|
)
|
|
234
234
|
);
|
|
235
235
|
|
|
@@ -47,7 +47,7 @@ exports[`<DomainSelector /> matches latest snapshot 1`] = `
|
|
|
47
47
|
>
|
|
48
48
|
<i
|
|
49
49
|
aria-hidden="true"
|
|
50
|
-
class="
|
|
50
|
+
class="chevron circle down icon"
|
|
51
51
|
/>
|
|
52
52
|
<span
|
|
53
53
|
style="opacity: 1;"
|
|
@@ -66,7 +66,7 @@ exports[`<DomainSelector /> matches latest snapshot 1`] = `
|
|
|
66
66
|
>
|
|
67
67
|
<i
|
|
68
68
|
aria-hidden="true"
|
|
69
|
-
class="icon"
|
|
69
|
+
class="circle icon"
|
|
70
70
|
/>
|
|
71
71
|
<span
|
|
72
72
|
style="opacity: 1;"
|
|
@@ -85,7 +85,7 @@ exports[`<DomainSelector /> matches latest snapshot 1`] = `
|
|
|
85
85
|
>
|
|
86
86
|
<i
|
|
87
87
|
aria-hidden="true"
|
|
88
|
-
class="icon"
|
|
88
|
+
class="circle icon"
|
|
89
89
|
/>
|
|
90
90
|
<span
|
|
91
91
|
style="opacity: 1;"
|
|
@@ -130,7 +130,7 @@ exports[`<DomainSelector /> matches latest snapshot with notDropdow parameter 1`
|
|
|
130
130
|
>
|
|
131
131
|
<i
|
|
132
132
|
aria-hidden="true"
|
|
133
|
-
class="
|
|
133
|
+
class="chevron circle down icon"
|
|
134
134
|
/>
|
|
135
135
|
<span
|
|
136
136
|
style="opacity: 1;"
|
|
@@ -149,7 +149,7 @@ exports[`<DomainSelector /> matches latest snapshot with notDropdow parameter 1`
|
|
|
149
149
|
>
|
|
150
150
|
<i
|
|
151
151
|
aria-hidden="true"
|
|
152
|
-
class="icon"
|
|
152
|
+
class="circle icon"
|
|
153
153
|
/>
|
|
154
154
|
<span
|
|
155
155
|
style="opacity: 1;"
|
|
@@ -168,7 +168,7 @@ exports[`<DomainSelector /> matches latest snapshot with notDropdow parameter 1`
|
|
|
168
168
|
>
|
|
169
169
|
<i
|
|
170
170
|
aria-hidden="true"
|
|
171
|
-
class="icon"
|
|
171
|
+
class="circle icon"
|
|
172
172
|
/>
|
|
173
173
|
<span
|
|
174
174
|
style="opacity: 1;"
|
|
@@ -45,7 +45,7 @@ exports[`<FilterMultilevelDropdown /> matches the latest snapshot 1`] = `
|
|
|
45
45
|
>
|
|
46
46
|
<i
|
|
47
47
|
aria-hidden="true"
|
|
48
|
-
class="
|
|
48
|
+
class="chevron circle down icon"
|
|
49
49
|
/>
|
|
50
50
|
<i
|
|
51
51
|
aria-hidden="true"
|
|
@@ -68,7 +68,7 @@ exports[`<FilterMultilevelDropdown /> matches the latest snapshot 1`] = `
|
|
|
68
68
|
>
|
|
69
69
|
<i
|
|
70
70
|
aria-hidden="true"
|
|
71
|
-
class="icon"
|
|
71
|
+
class="circle icon"
|
|
72
72
|
/>
|
|
73
73
|
<i
|
|
74
74
|
aria-hidden="true"
|
|
@@ -51,7 +51,7 @@ exports[`HierarchyNodeFinder matches the latest snapshot 1`] = `
|
|
|
51
51
|
>
|
|
52
52
|
<i
|
|
53
53
|
aria-hidden="true"
|
|
54
|
-
class="icon"
|
|
54
|
+
class="circle icon"
|
|
55
55
|
/>
|
|
56
56
|
<span
|
|
57
57
|
style="opacity: 1;"
|
|
@@ -70,7 +70,7 @@ exports[`HierarchyNodeFinder matches the latest snapshot 1`] = `
|
|
|
70
70
|
>
|
|
71
71
|
<i
|
|
72
72
|
aria-hidden="true"
|
|
73
|
-
class="
|
|
73
|
+
class="chevron circle down icon"
|
|
74
74
|
/>
|
|
75
75
|
<span
|
|
76
76
|
style="opacity: 1;"
|
|
@@ -89,7 +89,7 @@ exports[`HierarchyNodeFinder matches the latest snapshot 1`] = `
|
|
|
89
89
|
>
|
|
90
90
|
<i
|
|
91
91
|
aria-hidden="true"
|
|
92
|
-
class="
|
|
92
|
+
class="chevron circle right icon"
|
|
93
93
|
/>
|
|
94
94
|
<span
|
|
95
95
|
style="opacity: 1;"
|
|
@@ -108,7 +108,7 @@ exports[`HierarchyNodeFinder matches the latest snapshot 1`] = `
|
|
|
108
108
|
>
|
|
109
109
|
<i
|
|
110
110
|
aria-hidden="true"
|
|
111
|
-
class="
|
|
111
|
+
class="chevron circle right icon"
|
|
112
112
|
/>
|
|
113
113
|
<span
|
|
114
114
|
style="opacity: 1;"
|
|
@@ -127,7 +127,7 @@ exports[`HierarchyNodeFinder matches the latest snapshot 1`] = `
|
|
|
127
127
|
>
|
|
128
128
|
<i
|
|
129
129
|
aria-hidden="true"
|
|
130
|
-
class="icon"
|
|
130
|
+
class="circle icon"
|
|
131
131
|
/>
|
|
132
132
|
<span
|
|
133
133
|
style="opacity: 1;"
|
|
@@ -47,7 +47,7 @@ exports[`<TreeSelector /> matches latest snapshot 1`] = `
|
|
|
47
47
|
>
|
|
48
48
|
<i
|
|
49
49
|
aria-hidden="true"
|
|
50
|
-
class="
|
|
50
|
+
class="chevron circle down icon"
|
|
51
51
|
/>
|
|
52
52
|
<span
|
|
53
53
|
style="opacity: 1;"
|
|
@@ -92,7 +92,7 @@ exports[`<TreeSelector /> matches latest snapshot with notDropdown parameter 1`]
|
|
|
92
92
|
>
|
|
93
93
|
<i
|
|
94
94
|
aria-hidden="true"
|
|
95
|
-
class="
|
|
95
|
+
class="chevron circle down icon"
|
|
96
96
|
/>
|
|
97
97
|
<span
|
|
98
98
|
style="opacity: 1;"
|