@truedat/dd 7.10.4 → 7.11.1
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.11.1",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@testing-library/jest-dom": "^6.6.3",
|
|
49
49
|
"@testing-library/react": "^16.3.0",
|
|
50
50
|
"@testing-library/user-event": "^14.6.1",
|
|
51
|
-
"@truedat/test": "7.
|
|
51
|
+
"@truedat/test": "7.11.1",
|
|
52
52
|
"identity-obj-proxy": "^3.0.0",
|
|
53
53
|
"jest": "^29.7.0",
|
|
54
54
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"svg-pan-zoom": "^3.6.2",
|
|
84
84
|
"swr": "^2.3.3"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "efc0969708811b5e4fc2ea39e628a1b2691e4042"
|
|
87
87
|
}
|
|
@@ -67,7 +67,9 @@ export const GrantRequestBulkActions = ({
|
|
|
67
67
|
must: { id: selectedGrantRequests },
|
|
68
68
|
}
|
|
69
69
|
).then((data) => {
|
|
70
|
-
navigate(GRANT_REQUESTS_APPROVALS_RESULT
|
|
70
|
+
navigate(GRANT_REQUESTS_APPROVALS_RESULT, {
|
|
71
|
+
state: _.prop("data.data")(data),
|
|
72
|
+
});
|
|
71
73
|
});
|
|
72
74
|
};
|
|
73
75
|
|
|
@@ -41,21 +41,30 @@ const StructureSuggestionLinkForm = lazy(
|
|
|
41
41
|
);
|
|
42
42
|
|
|
43
43
|
const RuleImplementationsTable = lazy(
|
|
44
|
-
() => import("@truedat/dq/components/
|
|
44
|
+
() => import("@truedat/dq/components/SimpleRuleImplementationsTable")
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
const CustomTab = ({ tabs, activeTab }) => {
|
|
48
48
|
if (_.isEmpty(tabs)) return null;
|
|
49
|
-
const tab = _.find((tab) =>
|
|
49
|
+
const tab = _.find((tab) => tab.name === activeTab)(tabs);
|
|
50
50
|
return tab?.content;
|
|
51
|
-
}
|
|
51
|
+
};
|
|
52
52
|
|
|
53
53
|
export const StructureTabPane = ({ path }) => {
|
|
54
54
|
const customTabs = useStructureCustomTabs();
|
|
55
55
|
const tabVisibility = useSelector(getTabVisibility);
|
|
56
|
-
const structureTabsOrder = useSelector(state => state.structureTabsOrder);
|
|
57
|
-
const columns = useSelector(state =>
|
|
58
|
-
|
|
56
|
+
const structureTabsOrder = useSelector((state) => state.structureTabsOrder);
|
|
57
|
+
const columns = useSelector((state) =>
|
|
58
|
+
getLinkedImplementationsToStructuresColumns(state)
|
|
59
|
+
);
|
|
60
|
+
const ruleImplementations = useSelector((state) => state.ruleImplementations);
|
|
61
|
+
|
|
62
|
+
const activeTab = getActiveTab({
|
|
63
|
+
tabVisibility,
|
|
64
|
+
path,
|
|
65
|
+
structureTabsOrder,
|
|
66
|
+
customTabs,
|
|
67
|
+
});
|
|
59
68
|
|
|
60
69
|
return (
|
|
61
70
|
<ErrorBoundary>
|
|
@@ -90,7 +99,10 @@ export const StructureTabPane = ({ path }) => {
|
|
|
90
99
|
{activeTab === "events" && <StructureEvents />}
|
|
91
100
|
{activeTab === "roles" && <StructureRoles />}
|
|
92
101
|
{activeTab === "rules" && tabVisibility.rules && (
|
|
93
|
-
<RuleImplementationsTable
|
|
102
|
+
<RuleImplementationsTable
|
|
103
|
+
columns={columns}
|
|
104
|
+
ruleImplementations={ruleImplementations}
|
|
105
|
+
/>
|
|
94
106
|
)}
|
|
95
107
|
{activeTab === "metadata" && tabVisibility.metadata && (
|
|
96
108
|
<StructureMetadata />
|
|
@@ -102,6 +114,6 @@ export const StructureTabPane = ({ path }) => {
|
|
|
102
114
|
);
|
|
103
115
|
};
|
|
104
116
|
|
|
105
|
-
StructureTabPane.propTypes = { path: PropTypes.string
|
|
117
|
+
StructureTabPane.propTypes = { path: PropTypes.string };
|
|
106
118
|
|
|
107
119
|
export default StructureTabPane;
|
|
@@ -12,11 +12,13 @@ export const StructuresEditableDownloadOption = ({
|
|
|
12
12
|
pendingStructureNotes,
|
|
13
13
|
}) => {
|
|
14
14
|
const { formatMessage, locale } = useIntl();
|
|
15
|
+
|
|
15
16
|
const {
|
|
16
17
|
searchData,
|
|
17
18
|
loading: structuresLoading,
|
|
18
19
|
filterParams: searchParams,
|
|
19
20
|
} = useSearchContext();
|
|
21
|
+
|
|
20
22
|
const { trigger: triggerDownload, isMutating: structuresDownloading } =
|
|
21
23
|
useDataStructureDownload();
|
|
22
24
|
|
|
@@ -56,7 +56,7 @@ jest.mock("@truedat/lm/components/StructureRelationForm", () => () => (
|
|
|
56
56
|
<div>StructureRelationForm</div>
|
|
57
57
|
));
|
|
58
58
|
jest.mock("@truedat/profile", () => () => <div>StructureProfile</div>);
|
|
59
|
-
jest.mock("@truedat/dq/components/
|
|
59
|
+
jest.mock("@truedat/dq/components/SimpleRuleImplementationsTable", () => () => (
|
|
60
60
|
<div>RuleImplementationsTable</div>
|
|
61
61
|
));
|
|
62
62
|
|
|
@@ -73,132 +73,193 @@ describe("<StructureTabPane />", () => {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
it("renders correctly with fields tab", async () => {
|
|
76
|
-
jest
|
|
77
|
-
|
|
76
|
+
jest
|
|
77
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
78
|
+
.mockReturnValue(tabVisibility);
|
|
79
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_FIELDS} />, {
|
|
80
|
+
state,
|
|
81
|
+
});
|
|
78
82
|
await waitForLoad(rendered);
|
|
79
83
|
expect(rendered.container).toMatchSnapshot();
|
|
80
84
|
});
|
|
81
85
|
|
|
82
86
|
it("renders correctly with notes edit route", async () => {
|
|
83
|
-
const rendered = render(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
);
|
|
87
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_NOTES_EDIT} />, {
|
|
88
|
+
routes: [STRUCTURE_NOTES_EDIT],
|
|
89
|
+
state,
|
|
90
|
+
});
|
|
87
91
|
await waitForLoad(rendered);
|
|
88
92
|
expect(rendered.container).toMatchSnapshot();
|
|
89
93
|
});
|
|
90
94
|
|
|
91
95
|
it("renders correctly with notes default route", async () => {
|
|
92
|
-
const rendered = render(
|
|
93
|
-
|
|
94
|
-
);
|
|
96
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_NOTES} />, {
|
|
97
|
+
state,
|
|
98
|
+
});
|
|
95
99
|
await waitForLoad(rendered);
|
|
96
100
|
expect(rendered.container).toMatchSnapshot();
|
|
97
101
|
});
|
|
98
102
|
|
|
99
103
|
it("renders correctly with grants tab", async () => {
|
|
100
|
-
jest
|
|
101
|
-
|
|
104
|
+
jest
|
|
105
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
106
|
+
.mockReturnValue(tabVisibility);
|
|
107
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_GRANTS} />, {
|
|
108
|
+
state,
|
|
109
|
+
});
|
|
102
110
|
await waitForLoad(rendered);
|
|
103
111
|
expect(rendered.container).toMatchSnapshot();
|
|
104
112
|
});
|
|
105
113
|
|
|
106
114
|
it("renders correctly with profile tab", async () => {
|
|
107
|
-
jest
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
jest
|
|
116
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
117
|
+
.mockReturnValue(tabVisibility);
|
|
118
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_PROFILE} />, {
|
|
119
|
+
state,
|
|
120
|
+
});
|
|
111
121
|
await waitForLoad(rendered);
|
|
112
122
|
expect(rendered.container).toMatchSnapshot();
|
|
113
123
|
});
|
|
114
124
|
|
|
115
125
|
it("renders correctly with metadata tab", async () => {
|
|
116
|
-
jest
|
|
117
|
-
|
|
126
|
+
jest
|
|
127
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
128
|
+
.mockReturnValue(tabVisibility);
|
|
129
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_METADATA} />, {
|
|
130
|
+
state,
|
|
131
|
+
});
|
|
118
132
|
await waitForLoad(rendered);
|
|
119
133
|
expect(rendered.container).toMatchSnapshot();
|
|
120
134
|
});
|
|
121
135
|
|
|
122
136
|
it("renders correctly with rules tab", async () => {
|
|
123
|
-
jest
|
|
124
|
-
|
|
137
|
+
jest
|
|
138
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
139
|
+
.mockReturnValue(tabVisibility);
|
|
140
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_RULES} />, {
|
|
141
|
+
state,
|
|
142
|
+
});
|
|
125
143
|
await waitForLoad(rendered);
|
|
126
144
|
expect(rendered.container).toMatchSnapshot();
|
|
127
145
|
});
|
|
128
146
|
|
|
129
147
|
it("renders correctly with links tab", async () => {
|
|
130
|
-
jest
|
|
131
|
-
|
|
148
|
+
jest
|
|
149
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
150
|
+
.mockReturnValue(tabVisibility);
|
|
151
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_LINKS} />, {
|
|
152
|
+
state,
|
|
153
|
+
});
|
|
132
154
|
await waitForLoad(rendered);
|
|
133
155
|
expect(rendered.container).toMatchSnapshot();
|
|
134
156
|
});
|
|
135
157
|
|
|
136
158
|
it("renders correctly with structure links tab", async () => {
|
|
137
|
-
jest
|
|
138
|
-
|
|
159
|
+
jest
|
|
160
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
161
|
+
.mockReturnValue(tabVisibility);
|
|
162
|
+
const rendered = render(
|
|
163
|
+
<StructureTabPane path={STRUCTURE_STRUCTURE_LINKS} />,
|
|
164
|
+
{ state }
|
|
139
165
|
);
|
|
140
166
|
await waitForLoad(rendered);
|
|
141
167
|
expect(rendered.container).toMatchSnapshot();
|
|
142
168
|
});
|
|
143
169
|
|
|
144
170
|
it("renders correctly with parents tab", async () => {
|
|
145
|
-
jest
|
|
146
|
-
|
|
171
|
+
jest
|
|
172
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
173
|
+
.mockReturnValue(tabVisibility);
|
|
174
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_PARENTS} />, {
|
|
175
|
+
state,
|
|
176
|
+
});
|
|
147
177
|
await waitForLoad(rendered);
|
|
148
178
|
expect(rendered.container).toMatchSnapshot();
|
|
149
179
|
});
|
|
150
180
|
|
|
151
181
|
it("renders correctly with children tab", async () => {
|
|
152
|
-
jest
|
|
153
|
-
|
|
182
|
+
jest
|
|
183
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
184
|
+
.mockReturnValue(tabVisibility);
|
|
185
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_CHILDREN} />, {
|
|
186
|
+
state,
|
|
187
|
+
});
|
|
154
188
|
await waitForLoad(rendered);
|
|
155
189
|
expect(rendered.container).toMatchSnapshot();
|
|
156
190
|
});
|
|
157
191
|
|
|
158
192
|
it("renders correctly with versions tab", async () => {
|
|
159
|
-
jest
|
|
160
|
-
|
|
193
|
+
jest
|
|
194
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
195
|
+
.mockReturnValue(tabVisibility);
|
|
196
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_VERSIONS} />, {
|
|
197
|
+
state,
|
|
198
|
+
});
|
|
161
199
|
await waitForLoad(rendered);
|
|
162
200
|
expect(rendered.container).toMatchSnapshot();
|
|
163
201
|
});
|
|
164
202
|
|
|
165
203
|
it("renders correctly with events tab", async () => {
|
|
166
|
-
jest
|
|
167
|
-
|
|
204
|
+
jest
|
|
205
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
206
|
+
.mockReturnValue(tabVisibility);
|
|
207
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_EVENTS} />, {
|
|
208
|
+
state,
|
|
209
|
+
});
|
|
168
210
|
await waitForLoad(rendered);
|
|
169
211
|
expect(rendered.container).toMatchSnapshot();
|
|
170
212
|
});
|
|
171
213
|
|
|
172
214
|
it("renders correctly with roles tab", async () => {
|
|
173
|
-
jest
|
|
174
|
-
|
|
215
|
+
jest
|
|
216
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
217
|
+
.mockReturnValue(tabVisibility);
|
|
218
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_MEMBERS} />, {
|
|
219
|
+
state,
|
|
220
|
+
});
|
|
175
221
|
await waitForLoad(rendered);
|
|
176
222
|
expect(rendered.container).toMatchSnapshot();
|
|
177
223
|
});
|
|
178
224
|
|
|
179
225
|
it("renders correctly with lineage tab", async () => {
|
|
180
|
-
jest
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
226
|
+
jest
|
|
227
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
228
|
+
.mockReturnValue(tabVisibility);
|
|
229
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_LINEAGE} />, {
|
|
230
|
+
state,
|
|
231
|
+
});
|
|
184
232
|
await waitForLoad(rendered);
|
|
185
233
|
expect(rendered.container).toMatchSnapshot();
|
|
186
234
|
});
|
|
187
235
|
|
|
188
236
|
it("renders correctly with impact tab", async () => {
|
|
189
|
-
jest
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
237
|
+
jest
|
|
238
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
239
|
+
.mockReturnValue(tabVisibility);
|
|
240
|
+
const rendered = render(<StructureTabPane path={STRUCTURE_IMPACT} />, {
|
|
241
|
+
state,
|
|
242
|
+
});
|
|
193
243
|
await waitForLoad(rendered);
|
|
194
244
|
expect(rendered.container).toMatchSnapshot();
|
|
195
245
|
});
|
|
196
246
|
|
|
197
247
|
it("renders correctly with custom tab", async () => {
|
|
198
|
-
jest
|
|
199
|
-
|
|
248
|
+
jest
|
|
249
|
+
.spyOn(getTabVisibilityModule, "getTabVisibility")
|
|
250
|
+
.mockReturnValue(tabVisibility);
|
|
251
|
+
jest
|
|
252
|
+
.spyOn(useCustomTabsModule, "useStructureCustomTabs")
|
|
253
|
+
.mockReturnValue([
|
|
254
|
+
{
|
|
255
|
+
name: "custom",
|
|
256
|
+
route: "/structures/:id/custom",
|
|
257
|
+
content: <p>Custom</p>,
|
|
258
|
+
},
|
|
259
|
+
]);
|
|
200
260
|
const rendered = render(
|
|
201
|
-
<StructureTabPane path={"/structures/:id/custom"} />,
|
|
261
|
+
<StructureTabPane path={"/structures/:id/custom"} />,
|
|
262
|
+
{ state }
|
|
202
263
|
);
|
|
203
264
|
await waitForLoad(rendered);
|
|
204
265
|
await waitFor(() => {
|