@geotrekce/geotrek-rando-widget 0.0.4 → 0.0.7

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 (61) hide show
  1. package/dist/cjs/geotrek-rando-widget.cjs.js +1 -1
  2. package/dist/cjs/grw-app.cjs.entry.js +111 -0
  3. package/dist/cjs/{grw-app_11.cjs.entry.js → grw-filter_6.cjs.entry.js} +197 -455
  4. package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +52 -0
  5. package/dist/cjs/grw-trek-card.cjs.entry.js +47 -0
  6. package/dist/cjs/length-d315d156.js +34 -0
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/store-fd04a216.js +211 -0
  9. package/dist/collection/components/grw-app/grw-app.js +54 -25
  10. package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.css +5 -4
  11. package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.js +1 -1
  12. package/dist/collection/components/grw-map/grw-map.css +19 -1
  13. package/dist/collection/components/grw-map/grw-map.js +65 -10
  14. package/dist/collection/components/grw-poi-detail/grw-poi-detail.css +5 -4
  15. package/dist/collection/components/grw-poi-detail/grw-poi-detail.js +1 -1
  16. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css +27 -3
  17. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +17 -3
  18. package/dist/collection/components/grw-trek-card/grw-trek-card.js +1 -1
  19. package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +134 -4
  20. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +101 -6
  21. package/dist/collection/components/grw-treks-list/grw-treks-list.js +8 -3
  22. package/dist/collection/store/grw-trek-provider.js +24 -9
  23. package/dist/collection/store/grw-treks-provider.js +12 -6
  24. package/dist/collection/store/store.js +7 -1
  25. package/dist/components/grw-app.js +52 -6
  26. package/dist/components/grw-information-desk-detail2.js +2 -2
  27. package/dist/components/grw-map2.js +66 -11
  28. package/dist/components/grw-poi-detail2.js +2 -2
  29. package/dist/components/grw-sensitive-area-detail2.js +7 -2
  30. package/dist/components/grw-trek-detail2.js +31 -4
  31. package/dist/components/grw-trek-provider2.js +24 -9
  32. package/dist/components/grw-treks-list2.js +8 -3
  33. package/dist/components/grw-treks-provider2.js +12 -6
  34. package/dist/components/store.js +7 -1
  35. package/dist/esm/geotrek-rando-widget.js +2 -2
  36. package/dist/esm/grw-app.entry.js +107 -0
  37. package/dist/esm/{grw-app_11.entry.js → grw-filter_6.entry.js} +138 -391
  38. package/dist/esm/grw-information-desk-detail_3.entry.js +46 -0
  39. package/dist/esm/grw-trek-card.entry.js +43 -0
  40. package/dist/esm/{index-fe16e7b6.js → index-192d910f.js} +1 -1
  41. package/dist/esm/length-d82189db.js +27 -0
  42. package/dist/esm/loader.js +2 -2
  43. package/dist/esm/store-b2c76c0c.js +208 -0
  44. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  45. package/dist/geotrek-rando-widget/p-1b2ba86d.entry.js +1 -0
  46. package/dist/geotrek-rando-widget/p-4361afd2.entry.js +1 -0
  47. package/dist/geotrek-rando-widget/p-5f17d340.entry.js +1 -0
  48. package/dist/geotrek-rando-widget/{p-8c206aec.js → p-6dce5e6c.js} +1 -1
  49. package/dist/geotrek-rando-widget/p-7715153d.entry.js +1 -0
  50. package/dist/geotrek-rando-widget/p-e6710c64.js +1 -0
  51. package/dist/geotrek-rando-widget/p-f3f7d6be.js +1 -0
  52. package/dist/types/components/grw-app/grw-app.d.ts +7 -2
  53. package/dist/types/components/grw-map/grw-map.d.ts +3 -1
  54. package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +9 -4
  55. package/dist/types/components.d.ts +0 -2
  56. package/dist/types/store/grw-trek-provider.d.ts +2 -0
  57. package/dist/types/store/grw-treks-provider.d.ts +3 -0
  58. package/dist/types/store/store.d.ts +16 -3
  59. package/dist/types/types/types.d.ts +51 -1
  60. package/package.json +5 -4
  61. package/dist/geotrek-rando-widget/p-ed8706fb.entry.js +0 -1
