@visitscotland/component-library 1.0.13 → 1.0.15

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/CHANGELOG.md CHANGED
@@ -2,89 +2,109 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [1.0.13](https://github.com/visitscotland/vs-component-library/compare/v1.0.12...v1.0.13) (2023-08-16)
6
-
7
-
8
- ### ✨ Features
9
-
10
- * **map:** adds Outlander icons and themes for maps ([50ddc04](https://github.com/visitscotland/vs-component-library/commit/50ddc046c093cbfd75fe6c72b694a1e89ad1c609))
11
-
12
-
13
- ### 🎨 Styling
14
-
15
- * **map:** update height of the map module ([542a455](https://github.com/visitscotland/vs-component-library/commit/542a45506725f2afadd78367ef80a774c5fbe7db))
16
-
17
-
18
- ### 🔖 Others
19
-
20
- * add badges to README.md ([6dd823a](https://github.com/visitscotland/vs-component-library/commit/6dd823a8caefd786c528242fcd93700b5251b5c7))
21
- * add contribution guidelines and code of conduct ([6bf1764](https://github.com/visitscotland/vs-component-library/commit/6bf176469a094c509bbe1716968d349de8e1f177))
22
- * add contribution links to README.md ([a6a21d4](https://github.com/visitscotland/vs-component-library/commit/a6a21d4b13612571a65459fef3c703d45fe8a8da))
23
- * add contributor covenant badge to README.md ([e97840d](https://github.com/visitscotland/vs-component-library/commit/e97840df67affd041a0883c62262af2d643043a3))
24
- * add email address to code of conduct ([11cd613](https://github.com/visitscotland/vs-component-library/commit/11cd613f4cbc5ff530c1e36622aad2f622e9290d))
25
- * add security.md file ([de88335](https://github.com/visitscotland/vs-component-library/commit/de88335429593053aac434dcba232f35a022e0f0))
26
- * add Yarn Test badge ([0ac5afc](https://github.com/visitscotland/vs-component-library/commit/0ac5afcd2e142cdb5f4dee9d97b023c132cfaf19))
27
- * **package.json:** add Theo to build script ([9f9a5c5](https://github.com/visitscotland/vs-component-library/commit/9f9a5c59b036638c839f61241f5108981c55d96e))
28
- * **release:** 1.0.14 ([7bb68f8](https://github.com/visitscotland/vs-component-library/commit/7bb68f801aca6ce8661a778d8c095cf79603d65b))
29
- * **tokens:** remove auto-generated tokens from the repo ([46b3ebf](https://github.com/visitscotland/vs-component-library/commit/46b3ebf5b46e0d6e9fd1d5488d245318bfa60812))
30
- * update code of conduct ([1315c1a](https://github.com/visitscotland/vs-component-library/commit/1315c1a1a6d652909feb80bbede34df973d41338))
31
- * update email address in security policy ([36cc62e](https://github.com/visitscotland/vs-component-library/commit/36cc62e179b61f0e08aa899391e0fce98a320cdb))
32
- * update email addresses in code of conduct and contribution guide ([63472aa](https://github.com/visitscotland/vs-component-library/commit/63472aa0049045441e315aa81b4ad78358f278a6))
33
- * update README.md with licence info ([2de656b](https://github.com/visitscotland/vs-component-library/commit/2de656b121d4b8c0aeb3dd535729eac4adcd88dd))
34
- * update visitscotland badge URL ([ff387ea](https://github.com/visitscotland/vs-component-library/commit/ff387ea11bc8df7d9602b2f470d5b020cd990091))
35
-
36
- ### [1.0.12](https://github.com/visitscotland/vs-component-library/compare/v1.0.11...v1.0.12) (2023-08-09)
37
-
38
-
39
- ### 🐛 Bug Fixes
40
-
41
- * **third party:** styles in correct place ([4c8b28a](https://github.com/visitscotland/vs-component-library/commit/4c8b28ab004dedd928ffba5cc981a1c50d0324ce))
42
-
43
- ### [1.0.11](https://github.com/visitscotland/vs-component-library/compare/v1.0.10...v1.0.11) (2023-08-08)
44
-
45
-
46
- ### ✨ Features
47
-
48
- * **table:** simply data and fix stacked styles ([c89405b](https://github.com/visitscotland/vs-component-library/commit/c89405b14a0ac65db141fe12cda275660f6e3f98))
49
- * **workflow:** run tests on pr creation ([2a883b5](https://github.com/visitscotland/vs-component-library/commit/2a883b5e80bef222fe0309f64e5c3eec46f12f84))
5
+ ### [1.0.15](https://github.com/visitscotland/vs-component-library/compare/v1.0.14...v1.0.15) (2023-08-28)
50
6
 
51
7
 
52
8
  ### 🔖 Others
53
9
 
54
- * fix dependabot issue by upgrading resolutions entries ([0a27a34](https://github.com/visitscotland/vs-component-library/commit/0a27a34f2b409fb0ac1017fa25641dae9d2f6995))
55
-
56
-
57
- ### 🐛 Bug Fixes
58
-
59
- * **carousel:** set image urls locally instead of using image from the production site ([2affbe7](https://github.com/visitscotland/vs-component-library/commit/2affbe77e390d8404901d500b0d760c7d7881423))
60
- * **input:** fix validation logic and validation test ([d0060a0](https://github.com/visitscotland/vs-component-library/commit/d0060a0203621e2140341dfc1c63824c2117247b))
61
- * **meganav:** set image urls locally instead of using image from the production site ([8059770](https://github.com/visitscotland/vs-component-library/commit/80597705e68df64844b7e7d117f036e01f3bc9f3))
62
- * **table:** correct table story usage of header ([ccba843](https://github.com/visitscotland/vs-component-library/commit/ccba84309184ce2dd721f7312b176366ad3e0bfa))
63
- * **table:** fix stacked table ([b6773e9](https://github.com/visitscotland/vs-component-library/commit/b6773e915e0ab9cae47f02c3e15d3fecbc0d80d4))
64
- * **tests:** fix logic on carousel throttling test ([d031ff6](https://github.com/visitscotland/vs-component-library/commit/d031ff6481a9ff860e2d2bc5770781af014304d2))
65
- * **tests:** mock map store to and mapboxgl to fix map tests ([ef58f03](https://github.com/visitscotland/vs-component-library/commit/ef58f037d25c364f6bf52f93072747966e064c9c))
66
- * **tests:** mock video for tests and fix other testing logic ([e0bbd36](https://github.com/visitscotland/vs-component-library/commit/e0bbd36c5c76763e6ca691d5829a573bf0262271))
67
- * **tests:** mock window.url.createobjecturl for map wrapper tests ([52ad076](https://github.com/visitscotland/vs-component-library/commit/52ad0764a695424f533537dc2dcf17b18da32990))
68
- * **third party:** fix third party styles and build them in main script ([b9c9753](https://github.com/visitscotland/vs-component-library/commit/b9c97537e50197371f05336126d8f64bc601239f))
69
- * **video:** ensure cookie init status sets to error if onetrust doesn't initiate ([d9caa5d](https://github.com/visitscotland/vs-component-library/commit/d9caa5d30b160232296e3b8e46f264819ca94db3))
70
- * **workflow:** only run on one node version ([3aa0471](https://github.com/visitscotland/vs-component-library/commit/3aa04710e0ff90814f796b1a8b853b38c1338052))
71
-
72
- ### [1.0.10](https://github.com/visitscotland/vs-component-library/compare/v1.0.9...v1.0.10) (2023-08-04)
73
-
74
-
75
- ### 🐛 Bug Fixes
76
-
77
- * **meganav:** ensure search bar is open before focussing input ([7a6311d](https://github.com/visitscotland/vs-component-library/commit/7a6311d478e017c5d7a32894afec9cd88f8b57b6))
78
-
79
- ### [1.0.9](https://github.com/visitscotland/vs-component-library/compare/v1.0.8...v1.0.9) (2023-08-03)
80
-
81
-
82
- ### 📝 Docs
83
-
84
- * **socialshare.stories.js:** wrap the component in an absolutely positioned div ([8907dd7](https://github.com/visitscotland/vs-component-library/commit/8907dd735a3b421e7c26a004597c528d6b737505))
10
+ * **storybook:** upgrade Storybook to latest version ([2dc6e00](https://github.com/visitscotland/vs-component-library/commit/2dc6e00231e445c78ced57239fbe5028a71614f3))
85
11
 
86
12
 
87
13
  ### 🐛 Bug Fixes
88
14
 
89
- * **socialshare.vue:** add container prop set to "body" ([3edc3b8](https://github.com/visitscotland/vs-component-library/commit/3edc3b84932f3b19969caa39a329af71316852b1))
90
- * **ssr:** bring lazy hydrate fix over from other repo ([b707973](https://github.com/visitscotland/vs-component-library/commit/b707973d90ea9212eed71ca30b550c3a1fd1fde8))
15
+ * **map:** bug fixes for map component ([3a90089](https://github.com/visitscotland/vs-component-library/commit/3a9008905564c2b7f2d88e9010b6d4bbbb155795))
16
+ * **map:** remove console.log statement ([c4b7b72](https://github.com/visitscotland/vs-component-library/commit/c4b7b724f33da1989346a163775bf4e6c76d15ba))
17
+
18
+ ### [1.0.14](https://github.com/visitscotland/vs-component-library/compare/v1.0.13...v1.0.14) (2023-08-18)
19
+
20
+
21
+ ### 🐛 Bug Fixes
22
+
23
+ * **map:** fix map heading so the selected category is always displayed at the top ([b05a08c](https://github.com/visitscotland/vs-component-library/commit/b05a08c4e148294bc39e84bae7d99695bb8dc746))
24
+
25
+ ### [1.0.13](https://github.com/visitscotland/vs-component-library/compare/v1.0.12...v1.0.13) (2023-08-16)
26
+
27
+
28
+ ### ✨ Features
29
+
30
+ * **map:** adds Outlander icons and themes for maps ([50ddc04](https://github.com/visitscotland/vs-component-library/commit/50ddc046c093cbfd75fe6c72b694a1e89ad1c609))
31
+
32
+
33
+ ### 🎨 Styling
34
+
35
+ * **map:** update height of the map module ([542a455](https://github.com/visitscotland/vs-component-library/commit/542a45506725f2afadd78367ef80a774c5fbe7db))
36
+
37
+
38
+ ### 🔖 Others
39
+
40
+ * add badges to README.md ([6dd823a](https://github.com/visitscotland/vs-component-library/commit/6dd823a8caefd786c528242fcd93700b5251b5c7))
41
+ * add contribution guidelines and code of conduct ([6bf1764](https://github.com/visitscotland/vs-component-library/commit/6bf176469a094c509bbe1716968d349de8e1f177))
42
+ * add contribution links to README.md ([a6a21d4](https://github.com/visitscotland/vs-component-library/commit/a6a21d4b13612571a65459fef3c703d45fe8a8da))
43
+ * add contributor covenant badge to README.md ([e97840d](https://github.com/visitscotland/vs-component-library/commit/e97840df67affd041a0883c62262af2d643043a3))
44
+ * add email address to code of conduct ([11cd613](https://github.com/visitscotland/vs-component-library/commit/11cd613f4cbc5ff530c1e36622aad2f622e9290d))
45
+ * add security.md file ([de88335](https://github.com/visitscotland/vs-component-library/commit/de88335429593053aac434dcba232f35a022e0f0))
46
+ * add Yarn Test badge ([0ac5afc](https://github.com/visitscotland/vs-component-library/commit/0ac5afcd2e142cdb5f4dee9d97b023c132cfaf19))
47
+ * **package.json:** add Theo to build script ([9f9a5c5](https://github.com/visitscotland/vs-component-library/commit/9f9a5c59b036638c839f61241f5108981c55d96e))
48
+ * **release:** 1.0.14 ([7bb68f8](https://github.com/visitscotland/vs-component-library/commit/7bb68f801aca6ce8661a778d8c095cf79603d65b))
49
+ * **tokens:** remove auto-generated tokens from the repo ([46b3ebf](https://github.com/visitscotland/vs-component-library/commit/46b3ebf5b46e0d6e9fd1d5488d245318bfa60812))
50
+ * update code of conduct ([1315c1a](https://github.com/visitscotland/vs-component-library/commit/1315c1a1a6d652909feb80bbede34df973d41338))
51
+ * update email address in security policy ([36cc62e](https://github.com/visitscotland/vs-component-library/commit/36cc62e179b61f0e08aa899391e0fce98a320cdb))
52
+ * update email addresses in code of conduct and contribution guide ([63472aa](https://github.com/visitscotland/vs-component-library/commit/63472aa0049045441e315aa81b4ad78358f278a6))
53
+ * update README.md with licence info ([2de656b](https://github.com/visitscotland/vs-component-library/commit/2de656b121d4b8c0aeb3dd535729eac4adcd88dd))
54
+ * update visitscotland badge URL ([ff387ea](https://github.com/visitscotland/vs-component-library/commit/ff387ea11bc8df7d9602b2f470d5b020cd990091))
55
+
56
+ ### [1.0.12](https://github.com/visitscotland/vs-component-library/compare/v1.0.11...v1.0.12) (2023-08-09)
57
+
58
+
59
+ ### 🐛 Bug Fixes
60
+
61
+ * **third party:** styles in correct place ([4c8b28a](https://github.com/visitscotland/vs-component-library/commit/4c8b28ab004dedd928ffba5cc981a1c50d0324ce))
62
+
63
+ ### [1.0.11](https://github.com/visitscotland/vs-component-library/compare/v1.0.10...v1.0.11) (2023-08-08)
64
+
65
+
66
+ ### ✨ Features
67
+
68
+ * **table:** simply data and fix stacked styles ([c89405b](https://github.com/visitscotland/vs-component-library/commit/c89405b14a0ac65db141fe12cda275660f6e3f98))
69
+ * **workflow:** run tests on pr creation ([2a883b5](https://github.com/visitscotland/vs-component-library/commit/2a883b5e80bef222fe0309f64e5c3eec46f12f84))
70
+
71
+
72
+ ### 🔖 Others
73
+
74
+ * fix dependabot issue by upgrading resolutions entries ([0a27a34](https://github.com/visitscotland/vs-component-library/commit/0a27a34f2b409fb0ac1017fa25641dae9d2f6995))
75
+
76
+
77
+ ### 🐛 Bug Fixes
78
+
79
+ * **carousel:** set image urls locally instead of using image from the production site ([2affbe7](https://github.com/visitscotland/vs-component-library/commit/2affbe77e390d8404901d500b0d760c7d7881423))
80
+ * **input:** fix validation logic and validation test ([d0060a0](https://github.com/visitscotland/vs-component-library/commit/d0060a0203621e2140341dfc1c63824c2117247b))
81
+ * **meganav:** set image urls locally instead of using image from the production site ([8059770](https://github.com/visitscotland/vs-component-library/commit/80597705e68df64844b7e7d117f036e01f3bc9f3))
82
+ * **table:** correct table story usage of header ([ccba843](https://github.com/visitscotland/vs-component-library/commit/ccba84309184ce2dd721f7312b176366ad3e0bfa))
83
+ * **table:** fix stacked table ([b6773e9](https://github.com/visitscotland/vs-component-library/commit/b6773e915e0ab9cae47f02c3e15d3fecbc0d80d4))
84
+ * **tests:** fix logic on carousel throttling test ([d031ff6](https://github.com/visitscotland/vs-component-library/commit/d031ff6481a9ff860e2d2bc5770781af014304d2))
85
+ * **tests:** mock map store to and mapboxgl to fix map tests ([ef58f03](https://github.com/visitscotland/vs-component-library/commit/ef58f037d25c364f6bf52f93072747966e064c9c))
86
+ * **tests:** mock video for tests and fix other testing logic ([e0bbd36](https://github.com/visitscotland/vs-component-library/commit/e0bbd36c5c76763e6ca691d5829a573bf0262271))
87
+ * **tests:** mock window.url.createobjecturl for map wrapper tests ([52ad076](https://github.com/visitscotland/vs-component-library/commit/52ad0764a695424f533537dc2dcf17b18da32990))
88
+ * **third party:** fix third party styles and build them in main script ([b9c9753](https://github.com/visitscotland/vs-component-library/commit/b9c97537e50197371f05336126d8f64bc601239f))
89
+ * **video:** ensure cookie init status sets to error if onetrust doesn't initiate ([d9caa5d](https://github.com/visitscotland/vs-component-library/commit/d9caa5d30b160232296e3b8e46f264819ca94db3))
90
+ * **workflow:** only run on one node version ([3aa0471](https://github.com/visitscotland/vs-component-library/commit/3aa04710e0ff90814f796b1a8b853b38c1338052))
91
+
92
+ ### [1.0.10](https://github.com/visitscotland/vs-component-library/compare/v1.0.9...v1.0.10) (2023-08-04)
93
+
94
+
95
+ ### 🐛 Bug Fixes
96
+
97
+ * **meganav:** ensure search bar is open before focussing input ([7a6311d](https://github.com/visitscotland/vs-component-library/commit/7a6311d478e017c5d7a32894afec9cd88f8b57b6))
98
+
99
+ ### [1.0.9](https://github.com/visitscotland/vs-component-library/compare/v1.0.8...v1.0.9) (2023-08-03)
100
+
101
+
102
+ ### 📝 Docs
103
+
104
+ * **socialshare.stories.js:** wrap the component in an absolutely positioned div ([8907dd7](https://github.com/visitscotland/vs-component-library/commit/8907dd735a3b421e7c26a004597c528d6b737505))
105
+
106
+
107
+ ### 🐛 Bug Fixes
108
+
109
+ * **socialshare.vue:** add container prop set to "body" ([3edc3b8](https://github.com/visitscotland/vs-component-library/commit/3edc3b84932f3b19969caa39a329af71316852b1))
110
+ * **ssr:** bring lazy hydrate fix over from other repo ([b707973](https://github.com/visitscotland/vs-component-library/commit/b707973d90ea9212eed71ca30b550c3a1fd1fde8))
@@ -1351,7 +1351,7 @@
1351
1351
  "scripts/bb5f66fdff1806a7b91d.js",
1352
1352
  "scripts/af20ced2e34b6801258c.js",
1353
1353
  "scripts/d0fd50a5b063d113a609.js",
1354
- "scripts/3a1d3a02c238d41c9e68.js",
1354
+ "scripts/9f24f39f39375ad29408.js",
1355
1355
  "scripts/8f94c579870278535ad8.js",
1356
1356
  "scripts/d2b72d2f799a68620b20.js",
1357
1357
  "scripts/7757ce3ea4d54690a958.js",
@@ -1378,7 +1378,7 @@
1378
1378
  "styles/bb5f66fdff1806a7b91d.css",
1379
1379
  "styles/af20ced2e34b6801258c.css",
1380
1380
  "styles/d0fd50a5b063d113a609.css",
1381
- "styles/3a1d3a02c238d41c9e68.css",
1381
+ "styles/9f24f39f39375ad29408.css",
1382
1382
  "styles/7757ce3ea4d54690a958.css",
1383
1383
  "styles/f80af738a342894b1e70.css",
1384
1384
  "styles/b75cfdb317cbf454148d.css",
@@ -3463,14 +3463,14 @@
3463
3463
  "scripts/c1e52b98d340cd47fee7.js",
3464
3464
  "scripts/ae5c80d270825f9d87fa.js",
3465
3465
  "scripts/af20ced2e34b6801258c.js",
3466
- "scripts/a0a3c5c4f4a1952db9c3.js",
3466
+ "scripts/026f994c17378bff06a3.js",
3467
3467
  "scripts/398fea35a3b24443e5a8.js"
3468
3468
  ],
3469
3469
  "styles": [
3470
3470
  "styles/c1e52b98d340cd47fee7.css",
3471
3471
  "styles/ae5c80d270825f9d87fa.css",
3472
3472
  "styles/af20ced2e34b6801258c.css",
3473
- "styles/a0a3c5c4f4a1952db9c3.css"
3473
+ "styles/026f994c17378bff06a3.css"
3474
3474
  ]
3475
3475
  },
3476
3476
  "VsMainMapWrapperIcon": {
@@ -3586,7 +3586,7 @@
3586
3586
  "scripts/d83b18cb157603b0cef0.js",
3587
3587
  "scripts/675558e1c1ca13dceb13.js",
3588
3588
  "scripts/3c9d8724e602abc493bb.js",
3589
- "scripts/601b7a91a71eaf767d0d.js",
3589
+ "scripts/6d07124bb59c23f79a29.js",
3590
3590
  "scripts/980e46faf302990630b5.js"
3591
3591
  ],
3592
3592
  "styles": [
@@ -3597,7 +3597,7 @@
3597
3597
  "styles/aa260d81d6025b38f93b.css",
3598
3598
  "styles/d83b18cb157603b0cef0.css",
3599
3599
  "styles/675558e1c1ca13dceb13.css",
3600
- "styles/601b7a91a71eaf767d0d.css"
3600
+ "styles/6d07124bb59c23f79a29.css"
3601
3601
  ]
3602
3602
  },
3603
3603
  "VsMainMapWrapperMarker": {
@@ -3679,10 +3679,10 @@
3679
3679
  "scripts/c5992240a3f3d7197c2b.js",
3680
3680
  "scripts/e62d810e4ba9cb91fd03.js",
3681
3681
  "scripts/c2c21d2a64dc273bc13b.js",
3682
- "scripts/a0a3c5c4f4a1952db9c3.js",
3682
+ "scripts/026f994c17378bff06a3.js",
3683
3683
  "scripts/1571e0de0d235cbb16c8.js",
3684
3684
  "scripts/5f0a0570c71b9cc82d41.js",
3685
- "scripts/b189558cf6031aa6564c.js",
3685
+ "scripts/35ffeb6941520c33adfe.js",
3686
3686
  "scripts/018afcd7924ff1c127ab.js"
3687
3687
  ],
3688
3688
  "styles": [
@@ -3694,10 +3694,10 @@
3694
3694
  "styles/c5992240a3f3d7197c2b.css",
3695
3695
  "styles/e62d810e4ba9cb91fd03.css",
3696
3696
  "styles/c2c21d2a64dc273bc13b.css",
3697
- "styles/a0a3c5c4f4a1952db9c3.css",
3697
+ "styles/026f994c17378bff06a3.css",
3698
3698
  "styles/1571e0de0d235cbb16c8.css",
3699
3699
  "styles/5f0a0570c71b9cc82d41.css",
3700
- "styles/b189558cf6031aa6564c.css"
3700
+ "styles/35ffeb6941520c33adfe.css"
3701
3701
  ]
3702
3702
  },
3703
3703
  "VsMainMapWrapperSubcategory": {
@@ -3813,12 +3813,12 @@
3813
3813
  "scripts/e62d810e4ba9cb91fd03.js",
3814
3814
  "scripts/675558e1c1ca13dceb13.js",
3815
3815
  "scripts/c2c21d2a64dc273bc13b.js",
3816
- "scripts/a0a3c5c4f4a1952db9c3.js",
3816
+ "scripts/026f994c17378bff06a3.js",
3817
3817
  "scripts/1571e0de0d235cbb16c8.js",
3818
3818
  "scripts/5f0a0570c71b9cc82d41.js",
3819
3819
  "scripts/3c9d8724e602abc493bb.js",
3820
- "scripts/601b7a91a71eaf767d0d.js",
3821
- "scripts/b189558cf6031aa6564c.js",
3820
+ "scripts/6d07124bb59c23f79a29.js",
3821
+ "scripts/35ffeb6941520c33adfe.js",
3822
3822
  "scripts/aa3967ab6e1ea94a93bd.js",
3823
3823
  "scripts/94aa5ac955de9ed0d840.js"
3824
3824
  ],
@@ -3836,11 +3836,11 @@
3836
3836
  "styles/e62d810e4ba9cb91fd03.css",
3837
3837
  "styles/675558e1c1ca13dceb13.css",
3838
3838
  "styles/c2c21d2a64dc273bc13b.css",
3839
- "styles/a0a3c5c4f4a1952db9c3.css",
3839
+ "styles/026f994c17378bff06a3.css",
3840
3840
  "styles/1571e0de0d235cbb16c8.css",
3841
3841
  "styles/5f0a0570c71b9cc82d41.css",
3842
- "styles/601b7a91a71eaf767d0d.css",
3843
- "styles/b189558cf6031aa6564c.css",
3842
+ "styles/6d07124bb59c23f79a29.css",
3843
+ "styles/35ffeb6941520c33adfe.css",
3844
3844
  "styles/aa3967ab6e1ea94a93bd.css",
3845
3845
  "styles/94aa5ac955de9ed0d840.css"
3846
3846
  ]
@@ -4649,14 +4649,14 @@
4649
4649
  "scripts/c3b673fbfb24084ec12a.js",
4650
4650
  "scripts/ae5c80d270825f9d87fa.js",
4651
4651
  "scripts/d0fd50a5b063d113a609.js",
4652
- "scripts/3a1d3a02c238d41c9e68.js",
4652
+ "scripts/9f24f39f39375ad29408.js",
4653
4653
  "scripts/a909e086f67eace7ad31.js"
4654
4654
  ],
4655
4655
  "styles": [
4656
4656
  "styles/66b8a5d09a8317bd9092.css",
4657
4657
  "styles/ae5c80d270825f9d87fa.css",
4658
4658
  "styles/d0fd50a5b063d113a609.css",
4659
- "styles/3a1d3a02c238d41c9e68.css"
4659
+ "styles/9f24f39f39375ad29408.css"
4660
4660
  ]
4661
4661
  },
4662
4662
  "VsPageIntro": {
@@ -5190,7 +5190,7 @@
5190
5190
  "scripts/c3b673fbfb24084ec12a.js",
5191
5191
  "scripts/ae5c80d270825f9d87fa.js",
5192
5192
  "scripts/d0fd50a5b063d113a609.js",
5193
- "scripts/3a1d3a02c238d41c9e68.js",
5193
+ "scripts/9f24f39f39375ad29408.js",
5194
5194
  "scripts/c455e61a9f00f29a5b06.js"
5195
5195
  ],
5196
5196
  "styles": [
@@ -5199,7 +5199,7 @@
5199
5199
  "styles/66b8a5d09a8317bd9092.css",
5200
5200
  "styles/ae5c80d270825f9d87fa.css",
5201
5201
  "styles/d0fd50a5b063d113a609.css",
5202
- "styles/3a1d3a02c238d41c9e68.css",
5202
+ "styles/9f24f39f39375ad29408.css",
5203
5203
  "styles/c455e61a9f00f29a5b06.css"
5204
5204
  ]
5205
5205
  },
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[6520],{35186:function(){},24796:function(t,e,a){"use strict";var n=a(2015),i=a(73366);e.Z={name:"VsMainMapWrapperDetail",status:"prototype",release:"0.0.1",components:{VsImg:n.default,VsHeading:i.default},props:{contentData:{type:Object,required:!0},headingLevel:{type:String,default:"3"}},computed:{showTitle:function(){return void 0!==this.contentData.properties.title||void 0!==this.contentData.properties.placeTitle}}}},22316:function(t,e,a){"use strict";a.d(e,{s:function(){return l}});var n=a(66252),i=a(3577),s={class:"vs-main-map-wrapper-detail","data-test":"vs-main-map-wrapper-detail"},r={key:2,"data-test":"vs-main-map-wrapper-detail__address",class:"vs-main-map-wrapper-detail__address"},p={key:3,class:"mt-4"},o=["innerHTML"];function l(t,e,a,l,c,d){var u=(0,n.up)("VsImg"),m=(0,n.up)("VsHeading");return(0,n.wg)(),(0,n.iD)("div",s,[void 0!==a.contentData.properties.image?((0,n.wg)(),(0,n.j4)(u,{key:0,src:a.contentData.properties.image,class:"vs-main-map-wrapper-detail__image mb-5 mb-lg-3"},null,8,["src"])):(0,n.kq)("",!0),d.showTitle?((0,n.wg)(),(0,n.j4)(m,{key:1,level:a.headingLevel,"override-style-level":"4",class:"vs-main-map-wrapper-detail__heading mt-0","data-test":"vs-main-map-wrapper-detail__heading"},{default:(0,n.w5)((function(){return[void 0!==a.contentData.properties.placeTitle?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n.Uk)((0,i.toDisplayString)(a.contentData.properties.placeTitle),1)],64)):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,i.toDisplayString)(a.contentData.properties.title),1)],64))]})),_:1},8,["level"])):(0,n.kq)("",!0),void 0!==a.contentData.properties.address?((0,n.wg)(),(0,n.iD)("p",r,(0,i.toDisplayString)(a.contentData.properties.address.shortAddress),1)):(0,n.kq)("",!0),a.contentData.properties.subtitle?((0,n.wg)(),(0,n.iD)("p",p,(0,i.toDisplayString)(a.contentData.properties.subtitle),1)):(0,n.kq)("",!0),(0,n._)("div",{"data-test":"vs-main-map-wrapper-detail__description",class:"vs-main-map-wrapper-detail__description mb-6",innerHTML:a.contentData.properties.description},null,8,o)])}},44513:function(t,e,a){"use strict";var n=a(93379),i=a.n(n),s=a(7795),r=a.n(s),p=a(90569),o=a.n(p),l=a(3565),c=a.n(l),d=a(19216),u=a.n(d),m=a(44589),v=a.n(m),g=a(35186),D=a.n(g),f={};f.styleTagTransform=v(),f.setAttributes=c(),f.insert=o().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),i()(D(),f),D()&&D().locals&&D().locals},16520:function(t,e,a){"use strict";a.r(e);var n=a(1313),i=a(77233);a(82296);const s=(0,a(83744).Z)(i.Z,[["render",n.s]]);e.default=s},77233:function(t,e,a){"use strict";a.d(e,{Z:function(){return n.Z}});var n=a(24796)},1313:function(t,e,a){"use strict";a.d(e,{s:function(){return n.s}});var n=a(22316)},82296:function(t,e,a){"use strict";a(44513)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4143],{68748:function(){},94360:function(e,t,a){"use strict";var n=a(83918),r=a(73366),s=a(10282),i=a(61570),l=a(81674),o=a(14613),c=a(29848),u=a(16520),p=a(175),d=a(85834),g=null;t.Z={name:"VsMainMapWrapperPanel",status:"prototype",release:"0.0.1",components:{VsButton:n.default,VsMainMapWrapperCategory:l.default,VsMainMapWrapperSubcategory:o.default,VsHeading:r.default,VsMainMapWrapperListItem:c.default,VsMainMapWrapperDetail:u.default,VsMainMapWrapperButtons:p.default,VsMainMapWrapperControls:d.default},inject:["filters","placesData","regions","mapId","focussedListItem"],props:{categoryHeading:{type:String,default:""},headingLevel:{type:String,default:"2"},selectedCategory:{type:String,default:""},selectedSubcategory:{type:String,default:null},currentStage:{type:Number,required:!0},selectedItem:{type:String,default:""},hovered:{type:String,default:""},subcategoryLocations:{type:Array,default:null},currentEndpointData:{type:Array,default:function(){return[]}},panelStatus:{type:String,default:null},panelMessage:{type:String,default:null},totalPins:{type:Number,default:0},currentListItemFocus:{type:Number,default:0}},data:function(){return{placesLoaded:1}},computed:{currentHeading:function(){var e="";if(null!==this.selectedSubcategory)e=this.selectedSubcategoryData[0].label;else switch(this.currentStage){case 0:e=this.categoryHeading;break;case 1:case 2:e=this.currentFilter.label}return e},currentData:function(){return"regions"===this.selectedCategory?this.regions:this.placesData},panelClasses:function(){var e="";return 2===this.currentStage&&(e+=" vs-main-map-wrapper-panel--small-padding"),e},headerClasses:function(){return 1===this.currentStage?"vs-main-map-wrapper-panel__header-section--with-spacer":2===this.currentStage?"vs-main-map-wrapper-panel__header-section--overlapped":""},currentFilter:function(){var e=this,t="";return this.filters.forEach((function(a){a.id===e.selectedCategory&&(t=a)})),t},currentPlaceData:function(){var e=this,t=this.placesData;return"regions"===this.selectedCategory&&(t=this.regions),this.currentEndpointData.length>0?this.refineEndpointData(this.currentEndpointData):t.filter((function(t){return void 0!==t.properties&&t.properties.id===e.selectedItem}))},selectedSubcategoryData:function(){var e=this;return this.selectedSubcategory?this.filters.filter((function(t){return t.id===e.selectedSubcategory})):[]},subCatFilterCount:function(){return g?g.activeSubcatFilters.length:null},detailHeadingLevel:function(){return(parseInt(this.headingLevel,10)+1).toString()},showLoadMore:function(){return!(this.subcategoryLocations.length>=this.totalPins||0===this.subcategoryLocations.length)}},watch:{currentFilter:function(){this.placesLoaded=1}},mounted:function(){g=(0,i.Z)((0,s.Z)())},methods:{closePanel:function(){this.$emit("close-panel")},stageBack:function(){if(this.selectedSubcategory&&0===this.currentStage)this.$emit("set-subcategory",null);else if(null!==this.selectedSubcategory&&null===this.subcategoryLocations)this.setStage(0);else{var e=this.currentStage-1;this.setStage(e)}},resetPanel:function(){g.setSelectedSubcat(null),this.setStage(0)},setStage:function(e){0===e&&(this.placesLoaded=1),this.$emit("set-stage",e)},subCatExists:function(e){return void 0!==e.subCategory&&e.subCategory.length>0},refineEndpointData:function(e){var t=[{isEndpoint:!0,properties:{category:e[0].category[0].id,id:e[0].id,image:e[0].images[0].mediaUrl,placeTitle:e[0].name,description:e[0].description,link:{label:e[0].productLink.label,link:e[0].productLink.link,type:e[0].productLink.type},website:{label:e[0].website.label,link:e[0].website.link,type:e[0].website.type},address:{shortAddress:""}}}];return void 0!==e[0].address&&(t[0].properties.address.shortAddress=e[0].address.shortAddress),t},clearSubCatFilters:function(){g.setActiveSubcatFilters([]),this.setStage(0)},loadMorePlaces:function(){this.placesLoaded+=1,this.$emit("load-more-places",this.placesLoaded)}}}},11257:function(e,t,a){"use strict";a.d(t,{s:function(){return f}});var n=a(66252),r=a(3577),s=a(49963),i={key:0,class:"vs-main-map-wrapper-panel__back"},l={class:"sr-only"},o={class:"vs-main-map-wrapper-panel__close d-lg-none"},c={class:"sr-only"},u={class:"sr-only"},p={key:2,class:"vs-main-map-wrapper-panel__bottom-message"},d={class:"vs-main-map-wrapper-panel__list-container"},g={key:3,class:"vs-main-map-wrapper-panel__overlay"},m={key:0,class:"vs-main-map-wrapper-panel__overlay-box"},y={class:"vs-main-map-wrapper-panel__overlay-text"};function f(e,t,a,f,h,v){var b=(0,n.up)("VsButton"),w=(0,n.up)("VsHeading"),S=(0,n.up)("VsMainMapWrapperSubcategory"),k=(0,n.up)("VsMainMapWrapperControls"),_=(0,n.up)("VsMainMapWrapperCategory"),C=(0,n.up)("VsMainMapWrapperListItem"),D=(0,n.up)("VsMainMapWrapperButtons"),M=(0,n.up)("VsMainMapWrapperDetail");return(0,n.wg)(),(0,n.iD)("section",{"data-test":"vs-main-map-wrapper-panel",class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel",v.panelClasses])},[(0,n._)("div",{class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel__header-section",v.headerClasses])},[a.currentStage>0||a.selectedSubcategory?((0,n.wg)(),(0,n.iD)("div",i,[(0,n.Wm)(b,{"icon-only":"",icon:"internal-link","icon-orientation":"down",size:"md",variant:"secondary",onClick:v.stageBack,"data-test":"vs-main-map-wrapper-panel--btn-back"},{default:(0,n.w5)((function(){return[(0,n._)("span",l,[(0,n.WI)(e.$slots,"back-btn-text")])]})),_:3},8,["onClick"])])):(0,n.kq)("",!0),""!==v.currentHeading?((0,n.wg)(),(0,n.j4)(w,{key:1,level:a.headingLevel,"override-style-level":"4",class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel__heading text-center mt-0",2===a.currentStage?"d-none d-lg-block":""]),"data-test":"vs-main-map-wrapper-panel__heading"},{default:(0,n.w5)((function(){return[(0,n.Uk)((0,r.toDisplayString)(v.currentHeading),1)]})),_:1},8,["level","class"])):(0,n.kq)("",!0),(0,n._)("div",o,[(0,n.Wm)(b,{"icon-only":"",icon:"close",size:"md",variant:"secondary",onClick:v.closePanel,"data-test":"vs-main-map-wrapper-panel--btn-close"},{default:(0,n.w5)((function(){return[(0,n._)("span",c,[(0,n.WI)(e.$slots,"close-side-panel-text")])]})),_:3},8,["onClick"])]),(0,n._)("div",{class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel__reset",a.currentStage<2?"d-lg-none":""])},[(0,n.Wm)(b,{"icon-only":"",icon:"close",size:"md",variant:"secondary",onClick:v.resetPanel,"data-test":"vs-main-map-wrapper-panel--btn-reset"},{default:(0,n.w5)((function(){return[(0,n._)("span",u,[(0,n.WI)(e.$slots,"reset-side-panel-text")])]})),_:3},8,["onClick"])],2)],2),0===a.currentStage?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[null!==a.selectedSubcategory?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n.Wm)(S,{data:v.selectedSubcategoryData[0].subCategory,selectedSubCategory:a.selectedSubcategory},null,8,["data","selectedSubCategory"]),(0,n.Wm)(k)],64)):((0,n.wg)(!0),(0,n.iD)(n.HY,{key:1},(0,n.Ko)(v.filters,(function(e){return(0,n.wg)(),(0,n.j4)(_,{key:e.id,"category-name":e.label,type:e.id,"has-sub-cat":v.subCatExists(e)},null,8,["category-name","type","has-sub-cat"])})),128)),null!==a.panelMessage?((0,n.wg)(),(0,n.iD)("div",p,[(0,n._)("p",null,(0,r.toDisplayString)(a.panelMessage),1)])):(0,n.kq)("",!0)],64)):(0,n.kq)("",!0),1===a.currentStage?((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[null!==a.selectedSubcategory?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n._)("div",d,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.subcategoryLocations,(function(t,r){return(0,n.wg)(),(0,n.j4)(C,{key:t.id,"item-data":t,"from-endpoint":!0,focussed:r===a.currentListItemFocus,onShowItemDetail:function(a){return e.showDetail(t.id)}},null,8,["item-data","focussed","onShowItemDetail"])})),128)),v.showLoadMore?((0,n.wg)(),(0,n.j4)(b,{key:0,class:"vs-main-map-wrapper-panel__load-more","data-test":"vs-main-map-wrapper-panel__load-more",onClick:t[0]||(t[0]=function(e){return v.loadMorePlaces()}),onKeyup:t[1]||(t[1]=(0,s.withKeys)((function(e){return v.loadMorePlaces()}),["enter"]))},{default:(0,n.w5)((function(){return[(0,n.WI)(e.$slots,"load-more-text")]})),_:3})):(0,n.kq)("",!0)]),(0,n.Wm)(D,{"content-data":{},"filter-count":v.subCatFilterCount,onClearFilters:v.clearSubCatFilters},null,8,["filter-count","onClearFilters"])],64)):((0,n.wg)(!0),(0,n.iD)(n.HY,{key:1},(0,n.Ko)(v.currentData,(function(t){return(0,n.wg)(),(0,n.iD)("div",{key:t.id},[void 0!==t.properties&&t.properties.category.id===a.selectedCategory?((0,n.wg)(),(0,n.j4)(C,{key:0,"item-data":t.properties,onShowItemDetail:function(a){return e.showDetail(t.properties.id)}},null,8,["item-data","onShowItemDetail"])):(0,n.kq)("",!0)])})),128))],64)):(0,n.kq)("",!0),2===a.currentStage?((0,n.wg)(),(0,n.iD)(n.HY,{key:2},[(0,n.Wm)(M,{"heading-level":v.detailHeadingLevel,"content-data":v.currentPlaceData[0]},null,8,["heading-level","content-data"]),(0,n.Wm)(D,{"content-data":v.currentPlaceData[0]},null,8,["content-data"])],64)):(0,n.kq)("",!0),null!==a.panelStatus?((0,n.wg)(),(0,n.iD)("div",g,[e.$slots["panel-loading-message"]&&"map-loading"!==a.panelStatus?((0,n.wg)(),(0,n.iD)("div",m,[(0,n._)("p",y,[(0,n.WI)(e.$slots,"panel-loading-message")])])):(0,n.kq)("",!0)])):(0,n.kq)("",!0)],2)}},42167:function(e,t,a){"use strict";var n=a(93379),r=a.n(n),s=a(7795),i=a.n(s),l=a(90569),o=a.n(l),c=a(3565),u=a.n(c),p=a(19216),d=a.n(p),g=a(44589),m=a.n(g),y=a(68748),f=a.n(y),h={};h.styleTagTransform=m(),h.setAttributes=u(),h.insert=o().bind(null,"head"),h.domAPI=i(),h.insertStyleElement=d(),r()(f(),h),f()&&f().locals&&f().locals},84143:function(e,t,a){"use strict";a.r(t);var n=a(43420),r=a(97794);a(36949);const s=(0,a(83744).Z)(r.Z,[["render",n.s]]);t.default=s},97794:function(e,t,a){"use strict";a.d(t,{Z:function(){return n.Z}});var n=a(94360)},43420:function(e,t,a){"use strict";a.d(t,{s:function(){return n.s}});var n=a(11257)},36949:function(e,t,a){"use strict";a(42167)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4169],{28070:function(){},35097:function(e,t,o){"use strict";var a=o(22048),s=o(16145),i=o(83709),n=o(66252),r=o(49963),p=o(10282),d=o(61570),l=o(6158),u=o.n(l),m=o(29319),c=o.n(m),h=o(24173),g=null;t.Z={name:"VsMap",status:"prototype",release:"0.0.1",components:{VsWarning:a.default,VsLoading:s.default},props:{overviewMapLatitude:{type:String,default:"57.81"},overviewMapLongitude:{type:String,default:"-5.51748"},overviewMapZoom:{type:String,default:"5"},mapId:{type:String,required:!0},isVisible:{type:Boolean,required:!0},places:{type:Array,required:!0},fitToMarkers:{type:Boolean,default:!1},showPolygons:{type:Boolean,default:!1},selectedItem:{type:String,default:null},boundsData:{type:Object,default:function(){}},showInfoMessage:{type:Boolean,default:null},resetZoom:{type:Boolean,default:!1}},data:function(){return{isDesktop:!1,geojsonData:{type:"FeatureCollection",features:[]},polygons:{type:"FeatureCollection",features:[]},multiPolygons:[],mapbox:{map:null,bounds:null,rotation:0,config:{container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",pitchWithRotate:!1,dragRotate:!1}},markers:[],popup:null,hoveredStateId:null,activeStateId:null,showMapMessage:!0,isLoading:!0,showZoomMessage:null}},computed:{getZoom:function(){return this.mapbox.map?this.mapbox.map.getZoom():null},highlightedPlace:function(){return this.mapbox.map?g.getHoveredStop(this.mapId):""},activeMarkerPostion:function(){return this.mapbox.map?g.activeMarkerPos:null}},watch:{isVisible:function(e){var t=this;e&&null!==this.mapbox.map&&setTimeout((function(){t.mapbox.map.resize()}),20)},places:{handler:function(){this.geojsonData.features=[],this.addMapFeatures(),this.addMapMarkers()},deep:!0},showPolygons:function(e){!0===e?this.showMapPolygons():this.hideMapPolygons()},highlightedPlace:function(e){0===e.length?this.removeHoveredPolygon():this.addHoveredPolygon(e)},selectedItem:function(e){var t=this.polygons.features.filter((function(t){return t.properties.id===e}));e?t.length>0&&this.addActivePolygon(e):this.removeActivePolygon()},activeMarkerPostion:function(e){this.checkPointIsVisible(e)||this.centreMapOnPoint(e)},showInfoMessage:function(e){this.showMapMessage=!!e},resetZoom:function(e){e&&(this.mapbox.map.fitBounds(this.calculateBoundingBox()),this.$emit("zoom-reset"),this.showInfoMessage&&(this.showMapMessage=!0))}},mounted:function(){var e=this;g=(0,d.Z)((0,p.Z)()),this.lazyloadMapComponent(),this.isTablet=window.innerWidth>=768,window.addEventListener("resize",this.onResize),window.addEventListener("DOMContentLoaded",(function(){i.Z.init({div:e.mapId})}))},methods:{addMap:function(){var e=this,t=this.calculateBoundingBox();this.mapbox.config.container=this.$refs.mapbox,this.mapbox.map=new(u().Map)({container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",bounds:t,maxZoom:18,minZoom:4,trackResize:!0}),this.mapbox.map.scrollZoom.disable(),this.mapbox.map.on("rotate",(function(){e.mapbox.rotation=e.mapbox.map.transform.angle})),this.mapbox.map.resize(),this.mapbox.map.on("load",(function(){e.addMapPolygons(),e.showMapMessage=!1,e.isLoading=!1,e.$emit("map-ready",!0),e.mapbox.map.boxZoom.enable()})),this.mapbox.map.on("zoomend",(function(){4===e.mapbox.map.getZoom()?(e.showZoomMessage="too-far",e.showMapMessage=!0):18===e.mapbox.map.getZoom()?(e.showZoomMessage="too-close",e.showMapMessage=!0):e.showInfoMessage||(e.showZoomMessage=null,e.showMapMessage=!1)}))},addMapControls:function(){var e=new(u().NavigationControl);this.mapbox.map.addControl(e,"top-right"),this.mapbox.map.addControl(new(u().FullscreenControl))},addMapFeatures:function(){var e=this;this.places.map((function(t){if(void 0!==t.geometry){var o=[t.geometry.coordinates[0],t.geometry.coordinates[1]];return"Polygon"===t.geometry.type&&(o=[t.geometry.coordinates[0]]),"MultiPolygon"===t.geometry.type&&(o=[t.geometry.coordinates]),e.geojsonData.features.push({type:"Feature",geometry:{type:t.geometry.type,coordinates:o},properties:{title:t.properties.title,imageSrc:t.image,type:void 0!==t.properties.category?t.properties.category.id:"",id:t.properties.id},id:t.properties.id})}return!1}))},addMapMarkers:function(){var e=this,t=0;this.initialLoad&&(t=1e3),setTimeout((function(){if(null!==e.markers){for(var t=e.markers.length-1;t>=0;t--)e.markers[t].remove();e.markers=[]}e.geojsonData.features.forEach((function(t){var o=(0,n.h)(h.default,{feature:t,mapId:e.mapId,onShowDetail:function(t){e.$emit("showDetail",t)},onSetCategory:function(t){e.$emit("setCategory",t)}}),a=document.createElement("div");e.$refs.mapboxOuter.appendChild(a),(0,r.render)(o,a);var s=new(u().Marker)(a.children[0]).setLngLat(t.geometry.coordinates).addTo(e.mapbox.map);e.markers.push(s),a.remove()}))}),t)},hideMapPolygons:function(){this.mapbox.map.setLayoutProperty("regions-fills","visibility","none"),this.mapbox.map.setLayoutProperty("regions-borders","visibility","none")},showMapPolygons:function(){this.mapbox.map.setLayoutProperty("regions-fills","visibility","visible"),this.mapbox.map.setLayoutProperty("regions-borders","visibility","visible")},addMapPolygons:function(){var e=this;this.geojsonData.features.forEach((function(t){"Polygon"===t.geometry.type?e.polygons.features.includes(t.properties.id)||e.polygons.features.push(t):"MultiPolygon"===t.geometry.type&&(e.polygons.features.includes(t.properties.id)||e.multiPolygons.push(t))})),this.multiPolygons.forEach((function(t){var o=t.properties;t.geometry.coordinates[0].forEach((function(t){e.polygons.features.push({geometry:{type:"Polygon",coordinates:t},id:o.id,properties:{id:o.id,imageSrc:o.imageSrc,title:o.title,type:o.type},type:"Feature"})}))})),this.mapbox.map.addSource("regions",{type:"geojson",data:this.polygons,promoteId:"id"}),this.mapbox.map.addLayer({id:"regions-fills",type:"fill",source:"regions",layout:{},paint:{"fill-color":["case",["==",["feature-state","interaction-state"],"hover"],"rgba(173,14,110,0.698)",["==",["feature-state","interaction-state"],"active"],"rgba(173,14,110,0.533)","#A5A5A5"],"fill-opacity":.8}}),this.mapbox.map.addLayer({id:"regions-borders",type:"line",source:"regions",layout:{},paint:{"line-color":"#fff","line-width":1}}),this.hideMapPolygons(),this.mapbox.map.on("mousemove","regions-fills",(function(t){t.features.length>0&&(e.addMapPopup(t),e.removeHoveredPolygon(),e.addHoveredPolygon(t.features[0].id))})),this.mapbox.map.on("mouseleave","regions-fills",(function(){e.removeMapPopup(),e.removeHoveredPolygon()})),this.mapbox.map.on("click","regions-fills",(function(t){e.removeActivePolygon(),e.addActivePolygon(t.features[0].id)}))},removeActivePolygon:function(){this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":""}),this.activeStateId=null},addActivePolygon:function(e){this.activeStateId=e,this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":"active"}),g.setActivePlace({mapId:this.mapId,placeId:e}),this.$emit("showDetail",e),this.$emit("setCategory","regions")},removeHoveredPolygon:function(){if(this.hoveredStateId){var e="";this.hoveredStateId===this.activeStateId&&(e="active"),this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":e})}g.setHoveredPlace({mapId:this.mapId,hoveredId:""}),this.hoveredStateId=null},addHoveredPolygon:function(e){this.hoveredStateId=e,this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":"hover"}),g.setHoveredPlace({mapId:this.mapId,hoveredId:e})},addMapPopup:function(e){var t,o,a,s=this,i=function e(t){"Escape"===t.key&&(s.removeMapPopup(),document.body.removeEventListener("keyup",e))},n=(t=e.features[0].geometry.coordinates,o=[],a=[],t[0].forEach((function(e){o.push(e[1]),a.push(e[0])})),{lat:(Math.min.apply(Math,o)+Math.max.apply(Math,o))/2,lng:(Math.min.apply(Math,a)+Math.max.apply(Math,a))/2});e.features[0].id!==this.hoveredStateId&&e.features[0].id!==this.activeStateId&&(this.removeMapPopup(),document.body.removeEventListener("keyup",i),this.popup=(new(u().Popup)).setLngLat(n).setHTML(e.features[0].properties.title).addTo(this.mapbox.map)),document.body.addEventListener("keyup",i)},removeMapPopup:function(){this.popup&&(this.popup.remove(),this.popup=null)},fitToBounds:function(){this.mapbox.map.fitBounds(c()(this.geojsonData),{padding:{top:100,bottom:100,left:100,right:100}})},initialiseMapComponent:function(){this.addMap(),this.addMapControls(),this.places.length&&this.addMapFeatures(),this.geojsonData.features.length&&(this.addMapMarkers(),this.fitToMarkers&&this.fitToBounds())},lazyloadMapComponent:function(){var e=this;u().supported({failIfMajorPerformanceCaveat:!0}),"IntersectionObserver"in window?(this.observer=new IntersectionObserver((function(t){t[0].intersectionRatio>0&&(e.observer.unobserve(e.$el),e.initialiseMapComponent())})),this.observer.observe(this.$el)):this.initialiseMapComponent()},onResize:function(){this.isTablet=window.innerWidth>=768},getBoundsFromPolygon:function(){var e=this.boundsData.coordinates[0];return e.reduce((function(e,t){return e.extend(t)}),new(u().LngLatBounds)(e[0],e[0]))},checkPointIsVisible:function(){return this.mapbox.map.getBounds().contains(this.activeMarkerPostion)},centreMapOnPoint:function(e){this.mapbox.map.flyTo({center:e})},calculateBoundingBox:function(){var e;if(void 0===this.boundsData||"undefined"===this.boundsData.type)e=[[-7.555827,55.308836],[-.778285,60.830894]];else if("bounds"===this.boundsData.type){var t=new(u().LngLat)(this.boundsData.coordinates[1][0],this.boundsData.coordinates[1][1]),o=new(u().LngLat)(this.boundsData.coordinates[0][0],this.boundsData.coordinates[0][1]);e=new(u().LngLatBounds)(t,o)}else e="Polygon"===this.boundsData.type?this.getBoundsFromPolygon():[[-7.555827,55.308836],[-.778285,60.830894]];return e}}}},74190:function(e,t,o){"use strict";o.d(t,{s:function(){return l}});var a=o(66252),s=o(3577),i={class:"vs-map","data-test":"vs-map"},n={class:"vs-map__message-box"},r={class:"vs-map__message-text"},p={ref:"mapboxOuter",class:"vs-map__map-outer"},d=["id"];function l(e,t,o,l,u,m){var c=(0,a.up)("VsLoading"),h=(0,a.up)("VsWarning");return(0,a.wg)(),(0,a.iD)("div",i,[u.showMapMessage?((0,a.wg)(),(0,a.iD)("div",{key:0,class:(0,s.normalizeClass)(["vs-map__message",u.showZoomMessage?"":"vs-map__message--with-overlay"]),"data-test":"vs-map__message"},[(0,a._)("div",n,[u.isLoading?((0,a.wg)(),(0,a.j4)(c,{key:0,class:"vs-map__loading"})):(0,a.kq)("",!0),(0,a._)("p",r,[u.isLoading?(0,a.WI)(e.$slots,"map-loading-text",{key:0}):o.showInfoMessage?(0,a.WI)(e.$slots,"info-message",{key:1}):"too-close"===u.showZoomMessage?(0,a.WI)(e.$slots,"zoom-too-close",{key:2}):"too-far"===u.showZoomMessage?(0,a.WI)(e.$slots,"zoom-too-far",{key:3}):(0,a.kq)("",!0)])])],2)):(0,a.kq)("",!0),(0,a._)("div",p,[(0,a._)("div",{id:o.mapId,class:"vs-map__map",ref:"mapbox"},null,8,d)],512),(0,a.Wm)(h,{class:"vs-map__no-js"},{default:(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"no-js")]})),_:3})])}},94850:function(e,t,o){"use strict";var a=o(93379),s=o.n(a),i=o(7795),n=o.n(i),r=o(90569),p=o.n(r),d=o(3565),l=o.n(d),u=o(19216),m=o.n(u),c=o(44589),h=o.n(c),g=o(28070),f=o.n(g),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=n(),v.insertStyleElement=m(),s()(f(),v),f()&&f().locals&&f().locals},14169:function(e,t,o){"use strict";o.r(t);var a=o(68751),s=o(88348);o(15105);const i=(0,o(83744).Z)(s.Z,[["render",a.s]]);t.default=i},88348:function(e,t,o){"use strict";o.d(t,{Z:function(){return a.Z}});var a=o(35097)},68751:function(e,t,o){"use strict";o.d(t,{s:function(){return a.s}});var a=o(74190)},15105:function(e,t,o){"use strict";o(94850)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[1861],{96754:function(){},51635:function(e,t,s){"use strict";var r=s(73366),n=s(44142),o=s(81779);t.Z={name:"VsModuleWrapper",status:"prototype",release:"0.0.1",components:{VsHeading:r.default,VsRichTextWrapper:n.default,VsContainer:o.xB,VsRow:o.ou,VsCol:o.hY},props:{theme:{type:String,default:"light",validator:function(e){return e.match(/(light|grey|dark)/)}}}}},7732:function(e,t,s){"use strict";s.d(t,{s:function(){return n}});var r=s(66252);function n(e,t,s,n,o,a){var u=(0,r.up)("VsHeading"),l=(0,r.up)("VsCol"),i=(0,r.up)("VsRichTextWrapper"),d=(0,r.up)("VsRow"),p=(0,r.up)("VsContainer");return(0,r.wg)(),(0,r.iD)("section",(0,r.dG)({class:["vs-module-wrapper","vs-module-wrapper--".concat(s.theme)],"data-test":"vs-module-wrapper"},e.$attrs),[e.$slots["vs-module-wrapper-heading"]&&e.$slots["vs-module-wrapper-heading"]||e.$slots["vs-module-wrapper-intro"]&&e.$slots["vs-module-wrapper-intro"]?((0,r.wg)(),(0,r.j4)(p,{key:0},{default:(0,r.w5)((function(){return[(0,r.Wm)(d,null,{default:(0,r.w5)((function(){return[e.$slots["vs-module-wrapper-heading"]&&e.$slots["vs-module-wrapper-heading"]?((0,r.wg)(),(0,r.j4)(l,{key:0,cols:"10",offset:"1",md:"8","offset-md":"2"},{default:(0,r.w5)((function(){return[(0,r.Wm)(u,{level:"2",class:"vs-module-wrapper__heading","data-test":"vs-module-wrapper__heading"},{default:(0,r.w5)((function(){return[(0,r.WI)(e.$slots,"vs-module-wrapper-heading")]})),_:3})]})),_:3})):(0,r.kq)("",!0),e.$slots["vs-module-wrapper-intro"]&&e.$slots["vs-module-wrapper-intro"]?((0,r.wg)(),(0,r.j4)(l,{key:1,cols:"12",sm:"10","offset-sm":"1",md:"8","offset-md":"2"},{default:(0,r.w5)((function(){return[(0,r.Wm)(i,{class:"vs-module-wrapper__intro","data-test":"vs-module-wrapper__intro",variant:"lead"},{default:(0,r.w5)((function(){return[(0,r.WI)(e.$slots,"vs-module-wrapper-intro")]})),_:3})]})),_:3})):(0,r.kq)("",!0)]})),_:3})]})),_:3})):(0,r.kq)("",!0),(0,r.WI)(e.$slots,"default")],16)}},54973:function(e,t,s){"use strict";var r=s(93379),n=s.n(r),o=s(7795),a=s.n(o),u=s(90569),l=s.n(u),i=s(3565),d=s.n(i),p=s(19216),c=s.n(p),f=s(44589),m=s.n(f),w=s(96754),v=s.n(w),_={};_.styleTagTransform=m(),_.setAttributes=d(),_.insert=l().bind(null,"head"),_.domAPI=a(),_.insertStyleElement=c(),n()(v(),_),v()&&v().locals&&v().locals},61861:function(e,t,s){"use strict";s.r(t);var r=s(7732),n=s(29996);s(77595);const o=(0,s(83744).Z)(n.Z,[["render",r.s]]);t.default=o},29996:function(e,t,s){"use strict";s.d(t,{Z:function(){return r.Z}});var r=s(51635)},77595:function(e,t,s){"use strict";s(54973)}}]);
@@ -0,0 +1 @@
1
+ .vs-main-map-wrapper-panel{padding:1.25rem .75rem 0;border:1px solid #848484;height:100%;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;justify-content:flex-start}.vs-main-map-wrapper-panel--small-padding{padding-top:1.5rem}.vs-main-map-wrapper-panel__heading.vs-heading{flex-grow:1;margin:5rem 2rem 0}.vs-main-map-wrapper-panel__header-section{display:flex;min-height:32px;align-items:center;margin-bottom:1.25rem}.vs-main-map-wrapper-panel__header-section--overlapped{position:absolute;width:calc(100% - 1.5rem)}.vs-main-map-wrapper-panel__close,.vs-main-map-wrapper-panel__back{position:absolute;top:.75rem;z-index:5}.vs-main-map-wrapper-panel__back{left:.75rem}.vs-main-map-wrapper-panel__close{right:.75rem}.vs-main-map-wrapper-panel__reset{display:none}.vs-main-map-wrapper-panel__overlay{position:absolute;top:0;left:0;z-index:20;height:100%;width:100%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.4)}.vs-main-map-wrapper-panel__overlay-box{border:1px solid #af006e;border-radius:.25rem;height:142px;width:200px;background:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:1.5rem}.vs-main-map-wrapper-panel__overlay-text{font-size:.875rem;margin-bottom:0;text-align:center}.vs-main-map-wrapper-panel__load-more{width:100%;flex-shrink:0;margin:1rem 0}.vs-main-map-wrapper-panel__list-container{flex-grow:2;overflow-y:scroll;overflow-x:visible;display:block;margin:-1rem -1rem 0;padding:1rem 1rem 0}.vs-main-map-wrapper-panel__bottom-message{position:absolute;bottom:1px;background:#fff;left:1px;font-size:1rem;text-align:center;padding:1rem;display:flex;justify-content:center;width:calc(100% - 15px)}.vs-main-map-wrapper-panel__bottom-message p{margin-bottom:0;max-width:75%}.vs-main-map-wrapper-panel .vs-main-map-category:last-of-type::before{display:none}@media(min-width: 992px){.vs-main-map-wrapper-panel{padding:1.25rem 1rem 0;border-right:none}.vs-main-map-wrapper-panel__header-section{display:flex;margin-bottom:1.25rem}.vs-main-map-wrapper-panel__header-section--with-spacer{padding-right:2rem}.vs-main-map-wrapper-panel__header-section--overlapped{position:relative;width:100%}.vs-main-map-wrapper-panel__close{display:none}.vs-main-map-wrapper-panel__back{left:0;top:0;position:relative}.vs-main-map-wrapper-panel__reset{display:block}.vs-main-map-wrapper-panel__message{position:sticky;bottom:-1px;padding:1rem 0;width:100%;background:#fff;text-align:center;margin-bottom:0;font-size:1rem}}@media(min-width: 992px)and (min-width: 992px){.vs-main-map-wrapper-panel__message{padding:1rem}}