@gem-sdk/components 2.0.0-dev.552 → 2.0.0-dev.553

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 (25) hide show
  1. package/dist/cjs/coupon/common/classes.js +1 -1
  2. package/dist/cjs/coupon/common/styles.js +4 -2
  3. package/dist/cjs/coupon/setting/config/settings.js +7 -3
  4. package/dist/cjs/coupon/setting/config/uiV2.js +65 -64
  5. package/dist/cjs/marquee/setting/configs/settingsV2.js +3 -3
  6. package/dist/cjs/product/components/ProductPrice/hooks/useGpPrice.js +1 -1
  7. package/dist/cjs/product/setting/constant/bundle-layout/horizontalOne.js +230 -14
  8. package/dist/cjs/product/setting/constant/bundle-layout/horizontalThree.js +230 -14
  9. package/dist/cjs/product/setting/constant/bundle-layout/horizontalTwo.js +230 -14
  10. package/dist/cjs/product/setting/constant/bundle-layout/verticalOne.js +230 -13
  11. package/dist/cjs/product/setting/constant/bundle-layout/verticalThree.js +230 -14
  12. package/dist/cjs/product/setting/constant/bundle-layout/verticalTwo.js +230 -14
  13. package/dist/esm/coupon/common/classes.js +1 -1
  14. package/dist/esm/coupon/common/styles.js +4 -2
  15. package/dist/esm/coupon/setting/config/settings.js +7 -3
  16. package/dist/esm/coupon/setting/config/uiV2.js +65 -64
  17. package/dist/esm/marquee/setting/configs/settingsV2.js +3 -3
  18. package/dist/esm/product/components/ProductPrice/hooks/useGpPrice.js +1 -1
  19. package/dist/esm/product/setting/constant/bundle-layout/horizontalOne.js +230 -14
  20. package/dist/esm/product/setting/constant/bundle-layout/horizontalThree.js +230 -14
  21. package/dist/esm/product/setting/constant/bundle-layout/horizontalTwo.js +230 -14
  22. package/dist/esm/product/setting/constant/bundle-layout/verticalOne.js +230 -13
  23. package/dist/esm/product/setting/constant/bundle-layout/verticalThree.js +230 -14
  24. package/dist/esm/product/setting/constant/bundle-layout/verticalTwo.js +230 -14
  25. package/package.json +2 -2
