@visitscotland/component-library 5.76.1 → 5.79.2

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 (28) hide show
  1. package/CHANGELOG.md +5419 -0
  2. package/dist/components/components/dropdown/Dropdown.vue.d.ts +948 -0
  3. package/dist/components/components/footer/components/FooterCopyright.vue.d.ts +1 -1
  4. package/dist/components/components/global-menu/components/GlobalMenuLanguage.vue.d.ts +1277 -0
  5. package/dist/components/components/google-map/GoogleMap.vue.d.ts +234 -0
  6. package/dist/components/components/google-map/components/GoogleMapMarker.vue.d.ts +73 -0
  7. package/dist/components/components/google-map/composables/AddPolygon.d.ts +2 -0
  8. package/dist/components/components/google-map/composables/AddTooltip.d.ts +30 -0
  9. package/dist/components/components/index.d.ts +2 -0
  10. package/dist/components/components/mega-nav/MegaNav.vue.d.ts +13 -13
  11. package/dist/components/components/navigation-bar/components/NavigationBarMenuDropdown.vue.d.ts +955 -0
  12. package/dist/components/components/social-share/SocialShare.vue.d.ts +1702 -0
  13. package/dist/components/custom-components/maps/MainMap.vue.d.ts +2 -2
  14. package/dist/components/custom-components/maps/components/MapSidebar.vue.d.ts +0 -22
  15. package/dist/components/custom-components/maps/composables/useUpdateSearchParams.d.ts +11 -0
  16. package/dist/components/custom-components/maps/index.d.ts +2 -54
  17. package/dist/components/map-pin-BLjt1O7o.js +4 -0
  18. package/dist/components/map-pin-fZzoZBi5.mjs +7 -0
  19. package/dist/components/stores/googleMap.store.d.ts +26 -0
  20. package/dist/components/stores/mainMap.store.d.ts +7 -1
  21. package/dist/components/stores/map.store.d.ts +1 -1
  22. package/dist/components/stores/mapCategory.store.d.ts +56 -0
  23. package/dist/components/style.css +1 -1
  24. package/dist/components/types/types.d.ts +30 -0
  25. package/dist/components/utils/is-apple-ios.d.ts +5 -0
  26. package/dist/components/vs-component-library.js +19 -11
  27. package/dist/components/vs-component-library.mjs +3349 -2680
  28. package/package.json +192 -192
