@soppiya/app-bridge 1.1.1 → 1.1.3
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.
- package/dist/components/articles-picker/ui/ArticlesPicker.js +13 -7
- package/dist/components/blogs-picker/ui/BlogsPicker.js +13 -8
- package/dist/components/collections-pciker/ui/CollectionPicker.js +16 -10
- package/dist/components/collections-pciker/ui/CollectionPicker.stories.d.ts +1 -4
- package/dist/components/collections-pciker/ui/CollectionPicker.stories.js +1 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/link-list-picker/api/query.d.ts +8 -0
- package/dist/components/link-list-picker/api/query.js +22 -0
- package/dist/components/link-list-picker/index.d.ts +1 -0
- package/dist/components/link-list-picker/index.js +2 -0
- package/dist/components/link-list-picker/model/useLinkList.d.ts +30 -0
- package/dist/components/link-list-picker/model/useLinkList.js +46 -0
- package/dist/components/link-list-picker/ui/LinkListPicker.d.ts +9 -0
- package/dist/components/link-list-picker/ui/LinkListPicker.js +104 -0
- package/dist/components/link-list-picker/ui/LinkListPicker.stories.d.ts +14 -0
- package/dist/components/link-list-picker/ui/LinkListPicker.stories.js +10 -0
- package/dist/components/meta-data/ui/MetaData.d.ts +2 -1
- package/dist/components/meta-data/ui/MetaData.js +9 -13
- package/dist/components/metafield-entries/api/query.d.ts +8 -0
- package/dist/components/metafield-entries/api/query.js +18 -0
- package/dist/components/metafield-entries/index.d.ts +0 -0
- package/dist/components/metafield-entries/index.js +0 -0
- package/dist/components/metafield-entries/model/useMetaobjectEntries.d.ts +25 -0
- package/dist/components/metafield-entries/model/useMetaobjectEntries.js +46 -0
- package/dist/components/metafield-entries/ui/MetaobjectEntries.d.ts +10 -0
- package/dist/components/metafield-entries/ui/MetaobjectEntries.js +108 -0
- package/dist/components/metafield-entries/ui/MetaobjectEntries.stories.d.ts +15 -0
- package/dist/components/metafield-entries/ui/MetaobjectEntries.stories.js +10 -0
- package/dist/components/pages-picker/ui/PagesPicker.js +19 -11
- package/dist/components/products-picker/ui/ProductPicker.js +16 -10
- package/dist/components/variants-picker/ui/VariantsPicker.js +13 -7
- package/dist/shared/graphql/gql.d.ts +10 -0
- package/dist/shared/graphql/gql.js +3 -1
- package/dist/shared/graphql/graphql.d.ts +64 -0
- package/dist/shared/graphql/graphql.js +855 -233
- package/dist/styles.css +12 -4
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useQuery } from "@apollo/client/react";
|
|
2
|
+
import { metaobjectEntriesQuery } from "../api/query.js";
|
|
3
|
+
const useMetaobjectEntries = (props = {})=>{
|
|
4
|
+
const { skip, first, query, filterKeys } = props;
|
|
5
|
+
const { data, loading: isLoadingMetaobjectEntries, error, fetchMore } = useQuery(metaobjectEntriesQuery, {
|
|
6
|
+
skip,
|
|
7
|
+
variables: {
|
|
8
|
+
first,
|
|
9
|
+
query,
|
|
10
|
+
filterKeys
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const metaobjectEntries = data?.metaobjectEntries?.edges?.map((edge)=>edge?.node).filter((node)=>null != node);
|
|
14
|
+
const pageInfo = data?.metaobjectEntries?.pageInfo;
|
|
15
|
+
const fetchMoreMetaobjectEntries = ()=>{
|
|
16
|
+
if (!pageInfo?.hasNextPage) return;
|
|
17
|
+
fetchMore({
|
|
18
|
+
variables: {
|
|
19
|
+
first,
|
|
20
|
+
query,
|
|
21
|
+
filterKeys,
|
|
22
|
+
after: pageInfo.endCursor
|
|
23
|
+
},
|
|
24
|
+
updateQuery (prev, { fetchMoreResult }) {
|
|
25
|
+
if (!fetchMoreResult.metaobjectEntries?.edges || !prev.metaobjectEntries?.edges) return prev;
|
|
26
|
+
return {
|
|
27
|
+
metaobjectEntries: {
|
|
28
|
+
...fetchMoreResult.metaobjectEntries,
|
|
29
|
+
edges: [
|
|
30
|
+
...prev.metaobjectEntries.edges,
|
|
31
|
+
...fetchMoreResult.metaobjectEntries.edges
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
metaobjectEntries,
|
|
40
|
+
isLoadingMetaobjectEntries,
|
|
41
|
+
error,
|
|
42
|
+
fetchMoreMetaobjectEntries,
|
|
43
|
+
pageInfo
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export { useMetaobjectEntries };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
initialIds?: string[];
|
|
4
|
+
limit?: number;
|
|
5
|
+
metaobjects?: string[];
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
onOk?: (linklist: string[]) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const MetaobjectEntries: ({ title, initialIds, limit, metaobjects, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default MetaobjectEntries;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { InfinityScroll } from "../../infinity-scroll/index.js";
|
|
3
|
+
import { useFilterQuery } from "../../../shared/lib/index.js";
|
|
4
|
+
import { BlockStack, Box, Button, Checkbox, InlineStack, Input, Modal, Spinner, Text } from "@soppiya/elementus";
|
|
5
|
+
import classnames from "classnames";
|
|
6
|
+
import lodash from "lodash";
|
|
7
|
+
import { useState } from "react";
|
|
8
|
+
import { useMetaobjectEntries } from "../model/useMetaobjectEntries.js";
|
|
9
|
+
const MetaobjectEntries_MetaobjectEntries = ({ title = "Metaobject entries", initialIds = [], limit = 1 / 0, metaobjects = [], onClose, onOk })=>{
|
|
10
|
+
const [selectedMetaobjectEntries, setSelectedMetaobjectEntries] = useState(initialIds);
|
|
11
|
+
const { query, debounceQuery, onChangeQuery } = useFilterQuery();
|
|
12
|
+
const { metaobjectEntries, isLoadingMetaobjectEntries, fetchMoreMetaobjectEntries, pageInfo } = useMetaobjectEntries({
|
|
13
|
+
first: 20,
|
|
14
|
+
query: debounceQuery,
|
|
15
|
+
filterKeys: {
|
|
16
|
+
metaobjects: metaobjects ?? []
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const isReached = limit !== 1 / 0 && selectedMetaobjectEntries.length >= limit;
|
|
20
|
+
const isDisabled = limit !== 1 / 0 && selectedMetaobjectEntries.length > limit;
|
|
21
|
+
const handleSelectedMetaobjectEntries = (metaobjectEntryId)=>{
|
|
22
|
+
if (selectedMetaobjectEntries?.includes(metaobjectEntryId)) return void setSelectedMetaobjectEntries((prev)=>prev?.filter((id)=>metaobjectEntryId !== id));
|
|
23
|
+
if (isReached) return;
|
|
24
|
+
setSelectedMetaobjectEntries((prev)=>[
|
|
25
|
+
...prev,
|
|
26
|
+
metaobjectEntryId
|
|
27
|
+
]);
|
|
28
|
+
};
|
|
29
|
+
const handleOk = ()=>{
|
|
30
|
+
if (lodash.isFunction(onOk)) onOk(selectedMetaobjectEntries);
|
|
31
|
+
};
|
|
32
|
+
const ButtonJSX = /*#__PURE__*/ jsx(InlineStack, {
|
|
33
|
+
justifyContent: "end",
|
|
34
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
35
|
+
disabled: lodash.isEmpty(selectedMetaobjectEntries) || isDisabled,
|
|
36
|
+
onClick: handleOk,
|
|
37
|
+
children: "Add"
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
return /*#__PURE__*/ jsx(Modal, {
|
|
41
|
+
open: true,
|
|
42
|
+
title: title,
|
|
43
|
+
bodyPadding: 0,
|
|
44
|
+
buttons: ButtonJSX,
|
|
45
|
+
onClose: onClose,
|
|
46
|
+
children: /*#__PURE__*/ jsxs(BlockStack, {
|
|
47
|
+
children: [
|
|
48
|
+
/*#__PURE__*/ jsx(Box, {
|
|
49
|
+
padding: 60,
|
|
50
|
+
children: /*#__PURE__*/ jsx(Input, {
|
|
51
|
+
size: "sm",
|
|
52
|
+
type: "search",
|
|
53
|
+
value: query ?? "",
|
|
54
|
+
onChange: (event)=>onChangeQuery(event.target.value)
|
|
55
|
+
})
|
|
56
|
+
}),
|
|
57
|
+
isLoadingMetaobjectEntries ? /*#__PURE__*/ jsx(InlineStack, {
|
|
58
|
+
justifyContent: "center",
|
|
59
|
+
padding: 80,
|
|
60
|
+
children: /*#__PURE__*/ jsx(Spinner, {
|
|
61
|
+
size: "md"
|
|
62
|
+
})
|
|
63
|
+
}) : /*#__PURE__*/ jsxs(BlockStack, {
|
|
64
|
+
children: [
|
|
65
|
+
metaobjectEntries?.map((metaobjectEntry)=>/*#__PURE__*/ jsxs(InlineStack, {
|
|
66
|
+
stack: "full",
|
|
67
|
+
className: classnames('lg:cursor-pointer border-t border-t-[#ebebeb]!', {
|
|
68
|
+
'bg-[#f1f1f1ab] cursor-default!': !selectedMetaobjectEntries.includes(metaobjectEntry._id) && isReached
|
|
69
|
+
}),
|
|
70
|
+
gapX: 60,
|
|
71
|
+
padding: 60,
|
|
72
|
+
onClick: ()=>handleSelectedMetaobjectEntries(String(metaobjectEntry._id)),
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ jsx(InlineStack, {
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
gapX: 60,
|
|
77
|
+
children: /*#__PURE__*/ jsx(Box, {
|
|
78
|
+
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
79
|
+
variant: "primary",
|
|
80
|
+
disabled: !selectedMetaobjectEntries.includes(metaobjectEntry._id) && isReached,
|
|
81
|
+
checked: selectedMetaobjectEntries.includes(String(metaobjectEntry._id)),
|
|
82
|
+
onChange: ()=>{}
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ jsx(BlockStack, {
|
|
87
|
+
gapY: 30,
|
|
88
|
+
justifyContent: "center",
|
|
89
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
90
|
+
size: "sm",
|
|
91
|
+
color: "secondary",
|
|
92
|
+
truncate: "truncate-1",
|
|
93
|
+
children: metaobjectEntry.title
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}, metaobjectEntry._id)),
|
|
98
|
+
pageInfo?.hasNextPage && /*#__PURE__*/ jsx(InfinityScroll, {
|
|
99
|
+
onFetch: fetchMoreMetaobjectEntries
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const MetaobjectEntries = MetaobjectEntries_MetaobjectEntries;
|
|
108
|
+
export { MetaobjectEntries as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: ({ title, initialIds, limit, metaobjects, onClose, onOk }: {
|
|
4
|
+
title?: string;
|
|
5
|
+
initialIds?: string[];
|
|
6
|
+
limit?: number;
|
|
7
|
+
metaobjects?: string[];
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
onOk?: (linklist: string[]) => void;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export declare const Default: {
|
|
14
|
+
args: {};
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import MetaobjectEntries from "./MetaobjectEntries.js";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Example/MetaobjectEntries",
|
|
4
|
+
component: MetaobjectEntries
|
|
5
|
+
};
|
|
6
|
+
const MetaobjectEntries_stories = meta;
|
|
7
|
+
const Default = {
|
|
8
|
+
args: {}
|
|
9
|
+
};
|
|
10
|
+
export { Default, MetaobjectEntries_stories as default };
|
|
@@ -2,18 +2,23 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { InfinityScroll } from "../../infinity-scroll/index.js";
|
|
3
3
|
import { useFilterQuery } from "../../../shared/lib/index.js";
|
|
4
4
|
import { BlockStack, Box, Button, Checkbox, Image, InlineStack, Input, Modal, Spinner, Text } from "@soppiya/elementus";
|
|
5
|
+
import classnames from "classnames";
|
|
5
6
|
import lodash from "lodash";
|
|
6
7
|
import { useState } from "react";
|
|
7
8
|
import { usePages } from "../model/usePages.js";
|
|
8
|
-
const PagesPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk })=>{
|
|
9
|
+
const PagesPicker = ({ title = "Pages", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
|
|
9
10
|
const [selectedPage, setSelectedPage] = useState(initialIds);
|
|
10
11
|
const { query, debounceQuery, onChangeQuery } = useFilterQuery();
|
|
11
12
|
const { pages, fetchMorePages, isLoadingPages, pageInfo } = usePages({
|
|
12
13
|
first: 20,
|
|
13
14
|
query: debounceQuery
|
|
14
15
|
});
|
|
16
|
+
const isReached = limit !== 1 / 0 && selectedPage.length >= limit;
|
|
17
|
+
const isDisabled = limit !== 1 / 0 && selectedPage.length > limit;
|
|
15
18
|
const handleSelectedPage = (pageId)=>{
|
|
16
|
-
selectedPage
|
|
19
|
+
if (selectedPage?.includes(pageId)) return void setSelectedPage((prev)=>prev?.filter((id)=>pageId !== id));
|
|
20
|
+
if (isReached) return;
|
|
21
|
+
setSelectedPage((prev)=>[
|
|
17
22
|
...prev,
|
|
18
23
|
pageId
|
|
19
24
|
]);
|
|
@@ -24,20 +29,20 @@ const PagesPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk })=>
|
|
|
24
29
|
const ButtonJSX = /*#__PURE__*/ jsx(InlineStack, {
|
|
25
30
|
justifyContent: "end",
|
|
26
31
|
children: /*#__PURE__*/ jsx(Button, {
|
|
32
|
+
disabled: lodash.isEmpty(selectedPage) || isDisabled,
|
|
27
33
|
onClick: handleOk,
|
|
28
34
|
children: "Add"
|
|
29
35
|
})
|
|
30
36
|
});
|
|
31
37
|
return /*#__PURE__*/ jsx(Modal, {
|
|
32
38
|
open: true,
|
|
33
|
-
title: title
|
|
39
|
+
title: title,
|
|
34
40
|
buttons: ButtonJSX,
|
|
35
41
|
bodyPadding: 0,
|
|
36
42
|
onClose: onClose,
|
|
37
43
|
children: /*#__PURE__*/ jsxs(BlockStack, {
|
|
38
44
|
children: [
|
|
39
45
|
/*#__PURE__*/ jsx(Box, {
|
|
40
|
-
className: "border-b border-b-[#ebebeb]! h",
|
|
41
46
|
padding: 60,
|
|
42
47
|
children: /*#__PURE__*/ jsx(Input, {
|
|
43
48
|
size: "sm",
|
|
@@ -54,12 +59,14 @@ const PagesPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk })=>
|
|
|
54
59
|
})
|
|
55
60
|
}) : /*#__PURE__*/ jsxs(BlockStack, {
|
|
56
61
|
children: [
|
|
57
|
-
pages?.map((
|
|
62
|
+
pages?.map((page)=>/*#__PURE__*/ jsxs(InlineStack, {
|
|
58
63
|
stack: "full",
|
|
59
|
-
className:
|
|
64
|
+
className: classnames('lg:cursor-pointer border-t border-t-[#ebebeb]!', {
|
|
65
|
+
'bg-[#f1f1f1ab] cursor-default!': !selectedPage.includes(page._id) && isReached
|
|
66
|
+
}),
|
|
60
67
|
gapX: 60,
|
|
61
68
|
padding: 60,
|
|
62
|
-
onClick: ()=>handleSelectedPage(String(
|
|
69
|
+
onClick: ()=>handleSelectedPage(String(page._id)),
|
|
63
70
|
children: [
|
|
64
71
|
/*#__PURE__*/ jsxs(InlineStack, {
|
|
65
72
|
alignItems: "center",
|
|
@@ -67,14 +74,15 @@ const PagesPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk })=>
|
|
|
67
74
|
children: [
|
|
68
75
|
/*#__PURE__*/ jsx(Box, {
|
|
69
76
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
70
|
-
|
|
77
|
+
disabled: !selectedPage.includes(page._id) && isReached,
|
|
78
|
+
checked: selectedPage.includes(String(page._id)),
|
|
71
79
|
onChange: ()=>{}
|
|
72
80
|
})
|
|
73
81
|
}),
|
|
74
82
|
/*#__PURE__*/ jsx(Box, {
|
|
75
83
|
children: /*#__PURE__*/ jsx(Image, {
|
|
76
84
|
size: "xs",
|
|
77
|
-
url: String(
|
|
85
|
+
url: String(page.image?.url)
|
|
78
86
|
})
|
|
79
87
|
})
|
|
80
88
|
]
|
|
@@ -86,11 +94,11 @@ const PagesPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk })=>
|
|
|
86
94
|
size: "sm",
|
|
87
95
|
color: "secondary",
|
|
88
96
|
truncate: "truncate-1",
|
|
89
|
-
children:
|
|
97
|
+
children: page.title
|
|
90
98
|
})
|
|
91
99
|
})
|
|
92
100
|
]
|
|
93
|
-
},
|
|
101
|
+
}, page._id)),
|
|
94
102
|
pageInfo?.hasNextPage && /*#__PURE__*/ jsx(InfinityScroll, {
|
|
95
103
|
onFetch: fetchMorePages
|
|
96
104
|
})
|
|
@@ -2,45 +2,48 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { InfinityScroll } from "../../infinity-scroll/index.js";
|
|
3
3
|
import { useFilterQuery } from "../../../shared/lib/index.js";
|
|
4
4
|
import { BlockStack, Box, Button, Checkbox, Image, InlineStack, Input, Modal, Spinner, Text } from "@soppiya/elementus";
|
|
5
|
+
import classnames from "classnames";
|
|
5
6
|
import lodash from "lodash";
|
|
6
7
|
import { useState } from "react";
|
|
7
8
|
import { useProducts } from "../model/useProducts.js";
|
|
8
|
-
const ProductsPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk })=>{
|
|
9
|
-
const [
|
|
9
|
+
const ProductsPicker = ({ title = "Products", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
|
|
10
|
+
const [selectedProduct, setSelectedProduct] = useState(initialIds);
|
|
10
11
|
const { query, debounceQuery, onChangeQuery } = useFilterQuery();
|
|
11
12
|
const { products, pageInfo, isLoadingProducts, fetchMoreProducts } = useProducts({
|
|
12
13
|
first: 20,
|
|
13
14
|
query: debounceQuery
|
|
14
15
|
});
|
|
15
|
-
const
|
|
16
|
+
const isReached = limit !== 1 / 0 && selectedProduct.length >= limit;
|
|
17
|
+
const isDisabled = limit !== 1 / 0 && selectedProduct.length > limit;
|
|
16
18
|
const handleSelectVariant = (productId)=>{
|
|
17
|
-
|
|
19
|
+
if (selectedProduct?.includes(productId)) return void setSelectedProduct((prev)=>prev?.filter((id)=>productId !== id));
|
|
20
|
+
if (isReached) return;
|
|
21
|
+
setSelectedProduct((prev)=>[
|
|
18
22
|
...prev,
|
|
19
23
|
productId
|
|
20
24
|
]);
|
|
21
25
|
};
|
|
22
26
|
const handleOk = ()=>{
|
|
23
|
-
if (lodash.isFunction(onOk)) onOk(
|
|
27
|
+
if (lodash.isFunction(onOk)) onOk(selectedProduct);
|
|
24
28
|
};
|
|
25
29
|
const buttonsJSX = /*#__PURE__*/ jsx(InlineStack, {
|
|
26
30
|
gap: 50,
|
|
27
31
|
justifyContent: "end",
|
|
28
32
|
children: /*#__PURE__*/ jsx(Button, {
|
|
29
|
-
disabled: lodash.isEmpty(
|
|
33
|
+
disabled: lodash.isEmpty(selectedProduct) || isDisabled,
|
|
30
34
|
onClick: handleOk,
|
|
31
35
|
children: "Add"
|
|
32
36
|
})
|
|
33
37
|
});
|
|
34
38
|
return /*#__PURE__*/ jsx(Modal, {
|
|
35
39
|
open: true,
|
|
36
|
-
title: title
|
|
40
|
+
title: title,
|
|
37
41
|
bodyPadding: 0,
|
|
38
42
|
buttons: buttonsJSX,
|
|
39
43
|
onClose: onClose,
|
|
40
44
|
children: /*#__PURE__*/ jsxs(BlockStack, {
|
|
41
45
|
children: [
|
|
42
46
|
/*#__PURE__*/ jsx(Box, {
|
|
43
|
-
className: "border-b border-b-[#ebebeb]! h",
|
|
44
47
|
padding: 60,
|
|
45
48
|
children: /*#__PURE__*/ jsx(Input, {
|
|
46
49
|
size: "sm",
|
|
@@ -59,7 +62,9 @@ const ProductsPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk }
|
|
|
59
62
|
children: [
|
|
60
63
|
products?.map((product)=>/*#__PURE__*/ jsxs(InlineStack, {
|
|
61
64
|
stack: "full",
|
|
62
|
-
className:
|
|
65
|
+
className: classnames('lg:cursor-pointer border-t border-t-[#ebebeb]!', {
|
|
66
|
+
'bg-[#f1f1f1ab] cursor-default!': !selectedProduct.includes(product._id) && isReached
|
|
67
|
+
}),
|
|
63
68
|
gapX: 60,
|
|
64
69
|
padding: 60,
|
|
65
70
|
onClick: ()=>handleSelectVariant(String(product._id)),
|
|
@@ -70,7 +75,8 @@ const ProductsPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk }
|
|
|
70
75
|
children: [
|
|
71
76
|
/*#__PURE__*/ jsx(Box, {
|
|
72
77
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
73
|
-
|
|
78
|
+
disabled: !selectedProduct.includes(product._id) && isReached,
|
|
79
|
+
checked: selectedProduct.includes(String(product._id)),
|
|
74
80
|
onChange: ()=>{}
|
|
75
81
|
})
|
|
76
82
|
}),
|
|
@@ -2,19 +2,23 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { InfinityScroll } from "../../infinity-scroll/index.js";
|
|
3
3
|
import { useFilterQuery } from "../../../shared/lib/index.js";
|
|
4
4
|
import { Badge, BlockStack, Box, Button, Checkbox, Image, InlineStack, Input, Modal, Spinner, Text } from "@soppiya/elementus";
|
|
5
|
+
import classnames from "classnames";
|
|
5
6
|
import lodash from "lodash";
|
|
6
7
|
import { useState } from "react";
|
|
7
8
|
import { useVariants } from "../model/useVariants.js";
|
|
8
|
-
const VariantsPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk })=>{
|
|
9
|
+
const VariantsPicker = ({ title = "Variants", initialIds = [], limit = 1 / 0, onClose, onOk })=>{
|
|
9
10
|
const [selectedVariant, setSelectedVariant] = useState(initialIds);
|
|
10
11
|
const { query, debounceQuery, onChangeQuery } = useFilterQuery();
|
|
11
12
|
const { variants, pageInfo, isLoadingVariants, fetchMoreVariants } = useVariants({
|
|
12
13
|
first: 20,
|
|
13
14
|
query: debounceQuery
|
|
14
15
|
});
|
|
15
|
-
const
|
|
16
|
+
const isReached = limit !== 1 / 0 && selectedVariant.length >= limit;
|
|
17
|
+
const isDisabled = limit !== 1 / 0 && selectedVariant.length > limit;
|
|
16
18
|
const handleSelectVariant = (variantId)=>{
|
|
17
|
-
selectedVariant.includes(variantId)
|
|
19
|
+
if (selectedVariant.includes(variantId)) setSelectedVariant((prev)=>prev.filter((id)=>variantId !== id));
|
|
20
|
+
if (isReached) return;
|
|
21
|
+
setSelectedVariant((prev)=>[
|
|
18
22
|
...prev,
|
|
19
23
|
variantId
|
|
20
24
|
]);
|
|
@@ -26,21 +30,20 @@ const VariantsPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk }
|
|
|
26
30
|
gap: 50,
|
|
27
31
|
justifyContent: "end",
|
|
28
32
|
children: /*#__PURE__*/ jsx(Button, {
|
|
29
|
-
disabled: lodash.isEmpty(selectedVariant) ||
|
|
33
|
+
disabled: lodash.isEmpty(selectedVariant) || isDisabled,
|
|
30
34
|
onClick: handleOk,
|
|
31
35
|
children: "Add"
|
|
32
36
|
})
|
|
33
37
|
});
|
|
34
38
|
return /*#__PURE__*/ jsx(Modal, {
|
|
35
39
|
open: true,
|
|
36
|
-
title: title
|
|
40
|
+
title: title,
|
|
37
41
|
bodyPadding: 0,
|
|
38
42
|
buttons: buttonsJSX,
|
|
39
43
|
onClose: onClose,
|
|
40
44
|
children: /*#__PURE__*/ jsxs(BlockStack, {
|
|
41
45
|
children: [
|
|
42
46
|
/*#__PURE__*/ jsx(Box, {
|
|
43
|
-
className: "border-b border-b-[#ebebeb]! h",
|
|
44
47
|
padding: 60,
|
|
45
48
|
children: /*#__PURE__*/ jsx(Input, {
|
|
46
49
|
size: "sm",
|
|
@@ -59,7 +62,9 @@ const VariantsPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk }
|
|
|
59
62
|
children: [
|
|
60
63
|
variants.map((variant)=>/*#__PURE__*/ jsxs(InlineStack, {
|
|
61
64
|
stack: "full",
|
|
62
|
-
className:
|
|
65
|
+
className: classnames('lg:cursor-pointer border-t border-t-[#ebebeb]!', {
|
|
66
|
+
'bg-[#f1f1f1ab] cursor-default!': !selectedVariant.includes(variant._id) && isReached
|
|
67
|
+
}),
|
|
63
68
|
gapX: 60,
|
|
64
69
|
padding: 60,
|
|
65
70
|
onClick: ()=>handleSelectVariant(String(variant._id)),
|
|
@@ -70,6 +75,7 @@ const VariantsPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk }
|
|
|
70
75
|
children: [
|
|
71
76
|
/*#__PURE__*/ jsx(Box, {
|
|
72
77
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
78
|
+
disabled: !selectedVariant.includes(variant._id) && isReached,
|
|
73
79
|
checked: selectedVariant.includes(String(variant._id)),
|
|
74
80
|
onChange: ()=>{}
|
|
75
81
|
})
|
|
@@ -15,12 +15,14 @@ type Documents = {
|
|
|
15
15
|
"query Articles($filterKeys: ArticleFilterKeys, $after: ID, $before: ID, $first: Int, $last: Int, $query: String) {\n articles(filterKeys: $filterKeys, after: $after, before: $before, first: $first, last: $last, query: $query) {\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}": typeof types.ArticlesDocument;
|
|
16
16
|
"query Blogs($filterKeys: BlogFilterKeys, $after: ID, $before: ID, $first: Int, $last: Int, $query: String) {\n blogs(filterKeys: $filterKeys, after: $after, before: $before, first: $first, last: $last, query: $query) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n }\n}": typeof types.BlogsDocument;
|
|
17
17
|
"query Collections($skip: Int, $filterKeys: CollectionFilterKeys, $query: String) {\n collections(skip: $skip, filterKeys: $filterKeys, query: $query) {\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}": typeof types.CollectionsDocument;
|
|
18
|
+
"query Linklists($after: ID, $before: ID, $first: Int, $last: Int, $query: String, $filterKeys: LinklistFilterKeys) {\n linklists(after: $after, before: $before, first: $first, last: $last, query: $query, filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n links {\n url\n _id\n }\n }\n }\n }\n}": typeof types.LinklistsDocument;
|
|
18
19
|
"\n query Medias(\n $after: ID\n $before: ID\n $first: Int\n $last: Int\n $query: String\n $reverse: Boolean\n $sortKey: MediaSortKeys\n $filterKeys: MediaFilterKeys\n ) {\n medias(\n after: $after\n before: $before\n first: $first\n last: $last\n query: $query\n reverse: $reverse\n sortKey: $sortKey\n filterKeys: $filterKeys\n ) {\n edges {\n node {\n _id\n file_name\n url\n size\n type\n mimetype\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n }\n": typeof types.MediasDocument;
|
|
19
20
|
"\n query StoragePlan {\n plan {\n storage\n package {\n _id\n storage\n }\n }\n }\n": typeof types.StoragePlanDocument;
|
|
20
21
|
"\n query MediaUsage {\n mediaUsage\n }\n": typeof types.MediaUsageDocument;
|
|
21
22
|
"\n mutation AddMedias($input: [Upload!]!) {\n addMedias(input: $input) {\n _id\n file_name\n url\n size\n }\n }\n": typeof types.AddMediasDocument;
|
|
22
23
|
"\n mutation DeleteMedias($cursors: [ID!]!) {\n deleteMedias(cursors: $cursors) {\n message\n }\n }\n": typeof types.DeleteMediasDocument;
|
|
23
24
|
"query Metafields($filterKeys: MetafieldFilterKeys, $first: Int) {\n metafields(filterKeys: $filterKeys, first: $first) {\n edges {\n node {\n _id\n entry\n name\n type\n }\n }\n }\n}": typeof types.MetafieldsDocument;
|
|
25
|
+
"query MetaobjectEntries($after: ID, $before: ID, $first: Int, $last: Int, $query: String, $filterKeys: MetaobjectEntryFilterKeys) {\n metaobjectEntries(after: $after, before: $before, first: $first, last: $last, query: $query, filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n }\n }\n }\n}": typeof types.MetaobjectEntriesDocument;
|
|
24
26
|
"query Pages($filterKeys: PageFilterKeys, $after: ID, $before: ID, $first: Int, $last: Int, $query: String) {\n pages(filterKeys: $filterKeys, after: $after, before: $before, first: $first, last: $last, query: $query) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n }\n}": typeof types.PagesDocument;
|
|
25
27
|
"\n query Products($after: ID, $before: ID, $first: Int, $last: Int, $query: String,$filterKeys: ProductFilterKeys) {\n products(after: $after, before: $before, first: $first, last: $last, query: $query,filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n }\n }\n": typeof types.ProductsDocument;
|
|
26
28
|
"\n query Variants($after: ID, $before: ID, $first: Int, $last: Int, $query: String,$filterKeys: VariantFilterKeys) {\n variants(after: $after, before: $before, first: $first, last: $last, query: $query,filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n option1\n option2\n option3\n image {\n _id\n url\n }\n product {\n _id\n title\n }\n }\n }\n }\n }\n": typeof types.VariantsDocument;
|
|
@@ -51,6 +53,10 @@ export declare function graphql(source: "query Blogs($filterKeys: BlogFilterKeys
|
|
|
51
53
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
52
54
|
*/
|
|
53
55
|
export declare function graphql(source: "query Collections($skip: Int, $filterKeys: CollectionFilterKeys, $query: String) {\n collections(skip: $skip, filterKeys: $filterKeys, query: $query) {\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}"): (typeof documents)["query Collections($skip: Int, $filterKeys: CollectionFilterKeys, $query: String) {\n collections(skip: $skip, filterKeys: $filterKeys, query: $query) {\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}"];
|
|
56
|
+
/**
|
|
57
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
58
|
+
*/
|
|
59
|
+
export declare function graphql(source: "query Linklists($after: ID, $before: ID, $first: Int, $last: Int, $query: String, $filterKeys: LinklistFilterKeys) {\n linklists(after: $after, before: $before, first: $first, last: $last, query: $query, filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n links {\n url\n _id\n }\n }\n }\n }\n}"): (typeof documents)["query Linklists($after: ID, $before: ID, $first: Int, $last: Int, $query: String, $filterKeys: LinklistFilterKeys) {\n linklists(after: $after, before: $before, first: $first, last: $last, query: $query, filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n links {\n url\n _id\n }\n }\n }\n }\n}"];
|
|
54
60
|
/**
|
|
55
61
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
56
62
|
*/
|
|
@@ -75,6 +81,10 @@ export declare function graphql(source: "\n mutation DeleteMedias($cursors: [ID
|
|
|
75
81
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
76
82
|
*/
|
|
77
83
|
export declare function graphql(source: "query Metafields($filterKeys: MetafieldFilterKeys, $first: Int) {\n metafields(filterKeys: $filterKeys, first: $first) {\n edges {\n node {\n _id\n entry\n name\n type\n }\n }\n }\n}"): (typeof documents)["query Metafields($filterKeys: MetafieldFilterKeys, $first: Int) {\n metafields(filterKeys: $filterKeys, first: $first) {\n edges {\n node {\n _id\n entry\n name\n type\n }\n }\n }\n}"];
|
|
84
|
+
/**
|
|
85
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
86
|
+
*/
|
|
87
|
+
export declare function graphql(source: "query MetaobjectEntries($after: ID, $before: ID, $first: Int, $last: Int, $query: String, $filterKeys: MetaobjectEntryFilterKeys) {\n metaobjectEntries(after: $after, before: $before, first: $first, last: $last, query: $query, filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n }\n }\n }\n}"): (typeof documents)["query MetaobjectEntries($after: ID, $before: ID, $first: Int, $last: Int, $query: String, $filterKeys: MetaobjectEntryFilterKeys) {\n metaobjectEntries(after: $after, before: $before, first: $first, last: $last, query: $query, filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n }\n }\n }\n}"];
|
|
78
88
|
/**
|
|
79
89
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
80
90
|
*/
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { AddMediasDocument, ArticlesDocument, BlogsDocument, CollectionsDocument, DeleteMediasDocument, MediaUsageDocument, MediasDocument, MetafieldsDocument, PagesDocument, ProductsDocument, StoragePlanDocument, VariantsDocument } from "./graphql.js";
|
|
1
|
+
import { AddMediasDocument, ArticlesDocument, BlogsDocument, CollectionsDocument, DeleteMediasDocument, LinklistsDocument, MediaUsageDocument, MediasDocument, MetafieldsDocument, MetaobjectEntriesDocument, PagesDocument, ProductsDocument, StoragePlanDocument, VariantsDocument } from "./graphql.js";
|
|
2
2
|
const documents = {
|
|
3
3
|
"query Articles($filterKeys: ArticleFilterKeys, $after: ID, $before: ID, $first: Int, $last: Int, $query: String) {\n articles(filterKeys: $filterKeys, after: $after, before: $before, first: $first, last: $last, query: $query) {\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}": ArticlesDocument,
|
|
4
4
|
"query Blogs($filterKeys: BlogFilterKeys, $after: ID, $before: ID, $first: Int, $last: Int, $query: String) {\n blogs(filterKeys: $filterKeys, after: $after, before: $before, first: $first, last: $last, query: $query) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n }\n}": BlogsDocument,
|
|
5
5
|
"query Collections($skip: Int, $filterKeys: CollectionFilterKeys, $query: String) {\n collections(skip: $skip, filterKeys: $filterKeys, query: $query) {\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}": CollectionsDocument,
|
|
6
|
+
"query Linklists($after: ID, $before: ID, $first: Int, $last: Int, $query: String, $filterKeys: LinklistFilterKeys) {\n linklists(after: $after, before: $before, first: $first, last: $last, query: $query, filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n links {\n url\n _id\n }\n }\n }\n }\n}": LinklistsDocument,
|
|
6
7
|
"\n query Medias(\n $after: ID\n $before: ID\n $first: Int\n $last: Int\n $query: String\n $reverse: Boolean\n $sortKey: MediaSortKeys\n $filterKeys: MediaFilterKeys\n ) {\n medias(\n after: $after\n before: $before\n first: $first\n last: $last\n query: $query\n reverse: $reverse\n sortKey: $sortKey\n filterKeys: $filterKeys\n ) {\n edges {\n node {\n _id\n file_name\n url\n size\n type\n mimetype\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n }\n": MediasDocument,
|
|
7
8
|
"\n query StoragePlan {\n plan {\n storage\n package {\n _id\n storage\n }\n }\n }\n": StoragePlanDocument,
|
|
8
9
|
"\n query MediaUsage {\n mediaUsage\n }\n": MediaUsageDocument,
|
|
9
10
|
"\n mutation AddMedias($input: [Upload!]!) {\n addMedias(input: $input) {\n _id\n file_name\n url\n size\n }\n }\n": AddMediasDocument,
|
|
10
11
|
"\n mutation DeleteMedias($cursors: [ID!]!) {\n deleteMedias(cursors: $cursors) {\n message\n }\n }\n": DeleteMediasDocument,
|
|
11
12
|
"query Metafields($filterKeys: MetafieldFilterKeys, $first: Int) {\n metafields(filterKeys: $filterKeys, first: $first) {\n edges {\n node {\n _id\n entry\n name\n type\n }\n }\n }\n}": MetafieldsDocument,
|
|
13
|
+
"query MetaobjectEntries($after: ID, $before: ID, $first: Int, $last: Int, $query: String, $filterKeys: MetaobjectEntryFilterKeys) {\n metaobjectEntries(after: $after, before: $before, first: $first, last: $last, query: $query, filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n }\n }\n }\n}": MetaobjectEntriesDocument,
|
|
12
14
|
"query Pages($filterKeys: PageFilterKeys, $after: ID, $before: ID, $first: Int, $last: Int, $query: String) {\n pages(filterKeys: $filterKeys, after: $after, before: $before, first: $first, last: $last, query: $query) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n }\n}": PagesDocument,
|
|
13
15
|
"\n query Products($after: ID, $before: ID, $first: Int, $last: Int, $query: String,$filterKeys: ProductFilterKeys) {\n products(after: $after, before: $before, first: $first, last: $last, query: $query,filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n title\n image {\n _id\n url\n }\n }\n }\n }\n }\n": ProductsDocument,
|
|
14
16
|
"\n query Variants($after: ID, $before: ID, $first: Int, $last: Int, $query: String,$filterKeys: VariantFilterKeys) {\n variants(after: $after, before: $before, first: $first, last: $last, query: $query,filterKeys: $filterKeys) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n _id\n option1\n option2\n option3\n image {\n _id\n url\n }\n product {\n _id\n title\n }\n }\n }\n }\n }\n": VariantsDocument
|
|
@@ -639,6 +639,7 @@ export type CartLineItem = {
|
|
|
639
639
|
product?: Maybe<Product>;
|
|
640
640
|
product_title?: Maybe<Scalars['String']['output']>;
|
|
641
641
|
quantity?: Maybe<Scalars['Int']['output']>;
|
|
642
|
+
shipping_profile?: Maybe<ShippingProfile>;
|
|
642
643
|
sku?: Maybe<Scalars['String']['output']>;
|
|
643
644
|
source?: Maybe<CartLineItemSource>;
|
|
644
645
|
variant?: Maybe<Variant>;
|
|
@@ -6608,6 +6609,39 @@ export type CollectionsQuery = {
|
|
|
6608
6609
|
} | null;
|
|
6609
6610
|
} | null;
|
|
6610
6611
|
};
|
|
6612
|
+
export type LinklistsQueryVariables = Exact<{
|
|
6613
|
+
after?: InputMaybe<Scalars['ID']['input']>;
|
|
6614
|
+
before?: InputMaybe<Scalars['ID']['input']>;
|
|
6615
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
6616
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
6617
|
+
query?: InputMaybe<Scalars['String']['input']>;
|
|
6618
|
+
filterKeys?: InputMaybe<LinklistFilterKeys>;
|
|
6619
|
+
}>;
|
|
6620
|
+
export type LinklistsQuery = {
|
|
6621
|
+
linklists?: {
|
|
6622
|
+
__typename: 'LinklistConnection';
|
|
6623
|
+
pageInfo?: {
|
|
6624
|
+
__typename: 'PageInfo';
|
|
6625
|
+
endCursor?: string | null;
|
|
6626
|
+
hasNextPage?: boolean | null;
|
|
6627
|
+
hasPreviousPage?: boolean | null;
|
|
6628
|
+
startCursor?: string | null;
|
|
6629
|
+
} | null;
|
|
6630
|
+
edges?: Array<{
|
|
6631
|
+
__typename: 'LinklistEdge';
|
|
6632
|
+
node?: {
|
|
6633
|
+
__typename: 'Linklist';
|
|
6634
|
+
_id?: string | null;
|
|
6635
|
+
title?: string | null;
|
|
6636
|
+
links?: Array<{
|
|
6637
|
+
__typename: 'LinklistLayer1';
|
|
6638
|
+
url?: string | null;
|
|
6639
|
+
_id?: string | null;
|
|
6640
|
+
} | null> | null;
|
|
6641
|
+
} | null;
|
|
6642
|
+
} | null> | null;
|
|
6643
|
+
} | null;
|
|
6644
|
+
};
|
|
6611
6645
|
export type MediasQueryVariables = Exact<{
|
|
6612
6646
|
after?: InputMaybe<Scalars['ID']['input']>;
|
|
6613
6647
|
before?: InputMaybe<Scalars['ID']['input']>;
|
|
@@ -6702,6 +6736,34 @@ export type MetafieldsQuery = {
|
|
|
6702
6736
|
} | null> | null;
|
|
6703
6737
|
} | null;
|
|
6704
6738
|
};
|
|
6739
|
+
export type MetaobjectEntriesQueryVariables = Exact<{
|
|
6740
|
+
after?: InputMaybe<Scalars['ID']['input']>;
|
|
6741
|
+
before?: InputMaybe<Scalars['ID']['input']>;
|
|
6742
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
6743
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
6744
|
+
query?: InputMaybe<Scalars['String']['input']>;
|
|
6745
|
+
filterKeys?: InputMaybe<MetaobjectEntryFilterKeys>;
|
|
6746
|
+
}>;
|
|
6747
|
+
export type MetaobjectEntriesQuery = {
|
|
6748
|
+
metaobjectEntries?: {
|
|
6749
|
+
__typename: 'MetaobjectEntryConnection';
|
|
6750
|
+
pageInfo?: {
|
|
6751
|
+
__typename: 'PageInfo';
|
|
6752
|
+
endCursor?: string | null;
|
|
6753
|
+
hasNextPage?: boolean | null;
|
|
6754
|
+
hasPreviousPage?: boolean | null;
|
|
6755
|
+
startCursor?: string | null;
|
|
6756
|
+
} | null;
|
|
6757
|
+
edges?: Array<{
|
|
6758
|
+
__typename: 'MetaobjectEntryEdge';
|
|
6759
|
+
node?: {
|
|
6760
|
+
__typename: 'MetaobjectEntry';
|
|
6761
|
+
_id?: string | null;
|
|
6762
|
+
title?: string | null;
|
|
6763
|
+
} | null;
|
|
6764
|
+
} | null> | null;
|
|
6765
|
+
} | null;
|
|
6766
|
+
};
|
|
6705
6767
|
export type PagesQueryVariables = Exact<{
|
|
6706
6768
|
filterKeys?: InputMaybe<PageFilterKeys>;
|
|
6707
6769
|
after?: InputMaybe<Scalars['ID']['input']>;
|
|
@@ -6811,12 +6873,14 @@ export type VariantsQuery = {
|
|
|
6811
6873
|
export declare const ArticlesDocument: DocumentNode<ArticlesQuery, ArticlesQueryVariables>;
|
|
6812
6874
|
export declare const BlogsDocument: DocumentNode<BlogsQuery, BlogsQueryVariables>;
|
|
6813
6875
|
export declare const CollectionsDocument: DocumentNode<CollectionsQuery, CollectionsQueryVariables>;
|
|
6876
|
+
export declare const LinklistsDocument: DocumentNode<LinklistsQuery, LinklistsQueryVariables>;
|
|
6814
6877
|
export declare const MediasDocument: DocumentNode<MediasQuery, MediasQueryVariables>;
|
|
6815
6878
|
export declare const StoragePlanDocument: DocumentNode<StoragePlanQuery, StoragePlanQueryVariables>;
|
|
6816
6879
|
export declare const MediaUsageDocument: DocumentNode<MediaUsageQuery, MediaUsageQueryVariables>;
|
|
6817
6880
|
export declare const AddMediasDocument: DocumentNode<AddMediasMutation, AddMediasMutationVariables>;
|
|
6818
6881
|
export declare const DeleteMediasDocument: DocumentNode<DeleteMediasMutation, DeleteMediasMutationVariables>;
|
|
6819
6882
|
export declare const MetafieldsDocument: DocumentNode<MetafieldsQuery, MetafieldsQueryVariables>;
|
|
6883
|
+
export declare const MetaobjectEntriesDocument: DocumentNode<MetaobjectEntriesQuery, MetaobjectEntriesQueryVariables>;
|
|
6820
6884
|
export declare const PagesDocument: DocumentNode<PagesQuery, PagesQueryVariables>;
|
|
6821
6885
|
export declare const ProductsDocument: DocumentNode<ProductsQuery, ProductsQueryVariables>;
|
|
6822
6886
|
export declare const VariantsDocument: DocumentNode<VariantsQuery, VariantsQueryVariables>;
|