@basemaps/landing 7.4.0 → 7.6.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 (51) hide show
  1. package/build/__tests__/geojson.test.js +3 -2
  2. package/build/__tests__/geojson.test.js.map +1 -1
  3. package/build/__tests__/map.config.test.js +0 -14
  4. package/build/__tests__/map.config.test.js.map +1 -1
  5. package/build/attribution.js +2 -2
  6. package/build/attribution.js.map +1 -1
  7. package/build/components/copyable.d.ts +0 -1
  8. package/build/components/copyable.js +2 -2
  9. package/build/components/copyable.js.map +1 -1
  10. package/build/components/debug.d.ts +12 -8
  11. package/build/components/debug.js +105 -50
  12. package/build/components/debug.js.map +1 -1
  13. package/build/components/layer.switcher.dropdown.js +4 -4
  14. package/build/components/layer.switcher.dropdown.js.map +1 -1
  15. package/build/components/layout.header.js +1 -1
  16. package/build/components/layout.header.js.map +1 -1
  17. package/build/components/map.d.ts +2 -5
  18. package/build/components/map.js +22 -41
  19. package/build/components/map.js.map +1 -1
  20. package/build/components/map.switcher.d.ts +0 -1
  21. package/build/components/map.switcher.js +1 -1
  22. package/build/components/map.switcher.js.map +1 -1
  23. package/build/config.debug.d.ts +2 -0
  24. package/build/config.debug.js +2 -0
  25. package/build/config.debug.js.map +1 -1
  26. package/build/config.layer.js +1 -1
  27. package/build/config.layer.js.map +1 -1
  28. package/build/config.map.d.ts +9 -5
  29. package/build/config.map.js +35 -19
  30. package/build/config.map.js.map +1 -1
  31. package/build/debug.map.d.ts +31 -4
  32. package/build/debug.map.js +35 -8
  33. package/build/debug.map.js.map +1 -1
  34. package/build/index.js +9 -9
  35. package/build/index.js.map +1 -1
  36. package/build/tile.matrix.d.ts +2 -2
  37. package/build/tile.matrix.js +27 -4
  38. package/build/tile.matrix.js.map +1 -1
  39. package/build/url.d.ts +2 -1
  40. package/build/url.js +9 -2
  41. package/build/url.js.map +1 -1
  42. package/build/webp.js +3 -1
  43. package/build/webp.js.map +1 -1
  44. package/dist/docs/sitemap.xml +19 -19
  45. package/dist/docs/sitemap.xml.gz +0 -0
  46. package/dist/docs/user-guide/api-documentation/index.html +1 -1
  47. package/dist/docs/user-guide/api-documentation/{swagger-8800ca34.html → swagger-cdafc1d7.html} +1 -1
  48. package/package.json +8 -8
  49. package/build/components/daterange.d.ts +0 -17
  50. package/build/components/daterange.js +0 -50
  51. package/build/components/daterange.js.map +0 -1
@@ -1,17 +0,0 @@
1
- import { Attribution } from '@basemaps/attribution';
2
- import { AttributionBounds } from '@basemaps/attribution/build/attribution.js';
3
- import { Component, ReactNode } from 'react';
4
- export declare const MinDate = "1950-01-01T00:00:00.000Z";
5
- export declare const MaxDate: string;
6
- export interface DateRangeState {
7
- attribution?: Attribution | null;
8
- filtered?: AttributionBounds[] | null;
9
- }
10
- export declare class DateRange extends Component<{
11
- map: maplibregl.Map;
12
- }, DateRangeState> {
13
- handleAttributionBounds: () => void;
14
- getFilteredAttrs(): AttributionBounds[] | null;
15
- componentDidMount(): void;
16
- render(): ReactNode;
17
- }
@@ -1,50 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { clsx } from 'clsx';
3
- import { Component } from 'react';
4
- import { MapAttributionState, MapAttrState } from '../attribution.js';
5
- import { Config } from '../config.js';
6
- export const MinDate = '1950-01-01T00:00:00.000Z';
7
- export const MaxDate = `${new Date().getFullYear().toString()}-12-31T23:59:59.999Z`;
8
- export class DateRange extends Component {
9
- constructor() {
10
- super(...arguments);
11
- Object.defineProperty(this, "handleAttributionBounds", {
12
- enumerable: true,
13
- configurable: true,
14
- writable: true,
15
- value: () => {
16
- this.setState({ filtered: this.getFilteredAttrs() });
17
- }
18
- });
19
- }
20
- getFilteredAttrs() {
21
- if (this.state == null || this.state.attribution == null)
22
- return null;
23
- const zoom = Math.round(this.props.map.getZoom() ?? 0);
24
- const extent = MapAttributionState.mapboxBoundToBbox(this.props.map.getBounds(), zoom, Config.map.tileMatrix);
25
- return this.state.attribution.filter({ extent, zoom });
26
- }
27
- componentDidMount() {
28
- this.props.map.on('moveend', this.handleAttributionBounds);
29
- Config.map.on('filter', this.handleAttributionBounds);
30
- MapAttrState.getCurrentAttribution().then((attribution) => this.setState({ attribution }));
31
- }
32
- render() {
33
- if (this.state == null)
34
- return;
35
- const filtered = this.state.filtered;
36
- if (filtered == null)
37
- return;
38
- // Filter it by map bounds
39
- const attrsByYear = MapAttrState.getAttributionByYear(filtered);
40
- const allAttrs = [...attrsByYear.entries()];
41
- allAttrs.sort((a, b) => a[0] - b[0]);
42
- const dateBefore = Config.map.filter.date.before;
43
- return (_jsx("div", { className: "date-range", children: allAttrs.map((el) => {
44
- const [year, attrs] = el;
45
- const isSelected = dateBefore?.startsWith(String(year));
46
- return (_jsxs("button", { title: attrs.map((f) => f.collection.title).join('\n'), onClick: () => Config.map.setFilterDateRange({ before: String(year) }), className: clsx({ 'date-range__year': true, 'date-range__year--selected': isSelected }), children: [year, " - ", attrs.length] }, year));
47
- }) }));
48
- }
49
- }
50
- //# sourceMappingURL=daterange.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"daterange.js","sourceRoot":"","sources":["../../src/components/daterange.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAClD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,sBAAsB,CAAC;AAOpF,MAAM,OAAO,SAAU,SAAQ,SAAkD;IAAjF;;QACE;;;;mBAA0B,GAAS,EAAE;gBACnC,IAAI,CAAC,QAAQ,CAAC,EAAE,QAA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