saleor-dashboard/src/categories/fixtures.ts

493 lines
13 KiB
TypeScript
Raw Normal View History

2019-06-19 14:40:52 +00:00
import { content } from "../storybook/stories/components/RichTextEditor";
import { CategoryDetails_category } from "./types/CategoryDetails";
2019-09-11 12:59:41 +00:00
import { CategoryFragment } from "./types/CategoryFragment";
2019-06-19 14:40:52 +00:00
2019-09-11 12:59:41 +00:00
export const categories: CategoryFragment[] = [
2019-06-19 14:40:52 +00:00
{
2019-09-11 12:59:41 +00:00
__typename: "Category",
2019-06-19 14:40:52 +00:00
children: {
2019-09-11 12:59:41 +00:00
__typename: "CategoryCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 2
},
id: "123123",
name: "Lorem ipsum dolor",
products: {
2019-09-11 12:59:41 +00:00
__typename: "ProductCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 4
}
},
{
2019-09-11 12:59:41 +00:00
__typename: "Category",
2019-06-19 14:40:52 +00:00
children: {
2019-09-11 12:59:41 +00:00
__typename: "CategoryCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 54
},
id: "876752",
name: "Mauris vehicula tortor vulputate",
products: {
2019-09-11 12:59:41 +00:00
__typename: "ProductCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 3
}
},
{
2019-09-11 12:59:41 +00:00
__typename: "Category",
2019-06-19 14:40:52 +00:00
children: {
2019-09-11 12:59:41 +00:00
__typename: "CategoryCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 2
},
id: "876542",
name: "Excepteur sint occaecat cupidatat non proident",
products: {
2019-09-11 12:59:41 +00:00
__typename: "ProductCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 6
}
},
{
2019-09-11 12:59:41 +00:00
__typename: "Category",
2019-06-19 14:40:52 +00:00
children: {
2019-09-11 12:59:41 +00:00
__typename: "CategoryCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 6
},
id: "875352",
name: "Ut enim ad minim veniam",
products: {
2019-09-11 12:59:41 +00:00
__typename: "ProductCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 12
}
},
{
2019-09-11 12:59:41 +00:00
__typename: "Category",
2019-06-19 14:40:52 +00:00
children: {
2019-09-11 12:59:41 +00:00
__typename: "CategoryCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 76
},
id: "865752",
name: "Duis aute irure dolor in reprehenderit",
products: {
2019-09-11 12:59:41 +00:00
__typename: "ProductCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 43
}
},
{
2019-09-11 12:59:41 +00:00
__typename: "Category",
2019-06-19 14:40:52 +00:00
children: {
2019-09-11 12:59:41 +00:00
__typename: "CategoryCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 11
},
id: "878752",
name: "Neque porro quisquam est",
products: {
2019-09-11 12:59:41 +00:00
__typename: "ProductCountableConnection",
2019-06-19 14:40:52 +00:00
totalCount: 21
}
}
];
export const category: (
placeholderImage: string
) => CategoryDetails_category = (placeholderImage: string) => ({
__typename: "Category",
backgroundImage: {
__typename: "Image",
alt: "Alt text",
url: placeholderImage
},
children: {
__typename: "CategoryCountableConnection",
2019-11-12 13:23:09 +00:00
edges: [],
pageInfo: {
__typename: "PageInfo",
endCursor: "YXJyYXljb25uZWN0aW9uOjk=",
hasNextPage: false,
hasPreviousPage: false,
startCursor: "YXJyYXljb25uZWN0aW9uOjA="
}
2019-06-19 14:40:52 +00:00
},
descriptionJson: JSON.stringify(content),
id: "Q2F0ZWdvcnk6NA==",
name: "Coffees",
parent: {
__typename: "Category",
id: "Q2F0ZWdvcnk6Mw=="
},
products: {
__typename: "ProductCountableConnection",
edges: [
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjA=",
node: {
__typename: "Product",
id: "UHJvZHVjdDoyMQ==",
isAvailable: true,
name: "Gardner-Schultz",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
},
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjE=",
node: {
__typename: "Product",
id: "UHJvZHVjdDoyMg==",
isAvailable: true,
name: "James, Martinez and Murray",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
},
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjI=",
node: {
__typename: "Product",
id: "UHJvZHVjdDoyMw==",
isAvailable: true,
name: "Curtis, Joyce and Turner",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
},
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjM=",
node: {
__typename: "Product",
id: "UHJvZHVjdDoyNA==",
isAvailable: true,
name: "Davis, Brown and Ray",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
},
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjQ=",
node: {
__typename: "Product",
id: "UHJvZHVjdDoyNQ==",
isAvailable: true,
name: "Gallegos Ltd",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
},
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjU=",
node: {
__typename: "Product",
id: "UHJvZHVjdDoyNg==",
isAvailable: true,
name: "Franklin Inc",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
},
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjY=",
node: {
__typename: "Product",
id: "UHJvZHVjdDoyNw==",
isAvailable: true,
name: "Williams-Taylor",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
},
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjc=",
node: {
__typename: "Product",
id: "UHJvZHVjdDoyOA==",
isAvailable: true,
name: "Riddle, Evans and Hicks",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
},
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjg=",
node: {
__typename: "Product",
id: "UHJvZHVjdDoyOQ==",
isAvailable: true,
name: "Hebert-Sherman",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
},
{
__typename: "ProductCountableEdge",
cursor: "YXJyYXljb25uZWN0aW9uOjk=",
node: {
__typename: "Product",
id: "UHJvZHVjdDozMA==",
isAvailable: true,
name: "Carter and Sons",
productType: {
__typename: "ProductType",
id: "UHJvZHVjdFR5cGU6Mw==",
name: "Coffee"
},
2020-06-16 11:13:10 +00:00
thumbnail: { __typename: "Image", url: placeholderImage },
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 5,
currency: "USD"
}
},
{
__typename: "ProductVariant" as "ProductVariant",
2020-06-17 08:31:33 +00:00
id: "pv70010",
2020-06-16 11:13:10 +00:00
price: {
__typename: "Money" as "Money",
amount: 10,
currency: "USD"
}
}
]
2019-06-19 14:40:52 +00:00
}
}
],
pageInfo: {
__typename: "PageInfo",
endCursor: "YXJyYXljb25uZWN0aW9uOjk=",
hasNextPage: false,
hasPreviousPage: false,
startCursor: "YXJyYXljb25uZWN0aW9uOjA="
}
},
seoDescription: null,
seoTitle: null
});
export const errors = [
{
field: "name",
message: "To pole jest wymagane."
}
];