@truedat/audit 4.44.2 → 4.44.3

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 (31) hide show
  1. package/package.json +5 -5
  2. package/src/components/EventsLoader.js +15 -11
  3. package/src/components/NotificationEvent.js +12 -1
  4. package/src/components/ShareLinkForm.js +1 -1
  5. package/src/components/Subscription.js +43 -22
  6. package/src/components/SubscriptionEdit.js +33 -18
  7. package/src/components/SubscriptionForm.js +6 -2
  8. package/src/components/SubscriptionLoader.js +26 -14
  9. package/src/components/SubscriptionNew.js +20 -8
  10. package/src/components/Subscriptions.js +22 -7
  11. package/src/components/SubscriptionsLoader.js +26 -13
  12. package/src/components/__tests__/NotificationEvent.spec.js +8 -9
  13. package/src/components/__tests__/ShareLinkForm.spec.js +14 -34
  14. package/src/components/__tests__/Subscription.spec.js +18 -27
  15. package/src/components/__tests__/SubscriptionEdit.spec.js +12 -20
  16. package/src/components/__tests__/SubscriptionForm.spec.js +51 -156
  17. package/src/components/__tests__/SubscriptionLoader.spec.js +4 -12
  18. package/src/components/__tests__/SubscriptionNew.spec.js +6 -13
  19. package/src/components/__tests__/Subscriptions.spec.js +26 -38
  20. package/src/components/__tests__/SubscriptionsLoader.spec.js +10 -9
  21. package/src/components/__tests__/__snapshots__/NotificationEvent.spec.js.snap +25 -44
  22. package/src/components/__tests__/__snapshots__/ShareLinkForm.spec.js.snap +6 -6
  23. package/src/components/__tests__/__snapshots__/Subscription.spec.js.snap +144 -75
  24. package/src/components/__tests__/__snapshots__/SubscriptionEdit.spec.js.snap +372 -22
  25. package/src/components/__tests__/__snapshots__/SubscriptionForm.spec.js.snap +22 -22
  26. package/src/components/__tests__/__snapshots__/SubscriptionLoader.spec.js.snap +16 -1
  27. package/src/components/__tests__/__snapshots__/SubscriptionNew.spec.js.snap +373 -16
  28. package/src/components/__tests__/__snapshots__/Subscriptions.spec.js.snap +339 -407
  29. package/src/components/__tests__/__snapshots__/SubscriptionsLoader.spec.js.snap +18 -1
  30. package/src/messages/en.js +0 -2
  31. package/src/messages/es.js +0 -2
@@ -1,434 +1,366 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<Subscriptions /> matches the latest snapshot 1`] = `
4
- <Segment>
5
- <SubscriptionsHeader />
6
- <Form
7
- as="form"
4
+ <div>
5
+ <div
6
+ class="ui segment"
8
7
  >