@@ -0,0 +1,234 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
4
+ type __VLS_WithSlots<T, S> = T & (new () => {
5
+ $slots: S;
6
+ });
7
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
8
+ /**
9
+ * API Key for Google Maps
10
+ */
11
+ apiKey: {
12
+ type: StringConstructor;
13
+ default: any;
14
+ };
15
+ /**
16
+ * Initial center point for the map
17
+ */
18
+ center: {
19
+ type: ObjectConstructor;
20
+ default: () => {
21
+ lat: number;
22
+ lng: number;
23
+ };
24
+ };
25
+ /**
26
+ * Initial zoom level for the map
27
+ */
28
+ zoom: {
29
+ type: NumberConstructor;
30
+ default: number;
31
+ };
32
+ /**
33
+ * Map ID as set in the Google Maps Cloud Console,
34
+ * required for shading, styling, etc.
35
+ */
36
+ mapId: {
37
+ type: StringConstructor;
38
+ required: true;
39
+ };
40
+ /**
41
+ * Object to set optional map features, otherwise
42
+ * sensible defaults are set.
43
+ */
44
+ googleMapsOptions: {
45
+ type: ObjectConstructor;
46
+ default: () => {
47
+ clickableIcons: boolean;
48
+ gestureHandling: string;
49
+ isFractionalZoomEnabled: boolean;
50
+ renderingTypeVector: boolean;
51
+ };
52
+ };
53
+ /**
54
+ * The bounds of the map that the user will not be
55
+ * able to pan past.
56
+ */
57
+ mapBounds: {
58
+ type: ObjectConstructor;
59
+ default: () => void;
60
+ };
61
+ /**
62
+ * Determines whether the map should zoom out to show
63
+ * all of Scotland on initial load
64
+ */
65
+ initialViewIsScotland: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ /**
70
+ * Determines whether the map should zoom into the markers
71
+ * displayed, rather than respecting center & zoom props.
72
+ */
73
+ isViewToFitMarkers: {
74
+ type: BooleanConstructor;
75
+ default: boolean;
76
+ };
77
+ /**
78
+ * Enables/disables tooltips for the markers
79
+ */
80
+ isMarkerTooltipsEnabled: {
81
+ type: BooleanConstructor;
82
+ default: boolean;
83
+ };
84
+ /**
85
+ * Enables/disables tooltips for the polygons
86
+ */
87
+ isPolygonTooltipsEnabled: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
91
+ /**
92
+ * Array of polygon brxm features.
93
+ */
94
+ polygonData: {
95
+ type: ArrayConstructor;
96
+ default: () => any[];
97
+ };
98
+ /**
99
+ * ISO 639 Language code for map language
100
+ */
101
+ languageCode: {
102
+ type: StringConstructor;
103
+ default: string;
104
+ };
105
+ /**
106
+ * Object containing labels of UI Elements
107
+ */
108
+ uiLabels: {
109
+ type: ObjectConstructor;
110
+ required: true;
111
+ };
112
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
113
+ /**
114
+ * API Key for Google Maps
115
+ */
116
+ apiKey: {
117
+ type: StringConstructor;
118
+ default: any;
119
+ };
120
+ /**
121
+ * Initial center point for the map
122
+ */
123
+ center: {
124
+ type: ObjectConstructor;
125
+ default: () => {
126
+ lat: number;
127
+ lng: number;
128
+ };
129
+ };
130
+ /**
131
+ * Initial zoom level for the map
132
+ */
133
+ zoom: {
134
+ type: NumberConstructor;
135
+ default: number;
136
+ };
137
+ /**
138
+ * Map ID as set in the Google Maps Cloud Console,
139
+ * required for shading, styling, etc.
140
+ */
141
+ mapId: {
142
+ type: StringConstructor;
143
+ required: true;
144
+ };
145
+ /**
146
+ * Object to set optional map features, otherwise
147
+ * sensible defaults are set.
148
+ */
149
+ googleMapsOptions: {
150
+ type: ObjectConstructor;
151
+ default: () => {
152
+ clickableIcons: boolean;
153
+ gestureHandling: string;
154
+ isFractionalZoomEnabled: boolean;
155
+ renderingTypeVector: boolean;
156
+ };
157
+ };
158
+ /**
159
+ * The bounds of the map that the user will not be
160
+ * able to pan past.
161
+ */
162
+ mapBounds: {
163
+ type: ObjectConstructor;
164
+ default: () => void;
165
+ };
166
+ /**
167
+ * Determines whether the map should zoom out to show
168
+ * all of Scotland on initial load
169
+ */
170
+ initialViewIsScotland: {
171
+ type: BooleanConstructor;
172
+ default: boolean;
173
+ };
174
+ /**
175
+ * Determines whether the map should zoom into the markers
176
+ * displayed, rather than respecting center & zoom props.
177
+ */
178
+ isViewToFitMarkers: {
179
+ type: BooleanConstructor;
180
+ default: boolean;
181
+ };
182
+ /**
183
+ * Enables/disables tooltips for the markers
184
+ */
185
+ isMarkerTooltipsEnabled: {
186
+ type: BooleanConstructor;
187
+ default: boolean;
188
+ };
189
+ /**
190
+ * Enables/disables tooltips for the polygons
191
+ */
192
+ isPolygonTooltipsEnabled: {
193
+ type: BooleanConstructor;
194
+ default: boolean;
195
+ };
196
+ /**
197
+ * Array of polygon brxm features.
198
+ */
199
+ polygonData: {
200
+ type: ArrayConstructor;
201
+ default: () => any[];
202
+ };
203
+ /**
204
+ * ISO 639 Language code for map language
205
+ */
206
+ languageCode: {
207
+ type: StringConstructor;
208
+ default: string;
209
+ };
210
+ /**
211
+ * Object containing labels of UI Elements
212
+ */
213
+ uiLabels: {
214
+ type: ObjectConstructor;
215
+ required: true;
216
+ };
217
+ }>> & Readonly<{}>, {
218
+ center: Record<string, any>;
219
+ zoom: number;
220
+ apiKey: string;
221
+ googleMapsOptions: Record<string, any>;
222
+ mapBounds: Record<string, any>;
223
+ initialViewIsScotland: boolean;
224
+ isViewToFitMarkers: boolean;
225
+ isMarkerTooltipsEnabled: boolean;
226
+ isPolygonTooltipsEnabled: boolean;
227
+ polygonData: unknown[];
228
+ languageCode: string;
229
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
230
+ type __VLS_Slots = {
231
+ 'vs-google-map-marker'?: (props: {}) => any;
232
+ } & {
233
+ 'no-js'?: (props: {}) => any;
234
+ };
@@ -0,0 +1,73 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
4
+ type __VLS_WithSlots<T, S> = T & (new () => {
5
+ $slots: S;
6
+ });
7
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
8
+ /** Single object of BRXM Feature data */
9
+ featureData: {
10
+ type: ObjectConstructor;
11
+ required: true;
12
+ };
13
+ /** SVG Compatible colour (Hex/String/RGB()),
14
+ * Defaults to #33225D (vs-color-background-accent-heather-80 token) */
15
+ pinColor: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ /** Flag to turn on/off tooltips for the marker */
20
+ markerTooltipsEnabled: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ /** Flag to allow for more granular control of the marker tooltip/active state */
25
+ handleMarkerBehaviourExternally: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ }>, {
30
+ showTooltip: () => void;
31
+ hideTooltip: () => void;
32
+ resetPin: () => void;
33
+ handleSetMarkerActive: typeof handleSetMarkerActive;
34
+ handleRemoveMarkerActive: typeof handleRemoveMarkerActive;
35
+ markerHovered: import('vue').Ref<any, any> & import('vue').ComputedRef<any>;
36
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
37
+ markerClick: (...args: any[]) => void;
38
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
39
+ /** Single object of BRXM Feature data */
40
+ featureData: {
41
+ type: ObjectConstructor;
42
+ required: true;
43
+ };
44
+ /** SVG Compatible colour (Hex/String/RGB()),
45
+ * Defaults to #33225D (vs-color-background-accent-heather-80 token) */
46
+ pinColor: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ /** Flag to turn on/off tooltips for the marker */
51
+ markerTooltipsEnabled: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ /** Flag to allow for more granular control of the marker tooltip/active state */
56
+ handleMarkerBehaviourExternally: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ }>> & Readonly<{
61
+ onMarkerClick?: (...args: any[]) => any;
62
+ }>, {
63
+ pinColor: string;
64
+ markerTooltipsEnabled: boolean;
65
+ handleMarkerBehaviourExternally: boolean;
66
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
67
+ type __VLS_Slots = {
68
+ 'vs-google-map-marker-content'?: (props: {}) => any;
69
+ } & {
70
+ 'vs-google-map-marker-content'?: (props: {}) => any;
71
+ };
72
+ declare function handleSetMarkerActive(markerID: any): void;
73
+ declare function handleRemoveMarkerActive(markerID: any): void;
@@ -0,0 +1,2 @@
1
+ import { BrxmFeature } from '../../../types/types';
2
+ export default function addPolygon(map: google.maps.Map, feature: BrxmFeature, isPolygonTooltipsEnabled: boolean): void;
@@ -0,0 +1,30 @@
1
+ import { BrxmFeatureProperties } from '../../../types/types';
2
+ export default function createTooltip(mapsLibrary: google.maps.MapsLibrary): {
3
+ new (map: google.maps.Map, location: google.maps.LatLng, properties: BrxmFeatureProperties, isMarker?: boolean): {
4
+ map: google.maps.Map;
5
+ location: google.maps.LatLng;
6
+ properties: BrxmFeatureProperties;
7
+ isMarker: boolean;
8
+ tooltipContainer?: HTMLDivElement;
9
+ onAdd(): void;
10
+ onRemove(): void;
11
+ draw(): void;
12
+ toggleDOM(): void;
13
+ show(): void;
14
+ hide(): void;
15
+ getMap(): google.maps.Map | google.maps.StreetViewPanorama | null | undefined;
16
+ getPanes(): google.maps.MapPanes | null | undefined;
17
+ getProjection(): google.maps.MapCanvasProjection;
18
+ setMap(map: google.maps.Map | google.maps.StreetViewPanorama | null): void;
19
+ addListener(eventName: string, handler: Function): google.maps.MapsEventListener;
20
+ bindTo(key: string, target: google.maps.MVCObject, targetKey?: string | null, noNotify?: boolean): void;
21
+ get(key: string): any;
22
+ notify(key: string): void;
23
+ set(key: string, value: unknown): void;
24
+ setValues(values?: object | null): void;
25
+ unbind(key: string): void;
26
+ unbindAll(): void;
27
+ };
28
+ preventMapHitsAndGesturesFrom(element: Element): void;
29
+ preventMapHitsFrom(element: Element): void;
30
+ };
@@ -43,6 +43,8 @@ export { default as VsFooterCopyright } from './footer/components/FooterCopyrigh
43
43
  export { default as VsGlobalMenu } from './global-menu/GlobalMenu.vue';
44
44
  export { default as VsGlobalMenuLanguage } from './global-menu/components/GlobalMenuLanguage.vue';
45
45
  export { default as VsGlobalMenuLanguageItem } from './global-menu/components/GlobalMenuLanguageItem.vue';
46
+ export { default as VsGoogleMap } from './google-map/GoogleMap.vue';
47
+ export { default as VsGoogleMapMarker } from './google-map/components/GoogleMapMarker.vue';
46
48
  export { default as VsCol } from './grid/Col.vue';
47
49
  export { default as VsContainer } from './grid/Container.vue';
48
50
  export { default as VsRow } from './grid/Row.vue';
@@ -318,7 +318,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
318
318
  duration_base: string;
319
319
  duration_slowly: string;
320
320
  };
