@gem-sdk/components 2.0.0-dev.346 → 2.0.0-dev.348

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 (60) hide show
  1. package/dist/cjs/carousel/components/plugins/AutoPlayPlugin.js +58 -17
  2. package/dist/cjs/countdown-timer/components/Countdown.js +103 -307
  3. package/dist/cjs/countdown-timer/components/Countdown.liquid.js +92 -56
  4. package/dist/cjs/countdown-timer/components/common/getAttr.js +15 -0
  5. package/dist/cjs/countdown-timer/components/common/getClasses.js +69 -0
  6. package/dist/cjs/countdown-timer/components/common/getStyle.js +66 -0
  7. package/dist/cjs/countdown-timer/components/hooks/useCountDownTimer.js +67 -0
  8. package/dist/cjs/countdown-timer/{hooks → components/hooks}/useTimeLeft.js +1 -1
  9. package/dist/cjs/countdown-timer/index.js +1 -1
  10. package/dist/cjs/countdown-timer/setting/Countdown.js +1 -1
  11. package/dist/cjs/countdown-timer/setting/configs/settings.js +1 -1
  12. package/dist/cjs/product/components/ProductProperties/ProductPropertyInput/ProductPropertyInput.liquid.js +1 -1
  13. package/dist/cjs/product/setting/product-properties/configs/settingsV2.js +43 -14
  14. package/dist/cjs/product/setting/product-properties/configs/uiV2.js +5 -2
  15. package/dist/cjs/third-party/components/AliReviews.liquid.js +1 -1
  16. package/dist/cjs/third-party/components/FeraReviews/FeraReviewsSampleContent.js +3 -3
  17. package/dist/cjs/third-party/components/FeraReviews/LiquidTemplateByWidget.js +2 -2
  18. package/dist/cjs/third-party/components/FeraReviews.js +0 -5
  19. package/dist/cjs/third-party/components/GoogleReviewsByReputon.liquid.js +2 -2
  20. package/dist/cjs/third-party/components/JudgemeReviews.liquid.js +5 -5
  21. package/dist/cjs/third-party/components/KachingBundles.liquid.js +1 -1
  22. package/dist/cjs/third-party/components/KingProductOptions.liquid.js +1 -1
  23. package/dist/cjs/third-party/components/LaiProductReviews/LiquidTemplateByWiget.js +3 -3
  24. package/dist/cjs/third-party/components/LooxReviews.liquid.js +1 -1
  25. package/dist/cjs/third-party/components/Ryviu.liquid.js +1 -1
  26. package/dist/cjs/third-party/components/Vitals.liquid.js +2 -2
  27. package/dist/cjs/third-party/setting/TrustshopProductReviews.js +3 -3
  28. package/dist/cjs/third-party/setting/WhatmoreShoppableVideosreel.js +36 -36
  29. package/dist/cjs/third-party/types/index.js +5 -0
  30. package/dist/esm/carousel/components/plugins/AutoPlayPlugin.js +58 -17
  31. package/dist/esm/countdown-timer/components/Countdown.js +104 -308
  32. package/dist/esm/countdown-timer/components/Countdown.liquid.js +93 -57
  33. package/dist/esm/countdown-timer/components/common/getAttr.js +12 -0
  34. package/dist/esm/countdown-timer/components/common/getClasses.js +61 -0
  35. package/dist/esm/countdown-timer/components/common/getStyle.js +60 -0
  36. package/dist/esm/countdown-timer/components/hooks/useCountDownTimer.js +63 -0
  37. package/dist/esm/countdown-timer/{hooks → components/hooks}/useTimeLeft.js +1 -1
  38. package/dist/esm/countdown-timer/index.js +1 -1
  39. package/dist/esm/countdown-timer/setting/Countdown.js +1 -1
  40. package/dist/esm/countdown-timer/setting/configs/settings.js +1 -1
  41. package/dist/esm/product/components/ProductProperties/ProductPropertyInput/ProductPropertyInput.liquid.js +1 -1
  42. package/dist/esm/product/setting/product-properties/configs/settingsV2.js +43 -14
  43. package/dist/esm/product/setting/product-properties/configs/uiV2.js +5 -2
  44. package/dist/esm/third-party/components/AliReviews.liquid.js +1 -1
  45. package/dist/esm/third-party/components/FeraReviews/FeraReviewsSampleContent.js +1 -1
  46. package/dist/esm/third-party/components/FeraReviews/LiquidTemplateByWidget.js +1 -1
  47. package/dist/esm/third-party/components/FeraReviews.js +1 -5
  48. package/dist/esm/third-party/components/GoogleReviewsByReputon.liquid.js +2 -2
  49. package/dist/esm/third-party/components/JudgemeReviews.liquid.js +5 -5
  50. package/dist/esm/third-party/components/KachingBundles.liquid.js +1 -1
  51. package/dist/esm/third-party/components/KingProductOptions.liquid.js +1 -1
  52. package/dist/esm/third-party/components/LaiProductReviews/LiquidTemplateByWiget.js +3 -3
  53. package/dist/esm/third-party/components/LooxReviews.liquid.js +1 -1
  54. package/dist/esm/third-party/components/Ryviu.liquid.js +1 -1
  55. package/dist/esm/third-party/components/Vitals.liquid.js +2 -2
  56. package/dist/esm/third-party/setting/TrustshopProductReviews.js +3 -3
  57. package/dist/esm/third-party/setting/WhatmoreShoppableVideosreel.js +36 -36
  58. package/dist/esm/third-party/types/index.js +5 -1
  59. package/dist/types/index.d.ts +1541 -1531
  60. package/package.json +1 -1