@@ -1,7 +1,8 @@
1
1
  export declare class GrwApp {
2
2
  element: HTMLElement;
3
3
  showTrek: boolean;
4
- showMap: boolean;
4
+ showTreksMap: boolean;
5
+ showTrekMap: boolean;
5
6
  showFilters: boolean;
6
7
  isLargeView: boolean;
7
8
  currentTrekId: number;
@@ -15,7 +16,6 @@ export declare class GrwApp {
15
16
  portals: string;
16
17
  routes: string;
17
18
  practices: string;
18
- appName: string;
19
19
  urlLayer: string;
20
20
  center: string;
21
21
  zoom: any;
@@ -28,6 +28,7 @@ export declare class GrwApp {
28
28
  colorArrivalIcon: string;
29
29
  colorSensitiveArea: string;
30
30
  colorPoiIcon: string;
31
+ handlePopStateBind: (event: any) => void;
31
32
  largeViewSize: number;
32
33
  onTrekCardPress(event: CustomEvent<number>): void;
33
34
  onWindowResize(): void;
@@ -36,5 +37,9 @@ export declare class GrwApp {
36
37
  onTrekDetailsClose(): void;
37
38
  handleView(): void;
38
39
  handleFilters(): void;
40
+ handleBackButton(): void;
41
+ handlePopState(): void;
42
+ handleShowMap(): void;
43
+ disconnectedCallback(): void;
39
44
  render(): any;
40
45
  }
@@ -17,7 +17,6 @@ export declare class GrwMap {
17
17
  colorPoiIcon: string;
18
18
  map: L.Map;
19
19
  sensitiveAreasControl: any;
20
- currentBounds: L.LatLngBoundsExpression;
21
20
  treksLayer: L.GeoJSON<any>;
22
21
  currentTrekLayer: L.GeoJSON<any>;
23
22
  currentDepartureArrivalLayer: L.GeoJSON<any>;
@@ -25,9 +24,12 @@ export declare class GrwMap {
25
24
  currentPoisLayer: L.GeoJSON<any>;
26
25
  currentParkingLayer: L.GeoJSON<any>;
27
26
  currentInformationDesksLayer: L.GeoJSON<any>;
27
+ currentPointsReferenceLayer: L.GeoJSON<any>;
28
+ handleTreksWithinBoundsBind: (event: any) => void;
28
29
  componentDidLoad(): void;
29
30
  addTreks(): void;
30
31
  removeTreks(): void;
32
+ handleTreksWithinBounds(): void;
31
33
  addTrek(): void;
32
34
  removeTrek(): void;
33
35
  render(): any;
@@ -1,13 +1,18 @@
1
- import { Difficulty, Practice, Route, Trek } from 'types/types';
1
+ import { Accessibilities, AccessibilityLevel, Difficulty, Labels, Practice, Route, Sources, Themes, Trek } from 'types/types';
2
2
  export declare class GrwTrekDetail {
3
+ difficulty: Difficulty;
4
+ route: Route;
5
+ practice: Practice;
6
+ themes: Themes;
7
+ labels: Labels;
8
+ sources: Sources;
9
+ accessibilities: Accessibilities;
10
+ accessibilityLevel: AccessibilityLevel;
3
11
  trek: Trek;
4
12
  colorPrimary: string;
5
13
  colorPrimaryShade: string;
6
14
  colorPrimaryTint: string;
7
15
  currentTrek: Trek;
8
- difficulty: Difficulty;
9
- route: Route;
10
- practice: Practice;
11
16
  componentWillLoad(): void;
12
17
  render(): any;
13
18
  }
@@ -9,7 +9,6 @@ import { InformationDesk, Poi, SensitiveArea, Trek } from "types/types";
9
9
  export namespace Components {
10
10
  interface GrwApp {
11
11
  "api": string;
12
- "appName": string;
13
12
  "attribution": string;
14
13
  "center": string;
15
14
  "cities": string;
@@ -186,7 +185,6 @@ declare global {
186
185
  declare namespace LocalJSX {
187
186
  interface GrwApp {
188
187
  "api"?: string;
189
- "appName"?: string;
190
188
  "attribution"?: string;
191
189
  "center"?: string;
192
190
  "cities"?: string;
@@ -2,6 +2,8 @@ export declare class GrwTrekProvider {
2
2
  language: string;
3
3
  api: string;
4
4
  trekId: string;
5
+ controller: AbortController;
6
+ signal: AbortSignal;
5
7
  componentWillLoad(): Promise<void>;
6
8
  disconnectedCallback(): void;
7
9
  render(): any;
@@ -9,6 +9,9 @@ export declare class GrwTreksProvider {
9
9
  portals: string;
10
10
  routes: string;
11
11
  practices: string;
12
+ controller: AbortController;
13
+ signal: AbortSignal;
12
14
  componentWillLoad(): Promise<void>;
15
+ disconnectedCallback(): void;
13
16
  render(): any;
14
17
  }
@@ -1,29 +1,42 @@
1
- import { Difficulties, Durations, InformationDesks, Pois, Practices, Routes, SensitiveAreas, Themes, Trek, Treks } from 'types/types';
1
+ import { LatLngBounds } from 'leaflet';
2
+ import { Accessibilities, accessibilitiesLevel, Difficulties, Durations, InformationDesks, Labels, Pois, Practices, Routes, SensitiveAreas, Sources, Themes, Trek, Treks } from 'types/types';
2
3
  declare const state: {
3
4
  api: string;
4
5
  treks: Treks;
6
+ treksWithinBounds: Treks;
7
+ currentMapTreksBounds: LatLngBounds;
5
8
  currentTreks: Treks;
6
9
  difficulties: Difficulties;
7
10
  routes: Routes;
8
11
  practices: Practices;
9
12
  themes: Themes;
10
13
  durations: Durations;
14
+ labels: Labels;
15
+ sources: Sources;
16
+ accessibilities: Accessibilities;
17
+ accessibilitiesLevel: accessibilitiesLevel;
18
+ currentTrek: Trek;
11
19
  currentSensitiveAreas: SensitiveAreas;
12
20
  currentPois: Pois;
13
- currentTrek: Trek;
14
21
  currentInformationDesks: InformationDesks;
15
22
  }, onChange: import("@stencil/store/dist/types").OnChangeHandler<{
16
23
  api: string;
17
24
  treks: Treks;
25
+ treksWithinBounds: Treks;
26
+ currentMapTreksBounds: LatLngBounds;
18
27
  currentTreks: Treks;
19
28
  difficulties: Difficulties;
20
29
  routes: Routes;
21
30
  practices: Practices;
22
31
  themes: Themes;
23
32
  durations: Durations;
33
+ labels: Labels;
34
+ sources: Sources;
35
+ accessibilities: Accessibilities;
36
+ accessibilitiesLevel: accessibilitiesLevel;
37
+ currentTrek: Trek;
24
38
  currentSensitiveAreas: SensitiveAreas;
25
39
  currentPois: Pois;
26
- currentTrek: Trek;
27
40
  currentInformationDesks: InformationDesks;
28
41
  }>;
29
42
  export { onChange };
@@ -1,4 +1,4 @@
1
- import { LineString, Geometry, Position } from 'geojson';
1
+ import { LineString, Geometry, Position, MultiPoint } from 'geojson';
2
2
  export declare type Treks = Trek[];
3
3
  export declare type Trek = {
4
4
  id: number;
@@ -14,12 +14,33 @@ export declare type Trek = {
14
14
  length_2d: number;
15
15
  ascent: number;
16
16
  departure: string;
17
+ arrival?: string;
18
+ altimetric_profile?: string;
17
19
  geometry?: LineString;
18
20
  departure_geom?: Position;
19
21
  gpx?: string;
20
22
  kml?: string;
21
23
  pdf?: string;
22
24
  parking_location?: Position;
25
+ ambiance?: string;
26
+ access?: string;
27
+ public_transport?: string;
28
+ advice?: string;
29
+ advised_parking?: string;
30
+ gear?: string;
31
+ labels?: number[];
32
+ points_reference?: MultiPoint;
33
+ source?: number[];
34
+ structure?: number;
35
+ disabled_infrastructure?: string;
36
+ accessibilities?: number[];
37
+ accessibility_level?: number;
38
+ accessibility_slope?: string;
39
+ accessibility_width?: string;
40
+ accessibility_signage?: string;
41
+ accessibility_covering?: string;
42
+ accessibility_exposure?: string;
43
+ accessibility_advice?: string;
23
44
  };
24
45
  export declare type Attachments = Attachment[];
25
46
  export declare type Attachment = {
@@ -57,6 +78,31 @@ export declare type Theme = {
57
78
  label: string;
58
79
  pictogram: string;
59
80
  };
81
+ export declare type Labels = Label[];
82
+ export declare type Label = {
83
+ id: number;
84
+ name: string;
85
+ advice: string;
86
+ pictogram: string;
87
+ };
88
+ export declare type Sources = Source[];
89
+ export declare type Source = {
90
+ id: number;
91
+ name: string;
92
+ website: string;
93
+ pictogram: string;
94
+ };
95
+ export declare type Accessibilities = Accessibility[];
96
+ export declare type Accessibility = {
97
+ id: number;
98
+ name: string;
99
+ pictogram: string;
100
+ };
101
+ export declare type accessibilitiesLevel = AccessibilityLevel[];
102
+ export declare type AccessibilityLevel = {
103
+ id: number;
104
+ name: string;
105
+ };
60
106
  export declare type Durations = Duration[];
61
107
  export declare type Duration = {
62
108
  id: number;
@@ -71,6 +117,10 @@ export declare type SensitiveArea = {
71
117
  geometry: Geometry;
72
118
  name: string;
73
119
  description: string;
120
+ contact: string;
121
+ info_url: string;
122
+ period: boolean[];
123
+ practices: number[];
74
124
  };
75
125
  export declare type Pois = Poi[];
76
126
  export declare type Poi = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geotrekce/geotrek-rando-widget",
3
- "version": "0.0.4",
3
+ "version": "0.0.7",
4
4
  "description": "Geotrek Rando Widget",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -18,8 +18,8 @@
18
18
  "scripts": {
19
19
  "build": "stencil build --docs",
20
20
  "start": "stencil build --dev --watch --serve",
21
- "test": "stencil test --spec --e2e",
22
- "test.watch": "stencil test --spec --e2e --watchAll",
21
+ "test": "stencil test --spec --e2e --passWithNoTests",
22
+ "test.watch": "stencil test --spec --e2e --passWithNoTests --watchAll",
23
23
  "generate": "stencil generate",
24
24
  "storybook": "start-storybook -p 6006",
25
25
  "build-storybook": "build-storybook",
@@ -48,7 +48,8 @@
48
48
  "jest": "^27.4.5",
49
49
  "jest-cli": "^27.4.5",
50
50
  "puppeteer": "^10.0.0",
51
- "stencil-inline-svg": "^1.1.0"
51
+ "stencil-inline-svg": "^1.1.0",
52
+ "typescript": "^4.7.4"
52
53
  },
53
54
  "author": "bastien.alvez@makina-corpus.com",
54
55
  "license": "MIT"