@genspectrum/dashboard-components 0.4.4 → 0.5.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.
Files changed (64) hide show
  1. package/README.md +2 -2
  2. package/custom-elements.json +279 -108
  3. package/dist/dashboard-components.js +495 -283
  4. package/dist/dashboard-components.js.map +1 -1
  5. package/dist/genspectrum-components.d.ts +115 -55
  6. package/dist/style.css +34 -7
  7. package/package.json +5 -5
  8. package/src/preact/aggregatedData/aggregate-table.tsx +3 -2
  9. package/src/preact/aggregatedData/aggregate.stories.tsx +2 -0
  10. package/src/preact/aggregatedData/aggregate.tsx +8 -3
  11. package/src/preact/components/table.stories.tsx +51 -1
  12. package/src/preact/components/table.tsx +4 -3
  13. package/src/preact/locationFilter/location-filter.stories.tsx +12 -1
  14. package/src/preact/locationFilter/location-filter.tsx +10 -3
  15. package/src/preact/mutationComparison/mutation-comparison-table.tsx +7 -2
  16. package/src/preact/mutationComparison/mutation-comparison-venn.tsx +1 -1
  17. package/src/preact/mutationComparison/mutation-comparison.stories.tsx +21 -18
  18. package/src/preact/mutationComparison/mutation-comparison.tsx +30 -8
  19. package/src/preact/mutationComparison/queryMutationData.ts +4 -4
  20. package/src/preact/mutations/mutations-grid.tsx +8 -2
  21. package/src/preact/mutations/mutations-insertions-table.tsx +3 -2
  22. package/src/preact/mutations/mutations-table.tsx +3 -2
  23. package/src/preact/mutations/mutations.stories.tsx +6 -3
  24. package/src/preact/mutations/mutations.tsx +30 -10
  25. package/src/preact/mutations/queryMutations.ts +3 -3
  26. package/src/preact/prevalenceOverTime/__mockData__/{denominatorOneVariant.json → denominatorFilterOneDataset.json} +1 -1
  27. package/src/preact/prevalenceOverTime/__mockData__/{numeratorOneVariant.json → numeratorFilterOneDataset.json} +1 -1
  28. package/src/preact/prevalenceOverTime/prevalence-over-time-bar-chart.tsx +42 -5
  29. package/src/preact/prevalenceOverTime/prevalence-over-time-bubble-chart.tsx +26 -7
  30. package/src/preact/prevalenceOverTime/prevalence-over-time-line-chart.tsx +62 -28
  31. package/src/preact/prevalenceOverTime/prevalence-over-time-table.tsx +3 -2
  32. package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +30 -16
  33. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +46 -12
  34. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage-chart.tsx +39 -7
  35. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +10 -4
  36. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +19 -10
  37. package/src/preact/shared/charts/confideceInterval.ts +7 -2
  38. package/src/preact/shared/charts/getYAxisMax.ts +24 -0
  39. package/src/preact/shared/charts/getYAxisScale.ts +1 -3
  40. package/src/query/queryAggregateData.ts +2 -2
  41. package/src/query/queryInsertions.ts +7 -2
  42. package/src/query/querySubstitutionsOrDeletions.ts +2 -2
  43. package/src/web-components/input/gs-date-range-selector.tsx +1 -1
  44. package/src/web-components/input/gs-location-filter.stories.ts +11 -0
  45. package/src/web-components/input/gs-location-filter.tsx +15 -2
  46. package/src/web-components/input/gs-mutation-filter.tsx +1 -1
  47. package/src/web-components/input/gs-text-input.tsx +1 -1
  48. package/src/web-components/visualization/gs-aggregate.stories.ts +4 -0
  49. package/src/web-components/visualization/gs-aggregate.tsx +10 -2
  50. package/src/web-components/visualization/gs-mutation-comparison.stories.ts +16 -12
  51. package/src/web-components/visualization/gs-mutation-comparison.tsx +26 -19
  52. package/src/web-components/visualization/gs-mutations.stories.ts +8 -4
  53. package/src/web-components/visualization/gs-mutations.tsx +18 -11
  54. package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +51 -35
  55. package/src/web-components/visualization/gs-prevalence-over-time.tsx +66 -24
  56. package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +32 -18
  57. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +51 -13
  58. /package/src/preact/mutationComparison/__mockData__/{nucleotideMutationsOtherVariant.json → nucleotideMutationsOtherDataset.json} +0 -0
  59. /package/src/preact/mutationComparison/__mockData__/{nucleotideMutationsSomeVariant.json → nucleotideMutationsSomeDataset.json} +0 -0
  60. /package/src/preact/prevalenceOverTime/__mockData__/{denominator.json → denominatorFilter.json} +0 -0
  61. /package/src/preact/prevalenceOverTime/__mockData__/{numeratorEG.json → numeratorFilterEG.json} +0 -0
  62. /package/src/preact/prevalenceOverTime/__mockData__/{numeratorJN1.json → numeratorFilterJN1.json} +0 -0
  63. /package/src/preact/relativeGrowthAdvantage/__mockData__/{denominator.json → denominatorFilter.json} +0 -0
  64. /package/src/preact/relativeGrowthAdvantage/__mockData__/{numerator.json → numeratorFilter.json} +0 -0