321
- visitscotlandLogo: string;
321
+ visitscotlandLogo: any;
322
322
  }, {}, {
323
323
  /**
324
324
  * Toggles dropdown menu property
@@ -830,7 +830,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
830
830
  routerTag?: string;
831
831
  stretched?: boolean;
832
832
  target?: import('bootstrap-vue-next').LinkTarget;
833
- to?: RouteLocationRaw;
833
+ to?: visitscotlandLogo;
834
834
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
835
835
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
836
836
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -915,7 +915,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
915
915
  routerTag?: string;
916
916
  stretched?: boolean;
917
917
  target?: import('bootstrap-vue-next').LinkTarget;
918
- to?: RouteLocationRaw;
918
+ to?: visitscotlandLogo;
919
919
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
920
920
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
921
921
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -992,7 +992,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
992
992
  routerTag?: string;
993
993
  stretched?: boolean;
994
994
  target?: import('bootstrap-vue-next').LinkTarget;
995
- to?: RouteLocationRaw;
995
+ to?: visitscotlandLogo;
996
996
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
997
997
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
998
998
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -2133,7 +2133,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
2133
2133
  routerTag?: string;
2134
2134
  stretched?: boolean;
2135
2135
  target?: import('bootstrap-vue-next').LinkTarget;
2136
- to?: RouteLocationRaw;
2136
+ to?: visitscotlandLogo;
2137
2137
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
2138
2138
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
2139
2139
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -2218,7 +2218,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
2218
2218
  routerTag?: string;
2219
2219
  stretched?: boolean;
2220
2220
  target?: import('bootstrap-vue-next').LinkTarget;
2221
- to?: RouteLocationRaw;
2221
+ to?: visitscotlandLogo;
2222
2222
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
2223
2223
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
2224
2224
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -2295,7 +2295,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
2295
2295
  routerTag?: string;
2296
2296
  stretched?: boolean;
2297
2297
  target?: import('bootstrap-vue-next').LinkTarget;
2298
- to?: RouteLocationRaw;
2298
+ to?: visitscotlandLogo;
2299
2299
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
2300
2300
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
2301
2301
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -2819,7 +2819,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
2819
2819
  routerTag?: string;
2820
2820
  stretched?: boolean;
2821
2821
  target?: import('bootstrap-vue-next').LinkTarget;
2822
- to?: RouteLocationRaw;
2822
+ to?: visitscotlandLogo;
2823
2823
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
2824
2824
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
2825
2825
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -2904,7 +2904,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
2904
2904
  routerTag?: string;
2905
2905
  stretched?: boolean;
2906
2906
  target?: import('bootstrap-vue-next').LinkTarget;
2907
- to?: RouteLocationRaw;
2907
+ to?: visitscotlandLogo;
2908
2908
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
2909
2909
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
2910
2910
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -2981,7 +2981,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
2981
2981
  routerTag?: string;
2982
2982
  stretched?: boolean;
2983
2983
  target?: import('bootstrap-vue-next').LinkTarget;
2984
- to?: RouteLocationRaw;
2984
+ to?: visitscotlandLogo;
2985
2985
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
2986
2986
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
2987
2987
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -3627,7 +3627,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
3627
3627
  routerTag?: string;
3628
3628
  stretched?: boolean;
3629
3629
  target?: import('bootstrap-vue-next').LinkTarget;
3630
- to?: RouteLocationRaw;
3630
+ to?: visitscotlandLogo;
3631
3631
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
3632
3632
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
3633
3633
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -3712,7 +3712,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
3712
3712
  routerTag?: string;
3713
3713
  stretched?: boolean;
3714
3714
  target?: import('bootstrap-vue-next').LinkTarget;
3715
- to?: RouteLocationRaw;
3715
+ to?: visitscotlandLogo;
3716
3716
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
3717
3717
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
3718
3718
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;
@@ -3789,7 +3789,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
3789
3789
  routerTag?: string;
3790
3790
  stretched?: boolean;
3791
3791
  target?: import('bootstrap-vue-next').LinkTarget;
3792
- to?: RouteLocationRaw;
3792
+ to?: visitscotlandLogo;
3793
3793
  underlineOffset?: import('bootstrap-vue-next').UnderlineOffset;
3794
3794
  underlineOffsetHover?: import('bootstrap-vue-next').UnderlineOffset;
3795
3795
  underlineOpacity?: import('bootstrap-vue-next').UnderlineOpacity;