@ecomplus/widget-martan 1.1.21 → 1.1.24
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/.version +0 -0
- package/CHANGELOG.md +12 -0
- package/dist/public/widget-martan.1.min.js.map +1 -1
- package/dist/public/widget-martan.2.min.js.map +1 -1
- package/dist/public/widget-martan.3.min.js.map +1 -1
- package/dist/public/widget-martan.4.min.js.map +1 -1
- package/dist/public/widget-martan.5.min.js.map +1 -1
- package/dist/public/widget-martan.var.min.js.map +1 -1
- package/dist/widget-martan.1.min.js.map +1 -1
- package/dist/widget-martan.2.min.js.map +1 -1
- package/dist/widget-martan.3.min.js.map +1 -1
- package/dist/widget-martan.4.min.js.map +1 -1
- package/dist/widget-martan.5.min.js.map +1 -1
- package/dist/widget-martan.min.js.map +1 -1
- package/package.json +2 -2
package/.version
ADDED
|
File without changes
|
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.24](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-martan@1.1.23...@ecomplus/widget-martan@1.1.24) (2025-09-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ecomplus/widget-martan
|
|
9
|
+
|
|
10
|
+
## [1.1.23](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-martan@1.1.22...@ecomplus/widget-martan@1.1.23) (2025-09-01)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @ecomplus/widget-martan
|
|
13
|
+
|
|
14
|
+
## [1.1.22](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-martan@1.1.21...@ecomplus/widget-martan@1.1.22) (2025-07-10)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @ecomplus/widget-martan
|
|
17
|
+
|
|
6
18
|
## [1.1.21](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-martan@1.1.20...@ecomplus/widget-martan@1.1.21) (2025-05-02)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @ecomplus/widget-martan
|
|
@@ -1 +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,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,01BAA21B,KAEp3BD,EAAOG,QAAUA,G,uCCNjB,ICA6M,ECyC9L,CACfI,KAAA,eAEAC,MAAA,GAGAC,UACA,CACAC,WAAA,IAIAC,QAAA,CACA,gBAAAC,EAAAC,SAEA,IAAAC,QAAAC,IAOAA,EANAC,MAAAC,KAAAC,QAAAC,MAAAC,UA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,OAAO,EAAI,gBAAgB,KAAO,UAAUX,EAAG,OAAO,CAACW,MAAM,CAAC,EAAI,mHAAmHX,EAAG,MAAM,CAACG,YAAY,mBAAmB,CAACH,EAAG,MAAM,CAACG,YAAY,gBAAgBxB,MAAM,CACv8BiC,MAAOhB,EAAIV,QAAQ2B,SAASpB,GAC5B,mBAAoBG,EAAIN,OAAOC,YAAc,WACxCS,EAAG,MAAM,CAACG,YAAY,mBAAmB,CAACH,EAAG,OAAO,CAACJ,EAAIa,GAAGb,EAAIc,GAAGd,EAAIV,QAAQ4B,QAAQlB,EAAImB,aAAatB,QAAYO,EAAG,OAAO,CAACJ,EAAIa,GAAG,IAAIb,EAAIc,GAAGd,EAAIV,QAAQ2B,SAASpB,IAAQ,OAAOO,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,KAC1nB,IGQpB,EACA,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":""}
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?1bf6","webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?234b","webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?221b","webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?b6d9","webpack://widgetMartan/./src/widgets/reviews/AverageScore.vue?e50e","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,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,01BAA21B,KAEp3BD,EAAOG,QAAUA,G,u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AAM,CAAC,MAAQ,6BAA6B,MAAQ,KAAK,OAAS,KAAK,QAAU,YAAY,eAAe,IAAI,OAAS,UAAU,KAAO,OAAO,iBAAiB,QAAQ,kBAAkB,UAAU,CAACX,EAAG,OAAO,CAACW,MAAM,CAAC,OAAS,OAAO,EAAI,gBAAgB,KAAO,UAAUX,EAAG,OAAO,CAACW,MAAM,CAAC,EAAI,mHAAmHX,EAAG,MAAM,CAACG,YAAY,mBAAmB,CAACH,EAAG,MAAM,CAACG,YAAY,gBAAgBxB,MAAM,CACv8BiC,MAAOhB,EAAIV,QAAQ2B,SAASpB,GAC5B,mBAAoBG,EAAIN,OAAOC,YAAc,WACxCS,EAAG,MAAM,CAACG,YAAY,mBAAmB,CAACH,EAAG,OAAO,CAACJ,EAAIa,GAAGb,EAAIc,GAAGd,EAAIV,QAAQ4B,QAAQlB,EAAImB,aAAatB,QAAYO,EAAG,OAAO,CAACJ,EAAIa,GAAG,IAAIb,EAAIc,GAAGd,EAAIV,QAAQ2B,SAASpB,IAAQ,OAAOO,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,KAC1nB,IGQpB,EACA,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":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?46db","webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?87d2","webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?258d","webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?8f65","webpack://widgetMartan/./src/widgets/reviews/HeaderExpanded.vue?3ef1","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":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?f619","webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?eafd","webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?6064","webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?6108","webpack://widgetMartan/./src/widgets/reviews/HeaderMinimal.vue?e1c6","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,EAAOG,QAAUA,G,uCCNjB,I,eCA8M,ECiC/L,CACfI,MAAA,CACAC,UAAA,CACAC,KAAAC,OACAX,QAAA,WAGAY,QAAA,CACAF,KAAAG,OACAb,QAAA,CACAc,KAAA,GACAC,YAAA,KACAC,MAA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V,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":""}
|
|
@@ -1 +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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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":""}
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/Score.vue?1837","webpack://widgetMartan/./src/widgets/reviews/Score.vue?bda0","webpack://widgetMartan/./src/widgets/reviews/Score.vue?ddb7","webpack://widgetMartan/./src/utils/textToNumber.js","webpack://widgetMartan/src/widgets/reviews/Score.vue","webpack://widgetMartan/./src/widgets/reviews/Score.vue?8ad5","webpack://widgetMartan/./src/utils/get-width.js","webpack://widgetMartan/./src/widgets/reviews/Score.vue","webpack://widgetMartan/./src/widgets/reviews/Score.vue?4cc2"],"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,EAAQ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,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":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/AverageTotal.vue?
|
|
1
|
+
{"version":3,"sources":["webpack://widgetMartan/./src/widgets/reviews/AverageTotal.vue?2e5e","webpack://widgetMartan/./src/widgets/reviews/AverageTotal.vue?8a78","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":""}
|