SALEOR-2036 Drop descriptionJson and contentJson fields (#950)

* Drop descriptionJson and contentJson fields

* Bump EditorJS version

* Update changelog

* Update tests
This commit is contained in:
Jakub Majorek 2021-01-22 12:13:40 +01:00 committed by GitHub
parent e74225b570
commit 10131163c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 329 additions and 212 deletions

View file

@ -16,6 +16,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Guard against non-staff users logging in - #947 by @jwm0
- Add reference attributes - #917 by @orzechdev
- Add product reference attributes - #948 by @orzechdev
- Drop descriptionJson and contentJson fields - #950 by @jwm0
# 2.11.1

View file

@ -0,0 +1,132 @@
{
"log": {
"_recordingName": "User/will not be logged in if is non-staff",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "5.0.0"
},
"entries": [
{
"_id": "0b09ec35ecae5b17a2ccda062b1d6ef5",
"_order": 0,
"cache": {},
"request": {
"bodySize": 602,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "*/*"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-length",
"value": "602"
},
{
"_fromType": "array",
"name": "user-agent",
"value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
},
{
"_fromType": "array",
"name": "accept-encoding",
"value": "gzip,deflate"
},
{
"_fromType": "array",
"name": "connection",
"value": "close"
},
{
"name": "host",
"value": "localhost:8000"
}
],
"headersSize": 254,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "[{\"operationName\":\"TokenAuth\",\"variables\":{\"email\":\"client@example.com\",\"password\":\"password\"},\"query\":\"fragment User on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n userPermissions {\\n code\\n name\\n __typename\\n }\\n avatar {\\n url\\n __typename\\n }\\n __typename\\n}\\n\\nmutation TokenAuth($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n errors: accountErrors {\\n field\\n message\\n __typename\\n }\\n csrfToken\\n token\\n user {\\n ...User\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}]"
},
"queryString": [],
"url": "http://localhost:8000/graphql/"
},
"response": {
"bodySize": 616,
"content": {
"mimeType": "application/json",
"size": 616,
"text": "[{\"data\": {\"tokenCreate\": {\"errors\": [], \"csrfToken\": \"ztCCq2djodzVWeaynv8ifQbIIB4nrM6HyInqcZ4xqoaIEfOOKUEhAqw9rVR8Cr8L\", \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MTEwNjY1MTcsImV4cCI6MTYxMTA2NjgxNywidG9rZW4iOiJ6MDc2QndLZkNEMmYiLCJlbWFpbCI6ImNsaWVudEBleGFtcGxlLmNvbSIsInR5cGUiOiJhY2Nlc3MiLCJ1c2VyX2lkIjoiVlhObGNqb3pNQT09IiwiaXNfc3RhZmYiOmZhbHNlfQ.lXsNnIBxZCCL843TTjn84lkWpE05o88F5q811ApjdKA\", \"user\": {\"id\": \"VXNlcjozMA==\", \"email\": \"client@example.com\", \"firstName\": \"\", \"lastName\": \"\", \"isStaff\": false, \"userPermissions\": [], \"avatar\": null, \"__typename\": \"User\"}, \"__typename\": \"CreateToken\"}}}]"
},
"cookies": [
{
"httpOnly": true,
"name": "refreshToken",
"path": "/",
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MTEwNjY1MTcsImV4cCI6MTYxMzY1ODUxNywidG9rZW4iOiJ6MDc2QndLZkNEMmYiLCJlbWFpbCI6ImNsaWVudEBleGFtcGxlLmNvbSIsInR5cGUiOiJyZWZyZXNoIiwidXNlcl9pZCI6IlZYTmxjam96TUE9PSIsImlzX3N0YWZmIjpmYWxzZSwiY3NyZlRva2VuIjoienRDQ3EyZGpvZHpWV2VheW52OGlmUWJJSUI0bnJNNkh5SW5xY1o0eHFvYUlFZk9PS1VFaEFxdzlyVlI4Q3I4TCJ9.hDMEK3HFSLol7rLd9dfaSCLTWgvetNDAFsb039L9PXQ"
}
],
"headers": [
{
"name": "date",
"value": "Tue, 19 Jan 2021 14:28:37 GMT"
},
{
"name": "server",
"value": "WSGIServer/0.2 CPython/3.9.1"
},
{
"name": "content-type",
"value": "application/json"
},
{
"name": "content-length",
"value": "616"
},
{
"name": "x-content-type-options",
"value": "nosniff"
},
{
"name": "referrer-policy",
"value": "same-origin"
},
{
"_fromType": "array",
"name": "set-cookie",
"value": "refreshToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MTEwNjY1MTcsImV4cCI6MTYxMzY1ODUxNywidG9rZW4iOiJ6MDc2QndLZkNEMmYiLCJlbWFpbCI6ImNsaWVudEBleGFtcGxlLmNvbSIsInR5cGUiOiJyZWZyZXNoIiwidXNlcl9pZCI6IlZYTmxjam96TUE9PSIsImlzX3N0YWZmIjpmYWxzZSwiY3NyZlRva2VuIjoienRDQ3EyZGpvZHpWV2VheW52OGlmUWJJSUI0bnJNNkh5SW5xY1o0eHFvYUlFZk9PS1VFaEFxdzlyVlI4Q3I4TCJ9.hDMEK3HFSLol7rLd9dfaSCLTWgvetNDAFsb039L9PXQ; HttpOnly; Path=/"
}
],
"headersSize": 619,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2021-01-19T14:28:37.164Z",
"time": 468,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 468
}
}
],
"pages": [],
"version": "1.2"
}
}

View file

