@cypress-design/react-testresult 1.0.0 → 1.0.2
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/.turbo/turbo-build.log +3 -1
- package/CHANGELOG.md +19 -0
- package/dist/index.es.mjs +8 -512
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +13 -517
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
- package/rollup.config.mjs +5 -1
package/dist/index.umd.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var clsx = require('clsx');
|
|
5
|
-
var
|
|
5
|
+
var reactStatusicon = require('@cypress-design/react-statusicon');
|
|
6
|
+
var reactIcon = require('@cypress-design/react-icon');
|
|
6
7
|
|
|
7
8
|
function _interopNamespaceDefault(e) {
|
|
8
9
|
var n = Object.create(null);
|
|
@@ -22,7 +23,6 @@ function _interopNamespaceDefault(e) {
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
25
|
-
var iconsRegistry__namespace = /*#__PURE__*/_interopNamespaceDefault(iconsRegistry);
|
|
26
26
|
|
|
27
27
|
/******************************************************************************
|
|
28
28
|
Copyright (c) Microsoft Corporation.
|
|
@@ -41,18 +41,18 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
41
41
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var __assign
|
|
45
|
-
__assign
|
|
44
|
+
var __assign = function() {
|
|
45
|
+
__assign = Object.assign || function __assign(t) {
|
|
46
46
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
47
47
|
s = arguments[i];
|
|
48
48
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
49
49
|
}
|
|
50
50
|
return t;
|
|
51
51
|
};
|
|
52
|
-
return __assign
|
|
52
|
+
return __assign.apply(this, arguments);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
function __rest
|
|
55
|
+
function __rest(s, e) {
|
|
56
56
|
var t = {};
|
|
57
57
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
58
58
|
t[p] = s[p];
|
|
@@ -106,517 +106,13 @@ const classes = {
|
|
|
106
106
|
},
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
/******************************************************************************
|
|
110
|
-
Copyright (c) Microsoft Corporation.
|
|
111
|
-
|
|
112
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
113
|
-
purpose with or without fee is hereby granted.
|
|
114
|
-
|
|
115
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
116
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
117
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
118
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
119
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
120
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
121
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
122
|
-
***************************************************************************** */
|
|
123
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var __assign$1 = function() {
|
|
127
|
-
__assign$1 = Object.assign || function __assign(t) {
|
|
128
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
129
|
-
s = arguments[i];
|
|
130
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
131
|
-
}
|
|
132
|
-
return t;
|
|
133
|
-
};
|
|
134
|
-
return __assign$1.apply(this, arguments);
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
function __rest$1(s, e) {
|
|
138
|
-
var t = {};
|
|
139
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
140
|
-
t[p] = s[p];
|
|
141
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
142
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
143
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
144
|
-
t[p[i]] = s[p[i]];
|
|
145
|
-
}
|
|
146
|
-
return t;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function __spreadArray(to, from, pack) {
|
|
150
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
151
|
-
if (ar || !(i in from)) {
|
|
152
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
153
|
-
ar[i] = from[i];
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
160
|
-
var e = new Error(message);
|
|
161
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* This "const" is used to create the list of statuses
|
|
166
|
-
*/
|
|
167
|
-
const constStatuses = {
|
|
168
|
-
running: {
|
|
169
|
-
// <tw-keep strokeColor="indigo-400" />
|
|
170
|
-
color: 'indigo-400',
|
|
171
|
-
use: 'Runs, specs, groups, test results',
|
|
172
|
-
variants: ['outline'],
|
|
173
|
-
// <tw-keep fillColor="gray-100" />
|
|
174
|
-
secondaryColor: 'gray-100',
|
|
175
|
-
},
|
|
176
|
-
failing: {
|
|
177
|
-
// <tw-keep strokeColor="red-400" />
|
|
178
|
-
color: 'red-400',
|
|
179
|
-
use: 'Runs, specs, groups, test results',
|
|
180
|
-
variants: ['outline'],
|
|
181
|
-
// <tw-keep fillColor="gray-100" />
|
|
182
|
-
secondaryColor: 'gray-100',
|
|
183
|
-
},
|
|
184
|
-
passed: {
|
|
185
|
-
// <tw-keep strokeColor="jade-400" />
|
|
186
|
-
color: 'jade-400',
|
|
187
|
-
use: 'Runs, specs, groups, test results',
|
|
188
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Passed',
|
|
189
|
-
variants: ['outline', 'simple', 'solid'],
|
|
190
|
-
},
|
|
191
|
-
failed: {
|
|
192
|
-
// <tw-keep strokeColor="red-400" />
|
|
193
|
-
color: 'red-400',
|
|
194
|
-
use: 'Runs, specs, groups, test results',
|
|
195
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Failed',
|
|
196
|
-
variants: ['outline', 'simple', 'solid'],
|
|
197
|
-
},
|
|
198
|
-
unclaimed: {
|
|
199
|
-
// <tw-keep strokeColor="gray-100" />
|
|
200
|
-
color: 'gray-100',
|
|
201
|
-
use: 'Specs',
|
|
202
|
-
variants: ['outline'],
|
|
203
|
-
},
|
|
204
|
-
placeholder: {
|
|
205
|
-
// <tw-keep strokeColor="gray-300" />
|
|
206
|
-
color: 'gray-300',
|
|
207
|
-
use: 'Placeholder',
|
|
208
|
-
variants: ['solid'],
|
|
209
|
-
},
|
|
210
|
-
cancelled: {
|
|
211
|
-
// <tw-keep strokeColor="gray-300" />
|
|
212
|
-
color: 'gray-300',
|
|
213
|
-
use: 'Runs, specs, groups, test results',
|
|
214
|
-
variants: ['outline', 'solid'],
|
|
215
|
-
},
|
|
216
|
-
noTests: {
|
|
217
|
-
// <tw-keep strokeColor="orange-400" />
|
|
218
|
-
color: 'orange-400',
|
|
219
|
-
use: 'Runs, specs, groups',
|
|
220
|
-
variants: ['outline', 'solid'],
|
|
221
|
-
},
|
|
222
|
-
errored: {
|
|
223
|
-
// <tw-keep strokeColor="orange-400" />
|
|
224
|
-
color: 'orange-400',
|
|
225
|
-
use: 'Runs, specs, groups, test results',
|
|
226
|
-
variants: ['outline', 'solid'],
|
|
227
|
-
},
|
|
228
|
-
timedOut: {
|
|
229
|
-
// <tw-keep strokeColor="orange-400" />
|
|
230
|
-
color: 'orange-400',
|
|
231
|
-
use: 'Runs, specs, groups, test results',
|
|
232
|
-
variants: ['outline', 'solid'],
|
|
233
|
-
},
|
|
234
|
-
overLimit: {
|
|
235
|
-
// <tw-keep strokeColor="orange-400" />
|
|
236
|
-
color: 'orange-400',
|
|
237
|
-
use: 'Runs, specs, groups',
|
|
238
|
-
link: 'https://docs.cypress.io/faq/questions/dashboard-faq#What-happens-once-I-reach-the-test-results-limit',
|
|
239
|
-
variants: ['outline', 'solid'],
|
|
240
|
-
},
|
|
241
|
-
skipped: {
|
|
242
|
-
// <tw-keep strokeColor="gray-400" />
|
|
243
|
-
color: 'gray-400',
|
|
244
|
-
use: 'Test results',
|
|
245
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Skipped',
|
|
246
|
-
variants: ['outline'],
|
|
247
|
-
},
|
|
248
|
-
pending: {
|
|
249
|
-
// <tw-keep strokeColor="gray-300" />
|
|
250
|
-
color: 'gray-300',
|
|
251
|
-
use: 'Test results',
|
|
252
|
-
link: 'https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Pending',
|
|
253
|
-
variants: ['outline'],
|
|
254
|
-
},
|
|
255
|
-
};
|
|
256
|
-
/**
|
|
257
|
-
* The status we have here, allow us to check the validity of the constant
|
|
258
|
-
*/
|
|
259
|
-
const statuses$3 = constStatuses;
|
|
260
|
-
|
|
261
|
-
const statuses = {
|
|
262
|
-
running: {
|
|
263
|
-
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
264
|
-
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
265
|
-
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
266
|
-
size16Icon: iconsRegistry.cyStatusRunningOutlineX16,
|
|
267
|
-
size24Icon: iconsRegistry.cyStatusRunningOutlineX24,
|
|
268
|
-
},
|
|
269
|
-
failing: {
|
|
270
|
-
size4Icon: iconsRegistry.cyStatusRunningSimpleX4,
|
|
271
|
-
size8Icon: iconsRegistry.cyStatusRunningSimpleX8,
|
|
272
|
-
size12Icon: iconsRegistry.cyStatusRunningOutlineX12,
|
|
273
|
-
size16Icon: iconsRegistry.cyStatusFailingOutlineX16,
|
|
274
|
-
size24Icon: iconsRegistry.cyStatusFailingOutlineX24,
|
|
275
|
-
},
|
|
276
|
-
passed: {
|
|
277
|
-
size4Icon: iconsRegistry.cyStatusPassedSimpleX4,
|
|
278
|
-
size8Icon: iconsRegistry.cyStatusPassedSimpleX8,
|
|
279
|
-
size12Icon: iconsRegistry.cyStatusPassedSimpleX12,
|
|
280
|
-
size16Icon: iconsRegistry.cyStatusPassedSolidX16,
|
|
281
|
-
size24Icon: iconsRegistry.cyStatusPassedSolidX24,
|
|
282
|
-
},
|
|
283
|
-
failed: {
|
|
284
|
-
size4Icon: iconsRegistry.cyStatusFailedSimpleX4,
|
|
285
|
-
size8Icon: iconsRegistry.cyStatusFailedSimpleX8,
|
|
286
|
-
size12Icon: iconsRegistry.cyStatusFailedSimpleX12,
|
|
287
|
-
size16Icon: iconsRegistry.cyStatusFailedSolidX16,
|
|
288
|
-
size24Icon: iconsRegistry.cyStatusFailedSolidX24,
|
|
289
|
-
},
|
|
290
|
-
unclaimed: {
|
|
291
|
-
size4Icon: iconsRegistry.cyStatusQueuedSimpleX4,
|
|
292
|
-
size8Icon: iconsRegistry.cyStatusQueuedSimpleX8,
|
|
293
|
-
size12Icon: iconsRegistry.cyStatusQueuedOutlineX12,
|
|
294
|
-
size16Icon: iconsRegistry.cyStatusQueuedOutlineX16,
|
|
295
|
-
size24Icon: iconsRegistry.cyStatusQueuedOutlineX24,
|
|
296
|
-
},
|
|
297
|
-
placeholder: {
|
|
298
|
-
size4Icon: iconsRegistry.cyStatusPlaceholderSimpleX4,
|
|
299
|
-
size8Icon: iconsRegistry.cyStatusPlaceholderSimpleX8,
|
|
300
|
-
size12Icon: iconsRegistry.cyStatusPlaceholderSolidX12,
|
|
301
|
-
size16Icon: iconsRegistry.cyStatusPlaceholderSolidX16,
|
|
302
|
-
size24Icon: iconsRegistry.cyStatusPlaceholderSolidX24,
|
|
303
|
-
},
|
|
304
|
-
cancelled: {
|
|
305
|
-
size4Icon: iconsRegistry.cyStatusCancelledSimpleX4,
|
|
306
|
-
size8Icon: iconsRegistry.cyStatusCancelledSimpleX8,
|
|
307
|
-
size12Icon: iconsRegistry.cyStatusCancelledSolidX12,
|
|
308
|
-
size16Icon: iconsRegistry.cyStatusCancelledSolidX16,
|
|
309
|
-
size24Icon: iconsRegistry.cyStatusCancelledSolidX24,
|
|
310
|
-
},
|
|
311
|
-
noTests: {
|
|
312
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
313
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
314
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
315
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
316
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
317
|
-
},
|
|
318
|
-
errored: {
|
|
319
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
320
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
321
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
322
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
323
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
324
|
-
},
|
|
325
|
-
timedOut: {
|
|
326
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
327
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
328
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
329
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
330
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
331
|
-
},
|
|
332
|
-
overLimit: {
|
|
333
|
-
size4Icon: iconsRegistry.cyStatusErroredSimpleX4,
|
|
334
|
-
size8Icon: iconsRegistry.cyStatusErroredSimpleX8,
|
|
335
|
-
size12Icon: iconsRegistry.cyStatusErroredSolidX12,
|
|
336
|
-
size16Icon: iconsRegistry.cyStatusErroredSolidX16,
|
|
337
|
-
size24Icon: iconsRegistry.cyStatusErroredSolidX24,
|
|
338
|
-
},
|
|
339
|
-
skipped: {
|
|
340
|
-
size4Icon: iconsRegistry.cyStatusSkippedSimpleX4,
|
|
341
|
-
size8Icon: iconsRegistry.cyStatusSkippedSimpleX8,
|
|
342
|
-
size12Icon: iconsRegistry.cyStatusSkippedOutlineX12,
|
|
343
|
-
size16Icon: iconsRegistry.cyStatusSkippedOutlineX16,
|
|
344
|
-
size24Icon: iconsRegistry.cyStatusSkippedOutlineX24,
|
|
345
|
-
},
|
|
346
|
-
pending: {
|
|
347
|
-
size4Icon: iconsRegistry.cyStatusPendingSimpleX4,
|
|
348
|
-
size8Icon: iconsRegistry.cyStatusPendingSimpleX8,
|
|
349
|
-
size12Icon: iconsRegistry.cyStatusPendingOutlineX12,
|
|
350
|
-
size16Icon: iconsRegistry.cyStatusPendingOutlineX16,
|
|
351
|
-
size24Icon: iconsRegistry.cyStatusPendingOutlineX24,
|
|
352
|
-
},
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
/******************************************************************************
|
|
356
|
-
Copyright (c) Microsoft Corporation.
|
|
357
|
-
|
|
358
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
359
|
-
purpose with or without fee is hereby granted.
|
|
360
|
-
|
|
361
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
362
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
363
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
364
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
365
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
366
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
367
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
368
|
-
***************************************************************************** */
|
|
369
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
var __assign$2 = function() {
|
|
373
|
-
__assign$2 = Object.assign || function __assign(t) {
|
|
374
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
375
|
-
s = arguments[i];
|
|
376
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
377
|
-
}
|
|
378
|
-
return t;
|
|
379
|
-
};
|
|
380
|
-
return __assign$2.apply(this, arguments);
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
function __rest$2(s, e) {
|
|
384
|
-
var t = {};
|
|
385
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
386
|
-
t[p] = s[p];
|
|
387
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
388
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
389
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
390
|
-
t[p[i]] = s[p[i]];
|
|
391
|
-
}
|
|
392
|
-
return t;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
396
|
-
var e = new Error(message);
|
|
397
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
var compileReactIconProperties$1 = function (_a) {
|
|
401
|
-
var body = _a.body, defs = _a.defs, compiledClasses = _a.compiledClasses, size = _a.size, name = _a.name, alt = _a.alt, attributes = __rest$2(_a, ["body", "defs", "compiledClasses", "size", "name", "alt"]);
|
|
402
|
-
var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
|
|
403
|
-
if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) &&
|
|
404
|
-
attrName !== 'name') {
|
|
405
|
-
// @ts-expect-error the ky of React's SVGProps is too broad and
|
|
406
|
-
// breaks here. Since we do not need to check for it. We keep the expect error
|
|
407
|
-
newAttributes[attrName] =
|
|
408
|
-
attributes[attrName];
|
|
409
|
-
}
|
|
410
|
-
return newAttributes;
|
|
411
|
-
}, {});
|
|
412
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
413
|
-
React__namespace.useEffect(function () {
|
|
414
|
-
var iconFileId = "".concat(name, "_").concat(size);
|
|
415
|
-
if (defs) {
|
|
416
|
-
if (document.querySelector("[data-cy-svg-defs=\"".concat(iconFileId, "\"]"))) {
|
|
417
|
-
return;
|
|
418
|
-
}
|
|
419
|
-
var svgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
420
|
-
svgElement.setAttribute('data-cy-svg-defs', iconFileId);
|
|
421
|
-
svgElement.setAttribute('width', '0');
|
|
422
|
-
svgElement.setAttribute('height', '0');
|
|
423
|
-
svgElement.innerHTML = defs;
|
|
424
|
-
document.body.appendChild(svgElement);
|
|
425
|
-
}
|
|
426
|
-
}, [defs, name, size]);
|
|
427
|
-
var componentProps = __assign$2({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
|
|
428
|
-
__html: alt
|
|
429
|
-
? "<title>".concat(alt.replace(/[><]/g, function (s) {
|
|
430
|
-
return s === '>' ? '>' : '<';
|
|
431
|
-
}), "</title>").concat(body)
|
|
432
|
-
: body,
|
|
433
|
-
}, className: undefined }, filteredAttributes);
|
|
434
|
-
if (attributes.className) {
|
|
435
|
-
compiledClasses.push(attributes.className);
|
|
436
|
-
}
|
|
437
|
-
if (compiledClasses.length) {
|
|
438
|
-
componentProps.className = compiledClasses.join(' ');
|
|
439
|
-
}
|
|
440
|
-
return componentProps;
|
|
441
|
-
};
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
/* <wind-keep class="filter icon-light-secondary icon-dark-secondary"> */
|
|
445
|
-
|
|
446
|
-
var compileProps = function (_a) {
|
|
447
|
-
var status = _a.status, statuses = _a.statuses, className = _a.className, size = _a.size, variantName = _a.variantName;
|
|
448
|
-
var statusInfo = status ? statuses[status] : statuses.placeholder;
|
|
449
|
-
var iconInfo = status ? statuses$3[status] : statuses$3.placeholder;
|
|
450
|
-
var iconData = statusInfo["size".concat(size, "Icon")].data;
|
|
451
|
-
var classes = "inline-block ".concat(className || '');
|
|
452
|
-
var compiledClasses = iconsRegistry.getComponentAttributes({
|
|
453
|
-
strokeColor: iconInfo.color,
|
|
454
|
-
size: size,
|
|
455
|
-
availableSizes: [size],
|
|
456
|
-
fillColor: iconInfo.secondaryColor,
|
|
457
|
-
}).compiledClasses;
|
|
458
|
-
return compileReactIconProperties$1({
|
|
459
|
-
body: iconData,
|
|
460
|
-
compiledClasses: __spreadArray(__spreadArray([], compiledClasses, true), [classes], false),
|
|
461
|
-
size: size,
|
|
462
|
-
name: "status_".concat(status, "_").concat(size, "_").concat(variantName),
|
|
463
|
-
});
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
var SolidStatusIcon = function (_a) {
|
|
467
|
-
var _b = _a.size, size = _b === void 0 ? '24' : _b, _c = _a.status, status = _c === void 0 ? 'placeholder' : _c, rest = __rest$1(_a, ["size", "status"]);
|
|
468
|
-
return React__namespace.createElement('svg', __assign$1(__assign$1({}, rest), compileProps({
|
|
469
|
-
status: status,
|
|
470
|
-
statuses: statuses,
|
|
471
|
-
className: rest.className,
|
|
472
|
-
size: size,
|
|
473
|
-
variantName: 'solid',
|
|
474
|
-
})));
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
/* <wind-keep class="outline inline-block icon-dark-indigo-400 icon-light-gray-100 icon-dark-red-400 icon-dark-jade-400 icon-dark-gray-100 icon-dark-gray-300 icon-dark-orange-400 icon-dark-gray-400"> */
|
|
479
|
-
|
|
480
|
-
/******************************************************************************
|
|
481
|
-
Copyright (c) Microsoft Corporation.
|
|
482
|
-
|
|
483
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
484
|
-
purpose with or without fee is hereby granted.
|
|
485
|
-
|
|
486
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
487
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
488
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
489
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
490
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
491
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
492
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
493
|
-
***************************************************************************** */
|
|
494
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
var __assign = function() {
|
|
498
|
-
__assign = Object.assign || function __assign(t) {
|
|
499
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
500
|
-
s = arguments[i];
|
|
501
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
502
|
-
}
|
|
503
|
-
return t;
|
|
504
|
-
};
|
|
505
|
-
return __assign.apply(this, arguments);
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
function __rest(s, e) {
|
|
509
|
-
var t = {};
|
|
510
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
511
|
-
t[p] = s[p];
|
|
512
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
513
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
514
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
515
|
-
t[p[i]] = s[p[i]];
|
|
516
|
-
}
|
|
517
|
-
return t;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
521
|
-
var e = new Error(message);
|
|
522
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
var compileReactIconProperties = function (_a) {
|
|
526
|
-
var body = _a.body, defs = _a.defs, compiledClasses = _a.compiledClasses, size = _a.size, name = _a.name, alt = _a.alt, attributes = __rest(_a, ["body", "defs", "compiledClasses", "size", "name", "alt"]);
|
|
527
|
-
var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
|
|
528
|
-
if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) &&
|
|
529
|
-
attrName !== 'name') {
|
|
530
|
-
// @ts-expect-error the ky of React's SVGProps is too broad and
|
|
531
|
-
// breaks here. Since we do not need to check for it. We keep the expect error
|
|
532
|
-
newAttributes[attrName] =
|
|
533
|
-
attributes[attrName];
|
|
534
|
-
}
|
|
535
|
-
return newAttributes;
|
|
536
|
-
}, {});
|
|
537
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
538
|
-
React__namespace.useEffect(function () {
|
|
539
|
-
var iconFileId = "".concat(name, "_").concat(size);
|
|
540
|
-
if (defs) {
|
|
541
|
-
if (document.querySelector("[data-cy-svg-defs=\"".concat(iconFileId, "\"]"))) {
|
|
542
|
-
return;
|
|
543
|
-
}
|
|
544
|
-
var svgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
545
|
-
svgElement.setAttribute('data-cy-svg-defs', iconFileId);
|
|
546
|
-
svgElement.setAttribute('width', '0');
|
|
547
|
-
svgElement.setAttribute('height', '0');
|
|
548
|
-
svgElement.innerHTML = defs;
|
|
549
|
-
document.body.appendChild(svgElement);
|
|
550
|
-
}
|
|
551
|
-
}, [defs, name, size]);
|
|
552
|
-
var componentProps = __assign({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
|
|
553
|
-
__html: alt
|
|
554
|
-
? "<title>".concat(alt.replace(/[><]/g, function (s) {
|
|
555
|
-
return s === '>' ? '>' : '<';
|
|
556
|
-
}), "</title>").concat(body)
|
|
557
|
-
: body,
|
|
558
|
-
}, className: undefined }, filteredAttributes);
|
|
559
|
-
if (attributes.className) {
|
|
560
|
-
compiledClasses.push(attributes.className);
|
|
561
|
-
}
|
|
562
|
-
if (compiledClasses.length) {
|
|
563
|
-
componentProps.className = compiledClasses.join(' ');
|
|
564
|
-
}
|
|
565
|
-
return componentProps;
|
|
566
|
-
};
|
|
567
|
-
|
|
568
|
-
function useIconProps(props, iconBodiesAndDefs, availableSizes, name) {
|
|
569
|
-
var interactiveColorsOnGroup = props.interactiveColorsOnGroup, cleanProps = __rest(props, ["interactiveColorsOnGroup"]);
|
|
570
|
-
var _a = iconsRegistry__namespace.getComponentAttributes(__assign(__assign({}, cleanProps), { availableSizes: availableSizes, interactiveColorsOnGroup: interactiveColorsOnGroup })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
|
|
571
|
-
var _b = iconBodiesAndDefs[size] || {}, body = _b.body, defs = _b.defs;
|
|
572
|
-
if (!body) {
|
|
573
|
-
throw Error("Icon \"".concat(name, "\" is not available in size ").concat(size));
|
|
574
|
-
}
|
|
575
|
-
return compileReactIconProperties(__assign(__assign({}, cleanProps), { name: name, size: size, body: body, defs: defs, compiledClasses: compiledClasses }));
|
|
576
|
-
}
|
|
577
|
-
var IconChevronRightSmall = function (props) { return React__namespace.createElement('svg', useIconProps(props, {
|
|
578
|
-
"8": {
|
|
579
|
-
"body": "<path d=\"m2.5 1 3 3-3 3\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
|
|
580
|
-
},
|
|
581
|
-
"16": {
|
|
582
|
-
"body": "<path d=\"m6 12 4-4-4-4\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
|
|
583
|
-
}
|
|
584
|
-
}, ["8", "16"], "chevron-right-small")); };
|
|
585
|
-
var IconDocumentAddedSquarePlus = function (props) { return React__namespace.createElement('svg', useIconProps(props, {
|
|
586
|
-
"16": {
|
|
587
|
-
"body": "<path d=\"M2 12V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2Z\" fill=\"#E4FBF2\" class=\"icon-light\"/><path d=\"M8 6v4m2-2H6m6-6H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Z\" stroke=\"#1FA971\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
|
|
588
|
-
},
|
|
589
|
-
"24": {
|
|
590
|
-
"body": "<path d=\"M3 18V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3Z\" fill=\"#E4FBF2\" class=\"icon-light\"/><path d=\"M12 8v8m4-4H8m10-9H6a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3Z\" stroke=\"#1FA971\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
|
|
591
|
-
}
|
|
592
|
-
}, ["16", "24"], "document-added-square-plus")); };
|
|
593
|
-
var IconDocumentModifiedSquareDot = function (props) { return React__namespace.createElement('svg', useIconProps(props, {
|
|
594
|
-
"16": {
|
|
595
|
-
"body": "<path d=\"M9 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm4 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path d=\"M9 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\" stroke=\"#DB7903\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/><path clip-rule=\"evenodd\" d=\"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4Zm4 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" stroke=\"#DB7903\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
|
|
596
|
-
},
|
|
597
|
-
"24": {
|
|
598
|
-
"body": "<path d=\"M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\" fill=\"#DB7903\" class=\"icon-dark\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H6Zm6 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path d=\"M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\" stroke=\"#DB7903\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/><path clip-rule=\"evenodd\" d=\"M6 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H6Zm6 11a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z\" stroke=\"#DB7903\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
|
|
599
|
-
}
|
|
600
|
-
}, ["16", "24"], "document-modified-square-dot")); };
|
|
601
|
-
var IconStatusFlaky = function (props) { return React__namespace.createElement('svg', useIconProps(props, {
|
|
602
|
-
"16": {
|
|
603
|
-
"body": "<path d=\"M1 12V4a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path d=\"M9.5 5h-3v3.5m0 2.5V8.5m0 0h2\" stroke=\"#963F00\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
|
|
604
|
-
},
|
|
605
|
-
"24": {
|
|
606
|
-
"body": "<path d=\"M2 18V6a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4Z\" fill=\"#F5F4D7\" class=\"icon-light\"/><path d=\"M14 8h-4v4.5m0 3.5v-3.5m0 0h3\" stroke=\"#963F00\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
|
|
607
|
-
}
|
|
608
|
-
}, ["16", "24"], "status-flaky")); };
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
/* <wind-keep class="filter icon-light-secondary icon-dark-secondary"> */
|
|
612
|
-
|
|
613
109
|
var TestResult = function (_a) {
|
|
614
|
-
var status = _a.status, names = _a.names, flaky = _a.flaky, modified = _a.modified, added = _a.added, className = _a.className, groups = _a.groups, children = _a.children, rest = __rest
|
|
615
|
-
return (React__namespace.createElement("div", __assign
|
|
110
|
+
var status = _a.status, names = _a.names, flaky = _a.flaky, modified = _a.modified, added = _a.added, className = _a.className, groups = _a.groups, children = _a.children, rest = __rest(_a, ["status", "names", "flaky", "modified", "added", "className", "groups", "children"]);
|
|
111
|
+
return (React__namespace.createElement("div", __assign({ "data-cy": "cd-tr-container" }, rest, { className: clsx(classes.container, className) }),
|
|
616
112
|
React__namespace.createElement("div", { "data-cy": "cd-tr-row", className: classes.row },
|
|
617
113
|
React__namespace.createElement("div", { "data-cy": "cd-tr-list", className: classes.list },
|
|
618
114
|
React__namespace.createElement("div", { "data-cy": "cd-tr-icon", className: classes.icon },
|
|
619
|
-
React__namespace.createElement(SolidStatusIcon, { size: "16", status: status, className: classes.status_icon })),
|
|
115
|
+
React__namespace.createElement(reactStatusicon.SolidStatusIcon, { size: "16", status: status, className: classes.status_icon })),
|
|
620
116
|
React__namespace.createElement("div", { "data-cy": "cd-tr-name-container-column", className: classes.name.container.column },
|
|
621
117
|
names.slice(0, -1).length > 0 && (React__namespace.createElement("div", { "data-cy": "cd-tr-name-container-describes", className: classes.name.container.describes }, names.slice(0, -1).map(function (name, index) {
|
|
622
118
|
var _a;
|
|
@@ -630,7 +126,7 @@ var TestResult = function (_a) {
|
|
|
630
126
|
_a)) },
|
|
631
127
|
React__namespace.createElement("span", { "data-cy": "cd-tr-name-item-text", className: classes.name.item.text.base }, name)),
|
|
632
128
|
index < names.length - 1 && (React__namespace.createElement("div", { "data-cy": "cd-tr-chevron", className: classes.chevron.container },
|
|
633
|
-
React__namespace.createElement(IconChevronRightSmall, { strokeColor: "gray-200", className: "mt-[2px]" })))));
|
|
129
|
+
React__namespace.createElement(reactIcon.IconChevronRightSmall, { strokeColor: "gray-200", className: "mt-[2px]" })))));
|
|
634
130
|
}))),
|
|
635
131
|
React__namespace.createElement("div", { "data-cy": "cd-tr-name-container-it", className: classes.name.container.it },
|
|
636
132
|
React__namespace.createElement("span", { "data-cy": "cd-tr-name-item-text", className: [
|
|
@@ -638,9 +134,9 @@ var TestResult = function (_a) {
|
|
|
638
134
|
classes.name.item.text.it,
|
|
639
135
|
].join(' ') }, names.at(-1)),
|
|
640
136
|
(flaky || modified || added) && (React__namespace.createElement("div", { "data-cy": "cd-tr-attributes", className: classes.attribute.container },
|
|
641
|
-
flaky && React__namespace.createElement(IconStatusFlaky, { "data-cy": "cd-tr-flaky" }),
|
|
642
|
-
modified && (React__namespace.createElement(IconDocumentModifiedSquareDot, { "data-cy": "cd-tr-modified" })),
|
|
643
|
-
added && (React__namespace.createElement(IconDocumentAddedSquarePlus, { "data-cy": "cd-tr-added" })))))),
|
|
137
|
+
flaky && React__namespace.createElement(reactIcon.IconStatusFlaky, { "data-cy": "cd-tr-flaky" }),
|
|
138
|
+
modified && (React__namespace.createElement(reactIcon.IconDocumentModifiedSquareDot, { "data-cy": "cd-tr-modified" })),
|
|
139
|
+
added && (React__namespace.createElement(reactIcon.IconDocumentAddedSquarePlus, { "data-cy": "cd-tr-added" })))))),
|
|
644
140
|
children ? (React__namespace.createElement("div", { "data-cy": "cd-tr-actions", className: classes.button.container }, children)) : null),
|
|
645
141
|
groups ? (React__namespace.createElement("div", { "data-cy": "cd-tr-group-container", className: classes.group.container }, groups)) : null)));
|
|
646
142
|
};
|