@gem-sdk/core 1.10.11 → 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
|
-
|
|
32
|
+
const productSetting = item.settings?.productSetting;
|
|
33
|
+
if (productSetting?.productSrc === 'Collection') {
|
|
33
34
|
const variables = {
|
|
34
|
-
id:
|
|
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
|
-
...
|
|
49
|
+
...productSetting?.productIds ?? []
|
|
49
50
|
].sort(),
|
|
50
51
|
isSample: options?.isSample,
|
|
51
52
|
isStorefront: options?.isStorefront
|
|
@@ -36,7 +36,7 @@ const getProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
const orderBy = {
|
|
39
|
-
field: '
|
|
39
|
+
field: 'CREATED_AT',
|
|
40
40
|
direction: 'DESC'
|
|
41
41
|
};
|
|
42
42
|
const fetchProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
|
@@ -27,9 +27,10 @@ const prefetchQueries = (input, options)=>{
|
|
|
27
27
|
}
|
|
28
28
|
case 'ProductList':
|
|
29
29
|
{
|
|
30
|
-
|
|
30
|
+
const productSetting = item.settings?.productSetting;
|
|
31
|
+
if (productSetting?.productSrc === 'Collection') {
|
|
31
32
|
const variables = {
|
|
32
|
-
id:
|
|
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
|
-
...
|
|
47
|
+
...productSetting?.productIds ?? []
|
|
47
48
|
].sort(),
|
|
48
49
|
isSample: options?.isSample,
|
|
49
50
|
isStorefront: options?.isStorefront
|
|
@@ -34,7 +34,7 @@ const getProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
const orderBy = {
|
|
37
|
-
field: '
|
|
37
|
+
field: 'CREATED_AT',
|
|
38
38
|
direction: 'DESC'
|
|
39
39
|
};
|
|
40
40
|
const fetchProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
package/dist/types/index.d.ts
CHANGED
|
@@ -807,7 +807,12 @@ type CollectionBannerControlType<T> = SharedControlType<T> & {
|
|
|
807
807
|
value?: Background;
|
|
808
808
|
};
|
|
809
809
|
|
|
810
|
-
type
|
|
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;
|