@visitscotland/component-library 1.0.44 → 1.0.45
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 +43 -36
- package/dist/client/manifest.json +4 -4
- package/dist/client/scripts/83ea0b69314e2eb3ce0b.js +1 -0
- package/dist/client/styles/83ea0b69314e2eb3ce0b.css +1 -0
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/manifest.json +1 -1
- package/dist/ssr/styles/{a9596cfb69c6d29ce230.css → 0977940b27d12d8a8cea.css} +1 -1
- package/package.json +1 -1
- package/dist/client/scripts/bf63fc166864942fe8d8.js +0 -1
- package/dist/client/styles/bf63fc166864942fe8d8.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,46 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
### [1.0.
|
|
5
|
+
### [1.0.45](https://github.com/visitscotland/vs-component-library/compare/v1.0.44...v1.0.45) (2023-10-12)
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
###
|
|
8
|
+
### ✨ Features
|
|
9
9
|
|
|
10
|
-
* **
|
|
11
|
-
|
|
12
|
-
### [1.0.43](https://github.com/visitscotland/vs-component-library/compare/v1.0.42...v1.0.43) (2023-10-11)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### 🐛 Bug Fixes
|
|
16
|
-
|
|
17
|
-
* **ski scotland:** add styles to tidy up responsive behaviour of status info ([87e566c](https://github.com/visitscotland/vs-component-library/commit/87e566cb76f9a95e33a6a1fbdbbecbf016a97309))
|
|
18
|
-
* **ski scotland:** make status table cols consistent widths ([4ca4774](https://github.com/visitscotland/vs-component-library/commit/4ca477497b3bd6edb5729f3d7cb74f60f1e404a3))
|
|
19
|
-
|
|
20
|
-
### [1.0.42](https://github.com/visitscotland/vs-component-library/compare/v1.0.41...v1.0.42) (2023-10-10)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### ✅ Tests
|
|
24
|
-
|
|
25
|
-
* **psw:** add unit tests for guest selection ([ded7941](https://github.com/visitscotland/vs-component-library/commit/ded79410800ec9a9124a067c1066edd6ecd678bf))
|
|
26
|
-
* **psw:** add unit tests for guest selector ([1ef5eb6](https://github.com/visitscotland/vs-component-library/commit/1ef5eb64102ead493aedd4106498bf111eb8909a))
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### ♻️ Code Refactoring
|
|
30
|
-
|
|
31
|
-
* **psw:** fix linting errors ([b49a659](https://github.com/visitscotland/vs-component-library/commit/b49a659b5c4557a13df867abe1ec92f1932bb45c))
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### 🐛 Bug Fixes
|
|
35
|
-
|
|
36
|
-
* **map:** correct zoom level in second undefined case ([b6bd843](https://github.com/visitscotland/vs-component-library/commit/b6bd843bf59601c03b0ff613ade231d0b31e8669))
|
|
37
|
-
* **psw:** add back dates exist functionality ([c45e146](https://github.com/visitscotland/vs-component-library/commit/c45e146cf1ed9a11404419a54fcb7d8d525d87c4))
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### 🔖 Others
|
|
41
|
-
|
|
42
|
-
* **package.json:** add back missing theo script to test ([99784b6](https://github.com/visitscotland/vs-component-library/commit/99784b6d1d333c9a22df0b3904f6f702d458f05f))
|
|
43
|
-
* **release:** 1.0.41 ([584832f](https://github.com/visitscotland/vs-component-library/commit/584832fbf7221e7120c6a21fe46d0a24f5c88de0))
|
|
10
|
+
* **carbon calculator:** increase chart font size in line with a11y recommendations ([ec0c50d](https://github.com/visitscotland/vs-component-library/commit/ec0c50d83ec49a81367cab222ea1ccee27e26ed1))
|
|
44
11
|
|
|
12
|
+
### [1.0.44](https://github.com/visitscotland/vs-component-library/compare/v1.0.43...v1.0.44) (2023-10-11)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **ski scotland:** extend fix to lift status table ([f32ebec](https://github.com/visitscotland/vs-component-library/commit/f32ebec263b0891c622080835ec6b5f6c4be3814))
|
|
18
|
+
|
|
19
|
+
### [1.0.43](https://github.com/visitscotland/vs-component-library/compare/v1.0.42...v1.0.43) (2023-10-11)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### 🐛 Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **ski scotland:** add styles to tidy up responsive behaviour of status info ([87e566c](https://github.com/visitscotland/vs-component-library/commit/87e566cb76f9a95e33a6a1fbdbbecbf016a97309))
|
|
25
|
+
* **ski scotland:** make status table cols consistent widths ([4ca4774](https://github.com/visitscotland/vs-component-library/commit/4ca477497b3bd6edb5729f3d7cb74f60f1e404a3))
|
|
26
|
+
|
|
27
|
+
### [1.0.42](https://github.com/visitscotland/vs-component-library/compare/v1.0.41...v1.0.42) (2023-10-10)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### ✅ Tests
|
|
31
|
+
|
|
32
|
+
* **psw:** add unit tests for guest selection ([ded7941](https://github.com/visitscotland/vs-component-library/commit/ded79410800ec9a9124a067c1066edd6ecd678bf))
|
|
33
|
+
* **psw:** add unit tests for guest selector ([1ef5eb6](https://github.com/visitscotland/vs-component-library/commit/1ef5eb64102ead493aedd4106498bf111eb8909a))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### ♻️ Code Refactoring
|
|
37
|
+
|
|
38
|
+
* **psw:** fix linting errors ([b49a659](https://github.com/visitscotland/vs-component-library/commit/b49a659b5c4557a13df867abe1ec92f1932bb45c))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### 🐛 Bug Fixes
|
|
42
|
+
|
|
43
|
+
* **map:** correct zoom level in second undefined case ([b6bd843](https://github.com/visitscotland/vs-component-library/commit/b6bd843bf59601c03b0ff613ade231d0b31e8669))
|
|
44
|
+
* **psw:** add back dates exist functionality ([c45e146](https://github.com/visitscotland/vs-component-library/commit/c45e146cf1ed9a11404419a54fcb7d8d525d87c4))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### 🔖 Others
|
|
48
|
+
|
|
49
|
+
* **package.json:** add back missing theo script to test ([99784b6](https://github.com/visitscotland/vs-component-library/commit/99784b6d1d333c9a22df0b3904f6f702d458f05f))
|
|
50
|
+
* **release:** 1.0.41 ([584832f](https://github.com/visitscotland/vs-component-library/commit/584832fbf7221e7120c6a21fe46d0a24f5c88de0))
|
|
51
|
+
|
|
45
52
|
### [1.0.41](https://github.com/visitscotland/vs-component-library/compare/v1.0.40...v1.0.41) (2023-10-02)
|
|
46
53
|
|
|
47
54
|
|
|
@@ -2065,7 +2065,7 @@
|
|
|
2065
2065
|
"scripts/0e206515febb68c7ed5a.js",
|
|
2066
2066
|
"scripts/c3d0b3f6d90074d20578.js",
|
|
2067
2067
|
"scripts/c92a3e5ccccb0cf6ef66.js",
|
|
2068
|
-
"scripts/
|
|
2068
|
+
"scripts/83ea0b69314e2eb3ce0b.js",
|
|
2069
2069
|
"scripts/466d103fb06d365002f2.js",
|
|
2070
2070
|
"scripts/bed66c0f4af66eccf431.js",
|
|
2071
2071
|
"scripts/bc300fe5544e5516fe81.js",
|
|
@@ -2081,7 +2081,7 @@
|
|
|
2081
2081
|
"styles/0e206515febb68c7ed5a.css",
|
|
2082
2082
|
"styles/c3d0b3f6d90074d20578.css",
|
|
2083
2083
|
"styles/c92a3e5ccccb0cf6ef66.css",
|
|
2084
|
-
"styles/
|
|
2084
|
+
"styles/83ea0b69314e2eb3ce0b.css",
|
|
2085
2085
|
"styles/466d103fb06d365002f2.css",
|
|
2086
2086
|
"styles/bed66c0f4af66eccf431.css",
|
|
2087
2087
|
"styles/bc300fe5544e5516fe81.css",
|
|
@@ -2209,7 +2209,7 @@
|
|
|
2209
2209
|
"scripts/c3b673fbfb24084ec12a.js",
|
|
2210
2210
|
"scripts/ae5c80d270825f9d87fa.js",
|
|
2211
2211
|
"scripts/c92a3e5ccccb0cf6ef66.js",
|
|
2212
|
-
"scripts/
|
|
2212
|
+
"scripts/83ea0b69314e2eb3ce0b.js",
|
|
2213
2213
|
"scripts/59fa42192d2ea2f36729.js"
|
|
2214
2214
|
],
|
|
2215
2215
|
"styles": [
|
|
@@ -2217,7 +2217,7 @@
|
|
|
2217
2217
|
"styles/b7405143de8ded659a33.css",
|
|
2218
2218
|
"styles/ae5c80d270825f9d87fa.css",
|
|
2219
2219
|
"styles/c92a3e5ccccb0cf6ef66.css",
|
|
2220
|
-
"styles/
|
|
2220
|
+
"styles/83ea0b69314e2eb3ce0b.css"
|
|
2221
2221
|
]
|
|
2222
2222
|
},
|
|
2223
2223
|
"VsCarbonCalculatorRunningTotal": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[3671],{49462:function(){},4853:function(t,a,e){"use strict";var s=e(81779),n=e(73366),r=e(2262),o=e(62093),i=e(60976),l=e(8031);a.Z={name:"VsCarbonCalculatorResults",status:"prototype",release:"0.0.1",components:{VsCol:s.hY,VsRow:s.ou,VsHeading:n.default,VsCarbonCalculatorTip:l.default,Chart:o.kL,Grid:o.rj,Bar:o.$Q,Responsive:o.Et},mixins:[i.Z],inject:["labelsMap"],props:{totalKilos:{type:Number,default:0},foodKilos:{type:Number,default:0},transportKilos:{type:Number,default:0},accommodationKilos:{type:Number,default:0},stayDuration:{type:Number,default:1},comparisonReplacements:{type:Array,default:function(){return[]}}},data:function(){return{chartDirection:(0,r.iH)("horizontal"),chartAxis:(0,r.iH)({primary:{type:"band"}}),cssProps:"--chart-label: '".concat(this.labelsMap.kgsOf,"'")}},computed:{chartData:function(){return[{name:this.labelsMap.transport,emissions:this.transportKilos},{name:this.labelsMap.accommodation,emissions:this.accommodationKilos},{name:this.labelsMap.food,emissions:this.foodKilos}]},interpolComparison:function(){for(var t=this.labelsMap.comparison,a=0;a<this.comparisonReplacements.length;a++)t=t.replace(this.comparisonReplacements[a].repl,(this.totalKilos/this.comparisonReplacements[a].divisor).toFixed(3));return t},interpolKGsPerDay:function(){return this.labelsMap.kgsPerDay.replace("xxx",this.totalPerDay)},interpolPerDaySuccess:function(){return this.labelsMap.perDaySuccess.replace("xxx",this.labelsMap.perDayTarget)},transportPercent:function(){return this.transportKilos/this.totalKilos*100},accommodationPercent:function(){return this.accommodationKilos/this.totalKilos*100},foodPercent:function(){return this.foodKilos/this.totalKilos*100},totalPerDay:function(){return(this.totalKilos/Math.max(this.stayDuration,1)).toFixed(3)}},mounted:function(){this.createDataLayerObject("carbonCompleteEvent",{totalEmissions:this.totalKilos,totalPerDay:this.totalPerDay,travelPercent:this.transportPercent.toFixed(3)||0,accommodationPercent:this.accommodationPercent.toFixed(3)||0,foodPercent:this.foodPercent.toFixed(3)||0})},methods:{responsiveMargin:function(t){return t>300?{left:20,top:20,right:20,bottom:20}:{left:5,top:5,right:5,bottom:5}}}}},7531:function(t,a,e){"use strict";e.d(a,{s:function(){return l}});var s=e(66252),n=e(3577),r={class:"vs-carbon-calculator-results__total"},o=["innerHTML"],i={key:0};function l(t,a,e,l,c,u){var p=(0,s.up)("VsHeading"),m=(0,s.up)("VsCol"),f=(0,s.up)("VsRow"),d=(0,s.up)("Grid"),h=(0,s.up)("Bar"),y=(0,s.up)("Chart"),b=(0,s.up)("Responsive"),_=(0,s.up)("VsCarbonCalculatorTip");return(0,s.wg)(),(0,s.j4)(f,{"data-test":"vs-carbon-calculator-results",style:(0,n.normalizeStyle)(c.cssProps)},{default:(0,s.w5)((function(){return[(0,s.Wm)(m,{cols:"12"},{default:(0,s.w5)((function(){return[(0,s.Wm)(p,{level:"2"},{default:(0,s.w5)((function(){return[(0,s.Uk)((0,n.toDisplayString)(u.labelsMap.results),1)]})),_:1})]})),_:1}),(0,s.Wm)(m,{cols:"12"},{default:(0,s.w5)((function(){return[(0,s.Wm)(f,{class:"vs-carbon-calculator-results__headline"},{default:(0,s.w5)((function(){return[(0,s.Wm)(m,{cols:"12",md:"6"},{default:(0,s.w5)((function(){return[(0,s._)("p",null,(0,n.toDisplayString)(u.labelsMap.resultsIntro),1),(0,s._)("p",null,[(0,s._)("span",r,(0,n.toDisplayString)(e.totalKilos.toFixed(3)),1),(0,s.Uk)(" "+(0,n.toDisplayString)(u.labelsMap.kgsOf),1)])]})),_:1})]})),_:1})]})),_:1}),(0,s.Wm)(m,{cols:"12",class:"vs-carbon-calculator-results__comparison"},{default:(0,s.w5)((function(){return[(0,s._)("p",{innerHTML:u.interpolComparison},null,8,o)]})),_:1}),(0,s.Wm)(m,{cols:"12"},{default:(0,s.w5)((function(){return[(0,s._)("p",null,(0,n.toDisplayString)(u.interpolKGsPerDay),1),u.totalPerDay<=u.labelsMap.perDayTarget?((0,s.wg)(),(0,s.iD)("p",i,(0,n.toDisplayString)(u.interpolPerDaySuccess),1)):(0,s.kq)("",!0)]})),_:1}),(0,s.Wm)(m,null,{default:(0,s.w5)((function(){return[(0,s.Wm)(p,{level:"3"},{default:(0,s.w5)((function(){return[(0,s.Uk)((0,n.toDisplayString)(u.labelsMap.chartTitle),1)]})),_:1})]})),_:1}),(0,s.Wm)(m,{class:"vs-carbon-calculator-results__chart-wrapper",cols:"12"},{default:(0,s.w5)((function(){return[(0,s.Wm)(b,null,{main:(0,s.w5)((function(t){var a=t.width;return[(0,s.Wm)(y,{class:"vs-carbon-calculator-results__chart",size:{width:a,height:420},data:u.chartData,margin:u.responsiveMargin(a),direction:c.chartDirection,axis:c.chartAxis},{layers:(0,s.w5)((function(){return[(0,s.Wm)(d,{strokeDasharray:"2,2"}),(0,s.Wm)(h,{dataKeys:["name","emissions"],barStyle:{fill:"#AF006E"},gap:20})]})),_:2},1032,["size","data","margin","direction","axis"])]})),_:1})]})),_:1}),(0,s.Wm)(m,{cols:"12",class:"mt-8"},{default:(0,s.w5)((function(){return[(0,s.Wm)(_,{"showing-all-tips":!0})]})),_:1})]})),_:1},8,["style"])}},88168:function(t,a,e){"use strict";var s=e(93379),n=e.n(s),r=e(7795),o=e.n(r),i=e(90569),l=e.n(i),c=e(3565),u=e.n(c),p=e(19216),m=e.n(p),f=e(44589),d=e.n(f),h=e(49462),y=e.n(h),b={};b.styleTagTransform=d(),b.setAttributes=u(),b.insert=l().bind(null,"head"),b.domAPI=o(),b.insertStyleElement=m(),n()(y(),b),y()&&y().locals&&y().locals},3671:function(t,a,e){"use strict";e.r(a);var s=e(1735),n=e(28749);e(3619);const r=(0,e(83744).Z)(n.Z,[["render",s.s]]);a.default=r},28749:function(t,a,e){"use strict";e.d(a,{Z:function(){return s.Z}});var s=e(4853)},1735:function(t,a,e){"use strict";e.d(a,{s:function(){return s.s}});var s=e(7531)},3619:function(t,a,e){"use strict";e(88168)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vs-carbon-calculator-results__total{font-size:2.5rem;font-weight:700;margin-right:.5rem}.vs-carbon-calculator-results__comp-img{display:flex;justify-content:center}.vs-carbon-calculator-results__comp-img .vs-img{height:8rem}.vs-carbon-calculator-results__chart-wrapper{display:flex;justify-content:center;margin-top:1.5rem}@media(min-width: 768px){.vs-carbon-calculator-results__chart-wrapper{margin-top:4rem}}.vs-carbon-calculator-results__chart-wrapper>div{width:100%}@media(min-width: 768px){.vs-carbon-calculator-results__chart-wrapper>div{width:75%}}@media(min-width: 992px){.vs-carbon-calculator-results__chart-wrapper>div{width:50%}}.vs-carbon-calculator-results__chart-wrapper .chart::before{content:var(--chart-label);position:absolute;top:50%;text-align:center;left:-3rem;transform:translateY(-50%) rotate(-90deg)}@media(min-width: 768px){.vs-carbon-calculator-results__chart-wrapper .chart::before{max-width:7rem;left:-6rem;transform:translateY(-100%)}}.vs-carbon-calculator-results__chart-wrapper .chart text{font-size:.75rem}@media(min-width: 768px){.vs-carbon-calculator-results__chart-wrapper .chart text{font-size:1rem}}.vs-carbon-calculator-results__chart{margin-bottom:1.5rem}@media(min-width: 768px){.vs-carbon-calculator-results__chart{margin-bottom:4rem}}
|