@gem-sdk/components 2.0.0-staging.154 → 2.0.0-staging.161

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.
Files changed (52) hide show
  1. package/dist/cjs/banner/components/hero-banner/index.liquid.js +1 -1
  2. package/dist/cjs/builder.js +4 -0
  3. package/dist/cjs/index.js +4 -0
  4. package/dist/cjs/index.liquid.js +4 -0
  5. package/dist/cjs/post-purchase/product/components/ProductDiscountTag.js +5 -2
  6. package/dist/cjs/post-purchase/product/components/ProductOffer.js +16 -3
  7. package/dist/cjs/post-purchase/product/components/ProductPrice.js +3 -1
  8. package/dist/cjs/post-purchase/product/components/ProductPriceBreakdown.js +9 -21
  9. package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +149 -0
  10. package/dist/cjs/post-purchase/product/hooks/useDynamicProduct.js +28 -0
  11. package/dist/cjs/post-purchase/product/settings/ProductOffer.js +26 -0
  12. package/dist/cjs/product/components/ProductBundleDiscountItem.liquid.js +3 -3
  13. package/dist/cjs/product/components/ProductVariants/variants/index.js +1 -1
  14. package/dist/cjs/product/components/ProductVariants/variants/index.liquid.js +1 -1
  15. package/dist/cjs/third-party/components/EssentialAnnouncementBar.js +33 -0
  16. package/dist/cjs/third-party/components/EssentialAnnouncementBar.liquid.js +12 -0
  17. package/dist/cjs/third-party/components/EssentialCountdownTimerBar.js +33 -0
  18. package/dist/cjs/third-party/components/EssentialCountdownTimerBar.liquid.js +12 -0
  19. package/dist/cjs/third-party/configs/EssentialAnnouncementBar.js +12 -0
  20. package/dist/cjs/third-party/configs/EssentialCountdownTimerBar.js +12 -0
  21. package/dist/cjs/third-party/helpers/thirdParty.js +1 -1
  22. package/dist/cjs/third-party/next.js +10 -0
  23. package/dist/cjs/third-party/setting/EssentialAnnouncementBar.js +142 -0
  24. package/dist/cjs/third-party/setting/EssentialCountdownTimerBar.js +142 -0
  25. package/dist/cjs/third-party/setting/index.js +4 -0
  26. package/dist/esm/banner/components/hero-banner/index.liquid.js +1 -1
  27. package/dist/esm/builder.js +4 -0
  28. package/dist/esm/index.js +2 -0
  29. package/dist/esm/index.liquid.js +2 -0
  30. package/dist/esm/post-purchase/product/components/ProductDiscountTag.js +5 -2
  31. package/dist/esm/post-purchase/product/components/ProductOffer.js +16 -3
  32. package/dist/esm/post-purchase/product/components/ProductPrice.js +3 -1
  33. package/dist/esm/post-purchase/product/components/ProductPriceBreakdown.js +9 -21
  34. package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +147 -0
  35. package/dist/esm/post-purchase/product/hooks/useDynamicProduct.js +26 -0
  36. package/dist/esm/post-purchase/product/settings/ProductOffer.js +26 -0
  37. package/dist/esm/product/components/ProductBundleDiscountItem.liquid.js +3 -3
  38. package/dist/esm/product/components/ProductVariants/variants/index.js +1 -1
  39. package/dist/esm/product/components/ProductVariants/variants/index.liquid.js +1 -1
  40. package/dist/esm/third-party/components/EssentialAnnouncementBar.js +29 -0
  41. package/dist/esm/third-party/components/EssentialAnnouncementBar.liquid.js +8 -0
  42. package/dist/esm/third-party/components/EssentialCountdownTimerBar.js +29 -0
  43. package/dist/esm/third-party/components/EssentialCountdownTimerBar.liquid.js +8 -0
  44. package/dist/esm/third-party/configs/EssentialAnnouncementBar.js +8 -0
  45. package/dist/esm/third-party/configs/EssentialCountdownTimerBar.js +8 -0
  46. package/dist/esm/third-party/helpers/thirdParty.js +1 -1
  47. package/dist/esm/third-party/next.js +10 -0
  48. package/dist/esm/third-party/setting/EssentialAnnouncementBar.js +138 -0
  49. package/dist/esm/third-party/setting/EssentialCountdownTimerBar.js +138 -0
  50. package/dist/esm/third-party/setting/index.js +206 -202
  51. package/dist/types/index.d.ts +38 -1
  52. package/package.json +2 -2
