@truedat/dd 4.48.12 → 4.49.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +5 -5
  3. package/src/api/fragments.js +2 -2
  4. package/src/api/mutations.js +33 -11
  5. package/src/api/queries.js +37 -10
  6. package/src/api.js +0 -4
  7. package/src/components/DictionaryRoutes.js +4 -4
  8. package/src/components/StructureSummary.js +12 -22
  9. package/src/components/StructureTag.js +83 -54
  10. package/src/components/StructureTagForm.js +149 -89
  11. package/src/components/StructureTags.js +57 -27
  12. package/src/components/Tag.js +62 -0
  13. package/src/components/TagCards.js +85 -0
  14. package/src/components/TagCrumbs.js +25 -0
  15. package/src/components/TagForm.js +102 -0
  16. package/src/components/TagStructureButton.js +58 -0
  17. package/src/components/Tags.js +33 -0
  18. package/src/components/TagsRoutes.js +39 -0
  19. package/src/components/__tests__/StructureSummary.spec.js +0 -7
  20. package/src/components/__tests__/StructureTag.spec.js +79 -5
  21. package/src/components/__tests__/StructureTagForm.spec.js +99 -50
  22. package/src/components/__tests__/Tag.spec.js +11 -0
  23. package/src/components/__tests__/{StructureTagsCards.spec.js → TagCards.spec.js} +10 -10
  24. package/src/components/__tests__/TagCrumbs.spec.js +10 -0
  25. package/src/components/__tests__/TagForm.spec.js +72 -0
  26. package/src/components/__tests__/Tags.spec.js +10 -0
  27. package/src/components/__tests__/__snapshots__/StructureSummary.spec.js.snap +18 -42
  28. package/src/components/__tests__/__snapshots__/StructureTag.spec.js.snap +10 -30
  29. package/src/components/__tests__/__snapshots__/StructureTagForm.spec.js.snap +255 -51
  30. package/src/components/__tests__/__snapshots__/Tag.spec.js.snap +36 -0
  31. package/src/components/__tests__/__snapshots__/{StructureTagsCards.spec.js.snap → TagCards.spec.js.snap} +1 -1
  32. package/src/components/__tests__/__snapshots__/TagCrumbs.spec.js.snap +102 -0
  33. package/src/components/__tests__/__snapshots__/TagForm.spec.js.snap +70 -0
  34. package/src/components/__tests__/__snapshots__/{StructureTags.spec.js.snap → Tags.spec.js.snap} +1 -1
  35. package/src/messages/en.js +25 -30
  36. package/src/messages/es.js +25 -30
  37. package/src/reducers/__tests__/{editableStructureTags.spec.js → availableTags.spec.js} +7 -11
  38. package/src/reducers/__tests__/structureTagSaving.spec.js +36 -0
  39. package/src/reducers/__tests__/tagSaving.spec.js +32 -0
  40. package/src/reducers/{editableStructureTags.js → availableTags.js} +2 -2
  41. package/src/reducers/index.js +6 -12
  42. package/src/reducers/structureRedirect.js +7 -7
  43. package/src/reducers/structureTagSaving.js +12 -10
  44. package/src/reducers/tagSaving.js +18 -0
  45. package/src/routines.js +5 -6
  46. package/src/sagas/__tests__/createTag.spec.js +81 -0
  47. package/src/sagas/__tests__/deleteStructureTag.spec.js +11 -12
  48. package/src/sagas/__tests__/deleteTag.spec.js +76 -0
  49. package/src/sagas/__tests__/tagStructure.spec.js +86 -0
  50. package/src/sagas/__tests__/updateTag.spec.js +81 -0
  51. package/src/sagas/createTag.js +29 -0
  52. package/src/sagas/deleteStructureTag.js +12 -9
  53. package/src/sagas/deleteTag.js +34 -0
  54. package/src/sagas/index.js +15 -18
  55. package/src/sagas/tagStructure.js +37 -0
  56. package/src/sagas/updateTag.js +23 -0
  57. package/src/components/LinkStructureTagForm.js +0 -163
  58. package/src/components/LinkedStructureTag.js +0 -124
  59. package/src/components/StructureLinkTagButton.js +0 -47
  60. package/src/components/StructureTagsCards.js +0 -92
  61. package/src/components/StructureTagsCrumbs.js +0 -44
  62. package/src/components/StructureTagsRoutes.js +0 -45
  63. package/src/components/TagsHeader.js +0 -32
  64. package/src/components/__tests__/LinkStructureTagForm.spec.js +0 -184
  65. package/src/components/__tests__/LinkedStructureTag.spec.js +0 -133
  66. package/src/components/__tests__/StructureTags.spec.js +0 -14
  67. package/src/components/__tests__/StructureTagsCrumbs.spec.js +0 -13
  68. package/src/components/__tests__/__snapshots__/LinkStructureTagForm.spec.js.snap +0 -456
  69. package/src/components/__tests__/__snapshots__/LinkedStructureTag.spec.js.snap +0 -16
  70. package/src/components/__tests__/__snapshots__/StructureTagsCrumbs.spec.js.snap +0 -36
  71. package/src/reducers/__tests__/deletingStructureTags.spec.js +0 -30
  72. package/src/reducers/__tests__/linkedStructureTags.spec.js +0 -69
  73. package/src/reducers/__tests__/linkedStructureTagsLoading.spec.js +0 -32
  74. package/src/reducers/__tests__/linkingStructureTags.spec.js +0 -30
  75. package/src/reducers/__tests__/structureTagsSaving.spec.js +0 -40
  76. package/src/reducers/deletingStructureTags.js +0 -16
  77. package/src/reducers/linkedStructureTags.js +0 -28
  78. package/src/reducers/linkedStructureTagsLoading.js +0 -16
  79. package/src/reducers/linkingStructureTags.js +0 -16
  80. package/src/sagas/__tests__/createStructureTag.spec.js +0 -85
  81. package/src/sagas/__tests__/deleteLinkStructureTag.spec.js +0 -96
  82. package/src/sagas/__tests__/fetchLinksStructureTags.spec.js +0 -105
  83. package/src/sagas/__tests__/linkStructureTag.spec.js +0 -102
  84. package/src/sagas/__tests__/updateStructureTag.spec.js +0 -84
  85. package/src/sagas/createStructureTag.js +0 -29
  86. package/src/sagas/deleteLinkStructureTag.js +0 -29
  87. package/src/sagas/fetchLinksStructureTags.js +0 -31
  88. package/src/sagas/linkStructureTag.js +0 -30
  89. package/src/sagas/updateStructureTag.js +0 -23
