@genspectrum/dashboard-components 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +44 -13
- package/dist/components.d.ts +18 -14
- package/dist/components.js +557 -99
- package/dist/components.js.map +1 -1
- package/dist/style.css +318 -6
- package/dist/util.d.ts +12 -12
- package/package.json +2 -1
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +133 -84
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +46 -16
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +3 -0
- package/src/preact/shared/tanstackTable/pagination.tsx +132 -0
- package/src/preact/shared/tanstackTable/tanstackTable.tsx +43 -0
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +2 -1
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +3 -5
- package/src/web-components/visualization/gs-mutations-over-time.spec-d.ts +39 -0
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +4 -0
- package/src/web-components/visualization/gs-mutations-over-time.tsx +8 -31
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.spec-d.ts +24 -0
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +3 -3
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +5 -36
- package/standalone-bundle/dashboard-components.js +17733 -15921
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
package/dist/components.js
CHANGED
|
@@ -11,6 +11,7 @@ import { v as views, s as sequenceTypeSchema, n as namedLapisFilterSchema, l as
|
|
|
11
11
|
import { autoUpdate, computePosition, offset, shift, flip } from "@floating-ui/dom";
|
|
12
12
|
import { ReactiveElement } from "@lit/reactive-element";
|
|
13
13
|
import { BarWithErrorBarsController, BarWithErrorBar } from "chartjs-chart-error-bars";
|
|
14
|
+
import { createTable, createColumnHelper, getPaginationRowModel, getCoreRowModel } from "@tanstack/table-core";
|
|
14
15
|
import { map, geoJson } from "leaflet";
|
|
15
16
|
import * as topojson from "topojson-client";
|
|
16
17
|
import flatpickr from "flatpickr";
|
|
@@ -3100,11 +3101,23 @@ html {
|
|
|
3100
3101
|
--tw-text-opacity: 1;
|
|
3101
3102
|
}
|
|
3102
3103
|
|
|
3104
|
+
.\\!table tr.hover:hover,
|
|
3105
|
+
.\\!table tr.hover:nth-child(even):hover {
|
|
3106
|
+
--tw-bg-opacity: 1 !important;
|
|
3107
|
+
background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))) !important;
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3103
3110
|
.table tr.hover:hover,
|
|
3104
3111
|
.table tr.hover:nth-child(even):hover {
|
|
3105
3112
|
--tw-bg-opacity: 1;
|
|
3106
3113
|
background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));
|
|
3107
3114
|
}
|
|
3115
|
+
|
|
3116
|
+
.\\!table tr.hover:hover,
|
|
3117
|
+
.\\!table tr.hover:nth-child(even):hover {
|
|
3118
|
+
--tw-bg-opacity: 1 !important;
|
|
3119
|
+
background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))) !important;
|
|
3120
|
+
}
|
|
3108
3121
|
}
|
|
3109
3122
|
.btn {
|
|
3110
3123
|
display: inline-flex;
|
|
@@ -3304,6 +3317,106 @@ html {
|
|
|
3304
3317
|
}
|
|
3305
3318
|
}
|
|
3306
3319
|
|
|
3320
|
+
.btn-outline:hover {
|
|
3321
|
+
--tw-border-opacity: 1;
|
|
3322
|
+
border-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));
|
|
3323
|
+
--tw-bg-opacity: 1;
|
|
3324
|
+
background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));
|
|
3325
|
+
--tw-text-opacity: 1;
|
|
3326
|
+
color: var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)));
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3329
|
+
.btn-outline.btn-primary:hover {
|
|
3330
|
+
--tw-text-opacity: 1;
|
|
3331
|
+
color: var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
@supports (color: color-mix(in oklab, black, black)) {
|
|
3335
|
+
|
|
3336
|
+
.btn-outline.btn-primary:hover {
|
|
3337
|
+
background-color: color-mix(in oklab, var(--fallback-p,oklch(var(--p)/1)) 90%, black);
|
|
3338
|
+
border-color: color-mix(in oklab, var(--fallback-p,oklch(var(--p)/1)) 90%, black);
|
|
3339
|
+
}
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
.btn-outline.btn-secondary:hover {
|
|
3343
|
+
--tw-text-opacity: 1;
|
|
3344
|
+
color: var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3347
|
+
@supports (color: color-mix(in oklab, black, black)) {
|
|
3348
|
+
|
|
3349
|
+
.btn-outline.btn-secondary:hover {
|
|
3350
|
+
background-color: color-mix(in oklab, var(--fallback-s,oklch(var(--s)/1)) 90%, black);
|
|
3351
|
+
border-color: color-mix(in oklab, var(--fallback-s,oklch(var(--s)/1)) 90%, black);
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
.btn-outline.btn-accent:hover {
|
|
3356
|
+
--tw-text-opacity: 1;
|
|
3357
|
+
color: var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)));
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3360
|
+
@supports (color: color-mix(in oklab, black, black)) {
|
|
3361
|
+
|
|
3362
|
+
.btn-outline.btn-accent:hover {
|
|
3363
|
+
background-color: color-mix(in oklab, var(--fallback-a,oklch(var(--a)/1)) 90%, black);
|
|
3364
|
+
border-color: color-mix(in oklab, var(--fallback-a,oklch(var(--a)/1)) 90%, black);
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3368
|
+
.btn-outline.btn-success:hover {
|
|
3369
|
+
--tw-text-opacity: 1;
|
|
3370
|
+
color: var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3373
|
+
@supports (color: color-mix(in oklab, black, black)) {
|
|
3374
|
+
|
|
3375
|
+
.btn-outline.btn-success:hover {
|
|
3376
|
+
background-color: color-mix(in oklab, var(--fallback-su,oklch(var(--su)/1)) 90%, black);
|
|
3377
|
+
border-color: color-mix(in oklab, var(--fallback-su,oklch(var(--su)/1)) 90%, black);
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
|
|
3381
|
+
.btn-outline.btn-info:hover {
|
|
3382
|
+
--tw-text-opacity: 1;
|
|
3383
|
+
color: var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
@supports (color: color-mix(in oklab, black, black)) {
|
|
3387
|
+
|
|
3388
|
+
.btn-outline.btn-info:hover {
|
|
3389
|
+
background-color: color-mix(in oklab, var(--fallback-in,oklch(var(--in)/1)) 90%, black);
|
|
3390
|
+
border-color: color-mix(in oklab, var(--fallback-in,oklch(var(--in)/1)) 90%, black);
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
|
|
3394
|
+
.btn-outline.btn-warning:hover {
|
|
3395
|
+
--tw-text-opacity: 1;
|
|
3396
|
+
color: var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));
|
|
3397
|
+
}
|
|
3398
|
+
|
|
3399
|
+
@supports (color: color-mix(in oklab, black, black)) {
|
|
3400
|
+
|
|
3401
|
+
.btn-outline.btn-warning:hover {
|
|
3402
|
+
background-color: color-mix(in oklab, var(--fallback-wa,oklch(var(--wa)/1)) 90%, black);
|
|
3403
|
+
border-color: color-mix(in oklab, var(--fallback-wa,oklch(var(--wa)/1)) 90%, black);
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
.btn-outline.btn-error:hover {
|
|
3408
|
+
--tw-text-opacity: 1;
|
|
3409
|
+
color: var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
@supports (color: color-mix(in oklab, black, black)) {
|
|
3413
|
+
|
|
3414
|
+
.btn-outline.btn-error:hover {
|
|
3415
|
+
background-color: color-mix(in oklab, var(--fallback-er,oklch(var(--er)/1)) 90%, black);
|
|
3416
|
+
border-color: color-mix(in oklab, var(--fallback-er,oklch(var(--er)/1)) 90%, black);
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3419
|
+
|
|
3307
3420
|
.btn-disabled:hover,
|
|
3308
3421
|
.btn[disabled]:hover,
|
|
3309
3422
|
.btn:disabled:hover {
|
|
@@ -3750,6 +3863,14 @@ input.tab:checked + .tab-content,
|
|
|
3750
3863
|
:is(.tab-active, [aria-selected="true"]) + .tab-content {
|
|
3751
3864
|
display: block;
|
|
3752
3865
|
}
|
|
3866
|
+
.\\!table {
|
|
3867
|
+
position: relative !important;
|
|
3868
|
+
width: 100% !important;
|
|
3869
|
+
border-radius: var(--rounded-box, 1rem) !important;
|
|
3870
|
+
text-align: left !important;
|
|
3871
|
+
font-size: 0.875rem !important;
|
|
3872
|
+
line-height: 1.25rem !important;
|
|
3873
|
+
}
|
|
3753
3874
|
.table {
|
|
3754
3875
|
position: relative;
|
|
3755
3876
|
width: 100%;
|
|
@@ -3758,6 +3879,13 @@ input.tab:checked + .tab-content,
|
|
|
3758
3879
|
font-size: 0.875rem;
|
|
3759
3880
|
line-height: 1.25rem;
|
|
3760
3881
|
}
|
|
3882
|
+
.\\!table :where(.table-pin-rows thead tr) {
|
|
3883
|
+
position: sticky !important;
|
|
3884
|
+
top: 0px !important;
|
|
3885
|
+
z-index: 1 !important;
|
|
3886
|
+
--tw-bg-opacity: 1 !important;
|
|
3887
|
+
background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity))) !important;
|
|
3888
|
+
}
|
|
3761
3889
|
.table :where(.table-pin-rows thead tr) {
|
|
3762
3890
|
position: sticky;
|
|
3763
3891
|
top: 0px;
|
|
@@ -3765,6 +3893,13 @@ input.tab:checked + .tab-content,
|
|
|
3765
3893
|
--tw-bg-opacity: 1;
|
|
3766
3894
|
background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));
|
|
3767
3895
|
}
|
|
3896
|
+
.\\!table :where(.table-pin-rows tfoot tr) {
|
|
3897
|
+
position: sticky !important;
|
|
3898
|
+
bottom: 0px !important;
|
|
3899
|
+
z-index: 1 !important;
|
|
3900
|
+
--tw-bg-opacity: 1 !important;
|
|
3901
|
+
background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity))) !important;
|
|
3902
|
+
}
|
|
3768
3903
|
.table :where(.table-pin-rows tfoot tr) {
|
|
3769
3904
|
position: sticky;
|
|
3770
3905
|
bottom: 0px;
|
|
@@ -3772,6 +3907,13 @@ input.tab:checked + .tab-content,
|
|
|
3772
3907
|
--tw-bg-opacity: 1;
|
|
3773
3908
|
background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));
|
|
3774
3909
|
}
|
|
3910
|
+
.\\!table :where(.table-pin-cols tr th) {
|
|
3911
|
+
position: sticky !important;
|
|
3912
|
+
left: 0px !important;
|
|
3913
|
+
right: 0px !important;
|
|
3914
|
+
--tw-bg-opacity: 1 !important;
|
|
3915
|
+
background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity))) !important;
|
|
3916
|
+
}
|
|
3775
3917
|
.table :where(.table-pin-cols tr th) {
|
|
3776
3918
|
position: sticky;
|
|
3777
3919
|
left: 0px;
|
|
@@ -3845,6 +3987,43 @@ input.tab:checked + .tab-content,
|
|
|
3845
3987
|
border-color: var(--btn-color, var(--fallback-b2));
|
|
3846
3988
|
}
|
|
3847
3989
|
}
|
|
3990
|
+
@supports (color: color-mix(in oklab, black, black)) {
|
|
3991
|
+
|
|
3992
|
+
.btn-outline.btn-primary.btn-active {
|
|
3993
|
+
background-color: color-mix(in oklab, var(--fallback-p,oklch(var(--p)/1)) 90%, black);
|
|
3994
|
+
border-color: color-mix(in oklab, var(--fallback-p,oklch(var(--p)/1)) 90%, black);
|
|
3995
|
+
}
|
|
3996
|
+
|
|
3997
|
+
.btn-outline.btn-secondary.btn-active {
|
|
3998
|
+
background-color: color-mix(in oklab, var(--fallback-s,oklch(var(--s)/1)) 90%, black);
|
|
3999
|
+
border-color: color-mix(in oklab, var(--fallback-s,oklch(var(--s)/1)) 90%, black);
|
|
4000
|
+
}
|
|
4001
|
+
|
|
4002
|
+
.btn-outline.btn-accent.btn-active {
|
|
4003
|
+
background-color: color-mix(in oklab, var(--fallback-a,oklch(var(--a)/1)) 90%, black);
|
|
4004
|
+
border-color: color-mix(in oklab, var(--fallback-a,oklch(var(--a)/1)) 90%, black);
|
|
4005
|
+
}
|
|
4006
|
+
|
|
4007
|
+
.btn-outline.btn-success.btn-active {
|
|
4008
|
+
background-color: color-mix(in oklab, var(--fallback-su,oklch(var(--su)/1)) 90%, black);
|
|
4009
|
+
border-color: color-mix(in oklab, var(--fallback-su,oklch(var(--su)/1)) 90%, black);
|
|
4010
|
+
}
|
|
4011
|
+
|
|
4012
|
+
.btn-outline.btn-info.btn-active {
|
|
4013
|
+
background-color: color-mix(in oklab, var(--fallback-in,oklch(var(--in)/1)) 90%, black);
|
|
4014
|
+
border-color: color-mix(in oklab, var(--fallback-in,oklch(var(--in)/1)) 90%, black);
|
|
4015
|
+
}
|
|
4016
|
+
|
|
4017
|
+
.btn-outline.btn-warning.btn-active {
|
|
4018
|
+
background-color: color-mix(in oklab, var(--fallback-wa,oklch(var(--wa)/1)) 90%, black);
|
|
4019
|
+
border-color: color-mix(in oklab, var(--fallback-wa,oklch(var(--wa)/1)) 90%, black);
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
.btn-outline.btn-error.btn-active {
|
|
4023
|
+
background-color: color-mix(in oklab, var(--fallback-er,oklch(var(--er)/1)) 90%, black);
|
|
4024
|
+
border-color: color-mix(in oklab, var(--fallback-er,oklch(var(--er)/1)) 90%, black);
|
|
4025
|
+
}
|
|
4026
|
+
}
|
|
3848
4027
|
.btn:focus-visible {
|
|
3849
4028
|
outline-style: solid;
|
|
3850
4029
|
outline-width: 2px;
|
|
@@ -3874,6 +4053,79 @@ input.tab:checked + .tab-content,
|
|
|
3874
4053
|
border-color: transparent;
|
|
3875
4054
|
background-color: var(--fallback-bc,oklch(var(--bc)/0.2));
|
|
3876
4055
|
}
|
|
4056
|
+
.btn-outline {
|
|
4057
|
+
border-color: currentColor;
|
|
4058
|
+
background-color: transparent;
|
|
4059
|
+
--tw-text-opacity: 1;
|
|
4060
|
+
color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
|
|
4061
|
+
--tw-shadow: 0 0 #0000;
|
|
4062
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
4063
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
4064
|
+
}
|
|
4065
|
+
.btn-outline.btn-active {
|
|
4066
|
+
--tw-border-opacity: 1;
|
|
4067
|
+
border-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));
|
|
4068
|
+
--tw-bg-opacity: 1;
|
|
4069
|
+
background-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));
|
|
4070
|
+
--tw-text-opacity: 1;
|
|
4071
|
+
color: var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)));
|
|
4072
|
+
}
|
|
4073
|
+
.btn-outline.btn-primary {
|
|
4074
|
+
--tw-text-opacity: 1;
|
|
4075
|
+
color: var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)));
|
|
4076
|
+
}
|
|
4077
|
+
.btn-outline.btn-primary.btn-active {
|
|
4078
|
+
--tw-text-opacity: 1;
|
|
4079
|
+
color: var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));
|
|
4080
|
+
}
|
|
4081
|
+
.btn-outline.btn-secondary {
|
|
4082
|
+
--tw-text-opacity: 1;
|
|
4083
|
+
color: var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)));
|
|
4084
|
+
}
|
|
4085
|
+
.btn-outline.btn-secondary.btn-active {
|
|
4086
|
+
--tw-text-opacity: 1;
|
|
4087
|
+
color: var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));
|
|
4088
|
+
}
|
|
4089
|
+
.btn-outline.btn-accent {
|
|
4090
|
+
--tw-text-opacity: 1;
|
|
4091
|
+
color: var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)));
|
|
4092
|
+
}
|
|
4093
|
+
.btn-outline.btn-accent.btn-active {
|
|
4094
|
+
--tw-text-opacity: 1;
|
|
4095
|
+
color: var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)));
|
|
4096
|
+
}
|
|
4097
|
+
.btn-outline.btn-success {
|
|
4098
|
+
--tw-text-opacity: 1;
|
|
4099
|
+
color: var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)));
|
|
4100
|
+
}
|
|
4101
|
+
.btn-outline.btn-success.btn-active {
|
|
4102
|
+
--tw-text-opacity: 1;
|
|
4103
|
+
color: var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));
|
|
4104
|
+
}
|
|
4105
|
+
.btn-outline.btn-info {
|
|
4106
|
+
--tw-text-opacity: 1;
|
|
4107
|
+
color: var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)));
|
|
4108
|
+
}
|
|
4109
|
+
.btn-outline.btn-info.btn-active {
|
|
4110
|
+
--tw-text-opacity: 1;
|
|
4111
|
+
color: var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));
|
|
4112
|
+
}
|
|
4113
|
+
.btn-outline.btn-warning {
|
|
4114
|
+
--tw-text-opacity: 1;
|
|
4115
|
+
color: var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)));
|
|
4116
|
+
}
|
|
4117
|
+
.btn-outline.btn-warning.btn-active {
|
|
4118
|
+
--tw-text-opacity: 1;
|
|
4119
|
+
color: var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));
|
|
4120
|
+
}
|
|
4121
|
+
.btn-outline.btn-error {
|
|
4122
|
+
--tw-text-opacity: 1;
|
|
4123
|
+
color: var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)));
|
|
4124
|
+
}
|
|
4125
|
+
.btn-outline.btn-error.btn-active {
|
|
4126
|
+
--tw-text-opacity: 1;
|
|
4127
|
+
color: var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));
|
|
4128
|
+
}
|
|
3877
4129
|
.btn.btn-disabled,
|
|
3878
4130
|
.btn[disabled],
|
|
3879
4131
|
.btn:disabled {
|
|
@@ -4046,6 +4298,9 @@ input.tab:checked + .tab-content,
|
|
|
4046
4298
|
.join > :where(*:not(:first-child)):is(.btn) {
|
|
4047
4299
|
margin-inline-start: calc(var(--border-btn) * -1);
|
|
4048
4300
|
}
|
|
4301
|
+
.join-item:focus {
|
|
4302
|
+
isolation: isolate;
|
|
4303
|
+
}
|
|
4049
4304
|
.link:focus {
|
|
4050
4305
|
outline: 2px solid transparent;
|
|
4051
4306
|
outline-offset: 2px;
|
|
@@ -4609,9 +4864,19 @@ input.tab:checked + .tab-content,
|
|
|
4609
4864
|
.tabs-boxed .tab {
|
|
4610
4865
|
border-radius: var(--rounded-btn, 0.5rem);
|
|
4611
4866
|
}
|
|
4867
|
+
.\\!table:where([dir="rtl"], [dir="rtl"] *) {
|
|
4868
|
+
text-align: right !important;
|
|
4869
|
+
}
|
|
4612
4870
|
.table:where([dir="rtl"], [dir="rtl"] *) {
|
|
4613
4871
|
text-align: right;
|
|
4614
4872
|
}
|
|
4873
|
+
.\\!table :where(th, td) {
|
|
4874
|
+
padding-left: 1rem !important;
|
|
4875
|
+
padding-right: 1rem !important;
|
|
4876
|
+
padding-top: 0.75rem !important;
|
|
4877
|
+
padding-bottom: 0.75rem !important;
|
|
4878
|
+
vertical-align: middle !important;
|
|
4879
|
+
}
|
|
4615
4880
|
.table :where(th, td) {
|
|
4616
4881
|
padding-left: 1rem;
|
|
4617
4882
|
padding-right: 1rem;
|
|
@@ -4619,23 +4884,45 @@ input.tab:checked + .tab-content,
|
|
|
4619
4884
|
padding-bottom: 0.75rem;
|
|
4620
4885
|
vertical-align: middle;
|
|
4621
4886
|
}
|
|
4887
|
+
.\\!table tr.active,
|
|
4888
|
+
.\\!table tr.active:nth-child(even) {
|
|
4889
|
+
--tw-bg-opacity: 1 !important;
|
|
4890
|
+
background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))) !important;
|
|
4891
|
+
}
|
|
4622
4892
|
.table tr.active,
|
|
4623
4893
|
.table tr.active:nth-child(even),
|
|
4624
4894
|
.table-zebra tbody tr:nth-child(even) {
|
|
4625
4895
|
--tw-bg-opacity: 1;
|
|
4626
4896
|
background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));
|
|
4627
4897
|
}
|
|
4898
|
+
.\\!table tr.active,
|
|
4899
|
+
.\\!table tr.active:nth-child(even) {
|
|
4900
|
+
--tw-bg-opacity: 1 !important;
|
|
4901
|
+
background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity))) !important;
|
|
4902
|
+
}
|
|
4628
4903
|
.table-zebra tr.active,
|
|
4629
4904
|
.table-zebra tr.active:nth-child(even),
|
|
4630
4905
|
.table-zebra-zebra tbody tr:nth-child(even) {
|
|
4631
4906
|
--tw-bg-opacity: 1;
|
|
4632
4907
|
background-color: var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));
|
|
4633
4908
|
}
|
|
4909
|
+
.\\!table :where(thead tr, tbody tr:not(:last-child), tbody tr:first-child:last-child) {
|
|
4910
|
+
border-bottom-width: 1px !important;
|
|
4911
|
+
--tw-border-opacity: 1 !important;
|
|
4912
|
+
border-bottom-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity))) !important;
|
|
4913
|
+
}
|
|
4634
4914
|
.table :where(thead tr, tbody tr:not(:last-child), tbody tr:first-child:last-child) {
|
|
4635
4915
|
border-bottom-width: 1px;
|
|
4636
4916
|
--tw-border-opacity: 1;
|
|
4637
4917
|
border-bottom-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));
|
|
4638
4918
|
}
|
|
4919
|
+
.\\!table :where(thead, tfoot) {
|
|
4920
|
+
white-space: nowrap !important;
|
|
4921
|
+
font-size: 0.75rem !important;
|
|
4922
|
+
line-height: 1rem !important;
|
|
4923
|
+
font-weight: 700 !important;
|
|
4924
|
+
color: var(--fallback-bc,oklch(var(--bc)/0.6)) !important;
|
|
4925
|
+
}
|
|
4639
4926
|
.table :where(thead, tfoot) {
|
|
4640
4927
|
white-space: nowrap;
|
|
4641
4928
|
font-size: 0.75rem;
|
|
@@ -4643,6 +4930,11 @@ input.tab:checked + .tab-content,
|
|
|
4643
4930
|
font-weight: 700;
|
|
4644
4931
|
color: var(--fallback-bc,oklch(var(--bc)/0.6));
|
|
4645
4932
|
}
|
|
4933
|
+
.\\!table :where(tfoot) {
|
|
4934
|
+
border-top-width: 1px !important;
|
|
4935
|
+
--tw-border-opacity: 1 !important;
|
|
4936
|
+
border-top-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity))) !important;
|
|
4937
|
+
}
|
|
4646
4938
|
.table :where(tfoot) {
|
|
4647
4939
|
border-top-width: 1px;
|
|
4648
4940
|
--tw-border-opacity: 1;
|
|
@@ -5219,6 +5511,9 @@ input.tab:checked + .tab-content,
|
|
|
5219
5511
|
.mt-1 {
|
|
5220
5512
|
margin-top: 0.25rem;
|
|
5221
5513
|
}
|
|
5514
|
+
.mt-2 {
|
|
5515
|
+
margin-top: 0.5rem;
|
|
5516
|
+
}
|
|
5222
5517
|
.mt-4 {
|
|
5223
5518
|
margin-top: 1rem;
|
|
5224
5519
|
}
|
|
@@ -5234,6 +5529,9 @@ input.tab:checked + .tab-content,
|
|
|
5234
5529
|
.inline-flex {
|
|
5235
5530
|
display: inline-flex;
|
|
5236
5531
|
}
|
|
5532
|
+
.\\!table {
|
|
5533
|
+
display: table !important;
|
|
5534
|
+
}
|
|
5237
5535
|
.table {
|
|
5238
5536
|
display: table;
|
|
5239
5537
|
}
|
|
@@ -5289,6 +5587,9 @@ input.tab:checked + .tab-content,
|
|
|
5289
5587
|
.min-w-32 {
|
|
5290
5588
|
min-width: 8rem;
|
|
5291
5589
|
}
|
|
5590
|
+
.min-w-\\[0\\.05rem\\] {
|
|
5591
|
+
min-width: 0.05rem;
|
|
5592
|
+
}
|
|
5292
5593
|
.min-w-\\[180px\\] {
|
|
5293
5594
|
min-width: 180px;
|
|
5294
5595
|
}
|
|
@@ -5354,6 +5655,9 @@ input.tab:checked + .tab-content,
|
|
|
5354
5655
|
.items-center {
|
|
5355
5656
|
align-items: center;
|
|
5356
5657
|
}
|
|
5658
|
+
.justify-end {
|
|
5659
|
+
justify-content: flex-end;
|
|
5660
|
+
}
|
|
5357
5661
|
.justify-center {
|
|
5358
5662
|
justify-content: center;
|
|
5359
5663
|
}
|
|
@@ -5369,6 +5673,9 @@ input.tab:checked + .tab-content,
|
|
|
5369
5673
|
.gap-2 {
|
|
5370
5674
|
gap: 0.5rem;
|
|
5371
5675
|
}
|
|
5676
|
+
.gap-4 {
|
|
5677
|
+
gap: 1rem;
|
|
5678
|
+
}
|
|
5372
5679
|
.gap-y-1 {
|
|
5373
5680
|
row-gap: 0.25rem;
|
|
5374
5681
|
}
|
|
@@ -5518,9 +5825,6 @@ input.tab:checked + .tab-content,
|
|
|
5518
5825
|
padding-top: 0.5rem;
|
|
5519
5826
|
padding-bottom: 0.5rem;
|
|
5520
5827
|
}
|
|
5521
|
-
.pl-2 {
|
|
5522
|
-
padding-left: 0.5rem;
|
|
5523
|
-
}
|
|
5524
5828
|
.pr-14 {
|
|
5525
5829
|
padding-right: 3.5rem;
|
|
5526
5830
|
}
|
|
@@ -5563,9 +5867,6 @@ input.tab:checked + .tab-content,
|
|
|
5563
5867
|
.font-normal {
|
|
5564
5868
|
font-weight: 400;
|
|
5565
5869
|
}
|
|
5566
|
-
.font-semibold {
|
|
5567
|
-
font-weight: 600;
|
|
5568
|
-
}
|
|
5569
5870
|
.leading-5 {
|
|
5570
5871
|
line-height: 1.25rem;
|
|
5571
5872
|
}
|
|
@@ -5642,6 +5943,12 @@ input.tab:checked + .tab-content,
|
|
|
5642
5943
|
.\\@container {
|
|
5643
5944
|
container-type: inline-size;
|
|
5644
5945
|
}
|
|
5946
|
+
.mdi--chevron-left {
|
|
5947
|
+
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z'/%3E%3C/svg%3E");
|
|
5948
|
+
}
|
|
5949
|
+
.mdi--chevron-right {
|
|
5950
|
+
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z'/%3E%3C/svg%3E");
|
|
5951
|
+
}
|
|
5645
5952
|
.mdi--fullscreen {
|
|
5646
5953
|
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M5 5h5v2H7v3H5zm9 0h5v5h-2V7h-3zm3 9h2v5h-5v-2h3zm-7 3v2H5v-5h2v3z'/%3E%3C/svg%3E");
|
|
5647
5954
|
}
|
|
@@ -5651,6 +5958,12 @@ input.tab:checked + .tab-content,
|
|
|
5651
5958
|
.mdi--reload {
|
|
5652
5959
|
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M2 12a9 9 0 0 0 9 9c2.39 0 4.68-.94 6.4-2.6l-1.5-1.5A6.7 6.7 0 0 1 11 19c-6.24 0-9.36-7.54-4.95-11.95S18 5.77 18 12h-3l4 4h.1l3.9-4h-3a9 9 0 0 0-18 0'/%3E%3C/svg%3E");
|
|
5653
5960
|
}
|
|
5961
|
+
.mdi--chevron-left-first {
|
|
5962
|
+
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z'/%3E%3C/svg%3E");
|
|
5963
|
+
}
|
|
5964
|
+
.mdi--chevron-right-last {
|
|
5965
|
+
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z'/%3E%3C/svg%3E");
|
|
5966
|
+
}
|
|
5654
5967
|
@media (min-width: 640px) {
|
|
5655
5968
|
|
|
5656
5969
|
.sm\\:modal-middle {
|
|
@@ -9865,96 +10178,236 @@ const Tooltip = ({ children, content, position = "bottom" }) => {
|
|
|
9865
10178
|
)
|
|
9866
10179
|
] });
|
|
9867
10180
|
};
|
|
9868
|
-
const
|
|
9869
|
-
|
|
10181
|
+
const pageSizesSchema = z$2.union([z$2.array(z$2.number()), z$2.number()]);
|
|
10182
|
+
function Pagination({
|
|
10183
|
+
table,
|
|
10184
|
+
pageSizes
|
|
10185
|
+
}) {
|
|
10186
|
+
return /* @__PURE__ */ u$1("div", { className: "flex items-center gap-4 justify-end flex-wrap", children: [
|
|
10187
|
+
/* @__PURE__ */ u$1(PageSizeSelector, { table, pageSizes }),
|
|
10188
|
+
/* @__PURE__ */ u$1(PageIndicator, { table }),
|
|
10189
|
+
/* @__PURE__ */ u$1(GotoPageSelector, { table }),
|
|
10190
|
+
/* @__PURE__ */ u$1(SelectPageButtons, { table })
|
|
10191
|
+
] });
|
|
10192
|
+
}
|
|
10193
|
+
function PageIndicator({ table }) {
|
|
10194
|
+
if (table.getRowModel().rows.length <= 1) {
|
|
10195
|
+
return null;
|
|
10196
|
+
}
|
|
10197
|
+
return /* @__PURE__ */ u$1("span", { className: "flex items-center gap-1", children: [
|
|
10198
|
+
/* @__PURE__ */ u$1("div", { children: "Page" }),
|
|
10199
|
+
/* @__PURE__ */ u$1("strong", { children: [
|
|
10200
|
+
table.getState().pagination.pageIndex + 1,
|
|
10201
|
+
" of ",
|
|
10202
|
+
table.getPageCount().toLocaleString()
|
|
10203
|
+
] })
|
|
10204
|
+
] });
|
|
10205
|
+
}
|
|
10206
|
+
function PageSizeSelector({
|
|
10207
|
+
table,
|
|
10208
|
+
pageSizes
|
|
10209
|
+
}) {
|
|
10210
|
+
if (typeof pageSizes === "number" || pageSizes.length <= 1) {
|
|
10211
|
+
return null;
|
|
10212
|
+
}
|
|
10213
|
+
return /* @__PURE__ */ u$1("label", { className: "flex items-center gap-2", children: [
|
|
10214
|
+
/* @__PURE__ */ u$1("div", { className: "text-nowrap", children: "Rows per page:" }),
|
|
10215
|
+
/* @__PURE__ */ u$1(
|
|
10216
|
+
"select",
|
|
10217
|
+
{
|
|
10218
|
+
className: "select",
|
|
10219
|
+
value: table.getState().pagination.pageSize,
|
|
10220
|
+
onChange: (e2) => {
|
|
10221
|
+
var _a;
|
|
10222
|
+
table.setPageSize(Number((_a = e2.currentTarget) == null ? void 0 : _a.value));
|
|
10223
|
+
},
|
|
10224
|
+
"aria-label": "Select number of rows per page",
|
|
10225
|
+
children: pageSizes.map((pageSize) => /* @__PURE__ */ u$1("option", { value: pageSize, children: pageSize }, pageSize))
|
|
10226
|
+
}
|
|
10227
|
+
)
|
|
10228
|
+
] });
|
|
10229
|
+
}
|
|
10230
|
+
function GotoPageSelector({ table }) {
|
|
10231
|
+
if (table.getRowModel().rows.length === 0) {
|
|
10232
|
+
return null;
|
|
10233
|
+
}
|
|
10234
|
+
return /* @__PURE__ */ u$1("label", { className: "flex items-center", children: [
|
|
10235
|
+
"Go to page:",
|
|
10236
|
+
/* @__PURE__ */ u$1(
|
|
10237
|
+
"input",
|
|
10238
|
+
{
|
|
10239
|
+
type: "number",
|
|
10240
|
+
min: "1",
|
|
10241
|
+
max: table.getPageCount(),
|
|
10242
|
+
defaultValue: table.getState().pagination.pageIndex + 1,
|
|
10243
|
+
onChange: (e2) => {
|
|
10244
|
+
const page = e2.currentTarget.value ? Number(e2.currentTarget.value) - 1 : 0;
|
|
10245
|
+
table.setPageIndex(page);
|
|
10246
|
+
},
|
|
10247
|
+
className: "input",
|
|
10248
|
+
"aria-label": "Enter page number to go to"
|
|
10249
|
+
}
|
|
10250
|
+
)
|
|
10251
|
+
] });
|
|
10252
|
+
}
|
|
10253
|
+
function SelectPageButtons({ table }) {
|
|
10254
|
+
return /* @__PURE__ */ u$1("div", { className: "join", role: "group", "aria-label": "Pagination controls", children: [
|
|
10255
|
+
/* @__PURE__ */ u$1(
|
|
10256
|
+
"button",
|
|
10257
|
+
{
|
|
10258
|
+
className: "btn btn-outline join-item btn-sm",
|
|
10259
|
+
onClick: () => table.firstPage(),
|
|
10260
|
+
disabled: !table.getCanPreviousPage(),
|
|
10261
|
+
"aria-label": "First page",
|
|
10262
|
+
children: /* @__PURE__ */ u$1("div", { className: "iconify mdi--chevron-left-first" })
|
|
10263
|
+
}
|
|
10264
|
+
),
|
|
10265
|
+
/* @__PURE__ */ u$1(
|
|
10266
|
+
"button",
|
|
10267
|
+
{
|
|
10268
|
+
className: "btn btn-outline join-item btn-sm",
|
|
10269
|
+
onClick: () => table.previousPage(),
|
|
10270
|
+
disabled: !table.getCanPreviousPage(),
|
|
10271
|
+
"aria-label": "Previous page",
|
|
10272
|
+
children: /* @__PURE__ */ u$1("div", { className: "iconify mdi--chevron-left" })
|
|
10273
|
+
}
|
|
10274
|
+
),
|
|
10275
|
+
/* @__PURE__ */ u$1(
|
|
10276
|
+
"button",
|
|
10277
|
+
{
|
|
10278
|
+
className: "btn btn-outline join-item btn-sm",
|
|
10279
|
+
onClick: () => table.nextPage(),
|
|
10280
|
+
disabled: !table.getCanNextPage(),
|
|
10281
|
+
"aria-label": "Next page",
|
|
10282
|
+
children: /* @__PURE__ */ u$1("div", { className: "iconify mdi--chevron-right" })
|
|
10283
|
+
}
|
|
10284
|
+
),
|
|
10285
|
+
/* @__PURE__ */ u$1(
|
|
10286
|
+
"button",
|
|
10287
|
+
{
|
|
10288
|
+
className: "btn btn-outline join-item btn-sm",
|
|
10289
|
+
onClick: () => table.lastPage(),
|
|
10290
|
+
disabled: !table.getCanNextPage(),
|
|
10291
|
+
"aria-label": "Last page",
|
|
10292
|
+
children: /* @__PURE__ */ u$1("div", { className: "iconify mdi--chevron-right-last" })
|
|
10293
|
+
}
|
|
10294
|
+
)
|
|
10295
|
+
] });
|
|
10296
|
+
}
|
|
10297
|
+
function flexRender(Comp, props) {
|
|
10298
|
+
return !Comp ? null : typeof Comp === "function" ? /* @__PURE__ */ u$1(Comp, { ...props }) : Comp;
|
|
10299
|
+
}
|
|
10300
|
+
function usePreactTable(options2) {
|
|
10301
|
+
const resolvedOptions = {
|
|
10302
|
+
state: {},
|
|
10303
|
+
onStateChange: () => {
|
|
10304
|
+
},
|
|
10305
|
+
renderFallbackValue: null,
|
|
10306
|
+
...options2
|
|
10307
|
+
};
|
|
10308
|
+
const [tableRef] = d(() => ({
|
|
10309
|
+
current: createTable(resolvedOptions)
|
|
10310
|
+
}));
|
|
10311
|
+
const [state, setState] = d(() => tableRef.current.initialState);
|
|
10312
|
+
tableRef.current.setOptions((prev) => ({
|
|
10313
|
+
...prev,
|
|
10314
|
+
...options2,
|
|
10315
|
+
state: {
|
|
10316
|
+
...state,
|
|
10317
|
+
...options2.state
|
|
10318
|
+
},
|
|
10319
|
+
onStateChange: (updater) => {
|
|
10320
|
+
var _a;
|
|
10321
|
+
setState(updater);
|
|
10322
|
+
(_a = options2.onStateChange) == null ? void 0 : _a.call(options2, updater);
|
|
10323
|
+
}
|
|
10324
|
+
}));
|
|
10325
|
+
return tableRef.current;
|
|
10326
|
+
}
|
|
9870
10327
|
const MutationsOverTimeGrid = ({
|
|
9871
10328
|
data,
|
|
9872
10329
|
colorScale,
|
|
9873
|
-
|
|
9874
|
-
|
|
10330
|
+
sequenceType,
|
|
10331
|
+
pageSizes
|
|
9875
10332
|
}) => {
|
|
9876
|
-
const
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
|
|
9881
|
-
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
"
|
|
9891
|
-
{
|
|
9892
|
-
|
|
9893
|
-
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
10333
|
+
const tableData = T$1(() => {
|
|
10334
|
+
const allMutations = data.getFirstAxisKeys();
|
|
10335
|
+
return data.getAsArray().map((row, index) => {
|
|
10336
|
+
return { mutation: allMutations[index], values: [...row] };
|
|
10337
|
+
});
|
|
10338
|
+
}, [data]);
|
|
10339
|
+
const [pagination, setPagination] = d({
|
|
10340
|
+
pageIndex: 0,
|
|
10341
|
+
pageSize: typeof pageSizes === "number" ? pageSizes : pageSizes.at(0) ?? 10
|
|
10342
|
+
});
|
|
10343
|
+
const columns = T$1(() => {
|
|
10344
|
+
const columnHelper = createColumnHelper();
|
|
10345
|
+
const dates = data.getSecondAxisKeys();
|
|
10346
|
+
const mutationHeader = columnHelper.accessor((row) => row.mutation, {
|
|
10347
|
+
id: "mutation",
|
|
10348
|
+
header: () => /* @__PURE__ */ u$1("span", { children: "Mutation" }),
|
|
10349
|
+
cell: ({ getValue }) => {
|
|
10350
|
+
const value = getValue();
|
|
10351
|
+
return /* @__PURE__ */ u$1("div", { className: "text-center", children: /* @__PURE__ */ u$1(AnnotatedMutation, { mutation: value, sequenceType }) });
|
|
10352
|
+
}
|
|
10353
|
+
});
|
|
10354
|
+
const dateHeaders = dates.map((date, index) => {
|
|
10355
|
+
return columnHelper.accessor((row) => row.values[index], {
|
|
10356
|
+
id: `date-${index}`,
|
|
10357
|
+
header: () => /* @__PURE__ */ u$1("div", { className: "@container min-w-[0.05rem]", children: /* @__PURE__ */ u$1("p", { ...styleGridHeader(index, dates.length), children: date.dateString }) }),
|
|
10358
|
+
cell: ({ getValue, row, column, table: table2 }) => {
|
|
10359
|
+
const value = getValue();
|
|
10360
|
+
const rowIndex = row.index;
|
|
10361
|
+
const columnIndex = column.getIndex();
|
|
10362
|
+
const numberOfRows = table2.getRowModel().rows.length;
|
|
10363
|
+
const numberOfColumns = table2.getAllColumns().length;
|
|
10364
|
+
return /* @__PURE__ */ u$1("div", { className: "text-center", children: /* @__PURE__ */ u$1(
|
|
10365
|
+
ProportionCell,
|
|
9902
10366
|
{
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
/* @__PURE__ */ u$1(
|
|
9912
|
-
"div",
|
|
9913
|
-
{
|
|
9914
|
-
style: { gridRowStart: rowIndex + 2, gridColumnStart: 1 },
|
|
9915
|
-
className: "flex items-center justify-center",
|
|
9916
|
-
children: /* @__PURE__ */ u$1(AnnotatedMutation, { mutation, sequenceType })
|
|
9917
|
-
},
|
|
9918
|
-
`mutation-${mutation.code}`
|
|
10367
|
+
value: value ?? null,
|
|
10368
|
+
date,
|
|
10369
|
+
mutation: row.original.mutation,
|
|
10370
|
+
tooltipPosition: getTooltipPosition(
|
|
10371
|
+
rowIndex - table2.getState().pagination.pageIndex * table2.getState().pagination.pageSize,
|
|
10372
|
+
numberOfRows,
|
|
10373
|
+
columnIndex,
|
|
10374
|
+
numberOfColumns
|
|
9919
10375
|
),
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
]
|
|
9949
|
-
}
|
|
9950
|
-
)
|
|
10376
|
+
colorScale
|
|
10377
|
+
}
|
|
10378
|
+
) });
|
|
10379
|
+
}
|
|
10380
|
+
});
|
|
10381
|
+
});
|
|
10382
|
+
return [mutationHeader, ...dateHeaders];
|
|
10383
|
+
}, [colorScale, data, sequenceType]);
|
|
10384
|
+
const table = usePreactTable({
|
|
10385
|
+
data: tableData,
|
|
10386
|
+
columns,
|
|
10387
|
+
getCoreRowModel: getCoreRowModel(),
|
|
10388
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
10389
|
+
debugTable: true,
|
|
10390
|
+
onPaginationChange: setPagination,
|
|
10391
|
+
state: {
|
|
10392
|
+
pagination
|
|
10393
|
+
}
|
|
10394
|
+
});
|
|
10395
|
+
return /* @__PURE__ */ u$1("div", { className: "w-full", children: [
|
|
10396
|
+
/* @__PURE__ */ u$1("table", { className: "w-full", children: [
|
|
10397
|
+
/* @__PURE__ */ u$1("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ u$1("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ u$1("th", { colSpan: header.colSpan, style: { width: `${header.getSize()}px` }, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }, headerGroup.id)) }),
|
|
10398
|
+
/* @__PURE__ */ u$1("tbody", { children: [
|
|
10399
|
+
table.getRowModel().rows.map((row) => /* @__PURE__ */ u$1("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ u$1("td", { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)),
|
|
10400
|
+
table.getRowModel().rows.length === 0 && /* @__PURE__ */ u$1("td", { colSpan: table.getFlatHeaders().length, children: /* @__PURE__ */ u$1("div", { className: "text-center", children: "No data available for your filters." }) })
|
|
10401
|
+
] })
|
|
10402
|
+
] }),
|
|
10403
|
+
/* @__PURE__ */ u$1("div", { className: "mt-2", children: /* @__PURE__ */ u$1(Pagination, { table, pageSizes }) })
|
|
9951
10404
|
] });
|
|
9952
10405
|
};
|
|
9953
|
-
function styleGridHeader(columnIndex,
|
|
10406
|
+
function styleGridHeader(columnIndex, numDateColumns) {
|
|
9954
10407
|
if (columnIndex === 0) {
|
|
9955
10408
|
return { className: "overflow-visible text-nowrap" };
|
|
9956
10409
|
}
|
|
9957
|
-
if (columnIndex ===
|
|
10410
|
+
if (columnIndex === numDateColumns - 1) {
|
|
9958
10411
|
return { className: "overflow-visible text-nowrap", style: { direction: "rtl" } };
|
|
9959
10412
|
}
|
|
9960
10413
|
return { className: "invisible @[6rem]:visible" };
|
|
@@ -10001,7 +10454,7 @@ const ProportionCell = ({ value, mutation, date, tooltipPosition, colorScale })
|
|
|
10001
10454
|
color: getTextColorForScale(value == null ? void 0 : value.proportion, colorScale)
|
|
10002
10455
|
},
|
|
10003
10456
|
className: `w-full h-full hover:font-bold text-xs group @container`,
|
|
10004
|
-
children: /* @__PURE__ */ u$1("span", { className: "invisible
|
|
10457
|
+
children: value === null ? /* @__PURE__ */ u$1("span", { className: "invisible", children: "No data" }) : /* @__PURE__ */ u$1("span", { className: "invisible @[2rem]:visible", children: formatProportion(value.proportion, 0) })
|
|
10005
10458
|
}
|
|
10006
10459
|
) }) });
|
|
10007
10460
|
};
|
|
@@ -10075,7 +10528,8 @@ const mutationOverTimeSchema = z$2.object({
|
|
|
10075
10528
|
max: z$2.number().min(0).max(1)
|
|
10076
10529
|
}),
|
|
10077
10530
|
width: z$2.string(),
|
|
10078
|
-
height: z$2.string().optional()
|
|
10531
|
+
height: z$2.string().optional(),
|
|
10532
|
+
pageSizes: pageSizesSchema
|
|
10079
10533
|
});
|
|
10080
10534
|
const MutationsOverTime = (componentProps) => {
|
|
10081
10535
|
const { width, height } = componentProps;
|
|
@@ -10165,7 +10619,8 @@ const MutationsOverTimeTabs$1 = ({
|
|
|
10165
10619
|
{
|
|
10166
10620
|
data: filteredData,
|
|
10167
10621
|
colorScale,
|
|
10168
|
-
sequenceType: originalComponentProps.sequenceType
|
|
10622
|
+
sequenceType: originalComponentProps.sequenceType,
|
|
10623
|
+
pageSizes: originalComponentProps.pageSizes
|
|
10169
10624
|
}
|
|
10170
10625
|
)
|
|
10171
10626
|
};
|
|
@@ -10288,6 +10743,7 @@ let MutationsOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
10288
10743
|
this.lapisDateField = "date";
|
|
10289
10744
|
this.displayMutations = void 0;
|
|
10290
10745
|
this.initialMeanProportionInterval = { min: 0.05, max: 0.9 };
|
|
10746
|
+
this.pageSizes = [10, 20, 30, 40, 50];
|
|
10291
10747
|
this.mutationAnnotations = [];
|
|
10292
10748
|
}
|
|
10293
10749
|
render() {
|
|
@@ -10302,7 +10758,8 @@ let MutationsOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
10302
10758
|
granularity: this.granularity,
|
|
10303
10759
|
lapisDateField: this.lapisDateField,
|
|
10304
10760
|
displayMutations: this.displayMutations,
|
|
10305
|
-
initialMeanProportionInterval: this.initialMeanProportionInterval
|
|
10761
|
+
initialMeanProportionInterval: this.initialMeanProportionInterval,
|
|
10762
|
+
pageSizes: this.pageSizes
|
|
10306
10763
|
}
|
|
10307
10764
|
) });
|
|
10308
10765
|
}
|
|
@@ -10334,6 +10791,9 @@ __decorateClass$8([
|
|
|
10334
10791
|
__decorateClass$8([
|
|
10335
10792
|
n$1({ type: Object })
|
|
10336
10793
|
], MutationsOverTimeComponent.prototype, "initialMeanProportionInterval", 2);
|
|
10794
|
+
__decorateClass$8([
|
|
10795
|
+
n$1({ type: Array })
|
|
10796
|
+
], MutationsOverTimeComponent.prototype, "pageSizes", 2);
|
|
10337
10797
|
__decorateClass$8([
|
|
10338
10798
|
consume({ context: mutationAnnotationsContext, subscribe: true })
|
|
10339
10799
|
], MutationsOverTimeComponent.prototype, "mutationAnnotations", 2);
|
|
@@ -11672,7 +12132,7 @@ const wastewaterMutationOverTimeSchema = z$2.object({
|
|
|
11672
12132
|
sequenceType: sequenceTypeSchema,
|
|
11673
12133
|
width: z$2.string(),
|
|
11674
12134
|
height: z$2.string().optional(),
|
|
11675
|
-
|
|
12135
|
+
pageSizes: pageSizesSchema
|
|
11676
12136
|
});
|
|
11677
12137
|
const WastewaterMutationsOverTime = (componentProps) => {
|
|
11678
12138
|
const { width, height } = componentProps;
|
|
@@ -11706,15 +12166,13 @@ const WastewaterMutationsOverTimeInner = (componentProps) => {
|
|
|
11706
12166
|
MutationsOverTimeTabs,
|
|
11707
12167
|
{
|
|
11708
12168
|
mutationOverTimeDataPerLocation,
|
|
11709
|
-
originalComponentProps: componentProps
|
|
11710
|
-
maxNumberOfGridRows: componentProps.maxNumberOfGridRows
|
|
12169
|
+
originalComponentProps: componentProps
|
|
11711
12170
|
}
|
|
11712
12171
|
);
|
|
11713
12172
|
};
|
|
11714
12173
|
const MutationsOverTimeTabs = ({
|
|
11715
12174
|
mutationOverTimeDataPerLocation,
|
|
11716
|
-
originalComponentProps
|
|
11717
|
-
maxNumberOfGridRows
|
|
12175
|
+
originalComponentProps
|
|
11718
12176
|
}) => {
|
|
11719
12177
|
const [colorScale, setColorScale] = d({ min: 0, max: 1, color: "indigo" });
|
|
11720
12178
|
const tabs = mutationOverTimeDataPerLocation.map(({ location, data }) => ({
|
|
@@ -11724,7 +12182,7 @@ const MutationsOverTimeTabs = ({
|
|
|
11724
12182
|
{
|
|
11725
12183
|
data,
|
|
11726
12184
|
colorScale,
|
|
11727
|
-
|
|
12185
|
+
pageSizes: originalComponentProps.pageSizes,
|
|
11728
12186
|
sequenceType: originalComponentProps.sequenceType
|
|
11729
12187
|
}
|
|
11730
12188
|
)
|
|
@@ -11781,7 +12239,7 @@ let WastewaterMutationsOverTimeComponent = class extends PreactLitAdapterWithGri
|
|
|
11781
12239
|
this.sequenceType = "nucleotide";
|
|
11782
12240
|
this.width = "100%";
|
|
11783
12241
|
this.height = void 0;
|
|
11784
|
-
this.
|
|
12242
|
+
this.pageSizes = [10, 20, 30, 40, 50];
|
|
11785
12243
|
this.mutationAnnotations = [];
|
|
11786
12244
|
}
|
|
11787
12245
|
render() {
|
|
@@ -11792,7 +12250,7 @@ let WastewaterMutationsOverTimeComponent = class extends PreactLitAdapterWithGri
|
|
|
11792
12250
|
sequenceType: this.sequenceType,
|
|
11793
12251
|
width: this.width,
|
|
11794
12252
|
height: this.height,
|
|
11795
|
-
|
|
12253
|
+
pageSizes: this.pageSizes
|
|
11796
12254
|
}
|
|
11797
12255
|
) });
|
|
11798
12256
|
}
|
|
@@ -11810,8 +12268,8 @@ __decorateClass$5([
|
|
|
11810
12268
|
n$1({ type: String })
|
|
11811
12269
|
], WastewaterMutationsOverTimeComponent.prototype, "height", 2);
|
|
11812
12270
|
__decorateClass$5([
|
|
11813
|
-
n$1({ type:
|
|
11814
|
-
], WastewaterMutationsOverTimeComponent.prototype, "
|
|
12271
|
+
n$1({ type: Array })
|
|
12272
|
+
], WastewaterMutationsOverTimeComponent.prototype, "pageSizes", 2);
|
|
11815
12273
|
__decorateClass$5([
|
|
11816
12274
|
consume({ context: mutationAnnotationsContext, subscribe: true })
|
|
11817
12275
|
], WastewaterMutationsOverTimeComponent.prototype, "mutationAnnotations", 2);
|