@@ -0,0 +1,147 @@
1
+ const productOfferPlaceholder = {
2
+ id: '',
3
+ title: 'Dynamic product',
4
+ description: 'This is a dynamic product. The actual product will appear here based on your setup',
5
+ descriptionHtml: '<p class="QN2lPu">This is a dynamic product. The actual product will</p>\n<p class="QN2lPu">appear here based on your setup</p>',
6
+ createdAt: '2024-07-01T04:19:51.286753Z',
7
+ handle: 'dynamic-product',
8
+ averageRating: 0,
9
+ isStorefront: true,
10
+ isSample: false,
11
+ baseID: '',
12
+ sku: '',
13
+ options: [
14
+ {
15
+ id: '1',
16
+ name: 'Variant',
17
+ optionType: '',
18
+ values: [
19
+ {
20
+ id: '1',
21
+ label: 'Variant option',
22
+ isDefault: true,
23
+ baseID: ''
24
+ }
25
+ ]
26
+ }
27
+ ],
28
+ vendor: '',
29
+ featuredImage: {
30
+ id: '542178560626918105',
31
+ contentType: 'IMAGE',
32
+ previewImage: '',
33
+ src: 'https://cdn.shopify.com/s/files/1/0858/3168/0279/files/gempages_502328832959710176-312cf60c-d923-4913-9873-66545effe9cc.png',
34
+ width: 449,
35
+ height: 449,
36
+ alt: ''
37
+ },
38
+ collections: {
39
+ edges: [
40
+ {
41
+ node: {
42
+ id: '502321959132988135',
43
+ title: 'Home page'
44
+ }
45
+ },
46
+ {
47
+ node: {
48
+ id: '539286505089204764',
49
+ title: 'b'
50
+ }
51
+ },
52
+ {
53
+ node: {
54
+ id: '539286505089401372',
55
+ title: 'e'
56
+ }
57
+ }
58
+ ]
59
+ },
60
+ tags: [],
61
+ medias: {
62
+ edges: [
63
+ {
64
+ cursor: 'gqFpzweGNIc/AALZoXYB',
65
+ node: {
66
+ id: '542178560626918105',
67
+ contentType: 'IMAGE',
68
+ previewImage: '',
69
+ src: 'https://cdn.shopify.com/s/files/1/0858/3168/0279/files/gempages_502328832959710176-312cf60c-d923-4913-9873-66545effe9cc.png',
70
+ width: 449,
71
+ height: 449,
72
+ alt: ''
73
+ }
74
+ }
75
+ ],
76
+ pageInfo: {
77
+ endCursor: 'gqFpzweGNIc/AALZoXYB',
78
+ hasNextPage: true
79
+ }
80
+ },
81
+ variants: {
82
+ edges: [
83
+ {
84
+ cursor: 'gqFpzwc5ZqRtDAMIoXYC',
85
+ node: {
86
+ id: '520560088328176392',
87
+ title: 'Default Title',
88
+ barcode: '',
89
+ baseID: 'gid://shopify/ProductVariant/49298248925463',
90
+ costPrice: 88,
91
+ height: 0,
92
+ inventoryPolicy: 'DENY',
93
+ inventoryQuantity: 211,
94
+ inventoryStatus: '',
95
+ isDigital: true,
96
+ length: 0,
97
+ lowInventoryAmount: 0,
98
+ manageInventory: false,
99
+ mediaId: '0',
100
+ platform: 'SHOPIFY',
101
+ price: 88,
102
+ salePrice: 88,
103
+ sku: '',
104
+ soldIndividually: false,
105
+ weight: 0,
106
+ width: 0,
107
+ selectedOptions: [],
108
+ media: undefined
109
+ }
110
+ },
111
+ {
112
+ cursor: 'gqFpzwc5ZqRtDAMIoXYC',
113
+ node: {
114
+ id: '520560088328176392',
115
+ title: 'Default Title',
116
+ barcode: '',
117
+ baseID: 'gid://shopify/ProductVariant/49298248925463',
118
+ costPrice: 88,
119
+ height: 0,
120
+ inventoryPolicy: 'DENY',
121
+ inventoryQuantity: 211,
122
+ inventoryStatus: '',
123
+ isDigital: true,
124
+ length: 0,
125
+ lowInventoryAmount: 0,
126
+ manageInventory: false,
127
+ mediaId: '0',
128
+ platform: 'SHOPIFY',
129
+ price: 88,
130
+ salePrice: 88,
131
+ sku: '',
132
+ soldIndividually: false,
133
+ weight: 0,
134
+ width: 0,
135
+ selectedOptions: [],
136
+ media: undefined
137
+ }
138
+ }
139
+ ],
140
+ pageInfo: {
141
+ hasNextPage: false,
142
+ endCursor: 'gaFpzwc5ZqRtDAMI'
143
+ }
144
+ }
145
+ };
146
+
147
+ export { productOfferPlaceholder };
@@ -0,0 +1,26 @@
1
+ import { usePageStore } from '@gem-sdk/core';
2
+ import { useMemo } from 'react';
3
+
4
+ const useDynamicProduct = ()=>{
5
+ const dynamicDiscountOffer = usePageStore((s)=>s.dynamicDiscountOffer);
6
+ const isDynamicProduct = useMemo(()=>{
7
+ return !!dynamicDiscountOffer;
8
+ }, [
9
+ dynamicDiscountOffer
10
+ ]);
11
+ // false = No discount
12
+ const isEnableDynamicDiscount = useMemo(()=>{
13
+ return dynamicDiscountOffer?.isEnabled;
14
+ }, [
15
+ dynamicDiscountOffer
16
+ ]);
17
+ const dynamicPrice = '$???';
18
+ return {
19
+ isDynamicProduct,
20
+ dynamicPrice,
21
+ dynamicDiscount: dynamicDiscountOffer,
22
+ isEnableDynamicDiscount
23
+ };
24
+ };
25
+
26
+ export { useDynamicProduct };
@@ -180,6 +180,14 @@ const config = {
180
180
  }
