@genspectrum/dashboard-components 0.9.1 → 0.10.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 +168 -5
- package/dist/assets/{mutationOverTimeWorker-DuWGESoO.js.map → mutationOverTimeWorker-CvZg52rf.js.map} +1 -1
- package/dist/components.d.ts +49 -1
- package/dist/components.js +268 -128
- package/dist/components.js.map +1 -1
- package/dist/style.css +41 -0
- package/dist/util.d.ts +16 -0
- package/package.json +2 -2
- package/src/preact/components/confidence-interval-selector.tsx +1 -1
- package/src/preact/components/min-max-range-slider.tsx +4 -4
- package/src/preact/components/percent-intput.tsx +2 -2
- package/src/preact/mutationFilter/mutation-filter.tsx +0 -1
- package/src/preact/mutationFilter/parseMutation.spec.ts +30 -0
- package/src/preact/mutationFilter/sequenceTypeFromSegment.ts +3 -2
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +4 -4
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +11 -1
- package/src/preact/statistic/__mockData__/denominator.json +13 -0
- package/src/preact/statistic/__mockData__/numerator.json +13 -0
- package/src/preact/statistic/statistics.stories.tsx +81 -0
- package/src/preact/statistic/statistics.tsx +78 -0
- package/src/query/queryGeneralStatistics.ts +18 -0
- package/src/utils/mutations.ts +3 -3
- package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +1 -1
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +2 -2
- package/src/web-components/visualization/gs-statistics.stories.ts +95 -0
- package/src/web-components/visualization/gs-statistics.tsx +83 -0
- package/src/web-components/visualization/index.ts +1 -0
- package/standalone-bundle/assets/{mutationOverTimeWorker-MVSt1FVw.js.map → mutationOverTimeWorker-CypX_PYM.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +4422 -4350
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
package/custom-elements.json
CHANGED
|
@@ -2573,7 +2573,7 @@
|
|
|
2573
2573
|
"type": {
|
|
2574
2574
|
"text": "Meta<Required<PrevalenceOverTimeProps>>"
|
|
2575
2575
|
},
|
|
2576
|
-
"default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numeratorFilter: { control: 'object' }, denominatorFilter: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['wilson'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, pageSize: { control: 'object' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
2576
|
+
"default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numeratorFilter: { control: 'object' }, denominatorFilter: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['none', 'wilson'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, pageSize: { control: 'object' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
2577
2577
|
},
|
|
2578
2578
|
{
|
|
2579
2579
|
"kind": "variable",
|
|
@@ -2732,8 +2732,8 @@
|
|
|
2732
2732
|
"type": {
|
|
2733
2733
|
"text": "('wilson' | 'none')[]"
|
|
2734
2734
|
},
|
|
2735
|
-
"default": "['wilson']",
|
|
2736
|
-
"description": "A list of methods to calculate the confidence interval.\
|
|
2735
|
+
"default": "['none', 'wilson']",
|
|
2736
|
+
"description": "A list of methods to calculate the confidence interval.\nPass an empty array to disable the confidence interval selector.\nThe first entry will be selected by default.",
|
|
2737
2737
|
"attribute": "confidenceIntervalMethods"
|
|
2738
2738
|
},
|
|
2739
2739
|
{
|
|
@@ -2848,8 +2848,8 @@
|
|
|
2848
2848
|
"type": {
|
|
2849
2849
|
"text": "('wilson' | 'none')[]"
|
|
2850
2850
|
},
|
|
2851
|
-
"default": "['wilson']",
|
|
2852
|
-
"description": "A list of methods to calculate the confidence interval.\
|
|
2851
|
+
"default": "['none', 'wilson']",
|
|
2852
|
+
"description": "A list of methods to calculate the confidence interval.\nPass an empty array to disable the confidence interval selector.\nThe first entry will be selected by default.",
|
|
2853
2853
|
"fieldName": "confidenceIntervalMethods"
|
|
2854
2854
|
},
|
|
2855
2855
|
{
|
|
@@ -3184,6 +3184,161 @@
|
|
|
3184
3184
|
}
|
|
3185
3185
|
]
|
|
3186
3186
|
},
|
|
3187
|
+
{
|
|
3188
|
+
"kind": "javascript-module",
|
|
3189
|
+
"path": "src/web-components/visualization/gs-statistics.stories.ts",
|
|
3190
|
+
"declarations": [
|
|
3191
|
+
{
|
|
3192
|
+
"kind": "variable",
|
|
3193
|
+
"name": "meta",
|
|
3194
|
+
"type": {
|
|
3195
|
+
"text": "Meta<Required<StatisticsProps>>"
|
|
3196
|
+
},
|
|
3197
|
+
"default": "{ title: 'Visualization/Statistics', component: 'gs-statistics', argTypes: { width: { control: 'text' }, height: { control: 'text' }, }, parameters: withComponentDocs({ fetchMock: { mocks: [ { matcher: { name: 'denominatorData', url: AGGREGATED_ENDPOINT, body: { fields: [], country: 'USA', }, }, response: { status: 200, body: denominatorData, }, }, { matcher: { name: 'numeratorData', url: AGGREGATED_ENDPOINT, body: { fields: [], country: 'USA', division: 'Alabama', }, }, response: { status: 200, body: numeratorData, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
3198
|
+
},
|
|
3199
|
+
{
|
|
3200
|
+
"kind": "variable",
|
|
3201
|
+
"name": "Default",
|
|
3202
|
+
"type": {
|
|
3203
|
+
"text": "StoryObj<Required<StatisticsProps>>"
|
|
3204
|
+
},
|
|
3205
|
+
"default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-statistics .numeratorFilter=${args.numeratorFilter} .denominatorFilter=${args.denominatorFilter} .width=${args.width} .height=${args.height} ></gs-statistics> </gs-app> `, args: { denominatorFilter: { country: 'USA', }, numeratorFilter: { country: 'USA', division: 'Alabama', }, width: '100%', height: '700px', }, }"
|
|
3206
|
+
}
|
|
3207
|
+
],
|
|
3208
|
+
"exports": [
|
|
3209
|
+
{
|
|
3210
|
+
"kind": "js",
|
|
3211
|
+
"name": "default",
|
|
3212
|
+
"declaration": {
|
|
3213
|
+
"name": "meta",
|
|
3214
|
+
"module": "src/web-components/visualization/gs-statistics.stories.ts"
|
|
3215
|
+
}
|
|
3216
|
+
},
|
|
3217
|
+
{
|
|
3218
|
+
"kind": "js",
|
|
3219
|
+
"name": "Default",
|
|
3220
|
+
"declaration": {
|
|
3221
|
+
"name": "Default",
|
|
3222
|
+
"module": "src/web-components/visualization/gs-statistics.stories.ts"
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
]
|
|
3226
|
+
},
|
|
3227
|
+
{
|
|
3228
|
+
"kind": "javascript-module",
|
|
3229
|
+
"path": "src/web-components/visualization/gs-statistics.tsx",
|
|
3230
|
+
"declarations": [
|
|
3231
|
+
{
|
|
3232
|
+
"kind": "class",
|
|
3233
|
+
"description": "## Context\n\nThis component displays general statistics (number of sequences, overall proportion)\nfor a given numerator and denominator filter.",
|
|
3234
|
+
"name": "StatisticsComponent",
|
|
3235
|
+
"members": [
|
|
3236
|
+
{
|
|
3237
|
+
"kind": "field",
|
|
3238
|
+
"name": "numeratorFilter",
|
|
3239
|
+
"type": {
|
|
3240
|
+
"text": "LapisFilter"
|
|
3241
|
+
},
|
|
3242
|
+
"default": "{}",
|
|
3243
|
+
"description": "The filter to apply to the data for the overall number of sequences and as the numerator for the proportion.\nIt must be a valid LAPIS filter object.",
|
|
3244
|
+
"attribute": "numeratorFilter"
|
|
3245
|
+
},
|
|
3246
|
+
{
|
|
3247
|
+
"kind": "field",
|
|
3248
|
+
"name": "denominatorFilter",
|
|
3249
|
+
"type": {
|
|
3250
|
+
"text": "LapisFilter"
|
|
3251
|
+
},
|
|
3252
|
+
"default": "{}",
|
|
3253
|
+
"description": "The filter to apply to the data for the denominator of the proportion.\nIt must be a valid LAPIS filter object.",
|
|
3254
|
+
"attribute": "denominatorFilter"
|
|
3255
|
+
},
|
|
3256
|
+
{
|
|
3257
|
+
"kind": "field",
|
|
3258
|
+
"name": "width",
|
|
3259
|
+
"type": {
|
|
3260
|
+
"text": "string"
|
|
3261
|
+
},
|
|
3262
|
+
"default": "'100%'",
|
|
3263
|
+
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
|
|
3264
|
+
"attribute": "width"
|
|
3265
|
+
},
|
|
3266
|
+
{
|
|
3267
|
+
"kind": "field",
|
|
3268
|
+
"name": "height",
|
|
3269
|
+
"type": {
|
|
3270
|
+
"text": "string"
|
|
3271
|
+
},
|
|
3272
|
+
"default": "'100%'",
|
|
3273
|
+
"description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
|
|
3274
|
+
"attribute": "height"
|
|
3275
|
+
}
|
|
3276
|
+
],
|
|
3277
|
+
"attributes": [
|
|
3278
|
+
{
|
|
3279
|
+
"name": "numeratorFilter",
|
|
3280
|
+
"type": {
|
|
3281
|
+
"text": "LapisFilter"
|
|
3282
|
+
},
|
|
3283
|
+
"default": "{}",
|
|
3284
|
+
"description": "The filter to apply to the data for the overall number of sequences and as the numerator for the proportion.\nIt must be a valid LAPIS filter object.",
|
|
3285
|
+
"fieldName": "numeratorFilter"
|
|
3286
|
+
},
|
|
3287
|
+
{
|
|
3288
|
+
"name": "denominatorFilter",
|
|
3289
|
+
"type": {
|
|
3290
|
+
"text": "LapisFilter"
|
|
3291
|
+
},
|
|
3292
|
+
"default": "{}",
|
|
3293
|
+
"description": "The filter to apply to the data for the denominator of the proportion.\nIt must be a valid LAPIS filter object.",
|
|
3294
|
+
"fieldName": "denominatorFilter"
|
|
3295
|
+
},
|
|
3296
|
+
{
|
|
3297
|
+
"name": "width",
|
|
3298
|
+
"type": {
|
|
3299
|
+
"text": "string"
|
|
3300
|
+
},
|
|
3301
|
+
"default": "'100%'",
|
|
3302
|
+
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
|
|
3303
|
+
"fieldName": "width"
|
|
3304
|
+
},
|
|
3305
|
+
{
|
|
3306
|
+
"name": "height",
|
|
3307
|
+
"type": {
|
|
3308
|
+
"text": "string"
|
|
3309
|
+
},
|
|
3310
|
+
"default": "'100%'",
|
|
3311
|
+
"description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
|
|
3312
|
+
"fieldName": "height"
|
|
3313
|
+
}
|
|
3314
|
+
],
|
|
3315
|
+
"superclass": {
|
|
3316
|
+
"name": "PreactLitAdapterWithGridJsStyles",
|
|
3317
|
+
"module": "/src/web-components/PreactLitAdapterWithGridJsStyles"
|
|
3318
|
+
},
|
|
3319
|
+
"tagName": "gs-statistics",
|
|
3320
|
+
"customElement": true
|
|
3321
|
+
}
|
|
3322
|
+
],
|
|
3323
|
+
"exports": [
|
|
3324
|
+
{
|
|
3325
|
+
"kind": "js",
|
|
3326
|
+
"name": "StatisticsComponent",
|
|
3327
|
+
"declaration": {
|
|
3328
|
+
"name": "StatisticsComponent",
|
|
3329
|
+
"module": "src/web-components/visualization/gs-statistics.tsx"
|
|
3330
|
+
}
|
|
3331
|
+
},
|
|
3332
|
+
{
|
|
3333
|
+
"kind": "custom-element-definition",
|
|
3334
|
+
"name": "gs-statistics",
|
|
3335
|
+
"declaration": {
|
|
3336
|
+
"name": "StatisticsComponent",
|
|
3337
|
+
"module": "src/web-components/visualization/gs-statistics.tsx"
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3340
|
+
]
|
|
3341
|
+
},
|
|
3187
3342
|
{
|
|
3188
3343
|
"kind": "javascript-module",
|
|
3189
3344
|
"path": "src/web-components/visualization/index.ts",
|
|
@@ -3244,6 +3399,14 @@
|
|
|
3244
3399
|
"name": "MutationsOverTimeComponent",
|
|
3245
3400
|
"module": "./gs-mutations-over-time"
|
|
3246
3401
|
}
|
|
3402
|
+
},
|
|
3403
|
+
{
|
|
3404
|
+
"kind": "js",
|
|
3405
|
+
"name": "StatisticsComponent",
|
|
3406
|
+
"declaration": {
|
|
3407
|
+
"name": "StatisticsComponent",
|
|
3408
|
+
"module": "./gs-statistics"
|
|
3409
|
+
}
|
|
3247
3410
|
}
|
|
3248
3411
|
]
|
|
3249
3412
|
},
|