@genspectrum/dashboard-components 0.11.7 → 0.12.0

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/dist/style.css CHANGED
@@ -1296,6 +1296,19 @@ html {
1296
1296
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1297
1297
  }
1298
1298
 
1299
+ :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(.active, .btn):hover, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(.active, .btn):hover {
1300
+ cursor: pointer;
1301
+ outline: 2px solid transparent;
1302
+ outline-offset: 2px;
1303
+ }
1304
+
1305
+ @supports (color: oklch(0% 0 0)) {
1306
+
1307
+ :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(.active, .btn):hover, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(.active, .btn):hover {
1308
+ background-color: var(--fallback-bc,oklch(var(--bc)/0.1));
1309
+ }
1310
+ }
1311
+
1299
1312
  .tab[disabled],
1300
1313
  .tab[disabled]:hover {
1301
1314
  cursor: not-allowed;
@@ -1426,6 +1439,31 @@ html {
1426
1439
  cursor: pointer;
1427
1440
  text-decoration-line: underline;
1428
1441
  }
1442
+ .menu {
1443
+ display: flex;
1444
+ flex-direction: column;
1445
+ flex-wrap: wrap;
1446
+ font-size: 0.875rem;
1447
+ line-height: 1.25rem;
1448
+ padding: 0.5rem;
1449
+ }
1450
+ .menu :where(li ul) {
1451
+ position: relative;
1452
+ white-space: nowrap;
1453
+ margin-inline-start: 1rem;
1454
+ padding-inline-start: 0.5rem;
1455
+ }
1456
+ .menu :where(li:not(.menu-title) > *:not(ul, details, .menu-title, .btn)), .menu :where(li:not(.menu-title) > details > summary:not(.menu-title)) {
1457
+ display: grid;
1458
+ grid-auto-flow: column;
1459
+ align-content: flex-start;
1460
+ align-items: center;
1461
+ gap: 0.5rem;
1462
+ grid-auto-columns: minmax(auto, max-content) auto max-content;
1463
+ -webkit-user-select: none;
1464
+ -moz-user-select: none;
1465
+ user-select: none;
1466
+ }
1429
1467
  .menu li.disabled {
1430
1468
  cursor: not-allowed;
1431
1469
  -webkit-user-select: none;
@@ -1433,6 +1471,20 @@ html {
1433
1471
  user-select: none;
1434
1472
  color: var(--fallback-bc,oklch(var(--bc)/0.3));
1435
1473
  }
1474
+ .menu :where(li > .menu-dropdown:not(.menu-dropdown-show)) {
1475
+ display: none;
1476
+ }
1477
+ :where(.menu li) {
1478
+ position: relative;
1479
+ display: flex;
1480
+ flex-shrink: 0;
1481
+ flex-direction: column;
1482
+ flex-wrap: wrap;
1483
+ align-items: stretch;
1484
+ }
1485
+ :where(.menu li) .badge {
1486
+ justify-self: end;
1487
+ }
1436
1488
  .modal {
1437
1489
  pointer-events: none;
1438
1490
  position: fixed;
@@ -1992,6 +2044,40 @@ input.tab:checked + .tab-content,
1992
2044
  .loading-md {
1993
2045
  width: 1.5rem;
1994
2046
  }
2047
+ :where(.menu li:empty) {
2048
+ --tw-bg-opacity: 1;
2049
+ background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));
2050
+ opacity: 0.1;
2051
+ margin: 0.5rem 1rem;
2052
+ height: 1px;
2053
+ }
2054
+ .menu :where(li ul):before {
2055
+ position: absolute;
2056
+ bottom: 0.75rem;
2057
+ inset-inline-start: 0px;
2058
+ top: 0.75rem;
2059
+ width: 1px;
2060
+ --tw-bg-opacity: 1;
2061
+ background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));
2062
+ opacity: 0.1;
2063
+ content: "";
2064
+ }
2065
+ .menu :where(li:not(.menu-title) > *:not(ul, details, .menu-title, .btn)),
2066
+ .menu :where(li:not(.menu-title) > details > summary:not(.menu-title)) {
2067
+ border-radius: var(--rounded-btn, 0.5rem);
2068
+ padding-left: 1rem;
2069
+ padding-right: 1rem;
2070
+ padding-top: 0.5rem;
2071
+ padding-bottom: 0.5rem;
2072
+ text-align: start;
2073
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
2074
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
2075
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
2076
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2077
+ transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
2078
+ transition-duration: 200ms;
2079
+ text-wrap: balance;
2080
+ }
1995
2081
  :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(summary, .active, .btn).focus, :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):not(summary, .active, .btn):focus, :where(.menu li:not(.menu-title, .disabled) > *:not(ul, details, .menu-title)):is(summary):not(.active, .btn):focus-visible, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(summary, .active, .btn).focus, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):not(summary, .active, .btn):focus, :where(.menu li:not(.menu-title, .disabled) > details > summary:not(.menu-title)):is(summary):not(.active, .btn):focus-visible {
1996
2082
  cursor: pointer;
1997
2083
  background-color: var(--fallback-bc,oklch(var(--bc)/0.1));
@@ -2008,6 +2094,30 @@ input.tab:checked + .tab-content,
2008
2094
  --tw-text-opacity: 1;
2009
2095
  color: var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));
