@visitscotland/component-library 1.0.27 → 1.0.28
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 +9 -0
- package/dist/client/manifest.json +31 -31
- package/dist/client/scripts/39c81d98eb88fed09973.js +1 -0
- package/dist/client/scripts/59531d6f4722d2e7b428.js +1 -0
- package/dist/client/scripts/f8b6622c5200fd2be991.js +1 -0
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/manifest.json +1 -1
- package/package.json +1 -1
- package/dist/client/scripts/3540424e88e90142beb5.js +0 -1
- package/dist/client/scripts/898c147b72953c7d8efb.js +0 -1
- package/dist/client/scripts/e0a7582dafca3697a831.js +0 -1
- /package/dist/client/scripts/{f027bc5a4b3fd5eb22f1.js → 5c10419a0c7462f2f14d.js} +0 -0
- /package/dist/client/scripts/{1b952d87bc0aca49a896.js → 5c1f5cf47b7383235645.js} +0 -0
- /package/dist/client/scripts/{8c5347740d69b612c97c.js → 8468fdfd3cabfa7bffab.js} +0 -0
- /package/dist/client/styles/{898c147b72953c7d8efb.css → 39c81d98eb88fed09973.css} +0 -0
- /package/dist/client/styles/{3540424e88e90142beb5.css → 59531d6f4722d2e7b428.css} +0 -0
- /package/dist/client/styles/{f027bc5a4b3fd5eb22f1.css → 5c10419a0c7462f2f14d.css} +0 -0
- /package/dist/client/styles/{1b952d87bc0aca49a896.css → 5c1f5cf47b7383235645.css} +0 -0
- /package/dist/client/styles/{8c5347740d69b612c97c.css → 8468fdfd3cabfa7bffab.css} +0 -0
- /package/dist/ssr/styles/{28cae4bdf1ee3dcfa34a.css → 2c4b49252fcc28b3d6a1.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.28](https://github.com/visitscotland/vs-component-library/compare/v1.0.27...v1.0.28) (2023-09-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **psw:** fix translations in PSW ([ab1e2b5](https://github.com/visitscotland/vs-component-library/commit/ab1e2b5f98e81c9d6806f7493cb7c42ea4105133))
|
|
11
|
+
* **psw:** retrieve language object on getLabel execution ([44ec5aa](https://github.com/visitscotland/vs-component-library/commit/44ec5aa44d8153de7c79e031aff5d94c57c77aee))
|
|
12
|
+
* **psw:** translate product names ([5ec842d](https://github.com/visitscotland/vs-component-library/commit/5ec842d6a845aaf7658dec874cd531b2f2e527aa))
|
|
13
|
+
|
|
5
14
|
### [1.0.27](https://github.com/visitscotland/vs-component-library/compare/v1.0.26...v1.0.27) (2023-09-13)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -4833,13 +4833,13 @@
|
|
|
4833
4833
|
"scripts/3a9571cfaf25865bccc9.js",
|
|
4834
4834
|
"scripts/d77b7b29af4fb24edbe0.js",
|
|
4835
4835
|
"scripts/414cc4d3f993aab28a8f.js",
|
|
4836
|
-
"scripts/
|
|
4836
|
+
"scripts/f8b6622c5200fd2be991.js",
|
|
4837
4837
|
"scripts/6f8a69836503b59819ba.js",
|
|
4838
|
-
"scripts/
|
|
4838
|
+
"scripts/8468fdfd3cabfa7bffab.js",
|
|
4839
4839
|
"scripts/891ff7a5d9b432a92b97.js"
|
|
4840
4840
|
],
|
|
4841
4841
|
"styles": [
|
|
4842
|
-
"styles/
|
|
4842
|
+
"styles/8468fdfd3cabfa7bffab.css"
|
|
4843
4843
|
]
|
|
4844
4844
|
},
|
|
4845
4845
|
"VsGuestCounter": {
|
|
@@ -4907,17 +4907,17 @@
|
|
|
4907
4907
|
"scripts/c609148fc3e4bae68f67.js",
|
|
4908
4908
|
"scripts/e57aeb2f5204c61f5555.js",
|
|
4909
4909
|
"scripts/bbffd3414a7c7fddbcd6.js",
|
|
4910
|
-
"scripts/
|
|
4911
|
-
"scripts/
|
|
4912
|
-
"scripts/
|
|
4910
|
+
"scripts/f8b6622c5200fd2be991.js",
|
|
4911
|
+
"scripts/5c10419a0c7462f2f14d.js",
|
|
4912
|
+
"scripts/5c1f5cf47b7383235645.js",
|
|
4913
4913
|
"scripts/1701a9402143e4b7b77c.js"
|
|
4914
4914
|
],
|
|
4915
4915
|
"styles": [
|
|
4916
4916
|
"styles/c1e52b98d340cd47fee7.css",
|
|
4917
4917
|
"styles/c609148fc3e4bae68f67.css",
|
|
4918
4918
|
"styles/bbffd3414a7c7fddbcd6.css",
|
|
4919
|
-
"styles/
|
|
4920
|
-
"styles/
|
|
4919
|
+
"styles/5c10419a0c7462f2f14d.css",
|
|
4920
|
+
"styles/5c1f5cf47b7383235645.css"
|
|
4921
4921
|
]
|
|
4922
4922
|
},
|
|
4923
4923
|
"VsGuestSelectorNumberGroup": {
|
|
@@ -4997,15 +4997,15 @@
|
|
|
4997
4997
|
"scripts/c609148fc3e4bae68f67.js",
|
|
4998
4998
|
"scripts/e57aeb2f5204c61f5555.js",
|
|
4999
4999
|
"scripts/bbffd3414a7c7fddbcd6.js",
|
|
5000
|
-
"scripts/
|
|
5001
|
-
"scripts/
|
|
5000
|
+
"scripts/f8b6622c5200fd2be991.js",
|
|
5001
|
+
"scripts/5c10419a0c7462f2f14d.js",
|
|
5002
5002
|
"scripts/37647589fe5f0407574d.js"
|
|
5003
5003
|
],
|
|
5004
5004
|
"styles": [
|
|
5005
5005
|
"styles/c1e52b98d340cd47fee7.css",
|
|
5006
5006
|
"styles/c609148fc3e4bae68f67.css",
|
|
5007
5007
|
"styles/bbffd3414a7c7fddbcd6.css",
|
|
5008
|
-
"styles/
|
|
5008
|
+
"styles/5c10419a0c7462f2f14d.css"
|
|
5009
5009
|
]
|
|
5010
5010
|
},
|
|
5011
5011
|
"VsInputGroup": {
|
|
@@ -5100,26 +5100,26 @@
|
|
|
5100
5100
|
"scripts/e57aeb2f5204c61f5555.js",
|
|
5101
5101
|
"scripts/32ca64baf0af7b9faffa.js",
|
|
5102
5102
|
"scripts/bbffd3414a7c7fddbcd6.js",
|
|
5103
|
-
"scripts/
|
|
5104
|
-
"scripts/
|
|
5103
|
+
"scripts/f8b6622c5200fd2be991.js",
|
|
5104
|
+
"scripts/5c10419a0c7462f2f14d.js",
|
|
5105
5105
|
"scripts/6f8a69836503b59819ba.js",
|
|
5106
|
-
"scripts/
|
|
5107
|
-
"scripts/
|
|
5106
|
+
"scripts/5c1f5cf47b7383235645.js",
|
|
5107
|
+
"scripts/8468fdfd3cabfa7bffab.js",
|
|
5108
5108
|
"scripts/6c28685f52b01d108e4d.js",
|
|
5109
5109
|
"scripts/aa3efed6b1f6232ce3fe.js",
|
|
5110
5110
|
"scripts/96174af322a67416c0a9.js",
|
|
5111
|
-
"scripts/
|
|
5111
|
+
"scripts/59531d6f4722d2e7b428.js",
|
|
5112
5112
|
"scripts/97cddd3583069debb72b.js"
|
|
5113
5113
|
],
|
|
5114
5114
|
"styles": [
|
|
5115
5115
|
"styles/c1e52b98d340cd47fee7.css",
|
|
5116
5116
|
"styles/c609148fc3e4bae68f67.css",
|
|
5117
5117
|
"styles/bbffd3414a7c7fddbcd6.css",
|
|
5118
|
-
"styles/
|
|
5119
|
-
"styles/
|
|
5120
|
-
"styles/
|
|
5118
|
+
"styles/5c10419a0c7462f2f14d.css",
|
|
5119
|
+
"styles/5c1f5cf47b7383235645.css",
|
|
5120
|
+
"styles/8468fdfd3cabfa7bffab.css",
|
|
5121
5121
|
"styles/6c28685f52b01d108e4d.css",
|
|
5122
|
-
"styles/
|
|
5122
|
+
"styles/59531d6f4722d2e7b428.css"
|
|
5123
5123
|
]
|
|
5124
5124
|
},
|
|
5125
5125
|
"VsSelectInput": {
|
|
@@ -5228,16 +5228,16 @@
|
|
|
5228
5228
|
"scripts/e57aeb2f5204c61f5555.js",
|
|
5229
5229
|
"scripts/32ca64baf0af7b9faffa.js",
|
|
5230
5230
|
"scripts/bbffd3414a7c7fddbcd6.js",
|
|
5231
|
-
"scripts/
|
|
5232
|
-
"scripts/
|
|
5231
|
+
"scripts/f8b6622c5200fd2be991.js",
|
|
5232
|
+
"scripts/5c10419a0c7462f2f14d.js",
|
|
5233
5233
|
"scripts/6f8a69836503b59819ba.js",
|
|
5234
|
-
"scripts/
|
|
5235
|
-
"scripts/
|
|
5234
|
+
"scripts/5c1f5cf47b7383235645.js",
|
|
5235
|
+
"scripts/8468fdfd3cabfa7bffab.js",
|
|
5236
5236
|
"scripts/6c28685f52b01d108e4d.js",
|
|
5237
5237
|
"scripts/aa3efed6b1f6232ce3fe.js",
|
|
5238
5238
|
"scripts/96174af322a67416c0a9.js",
|
|
5239
|
-
"scripts/
|
|
5240
|
-
"scripts/
|
|
5239
|
+
"scripts/59531d6f4722d2e7b428.js",
|
|
5240
|
+
"scripts/39c81d98eb88fed09973.js"
|
|
5241
5241
|
],
|
|
5242
5242
|
"styles": [
|
|
5243
5243
|
"styles/c1e52b98d340cd47fee7.css",
|
|
@@ -5246,12 +5246,12 @@
|
|
|
5246
5246
|
"styles/ae5c80d270825f9d87fa.css",
|
|
5247
5247
|
"styles/24228f9eee7eb5c30688.css",
|
|
5248
5248
|
"styles/bbffd3414a7c7fddbcd6.css",
|
|
5249
|
-
"styles/
|
|
5250
|
-
"styles/
|
|
5251
|
-
"styles/
|
|
5249
|
+
"styles/5c10419a0c7462f2f14d.css",
|
|
5250
|
+
"styles/5c1f5cf47b7383235645.css",
|
|
5251
|
+
"styles/8468fdfd3cabfa7bffab.css",
|
|
5252
5252
|
"styles/6c28685f52b01d108e4d.css",
|
|
5253
|
-
"styles/
|
|
5254
|
-
"styles/
|
|
5253
|
+
"styles/59531d6f4722d2e7b428.css",
|
|
5254
|
+
"styles/39c81d98eb88fed09973.css"
|
|
5255
5255
|
]
|
|
5256
5256
|
},
|
|
5257
5257
|
"VsQuote": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VsProductSearch=e():t.VsProductSearch=e()}(self,(function(){return(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[7018],{42720:function(){},63529:function(t,e,n){"use strict";var r=n(81779),s=n(73366),o=n(22048),u=n(97809);e.Z={name:"VsProductSearch",status:"prototype",release:"0.0.1",components:{VsContainer:r.xB,VsRow:r.ou,VsCol:r.hY,VsProductSearchEmbed:u.default,VsHeading:s.default,VsWarning:o.default},props:{noJsMessage:{type:String,required:!0},defaultLocation:{type:String,default:""},defaultProd:{type:String,default:"acti,attr,reta"},defaultLocale:{type:String,default:"en"}}}},20823:function(t,e,n){"use strict";n.d(e,{s:function(){return a}});var r=n(66252),s=n(3577),o={class:"vs-product-search"},u={class:"vs-product-search__intro"};function a(t,e,n,a,c,l){var i=(0,r.up)("VsHeading"),d=(0,r.up)("VsCol"),f=(0,r.up)("VsProductSearchEmbed"),p=(0,r.up)("VsWarning"),_=(0,r.up)("VsRow"),v=(0,r.up)("VsContainer");return(0,r.wg)(),(0,r.iD)("div",o,[(0,r.Wm)(v,null,{default:(0,r.w5)((function(){return[(0,r.Wm)(_,null,{default:(0,r.w5)((function(){return[(0,r.Wm)(d,{class:"vs-product-search__col vs-product-search__col--left",xl:"7"},{default:(0,r.w5)((function(){return[(0,r.Wm)(i,{level:"2",alternative:"",class:"vs-product-search__heading mt-0"},{default:(0,r.w5)((function(){return[(0,r.WI)(t.$slots,"vs-module-heading")]})),_:3}),(0,r._)("div",u,[(0,r.WI)(t.$slots,"vs-module-intro")])]})),_:3}),(0,r.Wm)(d,{class:"vs-product-search__col vs-product-search__col--right",xl:"5"},{default:(0,r.w5)((function(){return[(0,r.Wm)(f,{class:"vs-product-search__widget","default-location":n.defaultLocation,"default-locale":n.defaultLocale,"default-prod":n.defaultProd},null,8,["default-location","default-locale","default-prod"]),(0,r.Wm)(p,{class:"vs-product-search__no-js"},{default:(0,r.w5)((function(){return[(0,r.Uk)((0,s.toDisplayString)(n.noJsMessage),1)]})),_:1})]})),_:1})]})),_:3})]})),_:3})])}},66217:function(t,e,n){"use strict";var r=n(93379),s=n.n(r),o=n(7795),u=n.n(o),a=n(90569),c=n.n(a),l=n(3565),i=n.n(l),d=n(19216),f=n.n(d),p=n(44589),_=n.n(p),v=n(42720),h=n.n(v),m={};m.styleTagTransform=_(),m.setAttributes=i(),m.insert=c().bind(null,"head"),m.domAPI=u(),m.insertStyleElement=f(),s()(h(),m),h()&&h().locals&&h().locals},65121:function(t,e,n){"use strict";n.r(e);var r=n(8468),s=n(11406);n(50144);const o=(0,n(83744).Z)(s.Z,[["render",r.s]]);e.default=o},11406:function(t,e,n){"use strict";n.d(e,{Z:function(){return r.Z}});var r=n(63529)},8468:function(t,e,n){"use strict";n.d(e,{s:function(){return r.s}});var r=n(20823)},50144:function(t,e,n){"use strict";n(66217)}},function(t){return t.O(0,[6252,3744,7991,9963,6486,2854,4942,6765,7169,7476,8764,7429,4300,7218,7370,5730,976,3918,7581,4186,1321,1779,3366,2048,7810,5643,2604,2147,2336,2278,7710,6971,9335,7175,501,7809],(function(){return 65121,t(t.s=65121)})),t.O()}])}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[7809],{28765:function(){},54955:function(e,t,n){"use strict";var a=n(93379),l=n.n(a),o=n(7795),r=n.n(o),u=n(90569),c=n.n(u),i=n(3565),s=n.n(i),d=n(19216),f=n.n(d),p=n(44589),v=n.n(p),m=n(28765),h=n.n(m),b={};b.styleTagTransform=v(),b.setAttributes=s(),b.insert=c().bind(null,"head"),b.domAPI=r(),b.insertStyleElement=f(),l()(h(),b),h()&&h().locals&&h().locals},43062: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 l in t=arguments[n])Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l]);return e},a.apply(this,arguments)},l=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(l,o){function r(e){try{c(a.next(e))}catch(e){o(e)}}function u(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?l(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,u)}c((a=a.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,a,l,o,r={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,a&&(l=2&u[0]?a.return:u[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,u[1])).done)return l;switch(a=0,l&&(u=[2&u[0],l.value]),u[0]){case 0:case 1:l=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(!((l=(l=r.trys).length>0&&l[l.length-1])||6!==u[0]&&2!==u[0])){r=0;continue}if(3===u[0]&&(!l||u[1]>l[0]&&u[1]<l[3])){r.label=u[1];break}if(6===u[0]&&r.label<l[1]){r.label=l[1],l=u;break}if(l&&r.label<l[2]){r.label=l[2],r.ops.push(u);break}l[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(e){u=[6,e],a=0}finally{n=l=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(76765),c=n(76765),i={class:"vs-product-search-embed"},s={key:0,class:"container"},d={class:"row"},f={class:"col-12"},p=["action","onSubmit"],v={"aria-live":"polite"},m=["disabled","value"],h=["disabled","value"],b=["value"],y={key:4,type:"hidden",name:"areaproxdist",value:"10"},k={key:5},g={key:3},w=[(0,c.createElementVNode)("input",{hidden:"true",name:"avail",value:"on"},null,-1)],_={key:0},N=["value"],T=n(76765),V=n(12147),x=n(61309),B=n(68504),E=n(83506),L=r(n(27175)),S=r(n(17710)),C=r(n(49335)),P=r(n(10501)),D=r(n(96971)),O=r(n(83918));t.default=(0,u.defineComponent)({__name:"ProductSearchEmbed",props:{defaultProd:{type:String,default:"acti,attr,reta"},defaultLocation:{type:String,default:""},defaultLocale:{type:String,default:""}},setup:function(e){var t=this,n=e,r=(0,T.ref)(!1),u=(0,T.ref)(),j=(0,T.ref)([]),U=((0,T.ref)(null),(0,T.ref)()),M=(0,T.ref)(!1),A=(0,T.computed)((function(){var e=void 0===u.value?"see-do":u.value;return"/info/".concat(x.paths[e])})),F=!1,I={en:{localeUrl:""},fr:{localeUrl:"fr-fr"},de:{localeUrl:"de-de"},es:{localeUrl:"es-es"},it:{localeUrl:"it-it"},nl:{localeUrl:"nl-nl"}},G=(0,T.computed)((function(){var e=n.defaultLocale.length>0?n.defaultLocale:(0,V.getLocale)();return"en"===e&&(e=""),e})),R=(0,T.computed)((function(){return"".concat(x.baseUrl.prod).concat(G.value?"/"+G.value:"").concat(A.value,"/search-results")})),J="https://www.visitscotland.com/data/locations?locale=".concat(G.value),Y=(0,T.ref)([]),K=function(e){U.value=Y.value.find((function(t){return t.name===e}))},q=(0,T.ref)([]),z=(0,T.ref)([]),H=(0,T.ref)([]),Q=function(){r.value=!0,(0,T.nextTick)((function(){r.value=!1}))},W=(0,T.computed)((function(){return r.value?[]:q.value.map((function(e){return a(a({},e),{displayName:(0,V.getProductName)(e.optionValue,e.displayName)})}))}));(0,T.onBeforeMount)((function(){return l(t,void 0,void 0,(function(){var e;return o(this,(function(t){return window.VS={},(e=document.createElement("script")).async=!1,e.onload=Q,e.setAttribute("src","https://www.visitscotland.com/".concat((I[n.defaultLocale]||"").localeUrl,"/data/template/search.js")),document.head.appendChild(e),[2]}))}))})),(0,T.onMounted)((function(){return l(t,void 0,void 0,(function(){var e,t,a;return o(this,(function(l){switch(l.label){case 0:return[4,(0,E.getData)(J)];case 1:return(e=l.sent())&&(Y.value=e.data),""!==n.defaultLocation&&K(n.defaultLocation),F=!0,u.value=n.defaultProd,o=(0,B.getProductTypes)(),r=[],o.forEach((function(e){r.push(e)})),q.value=r,[4,(0,E.getData)("https://www.visitscotland.com/tms-api/v1/attractions")];case 2:return(t=l.sent())&&(z.value=t.data),[4,(0,E.getData)("https://www.visitscotland.com/tms-api/v1/origins?active=1")];case 3:return(a=l.sent())&&(H.value=a.data),[2]}var o,r}))}))}));var X=function(e){M.value=!0;var t=e.currentTarget;setTimeout((function(){t.submit()}),500)};return function(t,n){var a,l,o,T,B,E;return(0,c.openBlock)(),(0,c.createElementBlock)("div",i,[r.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.createElementVNode)("form",{action:R.value,onSubmit:(0,c.withModifiers)(X,["prevent"]),"accept-charset":"UTF-8"},[(0,c.createVNode)(C.default,{label:(0,c.unref)(V.getLabelText)("for","For"),id:"select-type",name:"prodtypes","default-selected":e.defaultProd,onChangeOption:n[0]||(n[0]=function(e){return u.value=e}),options:W.value},null,8,["label","default-selected","options"]),(0,c.createElementVNode)("div",v,["tour"!=u.value&&(0,c.unref)(F)?((0,c.openBlock)(),(0,c.createBlock)(L.default,{key:0,id:"search-location",label:(0,c.unref)(V.getLabelText)("location","Location"),"multiselect-label":"name",name:"loc",options:Y.value,placeholder:(0,c.unref)(V.getLabelText)("location_placeholder","Enter a location"),"track-by":"name",onChangeValue:n[1]||(n[1]=function(e){return K(e)}),"default-val":(0,c.unref)(U)},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)(U))||void 0===a?void 0:a.type),value:(null===(l=(0,c.unref)(U))||void 0===l?void 0:l.key)||""},null,8,m)):(0,c.createCommentVNode)("",!0),"tour"!==u.value?((0,c.openBlock)(),(0,c.createElementBlock)("input",{key:2,type:"hidden",name:"locpoly",disabled:"POLYGON"!==(null===(o=(0,c.unref)(U))||void 0===o?void 0:o.type),value:(null===(T=(0,c.unref)(U))||void 0===T?void 0:T.key)||""},null,8,h)):(0,c.createCommentVNode)("",!0),"tour"!==u.value?((0,c.openBlock)(),(0,c.createElementBlock)("input",{key:3,type:"hidden",name:"locprox",value:"DISTRICT"===(null===(B=(0,c.unref)(U))||void 0===B?void 0:B.type)?1:0},null,8,b)):(0,c.createCommentVNode)("",!0),"tour"!==u.value&&"DISTRICT"===(null===(E=(0,c.unref)(U))||void 0===E?void 0:E.type)?((0,c.openBlock)(),(0,c.createElementBlock)("input",y)):(0,c.createCommentVNode)("",!0),"even"===u.value||"acco"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",k,["even"===u.value||"acco"===u.value?((0,c.openBlock)(),(0,c.createBlock)(D.default,{key:0,legend:(0,c.unref)(V.getLabelText)("date_label","Dates"),"start-label":(0,c.unref)(V.getLabelText)("checkin","Start Date","dates"),"end-label":(0,c.unref)(V.getLabelText)("checkout","End Date","dates"),"default-dates":M.value},null,8,["legend","start-label","end-label","default-dates"])):(0,c.createCommentVNode)("",!0),"even"===u.value?((0,c.openBlock)(),(0,c.createBlock)(P.default,{key:1,name:"name",label:(0,c.unref)(V.getLabelText)("keywords","Keywords"),id:"search-keywords"},null,8,["label"])):(0,c.createCommentVNode)("",!0),"acco"===u.value?((0,c.openBlock)(),(0,c.createBlock)(S.default,{key:2,availability:!0,label:(0,c.unref)(V.getLabelText)("guests","Guests"),id:"guest-selector"},null,8,["label"])):(0,c.createCommentVNode)("",!0),"acco"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",g,w)):(0,c.createCommentVNode)("",!0)])):(0,c.createCommentVNode)("",!0)]),"tour"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",_,[(0,c.createVNode)(L.default,{id:"tour-origin",label:(0,c.unref)(V.getLabelText)("tour_origin","Starting point"),"multiselect-label":"name",name:"origins[]",options:H.value,placeholder:(0,c.unref)(V.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)(j.value,(function(e){return(0,c.openBlock)(),(0,c.createElementBlock)("input",{type:"hidden",name:"attractions[]",value:e},null,8,N)})),256)),(0,c.createVNode)(L.default,{id:"tour-month",label:(0,c.unref)(V.getLabelText)("tour_month","I'm traveling in"),"multiselect-label":"label",name:"when",options:(0,c.unref)(V.getLabelText)("months",(0,c.unref)(x.monthsEnglish)),placeholder:(0,c.unref)(V.getLabelText)("tour_month_placeholder","Select month"),"track-by":"value"},null,8,["label","options","placeholder"])])):(0,c.createCommentVNode)("",!0),(0,c.createVNode)(O.default,{class:"mt-6",variant:"dark"},{default:(0,c.withCtx)((function(){return[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(V.getLabelText)("search","Search")),1)]})),_:1})],40,p)])])]))])}}})},61309:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.monthsEnglish=t.baseUrl=t.paths=t.products=void 0,t.products=[{key:"accommodation",displayName:"Accommodation",optionValue:"acco"},{key:"eventsAndFestivals",displayName:"Events & Festivals",optionValue:"even"},{key:"foodAndDrink",displayName:"Food & Drink",optionValue:"cate"},{key:"thingsToDo",displayName:"Things to do",optionValue:"acti,attr,reta"},{key:"tours",displayName:"Tours",optionValue:"tour"}],t.paths={acco:"accommodation","acti,attr,reta":"see-do",cate:"food-drink",even:"events",tour:"tours"},t.baseUrl={dev:"http://172.28.81.65:8089",prod:"https://www.visitscotland.com"},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"}]},83506:function(e,t,n){"use strict";var a=n(25108),l=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(l,o){function r(e){try{c(a.next(e))}catch(e){o(e)}}function u(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?l(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,u)}c((a=a.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,a,l,o,r={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,a&&(l=2&u[0]?a.return:u[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,u[1])).done)return l;switch(a=0,l&&(u=[2&u[0],l.value]),u[0]){case 0:case 1:l=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(!((l=(l=r.trys).length>0&&l[l.length-1])||6!==u[0]&&2!==u[0])){r=0;continue}if(3===u[0]&&(!l||u[1]>l[0]&&u[1]<l[3])){r.label=u[1];break}if(6===u[0]&&r.label<l[1]){r.label=l[1],l=u;break}if(l&&r.label<l[2]){r.label=l[2],r.ops.push(u);break}l[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(e){u=[6,e],a=0}finally{n=l=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getData=void 0;var u=r(n(97218));t.getData=function(e){return l(this,void 0,void 0,(function(){var t;return o(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]}}))}))}},68504:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProductTypes=t.getURLParameters=void 0;var a,l=n(61309);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 l.products;var e=a.search_config.basic_config.productTypes,t=[];return Object.keys(e).forEach((function(n){t.push({key:e[n].value,displayName:e[n].text,optionValue:e[n].value})})),t}},97809:function(e,t,n){"use strict";n.r(t);var a=n(65531),l={};for(var o in a)"default"!==o&&(l[o]=function(e){return a[e]}.bind(0,o));n.d(t,l),n(67430);const r=a.default;t.default=r},67430:function(e,t,n){"use strict";n(54955)},65531:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l.a}});var a=n(43062),l=n.n(a),o={};for(var r in a)"default"!==r&&(o[r]=function(e){return a[e]}.bind(0,r));n.d(t,o)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[2147],{12147:function(e,o){var n;Object.defineProperty(o,"__esModule",{value:!0}),o.getLocale=o.getProductName=o.getLabelText=void 0,o.getLabelText=function(e,o,t){return n="undefined"!=typeof window&&"object"==typeof window.VS?window.VS:{},Object.keys(n).length>0?void 0!==t?n.search_config.basic_config.search_module[t][e]:n.search_config.basic_config.search_module[e]:o},o.getProductName=function(e,o){if(n="undefined"!=typeof window&&"object"==typeof window.VS?window.VS:{},Object.keys(n).length>0){var t={};return Object.keys(n.search_config.basic_config.productTypes).forEach((function(e){var o=n.search_config.basic_config.productTypes[e];t[o.value]=o.text})),t[e]?t[e]:o}return o},o.getLocale=function(){var e=document.documentElement.lang.toLocaleLowerCase().slice(0,2)||"";return"en"===e&&(e=""),e}}}]);
|