@ecomplus/widget-martan 1.1.0 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.1.2](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-martan@1.1.1...@ecomplus/widget-martan@1.1.2) (2024-03-23)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **widget-martan:** fix package dependencies ([1da7cd0](https://github.com/ecomplus/storefront/commit/1da7cd028b1f766a7e349356c81406eda1f9d59a))
11
+
12
+ ## [1.1.1](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-martan@1.1.0...@ecomplus/widget-martan@1.1.1) (2024-03-23)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **widget-martan:** properly importing from `@ecomplus/storefront-twbs` ([c024d83](https://github.com/ecomplus/storefront/commit/c024d83f44adac91b98dd2c3533efe17b0d54758))
17
+
6
18
  # 1.1.0 (2024-03-21)
7
19
 
8
20
  ### Bug Fixes
@@ -1,2 +1,2 @@
1
- (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[1],{82:function(t,i,e){var r=e(89);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,e(6).default)("33bcfd10",r,!0,{})},88:function(t,i,e){"use strict";e(82)},89:function(t,i,e){(i=e(5)(!1)).push([t.i,".mt-rating-remove{align-items:center;cursor:pointer;display:flex;visibility:hidden}.mt-rating__list.is-active .mt-rating-remove{visibility:visible}.mt-rating__options li:hover{cursor:pointer}.mt-rating__list{align-items:center;display:flex;height:23px}.mt-rating__list.is-active .mt-rating-total,.mt-rating__list:hover .mt-rating-total{visibility:visible}.mt-rating__list:hover{opacity:.9}.mt-rating-meter{background-color:#e3e6e6;border-radius:50px;box-shadow:inset 0 0 0 1px #e3e6e6;display:flex;height:10px;overflow:hidden;width:100%}.mt-rating__options{list-style:none;margin:0;max-width:800px;padding:0;width:100%}.mt-rating-star{align-items:center;justify-content:space-around;margin-left:5px;width:30px}.mt-rating-star,.mt-rating-total{color:#757373;display:flex;font-size:12px}.mt-rating-total{gap:3px;margin-left:2px;visibility:hidden;width:50px}",""]),t.exports=i},96:function(t,i,e){"use strict";e.r(i);var r={name:"AverageScore",props:{},data:()=>({maxReviews:5}),methods:{async setRating(t,i){await new Promise(t=>{t(Array.from(options.value.children).map(t=>(t.style.removeProperty("opacity"),t.children[0].childNodes[1].style.stroke="rgb(227, 230, 230)",t.classList.remove("is-active"))))}).then(()=>{if(i!==reviews.orderRating){const t=Array.from(options.value.children)[i-1];t.classList.add("is-active"),t.style.opacity=1,t.children[0].childNodes[1].style.stroke=config.star_color,Array.from(options.value.children).forEach((t,e)=>{e!==i-1&&(t.style.opacity=".5")})}}),i===reviews.orderRating?reviews.orderRating=null:(reviews.offset=0,reviews.orderRating=i)}}},s=(e(88),e(2)),a=Object(s.a)(r,(function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("ul",{ref:"options",staticClass:"mt-rating__options"},t._l(t.maxReviews,(function(i){return e("li",{key:i,staticClass:"mt-rating__list",on:{click:function(e){return 0===t.reviews.total?null:t.setRating(e,i)}}},[e("div",{staticClass:"mt-rating-star"},[e("span",[t._v(t._s(i))]),e("svg",{staticClass:"icon icon-tabler icon-tabler-star",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24","stroke-width":"2",stroke:"#e3e6e6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[e("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),e("path",{attrs:{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"}})])]),e("div",{staticClass:"mt-rating-meter"},[e("div",{staticClass:"mt-rating-bar",style:{width:t.reviews.getWidth(i),"background-color":t.config.star_color||"red"}})]),e("div",{staticClass:"mt-rating-total"},[e("span",[t._v(t._s(t.reviews.average[t.numberToText(i)]))]),e("span",[t._v("("+t._s(t.reviews.getWidth(i))+")")]),e("span",{staticClass:"mt-rating-remove"},[e("svg",{staticClass:"icon icon-tabler icon-tabler-x",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[e("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),e("path",{attrs:{d:"M18 6l-12 12"}}),e("path",{attrs:{d:"M6 6l12 12"}})])])])])})),0)}),[],!1,null,null,null);i.default=a.exports}}]);
1
+ (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[1],{69:function(t,i,e){var r=e(76);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,e(5).default)("33bcfd10",r,!0,{})},75:function(t,i,e){"use strict";e(69)},76:function(t,i,e){(i=e(4)(!1)).push([t.i,".mt-rating-remove{align-items:center;cursor:pointer;display:flex;visibility:hidden}.mt-rating__list.is-active .mt-rating-remove{visibility:visible}.mt-rating__options li:hover{cursor:pointer}.mt-rating__list{align-items:center;display:flex;height:23px}.mt-rating__list.is-active .mt-rating-total,.mt-rating__list:hover .mt-rating-total{visibility:visible}.mt-rating__list:hover{opacity:.9}.mt-rating-meter{background-color:#e3e6e6;border-radius:50px;box-shadow:inset 0 0 0 1px #e3e6e6;display:flex;height:10px;overflow:hidden;width:100%}.mt-rating__options{list-style:none;margin:0;max-width:800px;padding:0;width:100%}.mt-rating-star{align-items:center;justify-content:space-around;margin-left:5px;width:30px}.mt-rating-star,.mt-rating-total{color:#757373;display:flex;font-size:12px}.mt-rating-total{gap:3px;margin-left:2px;visibility:hidden;width:50px}",""]),t.exports=i},83:function(t,i,e){"use strict";e.r(i);var r={name:"AverageScore",props:{},data:()=>({maxReviews:5}),methods:{async setRating(t,i){await new Promise(t=>{t(Array.from(options.value.children).map(t=>(t.style.removeProperty("opacity"),t.children[0].childNodes[1].style.stroke="rgb(227, 230, 230)",t.classList.remove("is-active"))))}).then(()=>{if(i!==reviews.orderRating){const t=Array.from(options.value.children)[i-1];t.classList.add("is-active"),t.style.opacity=1,t.children[0].childNodes[1].style.stroke=config.star_color,Array.from(options.value.children).forEach((t,e)=>{e!==i-1&&(t.style.opacity=".5")})}}),i===reviews.orderRating?reviews.orderRating=null:(reviews.offset=0,reviews.orderRating=i)}}},s=(e(75),e(2)),a=Object(s.a)(r,(function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("ul",{ref:"options",staticClass:"mt-rating__options"},t._l(t.maxReviews,(function(i){return e("li",{key:i,staticClass:"mt-rating__list",on:{click:function(e){return 0===t.reviews.total?null:t.setRating(e,i)}}},[e("div",{staticClass:"mt-rating-star"},[e("span",[t._v(t._s(i))]),e("svg",{staticClass:"icon icon-tabler icon-tabler-star",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24","stroke-width":"2",stroke:"#e3e6e6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[e("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),e("path",{attrs:{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"}})])]),e("div",{staticClass:"mt-rating-meter"},[e("div",{staticClass:"mt-rating-bar",style:{width:t.reviews.getWidth(i),"background-color":t.config.star_color||"red"}})]),e("div",{staticClass:"mt-rating-total"},[e("span",[t._v(t._s(t.reviews.average[t.numberToText(i)]))]),e("span",[t._v("("+t._s(t.reviews.getWidth(i))+")")]),e("span",{staticClass:"mt-rating-remove"},[e("svg",{staticClass:"icon icon-tabler icon-tabler-x",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[e("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),e("path",{attrs:{d:"M18 6l-12 12"}}),e("path",{attrs:{d:"M6 6l12 12"}})])])])])})),0)}),[],!1,null,null,null);i.default=a.exports}}]);
2
2
  //# sourceMappingURL=widget-martan.1.min.js.map
@@ -1,2 +1,2 @@
1
- (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[2],{80:function(e,t,a){var r=a(85);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,a(6).default)("0bf36ea5",r,!0,{})},84:function(e,t,a){"use strict";a(80)},85:function(e,t,a){(t=a(5)(!1)).push([e.i,".mt-header--expanded{border-bottom:1px solid #e3e3e3;padding-bottom:25px}.mt-header--expanded,.mt-header--expanded .mt-rating__average{align-items:center;display:flex}.mt-header--expanded .mt-rating__average__wrapper{display:flex;flex-direction:column;height:100%;justify-content:center;padding-top:5px}.mt-header--expanded .mt-rating__average_total{font-size:48px;margin:0 18px 0 0;padding:0}@media(max-width:580px){.mt-rating__options{max-width:97%}}",""]),e.exports=t},93:function(e,t,a){"use strict";a.r(t);var r={props:{starColor:{type:String,default:"#212529"},reviews:{type:Object,default:{list:[],orderRating:null,total:0,average:{one:0,two:0,three:0,four:0,five:0},averageTotal:0}}},name:"header-expanded",components:{AverageTotal:()=>a.e(5).then(a.bind(null,95)),AverageScore:()=>a.e(1).then(a.bind(null,96)),Score:()=>a.e(4).then(a.bind(null,92))},methods:{updateOrderBy:({rating:e})=>(void 0).$emit("updateOrderByAverage",{rating:e})}},n=(a(84),a(2)),d=Object(n.a)(r,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"mt-header--expanded"},[t("average-total",{attrs:{average:this.reviews.averageTotal}}),t("score",{attrs:{reviews:this.reviews,starColor:this.starColor},on:{updateOrderByAverage:this.updateOrderBy}})],1)}),[],!1,null,null,null);t.default=d.exports}}]);
1
+ (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[2],{67:function(e,t,a){var r=a(72);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,a(5).default)("0bf36ea5",r,!0,{})},71:function(e,t,a){"use strict";a(67)},72:function(e,t,a){(t=a(4)(!1)).push([e.i,".mt-header--expanded{border-bottom:1px solid #e3e3e3;padding-bottom:25px}.mt-header--expanded,.mt-header--expanded .mt-rating__average{align-items:center;display:flex}.mt-header--expanded .mt-rating__average__wrapper{display:flex;flex-direction:column;height:100%;justify-content:center;padding-top:5px}.mt-header--expanded .mt-rating__average_total{font-size:48px;margin:0 18px 0 0;padding:0}@media(max-width:580px){.mt-rating__options{max-width:97%}}",""]),e.exports=t},80:function(e,t,a){"use strict";a.r(t);var r={props:{starColor:{type:String,default:"#212529"},reviews:{type:Object,default:{list:[],orderRating:null,total:0,average:{one:0,two:0,three:0,four:0,five:0},averageTotal:0}}},name:"header-expanded",components:{AverageTotal:()=>a.e(5).then(a.bind(null,82)),AverageScore:()=>a.e(1).then(a.bind(null,83)),Score:()=>a.e(4).then(a.bind(null,79))},methods:{updateOrderBy:({rating:e})=>(void 0).$emit("updateOrderByAverage",{rating:e})}},n=(a(71),a(2)),d=Object(n.a)(r,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"mt-header--expanded"},[t("average-total",{attrs:{average:this.reviews.averageTotal}}),t("score",{attrs:{reviews:this.reviews,starColor:this.starColor},on:{updateOrderByAverage:this.updateOrderBy}})],1)}),[],!1,null,null,null);t.default=d.exports}}]);
2
2
  //# sourceMappingURL=widget-martan.2.min.js.map
@@ -1,2 +1,2 @@
1
- (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[3],{81:function(e,a,t){var i=t(87);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,t(6).default)("1e9d45a2",i,!0,{})},86:function(e,a,t){"use strict";t(81)},87:function(e,a,t){(a=t(5)(!1)).push([e.i,".mt-header--minimal .rating{align-items:center;border-bottom:1px solid #eee;display:flex;gap:15px;justify-content:space-between;margin-bottom:10px;padding-bottom:10px}.mt-header--minimal .average{color:#6c757d;font-size:26px}.mt-header--minimal .mt-rating__average__sort{width:100%}@media(max-width:580px){.mt-header--minimal .baseado{display:none}}",""]),e.exports=a},94:function(e,a,t){"use strict";t.r(a);var i=t(7),s=t(40),o={props:{starColor:{type:String,default:"#212529"},reviews:{type:Object,default:{list:[],orderRating:null,total:0,average:{one:0,two:0,three:0,four:0,five:0},averageTotal:0}}},name:"header-minimal",components:{Rating:i.a,Sort:s.a},computed:{i19basedOn$1Reviews:()=>"Baseado em $1 avaliações",i19basedOn$1Review:()=>"Baseado em $1 avaliação",i19noReview:()=>"Nenhuma avaliação"},methods:{updateOrderBy:({rating:e})=>(void 0).$emit("updateOrderByAverage",{rating:e}),onSort(e){this.$emit("onSort",e)}}},r=(t(86),t(2)),n=Object(r.a)(o,(function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"mt-header--minimal"},[t("div",{staticClass:"rating"},[t("div",{staticStyle:{display:"flex","align-items":"center",gap:"10px"}},[t("rating",{attrs:{color:e.starColor,rating:e.reviews.averageTotal}}),e.reviews.averageTotal>0?t("span",{staticClass:"average"},[e._v(" "+e._s(e.reviews.averageTotal)+" "),t("span",{staticClass:"baseado",staticStyle:{"font-size":"10px",opacity:"0.8"}},[e._v("("+e._s(e.reviews.total>1?e.i19basedOn$1Reviews.replace("$1",e.reviews.total):e.i19basedOn$1Review.replace("$1",e.reviews.total))+")")])]):t("span",{staticClass:"average"},[e._v(" "+e._s(e.reviews.averageTotal)+" "),t("span",{staticClass:"baseado",staticStyle:{"font-size":"10px",opacity:"0.8"}},[e._v("("+e._s(e.i19noReview)+")")])])],1),t("Sort",{on:{onSort:e.onSort}})],1)])}),[],!1,null,null,null);a.default=n.exports}}]);
1
+ (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[3],{68:function(e,a,t){var i=t(74);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);(0,t(5).default)("1e9d45a2",i,!0,{})},73:function(e,a,t){"use strict";t(68)},74:function(e,a,t){(a=t(4)(!1)).push([e.i,".mt-header--minimal .rating{align-items:center;border-bottom:1px solid #eee;display:flex;gap:15px;justify-content:space-between;margin-bottom:10px;padding-bottom:10px}.mt-header--minimal .average{color:#6c757d;font-size:26px}.mt-header--minimal .mt-rating__average__sort{width:100%}@media(max-width:580px){.mt-header--minimal .baseado{display:none}}",""]),e.exports=a},81:function(e,a,t){"use strict";t.r(a);var i=t(6),s=t(35),o={props:{starColor:{type:String,default:"#212529"},reviews:{type:Object,default:{list:[],orderRating:null,total:0,average:{one:0,two:0,three:0,four:0,five:0},averageTotal:0}}},name:"header-minimal",components:{Rating:i.a,Sort:s.a},computed:{i19basedOn$1Reviews:()=>"Baseado em $1 avaliações",i19basedOn$1Review:()=>"Baseado em $1 avaliação",i19noReview:()=>"Nenhuma avaliação"},methods:{updateOrderBy:({rating:e})=>(void 0).$emit("updateOrderByAverage",{rating:e}),onSort(e){this.$emit("onSort",e)}}},r=(t(73),t(2)),n=Object(r.a)(o,(function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"mt-header--minimal"},[t("div",{staticClass:"rating"},[t("div",{staticStyle:{display:"flex","align-items":"center",gap:"10px"}},[t("rating",{attrs:{color:e.starColor,rating:e.reviews.averageTotal}}),e.reviews.averageTotal>0?t("span",{staticClass:"average"},[e._v(" "+e._s(e.reviews.averageTotal)+" "),t("span",{staticClass:"baseado",staticStyle:{"font-size":"10px",opacity:"0.8"}},[e._v("("+e._s(e.reviews.total>1?e.i19basedOn$1Reviews.replace("$1",e.reviews.total):e.i19basedOn$1Review.replace("$1",e.reviews.total))+")")])]):t("span",{staticClass:"average"},[e._v(" "+e._s(e.reviews.averageTotal)+" "),t("span",{staticClass:"baseado",staticStyle:{"font-size":"10px",opacity:"0.8"}},[e._v("("+e._s(e.i19noReview)+")")])])],1),t("Sort",{on:{onSort:e.onSort}})],1)])}),[],!1,null,null,null);a.default=n.exports}}]);
2
2
  //# sourceMappingURL=widget-martan.3.min.js.map
@@ -1,2 +1,2 @@
1
- (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[4],{83:function(t,e,i){var r=i(91);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,i(6).default)("774c1cb8",r,!0,{})},90:function(t,e,i){"use strict";i(83)},91:function(t,e,i){(e=i(5)(!1)).push([t.i,".mt-rating-remove{align-items:center;cursor:pointer;display:flex;visibility:hidden}.mt-rating__list.is-active .mt-rating-remove{visibility:visible}.mt-average__options li:hover{cursor:pointer}.mt-rating__list{align-items:center;display:flex;height:23px;transition:opacity .25s ease-in-out}.mt-rating__list.is-active .mt-rating-total,.mt-rating__list:hover .mt-rating-total{visibility:visible}.mt-rating__list:hover{opacity:.9}.mt-rating-meter{background-color:#e3e6e6;border-radius:50px;box-shadow:inset 0 0 0 1px #e3e6e6;display:flex;height:10px;overflow:hidden;width:100%}.mt-average__options{list-style:none;margin:0;max-width:800px;padding:0;width:100%}.mt-rating-star{align-items:center;justify-content:space-around;margin-left:5px;width:30px}.mt-rating-star,.mt-rating-total{color:#757373;display:flex;font-size:12px}.mt-rating-total{gap:3px;margin-left:2px;visibility:hidden;width:50px}",""]),t.exports=e},92:function(t,e,i){"use strict";i.r(e);const r=t=>{switch(t){case 1:return"one";case 2:return"two";case 3:return"three";case 4:return"four";case 5:return"five"}};var s={name:"Score",props:{reviews:{type:Object,default:{list:[],orderRating:null,total:0,average:{one:0,two:0,three:0,four:0,five:0},averageTotal:0,offset:0}},starColor:{type:String,default:"#212529"}},data:()=>({maxReviews:5}),methods:{getWidth:function(t,e){return 0===t.total?"0%":(100*t.average[r(e)]/t.total).toFixed()+"%"},numberToText:r,setRating:async function(t,e){if(await(()=>new Promise(t=>{t(Array.from(this.$refs.options.children).map(t=>(t.style.removeProperty("opacity"),t.children[0].childNodes[2].style.stroke="rgb(227, 230, 230)",t.children[0].childNodes[2].style.color="rgb(227, 230, 230)",t.classList.remove("is-active"))))}))().catch(t=>console.error(t)),e!==this.reviews.orderRating){const t=Array.from(this.$refs.options.children)[e-1];t.classList.add("is-active"),t.style.opacity=1,t.children[0].childNodes[2].style.stroke=this.starColor,t.children[0].childNodes[2].style.color=this.starColor,Array.from(this.$refs.options.children).forEach((t,i)=>{i!==e-1&&(t.style.opacity=".5")})}this.$parent.$emit("updateOrderByAverage",{rating:e})}}},a=(i(90),i(2)),o=Object(a.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{ref:"options",staticClass:"mt-average__options"},t._l(t.maxReviews,(function(e){return i("li",{key:e,staticClass:"mt-rating__list",on:{click:function(i){0!==t.reviews.total&&t.setRating(i,e)}}},[i("div",{staticClass:"mt-rating-star"},[i("span",[t._v(t._s(e))]),i("svg",{staticStyle:{color:"#E6E3E3"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24","stroke-width":"2",stroke:"#E6E3E3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[i("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),i("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z","stroke-width":"0",fill:"currentColor"}})])]),i("div",{staticClass:"mt-rating-meter"},[i("div",{staticClass:"mt-rating-bar",style:{width:t.getWidth(t.reviews,e),"background-color":t.starColor||"red"}})]),i("div",{staticClass:"mt-rating-total"},[i("span",[t._v(t._s(t.reviews.average[t.numberToText(e)]))]),i("span",[t._v("("+t._s(t.getWidth(t.reviews,e))+")")]),i("span",{staticClass:"mt-rating-remove"},[i("svg",{staticClass:"icon icon-tabler icon-tabler-x",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[i("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),i("path",{attrs:{d:"M18 6l-12 12"}}),i("path",{attrs:{d:"M6 6l12 12"}})])])])])})),0)}),[],!1,null,null,null);e.default=o.exports}}]);
1
+ (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[4],{70:function(t,e,i){var r=i(78);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,i(5).default)("774c1cb8",r,!0,{})},77:function(t,e,i){"use strict";i(70)},78:function(t,e,i){(e=i(4)(!1)).push([t.i,".mt-rating-remove{align-items:center;cursor:pointer;display:flex;visibility:hidden}.mt-rating__list.is-active .mt-rating-remove{visibility:visible}.mt-average__options li:hover{cursor:pointer}.mt-rating__list{align-items:center;display:flex;height:23px;transition:opacity .25s ease-in-out}.mt-rating__list.is-active .mt-rating-total,.mt-rating__list:hover .mt-rating-total{visibility:visible}.mt-rating__list:hover{opacity:.9}.mt-rating-meter{background-color:#e3e6e6;border-radius:50px;box-shadow:inset 0 0 0 1px #e3e6e6;display:flex;height:10px;overflow:hidden;width:100%}.mt-average__options{list-style:none;margin:0;max-width:800px;padding:0;width:100%}.mt-rating-star{align-items:center;justify-content:space-around;margin-left:5px;width:30px}.mt-rating-star,.mt-rating-total{color:#757373;display:flex;font-size:12px}.mt-rating-total{gap:3px;margin-left:2px;visibility:hidden;width:50px}",""]),t.exports=e},79:function(t,e,i){"use strict";i.r(e);const r=t=>{switch(t){case 1:return"one";case 2:return"two";case 3:return"three";case 4:return"four";case 5:return"five"}};var s={name:"Score",props:{reviews:{type:Object,default:{list:[],orderRating:null,total:0,average:{one:0,two:0,three:0,four:0,five:0},averageTotal:0,offset:0}},starColor:{type:String,default:"#212529"}},data:()=>({maxReviews:5}),methods:{getWidth:function(t,e){return 0===t.total?"0%":(100*t.average[r(e)]/t.total).toFixed()+"%"},numberToText:r,setRating:async function(t,e){if(await(()=>new Promise(t=>{t(Array.from(this.$refs.options.children).map(t=>(t.style.removeProperty("opacity"),t.children[0].childNodes[2].style.stroke="rgb(227, 230, 230)",t.children[0].childNodes[2].style.color="rgb(227, 230, 230)",t.classList.remove("is-active"))))}))().catch(t=>console.error(t)),e!==this.reviews.orderRating){const t=Array.from(this.$refs.options.children)[e-1];t.classList.add("is-active"),t.style.opacity=1,t.children[0].childNodes[2].style.stroke=this.starColor,t.children[0].childNodes[2].style.color=this.starColor,Array.from(this.$refs.options.children).forEach((t,i)=>{i!==e-1&&(t.style.opacity=".5")})}this.$parent.$emit("updateOrderByAverage",{rating:e})}}},a=(i(77),i(2)),o=Object(a.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{ref:"options",staticClass:"mt-average__options"},t._l(t.maxReviews,(function(e){return i("li",{key:e,staticClass:"mt-rating__list",on:{click:function(i){0!==t.reviews.total&&t.setRating(i,e)}}},[i("div",{staticClass:"mt-rating-star"},[i("span",[t._v(t._s(e))]),i("svg",{staticStyle:{color:"#E6E3E3"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24","stroke-width":"2",stroke:"#E6E3E3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[i("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),i("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z","stroke-width":"0",fill:"currentColor"}})])]),i("div",{staticClass:"mt-rating-meter"},[i("div",{staticClass:"mt-rating-bar",style:{width:t.getWidth(t.reviews,e),"background-color":t.starColor||"red"}})]),i("div",{staticClass:"mt-rating-total"},[i("span",[t._v(t._s(t.reviews.average[t.numberToText(e)]))]),i("span",[t._v("("+t._s(t.getWidth(t.reviews,e))+")")]),i("span",{staticClass:"mt-rating-remove"},[i("svg",{staticClass:"icon icon-tabler icon-tabler-x",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[i("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),i("path",{attrs:{d:"M18 6l-12 12"}}),i("path",{attrs:{d:"M6 6l12 12"}})])])])])})),0)}),[],!1,null,null,null);e.default=o.exports}}]);
2
2
  //# sourceMappingURL=widget-martan.4.min.js.map
@@ -1,2 +1,2 @@
1
- (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[5],{95:function(t,a,e){"use strict";e.r(a);var l={name:"AverageTotal",props:{average:{type:Number,default:0}}},r=e(2),s=Object(r.a)(l,(function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"mt-rating__resume",attrs:{title:"Nota média "+this.average}},[a("div",{staticClass:"mt-rating__average"},[a("div",{staticClass:"mt-rating__average__wrapper"},[a("svg",{staticClass:"icon icon-tabler icon-tabler-star-filled",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[a("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),a("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z","stroke-width":"0",fill:"currentColor"}})])]),a("div",{staticStyle:{"margin-left":"10px"}},[a("p",{staticClass:"mt-rating__average--total"},[this._v(" "+this._s(this.average)+" ")])])])])}),[],!1,null,null,null);a.default=s.exports}}]);
1
+ (window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[]).push([[5],{82:function(t,a,e){"use strict";e.r(a);var l={name:"AverageTotal",props:{average:{type:Number,default:0}}},r=e(2),s=Object(r.a)(l,(function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"mt-rating__resume",attrs:{title:"Nota média "+this.average}},[a("div",{staticClass:"mt-rating__average"},[a("div",{staticClass:"mt-rating__average__wrapper"},[a("svg",{staticClass:"icon icon-tabler icon-tabler-star-filled",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}},[a("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),a("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z","stroke-width":"0",fill:"currentColor"}})])]),a("div",{staticStyle:{"margin-left":"10px"}},[a("p",{staticClass:"mt-rating__average--total"},[this._v(" "+this._s(this.average)+" ")])])])])}),[],!1,null,null,null);a.default=s.exports}}]);
2
2
  //# sourceMappingURL=widget-martan.5.min.js.map