2010
2096
  }
2097
+ .menu :where(li > details > summary)::-webkit-details-marker {
2098
+ display: none;
2099
+ }
2100
+ .menu :where(li > details > summary):after,
2101
+ .menu :where(li > .menu-dropdown-toggle):after {
2102
+ justify-self: end;
2103
+ display: block;
2104
+ margin-top: -0.5rem;
2105
+ height: 0.5rem;
2106
+ width: 0.5rem;
2107
+ transform: rotate(45deg);
2108
+ transition-property: transform, margin-top;
2109
+ transition-duration: 0.3s;
2110
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2111
+ content: "";
2112
+ transform-origin: 75% 75%;
2113
+ box-shadow: 2px 2px;
2114
+ pointer-events: none;
2115
+ }
2116
+ .menu :where(li > details[open] > summary):after,
2117
+ .menu :where(li > .menu-dropdown-toggle.menu-dropdown-show):after {
2118
+ transform: rotate(225deg);
2119
+ margin-top: 0;
2120
+ }
2011
2121
  .mockup-phone .display {
2012
2122
  overflow: hidden;
2013
2123
  border-radius: 40px;
@@ -3098,6 +3208,9 @@ input.tab:checked + .tab-content,
3098
3208
  .h-full {
3099
3209
  height: 100%;
3100
3210
  }
3211
+ .max-h-80 {
3212
+ max-height: 20rem;
3213
+ }
3101
3214
  .w-10 {
3102
3215
  width: 2.5rem;
3103
3216
  }
@@ -3129,6 +3242,9 @@ input.tab:checked + .tab-content,
3129
3242
  width: -moz-max-content;
3130
3243
  width: max-content;
3131
3244
  }
3245
+ .min-w-32 {
3246
+ min-width: 8rem;
3247
+ }
3132
3248
  .min-w-\[7\.5rem\] {
3133
3249
  min-width: 7.5rem;
3134
3250
  }
@@ -3188,6 +3304,12 @@ input.tab:checked + .tab-content,
3188
3304
  .justify-between {
3189
3305
  justify-content: space-between;
3190
3306
  }
3307
+ .gap-0\.5 {
3308
+ gap: 0.125rem;
3309
+ }
3310
+ .gap-1 {
3311
+ gap: 0.25rem;
3312
+ }
3191
3313
  .gap-2 {
3192
3314
  gap: 0.5rem;
3193
3315
  }
@@ -3237,10 +3359,6 @@ input.tab:checked + .tab-content,
3237
3359
  .border-b-2 {
3238
3360
  border-bottom-width: 2px;
3239
3361
  }
3240
- .border-error {
3241
- --tw-border-opacity: 1;
3242
- border-color: var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity, 1)));
3243
- }
3244
3362
  .border-gray-100 {
3245
3363
  --tw-border-opacity: 1;
3246
3364
  border-color: rgb(243 244 246 / var(--tw-border-opacity, 1));
@@ -3261,6 +3379,10 @@ input.tab:checked + .tab-content,
3261
3379
  --tw-border-opacity: 1;
3262
3380
  border-color: rgb(100 116 139 / var(--tw-border-opacity, 1));
3263
3381
  }
