@gem-sdk/components 2.1.13-staging.23 → 2.1.13-staging.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.
|
@@ -5,23 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var core = require('@gem-sdk/core');
|
|
7
7
|
var Text = require('../../text/components/Text.js');
|
|
8
|
-
var product = require('../helpers/product.js');
|
|
9
8
|
|
|
10
9
|
const ProductSku = ({ setting, builderProps, styles })=>{
|
|
11
10
|
const currentVariant = core.useCurrentVariant();
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
const textContent = setting?.label && setting.label.trim().length ? `${setting.label}: ${currentVariant?.sku || ''}` : `${currentVariant?.sku || ''}`;
|
|
15
|
-
if (isDefaultVariant) {
|
|
16
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
17
|
-
"data-id": builderProps?.uid,
|
|
18
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
19
|
-
className: "gp-p-2 gp-text-center gp-text-sm gp-font-semibold gp-text-gray-500",
|
|
20
|
-
children: "This product does not have a SKU"
|
|
21
|
-
})
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
if (!isDefaultVariant && !currentVariant?.sku) {
|
|
11
|
+
const textContent = setting?.label?.trim()?.length ? `${setting.label}: ${currentVariant?.sku ?? ''}` : `${currentVariant?.sku ?? ''}`;
|
|
12
|
+
if (!currentVariant?.sku) {
|
|
25
13
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
26
14
|
"data-id": builderProps?.uid,
|
|
27
15
|
children: /*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useCurrentVariant
|
|
2
|
+
import { useCurrentVariant } from '@gem-sdk/core';
|
|
3
3
|
import Text from '../../text/components/Text.js';
|
|
4
|
-
import { checkDefaultVariant } from '../helpers/product.js';
|
|
5
4
|
|
|
6
5
|
const ProductSku = ({ setting, builderProps, styles })=>{
|
|
7
6
|
const currentVariant = useCurrentVariant();
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const textContent = setting?.label && setting.label.trim().length ? `${setting.label}: ${currentVariant?.sku || ''}` : `${currentVariant?.sku || ''}`;
|
|
11
|
-
if (isDefaultVariant) {
|
|
12
|
-
return /*#__PURE__*/ jsx("div", {
|
|
13
|
-
"data-id": builderProps?.uid,
|
|
14
|
-
children: /*#__PURE__*/ jsx("p", {
|
|
15
|
-
className: "gp-p-2 gp-text-center gp-text-sm gp-font-semibold gp-text-gray-500",
|
|
16
|
-
children: "This product does not have a SKU"
|
|
17
|
-
})
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
if (!isDefaultVariant && !currentVariant?.sku) {
|
|
7
|
+
const textContent = setting?.label?.trim()?.length ? `${setting.label}: ${currentVariant?.sku ?? ''}` : `${currentVariant?.sku ?? ''}`;
|
|
8
|
+
if (!currentVariant?.sku) {
|
|
21
9
|
return /*#__PURE__*/ jsx("div", {
|
|
22
10
|
"data-id": builderProps?.uid,
|
|
23
11
|
children: /*#__PURE__*/ jsx("p", {
|