@@ -298,36 +298,252 @@ const verticalTwo = [
298
298
  {
299
299
  childrens: [
300
300
  {
301
+ tag: 'ProductPrice',
301
302
  label: 'Product Price',
302
303
  settings: {
303
- hasOnlyDefaultVariant: false
304
+ priceType: 'compare'
304
305
  },
305
306
  styles: {
307
+ typo: {
308
+ type: 'subheading-2',
309
+ default: {
310
+ type: 'subheading-2'
311
+ }
312
+ },
306
313
  color: {
307
- normal: '#B4B4B4'
314
+ normal: 'text-1'
308
315
  },
316
+ lineThrough: true,
317
+ thickness: 2,
318
+ lineColor: 'text-1',
319
+ disableHoverColor: true,
309
320
  hasTextShadow: {
310
321
  normal: false
311
322
  },
312
- lineColor: 'text-1',
313
- lineThrough: true,
314
- priceType: 'compare',
315
- textAlign: {
316
- desktop: 'right'
317
- },
318
323
  textShadow: {
319
324
  normal: {
320
325
  type: 'shadow-1'
321
326
  }
322
327
  },
323
- thickness: '1px',
324
- typo: {
325
- type: 'paragraph-1'
328
+ textAlign: {
329
+ desktop: 'left'
326
330
  }
327
331
  },
328
- tag: 'ProductPrice',
329
- uid: 'g6nLP4HJHr',
330
- childrens: []
332
+ advanced: {
333
+ 'spacing-setting': {
334
+ desktop: {
335
+ margin: {
336
+ bottom: 0
337
+ }
338
+ }
339
+ },
340
+ d: {
341
+ desktop: true,
342
+ tablet: true,
343
+ mobile: true
344
+ },
345
+ border: {
346
+ desktop: {
347
+ normal: {
348
+ borderType: 'none',
349
+ border: 'none',
350
+ borderWidth: '1px',
351
+ width: '1px 1px 1px 1px',
352
+ color: '#121212',
353
+ isCustom: true
354
+ }
355
+ }
356
+ },
357
+ rounded: {
358
+ desktop: {
359
+ normal: {
360
+ btrr: '0px',
361
+ bblr: '0px',
362
+ bbrr: '0px',
363
+ btlr: '0px',
364
+ radiusType: 'none'
365
+ }
366
+ }
367
+ },
368
+ hasBoxShadow: {
369
+ desktop: {
370
+ normal: false
371
+ }
372
+ },
373
+ boxShadow: {
374
+ desktop: {
375
+ normal: {}
376
+ }
377
+ },
378
+ op: {
379
+ desktop: '100%'
380
+ }
381
+ },
382
+ defaultPresetConfig: {
383
+ typo: {
384
+ type: 'subheading-2',
385
+ default: {
386
+ type: 'subheading-2'
387
+ }
388
+ },
389
+ color: {
390
+ normal: 'text-1'
391
+ },
392
+ lineThrough: true,
393
+ thickness: 2,
394
+ lineColor: 'text-1',
395
+ disableHoverColor: true,
396
+ hasTextShadow: {
397
+ normal: false
398
+ },
399
+ textShadow: {
400
+ normal: {
401
+ type: 'shadow-1'
402
+ }
403
+ },
404
+ textAlign: {
405
+ desktop: 'left'
406
+ },
407
+ 'spacing-setting': {
408
+ desktop: {
409
+ margin: {
410
+ bottom: 'var(--g-s-l)'
411
+ }
412
+ }
413
+ },
414
+ d: {
415
+ desktop: true,
416
+ tablet: true,
417
+ mobile: true
418
+ },
419
+ border: {
420
+ desktop: {
421
+ normal: {
422
+ borderType: 'none',
423
+ border: 'none',
424
+ borderWidth: '1px',
425
+ width: '1px 1px 1px 1px',
426
+ color: '#121212',
427
+ isCustom: true
428
+ }
429
+ }
430
+ },
431
+ rounded: {
432
+ desktop: {
433
+ normal: {
434
+ btrr: '0px',
435
+ bblr: '0px',
436
+ bbrr: '0px',
437
+ btlr: '0px',
438
+ radiusType: 'none'
439
+ }
440
+ }
441
+ },
442
+ hasBoxShadow: {
443
+ desktop: {
444
+ normal: false
445
+ }
446
+ },
447
+ boxShadow: {
448
+ desktop: {
449
+ normal: {}
450
+ }
451
+ },
452
+ op: {
453
+ desktop: '100%'
454
+ },
455
+ animation: {
456
+ desktop: {
457
+ enabled: false,
458
+ trigger: 'appear',
459
+ triggerConfig: {
460
+ appear: {
461
+ animation: 'fade',
462
+ setting: {
463
+ fade: {
464
+ delay: '0',
465
+ speed: 1.7,
466
+ easing: 'ease-out'
467
+ },
468
+ zoom: {
469
+ delay: '0',
470
+ speed: 1.7,
471
+ isFade: true,
472
+ easing: 'ease-out',
473
+ zoomDirection: 'in',
474
+ scale: {
475
+ in: [
476
+ 80,
477
+ 100
478
+ ],
479
+ out: [
480
+ 120,
481
+ 100
482
+ ]
483
+ }
484
+ },
485
+ slide: {
486
+ delay: '0',
487
+ speed: 1.7,
488
+ easing: 'ease-out',
489
+ direction: 'left',
490
+ isCustomDistance: false
491
+ },
492
+ shake: {
493
+ delay: '0',
494
+ speed: 0.7,
495
+ loop: false,
496
+ intensity: 11,
497
+ easing: 'linear'
498
+ }
499
+ }
500
+ },
501
+ hover: {
502
+ animation: 'none',
503
+ setting: {
504
+ fade: {
505
+ delay: '0',
506
+ speed: 1.7,
507
+ easing: 'ease-out'
508
+ },
509
+ zoom: {
510
+ delay: '0',
511
+ speed: 1.7,
512
+ isFade: false,
513
+ easing: 'ease-out',
514
+ zoomDirection: 'in',
515
+ scale: {
516
+ in: [
517
+ 100,
518
+ 120
519
+ ],
520
+ out: [
521
+ 100,
522
+ 80
523
+ ]
524
+ }
525
+ },
526
+ slide: {
527
+ delay: '0',
528
+ speed: 1.7,
529
+ easing: 'ease-out',
530
+ direction: 'left',
531
+ isCustomDistance: false
532
+ },
533
+ shake: {
534
+ delay: '0',
535
+ speed: 0.7,
536
+ loop: false,
537
+ intensity: 11,
538
+ easing: 'linear'
539
+ }
540
+ }
541
+ }
542
+ }
543
+ }
544
+ },
545
+ priceType: 'compare'
546
+ }
331
547
  }
332
548
  ],
333
549
  label: 'Block',
@@ -6,7 +6,7 @@ const getActiveClasses = (backgroundColor, text)=>{
6
6
  tablet: 'tablet:',
7
7
  mobile: 'mobile:'
8
8
  };
9
- const generateClass = (type, device, value)=>value ? `${breakpoints[device]}[_&button]:data-[active=true]:!gp-${type}-[${value}]` : '';
9
+ const generateClass = (type, device, value)=>value ? `${breakpoints[device]}[&_button]:data-[active=true]:!gp-${type}-[${value}]` : '';
10
10
  const classes = [
11
11
  generateClass('bg', 'desktop', backgroundColor?.desktop?.active),
12
12
  generateClass('bg', 'tablet', backgroundColor?.tablet?.active),
@@ -43,8 +43,10 @@ const getInnerBorderCornerCss = (data)=>{
43
43
  return `
44
44
  ${mediaQuery}
45
45
  .gp-coupon[data-active="true"] .${uid} {
46
- ${composeBorderCss(borderBtnV2?.[device]?.active)} !important;
47
- ${composeCornerCss(roundedBtnV2?.[device]?.active)} !important;
46
+ ${composeBorderCss(borderBtnV2?.[device]?.active, {
47
+ important: true
48
+ })};
49
+ ${composeCornerCss(roundedBtnV2?.[device]?.active, true)};
48
50
  box-shadow: ${getShadowValue(boxShadowBtnV2?.[device]?.active)} !important;
49
51
  }
50
52
  ${closeMediaQuery}
@@ -12,7 +12,7 @@ const CouponSettings = [
12
12
  default: 'icon',
13
13
  options: [
14
14
  {
15
- label: 'Secondary',
15
+ label: 'Text Only',
16
16
  value: 'none',
17
17
  iconName: 'gp-coupon-code-layout'
18
18
  },
@@ -271,6 +271,9 @@ const CouponSettings = [
271
271
  default: {
272
272
  type: 'paragraph-1'
273
273
  },
274
+ hiddenSetting: {
275
+ textAlign: true
276
+ },
274
277
  ignoreReRender: true
275
278
  },
276
279
  {
@@ -516,8 +519,9 @@ const CouponSettings = [
516
519
  distance: '4px',
517
520
  blur: '4px',
518
521
  spread: '0px',
519
- color: '#121212',
520
- angle: 45
522
+ color: 'rgba(18, 18, 18, 0.2)',
523
+ angle: 45,
524
+ enable: true
521
525
  }
522
526
  }
523
527
  }
@@ -9,7 +9,40 @@ const SettingUIV2 = [
9
9
  setting: {
10
10
  id: 'couponLayout'
11
11
  },
12
- layout: 'vertical'
12
+ layout: 'vertical',
13
+ controlChangeTrigger: {
14
+ settings: [
15
+ {
16
+ condition: `couponLayout === 'icon'`,
17
+ source: [
18
+ 'couponLayout',
19
+ 'iconVisible'
20
+ ],
21
+ action: {
22
+ controlId: 'iconVisible',
23
+ groupType: 'setting',
24
+ controlType: 'setting',
25
+ newValue: true
26
+ }
27
+ },
28
+ {
29
+ condition: `couponLayout === 'none'`,
30
+ source: [
31
+ 'couponLayout',
32
+ 'iconVisible'
33
+ ],
34
+ action: {
35
+ controlId: 'iconVisible',
36
+ groupType: 'setting',
37
+ controlType: 'setting',
38
+ newValue: false
39
+ }
40
+ }
41
+ ],
42
+ options: {
43
+ noRecordHistory: true
44
+ }
45
+ }
13
46
  }
14
47
  ]
15
48
  },
@@ -26,6 +59,7 @@ const SettingUIV2 = [
26
59
  iconName: 'polaris-text-block',
27
60
  getValueFromSettingID: 'copyContent',
28
61
  isHideClear: true,
62
+ compoDefaultValue: 'GEMPAGES30',
29
63
  popoverLabel: {
30
64
  en: 'Code'
31
65
  },
@@ -46,22 +80,6 @@ const SettingUIV2 = [
46
80
  }
47
81
  ]
48
82
  },
49
- {
50
- label: {
51
- en: 'Content'
52
- },
53
- controls: [
54
- {
55
- type: 'control',
56
- label: {
57
- en: 'Default'
58
- },
59
- setting: {
60
- id: 'defaultLabel'
61
- }
62
- }
63
- ]
64
- },
65
83
  {
66
84
  label: {
67
85
  en: 'Size'
@@ -201,50 +219,6 @@ const SettingUIV2 = [
201
219
  setting: {
202
220
  id: 'boxShadowBtnV2',
203
221
  state: 'normal'
204
- },
205
- options: {
206
- updateFields: [
207
- {
208
- field: 'normal.enable',
209
- settingId: 'hasBoxShadow',
210
- state: 'normal'
211
- }
212
- ]
213
- },
214
- controlChangeTrigger: {
215
- settings: [
216
- {
217
- condition: `boxShadow.normal.enable === true`,
218
- source: [
219
- 'boxShadow',
220
- 'hasBoxShadow'
221
- ],
222
- action: {
223
- controlId: 'hasBoxShadow',
224
- groupType: 'style',
225
- controlType: 'style',
226
- state: 'normal',
227
- newValue: true
228
- }
229
- },
230
- {
231
- condition: `boxShadow.normal.enable === false`,
232
- source: [
233
- 'boxShadow',
234
- 'hasBoxShadow'
235
- ],
236
- action: {
237
- controlId: 'hasBoxShadow',
238
- groupType: 'style',
239
- controlType: 'style',
240
- state: 'normal',
241
- newValue: false
242
- }
243
- }
244
- ],
245
- options: {
246
- noRecordHistory: true
247
- }
248
222
  }
249
223
  }
250
224
  ]
@@ -270,14 +244,14 @@ const SettingUIV2 = [
270
244
  id: 'iconSvg'
271
245
  },
272
246
  label: {
273
- en: 'Choose'
247
+ en: 'Icon'
274
248
  }
275
249
  },
276
250
  {
277
251
  conditionDisplay: 'couponLayout == "icon" && iconVisible == true',
278
252
  type: 'control',
279
253
  label: {
280
- en: 'Icon position'
254
+ en: 'Position'
281
255
  },
282
256
  setting: {
283
257
  id: 'iconAlign'
@@ -287,7 +261,7 @@ const SettingUIV2 = [
287
261
  conditionDisplay: 'couponLayout == "icon" && iconVisible == true',
288
262
  type: 'control',
289
263
  label: {
290
- en: 'Spacing'
264
+ en: 'Gap'
291
265
  },
292
266
  setting: {
293
267
  id: 'iconSpacing'
@@ -309,6 +283,33 @@ const SettingUIV2 = [
309
283
  toggleStyle: 'switch'
310
284
  }
311
285
  },
286
+ {
287
+ type: 'combo',
288
+ label: {
289
+ en: 'Content'
290
+ },
291
+ iconName: 'polaris-text-block',
292
+ getValueFromSettingID: 'defaultLabel',
293
+ isHideClear: true,
294
+ compoDefaultValue: 'Copy',
295
+ popoverLabel: {
296
+ en: 'Content'
297
+ },
298
+ controls: [
299
+ {
300
+ label: {
301
+ en: 'Content'
302
+ },
303
+ options: {
304
+ fullWidth: true
305
+ },
306
+ layout: 'vertical',
307
+ setting: {
308
+ id: 'defaultLabel'
309
+ }
310
+ }
311
+ ]
312
+ },
312
313
  {
313
314
  type: 'control',
314
315
  layout: 'vertical',
@@ -11,17 +11,17 @@ const MarqueeSettingsV2 = [
11
11
  {
12
12
  label: 'Fit to content',
13
13
  value: 'FIT_CONTENT',
14
- note: 'Match the width of the element inside'
14
+ subTitle: 'Match the width of the element inside'
15
15
  },
16
16
  {
17
17
  label: 'Based on the item count',
18
18
  value: 'BASE_ON_NUMBER_OF_ITEMS',
19
- note: 'Max item width is screen width divided by the number of items'
19
+ subTitle: 'Max item width is screen width divided by the number of items'
20
20
  },
21
21
  {
22
22
  label: 'Custom',
23
23
  value: 'CUSTOM',
24
- note: 'Set the max width as you want'
24
+ subTitle: 'Set the max width as you want'
25
25
  }
26
26
  ],
27
27
  devices: {
@@ -27,7 +27,7 @@ const useGpPrice = (props)=>{
27
27
  bundleItem?.quantity
28
28
  ]);
29
29
  const bundleDiscount = useMemo(()=>{
30
- const value = parseInt(bundleItem?.discountValue);
30
+ const value = Number(bundleItem?.discountValue);
31
31
  if (bundleItem?.discountType === 'percentage') {
32
32
  return price * quantityProduct * value / 100;
33
33
  }