@@ -1,36 +1,16 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<StructureTag /> matches the latest snapshot 1`] = `
4
- <Fragment>
5
- <StructureTagsCrumbs
6
- action="structureTags.actions.create"
7
- />
8
- <Container
9
- as={[Function]}
10
- text={true}
4
+ <div>
5
+ <div
6
+ class="ui tag label"
7
+ style="margin-left: 1.5em;"
11
8
  >
12
- <Header
13
- as="h2"
14
- >
15
- <Icon
16
- as="i"
17
- name="tag"
18
- />
19
- <HeaderContent>
20
- <MemoizedFormattedMessage
21
- id="structureTags.actions.create"
22
- />
23
- </HeaderContent>
24
- </Header>
25
- <StructureTagForm
26
- onSubmit={[MockFunction]}
27
- structureTag={
28
- Object {
29
- "domainIds": Array [],
30
- "name": "",
31
- }
32
- }
9
+ <i
10
+ aria-hidden="true"
11
+ class="edit link icon"
33
12
  />
34
- </Container>
35
- </Fragment>
13
+ Tag 42
14
+ </div>
15
+ </div>
36
16
  `;
@@ -1,70 +1,274 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<StructureTagForm /> matches the latest snapshot 1`] = `
3
+ exports[`<StructureTagForm /> matches the latest snapshot create 1`] = `
4
4
  <div>
5
- <form
6
- class="ui loading form"
5
+ <div
6
+ class="ui container link-structure-tag-form"
7
7
  >
8
- <div
9
- class="required field"
8
+ <form
9
+ class="ui form"
10
10
  >
11
- <label
12
- for="name"
11
+ <div
12
+ class="field"
13
13
  >