9
- <Header
10
- as="h5"
11
- content={
12
- <Memo(MemoizedFormattedMessage)
13
- id="subscriptions.filters"
14
- />
15
- }
16
- />
17
- <Component
18
- control={
19
- Object {
20
- "_defaultValues": Object {
21
- "resourceTypes": Array [
22
- "data_structure",
23
- "domain",
24
- "domains",
25
- "concept",
26
- "rule",
27
- "source",
28
- ],
29
- "subscriberTypes": Array [
30
- "role",
31
- "email",
32
- "user",
33
- "taxonomy_role",
34
- ],
35
- },
36
- "_executeSchema": [Function],
37
- "_fields": Object {},
38
- "_formState": Object {
39
- "dirtyFields": Object {},
40
- "errors": Object {},
41
- "isDirty": false,
42
- "isSubmitSuccessful": false,
43
- "isSubmitted": false,
44
- "isSubmitting": false,
45
- "isValid": false,
46
- "isValidating": false,
47
- "submitCount": 0,
48
- "touchedFields": Object {},
49
- },
50
- "_formValues": Object {
51
- "resourceTypes": Array [
52
- "data_structure",
53
- "domain",
54
- "domains",
55
- "concept",
56
- "rule",
57
- "source",
58
- ],
59
- "subscriberTypes": Array [
60
- "role",
61
- "email",
62
- "user",
63
- "taxonomy_role",
64
- ],
65
- },
66
- "_getDirty": [Function],
67
- "_getFieldArray": [Function],
68
- "_getWatch": [Function],
69
- "_names": Object {
70
- "array": Set {},
71
- "mount": Set {},
72
- "unMount": Set {},
73
- "watch": Set {
74
- "subscriberTypes",
75
- "resourceTypes",
76
- },
77
- },
78
- "_options": Object {
79
- "defaultValues": Object {
80
- "resourceTypes": Array [
81
- "data_structure",
82
- "domain",
83
- "domains",
84
- "concept",
85
- "rule",
86
- "source",
87
- ],
88
- "subscriberTypes": Array [
89
- "role",
90
- "email",
91
- "user",
92
- "taxonomy_role",
93
- ],
94
- },
95
- "mode": "all",
96
- "reValidateMode": "onChange",
97
- "shouldFocusError": true,
98
- },
99
- "_proxyFormState": Object {
100
- "dirtyFields": false,
101
- "errors": false,
102
- "isDirty": false,
103
- "isValid": false,
104
- "isValidating": false,
105
- "touchedFields": false,
106
- },
107
- "_removeUnmounted": [Function],
108
- "_stateFlags": Object {
109
- "action": false,
110
- "mount": false,
111
- "watch": false,
112
- },
113
- "_subjects": Object {
114
- "array": Object {
115
- "next": [Function],
116
- "observers": Array [],
117
- "subscribe": [Function],
118
- "unsubscribe": [Function],
119
- },
120
- "state": Object {
121
- "next": [Function],
122
- "observers": Array [],
123
- "subscribe": [Function],
124
- "unsubscribe": [Function],
125
- },
126
- "watch": Object {
127
- "next": [Function],
128
- "observers": Array [],
129
- "subscribe": [Function],
130
- "unsubscribe": [Function],
131
- },
132
- },
133
- "_updateFieldArray": [Function],
134
- "_updateValid": [Function],
135
- "getFieldState": [Function],
136
- "register": [Function],
137
- "unregister": [Function],
138
- }
139
- }
140
- name="subscriberTypes"
141
- render={[Function]}
142
- />
143
- <Component
144
- control={
145
- Object {
146
- "_defaultValues": Object {
147
- "resourceTypes": Array [
148
- "data_structure",
149
- "domain",
150
- "domains",
151
- "concept",
152
- "rule",
153
- "source",
154
- ],
155
- "subscriberTypes": Array [
156
- "role",
157
- "email",
158
- "user",
159
- "taxonomy_role",
160
- ],
161
- },
162
- "_executeSchema": [Function],
163
- "_fields": Object {},
164
- "_formState": Object {
165
- "dirtyFields": Object {},
166
- "errors": Object {},
167
- "isDirty": false,
168
- "isSubmitSuccessful": false,
169
- "isSubmitted": false,
170
- "isSubmitting": false,
171
- "isValid": false,
172
- "isValidating": false,
173
- "submitCount": 0,
174
- "touchedFields": Object {},
175
- },
176
- "_formValues": Object {
177
- "resourceTypes": Array [
178
- "data_structure",
179
- "domain",
180
- "domains",
181
- "concept",
182
- "rule",
183
- "source",
184
- ],
185
- "subscriberTypes": Array [
186
- "role",
187
- "email",
188
- "user",
189
- "taxonomy_role",
190
- ],
191
- },
192
- "_getDirty": [Function],
193
- "_getFieldArray": [Function],
194
- "_getWatch": [Function],
195
- "_names": Object {
196
- "array": Set {},
197
- "mount": Set {},
198
- "unMount": Set {},
199
- "watch": Set {
200
- "subscriberTypes",
201
- "resourceTypes",
202
- },
203
- },
204
- "_options": Object {
205
- "defaultValues": Object {
206
- "resourceTypes": Array [
207
- "data_structure",
208
- "domain",
209
- "domains",
210
- "concept",
211
- "rule",
212
- "source",
213
- ],
214
- "subscriberTypes": Array [
215
- "role",
216
- "email",
217
- "user",
218
- "taxonomy_role",
219
- ],
220
- },
221
- "mode": "all",
222
- "reValidateMode": "onChange",
223
- "shouldFocusError": true,
224
- },
225
- "_proxyFormState": Object {
226
- "dirtyFields": false,
227
- "errors": false,
228
- "isDirty": false,
229
- "isValid": false,
230
- "isValidating": false,
231
- "touchedFields": false,
232
- },
233
- "_removeUnmounted": [Function],
234
- "_stateFlags": Object {
235
- "action": false,
236
- "mount": false,
237
- "watch": false,
238
- },
239
- "_subjects": Object {
240
- "array": Object {
241
- "next": [Function],
242
- "observers": Array [],
243
- "subscribe": [Function],
244
- "unsubscribe": [Function],
245
- },
246
- "state": Object {
247
- "next": [Function],
248
- "observers": Array [],
249
- "subscribe": [Function],
250
- "unsubscribe": [Function],
251
- },
252
- "watch": Object {
253
- "next": [Function],
254
- "observers": Array [],
255
- "subscribe": [Function],
256
- "unsubscribe": [Function],
257
- },
258
- },
259
- "_updateFieldArray": [Function],
260
- "_updateValid": [Function],
261
- "getFieldState": [Function],
262
- "register": [Function],
263
- "unregister": [Function],
264
- }
265
- }
266
- name="resourceTypes"
267
- render={[Function]}
268
- />
269
- </Form>
270
- <Label
271
- className="rules-label-results"
272
- >
273
- <MemoizedFormattedMessage
274
- id="subscriptions.retrieved.results"
275
- values={
276
- Object {
277
- "count": 2,
278
- }
279
- }
280
- />
281
- </Label>
282
- <Table
283
- as="table"
284
- className="subscription-table"
285
- selectable={true}
286
- >
287
- <TableHeader
288
- as="thead"
8
+ <h2
9
+ class="ui header subscription-header"
289
10
  >