@ -671,13 +671,13 @@ type Category implements Node & ObjectWithMetadata {
seoDescription: String
id: ID!
name: String!
description: String!
descriptionJson: JSONString!
description: JSONString!
slug: String!
parent: Category
level: Int!
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
ancestors(before: String, after: String, first: Int, last: Int): CategoryCountableConnection
products(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection
url: String @deprecated(reason: "This field will be removed after 2020-07-31.")
@ -721,8 +721,7 @@ input CategoryFilterInput {
}
input CategoryInput {
description: String
descriptionJson: JSONString
description: JSONString
name: String
slug: String
seo: SeoInput
@ -747,8 +746,8 @@ type CategoryTranslatableContent implements Node {
seoDescription: String
id: ID!
name: String!
description: String!
descriptionJson: JSONString!
description: JSONString!
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
translation(languageCode: LanguageCodeEnum!): CategoryTranslation
category: Category
}
@ -764,9 +763,9 @@ type CategoryTranslation implements Node {
seoDescription: String
id: ID!
name: String!
description: String!
descriptionJson: JSONString!
description: JSONString!
language: LanguageDisplay!
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
}
type CategoryUpdate {
@ -1051,11 +1050,11 @@ type Collection implements Node & ObjectWithMetadata {
seoDescription: String
id: ID!
name: String!
description: String!
descriptionJson: JSONString!
description: JSONString!
slug: String!
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
products(filter: ProductFilterInput, sortBy: ProductOrder, before: String, after: String, first: Int, last: Int): ProductCountableConnection
backgroundImage(size: Int): Image
translation(languageCode: LanguageCodeEnum!): CollectionTranslation
@ -1122,8 +1121,7 @@ input CollectionCreateInput {
isPublished: Boolean
name: String
slug: String
description: String
descriptionJson: JSONString
description: JSONString
backgroundImage: Upload
backgroundImageAlt: String
seo: SeoInput
@ -1165,8 +1163,7 @@ input CollectionInput {
isPublished: Boolean
name: String
slug: String
description: String
descriptionJson: JSONString
description: JSONString
backgroundImage: Upload
backgroundImageAlt: String
seo: SeoInput
@ -1208,8 +1205,8 @@ type CollectionTranslatableContent implements Node {
seoDescription: String
id: ID!
name: String!
description: String!
descriptionJson: JSONString!
description: JSONString!
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
translation(languageCode: LanguageCodeEnum!): CollectionTranslation
collection: Collection
}
@ -1225,9 +1222,9 @@ type CollectionTranslation implements Node {
seoDescription: String
id: ID!
name: String!
description: String!
descriptionJson: JSONString!
description: JSONString!
language: LanguageDisplay!
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
}
type CollectionUpdate {
@ -2837,7 +2834,7 @@ type Order implements Node & ObjectWithMetadata {
shippingMethod: ShippingMethod
shippingMethodName: String
channel: Channel!
shippingPrice: TaxedMoney
shippingPrice: TaxedMoney!
shippingTaxRate: Float!
token: String!
voucher: Voucher
@ -2857,16 +2854,16 @@ type Order implements Node & ObjectWithMetadata {
availableShippingMethods: [ShippingMethod]
invoices: [Invoice]
number: String
isPaid: Boolean
paymentStatus: PaymentChargeStatusEnum
paymentStatusDisplay: String
isPaid: Boolean!
paymentStatus: PaymentChargeStatusEnum!
paymentStatusDisplay: String!
payments: [Payment]
total: TaxedMoney
subtotal: TaxedMoney
total: TaxedMoney!
subtotal: TaxedMoney!
statusDisplay: String
canFinalize: Boolean!
totalAuthorized: Money
totalCaptured: Money
totalAuthorized: Money!
totalCaptured: Money!
events: [OrderEvent]
totalBalance: Money!
userEmail: String
@ -3109,8 +3106,8 @@ type OrderLine implements Node {
taxRate: Float!
digitalContentUrl: DigitalContentUrl
thumbnail(size: Int): Image
unitPrice: TaxedMoney
totalPrice: TaxedMoney
unitPrice: TaxedMoney!
totalPrice: TaxedMoney!
variant: ProductVariant
translatedProductName: String!
translatedVariantName: String!
@ -3266,8 +3263,7 @@ type Page implements Node & ObjectWithMetadata {
seoDescription: String
id: ID!
title: String!
content: String!
contentJson: JSONString!
content: JSONString!
publicationDate: Date
isPublished: Boolean!
slug: String!
@ -3275,6 +3271,7 @@ type Page implements Node & ObjectWithMetadata {
created: DateTime!
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
contentJson: String! @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.")
translation(languageCode: LanguageCodeEnum!): PageTranslation
attributes: [SelectedAttribute!]!
}
@ -3323,8 +3320,7 @@ type PageCreate {
input PageCreateInput {
slug: String
title: String
content: String
contentJson: JSONString
content: JSONString
attributes: [AttributeValueInput!]
isPublished: Boolean
publicationDate: String
@ -3370,8 +3366,7 @@ type PageInfo {
input PageInput {
slug: String
title: String
content: String
contentJson: JSONString
content: JSONString
attributes: [AttributeValueInput!]
isPublished: Boolean
publicationDate: String
@ -3402,8 +3397,8 @@ type PageTranslatableContent implements Node {
seoDescription: String
id: ID!
title: String!
content: String!
contentJson: JSONString!
content: JSONString!
contentJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.")
translation(languageCode: LanguageCodeEnum!): PageTranslation
page: Page
}
@ -3419,17 +3414,16 @@ type PageTranslation implements Node {
seoDescription: String
id: ID!
title: String!
content: String!
contentJson: JSONString!
content: JSONString!
language: LanguageDisplay!
contentJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.")
}
input PageTranslationInput {
seoTitle: String
seoDescription: String
title: String
content: String
contentJson: JSONString
content: JSONString
}
type PageType implements Node & ObjectWithMetadata {
@ -3797,8 +3791,7 @@ type Product implements Node & ObjectWithMetadata {
seoTitle: String
seoDescription: String
name: String!
description: String!
descriptionJson: JSONString!
description: JSONString!
productType: ProductType!
slug: String!
category: Category
@ -3809,6 +3802,7 @@ type Product implements Node & ObjectWithMetadata {
rating: Float
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
url: String! @deprecated(reason: "This field will be removed after 2020-07-31.")
thumbnail(size: Int): Image
pricing: ProductPricingInfo
@ -3918,8 +3912,7 @@ input ProductCreateInput {
category: ID
chargeTaxes: Boolean
collections: [ID]
description: String
descriptionJson: JSONString
description: JSONString
name: String
slug: String
taxCode: String
@ -4050,8 +4043,7 @@ input ProductInput {
category: ID
chargeTaxes: Boolean
collections: [ID]
description: String
descriptionJson: JSONString
description: JSONString
name: String
slug: String
taxCode: String
@ -4104,8 +4096,8 @@ type ProductTranslatableContent implements Node {
seoTitle: String
seoDescription: String
name: String!
description: String!
descriptionJson: JSONString!
description: JSONString!
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
translation(languageCode: LanguageCodeEnum!): ProductTranslation
product: Product
}
@ -4121,9 +4113,9 @@ type ProductTranslation implements Node {
seoTitle: String
seoDescription: String
name: String!
description: String!
descriptionJson: JSONString!
description: JSONString!
language: LanguageDisplay!
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
}
type ProductType implements Node & ObjectWithMetadata {
@ -5289,8 +5281,7 @@ input TranslationInput {
seoTitle: String
seoDescription: String
name: String
description: String
descriptionJson: JSONString
description: JSONString
}
scalar UUID
@ -5621,7 +5612,7 @@ type VoucherUpdate {
voucher: Voucher
}
type Warehouse implements Node {
type Warehouse implements Node & ObjectWithMetadata {
id: ID!
name: String!
slug: String!
@ -5629,6 +5620,8 @@ type Warehouse implements Node {
shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection!
address: Address!
email: String!
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
}
input WarehouseAddressInput {

View file

@ -33,7 +33,7 @@ export const CategoryDetailsForm: React.FC<CategoryDetailsFormProps> = ({
}) => {
const intl = useIntl();
const formErrors = getFormErrors(["name", "descriptionJson"], errors);
const formErrors = getFormErrors(["name", "description"], errors);
return (
<Card>
@ -59,8 +59,8 @@ export const CategoryDetailsForm: React.FC<CategoryDetailsFormProps> = ({
<RichTextEditor
data={data.description}
disabled={disabled}
error={!!formErrors.descriptionJson}
helperText={getProductErrorMessage(formErrors.descriptionJson, intl)}
error={!!formErrors.description}
helperText={getProductErrorMessage(formErrors.description, intl)}
label={intl.formatMessage({
defaultMessage: "Category Description"
})}

View file

@ -56,7 +56,7 @@ function useCategoryUpdateForm(
slug: category?.slug || ""
});
const [description, changeDescription] = useRichText({
initial: category?.descriptionJson,
initial: category?.description,
triggerChange
});

View file

@ -105,7 +105,7 @@ export const category: (
startCursor: "YXJyYXljb25uZWN0aW9uOjA="
}
},
descriptionJson: JSON.stringify(content),
description: JSON.stringify(content),
id: "Q2F0ZWdvcnk6NA==",
metadata: [
{

View file

@ -39,7 +39,7 @@ export interface CategoryCreate_categoryCreate_category {
backgroundImage: CategoryCreate_categoryCreate_category_backgroundImage | null;
name: string;
slug: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
parent: CategoryCreate_categoryCreate_category_parent | null;

View file

@ -165,7 +165,7 @@ export interface CategoryDetails_category {
backgroundImage: CategoryDetails_category_backgroundImage | null;
name: string;
slug: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
parent: CategoryDetails_category_parent | null;

View file

@ -39,7 +39,7 @@ export interface CategoryUpdate_categoryUpdate_category {
backgroundImage: CategoryUpdate_categoryUpdate_category_backgroundImage | null;
name: string;
slug: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
parent: CategoryUpdate_categoryUpdate_category_parent | null;

View file

@ -48,7 +48,7 @@ export const CategoryCreateView: React.FC<CategoryCreateViewProps> = ({
const result = await createCategory({
variables: {
input: {
descriptionJson: JSON.stringify(formData.description),
description: JSON.stringify(formData.description),
name: formData.name,
seo: {
description: formData.seoDescription,

View file

@ -188,7 +188,7 @@ export const CategoryDetails: React.FC<CategoryDetailsProps> = ({
id,
input: {
backgroundImageAlt: formData.backgroundImageAlt,
descriptionJson: JSON.stringify(formData.description),
description: JSON.stringify(formData.description),
name: formData.name,
seo: {
description: formData.seoDescription,

View file

@ -33,7 +33,7 @@ const CollectionDetails: React.FC<CollectionDetailsProps> = ({
}) => {
const intl = useIntl();
const formErrors = getFormErrors(["name", "descriptionJson"], errors);
const formErrors = getFormErrors(["name", "description"], errors);
return (
<Card>
@ -57,8 +57,8 @@ const CollectionDetails: React.FC<CollectionDetailsProps> = ({
<FormSpacer />
<RichTextEditor
data={data.description}
error={!!formErrors.descriptionJson}
helperText={getProductErrorMessage(formErrors.descriptionJson, intl)}
error={!!formErrors.description}
helperText={getProductErrorMessage(formErrors.description, intl)}
label={intl.formatMessage(commonMessages.description)}
name="description"
disabled={disabled}

View file

@ -68,7 +68,7 @@ function useCollectionUpdateForm(
slug: collection?.slug || ""
});
const [description, changeDescription] = useRichText({
initial: collection?.descriptionJson,
initial: collection?.description,
triggerChange
});

View file

@ -157,7 +157,7 @@ export const collection: (
publicationDate: null
}
],
descriptionJson: JSON.stringify(content),
description: JSON.stringify(content),
id: "Q29sbGVjdGlvbjox",
metadata: [
{

View file

@ -102,7 +102,7 @@ export interface CollectionDetails_collection {
privateMetadata: (CollectionDetails_collection_privateMetadata | null)[];
backgroundImage: CollectionDetails_collection_backgroundImage | null;
slug: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
products: CollectionDetails_collection_products | null;

View file

@ -48,7 +48,7 @@ export interface CollectionUpdate_collectionUpdate_collection {
privateMetadata: (CollectionUpdate_collectionUpdate_collection_privateMetadata | null)[];
backgroundImage: CollectionUpdate_collectionUpdate_collection_backgroundImage | null;
slug: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}

View file

@ -48,7 +48,7 @@ export interface CreateCollection_collectionCreate_collection {
privateMetadata: (CreateCollection_collectionCreate_collection_privateMetadata | null)[];
backgroundImage: CreateCollection_collectionCreate_collection_backgroundImage | null;
slug: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}

View file

@ -102,7 +102,7 @@ export const CollectionCreate: React.FC<CollectionCreateProps> = ({
input: {
backgroundImage: formData.backgroundImage.value,
backgroundImageAlt: formData.backgroundImageAlt,
descriptionJson: JSON.stringify(formData.description),
description: JSON.stringify(formData.description),
name: formData.name,
seo: {
description: formData.seoDescription,

View file

@ -198,7 +198,7 @@ export const CollectionDetails: React.FC<CollectionDetailsProps> = ({
const handleUpdate = async (formData: CollectionUpdateData) => {
const input: CollectionInput = {
backgroundImageAlt: formData.backgroundImageAlt,
descriptionJson: JSON.stringify(formData.description),
description: JSON.stringify(formData.description),
name: formData.name,
seo: {
description: formData.seoDescription,

View file

@ -25,7 +25,7 @@ export const categoryDetailsFragment = gql`
}
name
slug
descriptionJson
description
seoDescription
seoTitle
parent {

View file

@ -29,7 +29,7 @@ export const collectionDetailsFragment = gql`
url
}
slug
descriptionJson
description
seoDescription
seoTitle
}

View file

@ -56,7 +56,7 @@ export const pageDetailsFragment = gql`
...PageFragment
...PageAttributesFragment
...MetadataFragment
contentJson
content
seoTitle
seoDescription
publicationDate

View file

@ -172,7 +172,7 @@ export const productFragmentDetails = gql`
...MetadataFragment
name
slug
descriptionJson
description
seoTitle
seoDescription
rating

View file

@ -4,7 +4,7 @@ export const categoryTranslationFragment = gql`
fragment CategoryTranslationFragment on CategoryTranslatableContent {
translation(languageCode: $language) {
id
descriptionJson
description
language {
language
}
@ -15,7 +15,7 @@ export const categoryTranslationFragment = gql`
category {
id
name
descriptionJson
description
seoDescription
seoTitle
}
@ -26,13 +26,13 @@ export const collectionTranslationFragment = gql`
collection {
id
name
descriptionJson
description
seoDescription
seoTitle
}
translation(languageCode: $language) {
id
descriptionJson
description
language {
language
}
@ -47,13 +47,13 @@ export const productTranslationFragment = gql`
product {
id
name
descriptionJson
description
seoDescription
seoTitle
}
translation(languageCode: $language) {
id
descriptionJson
description
language {
code
language
@ -118,14 +118,14 @@ export const pageTranslationFragment = gql`
fragment PageTranslationFragment on PageTranslatableContent {
page {
id
contentJson
content
seoDescription
seoTitle
title
}
translation(languageCode: $language) {
id
contentJson
content
seoDescription
seoTitle
title
@ -139,14 +139,14 @@ export const pageTranslationFragment = gql`
export const pageTranslatableFragment = gql`
fragment PageTranslatableFragment on PageTranslatableContent {
id
contentJson
content
seoDescription
seoTitle
title
translation(languageCode: $language) {
id
contentJson
content
seoDescription
seoTitle
title

View file

@ -37,7 +37,7 @@ export interface CategoryDetailsFragment {
backgroundImage: CategoryDetailsFragment_backgroundImage | null;
name: string;
slug: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
parent: CategoryDetailsFragment_parent | null;

View file

@ -14,7 +14,7 @@ export interface CategoryTranslationFragment_translation_language {
export interface CategoryTranslationFragment_translation {
__typename: "CategoryTranslation";
id: string;
descriptionJson: any;
description: any;
language: CategoryTranslationFragment_translation_language;
name: string;
seoDescription: string | null;
@ -25,7 +25,7 @@ export interface CategoryTranslationFragment_category {
__typename: "Category";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}

View file

@ -46,7 +46,7 @@ export interface CollectionDetailsFragment {
privateMetadata: (CollectionDetailsFragment_privateMetadata | null)[];
backgroundImage: CollectionDetailsFragment_backgroundImage | null;
slug: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}

View file

@ -10,7 +10,7 @@ export interface CollectionTranslationFragment_collection {
__typename: "Collection";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}
@ -23,7 +23,7 @@ export interface CollectionTranslationFragment_translation_language {
export interface CollectionTranslationFragment_translation {
__typename: "CollectionTranslation";
id: string;
descriptionJson: any;
description: any;
language: CollectionTranslationFragment_translation_language;
name: string;
seoDescription: string | null;

View file

@ -109,7 +109,7 @@ export interface PageDetailsFragment {
pageType: PageDetailsFragment_pageType;
metadata: (PageDetailsFragment_metadata | null)[];
privateMetadata: (PageDetailsFragment_privateMetadata | null)[];
contentJson: any;
content: any;
seoTitle: string | null;
seoDescription: string | null;
publicationDate: any | null;

View file

@ -17,7 +17,7 @@ export interface PageTranslatableFragment_translation_language {
export interface PageTranslatableFragment_translation {
__typename: "PageTranslation";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;
@ -27,7 +27,7 @@ export interface PageTranslatableFragment_translation {
export interface PageTranslatableFragment {
__typename: "PageTranslatableContent";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;

View file

@ -11,7 +11,7 @@ import { LanguageCodeEnum } from "./../../types/globalTypes";
export interface PageTranslationFragment_page {
__typename: "Page";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;
@ -26,7 +26,7 @@ export interface PageTranslationFragment_translation_language {
export interface PageTranslationFragment_translation {
__typename: "PageTranslation";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;

View file

@ -253,7 +253,7 @@ export interface Product {
privateMetadata: (Product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -12,7 +12,7 @@ export interface ProductTranslationFragment_product {
__typename: "Product";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}
@ -26,7 +26,7 @@ export interface ProductTranslationFragment_translation_language {
export interface ProductTranslationFragment_translation {
__typename: "ProductTranslation";
id: string;
descriptionJson: any;
description: any;
language: ProductTranslationFragment_translation_language;
name: string;
seoDescription: string | null;

View file

@ -122,7 +122,7 @@ function usePageForm(
title: page?.title || ""
});
const [content, changeContent] = useRichText({
initial: pageExists ? page?.contentJson : null,
initial: pageExists ? page?.content : null,
triggerChange
});

View file

@ -39,7 +39,7 @@ const PageInfo: React.FC<PageInfoProps> = props => {
const classes = useStyles(props);
const intl = useIntl();
const formErrors = getFormErrors(["title", "contentJson"], errors);
const formErrors = getFormErrors(["title", "content"], errors);
return (
<Card className={classes.root}>
@ -64,8 +64,8 @@ const PageInfo: React.FC<PageInfoProps> = props => {
<RichTextEditor
data={data.content}
disabled={disabled}
error={!!formErrors.contentJson}
helperText={getPageErrorMessage(formErrors.contentJson, intl)}
error={!!formErrors.content}
helperText={getPageErrorMessage(formErrors.content, intl)}
label={intl.formatMessage({
defaultMessage: "Content",
description: "page content"

View file

@ -145,7 +145,7 @@ export const page: PageDetails_page = {
__typename: "SelectedAttribute"
}
],
contentJson: JSON.stringify(content),
content: JSON.stringify(content),
id: "Kzx152sEm==",
isPublished: false,
metadata: [

View file

@ -117,7 +117,7 @@ export interface PageCreate_pageCreate_page {
pageType: PageCreate_pageCreate_page_pageType;
metadata: (PageCreate_pageCreate_page_metadata | null)[];
privateMetadata: (PageCreate_pageCreate_page_privateMetadata | null)[];
contentJson: any;
content: any;
seoTitle: string | null;
seoDescription: string | null;
publicationDate: any | null;

View file

@ -109,7 +109,7 @@ export interface PageDetails_page {
pageType: PageDetails_page_pageType;
metadata: (PageDetails_page_metadata | null)[];
privateMetadata: (PageDetails_page_privateMetadata | null)[];
contentJson: any;
content: any;
seoTitle: string | null;
seoDescription: string | null;
publicationDate: any | null;

View file

@ -116,7 +116,7 @@ export interface PageUpdate_pageUpdate_page {
pageType: PageUpdate_pageUpdate_page_pageType;
metadata: (PageUpdate_pageUpdate_page_metadata | null)[];
privateMetadata: (PageUpdate_pageUpdate_page_privateMetadata | null)[];
contentJson: any;
content: any;
seoTitle: string | null;
seoDescription: string | null;
publicationDate: any | null;

View file

@ -128,7 +128,7 @@ export const PageCreate: React.FC<PageCreateProps> = ({ params }) => {
attributes: formData.attributes,
updatedFileAttributes
}),
contentJson: JSON.stringify(formData.content),
content: JSON.stringify(formData.content),
isPublished: formData.isPublished,
pageType: formData.pageType,
publicationDate: formData.publicationDate,

View file

@ -53,7 +53,7 @@ const createPageInput = (
attributes: data.attributes,
updatedFileAttributes
}),
contentJson: JSON.stringify(data.content),
content: JSON.stringify(data.content),
isPublished: data.isPublished,
publicationDate: data.publicationDate,
seo: {

View file

@ -37,10 +37,7 @@ export const ProductDetailsForm: React.FC<ProductDetailsFormProps> = ({
}) => {
const intl = useIntl();
const formErrors = getFormErrors(
["name", "descriptionJson", "rating"],
errors
);
const formErrors = getFormErrors(["name", "description", "rating"], errors);
return (
<Card>
@ -65,8 +62,8 @@ export const ProductDetailsForm: React.FC<ProductDetailsFormProps> = ({
<RichTextEditor
data={data.description}
disabled={disabled}
error={!!formErrors.descriptionJson}
helperText={getProductErrorMessage(formErrors.descriptionJson, intl)}
error={!!formErrors.description}
helperText={getProductErrorMessage(formErrors.description, intl)}
label={intl.formatMessage(commonMessages.description)}
name="description"
onChange={onDescriptionChange}

View file

@ -205,7 +205,7 @@ function useProductUpdateForm(
const attributesWithNewFileValue = useFormset<null, File>([]);
const stocks = useFormset(getStockInputFromProduct(product));
const [description, changeDescription] = useRichText({
initial: product?.descriptionJson,
initial: product?.description,
triggerChange
});

View file

@ -204,7 +204,7 @@ export const product: (
}
],
defaultVariant: { __typename: "ProductVariant", id: "pv75934" },
descriptionJson: JSON.stringify(content),
description: JSON.stringify(content),
id: "p10171",
images: [
{

View file

@ -253,7 +253,7 @@ export interface ProductChannelListingUpdate_productChannelListingUpdate_product
privateMetadata: (ProductChannelListingUpdate_productChannelListingUpdate_product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -260,7 +260,7 @@ export interface ProductCreate_productCreate_product {
privateMetadata: (ProductCreate_productCreate_product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -253,7 +253,7 @@ export interface ProductDetails_product {
privateMetadata: (ProductDetails_product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -259,7 +259,7 @@ export interface ProductImageCreate_productImageCreate_product {
privateMetadata: (ProductImageCreate_productImageCreate_product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -259,7 +259,7 @@ export interface ProductImageUpdate_productImageUpdate_product {
privateMetadata: (ProductImageUpdate_productImageUpdate_product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -260,7 +260,7 @@ export interface ProductUpdate_productUpdate_product {
privateMetadata: (ProductUpdate_productUpdate_product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -259,7 +259,7 @@ export interface ProductVariantReorder_productVariantReorder_product {
privateMetadata: (ProductVariantReorder_productVariantReorder_product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -259,7 +259,7 @@ export interface ProductVariantSetDefault_productVariantSetDefault_product {
privateMetadata: (ProductVariantSetDefault_productVariantSetDefault_product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -260,7 +260,7 @@ export interface SimpleProductUpdate_productUpdate_product {
privateMetadata: (SimpleProductUpdate_productUpdate_product_privateMetadata | null)[];
name: string;
slug: string;
descriptionJson: any;
description: any;
seoTitle: string | null;
seoDescription: string | null;
rating: number | null;

View file

@ -108,7 +108,7 @@ export function createHandler(
category: formData.category,
chargeTaxes: formData.chargeTaxes,
collections: formData.collections,
descriptionJson: JSON.stringify(formData.description),
description: JSON.stringify(formData.description),
name: formData.name,
productType: formData.productType?.id,
rating: formData.rating,

View file

@ -185,7 +185,7 @@ export function createUpdateHandler(
category: data.category,
chargeTaxes: data.chargeTaxes,
collections: data.collections,
descriptionJson: JSON.stringify(data.description),
description: JSON.stringify(data.description),
name: data.name,
rating: data.rating,
seo: {

View file

@ -136744,17 +136744,19 @@ exports[`Storyshots Views / Pages / Page details form errors 1`] = `
data-test-id="content"
>
<label
class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id MuiInputLabel-outlined-id MuiFormLabel-focused-id MuiInputLabel-focused-id"
class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id MuiInputLabel-outlined-id MuiFormLabel-error-id MuiInputLabel-error-id MuiFormLabel-focused-id MuiInputLabel-focused-id"
data-shrink="true"
>
Content
</label>
<div
class="RichTextEditor-editor-id RichTextEditor-root-id"
class="RichTextEditor-editor-id RichTextEditor-root-id RichTextEditor-rootError-id"
/>
<p
class="MuiFormHelperText-root-id MuiFormHelperText-contained-id"
/>
class="MuiFormHelperText-root-id MuiFormHelperText-contained-id MuiFormHelperText-error-id"
>
Invalid value
</p>
</div>
</div>
</div>

View file

@ -31,7 +31,7 @@ storiesOf("Views / Categories / Create category", module)
},
{
code: ProductErrorCode.REQUIRED,
field: "descriptionJson"
field: "description"
}
].map(err => ({
__typename: "ProductError",

View file

@ -100,7 +100,7 @@ storiesOf("Views / Categories / Update category", module)
},
{
code: ProductErrorCode.REQUIRED,
field: "descriptionJson"
field: "description"
}
].map(err => ({
__typename: "ProductError",

View file

@ -39,7 +39,7 @@ storiesOf("Views / Collections / Create collection", module)
},
{
code: CollectionErrorCode.REQUIRED,
field: "descriptionJson"
field: "description"
}
].map(err => ({
__typename: "CollectionError",

View file

@ -57,7 +57,7 @@ storiesOf("Views / Collections / Collection details", module)
},
{
code: CollectionErrorCode.REQUIRED,
field: "descriptionJson"
field: "description"
}
].map(err => ({
__typename: "CollectionError",

View file

@ -18,7 +18,7 @@ export interface TranslationsCategoriesPageProps
}
export const fieldNames = {
descriptionJson: "description",
description: "description",
name: "name",
seoDescription: "seoDescription",
seoTitle: "seoTitle"
@ -79,10 +79,10 @@ const TranslationsCategoriesPage: React.FC<TranslationsCategoriesPageProps> = ({
},
{
displayName: intl.formatMessage(commonMessages.description),
name: fieldNames.descriptionJson,
translation: data?.translation?.descriptionJson || null,
name: fieldNames.description,
translation: data?.translation?.description || null,
type: "rich" as "rich",
value: data?.category?.descriptionJson
value: data?.category?.description
}
]}
saveButtonState={saveButtonState}

View file

@ -18,7 +18,7 @@ export interface TranslationsCollectionsPageProps
}
export const fieldNames = {
descriptionJson: "description",
description: "description",
name: "name",
seoDescription: "seoDescription",
seoTitle: "seoTitle"
@ -80,10 +80,10 @@ const TranslationsCollectionsPage: React.FC<TranslationsCollectionsPageProps> =
},
{
displayName: intl.formatMessage(commonMessages.description),
name: fieldNames.descriptionJson,
translation: data?.translation?.descriptionJson || null,
name: fieldNames.description,
translation: data?.translation?.description || null,
type: "rich" as "rich",
value: data?.collection?.descriptionJson
value: data?.collection?.description
}
]}
saveButtonState={saveButtonState}

View file

@ -18,7 +18,7 @@ export interface TranslationsPagesPageProps
}
export const fieldNames = {
contentJson: "content",
content: "content",
seoDescription: "seoDescription",
seoTitle: "seoTitle",
title: "title"
@ -82,10 +82,10 @@ const TranslationsPagesPage: React.FC<TranslationsPagesPageProps> = ({
defaultMessage: "Content",
description: "page content"
}),
name: fieldNames.contentJson,
translation: data?.translation?.contentJson || null,
name: fieldNames.content,
translation: data?.translation?.content || null,
type: "rich" as "rich",
value: data?.page?.contentJson
value: data?.page?.content
}
]}
saveButtonState={saveButtonState}

View file

@ -18,7 +18,7 @@ export interface TranslationsProductsPageProps
}
export const fieldNames = {
descriptionJson: "description",
description: "description",
name: "name",
seoDescription: "seoDescription",
seoTitle: "seoTitle"
@ -82,10 +82,10 @@ const TranslationsProductsPage: React.FC<TranslationsProductsPageProps> = ({
displayName: intl.formatMessage({
defaultMessage: "Description"
}),
name: fieldNames.descriptionJson,
translation: data?.translation?.descriptionJson || null,
name: fieldNames.description,
translation: data?.translation?.description || null,
type: "rich" as "rich",
value: data?.product?.descriptionJson
value: data?.product?.description
}
]}
saveButtonState={saveButtonState}

View file

@ -53,12 +53,12 @@ const updateProductTranslations = gql`
product {
id
name
descriptionJson
description
seoDescription
seoTitle
translation(languageCode: $language) {
id
descriptionJson
description
language {
code
language
@ -90,12 +90,12 @@ const updateCategoryTranslations = gql`
category {
id
name
descriptionJson
description
seoDescription
seoTitle
translation(languageCode: $language) {
id
descriptionJson
description
language {
language
}
@ -126,12 +126,12 @@ const updateCollectionTranslations = gql`
collection {
id
name
descriptionJson
description
seoDescription
seoTitle
translation(languageCode: $language) {
id
descriptionJson
description
language {
language
}

View file

@ -20,7 +20,7 @@ export interface CategoryTranslationDetails_translation_CategoryTranslatableCont
export interface CategoryTranslationDetails_translation_CategoryTranslatableContent_translation {
__typename: "CategoryTranslation";
id: string;
descriptionJson: any;
description: any;
language: CategoryTranslationDetails_translation_CategoryTranslatableContent_translation_language;
name: string;
seoDescription: string | null;
@ -31,7 +31,7 @@ export interface CategoryTranslationDetails_translation_CategoryTranslatableCont
__typename: "Category";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}

View file

@ -20,7 +20,7 @@ export interface CategoryTranslations_translations_edges_node_CategoryTranslatab
export interface CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation {
__typename: "CategoryTranslation";
id: string;
descriptionJson: any;
description: any;
language: CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation_language;
name: string;
seoDescription: string | null;
@ -31,7 +31,7 @@ export interface CategoryTranslations_translations_edges_node_CategoryTranslatab
__typename: "Category";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}

View file

@ -16,7 +16,7 @@ export interface CollectionTranslationDetails_translation_CollectionTranslatable
__typename: "Collection";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}
@ -29,7 +29,7 @@ export interface CollectionTranslationDetails_translation_CollectionTranslatable
export interface CollectionTranslationDetails_translation_CollectionTranslatableContent_translation {
__typename: "CollectionTranslation";
id: string;
descriptionJson: any;
description: any;
language: CollectionTranslationDetails_translation_CollectionTranslatableContent_translation_language;
name: string;
seoDescription: string | null;

View file

@ -16,7 +16,7 @@ export interface CollectionTranslations_translations_edges_node_CollectionTransl
__typename: "Collection";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}
@ -29,7 +29,7 @@ export interface CollectionTranslations_translations_edges_node_CollectionTransl
export interface CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation {
__typename: "CollectionTranslation";
id: string;
descriptionJson: any;
description: any;
language: CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation_language;
name: string;
seoDescription: string | null;

View file

@ -15,7 +15,7 @@ export interface PageTranslationDetails_translation_ProductTranslatableContent {
export interface PageTranslationDetails_translation_PageTranslatableContent_page {
__typename: "Page";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;
@ -30,7 +30,7 @@ export interface PageTranslationDetails_translation_PageTranslatableContent_tran
export interface PageTranslationDetails_translation_PageTranslatableContent_translation {
__typename: "PageTranslation";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;

View file

@ -15,7 +15,7 @@ export interface PageTranslations_translations_edges_node_ProductTranslatableCon
export interface PageTranslations_translations_edges_node_PageTranslatableContent_page {
__typename: "Page";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;
@ -30,7 +30,7 @@ export interface PageTranslations_translations_edges_node_PageTranslatableConten
export interface PageTranslations_translations_edges_node_PageTranslatableContent_translation {
__typename: "PageTranslation";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;

View file

@ -16,7 +16,7 @@ export interface ProductTranslationDetails_translation_ProductTranslatableConten
__typename: "Product";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}
@ -30,7 +30,7 @@ export interface ProductTranslationDetails_translation_ProductTranslatableConten
export interface ProductTranslationDetails_translation_ProductTranslatableContent_translation {
__typename: "ProductTranslation";
id: string;
descriptionJson: any;
description: any;
language: ProductTranslationDetails_translation_ProductTranslatableContent_translation_language;
name: string;
seoDescription: string | null;

View file

@ -16,7 +16,7 @@ export interface ProductTranslations_translations_edges_node_ProductTranslatable
__typename: "Product";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
}
@ -30,7 +30,7 @@ export interface ProductTranslations_translations_edges_node_ProductTranslatable
export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_translation {
__typename: "ProductTranslation";
id: string;
descriptionJson: any;
description: any;
language: ProductTranslations_translations_edges_node_ProductTranslatableContent_translation_language;
name: string;
seoDescription: string | null;

View file

@ -22,7 +22,7 @@ export interface UpdateCategoryTranslations_categoryTranslate_category_translati
export interface UpdateCategoryTranslations_categoryTranslate_category_translation {
__typename: "CategoryTranslation";
id: string;
descriptionJson: any;
description: any;
language: UpdateCategoryTranslations_categoryTranslate_category_translation_language;
name: string;
seoDescription: string | null;
@ -33,7 +33,7 @@ export interface UpdateCategoryTranslations_categoryTranslate_category {
__typename: "Category";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
translation: UpdateCategoryTranslations_categoryTranslate_category_translation | null;

View file

@ -22,7 +22,7 @@ export interface UpdateCollectionTranslations_collectionTranslate_collection_tra
export interface UpdateCollectionTranslations_collectionTranslate_collection_translation {
__typename: "CollectionTranslation";
id: string;
descriptionJson: any;
description: any;
language: UpdateCollectionTranslations_collectionTranslate_collection_translation_language;
name: string;
seoDescription: string | null;
@ -33,7 +33,7 @@ export interface UpdateCollectionTranslations_collectionTranslate_collection {
__typename: "Collection";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
translation: UpdateCollectionTranslations_collectionTranslate_collection_translation | null;

View file

@ -17,7 +17,7 @@ export interface UpdatePageTranslations_pageTranslate_errors {
export interface UpdatePageTranslations_pageTranslate_page_page {
__typename: "Page";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;
@ -32,7 +32,7 @@ export interface UpdatePageTranslations_pageTranslate_page_translation_language
export interface UpdatePageTranslations_pageTranslate_page_translation {
__typename: "PageTranslation";
id: string;
contentJson: any;
content: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;

View file

@ -23,7 +23,7 @@ export interface UpdateProductTranslations_productTranslate_product_translation_
export interface UpdateProductTranslations_productTranslate_product_translation {
__typename: "ProductTranslation";
id: string;
descriptionJson: any;
description: any;
language: UpdateProductTranslations_productTranslate_product_translation_language;
name: string;
seoDescription: string | null;
@ -34,7 +34,7 @@ export interface UpdateProductTranslations_productTranslate_product {
__typename: "Product";
id: string;
name: string;
descriptionJson: any;
description: any;
seoDescription: string | null;
seoTitle: string | null;
translation: UpdateProductTranslations_productTranslate_product_translation | null;

View file

@ -69,8 +69,8 @@ const TranslationsCategories: React.FC<TranslationsCategoriesProps> = ({
{(updateTranslations, updateTranslationsOpts) => {
const handleSubmit = (field: string, data: string) => {
const input: TranslationInput = {};
if (field === fieldNames.descriptionJson) {
input.descriptionJson = JSON.stringify(data);
if (field === fieldNames.description) {
input.description = JSON.stringify(data);
} else if (field === fieldNames.name) {
input.name = data;
} else if (field === fieldNames.seoDescription) {

View file

@ -71,8 +71,8 @@ const TranslationsCollections: React.FC<TranslationsCollectionsProps> = ({
{(updateTranslations, updateTranslationsOpts) => {
const handleSubmit = (field: string, data: string) => {
const input: TranslationInput = {};
if (field === fieldNames.descriptionJson) {
input.descriptionJson = JSON.stringify(data);
if (field === fieldNames.description) {
input.description = JSON.stringify(data);
} else if (field === fieldNames.name) {
input.name = data;
} else if (field === fieldNames.seoDescription) {

View file

@ -147,7 +147,7 @@ const TranslationsEntities: React.FC<TranslationsEntitiesProps> = ({
completion: {
current: node.translation
? [
node.translation.descriptionJson,
node.translation.description,
node.translation.name,
node.translation.seoDescription,
node.translation.seoTitle
@ -197,7 +197,7 @@ const TranslationsEntities: React.FC<TranslationsEntitiesProps> = ({
completion: {
current: node.translation
? [
node.translation.descriptionJson,
node.translation.description,
node.translation.name,
node.translation.seoDescription,
node.translation.seoTitle
@ -248,7 +248,7 @@ const TranslationsEntities: React.FC<TranslationsEntitiesProps> = ({
completion: {
current: node.translation
? [
node.translation.descriptionJson,
node.translation.description,
node.translation.name,
node.translation.seoDescription,
node.translation.seoTitle
@ -385,7 +385,7 @@ const TranslationsEntities: React.FC<TranslationsEntitiesProps> = ({
completion: {
current: node.translation
? [
node.translation.contentJson,
node.translation.content,
node.translation.seoDescription,
node.translation.seoTitle,
node.translation.title

View file

@ -72,8 +72,8 @@ const TranslationsPages: React.FC<TranslationsPagesProps> = ({
{(updateTranslations, updateTranslationsOpts) => {
const handleSubmit = (field: string, data: string) => {
const input: PageTranslationInput = {};
if (field === fieldNames.contentJson) {
input.contentJson = JSON.stringify(data);
if (field === fieldNames.content) {
input.content = JSON.stringify(data);
} else if (field === fieldNames.title) {
input.title = data;
} else if (field === fieldNames.seoDescription) {

View file

@ -70,8 +70,8 @@ const TranslationsProducts: React.FC<TranslationsProductsProps> = ({
{(updateTranslations, updateTranslationsOpts) => {
const handleSubmit = (field: string, data: string) => {
const input: TranslationInput = {};
if (field === fieldNames.descriptionJson) {
input.descriptionJson = JSON.stringify(data);
if (field === fieldNames.description) {
input.description = JSON.stringify(data);
} else if (field === fieldNames.name) {
input.name = data;
} else if (field === fieldNames.seoDescription) {

View file

@ -1119,8 +1119,7 @@ export interface CategoryFilterInput {
}
export interface CategoryInput {
description?: string | null;
descriptionJson?: any | null;
description?: any | null;
name?: string | null;
slug?: string | null;
seo?: SeoInput | null;
@ -1160,8 +1159,7 @@ export interface CollectionCreateInput {
isPublished?: boolean | null;
name?: string | null;
slug?: string | null;
description?: string | null;
descriptionJson?: any | null;
description?: any | null;
backgroundImage?: any | null;
backgroundImageAlt?: string | null;
seo?: SeoInput | null;
@ -1180,8 +1178,7 @@ export interface CollectionInput {
isPublished?: boolean | null;
name?: string | null;
slug?: string | null;
description?: string | null;
descriptionJson?: any | null;
description?: any | null;
backgroundImage?: any | null;
backgroundImageAlt?: string | null;
seo?: SeoInput | null;
@ -1429,8 +1426,7 @@ export interface OrderUpdateShippingInput {
export interface PageCreateInput {
slug?: string | null;
title?: string | null;
content?: string | null;
contentJson?: any | null;
content?: any | null;
attributes?: AttributeValueInput[] | null;
isPublished?: boolean | null;
publicationDate?: string | null;
@ -1441,8 +1437,7 @@ export interface PageCreateInput {
export interface PageInput {
slug?: string | null;
title?: string | null;
content?: string | null;
contentJson?: any | null;
content?: any | null;
attributes?: AttributeValueInput[] | null;
isPublished?: boolean | null;
publicationDate?: string | null;
@ -1551,8 +1546,7 @@ export interface ProductCreateInput {
category?: string | null;
chargeTaxes?: boolean | null;
collections?: (string | null)[] | null;
description?: string | null;
descriptionJson?: any | null;
description?: any | null;
name?: string | null;
slug?: string | null;
taxCode?: string | null;
@ -1584,8 +1578,7 @@ export interface ProductInput {
category?: string | null;
chargeTaxes?: boolean | null;
collections?: (string | null)[] | null;
description?: string | null;
descriptionJson?: any | null;
description?: any | null;
name?: string | null;
slug?: string | null;
taxCode?: string | null;
@ -1818,8 +1811,7 @@ export interface TranslationInput {
seoTitle?: string | null;
seoDescription?: string | null;
name?: string | null;
description?: string | null;
descriptionJson?: any | null;
description?: any | null;
}
export interface UserCreateInput {