@gem-sdk/components 2.1.13-staging.22 → 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 product$1 = core.useProduct();
13
- const isDefaultVariant = product.checkDefaultVariant(product$1);
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", {
@@ -8,21 +8,33 @@ var ThirdPartyPreview = require('./ThirdPartyPreview.js');
8
8
  var React = require('react');
9
9
 
10
10
  const WidgetOptions = [
11
- // {
12
- // value: 'bogo',
13
- // label: 'Upsell, Cross-sell',
14
- // },
15
11
  {
16
- value: 'bundle',
17
- label: 'Product bundle'
12
+ value: 'bogo_offer',
13
+ label: 'qikify Buy X get Y'
18
14
  },
19
15
  {
20
- value: 'volume',
21
- label: 'Volume Discount'
16
+ value: 'free_gift',
17
+ label: 'qikify Free Gift'
22
18
  },
23
19
  {
24
- value: 'upsurge',
25
- label: 'Upsurge'
20
+ value: 'bundle_offer',
21
+ label: 'qikify Product Bundle'
22
+ },
23
+ {
24
+ value: 'promotion_badge',
25
+ label: 'qikify Promotion Badge'
26
+ },
27
+ {
28
+ value: 'order-goal',
29
+ label: 'qikify Reward Bar'
30
+ },
31
+ {
32
+ value: 'upsurge_offer',
33
+ label: 'qikify Upsurge Discount'
34
+ },
35
+ {
36
+ value: 'volume_offer',
37
+ label: 'qikify Volume Discount'
26
38
  }
27
39
  ];
28
40
  const AppConfig = {
@@ -1,23 +1,11 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { useCurrentVariant, useProduct } from '@gem-sdk/core';
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 product = useProduct();
9
- const isDefaultVariant = checkDefaultVariant(product);
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", {
@@ -4,21 +4,33 @@ import ThirdPartyPreview from './ThirdPartyPreview.js';
4
4
  import { useMemo } from 'react';
5
5
 
6
6
  const WidgetOptions = [
7
- // {
8
- // value: 'bogo',
9
- // label: 'Upsell, Cross-sell',
10
- // },
11
7
  {
12
- value: 'bundle',
13
- label: 'Product bundle'
8
+ value: 'bogo_offer',
9
+ label: 'qikify Buy X get Y'
14
10
  },
15
11
  {
16
- value: 'volume',
17
- label: 'Volume Discount'
12
+ value: 'free_gift',
13
+ label: 'qikify Free Gift'
18
14
  },
19
15
  {
20
- value: 'upsurge',
21
- label: 'Upsurge'
16
+ value: 'bundle_offer',
17
+ label: 'qikify Product Bundle'
18
+ },
19
+ {
20
+ value: 'promotion_badge',
21
+ label: 'qikify Promotion Badge'
22
+ },
23
+ {
24
+ value: 'order-goal',
25
+ label: 'qikify Reward Bar'
26
+ },
27
+ {
28
+ value: 'upsurge_offer',
29
+ label: 'qikify Upsurge Discount'
30
+ },
31
+ {
32
+ value: 'volume_offer',
33
+ label: 'qikify Volume Discount'
22
34
  }
23
35
  ];
24
36
  const AppConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.1.13-staging.22",
3
+ "version": "2.1.13-staging.24",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",