290
- <TableRow
291
- as="tr"
292
- cellAs="td"
11
+ <a
12
+ class="ui primary button"
13
+ href="/subscriptions/new"
14
+ role="button"
15
+ >
16
+ New Subscription
17
+ </a>
18
+ <i
19
+ aria-hidden="true"
20
+ class="check circular icon"
21
+ />
22
+ <div
23
+ class="content"
24
+ >
25
+ Subscriptions
26
+ <div
27
+ class="sub header"
28
+ >
29
+ Manage current subscriptions
30
+ </div>
31
+ </div>
32
+ </h2>
33
+ <form
34
+ class="ui form"
35
+ >
36
+ <h5
37
+ class="ui header"
38
+ >
39
+ Filters
40
+ </h5>
41
+ <div
42
+ class="field subscriptions-checkbox-filters"
293
43
  >
294
- <TableHeaderCell
295
- as="th"
296
- content={
297
- <Memo(MemoizedFormattedMessage)
298
- id="subscriptions.subscriber"
44
+ <label>
45
+ Subscriber
46
+ </label>
47
+ <div
48
+ class="ui checked checkbox"
49
+ >
50
+ <input
51
+ checked=""
52
+ class="hidden"
53
+ readonly=""
54
+ tabindex="0"
55
+ type="checkbox"
56
+ value=""
57
+ />
58
+ <label>
59
+ <i
60
+ aria-hidden="true"
61
+ class="student icon"
299
62
  />
300
- }
301
- />
302
- <TableHeaderCell
303
- as="th"
304
- content={
305
- <Memo(MemoizedFormattedMessage)
306
- id="subscriptions.resource"
63
+ Role
64
+ </label>
65
+ </div>
66
+ <div
67
+ class="ui checked checkbox"
68
+ >
69
+ <input
70
+ checked=""
71
+ class="hidden"
72
+ readonly=""
73
+ tabindex="0"
74
+ type="checkbox"
75
+ value=""
76
+ />
77
+ <label>
78
+ <i
79
+ aria-hidden="true"
80
+ class="envelope icon"
307
81
  />
308
- }
309
- />
310
- <TableHeaderCell
311
- as="th"
312
- content={
313
- <Memo(MemoizedFormattedMessage)
314
- id="subscriptions.periodicity"
82
+ Email
83
+ </label>
84
+ </div>
85
+ <div
86
+ class="ui checked checkbox"
87
+ >
88
+ <input
89
+ checked=""
90
+ class="hidden"
91
+ readonly=""
92
+ tabindex="0"
93
+ type="checkbox"
94
+ value=""
95
+ />
96
+ <label>
97
+ <i
98
+ aria-hidden="true"
99
+ class="user icon"
315
100
  />
316
- }
317
- />
318
- </TableRow>
319
- </TableHeader>
320
- <TableBody
321
- as="tbody"
322
- >
323
- <TableRow
324
- as="tr"
325
- cellAs="td"
326
- key="0"
327
- onClick={[Function]}
101
+ User
102
+ </label>
103
+ </div>
104
+ <div
105
+ class="ui checked checkbox"
106
+ >
107
+ <input
108
+ checked=""
109
+ class="hidden"
110
+ readonly=""
111
+ tabindex="0"
112
+ type="checkbox"
113
+ value=""
114
+ />
115
+ <label>
116
+ <i
117
+ aria-hidden="true"
118
+ class="student icon"
119
+ />
120
+ Role in taxonomy
121
+ </label>
122
+ </div>
123
+ </div>
124
+ <div
125
+ class="field subscriptions-checkbox-filters"
328
126
  >