14
- Name
15
- </label>
14
+ <label>
15
+ Tag
16
+ </label>
17
+ <div
18
+ aria-disabled="false"
19
+ aria-expanded="false"
20
+ class="ui search selection dropdown"
21
+ name="tagId"
22
+ role="combobox"
23
+ >
24
+ <input
25
+ aria-autocomplete="list"
26
+ autocomplete="off"
27
+ class="search"
28
+ tabindex="0"
29
+ type="text"
30
+ value=""
31
+ />
32
+ <div
33
+ aria-atomic="true"
34
+ aria-live="polite"
35
+ class="divider default text"
36
+ role="alert"
37
+ >
38
+ Tag name
39
+ </div>
40
+ <i
41
+ aria-hidden="true"
42
+ class="dropdown icon"
43
+ />
44
+ <div
45
+ class="menu transition"
46
+ role="listbox"
47
+ >
48
+ <div
49
+ aria-checked="false"
50
+ aria-selected="true"
51
+ class="selected item"
52
+ role="option"
53
+ style="pointer-events: all;"
54
+ >
55
+ <span
56
+ class="description"
57
+ >
58
+ verylongverylongverylongverylongverylong
59
+ </span>
60
+ <span
61
+ class="text"
62
+ >
63
+ LongTag
64
+ </span>
65
+ </div>
66
+ <div
67
+ aria-checked="false"
68
+ aria-selected="false"
69
+ class="item"
70
+ role="option"
71
+ style="pointer-events: all;"
72
+ >
73
+ <span
74
+ class="description"
75
+ >
76
+ desc1
77
+ </span>
78
+ <span
79
+ class="text"
80
+ >
81
+ Tag1
82
+ </span>
83
+ </div>
84
+ <div
85
+ aria-checked="false"
86
+ aria-selected="false"
87
+ class="item"
88
+ role="option"
89
+ style="pointer-events: all;"
90
+ >
91
+ <span
92
+ class="description"
93
+ >
94
+ desc2
95
+ </span>
96
+ <span
97
+ class="text"
98
+ >
99
+ Tag2
100
+ </span>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </div>
16
105
  <div
17
- class="ui input"
106
+ class="field"
18
107
  >
19
- <input
20
- autocomplete="off"
21
- id="name"
22
- placeholder="Name"
23
- required=""
24
- type="text"
25
- value="foo"
108
+ <label
109
+ for="comment"
110
+ >
111
+ Comments
112
+ </label>
113
+ <textarea
114
+ id="comment"
115
+ name="comment"
116
+ placeholder="Introduce any comments"
117
+ rows="3"
26
118
  />
27
119
  </div>
28
- </div>
29
- <div
30
- class="field"
31
- >
32
- <label
33
- for="description"
120
+ <div
121
+ class="field"
34
122
  >
35
- Description
36
- </label>
123
+ <div
124
+ class="ui checkbox"
125
+ >
126
+ <input
127
+ class="hidden"
128
+ id="inherit"
129
+ name="inherit"
130
+ readonly=""
131
+ tabindex="0"
132
+ type="checkbox"
133
+ value=""
134
+ />
135
+ <label
136
+ for="inherit"
137
+ >
138
+ Inherited by children
139
+ </label>
140
+ </div>
141
+ </div>
37
142
  <div
38
- class="ui input"
143
+ class="actions"
39
144
  >
40
- <input
41
- autocomplete="off"
42
- id="description"
43
- placeholder="Description"
44
- type="text"
45
- value="bar"
46
- />
145
+ <button
146
+ class="ui primary disabled button"
147
+ disabled=""
148
+ tabindex="-1"
149
+ type="submit"
150
+ >
151
+ Save
152
+ </button>
47
153
  </div>
48
- </div>
49
- <div
50
- class="actions"
154
+ </form>
155
+ </div>
156
+ </div>
157
+ `;
158
+
159
+ exports[`<StructureTagForm /> matches the latest snapshot edit 1`] = `
160
+ <div>
161
+ <div
162
+ class="ui container link-structure-tag-form"
163
+ >
164
+ <form
165
+ class="ui form"
51
166
  >
