@genspectrum/dashboard-components 0.19.1 → 0.19.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/custom-elements.json +1 -1
- package/dist/components.d.ts +25 -25
- package/dist/components.js +32 -24
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +25 -25
- package/package.json +1 -1
- package/src/preact/components/downshift-combobox.tsx +31 -16
- package/src/preact/lineageFilter/lineage-filter.tsx +4 -4
- package/src/preact/locationFilter/location-filter.tsx +5 -7
- package/src/preact/textFilter/text-filter.stories.tsx +68 -8
- package/src/preact/textFilter/text-filter.tsx +5 -7
- package/src/web-components/input/gs-text-filter.stories.ts +3 -10
- package/standalone-bundle/dashboard-components.js +3612 -3585
- package/standalone-bundle/dashboard-components.js.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -1230,7 +1230,7 @@
|
|
|
1230
1230
|
"type": {
|
|
1231
1231
|
"text": "StoryObj<Required<TextFilterProps>>"
|
|
1232
1232
|
},
|
|
1233
|
-
"default": "{ ...Default, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-text-filter'); const inputField = () => canvas.getByPlaceholderText('Enter host name'); const listenerMock = fn(); await step('Setup event listener mock', () => { canvasElement.addEventListener('gs-text-filter-changed', listenerMock); }); await step('wait until data is loaded', async () => { await waitFor(() => { return expect(inputField()).toBeEnabled(); }); }); await step('Enters an invalid host name', async () => { await userEvent.type(inputField(), 'notInList'); await expect(listenerMock).not.toHaveBeenCalled(); }); await step('Empty input', async () => { await userEvent.type(inputField(), '{backspace>9/}'); }); await step('Enter a valid host name', async () => { await userEvent.type(inputField(), 'Homo s'); const dropdownOption = await canvas.findByText('Homo sapiens'); await userEvent.click(dropdownOption); }); await step('Verify event is fired with correct detail', async () => { await waitFor(async () => { await expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { host: 'Homo sapiens', }, }), ); }); }); await step('Remove initial value', async () => { await
|
|
1233
|
+
"default": "{ ...Default, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-text-filter'); const inputField = () => canvas.getByPlaceholderText('Enter host name'); const listenerMock = fn(); await step('Setup event listener mock', () => { canvasElement.addEventListener('gs-text-filter-changed', listenerMock); }); await step('wait until data is loaded', async () => { await waitFor(() => { return expect(inputField()).toBeEnabled(); }); }); await step('Enters an invalid host name', async () => { await userEvent.type(inputField(), 'notInList'); await expect(listenerMock).not.toHaveBeenCalled(); }); await step('Empty input', async () => { await userEvent.type(inputField(), '{backspace>9/}'); }); await step('Enter a valid host name', async () => { await userEvent.type(inputField(), 'Homo s'); const dropdownOption = await canvas.findByText('Homo sapiens'); await userEvent.click(dropdownOption); }); await step('Verify event is fired with correct detail', async () => { await waitFor(async () => { await expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { host: 'Homo sapiens', }, }), ); }); }); await step('Remove initial value', async () => { await userEvent.click(canvas.getByRole('button', { name: 'clear selection' })); await expect(listenerMock).toHaveBeenLastCalledWith( expect.objectContaining({ detail: { host: undefined, }, }), ); }); }, args: { ...Default.args, value: '', }, }"
|
|
1234
1234
|
}
|
|
1235
1235
|
],
|
|
1236
1236
|
"exports": [
|
package/dist/components.d.ts
CHANGED
|
@@ -1425,7 +1425,7 @@ declare global {
|
|
|
1425
1425
|
|
|
1426
1426
|
declare global {
|
|
1427
1427
|
interface HTMLElementTagNameMap {
|
|
1428
|
-
'gs-
|
|
1428
|
+
'gs-mutation-comparison-component': MutationComparisonComponent;
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
1431
|
|
|
@@ -1433,7 +1433,7 @@ declare global {
|
|
|
1433
1433
|
declare global {
|
|
1434
1434
|
namespace JSX {
|
|
1435
1435
|
interface IntrinsicElements {
|
|
1436
|
-
'gs-
|
|
1436
|
+
'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
@@ -1441,7 +1441,7 @@ declare global {
|
|
|
1441
1441
|
|
|
1442
1442
|
declare global {
|
|
1443
1443
|
interface HTMLElementTagNameMap {
|
|
1444
|
-
'gs-
|
|
1444
|
+
'gs-mutations-component': MutationsComponent;
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
1447
|
|
|
@@ -1449,7 +1449,7 @@ declare global {
|
|
|
1449
1449
|
declare global {
|
|
1450
1450
|
namespace JSX {
|
|
1451
1451
|
interface IntrinsicElements {
|
|
1452
|
-
'gs-
|
|
1452
|
+
'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1453
1453
|
}
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
@@ -1457,7 +1457,7 @@ declare global {
|
|
|
1457
1457
|
|
|
1458
1458
|
declare global {
|
|
1459
1459
|
interface HTMLElementTagNameMap {
|
|
1460
|
-
'gs-
|
|
1460
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
1463
|
|
|
@@ -1465,7 +1465,7 @@ declare global {
|
|
|
1465
1465
|
declare global {
|
|
1466
1466
|
namespace JSX {
|
|
1467
1467
|
interface IntrinsicElements {
|
|
1468
|
-
'gs-
|
|
1468
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
@@ -1473,7 +1473,7 @@ declare global {
|
|
|
1473
1473
|
|
|
1474
1474
|
declare global {
|
|
1475
1475
|
interface HTMLElementTagNameMap {
|
|
1476
|
-
'gs-
|
|
1476
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
1479
|
|
|
@@ -1481,7 +1481,7 @@ declare global {
|
|
|
1481
1481
|
declare global {
|
|
1482
1482
|
namespace JSX {
|
|
1483
1483
|
interface IntrinsicElements {
|
|
1484
|
-
'gs-
|
|
1484
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
@@ -1489,7 +1489,7 @@ declare global {
|
|
|
1489
1489
|
|
|
1490
1490
|
declare global {
|
|
1491
1491
|
interface HTMLElementTagNameMap {
|
|
1492
|
-
'gs-
|
|
1492
|
+
'gs-aggregate': AggregateComponent;
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
1495
|
|
|
@@ -1497,7 +1497,7 @@ declare global {
|
|
|
1497
1497
|
declare global {
|
|
1498
1498
|
namespace JSX {
|
|
1499
1499
|
interface IntrinsicElements {
|
|
1500
|
-
'gs-
|
|
1500
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
@@ -1505,7 +1505,7 @@ declare global {
|
|
|
1505
1505
|
|
|
1506
1506
|
declare global {
|
|
1507
1507
|
interface HTMLElementTagNameMap {
|
|
1508
|
-
'gs-
|
|
1508
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
|
|
@@ -1513,7 +1513,7 @@ declare global {
|
|
|
1513
1513
|
declare global {
|
|
1514
1514
|
namespace JSX {
|
|
1515
1515
|
interface IntrinsicElements {
|
|
1516
|
-
'gs-
|
|
1516
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
@@ -1537,7 +1537,7 @@ declare global {
|
|
|
1537
1537
|
|
|
1538
1538
|
declare global {
|
|
1539
1539
|
interface HTMLElementTagNameMap {
|
|
1540
|
-
'gs-
|
|
1540
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
1543
1543
|
|
|
@@ -1545,7 +1545,7 @@ declare global {
|
|
|
1545
1545
|
declare global {
|
|
1546
1546
|
namespace JSX {
|
|
1547
1547
|
interface IntrinsicElements {
|
|
1548
|
-
'gs-
|
|
1548
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
@@ -1553,7 +1553,7 @@ declare global {
|
|
|
1553
1553
|
|
|
1554
1554
|
declare global {
|
|
1555
1555
|
interface HTMLElementTagNameMap {
|
|
1556
|
-
'gs-
|
|
1556
|
+
'gs-statistics': StatisticsComponent;
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
1559
|
|
|
@@ -1561,7 +1561,7 @@ declare global {
|
|
|
1561
1561
|
declare global {
|
|
1562
1562
|
namespace JSX {
|
|
1563
1563
|
interface IntrinsicElements {
|
|
1564
|
-
'gs-
|
|
1564
|
+
'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1565
1565
|
}
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
@@ -1569,7 +1569,7 @@ declare global {
|
|
|
1569
1569
|
|
|
1570
1570
|
declare global {
|
|
1571
1571
|
interface HTMLElementTagNameMap {
|
|
1572
|
-
'gs-
|
|
1572
|
+
'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
@@ -1577,7 +1577,7 @@ declare global {
|
|
|
1577
1577
|
declare global {
|
|
1578
1578
|
namespace JSX {
|
|
1579
1579
|
interface IntrinsicElements {
|
|
1580
|
-
'gs-
|
|
1580
|
+
'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
@@ -1585,11 +1585,10 @@ declare global {
|
|
|
1585
1585
|
|
|
1586
1586
|
declare global {
|
|
1587
1587
|
interface HTMLElementTagNameMap {
|
|
1588
|
-
'gs-
|
|
1588
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1589
1589
|
}
|
|
1590
1590
|
interface HTMLElementEventMap {
|
|
1591
|
-
'gs-
|
|
1592
|
-
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1591
|
+
'gs-location-changed': LocationChangedEvent;
|
|
1593
1592
|
}
|
|
1594
1593
|
}
|
|
1595
1594
|
|
|
@@ -1597,7 +1596,7 @@ declare global {
|
|
|
1597
1596
|
declare global {
|
|
1598
1597
|
namespace JSX {
|
|
1599
1598
|
interface IntrinsicElements {
|
|
1600
|
-
'gs-
|
|
1599
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1601
1600
|
}
|
|
1602
1601
|
}
|
|
1603
1602
|
}
|
|
@@ -1605,10 +1604,11 @@ declare global {
|
|
|
1605
1604
|
|
|
1606
1605
|
declare global {
|
|
1607
1606
|
interface HTMLElementTagNameMap {
|
|
1608
|
-
'gs-
|
|
1607
|
+
'gs-date-range-filter': DateRangeFilterComponent;
|
|
1609
1608
|
}
|
|
1610
1609
|
interface HTMLElementEventMap {
|
|
1611
|
-
'gs-
|
|
1610
|
+
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
1611
|
+
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
1614
|
|
|
@@ -1616,7 +1616,7 @@ declare global {
|
|
|
1616
1616
|
declare global {
|
|
1617
1617
|
namespace JSX {
|
|
1618
1618
|
interface IntrinsicElements {
|
|
1619
|
-
'gs-
|
|
1619
|
+
'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|