@ecomplus/widget-martan 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
package/CHANGELOG.md
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
|
+
|
6
|
+
# 1.1.0 (2024-03-21)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
- **widget-martan:** bump and general fixes ([bd9fa7a](https://github.com/ecomplus/storefront/commit/bd9fa7a79d9963c317f730403db925963f79e63a))
|
11
|
+
- **widget-martan:** responsive view improvements with glide breakpoints ([#1019](https://github.com/ecomplus/storefront/issues/1019)) ([6255029](https://github.com/ecomplus/storefront/commit/6255029909385bd2acb3f56bec104ad1e9644c18))
|
12
|
+
- **widget-martan:** updating to v1.1.23 ([#996](https://github.com/ecomplus/storefront/issues/996)) ([78b1e6d](https://github.com/ecomplus/storefront/commit/78b1e6d9ee348dad26fb29b02e3aa5548d815671))
|
13
|
+
|
14
|
+
### Features
|
15
|
+
|
16
|
+
- **widget-martan:** add martan product review widget ([#988](https://github.com/ecomplus/storefront/issues/988)) ([0ab393e](https://github.com/ecomplus/storefront/commit/0ab393eb12a6324b8ce4be3c996ff8c956850657))
|
17
|
+
|
18
|
+
# [2.3.0](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.6...@ecomplus/widget-trustvox@2.3.0) (2022-02-06)
|
19
|
+
|
20
|
+
### Features
|
21
|
+
|
22
|
+
- **template/cms:** using @ecomplus/storefront-cms in place of raw netlify cms ([#596](https://github.com/ecomplus/storefront/issues/596)) ([95c8d3a](https://github.com/ecomplus/storefront/commit/95c8d3ab3f73b0b1dff0a1f5f45b5abfb6dddafa)), closes [#issuecomment-1006566949](https://github.com/ecomplus/storefront/issues/issuecomment-1006566949) [#issuecomment-1003380562](https://github.com/ecomplus/storefront/issues/issuecomment-1003380562)
|
23
|
+
|
24
|
+
## [2.2.6](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.5...@ecomplus/widget-trustvox@2.2.6) (2021-07-24)
|
25
|
+
|
26
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
27
|
+
|
28
|
+
## [2.2.5](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.4...@ecomplus/widget-trustvox@2.2.5) (2020-12-17)
|
29
|
+
|
30
|
+
### Bug Fixes
|
31
|
+
|
32
|
+
- **product-card-rating:** set 'productCardRatingHtml' for dynamically rendered cards ([#392](https://github.com/ecomplus/storefront/issues/392)) ([7654947](https://github.com/ecomplus/storefront/commit/7654947231a254ac67ac0f5190ce1698af4f59bb))
|
33
|
+
|
34
|
+
## [2.2.4](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.3...@ecomplus/widget-trustvox@2.2.4) (2020-12-16)
|
35
|
+
|
36
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
37
|
+
|
38
|
+
## [2.2.3](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.2...@ecomplus/widget-trustvox@2.2.3) (2020-12-15)
|
39
|
+
|
40
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
41
|
+
|
42
|
+
## [2.2.2](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.1...@ecomplus/widget-trustvox@2.2.2) (2020-12-15)
|
43
|
+
|
44
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
45
|
+
|
46
|
+
## [2.2.1](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.0...@ecomplus/widget-trustvox@2.2.1) (2020-10-26)
|
47
|
+
|
48
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
49
|
+
|
50
|
+
# [2.2.0](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.1.0...@ecomplus/widget-trustvox@2.2.0) (2020-08-19)
|
51
|
+
|
52
|
+
### Features
|
53
|
+
|
54
|
+
- **cms:** add trustvox script field (support trustvox widget v2) ([#292](https://github.com/ecomplus/storefront/issues/292)) ([083273f](https://github.com/ecomplus/storefront/commit/083273f9b7bfaaa16d484e2918bacddebb2163a9))
|
55
|
+
|
56
|
+
# [2.1.0](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.5...@ecomplus/widget-trustvox@2.1.0) (2020-07-29)
|
57
|
+
|
58
|
+
### Features
|
59
|
+
|
60
|
+
- **trustvox-product-id:** handling custom id from metafield (if set) ([479d39b](https://github.com/ecomplus/storefront/commit/479d39b5c726bca872f29b39cd247e6493c546ab))
|
61
|
+
|
62
|
+
## [2.0.5](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.4...@ecomplus/widget-trustvox@2.0.5) (2020-07-17)
|
63
|
+
|
64
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
65
|
+
|
66
|
+
## [2.0.4](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.3...@ecomplus/widget-trustvox@2.0.4) (2020-05-05)
|
67
|
+
|
68
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
69
|
+
|
70
|
+
## [2.0.3](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.2...@ecomplus/widget-trustvox@2.0.3) (2020-05-03)
|
71
|
+
|
72
|
+
### Bug Fixes
|
73
|
+
|
74
|
+
- **cms:** replace 'productBlockAppend' with 'productDescriptionAppend' ([a585b43](https://github.com/ecomplus/storefront/commit/a585b433106681a7d3b3c61f83fffdc2628f6d13))
|
75
|
+
- **product-page:** load rating trustvox widget after component rendered ([3f0b5da](https://github.com/ecomplus/storefront/commit/3f0b5daae465312feca35fffc8761e7c28f1d9f6))
|
76
|
+
|
77
|
+
## [2.0.2](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.1...@ecomplus/widget-trustvox@2.0.2) (2020-05-01)
|
78
|
+
|
79
|
+
### Bug Fixes
|
80
|
+
|
81
|
+
- **product-page:** minor fixes for product block rating ([5027c67](https://github.com/ecomplus/storefront/commit/5027c672b694841d9e6f655162309a0e6c35a0b4))
|
82
|
+
- **trustvox-script:** use legacy script by default (new one is buggy) ([86ab507](https://github.com/ecomplus/storefront/commit/86ab507c58b445b69f815425c8d7c6884cce554d))
|
83
|
+
|
84
|
+
## [2.0.1](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.0...@ecomplus/widget-trustvox@2.0.1) (2020-05-01)
|
85
|
+
|
86
|
+
### Bug Fixes
|
87
|
+
|
88
|
+
- **product-page-rating:** fix sku js variable name ([1bd1f2f](https://github.com/ecomplus/storefront/commit/1bd1f2f7557afd650079bdb9c16e61084d34ff29))
|
89
|
+
|
90
|
+
# [2.0.0](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.7...@ecomplus/widget-trustvox@2.0.0) (2020-04-16)
|
91
|
+
|
92
|
+
### Code Refactoring
|
93
|
+
|
94
|
+
- **widget:** trustvox widget started with EJS appends (v2) ([aa2aad2](https://github.com/ecomplus/storefront/commit/aa2aad23850538723f83ff06335cf02437c9bfa9))
|
95
|
+
|
96
|
+
### Features
|
97
|
+
|
98
|
+
- **cms:** setup widget-trustvox config ([d645ff7](https://github.com/ecomplus/storefront/commit/d645ff741dfdb661256f1704dcf0e3114cd9e44a))
|
99
|
+
|
100
|
+
### BREAKING CHANGES
|
101
|
+
|
102
|
+
- **widget:** no more js handlers, compatible with storefront v2 only
|
103
|
+
|
104
|
+
[skip ci]
|
105
|
+
|
106
|
+
## [1.0.7](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.6...@ecomplus/widget-trustvox@1.0.7) (2020-04-03)
|
107
|
+
|
108
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
109
|
+
|
110
|
+
## [1.0.6](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.5...@ecomplus/widget-trustvox@1.0.6) (2020-03-28)
|
111
|
+
|
112
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
113
|
+
|
114
|
+
## [1.0.5](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.4...@ecomplus/widget-trustvox@1.0.5) (2020-02-27)
|
115
|
+
|
116
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
117
|
+
|
118
|
+
## [1.0.4](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.3...@ecomplus/widget-trustvox@1.0.4) (2020-02-13)
|
119
|
+
|
120
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
121
|
+
|
122
|
+
## [1.0.3](https://github.com/ecomclub/storefront/compare/@ecomplus/widget-trustvox@1.0.2...@ecomplus/widget-trustvox@1.0.3) (2020-02-06)
|
123
|
+
|
124
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
125
|
+
|
126
|
+
## [1.0.2](https://github.com/ecomclub/storefront/compare/@ecomplus/widget-trustvox@1.0.1...@ecomplus/widget-trustvox@1.0.2) (2020-02-05)
|
127
|
+
|
128
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
129
|
+
|
130
|
+
## 1.0.1 (2020-02-04)
|
131
|
+
|
132
|
+
**Note:** Version bump only for package @ecomplus/widget-trustvox
|
package/README.md
ADDED
package/cms.config.js
ADDED
@@ -0,0 +1,264 @@
|
|
1
|
+
import { name } from './package.json'
|
2
|
+
|
3
|
+
const label = 'Martan'
|
4
|
+
const thumbnail = 'https://ik.imagekit.io/2wovc1fdm/storefront-widget.png'
|
5
|
+
|
6
|
+
const martan = {
|
7
|
+
label: 'Configuração dos Widgets',
|
8
|
+
name: 'options',
|
9
|
+
widget: 'object',
|
10
|
+
hint: 'Para ajuda com a configuração use nossa documentação.(https://docs.martan.app/integracoes/ecomplus)',
|
11
|
+
fields: [
|
12
|
+
{
|
13
|
+
label: 'ID da loja',
|
14
|
+
hint: 'Obtenha aqui https://app.martan.app/settings',
|
15
|
+
name: 'store_id',
|
16
|
+
widget: 'number',
|
17
|
+
required: true
|
18
|
+
},
|
19
|
+
{
|
20
|
+
label: 'Widget Key',
|
21
|
+
name: 'widget_key',
|
22
|
+
widget: 'string',
|
23
|
+
required: true,
|
24
|
+
hint: 'Obtenha aqui https://app.martan.app/settings'
|
25
|
+
},
|
26
|
+
{
|
27
|
+
label: 'Web ID',
|
28
|
+
name: 'web_id',
|
29
|
+
widget: 'string',
|
30
|
+
required: true,
|
31
|
+
hint: 'Obtenha aqui https://app.martan.app/settings'
|
32
|
+
}
|
33
|
+
]
|
34
|
+
}
|
35
|
+
|
36
|
+
const widgetRating = {
|
37
|
+
label: 'Média de avaliações',
|
38
|
+
name: 'widget_rating',
|
39
|
+
widget: 'object',
|
40
|
+
hint: 'Este widget é exibido no card dos produtos exibindo a média das avaliações através de estrelas.',
|
41
|
+
fields: [
|
42
|
+
{
|
43
|
+
label: 'Habilitar Widget',
|
44
|
+
hint: 'Exibir estrela com classificação média das notas nos produtos.',
|
45
|
+
name: 'is_enabled',
|
46
|
+
widget: 'boolean',
|
47
|
+
default: true
|
48
|
+
},
|
49
|
+
{
|
50
|
+
label: 'Exibir na página de pesquisa?',
|
51
|
+
hint: 'Exibir estrela com classificação média das notas nos cards de resultado de pesquisa',
|
52
|
+
name: 'search_page',
|
53
|
+
widget: 'boolean',
|
54
|
+
default: false
|
55
|
+
},
|
56
|
+
{
|
57
|
+
label: 'Tamanho da font (px) da estrela',
|
58
|
+
name: 'font_size',
|
59
|
+
hint: 'Tamanho do icone da estrela nos cards de produtos',
|
60
|
+
widget: 'number',
|
61
|
+
default: 12,
|
62
|
+
required: false
|
63
|
+
},
|
64
|
+
{
|
65
|
+
label: 'Cor do icone de estrela',
|
66
|
+
hint: 'Cor do incone de estrela que será exibido no widget de reviews',
|
67
|
+
name: 'star_color',
|
68
|
+
widget: 'color',
|
69
|
+
required: false
|
70
|
+
},
|
71
|
+
{
|
72
|
+
label: 'Quando exibir o widget',
|
73
|
+
hint: 'É possível exibir este widget apenas quando houver avaliações',
|
74
|
+
name: 'display',
|
75
|
+
widget: 'select',
|
76
|
+
required: false,
|
77
|
+
default: 'always',
|
78
|
+
options: [
|
79
|
+
{
|
80
|
+
label: 'Sempre',
|
81
|
+
value: 'always'
|
82
|
+
},
|
83
|
+
{
|
84
|
+
label: 'Apenas quando houver avaliações',
|
85
|
+
value: 'gt1'
|
86
|
+
}
|
87
|
+
]
|
88
|
+
}
|
89
|
+
]
|
90
|
+
}
|
91
|
+
|
92
|
+
const widgetReview = {
|
93
|
+
label: 'Review de Produtos',
|
94
|
+
name: 'widget_review',
|
95
|
+
widget: 'object',
|
96
|
+
hint: 'Este widget é exibido apenas na página de produtos, exibindo uma listagem com os comentários dos compradores.',
|
97
|
+
fields: [
|
98
|
+
{
|
99
|
+
label: 'Habilitar Widget',
|
100
|
+
name: 'is_enabled',
|
101
|
+
widget: 'boolean',
|
102
|
+
default: true
|
103
|
+
},
|
104
|
+
{
|
105
|
+
label: 'Título',
|
106
|
+
name: 'title',
|
107
|
+
widget: 'string',
|
108
|
+
default: 'Avaliações dos Clientes',
|
109
|
+
required: false
|
110
|
+
},
|
111
|
+
{
|
112
|
+
label: 'Cor do icone de estrela',
|
113
|
+
name: 'star_color',
|
114
|
+
widget: 'color',
|
115
|
+
required: false
|
116
|
+
},
|
117
|
+
{
|
118
|
+
label: 'Estilo do Cabeçalho',
|
119
|
+
name: 'header_layout',
|
120
|
+
widget: 'select',
|
121
|
+
required: false,
|
122
|
+
default: 'header-minimal',
|
123
|
+
options: [
|
124
|
+
{
|
125
|
+
label: 'Minimal',
|
126
|
+
value: 'header-minimal'
|
127
|
+
},
|
128
|
+
{
|
129
|
+
label: 'Expandido',
|
130
|
+
value: 'header-expanded'
|
131
|
+
}
|
132
|
+
]
|
133
|
+
},
|
134
|
+
{
|
135
|
+
label: 'Estilo do layout de avaliações',
|
136
|
+
name: 'reviews_layout',
|
137
|
+
widget: 'select',
|
138
|
+
required: false,
|
139
|
+
default: 'list-expanded',
|
140
|
+
options: [
|
141
|
+
{
|
142
|
+
label: 'Lista',
|
143
|
+
value: 'list-expanded'
|
144
|
+
},
|
145
|
+
{
|
146
|
+
label: 'Grid',
|
147
|
+
value: 'list-grid'
|
148
|
+
}
|
149
|
+
]
|
150
|
+
}
|
151
|
+
]
|
152
|
+
}
|
153
|
+
|
154
|
+
const widgetSnippet = {
|
155
|
+
label: 'Snippet de Reviews',
|
156
|
+
name: 'widget_snippet',
|
157
|
+
widget: 'object',
|
158
|
+
hint: 'Este widget será exibido na página de produtos acima do preço do produto.',
|
159
|
+
fields: [
|
160
|
+
{
|
161
|
+
label: 'Habilitar Widget',
|
162
|
+
name: 'is_enabled',
|
163
|
+
widget: 'boolean',
|
164
|
+
default: true
|
165
|
+
},
|
166
|
+
{
|
167
|
+
label: 'Cor de fundo',
|
168
|
+
name: 'background_color',
|
169
|
+
widget: 'color',
|
170
|
+
required: false
|
171
|
+
},
|
172
|
+
{
|
173
|
+
label: 'Cor do Texto',
|
174
|
+
name: 'text_color',
|
175
|
+
widget: 'color',
|
176
|
+
required: false
|
177
|
+
},
|
178
|
+
{
|
179
|
+
label: 'Cor do icone de estrela',
|
180
|
+
name: 'star_color',
|
181
|
+
widget: 'color',
|
182
|
+
required: false
|
183
|
+
},
|
184
|
+
{
|
185
|
+
label: 'Bordas',
|
186
|
+
name: 'border',
|
187
|
+
widget: 'boolean',
|
188
|
+
default: false,
|
189
|
+
required: false
|
190
|
+
},
|
191
|
+
{
|
192
|
+
label: 'Cor da borda',
|
193
|
+
name: 'border_color',
|
194
|
+
hint: 'Borda será aplicada apenas se opção acima estiver habilitada',
|
195
|
+
widget: 'color',
|
196
|
+
required: false
|
197
|
+
}
|
198
|
+
]
|
199
|
+
}
|
200
|
+
|
201
|
+
const configDefault = {
|
202
|
+
label,
|
203
|
+
thumbnail,
|
204
|
+
fields: [
|
205
|
+
{
|
206
|
+
name: 'pkg',
|
207
|
+
widget: 'hidden',
|
208
|
+
default: name
|
209
|
+
},
|
210
|
+
{
|
211
|
+
name: 'active',
|
212
|
+
label: 'Ativar',
|
213
|
+
hint: 'Habilitar Martan',
|
214
|
+
widget: 'boolean'
|
215
|
+
},
|
216
|
+
{
|
217
|
+
name: 'desktopOnly',
|
218
|
+
widget: 'hidden',
|
219
|
+
default: false
|
220
|
+
},
|
221
|
+
{
|
222
|
+
name: 'enableCheckout',
|
223
|
+
widget: 'hidden',
|
224
|
+
default: false
|
225
|
+
},
|
226
|
+
{
|
227
|
+
name: 'disablePages',
|
228
|
+
widget: 'hidden',
|
229
|
+
default: true
|
230
|
+
},
|
231
|
+
{
|
232
|
+
name: 'headAppend',
|
233
|
+
widget: 'hidden',
|
234
|
+
default: 'src/append/head'
|
235
|
+
},
|
236
|
+
{
|
237
|
+
name: 'bodyAppend',
|
238
|
+
widget: 'hidden',
|
239
|
+
default: 'src/append/body'
|
240
|
+
},
|
241
|
+
{
|
242
|
+
name: 'productDescriptionAppend',
|
243
|
+
widget: 'hidden',
|
244
|
+
default: 'src/append/product-block'
|
245
|
+
},
|
246
|
+
{
|
247
|
+
name: 'productCardSlots',
|
248
|
+
widget: 'hidden',
|
249
|
+
default: 'src/append/product-card-slots'
|
250
|
+
},
|
251
|
+
{
|
252
|
+
name: 'productSlots',
|
253
|
+
widget: 'hidden',
|
254
|
+
default: 'src/append/product-slots'
|
255
|
+
}
|
256
|
+
]
|
257
|
+
}
|
258
|
+
|
259
|
+
martan.fields.push(widgetRating)
|
260
|
+
martan.fields.push(widgetReview)
|
261
|
+
martan.fields.push(widgetSnippet)
|
262
|
+
|
263
|
+
configDefault.fields.push(martan)
|
264
|
+
export default () => configDefault
|
@@ -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":"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","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,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,MAAA,EACAC,QAAA,CACAC,IAAA,EACAC,IAAA,EACAC,MAAA,EACAC,KAAA,EACAC,KAAA,GAEAC,aAAA,KAKAC,KAAA,iBAEAC,WAAA,CACAC,WACAC,UAGAC,SAAA,CACAC,wBAAA,2BACAC,uBAAA,0BACAC,gBAAA,qBAGAC,QAAA,CACAC,gBAAAC,kBACA,GAAAC,MAAA,wBAAAD,WAEAE,OAAAC,GACA,KAAAF,MAAA,SAAAE,M,eCpEIC,EAAY,YACd,GHTW,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACF,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,MAAM,CAACG,YAAY,CAAC,QAAU,OAAO,cAAc,SAAS,IAAM,SAAS,CAACH,EAAG,SAAS,CAACI,MAAM,CAAC,MAAQR,EAAI9B,UAAU,OAAS8B,EAAI3B,QAAQW,gBAAiBgB,EAAI3B,QAAQW,aAAe,EAAGoB,EAAG,OAAO,CAACE,YAAY,WAAW,CAACN,EAAIS,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,EAAI3B,QAAQI,MAAQ,EAAIuB,EAAIV,oBAAoBqB,QAAQ,KAAMX,EAAI3B,QAAQI,OAASuB,EAAIT,mBAAmBoB,QAAQ,KAAMX,EAAI3B,QAAQI,QAAQ,SAAS2B,EAAG,OAAO,CAACE,YAAY,WAAW,CAACN,EAAIS,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":"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","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":""}
|