52
- <button
53
- class="ui primary disabled right floated button"
54
- disabled=""
55
- tabindex="-1"
56
- type="submit"
167
+ <div
168
+ class="disabled field"
169
+ >
170
+ <label>
171
+ Tag
172
+ </label>
173
+ <div
174
+ aria-disabled="true"
175
+ aria-expanded="false"
176
+ class="ui disabled search selection dropdown"
177
+ name="tagId"
178
+ role="combobox"
179
+ >
180
+ <input
181
+ aria-autocomplete="list"
182
+ autocomplete="off"
183
+ class="search"
184
+ tabindex="-1"
185
+ type="text"
186
+ value=""
187
+ />
188
+ <div
189
+ aria-atomic="true"
190
+ aria-live="polite"
191
+ class="divider text"
192
+ role="alert"
193
+ >
194
+ Tag name
195
+ </div>
196
+ <i
197
+ aria-hidden="true"
198
+ class="dropdown icon"
199
+ />
200
+ <div
201
+ class="menu transition"
202
+ role="listbox"
203
+ >
204
+ <div
205
+ aria-checked="false"
206
+ aria-selected="true"
207
+ class="selected item"
208
+ role="option"
209
+ style="pointer-events: all;"
210
+ />
211
+ </div>
212
+ </div>
213
+ </div>
214
+ <div
215
+ class="field"
216
+ >
217
+ <label
218
+ for="comment"
219
+ >
220
+ Comments
221
+ </label>
222
+ <textarea
223
+ id="comment"
224
+ name="comment"
225
+ placeholder="Introduce any comments"
226
+ rows="3"
227
+ >
228
+ foo
229
+ </textarea>
230
+ </div>
231
+ <div
232
+ class="field"
57
233
  >
58
- Save
59
- </button>
60
- <a
61
- class="ui secondary button"
62
- href="/"
63
- role="button"
234
+ <div
235
+ class="ui checkbox"
236
+ >
237
+ <input
238
+ class="hidden"
239
+ id="inherit"
240
+ name="inherit"
241
+ readonly=""
242
+ tabindex="0"
243
+ type="checkbox"
244
+ value=""
245
+ />
246
+ <label
247
+ for="inherit"
248
+ >
249
+ Inherited by children
250
+ </label>
251
+ </div>
252
+ </div>
253
+ <div
254
+ class="actions"
64
255
  >
65
- Cancel
66
- </a>
67
- </div>
68
- </form>
256
+ <button
257
+ class="ui primary disabled button"
258
+ disabled=""
259
+ tabindex="-1"
260
+ type="submit"
261
+ >
262
+ Save
263
+ </button>
264
+ <button
265
+ class="ui secondary button"
266
+ type="button"
267
+ >
268
+ Delete
269
+ </button>
270
+ </div>
271
+ </form>
272
+ </div>
69
273
  </div>
