@gem-sdk/plugin-loox 1.58.0 → 2.0.0-dev.1082
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.
|
@@ -1,46 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var react = require('react');
|
|
7
|
-
var Script = require('next/script');
|
|
8
|
-
|
|
9
|
-
const ProductReview = ({ productId, type, shop })=>{
|
|
10
|
-
const props = react.useMemo(()=>{
|
|
11
|
-
switch(type){
|
|
12
|
-
case 'star':
|
|
13
|
-
return {
|
|
14
|
-
'data-fetch': true,
|
|
15
|
-
className: 'loox-rating',
|
|
16
|
-
'data-id': productId
|
|
17
|
-
};
|
|
18
|
-
case 'carousel':
|
|
19
|
-
return {
|
|
20
|
-
id: 'looxCarousel',
|
|
21
|
-
'data-show-more': true,
|
|
22
|
-
'data-product-ids': productId
|
|
23
|
-
};
|
|
24
|
-
default:
|
|
25
|
-
return {
|
|
26
|
-
id: 'looxReviews',
|
|
27
|
-
'data-product-id': productId
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}, [
|
|
31
|
-
productId,
|
|
32
|
-
type
|
|
33
|
-
]);
|
|
34
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
35
|
-
children: [
|
|
36
|
-
/*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
37
|
-
src: `//loox.io/widget/loox.js?shop=${shop}`
|
|
38
|
-
}),
|
|
39
|
-
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
40
|
-
...props
|
|
41
|
-
})
|
|
42
|
-
]
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
exports.default = ProductReview;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),Script=require("next/script");const ProductReview=({productId:e,type:t,shop:r})=>{let s=react.useMemo(()=>{switch(t){case"star":return{"data-fetch":!0,className:"loox-rating","data-id":e};case"carousel":return{id:"looxCarousel","data-show-more":!0,"data-product-ids":e};default:return{id:"looxReviews","data-product-id":e}}},[e,t]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Script,{src:`//loox.io/widget/loox.js?shop=${r}`}),jsxRuntime.jsx("div",{...s})]})};exports.default=ProductReview;
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var ProductReview = require('./components/ProductReview.js');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.default = ProductReview.default;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ProductReview=require("./components/ProductReview.js");exports.default=ProductReview.default;
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import Script from 'next/script';
|
|
4
|
-
|
|
5
|
-
const ProductReview = ({ productId, type, shop })=>{
|
|
6
|
-
const props = useMemo(()=>{
|
|
7
|
-
switch(type){
|
|
8
|
-
case 'star':
|
|
9
|
-
return {
|
|
10
|
-
'data-fetch': true,
|
|
11
|
-
className: 'loox-rating',
|
|
12
|
-
'data-id': productId
|
|
13
|
-
};
|
|
14
|
-
case 'carousel':
|
|
15
|
-
return {
|
|
16
|
-
id: 'looxCarousel',
|
|
17
|
-
'data-show-more': true,
|
|
18
|
-
'data-product-ids': productId
|
|
19
|
-
};
|
|
20
|
-
default:
|
|
21
|
-
return {
|
|
22
|
-
id: 'looxReviews',
|
|
23
|
-
'data-product-id': productId
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
}, [
|
|
27
|
-
productId,
|
|
28
|
-
type
|
|
29
|
-
]);
|
|
30
|
-
return /*#__PURE__*/ jsxs(Fragment, {
|
|
31
|
-
children: [
|
|
32
|
-
/*#__PURE__*/ jsx(Script, {
|
|
33
|
-
src: `//loox.io/widget/loox.js?shop=${shop}`
|
|
34
|
-
}),
|
|
35
|
-
/*#__PURE__*/ jsx("div", {
|
|
36
|
-
...props
|
|
37
|
-
})
|
|
38
|
-
]
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export { ProductReview as default };
|
|
1
|
+
import{jsxs as t,Fragment as r,jsx as e}from"react/jsx-runtime";import{useMemo as o}from"react";import a from"next/script";let ProductReview=({productId:d,type:i,shop:s})=>{let c=o(()=>{switch(i){case"star":return{"data-fetch":!0,className:"loox-rating","data-id":d};case"carousel":return{id:"looxCarousel","data-show-more":!0,"data-product-ids":d};default:return{id:"looxReviews","data-product-id":d}}},[d,i]);return t(r,{children:[e(a,{src:`//loox.io/widget/loox.js?shop=${s}`}),e("div",{...c})]})};export{ProductReview as default};
|
package/dist/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/plugin-loox",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-dev.1082",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -19,14 +19,11 @@
|
|
|
19
19
|
"test": "jest -c ./../../helpers/jest.config.ts"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@gem-sdk/styles": "
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@gem-sdk/core": "1.58.0"
|
|
22
|
+
"@gem-sdk/styles": "2.0.0-dev.1082"
|
|
26
23
|
},
|
|
27
24
|
"peerDependencies": {
|
|
28
|
-
"react": "^
|
|
29
|
-
"react-dom": "^
|
|
25
|
+
"react": "^18",
|
|
26
|
+
"react-dom": "^18"
|
|
30
27
|
},
|
|
31
28
|
"module": "dist/esm/index.js",
|
|
32
29
|
"types": "dist/types/index.d.ts",
|