@@ -28,8 +28,7 @@ const t$2 = (t2) => (e2, o2) => {
28
28
  const t$1 = globalThis, e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$1 = Symbol(), o$3 = /* @__PURE__ */ new WeakMap();
29
29
  let n$2 = class n {
30
30
  constructor(t2, e2, o2) {
31
- if (this._$cssResult$ = true, o2 !== s$1)
32
- throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
31
+ if (this._$cssResult$ = true, o2 !== s$1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
33
32
  this.cssText = t2, this.t = e2;
34
33
  }
35
34
  get styleSheet() {
@@ -46,17 +45,14 @@ let n$2 = class n {
46
45
  }
47
46
  };
48
47
  const r$3 = (t2) => new n$2("string" == typeof t2 ? t2 : t2 + "", void 0, s$1), S$1 = (s2, o2) => {
49
- if (e$2)
50
- s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
51
- else
52
- for (const e2 of o2) {
53
- const o3 = document.createElement("style"), n3 = t$1.litNonce;
54
- void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e2.cssText, s2.appendChild(o3);
55
- }
48
+ if (e$2) s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
49
+ else for (const e2 of o2) {
50
+ const o3 = document.createElement("style"), n3 = t$1.litNonce;
51
+ void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e2.cssText, s2.appendChild(o3);
52
+ }
56
53
  }, c$2 = e$2 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
57
54
  let e2 = "";
58
- for (const s2 of t3.cssRules)
59
- e2 += s2.cssText;
55
+ for (const s2 of t3.cssRules) e2 += s2.cssText;
60
56
  return r$3(e2);
61
57
  })(t2) : t2;
62
58
  /**
@@ -124,25 +120,20 @@ let b$1 = class b extends HTMLElement {
124
120
  return this.elementProperties.get(t2) ?? y$1;
125
121
  }
126
122
  static _$Ei() {
127
- if (this.hasOwnProperty(d$1("elementProperties")))
128
- return;
123
+ if (this.hasOwnProperty(d$1("elementProperties"))) return;
129
124
  const t2 = n$1(this);
130
125
  t2.finalize(), void 0 !== t2.l && (this.l = [...t2.l]), this.elementProperties = new Map(t2.elementProperties);
131
126
  }
132
127
  static finalize() {
133
- if (this.hasOwnProperty(d$1("finalized")))
134
- return;
128
+ if (this.hasOwnProperty(d$1("finalized"))) return;
135
129
  if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
136
130
  const t3 = this.properties, s2 = [...h$1(t3), ...o$2(t3)];
137
- for (const i2 of s2)
138
- this.createProperty(i2, t3[i2]);
131
+ for (const i2 of s2) this.createProperty(i2, t3[i2]);
139
132
  }
140
133
  const t2 = this[Symbol.metadata];
141
134
  if (null !== t2) {
142
135
  const s2 = litPropertyMetadata.get(t2);
143
- if (void 0 !== s2)
144
- for (const [t3, i2] of s2)
145
- this.elementProperties.set(t3, i2);
136
+ if (void 0 !== s2) for (const [t3, i2] of s2) this.elementProperties.set(t3, i2);
146
137
  }
147
138
  this._$Eh = /* @__PURE__ */ new Map();
148
139
  for (const [t3, s2] of this.elementProperties) {
@@ -155,10 +146,8 @@ let b$1 = class b extends HTMLElement {
155
146
  const i2 = [];
156
147
  if (Array.isArray(s2)) {
157
148
  const e2 = new Set(s2.flat(1 / 0).reverse());
158
- for (const s3 of e2)
159
- i2.unshift(c$2(s3));
160
- } else
161
- void 0 !== s2 && i2.push(c$2(s2));
149
+ for (const s3 of e2) i2.unshift(c$2(s3));
150
+ } else void 0 !== s2 && i2.push(c$2(s2));
162
151
  return i2;
163
152
  }
164
153
  static _$Eu(t2, s2) {
@@ -182,8 +171,7 @@ let b$1 = class b extends HTMLElement {
182
171
  }
183
172
  _$E_() {
184
173
  const t2 = /* @__PURE__ */ new Map(), s2 = this.constructor.elementProperties;
185
- for (const i2 of s2.keys())
186
- this.hasOwnProperty(i2) && (t2.set(i2, this[i2]), delete this[i2]);
174
+ for (const i2 of s2.keys()) this.hasOwnProperty(i2) && (t2.set(i2, this[i2]), delete this[i2]);
187
175
  t2.size > 0 && (this._$Ep = t2);
188
176
  }
189
177
  createRenderRoot() {
@@ -227,8 +215,7 @@ let b$1 = class b extends HTMLElement {
227
215
  }
228
216
  requestUpdate(t2, s2, i2) {
229
217
  if (void 0 !== t2) {
230
- if (i2 ?? (i2 = this.constructor.getPropertyOptions(t2)), !(i2.hasChanged ?? f$2)(this[t2], s2))
231
- return;
218
+ if (i2 ?? (i2 = this.constructor.getPropertyOptions(t2)), !(i2.hasChanged ?? f$2)(this[t2], s2)) return;
232
219
  this.P(t2, s2, i2);
233
220
  }
234
221
  false === this.isUpdatePending && (this._$ES = this._$ET());
@@ -251,18 +238,14 @@ let b$1 = class b extends HTMLElement {
251
238
  }
252
239
  performUpdate() {
253
240
  var _a;
254
- if (!this.isUpdatePending)
255
- return;
241
+ if (!this.isUpdatePending) return;
256
242
  if (!this.hasUpdated) {
257
243
  if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
258
- for (const [t4, s3] of this._$Ep)
259
- this[t4] = s3;
244
+ for (const [t4, s3] of this._$Ep) this[t4] = s3;
260
245
  this._$Ep = void 0;
261
246
  }
262
247
  const t3 = this.constructor.elementProperties;
263
- if (t3.size > 0)
264
- for (const [s3, i2] of t3)
265
- true !== i2.wrapped || this._$AL.has(s3) || void 0 === this[s3] || this.P(s3, this[s3], i2);
248
+ if (t3.size > 0) for (const [s3, i2] of t3) true !== i2.wrapped || this._$AL.has(s3) || void 0 === this[s3] || this.P(s3, this[s3], i2);
266
249
  }
267
250
  let t2 = false;
268
251
  const s2 = this._$AL;
@@ -513,8 +496,7 @@ var __decorateClass$a = (decorators, target, key, kind) => {
513
496
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
514
497
  if (decorator = decorators[i2])
515
498
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
516
- if (kind && result)
517
- __defProp$a(target, key, result);
499
+ if (kind && result) __defProp$a(target, key, result);
518
500
  return result;
519
501
  };
520
502
  let App = class extends LitElement {
@@ -559,13 +541,9 @@ var f$1 = 0;
559
541
  function u$1(e2, t2, n3, o2, i2, u2) {
560
542
  t2 || (t2 = {});
561
543
  var a2, c2, p2 = t2;
562
- if ("ref" in p2)
563
- for (c2 in p2 = {}, t2)
564
- "ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
544
+ if ("ref" in p2) for (c2 in p2 = {}, t2) "ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
565
545
  var l2 = { type: e2, props: p2, key: n3, ref: a2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --f$1, __i: -1, __u: 0, __source: i2, __self: u2 };
566
- if ("function" == typeof e2 && (a2 = e2.defaultProps))
567
- for (c2 in a2)
568
- void 0 === p2[c2] && (p2[c2] = a2[c2]);
546
+ if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === p2[c2] && (p2[c2] = a2[c2]);
569
547
  return options.vnode && options.vnode(l2), l2;
570
548
  }
571
549
  var t, r, u, i, o = 0, f = [], c = [], e = options, a = e.__b, v = e.__r, l = e.diffed, m = e.__c, s = e.unmount, d = e.__;
@@ -584,15 +562,13 @@ function y(n3, u2, i2) {
584
562
  t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
585
563
  }], o2.__c = r, !r.u)) {
586
564
  var f2 = function(n4, t2, r2) {
587
- if (!o2.__c.__H)
588
- return true;
565
+ if (!o2.__c.__H) return true;
589
566
  var u3 = o2.__c.__H.__.filter(function(n5) {
590
567
  return !!n5.__c;
591
568
  });
592
569
  if (u3.every(function(n5) {
593
570
  return !n5.__N;
594
- }))
595
- return !c2 || c2.call(this, n4, t2, r2);
571
+ })) return !c2 || c2.call(this, n4, t2, r2);
596
572
  var i3 = false;
597
573
  return u3.forEach(function(n5) {
598
574
  if (n5.__N) {
@@ -639,13 +615,11 @@ function b2(n3) {
639
615
  }];
640
616
  }
641
617
  function j() {
642
- for (var n3; n3 = f.shift(); )
643
- if (n3.__P && n3.__H)
644
- try {
645
- n3.__H.__h.forEach(z), n3.__H.__h.forEach(B), n3.__H.__h = [];
646
- } catch (t2) {
647
- n3.__H.__h = [], e.__e(t2, n3.__v);
648
- }
618
+ for (var n3; n3 = f.shift(); ) if (n3.__P && n3.__H) try {
619
+ n3.__H.__h.forEach(z), n3.__H.__h.forEach(B), n3.__H.__h = [];
620
+ } catch (t2) {
621
+ n3.__H.__h = [], e.__e(t2, n3.__v);
622
+ }
649
623
  }
650
624
  e.__b = function(n3) {
651
625
  r = null, a && a(n3);
@@ -772,7 +746,8 @@ const tableStyle = {
772
746
  fontSize: "12px"
773
747
  }
774
748
  };
775
- const Table = ({ data, columns, pagination }) => {
749
+ const Table = ({ data, columns, pageSize }) => {
750
+ const pagination = typeof pageSize === "number" ? { limit: pageSize } : pageSize;
776
751
  const wrapper3 = F(null);
777
752
  _(() => {
778
753
  if (wrapper3.current === null) {
@@ -945,7 +920,11 @@ const compareSubstitutionValues = (a2, b3) => {
945
920
  const formatProportion = (proportion) => {
946
921
  return `${(proportion * 100).toFixed(2)}%`;
947
922
  };
948
- const MutationComparisonTable = ({ data, proportionInterval }) => {
923
+ const MutationComparisonTable = ({
924
+ data,
925
+ proportionInterval,
926
+ pageSize
927
+ }) => {
949
928
  const headers = [
950
929
  {
951
930
  name: "Mutation",
@@ -966,7 +945,7 @@ const MutationComparisonTable = ({ data, proportionInterval }) => {
966
945
  }
967
946
  ];
968
947
  const tableData = getMutationComparisonTableData(data, proportionInterval).map((row) => Object.values(row));
969
- return /* @__PURE__ */ u$1(Table, { data: tableData, columns: headers, pagination: true });
948
+ return /* @__PURE__ */ u$1(Table, { data: tableData, columns: headers, pageSize });
970
949
  };
971
950
  const GsChart = ({ configuration }) => {
972
951
  const canvasRef = F(null);
@@ -1074,7 +1053,7 @@ const MutationComparisonVenn = ({
1074
1053
  [sets]
1075
1054
  );
1076
1055
  if (data.content.length > 5) {
1077
- return /* @__PURE__ */ u$1("div", { children: "Too many variants to display. Maximum are five. " });
1056
+ return /* @__PURE__ */ u$1("div", { children: "Too many datasets to display. Maximum are five. " });
1078
1057
  }
1079
1058
  return /* @__PURE__ */ u$1("div", { className: "h-full flex flex-col", children: [
1080
1059
  /* @__PURE__ */ u$1("div", { className: "flex-1", children: /* @__PURE__ */ u$1(GsChart, { configuration: config }) }),
@@ -1131,8 +1110,8 @@ class SortOperator {
1131
1110
  };
1132
1111
  }
1133
1112
  }
1134
- function querySubstitutionsOrDeletions(variant, sequenceType, lapis, signal) {
1135
- const fetchData = new FetchSubstitutionsOrDeletionsOperator(variant, sequenceType, 0);
1113
+ function querySubstitutionsOrDeletions(lapisFilter, sequenceType, lapis, signal) {
1114
+ const fetchData = new FetchSubstitutionsOrDeletionsOperator(lapisFilter, sequenceType, 0);
1136
1115
  const sortData = new SortOperator(fetchData, (a2, b3) => {
1137
1116
  if (a2.mutation.segment !== b3.mutation.segment) {
1138
1117
  return (a2.mutation.segment ?? "").localeCompare(b3.mutation.segment ?? "");
@@ -1141,12 +1120,12 @@ function querySubstitutionsOrDeletions(variant, sequenceType, lapis, signal) {
1141
1120
  });
1142
1121
  return sortData.evaluate(lapis, signal);
1143
1122
  }
1144
- async function queryMutationData(variants, sequenceType, lapis) {
1123
+ async function queryMutationData(lapisFilters, sequenceType, lapis) {
1145
1124
  const mutationData = await Promise.all(
1146
- variants.map(async (variant) => {
1125
+ lapisFilters.map(async (filter) => {
1147
1126
  return {
1148
- displayName: variant.displayName,
1149
- data: (await querySubstitutionsOrDeletions(variant.lapisFilter, sequenceType, lapis)).content
1127
+ displayName: filter.displayName,
1128
+ data: (await querySubstitutionsOrDeletions(filter.lapisFilter, sequenceType, lapis)).content
1150
1129
  };
1151
1130
  })
1152
1131
  );
@@ -1709,25 +1688,35 @@ function useQuery(fetchDataCallback, dependencies = []) {
1709
1688
  return { data, error, isLoading };
1710
1689
  }
1711
1690
  const MutationComparison = ({
1712
- variants,
1691
+ lapisFilters,
1713
1692
  sequenceType,
1714
1693
  views,
1715
1694
  width,
1716
1695
  height,
1717
- headline = "Mutation comparison"
1696
+ headline = "Mutation comparison",
1697
+ pageSize
1718
1698
  }) => {
1719
1699
  const size2 = { height, width };
1720
- return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationComparisonInner, { variants, sequenceType, views }) }) }) });
1700
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
1701
+ MutationComparisonInner,
1702
+ {
1703
+ lapisFilters,
1704
+ sequenceType,
1705
+ views,
1706
+ pageSize
1707
+ }
1708
+ ) }) }) });
1721
1709
  };
1722
1710
  const MutationComparisonInner = ({
1723
- variants,
1711
+ lapisFilters,
1724
1712
  sequenceType,
1725
- views
1713
+ views,
1714
+ pageSize
1726
1715
  }) => {
1727
1716
  const lapis = P(LapisUrlContext);
1728
1717
  const { data, error, isLoading } = useQuery(async () => {
1729
- return queryMutationData(variants, sequenceType, lapis);
1730
- }, [variants, sequenceType, lapis]);
1718
+ return queryMutationData(lapisFilters, sequenceType, lapis);
1719
+ }, [lapisFilters, sequenceType, lapis]);
1731
1720
  if (isLoading) {
1732
1721
  return /* @__PURE__ */ u$1(LoadingDisplay, {});
1733
1722
  }
@@ -1737,9 +1726,22 @@ const MutationComparisonInner = ({
1737
1726
  if (data === null) {
1738
1727
  return /* @__PURE__ */ u$1(NoDataDisplay, {});
1739
1728
  }
1740
- return /* @__PURE__ */ u$1(MutationComparisonTabs, { data: data.mutationData, sequenceType, views });
1729
+ return /* @__PURE__ */ u$1(
1730
+ MutationComparisonTabs,
1731
+ {
1732
+ data: data.mutationData,
1733
+ sequenceType,
1734
+ views,
1735
+ pageSize
1736
+ }
1737
+ );
1741
1738
  };
1742
- const MutationComparisonTabs = ({ data, views, sequenceType }) => {
1739
+ const MutationComparisonTabs = ({
1740
+ data,
1741
+ views,
1742
+ sequenceType,
1743
+ pageSize
1744
+ }) => {
1743
1745
  const [proportionInterval, setProportionInterval] = p({ min: 0.5, max: 1 });
1744
1746
  const [displayedMutationTypes, setDisplayedMutationTypes] = p([
1745
1747
  { label: "Substitutions", checked: true, type: "substitution" },
@@ -1759,7 +1761,8 @@ const MutationComparisonTabs = ({ data, views, sequenceType }) => {
1759
1761
  MutationComparisonTable,
1760
1762
  {
1761
1763
  data: { content: filteredData },
1762
- proportionInterval
1764
+ proportionInterval,
1765
+ pageSize
1763
1766
  }
1764
1767
  )
1765
1768
  };
@@ -2928,8 +2931,8 @@ html {
2928
2931
  appearance: none;
2929
2932
  height: 3rem;
2930
2933
  min-height: 3rem;
2931
- padding-left: 1rem;
2932
- padding-right: 2.5rem;
2934
+ padding-inline-start: 1rem;
2935
+ padding-inline-end: 2.5rem;
2933
2936
  font-size: 0.875rem;
2934
2937
  line-height: 1.25rem;
2935
2938
  line-height: 2;
@@ -2971,7 +2974,9 @@ html {
2971
2974
  display: grid;
2972
2975
  align-items: flex-end;
2973
2976
  }
2974
- .tabs-lifted:has(.tab-content[class^="rounded-"]) .tab:first-child:not(:is(.tab-active, [aria-selected="true"])), .tabs-lifted:has(.tab-content[class*=" rounded-"]) .tab:first-child:not(:is(.tab-active, [aria-selected="true"])) {
2977
+ .tabs-lifted:has(.tab-content[class^="rounded-"])
2978
+ .tab:first-child:not(:is(.tab-active, [aria-selected="true"])), .tabs-lifted:has(.tab-content[class*=" rounded-"])
2979
+ .tab:first-child:not(:is(.tab-active, [aria-selected="true"])) {
2975
2980
  border-bottom-color: transparent;
2976
2981
  }
2977
2982
  .tab {
@@ -3809,7 +3814,7 @@ input.tab:checked + .tab-content,
3809
3814
  .tabs-boxed .tab {
3810
3815
  border-radius: var(--rounded-btn, 0.5rem);
3811
3816
  }
3812
- :is([dir="rtl"] .table) {
3817
+ .table:where([dir="rtl"], [dir="rtl"] *) {
3813
3818
  text-align: right;
3814
3819
  }
3815
3820
  .table :where(th, td) {
@@ -3825,7 +3830,7 @@ input.tab:checked + .tab-content,
3825
3830
  --tw-bg-opacity: 1;
3826
3831
  background-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));
3827
3832
  }
3828
- .table :where(thead tr, tbody tr:not(:last-child),tbody tr:first-child:last-child) {
3833
+ .table :where(thead tr, tbody tr:not(:last-child), tbody tr:first-child:last-child) {
3829
3834
  border-bottom-width: 1px;
3830
3835
  --tw-border-opacity: 1;
3831
3836
  border-bottom-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));
@@ -4109,7 +4114,7 @@ input.tab:checked + .tab-content,
4109
4114
  content: "";
4110
4115
  margin-inline-start: -100%;
4111
4116
  }
4112
- :is([dir="rtl"] .steps-horizontal .step):before {
4117
+ .steps-horizontal .step:where([dir="rtl"], [dir="rtl"] *):before {
4113
4118
  --tw-translate-x: 0px;
4114
4119
  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));
4115
4120
  }
@@ -4128,7 +4133,7 @@ input.tab:checked + .tab-content,
4128
4133
  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));
4129
4134
  margin-inline-start: 50%;
4130
4135
  }
4131
- :is([dir="rtl"] .steps-vertical .step):before {
4136
+ .steps-vertical .step:where([dir="rtl"], [dir="rtl"] *):before {
4132
4137
  --tw-translate-x: 50%;
4133
4138
  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));
4134
4139
  }
@@ -4162,6 +4167,7 @@ input.tab:checked + .tab-content,
4162
4167
  }
4163
4168
  .tooltip:before {
4164
4169
  max-width: 20rem;
4170
+ white-space: normal;
4165
4171
  border-radius: 0.25rem;
4166
4172
  padding-left: 0.5rem;
4167
4173
  padding-right: 0.5rem;
@@ -4254,6 +4260,10 @@ input.tab:checked + .tab-content,
4254
4260
  margin-left: 0.25rem;
4255
4261
  margin-right: 0.25rem;
4256
4262
  }
4263
+ .mx-auto {
4264
+ margin-left: auto;
4265
+ margin-right: auto;
4266
+ }
4257
4267
  .my-1 {
4258
4268
  margin-top: 0.25rem;
4259
4269
  margin-bottom: 0.25rem;
@@ -4265,6 +4275,15 @@ input.tab:checked + .tab-content,
4265
4275
  .mb-2 {
4266
4276
  margin-bottom: 0.5rem;
4267
4277
  }
4278
+ .ml-2 {
4279
+ margin-left: 0.5rem;
4280
+ }
4281
+ .ml-2\\.5 {
4282
+ margin-left: 0.625rem;
4283
+ }
4284
+ .ml-3 {
4285
+ margin-left: 0.75rem;
4286
+ }
4268
4287
  .mr-2 {
4269
4288
  margin-right: 0.5rem;
4270
4289
  }
@@ -4338,6 +4357,9 @@ input.tab:checked + .tab-content,
4338
4357
  .flex-wrap {
4339
4358
  flex-wrap: wrap;
4340
4359
  }
4360
+ .items-end {
4361
+ align-items: flex-end;
4362
+ }
4341
4363
  .items-center {
4342
4364
  align-items: center;
4343
4365
  }
@@ -4467,6 +4489,10 @@ input.tab:checked + .tab-content,
4467
4489
  .text-justify {
4468
4490
  text-align: justify;
4469
4491
  }
4492
+ .text-2xl {
4493
+ font-size: 1.5rem;
4494
+ line-height: 2rem;
4495
+ }
4470
4496
  .text-base {
4471
4497
  font-size: 1rem;
4472
4498
  line-height: 1.5rem;
@@ -4496,6 +4522,10 @@ input.tab:checked + .tab-content,
4496
4522
  .leading-5 {
4497
4523
  line-height: 1.25rem;
4498
4524
  }
4525
+ .text-\\[\\#606060\\] {
4526
+ --tw-text-opacity: 1;
4527
+ color: rgb(96 96 96 / var(--tw-text-opacity));
4528
+ }
4499
4529
  .text-blue-600 {
4500
4530
  --tw-text-opacity: 1;
4501
4531
  color: rgb(37 99 235 / var(--tw-text-opacity));
@@ -4579,8 +4609,7 @@ var __decorateClass$9 = (decorators, target, key, kind) => {
4579
4609
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
4580
4610
  if (decorator = decorators[i2])
4581
4611
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4582
- if (kind && result)
4583
- __defProp$9(target, key, result);
4612
+ if (kind && result) __defProp$9(target, key, result);
4584
4613
  return result;
4585
4614
  };
4586
4615
  const tailwindElementCss = unsafeCSS(tailwindStyle);
@@ -4620,37 +4649,38 @@ var __decorateClass$8 = (decorators, target, key, kind) => {
4620
4649
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
4621
4650
  if (decorator = decorators[i2])
4622
4651
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4623
- if (kind && result)
4624
- __defProp$8(target, key, result);
4652
+ if (kind && result) __defProp$8(target, key, result);
4625
4653
  return result;
4626
4654
  };
4627
4655
  let MutationComparisonComponent = class extends PreactLitAdapterWithGridJsStyles {
4628
4656
  constructor() {
4629
4657
  super(...arguments);
4630
- this.variants = [];
4658
+ this.lapisFilters = [];
4631
4659
  this.sequenceType = "nucleotide";
4632
4660
  this.views = ["table"];
4633
4661
  this.width = "100%";
4634
4662
  this.height = "700px";
4635
4663
  this.headline = "Mutation comparison";
4664
+ this.pageSize = false;
4636
4665
  }
4637
4666
  render() {
4638
4667
  return /* @__PURE__ */ u$1(
4639
4668
  MutationComparison,
4640
4669
  {
4641
- variants: this.variants,
4670
+ lapisFilters: this.lapisFilters,
4642
4671
  sequenceType: this.sequenceType,
4643
4672
  views: this.views,
4644
4673
  width: this.width,
4645
4674
  height: this.height,
4646
- headline: this.headline
4675
+ headline: this.headline,
4676
+ pageSize: this.pageSize
4647
4677
  }
4648
4678
  );
4649
4679
  }
4650
4680
  };
4651
4681
  __decorateClass$8([
4652
4682
  n2({ type: Array })
4653
- ], MutationComparisonComponent.prototype, "variants", 2);
4683
+ ], MutationComparisonComponent.prototype, "lapisFilters", 2);
4654
4684
  __decorateClass$8([
4655
4685
  n2({ type: String })
4656
4686
  ], MutationComparisonComponent.prototype, "sequenceType", 2);
@@ -4666,6 +4696,9 @@ __decorateClass$8([
4666
4696
  __decorateClass$8([
4667
4697
  n2({ type: String })
4668
4698
  ], MutationComparisonComponent.prototype, "headline", 2);
4699
+ __decorateClass$8([
4700
+ n2({ type: Object })
4701
+ ], MutationComparisonComponent.prototype, "pageSize", 2);
4669
4702
  MutationComparisonComponent = __decorateClass$8([
4670
4703
  t$2("gs-mutation-comparison")
4671
4704
  ], MutationComparisonComponent);
@@ -4758,7 +4791,12 @@ const byProportion = (row, proportionInterval) => {
4758
4791
  return !cell.isReference && cell.proportion >= proportionInterval.min && cell.proportion <= proportionInterval.max;
4759
4792
  });
4760
4793
  };
4761
- const MutationsGrid = ({ data, sequenceType, proportionInterval }) => {
4794
+ const MutationsGrid = ({
4795
+ data,
4796
+ sequenceType,
4797
+ proportionInterval,
4798
+ pageSize
4799
+ }) => {
4762
4800
  const getHeaders = () => {
4763
4801
  return [
4764
4802
  {
@@ -4811,7 +4849,7 @@ const MutationsGrid = ({ data, sequenceType, proportionInterval }) => {
4811
4849
  return {};
4812
4850
  };
4813
4851
  const tableData = getMutationsGridData(data, sequenceType, proportionInterval).map((row) => Object.values(row));
4814
- return /* @__PURE__ */ u$1(Table, { data: tableData, columns: getHeaders(), pagination: true });
4852
+ return /* @__PURE__ */ u$1(Table, { data: tableData, columns: getHeaders(), pageSize });
4815
4853
  };
4816
4854
  const sortInsertions = (a2, b3) => {
4817
4855
  if (a2.segment !== b3.segment) {
@@ -4822,7 +4860,7 @@ const sortInsertions = (a2, b3) => {
4822
4860
  }
4823
4861
  return a2.insertedSymbols.localeCompare(b3.insertedSymbols);
4824
4862
  };
4825
- const InsertionsTable = ({ data }) => {
4863
+ const InsertionsTable = ({ data, pageSize }) => {
4826
4864
  const getHeaders = () => {
4827
4865
  return [
4828
4866
  {
@@ -4841,9 +4879,9 @@ const InsertionsTable = ({ data }) => {
4841
4879
  ];
4842
4880
  };
4843
4881
  const tableData = getInsertionsTableData(data).map((row) => Object.values(row));
4844
- return /* @__PURE__ */ u$1(Table, { data: tableData, columns: getHeaders(), pagination: true });
4882
+ return /* @__PURE__ */ u$1(Table, { data: tableData, columns: getHeaders(), pageSize });
4845
4883
  };
4846
- const MutationsTable = ({ data, proportionInterval }) => {
4884
+ const MutationsTable = ({ data, proportionInterval, pageSize }) => {
4847
4885
  const getHeaders = () => {
4848
4886
  return [
4849
4887
  {
@@ -4871,7 +4909,7 @@ const MutationsTable = ({ data, proportionInterval }) => {
4871
4909
  ];
4872
4910
  };
4873
4911
  const tableData = getMutationsTableData(data, proportionInterval).map((row) => Object.values(row));
4874
- return /* @__PURE__ */ u$1(Table, { data: tableData, columns: getHeaders(), pagination: true });
4912
+ return /* @__PURE__ */ u$1(Table, { data: tableData, columns: getHeaders(), pageSize });
4875
4913
  };
4876
4914
  class FetchInsertionsOperator {
4877
4915
  constructor(filter, sequenceType) {
@@ -4888,8 +4926,8 @@ class FetchInsertionsOperator {
4888
4926
  return { content };
4889
4927
  }
4890
4928
  }
4891
- function queryInsertions(variant, sequenceType, lapis, signal) {
4892
- const fetchData = new FetchInsertionsOperator(variant, sequenceType);
4929
+ function queryInsertions(lapisFilter, sequenceType, lapis, signal) {
4930
+ const fetchData = new FetchInsertionsOperator(lapisFilter, sequenceType);
4893
4931
  const sortData = new SortOperator(fetchData, (a2, b3) => {
4894
4932
  if (a2.mutation.segment !== b3.mutation.segment) {
4895
4933
  return (a2.mutation.segment ?? "").localeCompare(b3.mutation.segment ?? "");
@@ -4898,9 +4936,9 @@ function queryInsertions(variant, sequenceType, lapis, signal) {
4898
4936
  });
4899
4937
  return sortData.evaluate(lapis, signal);
4900
4938
  }
4901
- async function queryMutationsData(variant, sequenceType, lapis) {
4902
- const substitutionsOrDeletions = (await querySubstitutionsOrDeletions(variant, sequenceType, lapis)).content;
4903
- const insertions = (await queryInsertions(variant, sequenceType, lapis)).content;
4939
+ async function queryMutationsData(lapisFilter, sequenceType, lapis) {
4940
+ const substitutionsOrDeletions = (await querySubstitutionsOrDeletions(lapisFilter, sequenceType, lapis)).content;
4941
+ const insertions = (await queryInsertions(lapisFilter, sequenceType, lapis)).content;
4904
4942
  return {
4905
4943
  substitutionsOrDeletions,
4906
4944
  insertions
@@ -4928,21 +4966,35 @@ function filterMutationsData(data, displayedSegments, displayedMutationTypes) {
4928
4966
  };
4929
4967
  }
4930
4968
  const Mutations = ({
4931
- variant,
4969
+ lapisFilter,
4932
4970
  sequenceType,
4933
4971
  views,
4934
4972
  width,
4935
4973
  height,
4936
- headline = "Mutations"
4974
+ headline = "Mutations",
4975
+ pageSize
4937
4976
  }) => {
4938
4977
  const size2 = { height, width };
4939
- return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationsInner, { variant, sequenceType, views }) }) }) });
4978
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
4979
+ MutationsInner,
4980
+ {
4981
+ lapisFilter,
4982
+ sequenceType,
4983
+ views,
4984
+ pageSize
4985
+ }
4986
+ ) }) }) });
4940
4987
  };
4941
- const MutationsInner = ({ variant, sequenceType, views }) => {
4988
+ const MutationsInner = ({
4989
+ lapisFilter,
4990
+ sequenceType,
4991
+ views,
4992
+ pageSize
4993
+ }) => {
4942
4994
  const lapis = P(LapisUrlContext);
4943
4995
  const { data, error, isLoading } = useQuery(async () => {
4944
- return queryMutationsData(variant, sequenceType, lapis);
4945
- }, [variant, sequenceType, lapis]);
4996
+ return queryMutationsData(lapisFilter, sequenceType, lapis);
4997
+ }, [lapisFilter, sequenceType, lapis]);
4946
4998
  if (isLoading) {
4947
4999
  return /* @__PURE__ */ u$1(LoadingDisplay, {});
4948
5000
  }
@@ -4952,9 +5004,9 @@ const MutationsInner = ({ variant, sequenceType, views }) => {
4952
5004
  if (data === null) {
4953
5005
  return /* @__PURE__ */ u$1(NoDataDisplay, {});
4954
5006
  }
4955
- return /* @__PURE__ */ u$1(MutationsTabs, { mutationsData: data, sequenceType, views });
5007
+ return /* @__PURE__ */ u$1(MutationsTabs, { mutationsData: data, sequenceType, views, pageSize });
4956
5008
  };
4957
- const MutationsTabs = ({ mutationsData, sequenceType, views }) => {
5009
+ const MutationsTabs = ({ mutationsData, sequenceType, views, pageSize }) => {
4958
5010
  const [proportionInterval, setProportionInterval] = p({ min: 0.05, max: 1 });
4959
5011
  const [displayedSegments, setDisplayedSegments] = useDisplayedSegments(sequenceType);
4960
5012
  const [displayedMutationTypes, setDisplayedMutationTypes] = p([
@@ -4967,7 +5019,14 @@ const MutationsTabs = ({ mutationsData, sequenceType, views }) => {
4967
5019
  case "table":
4968
5020
  return {
4969
5021
  title: "Table",
4970
- content: /* @__PURE__ */ u$1(MutationsTable, { data: filteredData.tableData, proportionInterval })
5022
+ content: /* @__PURE__ */ u$1(
5023
+ MutationsTable,
5024
+ {
5025
+ data: filteredData.tableData,
5026
+ proportionInterval,
5027
+ pageSize
5028
+ }
5029
+ )
4971
5030
  };
4972
5031
  case "grid":
4973
5032
  return {
@@ -4977,14 +5036,15 @@ const MutationsTabs = ({ mutationsData, sequenceType, views }) => {
4977
5036
  {
4978
5037
  data: filteredData.gridData,
4979
5038
  sequenceType,
4980
- proportionInterval
5039
+ proportionInterval,
5040
+ pageSize
4981
5041
  }
4982
5042
  )
4983
5043
  };
4984
5044
  case "insertions":
4985
5045
  return {
4986
5046
  title: "Insertions",
4987
- content: /* @__PURE__ */ u$1(InsertionsTable, { data: filteredData.insertions })
5047
+ content: /* @__PURE__ */ u$1(InsertionsTable, { data: filteredData.insertions, pageSize })
4988
5048
  };
4989
5049
  }
4990
5050
  };
@@ -5064,37 +5124,38 @@ var __decorateClass$7 = (decorators, target, key, kind) => {
5064
5124
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
5065
5125
  if (decorator = decorators[i2])
5066
5126
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5067
- if (kind && result)
5068
- __defProp$7(target, key, result);
5127
+ if (kind && result) __defProp$7(target, key, result);
5069
5128
  return result;
5070
5129
  };
5071
5130
  let MutationsComponent = class extends PreactLitAdapterWithGridJsStyles {
5072
5131
  constructor() {
5073
5132
  super(...arguments);
5074
- this.variant = {};
5133
+ this.lapisFilter = {};
5075
5134
  this.sequenceType = "nucleotide";
5076
5135
  this.views = ["table", "grid"];
5077
5136
  this.width = "100%";
5078
5137
  this.height = "700px";
5079
5138
  this.headline = "Mutations";
5139
+ this.pageSize = false;
5080
5140
  }
5081
5141
  render() {
5082
5142
  return /* @__PURE__ */ u$1(
5083
5143
  Mutations,
5084
5144
  {
5085
- variant: this.variant,
5145
+ lapisFilter: this.lapisFilter,
5086
5146
  sequenceType: this.sequenceType,
5087
5147
  views: this.views,
5088
5148
  width: this.width,
5089
5149
  height: this.height,
5090
- headline: this.headline
5150
+ headline: this.headline,
5151
+ pageSize: this.pageSize
5091
5152
  }
5092
5153
  );
5093
5154
  }
5094
5155
  };
5095
5156
  __decorateClass$7([
5096
5157
  n2({ type: Object })
5097
- ], MutationsComponent.prototype, "variant", 2);
5158
+ ], MutationsComponent.prototype, "lapisFilter", 2);
5098
5159
  __decorateClass$7([
5099
5160
  n2({ type: String })
5100
5161
  ], MutationsComponent.prototype, "sequenceType", 2);
@@ -5110,6 +5171,9 @@ __decorateClass$7([
5110
5171
  __decorateClass$7([
5111
5172
  n2({ type: String })
5112
5173
  ], MutationsComponent.prototype, "headline", 2);
5174
+ __decorateClass$7([
5175
+ n2({ type: Object })
5176
+ ], MutationsComponent.prototype, "pageSize", 2);
5113
5177
  MutationsComponent = __decorateClass$7([
5114
5178
  t$2("gs-mutations")
5115
5179
  ], MutationsComponent);
@@ -5189,7 +5253,23 @@ function wilson95PercentConfidenceInterval(observed, sample) {
5189
5253
  }
5190
5254
  const confidenceIntervalDataLabel = (value, lowerLimit, upperLimit, prefix) => {
5191
5255
  const label = prefix ? `${prefix}: ` : "";
5192
- return `${label}${value.toFixed(3)} (${lowerLimit.toFixed(3)} - ${upperLimit.toFixed(3)})`;
5256
+ return `${label}${value.toFixed(3)} (${lowerLimit == null ? void 0 : lowerLimit.toFixed(3)} - ${upperLimit == null ? void 0 : upperLimit.toFixed(3)})`;
5257
+ };
5258
+ const getYAxisMax = (maxInData2, axisMax) => {
5259
+ if (!axisMax) {
5260
+ return 1;
5261
+ }
5262
+ switch (axisMax) {
5263
+ case "limitTo1": {
5264
+ return maxInData2 > 1 ? 1 : maxInData2;
5265
+ }
5266
+ case "maxInData": {
5267
+ return maxInData2;
5268
+ }
5269
+ default: {
5270
+ return axisMax;
5271
+ }
5272
+ }
5193
5273
  };
5194
5274
  function getYAxisScale(scaleType) {
5195
5275
  switch (scaleType) {
@@ -5197,35 +5277,37 @@ function getYAxisScale(scaleType) {
5197
5277
  return { beginAtZero: true, type: "linear", min: 0, max: 1 };
5198
5278
  }
5199
5279
  case "logarithmic": {
5200
- return { type: "logarithmic" };
5280
+ return { type: "logarithmic", max: 1 };
5201
5281
  }
5202
5282
  case "logit":
5203
5283
  return { type: "logit" };
5204
- default:
5205
- return { beginAtZero: true, type: "linear" };
5206
5284
  }
5207
5285
  }
5208
5286
  Chart.register(...registerables, LogitScale, BarWithErrorBarsController, BarWithErrorBar);
5209
5287
  const PrevalenceOverTimeBarChart = ({
5210
5288
  data,
5211
5289
  yAxisScaleType,
5212
- confidenceIntervalMethod
5290
+ confidenceIntervalMethod,
5291
+ yAxisMaxConfig
5213
5292
  }) => {
5214
- var _a;
5293
+ const nullFirstData = data.map((variantData) => {
5294
+ return {
5295
+ content: variantData.content.sort(sortNullToBeginningThenByDate),
5296
+ displayName: variantData.displayName
5297
+ };
5298
+ });
5299
+ const datasets2 = nullFirstData.map((graphData, index) => getDataset$1(graphData, index, confidenceIntervalMethod));
5300
+ const maxY = yAxisScaleType !== "logit" ? getYAxisMax(maxInData(nullFirstData), yAxisMaxConfig == null ? void 0 : yAxisMaxConfig[yAxisScaleType]) : void 0;
5215
5301
  const config = {
5216
5302
  type: BarWithErrorBarsController.id,
5217
5303
  data: {
5218
- labels: ((_a = data[0]) == null ? void 0 : _a.content.map((dateRange) => {
5219
- var _a2;
5220
- return ((_a2 = dateRange.dateRange) == null ? void 0 : _a2.toString()) ?? "Unknown";
5221
- })) || [],
5222
- datasets: data.map((graphData, index) => datasets$1(graphData, index, confidenceIntervalMethod))
5304
+ datasets: datasets2
5223
5305
  },
5224
5306
  options: {
5225
5307
  maintainAspectRatio: false,
5226
5308
  animation: false,
5227
5309
  scales: {
5228
- y: getYAxisScale(yAxisScaleType)
5310
+ y: { ...getYAxisScale(yAxisScaleType), max: maxY }
5229
5311
  },
5230
5312
  plugins: {
5231
5313
  legend: {
@@ -5237,7 +5319,10 @@ const PrevalenceOverTimeBarChart = ({
5237
5319
  };
5238
5320
  return /* @__PURE__ */ u$1(GsChart, { configuration: config });
5239
5321
  };
5240
- const datasets$1 = (prevalenceOverTimeVariant, index, confidenceIntervalMethod) => {
5322
+ function sortNullToBeginningThenByDate(a2, b3) {
5323
+ return a2.dateRange === null ? -1 : b3.dateRange === null ? 1 : a2.dateRange.toString().localeCompare(b3.dateRange.toString());
5324
+ }
5325
+ const getDataset$1 = (prevalenceOverTimeVariant, index, confidenceIntervalMethod) => {
5241
5326
  const generalConfig = {
5242
5327
  borderWidth: 1,
5243
5328
  pointRadius: 0,
@@ -5249,16 +5334,22 @@ const datasets$1 = (prevalenceOverTimeVariant, index, confidenceIntervalMethod)
5249
5334
  case "wilson":
5250
5335
  return {
5251
5336
  ...generalConfig,
5252
- data: prevalenceOverTimeVariant.content.map((dataPoint) => ({
5253
- y: dataPoint.prevalence,
5254
- yMin: wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).lowerLimit,
5255
- yMax: wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).upperLimit
5256
- }))
5337
+ data: prevalenceOverTimeVariant.content.map((dataPoint) => {
5338
+ var _a;
5339
+ return {
5340
+ y: dataPoint.prevalence,
5341
+ yMin: wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).lowerLimit,
5342
+ yMax: wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).upperLimit,
5343
+ x: ((_a = dataPoint.dateRange) == null ? void 0 : _a.toString()) ?? "Unknown"
5344
+ };
5345
+ })
5257
5346
  };
5258
5347
  default:
5259
5348
  return {
5260
5349
  ...generalConfig,
5261
- data: prevalenceOverTimeVariant.content.map((dataPoint) => dataPoint.prevalence)
5350
+ data: prevalenceOverTimeVariant.content.map((dataPoint) => {
5351
+ return { y: dataPoint.prevalence, x: dataPoint.dateRange };
5352
+ })
5262
5353
  };
5263
5354
  }
5264
5355
  };
@@ -5317,8 +5408,7 @@ const en = {
5317
5408
  };
5318
5409
  var padStart = function padStart2(string, length, pad) {
5319
5410
  var s2 = String(string);
5320
- if (!s2 || s2.length >= length)
5321
- return string;
5411
+ if (!s2 || s2.length >= length) return string;
5322
5412
  return "" + Array(length + 1 - s2.length).join(pad) + string;
5323
5413
  };
5324
5414
  var padZoneStr = function padZoneStr2(instance) {
@@ -5329,8 +5419,7 @@ var padZoneStr = function padZoneStr2(instance) {
5329
5419
  return (negMinutes <= 0 ? "+" : "-") + padStart(hourOffset, 2, "0") + ":" + padStart(minuteOffset, 2, "0");
5330
5420
  };
5331
5421
  var monthDiff = function monthDiff2(a2, b3) {
5332
- if (a2.date() < b3.date())
5333
- return -monthDiff2(b3, a2);
5422
+ if (a2.date() < b3.date()) return -monthDiff2(b3, a2);
5334
5423
  var wholeMonthDiff = (b3.year() - a2.year()) * 12 + (b3.month() - a2.month());
5335
5424
  var anchor = a2.clone().add(wholeMonthDiff, M);
5336
5425
  var c2 = b3 - anchor < 0;
@@ -5375,8 +5464,7 @@ var isDayjs = function isDayjs2(d2) {
5375
5464
  };
5376
5465
  var parseLocale = function parseLocale2(preset, object, isLocal) {
5377
5466
  var l2;
5378
- if (!preset)
5379
- return L;
5467
+ if (!preset) return L;
5380
5468
  if (typeof preset === "string") {
5381
5469
  var presetLower = preset.toLowerCase();
5382
5470
  if (Ls[presetLower]) {
@@ -5395,8 +5483,7 @@ var parseLocale = function parseLocale2(preset, object, isLocal) {
5395
5483
  Ls[name] = preset;
5396
5484
  l2 = name;
5397
5485
  }
5398
- if (!isLocal && l2)
5399
- L = l2;
5486
+ if (!isLocal && l2) L = l2;
5400
5487
  return l2 || !isLocal && L;
5401
5488
  };
5402
5489
  var dayjs = function dayjs2(date, c2) {
@@ -5423,12 +5510,9 @@ Utils.i = isDayjs;
5423
5510
  Utils.w = wrapper;
5424
5511
  var parseDate = function parseDate2(cfg) {
5425
5512
  var date = cfg.date, utc = cfg.utc;
5426
- if (date === null)
5427
- return /* @__PURE__ */ new Date(NaN);
5428
- if (Utils.u(date))
5429
- return /* @__PURE__ */ new Date();
5430
- if (date instanceof Date)
5431
- return new Date(date);
5513
+ if (date === null) return /* @__PURE__ */ new Date(NaN);
5514
+ if (Utils.u(date)) return /* @__PURE__ */ new Date();
5515
+ if (date instanceof Date) return new Date(date);
5432
5516
  if (typeof date === "string" && !/Z$/i.test(date)) {
5433
5517
  var d2 = date.match(REGEX_PARSE);
5434
5518
  if (d2) {
@@ -5482,8 +5566,7 @@ var Dayjs = /* @__PURE__ */ function() {
5482
5566
  return this.endOf(units) < dayjs(that);
5483
5567
  };
5484
5568
  _proto.$g = function $g(input, get, set) {
5485
- if (Utils.u(input))
5486
- return this[get];
5569
+ if (Utils.u(input)) return this[get];
5487
5570
  return this.set(set, input);
5488
5571
  };
5489
5572
  _proto.unix = function unix() {
@@ -5548,8 +5631,7 @@ var Dayjs = /* @__PURE__ */ function() {
5548
5631
  date.$d[name](arg);
5549
5632
  date.init();
5550
5633
  this.$d = date.set(DATE, Math.min(this.$D, date.daysInMonth())).$d;
5551
- } else if (name)
5552
- this.$d[name](arg);
5634
+ } else if (name) this.$d[name](arg);
5553
5635
  this.init();
5554
5636
  return this;
5555
5637
  };
@@ -5589,8 +5671,7 @@ var Dayjs = /* @__PURE__ */ function() {
5589
5671
  _proto.format = function format(formatStr) {
5590
5672
  var _this3 = this;
5591
5673
  var locale = this.$locale();
5592
- if (!this.isValid())
5593
- return locale.invalidDate || INVALID_DATE_STRING;
5674
+ if (!this.isValid()) return locale.invalidDate || INVALID_DATE_STRING;
5594
5675
  var str = formatStr || FORMAT_DEFAULT;
5595
5676
  var zoneStr = Utils.z(this);
5596
5677
  var $H = this.$H, $m = this.$m, $M = this.$M;
@@ -5713,12 +5794,10 @@ var Dayjs = /* @__PURE__ */ function() {
5713
5794
  return Ls[this.$L];
5714
5795
  };
5715
5796
  _proto.locale = function locale(preset, object) {
5716
- if (!preset)
5717
- return this.$L;
5797
+ if (!preset) return this.$L;
5718
5798
  var that = this.clone();
5719
5799
  var nextLocaleName = parseLocale(preset, object, true);
5720
- if (nextLocaleName)
5721
- that.$L = nextLocaleName;
5800
+ if (nextLocaleName) that.$L = nextLocaleName;
5722
5801
  return that;
5723
5802
  };
5724
5803
  _proto.clone = function clone() {
@@ -6151,17 +6230,28 @@ function getMinMaxNumber(values) {
6151
6230
  return [min, max];
6152
6231
  }
6153
6232
  Chart.register(...registerables, LogitScale);
6154
- const PrevalenceOverTimeBubbleChart = ({ data, yAxisScaleType }) => {
6155
- const firstDate = data[0].content[0].dateRange;
6156
- const total = data.map((graphData) => graphData.content.map((dataPoint) => dataPoint.total)).flat();
6233
+ const PrevalenceOverTimeBubbleChart = ({
6234
+ data,
6235
+ yAxisScaleType,
6236
+ yAxisMaxConfig
6237
+ }) => {
6238
+ const nonNullDateRangeData = data.map((variantData) => {
6239
+ return {
6240
+ content: variantData.content.filter((dataPoint) => dataPoint.dateRange !== null),
6241
+ displayName: variantData.displayName
6242
+ };
6243
+ });
6244
+ const firstDate = nonNullDateRangeData[0].content[0].dateRange;
6245
+ const total = nonNullDateRangeData.map((graphData) => graphData.content.map((dataPoint) => dataPoint.total)).flat();
6157
6246
  const [minTotal, maxTotal] = getMinMaxNumber(total);
6158
6247
  const scaleBubble = (value) => {
6159
6248
  return (value - minTotal) / (maxTotal - minTotal) * 4.5 + 0.5;
6160
6249
  };
6250
+ const maxY = yAxisScaleType !== "logit" ? getYAxisMax(maxInData(nonNullDateRangeData), yAxisMaxConfig == null ? void 0 : yAxisMaxConfig[yAxisScaleType]) : void 0;
6161
6251
  const config = {
6162
6252
  type: "bubble",
6163
6253
  data: {
6164
- datasets: data.map((graphData, index) => ({
6254
+ datasets: nonNullDateRangeData.map((graphData, index) => ({
6165
6255
  label: graphData.displayName,
6166
6256
  data: graphData.content.filter((dataPoint) => dataPoint.dateRange !== null).map((dataPoint) => ({
6167
6257
  x: minusTemporal(dataPoint.dateRange, firstDate),
@@ -6183,7 +6273,7 @@ const PrevalenceOverTimeBubbleChart = ({ data, yAxisScaleType }) => {
6183
6273
  callback: (value) => addUnit(firstDate, value).toString()
6184
6274
  }
6185
6275
  },
6186
- y: getYAxisScale(yAxisScaleType)
6276
+ y: { ...getYAxisScale(yAxisScaleType), max: maxY }
6187
6277
  },
6188
6278
  plugins: {
6189
6279
  legend: {
@@ -6195,12 +6285,12 @@ const PrevalenceOverTimeBubbleChart = ({ data, yAxisScaleType }) => {
6195
6285
  callbacks: {
6196
6286
  title: (context) => {
6197
6287
  var _a;
6198
- const dataset = data[context[0].datasetIndex];
6288
+ const dataset = nonNullDateRangeData[context[0].datasetIndex];
6199
6289
  const dataPoint = dataset.content[context[0].dataIndex];
6200
6290
  return (_a = dataPoint.dateRange) == null ? void 0 : _a.toString();
6201
6291
  },
6202
6292
  label: (context) => {
6203
- const dataset = data[context.datasetIndex];
6293
+ const dataset = nonNullDateRangeData[context.datasetIndex];
6204
6294
  const dataPoint = dataset.content[context.dataIndex];
6205
6295
  const percentage = (dataPoint.prevalence * 100).toFixed(2);
6206
6296
  const count = dataPoint.count.toFixed(0);
@@ -6218,25 +6308,27 @@ Chart.register(...registerables, LogitScale);
6218
6308
  const PrevalenceOverTimeLineChart = ({
6219
6309
  data,
6220
6310
  yAxisScaleType,
6221
- confidenceIntervalMethod
6311
+ confidenceIntervalMethod,
6312
+ yAxisMaxConfig
6222
6313
  }) => {
6223
- var _a;
6224
- const datasets2 = data.map((graphData, index) => getDataset(graphData, index, confidenceIntervalMethod)).flat();
6225
- const labels = ((_a = data[0]) == null ? void 0 : _a.content.map((dateRange) => {
6226
- var _a2;
6227
- return ((_a2 = dateRange.dateRange) == null ? void 0 : _a2.toString()) ?? "Unknown";
6228
- })) || [];
6314
+ const nonNullDateRangeData = data.map((variantData) => {
6315
+ return {
6316
+ content: variantData.content.filter((dataPoint) => dataPoint.dateRange !== null),
6317
+ displayName: variantData.displayName
6318
+ };
6319
+ });
6320
+ const datasets2 = nonNullDateRangeData.map((graphData, index) => getDataset(graphData, index, confidenceIntervalMethod)).flat();
6321
+ const maxY = yAxisScaleType !== "logit" ? getYAxisMax(maxInData(nonNullDateRangeData), yAxisMaxConfig == null ? void 0 : yAxisMaxConfig[yAxisScaleType]) : void 0;
6229
6322
  const config = {
6230
6323
  type: "line",
6231
6324
  data: {
6232
- labels,
6233
6325
  datasets: datasets2
6234
6326
  },
6235
6327
  options: {
6236
6328
  animation: false,
6237
6329
  maintainAspectRatio: false,
6238
6330
  scales: {
6239
- y: getYAxisScale(yAxisScaleType)
6331
+ y: { ...getYAxisScale(yAxisScaleType), max: maxY }
6240
6332
  },
6241
6333
  plugins: {
6242
6334
  legend: {
@@ -6262,9 +6354,13 @@ const getDataset = (prevalenceOverTimeVariant, dataIndex, confidenceIntervalMeth
6262
6354
  };
6263
6355
  const getDatasetCIUpper = (prevalenceOverTimeVariant, dataIndex) => ({
6264
6356
  label: `${prevalenceOverTimeVariant.displayName} CI upper`,
6265
- data: prevalenceOverTimeVariant.content.map(
6266
- (dataPoint) => wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).upperLimit
6267
- ),
6357
+ data: prevalenceOverTimeVariant.content.map((dataPoint) => {
6358
+ var _a;
6359
+ return {
6360
+ y: wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).upperLimit,
6361
+ x: (_a = dataPoint.dateRange) == null ? void 0 : _a.toString()
6362
+ };
6363
+ }),
6268
6364
  borderWidth: 0,
6269
6365
  pointRadius: 0,
6270
6366
  fill: "+1",
@@ -6272,9 +6368,13 @@ const getDatasetCIUpper = (prevalenceOverTimeVariant, dataIndex) => ({
6272
6368
  });
6273
6369
  const getDatasetCILower = (prevalenceOverTimeVariant, dataIndex) => ({
6274
6370
  label: `${prevalenceOverTimeVariant.displayName} CI lower`,
6275
- data: prevalenceOverTimeVariant.content.map(
6276
- (dataPoint) => wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).lowerLimit
6277
- ),
6371
+ data: prevalenceOverTimeVariant.content.map((dataPoint) => {
6372
+ var _a;
6373
+ return {
6374
+ y: wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).lowerLimit,
6375
+ x: (_a = dataPoint.dateRange) == null ? void 0 : _a.toString()
6376
+ };
6377
+ }),
6278
6378
  borderWidth: 0,
6279
6379
  pointRadius: 0,
6280
6380
  fill: "-1",
@@ -6282,7 +6382,16 @@ const getDatasetCILower = (prevalenceOverTimeVariant, dataIndex) => ({
6282
6382
  });
6283
6383
  const getDatasetLine = (prevalenceOverTimeVariant, dataIndex) => ({
6284
6384
  label: prevalenceOverTimeVariant.displayName,
6285
- data: prevalenceOverTimeVariant.content.map((dataPoint) => dataPoint.prevalence),
6385
+ data: prevalenceOverTimeVariant.content.map((dataPoint) => {
6386
+ var _a;
6387
+ const ciLimits = wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total);
6388
+ return {
6389
+ y: dataPoint.prevalence,
6390
+ x: (_a = dataPoint.dateRange) == null ? void 0 : _a.toString(),
6391
+ yCiUpper: ciLimits.upperLimit,
6392
+ yCiLower: ciLimits.lowerLimit
6393
+ };
6394
+ }),
6286
6395
  borderWidth: 1,
6287
6396
  pointRadius: 0,
6288
6397
  borderColor: singleGraphColorRGBAById(dataIndex),
@@ -6298,20 +6407,17 @@ const tooltip$1 = (confidenceIntervalMethod) => {
6298
6407
  return {
6299
6408
  ...generalConfig,
6300
6409
  filter: ({ datasetIndex }) => {
6301
- return datasetIndex % 3 === 1;
6410
+ return isNotCiIndex(datasetIndex);
6302
6411
  },
6303
6412
  callbacks: {
6304
6413
  label: (context) => {
6305
- if (context.datasetIndex % 3 === 1) {
6306
- const value = context.dataset.data[context.dataIndex];
6307
- const ciLower = context.dataset.data[context.dataIndex - 1];
6308
- const ciUpper = context.dataset.data[context.dataIndex + 1];
6309
- if (typeof value !== "number" || typeof ciLower !== "number" || typeof ciUpper !== "number") {
6310
- return "";
6311
- }
6312
- return confidenceIntervalDataLabel(value, ciLower, ciUpper, context.dataset.label);
6313
- }
6314
- return context.dataset.label;
6414
+ const dataPoint = context.dataset.data[context.dataIndex];
6415
+ return confidenceIntervalDataLabel(
6416
+ dataPoint.y,
6417
+ dataPoint.yCiLower,
6418
+ dataPoint.yCiUpper,
6419
+ context.dataset.label
6420
+ );
6315
6421
  }
6316
6422
  }
6317
6423
  };
@@ -6319,7 +6425,10 @@ const tooltip$1 = (confidenceIntervalMethod) => {
6319
6425
  return generalConfig;
6320
6426
  }
6321
6427
  };
6322
- const PrevalenceOverTimeTable = ({ data, granularity }) => {
6428
+ function isNotCiIndex(datasetIndex) {
6429
+ return datasetIndex % 3 === 1;
6430
+ }
6431
+ const PrevalenceOverTimeTable = ({ data, granularity, pageSize }) => {
6323
6432
  const getSplitColumns = (data2) => {
6324
6433
  return data2.map((dataset) => ({
6325
6434
  name: dataset.displayName,
@@ -6347,7 +6456,7 @@ const PrevalenceOverTimeTable = ({ data, granularity }) => {
6347
6456
  const dataByHeader = getPrevalenceOverTimeTableData(data2, granularity2);
6348
6457
  return Object.values(dataByHeader).map((row) => Object.values(row));
6349
6458
  };
6350
- return /* @__PURE__ */ u$1(Table, { data: getData(data, granularity), columns: getColumns(data), pagination: false });
6459
+ return /* @__PURE__ */ u$1(Table, { data: getData(data, granularity), columns: getColumns(data), pageSize });
6351
6460
  };
6352
6461
  class DivisionOperator {
6353
6462
  constructor(numerator, denominator, keyField, valueField, resultField, numeratorField, denominatorField) {
@@ -6654,8 +6763,8 @@ const ScalingSelector = ({
6654
6763
  );
6655
6764
  };
6656
6765
  const PrevalenceOverTime = ({
6657
- numerator,
6658
- denominator,
6766
+ numeratorFilter,
6767
+ denominatorFilter,
6659
6768
  granularity,
6660
6769
  smoothingWindow,
6661
6770
  views,
@@ -6663,35 +6772,48 @@ const PrevalenceOverTime = ({
6663
6772
  width,
6664
6773
  height,
6665
6774
  headline = "Prevalence over time",
6666
- lapisDateField
6775
+ lapisDateField,
6776
+ pageSize,
6777
+ yAxisMaxConfig
6667
6778
  }) => {
6668
6779
  const size2 = { height, width };
6669
6780
  return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
6670
6781
  PrevalenceOverTimeInner,
6671
6782
  {
6672
- numerator,
6673
- denominator,
6783
+ numeratorFilter,
6784
+ denominatorFilter,
6674
6785
  granularity,
6675
6786
  smoothingWindow,
6676
6787
  views,
6677
6788
  confidenceIntervalMethods,
6678
- lapisDateField
6789
+ lapisDateField,
6790
+ pageSize,
6791
+ yAxisMaxConfig
6679
6792
  }
6680
6793
  ) }) }) });
6681
6794
  };
6682
6795
  const PrevalenceOverTimeInner = ({
6683
- numerator,
6684
- denominator,
6796
+ numeratorFilter,
6797
+ denominatorFilter,
6685
6798
  granularity,
6686
6799
  smoothingWindow,
6687
6800
  views,
6688
6801
  confidenceIntervalMethods,
6689
- lapisDateField
6802
+ lapisDateField,
6803
+ pageSize,
6804
+ yAxisMaxConfig
6690
6805
  }) => {
6691
6806
  const lapis = P(LapisUrlContext);
6692
6807
  const { data, error, isLoading } = useQuery(
6693
- () => queryPrevalenceOverTime(numerator, denominator, granularity, smoothingWindow, lapis, lapisDateField),
6694
- [lapis, numerator, denominator, granularity, smoothingWindow]
6808
+ () => queryPrevalenceOverTime(
6809
+ numeratorFilter,
6810
+ denominatorFilter,
6811
+ granularity,
6812
+ smoothingWindow,
6813
+ lapis,
6814
+ lapisDateField
6815
+ ),
6816
+ [lapis, numeratorFilter, denominatorFilter, granularity, smoothingWindow]
6695
6817
  );
6696
6818
  if (isLoading) {
6697
6819
  return /* @__PURE__ */ u$1(LoadingDisplay, {});
@@ -6708,7 +6830,9 @@ const PrevalenceOverTimeInner = ({
6708
6830
  views,
6709
6831
  data,
6710
6832
  granularity,
6711
- confidenceIntervalMethods
6833
+ confidenceIntervalMethods,
6834
+ pageSize,
6835
+ yAxisMaxConfig
6712
6836
  }
6713
6837
  );
6714
6838
  };
@@ -6716,7 +6840,9 @@ const PrevalenceOverTimeTabs = ({
6716
6840
  views,
6717
6841
  data,
6718
6842
  granularity,
6719
- confidenceIntervalMethods
6843
+ confidenceIntervalMethods,
6844
+ pageSize,
6845
+ yAxisMaxConfig
6720
6846
  }) => {
6721
6847
  const [yAxisScaleType, setYAxisScaleType] = p("linear");
6722
6848
  const [confidenceIntervalMethod, setConfidenceIntervalMethod] = p(
@@ -6732,7 +6858,8 @@ const PrevalenceOverTimeTabs = ({
6732
6858
  {
6733
6859
  data,
6734
6860
  yAxisScaleType,
6735
- confidenceIntervalMethod
6861
+ confidenceIntervalMethod,
6862
+ yAxisMaxConfig
6736
6863
  }
6737
6864
  )
6738
6865
  };
@@ -6744,19 +6871,27 @@ const PrevalenceOverTimeTabs = ({
6744
6871
  {
6745
6872
  data,
6746
6873
  yAxisScaleType,
6747
- confidenceIntervalMethod
6874
+ confidenceIntervalMethod,
6875
+ yAxisMaxConfig
6748
6876
  }
6749
6877
  )
6750
6878
  };
6751
6879
  case "bubble":
6752
6880
  return {
6753
6881
  title: "Bubble",
6754
- content: /* @__PURE__ */ u$1(PrevalenceOverTimeBubbleChart, { data, yAxisScaleType })
6882
+ content: /* @__PURE__ */ u$1(
6883
+ PrevalenceOverTimeBubbleChart,
6884
+ {
6885
+ data,
6886
+ yAxisScaleType,
6887
+ yAxisMaxConfig
6888
+ }
6889
+ )
6755
6890
  };
6756
6891
  case "table":
6757
6892
  return {
6758
6893
  title: "Table",
6759
- content: /* @__PURE__ */ u$1(PrevalenceOverTimeTable, { data, granularity })
6894
+ content: /* @__PURE__ */ u$1(PrevalenceOverTimeTable, { data, granularity, pageSize })
6760
6895
  };
6761
6896
  }
6762
6897
  };
@@ -6813,6 +6948,7 @@ const PrevalenceOverTimeInfo = () => {
6813
6948
  /* @__PURE__ */ u$1(InfoParagraph, { children: "Prevalence over time info." })
6814
6949
  ] });
6815
6950
  };
6951
+ const maxInData = (data) => Math.max(...data.flatMap((variant) => variant.content.map((dataPoint) => dataPoint.prevalence)));
6816
6952
  var __defProp$6 = Object.defineProperty;
6817
6953
  var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
6818
6954
  var __decorateClass$6 = (decorators, target, key, kind) => {
@@ -6820,15 +6956,14 @@ var __decorateClass$6 = (decorators, target, key, kind) => {
6820
6956
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
6821
6957
  if (decorator = decorators[i2])
6822
6958
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6823
- if (kind && result)
6824
- __defProp$6(target, key, result);
6959
+ if (kind && result) __defProp$6(target, key, result);
6825
6960
  return result;
6826
6961
  };
6827
6962
  let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles {
6828
6963
  constructor() {
6829
6964
  super(...arguments);
6830
- this.numerator = { displayName: "", lapisFilter: {} };
6831
- this.denominator = {};
6965
+ this.numeratorFilter = { displayName: "", lapisFilter: {} };
6966
+ this.denominatorFilter = {};
6832
6967
  this.granularity = "day";
6833
6968
  this.smoothingWindow = 0;
6834
6969
  this.views = ["bar", "line", "bubble", "table"];
@@ -6837,13 +6972,16 @@ let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles
6837
6972
  this.width = "100%";
6838
6973
  this.height = "700px";
6839
6974
  this.lapisDateField = "date";
6975
+ this.pageSize = false;
6976
+ this.yAxisMaxLinear = 1;
6977
+ this.yAxisMaxLogarithmic = 1;
6840
6978
  }
6841
6979
  render() {
6842
6980
  return /* @__PURE__ */ u$1(
6843
6981
  PrevalenceOverTime,
6844
6982
  {
6845
- numerator: this.numerator,
6846
- denominator: this.denominator,
6983
+ numeratorFilter: this.numeratorFilter,
6984
+ denominatorFilter: this.denominatorFilter,
6847
6985
  granularity: this.granularity,
6848
6986
  smoothingWindow: this.smoothingWindow,
6849
6987
  views: this.views,
@@ -6851,17 +6989,22 @@ let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles
6851
6989
  width: this.width,
6852
6990
  height: this.height,
6853
6991
  headline: this.headline,
6854
- lapisDateField: this.lapisDateField
6992
+ lapisDateField: this.lapisDateField,
6993
+ pageSize: this.pageSize,
6994
+ yAxisMaxConfig: {
6995
+ linear: this.yAxisMaxLinear,
6996
+ logarithmic: this.yAxisMaxLogarithmic
6997
+ }
6855
6998
  }
6856
6999
  );
6857
7000
  }
6858
7001
  };
6859
7002
  __decorateClass$6([
6860
7003
  n2({ type: Object })
6861
- ], PrevalenceOverTimeComponent.prototype, "numerator", 2);
7004
+ ], PrevalenceOverTimeComponent.prototype, "numeratorFilter", 2);
6862
7005
  __decorateClass$6([
6863
7006
  n2({ type: Object })
6864
- ], PrevalenceOverTimeComponent.prototype, "denominator", 2);
7007
+ ], PrevalenceOverTimeComponent.prototype, "denominatorFilter", 2);
6865
7008
  __decorateClass$6([
6866
7009
  n2({ type: String })
6867
7010
  ], PrevalenceOverTimeComponent.prototype, "granularity", 2);
@@ -6886,11 +7029,21 @@ __decorateClass$6([
6886
7029
  __decorateClass$6([
6887
7030
  n2({ type: String })
6888
7031
  ], PrevalenceOverTimeComponent.prototype, "lapisDateField", 2);
7032
+ __decorateClass$6([
7033
+ n2({ type: Object })
7034
+ ], PrevalenceOverTimeComponent.prototype, "pageSize", 2);
7035
+ __decorateClass$6([
7036
+ n2({ type: String })
7037
+ ], PrevalenceOverTimeComponent.prototype, "yAxisMaxLinear", 2);
7038
+ __decorateClass$6([
7039
+ n2({ type: String })
7040
+ ], PrevalenceOverTimeComponent.prototype, "yAxisMaxLogarithmic", 2);
6889
7041
  PrevalenceOverTimeComponent = __decorateClass$6([
6890
7042
  t$2("gs-prevalence-over-time")
6891
7043
  ], PrevalenceOverTimeComponent);
6892
7044
  Chart.register(...registerables, LogitScale);
6893
- const RelativeGrowthAdvantageChart = ({ data, yAxisScaleType }) => {
7045
+ const RelativeGrowthAdvantageChart = ({ data, yAxisScaleType, yAxisMaxConfig }) => {
7046
+ const maxY = yAxisScaleType !== "logit" ? getYAxisMax(Math.max(...data.proportion), yAxisMaxConfig == null ? void 0 : yAxisMaxConfig[yAxisScaleType]) : void 0;
6894
7047
  const config = {
6895
7048
  type: "line",
6896
7049
  data: {
@@ -6901,7 +7054,7 @@ const RelativeGrowthAdvantageChart = ({ data, yAxisScaleType }) => {
6901
7054
  maintainAspectRatio: false,
6902
7055
  animation: false,
6903
7056
  scales: {
6904
- y: getYAxisScale(yAxisScaleType)
7057
+ y: { ...getYAxisScale(yAxisScaleType), max: maxY }
6905
7058
  },
6906
7059
  plugins: {
6907
7060
  legend: {
@@ -6911,17 +7064,38 @@ const RelativeGrowthAdvantageChart = ({ data, yAxisScaleType }) => {
6911
7064
  }
6912
7065
  }
6913
7066
  };
6914
- return /* @__PURE__ */ u$1("div", { className: "flex flex-col h-full", children: [
6915
- /* @__PURE__ */ u$1("div", { className: "flex-1", children: /* @__PURE__ */ u$1(GsChart, { configuration: config }) }),
6916
- /* @__PURE__ */ u$1("p", { children: [
6917
- "Advantage: ",
6918
- (data.params.fd.value * 100).toFixed(2),
6919
- "% (",
6920
- (data.params.fd.ciLower * 100).toFixed(2),
6921
- "% -",
6922
- " ",
6923
- (data.params.fd.ciUpper * 100).toFixed(2),
6924
- "%)"
7067
+ return /* @__PURE__ */ u$1("div", { className: "flex h-full flex-col", children: [
7068
+ /* @__PURE__ */ u$1(
7069
+ RelativeGrowthAdvantageDisplay,
7070
+ {
7071
+ relativeAdvantage: data.params.fd.value,
7072
+ relativeAdvantageLowerBound: data.params.fd.ciLower,
7073
+ relativeAdvantageUpperBound: data.params.fd.ciUpper
7074
+ }
7075
+ ),
7076
+ /* @__PURE__ */ u$1("div", { className: "flex-1", children: /* @__PURE__ */ u$1(GsChart, { configuration: config }) })
7077
+ ] });
7078
+ };
7079
+ const RelativeGrowthAdvantageDisplay = ({
7080
+ relativeAdvantage,
7081
+ relativeAdvantageLowerBound,
7082
+ relativeAdvantageUpperBound
7083
+ }) => {
7084
+ return /* @__PURE__ */ u$1("div", { class: "mx-auto flex items-end flex-wrap", children: [
7085
+ /* @__PURE__ */ u$1("span", { class: "text-[#606060]", children: "Relative advantage:" }),
7086
+ /* @__PURE__ */ u$1("div", { children: [
7087
+ /* @__PURE__ */ u$1("span", { class: "text-2xl ml-3", children: [
7088
+ " ",
7089
+ formatProportion(relativeAdvantage),
7090
+ " "
7091
+ ] }),
7092
+ /* @__PURE__ */ u$1("span", { class: "ml-2.5", children: [
7093
+ "(",
7094
+ formatProportion(relativeAdvantageLowerBound),
7095
+ " - ",
7096
+ formatProportion(relativeAdvantageUpperBound),
7097
+ ")"
7098
+ ] })
6925
7099
  ] })
6926
7100
  ] });
6927
7101
  };
@@ -7080,36 +7254,39 @@ const RelativeGrowthAdvantage = ({
7080
7254
  views,
7081
7255
  width,
7082
7256
  height,
7083
- numerator,
7084
- denominator,
7257
+ numeratorFilter,
7258
+ denominatorFilter,
7085
7259
  generationTime,
7086
7260
  headline = "Relative growth advantage",
7087
- lapisDateField
7261
+ lapisDateField,
7262
+ yAxisMaxConfig
7088
7263
  }) => {
7089
7264
  const size2 = { height, width };
7090
7265
  return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
7091
7266
  RelativeGrowthAdvantageInner,
7092
7267
  {
7093
7268
  views,
7094
- numerator,
7095
- denominator,
7269
+ numeratorFilter,
7270
+ denominatorFilter,
7096
7271
  generationTime,
7097
- lapisDateField
7272
+ lapisDateField,
7273
+ yAxisMaxConfig
7098
7274
  }
7099
7275
  ) }) }) });
7100
7276
  };
7101
7277
  const RelativeGrowthAdvantageInner = ({
7102
- numerator,
7103
- denominator,
7278
+ numeratorFilter,
7279
+ denominatorFilter,
7104
7280
  generationTime,
7105
7281
  views,
7106
- lapisDateField
7282
+ lapisDateField,
7283
+ yAxisMaxConfig
7107
7284
  }) => {
7108
7285
  const lapis = P(LapisUrlContext);
7109
7286
  const [yAxisScaleType, setYAxisScaleType] = p("linear");
7110
7287
  const { data, error, isLoading } = useQuery(
7111
- () => queryRelativeGrowthAdvantage(numerator, denominator, generationTime, lapis, lapisDateField),
7112
- [lapis, numerator, denominator, generationTime, views]
7288
+ () => queryRelativeGrowthAdvantage(numeratorFilter, denominatorFilter, generationTime, lapis, lapisDateField),
7289
+ [lapis, numeratorFilter, denominatorFilter, generationTime, views]
7113
7290
  );
7114
7291
  if (isLoading) {
7115
7292
  return /* @__PURE__ */ u$1(LoadingDisplay, {});
@@ -7127,7 +7304,8 @@ const RelativeGrowthAdvantageInner = ({
7127
7304
  yAxisScaleType,
7128
7305
  setYAxisScaleType,
7129
7306
  views,
7130
- generationTime
7307
+ generationTime,
7308
+ yAxisMaxConfig
7131
7309
  }
7132
7310
  );
7133
7311
  };
@@ -7136,7 +7314,8 @@ const RelativeGrowthAdvantageTabs = ({
7136
7314
  yAxisScaleType,
7137
7315
  setYAxisScaleType,
7138
7316
  views,
7139
- generationTime
7317
+ generationTime,
7318
+ yAxisMaxConfig
7140
7319
  }) => {
7141
7320
  const getTab = (view) => {
7142
7321
  switch (view) {
@@ -7151,7 +7330,8 @@ const RelativeGrowthAdvantageTabs = ({
7151
7330
  observed: data.observedProportions,
7152
7331
  params: data.params
7153
7332
  },
7154
- yAxisScaleType
7333
+ yAxisScaleType,
7334
+ yAxisMaxConfig
7155
7335
  }
7156
7336
  )
7157
7337
  };
@@ -7206,44 +7386,49 @@ var __decorateClass$5 = (decorators, target, key, kind) => {
7206
7386
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
7207
7387
  if (decorator = decorators[i2])
7208
7388
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7209
- if (kind && result)
7210
- __defProp$5(target, key, result);
7389
+ if (kind && result) __defProp$5(target, key, result);
7211
7390
  return result;
7212
7391
  };
7213
7392
  let RelativeGrowthAdvantageComponent = class extends PreactLitAdapter {
7214
7393
  constructor() {
7215
7394
  super(...arguments);
7216
- this.numerator = {};
7217
- this.denominator = {};
7395
+ this.numeratorFilter = {};
7396
+ this.denominatorFilter = {};
7218
7397
  this.generationTime = 7;
7219
7398
  this.views = ["line"];
7220
7399
  this.headline = "Relative growth advantage";
7221
7400
  this.width = "100%";
7222
7401
  this.height = "700px";
7223
7402
  this.lapisDateField = "date";
7403
+ this.yAxisMaxLinear = 1;
7404
+ this.yAxisMaxLogarithmic = 1;
7224
7405
  }
7225
7406
  render() {
7226
7407
  return /* @__PURE__ */ u$1(
7227
7408
  RelativeGrowthAdvantage,
7228
7409
  {
7229
- numerator: this.numerator,
7230
- denominator: this.denominator,
7410
+ numeratorFilter: this.numeratorFilter,
7411
+ denominatorFilter: this.denominatorFilter,
7231
7412
  generationTime: this.generationTime,
7232
7413
  views: this.views,
7233
7414
  width: this.width,
7234
7415
  height: this.height,
7235
7416
  headline: this.headline,
7236
- lapisDateField: this.lapisDateField
7417
+ lapisDateField: this.lapisDateField,
7418
+ yAxisMaxConfig: {
7419
+ linear: this.yAxisMaxLinear,
7420
+ logarithmic: this.yAxisMaxLogarithmic
7421
+ }
7237
7422
  }
7238
7423
  );
7239
7424
  }
7240
7425
  };
7241
7426
  __decorateClass$5([
7242
7427
  n2({ type: Object })
7243
- ], RelativeGrowthAdvantageComponent.prototype, "numerator", 2);
7428
+ ], RelativeGrowthAdvantageComponent.prototype, "numeratorFilter", 2);
7244
7429
  __decorateClass$5([
7245
7430
  n2({ type: Object })
7246
- ], RelativeGrowthAdvantageComponent.prototype, "denominator", 2);
7431
+ ], RelativeGrowthAdvantageComponent.prototype, "denominatorFilter", 2);
7247
7432
  __decorateClass$5([
7248
7433
  n2({ type: Number })
7249
7434
  ], RelativeGrowthAdvantageComponent.prototype, "generationTime", 2);
@@ -7262,10 +7447,16 @@ __decorateClass$5([
7262
7447
  __decorateClass$5([
7263
7448
  n2({ type: String })
7264
7449
  ], RelativeGrowthAdvantageComponent.prototype, "lapisDateField", 2);
7450
+ __decorateClass$5([
7451
+ n2({ type: String })
7452
+ ], RelativeGrowthAdvantageComponent.prototype, "yAxisMaxLinear", 2);
7453
+ __decorateClass$5([
7454
+ n2({ type: String })
7455
+ ], RelativeGrowthAdvantageComponent.prototype, "yAxisMaxLogarithmic", 2);
7265
7456
  RelativeGrowthAdvantageComponent = __decorateClass$5([
7266
7457
  t$2("gs-relative-growth-advantage")
7267
7458
  ], RelativeGrowthAdvantageComponent);
7268
- const AggregateTable = ({ data, fields }) => {
7459
+ const AggregateTable = ({ data, fields, pageSize }) => {
7269
7460
  const headers = [
7270
7461
  ...fields.map((field) => {
7271
7462
  return {
@@ -7283,7 +7474,7 @@ const AggregateTable = ({ data, fields }) => {
7283
7474
  formatter: (cell) => formatProportion(cell)
7284
7475
  }
7285
7476
  ];
7286
- return /* @__PURE__ */ u$1(Table, { data, columns: headers, pagination: true });
7477
+ return /* @__PURE__ */ u$1(Table, { data, columns: headers, pageSize });
7287
7478
  };
7288
7479
  const compareAscending = (a2, b3) => {
7289
7480
  if (typeof a2 === "number" && typeof b3 === "number") {
@@ -7293,12 +7484,12 @@ const compareAscending = (a2, b3) => {
7293
7484
  const strB = b3 != null ? String(b3) : "";
7294
7485
  return strA.localeCompare(strB);
7295
7486
  };
7296
- async function queryAggregateData(variant, fields, lapis, initialSort = { field: "count", direction: "descending" }, signal) {
7487
+ async function queryAggregateData(lapisFilter, fields, lapis, initialSort = { field: "count", direction: "descending" }, signal) {
7297
7488
  const validSortFields = ["count", "proportion", ...fields];
7298
7489
  if (!validSortFields.includes(initialSort.field)) {
7299
7490
  throw new Error(`InitialSort field not in fields. Valid fields are: ${validSortFields.join(", ")}`);
7300
7491
  }
7301
- const fetchData = new FetchAggregatedOperator(variant, fields);
7492
+ const fetchData = new FetchAggregatedOperator(lapisFilter, fields);
7302
7493
  const sortData = new SortOperator(fetchData, (a2, b3) => {
7303
7494
  return initialSort.direction === "ascending" ? compareAscending(a2[initialSort.field], b3[initialSort.field]) : compareAscending(b3[initialSort.field], a2[initialSort.field]);
7304
7495
  });
@@ -7318,6 +7509,7 @@ const Aggregate = ({
7318
7509
  headline = "Mutations",
7319
7510
  filter,
7320
7511
  fields,
7512
+ pageSize,
7321
7513
  initialSortField,
7322
7514
  initialSortDirection
7323
7515
  }) => {
@@ -7329,7 +7521,8 @@ const Aggregate = ({
7329
7521
  filter,
7330
7522
  views,
7331
7523
  initialSortField,
7332
- initialSortDirection
7524
+ initialSortDirection,
7525
+ pageSize
7333
7526
  }
7334
7527
  ) }) }) });
7335
7528
  };
@@ -7338,7 +7531,8 @@ const AggregateInner = ({
7338
7531
  views,
7339
7532
  filter,
7340
7533
  initialSortField,
7341
- initialSortDirection
7534
+ initialSortDirection,
7535
+ pageSize
7342
7536
  }) => {
7343
7537
  const lapis = P(LapisUrlContext);
7344
7538
  const { data, error, isLoading } = useQuery(async () => {
@@ -7353,15 +7547,15 @@ const AggregateInner = ({
7353
7547
  if (data === null) {
7354
7548
  return /* @__PURE__ */ u$1(NoDataDisplay, {});
7355
7549
  }
7356
- return /* @__PURE__ */ u$1(AggregatedDataTabs, { data, views, fields });
7550
+ return /* @__PURE__ */ u$1(AggregatedDataTabs, { data, views, fields, pageSize });
7357
7551
  };
7358
- const AggregatedDataTabs = ({ data, views, fields }) => {
7552
+ const AggregatedDataTabs = ({ data, views, fields, pageSize }) => {
7359
7553
  const getTab = (view) => {
7360
7554
  switch (view) {
7361
7555
  case "table":
7362
7556
  return {
7363
7557
  title: "Table",
7364
- content: /* @__PURE__ */ u$1(AggregateTable, { data, fields })
7558
+ content: /* @__PURE__ */ u$1(AggregateTable, { data, fields, pageSize })
7365
7559
  };
7366
7560
  }
7367
7561
  };
@@ -7381,8 +7575,7 @@ var __decorateClass$4 = (decorators, target, key, kind) => {
7381
7575
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
7382
7576
  if (decorator = decorators[i2])
7383
7577
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7384
- if (kind && result)
7385
- __defProp$4(target, key, result);
7578
+ if (kind && result) __defProp$4(target, key, result);
7386
7579
  return result;
7387
7580
  };
7388
7581
  let AggregateComponent = class extends PreactLitAdapterWithGridJsStyles {
@@ -7396,6 +7589,7 @@ let AggregateComponent = class extends PreactLitAdapterWithGridJsStyles {
7396
7589
  this.headline = "Aggregate";
7397
7590
  this.initialSortField = "count";
7398
7591
  this.initialSortDirection = "descending";
7592
+ this.pageSize = false;
7399
7593
  }
7400
7594
  render() {
7401
7595
  return /* @__PURE__ */ u$1(
@@ -7408,7 +7602,8 @@ let AggregateComponent = class extends PreactLitAdapterWithGridJsStyles {
7408
7602
  height: this.height,
7409
7603
  headline: this.headline,
7410
7604
  initialSortField: this.initialSortField,
7411
- initialSortDirection: this.initialSortDirection
7605
+ initialSortDirection: this.initialSortDirection,
7606
+ pageSize: this.pageSize
7412
7607
  }
7413
7608
  );
7414
7609
  }
@@ -7437,6 +7632,9 @@ __decorateClass$4([
7437
7632
  __decorateClass$4([
7438
7633
  n2({ type: String })
7439
7634
  ], AggregateComponent.prototype, "initialSortDirection", 2);
7635
+ __decorateClass$4([
7636
+ n2({ type: Object })
7637
+ ], AggregateComponent.prototype, "pageSize", 2);
7440
7638
  AggregateComponent = __decorateClass$4([
7441
7639
  t$2("gs-aggregate")
7442
7640
  ], AggregateComponent);
@@ -7724,8 +7922,7 @@ var __decorateClass$3 = (decorators, target, key, kind) => {
7724
7922
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
7725
7923
  if (decorator = decorators[i2])
7726
7924
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7727
- if (kind && result)
7728
- __defProp$3(target, key, result);
7925
+ if (kind && result) __defProp$3(target, key, result);
7729
7926
  return result;
7730
7927
  };
7731
7928
  let DateRangeSelectorComponent = class extends PreactLitAdapter {
@@ -7821,11 +8018,16 @@ function compareLocationEntries(fields) {
7821
8018
  return 0;
7822
8019
  };
7823
8020
  }
7824
- const LocationFilter = ({ width, initialValue, fields }) => {
8021
+ const LocationFilter = ({
8022
+ width,
8023
+ initialValue,
8024
+ fields,
8025
+ placeholderText
8026
+ }) => {
7825
8027
  const size2 = { width, height: "3rem" };
7826
- return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(LocationFilterInner, { initialValue, fields }) }) });
8028
+ return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(LocationFilterInner, { initialValue, fields, placeholderText }) }) });
7827
8029
  };
7828
- const LocationFilterInner = ({ initialValue, fields }) => {
8030
+ const LocationFilterInner = ({ initialValue, fields, placeholderText }) => {
7829
8031
  const lapis = P(LapisUrlContext);
7830
8032
  const [value, setValue] = p(initialValue ?? "");
7831
8033
  const [unknownLocation, setUnknownLocation] = p(false);
@@ -7866,7 +8068,8 @@ const LocationFilterInner = ({ initialValue, fields }) => {
7866
8068
  class: `input input-bordered grow ${unknownLocation ? "border-2 border-error" : ""}`,
7867
8069
  value,
7868
8070
  onInput,
7869
- list: "countries"
8071
+ list: "countries",
8072
+ placeholder: placeholderText
7870
8073
  }
7871
8074
  ),
7872
8075
  /* @__PURE__ */ u$1("datalist", { id: "countries", children: data == null ? void 0 : data.map((v2) => {
@@ -7897,8 +8100,7 @@ var __decorateClass$2 = (decorators, target, key, kind) => {
7897
8100
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
7898
8101
  if (decorator = decorators[i2])
7899
8102
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7900
- if (kind && result)
7901
- __defProp$2(target, key, result);
8103
+ if (kind && result) __defProp$2(target, key, result);
7902
8104
  return result;
7903
8105
  };
7904
8106
  let LocationFilterComponent = class extends PreactLitAdapter {
@@ -7907,9 +8109,18 @@ let LocationFilterComponent = class extends PreactLitAdapter {
7907
8109
  this.initialValue = "";
7908
8110
  this.fields = [];
7909
8111
  this.width = "100%";
8112
+ this.placeholderText = "";
7910
8113
  }
7911
8114
  render() {
7912
- return /* @__PURE__ */ u$1(LocationFilter, { initialValue: this.initialValue, fields: this.fields, width: this.width });
8115
+ return /* @__PURE__ */ u$1(
8116
+ LocationFilter,
8117
+ {
8118
+ initialValue: this.initialValue,
8119
+ fields: this.fields,
8120
+ width: this.width,
8121
+ placeholderText: this.placeholderText
8122
+ }
8123
+ );
7913
8124
  }
7914
8125
  };
7915
8126
  __decorateClass$2([
@@ -7921,6 +8132,9 @@ __decorateClass$2([
7921
8132
  __decorateClass$2([
7922
8133
  n2({ type: String })
7923
8134
  ], LocationFilterComponent.prototype, "width", 2);
8135
+ __decorateClass$2([
8136
+ n2()
8137
+ ], LocationFilterComponent.prototype, "placeholderText", 2);
7924
8138
  LocationFilterComponent = __decorateClass$2([
7925
8139
  t$2("gs-location-filter")
7926
8140
  ], LocationFilterComponent);
@@ -7992,8 +8206,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
7992
8206
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
7993
8207
  if (decorator = decorators[i2])
7994
8208
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7995
- if (kind && result)
7996
- __defProp$1(target, key, result);
8209
+ if (kind && result) __defProp$1(target, key, result);
7997
8210
  return result;
7998
8211
  };
7999
8212
  let TextInputComponent = class extends PreactLitAdapter {
@@ -8359,8 +8572,7 @@ var __decorateClass = (decorators, target, key, kind) => {
8359
8572
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
8360
8573
  if (decorator = decorators[i2])
8361
8574
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8362
- if (kind && result)
8363
- __defProp(target, key, result);
8575
+ if (kind && result) __defProp(target, key, result);
8364
8576
  return result;
8365
8577
  };
8366
8578
  let MutationFilterComponent = class extends PreactLitAdapter {