Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widgets mgnr #993

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions @ecomplus/storefront-template/content/widgets/martan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"pkg": "@ecomplus/widget-martan",
"active": true,
"options": {
"store_id": 1,
"web_id": "KNfJQPB6w5lsBXjY6zmb",
"widget_key": "WK_OTQ4ZWY4OTktYjUwZS01ODcwLWE4YzAtMTE4ODFkY2M2NDc0",
"widget_rating": {
"is_enabled": true,
"font_size":15,
"star_color": "#ff00bc",
"display": "gt1"
},
"widget_review": {
"is_enabled": true,
"title": "Comentários dos Clientes",
"star_color": "#ff00bc",
"header_layout": "header-minimal",
"reviews_layout": "list-expanded"
},
"widget_snippet": {
"border": true,
"border_color": "#eee",
"is_enabled": true,
"background_color": "#fff",
"text_color": "#0e0e0e",
"star_color": "#ff00bc"
}
},
"headAppend": "src/append/head",
"bodyAppend": "src/append/body",
"productDescriptionAppend": "src/append/product-block",
"productCardSlots": "src/append/product-card-slots",
"productSlots": "src/append/product-slots",
"stampsAppend": "src/append/stamps"
}
1 change: 1 addition & 0 deletions @ecomplus/storefront-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"@ecomplus/widget-trustvox": "^2.3.1",
"@ecomplus/widget-user": "^1.0.0-beta.165",
"@ecomplus/widget-yourviews": "^1.1.0",
"@ecomplus/widget-martan": "^1.0.0",
"@glidejs/glide": "^3.6.0",
"core-js": ">=3.29.0 <3.36",
"ejs": "^3.1.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const loadWidget = (pkg, runImport) => {
if (typeof exp.default === 'function') {
exp.default({
...widget.options,
$emit (ev, payload) {
$emit(ev, payload) {
emitter.emit(ev, payload)
}
})
Expand Down Expand Up @@ -123,6 +123,10 @@ Promise.all(widgetsLoadPromises).then(() => {
'@ecomplus/widget-compre-confie',
() => import('@ecomplus/widget-compre-confie')
)
loadWidget(
'@ecomplus/widget-martan',
() => import('@ecomplus/widget-martan')
)
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import getWidgetEbit from '@ecomplus/widget-ebit/cms.config'
import getWidgetCompreConfie from '@ecomplus/widget-compre-confie/cms.config'
import getWidgetOpinioesVerificadas from '@ecomplus/widget-opinioes-verificadas/cms.config'
import getWidgetYourviews from '@ecomplus/widget-yourviews/cms.config'
import getWidgetMartan from '@ecomplus/widget-martan/cms.config'

const fixWidgetConfig = ({ baseDir }, getWidget) => {
const baseConfig = getWidget()
Expand Down Expand Up @@ -56,6 +57,7 @@ export default options => ({
fixWidgetConfig(options, getWidgetSearch),
fixWidgetConfig(options, getWidgetSearchEngine),
fixWidgetConfig(options, getWidgetMinicart),
fixWidgetConfig(options, getWidgetUser)
fixWidgetConfig(options, getWidgetUser),
fixWidgetConfig(options, getWidgetMartan)
]
})
22 changes: 22 additions & 0 deletions @ecomplus/widget-martan/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
__tests__
/docs

.DS_Store
node_modules

.npm
.eslintcache

logs
*.log
npm-debug.log*

.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.env
215 changes: 215 additions & 0 deletions @ecomplus/widget-martan/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.3.0](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.6...@ecomplus/widget-trustvox@2.3.0) (2022-02-06)


### Features

* **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)





## [2.2.6](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.5...@ecomplus/widget-trustvox@2.2.6) (2021-07-24)

**Note:** Version bump only for package @ecomplus/widget-trustvox






## [2.2.5](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.4...@ecomplus/widget-trustvox@2.2.5) (2020-12-17)


### Bug Fixes

* **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))





## [2.2.4](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.3...@ecomplus/widget-trustvox@2.2.4) (2020-12-16)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [2.2.3](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.2...@ecomplus/widget-trustvox@2.2.3) (2020-12-15)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [2.2.2](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.1...@ecomplus/widget-trustvox@2.2.2) (2020-12-15)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [2.2.1](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.2.0...@ecomplus/widget-trustvox@2.2.1) (2020-10-26)

