@truedat/bg 7.0.4 → 7.0.6
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 +6 -6
- package/src/concepts/components/DomainConcepts.js +1 -4
- package/src/concepts/components/__tests__/__snapshots__/ConceptForm.spec.js.snap +2 -2
- package/src/concepts/components/__tests__/__snapshots__/ConceptsBulkUpdate.spec.js.snap +2 -2
- package/src/concepts/components/__tests__/__snapshots__/SharedToForm.spec.js.snap +2 -2
- package/src/hooks/useDomains.js +77 -0
- package/src/messages/en.js +6 -0
- package/src/messages/es.js +5 -0
- package/src/reducers/index.js +0 -1
- package/src/taxonomy/components/AddDomainMember.js +1 -7
- package/src/taxonomy/components/Domain.js +80 -84
- package/src/taxonomy/components/DomainActions.js +57 -84
- package/src/taxonomy/components/DomainCrumbs.js +51 -43
- package/src/taxonomy/components/DomainDetail.js +88 -46
- package/src/taxonomy/components/DomainForm.js +34 -36
- package/src/taxonomy/components/DomainImplementations.js +1 -4
- package/src/taxonomy/components/DomainMembers.js +8 -1
- package/src/taxonomy/components/DomainRoutes.js +8 -55
- package/src/taxonomy/components/DomainStructures.js +1 -4
- package/src/taxonomy/components/DomainTabs.js +22 -29
- package/src/taxonomy/components/Domains.js +66 -27
- package/src/taxonomy/components/DomainsActions.js +5 -14
- package/src/taxonomy/components/EditDomain.js +35 -21
- package/src/taxonomy/components/NewDomain.js +47 -22
- package/src/taxonomy/components/__tests__/Domain.spec.js +17 -8
- package/src/taxonomy/components/__tests__/DomainActions.spec.js +62 -7
- package/src/taxonomy/components/__tests__/DomainCrumbs.spec.js +18 -5
- package/src/taxonomy/components/__tests__/DomainDetail.spec.js +87 -4
- package/src/taxonomy/components/__tests__/DomainForm.spec.js +189 -4
- package/src/taxonomy/components/__tests__/DomainMembers.spec.js +1 -3
- package/src/taxonomy/components/__tests__/DomainStructures.spec.js +3 -2
- package/src/taxonomy/components/__tests__/Domains.spec.js +103 -6
- package/src/taxonomy/components/__tests__/EditDomain.spec.js +56 -5
- package/src/taxonomy/components/__tests__/NewDomain.spec.js +65 -6
- package/src/taxonomy/components/__tests__/__snapshots__/AddDomainMember.spec.js.snap +0 -10
- package/src/taxonomy/components/__tests__/__snapshots__/Domain.spec.js.snap +35 -48
- package/src/taxonomy/components/__tests__/__snapshots__/DomainActions.spec.js.snap +56 -1
- package/src/taxonomy/components/__tests__/__snapshots__/DomainCrumbs.spec.js.snap +14 -2
- package/src/taxonomy/components/__tests__/__snapshots__/DomainDetail.spec.js.snap +93 -40
- package/src/taxonomy/components/__tests__/__snapshots__/DomainForm.spec.js.snap +7 -7
- package/src/taxonomy/components/__tests__/__snapshots__/Domains.spec.js.snap +75 -10
- package/src/taxonomy/components/__tests__/__snapshots__/DomainsActions.spec.js.snap +20 -1
- package/src/taxonomy/components/__tests__/__snapshots__/EditDomain.spec.js.snap +192 -30
- package/src/taxonomy/components/__tests__/__snapshots__/NewDomain.spec.js.snap +405 -28
- package/src/taxonomy/components/index.js +1 -2
- package/src/taxonomy/index.js +0 -1
- package/src/taxonomy/routines.js +0 -10
- package/src/taxonomy/sagas/index.js +2 -21
- package/src/taxonomy/selectors/getDomainsConcept.js +0 -13
- package/src/taxonomy/selectors/index.js +0 -16
- package/src/taxonomy/components/DomainCards.js +0 -97
- package/src/taxonomy/components/DomainLoader.js +0 -60
- package/src/taxonomy/components/DomainMembersLoader.js +0 -44
- package/src/taxonomy/components/DomainsLoader.js +0 -40
- package/src/taxonomy/components/__tests__/DomainCards.spec.js +0 -30
- package/src/taxonomy/components/__tests__/DomainsLoader.spec.js +0 -38
- package/src/taxonomy/components/__tests__/__snapshots__/DomainCards.spec.js.snap +0 -160
- package/src/taxonomy/reducers/__tests__/domain.spec.js +0 -58
- package/src/taxonomy/reducers/__tests__/domainConceptLoading.spec.js +0 -26
- package/src/taxonomy/reducers/__tests__/domainCreating.spec.js +0 -24
- package/src/taxonomy/reducers/__tests__/domainLoading.spec.js +0 -22
- package/src/taxonomy/reducers/__tests__/domainMembersActions.spec.js +0 -38
- package/src/taxonomy/reducers/__tests__/domainMembersLoading.spec.js +0 -26
- package/src/taxonomy/reducers/__tests__/domainRedirect.spec.js +0 -36
- package/src/taxonomy/reducers/__tests__/domainUpdating.spec.js +0 -24
- package/src/taxonomy/reducers/__tests__/domains.spec.js +0 -30
- package/src/taxonomy/reducers/__tests__/domainsActions.spec.js +0 -36
- package/src/taxonomy/reducers/__tests__/domainsConcept.spec.js +0 -30
- package/src/taxonomy/reducers/__tests__/domainsFilter.spec.js +0 -41
- package/src/taxonomy/reducers/__tests__/domainsLoading.spec.js +0 -22
- package/src/taxonomy/reducers/domain.js +0 -32
- package/src/taxonomy/reducers/domainActions.js +0 -19
- package/src/taxonomy/reducers/domainCreating.js +0 -14
- package/src/taxonomy/reducers/domainLoading.js +0 -14
- package/src/taxonomy/reducers/domainMembersActions.js +0 -22
- package/src/taxonomy/reducers/domainMembersLoading.js +0 -12
- package/src/taxonomy/reducers/domainRedirect.js +0 -25
- package/src/taxonomy/reducers/domainUpdating.js +0 -14
- package/src/taxonomy/reducers/domains.js +0 -19
- package/src/taxonomy/reducers/domainsActions.js +0 -20
- package/src/taxonomy/reducers/domainsConcept.js +0 -19
- package/src/taxonomy/reducers/domainsConceptLoading.js +0 -12
- package/src/taxonomy/reducers/domainsFilter.js +0 -24
- package/src/taxonomy/reducers/domainsLoading.js +0 -12
- package/src/taxonomy/reducers/index.js +0 -31
- package/src/taxonomy/sagas/__tests__/fetchDomain.spec.js +0 -69
- package/src/taxonomy/sagas/__tests__/fetchDomains.spec.js +0 -90
- package/src/taxonomy/sagas/createDomain.js +0 -27
- package/src/taxonomy/sagas/deleteDomain.js +0 -34
- package/src/taxonomy/sagas/fetchDomain.js +0 -30
- package/src/taxonomy/sagas/fetchDomains.js +0 -37
- package/src/taxonomy/sagas/updateDomain.js +0 -30
- package/src/taxonomy/selectors/__tests__/domainParentOptionsSelector.spec.js +0 -24
- package/src/taxonomy/selectors/__tests__/getDomainActions.spec.js +0 -46
- package/src/taxonomy/selectors/__tests__/getDomainGroups.spec.js +0 -17
- package/src/taxonomy/selectors/__tests__/getDomainTypes.spec.js +0 -14
- package/src/taxonomy/selectors/domainParentOptionsSelector.js +0 -12
- package/src/taxonomy/selectors/getDomainActions.js +0 -32
- package/src/taxonomy/selectors/getDomainGroups.js +0 -11
|
@@ -1,35 +1,412 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`<NewDomain /> matches the latest snapshot 1`] = `
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
/>
|
|
8
|
-
<Container
|
|
9
|
-
as={[Function]}
|
|
10
|
-
text={true}
|
|
3
|
+
exports[`<NewDomain /> matches the latest snapshot main domain 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ui breadcrumb"
|
|
11
7
|
>
|
|
12
|
-
<
|
|
13
|
-
|
|
8
|
+
<a
|
|
9
|
+
class="active section"
|
|
10
|
+
href="/domains"
|
|
14
11
|
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
Taxonomy
|
|
13
|
+
</a>
|
|
14
|
+
<i
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
class="right angle icon divider"
|
|
17
|
+
/>
|
|
18
|
+
<div
|
|
19
|
+
class="active section"
|
|
20
|
+
>
|
|
21
|
+
New domain
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div
|
|
25
|
+
class="ui segment ui text container"
|
|
26
|
+
>
|
|
27
|
+
<h2
|
|
28
|
+
class="ui header"
|
|
29
|
+
>
|
|
30
|
+
<i
|
|
31
|
+
aria-hidden="true"
|
|
32
|
+
class="cube icon"
|
|
18
33
|
/>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
34
|
+
<div
|
|
35
|
+
class="content"
|
|
36
|
+
>
|
|
37
|
+
New domain
|
|
38
|
+
</div>
|
|
39
|
+
</h2>
|
|
40
|
+
<form
|
|
41
|
+
class="ui form"
|
|
42
|
+
>
|
|
43
|
+
<div
|
|
44
|
+
class="required field"
|
|
45
|
+
>
|
|
46
|
+
<label
|
|
47
|
+
for="name"
|
|
48
|
+
>
|
|
49
|
+
Name
|
|
50
|
+
</label>
|
|
51
|
+
<div
|
|
52
|
+
class="ui input"
|
|
53
|
+
>
|
|
54
|
+
<input
|
|
55
|
+
autocomplete="off"
|
|
56
|
+
id="name"
|
|
57
|
+
name="name"
|
|
58
|
+
placeholder="Name-placeholder"
|
|
59
|
+
required=""
|
|
60
|
+
type="text"
|
|
61
|
+
value=""
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div
|
|
66
|
+
class="required field"
|
|
67
|
+
>
|
|
68
|
+
<label
|
|
69
|
+
for="external_id"
|
|
70
|
+
>
|
|
71
|
+
External Id
|
|
72
|
+
</label>
|
|
73
|
+
<div
|
|
74
|
+
class="ui input"
|
|
75
|
+
>
|
|
76
|
+
<input
|
|
77
|
+
autocomplete="off"
|
|
78
|
+
id="external_id"
|
|
79
|
+
name="external_id"
|
|
80
|
+
placeholder="External_id-placeholder"
|
|
81
|
+
required=""
|
|
82
|
+
type="text"
|
|
83
|
+
value=""
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div
|
|
88
|
+
class="field"
|
|
89
|
+
>
|
|
90
|
+
<label>
|
|
91
|
+
Domain_group
|
|
92
|
+
</label>
|
|
93
|
+
<div
|
|
94
|
+
aria-expanded="false"
|
|
95
|
+
class="ui basic search selection dropdown"
|
|
96
|
+
name="domain_group"
|
|
97
|
+
role="combobox"
|
|
98
|
+
>
|
|
99
|
+
<input
|
|
100
|
+
aria-autocomplete="list"
|
|
101
|
+
autocomplete="off"
|
|
102
|
+
class="search"
|
|
103
|
+
tabindex="0"
|
|
104
|
+
type="text"
|
|
105
|
+
value=""
|
|
106
|
+
/>
|
|
107
|
+
<div
|
|
108
|
+
aria-atomic="true"
|
|
109
|
+
aria-live="polite"
|
|
110
|
+
class="divider default text"
|
|
111
|
+
role="alert"
|
|
112
|
+
>
|
|
113
|
+
Domain_group-placeholder
|
|
114
|
+
</div>
|
|
115
|
+
<i
|
|
116
|
+
aria-hidden="true"
|
|
117
|
+
class="dropdown icon"
|
|
118
|
+
/>
|
|
119
|
+
<div
|
|
120
|
+
class="menu transition"
|
|
121
|
+
role="listbox"
|
|
122
|
+
>
|
|
123
|
+
<div
|
|
124
|
+
class="message"
|
|
125
|
+
>
|
|
126
|
+
No results found.
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div
|
|
132
|
+
class="field"
|
|
133
|
+
>
|
|
134
|
+
<label>
|
|
135
|
+
Type
|
|
136
|
+
</label>
|
|
137
|
+
<div
|
|
138
|
+
aria-expanded="false"
|
|
139
|
+
class="ui basic search selection dropdown"
|
|
140
|
+
name="type"
|
|
141
|
+
role="combobox"
|
|
142
|
+
>
|
|
143
|
+
<input
|
|
144
|
+
aria-autocomplete="list"
|
|
145
|
+
autocomplete="off"
|
|
146
|
+
class="search"
|
|
147
|
+
tabindex="0"
|
|
148
|
+
type="text"
|
|
149
|
+
value=""
|
|
150
|
+
/>
|
|
151
|
+
<div
|
|
152
|
+
aria-atomic="true"
|
|
153
|
+
aria-live="polite"
|
|
154
|
+
class="divider default text"
|
|
155
|
+
role="alert"
|
|
156
|
+
>
|
|
157
|
+
Type-placeholder
|
|
158
|
+
</div>
|
|
159
|
+
<i
|
|
160
|
+
aria-hidden="true"
|
|
161
|
+
class="dropdown icon"
|
|
162
|
+
/>
|
|
163
|
+
<div
|
|
164
|
+
class="menu transition"
|
|
165
|
+
role="listbox"
|
|
166
|
+
>
|
|
167
|
+
<div
|
|
168
|
+
aria-checked="true"
|
|
169
|
+
aria-selected="true"
|
|
170
|
+
class="active selected item"
|
|
171
|
+
role="option"
|
|
172
|
+
style="pointer-events: all;"
|
|
173
|
+
>
|
|
174
|
+
<span
|
|
175
|
+
class="text"
|
|
176
|
+
/>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
<div
|
|
182
|
+
class="field"
|
|
183
|
+
>
|
|
184
|
+
<label>
|
|
185
|
+
Description
|
|
186
|
+
</label>
|
|
187
|
+
<textarea
|
|
188
|
+
autocomplete="off"
|
|
189
|
+
name="description"
|
|
190
|
+
placeholder="Description-placeholder"
|
|
191
|
+
rows="3"
|
|
22
192
|
/>
|
|
23
|
-
</
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</
|
|
193
|
+
</div>
|
|
194
|
+
<div
|
|
195
|
+
class="actions"
|
|
196
|
+
>
|
|
197
|
+
<button
|
|
198
|
+
class="ui primary disabled right floated button"
|
|
199
|
+
disabled=""
|
|
200
|
+
tabindex="-1"
|
|
201
|
+
type="submit"
|
|
202
|
+
>
|
|
203
|
+
Save
|
|
204
|
+
</button>
|
|
205
|
+
<a
|
|
206
|
+
class="ui secondary button"
|
|
207
|
+
href="/"
|
|
208
|
+
role="button"
|
|
209
|
+
>
|
|
210
|
+
Cancel
|
|
211
|
+
</a>
|
|
212
|
+
</div>
|
|
213
|
+
</form>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
`;
|
|
217
|
+
|
|
218
|
+
exports[`<NewDomain /> matches the latest snapshot subdomain 1`] = `
|
|
219
|
+
<div>
|
|
220
|
+
<div
|
|
221
|
+
class="ui segment ui text container"
|
|
222
|
+
>
|
|
223
|
+
<h2
|
|
224
|
+
class="ui header"
|
|
225
|
+
>
|
|
226
|
+
<i
|
|
227
|
+
aria-hidden="true"
|
|
228
|
+
class="cube icon"
|
|
229
|
+
/>
|
|
230
|
+
<div
|
|
231
|
+
class="content"
|
|
232
|
+
>
|
|
233
|
+
New subdomain
|
|
234
|
+
</div>
|
|
235
|
+
</h2>
|
|
236
|
+
<form
|
|
237
|
+
class="ui form"
|
|
238
|
+
>
|
|
239
|
+
<div
|
|
240
|
+
class="required field"
|
|
241
|
+
>
|
|
242
|
+
<label
|
|
243
|
+
for="name"
|
|
244
|
+
>
|
|
245
|
+
Name
|
|
246
|
+
</label>
|
|
247
|
+
<div
|
|
248
|
+
class="ui input"
|
|
249
|
+
>
|
|
250
|
+
<input
|
|
251
|
+
autocomplete="off"
|
|
252
|
+
id="name"
|
|
253
|
+
name="name"
|
|
254
|
+
placeholder="Name-placeholder"
|
|
255
|
+
required=""
|
|
256
|
+
type="text"
|
|
257
|
+
value=""
|
|
258
|
+
/>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
<div
|
|
262
|
+
class="required field"
|
|
263
|
+
>
|
|
264
|
+
<label
|
|
265
|
+
for="external_id"
|
|
266
|
+
>
|
|
267
|
+
External Id
|
|
268
|
+
</label>
|
|
269
|
+
<div
|
|
270
|
+
class="ui input"
|
|
271
|
+
>
|
|
272
|
+
<input
|
|
273
|
+
autocomplete="off"
|
|
274
|
+
id="external_id"
|
|
275
|
+
name="external_id"
|
|
276
|
+
placeholder="External_id-placeholder"
|
|
277
|
+
required=""
|
|
278
|
+
type="text"
|
|
279
|
+
value=""
|
|
280
|
+
/>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
<div
|
|
284
|
+
class="field"
|
|
285
|
+
>
|
|
286
|
+
<label>
|
|
287
|
+
Domain_group
|
|
288
|
+
</label>
|
|
289
|
+
<div
|
|
290
|
+
aria-expanded="false"
|
|
291
|
+
class="ui basic search selection dropdown"
|
|
292
|
+
name="domain_group"
|
|
293
|
+
role="combobox"
|
|
294
|
+
>
|
|
295
|
+
<input
|
|
296
|
+
aria-autocomplete="list"
|
|
297
|
+
autocomplete="off"
|
|
298
|
+
class="search"
|
|
299
|
+
tabindex="0"
|
|
300
|
+
type="text"
|
|
301
|
+
value=""
|
|
302
|
+
/>
|
|
303
|
+
<div
|
|
304
|
+
aria-atomic="true"
|
|
305
|
+
aria-live="polite"
|
|
306
|
+
class="divider default text"
|
|
307
|
+
role="alert"
|
|
308
|
+
>
|
|
309
|
+
Domain_group-placeholder
|
|
310
|
+
</div>
|
|
311
|
+
<i
|
|
312
|
+
aria-hidden="true"
|
|
313
|
+
class="dropdown icon"
|
|
314
|
+
/>
|
|
315
|
+
<div
|
|
316
|
+
class="menu transition"
|
|
317
|
+
role="listbox"
|
|
318
|
+
>
|
|
319
|
+
<div
|
|
320
|
+
class="message"
|
|
321
|
+
>
|
|
322
|
+
No results found.
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
<div
|
|
328
|
+
class="field"
|
|
329
|
+
>
|
|
330
|
+
<label>
|
|
331
|
+
Type
|
|
332
|
+
</label>
|
|
333
|
+
<div
|
|
334
|
+
aria-expanded="false"
|
|
335
|
+
class="ui basic search selection dropdown"
|
|
336
|
+
name="type"
|
|
337
|
+
role="combobox"
|
|
338
|
+
>
|
|
339
|
+
<input
|
|
340
|
+
aria-autocomplete="list"
|
|
341
|
+
autocomplete="off"
|
|
342
|
+
class="search"
|
|
343
|
+
tabindex="0"
|
|
344
|
+
type="text"
|
|
345
|
+
value=""
|
|
346
|
+
/>
|
|
347
|
+
<div
|
|
348
|
+
aria-atomic="true"
|
|
349
|
+
aria-live="polite"
|
|
350
|
+
class="divider default text"
|
|
351
|
+
role="alert"
|
|
352
|
+
>
|
|
353
|
+
Type-placeholder
|
|
354
|
+
</div>
|
|
355
|
+
<i
|
|
356
|
+
aria-hidden="true"
|
|
357
|
+
class="dropdown icon"
|
|
358
|
+
/>
|
|
359
|
+
<div
|
|
360
|
+
class="menu transition"
|
|
361
|
+
role="listbox"
|
|
362
|
+
>
|
|
363
|
+
<div
|
|
364
|
+
aria-checked="true"
|
|
365
|
+
aria-selected="true"
|
|
366
|
+
class="active selected item"
|
|
367
|
+
role="option"
|
|
368
|
+
style="pointer-events: all;"
|
|
369
|
+
>
|
|
370
|
+
<span
|
|
371
|
+
class="text"
|
|
372
|
+
/>
|
|
373
|
+
</div>
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
<div
|
|
378
|
+
class="field"
|
|
379
|
+
>
|
|
380
|
+
<label>
|
|
381
|
+
Description
|
|
382
|
+
</label>
|
|
383
|
+
<textarea
|
|
384
|
+
autocomplete="off"
|
|
385
|
+
name="description"
|
|
386
|
+
placeholder="Description-placeholder"
|
|
387
|
+
rows="3"
|
|
388
|
+
/>
|
|
389
|
+
</div>
|
|
390
|
+
<div
|
|
391
|
+
class="actions"
|
|
392
|
+
>
|
|
393
|
+
<button
|
|
394
|
+
class="ui primary disabled right floated button"
|
|
395
|
+
disabled=""
|
|
396
|
+
tabindex="-1"
|
|
397
|
+
type="submit"
|
|
398
|
+
>
|
|
399
|
+
Save
|
|
400
|
+
</button>
|
|
401
|
+
<a
|
|
402
|
+
class="ui secondary button"
|
|
403
|
+
href="/"
|
|
404
|
+
role="button"
|
|
405
|
+
>
|
|
406
|
+
Cancel
|
|
407
|
+
</a>
|
|
408
|
+
</div>
|
|
409
|
+
</form>
|
|
410
|
+
</div>
|
|
411
|
+
</div>
|
|
35
412
|
`;
|
package/src/taxonomy/index.js
CHANGED
package/src/taxonomy/routines.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { createRoutine } from "redux-saga-routines";
|
|
2
2
|
|
|
3
|
-
export const fetchDomains = createRoutine("FETCH_DOMAINS");
|
|
4
3
|
export const fetchDomainsConcept = createRoutine("FETCH_CONCEPT_DOMAINS");
|
|
5
4
|
export const clearDomainsConcept = createRoutine("CLEAR_DOMAINS");
|
|
6
|
-
export const clearDomains = createRoutine("CLEAR_DOMAINS");
|
|
7
5
|
export const filterDomains = createRoutine("FILTER_DOMAINS");
|
|
8
|
-
|
|
9
|
-
export const fetchDomainMembers = createRoutine("FETCH_DOMAIN_MEMBERS");
|
|
10
|
-
|
|
11
|
-
export const fetchDomain = createRoutine("FETCH_DOMAIN");
|
|
12
|
-
export const createDomain = createRoutine("CREATE_DOMAIN");
|
|
13
|
-
export const updateDomain = createRoutine("UPDATE_DOMAIN");
|
|
14
|
-
export const deleteDomain = createRoutine("DELETE_DOMAIN");
|
|
15
|
-
export const clearDomain = createRoutine("CLEAR_DOMAIN");
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
import { createDomainRequestSaga } from "./createDomain";
|
|
2
|
-
import { updateDomainRequestSaga } from "./updateDomain";
|
|
3
|
-
import { deleteDomainRequestSaga } from "./deleteDomain";
|
|
4
1
|
import { fetchDomainsConceptRequestSaga } from "./fetchDomainsConcept";
|
|
5
|
-
import { fetchDomainRequestSaga } from "./fetchDomain";
|
|
6
|
-
import { fetchDomainsRequestSaga } from "./fetchDomains";
|
|
7
2
|
|
|
8
|
-
export {
|
|
9
|
-
createDomainRequestSaga,
|
|
10
|
-
updateDomainRequestSaga,
|
|
11
|
-
deleteDomainRequestSaga,
|
|
12
|
-
fetchDomainsConceptRequestSaga,
|
|
13
|
-
fetchDomainRequestSaga,
|
|
14
|
-
fetchDomainsRequestSaga,
|
|
15
|
-
};
|
|
3
|
+
export { fetchDomainsConceptRequestSaga };
|
|
16
4
|
|
|
17
|
-
export default [
|
|
18
|
-
createDomainRequestSaga(),
|
|
19
|
-
updateDomainRequestSaga(),
|
|
20
|
-
deleteDomainRequestSaga(),
|
|
21
|
-
fetchDomainsConceptRequestSaga(),
|
|
22
|
-
fetchDomainRequestSaga(),
|
|
23
|
-
fetchDomainsRequestSaga(),
|
|
24
|
-
];
|
|
5
|
+
export default [fetchDomainsConceptRequestSaga()];
|
|
@@ -2,8 +2,6 @@ import _ from "lodash/fp";
|
|
|
2
2
|
import { createSelector } from "reselect";
|
|
3
3
|
import { accentInsensitivePathOrder } from "@truedat/core/services/sort";
|
|
4
4
|
import { getPrimaryActions, getSecondaryActions } from "./getDomainActions";
|
|
5
|
-
import { getDomainGroups } from "./getDomainGroups";
|
|
6
|
-
import { domainParentOptionsSelector } from "./domainParentOptionsSelector";
|
|
7
5
|
|
|
8
6
|
const getDomain = ({ domain }) => domain;
|
|
9
7
|
const getDomains = ({ domainsConcept }) => domainsConcept;
|
|
@@ -106,14 +104,6 @@ const getVisibleDomains = createSelector(
|
|
|
106
104
|
.map(({ children, ...d }) => ({ childCount: children.length, ...d }))
|
|
107
105
|
);
|
|
108
106
|
|
|
109
|
-
/**
|
|
110
|
-
* A selector to obtain unique domain types, sorted case-insensitively.
|
|
111
|
-
*/
|
|
112
|
-
const getDomainTypes = createSelector(
|
|
113
|
-
getDomains,
|
|
114
|
-
_.flow(_.map("type"), _.filter(_.isString), _.uniq, _.sortBy(_.toLower))
|
|
115
|
-
);
|
|
116
|
-
|
|
117
107
|
const findAncestorsIn = (domainsConcept) => (children) => {
|
|
118
108
|
const parents = _.flatMap(findParentsIn(domainsConcept))(children);
|
|
119
109
|
return _.isEmpty(parents)
|
|
@@ -162,14 +152,11 @@ const getDomainConceptSelectorOptions = createSelector(
|
|
|
162
152
|
);
|
|
163
153
|
|
|
164
154
|
export {
|
|
165
|
-
domainParentOptionsSelector,
|
|
166
155
|
getChildOrRootDomains,
|
|
167
156
|
getDescendents,
|
|
168
157
|
getDomainConceptSelectorOptions,
|
|
169
158
|
getFilteredDomains,
|
|
170
159
|
getVisibleDomains,
|
|
171
|
-
getDomainGroups,
|
|
172
|
-
getDomainTypes,
|
|
173
160
|
getAncestorDomains,
|
|
174
161
|
getPrimaryActions,
|
|
175
162
|
getSecondaryActions,
|
|
@@ -3,9 +3,6 @@ import { createSelector } from "reselect";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
5
|
import { accentInsensitivePathOrder } from "@truedat/core/services/sort";
|
|
6
|
-
import { getPrimaryActions, getSecondaryActions } from "./getDomainActions";
|
|
7
|
-
import { getDomainGroups } from "./getDomainGroups";
|
|
8
|
-
import { domainParentOptionsSelector } from "./domainParentOptionsSelector";
|
|
9
6
|
|
|
10
7
|
const getDomain = ({ domain }) => domain;
|
|
11
8
|
const getDomains = ({ domains }) => domains;
|
|
@@ -106,14 +103,6 @@ const getVisibleDomains = createSelector(
|
|
|
106
103
|
.map(({ children, ...d }) => ({ childCount: children.length, ...d }))
|
|
107
104
|
);
|
|
108
105
|
|
|
109
|
-
/**
|
|
110
|
-
* A selector to obtain unique domain types, sorted case-insensitively.
|
|
111
|
-
*/
|
|
112
|
-
const getDomainTypes = createSelector(
|
|
113
|
-
getDomains,
|
|
114
|
-
_.flow(_.map("type"), _.filter(_.isString), _.uniq, _.sortBy(_.toLower))
|
|
115
|
-
);
|
|
116
|
-
|
|
117
106
|
const findAncestorsIn = (domains) => (children) => {
|
|
118
107
|
const parents = _.flatMap(findParentsIn(domains))(children);
|
|
119
108
|
return _.isEmpty(parents)
|
|
@@ -173,15 +162,10 @@ const getDomainSelectorOptions = createSelector([getDomains], (domains) => {
|
|
|
173
162
|
});
|
|
174
163
|
|
|
175
164
|
export {
|
|
176
|
-
domainParentOptionsSelector,
|
|
177
165
|
getChildOrRootDomains,
|
|
178
166
|
getDescendents,
|
|
179
167
|
getDomainSelectorOptions,
|
|
180
168
|
getFilteredDomains,
|
|
181
169
|
getVisibleDomains,
|
|
182
|
-
getDomainGroups,
|
|
183
|
-
getDomainTypes,
|
|
184
170
|
getAncestorDomains,
|
|
185
|
-
getPrimaryActions,
|
|
186
|
-
getSecondaryActions,
|
|
187
171
|
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import _ from "lodash/fp";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { Link } from "react-router-dom";
|
|
5
|
-
import { Card, Header, Icon, Message, Divider } from "semantic-ui-react";
|
|
6
|
-
import { connect } from "react-redux";
|
|
7
|
-
import { FormattedMessage, useIntl } from "react-intl";
|
|
8
|
-
import { linkTo } from "@truedat/core/routes";
|
|
9
|
-
import { getVisibleDomains } from "../selectors";
|
|
10
|
-
|
|
11
|
-
export const DomainCard = ({
|
|
12
|
-
id,
|
|
13
|
-
name,
|
|
14
|
-
type,
|
|
15
|
-
description,
|
|
16
|
-
childCount,
|
|
17
|
-
domain_group
|
|
18
|
-
}) => (
|
|
19
|
-
<Card key={id} link as={Link} to={linkTo.DOMAIN({ id })}>
|
|
20
|
-
<Card.Content>
|
|
21
|
-
<Card.Header>
|
|
22
|
-
<Icon name="cube" />
|
|
23
|
-
{name}
|
|
24
|
-
</Card.Header>
|
|
25
|
-
<Card.Meta>
|
|
26
|
-
{_.get("name")(domain_group) && (
|
|
27
|
-
<>
|
|
28
|
-
<Icon name="object group" /> {_.get("name")(domain_group)}
|
|
29
|
-
<br />
|
|
30
|
-
</>
|
|
31
|
-
)}
|
|
32
|
-
<span>{type || <FormattedMessage id="domain" />}</span>
|
|
33
|
-
</Card.Meta>
|
|
34
|
-
</Card.Content>
|
|
35
|
-
<Card.Content description={description} />
|
|
36
|
-
<Card.Content extra>
|
|
37
|
-
<Icon name="cubes" />
|
|
38
|
-
<FormattedMessage
|
|
39
|
-
id="domain.props.children"
|
|
40
|
-
values={{ count: childCount }}
|
|
41
|
-
/>
|
|
42
|
-
</Card.Content>
|
|
43
|
-
</Card>
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
DomainCard.propTypes = {
|
|
47
|
-
id: PropTypes.number,
|
|
48
|
-
name: PropTypes.string,
|
|
49
|
-
type: PropTypes.string,
|
|
50
|
-
childCount: PropTypes.number,
|
|
51
|
-
description: PropTypes.string,
|
|
52
|
-
domain_group: PropTypes.object
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const DomainCards = ({ visibleDomains, domainsFilter, domain }) => {
|
|
56
|
-
const { formatMessage } = useIntl();
|
|
57
|
-
return (
|
|
58
|
-
<>
|
|
59
|
-
<Divider hidden />
|
|
60
|
-
{domainsFilter && (
|
|
61
|
-
<Header as="h4">
|
|
62
|
-
<Icon name="search" />
|
|
63
|
-
<Header.Content>
|
|
64
|
-
{visibleDomains.length == 0 && (
|
|
65
|
-
<FormattedMessage id="domains.search.results.empty" />
|
|
66
|
-
)}
|
|
67
|
-
{visibleDomains.length > 0 && (
|
|
68
|
-
<FormattedMessage
|
|
69
|
-
id="domains.search.results.count"
|
|
70
|
-
values={{ count: visibleDomains.length }}
|
|
71
|
-
/>
|
|
72
|
-
)}
|
|
73
|
-
</Header.Content>
|
|
74
|
-
</Header>
|
|
75
|
-
)}
|
|
76
|
-
{_.isEmpty(visibleDomains) && domain && domain.id && (
|
|
77
|
-
<Message header={formatMessage({ id: "domain.children.empty" })} />
|
|
78
|
-
)}
|
|
79
|
-
<Card.Group>{visibleDomains.map(DomainCard)}</Card.Group>
|
|
80
|
-
</>
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
DomainCards.propTypes = {
|
|
85
|
-
visibleDomains: PropTypes.array,
|
|
86
|
-
domainsFilter: PropTypes.string,
|
|
87
|
-
domain: PropTypes.object
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const mapStateToProps = state => ({
|
|
91
|
-
visibleDomains: getVisibleDomains(state),
|
|
92
|
-
domainsLoading: state.domainsLoading,
|
|
93
|
-
domainsFilter: state.domainsFilter,
|
|
94
|
-
domain: state.domain
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
export default connect(mapStateToProps)(DomainCards);
|