@visitscotland/component-library 1.2.5 → 1.2.6
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 +76 -62
- package/dist/client/manifest.json +10 -10
- package/dist/client/scripts/65e49c11683dca5f15ad.js +1 -0
- package/dist/client/scripts/{d4bc82d8350557c61f35.js → d985a7849d3e085d1db4.js} +1 -1
- package/dist/client/styles/{4d8e9ed730281d8928fa.css → 65e49c11683dca5f15ad.css} +1 -1
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/manifest.json +1 -1
- package/dist/ssr/styles/{a418ca5d5c343abd7c0e.css → eee9825cdecd325af9f2.css} +1 -1
- package/package.json +1 -1
- package/dist/client/scripts/4d8e9ed730281d8928fa.js +0 -1
- /package/dist/client/styles/{d4bc82d8350557c61f35.css → d985a7849d3e085d1db4.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,77 +2,91 @@
|
|
|
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.2.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### 🎨 Styling
|
|
9
|
-
|
|
10
|
-
* **stories:** add in missing no-js stories and fix occasional ui bug ([313eb7c](https://github.com/visitscotland/vs-component-library/commit/313eb7c8b8d2397518901a57126c6e33021e11d6))
|
|
11
|
-
* **stories:** add more no javascript stories and fix small ui bugs ([e2ca64d](https://github.com/visitscotland/vs-component-library/commit/e2ca64dc3ecbfb308e98bfaf87e738065a4df405))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### ✨ Features
|
|
15
|
-
|
|
16
|
-
* **storybook:** add datalayer watcher addon to test datalayer events ([7907e2c](https://github.com/visitscotland/vs-component-library/commit/7907e2cd1be0c1c6756e131d826f5aaee239c171))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### 🐛 Bug Fixes
|
|
20
|
-
|
|
21
|
-
* **data-layer-templates.js:** incorrect datalayer key ([fbed052](https://github.com/visitscotland/vs-component-library/commit/fbed0526d7047439535719fd7bf6348110254c92)), closes [#141](https://github.com/visitscotland/vs-component-library/issues/141)
|
|
22
|
-
* **footer:** remove footer story breaking chromatic build ([b880aec](https://github.com/visitscotland/vs-component-library/commit/b880aec5d22015334055111f475ea242ef982365))
|
|
23
|
-
* **product search:** trim autocomplete inputs ([f4165f0](https://github.com/visitscotland/vs-component-library/commit/f4165f06d41a156e8349f4a46d93cd2a9957cd20)), closes [#317](https://github.com/visitscotland/vs-component-library/issues/317)
|
|
24
|
-
|
|
25
|
-
### [1.2.4](https://github.com/visitscotland/vs-component-library/compare/v1.2.3...v1.2.4) (2024-03-19)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### ✨ Features
|
|
29
|
-
|
|
30
|
-
* **font awesome:** add all font awesome icons ([f8ed056](https://github.com/visitscotland/vs-component-library/commit/f8ed05671fe7c1d016ea5a83879784ca140b4850)), closes [#81](https://github.com/visitscotland/vs-component-library/issues/81)
|
|
31
|
-
* **footer:** updated twitter icon ([8a0f473](https://github.com/visitscotland/vs-component-library/commit/8a0f473d25a2eeff24949397a4a36515275f6f62)), closes [#81](https://github.com/visitscotland/vs-component-library/issues/81)
|
|
32
|
-
* **social share:** update twitter icon ([65c43bc](https://github.com/visitscotland/vs-component-library/commit/65c43bc8b9a9f473a9e021c46990d2d66da7860d)), closes [#81](https://github.com/visitscotland/vs-component-library/issues/81)
|
|
5
|
+
### [1.2.6](https://github.com/visitscotland/vs-component-library/compare/v1.2.5...v1.2.6) (2024-03-25)
|
|
33
6
|
|
|
34
7
|
|
|
35
8
|
### ♻️ Code Refactoring
|
|
36
9
|
|
|
37
|
-
* **
|
|
38
|
-
* **
|
|
39
|
-
* **social share item:** remove old twitter icon styles ([3a9ae9a](https://github.com/visitscotland/vs-component-library/commit/3a9ae9a74c1bd02f5aec3420c6520c29802dad82))
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### ✅ Tests
|
|
43
|
-
|
|
44
|
-
* **social share item:** update test ([cb0e472](https://github.com/visitscotland/vs-component-library/commit/cb0e47276cb80a5092bc837ec8a93b93bcd282d2))
|
|
45
|
-
|
|
46
|
-
### [1.2.3](https://github.com/visitscotland/vs-component-library/compare/v1.2.2...v1.2.3) (2024-03-11)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### ✅ Tests
|
|
50
|
-
|
|
51
|
-
* **map with sidebar:** add new tests ([b5ba1d6](https://github.com/visitscotland/vs-component-library/commit/b5ba1d680a8a2afd3d829169dbf60279b30046c0))
|
|
52
|
-
* **map with sidebar:** add tests for new button ([c20ad0e](https://github.com/visitscotland/vs-component-library/commit/c20ad0e5f6575f0d0d570056ad236bc9de2da4f7))
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
### ✨ Features
|
|
56
|
-
|
|
57
|
-
* **article:** add video article story ([05803e7](https://github.com/visitscotland/vs-component-library/commit/05803e7e7176be278b16dcc015f109dd137bfac7))
|
|
58
|
-
* **cookies:** adds decorators to turn cookies on/off ([94fb43a](https://github.com/visitscotland/vs-component-library/commit/94fb43af59110a28e79e21d687839e6065c35145))
|
|
59
|
-
* **map with side bar:** replace card back button with menu button ([e477637](https://github.com/visitscotland/vs-component-library/commit/e4776379370e4a43edf660c4c2fbacd92eeb2401)), closes [#308](https://github.com/visitscotland/vs-component-library/issues/308)
|
|
60
|
-
* **video:** add missing video stories ([37cd10f](https://github.com/visitscotland/vs-component-library/commit/37cd10f9384dd313805d79ed5ef5f570dca05dc1))
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### 🎨 Styling
|
|
64
|
-
|
|
65
|
-
* **video:** fix video ui with caption ([83da976](https://github.com/visitscotland/vs-component-library/commit/83da976ad80406cc3fd5a3189a84136e253da411))
|
|
10
|
+
* **product search:** condense margin css ([23f23f8](https://github.com/visitscotland/vs-component-library/commit/23f23f884178130435793649e8ba9fa4020d880c))
|
|
11
|
+
* **product search:** move class logic to a computed variable ([71c9d28](https://github.com/visitscotland/vs-component-library/commit/71c9d28fe4f4cb6bbe08ce65bd67fbce62fef2d6))
|
|
66
12
|
|
|
67
13
|
|
|
68
14
|
### 🐛 Bug Fixes
|
|
69
15
|
|
|
70
|
-
* **
|
|
71
|
-
* **
|
|
72
|
-
* **imagewithcaption:** hide toggle only for image with video ([8f45c2f](https://github.com/visitscotland/vs-component-library/commit/8f45c2f039e03cbfc302fb005b38d84f3cbe760a))
|
|
73
|
-
* **map with sidebar:** reset filters when closing card ([b25cd3c](https://github.com/visitscotland/vs-component-library/commit/b25cd3c99a355c5bb6b4ed7bbab4459eea95713d)), closes [#309](https://github.com/visitscotland/vs-component-library/issues/309) [#310](https://github.com/visitscotland/vs-component-library/issues/310)
|
|
74
|
-
* **pageintro:** fix hero video in page intro ([b61bf66](https://github.com/visitscotland/vs-component-library/commit/b61bf668292ffafbc312845be052ea793971e14c))
|
|
16
|
+
* **product search:** add missing label ([296787c](https://github.com/visitscotland/vs-component-library/commit/296787c3d6b18530f64a348538884bae5bf55833)), closes [#188](https://github.com/visitscotland/vs-component-library/issues/188)
|
|
17
|
+
* **product search:** trim location value ([3045196](https://github.com/visitscotland/vs-component-library/commit/3045196f0f7704d0fe427b7c002a2ecac3c6194b))
|
|
75
18
|
|
|
19
|
+
### [1.2.5](https://github.com/visitscotland/vs-component-library/compare/v1.2.4...v1.2.5) (2024-03-25)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### 🎨 Styling
|
|
23
|
+
|
|
24
|
+
* **stories:** add in missing no-js stories and fix occasional ui bug ([313eb7c](https://github.com/visitscotland/vs-component-library/commit/313eb7c8b8d2397518901a57126c6e33021e11d6))
|
|
25
|
+
* **stories:** add more no javascript stories and fix small ui bugs ([e2ca64d](https://github.com/visitscotland/vs-component-library/commit/e2ca64dc3ecbfb308e98bfaf87e738065a4df405))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### ✨ Features
|
|
29
|
+
|
|
30
|
+
* **storybook:** add datalayer watcher addon to test datalayer events ([7907e2c](https://github.com/visitscotland/vs-component-library/commit/7907e2cd1be0c1c6756e131d826f5aaee239c171))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### 🐛 Bug Fixes
|
|
34
|
+
|
|
35
|
+
* **data-layer-templates.js:** incorrect datalayer key ([fbed052](https://github.com/visitscotland/vs-component-library/commit/fbed0526d7047439535719fd7bf6348110254c92)), closes [#141](https://github.com/visitscotland/vs-component-library/issues/141)
|
|
36
|
+
* **footer:** remove footer story breaking chromatic build ([b880aec](https://github.com/visitscotland/vs-component-library/commit/b880aec5d22015334055111f475ea242ef982365))
|
|
37
|
+
* **product search:** trim autocomplete inputs ([f4165f0](https://github.com/visitscotland/vs-component-library/commit/f4165f06d41a156e8349f4a46d93cd2a9957cd20)), closes [#317](https://github.com/visitscotland/vs-component-library/issues/317)
|
|
38
|
+
|
|
39
|
+
### [1.2.4](https://github.com/visitscotland/vs-component-library/compare/v1.2.3...v1.2.4) (2024-03-19)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### ✨ Features
|
|
43
|
+
|
|
44
|
+
* **font awesome:** add all font awesome icons ([f8ed056](https://github.com/visitscotland/vs-component-library/commit/f8ed05671fe7c1d016ea5a83879784ca140b4850)), closes [#81](https://github.com/visitscotland/vs-component-library/issues/81)
|
|
45
|
+
* **footer:** updated twitter icon ([8a0f473](https://github.com/visitscotland/vs-component-library/commit/8a0f473d25a2eeff24949397a4a36515275f6f62)), closes [#81](https://github.com/visitscotland/vs-component-library/issues/81)
|
|
46
|
+
* **social share:** update twitter icon ([65c43bc](https://github.com/visitscotland/vs-component-library/commit/65c43bc8b9a9f473a9e021c46990d2d66da7860d)), closes [#81](https://github.com/visitscotland/vs-component-library/issues/81)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### ♻️ Code Refactoring
|
|
50
|
+
|
|
51
|
+
* **font awesome:** remove unused scss and font files ([0c823a3](https://github.com/visitscotland/vs-component-library/commit/0c823a3f326471aab8b11d246d24e1ec439d6197))
|
|
52
|
+
* **footer social item:** remove old twitter icon styles ([c2d7f83](https://github.com/visitscotland/vs-component-library/commit/c2d7f83051f3a6df144e13be31341dbc143f8b9f))
|
|
53
|
+
* **social share item:** remove old twitter icon styles ([3a9ae9a](https://github.com/visitscotland/vs-component-library/commit/3a9ae9a74c1bd02f5aec3420c6520c29802dad82))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### ✅ Tests
|
|
57
|
+
|
|
58
|
+
* **social share item:** update test ([cb0e472](https://github.com/visitscotland/vs-component-library/commit/cb0e47276cb80a5092bc837ec8a93b93bcd282d2))
|
|
59
|
+
|
|
60
|
+
### [1.2.3](https://github.com/visitscotland/vs-component-library/compare/v1.2.2...v1.2.3) (2024-03-11)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### ✅ Tests
|
|
64
|
+
|
|
65
|
+
* **map with sidebar:** add new tests ([b5ba1d6](https://github.com/visitscotland/vs-component-library/commit/b5ba1d680a8a2afd3d829169dbf60279b30046c0))
|
|
66
|
+
* **map with sidebar:** add tests for new button ([c20ad0e](https://github.com/visitscotland/vs-component-library/commit/c20ad0e5f6575f0d0d570056ad236bc9de2da4f7))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### ✨ Features
|
|
70
|
+
|
|
71
|
+
* **article:** add video article story ([05803e7](https://github.com/visitscotland/vs-component-library/commit/05803e7e7176be278b16dcc015f109dd137bfac7))
|
|
72
|
+
* **cookies:** adds decorators to turn cookies on/off ([94fb43a](https://github.com/visitscotland/vs-component-library/commit/94fb43af59110a28e79e21d687839e6065c35145))
|
|
73
|
+
* **map with side bar:** replace card back button with menu button ([e477637](https://github.com/visitscotland/vs-component-library/commit/e4776379370e4a43edf660c4c2fbacd92eeb2401)), closes [#308](https://github.com/visitscotland/vs-component-library/issues/308)
|
|
74
|
+
* **video:** add missing video stories ([37cd10f](https://github.com/visitscotland/vs-component-library/commit/37cd10f9384dd313805d79ed5ef5f570dca05dc1))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### 🎨 Styling
|
|
78
|
+
|
|
79
|
+
* **video:** fix video ui with caption ([83da976](https://github.com/visitscotland/vs-component-library/commit/83da976ad80406cc3fd5a3189a84136e253da411))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### 🐛 Bug Fixes
|
|
83
|
+
|
|
84
|
+
* **article:** fix article cover video story syntax ([1aadbd6](https://github.com/visitscotland/vs-component-library/commit/1aadbd61c240de051f91e8f2f909674ad7cdb76f))
|
|
85
|
+
* **article:** fix article video and add cover video story ([1d4f4c8](https://github.com/visitscotland/vs-component-library/commit/1d4f4c82f8dd47646727d3500cfc3d3c635ad0e6))
|
|
86
|
+
* **imagewithcaption:** hide toggle only for image with video ([8f45c2f](https://github.com/visitscotland/vs-component-library/commit/8f45c2f039e03cbfc302fb005b38d84f3cbe760a))
|
|
87
|
+
* **map with sidebar:** reset filters when closing card ([b25cd3c](https://github.com/visitscotland/vs-component-library/commit/b25cd3c99a355c5bb6b4ed7bbab4459eea95713d)), closes [#309](https://github.com/visitscotland/vs-component-library/issues/309) [#310](https://github.com/visitscotland/vs-component-library/issues/310)
|
|
88
|
+
* **pageintro:** fix hero video in page intro ([b61bf66](https://github.com/visitscotland/vs-component-library/commit/b61bf668292ffafbc312845be052ea793971e14c))
|
|
89
|
+
|
|
76
90
|
### [1.2.2](https://github.com/visitscotland/vs-component-library/compare/v1.2.1...v1.2.2) (2024-03-08)
|
|
77
91
|
|
|
78
92
|
|
|
@@ -4616,11 +4616,11 @@
|
|
|
4616
4616
|
"scripts/93d7a69b2ec3fe80062c.js",
|
|
4617
4617
|
"scripts/3e94b15ce58bd8e3e854.js",
|
|
4618
4618
|
"scripts/90d257a3fd7dd28325e8.js",
|
|
4619
|
-
"scripts/
|
|
4619
|
+
"scripts/d985a7849d3e085d1db4.js",
|
|
4620
4620
|
"scripts/ddecb3bc31ae056cb36b.js"
|
|
4621
4621
|
],
|
|
4622
4622
|
"styles": [
|
|
4623
|
-
"styles/
|
|
4623
|
+
"styles/d985a7849d3e085d1db4.css"
|
|
4624
4624
|
]
|
|
4625
4625
|
},
|
|
4626
4626
|
"VsDateInput": {
|
|
@@ -4865,8 +4865,8 @@
|
|
|
4865
4865
|
"scripts/379ee863a468158f6751.js",
|
|
4866
4866
|
"scripts/c327a6bf88a0ee85ad86.js",
|
|
4867
4867
|
"scripts/5470e4ec7e8eb125d371.js",
|
|
4868
|
-
"scripts/
|
|
4869
|
-
"scripts/
|
|
4868
|
+
"scripts/d985a7849d3e085d1db4.js",
|
|
4869
|
+
"scripts/65e49c11683dca5f15ad.js",
|
|
4870
4870
|
"scripts/2fafb1ddb2ba71166a94.js"
|
|
4871
4871
|
],
|
|
4872
4872
|
"styles": [
|
|
@@ -4879,8 +4879,8 @@
|
|
|
4879
4879
|
"styles/f20807de093e9420d970.css",
|
|
4880
4880
|
"styles/c327a6bf88a0ee85ad86.css",
|
|
4881
4881
|
"styles/5470e4ec7e8eb125d371.css",
|
|
4882
|
-
"styles/
|
|
4883
|
-
"styles/
|
|
4882
|
+
"styles/d985a7849d3e085d1db4.css",
|
|
4883
|
+
"styles/65e49c11683dca5f15ad.css"
|
|
4884
4884
|
]
|
|
4885
4885
|
},
|
|
4886
4886
|
"VsProductSearch": {
|
|
@@ -4938,8 +4938,8 @@
|
|
|
4938
4938
|
"scripts/379ee863a468158f6751.js",
|
|
4939
4939
|
"scripts/c327a6bf88a0ee85ad86.js",
|
|
4940
4940
|
"scripts/5470e4ec7e8eb125d371.js",
|
|
4941
|
-
"scripts/
|
|
4942
|
-
"scripts/
|
|
4941
|
+
"scripts/d985a7849d3e085d1db4.js",
|
|
4942
|
+
"scripts/65e49c11683dca5f15ad.js",
|
|
4943
4943
|
"scripts/dca41fd0f3e6cf221423.js"
|
|
4944
4944
|
],
|
|
4945
4945
|
"styles": [
|
|
@@ -4955,8 +4955,8 @@
|
|
|
4955
4955
|
"styles/f20807de093e9420d970.css",
|
|
4956
4956
|
"styles/c327a6bf88a0ee85ad86.css",
|
|
4957
4957
|
"styles/5470e4ec7e8eb125d371.css",
|
|
4958
|
-
"styles/
|
|
4959
|
-
"styles/
|
|
4958
|
+
"styles/d985a7849d3e085d1db4.css",
|
|
4959
|
+
"styles/65e49c11683dca5f15ad.css",
|
|
4960
4960
|
"styles/dca41fd0f3e6cf221423.css"
|
|
4961
4961
|
]
|
|
4962
4962
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[3293],{67017:function(){},87095:function(e,t,n){"use strict";var a=n(85072),o=n.n(a),r=n(97825),l=n.n(r),u=n(77659),c=n.n(u),i=n(55056),s=n.n(i),d=n(10540),f=n.n(d),v=n(41113),p=n.n(v),m=n(67017),h=n.n(m),b={};b.styleTagTransform=p(),b.setAttributes=s(),b.insert=c().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=f(),o()(h(),b),h()&&h().locals&&h().locals},59061:function(e,t,n){"use strict";var a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function l(e){try{c(a.next(e))}catch(e){r(e)}}function u(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,u)}c((a=a.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,a,o,r,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,u[0]&&(l=0)),l;)try{if(n=1,a&&(o=2&u[0]?a.return:u[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,u[1])).done)return o;switch(a=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,a=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){l=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){l.label=u[1];break}if(6===u[0]&&l.label<o[1]){l.label=o[1],o=u;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(u);break}o[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],a=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(17527),c=n(17527),i={class:"vs-product-search-embed","data-test":"vs-product-search-embed"},s={key:0,class:"container"},d={class:"row"},f={class:"col-12"},v=["action"],p={class:"form-group product-search__type mb-4"},m={for:"prodtypes"},h={class:"product-search__in d-none d-md-block mt-4"},b={"aria-live":"polite"},y=["disabled","value"],k=["disabled","value"],g=["value"],w={key:4,type:"hidden",name:"areaproxdist",value:"10"},_={key:5},x={key:0,class:"form-group"},E={for:"search-keyword"},T={key:2},B=["value"],N={key:0},V=["value"],L=n(17527),S=n(378),C=n(8611),D=n(10293),P=n(45906),j=l(n(35025)),O=l(n(51688)),U=l(n(22142)),M=l(n(58861)),A=l(n(34900)),I=l(n(19856)),F=l(n(48836)),R=n(17527),G=l(n(98745)),J=(0,R.defineComponent)({mixins:[G.default],methods:{trackSubmit:function(e,t){this.createDataLayerObject("productSearchDataEvent",{searchType:e,searchLocation:t.name},this.href)}}});t.default=(0,u.defineComponent)(a(a({},J),{__name:"ProductSearchEmbed",props:{defaultProd:{type:String,default:"acti,attr,reta",validator:function(e){return["acco","cate","even","tour","acti,attr,reta"].includes(e)}},defaultLocale:{type:String,default:"",validator:function(e){return["en","fr","de","es","it","nl",""].includes(e)}},defaultLocation:{type:String,default:""}},setup:function(e){var t=this,n=e,l=(0,L.ref)(!1),u=(0,L.ref)(),R=(0,L.ref)([]),G=((0,L.ref)(null),(0,L.ref)());G.value={id:"",key:"",name:"",type:""};var J=(0,L.ref)("off"),Y=(0,L.ref)(!1),z=(0,L.computed)((function(){var e=void 0===u.value?"see-do":u.value;return"/info/".concat(C.paths[e])})),H=(0,L.ref)(!1),K={en:{localeUrl:""},fr:{localeUrl:"fr-fr"},de:{localeUrl:"de-de"},es:{localeUrl:"es-es"},it:{localeUrl:"it-it"},nl:{localeUrl:"nl-nl"}},q=(0,L.computed)((function(){var e=n.defaultLocale.length>0?n.defaultLocale:(0,S.getLocale)();return"en"===e&&(e=""),e})),Q=(0,L.computed)((function(){if("undefined"!=typeof window){var e=window.location.origin;return e.includes("localhost")?"https://www.visitscotland.com":e}return"https://www.visitscotland.com"})),W=(0,L.computed)((function(){return"".concat(Q.value).concat(q.value?"/"+q.value:"").concat(z.value,"/search-results")})),X="https://www.visitscotland.com/data/locations"+"?locale=".concat(q.value),Z=(0,L.ref)([]),$=(0,L.ref)([]),ee=(0,L.ref)([]),te=(0,L.ref)([]),ne=(0,L.computed)((function(){return l.value?[]:te.value.map((function(e){return a(a({},e),{text:(0,S.getProductName)(e.value,e.text)})}))})),ae=function(){return o(t,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return[4,(0,P.getData)("https://www.visitscotland.com/tms-api/v1/origins?active=1")];case 1:return(e=t.sent())&&(ee.value=e.data),[2]}}))}))},oe=function(){return o(t,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return[4,(0,P.getData)("https://www.visitscotland.com/tms-api/v1/attractions")];case 1:return(e=t.sent())&&($.value=e.data),[2]}}))}))},re=function(e,t){G.value="key"===t?Z.value.find((function(t){return t.key===e})):"id"===t?Z.value.find((function(t){return t.id===e})):Z.value.find((function(t){return t.name===e.trim()}))},le=function(){l.value=!0,(0,L.nextTick)((function(){l.value=!1,""!==n.defaultLocation&&H&&re(n.defaultLocation,"id")}))},ue=(0,L.computed)((function(){return"cate"!==u.value&&"acti,attr,reta"!==u.value?"d-lg-flex":""}));(0,L.onBeforeMount)((function(){return o(t,void 0,void 0,(function(){var e;return r(this,(function(t){return window.VS={},(e=document.createElement("script")).async=!1,e.onload=le,e.setAttribute("src","https://www.visitscotland.com/".concat((K[n.defaultLocale]||"").localeUrl,"/data/template/search.js")),document.head.appendChild(e),[2]}))}))})),(0,L.onMounted)((function(){return o(t,void 0,void 0,(function(){return r(this,(function(e){var a,l;return o(t,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return[4,(0,P.getData)(X)];case 1:return(e=t.sent())&&(Z.value=e.data),[2]}}))})),H.value=!0,u.value=n.defaultProd,"tour"===u.value&&(ae(),oe()),a=(0,D.getProductTypes)(),l=[],a.forEach((function(e){l.push(e)})),te.value=l,[2]}))}))}));var ce=function(e){Y.value=!0;var t=e.currentTarget;setTimeout((function(){t.submit()}),500)};return function(t,n){var a,o,r,L,D,P;return(0,c.openBlock)(),(0,c.createElementBlock)("div",i,[l.value?(0,c.createCommentVNode)("",!0):((0,c.openBlock)(),(0,c.createElementBlock)("div",s,[(0,c.createElementVNode)("div",d,[(0,c.createElementVNode)("div",f,[(0,c.unref)(H)?((0,c.openBlock)(),(0,c.createElementBlock)("form",{key:0,action:W.value,onSubmit:(0,c.withModifiers)(ce,["prevent"]),"accept-charset":"UTF-8","data-test":"psw-form"},[(0,c.createElementVNode)("div",p,[(0,c.createElementVNode)("label",m,(0,c.toDisplayString)((0,c.unref)(S.getLabelText)("search_for","I'm looking for")),1),(0,c.createElementVNode)("div",{class:(0,c.normalizeClass)(ue.value)},[(0,c.createVNode)(O.default,{options:ne.value,value:e.defaultProd,onUpdated:n[0]||(n[0]=function(e){return t=e.value,u.value=t,void("tour"===t&&(ae(),oe()));var t}),"field-name":"prodtypes"},null,8,["options","value"]),(0,c.createElementVNode)("div",h,(0,c.toDisplayString)((0,c.unref)(S.getLabelText)("in","in")),1)],2)]),(0,c.createElementVNode)("div",b,["tour"!=u.value&&(0,c.unref)(H)?((0,c.openBlock)(),(0,c.createBlock)(M.default,{key:0,id:"search-location",label:(0,c.unref)(S.getLabelText)("location","Location"),"multiselect-label":"name",name:"loc",options:Z.value,placeholder:(0,c.unref)(S.getLabelText)("location_placeholder","Enter a location"),"track-by":"name",onChangeValue:n[1]||(n[1]=function(e){return re(e)}),"default-val":(0,c.unref)(G)},null,8,["label","options","placeholder","default-val"])):(0,c.createCommentVNode)("",!0),"tour"!==u.value?((0,c.openBlock)(),(0,c.createElementBlock)("input",{key:1,type:"hidden",name:"locplace",disabled:"POLYGON"===(null===(a=(0,c.unref)(G))||void 0===a?void 0:a.type),value:(null===(o=(0,c.unref)(G))||void 0===o?void 0:o.key)||""},null,8,y)):(0,c.createCommentVNode)("",!0),"tour"!==u.value?((0,c.openBlock)(),(0,c.createElementBlock)("input",{key:2,type:"hidden",name:"locpoly",disabled:"POLYGON"!==(null===(r=(0,c.unref)(G))||void 0===r?void 0:r.type),value:(null===(L=(0,c.unref)(G))||void 0===L?void 0:L.key)||""},null,8,k)):(0,c.createCommentVNode)("",!0),"tour"!==u.value?((0,c.openBlock)(),(0,c.createElementBlock)("input",{key:3,type:"hidden",name:"locprox",value:"DISTRICT"===(null===(D=(0,c.unref)(G))||void 0===D?void 0:D.type)?1:0},null,8,g)):(0,c.createCommentVNode)("",!0),"tour"!==u.value&&"DISTRICT"===(null===(P=(0,c.unref)(G))||void 0===P?void 0:P.type)?((0,c.openBlock)(),(0,c.createElementBlock)("input",w)):(0,c.createCommentVNode)("",!0),"even"===u.value||"acco"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",_,[(0,c.createVNode)(I.default,{"start-label":(0,c.unref)(S.getLabelText)("startdate","Start Date","dates"),"end-label":(0,c.unref)(S.getLabelText)("enddate","End Date","dates"),onDateUpdated:n[2]||(n[2]=function(e){return function(e){J.value=e?"on":"off"}(e)}),"default-dates":Y.value,"selected-prod":u.value},null,8,["start-label","end-label","default-dates","selected-prod"]),"even"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",x,[(0,c.createElementVNode)("label",E,(0,c.toDisplayString)((0,c.unref)(S.getLabelText)("keywords","Keywords")),1),(0,c.createVNode)(U.default,{"field-name":"search-keyword",placeholder:(0,c.unref)(S.getLabelText)("events_keywords_placeholder","Highland games, music festivals etc"),name:"name"},null,8,["placeholder"])])):(0,c.createCommentVNode)("",!0),"acco"===u.value?((0,c.openBlock)(),(0,c.createBlock)(A.default,{key:1,availability:!0,id:"guest-selector"})):(0,c.createCommentVNode)("",!0),"acco"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",T,[(0,c.createElementVNode)("input",{hidden:"true",name:"avail",value:J.value},null,8,B)])):(0,c.createCommentVNode)("",!0)])):(0,c.createCommentVNode)("",!0)]),"tour"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",N,[(0,c.createVNode)(M.default,{id:"tour-origin",label:(0,c.unref)(S.getLabelText)("tour_origin","Starting point"),"multiselect-label":"name",name:"origins[]",options:ee.value,placeholder:(0,c.unref)(S.getLabelText)("tour_origin_placeholder","Location"),"track-by":"name","is-tour-location":!0},null,8,["label","options","placeholder"]),((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(R.value,(function(e){return(0,c.openBlock)(),(0,c.createElementBlock)("input",{type:"hidden",name:"attractions[]",value:e},null,8,V)})),256)),(0,c.createVNode)(M.default,{id:"tour-month",label:(0,c.unref)(S.getLabelText)("tour_month","I'm traveling in"),"multiselect-label":"label",name:"when",options:(0,c.unref)(S.getLabelText)("months",(0,c.unref)(C.monthsEnglish)),placeholder:(0,c.unref)(S.getLabelText)("tour_month_placeholder","Select month"),"track-by":"value"},null,8,["label","options","placeholder"])])):(0,c.createCommentVNode)("",!0),(0,c.createVNode)(F.default,{class:"mt-6","data-test":"psw-submit",type:"submit",variant:"dark",onClick:n[3]||(n[3]=function(e){return t.trackSubmit(u.value,void 0===(0,c.unref)(G)?"":(0,c.unref)(G))})},{default:(0,c.withCtx)((function(){return[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(S.getLabelText)("search","Search")),1)]})),_:1})],40,v)):(0,c.createCommentVNode)("",!0),(0,c.unref)(H)?(0,c.createCommentVNode)("",!0):((0,c.openBlock)(),(0,c.createBlock)(j.default,{key:1,variant:"dark"}))])])]))])}}}))},8611:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.monthsEnglish=t.paths=t.products=void 0,t.products=[{key:"accommodation",text:"Accommodation",value:"acco"},{key:"eventsAndFestivals",text:"Events & Festivals",value:"even"},{key:"foodAndDrink",text:"Food & Drink",value:"cate"},{key:"thingsToDo",text:"Things to do",value:"acti,attr,reta"},{key:"tours",text:"Tours",value:"tour"}],t.paths={acco:"accommodation","acti,attr,reta":"see-do",cate:"food-drink",even:"events",tour:"tours"},t.monthsEnglish=[{label:"January",value:"january"},{label:"February",value:"february"},{label:"March",value:"march"},{label:"April",value:"april"},{label:"May",value:"may"},{label:"June",value:"june"},{label:"July",value:"july"},{label:"August",value:"august"},{label:"September",value:"september"},{label:"October",value:"october"},{label:"November",value:"november"},{label:"December",value:"december"}]},45906:function(e,t,n){"use strict";var a=n(96763),o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function l(e){try{c(a.next(e))}catch(e){r(e)}}function u(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,u)}c((a=a.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,a,o,r,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,u[0]&&(l=0)),l;)try{if(n=1,a&&(o=2&u[0]?a.return:u[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,u[1])).done)return o;switch(a=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,a=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){l=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){l.label=u[1];break}if(6===u[0]&&l.label<o[1]){l.label=o[1],o=u;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(u);break}o[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],a=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getData=void 0;var u=l(n(86425));t.getData=function(e){return o(this,void 0,void 0,(function(){var t;return r(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,u.default.get(e)];case 1:return[2,n.sent().data];case 2:return t=n.sent(),a.error("Axios error: ".concat(t)),[3,3];case 3:return[2]}}))}))}},10293:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProductTypes=t.getURLParameters=void 0;var a,o=n(8611);a="undefined"!=typeof window&&"object"==typeof window.VS?window.VS:{},t.getURLParameters=function(){var e=new URLSearchParams(document.location.search),t=Object.fromEntries(e);return"object"==typeof t&&Object.keys(t).forEach((function(e){return null===t[e]&&delete t[e]})),t},t.getProductTypes=function(){if(Object.keys(a).length<=0)return o.products;var e=a.search_config.basic_config.productTypes,t=[];return Object.keys(e).forEach((function(n){t.push({key:e[n].value,text:e[n].text,value:e[n].value})})),t}},93293:function(e,t,n){"use strict";n.r(t);var a=n(43423),o={};for(var r in a)"default"!==r&&(o[r]=function(e){return a[e]}.bind(0,r));n.d(t,o),n(98243);const l=a.default;t.default=l},98243:function(e,t,n){"use strict";n(87095)},43423:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o.a}});var a=n(59061),o=n.n(a),r={};for(var l in a)"default"!==l&&(r[l]=function(e){return a[e]}.bind(0,l));n.d(t,r)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[8861],{
|
|
1
|
+
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[8861],{84459:function(){},79977:function(e,t,n){"use strict";var a=n(85072),l=n.n(a),u=n(97825),o=n.n(u),r=n(77659),i=n.n(r),c=n(55056),d=n.n(c),f=n(10540),s=n.n(f),m=n(41113),v=n.n(m),p=n(84459),b=n.n(p),h={};h.styleTagTransform=v(),h.setAttributes=d(),h.insert=i().bind(null,"head"),h.domAPI=o(),h.insertStyleElement=s(),l()(b(),h),b()&&b().locals&&b().locals},90345:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(17527),u=n(17527),o={"data-test":"vs-autocomplete",class:"mb-4"},r=["for"],i=["name"],c=n(17527),d=a(n(46701));t.default=(0,l.defineComponent)({__name:"Autocomplete",props:{id:{},label:{},mode:{},multiselectLabel:{},name:{},options:{},placeholder:{},trackBy:{},isTourLocation:{type:Boolean},defaultVal:{}},emits:["changeValue"],setup:function(e,t){var n=t.emit,a=e,l=n,f=(0,c.ref)([]),s=(0,c.computed)((function(){if("string"==typeof f.value){if(a.isTourLocation){var e=a.options.find((function(e){return e.name===f.value}));if(void 0!==e)return e.slug.trim()}return f.value.trim()}})),m=function(e){void 0!==a.trackBy?f.value=e[a.trackBy]:f.value=e.label},v=(0,c.computed)((function(){return void 0!==a.multiselectLabel?a.multiselectLabel:"name"})),p=(0,c.computed)((function(){return!!(f.value&&f.value.length>0)}));return(0,c.watch)(f,(function(e){l("changeValue",e)})),(0,c.watch)((function(){return a.defaultVal}),(function(){void 0!==a.defaultVal&&(f.value=a.defaultVal.name)})),(0,c.watch)((function(){return f.value}),(function(){null===f.value&&(f.value=[])})),(0,c.onMounted)((function(){void 0!==a.defaultVal&&(f.value=a.defaultVal.name)})),function(e,t){return(0,u.openBlock)(),(0,u.createElementBlock)("div",o,[(0,u.createElementVNode)("label",{for:e.id},(0,u.toDisplayString)(e.label),9,r),(0,u.createVNode)((0,u.unref)(d.default),{class:"vs-input form-control",id:e.id,placeholder:e.placeholder,searchable:!0,"track-by":e.trackBy,valueProp:e.trackBy,modelValue:f.value,"onUpdate:modelValue":t[0]||(t[0]=function(e){return f.value=e}),autocomplete:"off",items:e.options,minInputLength:0,itemProjection:function(e){return e[v.value]},onSelectItem:m,defaultItem:a.defaultVal},null,8,["id","placeholder","track-by","valueProp","modelValue","items","itemProjection","defaultItem"]),p.value?(0,u.withDirectives)(((0,u.openBlock)(),(0,u.createElementBlock)("input",{key:0,type:"hidden",name:e.name,"onUpdate:modelValue":t[1]||(t[1]=function(e){return s.value=e})},null,8,i)),[[u.vModelText,s.value]]):(0,u.createCommentVNode)("",!0)])}}})},58861:function(e,t,n){"use strict";n.r(t);var a=n(40971),l={};for(var u in a)"default"!==u&&(l[u]=function(e){return a[e]}.bind(0,u));n.d(t,l),n(38597);const o=a.default;t.default=o},38597:function(e,t,n){"use strict";n(79977)},40971:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l.a}});var a=n(90345),l=n.n(a),u={};for(var o in a)"default"!==o&&(u[o]=function(e){return a[e]}.bind(0,o));n.d(t,u)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
label,legend{font-weight:600;margin-bottom:0}legend{font-size:1.125rem}.error{font-size:1rem;color:#ae2940;display:block}.hint-text{font-size:1rem;color:#757575;margin-bottom:0}.vs-input{border:#565656 1px solid;margin-top:.5rem}.vs-input.form-control-md{height:50px}.vs-input:focus{border-color:#af006e;box-shadow:0 0 0 3px #af006e inset;outline:none}.vs-input--error{border-color:#ae2940;box-shadow:0 0 0 1px #ae2940 inset}.vs-input__clear-button{position:absolute;right:1.25rem;top:50%;transform:translate(0, -50%)}.vs-select__element{background:#fff}.simple-typeahead{position:relative}.simple-typeahead-list{position:absolute;display:flex;flex-direction:column;max-height:250px;overflow-y:scroll;background:#fff;width:100%;z-index:10}.simple-typeahead-list-item{cursor:pointer;font-size:1rem;padding:.5rem 1rem}.simple-typeahead-list-item:hover{background-color:#f0eff0;color:#191919}.multiselect{height:50px}.multiselect.is-active{border-color:#af006e;box-shadow:0 0 0 3px #af006e inset;outline:none}.multiselect::after{font-family:"Font Awesome Kit";content:"";line-height:1.3;vertical-align:text-top;text-align:center;display:inline-block;text-rendering:auto;-webkit-font-smoothing:antialiased;width:1.5rem;height:1.5rem;border:1px solid #000;border-radius:1000px;position:absolute;top:calc(50% - 0.75rem);right:1rem;pointer-events:none}.multiselect-tags{flex-wrap:nowrap;overflow:hidden;min-height:42px;max-width:80%;align-self:flex-start;margin-right:4px}.multiselect-tags .multiselect-tag{background:#dad8d9;color:#191919}.multiselect-wrapper{min-height:auto;justify-content:flex-start;appearance:none;background-color:rgba(0,0,0,0);border:none;margin:0;width:100%;font-family:inherit;font-size:inherit;cursor:inherit;line-height:inherit;height:50px;border:#565656 1px solid;overflow:hidden}.multiselect-option.is-pointed{background-color:#f0eff0;color:#191919}.multiselect-caret{display:none}.multiselect-placeholder{color:#191919;opacity:.8}
|
|
1
|
+
label,legend{font-weight:600;margin-bottom:0}legend{font-size:1.125rem}.error{font-size:1rem;color:#ae2940;display:block}.hint-text{font-size:1rem;color:#757575;margin-bottom:0}.vs-input{border:#565656 1px solid;margin-top:.5rem}.vs-input.form-control-md{height:50px}.vs-input:focus{border-color:#af006e;box-shadow:0 0 0 3px #af006e inset;outline:none}.vs-input--error{border-color:#ae2940;box-shadow:0 0 0 1px #ae2940 inset}.vs-input__clear-button{position:absolute;right:1.25rem;top:50%;transform:translate(0, -50%)}.vs-select__element{background:#fff}.simple-typeahead{position:relative}.simple-typeahead-list{position:absolute;display:flex;flex-direction:column;max-height:250px;overflow-y:scroll;background:#fff;width:100%;z-index:10}.simple-typeahead-list-item{cursor:pointer;font-size:1rem;padding:.5rem 1rem}.simple-typeahead-list-item:hover{background-color:#f0eff0;color:#191919}.multiselect{height:50px}.multiselect.is-active{border-color:#af006e;box-shadow:0 0 0 3px #af006e inset;outline:none}.multiselect::after{font-family:"Font Awesome Kit";content:"";line-height:1.3;vertical-align:text-top;text-align:center;display:inline-block;text-rendering:auto;-webkit-font-smoothing:antialiased;width:1.5rem;height:1.5rem;border:1px solid #000;border-radius:1000px;position:absolute;top:calc(50% - 0.75rem);right:1rem;pointer-events:none}.multiselect-tags{flex-wrap:nowrap;overflow:hidden;min-height:42px;max-width:80%;align-self:flex-start;margin-right:4px}.multiselect-tags .multiselect-tag{background:#dad8d9;color:#191919}.multiselect-wrapper{min-height:auto;justify-content:flex-start;appearance:none;background-color:rgba(0,0,0,0);border:none;margin:0;width:100%;font-family:inherit;font-size:inherit;cursor:inherit;line-height:inherit;height:50px;border:#565656 1px solid;overflow:hidden}.multiselect-option.is-pointed{background-color:#f0eff0;color:#191919}.multiselect-caret{display:none}.multiselect-placeholder{color:#191919;opacity:.8}@media(min-width: 992px){.product-search__type .d-lg-flex .vs-select{width:100%}.product-search__type .d-lg-flex .product-search__in{margin:0 1rem}}.product-search__type .product-search__in{font-weight:600}
|