@@ -0,0 +1,61 @@
1
+ import { getGlobalColorClass, genSizeClass } from '@gem-sdk/core';
2
+
3
+ function composeClasses(classList) {
4
+ return classList.split(' ').reduce((acc, item)=>{
5
+ acc[item] = true;
6
+ return acc;
7
+ }, {});
8
+ }
9
+ const getContentClasses = ()=>{
10
+ const classList = 'gp-flex gp-flex-wrap gp-w-max gp-relative';
11
+ return {
12
+ ...composeClasses(classList)
13
+ };
14
+ };
15
+ const getWrapperClasses = (advancedCssClass)=>{
16
+ let classList = 'gp-flex';
17
+ if (advancedCssClass) classList += ` ${advancedCssClass}`;
18
+ return {
19
+ ...composeClasses(classList)
20
+ };
21
+ };
22
+ const getDateClasses = (styles, dateLabel)=>{
23
+ let classList = 'gp-flex-1 gp-text-center gp-min-w-max !gp-max-w-max';
24
+ const { itemPadding } = styles || {};
25
+ if (itemPadding?.type) classList += ` ${genSizeClass(itemPadding?.type)}`;
26
+ if (!dateLabel) classList += ` gp-content-center`;
27
+ return {
28
+ ...composeClasses(classList)
29
+ };
30
+ };
31
+ const getTextFrontClasses = (styles)=>{
32
+ let classList = 'gp-countdown-number';
33
+ const { colorNumber } = styles || {};
34
+ if (getGlobalColorClass('text', colorNumber)) classList += ` ${getGlobalColorClass('text', colorNumber)}`;
35
+ return {
36
+ ...composeClasses(classList)
37
+ };
38
+ };
39
+ const getTextBackClasses = (styles, textLabel)=>{
40
+ let classList = '';
41
+ const { colorLabel } = styles || {};
42
+ if (getGlobalColorClass('text', colorLabel)) classList += ` ${getGlobalColorClass('text', colorLabel)}`;
43
+ if (!textLabel) classList += ` gp-hidden`;
44
+ return {
45
+ ...composeClasses(classList)
46
+ };
47
+ };
48
+ const getLinkClasses = ()=>{
49
+ const classList = 'gp-absolute gp-inset-0 gp-z-1';
50
+ return {
51
+ ...composeClasses(classList)
52
+ };
53
+ };
54
+ const getTextExpireClasses = ()=>{
55
+ const classList = 'gp-flex gp-h-12 gp-items-center gp-justify-center gp-bg-[#d6d6d6] gp-opacity-70';
56
+ return {
57
+ ...composeClasses(classList)
58
+ };
59
+ };
60
+
61
+ export { getContentClasses, getDateClasses, getLinkClasses, getTextBackClasses, getTextExpireClasses, getTextFrontClasses, getWrapperClasses };
@@ -0,0 +1,60 @@
1
+ import { makeStyleResponsive, composeSize, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, composeRadius, makeStyle, getGlobalColorCSSProp } from '@gem-sdk/core';
2
+
3
+ function filterTruthyStyles(styles) {
4
+ return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
5
+ }
6
+ const getWrapperStyle = (styles)=>{
7
+ const composeStyles = {
8
+ ...makeStyleResponsive('jc', styles?.textAlign)
9
+ };
10
+ return filterTruthyStyles(composeStyles);
11
+ };
12
+ const getContainStyle = (styles)=>{
13
+ const { horizontalGap, textAlign } = styles || {};
14
+ const composeStyles = {
15
+ gap: horizontalGap,
16
+ ...makeStyleResponsive('jc', textAlign)
17
+ };
18
+ return filterTruthyStyles(composeStyles);
19
+ };
20
+ const getDateStyle = (styles)=>{
21
+ const { borderState, itemPadding, backgroundItemColor, roundedState } = styles || {};
22
+ const composeStyles = {
23
+ ...!itemPadding?.type ? composeSize(itemPadding?.custom) : {},
24
+ ...handleConvertBorderStyle(borderState),
25
+ ...handleConvertBorderWidth(borderState),
26
+ ...handleConvertBorderColor(borderState),
27
+ ...composeRadius(roundedState),
28
+ ...makeStyle({
29
+ bg: getGlobalColorCSSProp(backgroundItemColor)
30
+ })
31
+ };
32
+ return filterTruthyStyles(composeStyles);
33
+ };
34
+ const getTextFrontStyle = (styles)=>{
35
+ const { colorNumber, verticalGap } = styles || {};
36
+ let composeStyles = {};
37
+ if (colorNumber) {
38
+ composeStyles = {
39
+ ...makeStyle({
40
+ mb: verticalGap,
41
+ c: getGlobalColorCSSProp(colorNumber)
42
+ })
43
+ };
44
+ }
45
+ return filterTruthyStyles(composeStyles);
46
+ };
47
+ const getTextBackStyle = (styles)=>{
48
+ const { colorLabel } = styles || {};
49
+ let composeStyles = {};
50
+ if (colorLabel) {
51
+ composeStyles = {
52
+ ...makeStyle({
53
+ c: getGlobalColorCSSProp(colorLabel)
54
+ })
55
+ };
56
+ }
57
+ return filterTruthyStyles(composeStyles);
58
+ };
59
+
60
+ export { getContainStyle, getDateStyle, getTextBackStyle, getTextFrontStyle, getWrapperStyle };
@@ -0,0 +1,63 @@
1
+ import { useInteraction } from '@gem-sdk/core';
2
+ import { useTransition } from '../../../product/components/ProductVariants/common/common.js';
3
+ import { convertTime } from '../../helpers.js';
4
+ import useTimeLeft from './useTimeLeft.js';
5
+ import { useRef } from 'react';
6
+
7
+ const useCountDownTimer = (setting, builderProps)=>{
8
+ const ref = useRef(null);
9
+ const { trigger } = useInteraction();
10
+ const { timerDaily, timerEverygreen, dateStandard, behaviour, loopAfterFinish, redirectUrl, timeZone, enableDay, enableHour, enableMinute, enableSecond, enableWeek } = setting ?? {};
11
+ const timeLeft = useTimeLeft({
12
+ timerDaily: timerDaily,
13
+ timerEverygreen: timerEverygreen,
14
+ dateStandard: dateStandard,
15
+ behaviour: behaviour,
16
+ loopAfterFinish: loopAfterFinish,
17
+ redirectUrl: redirectUrl,
18
+ timeZone: timeZone
19
+ });
20
+ const { week, day, hour, minute, second } = convertTime(timeLeft, {
21
+ enableWeek: enableWeek,
22
+ enableDay: enableDay,
23
+ enableHour: enableHour,
24
+ enableMinute: enableMinute,
25
+ enableSecond: enableSecond
26
+ });
27
+ useTransition((preTimeLeft)=>{
28
+ if (preTimeLeft !== timeLeft) {
29
+ dispatchInteractionCountdownTimer(timeLeft);
30
+ }
31
+ }, [
32
+ timeLeft
33
+ ]);
34
+ const dispatchInteractionCountdownTimer = (timeLeft)=>{
35
+ const element = ref.current;
36
+ const gpInteractionCounter = new Map(Object.entries(JSON.parse(element?.getAttribute('gp-interaction-counter') ?? '{}')));
37
+ if (gpInteractionCounter.size <= 0) return;
38
+ gpInteractionCounter.forEach((_, key)=>{
39
+ if (timeLeft !== Number(key)) return;
40
+ trigger({
41
+ event: 'gp:countdown-timer',
42
+ selector: `[data-id="${builderProps?.uid}"]`,
43
+ element,
44
+ data: Number(key)
45
+ });
46
+ if (!setting?.loopAfterFinish) {
47
+ gpInteractionCounter.delete(key);
48
+ element.setAttribute('gp-interaction-counter', JSON.stringify(Object.fromEntries(gpInteractionCounter)));
49
+ }
50
+ });
51
+ };
52
+ return {
53
+ week,
54
+ day,
55
+ hour,
56
+ minute,
57
+ second,
58
+ timeLeft,
59
+ ref
60
+ };
61
+ };
62
+
63
+ export { useCountDownTimer as default };
@@ -1,5 +1,5 @@
1
1
  import { useMemo, useState, useRef, useCallback, useEffect } from 'react';
