@visitscotland/component-library 3.0.15 → 3.0.17
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/dist/client/manifest.json +18 -18
- package/dist/client/scripts/45f0025aa5e0e67e90af.js +1 -0
- package/dist/client/scripts/{31a644f9efc148bce87c.js → 7a46684731ebac236769.js} +1 -1
- package/dist/client/scripts/b3188be9e3ea60655aec.js +1 -0
- package/dist/components/components/radio-button/RadioButton.vue.d.ts +4 -1
- package/dist/components/vs-component-library.js +171 -171
- package/dist/components/vs-component-library.mjs +8141 -8136
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/manifest.json +1 -1
- package/package.json +230 -230
- package/CHANGELOG.md +0 -1842
- package/dist/client/scripts/591779e48ffc23e54d8c.js +0 -1
- package/dist/client/scripts/d1ccfaba65d3a42016e7.js +0 -1
- /package/dist/client/styles/{d1ccfaba65d3a42016e7.css → 45f0025aa5e0e67e90af.css} +0 -0
- /package/dist/client/styles/{591779e48ffc23e54d8c.css → b3188be9e3ea60655aec.css} +0 -0
- /package/dist/ssr/styles/{f04e63c81ef3b8a3a7c0.css → e2f8a8aea29b26d34f75.css} +0 -0
|
@@ -1135,7 +1135,7 @@
|
|
|
1135
1135
|
"scripts/e8893c6cf105d247bb20.js",
|
|
1136
1136
|
"scripts/74b51e65681bf9c91a25.js",
|
|
1137
1137
|
"scripts/a5720cb035b84b05a681.js",
|
|
1138
|
-
"scripts/
|
|
1138
|
+
"scripts/7a46684731ebac236769.js",
|
|
1139
1139
|
"scripts/e23134b888a5fbeafd21.js",
|
|
1140
1140
|
"scripts/107a6a23f7692197dc75.js",
|
|
1141
1141
|
"scripts/76b69830b25050250f7a.js",
|
|
@@ -1227,7 +1227,7 @@
|
|
|
1227
1227
|
"scripts/cd7968f5815183867103.js",
|
|
1228
1228
|
"scripts/a6db4893a81bbd0fa783.js",
|
|
1229
1229
|
"scripts/cd49442f3979c5aa946f.js",
|
|
1230
|
-
"scripts/
|
|
1230
|
+
"scripts/7a46684731ebac236769.js",
|
|
1231
1231
|
"scripts/107a6a23f7692197dc75.js",
|
|
1232
1232
|
"scripts/76b69830b25050250f7a.js",
|
|
1233
1233
|
"scripts/57ca21b271f4bf6fe7d9.js",
|
|
@@ -1490,7 +1490,7 @@
|
|
|
1490
1490
|
"scripts/52b46aa0bfce7a4919f7.js",
|
|
1491
1491
|
"scripts/c33d99c230f4cf094104.js",
|
|
1492
1492
|
"scripts/0b0f42f47f292b07032e.js",
|
|
1493
|
-
"scripts/
|
|
1493
|
+
"scripts/7a46684731ebac236769.js",
|
|
1494
1494
|
"scripts/80c20d5d420f9e6d6f0d.js",
|
|
1495
1495
|
"scripts/3a44c04999850221c250.js"
|
|
1496
1496
|
],
|
|
@@ -2054,12 +2054,12 @@
|
|
|
2054
2054
|
"scripts/cd49442f3979c5aa946f.js",
|
|
2055
2055
|
"scripts/27c02536858df2e4e9b5.js",
|
|
2056
2056
|
"scripts/a5720cb035b84b05a681.js",
|
|
2057
|
-
"scripts/
|
|
2057
|
+
"scripts/7a46684731ebac236769.js",
|
|
2058
2058
|
"scripts/68b4fa981d1ccbcdb115.js",
|
|
2059
2059
|
"scripts/30b52393df161a18e1e4.js",
|
|
2060
2060
|
"scripts/80c20d5d420f9e6d6f0d.js",
|
|
2061
2061
|
"scripts/87de14e59017b3871a2c.js",
|
|
2062
|
-
"scripts/
|
|
2062
|
+
"scripts/b3188be9e3ea60655aec.js"
|
|
2063
2063
|
],
|
|
2064
2064
|
"styles": [
|
|
2065
2065
|
"styles/cd7968f5815183867103.css",
|
|
@@ -2070,7 +2070,7 @@
|
|
|
2070
2070
|
"styles/30b52393df161a18e1e4.css",
|
|
2071
2071
|
"styles/80c20d5d420f9e6d6f0d.css",
|
|
2072
2072
|
"styles/87de14e59017b3871a2c.css",
|
|
2073
|
-
"styles/
|
|
2073
|
+
"styles/b3188be9e3ea60655aec.css"
|
|
2074
2074
|
]
|
|
2075
2075
|
},
|
|
2076
2076
|
"VsGlobalMenuDropdown": {
|
|
@@ -2640,7 +2640,7 @@
|
|
|
2640
2640
|
"scripts/cd7968f5815183867103.js",
|
|
2641
2641
|
"scripts/a6db4893a81bbd0fa783.js",
|
|
2642
2642
|
"scripts/cd49442f3979c5aa946f.js",
|
|
2643
|
-
"scripts/
|
|
2643
|
+
"scripts/7a46684731ebac236769.js",
|
|
2644
2644
|
"scripts/68b4fa981d1ccbcdb115.js",
|
|
2645
2645
|
"scripts/743d1b4c9f1c3f1b0fec.js"
|
|
2646
2646
|
],
|
|
@@ -4044,7 +4044,7 @@
|
|
|
4044
4044
|
"scripts/e8893c6cf105d247bb20.js",
|
|
4045
4045
|
"scripts/74b51e65681bf9c91a25.js",
|
|
4046
4046
|
"scripts/066d7b3e707ba3f07a31.js",
|
|
4047
|
-
"scripts/
|
|
4047
|
+
"scripts/7a46684731ebac236769.js",
|
|
4048
4048
|
"scripts/213d4a4283a3fa569b9e.js",
|
|
4049
4049
|
"scripts/68b4fa981d1ccbcdb115.js",
|
|
4050
4050
|
"scripts/30915f258985633764de.js",
|
|
@@ -4405,7 +4405,7 @@
|
|
|
4405
4405
|
"scripts/cd7968f5815183867103.js",
|
|
4406
4406
|
"scripts/a6db4893a81bbd0fa783.js",
|
|
4407
4407
|
"scripts/cd49442f3979c5aa946f.js",
|
|
4408
|
-
"scripts/
|
|
4408
|
+
"scripts/7a46684731ebac236769.js",
|
|
4409
4409
|
"scripts/76b69830b25050250f7a.js",
|
|
4410
4410
|
"scripts/b4bb9618e977e9850320.js"
|
|
4411
4411
|
],
|
|
@@ -4742,7 +4742,7 @@
|
|
|
4742
4742
|
"scripts/cd7968f5815183867103.js",
|
|
4743
4743
|
"scripts/a6db4893a81bbd0fa783.js",
|
|
4744
4744
|
"scripts/cd49442f3979c5aa946f.js",
|
|
4745
|
-
"scripts/
|
|
4745
|
+
"scripts/7a46684731ebac236769.js",
|
|
4746
4746
|
"scripts/e2dac2a830936f88d6af.js",
|
|
4747
4747
|
"scripts/68b4fa981d1ccbcdb115.js",
|
|
4748
4748
|
"scripts/62bdbadba4db64715c90.js",
|
|
@@ -4753,7 +4753,7 @@
|
|
|
4753
4753
|
"scripts/8e3fa387146c24502ada.js",
|
|
4754
4754
|
"scripts/f709739d25cf0e452a4a.js",
|
|
4755
4755
|
"scripts/b23268335fe0f25580ce.js",
|
|
4756
|
-
"scripts/
|
|
4756
|
+
"scripts/45f0025aa5e0e67e90af.js",
|
|
4757
4757
|
"scripts/bef607c592b6cb0a9124.js"
|
|
4758
4758
|
],
|
|
4759
4759
|
"styles": [
|
|
@@ -4767,7 +4767,7 @@
|
|
|
4767
4767
|
"styles/8e3fa387146c24502ada.css",
|
|
4768
4768
|
"styles/f709739d25cf0e452a4a.css",
|
|
4769
4769
|
"styles/b23268335fe0f25580ce.css",
|
|
4770
|
-
"styles/
|
|
4770
|
+
"styles/45f0025aa5e0e67e90af.css"
|
|
4771
4771
|
]
|
|
4772
4772
|
},
|
|
4773
4773
|
"VsProductSearch": {
|
|
@@ -4813,7 +4813,7 @@
|
|
|
4813
4813
|
"scripts/e8893c6cf105d247bb20.js",
|
|
4814
4814
|
"scripts/74b51e65681bf9c91a25.js",
|
|
4815
4815
|
"scripts/a5720cb035b84b05a681.js",
|
|
4816
|
-
"scripts/
|
|
4816
|
+
"scripts/7a46684731ebac236769.js",
|
|
4817
4817
|
"scripts/e2dac2a830936f88d6af.js",
|
|
4818
4818
|
"scripts/68b4fa981d1ccbcdb115.js",
|
|
4819
4819
|
"scripts/62bdbadba4db64715c90.js",
|
|
@@ -4824,7 +4824,7 @@
|
|
|
4824
4824
|
"scripts/8e3fa387146c24502ada.js",
|
|
4825
4825
|
"scripts/f709739d25cf0e452a4a.js",
|
|
4826
4826
|
"scripts/b23268335fe0f25580ce.js",
|
|
4827
|
-
"scripts/
|
|
4827
|
+
"scripts/45f0025aa5e0e67e90af.js",
|
|
4828
4828
|
"scripts/07878e8ba40a1832e00a.js"
|
|
4829
4829
|
],
|
|
4830
4830
|
"styles": [
|
|
@@ -4841,7 +4841,7 @@
|
|
|
4841
4841
|
"styles/8e3fa387146c24502ada.css",
|
|
4842
4842
|
"styles/f709739d25cf0e452a4a.css",
|
|
4843
4843
|
"styles/b23268335fe0f25580ce.css",
|
|
4844
|
-
"styles/
|
|
4844
|
+
"styles/45f0025aa5e0e67e90af.css",
|
|
4845
4845
|
"styles/07878e8ba40a1832e00a.css"
|
|
4846
4846
|
]
|
|
4847
4847
|
},
|
|
@@ -4931,7 +4931,7 @@
|
|
|
4931
4931
|
"scripts/52b46aa0bfce7a4919f7.js",
|
|
4932
4932
|
"scripts/c33d99c230f4cf094104.js",
|
|
4933
4933
|
"scripts/0b0f42f47f292b07032e.js",
|
|
4934
|
-
"scripts/
|
|
4934
|
+
"scripts/7a46684731ebac236769.js",
|
|
4935
4935
|
"scripts/107a6a23f7692197dc75.js",
|
|
4936
4936
|
"scripts/8ec04573ec9d5447cd9b.js"
|
|
4937
4937
|
],
|
|
@@ -5026,7 +5026,7 @@
|
|
|
5026
5026
|
"scripts/c33d99c230f4cf094104.js",
|
|
5027
5027
|
"scripts/0b0f42f47f292b07032e.js",
|
|
5028
5028
|
"scripts/8a376c197f08276236aa.js",
|
|
5029
|
-
"scripts/
|
|
5029
|
+
"scripts/7a46684731ebac236769.js",
|
|
5030
5030
|
"scripts/30b52393df161a18e1e4.js",
|
|
5031
5031
|
"scripts/0a728ebe9ba686ed5dc4.js"
|
|
5032
5032
|
],
|
|
@@ -5071,7 +5071,7 @@
|
|
|
5071
5071
|
"scripts/a4a067edc9342e4ea427.js",
|
|
5072
5072
|
"scripts/e8893c6cf105d247bb20.js",
|
|
5073
5073
|
"scripts/74b51e65681bf9c91a25.js",
|
|
5074
|
-
"scripts/
|
|
5074
|
+
"scripts/7a46684731ebac236769.js",
|
|
5075
5075
|
"scripts/68b4fa981d1ccbcdb115.js",
|
|
5076
5076
|
"scripts/815727531bfef1c70c8f.js",
|
|
5077
5077
|
"scripts/03328a60362cb3651016.js"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[3293],{54193:function(){},29939: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(54193),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),"data-chromatic":"ignore"},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",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(61855);const l=a.default;t.default=l},61855:function(e,t,n){"use strict";n(29939)},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
|
-
"use strict";(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4282],{68269:function(t,i){i.A={computed:{ariaDescription:function(){return this.v$.inputVal&&this.v$.inputVal.$anyError||this.invalid?"error-".concat(this.fieldName):this.hintText?"hint-".concat(this.fieldName):null}}}},85510:function(t,i,e){var r=e(64467),n=e(3453),s=e(13855);function a(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);i&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),e.push.apply(e,r)}return e}function o(t){for(var i=1;i<arguments.length;i++){var e=null!=arguments[i]?arguments[i]:{};i%2?a(Object(e),!0).forEach((function(i){(0,r.A)(t,i,e[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))}return t}var u=s._$.regex(/^([A-Za-z][A-HJ-Ya-hj-y]?\d[A-Za-z\d]? ?\d[A-Za-z]{2}|GIR ?0A{2})$/),
|
|
1
|
+
"use strict";(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4282],{68269:function(t,i){i.A={computed:{ariaDescription:function(){return this.v$.inputVal&&this.v$.inputVal.$anyError||this.invalid?"error-".concat(this.fieldName):this.hintText?"hint-".concat(this.fieldName):null}}}},85510:function(t,i,e){var r=e(64467),n=e(3453),s=e(13855);function a(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);i&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),e.push.apply(e,r)}return e}function o(t){for(var i=1;i<arguments.length;i++){var e=null!=arguments[i]?arguments[i]:{};i%2?a(Object(e),!0).forEach((function(i){(0,r.A)(t,i,e[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))}return t}var u=s._$.regex(/^([A-Za-z][A-HJ-Ya-hj-y]?\d[A-Za-z\d]? ?\d[A-Za-z]{2}|GIR ?0A{2})$/),l={data:function(){return{inputVal:this.value,isInvalid:this.invalid}},computed:{isRequired:function(){return void 0!==s.mw&&"required"in this.validationRules},rules:function(){for(var t=this,i={},e=0,r=Object.entries(this.validationRules);e<r.length;e++){var a=(0,n.A)(r[e],2),l=a[0],c=a[1];"required"===l?i=o(o({},i),{},{required:s.mw}):"email"===l?i=o(o({},i),{},{email:s.Rp}):"minLength"===l?i=o(o({},i),{},{minLength:(0,s.Bp)(c)}):"maxLength"===l?i=o(o({},i),{},{maxLength:(0,s.Ru)(c)}):"invalidVal"===l?i=o(o({},i),{},{noInvalid:function(){return-1===t.inputVal.indexOf(t.validationRules.invalidVal)}}):"postcode"===l&&(i=o(o({},i),{},{postcode:u}))}return void 0!==i?{inputVal:i=o({},i)}:{}},errorsList:function(){var t=this,i=[];return Object.keys(this.rules.inputVal).forEach((function(e){t.v$.$errors&&t.v$.$errors.forEach((function(t){t.$validator===e&&i.push(e)}))})),i}},watch:{errorsList:function(t){t.length?this.isInvalid=!0:this.isInvalid=!1}},methods:{manualValidate:function(){var t=this;if(this.isInvalid=!1,"required"in this.rules.inputVal){var i=!1;"string"==typeof this.inputVal?/\S/.test(this.inputVal)||(i=!0):this.inputVal||(i=!0),i&&-1===this.errorsList.indexOf("required")&&this.errorsList.push("required")}else this.errorsList.forEach((function(i,e){"required"===i&&t.errorsList.splice(e,1)}));this.errorsList.length&&(this.isInvalid=!0),this.touched=!0,this.$emit("status-update",{field:this.fieldName,value:this.inputVal,errors:this.errorsList})},emitStatus:function(){var t=this;setTimeout((function(){t.manualValidate(),t.touched=!0,t.v$.$touch()}),50)}}};i.A=l}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VsForm=t():e.VsForm=t()}(self,(function(){return(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[1736],{97001:function(){},97272:function(e,t,n){"use strict";var i=n(64467),a=n(3453),r=n(34352),s=n(57536),o=n(88620),l=n(22142),d=n(51688),u=n(26358),f=n(88258),c=n(48836),g=n(13838),h=n(79122),m=n(98745);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.A={name:"VsForm",status:"prototype",release:"0.0.1",components:{VsInput:l.default,VsSelect:d.default,VsCheckbox:u.default,BFormGroup:r.a3,VsRecaptcha:f.default,VsButton:c.default,VsHeading:g.default,VsWarning:h.default},mixins:[m.default],props:{isMarketo:{type:Boolean,default:!0},submitUrl:{type:String,default:""},dataUrl:{type:String,required:!0},recaptchaKey:{type:String,default:(0,o.A)("RECAPTCHA_TOKEN")},recaptchaTextareaLabel:{type:String,default:"Does not need any text"},isProd:{type:Boolean,default:!1},munchkinId:{type:String,default:""},marketoInstance:{type:String,default:""},language:{type:String,default:"en"},messagingUrl:{type:String,required:!0},countryListUrl:{type:String,default:""},isTest:{type:Boolean,default:!0}},data:function(){return{submitted:!1,submitting:!1,submitError:!1,formData:{},messagingData:{},form:{},formIsInvalid:!1,showErrorMessage:!1,errorFields:[],triggerValidate:!1,recaptchaVerified:!1,conditionalFields:{},inputVal:"",reAlertErrors:!1}},computed:{formId:function(){return this.isProd?this.formData.formLiveId:this.formData.formSandboxId},showFormHeading:function(){return!this.isUndefined(this.getTranslatedContent)&&!this.isUndefined(this.getTranslatedContent("heading"))}},created:function(){this.getFormData(),this.getGlobalMessaging()},methods:{getFormData:function(){var e=this;s.A.get(this.dataUrl).then((function(t){e.formData=t.data,e.isMarketo&&window.MktoForms2&&window.MktoForms2.loadForm(e.marketoInstance,e.munchkinId,e.formId),t.data.fields.forEach((function(t){e.form[t.name]="",t.conditional&&(e.conditionalFields[t.name]=!1)}))})).catch((function(){}))},getGlobalMessaging:function(){var e=this;s.A.get(this.messagingUrl).then((function(t){e.messagingData=t.data})).catch((function(){}))},getLanguageObj:function(){return this.isUndefined(this.formData[this.language])?{}:this.formData[this.language]||void 0},getTranslatedLabel:function(e,t){var n=this.getLanguageObj(),i="";return i="en"===this.language||this.isUndefined(n[e])||this.isUndefined(n[e].label)?this.formData.fields[t].label:n[e].label,this.showOptionalText(this.formData.fields[t])&&!this.isUndefined(this.getMessagingData("optional",this.language))&&(i="".concat(i," (").concat(this.getMessagingData("optional",this.language),")")),i},getTranslatedLegend:function(e,t){var n=this.getLanguageObj();return"en"===this.language||this.isUndefined(n[e])||this.isUndefined(n[e].descriptor)?this.formData.fields[t].descriptor:n[e].descriptor},getTranslatedInfo:function(e,t){var n=this.getLanguageObj();return"en"===this.language||this.isUndefined(n[e])||this.isUndefined(n[e].info)?this.formData.fields[t].info:n[e].info},getTranslatedValidation:function(e,t){var n,i=this.getLanguageObj();return"en"!==this.language||this.isUndefined(this.formData.fields[t].validationMessages)?this.isUndefined(i[e])||this.isUndefined(i[e].validationMessages)?"en"===this.language&&(n=this.formData.fields[t].validationMessages):n=i[e].validationMessages:n=this.formData.fields[t].validationMessages,n},getTranslatedOptions:function(e,t){var n=this.getLanguageObj(),i=[];return void 0===(i="en"===this.language||this.isUndefined(n[e])||this.isUndefined([e].options)?this.formData.fields[t].options:n[e].options)&&(i=[]),i},getTranslatedHint:function(e,t){var n=this.getLanguageObj();return"en"===this.language||this.isUndefined(n[e])||this.isUndefined(n[e].hint)?this.isUndefined(this.formData.fields[t].hint)?"":this.formData.fields[t].hint:n[e].hint},getTranslatedContent:function(e){var t=this.getLanguageObj();return"en"!==this.language||this.isUndefined(this.formData.content)||this.isUndefined(this.formData.content[e])?this.isUndefined(t.content)||this.isUndefined(t.content[e])?this.getMessagingData(e,this.language):t.content[e]:this.formData.content[e]},getMessagingData:function(e,t){return Object.keys(this.messagingData).length>0?this.messagingData[t][e]:"validation"===e?{}:""},getHiddenFields:function(){var e=this.$el.querySelectorAll("input[type=hidden]"),t={};return e.forEach((function(e){t[e.name]=e.value})),t},isUndefined:function(e){return void 0===e},updateFieldData:function(e){this.form[e.field]=e.value||"",Array.isArray(e.errors)?this.formIsInvalid=e.errors.length>0:this.formIsInvalid=null!==e.errors,this.manageErrorStatus(e.field,e.errors),this.checkConditionalFields()},manageErrorStatus:function(e,t){var n=this.errorFields.indexOf(e);-1!==n?(!t||t.length<1)&&this.errorFields.splice(n,1):t&&t.length>0&&this.errorFields.push(e)},showOptionalText:function(e){return!(!this.isUndefined(e.validation)&&!this.isUndefined(e.validation.required))},needsLabel:function(e){return"radio"!==e.element&&"submit"!==e.element&&"checkbox"!==e.element},preSubmit:function(e){var t=this;e.preventDefault(),this.isTest||this.onRecaptchaVerify(),this.triggerValidate=!0;var n=this.formData.fields.filter((function(e){return e.validation&&e.validation.required}));0===n.length?this.formIsInvalid=!1:n.forEach((function(e){/\S/.test(t.form[e.name])||(t.formIsInvalid=!0)})),this.showErrorMessage=this.formIsInvalid,Object.entries(this.conditionalFields).forEach((function(e){var n=(0,a.A)(e,2),i=n[0];n[1]||(t.form[i]="")})),this.errorFields.length>0&&(this.formIsInvalid=!0),!this.formIsInvalid&&this.recaptchaVerified?this.isMarketo?this.marketoSubmit():this.axiosSubmit():(this.showErrorMessage=!0,this.reAlertErrors=!0,setTimeout((function(){t.reAlertErrors=!1}),100))},marketoSubmit:function(){var e=this;this.createDataLayerObject("formsDataEvent");var t=window.MktoForms2.allForms()[0];t.addHiddenFields(this.form),window.grecaptcha&&t.addHiddenFields({lastReCAPTCHAUserFingerprint:window.grecaptcha.getResponse(),lastRecaptchaEnabledFormID:this.formId}),t.onSuccess((function(){return e.submitting=!1,e.submitted=!0,!1})),t.onSubmit((function(){e.submitting=!0})),t.submit()},axiosSubmit:function(){var e=this;this.submitting=!0;var t="";window.grecaptcha&&(t=window.grecaptcha.getResponse());var n=this.getHiddenFields();s.A.post(this.submitUrl,v(v(v({},this.form),n),{},{formType:this.formData.content?this.formData.content.formType:"","g-recaptcha-response":t})).then((function(){return e.submitting=!1,e.submitted=!0,!1})).catch((function(){}))},onRecaptchaVerify:function(){window.grecaptcha&&"function"==typeof window.grecaptcha.getResponse&&""!==window.grecaptcha.getResponse()?this.recaptchaVerified=!0:this.recaptchaVerified=!1},checkConditionalFields:function(){var e=this;Object.keys(this.conditionalFields).forEach((function(t){var n=e.formData.fields.find((function(e){return e.name===t})),i=!0;Object.keys(n.conditional).forEach((function(a){var r=n.conditional[a];Array.isArray(r)?-1===r.indexOf(e.form[a])&&(i=!1):e.form[a]!==r&&(i=!1),e.conditionalFields[t]=!!i}))}))},conditionalElementClass:function(e){return!0===this.conditionalFields[e]||void 0===this.conditionalFields[e]?"":"d-none"}}}},44909:function(e,t,n){"use strict";n.d(t,{X:function(){return h}});var i=n(20641),a=n(53751),r=n(90033),s={class:"vs-form","data-test":"vs-form"},o=(0,i.Lk)("form",{class:"d-none"},null,-1),l={class:"vs-form__main-heading vs-heading--style-level-2 float-none","data-test":"vs-form__main-heading"},d={key:0},u={"aria-live":"assertive"},f={key:0},c=["innerHTML"],g={key:2};function h(e,t,n,h,m,p){var v=(0,i.g2)("VsInput"),b=(0,i.g2)("VsSelect"),y=(0,i.g2)("VsCheckbox"),D=(0,i.g2)("BFormGroup"),k=(0,i.g2)("VsRecaptcha"),F=(0,i.g2)("VsButton"),O=(0,i.g2)("VsWarning"),T=(0,i.g2)("VsHeading");return(0,i.uX)(),(0,i.CE)("div",s,[o,m.submitted?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.CE)("form",{key:0,onSubmit:t[0]||(t[0]=(0,a.withModifiers)((function(){return p.preSubmit&&p.preSubmit.apply(p,arguments)}),["prevent"]))},[(0,i.Lk)("fieldset",null,[(0,i.Lk)("legend",l,(0,r.toDisplayString)(p.getTranslatedContent("heading")),1),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(m.formData.fields,(function(e,t){return(0,i.uX)(),(0,i.Wv)(D,{key:e.name,label:p.needsLabel(e)?p.getTranslatedLabel(e.name,t):"","label-for":p.needsLabel(e)?e.name:"",class:(0,r.normalizeClass)(p.conditionalElementClass(e.name))},{default:(0,i.k6)((function(){return[p.isUndefined(e.descriptor)||"checkbox"!==e.element?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.CE)("legend",d,(0,r.toDisplayString)(p.getTranslatedLegend(e.name,t)),1)),(0,i.Lk)("div",{class:(0,r.normalizeClass)(p.conditionalElementClass(e.name))},["input"===e.element?((0,i.uX)(),(0,i.Wv)(v,{key:0,ref_for:!0,ref:e.name,onStatusUpdate:p.updateFieldData,"field-name":e.name,type:e.type,"validation-rules":e.validation||{},"validation-messages":p.getTranslatedValidation(e.name,t)||{},"generic-validation":p.getMessagingData("validation",n.language),invalid:m.errorFields.indexOf(e.name)>-1,"trigger-validate":m.triggerValidate,"hint-text":p.getTranslatedHint(e.name,t),placeholder:e.placeholder||"","re-alert-errors":m.reAlertErrors},null,8,["onStatusUpdate","field-name","type","validation-rules","validation-messages","generic-validation","invalid","trigger-validate","hint-text","placeholder","re-alert-errors"])):(0,i.Q3)("",!0),"select"===e.element?((0,i.uX)(),(0,i.Wv)(b,{key:1,options:p.getTranslatedOptions(e.name,t),ref_for:!0,ref:e.name,onStatusUpdate:p.updateFieldData,"field-name":e.name,"validation-rules":e.validation||{},"validation-messages":p.getTranslatedValidation(e.name,t)||{},"generic-validation":p.getMessagingData("validation",n.language),invalid:m.errorFields.indexOf(e.name)>-1,"trigger-validate":m.triggerValidate,"country-list-url":n.countryListUrl,countries:e.countries,"hint-text":p.getTranslatedHint(e.name,t),"re-alert-errors":m.reAlertErrors},null,8,["options","onStatusUpdate","field-name","validation-rules","validation-messages","generic-validation","invalid","trigger-validate","country-list-url","countries","hint-text","re-alert-errors"])):(0,i.Q3)("",!0),"checkbox"===e.element?((0,i.uX)(),(0,i.Wv)(y,{key:e.name,ref_for:!0,ref:e.name,name:e.name,value:e.value,label:p.getTranslatedLabel(e.name,t),onStatusUpdate:p.updateFieldData,"field-name":e.name,"validation-rules":e.validation||{},"validation-messages":p.getTranslatedValidation(e.name,t)||{},"generic-validation":p.getMessagingData("validation",n.language),invalid:m.errorFields.indexOf(e.name)>-1,"trigger-validate":m.triggerValidate,"optional-text":p.getMessagingData("optional",n.language),"hint-text":p.getTranslatedHint(e.name,t),"info-text":p.getTranslatedInfo(e.name,t),"re-alert-errors":m.reAlertErrors},null,8,["name","value","label","onStatusUpdate","field-name","validation-rules","validation-messages","generic-validation","invalid","trigger-validate","optional-text","hint-text","info-text","re-alert-errors"])):(0,i.Q3)("",!0)],2)]})),_:2},1032,["label","label-for","class"])})),128))]),(0,i.RG)(e.$slots,"hidden-fields"),(0,i.bF)(k,{onVerified:p.onRecaptchaVerify,"site-key":n.recaptchaKey,invalid:!m.recaptchaVerified&&m.showErrorMessage,language:n.language,"error-msg":p.getMessagingData("recaptchaError",n.language),class:"mt-9","textarea-label":n.recaptchaTextareaLabel,"re-alert-errors":m.reAlertErrors},null,8,["onVerified","site-key","invalid","language","error-msg","textarea-label","re-alert-errors"]),(0,i.bF)(F,{variant:"primary",type:"submit",class:"vs-form__submit mt-9",onClick:p.preSubmit},{default:(0,i.k6)((function(){return[(0,i.eW)((0,r.toDisplayString)(p.getTranslatedContent("submit")),1)]})),_:1},8,["onClick"])],32)),(0,i.bF)(O,{class:"vs-form__no-js"},{default:(0,i.k6)((function(){return[(0,i.RG)(e.$slots,"no-js")]})),_:3}),(0,i.Lk)("div",u,[m.submitting?((0,i.uX)(),(0,i.CE)("p",f,[(0,i.RG)(e.$slots,"submitting")])):(0,i.Q3)("",!0),m.submitted?((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[p.getTranslatedContent("successHeading")?((0,i.uX)(),(0,i.Wv)(T,{key:0,level:"2"},{default:(0,i.k6)((function(){return[(0,i.eW)((0,r.toDisplayString)(p.getTranslatedContent("successHeading")),1)]})),_:1})):(0,i.Q3)("",!0),(0,i.Lk)("p",{class:"vs-form__content",innerHTML:p.getTranslatedContent("successContent")},null,8,c)],64)):(0,i.Q3)("",!0),m.submitError?((0,i.uX)(),(0,i.CE)("p",g,[(0,i.RG)(e.$slots,"submit-error")])):(0,i.Q3)("",!0)])])}},74955:function(e,t,n){"use strict";var i=n(85072),a=n.n(i),r=n(97825),s=n.n(r),o=n(77659),l=n.n(o),d=n(55056),u=n.n(d),f=n(10540),c=n.n(f),g=n(41113),h=n.n(g),m=n(97001),p=n.n(m),v={};v.styleTagTransform=h(),v.setAttributes=u(),v.insert=l().bind(null,"head"),v.domAPI=s(),v.insertStyleElement=c(),a()(p(),v),p()&&p().locals&&p().locals},19464:function(e,t,n){"use strict";n.r(t);var i=n(91709),a=n(18668);n(59975);const r=(0,n(66262).A)(a.A,[["render",i.X]]);t.default=r},18668:function(e,t,n){"use strict";n.d(t,{A:function(){return i.A}});var i=n(97272)},91709:function(e,t,n){"use strict";n.d(t,{X:function(){return i.X}});var i=n(44909)},59975:function(e,t,n){"use strict";n(74955)}},function(e){return e.O(0,[641,6262,7510,3751,4352,4467,7527,8086,810,2543,3453,281,7536,7171,6422,8745,8836,3838,9122,4282,2142,1688,6358,8258],(function(){return 19464,e(e.s=19464)})),e.O()}])}));
|
|
@@ -131,7 +131,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
131
131
|
errorsList(newValue: any): void;
|
|
132
132
|
};
|
|
133
133
|
methods: {
|
|
134
|
-
manualValidate(): void;
|
|
134
|
+
manualValidate(): void; /**
|
|
135
|
+
* Validate errors on blur, and re-render them to the screen for screen
|
|
136
|
+
* reader notice
|
|
137
|
+
*/
|
|
135
138
|
emitStatus(): void;
|
|
136
139
|
};
|
|
137
140
|
} | {
|