@gem-sdk/core 1.10.12 → 1.10.15

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.
@@ -167,10 +167,7 @@ const handleConvertClassColorDynamicBtn = (value)=>{
167
167
  };
168
168
  const composeBorderCss = (borderV)=>{
169
169
  if (!borderV) return '';
170
- const { border , width , color , isCustom } = borderV;
171
- if (!isCustom) {
172
- return '';
173
- }
170
+ const { border , width , color } = borderV;
174
171
  return `${border ? `border-style: ${border};` : ''}
175
172
  ${width ? `border-width: ${width};` : ''}
176
173
  ${color ? `border-color: ${colors.getSingleColorVariable(color)};` : ''}
@@ -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
@@ -78,8 +78,8 @@ const loopFetchProducts = async (fetcher, { ids , isSample , isStorefront })=>{
78
78
  firstMedia: 1,
79
79
  firstVariant: 1,
80
80
  orderBy: {
81
- field: 'TITLE',
82
- direction: 'ASC'
81
+ field: 'PLATFORM_CREATED_AT',
82
+ direction: 'DESC'
83
83
  },
84
84
  orderByMedia: {
85
85
  field: 'POSITION',
@@ -165,10 +165,7 @@ const handleConvertClassColorDynamicBtn = (value)=>{
165
165
  };
166
166
  const composeBorderCss = (borderV)=>{
167
167
  if (!borderV) return '';
168
- const { border , width , color , isCustom } = borderV;
169
- if (!isCustom) {
170
- return '';
171
- }
168
+ const { border , width , color } = borderV;
172
169
  return `${border ? `border-style: ${border};` : ''}
173
170
  ${width ? `border-width: ${width};` : ''}
174
171
  ${color ? `border-color: ${getSingleColorVariable(color)};` : ''}
@@ -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
@@ -76,8 +76,8 @@ const loopFetchProducts = async (fetcher, { ids , isSample , isStorefront })=>{
76
76
  firstMedia: 1,
77
77
  firstVariant: 1,
78
78
  orderBy: {
79
- field: 'TITLE',
80
- direction: 'ASC'
79
+ field: 'PLATFORM_CREATED_AT',
80
+ direction: 'DESC'
81
81
  },
82
82
  orderByMedia: {
83
83
  field: 'POSITION',
@@ -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.15",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",