@gem-sdk/components 2.0.0-dev.595 → 2.0.0-dev.596

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.
@@ -124,7 +124,6 @@ const Countdown = (props)=>{
124
124
  children: ' '
125
125
  })),
126
126
  system.If(enableWeek, timeTemplate(week, weekLabel)),
127
- system.If(enableWeek, timeTemplate(week, weekLabel)),
128
127
  system.If(enableDay, timeTemplate(day, dayLabel)),
129
128
  system.If(enableHour, timeTemplate(hour, hourLabel)),
130
129
  system.If(enableMinute, timeTemplate(minute, minuteLabel)),
@@ -22,7 +22,7 @@ const getContainStyle = (styles)=>{
22
22
  const getDateStyle = (styles)=>{
23
23
  const { borderState, itemPadding, backgroundItemColor, roundedState } = styles || {};
24
24
  const composeStyles = {
25
- ...!itemPadding?.type ? core.composeSize(itemPadding?.custom) : {},
25
+ ...core.getPaddingStyleByDevice(itemPadding),
26
26
  ...core.handleConvertBorderStyle(borderState),
27
27
  ...core.handleConvertBorderWidth(borderState),
28
28
  ...core.handleConvertBorderColor(borderState),
@@ -255,7 +255,7 @@ const CountdownSettings = [
255
255
  id: 'dayLabel',
256
256
  label: 'Label',
257
257
  type: 'input',
258
- default: 'Days',
258
+ default: 'Day',
259
259
  hide: false
260
260
  },
261
261
  {
@@ -278,7 +278,7 @@ const CountdownSettings = [
278
278
  id: 'hourLabel',
279
279
  label: 'Label',
280
280
  type: 'input',
281
- default: 'Hours',
281
+ default: 'Hour',
282
282
  hide: false
283
283
  },
284
284
  {
@@ -301,7 +301,7 @@ const CountdownSettings = [
301
301
  id: 'minuteLabel',
302
302
  label: 'Label',
303
303
  type: 'input',
304
- default: 'Minutes',
304
+ default: 'Minute',
305
305
  hide: false
306
306
  },
307
307
  {
@@ -324,7 +324,7 @@ const CountdownSettings = [
324
324
  id: 'secondLabel',
325
325
  label: 'Label',
326
326
  type: 'input',
327
- default: 'Seconds',
327
+ default: 'Second',
328
328
  hide: false
329
329
  },
330
330
  {
@@ -347,7 +347,7 @@ const CountdownSettings = [
347
347
  id: 'weekLabel',
348
348
  label: 'Label',
349
349
  type: 'input',
350
- default: 'Weeks',
350
+ default: 'Week',
351
351
  hide: false
352
352
  }
353
353
  ]
@@ -408,11 +408,7 @@ const CountdownSettings = [
408
408
  bold: true
409
409
  }
410
410
  },
411
- ignoreReRender: true,
412
- hiddenSetting: {
413
- textAlign: true,
414
- textShadow: true
415
- }
411
+ ignoreReRender: true
416
412
  },
417
413
  {
418
414
  id: 'colorNumber',
@@ -437,11 +433,7 @@ const CountdownSettings = [
437
433
  color: 'text-1'
438
434
  }
439
435
  },
440
- ignoreReRender: true,
441
- hiddenSetting: {
442
- textAlign: true,
443
- textShadow: true
444
- }
436
+ ignoreReRender: true
445
437
  },
446
438
  {
447
439
  id: 'colorLabel',
@@ -534,7 +526,7 @@ const CountdownSettings = [
534
526
  units: [
535
527
  'px'
536
528
  ],
537
- default: '0px'
529
+ default: '8px'
538
530
  },
539
531
  {
540
532
  id: 'horizontalGap',
@@ -545,16 +537,18 @@ const CountdownSettings = [
545
537
  units: [
546
538
  'px'
547
539
  ],
548
- default: '8px'
540
+ default: '16px'
549
541
  },
550
542
  {
551
543
  id: 'itemPadding',
552
544
  label: 'Padding',
553
545
  type: 'padding-v2',
554
546
  default: {
555
- type: 'medium'
556
- },
557
- ignoreReRender: true
547
+ top: '8px',
548
+ left: '24px',
549
+ right: '24px',
550
+ bottom: '8px'
551
+ }
558
552
  }
559
553
  ]
560
554
  },
@@ -47,7 +47,7 @@ const SettingUIV2 = [
47
47
  layout: 'vertical'
48
48
  },
49
49
  {
50
- conditionDisplay: 'behaviour === "evergreen"',
50
+ conditionDisplay: 'behaviour === "evergreen" && autoHideWhenTimeout === false',
51
51
  label: {
52
52
  en: 'Loop (refresh after finish)'
53
53
  },
@@ -67,7 +67,7 @@ const SettingUIV2 = [
67
67
  label: {
68
68
  en: 'Items'
69
69
  },
70
- fixedValue: 'Edit...',
70
+ fixedValue: '5 items',
71
71
  iconName: 'polaris-list-bulleted',
72
72
  popoverLabel: {
73
73
  en: 'Item management'
@@ -84,7 +84,7 @@ const SettingUIV2 = [
84
84
  },
85
85
  {
86
86
  label: {
87
- en: 'Week label'
87
+ en: 'Week caption'
88
88
  },
89
89
  conditionDisplay: 'enableWeek === true',
90
90
  setting: {
@@ -101,7 +101,7 @@ const SettingUIV2 = [
101
101
  },
102
102
  {
103
103
  label: {
104
- en: 'Day label'
104
+ en: 'Day caption'
105
105
  },
106
106
  conditionDisplay: 'enableDay === true',
107
107
  setting: {
@@ -118,7 +118,7 @@ const SettingUIV2 = [
118
118
  },
119
119
  {
120
120
  label: {
121
- en: 'Hour label'
121
+ en: 'Hour caption'
122
122
  },
123
123
  conditionDisplay: 'enableHour === true',
124
124
  setting: {
@@ -135,7 +135,7 @@ const SettingUIV2 = [
135
135
  },
136
136
  {
137
137
  label: {
138
- en: 'Minute label'
138
+ en: 'Minute caption'
139
139
  },
140
140
  conditionDisplay: 'enableMinute === true',
141
141
  setting: {
@@ -152,7 +152,7 @@ const SettingUIV2 = [
152
152
  },
153
153
  {
154
154
  label: {
155
- en: 'Second label'
155
+ en: 'Second caption'
156
156
  },
157
157
  conditionDisplay: 'enableSecond === true',
158
158
  setting: {
@@ -198,7 +198,7 @@ const SettingUIV2 = [
198
198
  en: 'Item gap'
199
199
  },
200
200
  setting: {
201
- id: 'horizontalGap'
201
+ id: 'verticalGap'
202
202
  }
203
203
  },
204
204
  {
@@ -257,13 +257,16 @@ const SettingUIV2 = [
257
257
  },
258
258
  conditionDisplay: 'enableLabelTextStyle == true',
259
259
  type: 'combo',
260
+ popoverLabel: {
261
+ en: 'Time text style'
262
+ },
260
263
  iconName: 'polaris-text-title',
261
- getValueFromSettingID: 'labelTypo.type',
264
+ getValueFromSettingID: 'numTypo.type',
262
265
  isHideClear: true,
263
266
  controls: [
264
267
  {
265
268
  setting: {
266
- id: 'labelTypo'
269
+ id: 'numTypo'
267
270
  },
268
271
  layout: 'vertical'
269
272
  }
@@ -289,26 +292,36 @@ const SettingUIV2 = [
289
292
  label: {
290
293
  en: 'Text style'
291
294
  },
295
+ popoverLabel: {
296
+ en: 'Caption text style'
297
+ },
292
298
  conditionDisplay: 'enableNumberTextStyle == true',
293
299
  type: 'combo',
294
300
  iconName: 'polaris-text-title',
295
301
  isHideClear: true,
296
- getValueFromSettingID: 'numTypo.type',
302
+ getValueFromSettingID: 'labelTypo.type',
297
303
  controls: [
298
304
  {
299
305
  setting: {
300
- id: 'numTypo'
306
+ id: 'labelTypo'
301
307
  },
302
308
  layout: 'vertical'
303
309
  }
304
310
  ]
305
- },
311
+ }
312
+ ]
313
+ },
314
+ {
315
+ label: {
316
+ en: 'Item spacing'
317
+ },
318
+ controls: [
306
319
  {
307
320
  label: {
308
- en: 'Item gap'
321
+ en: 'gap'
309
322
  },
310
323
  setting: {
311
- id: 'verticalGap'
324
+ id: 'horizontalGap'
312
325
  }
313
326
  }
314
327
  ]
@@ -343,7 +356,7 @@ const SettingUIV2 = [
343
356
  en: 'Border'
344
357
  },
345
358
  setting: {
346
- id: 'borderState',
359
+ id: 'border',
347
360
  state: 'normal'
348
361
  }
349
362
  },
@@ -352,7 +365,7 @@ const SettingUIV2 = [
352
365
  en: 'Corner'
353
366
  },
354
367
  setting: {
355
- id: 'roundedState',
368
+ id: 'rounded',
356
369
  state: 'normal'
357
370
  }
358
371
  },
@@ -1,4 +1,3 @@
1
- 'use client';
2
1
  'use strict';
3
2
 
4
3
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -7,7 +7,6 @@ var core = require('@gem-sdk/core');
7
7
 
8
8
  const Releasit = ({ setting, advanced })=>{
9
9
  const { align, version, appBlockId } = setting ?? {};
10
- console.log('version', version);
11
10
  return version === 'v2' ? thirdParty.getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''}!gp-block`) : core.template`
12
11
  <div
13
12
  class="${advanced?.cssClass}"
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var BoldProductOptionsConfig = {
6
6
  id: 'bold-product-options',
7
7
  label: 'SC Product Options',
8
- logoUrl: 'https://cdn.shopify.com/app-store/listing_images/9a0bf1159f79c6ab0660ec422f350445/icon/CP2Uwo_GuYIDEAE=.png?width=22&height=22',
8
+ logoUrl: 'https://cdn.shopify.com/app-store/listing_images/9a0bf1159f79c6ab0660ec422f350445/icon/CP2Uwo_GuYIDEAE=.png',
9
9
  tag: 'BoldProductOptions'
10
10
  };
11
11
 
@@ -120,7 +120,6 @@ const Countdown = (props)=>{
120
120
  children: ' '
121
121
  })),
122
122
  If(enableWeek, timeTemplate(week, weekLabel)),
123
- If(enableWeek, timeTemplate(week, weekLabel)),
124
123
  If(enableDay, timeTemplate(day, dayLabel)),
125
124
  If(enableHour, timeTemplate(hour, hourLabel)),
126
125
  If(enableMinute, timeTemplate(minute, minuteLabel)),
@@ -1,4 +1,4 @@
1
- import { makeStyleResponsive, composeSize, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, composeRadius, makeStyle, getGlobalColorCSSProp } from '@gem-sdk/core';
1
+ import { makeStyleResponsive, getPaddingStyleByDevice, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, composeRadius, makeStyle, getGlobalColorCSSProp } from '@gem-sdk/core';
2
2
 
3
3
  function filterTruthyStyles(styles) {
4
4
  return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
@@ -20,7 +20,7 @@ const getContainStyle = (styles)=>{
20
20
  const getDateStyle = (styles)=>{
21
21
  const { borderState, itemPadding, backgroundItemColor, roundedState } = styles || {};
22
22
  const composeStyles = {
23
- ...!itemPadding?.type ? composeSize(itemPadding?.custom) : {},
23
+ ...getPaddingStyleByDevice(itemPadding),
24
24
  ...handleConvertBorderStyle(borderState),
25
25
  ...handleConvertBorderWidth(borderState),
26
26
  ...handleConvertBorderColor(borderState),
@@ -253,7 +253,7 @@ const CountdownSettings = [
253
253
  id: 'dayLabel',
254
254
  label: 'Label',
255
255
  type: 'input',
256
- default: 'Days',
256
+ default: 'Day',
257
257
  hide: false
258
258
  },
259
259
  {
@@ -276,7 +276,7 @@ const CountdownSettings = [
276
276
  id: 'hourLabel',
277
277
  label: 'Label',
278
278
  type: 'input',
279
- default: 'Hours',
279
+ default: 'Hour',
280
280
  hide: false
281
281
  },
282
282
  {
@@ -299,7 +299,7 @@ const CountdownSettings = [
299
299
  id: 'minuteLabel',
300
300
  label: 'Label',
301
301
  type: 'input',
302
- default: 'Minutes',
302
+ default: 'Minute',
303
303
  hide: false
304
304
  },
305
305
  {
@@ -322,7 +322,7 @@ const CountdownSettings = [
322
322
  id: 'secondLabel',
323
323
  label: 'Label',
324
324
  type: 'input',
325
- default: 'Seconds',
325
+ default: 'Second',
326
326
  hide: false
327
327
  },
328
328
  {
@@ -345,7 +345,7 @@ const CountdownSettings = [
345
345
  id: 'weekLabel',
346
346
  label: 'Label',
347
347
  type: 'input',
348
- default: 'Weeks',
348
+ default: 'Week',
349
349
  hide: false
350
350
  }
351
351
  ]
@@ -406,11 +406,7 @@ const CountdownSettings = [
406
406
  bold: true
407
407
  }
408
408
  },
409
- ignoreReRender: true,
410
- hiddenSetting: {
411
- textAlign: true,
412
- textShadow: true
413
- }
409
+ ignoreReRender: true
414
410
  },
415
411
  {
416
412
  id: 'colorNumber',
@@ -435,11 +431,7 @@ const CountdownSettings = [
435
431
  color: 'text-1'
436
432
  }
437
433
  },
438
- ignoreReRender: true,
439
- hiddenSetting: {
440
- textAlign: true,
441
- textShadow: true
442
- }
434
+ ignoreReRender: true
443
435
  },
444
436
  {
445
437
  id: 'colorLabel',
@@ -532,7 +524,7 @@ const CountdownSettings = [
532
524
  units: [
533
525
  'px'
534
526
  ],
535
- default: '0px'
527
+ default: '8px'
536
528
  },
537
529
  {
538
530
  id: 'horizontalGap',
@@ -543,16 +535,18 @@ const CountdownSettings = [
543
535
  units: [
544
536
  'px'
545
537
  ],
546
- default: '8px'
538
+ default: '16px'
547
539
  },
548
540
  {
549
541
  id: 'itemPadding',
550
542
  label: 'Padding',
551
543
  type: 'padding-v2',
552
544
  default: {
553
- type: 'medium'
554
- },
555
- ignoreReRender: true
545
+ top: '8px',
546
+ left: '24px',
547
+ right: '24px',
548
+ bottom: '8px'
549
+ }
556
550
  }
557
551
  ]
558
552
  },
@@ -45,7 +45,7 @@ const SettingUIV2 = [
45
45
  layout: 'vertical'
46
46
  },
47
47
  {
48
- conditionDisplay: 'behaviour === "evergreen"',
48
+ conditionDisplay: 'behaviour === "evergreen" && autoHideWhenTimeout === false',
49
49
  label: {
50
50
  en: 'Loop (refresh after finish)'
51
51
  },
@@ -65,7 +65,7 @@ const SettingUIV2 = [
65
65
  label: {
66
66
  en: 'Items'
67
67
  },
68
- fixedValue: 'Edit...',
68
+ fixedValue: '5 items',
69
69
  iconName: 'polaris-list-bulleted',
70
70
  popoverLabel: {
71
71
  en: 'Item management'
@@ -82,7 +82,7 @@ const SettingUIV2 = [
82
82
  },
83
83
  {
84
84
  label: {
85
- en: 'Week label'
85
+ en: 'Week caption'
86
86
  },
87
87
  conditionDisplay: 'enableWeek === true',
88
88
  setting: {
@@ -99,7 +99,7 @@ const SettingUIV2 = [
99
99
  },
100
100
  {
101
101
  label: {
102
- en: 'Day label'
102
+ en: 'Day caption'
103
103
  },
104
104
  conditionDisplay: 'enableDay === true',
105
105
  setting: {
@@ -116,7 +116,7 @@ const SettingUIV2 = [
116
116
  },
117
117
  {
118
118
  label: {
119
- en: 'Hour label'
119
+ en: 'Hour caption'
120
120
  },
121
121
  conditionDisplay: 'enableHour === true',
122
122
  setting: {
@@ -133,7 +133,7 @@ const SettingUIV2 = [
133
133
  },
134
134
  {
135
135
  label: {
136
- en: 'Minute label'
136
+ en: 'Minute caption'
137
137
  },
138
138
  conditionDisplay: 'enableMinute === true',
139
139
  setting: {
@@ -150,7 +150,7 @@ const SettingUIV2 = [
150
150
  },
151
151
  {
152
152
  label: {
153
- en: 'Second label'
153
+ en: 'Second caption'
154
154
  },
155
155
  conditionDisplay: 'enableSecond === true',
156
156
  setting: {
@@ -196,7 +196,7 @@ const SettingUIV2 = [
196
196
  en: 'Item gap'
197
197
  },
198
198
  setting: {
199
- id: 'horizontalGap'
199
+ id: 'verticalGap'
200
200
  }
201
201
  },
202
202
  {
@@ -255,13 +255,16 @@ const SettingUIV2 = [
255
255
  },
256
256
  conditionDisplay: 'enableLabelTextStyle == true',
257
257
  type: 'combo',
258
+ popoverLabel: {
259
+ en: 'Time text style'
260
+ },
258
261
  iconName: 'polaris-text-title',
259
- getValueFromSettingID: 'labelTypo.type',
262
+ getValueFromSettingID: 'numTypo.type',
260
263
  isHideClear: true,
261
264
  controls: [
262
265
  {
263
266
  setting: {
264
- id: 'labelTypo'
267
+ id: 'numTypo'
265
268
  },
266
269
  layout: 'vertical'
267
270
  }
@@ -287,26 +290,36 @@ const SettingUIV2 = [
287
290
  label: {
288
291
  en: 'Text style'
289
292
  },
293
+ popoverLabel: {
294
+ en: 'Caption text style'
295
+ },
290
296
  conditionDisplay: 'enableNumberTextStyle == true',
291
297
  type: 'combo',
292
298
  iconName: 'polaris-text-title',
293
299
  isHideClear: true,
294
- getValueFromSettingID: 'numTypo.type',
300
+ getValueFromSettingID: 'labelTypo.type',
295
301
  controls: [
296
302
  {
297
303
  setting: {
298
- id: 'numTypo'
304
+ id: 'labelTypo'
299
305
  },
300
306
  layout: 'vertical'
301
307
  }
302
308
  ]
303
- },
309
+ }
310
+ ]
311
+ },
312
+ {
313
+ label: {
314
+ en: 'Item spacing'
315
+ },
316
+ controls: [
304
317
  {
305
318
  label: {
306
- en: 'Item gap'
319
+ en: 'gap'
307
320
  },
308
321
  setting: {
309
- id: 'verticalGap'
322
+ id: 'horizontalGap'
310
323
  }
311
324
  }
312
325
  ]
@@ -341,7 +354,7 @@ const SettingUIV2 = [
341
354
  en: 'Border'
342
355
  },
343
356
  setting: {
344
- id: 'borderState',
357
+ id: 'border',
345
358
  state: 'normal'
346
359
  }
347
360
  },
@@ -350,7 +363,7 @@ const SettingUIV2 = [
350
363
  en: 'Corner'
351
364
  },
352
365
  setting: {
353
- id: 'roundedState',
366
+ id: 'rounded',
354
367
  state: 'normal'
355
368
  }
356
369
  },
@@ -1,4 +1,3 @@
1
- 'use client';
2
1
  import { jsx } from 'react/jsx-runtime';
3
2
  import { useEditorMode, makeStyleResponsive } from '@gem-sdk/core';
4
3
  import dynamic from 'next/dynamic';
@@ -3,7 +3,6 @@ import { template, makeStyleResponsive } from '@gem-sdk/core';
3
3
 
4
4
  const Releasit = ({ setting, advanced })=>{
5
5
  const { align, version, appBlockId } = setting ?? {};
6
- console.log('version', version);
7
6
  return version === 'v2' ? getLiquidForAppBlock(appBlockId, align, `${advanced?.cssClass ?? ''}!gp-block`) : template`
8
7
  <div
9
8
  class="${advanced?.cssClass}"
@@ -1,7 +1,7 @@
1
1
  var BoldProductOptionsConfig = {
2
2
  id: 'bold-product-options',
3
3
  label: 'SC Product Options',
4
- logoUrl: 'https://cdn.shopify.com/app-store/listing_images/9a0bf1159f79c6ab0660ec422f350445/icon/CP2Uwo_GuYIDEAE=.png?width=22&height=22',
4
+ logoUrl: 'https://cdn.shopify.com/app-store/listing_images/9a0bf1159f79c6ab0660ec422f350445/icon/CP2Uwo_GuYIDEAE=.png',
5
5
  tag: 'BoldProductOptions'
6
6
  };
7
7
 
@@ -1357,7 +1357,7 @@ type CountdownProps = BaseProps<{
1357
1357
  roundedState?: StateProp<CornerRadius>;
1358
1358
  verticalGap?: string;
1359
1359
  horizontalGap?: string;
1360
- itemPadding?: SizeSetting;
1360
+ itemPadding?: PaddingType$1;
1361
1361
  }> & {
1362
1362
  pageContext?: PageContext;
1363
1363
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.595",
3
+ "version": "2.0.0-dev.596",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -23,7 +23,7 @@
23
23
  "update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
24
24
  },
25
25
  "devDependencies": {
26
- "@gem-sdk/core": "2.0.0-dev.595",
26
+ "@gem-sdk/core": "2.0.0-dev.596",
27
27
  "@gem-sdk/styles": "2.0.0-dev.571",
28
28
  "@gem-sdk/system": "2.0.0-dev.504",
29
29
  "@types/react-transition-group": "^4.4.5"