329
- <TableCell
330
- as="td"
127
+ <label>
128
+ Resource
129
+ </label>
130
+ <div
131
+ class="ui checked checkbox"
331
132
  >
332
- <Icon
333
- as="i"
334
- name="user"
133
+ <input
134
+ checked=""
135
+ class="hidden"
136
+ readonly=""
137
+ tabindex="0"
138
+ type="checkbox"
139
+ value=""
335
140
  />
336
- </TableCell>
337
- <TableCell
338
- as="td"
141
+ <label>
142
+ <i
143
+ aria-hidden="true"
144
+ class="block layout icon"
145
+ />
146
+ Structure
147
+ </label>
148
+ </div>
149
+ <div
150
+ class="ui checked checkbox"
339
151
  >
340
- <Icon
341
- as="i"
342
- name="block layout"
152
+ <input
153
+ checked=""
154
+ class="hidden"
155
+ readonly=""
156
+ tabindex="0"
157
+ type="checkbox"
158
+ value=""
343
159
  />
344
- bar
345
- </TableCell>
346
- <TableCell
347
- as="td"
160
+ <label>
161
+ <i
162
+ aria-hidden="true"
163
+ class="sitemap icon"
164
+ />
165
+ Domain
166
+ </label>
167
+ </div>
168
+ <div
169
+ class="ui checked checkbox"
348
170
  >
349
- <MemoizedFormattedMessage
350
- id="subscriptions.periodicity.minutely"
171
+ <input
172
+ checked=""
173
+ class="hidden"
174
+ readonly=""
175
+ tabindex="0"
176
+ type="checkbox"
177
+ value=""
351
178
  />
352
- </TableCell>
353
- </TableRow>
354
- <TableRow
355
- as="tr"
356
- cellAs="td"
357
- key="1"
358
- onClick={[Function]}
359
- >
360
- <TableCell
361
- as="td"
179
+ <label>
180
+ <i
181
+ aria-hidden="true"
182
+ class="sitemap icon"
183
+ />
184
+ Domain and children
185
+ </label>
186
+ </div>
187
+ <div
188
+ class="ui checked checkbox"
362
189
  >
363
- <Icon
364
- as="i"
365
- name="user"
190
+ <input
191
+ checked=""
192
+ class="hidden"
193
+ readonly=""
194
+ tabindex="0"
195
+ type="checkbox"
196
+ value=""
366
197
  />
367
- </TableCell>
368
- <TableCell
369
- as="td"
198
+ <label>
199
+ <i
200
+ aria-hidden="true"
201
+ class="book icon"
202
+ />
203
+ Concept
204
+ </label>
205
+ </div>
206
+ <div
207
+ class="ui checked checkbox"
370
208
  >
371
- <Icon
372
- as="i"
373
- name="sitemap"
209
+ <input
210
+ checked=""
211
+ class="hidden"
212
+ readonly=""
213
+ tabindex="0"
214
+ type="checkbox"
215
+ value=""
374
216
  />
375
- resource
376
- </TableCell>
377
- <TableCell
378
- as="td"
217
+ <label>
218
+ <i
219
+ aria-hidden="true"
220
+ class="clipboard check icon"
221
+ />
222
+ Quality Rule
223
+ </label>
224
+ </div>
225
+ <div
226
+ class="ui checked checkbox"
379
227
  >