70
274
  `;
@@ -0,0 +1,36 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<Tag /> matches the latest snapshot 1`] = `
4
+ <Fragment>
5
+ <TagCrumbs
6
+ action="tags.actions.create"
7
+ />
8
+ <Container
9
+ as={[Function]}
10
+ text={true}
11
+ >
12
+ <Header
13
+ as="h2"
14
+ >
15
+ <Icon
16
+ as="i"
17
+ name="tag"
18
+ />
19
+ <HeaderContent>
20
+ <MemoizedFormattedMessage
21
+ id="tags.actions.create"
22
+ />
23
+ </HeaderContent>
24
+ </Header>
25
+ <TagForm
26
+ onSubmit={[MockFunction]}
27
+ tag={
28
+ Object {
29
+ "domainIds": Array [],
30
+ "name": "",
31
+ }
32
+ }
33
+ />
34
+ </Container>
35
+ </Fragment>
36
+ `;
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<StructureTagsCards /> matches the latest snapshot, renders a link for each tag 1`] = `
3
+ exports[`<TagCards /> matches the latest snapshot, renders a link for each tag 1`] = `
4
4
  <div>
5
5
  <div
6
6
  class="ui cards"
@@ -0,0 +1,102 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<TagCrumbs /> matches the latest snapshot 1`] = `
4
+ Object {
5
+ "asFragment": [Function],
6
+ "baseElement": <body>
7
+ <div>
8
+ <div
9
+ class="ui breadcrumb"
10
+ >
11
+ <a
12
+ class="section"
13
+ href="/structureTags"
14
+ >
15
+ Structure Tags
16
+ </a>
17
+ <i
18
+ aria-hidden="true"
19
+ class="right angle icon divider"
20
+ />
21
+ <div
22
+ class="active section"
23
+ >
24
+ Edit Structure Tag
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </body>,
29
+ "container": <div>
30
+ <div
31
+ class="ui breadcrumb"
32
+ >
33
+ <a
34
+ class="section"
35
+ href="/structureTags"
36
+ >
37
+ Structure Tags
38
+ </a>
39
+ <i
40
+ aria-hidden="true"
41
+ class="right angle icon divider"
42
+ />
43
+ <div
44
+ class="active section"
45
+ >
46
+ Edit Structure Tag
47
+ </div>
48
+ </div>
49
+ </div>,
50
+ "debug": [Function],
51
+ "findAllByAltText": [Function],
52
+ "findAllByDisplayValue": [Function],
53
+ "findAllByLabelText": [Function],
54
+ "findAllByPlaceholderText": [Function],
55
+ "findAllByRole": [Function],
56
+ "findAllByTestId": [Function],
57
+ "findAllByText": [Function],
58
+ "findAllByTitle": [Function],
59
+ "findByAltText": [Function],
60
+ "findByDisplayValue": [Function],
61
+ "findByLabelText": [Function],
62
+ "findByPlaceholderText": [Function],
63
+ "findByRole": [Function],
64
+ "findByTestId": [Function],
65
+ "findByText": [Function],
66
+ "findByTitle": [Function],
67
+ "getAllByAltText": [Function],
68
+ "getAllByDisplayValue": [Function],
69
+ "getAllByLabelText": [Function],
70
+ "getAllByPlaceholderText": [Function],
71
+ "getAllByRole": [Function],
72
+ "getAllByTestId": [Function],
73
+ "getAllByText": [Function],
74
+ "getAllByTitle": [Function],
75
+ "getByAltText": [Function],
76
+ "getByDisplayValue": [Function],
77
+ "getByLabelText": [Function],
78
+ "getByPlaceholderText": [Function],
79
+ "getByRole": [Function],
80
+ "getByTestId": [Function],
81
+ "getByText": [Function],
82
+ "getByTitle": [Function],
83
+ "queryAllByAltText": [Function],
84
+ "queryAllByDisplayValue": [Function],
85
+ "queryAllByLabelText": [Function],
86
+ "queryAllByPlaceholderText": [Function],
87
+ "queryAllByRole": [Function],
88
+ "queryAllByTestId": [Function],
89
+ "queryAllByText": [Function],
90
+ "queryAllByTitle": [Function],
91
+ "queryByAltText": [Function],
92
+ "queryByDisplayValue": [Function],
93
+ "queryByLabelText": [Function],
94
+ "queryByPlaceholderText": [Function],
95
+ "queryByRole": [Function],
96
+ "queryByTestId": [Function],
97
+ "queryByText": [Function],
98
+ "queryByTitle": [Function],
99
+ "rerender": [Function],
100
+ "unmount": [Function],
101
+ }
102
+ `;
@@ -0,0 +1,70 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<TagForm /> matches the latest snapshot 1`] = `
4
+ <div>
5
+ <form
6
+ class="ui loading form"
7
+ >
8
+ <div
9
+ class="required field"
10
+ >
11
+ <label
12
+ for="name"
13
+ >
14
+ Name
15
+ </label>
16
+ <div
17
+ class="ui input"
18
+ >
19
+ <input
20
+ autocomplete="off"
21
+ id="name"
22
+ placeholder="Name"
23
+ required=""
24
+ type="text"
25
+ value="foo"
26
+ />
27
+ </div>
28
+ </div>
29
+ <div
30
+ class="field"
31
+ >
32
+ <label
33
+ for="description"
34
+ >
35
+ Description
36
+ </label>
37
+ <div
38
+ class="ui input"
39
+ >
40
+ <input
41
+ autocomplete="off"
42
+ id="description"
43
+ placeholder="Description"
44
+ type="text"
45
+ value="bar"
46
+ />
47
+ </div>
48
+ </div>
49
+ <div
50
+ class="actions"
51
+ >
52
+ <button
53
+ class="ui primary disabled right floated button"
54
+ disabled=""
55
+ tabindex="-1"
56
+ type="submit"
57
+ >
58
+ Save
59
+ </button>
60
+ <a
61
+ class="ui secondary button"
62
+ href="/"
63
+ role="button"
64
+ >
65
+ Cancel
66
+ </a>
67
+ </div>
68
+ </form>
69
+ </div>
70
+ `;
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<StructureTags /> matches the latest snapshot 1`] = `
3
+ exports[`<Tags /> matches the latest snapshot 1`] = `
4
4
  <div>
5
5
  <div
6
6
  class="ui segment"