@visitscotland/component-library 1.0.41 → 1.0.42
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 +27 -2
- package/dist/client/manifest.json +112 -141
- package/dist/client/scripts/{349f6252def0d0493b4b.js → 0b6eeba5846308e5c708.js} +1 -1
- package/dist/client/scripts/{c809cf38c5272bcfe17e.js → 21b5228ac90fae37f8a3.js} +1 -1
- package/dist/client/scripts/6caa3d88a292e050e2ae.js +1 -0
- package/dist/client/scripts/{d476bdf3c63e8acd857e.js → 815009b65e094da0428b.js} +1 -1
- package/dist/client/scripts/b3a6f508fdfc4b285fa0.js +1 -0
- package/dist/client/scripts/c84d81afe632132ebbe2.js +1 -0
- package/dist/client/scripts/e8d76279f1fa5424b664.js +1 -0
- package/dist/client/styles/6caa3d88a292e050e2ae.css +1 -0
- package/dist/client/styles/b3a6f508fdfc4b285fa0.css +1 -0
- package/dist/client/styles/c84d81afe632132ebbe2.css +1 -0
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/manifest.json +1 -1
- package/dist/ssr/styles/{9cad4135ed7d159f7cb8.css → 07e25a457f75f60d9f90.css} +3 -4
- package/package.json +2 -2
- package/dist/client/scripts/125bf47b90f088fff229.js +0 -1
- package/dist/client/scripts/8e4cc6e0c7e4e3b44628.js +0 -1
- package/dist/client/scripts/ba70a1a96c6e4c09ba97.js +0 -1
- package/dist/client/scripts/bbffd3414a7c7fddbcd6.js +0 -1
- package/dist/client/scripts/d92aa405447c79599e03.js +0 -1
- package/dist/client/styles/125bf47b90f088fff229.css +0 -1
- package/dist/client/styles/ba70a1a96c6e4c09ba97.css +0 -1
- package/dist/client/styles/bbffd3414a7c7fddbcd6.css +0 -1
- package/dist/client/styles/d92aa405447c79599e03.css +0 -1
- /package/dist/client/scripts/{71ee734ab41ea680c8df.js → 52e36cf05d0af4e337f6.js} +0 -0
- /package/dist/client/scripts/{3c9d8724e602abc493bb.js → 6eb7c7f410527693630a.js} +0 -0
- /package/dist/client/styles/{349f6252def0d0493b4b.css → 0b6eeba5846308e5c708.css} +0 -0
- /package/dist/client/styles/{c809cf38c5272bcfe17e.css → 21b5228ac90fae37f8a3.css} +0 -0
- /package/dist/client/styles/{d476bdf3c63e8acd857e.css → 815009b65e094da0428b.css} +0 -0
- /package/dist/client/styles/{8e4cc6e0c7e4e3b44628.css → e8d76279f1fa5424b664.css} +0 -0
package/dist/ssr/manifest.json
CHANGED
|
@@ -125,10 +125,9 @@ h4.vs-canned-search-sub-heading{font-family:"Source Sans Pro",-apple-system,Blin
|
|
|
125
125
|
.vs-page-intro__wrapper{position:relative;background:#fff}@media(min-width: 992px){.vs-page-intro__wrapper{background:rgba(0,0,0,0);width:100%;max-width:960px;margin-right:auto;margin-left:auto}}@media(min-width: 1200px){.vs-page-intro__wrapper{max-width:1140px}}@media(min-width: 1400px){.vs-page-intro__wrapper{max-width:1340px}}.vs-page-intro__wrapper>.container{background:#fff;padding-bottom:2rem}@media(min-width: 992px){.vs-page-intro__wrapper>.container{padding-bottom:3rem}}.vs-page-intro__share{position:absolute;top:.75rem;right:.25rem}@media(min-width: 576px){.vs-page-intro__share{top:1rem;right:1rem}}@media(min-width: 992px){.vs-page-intro__share{top:7.2rem}}@media(min-width: 992px){.vs-page-intro--hero .vs-page-intro__share{top:4rem}}@media(min-width: 992px){.vs-page-intro--hero .vs-page-intro__wrapper{margin-top:-240px}}.vs-page-intro--hero .vs-hero{margin-bottom:0}@media(min-width: 992px){.vs-page-intro--hero .vs-hero .vs-caption{bottom:200px}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.vs-page-intro--hero .vs-hero .vs-caption{min-width:200px}}@media(min-width: 992px){.vs-page-intro--hero .vs-image-with-caption--hero img{min-height:101%;position:absolute;transform:translateY(-50%);top:50%}}.vs-page-intro__breadcrumb{margin-top:.75rem}.vs-page-intro__lower,.vs-page-intro__lower .row{background-color:#efefef}.vs-page-intro--dark{background:#2a2829}
|
|
126
126
|
.simple-typeahead-list-item:hover,.simple-typeahead-list-item.pseudo-hover{background-color:#efefef !important;color:#af006e !important}.simple-typeahead::after{font-family:"Font Awesome Kit";content:"";display:inline-block;position:absolute;top:calc(50% - .75rem);right:1rem;pointer-events:none}
|
|
127
127
|
.vs-date-range{position:relative}.vs-date-range__clear{border:0;background:none;font-size:1rem;text-decoration:underline;top:0;right:0;position:absolute}@media(min-width: 576px){.vs-date-range__clear{position:relative}}.vs-date-range__clear:hover{text-decoration:none}.vs-date-range__clear:focus{box-shadow:0 0 0 4px #191919;outline:0}
|
|
128
|
-
.guest-
|
|
129
|
-
.guest-
|
|
130
|
-
.guest-
|
|
131
|
-
button.c-search-rooms-guests__trigger{text-align:left}button.c-search-rooms-guests__trigger:focus{box-shadow:none}button.c-search-rooms-guests__trigger::after{font-family:"Font Awesome Kit";content:"";display:inline-block;position:absolute;top:3rem;right:1rem;pointer-events:none;font-size:1.125rem;color:#191919}.psw-guestpicker{position:relative}.psw-guestpicker__modal{width:100%;display:none;padding:1rem;box-shadow:0px 1px 3px 1px rgba(0,0,0,.15),0px 1px 2px 0px rgba(0,0,0,.3)}.psw-guestpicker__modal--visible{display:flex;flex-direction:column;position:absolute;background:#fff;z-index:1}.psw-guestpicker__label{font-weight:700;margin-bottom:0}.psw-guestpicker__close{align-self:end}
|
|
128
|
+
.vs-guest-selector-number-group{display:flex;justify-content:space-between;margin-bottom:.75rem}.vs-guest-selector-number-group__button{color:#fff;background-color:#af006e;border-color:#af006e}.vs-guest-selector-number-group__input{width:30px;text-align:center;border:0;font-size:1rem}
|
|
129
|
+
.vs-guest-selector-row{position:relative;border-bottom:1px solid #d0d0d0;margin-bottom:1rem}.vs-guest-selector-row:last-of-type{border-bottom:0}.vs-guest-selector-row__title{font-weight:700;margin-bottom:.75rem}.vs-guest-selector-row__remove{position:absolute;top:0;right:0;text-transform:none}.vs-guest-selector-row__remove.vs-button.vs-button--icon-only .vs-icon{margin-right:2px;vertical-align:middle}.vs-guest-selector-row .c-search__rooms-guests-picker__row{margin-bottom:1rem}
|
|
130
|
+
button.vs-guest-selector__trigger{text-align:left}button.vs-guest-selector__trigger:focus{box-shadow:none}button.vs-guest-selector__trigger::after{font-family:"Font Awesome Kit";content:"";display:inline-block;position:absolute;top:3rem;right:1rem;pointer-events:none;font-size:1.125rem;color:#191919}.vs-guest-selector{position:relative}.vs-guest-selector__modal{width:100%;display:none;padding:1rem;box-shadow:0px 1px 3px 1px rgba(0,0,0,.15),0px 1px 2px 0px rgba(0,0,0,.3)}.vs-guest-selector__modal--visible{display:flex;flex-direction:column;position:absolute;background:#fff;z-index:1}.vs-guest-selector__label{font-weight:700;margin-bottom:0}.vs-guest-selector__close{align-self:end}
|
|
132
131
|
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:#af006e 4px solid;outline:none;box-shadow:none}.vs-input--error{border:2px solid #ae2940}.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:#af006e 4px solid;outline:none;box-shadow: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}
|
|
133
132
|
.vs-product-search{width:100%;background:#383838;padding:2rem .25rem;font-family:"Source Sans Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}.vs-product-search__no-js{display:none}.vs-product-search__heading,.vs-product-search__intro{color:#fff}.vs-product-search__heading.vs-heading{font-size:1.875rem;font-weight:300;letter-spacing:normal}.vs-product-search__col--left{background:#383838;font-family:"Source Sans Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";margin-bottom:3rem}.vs-product-search__col--right{display:flex;flex-direction:column;justify-content:center;background:#fcca1b;padding:1.5rem 1rem}@media(min-width: 576px){.vs-product-search{padding-left:.75rem;padding-right:.75rem}}@media(min-width: 1200px){.vs-product-search{padding:0;background:rgba(0,0,0,0)}.vs-product-search__heading,.vs-product-search__intro{color:#fff;margin-left:4rem;max-width:70%}.vs-product-search__heading.vs-heading{font-size:2.5rem}.vs-product-search__col{min-height:458px}.vs-product-search__col--left{padding:6rem;margin-bottom:0}.vs-product-search__col--right.col-lg-4{padding:2rem}}.no-js .vs-product-search__col--right{padding:0}.no-js .vs-product-search__no-js{display:flex}.no-js .vs-product-search__widget{display:none}
|
|
134
133
|
.vs-quote__content{font-size:1.5rem;font-weight:300;line-height:1.3}.vs-quote__author-name{font-weight:700;margin-bottom:0}@media(min-width: 768px){.vs-quote__author-name{margin-bottom:.25rem;font-size:1.125rem}}.vs-quote__author-title{line-height:1.25rem}@media(min-width: 768px){.vs-quote__author-title{line-height:1.3;font-size:1.125rem;margin-bottom:1.75rem}}.vs-quote__speech-mark{font-weight:700;color:#848484;font-size:7rem;height:5rem;line-height:1;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.vs-quote__speech-container{display:block;margin-bottom:1rem;margin-right:1.25rem;width:3.5rem;height:2.5rem;position:relative}@media(min-width: 576px){.vs-quote__speech-container{display:inline-block;vertical-align:top}}.vs-quote__author-container{display:block;width:50%;max-width:8rem;margin-bottom:1rem}.vs-quote__author-container img{width:100%}@media(min-width: 992px){.vs-quote__author-container{margin-right:1.25rem}}.vs-quote__content-container{display:block}@media(min-width: 576px){.vs-quote--wide .vs-quote__author-container{display:inline-block;vertical-align:top;margin-bottom:1.25rem}}@media(min-width: 576px){.vs-quote--wide .vs-quote__content-container{display:inline-block;vertical-align:top}}@media(min-width: 1200px){.vs-quote--wide .vs-quote__content-container{width:calc(100% - 15rem);margin-top:-7px}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visitscotland/component-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"description": "VisitScotland Component Library",
|
|
5
5
|
"author": "VisitScotland",
|
|
6
6
|
"main": "dist/ssr/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build:library:dev": "cross-env NODE_ENV=development webpack --config ./build/webpack.conf.js",
|
|
19
19
|
"build:ssr": "cross-env NODE_ENV=production webpack --config ./build/webpack.ssr.conf.js",
|
|
20
20
|
"build:ssr:dev": "cross-env NODE_ENV=development webpack --config ./build/webpack.ssr.conf.js",
|
|
21
|
-
"test": "jest --config ./test/unit/jest.conf.js",
|
|
21
|
+
"test": "yarn theo && jest --config ./test/unit/jest.conf.js",
|
|
22
22
|
"test:no-theo": "jest --config ./test/unit/jest.conf.js",
|
|
23
23
|
"lint": "eslint",
|
|
24
24
|
"lint:all": "yarn lint:src && yarn lint:build && yarn lint:stories",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[2336],{85681:function(){},85203:function(e,n,t){"use strict";var o=t(93379),u=t.n(o),a=t(7795),l=t.n(a),c=t(90569),r=t.n(c),i=t(3565),s=t.n(i),m=t(19216),d=t.n(m),v=t(44589),p=t.n(v),f=t(85681),k=t.n(f),_={};_.styleTagTransform=p(),_.setAttributes=s(),_.insert=r().bind(null,"head"),_.domAPI=l(),_.insertStyleElement=d(),u()(k(),_),k()&&k().locals&&k().locals},41599:function(e,n,t){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var u=t(76765),a=t(76765),l={class:"guest-selector-row"},c={class:"guest-selector-row__title"},r={key:1,class:"c-search__rooms-guests-picker__row"},i=["name"],s=["name"],m=["name"],d=t(76765),v=t(12147),p=o(t(42604)),f=o(t(67810));n.default=(0,u.defineComponent)({__name:"GuestSelectorRow",props:{name:{},showRemoveBtn:{type:Boolean},unitLabel:{},unitOptions:{},unitRemoved:{type:Boolean}},emits:["numberChange","onRemove"],setup:function(e,n){var t=n.emit,o=e,u=(0,d.ref)(o.unitOptions.numberGroups.adults.count),k=(0,d.ref)(o.unitOptions.numberGroups.children.count),_=(0,d.ref)(o.unitOptions.numberGroups.infants.count),b=(0,v.getLabelText)("remove","Remove","guests_rooms"),h=(0,d.computed)((function(){return k.value+_.value})),B=function(e,n,o,a){var l="";e.includes("children")&&(k.value=n,l="children"),e.includes("infants")&&(_.value=n,l="infants"),(e.includes("r1a")||e.includes("r2a")||e.includes("r3a")||e.includes("r4a")||e.includes("r5a"))&&(u.value=n,l="adults"),t("numberChange",o,l,a)},y=function(){t("onRemove",_.value+k.value+u.value,_.value+k.value,o.unitOptions.id)};return function(e,n){return(0,a.openBlock)(),(0,a.createElementBlock)("div",l,[(0,a.createElementVNode)("div",c,(0,a.toDisplayString)(e.unitLabel),1),"r1"!==e.name?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(f.default),{key:0,class:"guest-selector-row__remove",onClick:(0,a.withModifiers)(y,["prevent"]),variant:"transparent",icon:"close","icon-size":"sm","icon-position":"left","icon-only":"",size:"sm"},{default:(0,a.withCtx)((function(){return[(0,a.createTextVNode)((0,a.toDisplayString)((0,a.unref)(b)),1)]})),_:1},8,["onClick"])):(0,a.createCommentVNode)("",!0),e.unitOptions?((0,a.openBlock)(),(0,a.createElementBlock)("div",r,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.unitOptions.numberGroups,(function(n,t){return(0,a.openBlock)(),(0,a.createBlock)(p.default,{"adult-count":u.value,"children-count":k.value,count:n.count,disabled:!1,id:e.unitOptions.id,"infant-count":_.value,"input-type":n,key:"".concat(e.name,"_").concat(t),"max-value":n.maxCount,"min-value":n.minCount,name:n.name,"row-label":n.unitLabel,"row-name":e.name,"unit-removed":e.unitRemoved,onChangeHandler:B},null,8,["adult-count","children-count","count","id","infant-count","input-type","max-value","min-value","name","row-label","row-name","unit-removed"])})),128)),(0,a.withDirectives)((0,a.createElementVNode)("input",{type:"hidden",name:"".concat(e.name,"c"),"onUpdate:modelValue":n[0]||(n[0]=function(e){return h.value=e})},null,8,i),[[a.vModelText,h.value]])])):(0,a.createCommentVNode)("",!0),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(k.value,(function(n,t){return(0,a.openBlock)(),(0,a.createElementBlock)("input",{type:"hidden",key:"".concat(e.name,"c").concat(t),name:"".concat(e.name,"c").concat(t),value:"10"},null,8,s)})),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(_.value,(function(n,t){return(0,a.openBlock)(),(0,a.createElementBlock)("input",{type:"hidden",key:"".concat(e.name,"c").concat(t),name:"".concat(e.name,"c").concat(t+k.value),value:"1"},null,8,m)})),128))])}}})},92336:function(e,n,t){"use strict";t.r(n);var o=t(59130),u={};for(var a in o)"default"!==a&&(u[a]=function(e){return o[e]}.bind(0,a));t.d(n,u),t(46712);const l=o.default;n.default=l},46712:function(e,n,t){"use strict";t(85203)},59130:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return u.a}});var o=t(41599),u=t.n(o),a={};for(var l in o)"default"!==l&&(a[l]=function(e){return o[e]}.bind(0,l));t.d(n,a)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[7809],{77779:function(){},53766:function(e,t,n){"use strict";var a=n(93379),o=n.n(a),r=n(7795),l=n.n(r),u=n(90569),c=n.n(u),i=n(3565),s=n.n(i),d=n(19216),f=n.n(d),v=n(44589),p=n.n(v),m=n(77779),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},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 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(76765),c=n(76765),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","onSubmit"],p={class:"form-group"},m={for:"prodtypes"},h={"aria-live":"polite"},b=["disabled","value"],y=["disabled","value"],k=["value"],g={key:4,type:"hidden",name:"areaproxdist",value:"10"},w={key:5},_={key:1,class:"form-group"},x={for:"search-keyword"},B={key:3},E=["value"],T={key:0},N=["value"],V=n(76765),L=n(12147),S=n(61309),C=n(68504),P=n(83506),D=l(n(16145)),j=l(n(92664)),O=l(n(63817)),U=l(n(27175)),M=l(n(17710)),A=l(n(96971)),I=l(n(83918));t.default=(0,u.defineComponent)({__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,V.ref)(!1),u=(0,V.ref)(),F=(0,V.ref)([]),G=((0,V.ref)(null),(0,V.ref)()),R=(0,V.ref)("off"),J=(0,V.ref)(!1),Y=(0,V.computed)((function(){var e=void 0===u.value?"see-do":u.value;return"/info/".concat(S.paths[e])})),H=(0,V.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,V.computed)((function(){var e=n.defaultLocale.length>0?n.defaultLocale:(0,L.getLocale)();return"en"===e&&(e=""),e})),z=(0,V.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"})),Q=(0,V.computed)((function(){return"".concat(z.value).concat(q.value?"/"+q.value:"").concat(Y.value,"/search-results")})),W="https://www.visitscotland.com/data/locations"+"?locale=".concat(q.value),X=(0,V.ref)([]),Z=(0,V.ref)([]),$=(0,V.ref)([]),ee=(0,V.ref)([]),te=(0,V.computed)((function(){return l.value?[]:ee.value.map((function(e){return a(a({},e),{text:(0,L.getProductName)(e.value,e.text)})}))})),ne=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())&&($.value=e.data),[2]}}))}))},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/attractions")];case 1:return(e=t.sent())&&(Z.value=e.data),[2]}}))}))},oe=function(e,t){G.value="key"===t?X.value.find((function(t){return t.key===e})):X.value.find((function(t){return t.name===e}))},re=function(){l.value=!0,(0,V.nextTick)((function(){l.value=!1,""!==n.defaultLocation&&H&&oe(n.defaultLocation,"key")}))};(0,V.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=re,e.setAttribute("src","https://www.visitscotland.com/".concat((K[n.defaultLocale]||"").localeUrl,"/data/template/search.js")),document.head.appendChild(e),[2]}))}))})),(0,V.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)(W)];case 1:return(e=t.sent())&&(X.value=e.data),[2]}}))})),H.value=!0,u.value=n.defaultProd,"tour"===u.value&&(ne(),ae()),a=(0,C.getProductTypes)(),l=[],a.forEach((function(e){l.push(e)})),ee.value=l,[2]}))}))}));var le=function(e){J.value=!0;var t=e.currentTarget;setTimeout((function(){t.submit()}),500)};return function(t,n){var a,o,r,V,C,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:Q.value,onSubmit:(0,c.withModifiers)(le,["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)(L.getLabelText)("search_for","I'm looking for")),1),(0,c.createVNode)(j.default,{options:te.value,value:e.defaultProd,onUpdated:n[0]||(n[0]=function(e){return t=e.value,u.value=t,void("tour"===t&&(ne(),ae()));var t}),"field-name":"prodtypes"},null,8,["options","value"])]),(0,c.createElementVNode)("div",h,["tour"!=u.value&&(0,c.unref)(H)?((0,c.openBlock)(),(0,c.createBlock)(U.default,{key:0,id:"search-location",label:(0,c.unref)(L.getLabelText)("location","Location"),"multiselect-label":"name",name:"loc",options:X.value,placeholder:(0,c.unref)(L.getLabelText)("location_placeholder","Enter a location"),"track-by":"name",onChangeValue:n[1]||(n[1]=function(e){return oe(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,b)):(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===(V=(0,c.unref)(G))||void 0===V?void 0:V.key)||""},null,8,y)):(0,c.createCommentVNode)("",!0),"tour"!==u.value?((0,c.openBlock)(),(0,c.createElementBlock)("input",{key:3,type:"hidden",name:"locprox",value:"DISTRICT"===(null===(C=(0,c.unref)(G))||void 0===C?void 0:C.type)?1:0},null,8,k)):(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",g)):(0,c.createCommentVNode)("",!0),"even"===u.value||"acco"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",w,["even"===u.value||"acco"===u.value?((0,c.openBlock)(),(0,c.createBlock)(A.default,{key:0,"start-label":(0,c.unref)(L.getLabelText)("startdate","Start Date","dates"),"end-label":(0,c.unref)(L.getLabelText)("enddate","End Date","dates"),onDateUpdated:n[2]||(n[2]=function(e){return function(e){R.value=e?"on":"off"}(e)}),"default-dates":J.value},null,8,["start-label","end-label","default-dates"])):(0,c.createCommentVNode)("",!0),"even"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",_,[(0,c.createElementVNode)("label",x,(0,c.toDisplayString)((0,c.unref)(L.getLabelText)("keywords","Keywords")),1),(0,c.createVNode)(O.default,{"field-name":"search-keyword",placeholder:(0,c.unref)(L.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)(M.default,{key:2,availability:!0,label:(0,c.unref)(L.getLabelText)("guests","Guests"),id:"guest-selector"},null,8,["label"])):(0,c.createCommentVNode)("",!0),"acco"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",B,[(0,c.createElementVNode)("input",{hidden:"true",name:"avail",value:R.value},null,8,E)])):(0,c.createCommentVNode)("",!0)])):(0,c.createCommentVNode)("",!0)]),"tour"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",T,[(0,c.createVNode)(U.default,{id:"tour-origin",label:(0,c.unref)(L.getLabelText)("tour_origin","Starting point"),"multiselect-label":"name",name:"origins[]",options:$.value,placeholder:(0,c.unref)(L.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)(F.value,(function(e){return(0,c.openBlock)(),(0,c.createElementBlock)("input",{type:"hidden",name:"attractions[]",value:e},null,8,N)})),256)),(0,c.createVNode)(U.default,{id:"tour-month",label:(0,c.unref)(L.getLabelText)("tour_month","I'm traveling in"),"multiselect-label":"label",name:"when",options:(0,c.unref)(L.getLabelText)("months",(0,c.unref)(S.monthsEnglish)),placeholder:(0,c.unref)(L.getLabelText)("tour_month_placeholder","Select month"),"track-by":"value"},null,8,["label","options","placeholder"])])):(0,c.createCommentVNode)("",!0),(0,c.createVNode)(I.default,{class:"mt-6","data-test":"psw-submit",type:"submit",variant:"dark"},{default:(0,c.withCtx)((function(){return[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(L.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)(D.default,{key:1,variant:"dark"}))])])]))])}}})},61309: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"}]},83506:function(e,t,n){"use strict";var a=n(25108),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(97218));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]}}))}))}},68504:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProductTypes=t.getURLParameters=void 0;var a,o=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 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}},97809:function(e,t,n){"use strict";n.r(t);var a=n(65531),o={};for(var r in a)"default"!==r&&(o[r]=function(e){return a[e]}.bind(0,r));n.d(t,o),n(18842);const l=a.default;t.default=l},18842:function(e,t,n){"use strict";n(53766)},65531:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o.a}});var a=n(43062),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 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[7710],{1556:function(){},2924:function(e,t,n){"use strict";var a=n(93379),l=n.n(a),o=n(7795),s=n.n(o),u=n(90569),r=n.n(u),i=n(3565),c=n.n(i),d=n(19216),m=n.n(d),v=n(44589),f=n.n(v),p=n(1556),g=n.n(p),b={};b.styleTagTransform=f(),b.setAttributes=c(),b.insert=r().bind(null,"head"),b.domAPI=s(),b.insertStyleElement=m(),l()(g(),b),g()&&g().locals&&g().locals},41094: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(76765),o=n(76765),s={class:"form-group psw-guestpicker"},u={class:"psw-guestpicker__label"},r=["onClick","disabled"],i={class:"c-search-rooms-guests-selected"},c={class:"c-search-rooms-guests__room-label"},d={class:"c-search-rooms-guests__guests-count"},m={class:"c-search-rooms-guests__guests-label"},v={class:"sr-only"},f={class:"psw-guestpicker__button-row mb-3"},p={class:"d-flex justify-content-between"},g=["value","disabled"],b=["value","disabled"],_=n(76765),h=n(12147),k=n(67429),C=a(n(92336)),x=a(n(83918));t.default=(0,l.defineComponent)({__name:"GuestSelector",props:{availability:{type:Boolean},label:{}},setup:function(e){var t=(0,h.getLabelText)("add_room_label","Add a Room","guests_rooms"),n=(0,h.getLabelText)("save_changes","Save","guests_rooms"),a=(0,_.ref)(2),l=(0,h.getLabelText)("guest","Guest","guests_rooms"),y=(0,h.getLabelText)("guests","Guests","guests_rooms"),w=(0,_.ref)(!1),L=(0,_.ref)(0),N=(0,_.ref)([{id:(0,k.v4)(),showRemoveBtn:!1,numberGroups:{adults:{minCount:1,maxCount:30,count:2,name:"r1a",unitLabel:(0,h.getLabelText)("adults","Adults","guests_rooms")},children:{minCount:0,maxCount:30,count:0,name:"r1children",unitLabel:(0,h.getLabelText)("children","Children","guests_rooms")},infants:{minCount:0,maxCount:30,count:0,name:"r1infants",unitLabel:(0,h.getLabelText)("infants","Infants","guests_rooms")}}}]),T=(0,_.ref)(1),V=(0,h.getLabelText)("room","Room","guests_rooms"),B=(0,h.getLabelText)("rooms","Rooms","guests_rooms"),E=(0,_.ref)(!1),S=(0,_.ref)(!1),D=function(){S.value=!1},G=function(){S.value=!S.value},R=function(){if(N.value.length<5){var e={id:(0,k.v4)(),showRemoveBtn:!0,numberGroups:{adults:{minCount:1,maxCount:30,count:1,name:"r"+(N.value.length+1)+"a",unitLabel:(0,h.getLabelText)("adults","Adults","guests_rooms")},children:{minCount:0,maxCount:30,count:0,name:"r"+(N.value.length+1)+"children",unitLabel:(0,h.getLabelText)("children","Children","guests_rooms")},infants:{minCount:0,maxCount:30,count:0,name:"r"+(N.value.length+1)+"infants",unitLabel:(0,h.getLabelText)("infants","Infants","guests_rooms")}}},t=N.value.slice();t.push(e),N.value=t,T.value=t.length,w.value=!0,a.value=a.value+1}},I=function(e,t,n){var l=N.value.findIndex((function(e){return e.id===n}));N.value.splice(l,1),T.value=N.value.length,E.value=!0,a.value=a.value-e,L.value=L.value-t,1===N.value.length&&(w.value=!1)},M=function(e,t,n){a.value="increase"===e?a.value+1:a.value-1,"adults"!==t&&(L.value="increase"===e?L.value+1:L.value-1);var l=N.value.findIndex((function(e){return e.id===n}));N.value[l].numberGroups[t].count="increase"===e?N.value[l].numberGroups[t].count+1:N.value[l].numberGroups[t].count-1};return function(e,_){return(0,o.openBlock)(),(0,o.createElementBlock)("div",s,[(0,o.createElementVNode)("span",u,(0,o.toDisplayString)((0,o.unref)(y)),1),(0,o.createElementVNode)("button",{tabIndex:"availability ? '0' : ''",class:"c-search-rooms-guests__trigger trigger form-control select-wrap vs-input",onClick:(0,o.withModifiers)(G,["prevent"]),disabled:!e.availability},[(0,o.createElementVNode)("span",i,(0,o.toDisplayString)(T.value)+" ",1),(0,o.createElementVNode)("span",c,(0,o.toDisplayString)(T.value>1?(0,o.unref)(B):(0,o.unref)(V)),1),(0,o.createTextVNode)(", "),(0,o.createElementVNode)("span",d,(0,o.toDisplayString)(a.value)+" ",1),(0,o.createElementVNode)("span",m,(0,o.toDisplayString)(a.value>1?(0,o.unref)(y):(0,o.unref)(l)),1)],8,r),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["psw-guestpicker__modal",S.value?"psw-guestpicker__modal--visible":""])},[(0,o.createVNode)(x.default,{class:"align-self-end","data-test":"psw-guestpicker__close-btn",variant:"transparent",icon:"close-circle",size:"md","icon-only":"",onClick:(0,o.withModifiers)(D,["prevent"])},{default:(0,o.withCtx)((function(){return[(0,o.createElementVNode)("span",v,(0,o.toDisplayString)((0,o.unref)(h.getLabelText)("close","Close","guests_rooms")),1)]})),_:1},8,["onClick"]),(0,o.createElementVNode)("div",f,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(N.value,(function(e,t){return(0,o.openBlock)(),(0,o.createBlock)(C.default,{key:e.id,name:"r"+(t+1),"show-remove-btn":w.value,"unit-label":(0,o.unref)(h.getLabelText)("room","Room","guests_rooms")+" "+(t+1),"unit-options":e,"unit-removed":E.value,onNumberChange:M,onOnRemove:I},null,8,["name","show-remove-btn","unit-label","unit-options","unit-removed"])})),128))]),(0,o.createElementVNode)("div",p,[N.value.length<5?((0,o.openBlock)(),(0,o.createBlock)(x.default,{key:0,variant:"secondary",class:"c-search__popup__btn-link mr-2 align-self-start",onClick:(0,o.withModifiers)(R,["prevent"])},{default:(0,o.withCtx)((function(){return[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(t)),1)]})),_:1},8,["onClick"])):(0,o.createCommentVNode)("",!0),N.value.length<5?((0,o.openBlock)(),(0,o.createBlock)(x.default,{key:1,class:"c-search__popup__btn-link c-search__popup__btn-link--pull-right align-self-end",onClick:(0,o.withModifiers)(D,["prevent"])},{default:(0,o.withCtx)((function(){return[(0,o.createTextVNode)((0,o.toDisplayString)((0,o.unref)(n)),1)]})),_:1},8,["onClick"])):(0,o.createCommentVNode)("",!0)])],2),N.value?((0,o.openBlock)(),(0,o.createElementBlock)("input",{key:0,type:"hidden",name:"rooms",id:"room-count",value:T.value,disabled:!e.availability},null,8,g)):(0,o.createCommentVNode)("",!0),N.value?((0,o.openBlock)(),(0,o.createElementBlock)("input",{key:1,type:"hidden",name:"guests",id:"guest-count",value:a.value,disabled:!e.availability},null,8,b)):(0,o.createCommentVNode)("",!0)])}}})},17710:function(e,t,n){"use strict";n.r(t);var a=n(68148),l={};for(var o in a)"default"!==o&&(l[o]=function(e){return a[e]}.bind(0,o));n.d(t,l),n(69387);const s=a.default;t.default=s},69387:function(e,t,n){"use strict";n(2924)},68148:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l.a}});var a=n(41094),l=n.n(a),o={};for(var s in a)"default"!==s&&(o[s]=function(e){return a[e]}.bind(0,s));n.d(t,o)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[2604],{38879:function(){},8766:function(e,n,t){"use strict";var a=t(93379),u=t.n(a),l=t(7795),i=t.n(l),o=t(90569),r=t.n(o),c=t(3565),s=t.n(c),d=t(19216),f=t.n(d),v=t(44589),m=t.n(v),p=t(38879),b=t.n(p),_={};_.styleTagTransform=m(),_.setAttributes=s(),_.insert=r().bind(null,"head"),_.domAPI=i(),_.insertStyleElement=f(),u()(b(),_),b()&&b().locals&&b().locals},26817:function(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var u=t(76765),l=t(76765),i={class:"guest-picker-counter"},o={class:"guest-picker-counter__label"},r={class:"guest-picker-counter__buttons justify-content-end"},c=(0,l.createElementVNode)("span",{class:"sr-only"}," Remove ",-1),s=["disabled"],d=(0,l.createElementVNode)("span",{class:"sr-only"}," Add ",-1),f=["name","disabled"],v=t(76765),m=a(t(83918));n.default=(0,u.defineComponent)({__name:"GuestSelectorNumberGroup",props:{adultCount:{},childrenCount:{},count:{},disabled:{type:Boolean},id:{},infantCount:{},inputType:{},maxValue:{},minValue:{},name:{},rowName:{},rowLabel:{},unitRemoved:{type:Boolean}},emits:["changeHandler"],setup:function(e,n){var t=n.emit,a=e,u=(0,v.ref)(0),p=(0,v.ref)(!1),b=(0,v.ref)(a.name),_=function(){u.value>a.minValue&&(u.value--,p.value=!0,y("decrease"))},h=function(){u.value<a.maxValue&&(u.value++,p.value=!0,y("increase"))},y=function(e){t("changeHandler",a.name,u.value,e,a.id)};return(0,v.onMounted)((function(){p.value||(u.value=a.minValue),u.value<=a.maxValue&&(u.value=a.count),a.unitRemoved&&(a.name.includes("children")?(u.value=a.childrenCount,b.value=a.rowName+"children"):a.name.includes("infants")?(u.value=a.infantCount,b.value=a.rowName+"infants"):(u.value=a.adultCount,b.value=a.rowName+"a"))})),function(e,n){return(0,l.openBlock)(),(0,l.createElementBlock)("div",i,[(0,l.createElementVNode)("span",o,(0,l.toDisplayString)(e.rowLabel),1),(0,l.createElementVNode)("div",r,[(0,l.createVNode)(m.default,{class:"guest-picker-counter__button--remove",size:"sm",icon:"minus","icon-only":"",value:"-",onClick:(0,l.withModifiers)(_,["prevent"]),disabled:u.value===e.minValue},{default:(0,l.withCtx)((function(){return[c]})),_:1},8,["onClick","disabled"]),(0,l.withDirectives)((0,l.createElementVNode)("input",{class:"guest-picker-counter__input",disabled:e.disabled,pattern:"[0-9]*",readonly:"",tabIndex:"-1",type:"text","onUpdate:modelValue":n[0]||(n[0]=function(e){return u.value=e}),onFocus:n[1]||(n[1]=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.handleFocus&&e.handleFocus.apply(e,n)})},null,40,s),[[l.vModelText,u.value]]),(0,l.createVNode)(m.default,{class:"guest-picker-counter__button--add",size:"sm",icon:"plus","icon-only":"",value:"+",onClick:(0,l.withModifiers)(h,["prevent"]),disabled:u.value===e.maxValue},{default:(0,l.withCtx)((function(){return[d]})),_:1},8,["onClick","disabled"]),(0,l.withDirectives)((0,l.createElementVNode)("input",{type:"hidden","onUpdate:modelValue":n[2]||(n[2]=function(e){return u.value=e}),name:(e.unitRemoved&&e.rowName,b.value),disabled:e.disabled},null,8,f),[[l.vModelText,u.value]])])])}}})},42604:function(e,n,t){"use strict";t.r(n);var a=t(82152),u={};for(var l in a)"default"!==l&&(u[l]=function(e){return a[e]}.bind(0,l));t.d(n,u),t(84012);const i=a.default;n.default=i},84012:function(e,n,t){"use strict";t(8766)},82152:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return u.a}});var a=t(26817),u=t.n(a),l={};for(var i in a)"default"!==i&&(l[i]=function(e){return a[e]}.bind(0,i));t.d(n,l)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VsGuestCounter=t():e.VsGuestCounter=t()}(self,(function(){return(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[2818],{2551:function(){},1402:function(e,t,n){"use strict";var o=n(93379),u=n.n(o),i=n(7795),r=n.n(i),l=n(90569),s=n.n(l),c=n(3565),a=n.n(c),f=n(19216),p=n.n(f),d=n(44589),m=n.n(d),v=n(2551),b=n.n(v),C={};C.styleTagTransform=m(),C.setAttributes=a(),C.insert=s().bind(null,"head"),C.domAPI=r(),C.insertStyleElement=p(),u()(b(),C),b()&&b().locals&&b().locals},19507:function(e,t,n){"use strict";Object.defineProperty(t,"X",{value:!0});var o=n(76765),u=n(76765),i={class:"guest-counter"},r=["onClick"],l=["onClick"],s=n(76765);t.Z=(0,o.defineComponent)({__name:"GuestCounter",props:{initialCount:{},label:{}},emits:["update"],setup:function(e,t){var n=t.emit,o=e,c=(0,s.ref)(o.initialCount||0),a=function(){c.value++,n("update",c.value)},f=function(){c.value--,n("update",c.value)};return function(e,t){return(0,u.openBlock)(),(0,u.createElementBlock)("div",i,[(0,u.createElementVNode)("span",null,(0,u.toDisplayString)(e.label),1),(0,u.createElementVNode)("button",{onClick:(0,u.withModifiers)(f,["prevent"])},"-",8,r),(0,u.createElementVNode)("span",null,(0,u.toDisplayString)(c.value),1),(0,u.createElementVNode)("button",{onClick:(0,u.withModifiers)(a,["prevent"])},"+",8,l)])}}})},23763:function(e,t,n){"use strict";n.r(t),n.d(t,{__esModule:function(){return o.X}});var o=n(44773);n(53408);const u=o.Z;t.default=u},53408:function(e,t,n){"use strict";n(1402)},44773:function(e,t,n){"use strict";n.r(t),n.d(t,{X:function(){return o.X},Z:function(){return o.Z}});var o=n(19507)}},function(e){return e.O(0,[6252,7991,9963,6765],(function(){return 23763,e(e.s=23763)})),e.O()}])}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.guest-selector-row{position:relative;border-bottom:1px solid #d0d0d0;margin-bottom:1rem}.guest-selector-row:last-of-type{border-bottom:0}.guest-selector-row__title{font-weight:700;margin-bottom:.75rem}.guest-selector-row__remove{position:absolute;top:0;right:0;text-transform:none}.guest-selector-row__remove.vs-button.vs-button--icon-only .vs-icon{margin-right:2px;vertical-align:middle}.guest-selector-row .c-search__rooms-guests-picker__row{margin-bottom:1rem}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
button.c-search-rooms-guests__trigger{text-align:left}button.c-search-rooms-guests__trigger:focus{box-shadow:none}button.c-search-rooms-guests__trigger::after{font-family:"Font Awesome Kit";content:"";display:inline-block;position:absolute;top:3rem;right:1rem;pointer-events:none;font-size:1.125rem;color:#191919}.psw-guestpicker{position:relative}.psw-guestpicker__modal{width:100%;display:none;padding:1rem;box-shadow:0px 1px 3px 1px rgba(0,0,0,.15),0px 1px 2px 0px rgba(0,0,0,.3)}.psw-guestpicker__modal--visible{display:flex;flex-direction:column;position:absolute;background:#fff;z-index:1}.psw-guestpicker__label{font-weight:700;margin-bottom:0}.psw-guestpicker__close{align-self:end}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.guest-picker-counter{display:flex;justify-content:space-between;margin-bottom:.75rem}.guest-picker-counter__button{color:#fff;background-color:#af006e;border-color:#af006e}.guest-picker-counter__input{width:30px;text-align:center;border:0;font-size:1rem}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.guest-counter{display:flex}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|