@soppiya/app-bridge 1.0.9 → 1.1.2
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/index.d.ts +1 -0
- package/dist/components/articles-picker/index.js +2 -0
- package/dist/components/articles-picker/ui/ArticlesPicker.js +1 -1
- package/dist/components/blogs-picker/index.d.ts +1 -0
- package/dist/components/blogs-picker/index.js +2 -0
- package/dist/components/blogs-picker/ui/BlogsPicker.js +0 -1
- package/dist/components/collections-pciker/index.d.ts +1 -0
- package/dist/components/collections-pciker/index.js +2 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +6 -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 +98 -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/index.d.ts +1 -0
- package/dist/components/meta-data/index.js +2 -0
- package/dist/components/meta-data/ui/ArticleRefMetaField.js +1 -1
- package/dist/components/meta-data/ui/BlogRefMetaField.js +1 -1
- package/dist/components/meta-data/ui/CollectionRefMetaField.js +1 -1
- package/dist/components/meta-data/ui/ColorMetaField.js +8 -8
- package/dist/components/meta-data/ui/MetaData.js +23 -2
- package/dist/components/meta-data/ui/MetaDataItem.js +14 -5
- package/dist/components/meta-data/ui/MetaDataTypePopup.js +17 -9
- package/dist/components/meta-data/ui/PageRefMetaField.d.ts +1 -1
- package/dist/components/meta-data/ui/PageRefMetaField.js +36 -5
- package/dist/components/pages-picker/api/query.d.ts +8 -0
- package/dist/components/pages-picker/api/query.js +22 -0
- package/dist/components/pages-picker/index.d.ts +1 -0
- package/dist/components/pages-picker/index.js +2 -0
- package/dist/components/pages-picker/model/usePages.d.ts +30 -0
- package/dist/components/pages-picker/model/usePages.js +46 -0
- package/dist/components/pages-picker/ui/PagesPicker.d.ts +9 -0
- package/dist/components/pages-picker/ui/PagesPicker.js +104 -0
- package/dist/components/pages-picker/ui/PagesPicker.stories.d.ts +17 -0
- package/dist/components/pages-picker/ui/PagesPicker.stories.js +13 -0
- package/dist/shared/graphql/gql.d.ts +10 -0
- package/dist/shared/graphql/gql.js +3 -1
- package/dist/shared/graphql/graphql.d.ts +69 -0
- package/dist/shared/graphql/graphql.js +872 -224
- package/dist/styles.css +35 -2
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PageFilterKeys } from "../../../shared/graphql/graphql";
|
|
2
|
+
type Props = {
|
|
3
|
+
skip?: boolean;
|
|
4
|
+
first?: number;
|
|
5
|
+
query?: string | null;
|
|
6
|
+
filterKeys?: PageFilterKeys;
|
|
7
|
+
};
|
|
8
|
+
export declare const usePages: (props?: Props) => {
|
|
9
|
+
pages: {
|
|
10
|
+
__typename: "Page";
|
|
11
|
+
_id?: string | null;
|
|
12
|
+
title?: string | null;
|
|
13
|
+
image?: {
|
|
14
|
+
__typename: "Media";
|
|
15
|
+
_id?: string | null;
|
|
16
|
+
url?: string | null;
|
|
17
|
+
} | null;
|
|
18
|
+
}[] | undefined;
|
|
19
|
+
isLoadingPages: boolean;
|
|
20
|
+
error: import("@apollo/client").ErrorLike | undefined;
|
|
21
|
+
fetchMorePages: () => void;
|
|
22
|
+
pageInfo: {
|
|
23
|
+
__typename: "PageInfo";
|
|
24
|
+
endCursor?: string | null;
|
|
25
|
+
hasNextPage?: boolean | null;
|
|
26
|
+
hasPreviousPage?: boolean | null;
|
|
27
|
+
startCursor?: string | null;
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useQuery } from "@apollo/client/react";
|
|
2
|
+
import { pagesQuery } from "../api/query.js";
|
|
3
|
+
const usePages = (props = {})=>{
|
|
4
|
+
const { skip, first, query, filterKeys } = props;
|
|
5
|
+
const { data, loading: isLoadingPages, error, fetchMore } = useQuery(pagesQuery, {
|
|
6
|
+
skip,
|
|
7
|
+
variables: {
|
|
8
|
+
first,
|
|
9
|
+
query,
|
|
10
|
+
filterKeys
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const pages = data?.pages?.edges?.map((edge)=>edge?.node).filter((node)=>null != node);
|
|
14
|
+
const pageInfo = data?.pages?.pageInfo;
|
|
15
|
+
const fetchMorePages = ()=>{
|
|
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.pages?.edges || !prev.pages?.edges) return prev;
|
|
26
|
+
return {
|
|
27
|
+
pages: {
|
|
28
|
+
...fetchMoreResult.pages,
|
|
29
|
+
edges: {
|
|
30
|
+
...prev.pages.edges,
|
|
31
|
+
...fetchMoreResult.pages.edges
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
pages,
|
|
40
|
+
isLoadingPages,
|
|
41
|
+
error,
|
|
42
|
+
fetchMorePages,
|
|
43
|
+
pageInfo
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export { usePages };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
initialIds?: string[];
|
|
4
|
+
limit?: number;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
onOk?: (pages: string[]) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const PagesPicker: ({ title, initialIds, limit, onClose, onOk }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default PagesPicker;
|
|
@@ -0,0 +1,104 @@
|
|
|
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, Image, InlineStack, Input, Modal, Spinner, Text } from "@soppiya/elementus";
|
|
5
|
+
import lodash from "lodash";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import { usePages } from "../model/usePages.js";
|
|
8
|
+
const PagesPicker = ({ title, initialIds = [], limit = 1 / 0, onClose, onOk })=>{
|
|
9
|
+
const [selectedPage, setSelectedPage] = useState(initialIds);
|
|
10
|
+
const { query, debounceQuery, onChangeQuery } = useFilterQuery();
|
|
11
|
+
const { pages, fetchMorePages, isLoadingPages, pageInfo } = usePages({
|
|
12
|
+
first: 20,
|
|
13
|
+
query: debounceQuery
|
|
14
|
+
});
|
|
15
|
+
const handleSelectedPage = (pageId)=>{
|
|
16
|
+
selectedPage.includes(pageId) ? setSelectedPage((prev)=>prev.filter((id)=>pageId !== id)) : setSelectedPage((prev)=>[
|
|
17
|
+
...prev,
|
|
18
|
+
pageId
|
|
19
|
+
]);
|
|
20
|
+
};
|
|
21
|
+
const handleOk = ()=>{
|
|
22
|
+
if (lodash.isFunction(onOk)) onOk(selectedPage);
|
|
23
|
+
};
|
|
24
|
+
const ButtonJSX = /*#__PURE__*/ jsx(InlineStack, {
|
|
25
|
+
justifyContent: "end",
|
|
26
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
27
|
+
onClick: handleOk,
|
|
28
|
+
children: "Add"
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
return /*#__PURE__*/ jsx(Modal, {
|
|
32
|
+
open: true,
|
|
33
|
+
title: title || "Pages",
|
|
34
|
+
buttons: ButtonJSX,
|
|
35
|
+
bodyPadding: 0,
|
|
36
|
+
onClose: onClose,
|
|
37
|
+
children: /*#__PURE__*/ jsxs(BlockStack, {
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ jsx(Box, {
|
|
40
|
+
className: "border-b border-b-[#ebebeb]! h",
|
|
41
|
+
padding: 60,
|
|
42
|
+
children: /*#__PURE__*/ jsx(Input, {
|
|
43
|
+
size: "sm",
|
|
44
|
+
type: "search",
|
|
45
|
+
value: query ?? "",
|
|
46
|
+
onChange: (event)=>onChangeQuery(event.target.value)
|
|
47
|
+
})
|
|
48
|
+
}),
|
|
49
|
+
isLoadingPages ? /*#__PURE__*/ jsx(InlineStack, {
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
padding: 80,
|
|
52
|
+
children: /*#__PURE__*/ jsx(Spinner, {
|
|
53
|
+
size: "md"
|
|
54
|
+
})
|
|
55
|
+
}) : /*#__PURE__*/ jsxs(BlockStack, {
|
|
56
|
+
children: [
|
|
57
|
+
pages?.map((product)=>/*#__PURE__*/ jsxs(InlineStack, {
|
|
58
|
+
stack: "full",
|
|
59
|
+
className: "lg:cursor-pointer border-b border-b-[#ebebeb]!",
|
|
60
|
+
gapX: 60,
|
|
61
|
+
padding: 60,
|
|
62
|
+
onClick: ()=>handleSelectedPage(String(product._id)),
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ jsxs(InlineStack, {
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
gapX: 60,
|
|
67
|
+
children: [
|
|
68
|
+
/*#__PURE__*/ jsx(Box, {
|
|
69
|
+
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
70
|
+
checked: selectedPage.includes(String(product._id)),
|
|
71
|
+
onChange: ()=>{}
|
|
72
|
+
})
|
|
73
|
+
}),
|
|
74
|
+
/*#__PURE__*/ jsx(Box, {
|
|
75
|
+
children: /*#__PURE__*/ jsx(Image, {
|
|
76
|
+
size: "xs",
|
|
77
|
+
url: String(product.image?.url)
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ jsx(BlockStack, {
|
|
83
|
+
gapY: 30,
|
|
84
|
+
justifyContent: "center",
|
|
85
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
86
|
+
size: "sm",
|
|
87
|
+
color: "secondary",
|
|
88
|
+
truncate: "truncate-1",
|
|
89
|
+
children: product.title
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
}, product._id)),
|
|
94
|
+
pageInfo?.hasNextPage && /*#__PURE__*/ jsx(InfinityScroll, {
|
|
95
|
+
onFetch: fetchMorePages
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
const ui_PagesPicker = PagesPicker;
|
|
104
|
+
export { ui_PagesPicker as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: ({ title, initialIds, limit, onClose, onOk }: {
|
|
4
|
+
title?: string;
|
|
5
|
+
initialIds?: string[];
|
|
6
|
+
limit?: number;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
onOk?: (pages: string[]) => void;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export declare const Default: {
|
|
13
|
+
args: {
|
|
14
|
+
primary: boolean;
|
|
15
|
+
label: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import PagesPicker from "./PagesPicker.js";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Example/PagesPicker",
|
|
4
|
+
component: PagesPicker
|
|
5
|
+
};
|
|
6
|
+
const PagesPicker_stories = meta;
|
|
7
|
+
const Default = {
|
|
8
|
+
args: {
|
|
9
|
+
primary: true,
|
|
10
|
+
label: "Button"
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export { Default, PagesPicker_stories as default };
|
|
@@ -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 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;
|
|
24
26
|
"\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;
|
|
25
27
|
"\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;
|
|
26
28
|
};
|
|
@@ -50,6 +52,10 @@ export declare function graphql(source: "query Blogs($filterKeys: BlogFilterKeys
|
|
|
50
52
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
51
53
|
*/
|
|
52
54
|
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}"];
|
|
55
|
+
/**
|
|
56
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
57
|
+
*/
|
|
58
|
+
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}"];
|
|
53
59
|
/**
|
|
54
60
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
55
61
|
*/
|
|
@@ -74,6 +80,10 @@ export declare function graphql(source: "\n mutation DeleteMedias($cursors: [ID
|
|
|
74
80
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
75
81
|
*/
|
|
76
82
|
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}"];
|
|
83
|
+
/**
|
|
84
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
85
|
+
*/
|
|
86
|
+
export declare function graphql(source: "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 documents)["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}"];
|
|
77
87
|
/**
|
|
78
88
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
79
89
|
*/
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { AddMediasDocument, ArticlesDocument, BlogsDocument, CollectionsDocument, DeleteMediasDocument, MediaUsageDocument, MediasDocument, MetafieldsDocument, ProductsDocument, StoragePlanDocument, VariantsDocument } from "./graphql.js";
|
|
1
|
+
import { AddMediasDocument, ArticlesDocument, BlogsDocument, CollectionsDocument, DeleteMediasDocument, LinklistsDocument, MediaUsageDocument, MediasDocument, MetafieldsDocument, 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 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,
|
|
12
14
|
"\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,
|
|
13
15
|
"\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
|
|
14
16
|
};
|
|
@@ -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,39 @@ export type MetafieldsQuery = {
|
|
|
6702
6736
|
} | null> | null;
|
|
6703
6737
|
} | null;
|
|
6704
6738
|
};
|
|
6739
|
+
export type PagesQueryVariables = Exact<{
|
|
6740
|
+
filterKeys?: InputMaybe<PageFilterKeys>;
|
|
6741
|
+
after?: InputMaybe<Scalars['ID']['input']>;
|
|
6742
|
+
before?: InputMaybe<Scalars['ID']['input']>;
|
|
6743
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
6744
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
6745
|
+
query?: InputMaybe<Scalars['String']['input']>;
|
|
6746
|
+
}>;
|
|
6747
|
+
export type PagesQuery = {
|
|
6748
|
+
pages?: {
|
|
6749
|
+
__typename: 'PageConnection';
|
|
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: 'PageEdge';
|
|
6759
|
+
node?: {
|
|
6760
|
+
__typename: 'Page';
|
|
6761
|
+
_id?: string | null;
|
|
6762
|
+
title?: string | null;
|
|
6763
|
+
image?: {
|
|
6764
|
+
__typename: 'Media';
|
|
6765
|
+
_id?: string | null;
|
|
6766
|
+
url?: string | null;
|
|
6767
|
+
} | null;
|
|
6768
|
+
} | null;
|
|
6769
|
+
} | null> | null;
|
|
6770
|
+
} | null;
|
|
6771
|
+
};
|
|
6705
6772
|
export type ProductsQueryVariables = Exact<{
|
|
6706
6773
|
after?: InputMaybe<Scalars['ID']['input']>;
|
|
6707
6774
|
before?: InputMaybe<Scalars['ID']['input']>;
|
|
@@ -6778,11 +6845,13 @@ export type VariantsQuery = {
|
|
|
6778
6845
|
export declare const ArticlesDocument: DocumentNode<ArticlesQuery, ArticlesQueryVariables>;
|
|
6779
6846
|
export declare const BlogsDocument: DocumentNode<BlogsQuery, BlogsQueryVariables>;
|
|
6780
6847
|
export declare const CollectionsDocument: DocumentNode<CollectionsQuery, CollectionsQueryVariables>;
|
|
6848
|
+
export declare const LinklistsDocument: DocumentNode<LinklistsQuery, LinklistsQueryVariables>;
|
|
6781
6849
|
export declare const MediasDocument: DocumentNode<MediasQuery, MediasQueryVariables>;
|
|
6782
6850
|
export declare const StoragePlanDocument: DocumentNode<StoragePlanQuery, StoragePlanQueryVariables>;
|
|
6783
6851
|
export declare const MediaUsageDocument: DocumentNode<MediaUsageQuery, MediaUsageQueryVariables>;
|
|
6784
6852
|
export declare const AddMediasDocument: DocumentNode<AddMediasMutation, AddMediasMutationVariables>;
|
|
6785
6853
|
export declare const DeleteMediasDocument: DocumentNode<DeleteMediasMutation, DeleteMediasMutationVariables>;
|
|
6786
6854
|
export declare const MetafieldsDocument: DocumentNode<MetafieldsQuery, MetafieldsQueryVariables>;
|
|
6855
|
+
export declare const PagesDocument: DocumentNode<PagesQuery, PagesQueryVariables>;
|
|
6787
6856
|
export declare const ProductsDocument: DocumentNode<ProductsQuery, ProductsQueryVariables>;
|
|
6788
6857
|
export declare const VariantsDocument: DocumentNode<VariantsQuery, VariantsQueryVariables>;
|