@ecomplus/widget-martan 1.1.0
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 +132 -0
- package/README.md +11 -0
- package/cms.config.js +264 -0
- package/dist/public/widget-martan.1.min.js +2 -0
- package/dist/public/widget-martan.1.min.js.map +1 -0
- package/dist/public/widget-martan.2.min.js +2 -0
- package/dist/public/widget-martan.2.min.js.map +1 -0
- package/dist/public/widget-martan.3.min.js +2 -0
- package/dist/public/widget-martan.3.min.js.map +1 -0
- package/dist/public/widget-martan.4.min.js +2 -0
- package/dist/public/widget-martan.4.min.js.map +1 -0
- package/dist/public/widget-martan.5.min.js +2 -0
- package/dist/public/widget-martan.5.min.js.map +1 -0
- package/dist/public/widget-martan.var.min.js +71 -0
- package/dist/public/widget-martan.var.min.js.map +1 -0
- package/dist/widget-martan.1.min.js +2 -0
- package/dist/widget-martan.1.min.js.map +1 -0
- package/dist/widget-martan.2.min.js +2 -0
- package/dist/widget-martan.2.min.js.map +1 -0
- package/dist/widget-martan.3.min.js +2 -0
- package/dist/widget-martan.3.min.js.map +1 -0
- package/dist/widget-martan.4.min.js +2 -0
- package/dist/widget-martan.4.min.js.map +1 -0
- package/dist/widget-martan.5.min.js +2 -0
- package/dist/widget-martan.5.min.js.map +1 -0
- package/dist/widget-martan.min.js +71 -0
- package/dist/widget-martan.min.js.map +1 -0
- package/package.json +36 -0
- package/src/append/body.ejs +79 -0
- package/src/append/head.ejs +5 -0
- package/src/append/product-block.ejs +5 -0
- package/src/append/product-card-slots.ejs +3 -0
- package/src/append/product-slots.ejs +25 -0
- package/src/append/stamps.ejs +3 -0
- package/src/index.js +22 -0
- package/src/utils/get-width.js +11 -0
- package/src/utils/textToNumber.js +31 -0
- package/src/utils/time-ago.js +35 -0
- package/src/widgets/reviews/AuthorAndRating.vue +30 -0
- package/src/widgets/reviews/AverageScore.vue +160 -0
- package/src/widgets/reviews/AverageTotal.vue +35 -0
- package/src/widgets/reviews/CardReview.vue +87 -0
- package/src/widgets/reviews/GridView.vue +113 -0
- package/src/widgets/reviews/HeaderExpanded.vue +84 -0
- package/src/widgets/reviews/HeaderMinimal.vue +110 -0
- package/src/widgets/reviews/ListView.vue +47 -0
- package/src/widgets/reviews/Quickview.vue +398 -0
- package/src/widgets/reviews/ReviewBody.vue +39 -0
- package/src/widgets/reviews/ReviewReply.vue +57 -0
- package/src/widgets/reviews/Reviews.vue +496 -0
- package/src/widgets/reviews/Score.vue +186 -0
- package/src/widgets/reviews/Sort.vue +76 -0
- package/src/widgets/reviews/ThumbsPictures.vue +135 -0
- package/src/widgets/reviews/Total.vue +79 -0
- package/src/widgets/reviews/VerifiedPurchase.vue +111 -0
- package/src/widgets/reviews/VideoPlayer.vue +136 -0
- package/src/widgets/reviews/index.js +52 -0
- package/src/widgets/reviews/isRecommended.vue +44 -0
- package/src/widgets/snippets/Rating.vue +71 -0
- package/src/widgets/snippets/Snippets.vue +311 -0
- package/src/widgets/snippets/index.js +45 -0
- package/webpack.config.js +1 -0
|
@@ -0,0 +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}}]);
|
|
2
|
+
//# sourceMappingURL=widget-martan.1.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?a9a0","webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?681c","webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?2913","webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?6c96","webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?1745","webpack://widgetMartan/src/widgets/reviews/AverageScore.vue","webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue"],"names":["content","__esModule","default","module","i","locals","exports","add","___CSS_LOADER_API_IMPORT___","push","name","props","data","maxReviews","methods","e","rating","Promise","resolve","Array","from","options","value","children","map","option","style","removeProperty","childNodes","stroke","classList","remove","then","reviews","orderRating","el","opacity","config","star_color","forEach","index","offset","component","_vm","this","_h","$createElement","_c","_self","ref","staticClass","_l","key","on","total","setRating","_v","_s","attrs","width","getWidth","average","numberToText"],"mappings":"oGAGA,IAAIA,EAAU,EAAQ,IACnBA,EAAQC,aAAYD,EAAUA,EAAQE,SACnB,iBAAZF,IAAsBA,EAAU,CAAC,CAACG,EAAOC,EAAIJ,EAAS,MAC7DA,EAAQK,SA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A,KACA,KACA,MAIa,UAAAhB,E","file":"widget-martan.1.min.js","sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ref--2-2!../../../../../node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AverageScore.vue?vue&type=style&index=0&id=6e389857&prod&lang=css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"33bcfd10\", content, true, {});","export * from \"-!../../../../../node_modules/vue-style-loader/index.js!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ref--2-2!../../../../../node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AverageScore.vue?vue&type=style&index=0&id=6e389857&prod&lang=css\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".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}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',{ref:\"options\",staticClass:\"mt-rating__options\"},_vm._l((_vm.maxReviews),function(index){return _c('li',{key:index,staticClass:\"mt-rating__list\",on:{\"click\":function (e) { return (_vm.reviews.total === 0 ? null : _vm.setRating(e, index)); }}},[_c('div',{staticClass:\"mt-rating-star\"},[_c('span',[_vm._v(_vm._s(index))]),_c('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\"}},[_c('path',{attrs:{\"stroke\":\"none\",\"d\":\"M0 0h24v24H0z\",\"fill\":\"none\"}}),_c('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\"}})])]),_c('div',{staticClass:\"mt-rating-meter\"},[_c('div',{staticClass:\"mt-rating-bar\",style:({\n width: _vm.reviews.getWidth(index),\n 'background-color': _vm.config.star_color || 'red',\n })})]),_c('div',{staticClass:\"mt-rating-total\"},[_c('span',[_vm._v(_vm._s(_vm.reviews.average[_vm.numberToText(index)]))]),_c('span',[_vm._v(\"(\"+_vm._s(_vm.reviews.getWidth(index))+\")\")]),_c('span',{staticClass:\"mt-rating-remove\"},[_c('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\"}},[_c('path',{attrs:{\"stroke\":\"none\",\"d\":\"M0 0h24v24H0z\",\"fill\":\"none\"}}),_c('path',{attrs:{\"d\":\"M18 6l-12 12\"}}),_c('path',{attrs:{\"d\":\"M6 6l12 12\"}})])])])])}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AverageScore.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AverageScore.vue?vue&type=script&lang=js\"","<template>\n <ul class=\"mt-rating__options\" ref=\"options\">\n <li class=\"mt-rating__list\" v-for=\"index in maxReviews\" :key=\"index\"\n v-on:click=\"(e) => (reviews.total === 0 ? null : setRating(e, index))\">\n <div class=\"mt-rating-star\">\n <span>{{ index }}</span>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon icon-tabler icon-tabler-star\" width=\"14\" height=\"14\"\n viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"#e3e6e6\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n 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\" />\n </svg>\n </div>\n\n <div class=\"mt-rating-meter\">\n <div class=\"mt-rating-bar\" v-bind:style=\"{\n width: reviews.getWidth(index),\n 'background-color': config.star_color || 'red',\n }\" />\n </div>\n\n <div class=\"mt-rating-total\">\n <span>{{ reviews.average[numberToText(index)] }}</span>\n <span>({{ reviews.getWidth(index) }})</span>\n\n <span class=\"mt-rating-remove\"><svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon icon-tabler icon-tabler-x\"\n width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M18 6l-12 12\"></path>\n <path d=\"M6 6l12 12\"></path>\n </svg></span>\n </div>\n </li>\n </ul>\n</template>\n\n\n<script>\nexport default {\n name: 'AverageScore',\n\n props: {\n },\n\n data() {\n return {\n maxReviews: 5\n };\n },\n\n methods: {\n async setRating(e, rating) {\n const removeClass = () =>\n new Promise((resolve) => {\n const res = Array.from(options.value.children).map((option) => {\n option.style.removeProperty(\"opacity\")\n option.children[0].childNodes[1].style.stroke = \"rgb(227, 230, 230)\"\n return option.classList.remove(\"is-active\")\n })\n\n resolve(res)\n })\n\n await removeClass().then(() => {\n if (rating !== reviews.orderRating) {\n const el = Array.from(options.value.children)[rating - 1]\n el.classList.add(\"is-active\")\n el.style.opacity = 1\n el.children[0].childNodes[1].style.stroke = config.star_color\n Array.from(options.value.children).forEach((option, index) => {\n if (index !== rating - 1) {\n option.style.opacity = \".5\"\n }\n })\n }\n })\n\n if (rating === reviews.orderRating) {\n reviews.orderRating = null\n } else {\n reviews.offset = 0\n reviews.orderRating = rating\n }\n }\n },\n};\n</script>\n\n<style>\n.mt-rating-remove {\n visibility: hidden;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.mt-rating__list.is-active .mt-rating-remove {\n visibility: visible;\n}\n\n.mt-rating__options li:hover {\n cursor: pointer;\n}\n\n.mt-rating__list {\n display: flex;\n align-items: center;\n height: 23px;\n}\n\n.mt-rating__list.is-active .mt-rating-total,\n.mt-rating__list:hover .mt-rating-total {\n visibility: visible;\n}\n\n.mt-rating__list:hover {\n opacity: 0.9;\n}\n\n.mt-rating-meter {\n overflow: hidden;\n box-shadow: inset 0 0 0 1px #e3e6e6;\n background-color: #e3e6e6;\n height: 10px;\n width: 100%;\n border-radius: 50px;\n display: flex;\n}\n\n.mt-rating__options {\n margin: 0;\n list-style: none;\n padding: 0;\n max-width: 800px;\n width: 100%;\n}\n\n.mt-rating-star {\n display: flex;\n width: 30px;\n justify-content: space-around;\n font-size: 12px;\n color: #757373;\n align-items: center;\n margin-left: 5px;\n}\n\n.mt-rating-total {\n visibility: hidden;\n width: 50px;\n font-size: 12px;\n color: #757373;\n margin-left: 2px;\n display: flex;\n gap: 3px;\n}\n</style>\n","import { render, staticRenderFns } from \"./AverageScore.vue?vue&type=template&id=6e389857\"\nimport script from \"./AverageScore.vue?vue&type=script&lang=js\"\nexport * from \"./AverageScore.vue?vue&type=script&lang=js\"\nimport style0 from \"./AverageScore.vue?vue&type=style&index=0&id=6e389857&prod&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|
|
@@ -0,0 +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}}]);
|
|
2
|
+
//# sourceMappingURL=widget-martan.2.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?b3b3","webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?968b","webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?617b","webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?51f4","webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?9368","webpack://widgetMartan/src/widgets/reviews/HeaderExpanded.vue","webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue"],"names":["content","__esModule","default","module","i","locals","exports","add","___CSS_LOADER_API_IMPORT___","push","props","starColor","type","String","reviews","Object","list","orderRating","total","average","one","two","three","four","five","averageTotal","name","components","AverageTotal","AverageScore","Score","methods","updateOrderBy","rating","$emit","component","_h","this","$createElement","_c","_self","staticClass","attrs","on"],"mappings":"oGAGA,IAAIA,EAAU,EAAQ,IACnBA,EAAQC,aAAYD,EAAUA,EAAQE,SACnB,iBAAZF,IAAsBA,EAAU,CAAC,CAACG,EAAOC,EAAIJ,EAAS,MAC7DA,EAAQK,SAAQF,EAAOG,QAAUN,EAAQK,SAG/BE,EADH,EAAQ,GAAwEL,SACzE,WAAYF,GAAS,EAAM,K,gCCT5C,O,oBCEAM,EADkC,EAAQ,EAChCE,EAA4B,IAE9BC,KAAK,CAACN,EAAOC,EAAI,ucAAwc,KAEjeD,EAAOG,QAAUA,G,uCCNjB,ICA+M,ECYhM,CACfI,MAAA,CACAC,UAAA,CACAC,KAAAC,OACAX,QAAA,WAGAY,QAAA,CACAF,KAAAG,OACAb,QAAA,CACAc,KAAA,GACAC,YAAA,KACAC,MAAA,EACAC,QAAA,CACAC,IAAA,EACAC,IAAA,EACAC,MAAA,EACAC,KAAA,EACAC,KAAA,GAEAC,aAAA,KAKAC,KAAA,kBAEAC,WAAA,CACAC,iBAAA,6BACAC,iBAAA,6BACAC,UAAA,8BAGAC,QAAA,CACAC,gBAAAC,kBAAA,GAAAC,MAAA,wBAAAD,a,eCtCIE,EAAY,YACd,GHTW,WAAa,IAAiBC,EAATC,KAAgBC,eAAmBC,EAAnCF,KAA0CG,MAAMD,IAAIH,EAAG,OAAOG,EAAG,MAAM,CAACE,YAAY,uBAAuB,CAACF,EAAG,gBAAgB,CAACG,MAAM,CAAC,QAAvIL,KAAqJvB,QAAQW,gBAAgBc,EAAG,QAAQ,CAACG,MAAM,CAAC,QAAhML,KAA8MvB,QAAQ,UAAtNuB,KAAsO1B,WAAWgC,GAAG,CAAC,qBAArPN,KAAgRL,kBAAkB,KAC9S,IGWpB,EACA,KACA,KACA,MAIa,UAAAG,E","file":"widget-martan.2.min.js","sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ref--2-2!../../../../../node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderExpanded.vue?vue&type=style&index=0&id=53edd778&prod&lang=scss\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"0bf36ea5\", content, true, {});","export * from \"-!../../../../../node_modules/vue-style-loader/index.js!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ref--2-2!../../../../../node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderExpanded.vue?vue&type=style&index=0&id=53edd778&prod&lang=scss\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".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%}}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"mt-header--expanded\"},[_c('average-total',{attrs:{\"average\":_vm.reviews.averageTotal}}),_c('score',{attrs:{\"reviews\":_vm.reviews,\"starColor\":_vm.starColor},on:{\"updateOrderByAverage\":_vm.updateOrderBy}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderExpanded.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderExpanded.vue?vue&type=script&lang=js\"","<template>\n <div class=\"mt-header--expanded\">\n <average-total :average=\"reviews.averageTotal\" />\n <score \n :reviews=\"reviews\" \n :starColor=\"starColor\" \n @updateOrderByAverage=\"updateOrderBy\" \n />\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n starColor: {\n type: String,\n default: '#212529'\n },\n\n reviews: {\n type: Object,\n default: {\n list: [],\n orderRating: null,\n total: 0,\n average: {\n one: 0,\n two: 0,\n three: 0,\n four: 0,\n five: 0,\n },\n averageTotal: 0,\n }\n },\n },\n\n name: 'header-expanded',\n\n components: {\n AverageTotal: () => import(\"./AverageTotal.vue\"),\n AverageScore: () => import(\"./AverageScore.vue\"),\n Score: () => import(\"./Score.vue\"),\n },\n\n methods: {\n updateOrderBy: ({ rating }) => this.$emit('updateOrderByAverage', { rating })\n }\n};\n</script>\n\n<style lang=\"scss\">\n.mt-header--expanded {\n display: flex;\n align-items: center;\n border-bottom: 1px solid #e3e3e3;\n padding-bottom: 25px;\n\n .mt-rating__average {\n display: flex;\n align-items: center;\n }\n\n .mt-rating__average__wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n padding-top: 5px;\n }\n\n .mt-rating__average_total {\n font-size: 48px;\n margin: 0 18px 0 0;\n padding: 0;\n }\n}\n\n@media (max-width: 580px) {\n .mt-rating__options {\n max-width: 97%;\n }\n}\n</style>\n","import { render, staticRenderFns } from \"./HeaderExpanded.vue?vue&type=template&id=53edd778\"\nimport script from \"./HeaderExpanded.vue?vue&type=script&lang=js\"\nexport * from \"./HeaderExpanded.vue?vue&type=script&lang=js\"\nimport style0 from \"./HeaderExpanded.vue?vue&type=style&index=0&id=53edd778&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|
|
@@ -0,0 +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}}]);
|
|
2
|
+
//# sourceMappingURL=widget-martan.3.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?91ac","webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?dda8","webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?22c6","webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?a32f","webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?ae0f","webpack://widgetMartan/src/widgets/reviews/HeaderMinimal.vue","webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue"],"names":["content","__esModule","default","module","i","locals","exports","add","___CSS_LOADER_API_IMPORT___","push","props","starColor","type","String","reviews","Object","list","orderRating","total","average","one","two","three","four","five","averageTotal","name","components","Rating","Sort","computed","i19basedOn$1Reviews","i19basedOn$1Review","i19noReview","methods","updateOrderBy","rating","$emit","onSort","value","component","_vm","this","_h","$createElement","_c","_self","staticClass","staticStyle","attrs","_v","_s","replace","on"],"mappings":"oGAGA,IAAIA,EAAU,EAAQ,IACnBA,EAAQC,aAAYD,EAAUA,EAAQE,SACnB,iBAAZF,IAAsBA,EAAU,CAAC,CAACG,EAAOC,EAAIJ,EAAS,MAC7DA,EAAQK,SAAQF,EAAOG,QAAUN,EAAQK,SAG/BE,EADH,EAAQ,GAAwEL,SACzE,WAAYF,GAAS,EAAM,K,gCCT5C,O,oBCEAM,EADkC,EAAQ,EAChCE,EAA4B,IAE9BC,KAAK,CAACN,EAAOC,EAAI,gWAAiW,KAE1XD,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GAAG,IAAIT,EAAIU,GAAGV,EAAI3B,QAAQW,cAAc,KAAKoB,EAAG,OAAO,CAACE,YAAY,UAAUC,YAAY,CAAC,YAAY,OAAO,QAAU,QAAQ,CAACP,EAAIS,GAAG,IAAIT,EAAIU,GAAGV,EAAIR,aAAa,UAAU,GAAGY,EAAG,OAAO,CAACQ,GAAG,CAAC,OAASZ,EAAIH,WAAW,OACn6B,IGWpB,EACA,KACA,KACA,MAIa,UAAAE,E","file":"widget-martan.3.min.js","sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ref--2-2!../../../../../node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderMinimal.vue?vue&type=style&index=0&id=184fe94f&prod&lang=scss\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"1e9d45a2\", content, true, {});","export * from \"-!../../../../../node_modules/vue-style-loader/index.js!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ref--2-2!../../../../../node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderMinimal.vue?vue&type=style&index=0&id=184fe94f&prod&lang=scss\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".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}}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"mt-header--minimal\"},[_c('div',{staticClass:\"rating\"},[_c('div',{staticStyle:{\"display\":\"flex\",\"align-items\":\"center\",\"gap\":\"10px\"}},[_c('rating',{attrs:{\"color\":_vm.starColor,\"rating\":_vm.reviews.averageTotal}}),(_vm.reviews.averageTotal > 0)?_c('span',{staticClass:\"average\"},[_vm._v(\" \"+_vm._s(_vm.reviews.averageTotal)+\" \"),_c('span',{staticClass:\"baseado\",staticStyle:{\"font-size\":\"10px\",\"opacity\":\"0.8\"}},[_vm._v(\"(\"+_vm._s(_vm.reviews.total > 1 ? _vm.i19basedOn$1Reviews.replace(\"$1\", _vm.reviews.total) : _vm.i19basedOn$1Review.replace(\"$1\", _vm.reviews.total))+\")\")])]):_c('span',{staticClass:\"average\"},[_vm._v(\" \"+_vm._s(_vm.reviews.averageTotal)+\" \"),_c('span',{staticClass:\"baseado\",staticStyle:{\"font-size\":\"10px\",\"opacity\":\"0.8\"}},[_vm._v(\"(\"+_vm._s(_vm.i19noReview)+\")\")])])],1),_c('Sort',{on:{\"onSort\":_vm.onSort}})],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderMinimal.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderMinimal.vue?vue&type=script&lang=js\"","<template>\n <div class=\"mt-header--minimal\">\n <div class=\"rating\">\n <div style=\"display: flex; align-items: center; gap: 10px\">\n <rating :color=\"starColor\" :rating=\"reviews.averageTotal\" />\n\n <span class=\"average\" v-if=\"reviews.averageTotal > 0\">\n {{ reviews.averageTotal }}\n <span class=\"baseado\" style=\"font-size: 10px; opacity: 0.8\"\n >({{\n reviews.total > 1\n ? i19basedOn$1Reviews.replace(\"$1\", reviews.total)\n : i19basedOn$1Review.replace(\"$1\", reviews.total)\n }})</span\n ></span\n >\n <span class=\"average\" v-else>\n {{ reviews.averageTotal }}\n <span class=\"baseado\" style=\"font-size: 10px; opacity: 0.8\"\n >({{ i19noReview }})</span\n ></span\n >\n </div>\n\n <Sort @onSort=\"onSort\" />\n </div>\n </div>\n</template>\n\n<script>\nimport Rating from \"../snippets/Rating.vue\";\nimport Sort from \"./Sort.vue\";\n\nexport default {\n props: {\n starColor: {\n type: String,\n default: \"#212529\",\n },\n\n reviews: {\n type: Object,\n default: {\n list: [],\n orderRating: null,\n total: 0,\n average: {\n one: 0,\n two: 0,\n three: 0,\n four: 0,\n five: 0,\n },\n averageTotal: 0,\n },\n },\n },\n\n name: \"header-minimal\",\n\n components: {\n Rating,\n Sort,\n },\n\n computed: {\n i19basedOn$1Reviews: () => \"Baseado em $1 avaliações\",\n i19basedOn$1Review: () => \"Baseado em $1 avaliação\",\n i19noReview: () => \"Nenhuma avaliação\",\n },\n\n methods: {\n updateOrderBy: ({ rating }) =>\n this.$emit(\"updateOrderByAverage\", { rating }),\n\n onSort(value) {\n this.$emit(\"onSort\", value);\n },\n },\n};\n</script>\n\n<style lang=\"scss\">\n.mt-header--minimal {\n .rating {\n display: flex;\n align-items: center;\n gap: 15px;\n border-bottom: 1px solid #eee;\n justify-content: space-between;\n margin-bottom: 10px;\n padding-bottom: 10px;\n }\n\n .average {\n font-size: 26px;\n color: #6c757d;\n }\n\n .mt-rating__average__sort {\n width: 100%;\n }\n\n .baseado {\n @media (max-width: 580px) {\n display: none;\n }\n }\n}\n</style>\n","import { render, staticRenderFns } from \"./HeaderMinimal.vue?vue&type=template&id=184fe94f\"\nimport script from \"./HeaderMinimal.vue?vue&type=script&lang=js\"\nexport * from \"./HeaderMinimal.vue?vue&type=script&lang=js\"\nimport style0 from \"./HeaderMinimal.vue?vue&type=style&index=0&id=184fe94f&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|
|
@@ -0,0 +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}}]);
|
|
2
|
+
//# sourceMappingURL=widget-martan.4.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/Score.vue?9823","webpack://widgetMartan/./src/widgets/reviews/Score.vue?0dac","webpack://widgetMartan/./src/widgets/reviews/Score.vue?52ee","webpack://widgetMartan/./src/utils/textToNumber.js","webpack://widgetMartan/src/widgets/reviews/Score.vue","webpack://widgetMartan/./src/widgets/reviews/Score.vue?c887","webpack://widgetMartan/./src/utils/get-width.js","webpack://widgetMartan/./src/widgets/reviews/Score.vue","webpack://widgetMartan/./src/widgets/reviews/Score.vue?36a1"],"names":["content","__esModule","default","module","i","locals","exports","add","___CSS_LOADER_API_IMPORT___","push","numberToText","text","name","props","reviews","type","Object","list","orderRating","total","average","one","two","three","four","five","averageTotal","offset","starColor","String","data","maxReviews","methods","getWidth","rating","toFixed","setRating","e","removeClass","Promise","resolve","Array","from","$refs","options","children","map","option","style","removeProperty","childNodes","stroke","color","classList","remove","catch","console","error","el","opacity","forEach","index","$parent","$emit","component","_vm","this","_h","$createElement","_c","_self","ref","staticClass","_l","key","on","$event","_v","_s","staticStyle","attrs","width"],"mappings":"oGAGA,IAAIA,EAAU,EAAQ,IACnBA,EAAQC,aAAYD,EAAUA,EAAQE,SACnB,iBAAZF,IAAsBA,EAAU,CAAC,CAACG,EAAOC,EAAIJ,EAAS,MAC7DA,EAAQK,SAAQF,EAAOG,QAAUN,EAAQK,SAG/BE,EADH,EAAQ,GAAwEL,SACzE,WAAYF,GAAS,EAAM,K,gCCT5C,O,oBCEAM,EADkC,EAAQ,EAChCE,EAA4B,IAE9BC,KAAK,CAACN,EAAOC,EAAI,g4BAAi4B,KAE15BD,EAAOG,QAAUA,G,uCCNjB,MAeMI,EAAgBC,IACpB,OAAQA,GACN,KAAK,EACH,MAAO,MACT,KAAK,EACH,MAAO,MACT,KAAK,EACH,MAAO,QACT,KAAK,EACH,MAAO,OACT,KAAK,EACH,MAAO,SCkBE,IC5CuL,ED4CvL,CACfC,KAAA,QAEAC,MAAA,CACAC,QAAA,CACAC,KAAAC,OACAd,QAAA,CACAe,KAAA,GACAC,YAAA,KACAC,MAAA,EACAC,QAAA,CACAC,IAAA,EACAC,IAAA,EACAC,MAAA,EACAC,KAAA,EACAC,KAAA,GAEAC,aAAA,EACAC,OAAA,IAIAC,UAAA,CACAb,KAAAc,OACA3B,QAAA,YAIA4B,UACA,CACAC,WAAA,IAIAC,QAAA,CACAC,SE5EO,SAAkBnB,EAASoB,GAChC,OAAsB,IAAlBpB,EAAQK,MAAoB,MAG7B,IAAML,EAAQM,QAAQV,EAAawB,IACpCpB,EAAQK,OACRgB,UAHM,KF0EVzB,eACA0B,UAAA,eAAAC,EAAAH,GAeA,QAdAI,KACA,IAAAC,QAAAC,IAQAA,EAPAC,MAAAC,KAAA,KAAAC,MAAAC,QAAAC,UAAAC,IAAAC,IACAA,EAAAC,MAAAC,eAAA,WACAF,EAAAF,SAAA,GAAAK,WAAA,GAAAF,MAAAG,OAAA,qBACAJ,EAAAF,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AAS,OAAO,EAAI,gBAAgB,KAAO,UAAUX,EAAG,OAAO,CAACW,MAAM,CAAC,EAAI,iRAAiR,eAAe,IAAI,KAAO,sBAAsBX,EAAG,MAAM,CAACG,YAAY,mBAAmB,CAACH,EAAG,MAAM,CAACG,YAAY,gBAAgBxB,MAAM,CACpoCiC,MAAOhB,EAAIhC,SAASgC,EAAInD,QAAS+C,GACjC,mBAAoBI,EAAIrC,WAAa,WAChCyC,EAAG,MAAM,CAACG,YAAY,mBAAmB,CAACH,EAAG,OAAO,CAACJ,EAAIY,GAAGZ,EAAIa,GAAGb,EAAInD,QAAQM,QAAQ6C,EAAIvD,aAAamD,QAAYQ,EAAG,OAAO,CAACJ,EAAIY,GAAG,IAAIZ,EAAIa,GAAGb,EAAIhC,SAASgC,EAAInD,QAAS+C,IAAQ,OAAOQ,EAAG,OAAO,CAACG,YAAY,oBAAoB,CAACH,EAAG,MAAM,CAACG,YAAY,iCAAiCQ,MAAM,CAAC,MAAQ,6BAA6B,MAAQ,KAAK,OAAS,KAAK,QAAU,YAAY,eAAe,IAAI,OAAS,eAAe,KAAO,OAAO,iBAAiB,QAAQ,kBAAkB,UAAU,CAACX,EAAG,OAAO,CAACW,MAAM,CAAC,OAAS,OAAO,EAAI,gBAAgB,KAAO,UAAUX,EAAG,OAAO,CAACW,MAAM,CAAC,EAAI,kBAAkBX,EAAG,OAAO,CAACW,MAAM,CAAC,EAAI,2BAA0B,KAC/nB,IDQpB,EACA,KACA,KACA,MAIa,UAAAhB,E","file":"widget-martan.4.min.js","sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ref--2-2!../../../../../node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Score.vue?vue&type=style&index=0&id=ced6d2fe&prod&lang=css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"774c1cb8\", content, true, {});","export * from \"-!../../../../../node_modules/vue-style-loader/index.js!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??ref--2-2!../../../../../node_modules/sass-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Score.vue?vue&type=style&index=0&id=ced6d2fe&prod&lang=css\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".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}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","const textToNumber = (number) => {\n switch (number) {\n case 'one':\n return 1\n case 'two':\n return 2\n case 'three':\n return 3\n case 'four':\n return 4\n case 'five':\n return 5\n }\n}\n\nconst numberToText = (text) => {\n switch (text) {\n case 1:\n return 'one'\n case 2:\n return 'two'\n case 3:\n return 'three'\n case 4:\n return 'four'\n case 5:\n return 'five'\n }\n}\n\nexport { textToNumber, numberToText }\n","<template>\n <ul class=\"mt-average__options\" ref=\"options\">\n <li class=\"mt-rating__list\" v-for=\"index in maxReviews\" :key=\"index\"\n @click=\"(reviews.total === 0 ? null : setRating($event, index))\">\n <div class=\"mt-rating-star\">\n <span>{{ index }}</span>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"#E6E3E3\" style=\"color:#E6E3E3;\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n 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\"\n stroke-width=\"0\" fill=\"currentColor\" />\n </svg>\n </div>\n\n\n <div class=\"mt-rating-meter\">\n <div class=\"mt-rating-bar\" v-bind:style=\"{\n width: getWidth(reviews, index),\n 'background-color': starColor || 'red',\n }\" />\n </div>\n\n <div class=\"mt-rating-total\">\n <span>{{ reviews.average[numberToText(index)] }}</span>\n <span>({{ getWidth(reviews, index) }})</span>\n\n <span class=\"mt-rating-remove\"><svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon icon-tabler icon-tabler-x\"\n width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M18 6l-12 12\"></path>\n <path d=\"M6 6l12 12\"></path>\n </svg></span>\n </div>\n </li>\n </ul>\n</template>\n\n<script>\nimport { getWidth } from './../../utils/get-width'\nimport { numberToText } from './../../utils/textToNumber'\n\nexport default {\n name: 'Score',\n\n props: {\n reviews: {\n type: Object,\n default: {\n list: [],\n orderRating: null,\n total: 0,\n average: {\n one: 0,\n two: 0,\n three: 0,\n four: 0,\n five: 0\n },\n averageTotal: 0,\n offset: 0,\n }\n },\n\n starColor: {\n type: String,\n default: '#212529'\n },\n },\n\n data () {\n return {\n maxReviews: 5,\n };\n },\n\n methods: {\n getWidth,\n numberToText,\n setRating: async function (e, rating) {\n const removeClass = () =>\n new Promise((resolve) => {\n const res = Array.from(this.$refs.options.children).map((option) => {\n option.style.removeProperty(\"opacity\");\n option.children[0].childNodes[2].style.stroke = \"rgb(227, 230, 230)\";\n option.children[0].childNodes[2].style.color = 'rgb(227, 230, 230)';\n\n return option.classList.remove(\"is-active\");\n });\n resolve(res);\n });\n\n await removeClass().catch(e => console.error(e))\n\n if (rating !== this.reviews.orderRating) {\n const el = Array.from(this.$refs.options.children)[rating - 1];\n el.classList.add(\"is-active\");\n el.style.opacity = 1;\n el.children[0].childNodes[2].style.stroke = this.starColor;\n el.children[0].childNodes[2].style.color = this.starColor;\n Array.from(this.$refs.options.children).forEach((option, index) => {\n if (index !== rating - 1) {\n option.style.opacity = \".5\";\n }\n });\n }\n\n this.$parent.$emit('updateOrderByAverage', { rating })\n },\n },\n};\n</script>\n\n\n<style>\n.mt-rating-remove {\n visibility: hidden;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.mt-rating__list.is-active .mt-rating-remove {\n visibility: visible;\n}\n\n.mt-average__options li:hover {\n cursor: pointer;\n}\n\n.mt-rating__list {\n display: flex;\n align-items: center;\n height: 23px;\n transition: opacity .25s ease-in-out;\n}\n\n.mt-rating__list.is-active .mt-rating-total,\n.mt-rating__list:hover .mt-rating-total {\n visibility: visible;\n}\n\n.mt-rating__list:hover {\n opacity: 0.9;\n}\n\n.mt-rating-meter {\n overflow: hidden;\n box-shadow: inset 0 0 0 1px #e3e6e6;\n background-color: #e3e6e6;\n height: 10px;\n width: 100%;\n border-radius: 50px;\n display: flex;\n}\n\n.mt-average__options {\n margin: 0;\n list-style: none;\n padding: 0;\n max-width: 800px;\n width: 100%;\n}\n\n.mt-rating-star {\n display: flex;\n width: 30px;\n justify-content: space-around;\n font-size: 12px;\n color: #757373;\n align-items: center;\n margin-left: 5px;\n}\n\n.mt-rating-total {\n visibility: hidden;\n width: 50px;\n font-size: 12px;\n color: #757373;\n margin-left: 2px;\n display: flex;\n gap: 3px;\n}\n</style>\n","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Score.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Score.vue?vue&type=script&lang=js\"","import { numberToText } from './textToNumber'\n\n// calcula a % usando a média de avaliacoes / total de avaliacoes do produto\nexport function getWidth(reviews, rating) {\n if (reviews.total === 0) return '0%'\n\n return `${(\n (100 * reviews.average[numberToText(rating)]) /\n reviews.total\n ).toFixed()}%`\n}\n","import { render, staticRenderFns } from \"./Score.vue?vue&type=template&id=ced6d2fe\"\nimport script from \"./Score.vue?vue&type=script&lang=js\"\nexport * from \"./Score.vue?vue&type=script&lang=js\"\nimport style0 from \"./Score.vue?vue&type=style&index=0&id=ced6d2fe&prod&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',{ref:\"options\",staticClass:\"mt-average__options\"},_vm._l((_vm.maxReviews),function(index){return _c('li',{key:index,staticClass:\"mt-rating__list\",on:{\"click\":function($event){(_vm.reviews.total === 0 ? null : _vm.setRating($event, index))}}},[_c('div',{staticClass:\"mt-rating-star\"},[_c('span',[_vm._v(_vm._s(index))]),_c('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\"}},[_c('path',{attrs:{\"stroke\":\"none\",\"d\":\"M0 0h24v24H0z\",\"fill\":\"none\"}}),_c('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\"}})])]),_c('div',{staticClass:\"mt-rating-meter\"},[_c('div',{staticClass:\"mt-rating-bar\",style:({\n width: _vm.getWidth(_vm.reviews, index),\n 'background-color': _vm.starColor || 'red',\n })})]),_c('div',{staticClass:\"mt-rating-total\"},[_c('span',[_vm._v(_vm._s(_vm.reviews.average[_vm.numberToText(index)]))]),_c('span',[_vm._v(\"(\"+_vm._s(_vm.getWidth(_vm.reviews, index))+\")\")]),_c('span',{staticClass:\"mt-rating-remove\"},[_c('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\"}},[_c('path',{attrs:{\"stroke\":\"none\",\"d\":\"M0 0h24v24H0z\",\"fill\":\"none\"}}),_c('path',{attrs:{\"d\":\"M18 6l-12 12\"}}),_c('path',{attrs:{\"d\":\"M6 6l12 12\"}})])])])])}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"sourceRoot":""}
|
|
@@ -0,0 +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}}]);
|
|
2
|
+
//# sourceMappingURL=widget-martan.5.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/AverageTotal.vue?6c96","webpack://widgetMartan/./src/widgets/reviews/AverageTotal.vue?905d","webpack://widgetMartan/src/widgets/reviews/AverageTotal.vue","webpack://widgetMartan/./src/widgets/reviews/AverageTotal.vue"],"names":["name","props","average","type","Number","default","component","_h","this","$createElement","_c","_self","staticClass","attrs","staticStyle","_v","_s"],"mappings":"wHAAA,ICA6M,ECC9L,CACfA,KAAA,eAEAC,MAAA,CACAC,QAAA,CACAC,KAAAC,OACAC,QAAA,K,OCAIC,EAAY,YACd,GHRW,WAAa,IAAiBC,EAATC,KAAgBC,eAAmBC,EAAnCF,KAA0CG,MAAMD,IAAIH,EAAG,OAAOG,EAAG,MAAM,CAACE,YAAY,oBAAoBC,MAAM,CAAC,MAAQ,cAAvHL,KAA2IN,UAAU,CAACQ,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACF,EAAG,MAAM,CAACE,YAAY,+BAA+B,CAACF,EAAG,MAAM,CAACE,YAAY,2CAA2CC,MAAM,CAAC,MAAQ,6BAA6B,MAAQ,KAAK,OAAS,KAAK,QAAU,YAAY,eAAe,IAAI,OAAS,eAAe,KAAO,OAAO,iBAAiB,QAAQ,kBAAkB,UAAU,CAACH,EAAG,OAAO,CAACG,MAAM,CAAC,OAAS,OAAO,EAAI,gBAAgB,KAAO,UAAUH,EAAG,OAAO,CAACG,MAAM,CAAC,EAAI,iRAAiR,eAAe,IAAI,KAAO,sBAAsBH,EAAG,MAAM,CAACI,YAAY,CAAC,cAAc,SAAS,CAACJ,EAAG,IAAI,CAACE,YAAY,6BAA6B,CAApgCJ,KAAygCO,GAAG,IAA5gCP,KAAohCQ,GAAphCR,KAA2hCN,SAAS,eAChjC,IGUpB,EACA,KACA,KACA,MAIa,UAAAI,E","file":"widget-martan.5.min.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"mt-rating__resume\",attrs:{\"title\":'Nota média ' + _vm.average}},[_c('div',{staticClass:\"mt-rating__average\"},[_c('div',{staticClass:\"mt-rating__average__wrapper\"},[_c('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\"}},[_c('path',{attrs:{\"stroke\":\"none\",\"d\":\"M0 0h24v24H0z\",\"fill\":\"none\"}}),_c('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\"}})])]),_c('div',{staticStyle:{\"margin-left\":\"10px\"}},[_c('p',{staticClass:\"mt-rating__average--total\"},[_vm._v(\" \"+_vm._s(_vm.average)+\" \")])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AverageTotal.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AverageTotal.vue?vue&type=script&lang=js\"","<script>\nexport default {\n name: 'AverageTotal',\n\n props: {\n average: {\n type: Number,\n default: 0\n }\n },\n};\n</script>\n\n<template>\n <div class=\"mt-rating__resume\" :title=\"'Nota média ' + average\">\n <div class=\"mt-rating__average\">\n <div class=\"mt-rating__average__wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon icon-tabler icon-tabler-star-filled\" width=\"24\" height=\"24\"\n viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n 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\"\n stroke-width=\"0\" fill=\"currentColor\" />\n </svg>\n </div>\n\n <div style=\"margin-left: 10px\">\n <p class=\"mt-rating__average--total\">\n {{ average }}\n </p>\n </div>\n </div>\n </div>\n</template>\n","import { render, staticRenderFns } from \"./AverageTotal.vue?vue&type=template&id=5aa088fe\"\nimport script from \"./AverageTotal.vue?vue&type=script&lang=js\"\nexport * from \"./AverageTotal.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|