3382
+ .bg-blue-300 {
3383
+ --tw-bg-opacity: 1;
3384
+ background-color: rgb(147 197 253 / var(--tw-bg-opacity, 1));
3385
+ }
3264
3386
  .bg-red-200 {
3265
3387
  --tw-bg-opacity: 1;
3266
3388
  background-color: rgb(254 202 202 / var(--tw-bg-opacity, 1));
@@ -3276,6 +3398,9 @@ input.tab:checked + .tab-content,
3276
3398
  .p-1 {
3277
3399
  padding: 0.25rem;
3278
3400
  }
3401
+ .p-1\.5 {
3402
+ padding: 0.375rem;
3403
+ }
3279
3404
  .p-2 {
3280
3405
  padding: 0.5rem;
3281
3406
  }
@@ -3286,6 +3411,14 @@ input.tab:checked + .tab-content,
3286
3411
  padding-left: 0.25rem;
3287
3412
  padding-right: 0.25rem;
3288
3413
  }
3414
+ .px-2 {
3415
+ padding-left: 0.5rem;
3416
+ padding-right: 0.5rem;
3417
+ }
3418
+ .px-3 {
3419
+ padding-left: 0.75rem;
3420
+ padding-right: 0.75rem;
3421
+ }
3289
3422
  .px-4 {
3290
3423
  padding-left: 1rem;
3291
3424
  padding-right: 1rem;
@@ -3356,6 +3489,10 @@ input.tab:checked + .tab-content,
3356
3489
  --tw-text-opacity: 1;
3357
3490
  color: rgb(37 99 235 / var(--tw-text-opacity, 1));
3358
3491
  }
3492
+ .text-gray-500 {
3493
+ --tw-text-opacity: 1;
3494
+ color: rgb(107 114 128 / var(--tw-text-opacity, 1));
3495
+ }
3359
3496
  .text-gray-600 {
3360
3497
  --tw-text-opacity: 1;
3361
3498
  color: rgb(75 85 99 / var(--tw-text-opacity, 1));
@@ -3381,6 +3518,16 @@ input.tab:checked + .tab-content,
3381
3518
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
3382
3519
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
3383
3520
  }
3521
+ .shadow-md {
3522
+ --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
3523
+ --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
3524
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
3525
+ }
3526
+ .shadow-sm {
3527
+ --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
3528
+ --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
3529
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
3530
+ }
3384
3531
  .blur {
3385
3532
  --tw-blur: blur(8px);
3386
3533
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
package/dist/util.d.ts CHANGED
@@ -160,6 +160,12 @@ declare const lapisFilterSchema: default_2.ZodIntersection<default_2.ZodRecord<d
160
160
  aminoAcidInsertions?: string[] | undefined;
161
161
  }>>;
162
162
 
163
+ declare type LapisLocationFilter = Record<string, string | null | undefined>;
164
+
165
+ export declare class LocationChangedEvent extends CustomEvent<LapisLocationFilter> {
166
+ constructor(detail: LapisLocationFilter);
167
+ }
168
+
163
169
  export declare type MapSource = default_2.infer<typeof mapSourceSchema>;
164
170
 
