@gem-sdk/core 1.10.12 → 1.10.14

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.
@@ -29,9 +29,10 @@ const prefetchQueries = (input, options)=>{
29
29
  }
30
30
  case 'ProductList':
31
31
  {
32
- if (item?.settings?.productSrc === 'Collection') {
32
+ const productSetting = item.settings?.productSetting;
33
+ if (productSetting?.productSrc === 'Collection') {
33
34
  const variables = {
34
- id: item.settings?.collectionId ?? 'latest',
35
+ id: productSetting?.collectionId ?? 'latest',
35
36
  numberOfProducts: item.settings?.numberOfProducts ?? 4,
36
37
  orderBy: item.settings?.orderBy,
37
38
  isSample: options?.isSample,
@@ -45,7 +46,7 @@ const prefetchQueries = (input, options)=>{
45
46
  } else {
46
47
  const variables = {
47
48
  ids: [
48
- ...item?.settings?.productIds ?? []
49
+ ...productSetting?.productIds ?? []
49
50
  ].sort(),
50
51
  isSample: options?.isSample,
51
52
  isStorefront: options?.isStorefront
@@ -27,9 +27,10 @@ const prefetchQueries = (input, options)=>{
27
27
  }
28
28
  case 'ProductList':
29
29
  {
30
- if (item?.settings?.productSrc === 'Collection') {
30
+ const productSetting = item.settings?.productSetting;
31
+ if (productSetting?.productSrc === 'Collection') {
31
32
  const variables = {
32
- id: item.settings?.collectionId ?? 'latest',
33
+ id: productSetting?.collectionId ?? 'latest',
33
34
  numberOfProducts: item.settings?.numberOfProducts ?? 4,
34
35
  orderBy: item.settings?.orderBy,
35
36
  isSample: options?.isSample,
@@ -43,7 +44,7 @@ const prefetchQueries = (input, options)=>{
43
44
  } else {
44
45
  const variables = {
45
46
  ids: [
46
- ...item?.settings?.productIds ?? []
47
+ ...productSetting?.productIds ?? []
47
48
  ].sort(),
48
49
  isSample: options?.isSample,
49
50
  isStorefront: options?.isStorefront
@@ -807,7 +807,12 @@ type CollectionBannerControlType<T> = SharedControlType<T> & {
807
807
  value?: Background;
808
808
  };
809
809
 
810
- type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | CustomCodeEditor | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | SwatchesLinkControlType<T> | CollectionBannerControlType<T>;
810
+ type ProductListControlType<T> = SharedControlType<T> & {
811
+ type: 'product-list';
812
+ isMultiple?: boolean;
813
+ };
814
+
815
+ type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | CustomCodeEditor | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | SwatchesLinkControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T>;
811
816
  type Setting<P extends BaseProps> = {
812
817
  id: 'setting';
813
818
  note?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.10.12",
3
+ "version": "1.10.14",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",