181
181
  }
182
182
  },
183
+ {
184
+ id: 'dynamicOfferQuantity',
185
+ type: 'dynamic-offer-quantity',
186
+ min: 1,
187
+ max: 4,
188
+ default: 2,
189
+ isOnlyAcceptInteger: true
190
+ },
183
191
  {
184
192
  id: 'discountAndShippingFee',
185
193
  type: 'discount-and-shipping-fee-product-offer',
@@ -373,6 +381,24 @@ const config = {
373
381
  },
374
382
  layout: 'vertical'
375
383
  },
384
+ {
385
+ type: 'group',
386
+ label: {
387
+ en: 'Product offers'
388
+ },
389
+ controls: [
390
+ {
391
+ type: 'control',
392
+ label: {
393
+ en: 'Quantity'
394
+ },
395
+ setting: {
396
+ id: 'dynamicOfferQuantity'
397
+ }
398
+ }
399
+ ],
400
+ condition: 'false'
401
+ },
376
402
  {
377
403
  type: 'control',
378
404
  label: {
@@ -44,9 +44,9 @@ const ProductBundleDiscountItem = ({ children, parentSetting, parentStyles, inde
44
44
  return selected === i;
45
45
  };
46
46
  return template`
47
- <div
47
+ <gp-product-bundle-discount-item
48
48
  ${bundleItem}
49
- class="product-bundle-item cursor-pointer"
49
+ class="product-bundle-item cursor-pointer gp-block"
50
50
  style="${{
51
51
  ...sizeSettings.padding,
52
52
  ...makeStyleState('bg', parentStyles?.backgroundColor),
@@ -92,7 +92,7 @@ const ProductBundleDiscountItem = ({ children, parentSetting, parentStyles, inde
92
92
  ${children}
93
93
  </div>
94
94
  </div>
95
- </div>
95
+ </gp-product-bundle-discount-item>
96
96
  `;
97
97
  };
98
98
 
@@ -77,7 +77,7 @@ const VariantItem = ({ name, variantKey, optionName, optionValue, ...props })=>{
77
77
  htmlFor: `${props.uid}-${variantKey}`,
78
78
  children: [
79
79
  /*#__PURE__*/ jsxs("div", {
80
- className: "gp-invisible !gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]",
80
+ className: "gp-invisible !gp-max-w-[0px] lg:!gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] gp-px-[0px] lg:gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute after:gp-p-[0px] lg:after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]",
81
81
  children: [
82
82
  /*#__PURE__*/ jsx("p", {
83
83
  className: "gp-text-[#F9F9F9]",
@@ -116,7 +116,7 @@ const VariantItem = ({ name, variantKey, value, id, activeClass, optionPosition,
116
116
  for="{{product.id}}-${props.uid}-${variantKey}"
117
117
  class="gp-group gp-relative option-item gp-child-item-${props.uid}"
118
118
  >
119
- <div class="gp-invisible !gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]">
119
+ <div class="gp-invisible !gp-max-w-[0px] lg:!gp-max-w-[150px] gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-absolute gp-bottom-[calc(100%+20px)] gp-text-[12px] group-hover:gp-visible gp-w-max gp-bg-[#333333] gp-text-[#F9F9F9] gp-px-[0px] lg:gp-px-[8px] gp-py-[4px] gp-rounded-[8px] gp-mb-[-10px] after:gp-content-[''] after:gp-absolute after:gp-p-[0px] lg:after:gp-p-[7px] after:gp-left-0 after:gp-w-full after:gp-bottom-[-10px]">
120
120
  <p class="gp-text-[#F9F9F9]">${value?.label}</p>
121
121
  <svg class="gp-absolute gp-left-[50%] gp-translate-x-[-50%] gp-translate-y-0 gp-z-10 gp-bottom-[-4px]" width="8" height="4" viewBox="0 0 16 10" fill="none" xmlns="http://www.w3.org/2000/svg">
122
122
  <path d="M8 10L0 0L16 1.41326e-06L8 10Z" fill="#333333"/>
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+ import { makeStyleResponsive } from '@gem-sdk/core';
4
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
5
+ import AppConfig from '../configs/EssentialAnnouncementBar.js';
6
+
7
+ const EssentialAnnouncementBarContent = ()=>{
8
+ return /*#__PURE__*/ jsx(Fragment, {
9
+ children: /*#__PURE__*/ jsx("div", {
10
+ className: "gp-p-2",
11
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
12
+ setting: {
13
+ label: 'Essential Announcement Bar',
14
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
15
+ }
16
+ })
17
+ })
18
+ });
19
+ };
20
+ const EssentialAnnouncementBar = ({ setting })=>{
21
+ return /*#__PURE__*/ jsx("div", {
22
+ style: {
23
+ ...makeStyleResponsive('ta', setting?.align)
24
+ },
25
+ children: /*#__PURE__*/ jsx(EssentialAnnouncementBarContent, {})
26
+ });
27
+ };
28
+
29
+ export { EssentialAnnouncementBar as default };
@@ -0,0 +1,8 @@
1
+ import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
2
+
3
+ const EssentialAnnouncementBar = ({ setting, advanced })=>{
4
+ const { align, appBlockId } = setting ?? {};
5
+ return getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block `);
6
+ };
7
+
8
+ export { EssentialAnnouncementBar as default };
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+ import { makeStyleResponsive } from '@gem-sdk/core';
4
+ import ThirdPartyPreview from './ThirdPartyPreview.js';
5
+ import AppConfig from '../configs/EssentialCountdownTimerBar.js';
6
+
7
+ const EssentialCountdownTimerBarContent = ()=>{
8
+ return /*#__PURE__*/ jsx(Fragment, {
9
+ children: /*#__PURE__*/ jsx("div", {
10
+ className: "gp-p-2",
11
+ children: /*#__PURE__*/ jsx(ThirdPartyPreview, {
12
+ setting: {
13
+ label: 'Essential Countdown Timer Bar',
14
+ iconSvg: `<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="${AppConfig.logoUrl}">`
15
+ }
16
+ })
17
+ })
18
+ });
19
+ };
20
+ const EssentialCountdownTimerBar = ({ setting })=>{
21
+ return /*#__PURE__*/ jsx("div", {
22
+ style: {
23
+ ...makeStyleResponsive('ta', setting?.align)
24
+ },
25
+ children: /*#__PURE__*/ jsx(EssentialCountdownTimerBarContent, {})
26
+ });
27
+ };
28
+
29
+ export { EssentialCountdownTimerBar as default };
@@ -0,0 +1,8 @@
1
+ import { getLiquidForAppBlock } from '../helpers/thirdParty.js';
2
+
3
+ const EssentialCountdownTimerBar = ({ setting, advanced })=>{
4
+ const { align, appBlockId } = setting ?? {};
5
+ return getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''} !gp-block `);
6
+ };
7
+
8
+ export { EssentialCountdownTimerBar as default };
@@ -0,0 +1,8 @@
1
+ var AppConfig = {
2
+ id: 'essential-announcement-bar',
3
+ label: 'Essential Announcement Bar',
4
+ logoUrl: 'https://cdn.shopify.com/app-store/listing_images/15e8255158a042a1eab34a4c45c72aa5/icon/CMK1jPv9uoADEAE=.png',
5
+ tag: 'EssentialAnnouncementBar'
6
+ };
7
+
8
+ export { AppConfig as default };
@@ -0,0 +1,8 @@
1
+ var AppConfig = {
2
+ id: 'essential-countdown-timer-bar',
3
+ label: 'Essential Countdown Timer Bar',
4
+ logoUrl: 'https://cdn.shopify.com/app-store/listing_images/f84bf9e49eca8bd84c2af7488461363b/icon/CPzKxLTD4_UCEAE=.png',
5
+ tag: 'EssentialCountdownTimerBar'
6
+ };
7
+
8
+ export { AppConfig as default };
@@ -37,7 +37,7 @@ const getLiquidForAppBlock = (appBlockId, align, cssClass)=>{
37
37
  <div
38
38
  class="gp-flex gp-w-full gp-items-center ${cssClass}"
39
39
  style="${{
40
- ...makeStyleResponsive('ta', align)
40
+ ...makeStyleResponsive('jc', align)
41
41
  }}"
42
42
  >
43
43
  {% for block in app_blocks %}
@@ -4,6 +4,14 @@ import 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import '@gem-sdk/core';
6
6
 
7
+ const EssentialAnnouncementBar = dynamic(()=>import('./components/EssentialAnnouncementBar.js'), {
8
+ ssr: false,
9
+ loading: Loading
10
+ });
11
+ const EssentialCountdownTimerBar = dynamic(()=>import('./components/EssentialCountdownTimerBar.js'), {
12
+ ssr: false,
13
+ loading: Loading
14
+ });
7
15
  const StellarDeliveryDatePickup = dynamic(()=>import('./components/StellarDeliveryDatePickup.js'), {
8
16
  ssr: false,
9
17
  loading: Loading
@@ -409,6 +417,8 @@ const Selleasy = dynamic(()=>import('./components/Selleasy.js'), {
409
417
  loading: Loading
410
418
  });
411
419
  var thirdParty = {
420
+ EssentialAnnouncementBar,
421
+ EssentialCountdownTimerBar,
412
422
  StellarDeliveryDatePickup,
413
423
  TrustshopProductReviews,
414
424
  HulkProductOptions,
@@ -0,0 +1,138 @@
1
+ import AppConfig from '../configs/EssentialAnnouncementBar.js';
2
+
3
+ const config = {
4
+ tag: AppConfig.tag,
5
+ label: AppConfig.label,
6
+ icon: '<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/15e8255158a042a1eab34a4c45c72aa5/icon/CMK1jPv9uoADEAE=.png">',
7
+ editorConfigs: {
8
+ component: {
9
+ isThirdParty: true
10
+ }
11
+ },
12
+ presets: [
13
+ {
14
+ id: AppConfig.id,
15
+ name: {
16
+ en: AppConfig.label
17
+ },
18
+ hideTextContent: true,
19
+ icon: {
20
+ desktop: `<div class="w-full flex flex-col items-center">
21
+ <img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/15e8255158a042a1eab34a4c45c72aa5/icon/CMK1jPv9uoADEAE=.png">
22
+ <span class="preset-item-title">Essential Announcement Bar</span>
23
+ </div>`
24
+ },
25
+ components: [
26
+ {
27
+ tag: AppConfig.tag
28
+ }
29
+ ]
30
+ }
31
+ ],
32
+ settings: [
33
+ {
34
+ id: 'setting',
35
+ controls: [
36
+ {
37
+ id: 'appBlockId',
38
+ type: 'input',
39
+ default: ''
40
+ },
41
+ {
42
+ id: 'widgetType',
43
+ label: 'Choose widget',
44
+ type: 'select',
45
+ options: [
46
+ {
47
+ label: 'App Block',
48
+ value: 'app-block'
49
+ }
50
+ ],
51
+ default: 'app-block'
52
+ },
53
+ {
54
+ id: 'install',
55
+ type: 'open-link',
56
+ target: '_blank',
57
+ linkType: 'install',
58
+ href: 'https://apps.shopify.com/essential-announcement-bar?utm_source=gempages',
59
+ appName: AppConfig.label
60
+ },
61
+ {
62
+ id: 'announcementId',
63
+ type: 'input',
64
+ default: ''
65
+ },
66
+ {
67
+ id: 'openApp',
68
+ type: 'open-link',
69
+ target: '_blank',
70
+ linkType: 'openApp',
71
+ href: 'https://admin.shopify.com/?redirect=/apps/essential-announcement-bar',
72
+ appName: AppConfig.label
73
+ },
74
+ {
75
+ id: 'align',
76
+ label: 'Alignment',
77
+ type: 'segment',
78
+ options: [
79
+ {
80
+ label: 'Left',
81
+ value: 'left',
82
+ type: 'align'
83
+ },
84
+ {
85
+ label: 'Center',
86
+ value: 'center',
87
+ type: 'align'
88
+ },
89
+ {
90
+ label: 'Right',
91
+ value: 'right',
92
+ type: 'align'
93
+ }
94
+ ],
95
+ devices: {
96
+ desktop: {
97
+ default: 'left'
98
+ }
99
+ }
100
+ }
101
+ ]
102
+ }
103
+ ],
104
+ ui: [
105
+ {
106
+ type: 'control',
107
+ setting: {
108
+ id: 'install'
109
+ }
110
+ },
111
+ {
112
+ type: 'control',
113
+ label: {
114
+ en: 'Announcement id'
115
+ },
116
+ setting: {
117
+ id: 'announcementId'
118
+ }
119
+ },
120
+ {
121
+ type: 'control',
122
+ setting: {
123
+ id: 'openApp'
124
+ }
125
+ },
126
+ {
127
+ type: 'control',
128
+ label: {
129
+ en: 'Align'
130
+ },
131
+ setting: {
132
+ id: 'align'
133
+ }
134
+ }
135
+ ]
136
+ };
137
+
138
+ export { config as default };
@@ -0,0 +1,138 @@
1
+ import AppConfig from '../configs/EssentialCountdownTimerBar.js';
2
+
3
+ const config = {
4
+ tag: AppConfig.tag,
5
+ label: AppConfig.label,
6
+ icon: '<img class="gp-w-6 gp-border gp-border-[#494949] gp-rounded-[3px]" src="https://cdn.shopify.com/app-store/listing_images/f84bf9e49eca8bd84c2af7488461363b/icon/CPzKxLTD4_UCEAE=.png">',
7
+ editorConfigs: {
8
+ component: {
9
+ isThirdParty: true
10
+ }
11
+ },
12
+ presets: [
13
+ {
14
+ id: AppConfig.id,
15
+ name: {
16
+ en: AppConfig.label
17
+ },
18
+ hideTextContent: true,
19
+ icon: {
20
+ desktop: `<div class="w-full flex flex-col items-center">
21
+ <img class="w-24 border border-dark-200 rounded-medium" src="https://cdn.shopify.com/app-store/listing_images/f84bf9e49eca8bd84c2af7488461363b/icon/CPzKxLTD4_UCEAE=.png">
22
+ <span class="preset-item-title">Essential Countdown Timer Bar</span>
23
+ </div>`
24
+ },
25
+ components: [
26
+ {
27
+ tag: AppConfig.tag
28
+ }
29
+ ]
30
+ }
31
+ ],
32
+ settings: [
33
+ {
34
+ id: 'setting',
35
+ controls: [
36
+ {
37
+ id: 'appBlockId',
38
+ type: 'input',
39
+ default: ''
40
+ },
41
+ {
42
+ id: 'widgetType',
43
+ label: 'Choose widget',
44
+ type: 'select',
45
+ options: [
46
+ {
47
+ label: 'App Block',
48
+ value: 'app-block'
49
+ }
50
+ ],
51
+ default: 'app-block'
52
+ },
53
+ {
54
+ id: 'install',
55
+ type: 'open-link',
56
+ target: '_blank',
57
+ linkType: 'install',
58
+ href: 'https://apps.shopify.com/essential-countdown-timer?utm_source=gempages',
59
+ appName: AppConfig.label
60
+ },
61
+ {
62
+ id: 'timerId',
63
+ type: 'input',
64
+ default: ''
65
+ },
66
+ {
67
+ id: 'openApp',
68
+ type: 'open-link',
69
+ target: '_blank',
70
+ linkType: 'openApp',
71
+ href: 'https://admin.shopify.com/?redirect=/apps/countdown-timer-30',
72
+ appName: AppConfig.label
73
+ },
74
+ {
75
+ id: 'align',
76
+ label: 'Alignment',
77
+ type: 'segment',
78
+ options: [
79
+ {
80
+ label: 'Left',
81
+ value: 'left',
82
+ type: 'align'
83
+ },
84
+ {
85
+ label: 'Center',
86
+ value: 'center',
87
+ type: 'align'
88
+ },
89
+ {
90
+ label: 'Right',
91
+ value: 'right',
92
+ type: 'align'
93
+ }
94
+ ],
95
+ devices: {
96
+ desktop: {
97
+ default: 'left'
98
+ }
99
+ }
100
+ }
101
+ ]
102
+ }
103
+ ],
104
+ ui: [
105
+ {
106
+ type: 'control',
107
+ setting: {
108
+ id: 'install'
109
+ }
110
+ },
111
+ {
112
+ type: 'control',
113
+ label: {
114
+ en: 'Timer id'
115
+ },
116
+ setting: {
117
+ id: 'timerId'
118
+ }
119
+ },
120
+ {
121
+ type: 'control',
122
+ setting: {
123
+ id: 'openApp'
124
+ }
125
+ },
126
+ {
127
+ type: 'control',
128
+ label: {
129
+ en: 'Align'
130
+ },
131
+ setting: {
132
+ id: 'align'
133
+ }
134
+ }
135
+ ]
136
+ };
137
+
138
+ export { config as default };