165
171
  declare const mapSourceSchema: default_2.ZodObject<{
@@ -818,7 +824,10 @@ declare global {
818
824
 
819
825
  declare global {
820
826
  interface HTMLElementTagNameMap {
821
- 'gs-mutation-comparison-component': MutationComparisonComponent;
827
+ 'gs-location-filter': LocationFilterComponent;
828
+ }
829
+ interface HTMLElementEventMap {
830
+ 'gs-location-changed': LocationChangedEvent;
822
831
  }
823
832
  }
824
833
 
@@ -826,7 +835,7 @@ declare global {
826
835
  declare global {
827
836
  namespace JSX {
828
837
  interface IntrinsicElements {
829
- 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
838
+ 'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
830
839
  }
831
840
  }
832
841
  }
@@ -834,7 +843,11 @@ declare global {
834
843
 
835
844
  declare global {
836
845
  interface HTMLElementTagNameMap {
837
- 'gs-mutations-component': MutationsComponent;
846
+ 'gs-date-range-selector': DateRangeSelectorComponent;
847
+ }
848
+ interface HTMLElementEventMap {
849
+ 'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
850
+ 'gs-date-range-option-changed': DateRangeOptionChangedEvent;
838
851
  }
839
852
  }
840
853
 
@@ -842,7 +855,7 @@ declare global {
842
855
  declare global {
843
856
  namespace JSX {
844
857
  interface IntrinsicElements {
845
- 'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
858
+ 'gs-date-range-selector': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
846
859
  }
847
860
  }
848
861
  }
@@ -850,7 +863,10 @@ declare global {
850
863
 
851
864
  declare global {
852
865
  interface HTMLElementTagNameMap {
853
- 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
866
+ 'gs-text-input': TextInputComponent;
867
+ }
868
+ interface HTMLElementEventMap {
869
+ 'gs-text-input-changed': CustomEvent<Record<string, string>>;
854
870
  }
855
871
  }
856
872
 
@@ -858,7 +874,7 @@ declare global {
858
874
  declare global {
859
875
  namespace JSX {
860
876
  interface IntrinsicElements {
861
- 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
877
+ 'gs-text-input': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
862
878
  }
863
879
  }
864
880
  }
@@ -866,7 +882,10 @@ declare global {
866
882
 
867
883
  declare global {
868
884
  interface HTMLElementTagNameMap {
869
- 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
885
+ 'gs-mutation-filter': MutationFilterComponent;
886
+ }
887
+ interface HTMLElementEventMap {
888
+ 'gs-mutation-filter-changed': CustomEvent<MutationsFilter>;
870
889
  }
871
890
  }
872
891
 
@@ -874,7 +893,7 @@ declare global {
874
893
  declare global {
875
894
  namespace JSX {
876
895
  interface IntrinsicElements {
877
- 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
896
+ 'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
878
897
  }
879
898
  }
880
899
  }
@@ -882,7 +901,10 @@ declare global {
882
901
 
883
902
  declare global {
884
903
  interface HTMLElementTagNameMap {
885
- 'gs-aggregate': AggregateComponent;
904
+ 'gs-lineage-filter': LineageFilterComponent;
905
+ }
906
+ interface HTMLElementEventMap {
907
+ 'gs-lineage-filter-changed': CustomEvent<Record<string, string>>;
886
908
  }
887
909
  }
888
910
 
@@ -890,7 +912,7 @@ declare global {
890
912
  declare global {
891
913
  namespace JSX {
892
914
  interface IntrinsicElements {
893
- 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
915
+ 'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
894
916
  }
895
917
  }
896
918
  }
@@ -898,7 +920,7 @@ declare global {
898
920
 
899
921
  declare global {
900
922
  interface HTMLElementTagNameMap {
901
- 'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
923
+ 'gs-mutation-comparison-component': MutationComparisonComponent;
902
924
  }
903
925
  }
904
926
 
@@ -906,7 +928,7 @@ declare global {
906
928
  declare global {
907
929
  namespace JSX {
908
930
  interface IntrinsicElements {
909
- 'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
931
+ 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
910
932
  }
911
933
  }
912
934
  }
@@ -914,7 +936,7 @@ declare global {
914
936
 
915
937
  declare global {
916
938
  interface HTMLElementTagNameMap {
917
- 'gs-sequences-by-location': SequencesByLocationComponent;
939
+ 'gs-mutations-component': MutationsComponent;
918
940
  }
919
941
  }
920
942
 
@@ -922,7 +944,7 @@ declare global {
922
944
  declare global {
923
945
  namespace JSX {
924
946
  interface IntrinsicElements {
925
- 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
947
+ 'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
926
948
  }
927
949
  }
928
950
  }
@@ -930,7 +952,7 @@ declare global {
930
952
 
931
953
  declare global {
932
954
  interface HTMLElementTagNameMap {
933
- 'gs-statistics': StatisticsComponent;
955
+ 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
934
956
  }
935
957
  }
936
958
 
@@ -938,7 +960,7 @@ declare global {
938
960
  declare global {
939
961
  namespace JSX {
940
962
  interface IntrinsicElements {
941
- 'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
963
+ 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
942
964
  }
943
965
  }
944
966
  }
@@ -946,7 +968,7 @@ declare global {
946
968
 
947
969
  declare global {
948
970
  interface HTMLElementTagNameMap {
949
- 'gs-mutations-over-time': MutationsOverTimeComponent;
971
+ 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
950
972
  }
951
973
  }
952
974
 
@@ -954,7 +976,7 @@ declare global {
954
976
  declare global {
955
977
  namespace JSX {
956
978
  interface IntrinsicElements {
957
- 'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
979
+ 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
958
980
  }
959
981
  }
960
982
  }
@@ -962,10 +984,7 @@ declare global {
962
984
 
963
985
  declare global {
964
986
  interface HTMLElementTagNameMap {
965
- 'gs-text-input': TextInputComponent;
966
- }
967
- interface HTMLElementEventMap {
968
- 'gs-text-input-changed': CustomEvent<Record<string, string>>;
987
+ 'gs-aggregate': AggregateComponent;
969
988
  }
970
989
  }
971
990
 
@@ -973,7 +992,7 @@ declare global {
973
992
  declare global {
974
993
  namespace JSX {
975
994
  interface IntrinsicElements {
976
- 'gs-text-input': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
995
+ 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
977
996
  }
978
997
  }
979
998
  }
@@ -981,11 +1000,7 @@ declare global {
981
1000
 
982
1001
  declare global {
983
1002
  interface HTMLElementTagNameMap {
984
- 'gs-date-range-selector': DateRangeSelectorComponent;
985
- }
986
- interface HTMLElementEventMap {
987
- 'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
988
- 'gs-date-range-option-changed': DateRangeOptionChangedEvent;
1003
+ 'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
989
1004
  }
990
1005
  }
991
1006
 
@@ -993,7 +1008,7 @@ declare global {
993
1008
  declare global {
994
1009
  namespace JSX {
995
1010
  interface IntrinsicElements {
996
- 'gs-date-range-selector': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1011
+ 'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
997
1012
  }
998
1013
  }
999
1014
  }
@@ -1001,10 +1016,7 @@ declare global {
1001
1016
 
1002
1017
  declare global {
1003
1018
  interface HTMLElementTagNameMap {
1004
- 'gs-location-filter': LocationFilterComponent;
1005
- }
1006
- interface HTMLElementEventMap {
1007
- 'gs-location-changed': CustomEvent<Record<string, string>>;
1019
+ 'gs-mutations-over-time': MutationsOverTimeComponent;
1008
1020
  }
1009
1021
  }
1010
1022
 
@@ -1012,7 +1024,7 @@ declare global {
1012
1024
  declare global {
1013
1025
  namespace JSX {
1014
1026
  interface IntrinsicElements {
1015
- 'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1027
+ 'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1016
1028
  }
1017
1029
  }
1018
1030
  }
@@ -1020,10 +1032,7 @@ declare global {
1020
1032
 
1021
1033
  declare global {
1022
1034
  interface HTMLElementTagNameMap {
1023
- 'gs-mutation-filter': MutationFilterComponent;
1024
- }
1025
- interface HTMLElementEventMap {
1026
- 'gs-mutation-filter-changed': CustomEvent<MutationsFilter>;
1035
+ 'gs-sequences-by-location': SequencesByLocationComponent;
1027
1036
  }
1028
1037
  }
1029
1038
 
@@ -1031,7 +1040,7 @@ declare global {
1031
1040
  declare global {
1032
1041
  namespace JSX {
1033
1042
  interface IntrinsicElements {
1034
- 'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1043
+ 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1035
1044
  }
1036
1045
  }
1037
1046
  }
@@ -1039,10 +1048,7 @@ declare global {
1039
1048
 
1040
1049
  declare global {
1041
1050
  interface HTMLElementTagNameMap {
1042
- 'gs-lineage-filter': LineageFilterComponent;
1043
- }
1044
- interface HTMLElementEventMap {
1045
- 'gs-lineage-filter-changed': CustomEvent<Record<string, string>>;
1051
+ 'gs-statistics': StatisticsComponent;
1046
1052
  }
1047
1053
  }
1048
1054
 
@@ -1050,7 +1056,7 @@ declare global {
1050
1056
  declare global {
1051
1057
  namespace JSX {
1052
1058
  interface IntrinsicElements {
1053
- 'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1059
+ 'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1054
1060
  }
1055
1061
  }
1056
1062
  }
package/dist/util.js CHANGED
@@ -1,6 +1,7 @@
1
- import { D, d, v } from "./dateRangeOption-Bh2p78z0.js";
1
+ import { D, L, d, v } from "./LocationChangedEvent-CORvQvXv.js";
2
2
  export {
3
3
  D as DateRangeOptionChangedEvent,
4
+ L as LocationChangedEvent,
4
5
  d as dateRangeOptionPresets,
5
6
  v as views
6
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genspectrum/dashboard-components",
3
- "version": "0.11.7",
3
+ "version": "0.12.0",
4
4
  "description": "GenSpectrum web components for building dashboards",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -87,6 +87,7 @@
87
87
  "chartjs-chart-error-bars": "^4.4.0",
88
88
  "chartjs-chart-venn": "^4.3.0",
89
89
  "dayjs": "^1.11.10",
90
+ "downshift": "^9.0.8",
90
91
  "flatpickr": "^4.6.13",
91
92
  "gridjs": "^6.2.0",
92
93
  "leaflet": "^1.9.4",
@@ -33,9 +33,9 @@ export const CsvDownloadButton: FunctionComponent<CsvDownloadButtonProps> = ({
33
33
  const getDownloadContent = () => {
34
34
  const data = getData();
35
35
  const keys = getDataKeys(data);
36
- const header = `${keys.join(',')}\n`;
36
+ const header = keys.join(',');
37
37
  const rows = data.map((row) => keys.map((key) => row[key]).join(',')).join('\n');
38
- return header + rows;
38
+ return `${header}\n${rows}\n`;
39
39
  };
40
40
 
41
41
  const getDataKeys = (data: Record<string, DataValue>[]) => {
@@ -0,0 +1,3 @@
1
+ declare module 'downshift/preact' {
2
+ export * from 'downshift';
3
+ }
@@ -0,0 +1,11 @@
1
+ export type LapisLocationFilter = Record<string, string | null | undefined>;
2
+
3
+ export class LocationChangedEvent extends CustomEvent<LapisLocationFilter> {
4
+ constructor(detail: LapisLocationFilter) {
5
+ super('gs-location-changed', {
6
+ detail,
7
+ bubbles: true,
8
+ composed: true,
9
+ });
10
+ }
11
+ }
@@ -23,14 +23,14 @@ describe('fetchAutocompletionList', () => {
23
23
  const result = await fetchAutocompletionList(fields, DUMMY_LAPIS_URL);
24
24
 
25
25
  expect(result).to.deep.equal([
26
- { region: 'region1', country: null, division: null },
27
- { region: 'region1', country: 'country1_1', division: null },
26
+ { region: 'region1', country: undefined, division: undefined },
27
+ { region: 'region1', country: 'country1_1', division: undefined },
28
28
  { region: 'region1', country: 'country1_1', division: 'division1_1_1' },
29
29
  { region: 'region1', country: 'country1_1', division: 'division1_1_2' },
30
- { region: 'region1', country: 'country1_2', division: null },
30
+ { region: 'region1', country: 'country1_2', division: undefined },
31
31
  { region: 'region1', country: 'country1_2', division: 'division1_2_1' },
32
- { region: 'region2', country: null, division: null },
33
- { region: 'region2', country: 'country2_1', division: null },
32
+ { region: 'region2', country: undefined, division: undefined },
33
+ { region: 'region2', country: 'country2_1', division: undefined },
34
34
  ]);
35
35
  });
36
36
  });
@@ -1,6 +1,10 @@
1
1
  import { FetchAggregatedOperator } from '../../operator/FetchAggregatedOperator';
2
2
 
3
- export async function fetchAutocompletionList(fields: string[], lapis: string, signal?: AbortSignal) {
3
+ export async function fetchAutocompletionList(
4
+ fields: string[],
5
+ lapis: string,
6
+ signal?: AbortSignal,
7
+ ): Promise<Record<string, string | undefined>[]> {
4
8
  const toAncestorInHierarchyOverwriteValues = Array(fields.length - 1)
5
9
  .fill(0)
6
10
  .map((_, i) => i + 1)
@@ -20,7 +24,10 @@ export async function fetchAutocompletionList(fields: string[], lapis: string, s
20
24
  return setOfAllHierarchies;
21
25
  }, new Set());
22
26
 
23
- return [...locationValues].map((json) => JSON.parse(json)).sort(compareLocationEntries(fields));
27
+ return [...locationValues]
28
+ .map((json) => JSON.parse(json))
29
+ .sort(compareLocationEntries(fields))
30
+ .map((entry) => fields.reduce((acc, field) => ({ ...acc, [field]: entry[field] ?? undefined }), {}));
24
31
  }
25
32
 
26
33
  function compareLocationEntries(fields: string[]) {