380
- <MemoizedFormattedMessage
381
- id="subscriptions.periodicity.hourly"
228
+ <input
229
+ checked=""
230
+ class="hidden"
231
+ readonly=""
232
+ tabindex="0"
233
+ type="checkbox"
234
+ value=""
382
235
  />
383
- </TableCell>
384
- </TableRow>
385
- </TableBody>
386
- </Table>
387
- </Segment>
236
+ <label>
237
+ <i
238
+ aria-hidden="true"
239
+ class="plug icon"
240
+ />
241
+ Source
242
+ </label>
243
+ </div>
244
+ </div>
245
+ </form>
246
+ <div
247
+ class="ui label rules-label-results"
248
+ >
249
+ 2 subscriptions found
250
+ </div>
251
+ <table
252
+ class="ui selectable table subscription-table"
253
+ >
254
+ <thead
255
+ class=""
256
+ >
257
+ <tr
258
+ class=""
259
+ >
260
+ <th
261
+ class=""
262
+ >
263
+ Subscriber
264
+ </th>
265
+ <th
266
+ class=""
267
+ >
268
+ Resource
269
+ </th>
270
+ <th
271
+ class=""
272
+ >
273
+ Notifications periodicity
274
+ </th>
275
+ </tr>
276
+ </thead>
277
+ <tbody
278
+ class=""
279
+ >
280
+ <tr
281
+ class=""
282
+ >
283
+ <td
284
+ class=""
285
+ >
286
+ <i
287
+ aria-hidden="true"
288
+ class="user icon"
289
+ />
290
+ </td>
291
+ <td
292
+ class=""
293
+ >
294
+ <i
295
+ aria-hidden="true"
296
+ class="block layout icon"
297
+ />
298
+ bar
299
+ </td>
300
+ <td
301
+ class=""
302
+ >
303
+ Immediately
304
+ </td>
305
+ </tr>
306
+ <tr
307
+ class=""
308
+ >
309
+ <td
310
+ class=""
311
+ >
312
+ <i
313
+ aria-hidden="true"
314
+ class="user icon"
315
+ />
316
+ </td>
317
+ <td
318
+ class=""
319
+ >
320
+ <i
321
+ aria-hidden="true"
322
+ class="sitemap icon"
323
+ />
324
+ resource
325
+ </td>
326
+ <td
327
+ class=""
328
+ >
329
+ Hourly
330
+ </td>
331
+ </tr>
332
+ </tbody>
333
+ </table>
334
+ </div>
335
+ </div>
388
336
  `;
389
337
 
390
338
  exports[`<SubscriptionsHeader /> matches the latest snapshot 1`] = `
391
- <Header
392
- as="h2"
393
- className="subscription-header"
394
- >
395
- <Button
396
- as={
397
- Object {
398
- "$$typeof": Symbol(react.forward_ref),
399
- "displayName": "Link",
400
- "propTypes": Object {
401
- "innerRef": [Function],
402
- "onClick": [Function],
403
- "replace": [Function],
404
- "target": [Function],
405
- "to": [Function],
406
- },
407
- "render": [Function],
408
- }
409
- }
410
- content={
411
- <Memo(MemoizedFormattedMessage)
412
- id="subscriptions.actions.create"
413
- />
414
- }
415
- primary={true}
416
- to="/subscriptions/new"
417
- />
418
- <Icon
419
- as="i"
420
- circular={true}
421
- name="check"
422
- />
423
- <HeaderContent>
424
- <MemoizedFormattedMessage
425
- id="subscriptions.header"
339
+ <div>
340
+ <h2
341
+ class="ui header subscription-header"
342
+ >
343
+ <a
344
+ class="ui primary button"
345
+ href="/subscriptions/new"
346
+ role="button"
347
+ >
348
+ New Subscription
349
+ </a>
350
+ <i
351
+ aria-hidden="true"
352
+ class="check circular icon"
426
353
  />
427
- <HeaderSubheader>
428
- <MemoizedFormattedMessage
429
- id="subscriptions.subheader"
430
- />
431
- </HeaderSubheader>
432
- </HeaderContent>
433
- </Header>
354
+ <div
355
+ class="content"
356
+ >
357
+ Subscriptions
358
+ <div
359
+ class="sub header"
360
+ >
361
+ Manage current subscriptions
362
+ </div>
363
+ </div>
364
+ </h2>
365
+ </div>
434
366
  `;