@madie/madie-design-system 1.2.25 → 1.2.27
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/components/MadieAlert/index.jsx +91 -4
- package/coverage/clover.xml +48 -19
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +16 -16
- package/coverage/lcov-report/react/components/Accordion/index.html +1 -1
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Button/index.html +1 -1
- package/coverage/lcov-report/react/components/Button/index.js.html +1 -1
- package/coverage/lcov-report/react/components/DateField/DateField.jsx.html +1 -1
- package/coverage/lcov-report/react/components/DateField/index.html +1 -1
- package/coverage/lcov-report/react/components/DateTimeField/DateTimeField.jsx.html +1 -1
- package/coverage/lcov-report/react/components/DateTimeField/index.html +1 -1
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Error/error.js.html +1 -1
- package/coverage/lcov-report/react/components/Error/index.html +1 -1
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Footer/LegacyFooterUI.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Footer/footer.js.html +1 -1
- package/coverage/lcov-report/react/components/Footer/index.html +1 -1
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Infotip/index.html +1 -1
- package/coverage/lcov-report/react/components/Infotip/index.js.html +1 -1
- package/coverage/lcov-report/react/components/InputLabel/index.html +1 -1
- package/coverage/lcov-report/react/components/InputLabel/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/MadieAlert/index.html +14 -14
- package/coverage/lcov-report/react/components/MadieAlert/index.jsx.html +278 -17
- package/coverage/lcov-report/react/components/MadieDeleteDialog/index.html +1 -1
- package/coverage/lcov-report/react/components/MadieDeleteDialog/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/MadieDialog/index.html +1 -1
- package/coverage/lcov-report/react/components/MadieDialog/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/MadieDiscardDialog/index.html +1 -1
- package/coverage/lcov-report/react/components/MadieDiscardDialog/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/MadieSpinner/index.html +1 -1
- package/coverage/lcov-report/react/components/MadieSpinner/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/MadieTooltip/index.html +1 -1
- package/coverage/lcov-report/react/components/MadieTooltip/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/MadieTooltipIcon/index.html +1 -1
- package/coverage/lcov-report/react/components/MadieTooltipIcon/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Pagination/index.html +1 -1
- package/coverage/lcov-report/react/components/Pagination/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Popover/index.html +1 -1
- package/coverage/lcov-report/react/components/Popover/index.js.html +1 -1
- package/coverage/lcov-report/react/components/ReadOnlyTextField/index.html +1 -1
- package/coverage/lcov-report/react/components/ReadOnlyTextField/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Select/index.html +1 -1
- package/coverage/lcov-report/react/components/Select/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Tabs/Tab.js.html +1 -1
- package/coverage/lcov-report/react/components/Tabs/index.html +1 -1
- package/coverage/lcov-report/react/components/Tabs/index.js.html +1 -1
- package/coverage/lcov-report/react/components/TextArea/index.html +1 -1
- package/coverage/lcov-report/react/components/TextArea/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/TextField/index.html +1 -1
- package/coverage/lcov-report/react/components/TextField/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Toast/index.html +1 -1
- package/coverage/lcov-report/react/components/Toast/index.jsx.html +8 -8
- package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Tooltip/index.html +1 -1
- package/coverage/lcov-report/react/components/Tooltip/index.js.html +1 -1
- package/coverage/lcov-report/react/components/Tooltip/position.js.html +1 -1
- package/coverage/lcov-report/react/index.html +1 -1
- package/coverage/lcov-report/react/index.js.html +1 -1
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +1 -1
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +1 -1
- package/coverage/lcov-report/react/lib/index.html +1 -1
- package/coverage/lcov.info +104 -36
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +7 -7
- package/dist/react/index.js.map +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/test/components/MadieAlert.test.js +122 -1
|
@@ -148,7 +148,7 @@ export default class ErrorPage {
|
|
|
148
148
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
149
149
|
Code coverage generated by
|
|
150
150
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
151
|
-
at 2024-08-
|
|
151
|
+
at 2024-08-19T19:52:18.982Z
|
|
152
152
|
</div>
|
|
153
153
|
<script src="../../../prettify.js"></script>
|
|
154
154
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at 2024-08-
|
|
134
|
+
at 2024-08-19T19:52:18.982Z
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../../prettify.js"></script>
|
|
137
137
|
<script>
|
|
@@ -481,7 +481,7 @@ export default FooterUI;
|
|
|
481
481
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
482
482
|
Code coverage generated by
|
|
483
483
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
484
|
-
at 2024-08-
|
|
484
|
+
at 2024-08-19T19:52:18.982Z
|
|
485
485
|
</div>
|
|
486
486
|
<script src="../../../prettify.js"></script>
|
|
487
487
|
<script>
|
|
@@ -682,7 +682,7 @@ export default LegacyFooterUI;
|
|
|
682
682
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
683
683
|
Code coverage generated by
|
|
684
684
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
685
|
-
at 2024-08-
|
|
685
|
+
at 2024-08-19T19:52:18.982Z
|
|
686
686
|
</div>
|
|
687
687
|
<script src="../../../prettify.js"></script>
|
|
688
688
|
<script>
|
|
@@ -160,7 +160,7 @@ export default class Footer {
|
|
|
160
160
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
161
161
|
Code coverage generated by
|
|
162
162
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
163
|
-
at 2024-08-
|
|
163
|
+
at 2024-08-19T19:52:18.982Z
|
|
164
164
|
</div>
|
|
165
165
|
<script src="../../../prettify.js"></script>
|
|
166
166
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at 2024-08-
|
|
134
|
+
at 2024-08-19T19:52:18.982Z
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../../prettify.js"></script>
|
|
137
137
|
<script>
|
|
@@ -295,7 +295,7 @@ export default Infotip;
|
|
|
295
295
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
296
296
|
Code coverage generated by
|
|
297
297
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
298
|
-
at 2024-08-
|
|
298
|
+
at 2024-08-19T19:52:18.982Z
|
|
299
299
|
</div>
|
|
300
300
|
<script src="../../../prettify.js"></script>
|
|
301
301
|
<script>
|
|
@@ -193,7 +193,7 @@ InfotipIcon.defaultProps = {
|
|
|
193
193
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
194
194
|
Code coverage generated by
|
|
195
195
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
196
|
-
at 2024-08-
|
|
196
|
+
at 2024-08-19T19:52:18.982Z
|
|
197
197
|
</div>
|
|
198
198
|
<script src="../../../prettify.js"></script>
|
|
199
199
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at 2024-08-
|
|
134
|
+
at 2024-08-19T19:52:18.982Z
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../../prettify.js"></script>
|
|
137
137
|
<script>
|
|
@@ -79,7 +79,7 @@ export default Infotip;
|
|
|
79
79
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
80
80
|
Code coverage generated by
|
|
81
81
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
82
|
-
at 2024-08-
|
|
82
|
+
at 2024-08-19T19:52:18.982Z
|
|
83
83
|
</div>
|
|
84
84
|
<script src="../../../prettify.js"></script>
|
|
85
85
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2024-08-
|
|
104
|
+
at 2024-08-19T19:52:18.982Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -229,7 +229,7 @@ export default Label;
|
|
|
229
229
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
230
230
|
Code coverage generated by
|
|
231
231
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
232
|
-
at 2024-08-
|
|
232
|
+
at 2024-08-19T19:52:18.982Z
|
|
233
233
|
</div>
|
|
234
234
|
<script src="../../../prettify.js"></script>
|
|
235
235
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">97.29% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>36/37</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">83.33% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>30/36</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>7/7</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>36/36</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -80,17 +80,17 @@
|
|
|
80
80
|
</thead>
|
|
81
81
|
<tbody><tr>
|
|
82
82
|
<td class="file high" data-value="index.jsx"><a href="index.jsx.html">index.jsx</a></td>
|
|
83
|
-
<td data-value="
|
|
84
|
-
<div class="chart"><div class="cover-fill
|
|
83
|
+
<td data-value="97.29" class="pic high">
|
|
84
|
+
<div class="chart"><div class="cover-fill" style="width: 97%"></div><div class="cover-empty" style="width: 3%"></div></div>
|
|
85
85
|
</td>
|
|
86
|
+
<td data-value="97.29" class="pct high">97.29%</td>
|
|
87
|
+
<td data-value="37" class="abs high">36/37</td>
|
|
88
|
+
<td data-value="83.33" class="pct high">83.33%</td>
|
|
89
|
+
<td data-value="36" class="abs high">30/36</td>
|
|
86
90
|
<td data-value="100" class="pct high">100%</td>
|
|
87
91
|
<td data-value="7" class="abs high">7/7</td>
|
|
88
|
-
<td data-value="66.66" class="pct medium">66.66%</td>
|
|
89
|
-
<td data-value="9" class="abs medium">6/9</td>
|
|
90
|
-
<td data-value="100" class="pct high">100%</td>
|
|
91
|
-
<td data-value="1" class="abs high">1/1</td>
|
|
92
92
|
<td data-value="100" class="pct high">100%</td>
|
|
93
|
-
<td data-value="
|
|
93
|
+
<td data-value="36" class="abs high">36/36</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
</tbody>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2024-08-
|
|
104
|
+
at 2024-08-19T19:52:18.982Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">97.29% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>36/37</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">83.33% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>30/36</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>7/7</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>36/36</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -136,7 +136,110 @@
|
|
|
136
136
|
<a name='L71'></a><a href='#L71'>71</a>
|
|
137
137
|
<a name='L72'></a><a href='#L72'>72</a>
|
|
138
138
|
<a name='L73'></a><a href='#L73'>73</a>
|
|
139
|
-
<a name='L74'></a><a href='#L74'>74</a
|
|
139
|
+
<a name='L74'></a><a href='#L74'>74</a>
|
|
140
|
+
<a name='L75'></a><a href='#L75'>75</a>
|
|
141
|
+
<a name='L76'></a><a href='#L76'>76</a>
|
|
142
|
+
<a name='L77'></a><a href='#L77'>77</a>
|
|
143
|
+
<a name='L78'></a><a href='#L78'>78</a>
|
|
144
|
+
<a name='L79'></a><a href='#L79'>79</a>
|
|
145
|
+
<a name='L80'></a><a href='#L80'>80</a>
|
|
146
|
+
<a name='L81'></a><a href='#L81'>81</a>
|
|
147
|
+
<a name='L82'></a><a href='#L82'>82</a>
|
|
148
|
+
<a name='L83'></a><a href='#L83'>83</a>
|
|
149
|
+
<a name='L84'></a><a href='#L84'>84</a>
|
|
150
|
+
<a name='L85'></a><a href='#L85'>85</a>
|
|
151
|
+
<a name='L86'></a><a href='#L86'>86</a>
|
|
152
|
+
<a name='L87'></a><a href='#L87'>87</a>
|
|
153
|
+
<a name='L88'></a><a href='#L88'>88</a>
|
|
154
|
+
<a name='L89'></a><a href='#L89'>89</a>
|
|
155
|
+
<a name='L90'></a><a href='#L90'>90</a>
|
|
156
|
+
<a name='L91'></a><a href='#L91'>91</a>
|
|
157
|
+
<a name='L92'></a><a href='#L92'>92</a>
|
|
158
|
+
<a name='L93'></a><a href='#L93'>93</a>
|
|
159
|
+
<a name='L94'></a><a href='#L94'>94</a>
|
|
160
|
+
<a name='L95'></a><a href='#L95'>95</a>
|
|
161
|
+
<a name='L96'></a><a href='#L96'>96</a>
|
|
162
|
+
<a name='L97'></a><a href='#L97'>97</a>
|
|
163
|
+
<a name='L98'></a><a href='#L98'>98</a>
|
|
164
|
+
<a name='L99'></a><a href='#L99'>99</a>
|
|
165
|
+
<a name='L100'></a><a href='#L100'>100</a>
|
|
166
|
+
<a name='L101'></a><a href='#L101'>101</a>
|
|
167
|
+
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
|
+
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
|
+
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
|
+
<a name='L105'></a><a href='#L105'>105</a>
|
|
171
|
+
<a name='L106'></a><a href='#L106'>106</a>
|
|
172
|
+
<a name='L107'></a><a href='#L107'>107</a>
|
|
173
|
+
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
|
+
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
|
+
<a name='L110'></a><a href='#L110'>110</a>
|
|
176
|
+
<a name='L111'></a><a href='#L111'>111</a>
|
|
177
|
+
<a name='L112'></a><a href='#L112'>112</a>
|
|
178
|
+
<a name='L113'></a><a href='#L113'>113</a>
|
|
179
|
+
<a name='L114'></a><a href='#L114'>114</a>
|
|
180
|
+
<a name='L115'></a><a href='#L115'>115</a>
|
|
181
|
+
<a name='L116'></a><a href='#L116'>116</a>
|
|
182
|
+
<a name='L117'></a><a href='#L117'>117</a>
|
|
183
|
+
<a name='L118'></a><a href='#L118'>118</a>
|
|
184
|
+
<a name='L119'></a><a href='#L119'>119</a>
|
|
185
|
+
<a name='L120'></a><a href='#L120'>120</a>
|
|
186
|
+
<a name='L121'></a><a href='#L121'>121</a>
|
|
187
|
+
<a name='L122'></a><a href='#L122'>122</a>
|
|
188
|
+
<a name='L123'></a><a href='#L123'>123</a>
|
|
189
|
+
<a name='L124'></a><a href='#L124'>124</a>
|
|
190
|
+
<a name='L125'></a><a href='#L125'>125</a>
|
|
191
|
+
<a name='L126'></a><a href='#L126'>126</a>
|
|
192
|
+
<a name='L127'></a><a href='#L127'>127</a>
|
|
193
|
+
<a name='L128'></a><a href='#L128'>128</a>
|
|
194
|
+
<a name='L129'></a><a href='#L129'>129</a>
|
|
195
|
+
<a name='L130'></a><a href='#L130'>130</a>
|
|
196
|
+
<a name='L131'></a><a href='#L131'>131</a>
|
|
197
|
+
<a name='L132'></a><a href='#L132'>132</a>
|
|
198
|
+
<a name='L133'></a><a href='#L133'>133</a>
|
|
199
|
+
<a name='L134'></a><a href='#L134'>134</a>
|
|
200
|
+
<a name='L135'></a><a href='#L135'>135</a>
|
|
201
|
+
<a name='L136'></a><a href='#L136'>136</a>
|
|
202
|
+
<a name='L137'></a><a href='#L137'>137</a>
|
|
203
|
+
<a name='L138'></a><a href='#L138'>138</a>
|
|
204
|
+
<a name='L139'></a><a href='#L139'>139</a>
|
|
205
|
+
<a name='L140'></a><a href='#L140'>140</a>
|
|
206
|
+
<a name='L141'></a><a href='#L141'>141</a>
|
|
207
|
+
<a name='L142'></a><a href='#L142'>142</a>
|
|
208
|
+
<a name='L143'></a><a href='#L143'>143</a>
|
|
209
|
+
<a name='L144'></a><a href='#L144'>144</a>
|
|
210
|
+
<a name='L145'></a><a href='#L145'>145</a>
|
|
211
|
+
<a name='L146'></a><a href='#L146'>146</a>
|
|
212
|
+
<a name='L147'></a><a href='#L147'>147</a>
|
|
213
|
+
<a name='L148'></a><a href='#L148'>148</a>
|
|
214
|
+
<a name='L149'></a><a href='#L149'>149</a>
|
|
215
|
+
<a name='L150'></a><a href='#L150'>150</a>
|
|
216
|
+
<a name='L151'></a><a href='#L151'>151</a>
|
|
217
|
+
<a name='L152'></a><a href='#L152'>152</a>
|
|
218
|
+
<a name='L153'></a><a href='#L153'>153</a>
|
|
219
|
+
<a name='L154'></a><a href='#L154'>154</a>
|
|
220
|
+
<a name='L155'></a><a href='#L155'>155</a>
|
|
221
|
+
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
|
+
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
|
+
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
+
<a name='L159'></a><a href='#L159'>159</a>
|
|
225
|
+
<a name='L160'></a><a href='#L160'>160</a>
|
|
226
|
+
<a name='L161'></a><a href='#L161'>161</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
227
|
+
<span class="cline-any cline-neutral"> </span>
|
|
228
|
+
<span class="cline-any cline-neutral"> </span>
|
|
229
|
+
<span class="cline-any cline-neutral"> </span>
|
|
230
|
+
<span class="cline-any cline-neutral"> </span>
|
|
231
|
+
<span class="cline-any cline-neutral"> </span>
|
|
232
|
+
<span class="cline-any cline-neutral"> </span>
|
|
233
|
+
<span class="cline-any cline-neutral"> </span>
|
|
234
|
+
<span class="cline-any cline-neutral"> </span>
|
|
235
|
+
<span class="cline-any cline-neutral"> </span>
|
|
236
|
+
<span class="cline-any cline-neutral"> </span>
|
|
237
|
+
<span class="cline-any cline-neutral"> </span>
|
|
238
|
+
<span class="cline-any cline-neutral"> </span>
|
|
239
|
+
<span class="cline-any cline-neutral"> </span>
|
|
240
|
+
<span class="cline-any cline-neutral"> </span>
|
|
241
|
+
<span class="cline-any cline-yes">1x</span>
|
|
242
|
+
<span class="cline-any cline-neutral"> </span>
|
|
140
243
|
<span class="cline-any cline-neutral"> </span>
|
|
141
244
|
<span class="cline-any cline-neutral"> </span>
|
|
142
245
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -144,33 +247,100 @@
|
|
|
144
247
|
<span class="cline-any cline-neutral"> </span>
|
|
145
248
|
<span class="cline-any cline-neutral"> </span>
|
|
146
249
|
<span class="cline-any cline-neutral"> </span>
|
|
250
|
+
<span class="cline-any cline-yes">12x</span>
|
|
251
|
+
<span class="cline-any cline-yes">12x</span>
|
|
147
252
|
<span class="cline-any cline-neutral"> </span>
|
|
253
|
+
<span class="cline-any cline-yes">12x</span>
|
|
254
|
+
<span class="cline-any cline-yes">3x</span>
|
|
255
|
+
<span class="cline-any cline-yes">14x</span>
|
|
256
|
+
<span class="cline-any cline-yes">14x</span>
|
|
257
|
+
<span class="cline-any cline-neutral"> </span>
|
|
258
|
+
<span class="cline-any cline-yes">14x</span>
|
|
259
|
+
<span class="cline-any cline-yes">4x</span>
|
|
260
|
+
<span class="cline-any cline-yes">10x</span>
|
|
261
|
+
<span class="cline-any cline-yes">10x</span>
|
|
262
|
+
<span class="cline-any cline-yes">1x</span>
|
|
263
|
+
<span class="cline-any cline-yes">9x</span>
|
|
264
|
+
<span class="cline-any cline-yes">5x</span>
|
|
265
|
+
<span class="cline-any cline-neutral"> </span>
|
|
266
|
+
<span class="cline-any cline-neutral"> </span>
|
|
267
|
+
<span class="cline-any cline-yes">10x</span>
|
|
268
|
+
<span class="cline-any cline-yes">1x</span>
|
|
269
|
+
<span class="cline-any cline-yes">9x</span>
|
|
148
270
|
<span class="cline-any cline-neutral"> </span>
|
|
149
271
|
<span class="cline-any cline-neutral"> </span>
|
|
150
272
|
<span class="cline-any cline-neutral"> </span>
|
|
273
|
+
<span class="cline-any cline-yes">8x</span>
|
|
274
|
+
<span class="cline-any cline-yes">1x</span>
|
|
275
|
+
<span class="cline-any cline-neutral"> </span>
|
|
151
276
|
<span class="cline-any cline-neutral"> </span>
|
|
152
277
|
<span class="cline-any cline-neutral"> </span>
|
|
153
278
|
<span class="cline-any cline-yes">1x</span>
|
|
154
279
|
<span class="cline-any cline-neutral"> </span>
|
|
280
|
+
<span class="cline-any cline-yes">14x</span>
|
|
281
|
+
<span class="cline-any cline-neutral"> </span>
|
|
282
|
+
<span class="cline-any cline-yes">3x</span>
|
|
283
|
+
<span class="cline-any cline-neutral"> </span>
|
|
284
|
+
<span class="cline-any cline-neutral"> </span>
|
|
285
|
+
<span class="cline-any cline-yes">12x</span>
|
|
286
|
+
<span class="cline-any cline-yes">5x</span>
|
|
287
|
+
<span class="cline-any cline-yes">3x</span>
|
|
155
288
|
<span class="cline-any cline-neutral"> </span>
|
|
156
289
|
<span class="cline-any cline-neutral"> </span>
|
|
157
290
|
<span class="cline-any cline-neutral"> </span>
|
|
291
|
+
<span class="cline-any cline-yes">12x</span>
|
|
158
292
|
<span class="cline-any cline-neutral"> </span>
|
|
159
293
|
<span class="cline-any cline-neutral"> </span>
|
|
160
294
|
<span class="cline-any cline-neutral"> </span>
|
|
161
295
|
<span class="cline-any cline-neutral"> </span>
|
|
162
|
-
<span class="cline-any cline-yes">2x</span>
|
|
163
296
|
<span class="cline-any cline-neutral"> </span>
|
|
297
|
+
<span class="cline-any cline-yes">12x</span>
|
|
298
|
+
<span class="cline-any cline-yes">12x</span>
|
|
299
|
+
<span class="cline-any cline-yes">12x</span>
|
|
164
300
|
<span class="cline-any cline-neutral"> </span>
|
|
301
|
+
<span class="cline-any cline-yes">12x</span>
|
|
302
|
+
<span class="cline-any cline-neutral"> </span>
|
|
303
|
+
<span class="cline-any cline-neutral"> </span>
|
|
304
|
+
<span class="cline-any cline-neutral"> </span>
|
|
305
|
+
<span class="cline-any cline-neutral"> </span>
|
|
306
|
+
<span class="cline-any cline-neutral"> </span>
|
|
307
|
+
<span class="cline-any cline-neutral"> </span>
|
|
308
|
+
<span class="cline-any cline-neutral"> </span>
|
|
309
|
+
<span class="cline-any cline-neutral"> </span>
|
|
310
|
+
<span class="cline-any cline-neutral"> </span>
|
|
311
|
+
<span class="cline-any cline-yes">1x</span>
|
|
165
312
|
<span class="cline-any cline-neutral"> </span>
|
|
166
313
|
<span class="cline-any cline-neutral"> </span>
|
|
167
314
|
<span class="cline-any cline-neutral"> </span>
|
|
168
|
-
<span class="cline-any cline-yes">2x</span>
|
|
169
315
|
<span class="cline-any cline-neutral"> </span>
|
|
170
|
-
<span class="cline-any cline-yes">2x</span>
|
|
171
|
-
<span class="cline-any cline-yes">2x</span>
|
|
172
316
|
<span class="cline-any cline-neutral"> </span>
|
|
173
|
-
<span class="cline-any cline-
|
|
317
|
+
<span class="cline-any cline-neutral"> </span>
|
|
318
|
+
<span class="cline-any cline-neutral"> </span>
|
|
319
|
+
<span class="cline-any cline-neutral"> </span>
|
|
320
|
+
<span class="cline-any cline-neutral"> </span>
|
|
321
|
+
<span class="cline-any cline-neutral"> </span>
|
|
322
|
+
<span class="cline-any cline-neutral"> </span>
|
|
323
|
+
<span class="cline-any cline-neutral"> </span>
|
|
324
|
+
<span class="cline-any cline-neutral"> </span>
|
|
325
|
+
<span class="cline-any cline-neutral"> </span>
|
|
326
|
+
<span class="cline-any cline-neutral"> </span>
|
|
327
|
+
<span class="cline-any cline-neutral"> </span>
|
|
328
|
+
<span class="cline-any cline-neutral"> </span>
|
|
329
|
+
<span class="cline-any cline-neutral"> </span>
|
|
330
|
+
<span class="cline-any cline-neutral"> </span>
|
|
331
|
+
<span class="cline-any cline-neutral"> </span>
|
|
332
|
+
<span class="cline-any cline-neutral"> </span>
|
|
333
|
+
<span class="cline-any cline-neutral"> </span>
|
|
334
|
+
<span class="cline-any cline-neutral"> </span>
|
|
335
|
+
<span class="cline-any cline-neutral"> </span>
|
|
336
|
+
<span class="cline-any cline-neutral"> </span>
|
|
337
|
+
<span class="cline-any cline-neutral"> </span>
|
|
338
|
+
<span class="cline-any cline-neutral"> </span>
|
|
339
|
+
<span class="cline-any cline-yes">3x</span>
|
|
340
|
+
<span class="cline-any cline-yes">3x</span>
|
|
341
|
+
<span class="cline-any cline-yes">3x</span>
|
|
342
|
+
<span class="cline-any cline-neutral"> </span>
|
|
343
|
+
<span class="cline-any cline-neutral"> </span>
|
|
174
344
|
<span class="cline-any cline-neutral"> </span>
|
|
175
345
|
<span class="cline-any cline-neutral"> </span>
|
|
176
346
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -208,17 +378,22 @@
|
|
|
208
378
|
<span class="cline-any cline-neutral"> </span>
|
|
209
379
|
<span class="cline-any cline-neutral"> </span>
|
|
210
380
|
<span class="cline-any cline-neutral"> </span>
|
|
381
|
+
<span class="cline-any cline-yes">1x</span>
|
|
382
|
+
<span class="cline-any cline-neutral"> </span>
|
|
383
|
+
<span class="cline-any cline-neutral"> </span>
|
|
384
|
+
<span class="cline-any cline-neutral"> </span>
|
|
211
385
|
<span class="cline-any cline-neutral"> </span>
|
|
212
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React from "react";
|
|
386
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useEffect, useState } from "react";
|
|
213
387
|
|
|
214
388
|
import ErrorIcon from "@mui/icons-material/Error"; // warning
|
|
215
389
|
import InfoIcon from "@mui/icons-material/Info"; // info
|
|
216
390
|
import CancelIcon from "@mui/icons-material/Cancel"; // error
|
|
217
391
|
import CheckCircleIcon from "@mui/icons-material/CheckCircle"; //success
|
|
218
|
-
|
|
392
|
+
import ContentCopyIcon from "@mui/icons-material/ContentCopy"; //copy
|
|
393
|
+
import Tooltip from "@mui/material/Tooltip";
|
|
219
394
|
import { IconButton } from "@mui/material";
|
|
220
395
|
import ClearIcon from "@mui/icons-material/Clear";
|
|
221
|
-
|
|
396
|
+
import Toast from "../Toast/index";
|
|
222
397
|
import classNames from "classnames";
|
|
223
398
|
import PropTypes from "prop-types";
|
|
224
399
|
|
|
@@ -230,7 +405,48 @@ const MadieAlert = ({
|
|
|
230
405
|
canClose = <span class="branch-0 cbranch-no" title="branch not covered" >true,</span>
|
|
231
406
|
alertProps, // props to pass to outer component
|
|
232
407
|
closeButtonProps, // props to pass to close button
|
|
408
|
+
copyButton,
|
|
233
409
|
}) => {
|
|
410
|
+
const [copyText, setCopyText] = useState("");
|
|
411
|
+
const [toastOpen, setToastOpen] = useState(false);
|
|
412
|
+
|
|
413
|
+
const copyButtonBuilder = (content) => {
|
|
414
|
+
const traversal = (contentNode, parentNode = true) => {
|
|
415
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!contentNode) <span class="cstat-no" title="statement not covered" >return "";</span>
|
|
416
|
+
let result = "";
|
|
417
|
+
|
|
418
|
+
if (Array.isArray(contentNode.props?.children)) {
|
|
419
|
+
contentNode.props.children.forEach((child, index) => {
|
|
420
|
+
result += traversal(child, false);
|
|
421
|
+
if (parentNode && index == 1) {
|
|
422
|
+
result += "\n";
|
|
423
|
+
} else if (contentNode.type === "ul") {
|
|
424
|
+
result = "\n" + result + "\n";
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
} else if (typeof contentNode.props?.children === "object") {
|
|
428
|
+
result += traversal(contentNode.props.children, false);
|
|
429
|
+
} else if (
|
|
430
|
+
typeof contentNode.props?.children === "string" ||
|
|
431
|
+
typeof contentNode.props?.children === "number"
|
|
432
|
+
) {
|
|
433
|
+
result += contentNode.props.children.toString();
|
|
434
|
+
} else <span class="missing-if-branch" title="else path not taken" >E</span>if (
|
|
435
|
+
typeof contentNode === "string" ||
|
|
436
|
+
<span class="branch-1 cbranch-no" title="branch not covered" > typeof contentNode === "number"</span>
|
|
437
|
+
) {
|
|
438
|
+
result += contentNode.toString();
|
|
439
|
+
}
|
|
440
|
+
return result;
|
|
441
|
+
};
|
|
442
|
+
return traversal(content).trim();
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
useEffect(() => {
|
|
446
|
+
if (content && copyButton) {
|
|
447
|
+
setCopyText(copyButtonBuilder(content));
|
|
448
|
+
}
|
|
449
|
+
}, [content]);
|
|
234
450
|
// we have four states to render for
|
|
235
451
|
const typeSelect = {
|
|
236
452
|
warning: ErrorIcon,
|
|
@@ -239,15 +455,56 @@ const MadieAlert = ({
|
|
|
239
455
|
success: CheckCircleIcon,
|
|
240
456
|
};
|
|
241
457
|
const Icon = typeSelect[type];
|
|
242
|
-
|
|
243
458
|
const alertClass = classNames("madie-alert", type);
|
|
244
459
|
const iconClass = classNames("alert-icon", type);
|
|
245
460
|
|
|
246
461
|
return (
|
|
247
462
|
visible && (
|
|
248
463
|
<div className={alertClass} {...alertProps}>
|
|
464
|
+
<Toast
|
|
465
|
+
toastKey="copy-success-toast"
|
|
466
|
+
data-testid="copy-success"
|
|
467
|
+
toastType="success"
|
|
468
|
+
open={toastOpen}
|
|
469
|
+
message="Copied to clipboard!"
|
|
470
|
+
onClose={() => {
|
|
471
|
+
setToastOpen(false);
|
|
472
|
+
}}
|
|
473
|
+
autoHideDuration={1500}
|
|
474
|
+
/>
|
|
249
475
|
<Icon className={iconClass} />
|
|
250
476
|
<div id="content">{content && content}</div>
|
|
477
|
+
{copyButton && (
|
|
478
|
+
<Tooltip
|
|
479
|
+
data-testid="copy-button-tooltip"
|
|
480
|
+
title={"Copy Text"}
|
|
481
|
+
arrow
|
|
482
|
+
>
|
|
483
|
+
<IconButton
|
|
484
|
+
sx={{
|
|
485
|
+
marginLeft: "auto",
|
|
486
|
+
"&:after": {
|
|
487
|
+
content: `''`,
|
|
488
|
+
position: "absolute",
|
|
489
|
+
left: "0px",
|
|
490
|
+
width: "1px",
|
|
491
|
+
height: "40px",
|
|
492
|
+
backgroundColor: "#B0B0B0",
|
|
493
|
+
pointerEvents: "none",
|
|
494
|
+
},
|
|
495
|
+
}}
|
|
496
|
+
>
|
|
497
|
+
<ContentCopyIcon
|
|
498
|
+
onClick={(e) => {
|
|
499
|
+
e.preventDefault();
|
|
500
|
+
navigator.clipboard.writeText(copyText);
|
|
501
|
+
setToastOpen(true);
|
|
502
|
+
}}
|
|
503
|
+
sx={{ color: "#242424" }}
|
|
504
|
+
/>
|
|
505
|
+
</IconButton>
|
|
506
|
+
</Tooltip>
|
|
507
|
+
)}
|
|
251
508
|
{canClose && (
|
|
252
509
|
<IconButton
|
|
253
510
|
sx={{
|
|
@@ -279,6 +536,10 @@ MadieAlert.propTypes = {
|
|
|
279
536
|
canClose: PropTypes.bool,
|
|
280
537
|
alertProps: PropTypes.object,
|
|
281
538
|
closeButtonProps: PropTypes.object,
|
|
539
|
+
copyButton: PropTypes.bool,
|
|
540
|
+
};
|
|
541
|
+
MadieAlert.defaultProps = {
|
|
542
|
+
copyButton: false,
|
|
282
543
|
};
|
|
283
544
|
|
|
284
545
|
export default MadieAlert;
|
|
@@ -289,7 +550,7 @@ export default MadieAlert;
|
|
|
289
550
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
290
551
|
Code coverage generated by
|
|
291
552
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
292
|
-
at 2024-08-
|
|
553
|
+
at 2024-08-19T19:52:18.982Z
|
|
293
554
|
</div>
|
|
294
555
|
<script src="../../../prettify.js"></script>
|
|
295
556
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2024-08-
|
|
104
|
+
at 2024-08-19T19:52:18.982Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -232,7 +232,7 @@ export default MadieDeleteDialog;
|
|
|
232
232
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
233
233
|
Code coverage generated by
|
|
234
234
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
235
|
-
at 2024-08-
|
|
235
|
+
at 2024-08-19T19:52:18.982Z
|
|
236
236
|
</div>
|
|
237
237
|
<script src="../../../prettify.js"></script>
|
|
238
238
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2024-08-
|
|
104
|
+
at 2024-08-19T19:52:18.982Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|