@geotrekce/geotrek-rando-widget 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/geotrek-rando-widget.cjs.js +2 -2
- package/dist/cjs/grw-app.cjs.entry.js +93 -0
- package/dist/cjs/{grw-app_7.cjs.entry.js → grw-filter_6.cjs.entry.js} +424 -384
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +52 -0
- package/dist/cjs/grw-trek-card.cjs.entry.js +47 -0
- package/dist/cjs/{index-c6f73e30.js → index-c2c4531d.js} +46 -1
- package/dist/cjs/length-d315d156.js +34 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/store-972b8d2a.js +209 -0
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/grw-app/grw-app.css +70 -5
- package/dist/collection/components/grw-app/grw-app.js +139 -33
- package/dist/collection/components/grw-filter/grw-filter.css +29 -0
- package/dist/collection/components/grw-filter/grw-filter.js +132 -0
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.css +31 -0
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.js +53 -0
- package/dist/collection/components/grw-map/grw-map.css +99 -0
- package/dist/collection/components/grw-map/grw-map.js +315 -42
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.css +31 -0
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.js +41 -0
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css +39 -0
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +52 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.css +67 -30
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +37 -13
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +160 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +123 -8
- package/dist/collection/components/grw-treks-list/grw-treks-list.css +17 -3
- package/dist/collection/components/grw-treks-list/grw-treks-list.js +29 -7
- package/dist/collection/store/grw-trek-provider.js +36 -8
- package/dist/collection/store/grw-treks-provider.js +16 -7
- package/dist/collection/store/store.js +10 -0
- package/dist/collection/stories/App.js +22 -16
- package/dist/collection/stories/App.stories.js +14 -9
- package/dist/collection/stories/TrekCard.js +2 -1
- package/dist/collection/stories/TrekCard.stories.js +4 -3
- package/dist/collection/stories/TrekDetail.js +3 -1
- package/dist/collection/stories/TrekDetail.stories.js +5 -3
- package/dist/collection/stories/TrekMap.js +6 -4
- package/dist/collection/stories/TrekMap.stories.js +10 -7
- package/dist/collection/stories/TreksList.js +10 -9
- package/dist/collection/stories/TreksList.stories.js +4 -3
- package/dist/collection/stories/TreksMap.stories.js +6 -5
- package/dist/collection/utils/utils.js +2 -2
- package/dist/components/grw-app.js +76 -11
- package/dist/components/grw-filter.d.ts +11 -0
- package/dist/components/grw-filter.js +6 -0
- package/dist/components/grw-filter2.js +95 -0
- package/dist/components/grw-information-desk-detail.d.ts +11 -0
- package/dist/components/grw-information-desk-detail.js +6 -0
- package/dist/components/grw-information-desk-detail2.js +34 -0
- package/dist/components/grw-map2.js +263 -39
- package/dist/components/grw-poi-detail.d.ts +11 -0
- package/dist/components/grw-poi-detail.js +6 -0
- package/dist/components/grw-poi-detail2.js +32 -0
- package/dist/components/grw-sensitive-area-detail.d.ts +11 -0
- package/dist/components/grw-sensitive-area-detail.js +6 -0
- package/dist/components/grw-sensitive-area-detail2.js +37 -0
- package/dist/components/grw-trek-card2.js +11 -6
- package/dist/components/grw-trek-detail2.js +40 -7
- package/dist/components/grw-trek-provider2.js +36 -8
- package/dist/components/grw-treks-list2.js +10 -7
- package/dist/components/grw-treks-provider2.js +16 -7
- package/dist/components/length.js +2 -2
- package/dist/components/store.js +10 -0
- package/dist/esm/geotrek-rando-widget.js +2 -2
- package/dist/esm/grw-app.entry.js +89 -0
- package/dist/esm/{grw-app_7.entry.js → grw-filter_6.entry.js} +398 -357
- package/dist/esm/grw-information-desk-detail_3.entry.js +46 -0
- package/dist/esm/grw-trek-card.entry.js +43 -0
- package/dist/esm/{index-7aa9e822.js → index-192d910f.js} +47 -2
- package/dist/esm/length-d82189db.js +27 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/store-5a42b5d8.js +206 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.css +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/p-206a52d9.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-2d9ae918.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-6dce5e6c.js +2 -0
- package/dist/geotrek-rando-widget/p-8cfa03c0.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-d3aa9819.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-e63213a9.js +1 -0
- package/dist/geotrek-rando-widget/p-f3f7d6be.js +1 -0
- package/dist/types/components/grw-app/grw-app.d.ts +13 -2
- package/dist/types/components/grw-filter/grw-filter.d.ts +9 -0
- package/dist/types/components/grw-information-desk-detail/grw-information-desk-detail.d.ts +5 -0
- package/dist/types/components/grw-map/grw-map.d.ts +14 -4
- package/dist/types/components/grw-poi-detail/grw-poi-detail.d.ts +5 -0
- package/dist/types/components/grw-sensitive-area-detail/grw-sensitive-area-detail.d.ts +5 -0
- package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +6 -4
- package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +10 -4
- package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +1 -0
- package/dist/types/components.d.ts +88 -3
- package/dist/types/store/store.d.ts +21 -1
- package/dist/types/types/types.d.ts +119 -3
- package/package.json +9 -10
- package/readme.md +19 -1
- package/dist/geotrek-rando-widget/p-332ba9ab.js +0 -2
- package/dist/geotrek-rando-widget/p-b7c66d2d.entry.js +0 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export declare class GrwApp {
|
|
2
2
|
element: HTMLElement;
|
|
3
3
|
showTrek: boolean;
|
|
4
|
-
|
|
4
|
+
showTreksMap: boolean;
|
|
5
|
+
showTrekMap: boolean;
|
|
6
|
+
showFilters: boolean;
|
|
5
7
|
isLargeView: boolean;
|
|
6
8
|
currentTrekId: number;
|
|
7
9
|
api: string;
|
|
10
|
+
language: string;
|
|
8
11
|
inBbox: string;
|
|
9
12
|
cities: string;
|
|
10
13
|
districts: string;
|
|
@@ -13,16 +16,20 @@ export declare class GrwApp {
|
|
|
13
16
|
portals: string;
|
|
14
17
|
routes: string;
|
|
15
18
|
practices: string;
|
|
16
|
-
appName: string;
|
|
17
19
|
urlLayer: string;
|
|
18
20
|
center: string;
|
|
19
21
|
zoom: any;
|
|
20
22
|
attribution: string;
|
|
21
23
|
colorPrimary: string;
|
|
24
|
+
colorPrimaryShade: string;
|
|
22
25
|
colorPrimaryTint: string;
|
|
23
26
|
colorTrekLine: string;
|
|
24
27
|
colorDepartureIcon: string;
|
|
25
28
|
colorArrivalIcon: string;
|
|
29
|
+
colorSensitiveArea: string;
|
|
30
|
+
colorPoiIcon: string;
|
|
31
|
+
forwardTrekId: number;
|
|
32
|
+
handlePopStateBind: (event: any) => void;
|
|
26
33
|
largeViewSize: number;
|
|
27
34
|
onTrekCardPress(event: CustomEvent<number>): void;
|
|
28
35
|
onWindowResize(): void;
|
|
@@ -30,5 +37,9 @@ export declare class GrwApp {
|
|
|
30
37
|
componentDidLoad(): void;
|
|
31
38
|
onTrekDetailsClose(): void;
|
|
32
39
|
handleView(): void;
|
|
40
|
+
handleFilters(): void;
|
|
41
|
+
handlePopState(): void;
|
|
42
|
+
handleShowMap(): void;
|
|
43
|
+
disconnectedCallback(): void;
|
|
33
44
|
render(): any;
|
|
34
45
|
}
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
1
2
|
import L from 'leaflet';
|
|
2
3
|
export declare class GrwMap {
|
|
3
4
|
element: HTMLElement;
|
|
5
|
+
trekCardPress: EventEmitter<number>;
|
|
4
6
|
mapIsReady: boolean;
|
|
5
7
|
urlLayer: string;
|
|
6
8
|
attribution: string;
|
|
7
9
|
center: string;
|
|
8
10
|
zoom: number;
|
|
11
|
+
colorPrimary: string;
|
|
12
|
+
colorPrimaryTint: string;
|
|
9
13
|
colorTrekLine: string;
|
|
10
14
|
colorDepartureIcon: string;
|
|
11
15
|
colorArrivalIcon: string;
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
colorSensitiveArea: string;
|
|
17
|
+
colorPoiIcon: string;
|
|
14
18
|
map: L.Map;
|
|
19
|
+
sensitiveAreasControl: any;
|
|
15
20
|
currentBounds: L.LatLngBoundsExpression;
|
|
16
21
|
treksLayer: L.GeoJSON<any>;
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
currentTrekLayer: L.GeoJSON<any>;
|
|
23
|
+
currentDepartureArrivalLayer: L.GeoJSON<any>;
|
|
24
|
+
currentSensitiveAreasLayer: L.GeoJSON<any>;
|
|
25
|
+
currentPoisLayer: L.GeoJSON<any>;
|
|
26
|
+
currentParkingLayer: L.GeoJSON<any>;
|
|
27
|
+
currentInformationDesksLayer: L.GeoJSON<any>;
|
|
28
|
+
currentPointsReferenceLayer: L.GeoJSON<any>;
|
|
19
29
|
componentDidLoad(): void;
|
|
20
30
|
addTreks(): void;
|
|
21
31
|
removeTreks(): void;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { Difficulty, Practice, Route, Trek } from 'types/types';
|
|
2
|
+
import { Difficulty, Practice, Route, Themes, Trek } from 'types/types';
|
|
3
3
|
export declare class GrwTrekCard {
|
|
4
4
|
trekCardPress: EventEmitter<number>;
|
|
5
|
-
trek: Trek;
|
|
6
|
-
colorPrimary: string;
|
|
7
|
-
colorPrimaryTint: string;
|
|
8
5
|
currentTrek: Trek;
|
|
9
6
|
difficulty: Difficulty;
|
|
10
7
|
route: Route;
|
|
11
8
|
practice: Practice;
|
|
9
|
+
themes: Themes;
|
|
10
|
+
trek: Trek;
|
|
11
|
+
colorPrimary: string;
|
|
12
|
+
colorPrimaryTint: string;
|
|
13
|
+
isLargeView: boolean;
|
|
12
14
|
componentWillLoad(): void;
|
|
13
15
|
render(): any;
|
|
14
16
|
}
|
|
@@ -1,12 +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;
|
|
13
|
+
colorPrimaryShade: string;
|
|
5
14
|
colorPrimaryTint: string;
|
|
6
15
|
currentTrek: Trek;
|
|
7
|
-
difficulty: Difficulty;
|
|
8
|
-
route: Route;
|
|
9
|
-
practice: Practice;
|
|
10
16
|
componentWillLoad(): void;
|
|
11
17
|
render(): any;
|
|
12
18
|
}
|
|
@@ -5,21 +5,24 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
-
import { Trek } from "types/types";
|
|
8
|
+
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;
|
|
16
15
|
"colorArrivalIcon": string;
|
|
17
16
|
"colorDepartureIcon": string;
|
|
17
|
+
"colorPoiIcon": string;
|
|
18
18
|
"colorPrimary": string;
|
|
19
|
+
"colorPrimaryShade": string;
|
|
19
20
|
"colorPrimaryTint": string;
|
|
21
|
+
"colorSensitiveArea": string;
|
|
20
22
|
"colorTrekLine": string;
|
|
21
23
|
"districts": string;
|
|
22
24
|
"inBbox": string;
|
|
25
|
+
"language": string;
|
|
23
26
|
"portals": string;
|
|
24
27
|
"practices": string;
|
|
25
28
|
"routes": string;
|
|
@@ -28,24 +31,42 @@ export namespace Components {
|
|
|
28
31
|
"urlLayer": string;
|
|
29
32
|
"zoom": any;
|
|
30
33
|
}
|
|
34
|
+
interface GrwFilter {
|
|
35
|
+
"filterName": string;
|
|
36
|
+
"filterNameProperty": string;
|
|
37
|
+
"filterType": string;
|
|
38
|
+
}
|
|
39
|
+
interface GrwInformationDeskDetail {
|
|
40
|
+
"informationDesk": InformationDesk;
|
|
41
|
+
}
|
|
31
42
|
interface GrwMap {
|
|
32
43
|
"attribution": string;
|
|
33
44
|
"center": string;
|
|
34
45
|
"colorArrivalIcon": string;
|
|
35
46
|
"colorDepartureIcon": string;
|
|
47
|
+
"colorPoiIcon": string;
|
|
36
48
|
"colorPrimary": string;
|
|
37
49
|
"colorPrimaryTint": string;
|
|
50
|
+
"colorSensitiveArea": string;
|
|
38
51
|
"colorTrekLine": string;
|
|
39
52
|
"urlLayer": string;
|
|
40
53
|
"zoom": number;
|
|
41
54
|
}
|
|
55
|
+
interface GrwPoiDetail {
|
|
56
|
+
"poi": Poi;
|
|
57
|
+
}
|
|
58
|
+
interface GrwSensitiveAreaDetail {
|
|
59
|
+
"sensitiveArea": SensitiveArea;
|
|
60
|
+
}
|
|
42
61
|
interface GrwTrekCard {
|
|
43
62
|
"colorPrimary": string;
|
|
44
63
|
"colorPrimaryTint": string;
|
|
64
|
+
"isLargeView": boolean;
|
|
45
65
|
"trek": Trek;
|
|
46
66
|
}
|
|
47
67
|
interface GrwTrekDetail {
|
|
48
68
|
"colorPrimary": string;
|
|
69
|
+
"colorPrimaryShade": string;
|
|
49
70
|
"colorPrimaryTint": string;
|
|
50
71
|
"trek": Trek;
|
|
51
72
|
}
|
|
@@ -57,6 +78,7 @@ export namespace Components {
|
|
|
57
78
|
interface GrwTreksList {
|
|
58
79
|
"colorPrimary": string;
|
|
59
80
|
"colorPrimaryTint": string;
|
|
81
|
+
"isLargeView": boolean;
|
|
60
82
|
}
|
|
61
83
|
interface GrwTreksProvider {
|
|
62
84
|
"api": string;
|
|
@@ -71,6 +93,10 @@ export namespace Components {
|
|
|
71
93
|
"themes": string;
|
|
72
94
|
}
|
|
73
95
|
}
|
|
96
|
+
export interface GrwMapCustomEvent<T> extends CustomEvent<T> {
|
|
97
|
+
detail: T;
|
|
98
|
+
target: HTMLGrwMapElement;
|
|
99
|
+
}
|
|
74
100
|
export interface GrwTrekCardCustomEvent<T> extends CustomEvent<T> {
|
|
75
101
|
detail: T;
|
|
76
102
|
target: HTMLGrwTrekCardElement;
|
|
@@ -82,12 +108,36 @@ declare global {
|
|
|
82
108
|
prototype: HTMLGrwAppElement;
|
|
83
109
|
new (): HTMLGrwAppElement;
|
|
84
110
|
};
|
|
111
|
+
interface HTMLGrwFilterElement extends Components.GrwFilter, HTMLStencilElement {
|
|
112
|
+
}
|
|
113
|
+
var HTMLGrwFilterElement: {
|
|
114
|
+
prototype: HTMLGrwFilterElement;
|
|
115
|
+
new (): HTMLGrwFilterElement;
|
|
116
|
+
};
|
|
117
|
+
interface HTMLGrwInformationDeskDetailElement extends Components.GrwInformationDeskDetail, HTMLStencilElement {
|
|
118
|
+
}
|
|
119
|
+
var HTMLGrwInformationDeskDetailElement: {
|
|
120
|
+
prototype: HTMLGrwInformationDeskDetailElement;
|
|
121
|
+
new (): HTMLGrwInformationDeskDetailElement;
|
|
122
|
+
};
|
|
85
123
|
interface HTMLGrwMapElement extends Components.GrwMap, HTMLStencilElement {
|
|
86
124
|
}
|
|
87
125
|
var HTMLGrwMapElement: {
|
|
88
126
|
prototype: HTMLGrwMapElement;
|
|
89
127
|
new (): HTMLGrwMapElement;
|
|
90
128
|
};
|
|
129
|
+
interface HTMLGrwPoiDetailElement extends Components.GrwPoiDetail, HTMLStencilElement {
|
|
130
|
+
}
|
|
131
|
+
var HTMLGrwPoiDetailElement: {
|
|
132
|
+
prototype: HTMLGrwPoiDetailElement;
|
|
133
|
+
new (): HTMLGrwPoiDetailElement;
|
|
134
|
+
};
|
|
135
|
+
interface HTMLGrwSensitiveAreaDetailElement extends Components.GrwSensitiveAreaDetail, HTMLStencilElement {
|
|
136
|
+
}
|
|
137
|
+
var HTMLGrwSensitiveAreaDetailElement: {
|
|
138
|
+
prototype: HTMLGrwSensitiveAreaDetailElement;
|
|
139
|
+
new (): HTMLGrwSensitiveAreaDetailElement;
|
|
140
|
+
};
|
|
91
141
|
interface HTMLGrwTrekCardElement extends Components.GrwTrekCard, HTMLStencilElement {
|
|
92
142
|
}
|
|
93
143
|
var HTMLGrwTrekCardElement: {
|
|
@@ -120,7 +170,11 @@ declare global {
|
|
|
120
170
|
};
|
|
121
171
|
interface HTMLElementTagNameMap {
|
|
122
172
|
"grw-app": HTMLGrwAppElement;
|
|
173
|
+
"grw-filter": HTMLGrwFilterElement;
|
|
174
|
+
"grw-information-desk-detail": HTMLGrwInformationDeskDetailElement;
|
|
123
175
|
"grw-map": HTMLGrwMapElement;
|
|
176
|
+
"grw-poi-detail": HTMLGrwPoiDetailElement;
|
|
177
|
+
"grw-sensitive-area-detail": HTMLGrwSensitiveAreaDetailElement;
|
|
124
178
|
"grw-trek-card": HTMLGrwTrekCardElement;
|
|
125
179
|
"grw-trek-detail": HTMLGrwTrekDetailElement;
|
|
126
180
|
"grw-trek-provider": HTMLGrwTrekProviderElement;
|
|
@@ -131,17 +185,20 @@ declare global {
|
|
|
131
185
|
declare namespace LocalJSX {
|
|
132
186
|
interface GrwApp {
|
|
133
187
|
"api"?: string;
|
|
134
|
-
"appName"?: string;
|
|
135
188
|
"attribution"?: string;
|
|
136
189
|
"center"?: string;
|
|
137
190
|
"cities"?: string;
|
|
138
191
|
"colorArrivalIcon"?: string;
|
|
139
192
|
"colorDepartureIcon"?: string;
|
|
193
|
+
"colorPoiIcon"?: string;
|
|
140
194
|
"colorPrimary"?: string;
|
|
195
|
+
"colorPrimaryShade"?: string;
|
|
141
196
|
"colorPrimaryTint"?: string;
|
|
197
|
+
"colorSensitiveArea"?: string;
|
|
142
198
|
"colorTrekLine"?: string;
|
|
143
199
|
"districts"?: string;
|
|
144
200
|
"inBbox"?: string;
|
|
201
|
+
"language"?: string;
|
|
145
202
|
"portals"?: string;
|
|
146
203
|
"practices"?: string;
|
|
147
204
|
"routes"?: string;
|
|
@@ -150,25 +207,44 @@ declare namespace LocalJSX {
|
|
|
150
207
|
"urlLayer"?: string;
|
|
151
208
|
"zoom"?: any;
|
|
152
209
|
}
|
|
210
|
+
interface GrwFilter {
|
|
211
|
+
"filterName"?: string;
|
|
212
|
+
"filterNameProperty"?: string;
|
|
213
|
+
"filterType"?: string;
|
|
214
|
+
}
|
|
215
|
+
interface GrwInformationDeskDetail {
|
|
216
|
+
"informationDesk"?: InformationDesk;
|
|
217
|
+
}
|
|
153
218
|
interface GrwMap {
|
|
154
219
|
"attribution"?: string;
|
|
155
220
|
"center"?: string;
|
|
156
221
|
"colorArrivalIcon"?: string;
|
|
157
222
|
"colorDepartureIcon"?: string;
|
|
223
|
+
"colorPoiIcon"?: string;
|
|
158
224
|
"colorPrimary"?: string;
|
|
159
225
|
"colorPrimaryTint"?: string;
|
|
226
|
+
"colorSensitiveArea"?: string;
|
|
160
227
|
"colorTrekLine"?: string;
|
|
228
|
+
"onTrekCardPress"?: (event: GrwMapCustomEvent<number>) => void;
|
|
161
229
|
"urlLayer"?: string;
|
|
162
230
|
"zoom"?: number;
|
|
163
231
|
}
|
|
232
|
+
interface GrwPoiDetail {
|
|
233
|
+
"poi"?: Poi;
|
|
234
|
+
}
|
|
235
|
+
interface GrwSensitiveAreaDetail {
|
|
236
|
+
"sensitiveArea"?: SensitiveArea;
|
|
237
|
+
}
|
|
164
238
|
interface GrwTrekCard {
|
|
165
239
|
"colorPrimary"?: string;
|
|
166
240
|
"colorPrimaryTint"?: string;
|
|
241
|
+
"isLargeView"?: boolean;
|
|
167
242
|
"onTrekCardPress"?: (event: GrwTrekCardCustomEvent<number>) => void;
|
|
168
243
|
"trek"?: Trek;
|
|
169
244
|
}
|
|
170
245
|
interface GrwTrekDetail {
|
|
171
246
|
"colorPrimary"?: string;
|
|
247
|
+
"colorPrimaryShade"?: string;
|
|
172
248
|
"colorPrimaryTint"?: string;
|
|
173
249
|
"trek"?: Trek;
|
|
174
250
|
}
|
|
@@ -180,6 +256,7 @@ declare namespace LocalJSX {
|
|
|
180
256
|
interface GrwTreksList {
|
|
181
257
|
"colorPrimary"?: string;
|
|
182
258
|
"colorPrimaryTint"?: string;
|
|
259
|
+
"isLargeView"?: boolean;
|
|
183
260
|
}
|
|
184
261
|
interface GrwTreksProvider {
|
|
185
262
|
"api"?: string;
|
|
@@ -195,7 +272,11 @@ declare namespace LocalJSX {
|
|
|
195
272
|
}
|
|
196
273
|
interface IntrinsicElements {
|
|
197
274
|
"grw-app": GrwApp;
|
|
275
|
+
"grw-filter": GrwFilter;
|
|
276
|
+
"grw-information-desk-detail": GrwInformationDeskDetail;
|
|
198
277
|
"grw-map": GrwMap;
|
|
278
|
+
"grw-poi-detail": GrwPoiDetail;
|
|
279
|
+
"grw-sensitive-area-detail": GrwSensitiveAreaDetail;
|
|
199
280
|
"grw-trek-card": GrwTrekCard;
|
|
200
281
|
"grw-trek-detail": GrwTrekDetail;
|
|
201
282
|
"grw-trek-provider": GrwTrekProvider;
|
|
@@ -208,7 +289,11 @@ declare module "@stencil/core" {
|
|
|
208
289
|
export namespace JSX {
|
|
209
290
|
interface IntrinsicElements {
|
|
210
291
|
"grw-app": LocalJSX.GrwApp & JSXBase.HTMLAttributes<HTMLGrwAppElement>;
|
|
292
|
+
"grw-filter": LocalJSX.GrwFilter & JSXBase.HTMLAttributes<HTMLGrwFilterElement>;
|
|
293
|
+
"grw-information-desk-detail": LocalJSX.GrwInformationDeskDetail & JSXBase.HTMLAttributes<HTMLGrwInformationDeskDetailElement>;
|
|
211
294
|
"grw-map": LocalJSX.GrwMap & JSXBase.HTMLAttributes<HTMLGrwMapElement>;
|
|
295
|
+
"grw-poi-detail": LocalJSX.GrwPoiDetail & JSXBase.HTMLAttributes<HTMLGrwPoiDetailElement>;
|
|
296
|
+
"grw-sensitive-area-detail": LocalJSX.GrwSensitiveAreaDetail & JSXBase.HTMLAttributes<HTMLGrwSensitiveAreaDetailElement>;
|
|
212
297
|
"grw-trek-card": LocalJSX.GrwTrekCard & JSXBase.HTMLAttributes<HTMLGrwTrekCardElement>;
|
|
213
298
|
"grw-trek-detail": LocalJSX.GrwTrekDetail & JSXBase.HTMLAttributes<HTMLGrwTrekDetailElement>;
|
|
214
299
|
"grw-trek-provider": LocalJSX.GrwTrekProvider & JSXBase.HTMLAttributes<HTMLGrwTrekProviderElement>;
|
|
@@ -1,18 +1,38 @@
|
|
|
1
|
-
import { Difficulties, Practices, Routes, Trek, Treks } from 'types/types';
|
|
1
|
+
import { Accessibilities, accessibilitiesLevel, Difficulties, Durations, InformationDesks, Labels, Pois, Practices, Routes, SensitiveAreas, Sources, Themes, Trek, Treks } from 'types/types';
|
|
2
2
|
declare const state: {
|
|
3
3
|
api: string;
|
|
4
4
|
treks: Treks;
|
|
5
|
+
currentTreks: Treks;
|
|
5
6
|
difficulties: Difficulties;
|
|
6
7
|
routes: Routes;
|
|
7
8
|
practices: Practices;
|
|
9
|
+
themes: Themes;
|
|
10
|
+
durations: Durations;
|
|
11
|
+
labels: Labels;
|
|
12
|
+
sources: Sources;
|
|
13
|
+
accessibilities: Accessibilities;
|
|
14
|
+
accessibilitiesLevel: accessibilitiesLevel;
|
|
8
15
|
currentTrek: Trek;
|
|
16
|
+
currentSensitiveAreas: SensitiveAreas;
|
|
17
|
+
currentPois: Pois;
|
|
18
|
+
currentInformationDesks: InformationDesks;
|
|
9
19
|
}, onChange: import("@stencil/store/dist/types").OnChangeHandler<{
|
|
10
20
|
api: string;
|
|
11
21
|
treks: Treks;
|
|
22
|
+
currentTreks: Treks;
|
|
12
23
|
difficulties: Difficulties;
|
|
13
24
|
routes: Routes;
|
|
14
25
|
practices: Practices;
|
|
26
|
+
themes: Themes;
|
|
27
|
+
durations: Durations;
|
|
28
|
+
labels: Labels;
|
|
29
|
+
sources: Sources;
|
|
30
|
+
accessibilities: Accessibilities;
|
|
31
|
+
accessibilitiesLevel: accessibilitiesLevel;
|
|
15
32
|
currentTrek: Trek;
|
|
33
|
+
currentSensitiveAreas: SensitiveAreas;
|
|
34
|
+
currentPois: Pois;
|
|
35
|
+
currentInformationDesks: InformationDesks;
|
|
16
36
|
}>;
|
|
17
37
|
export { onChange };
|
|
18
38
|
export default state;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LineString, 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;
|
|
@@ -9,11 +9,38 @@ export declare type Trek = {
|
|
|
9
9
|
difficulty: number;
|
|
10
10
|
route: number;
|
|
11
11
|
practice: number;
|
|
12
|
+
themes: number[];
|
|
12
13
|
duration: number;
|
|
13
14
|
length_2d: number;
|
|
14
15
|
ascent: number;
|
|
16
|
+
departure: string;
|
|
17
|
+
arrival?: string;
|
|
18
|
+
altimetric_profile?: string;
|
|
15
19
|
geometry?: LineString;
|
|
16
20
|
departure_geom?: Position;
|
|
21
|
+
gpx?: string;
|
|
22
|
+
kml?: string;
|
|
23
|
+
pdf?: string;
|
|
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;
|
|
17
44
|
};
|
|
18
45
|
export declare type Attachments = Attachment[];
|
|
19
46
|
export declare type Attachment = {
|
|
@@ -29,7 +56,6 @@ export declare type Attachment = {
|
|
|
29
56
|
export declare type Difficulties = Difficulty[];
|
|
30
57
|
export declare type Difficulty = {
|
|
31
58
|
id: number;
|
|
32
|
-
cirkwi_level: number;
|
|
33
59
|
label: string;
|
|
34
60
|
pictogram: string;
|
|
35
61
|
};
|
|
@@ -43,6 +69,96 @@ export declare type Practices = Practice[];
|
|
|
43
69
|
export declare type Practice = {
|
|
44
70
|
id: number;
|
|
45
71
|
name: string;
|
|
46
|
-
order: number;
|
|
47
72
|
pictogram: string;
|
|
73
|
+
selected: boolean;
|
|
74
|
+
};
|
|
75
|
+
export declare type Themes = Theme[];
|
|
76
|
+
export declare type Theme = {
|
|
77
|
+
id: number;
|
|
78
|
+
label: string;
|
|
79
|
+
pictogram: string;
|
|
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
|
+
};
|
|
106
|
+
export declare type Durations = Duration[];
|
|
107
|
+
export declare type Duration = {
|
|
108
|
+
id: number;
|
|
109
|
+
name: string;
|
|
110
|
+
minValue: number;
|
|
111
|
+
maxValue: number;
|
|
112
|
+
selected: boolean;
|
|
113
|
+
};
|
|
114
|
+
export declare type SensitiveAreas = SensitiveArea[];
|
|
115
|
+
export declare type SensitiveArea = {
|
|
116
|
+
id: number;
|
|
117
|
+
geometry: Geometry;
|
|
118
|
+
name: string;
|
|
119
|
+
description: string;
|
|
120
|
+
contact: string;
|
|
121
|
+
info_url: string;
|
|
122
|
+
period: boolean[];
|
|
123
|
+
practices: number[];
|
|
124
|
+
};
|
|
125
|
+
export declare type Pois = Poi[];
|
|
126
|
+
export declare type Poi = {
|
|
127
|
+
id: number;
|
|
128
|
+
name: string;
|
|
129
|
+
description: string;
|
|
130
|
+
attachments: Attachments;
|
|
131
|
+
type: any;
|
|
132
|
+
type_label: any;
|
|
133
|
+
type_pictogram: any;
|
|
134
|
+
url: string;
|
|
135
|
+
published: boolean;
|
|
136
|
+
geometry: Geometry;
|
|
137
|
+
};
|
|
138
|
+
export declare type InformationDesks = InformationDesk[];
|
|
139
|
+
export declare type InformationDesk = {
|
|
140
|
+
id: number;
|
|
141
|
+
name: string;
|
|
142
|
+
description: string;
|
|
143
|
+
type: InformationDeskType;
|
|
144
|
+
phone: string;
|
|
145
|
+
email: string;
|
|
146
|
+
website: string;
|
|
147
|
+
municipality: string;
|
|
148
|
+
postal_code: string;
|
|
149
|
+
street: string;
|
|
150
|
+
photo_url: string;
|
|
151
|
+
latitude: string;
|
|
152
|
+
longitude: string;
|
|
153
|
+
};
|
|
154
|
+
export declare type InformationDeskType = {
|
|
155
|
+
id: number;
|
|
156
|
+
label: string;
|
|
157
|
+
pictogram: string;
|
|
158
|
+
};
|
|
159
|
+
export declare type Filters = Filter[];
|
|
160
|
+
export declare type Filter = {
|
|
161
|
+
property: string;
|
|
162
|
+
trekProperty: string;
|
|
163
|
+
type: string;
|
|
48
164
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geotrekce/geotrek-rando-widget",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
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",
|
|
@@ -28,29 +28,28 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@stencil/core": "^2.13.0",
|
|
31
|
-
"@types/geojson": "^7946.0.8",
|
|
32
|
-
"@types/leaflet": "^1.7.11",
|
|
33
31
|
"leaflet": "^1.8.0"
|
|
34
32
|
},
|
|
35
33
|
"devDependencies": {
|
|
36
34
|
"@babel/core": "^7.18.5",
|
|
37
35
|
"@stencil/sass": "^1.5.2",
|
|
38
36
|
"@stencil/store": "^1.5.0",
|
|
39
|
-
"@storybook/addon-
|
|
40
|
-
"@storybook/addon-
|
|
41
|
-
"@storybook/addon-interactions": "^6.5.9",
|
|
42
|
-
"@storybook/addon-links": "^6.5.9",
|
|
37
|
+
"@storybook/addon-controls": "^6.5.9",
|
|
38
|
+
"@storybook/addon-docs": "^6.5.9",
|
|
43
39
|
"@storybook/builder-webpack4": "^6.5.9",
|
|
44
40
|
"@storybook/html": "^6.5.9",
|
|
45
41
|
"@storybook/manager-webpack4": "^6.5.9",
|
|
46
42
|
"@storybook/storybook-deployer": "^2.8.11",
|
|
47
43
|
"@storybook/testing-library": "^0.0.13",
|
|
44
|
+
"@types/geojson": "^7946.0.8",
|
|
48
45
|
"@types/jest": "^27.0.3",
|
|
46
|
+
"@types/leaflet": "^1.7.11",
|
|
49
47
|
"babel-loader": "^8.2.5",
|
|
50
48
|
"jest": "^27.4.5",
|
|
51
49
|
"jest-cli": "^27.4.5",
|
|
52
50
|
"puppeteer": "^10.0.0",
|
|
53
|
-
"stencil-inline-svg": "^1.1.0"
|
|
51
|
+
"stencil-inline-svg": "^1.1.0",
|
|
52
|
+
"typescript": "^4.7.4"
|
|
54
53
|
},
|
|
55
54
|
"author": "bastien.alvez@makina-corpus.com",
|
|
56
55
|
"license": "MIT"
|
package/readme.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
# Geotrek Rando Widget
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
Web components of [Geotrek Rando](https://geotrek.fr/).\
|
|
4
|
+
You can use a complete app or each component independantly.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
To use the latest version, copy-paste this inside `<head></head>`
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
<link rel="stylesheet" href="https://unpkg.com/@geotrekce/geotrek-rando-widget@latest/dist/geotrek-rando-widget/geotrek-rando-widget.css" />
|
|
12
|
+
<script type="module" src="https://unpkg.com/@geotrekce/geotrek-rando-widget@latest/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js"></script>
|
|
13
|
+
<script nomodule src="https://unpkg.com/@geotrekce/geotrek-rando-widget@latest/dist/geotrek-rando-widget/geotrek-rando-widget.js"></script>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
You can replace _latest_ with a specific version.
|
|
17
|
+
|
|
18
|
+
## Explore
|
|
19
|
+
|
|
20
|
+
You can explore Geotrek Rando Widget and create your own component [here](https://geotrekce.github.io/Geotrek-rando-widget/).\
|
|
21
|
+
Once you made your component, you can get the code to copy-paste by clicking on _Docs_ then _Show code_.
|