**Note:** Version bump only for package @ecomplus/widget-trustvox





# [2.2.0](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.1.0...@ecomplus/widget-trustvox@2.2.0) (2020-08-19)


### Features

* **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))





# [2.1.0](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.5...@ecomplus/widget-trustvox@2.1.0) (2020-07-29)


### Features

* **trustvox-product-id:** handling custom id from metafield (if set) ([479d39b](https://github.com/ecomplus/storefront/commit/479d39b5c726bca872f29b39cd247e6493c546ab))





## [2.0.5](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.4...@ecomplus/widget-trustvox@2.0.5) (2020-07-17)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [2.0.4](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.3...@ecomplus/widget-trustvox@2.0.4) (2020-05-05)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [2.0.3](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.2...@ecomplus/widget-trustvox@2.0.3) (2020-05-03)


### Bug Fixes

* **cms:** replace 'productBlockAppend' with 'productDescriptionAppend' ([a585b43](https://github.com/ecomplus/storefront/commit/a585b433106681a7d3b3c61f83fffdc2628f6d13))
* **product-page:** load rating trustvox widget after component rendered ([3f0b5da](https://github.com/ecomplus/storefront/commit/3f0b5daae465312feca35fffc8761e7c28f1d9f6))





## [2.0.2](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.1...@ecomplus/widget-trustvox@2.0.2) (2020-05-01)


### Bug Fixes

* **product-page:** minor fixes for product block rating ([5027c67](https://github.com/ecomplus/storefront/commit/5027c672b694841d9e6f655162309a0e6c35a0b4))
* **trustvox-script:** use legacy script by default (new one is buggy) ([86ab507](https://github.com/ecomplus/storefront/commit/86ab507c58b445b69f815425c8d7c6884cce554d))





## [2.0.1](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@2.0.0...@ecomplus/widget-trustvox@2.0.1) (2020-05-01)


### Bug Fixes

* **product-page-rating:** fix sku js variable name ([1bd1f2f](https://github.com/ecomplus/storefront/commit/1bd1f2f7557afd650079bdb9c16e61084d34ff29))





# [2.0.0](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.7...@ecomplus/widget-trustvox@2.0.0) (2020-04-16)


### Code Refactoring

* **widget:** trustvox widget started with EJS appends (v2) ([aa2aad2](https://github.com/ecomplus/storefront/commit/aa2aad23850538723f83ff06335cf02437c9bfa9))


### Features

* **cms:** setup widget-trustvox config ([d645ff7](https://github.com/ecomplus/storefront/commit/d645ff741dfdb661256f1704dcf0e3114cd9e44a))


### BREAKING CHANGES

* **widget:** no more js handlers, compatible with storefront v2 only

[skip ci]





## [1.0.7](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.6...@ecomplus/widget-trustvox@1.0.7) (2020-04-03)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [1.0.6](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.5...@ecomplus/widget-trustvox@1.0.6) (2020-03-28)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [1.0.5](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.4...@ecomplus/widget-trustvox@1.0.5) (2020-02-27)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [1.0.4](https://github.com/ecomplus/storefront/compare/@ecomplus/widget-trustvox@1.0.3...@ecomplus/widget-trustvox@1.0.4) (2020-02-13)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [1.0.3](https://github.com/ecomclub/storefront/compare/@ecomplus/widget-trustvox@1.0.2...@ecomplus/widget-trustvox@1.0.3) (2020-02-06)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## [1.0.2](https://github.com/ecomclub/storefront/compare/@ecomplus/widget-trustvox@1.0.1...@ecomplus/widget-trustvox@1.0.2) (2020-02-05)

**Note:** Version bump only for package @ecomplus/widget-trustvox





## 1.0.1 (2020-02-04)

**Note:** Version bump only for package @ecomplus/widget-trustvox
11 changes: 11 additions & 0 deletions @ecomplus/widget-martan/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Widget Martan

Storefront plugin for Martan reviews widgets

```js
import widgetMartan from '@ecomplus/widget-martan'

widgetMartan({
martanStoreId: 123
})
```
6 changes: 6 additions & 0 deletions @ecomplus/widget-martan/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import widget from './../src/'

window._widgets = true
widget()

export default widget
Loading
Loading