2
- import { standard, evergreen, daily, refreshAfterFinish } from '../helpers.js';
2
+ import { standard, evergreen, daily, refreshAfterFinish } from '../../helpers.js';
3
3
  import { useEditorMode } from '@gem-sdk/core';
4
4
 
5
5
  const useTimeLeft = (props)=>{
@@ -1,6 +1,6 @@
1
1
  import 'react/jsx-runtime';
2
- import 'react';
3
2
  import '@gem-sdk/core';
3
+ import 'react';
4
4
  import '@gem-sdk/system';
5
5
  import 'next/link';
6
6
  import config from './setting/Countdown.js';
@@ -1,6 +1,6 @@
1
- import { CountdownSettings } from './configs/settings.js';
2
1
  import { SettingUIV1 } from './configs/uiV1.js';
3
2
  import { SettingUIV2 } from './configs/uiV2.js';
3
+ import { CountdownSettings } from './configs/settings.js';
4
4
 
5
5
  const config = {
6
6
  tag: 'Countdown',
@@ -10,7 +10,7 @@ const CountdownSettings = [
10
10
  type: 'group',
11
11
  controls: [
12
12
  {
13
- id: 'option:value',
13
+ id: 'segment',
14
14
  type: 'group',
15
15
  controls: [
16
16
  {
@@ -45,7 +45,7 @@ const ProductPropertyInput = ({ setting, styles, builderProps, pageContext, attr
45
45
  value="${elementValue}"
46
46
  class="${inputClasses}"
47
47
  style="${inputStyles}"
48
- ${required ? `required="${required}"` : ''}
48
+ ${required ? `required="${required}"` : ''}
49
49
  minlength="${minChar}"
50
50
  maxlength="${maxChar}"
51
51
  ></${element}>
@@ -28,7 +28,7 @@ const ProductPropertiesSettingsV2 = [
28
28
  popoverLabel: 'Type',
29
29
  options: [
30
30
  {
31
- label: 'Text',
31
+ label: 'Text field',
32
32
  value: 'text',
33
33
  type: 'p-image-layout',
34
34
  iconName: 'gp-input-text'
@@ -40,7 +40,7 @@ const ProductPropertiesSettingsV2 = [
40
40
  iconName: 'gp-input-text-area'
41
41
  },
42
42
  {
43
- label: 'Email',
43
+ label: 'Email field',
44
44
  value: 'email',
45
45
  type: 'p-image-layout',
46
46
  iconName: 'gp-input-email'
@@ -52,7 +52,7 @@ const ProductPropertiesSettingsV2 = [
52
52
  iconName: 'gp-input-checkbox'
53
53
  },
54
54
  {
55
- label: 'Radio',
55
+ label: 'Radio button',
56
56
  value: 'radio',
57
57
  type: 'p-image-layout',
58
58
  iconName: 'gp-input-radio-button'
@@ -64,7 +64,7 @@ const ProductPropertiesSettingsV2 = [
64
64
  iconName: 'gp-input-dropdown'
65
65
  },
66
66
  {
67
- label: 'Hidden',
67
+ label: 'Hidden field',
68
68
  value: 'hidden',
69
69
  type: 'p-image-layout',
70
70
  iconName: 'gp-input-hidden-field'
@@ -76,7 +76,7 @@ const ProductPropertiesSettingsV2 = [
76
76
  id: 'label',
77
77
  label: 'Label',
78
78
  type: 'input',
79
- default: '',
79
+ default: 'Label',
80
80
  placeholder: 'E.g. Input your name below'
81
81
  },
82
82
  {
@@ -190,7 +190,7 @@ const ProductPropertiesSettingsV2 = [
190
190
  id: 'isDisplayLabel',
191
191
  label: 'Label',
192
192
  type: 'toggle',
193
- default: true
193
+ default: false
194
194
  },
195
195
  {
196
196
  id: 'labelTypo',
@@ -203,7 +203,8 @@ const ProductPropertiesSettingsV2 = [
203
203
  }
204
204
  },
205
205
  hiddenSetting: {
206
- textAlign: true
206
+ textAlign: true,
207
+ textShadow: true
207
208
  },
208
209
  ignoreReRender: true
209
210
  },
@@ -247,11 +248,15 @@ const ProductPropertiesSettingsV2 = [
247
248
  type: 'typography-v2',
248
249
  label: 'Typography',
249
250
  default: {
250
- type: 'paragraph-1'
251
+ type: 'paragraph-1',
252
+ attrs: {
253
+ color: 'text-1'
254
+ }
251
255
  },
252
256
  hiddenSetting: {
253
257
  color: false,
254
- textAlign: true
258
+ textAlign: true,
259
+ textShadow: true
255
260
  },
256
261
  ignoreReRender: true
257
262
  },
@@ -346,7 +351,9 @@ const ProductPropertiesSettingsV2 = [
346
351
  type: 'color-picker-v2',
347
352
  label: 'Text Color',
348
353
  default: {
349
- normal: 'text-1'
354
+ normal: 'text-1',
355
+ focus: 'transparent',
356
+ hover: 'transparent'
350
357
  },
351
358
  state: {
352
359
  normal: true,
@@ -359,7 +366,9 @@ const ProductPropertiesSettingsV2 = [
359
366
  type: 'color-picker-v2',
360
367
  label: 'Text Color',
361
368
  default: {
362
- normal: 'text-1'
369
+ normal: 'text-1',
370
+ hover: 'transparent',
371
+ active: 'transparent'
363
372
  },
364
373
  state: {
365
374
  normal: true,
@@ -375,6 +384,12 @@ const ProductPropertiesSettingsV2 = [
375
384
  desktop: {
376
385
  default: {
377
386
  normal: {
387
+ border: 'solid',
388
+ borderWidth: '1px',
389
+ width: '1px',
390
+ color: '#121212'
391
+ },
392
+ hover: {
378
393
  borderType: 'none',
379
394
  border: 'none',
380
395
  borderWidth: '1px',
@@ -382,7 +397,7 @@ const ProductPropertiesSettingsV2 = [
382
397
  color: '#121212',
383
398
  isCustom: true
384
399
  },
385
- hover: {
400
+ focus: {
386
401
  borderType: 'none',
387
402
  border: 'none',
388
403
  borderWidth: '1px',
@@ -407,6 +422,12 @@ const ProductPropertiesSettingsV2 = [
407
422
  color: '#212121',
408
423
  width: '1px',
409
424
  borderWidth: '1px'
425
+ },
426
+ focus: {
427
+ border: 'solid',
428
+ color: '#212121',
429
+ width: '1px',
430
+ borderWidth: '1px'
410
431
  }
411
432
  }
412
433
  }
@@ -418,12 +439,20 @@ const ProductPropertiesSettingsV2 = [
418
439
  label: 'Background Color',
419
440
  devices: {
420
441
  desktop: {
421
- default: {}
442
+ default: {
443
+ normal: '#FFFFFF',
444
+ hover: '#DDDDDD',
445
+ focus: 'transparent'
446
+ }
422
447
  }
423
448
  },
424
449
  compoDefaultValue: {
425
450
  desktop: {
426
- default: {}
451
+ default: {
452
+ normal: '#FFFFFF',
453
+ hover: '#DDDDDD',
454
+ focus: 'transparent'
455
+ }
427
456
  }
428
457
  },
429
458
  enableGradient: true
@@ -320,6 +320,7 @@ const SettingUIV2 = [
320
320
  }
321
321
  },
322
322
  {
323
+ conditionDisplay: 'isDisplayLabel !== false',
323
324
  type: 'combo',
324
325
  iconName: 'polaris-text-block',
325
326
  getValueFromSettingID: 'label',
@@ -339,6 +340,7 @@ const SettingUIV2 = [
339
340
  ]
340
341
  },
341
342
  {
343
+ conditionDisplay: 'isDisplayLabel !== false',
342
344
  setting: {
343
345
  id: 'labelTypo'
344
346
  },
@@ -535,6 +537,7 @@ const SettingUIV2 = [
535
537
  },
536
538
  type: 'combo',
537
539
  isHideClear: true,
540
+ getValueFromSettingID: 'name',
538
541
  controls: [
539
542
  {
540
543
  setting: {
@@ -626,7 +629,7 @@ const SettingUIV2 = [
626
629
  },
627
630
  {
628
631
  type: 'combo',
629
- conditionDisplay: '["text", "textarea"].includes(type)',
632
+ conditionDisplay: '["text", "textarea"].includes(type) && numberOnly === true',
630
633
  label: {
631
634
  en: 'Invalid number'
632
635
  },
@@ -666,7 +669,7 @@ const SettingUIV2 = [
666
669
  },
667
670
  {
668
671
  type: 'combo',
669
- conditionDisplay: 'type !== "hidden"',
672
+ conditionDisplay: 'type !== "hidden" && required === true',
670
673
  label: {
671
674
  en: 'Missing required'
672
675
  },
@@ -14,7 +14,7 @@ const AliReviews = ({ setting, advanced })=>{
14
14
  {% when 'starRating' %}
15
15
  <div class='alireviews-review-star-rating' product-handle='{{product.handle}}' product-id='{{product.id}}'> </div >
16
16
  {% when 'reviewBox' %}
17
- <div class="alireviews-review-box"> </div
17
+ <div class="alireviews-review-box"> </div
18
18
  {% endcase %}
19
19
  </div>
20
20
  `;
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import { FERA_VERSION } from '../FeraReviews.js';
4
3
  import ThirdPartyPreview from '../ThirdPartyPreview.js';
5
4
  import FeraReviewsConfig from '../../configs/FeraReviews.js';
6
5
  import { useMemo } from 'react';
6
+ import { FERA_VERSION } from '../../types/index.js';
7
7
 
8
8
  const mapWidgetLabelV2 = {
9
9
  productReviews: 'Product Reviews',
@@ -1,5 +1,5 @@
1
- import { FERA_VERSION } from '../FeraReviews.js';
2
1
  import { template, makeStyleResponsive } from '@gem-sdk/core';
2
+ import { FERA_VERSION } from '../../types/index.js';
3
3
 
4
4
  const getTemplateByWidget = (setting)=>{
5
5
  switch(setting?.feraVersion){
@@ -4,10 +4,6 @@ import { useEditorMode, makeStyleResponsive } from '@gem-sdk/core';
4
4
  import dynamic from 'next/dynamic';
5
5
 
6
6
  const FeraReviewsSampleContent = dynamic(()=>import('./FeraReviews/FeraReviewsSampleContent.js'));
7
- const FERA_VERSION = {
8
- V2: 'V2',
9
- V3: 'V3'
10
- };
11
7
  const FeraReviews = ({ setting })=>{
12
8
  const mode = useEditorMode();
13
9
  return /*#__PURE__*/ jsx("div", {
@@ -20,4 +16,4 @@ const FeraReviews = ({ setting })=>{
20
16
  });
21
17
  };
22
18
 
23
- export { FERA_VERSION, FeraReviews as default };
19
+ export { FeraReviews as default };
@@ -76,8 +76,8 @@ const GoogleReviewsByReputon = ({ setting, advanced })=>{
76
76
  data-type="basic_slide"
77
77
  data-sticky="true"
78
78
  {% endcase %}
79
- <script
80
- type="text/javascript"
79
+ <script
80
+ type="text/javascript"
81
81
  src="https://cdn.grw.reputon.com/assets/widget.js?shop={{shop.domain}}" defer></script>
82
82
  </div>
83
83
  `;
@@ -15,7 +15,7 @@ const JudgemeReviews = ({ setting, advanced })=>{
15
15
  {% when "single_product_preview_badge" %}
16
16
  <div style='{{ jm_style }}' class='jdgm-widget jdgm-preview-badge' data-id='{{ product.id }}'>
17
17
  {{ product.metafields.judgeme.badge }}
18
- </div>
18
+ </div>
19
19
  {% when "review_widget" %}
20
20
  <div style='clear:both'></div>
21
21
  <div id='judgeme_product_reviews' class='jdgm-widget jdgm-review-widget' data-id='{{ product.id }}'>
@@ -23,7 +23,7 @@ const JudgemeReviews = ({ setting, advanced })=>{
23
23
  </div>
24
24
  {% when "reviews_carousel" %}
25
25
  <div class='jdgm-carousel-wrapper'>
26
- {% assign jm_metafields = shop.metafields.judgeme %}
26
+ {% assign jm_metafields = shop.metafields.judgeme %}
27
27
  <div class='jdgm-carousel-title-and-link'>
28
28
  <h2 class='jdgm-carousel-title'>Let customers speak for us</h2>
29
29
  <span class='jdgm-all-reviews-rating-wrapper' href='javascript:void(0)'>
@@ -31,7 +31,7 @@ const JudgemeReviews = ({ setting, advanced })=>{
31
31
  <span style='display: block' class='jdgm-carousel-number-of-reviews' data-number-of-reviews='{{ jm_metafields.all_reviews_count }}'>
32
32
  from {{ shop.metafields.judgeme.all_reviews_count }} reviews
33
33
  </span>
34
- </span>
34
+ </span>
35
35
  </div>
36
36
  {{ jm_metafields.featured_carousel }}
37
37
  </div>
@@ -44,14 +44,14 @@ const JudgemeReviews = ({ setting, advanced })=>{
44
44
  Customers rate us {{ shop.metafields.judgeme.all_reviews_rating | round: 1 }}/5 based on {{ shop.metafields.judgeme.all_reviews_count }} reviews.
45
45
  </span>
46
46
  </a>
47
- </div>
47
+ </div>
48
48
  </div>
49
49
  {% when "section_for_medals" %}
50
50
  {{ shop.metafields.judgeme.medals }}
51
51
  {% when "ugc_media_grid" %}
52
52
  <div class='jdgm-widget jdgm-ugc-media-wrapper'>
53
53
  {{ shop.metafields.judgeme.ugc_media_grid }}
54
- </div>
54
+ </div>
55
55
  {% when "verified_reviews_count_badge" %}
56
56
  <div style='clear:both'></div>
57
57
  <div style='text-align: center'>
@@ -10,7 +10,7 @@ const KachingBundles = ({ setting, advanced })=>{
10
10
  ...makeStyleResponsive('ta', align)
11
11
  }}"
12
12
  >
13
- <kaching-bundle product-id="{{ product.id }}"></kaching-bundle>
13
+ <kaching-bundle product-id="{{ product.id }}"></kaching-bundle>
14
14
  </div>
15
15
  <script>
16
16
  window.kachingBundlesDisableAddToCartHandling = true;
@@ -9,7 +9,7 @@ const KingProductOptions = ({ setting, advanced })=>{
9
9
  ...makeStyleResponsive('ta', align)
10
10
  }}"
11
11
  >
12
- <variant-selects
12
+ <variant-selects
13
13
  id="variant-selects-{{ section.id }}"
14
14
  data-section="{{ section.id }}"
15
15
  data-url="{{ product.url }}"
@@ -45,7 +45,7 @@ const productReviewWidget = `
45
45
  </div>
46
46
  `;
47
47
  const starRatings = `
48
- <div class="scm-reviews-rate" data-rate-version2="{{ product.metafields.scm_review_importer.reviewsData.reviewCountInfo | json | escape}}" data-product-id="{{ product.id }}"></div>
48
+ <div class="scm-reviews-rate" data-rate-version2="{{ product.metafields.scm_review_importer.reviewsData.reviewCountInfo | json | escape}}" data-product-id="{{ product.id }}"></div>
49
49
  `;
50
50
  // Advanced
51
51
  const cardCarousel = `
@@ -78,8 +78,8 @@ const happyCustomerReviews = `
78
78
  {% endunless %}
79
79
  `;
80
80
  const starRatingsInList = `
81
- <div class="scm-reviews-rate"
82
- data-rate-version2="{{ product.metafields.scm_review_importer.reviewsData.reviewCountInfo | json | escape }}"
81
+ <div class="scm-reviews-rate"
82
+ data-rate-version2="{{ product.metafields.scm_review_importer.reviewsData.reviewCountInfo | json | escape }}"
83
83
  data-product-id="{{ product.id }}"></div>
84
84
  `;
85
85
 
@@ -39,7 +39,7 @@ const LooxReviews = ({ setting, advanced })=>{
39
39
  {% if '${widgetType}' == "rating_widget" %}
40
40
  {% if '${showRatingWidgetAllReviews}' == 'true' %}
41
41
  {% if shop.metafields.loox["global_stats"] %}
42
- {% assign looxstats = shop.metafields.loox["global_stats"] | split: ',' %}
42
+ {% assign looxstats = shop.metafields.loox["global_stats"] | split: ',' %}
43
43
  <a href="#looxReviews">
44
44
  <div class="loox-rating" data-rating="{{ looxstats[0] }}" data-raters="{{ looxstats[1] }}"></div>
45
45
  </a>
@@ -12,7 +12,7 @@ const Ryviu = ({ setting, advanced })=>{
12
12
  {% assign widget = '${widgetType}' %}
13
13
  {% case widget %}
14
14
  {% when "reviews" %}
15
- <div class="lt-block-reviews">
15
+ <div class="lt-block-reviews">
16
16
  <ryviu-widget handle="{{product.handle}}" product_id="{{product.id}}" title_product="{{product.title}}" total_meta="{{ product.metafields.ryviu.r_count }}" image_product="{{ product.featured_image.src | img_url: '100x' }}"></ryviu-widget>
17
17
  </div>
18
18
  {% when "badge" %}
@@ -32,9 +32,9 @@ const Vitals = ({ setting, advanced })=>{
32
32
  {% when "stockScarcity" %}
33
33
  <div id="vitals-stock-urgency"></div>
34
34
  {% when "sizeChart" %}
35
- <div id="vitals-size_chart"></div>
35
+ <div id="vitals-size_chart"></div>
36
36
  {% when "upsellBuilderBogo" %}
37
- <div id="vitals-upsell-builder-bogo"></div>
37
+ <div id="vitals-upsell-builder-bogo"></div>
38
38
  {% when "bundleCountdownBox" %}
39
39
  <div id="bundle-countdown_box"></div>
40
40
  {% when "reviewsUnderTitle" %}
@@ -126,12 +126,12 @@ const config = {
126
126
  }
127
127
  },
128
128
  {
129
- type: "control",
129
+ type: 'control',
130
130
  label: {
131
- en: "Choose widget"
131
+ en: 'Choose widget'
132
132
  },
133
133
  setting: {
134
- id: "widgetType"
134
+ id: 'widgetType'
135
135
  }
136
136
  },
137
137
  {