@visitscotland/component-library 1.2.5 → 1.2.7
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 +101 -45
- package/dist/client/manifest.json +79 -79
- package/dist/client/scripts/65e49c11683dca5f15ad.js +1 -0
- package/dist/client/scripts/b1c53219a425f5d882ff.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 → 0a6b03ab5dcdc935cecc.css} +1 -1
- package/package.json +3 -2
- package/dist/client/scripts/4d8e9ed730281d8928fa.js +0 -1
- package/dist/client/scripts/671adc68de28b79a97ce.js +0 -1
- /package/dist/client/styles/{d4bc82d8350557c61f35.css → d985a7849d3e085d1db4.css} +0 -0
|
@@ -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)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[8745],{98745:function(e,t,a){a.r(t);var r=a(64467),_=a(10810),n=a(47677),i=a(4859),o=a(63555),c=a(12554);function g(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?g(Object(a),!0).forEach((function(t){(0,r.A)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):g(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var p={computed:l({},(0,_.aH)(i.A,{pageUrl:function(e){return e.pageUrl}})),data:function(){return{dataLayerLoadConfirmed:!1,dataLayerStore:null}},mounted:function(){this.dataLayerStore=(0,i.A)((0,n.A)())},methods:{templateFiller:function(e,t){var a={};return e.forEach((function(e){a[e]="",a[e]=t[e]||void 0,"language"===e&&void 0===a[e]&&(a[e]=t.site_language||void 0)})),a},createDataLayerObject:function(e,t,a){var r,_,n,i,o,g,l="";switch(t&&t.target&&(g=t.target.text?t.target.text.trim():t.target.innerText),e){case"productSearchDataEvent":_="VS - GA4 - Event - PSR Search",n={event:r="psr_search",psr_search_type:t.searchType,psr_search_location:t.searchLocation,page_path:a,tag_name:_},i=this.compileFullTemplate(n),o=this.templateFiller(c.Gn,i);break;case"pageViewTemplateDataEvent":n={event:r="page_view"},i=this.compileFullTemplate(n),o=this.templateFiller(c.Vq,i);break;case"menuNavigationDataEvent":n={event:r="menu_navigation",click_text:t.target.text.trim(),click_URL:a},i=this.compileFullTemplate(n),o=this.templateFiller(c.qv,i);break;case"socialMediaExternalLinkDataEvent":n={event:r="social_media_footer",tag_name:_="VS - GA - Social Media External Link",click_URL:a},i=this.compileFullTemplate(n),o=this.templateFiller(c.P4,i);break;case"homePageLogoClickDataEvent":n={event:r="homepage_logo_click",tag_name:_="VS - GA - Homepage Logo Click"},i=this.compileFullTemplate(n),o=this.templateFiller(c.C0,i);break;case"externalLinkDataEvent":n={event:r="external_link",tag_name:_="VS - GA - External Link",click_text:g,click_URL:a},i=this.compileFullTemplate(n),o=this.templateFiller(c.Uf,i);break;case"internalLinkDataEvent":n={event:r="internal_link",tag_name:_="VS - GA - Internal Link",click_text:g,click_URL:a},i=this.compileFullTemplate(n),o=this.templateFiller(c.Qo,i);break;case"formsDataEvent":n={event:r="forms",tag_name:_="VS - GA - Forms",form_status:"form_submitted"},i=this.compileFullTemplate(n),o=this.templateFiller(c.Uo,i);break;case"errorDataEvent":n={event:r="errors",tag_name:_="VS - GA - Errors",error_type:t.error_type,error_details:t.error_details},i=this.compileFullTemplate(n),o=this.templateFiller(c.BV,i);break;case"videoTrackingDataEvent":n={event:r="video_tracking",tag_name:_="VS - GA - Video Tracking",video_status:t.status,video_title:t.title||"",video_percent:t.percent||0},i=this.compileFullTemplate(n),o=this.templateFiller(c.lz,i);break;case"socialShareDataEvent":r="share",_="VS - GA - Share",void 0!==t.target.text&&(l=t.target.text.trim()),n={event:r,tag_name:_,click_text:l,click_URL:a},i=this.compileFullTemplate(n),o=this.templateFiller(c.g4,i);break;case"carbonQuestionEvent":n={event:r="carbonCalculatorQuestion",tag_name:_="VS - GA - Carbon Calculator Question Answered",question_number:t.questionNumber,answer:t.answer},i=this.compileFullTemplate(n),o=this.templateFiller(c.QI,i);break;case"carbonCompleteEvent":n={event:r="carbonCalculatorComplete",tag_name:_="VS - GA - Carbon Calculator Complete",total_emissions:t.totalEmissions,total_per_day:t.totalPerDay,travel_percent:t.travelPercent,accommodation_percent:t.accommodationPercent,food_percent:t.foodPercent},i=this.compileFullTemplate(n),o=this.templateFiller(c.T9,i)}this.pushToDataLayer(o)},returnIsoDate:function(){return new Date(Date.now()).toISOString()},pushToDataLayer:function(e){var t=this;this.dataLayerLoadConfirmed?window.dataLayer.push(e):(0,o.A)("dataLayer",(function(){t.dataLayerLoadConfirmed=!0,window.dataLayer.push(e)}))},compileFullTemplate:function(e){var t=l(l({},this.dataLayerStore.GTMData),e);return t.hit_timestamp=this.returnIsoDate(),t},targetText:function(e){return e.target.text?e.target.text.trim():""}}};t.default=p},63555:function(e,t){t.A=function e(t,a){window.setTimeout((function(){window[t]?a(window[t]):e(t,a)}),500)}},12554:function(e,t,a){a.d(t,{BV:function(){return s},C0:function(){return c},Gn:function(){return _},P4:function(){return o},QI:function(){return m},Qo:function(){return p},T9:function(){return y},Uf:function(){return l},Uo:function(){return u},Vq:function(){return r},g4:function(){return i},lz:function(){return g},qv:function(){return n}});var r=["event","site_language","content_language","content_category","content_page_type","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","content_region","content_city","provider_search_region","provider_search_category","provider_search_facilities","provider_search_grading","provider_search_awards","provider_search_rooms","provider_search_min_price","provider_search_max_price","provider_category","provider_category_level_1","provider_category_level_2","provider_name","provider_ID","star_grading","provider_region","provider_city","provider_has_website","page_with_booking_link","provider_has_availability","availability_search_start_date","availability_search_end_date","availability_search_no_of_nights","availability_search_no_of_adults","availability_search_no_of_children","availability_search_no_of_rooms","availability_search_price_range","hit_timestamp","tag_name","meta_data"],_=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","user_country_setting","hit_timestamp","tag_name","meta_data","psr_search_type","psr_search_location","page_path"],n=["event","site_language","user_country_setting","hit_timestamp","tag_name","meta_data","click_text","click_URL"],i=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_text","click_URL"],o=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_URL","location_on_page"],c=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_URL"],g=["event","language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","video_status","video_title","video_percent"],l=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_text","click_URL"],p=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_text","click_URL"],s=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","error_type","error_details","page_path"],u=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","page_path","form_status"],m=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","question_number","answer"],y=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","total_emissions","total_per_day","travel_percent","accommodation_percent","food_percent"]},4859:function(e,t,a){var r=a(17527),_=(0,a(48086).defineStore)("datalayer",(function(){var e=(0,r.ref)(""),t=(0,r.ref)(!1),a=(0,r.ref)({});return{pageUrl:e,tagsTestRun:t,GTMData:a,getValueFromKey:function(e){return a.value[e]},setTestRun:function(e){t.value=e},setPageUrl:function(t){e.value=t},processPayload:function(e){a.value[e.key]=e.value}}}));t.A=_}}]);
|
|
@@ -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}
|