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:
parent
e74225b570
commit
10131163c1
83 changed files with 329 additions and 212 deletions
|
@ -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
|
- Guard against non-staff users logging in - #947 by @jwm0
|
||||||
- Add reference attributes - #917 by @orzechdev
|
- Add reference attributes - #917 by @orzechdev
|
||||||
- Add product reference attributes - #948 by @orzechdev
|
- Add product reference attributes - #948 by @orzechdev
|
||||||
|
- Drop descriptionJson and contentJson fields - #950 by @jwm0
|
||||||
|
|
||||||
# 2.11.1
|
# 2.11.1
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
|
@ -671,13 +671,13 @@ type Category implements Node & ObjectWithMetadata {
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: JSONString!
|
||||||
descriptionJson: JSONString!
|
|
||||||
slug: String!
|
slug: String!
|
||||||
parent: Category
|
parent: Category
|
||||||
level: Int!
|
level: Int!
|
||||||
privateMetadata: [MetadataItem]!
|
privateMetadata: [MetadataItem]!
|
||||||
metadata: [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
|
ancestors(before: String, after: String, first: Int, last: Int): CategoryCountableConnection
|
||||||
products(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection
|
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.")
|
url: String @deprecated(reason: "This field will be removed after 2020-07-31.")
|
||||||
|
@ -721,8 +721,7 @@ input CategoryFilterInput {
|
||||||
}
|
}
|
||||||
|
|
||||||
input CategoryInput {
|
input CategoryInput {
|
||||||
description: String
|
description: JSONString
|
||||||
descriptionJson: JSONString
|
|
||||||
name: String
|
name: String
|
||||||
slug: String
|
slug: String
|
||||||
seo: SeoInput
|
seo: SeoInput
|
||||||
|
@ -747,8 +746,8 @@ type CategoryTranslatableContent implements Node {
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: JSONString!
|
||||||
descriptionJson: JSONString!
|
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
|
||||||
translation(languageCode: LanguageCodeEnum!): CategoryTranslation
|
translation(languageCode: LanguageCodeEnum!): CategoryTranslation
|
||||||
category: Category
|
category: Category
|
||||||
}
|
}
|
||||||
|
@ -764,9 +763,9 @@ type CategoryTranslation implements Node {
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: JSONString!
|
||||||
descriptionJson: JSONString!
|
|
||||||
language: LanguageDisplay!
|
language: LanguageDisplay!
|
||||||
|
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
|
||||||
}
|
}
|
||||||
|
|
||||||
type CategoryUpdate {
|
type CategoryUpdate {
|
||||||
|
@ -1051,11 +1050,11 @@ type Collection implements Node & ObjectWithMetadata {
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: JSONString!
|
||||||
descriptionJson: JSONString!
|
|
||||||
slug: String!
|
slug: String!
|
||||||
privateMetadata: [MetadataItem]!
|
privateMetadata: [MetadataItem]!
|
||||||
metadata: [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
|
products(filter: ProductFilterInput, sortBy: ProductOrder, before: String, after: String, first: Int, last: Int): ProductCountableConnection
|
||||||
backgroundImage(size: Int): Image
|
backgroundImage(size: Int): Image
|
||||||
translation(languageCode: LanguageCodeEnum!): CollectionTranslation
|
translation(languageCode: LanguageCodeEnum!): CollectionTranslation
|
||||||
|
@ -1122,8 +1121,7 @@ input CollectionCreateInput {
|
||||||
isPublished: Boolean
|
isPublished: Boolean
|
||||||
name: String
|
name: String
|
||||||
slug: String
|
slug: String
|
||||||
description: String
|
description: JSONString
|
||||||
descriptionJson: JSONString
|
|
||||||
backgroundImage: Upload
|
backgroundImage: Upload
|
||||||
backgroundImageAlt: String
|
backgroundImageAlt: String
|
||||||
seo: SeoInput
|
seo: SeoInput
|
||||||
|
@ -1165,8 +1163,7 @@ input CollectionInput {
|
||||||
isPublished: Boolean
|
isPublished: Boolean
|
||||||
name: String
|
name: String
|
||||||
slug: String
|
slug: String
|
||||||
description: String
|
description: JSONString
|
||||||
descriptionJson: JSONString
|
|
||||||
backgroundImage: Upload
|
backgroundImage: Upload
|
||||||
backgroundImageAlt: String
|
backgroundImageAlt: String
|
||||||
seo: SeoInput
|
seo: SeoInput
|
||||||
|
@ -1208,8 +1205,8 @@ type CollectionTranslatableContent implements Node {
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: JSONString!
|
||||||
descriptionJson: JSONString!
|
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
|
||||||
translation(languageCode: LanguageCodeEnum!): CollectionTranslation
|
translation(languageCode: LanguageCodeEnum!): CollectionTranslation
|
||||||
collection: Collection
|
collection: Collection
|
||||||
}
|
}
|
||||||
|
@ -1225,9 +1222,9 @@ type CollectionTranslation implements Node {
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: JSONString!
|
||||||
descriptionJson: JSONString!
|
|
||||||
language: LanguageDisplay!
|
language: LanguageDisplay!
|
||||||
|
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
|
||||||
}
|
}
|
||||||
|
|
||||||
type CollectionUpdate {
|
type CollectionUpdate {
|
||||||
|
@ -2837,7 +2834,7 @@ type Order implements Node & ObjectWithMetadata {
|
||||||
shippingMethod: ShippingMethod
|
shippingMethod: ShippingMethod
|
||||||
shippingMethodName: String
|
shippingMethodName: String
|
||||||
channel: Channel!
|
channel: Channel!
|
||||||
shippingPrice: TaxedMoney
|
shippingPrice: TaxedMoney!
|
||||||
shippingTaxRate: Float!
|
shippingTaxRate: Float!
|
||||||
token: String!
|
token: String!
|
||||||
voucher: Voucher
|
voucher: Voucher
|
||||||
|
@ -2857,16 +2854,16 @@ type Order implements Node & ObjectWithMetadata {
|
||||||
availableShippingMethods: [ShippingMethod]
|
availableShippingMethods: [ShippingMethod]
|
||||||
invoices: [Invoice]
|
invoices: [Invoice]
|
||||||
number: String
|
number: String
|
||||||
isPaid: Boolean
|
isPaid: Boolean!
|
||||||
paymentStatus: PaymentChargeStatusEnum
|
paymentStatus: PaymentChargeStatusEnum!
|
||||||
paymentStatusDisplay: String
|
paymentStatusDisplay: String!
|
||||||
payments: [Payment]
|
payments: [Payment]
|
||||||
total: TaxedMoney
|
total: TaxedMoney!
|
||||||
subtotal: TaxedMoney
|
subtotal: TaxedMoney!
|
||||||
statusDisplay: String
|
statusDisplay: String
|
||||||
canFinalize: Boolean!
|
canFinalize: Boolean!
|
||||||
totalAuthorized: Money
|
totalAuthorized: Money!
|
||||||
totalCaptured: Money
|
totalCaptured: Money!
|
||||||
events: [OrderEvent]
|
events: [OrderEvent]
|
||||||
totalBalance: Money!
|
totalBalance: Money!
|
||||||
userEmail: String
|
userEmail: String
|
||||||
|
@ -3109,8 +3106,8 @@ type OrderLine implements Node {
|
||||||
taxRate: Float!
|
taxRate: Float!
|
||||||
digitalContentUrl: DigitalContentUrl
|
digitalContentUrl: DigitalContentUrl
|
||||||
thumbnail(size: Int): Image
|
thumbnail(size: Int): Image
|
||||||
unitPrice: TaxedMoney
|
unitPrice: TaxedMoney!
|
||||||
totalPrice: TaxedMoney
|
totalPrice: TaxedMoney!
|
||||||
variant: ProductVariant
|
variant: ProductVariant
|
||||||
translatedProductName: String!
|
translatedProductName: String!
|
||||||
translatedVariantName: String!
|
translatedVariantName: String!
|
||||||
|
@ -3266,8 +3263,7 @@ type Page implements Node & ObjectWithMetadata {
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
id: ID!
|
id: ID!
|
||||||
title: String!
|
title: String!
|
||||||
content: String!
|
content: JSONString!
|
||||||
contentJson: JSONString!
|
|
||||||
publicationDate: Date
|
publicationDate: Date
|
||||||
isPublished: Boolean!
|
isPublished: Boolean!
|
||||||
slug: String!
|
slug: String!
|
||||||
|
@ -3275,6 +3271,7 @@ type Page implements Node & ObjectWithMetadata {
|
||||||
created: DateTime!
|
created: DateTime!
|
||||||
privateMetadata: [MetadataItem]!
|
privateMetadata: [MetadataItem]!
|
||||||
metadata: [MetadataItem]!
|
metadata: [MetadataItem]!
|
||||||
|
contentJson: String! @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.")
|
||||||
translation(languageCode: LanguageCodeEnum!): PageTranslation
|
translation(languageCode: LanguageCodeEnum!): PageTranslation
|
||||||
attributes: [SelectedAttribute!]!
|
attributes: [SelectedAttribute!]!
|
||||||
}
|
}
|
||||||
|
@ -3323,8 +3320,7 @@ type PageCreate {
|
||||||
input PageCreateInput {
|
input PageCreateInput {
|
||||||
slug: String
|
slug: String
|
||||||
title: String
|
title: String
|
||||||
content: String
|
content: JSONString
|
||||||
contentJson: JSONString
|
|
||||||
attributes: [AttributeValueInput!]
|
attributes: [AttributeValueInput!]
|
||||||
isPublished: Boolean
|
isPublished: Boolean
|
||||||
publicationDate: String
|
publicationDate: String
|
||||||
|
@ -3370,8 +3366,7 @@ type PageInfo {
|
||||||
input PageInput {
|
input PageInput {
|
||||||
slug: String
|
slug: String
|
||||||
title: String
|
title: String
|
||||||
content: String
|
content: JSONString
|
||||||
contentJson: JSONString
|
|
||||||
attributes: [AttributeValueInput!]
|
attributes: [AttributeValueInput!]
|
||||||
isPublished: Boolean
|
isPublished: Boolean
|
||||||
publicationDate: String
|
publicationDate: String
|
||||||
|
@ -3402,8 +3397,8 @@ type PageTranslatableContent implements Node {
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
id: ID!
|
id: ID!
|
||||||
title: String!
|
title: String!
|
||||||
content: String!
|
content: JSONString!
|
||||||
contentJson: JSONString!
|
contentJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.")
|
||||||
translation(languageCode: LanguageCodeEnum!): PageTranslation
|
translation(languageCode: LanguageCodeEnum!): PageTranslation
|
||||||
page: Page
|
page: Page
|
||||||
}
|
}
|
||||||
|
@ -3419,17 +3414,16 @@ type PageTranslation implements Node {
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
id: ID!
|
id: ID!
|
||||||
title: String!
|
title: String!
|
||||||
content: String!
|
content: JSONString!
|
||||||
contentJson: JSONString!
|
|
||||||
language: LanguageDisplay!
|
language: LanguageDisplay!
|
||||||
|
contentJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.")
|
||||||
}
|
}
|
||||||
|
|
||||||
input PageTranslationInput {
|
input PageTranslationInput {
|
||||||
seoTitle: String
|
seoTitle: String
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
title: String
|
title: String
|
||||||
content: String
|
content: JSONString
|
||||||
contentJson: JSONString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type PageType implements Node & ObjectWithMetadata {
|
type PageType implements Node & ObjectWithMetadata {
|
||||||
|
@ -3797,8 +3791,7 @@ type Product implements Node & ObjectWithMetadata {
|
||||||
seoTitle: String
|
seoTitle: String
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: JSONString!
|
||||||
descriptionJson: JSONString!
|
|
||||||
productType: ProductType!
|
productType: ProductType!
|
||||||
slug: String!
|
slug: String!
|
||||||
category: Category
|
category: Category
|
||||||
|
@ -3809,6 +3802,7 @@ type Product implements Node & ObjectWithMetadata {
|
||||||
rating: Float
|
rating: Float
|
||||||
privateMetadata: [MetadataItem]!
|
privateMetadata: [MetadataItem]!
|
||||||
metadata: [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.")
|
url: String! @deprecated(reason: "This field will be removed after 2020-07-31.")
|
||||||
thumbnail(size: Int): Image
|
thumbnail(size: Int): Image
|
||||||
pricing: ProductPricingInfo
|
pricing: ProductPricingInfo
|
||||||
|
@ -3918,8 +3912,7 @@ input ProductCreateInput {
|
||||||
category: ID
|
category: ID
|
||||||
chargeTaxes: Boolean
|
chargeTaxes: Boolean
|
||||||
collections: [ID]
|
collections: [ID]
|
||||||
description: String
|
description: JSONString
|
||||||
descriptionJson: JSONString
|
|
||||||
name: String
|
name: String
|
||||||
slug: String
|
slug: String
|
||||||
taxCode: String
|
taxCode: String
|
||||||
|
@ -4050,8 +4043,7 @@ input ProductInput {
|
||||||
category: ID
|
category: ID
|
||||||
chargeTaxes: Boolean
|
chargeTaxes: Boolean
|
||||||
collections: [ID]
|
collections: [ID]
|
||||||
description: String
|
description: JSONString
|
||||||
descriptionJson: JSONString
|
|
||||||
name: String
|
name: String
|
||||||
slug: String
|
slug: String
|
||||||
taxCode: String
|
taxCode: String
|
||||||
|
@ -4104,8 +4096,8 @@ type ProductTranslatableContent implements Node {
|
||||||
seoTitle: String
|
seoTitle: String
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: JSONString!
|
||||||
descriptionJson: JSONString!
|
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
|
||||||
translation(languageCode: LanguageCodeEnum!): ProductTranslation
|
translation(languageCode: LanguageCodeEnum!): ProductTranslation
|
||||||
product: Product
|
product: Product
|
||||||
}
|
}
|
||||||
|
@ -4121,9 +4113,9 @@ type ProductTranslation implements Node {
|
||||||
seoTitle: String
|
seoTitle: String
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
name: String!
|
name: String!
|
||||||
description: String!
|
description: JSONString!
|
||||||
descriptionJson: JSONString!
|
|
||||||
language: LanguageDisplay!
|
language: LanguageDisplay!
|
||||||
|
descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.")
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProductType implements Node & ObjectWithMetadata {
|
type ProductType implements Node & ObjectWithMetadata {
|
||||||
|
@ -5289,8 +5281,7 @@ input TranslationInput {
|
||||||
seoTitle: String
|
seoTitle: String
|
||||||
seoDescription: String
|
seoDescription: String
|
||||||
name: String
|
name: String
|
||||||
description: String
|
description: JSONString
|
||||||
descriptionJson: JSONString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar UUID
|
scalar UUID
|
||||||
|
@ -5621,7 +5612,7 @@ type VoucherUpdate {
|
||||||
voucher: Voucher
|
voucher: Voucher
|
||||||
}
|
}
|
||||||
|
|
||||||
type Warehouse implements Node {
|
type Warehouse implements Node & ObjectWithMetadata {
|
||||||
id: ID!
|
id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
slug: String!
|
slug: String!
|
||||||
|
@ -5629,6 +5620,8 @@ type Warehouse implements Node {
|
||||||
shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection!
|
shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection!
|
||||||
address: Address!
|
address: Address!
|
||||||
email: String!
|
email: String!
|
||||||
|
privateMetadata: [MetadataItem]!
|
||||||
|
metadata: [MetadataItem]!
|
||||||
}
|
}
|
||||||
|
|
||||||
input WarehouseAddressInput {
|
input WarehouseAddressInput {
|
||||||
|
|
|
@ -33,7 +33,7 @@ export const CategoryDetailsForm: React.FC<CategoryDetailsFormProps> = ({
|
||||||
}) => {
|
}) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
const formErrors = getFormErrors(["name", "descriptionJson"], errors);
|
const formErrors = getFormErrors(["name", "description"], errors);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
|
@ -59,8 +59,8 @@ export const CategoryDetailsForm: React.FC<CategoryDetailsFormProps> = ({
|
||||||
<RichTextEditor
|
<RichTextEditor
|
||||||
data={data.description}
|
data={data.description}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
error={!!formErrors.descriptionJson}
|
error={!!formErrors.description}
|
||||||
helperText={getProductErrorMessage(formErrors.descriptionJson, intl)}
|
helperText={getProductErrorMessage(formErrors.description, intl)}
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
defaultMessage: "Category Description"
|
defaultMessage: "Category Description"
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -56,7 +56,7 @@ function useCategoryUpdateForm(
|
||||||
slug: category?.slug || ""
|
slug: category?.slug || ""
|
||||||
});
|
});
|
||||||
const [description, changeDescription] = useRichText({
|
const [description, changeDescription] = useRichText({
|
||||||
initial: category?.descriptionJson,
|
initial: category?.description,
|
||||||
triggerChange
|
triggerChange
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ export const category: (
|
||||||
startCursor: "YXJyYXljb25uZWN0aW9uOjA="
|
startCursor: "YXJyYXljb25uZWN0aW9uOjA="
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
descriptionJson: JSON.stringify(content),
|
description: JSON.stringify(content),
|
||||||
id: "Q2F0ZWdvcnk6NA==",
|
id: "Q2F0ZWdvcnk6NA==",
|
||||||
metadata: [
|
metadata: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ export interface CategoryCreate_categoryCreate_category {
|
||||||
backgroundImage: CategoryCreate_categoryCreate_category_backgroundImage | null;
|
backgroundImage: CategoryCreate_categoryCreate_category_backgroundImage | null;
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
parent: CategoryCreate_categoryCreate_category_parent | null;
|
parent: CategoryCreate_categoryCreate_category_parent | null;
|
||||||
|
|
|
@ -165,7 +165,7 @@ export interface CategoryDetails_category {
|
||||||
backgroundImage: CategoryDetails_category_backgroundImage | null;
|
backgroundImage: CategoryDetails_category_backgroundImage | null;
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
parent: CategoryDetails_category_parent | null;
|
parent: CategoryDetails_category_parent | null;
|
||||||
|
|
|
@ -39,7 +39,7 @@ export interface CategoryUpdate_categoryUpdate_category {
|
||||||
backgroundImage: CategoryUpdate_categoryUpdate_category_backgroundImage | null;
|
backgroundImage: CategoryUpdate_categoryUpdate_category_backgroundImage | null;
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
parent: CategoryUpdate_categoryUpdate_category_parent | null;
|
parent: CategoryUpdate_categoryUpdate_category_parent | null;
|
||||||
|
|
|
@ -48,7 +48,7 @@ export const CategoryCreateView: React.FC<CategoryCreateViewProps> = ({
|
||||||
const result = await createCategory({
|
const result = await createCategory({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
descriptionJson: JSON.stringify(formData.description),
|
description: JSON.stringify(formData.description),
|
||||||
name: formData.name,
|
name: formData.name,
|
||||||
seo: {
|
seo: {
|
||||||
description: formData.seoDescription,
|
description: formData.seoDescription,
|
||||||
|
|
|
@ -188,7 +188,7 @@ export const CategoryDetails: React.FC<CategoryDetailsProps> = ({
|
||||||
id,
|
id,
|
||||||
input: {
|
input: {
|
||||||
backgroundImageAlt: formData.backgroundImageAlt,
|
backgroundImageAlt: formData.backgroundImageAlt,
|
||||||
descriptionJson: JSON.stringify(formData.description),
|
description: JSON.stringify(formData.description),
|
||||||
name: formData.name,
|
name: formData.name,
|
||||||
seo: {
|
seo: {
|
||||||
description: formData.seoDescription,
|
description: formData.seoDescription,
|
||||||
|
|
|
@ -33,7 +33,7 @@ const CollectionDetails: React.FC<CollectionDetailsProps> = ({
|
||||||
}) => {
|
}) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
const formErrors = getFormErrors(["name", "descriptionJson"], errors);
|
const formErrors = getFormErrors(["name", "description"], errors);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
|
@ -57,8 +57,8 @@ const CollectionDetails: React.FC<CollectionDetailsProps> = ({
|
||||||
<FormSpacer />
|
<FormSpacer />
|
||||||
<RichTextEditor
|
<RichTextEditor
|
||||||
data={data.description}
|
data={data.description}
|
||||||
error={!!formErrors.descriptionJson}
|
error={!!formErrors.description}
|
||||||
helperText={getProductErrorMessage(formErrors.descriptionJson, intl)}
|
helperText={getProductErrorMessage(formErrors.description, intl)}
|
||||||
label={intl.formatMessage(commonMessages.description)}
|
label={intl.formatMessage(commonMessages.description)}
|
||||||
name="description"
|
name="description"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|
|
@ -68,7 +68,7 @@ function useCollectionUpdateForm(
|
||||||
slug: collection?.slug || ""
|
slug: collection?.slug || ""
|
||||||
});
|
});
|
||||||
const [description, changeDescription] = useRichText({
|
const [description, changeDescription] = useRichText({
|
||||||
initial: collection?.descriptionJson,
|
initial: collection?.description,
|
||||||
triggerChange
|
triggerChange
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ export const collection: (
|
||||||
publicationDate: null
|
publicationDate: null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
descriptionJson: JSON.stringify(content),
|
description: JSON.stringify(content),
|
||||||
id: "Q29sbGVjdGlvbjox",
|
id: "Q29sbGVjdGlvbjox",
|
||||||
metadata: [
|
metadata: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -102,7 +102,7 @@ export interface CollectionDetails_collection {
|
||||||
privateMetadata: (CollectionDetails_collection_privateMetadata | null)[];
|
privateMetadata: (CollectionDetails_collection_privateMetadata | null)[];
|
||||||
backgroundImage: CollectionDetails_collection_backgroundImage | null;
|
backgroundImage: CollectionDetails_collection_backgroundImage | null;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
products: CollectionDetails_collection_products | null;
|
products: CollectionDetails_collection_products | null;
|
||||||
|
|
|
@ -48,7 +48,7 @@ export interface CollectionUpdate_collectionUpdate_collection {
|
||||||
privateMetadata: (CollectionUpdate_collectionUpdate_collection_privateMetadata | null)[];
|
privateMetadata: (CollectionUpdate_collectionUpdate_collection_privateMetadata | null)[];
|
||||||
backgroundImage: CollectionUpdate_collectionUpdate_collection_backgroundImage | null;
|
backgroundImage: CollectionUpdate_collectionUpdate_collection_backgroundImage | null;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ export interface CreateCollection_collectionCreate_collection {
|
||||||
privateMetadata: (CreateCollection_collectionCreate_collection_privateMetadata | null)[];
|
privateMetadata: (CreateCollection_collectionCreate_collection_privateMetadata | null)[];
|
||||||
backgroundImage: CreateCollection_collectionCreate_collection_backgroundImage | null;
|
backgroundImage: CreateCollection_collectionCreate_collection_backgroundImage | null;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ export const CollectionCreate: React.FC<CollectionCreateProps> = ({
|
||||||
input: {
|
input: {
|
||||||
backgroundImage: formData.backgroundImage.value,
|
backgroundImage: formData.backgroundImage.value,
|
||||||
backgroundImageAlt: formData.backgroundImageAlt,
|
backgroundImageAlt: formData.backgroundImageAlt,
|
||||||
descriptionJson: JSON.stringify(formData.description),
|
description: JSON.stringify(formData.description),
|
||||||
name: formData.name,
|
name: formData.name,
|
||||||
seo: {
|
seo: {
|
||||||
description: formData.seoDescription,
|
description: formData.seoDescription,
|
||||||
|
|
|
@ -198,7 +198,7 @@ export const CollectionDetails: React.FC<CollectionDetailsProps> = ({
|
||||||
const handleUpdate = async (formData: CollectionUpdateData) => {
|
const handleUpdate = async (formData: CollectionUpdateData) => {
|
||||||
const input: CollectionInput = {
|
const input: CollectionInput = {
|
||||||
backgroundImageAlt: formData.backgroundImageAlt,
|
backgroundImageAlt: formData.backgroundImageAlt,
|
||||||
descriptionJson: JSON.stringify(formData.description),
|
description: JSON.stringify(formData.description),
|
||||||
name: formData.name,
|
name: formData.name,
|
||||||
seo: {
|
seo: {
|
||||||
description: formData.seoDescription,
|
description: formData.seoDescription,
|
||||||
|
|
|
@ -25,7 +25,7 @@ export const categoryDetailsFragment = gql`
|
||||||
}
|
}
|
||||||
name
|
name
|
||||||
slug
|
slug
|
||||||
descriptionJson
|
description
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
parent {
|
parent {
|
||||||
|
|
|
@ -29,7 +29,7 @@ export const collectionDetailsFragment = gql`
|
||||||
url
|
url
|
||||||
}
|
}
|
||||||
slug
|
slug
|
||||||
descriptionJson
|
description
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ export const pageDetailsFragment = gql`
|
||||||
...PageFragment
|
...PageFragment
|
||||||
...PageAttributesFragment
|
...PageAttributesFragment
|
||||||
...MetadataFragment
|
...MetadataFragment
|
||||||
contentJson
|
content
|
||||||
seoTitle
|
seoTitle
|
||||||
seoDescription
|
seoDescription
|
||||||
publicationDate
|
publicationDate
|
||||||
|
|
|
@ -172,7 +172,7 @@ export const productFragmentDetails = gql`
|
||||||
...MetadataFragment
|
...MetadataFragment
|
||||||
name
|
name
|
||||||
slug
|
slug
|
||||||
descriptionJson
|
description
|
||||||
seoTitle
|
seoTitle
|
||||||
seoDescription
|
seoDescription
|
||||||
rating
|
rating
|
||||||
|
|
|
@ -4,7 +4,7 @@ export const categoryTranslationFragment = gql`
|
||||||
fragment CategoryTranslationFragment on CategoryTranslatableContent {
|
fragment CategoryTranslationFragment on CategoryTranslatableContent {
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
descriptionJson
|
description
|
||||||
language {
|
language {
|
||||||
language
|
language
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ export const categoryTranslationFragment = gql`
|
||||||
category {
|
category {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
descriptionJson
|
description
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
}
|
}
|
||||||
|
@ -26,13 +26,13 @@ export const collectionTranslationFragment = gql`
|
||||||
collection {
|
collection {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
descriptionJson
|
description
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
}
|
}
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
descriptionJson
|
description
|
||||||
language {
|
language {
|
||||||
language
|
language
|
||||||
}
|
}
|
||||||
|
@ -47,13 +47,13 @@ export const productTranslationFragment = gql`
|
||||||
product {
|
product {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
descriptionJson
|
description
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
}
|
}
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
descriptionJson
|
description
|
||||||
language {
|
language {
|
||||||
code
|
code
|
||||||
language
|
language
|
||||||
|
@ -118,14 +118,14 @@ export const pageTranslationFragment = gql`
|
||||||
fragment PageTranslationFragment on PageTranslatableContent {
|
fragment PageTranslationFragment on PageTranslatableContent {
|
||||||
page {
|
page {
|
||||||
id
|
id
|
||||||
contentJson
|
content
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
contentJson
|
content
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
title
|
title
|
||||||
|
@ -139,14 +139,14 @@ export const pageTranslationFragment = gql`
|
||||||
export const pageTranslatableFragment = gql`
|
export const pageTranslatableFragment = gql`
|
||||||
fragment PageTranslatableFragment on PageTranslatableContent {
|
fragment PageTranslatableFragment on PageTranslatableContent {
|
||||||
id
|
id
|
||||||
contentJson
|
content
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
title
|
title
|
||||||
|
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
contentJson
|
content
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
title
|
title
|
||||||
|
|
|
@ -37,7 +37,7 @@ export interface CategoryDetailsFragment {
|
||||||
backgroundImage: CategoryDetailsFragment_backgroundImage | null;
|
backgroundImage: CategoryDetailsFragment_backgroundImage | null;
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
parent: CategoryDetailsFragment_parent | null;
|
parent: CategoryDetailsFragment_parent | null;
|
||||||
|
|
|
@ -14,7 +14,7 @@ export interface CategoryTranslationFragment_translation_language {
|
||||||
export interface CategoryTranslationFragment_translation {
|
export interface CategoryTranslationFragment_translation {
|
||||||
__typename: "CategoryTranslation";
|
__typename: "CategoryTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: CategoryTranslationFragment_translation_language;
|
language: CategoryTranslationFragment_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
@ -25,7 +25,7 @@ export interface CategoryTranslationFragment_category {
|
||||||
__typename: "Category";
|
__typename: "Category";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ export interface CollectionDetailsFragment {
|
||||||
privateMetadata: (CollectionDetailsFragment_privateMetadata | null)[];
|
privateMetadata: (CollectionDetailsFragment_privateMetadata | null)[];
|
||||||
backgroundImage: CollectionDetailsFragment_backgroundImage | null;
|
backgroundImage: CollectionDetailsFragment_backgroundImage | null;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ export interface CollectionTranslationFragment_collection {
|
||||||
__typename: "Collection";
|
__typename: "Collection";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ export interface CollectionTranslationFragment_translation_language {
|
||||||
export interface CollectionTranslationFragment_translation {
|
export interface CollectionTranslationFragment_translation {
|
||||||
__typename: "CollectionTranslation";
|
__typename: "CollectionTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: CollectionTranslationFragment_translation_language;
|
language: CollectionTranslationFragment_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
|
|
@ -109,7 +109,7 @@ export interface PageDetailsFragment {
|
||||||
pageType: PageDetailsFragment_pageType;
|
pageType: PageDetailsFragment_pageType;
|
||||||
metadata: (PageDetailsFragment_metadata | null)[];
|
metadata: (PageDetailsFragment_metadata | null)[];
|
||||||
privateMetadata: (PageDetailsFragment_privateMetadata | null)[];
|
privateMetadata: (PageDetailsFragment_privateMetadata | null)[];
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
publicationDate: any | null;
|
publicationDate: any | null;
|
||||||
|
|
|
@ -17,7 +17,7 @@ export interface PageTranslatableFragment_translation_language {
|
||||||
export interface PageTranslatableFragment_translation {
|
export interface PageTranslatableFragment_translation {
|
||||||
__typename: "PageTranslation";
|
__typename: "PageTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -27,7 +27,7 @@ export interface PageTranslatableFragment_translation {
|
||||||
export interface PageTranslatableFragment {
|
export interface PageTranslatableFragment {
|
||||||
__typename: "PageTranslatableContent";
|
__typename: "PageTranslatableContent";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { LanguageCodeEnum } from "./../../types/globalTypes";
|
||||||
export interface PageTranslationFragment_page {
|
export interface PageTranslationFragment_page {
|
||||||
__typename: "Page";
|
__typename: "Page";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -26,7 +26,7 @@ export interface PageTranslationFragment_translation_language {
|
||||||
export interface PageTranslationFragment_translation {
|
export interface PageTranslationFragment_translation {
|
||||||
__typename: "PageTranslation";
|
__typename: "PageTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -253,7 +253,7 @@ export interface Product {
|
||||||
privateMetadata: (Product_privateMetadata | null)[];
|
privateMetadata: (Product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -12,7 +12,7 @@ export interface ProductTranslationFragment_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ export interface ProductTranslationFragment_translation_language {
|
||||||
export interface ProductTranslationFragment_translation {
|
export interface ProductTranslationFragment_translation {
|
||||||
__typename: "ProductTranslation";
|
__typename: "ProductTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: ProductTranslationFragment_translation_language;
|
language: ProductTranslationFragment_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
|
|
@ -122,7 +122,7 @@ function usePageForm(
|
||||||
title: page?.title || ""
|
title: page?.title || ""
|
||||||
});
|
});
|
||||||
const [content, changeContent] = useRichText({
|
const [content, changeContent] = useRichText({
|
||||||
initial: pageExists ? page?.contentJson : null,
|
initial: pageExists ? page?.content : null,
|
||||||
triggerChange
|
triggerChange
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ const PageInfo: React.FC<PageInfoProps> = props => {
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
const formErrors = getFormErrors(["title", "contentJson"], errors);
|
const formErrors = getFormErrors(["title", "content"], errors);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className={classes.root}>
|
<Card className={classes.root}>
|
||||||
|
@ -64,8 +64,8 @@ const PageInfo: React.FC<PageInfoProps> = props => {
|
||||||
<RichTextEditor
|
<RichTextEditor
|
||||||
data={data.content}
|
data={data.content}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
error={!!formErrors.contentJson}
|
error={!!formErrors.content}
|
||||||
helperText={getPageErrorMessage(formErrors.contentJson, intl)}
|
helperText={getPageErrorMessage(formErrors.content, intl)}
|
||||||
label={intl.formatMessage({
|
label={intl.formatMessage({
|
||||||
defaultMessage: "Content",
|
defaultMessage: "Content",
|
||||||
description: "page content"
|
description: "page content"
|
||||||
|
|
|
@ -145,7 +145,7 @@ export const page: PageDetails_page = {
|
||||||
__typename: "SelectedAttribute"
|
__typename: "SelectedAttribute"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
contentJson: JSON.stringify(content),
|
content: JSON.stringify(content),
|
||||||
id: "Kzx152sEm==",
|
id: "Kzx152sEm==",
|
||||||
isPublished: false,
|
isPublished: false,
|
||||||
metadata: [
|
metadata: [
|
||||||
|
|
|
@ -117,7 +117,7 @@ export interface PageCreate_pageCreate_page {
|
||||||
pageType: PageCreate_pageCreate_page_pageType;
|
pageType: PageCreate_pageCreate_page_pageType;
|
||||||
metadata: (PageCreate_pageCreate_page_metadata | null)[];
|
metadata: (PageCreate_pageCreate_page_metadata | null)[];
|
||||||
privateMetadata: (PageCreate_pageCreate_page_privateMetadata | null)[];
|
privateMetadata: (PageCreate_pageCreate_page_privateMetadata | null)[];
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
publicationDate: any | null;
|
publicationDate: any | null;
|
||||||
|
|
|
@ -109,7 +109,7 @@ export interface PageDetails_page {
|
||||||
pageType: PageDetails_page_pageType;
|
pageType: PageDetails_page_pageType;
|
||||||
metadata: (PageDetails_page_metadata | null)[];
|
metadata: (PageDetails_page_metadata | null)[];
|
||||||
privateMetadata: (PageDetails_page_privateMetadata | null)[];
|
privateMetadata: (PageDetails_page_privateMetadata | null)[];
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
publicationDate: any | null;
|
publicationDate: any | null;
|
||||||
|
|
|
@ -116,7 +116,7 @@ export interface PageUpdate_pageUpdate_page {
|
||||||
pageType: PageUpdate_pageUpdate_page_pageType;
|
pageType: PageUpdate_pageUpdate_page_pageType;
|
||||||
metadata: (PageUpdate_pageUpdate_page_metadata | null)[];
|
metadata: (PageUpdate_pageUpdate_page_metadata | null)[];
|
||||||
privateMetadata: (PageUpdate_pageUpdate_page_privateMetadata | null)[];
|
privateMetadata: (PageUpdate_pageUpdate_page_privateMetadata | null)[];
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
publicationDate: any | null;
|
publicationDate: any | null;
|
||||||
|
|
|
@ -128,7 +128,7 @@ export const PageCreate: React.FC<PageCreateProps> = ({ params }) => {
|
||||||
attributes: formData.attributes,
|
attributes: formData.attributes,
|
||||||
updatedFileAttributes
|
updatedFileAttributes
|
||||||
}),
|
}),
|
||||||
contentJson: JSON.stringify(formData.content),
|
content: JSON.stringify(formData.content),
|
||||||
isPublished: formData.isPublished,
|
isPublished: formData.isPublished,
|
||||||
pageType: formData.pageType,
|
pageType: formData.pageType,
|
||||||
publicationDate: formData.publicationDate,
|
publicationDate: formData.publicationDate,
|
||||||
|
|
|
@ -53,7 +53,7 @@ const createPageInput = (
|
||||||
attributes: data.attributes,
|
attributes: data.attributes,
|
||||||
updatedFileAttributes
|
updatedFileAttributes
|
||||||
}),
|
}),
|
||||||
contentJson: JSON.stringify(data.content),
|
content: JSON.stringify(data.content),
|
||||||
isPublished: data.isPublished,
|
isPublished: data.isPublished,
|
||||||
publicationDate: data.publicationDate,
|
publicationDate: data.publicationDate,
|
||||||
seo: {
|
seo: {
|
||||||
|
|
|
@ -37,10 +37,7 @@ export const ProductDetailsForm: React.FC<ProductDetailsFormProps> = ({
|
||||||
}) => {
|
}) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
const formErrors = getFormErrors(
|
const formErrors = getFormErrors(["name", "description", "rating"], errors);
|
||||||
["name", "descriptionJson", "rating"],
|
|
||||||
errors
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
|
@ -65,8 +62,8 @@ export const ProductDetailsForm: React.FC<ProductDetailsFormProps> = ({
|
||||||
<RichTextEditor
|
<RichTextEditor
|
||||||
data={data.description}
|
data={data.description}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
error={!!formErrors.descriptionJson}
|
error={!!formErrors.description}
|
||||||
helperText={getProductErrorMessage(formErrors.descriptionJson, intl)}
|
helperText={getProductErrorMessage(formErrors.description, intl)}
|
||||||
label={intl.formatMessage(commonMessages.description)}
|
label={intl.formatMessage(commonMessages.description)}
|
||||||
name="description"
|
name="description"
|
||||||
onChange={onDescriptionChange}
|
onChange={onDescriptionChange}
|
||||||
|
|
|
@ -205,7 +205,7 @@ function useProductUpdateForm(
|
||||||
const attributesWithNewFileValue = useFormset<null, File>([]);
|
const attributesWithNewFileValue = useFormset<null, File>([]);
|
||||||
const stocks = useFormset(getStockInputFromProduct(product));
|
const stocks = useFormset(getStockInputFromProduct(product));
|
||||||
const [description, changeDescription] = useRichText({
|
const [description, changeDescription] = useRichText({
|
||||||
initial: product?.descriptionJson,
|
initial: product?.description,
|
||||||
triggerChange
|
triggerChange
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ export const product: (
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
defaultVariant: { __typename: "ProductVariant", id: "pv75934" },
|
defaultVariant: { __typename: "ProductVariant", id: "pv75934" },
|
||||||
descriptionJson: JSON.stringify(content),
|
description: JSON.stringify(content),
|
||||||
id: "p10171",
|
id: "p10171",
|
||||||
images: [
|
images: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -253,7 +253,7 @@ export interface ProductChannelListingUpdate_productChannelListingUpdate_product
|
||||||
privateMetadata: (ProductChannelListingUpdate_productChannelListingUpdate_product_privateMetadata | null)[];
|
privateMetadata: (ProductChannelListingUpdate_productChannelListingUpdate_product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -260,7 +260,7 @@ export interface ProductCreate_productCreate_product {
|
||||||
privateMetadata: (ProductCreate_productCreate_product_privateMetadata | null)[];
|
privateMetadata: (ProductCreate_productCreate_product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -253,7 +253,7 @@ export interface ProductDetails_product {
|
||||||
privateMetadata: (ProductDetails_product_privateMetadata | null)[];
|
privateMetadata: (ProductDetails_product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -259,7 +259,7 @@ export interface ProductImageCreate_productImageCreate_product {
|
||||||
privateMetadata: (ProductImageCreate_productImageCreate_product_privateMetadata | null)[];
|
privateMetadata: (ProductImageCreate_productImageCreate_product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -259,7 +259,7 @@ export interface ProductImageUpdate_productImageUpdate_product {
|
||||||
privateMetadata: (ProductImageUpdate_productImageUpdate_product_privateMetadata | null)[];
|
privateMetadata: (ProductImageUpdate_productImageUpdate_product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -260,7 +260,7 @@ export interface ProductUpdate_productUpdate_product {
|
||||||
privateMetadata: (ProductUpdate_productUpdate_product_privateMetadata | null)[];
|
privateMetadata: (ProductUpdate_productUpdate_product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -259,7 +259,7 @@ export interface ProductVariantReorder_productVariantReorder_product {
|
||||||
privateMetadata: (ProductVariantReorder_productVariantReorder_product_privateMetadata | null)[];
|
privateMetadata: (ProductVariantReorder_productVariantReorder_product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -259,7 +259,7 @@ export interface ProductVariantSetDefault_productVariantSetDefault_product {
|
||||||
privateMetadata: (ProductVariantSetDefault_productVariantSetDefault_product_privateMetadata | null)[];
|
privateMetadata: (ProductVariantSetDefault_productVariantSetDefault_product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -260,7 +260,7 @@ export interface SimpleProductUpdate_productUpdate_product {
|
||||||
privateMetadata: (SimpleProductUpdate_productUpdate_product_privateMetadata | null)[];
|
privateMetadata: (SimpleProductUpdate_productUpdate_product_privateMetadata | null)[];
|
||||||
name: string;
|
name: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
|
|
|
@ -108,7 +108,7 @@ export function createHandler(
|
||||||
category: formData.category,
|
category: formData.category,
|
||||||
chargeTaxes: formData.chargeTaxes,
|
chargeTaxes: formData.chargeTaxes,
|
||||||
collections: formData.collections,
|
collections: formData.collections,
|
||||||
descriptionJson: JSON.stringify(formData.description),
|
description: JSON.stringify(formData.description),
|
||||||
name: formData.name,
|
name: formData.name,
|
||||||
productType: formData.productType?.id,
|
productType: formData.productType?.id,
|
||||||
rating: formData.rating,
|
rating: formData.rating,
|
||||||
|
|
|
@ -185,7 +185,7 @@ export function createUpdateHandler(
|
||||||
category: data.category,
|
category: data.category,
|
||||||
chargeTaxes: data.chargeTaxes,
|
chargeTaxes: data.chargeTaxes,
|
||||||
collections: data.collections,
|
collections: data.collections,
|
||||||
descriptionJson: JSON.stringify(data.description),
|
description: JSON.stringify(data.description),
|
||||||
name: data.name,
|
name: data.name,
|
||||||
rating: data.rating,
|
rating: data.rating,
|
||||||
seo: {
|
seo: {
|
||||||
|
|
|
@ -136744,17 +136744,19 @@ exports[`Storyshots Views / Pages / Page details form errors 1`] = `
|
||||||
data-test-id="content"
|
data-test-id="content"
|
||||||
>
|
>
|
||||||
<label
|
<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"
|
data-shrink="true"
|
||||||
>
|
>
|
||||||
Content
|
Content
|
||||||
</label>
|
</label>
|
||||||
<div
|
<div
|
||||||
class="RichTextEditor-editor-id RichTextEditor-root-id"
|
class="RichTextEditor-editor-id RichTextEditor-root-id RichTextEditor-rootError-id"
|
||||||
/>
|
/>
|
||||||
<p
|
<p
|
||||||
class="MuiFormHelperText-root-id MuiFormHelperText-contained-id"
|
class="MuiFormHelperText-root-id MuiFormHelperText-contained-id MuiFormHelperText-error-id"
|
||||||
/>
|
>
|
||||||
|
Invalid value
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -31,7 +31,7 @@ storiesOf("Views / Categories / Create category", module)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: ProductErrorCode.REQUIRED,
|
code: ProductErrorCode.REQUIRED,
|
||||||
field: "descriptionJson"
|
field: "description"
|
||||||
}
|
}
|
||||||
].map(err => ({
|
].map(err => ({
|
||||||
__typename: "ProductError",
|
__typename: "ProductError",
|
||||||
|
|
|
@ -100,7 +100,7 @@ storiesOf("Views / Categories / Update category", module)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: ProductErrorCode.REQUIRED,
|
code: ProductErrorCode.REQUIRED,
|
||||||
field: "descriptionJson"
|
field: "description"
|
||||||
}
|
}
|
||||||
].map(err => ({
|
].map(err => ({
|
||||||
__typename: "ProductError",
|
__typename: "ProductError",
|
||||||
|
|
|
@ -39,7 +39,7 @@ storiesOf("Views / Collections / Create collection", module)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: CollectionErrorCode.REQUIRED,
|
code: CollectionErrorCode.REQUIRED,
|
||||||
field: "descriptionJson"
|
field: "description"
|
||||||
}
|
}
|
||||||
].map(err => ({
|
].map(err => ({
|
||||||
__typename: "CollectionError",
|
__typename: "CollectionError",
|
||||||
|
|
|
@ -57,7 +57,7 @@ storiesOf("Views / Collections / Collection details", module)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: CollectionErrorCode.REQUIRED,
|
code: CollectionErrorCode.REQUIRED,
|
||||||
field: "descriptionJson"
|
field: "description"
|
||||||
}
|
}
|
||||||
].map(err => ({
|
].map(err => ({
|
||||||
__typename: "CollectionError",
|
__typename: "CollectionError",
|
||||||
|
|
|
@ -18,7 +18,7 @@ export interface TranslationsCategoriesPageProps
|
||||||
}
|
}
|
||||||
|
|
||||||
export const fieldNames = {
|
export const fieldNames = {
|
||||||
descriptionJson: "description",
|
description: "description",
|
||||||
name: "name",
|
name: "name",
|
||||||
seoDescription: "seoDescription",
|
seoDescription: "seoDescription",
|
||||||
seoTitle: "seoTitle"
|
seoTitle: "seoTitle"
|
||||||
|
@ -79,10 +79,10 @@ const TranslationsCategoriesPage: React.FC<TranslationsCategoriesPageProps> = ({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: intl.formatMessage(commonMessages.description),
|
displayName: intl.formatMessage(commonMessages.description),
|
||||||
name: fieldNames.descriptionJson,
|
name: fieldNames.description,
|
||||||
translation: data?.translation?.descriptionJson || null,
|
translation: data?.translation?.description || null,
|
||||||
type: "rich" as "rich",
|
type: "rich" as "rich",
|
||||||
value: data?.category?.descriptionJson
|
value: data?.category?.description
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
saveButtonState={saveButtonState}
|
saveButtonState={saveButtonState}
|
||||||
|
|
|
@ -18,7 +18,7 @@ export interface TranslationsCollectionsPageProps
|
||||||
}
|
}
|
||||||
|
|
||||||
export const fieldNames = {
|
export const fieldNames = {
|
||||||
descriptionJson: "description",
|
description: "description",
|
||||||
name: "name",
|
name: "name",
|
||||||
seoDescription: "seoDescription",
|
seoDescription: "seoDescription",
|
||||||
seoTitle: "seoTitle"
|
seoTitle: "seoTitle"
|
||||||
|
@ -80,10 +80,10 @@ const TranslationsCollectionsPage: React.FC<TranslationsCollectionsPageProps> =
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: intl.formatMessage(commonMessages.description),
|
displayName: intl.formatMessage(commonMessages.description),
|
||||||
name: fieldNames.descriptionJson,
|
name: fieldNames.description,
|
||||||
translation: data?.translation?.descriptionJson || null,
|
translation: data?.translation?.description || null,
|
||||||
type: "rich" as "rich",
|
type: "rich" as "rich",
|
||||||
value: data?.collection?.descriptionJson
|
value: data?.collection?.description
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
saveButtonState={saveButtonState}
|
saveButtonState={saveButtonState}
|
||||||
|
|
|
@ -18,7 +18,7 @@ export interface TranslationsPagesPageProps
|
||||||
}
|
}
|
||||||
|
|
||||||
export const fieldNames = {
|
export const fieldNames = {
|
||||||
contentJson: "content",
|
content: "content",
|
||||||
seoDescription: "seoDescription",
|
seoDescription: "seoDescription",
|
||||||
seoTitle: "seoTitle",
|
seoTitle: "seoTitle",
|
||||||
title: "title"
|
title: "title"
|
||||||
|
@ -82,10 +82,10 @@ const TranslationsPagesPage: React.FC<TranslationsPagesPageProps> = ({
|
||||||
defaultMessage: "Content",
|
defaultMessage: "Content",
|
||||||
description: "page content"
|
description: "page content"
|
||||||
}),
|
}),
|
||||||
name: fieldNames.contentJson,
|
name: fieldNames.content,
|
||||||
translation: data?.translation?.contentJson || null,
|
translation: data?.translation?.content || null,
|
||||||
type: "rich" as "rich",
|
type: "rich" as "rich",
|
||||||
value: data?.page?.contentJson
|
value: data?.page?.content
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
saveButtonState={saveButtonState}
|
saveButtonState={saveButtonState}
|
||||||
|
|
|
@ -18,7 +18,7 @@ export interface TranslationsProductsPageProps
|
||||||
}
|
}
|
||||||
|
|
||||||
export const fieldNames = {
|
export const fieldNames = {
|
||||||
descriptionJson: "description",
|
description: "description",
|
||||||
name: "name",
|
name: "name",
|
||||||
seoDescription: "seoDescription",
|
seoDescription: "seoDescription",
|
||||||
seoTitle: "seoTitle"
|
seoTitle: "seoTitle"
|
||||||
|
@ -82,10 +82,10 @@ const TranslationsProductsPage: React.FC<TranslationsProductsPageProps> = ({
|
||||||
displayName: intl.formatMessage({
|
displayName: intl.formatMessage({
|
||||||
defaultMessage: "Description"
|
defaultMessage: "Description"
|
||||||
}),
|
}),
|
||||||
name: fieldNames.descriptionJson,
|
name: fieldNames.description,
|
||||||
translation: data?.translation?.descriptionJson || null,
|
translation: data?.translation?.description || null,
|
||||||
type: "rich" as "rich",
|
type: "rich" as "rich",
|
||||||
value: data?.product?.descriptionJson
|
value: data?.product?.description
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
saveButtonState={saveButtonState}
|
saveButtonState={saveButtonState}
|
||||||
|
|
|
@ -53,12 +53,12 @@ const updateProductTranslations = gql`
|
||||||
product {
|
product {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
descriptionJson
|
description
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
descriptionJson
|
description
|
||||||
language {
|
language {
|
||||||
code
|
code
|
||||||
language
|
language
|
||||||
|
@ -90,12 +90,12 @@ const updateCategoryTranslations = gql`
|
||||||
category {
|
category {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
descriptionJson
|
description
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
descriptionJson
|
description
|
||||||
language {
|
language {
|
||||||
language
|
language
|
||||||
}
|
}
|
||||||
|
@ -126,12 +126,12 @@ const updateCollectionTranslations = gql`
|
||||||
collection {
|
collection {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
descriptionJson
|
description
|
||||||
seoDescription
|
seoDescription
|
||||||
seoTitle
|
seoTitle
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
descriptionJson
|
description
|
||||||
language {
|
language {
|
||||||
language
|
language
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ export interface CategoryTranslationDetails_translation_CategoryTranslatableCont
|
||||||
export interface CategoryTranslationDetails_translation_CategoryTranslatableContent_translation {
|
export interface CategoryTranslationDetails_translation_CategoryTranslatableContent_translation {
|
||||||
__typename: "CategoryTranslation";
|
__typename: "CategoryTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: CategoryTranslationDetails_translation_CategoryTranslatableContent_translation_language;
|
language: CategoryTranslationDetails_translation_CategoryTranslatableContent_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
@ -31,7 +31,7 @@ export interface CategoryTranslationDetails_translation_CategoryTranslatableCont
|
||||||
__typename: "Category";
|
__typename: "Category";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ export interface CategoryTranslations_translations_edges_node_CategoryTranslatab
|
||||||
export interface CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation {
|
export interface CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation {
|
||||||
__typename: "CategoryTranslation";
|
__typename: "CategoryTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation_language;
|
language: CategoryTranslations_translations_edges_node_CategoryTranslatableContent_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
@ -31,7 +31,7 @@ export interface CategoryTranslations_translations_edges_node_CategoryTranslatab
|
||||||
__typename: "Category";
|
__typename: "Category";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ export interface CollectionTranslationDetails_translation_CollectionTranslatable
|
||||||
__typename: "Collection";
|
__typename: "Collection";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ export interface CollectionTranslationDetails_translation_CollectionTranslatable
|
||||||
export interface CollectionTranslationDetails_translation_CollectionTranslatableContent_translation {
|
export interface CollectionTranslationDetails_translation_CollectionTranslatableContent_translation {
|
||||||
__typename: "CollectionTranslation";
|
__typename: "CollectionTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: CollectionTranslationDetails_translation_CollectionTranslatableContent_translation_language;
|
language: CollectionTranslationDetails_translation_CollectionTranslatableContent_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
|
|
@ -16,7 +16,7 @@ export interface CollectionTranslations_translations_edges_node_CollectionTransl
|
||||||
__typename: "Collection";
|
__typename: "Collection";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ export interface CollectionTranslations_translations_edges_node_CollectionTransl
|
||||||
export interface CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation {
|
export interface CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation {
|
||||||
__typename: "CollectionTranslation";
|
__typename: "CollectionTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation_language;
|
language: CollectionTranslations_translations_edges_node_CollectionTranslatableContent_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
|
|
@ -15,7 +15,7 @@ export interface PageTranslationDetails_translation_ProductTranslatableContent {
|
||||||
export interface PageTranslationDetails_translation_PageTranslatableContent_page {
|
export interface PageTranslationDetails_translation_PageTranslatableContent_page {
|
||||||
__typename: "Page";
|
__typename: "Page";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -30,7 +30,7 @@ export interface PageTranslationDetails_translation_PageTranslatableContent_tran
|
||||||
export interface PageTranslationDetails_translation_PageTranslatableContent_translation {
|
export interface PageTranslationDetails_translation_PageTranslatableContent_translation {
|
||||||
__typename: "PageTranslation";
|
__typename: "PageTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -15,7 +15,7 @@ export interface PageTranslations_translations_edges_node_ProductTranslatableCon
|
||||||
export interface PageTranslations_translations_edges_node_PageTranslatableContent_page {
|
export interface PageTranslations_translations_edges_node_PageTranslatableContent_page {
|
||||||
__typename: "Page";
|
__typename: "Page";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -30,7 +30,7 @@ export interface PageTranslations_translations_edges_node_PageTranslatableConten
|
||||||
export interface PageTranslations_translations_edges_node_PageTranslatableContent_translation {
|
export interface PageTranslations_translations_edges_node_PageTranslatableContent_translation {
|
||||||
__typename: "PageTranslation";
|
__typename: "PageTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -16,7 +16,7 @@ export interface ProductTranslationDetails_translation_ProductTranslatableConten
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ export interface ProductTranslationDetails_translation_ProductTranslatableConten
|
||||||
export interface ProductTranslationDetails_translation_ProductTranslatableContent_translation {
|
export interface ProductTranslationDetails_translation_ProductTranslatableContent_translation {
|
||||||
__typename: "ProductTranslation";
|
__typename: "ProductTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: ProductTranslationDetails_translation_ProductTranslatableContent_translation_language;
|
language: ProductTranslationDetails_translation_ProductTranslatableContent_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
|
|
@ -16,7 +16,7 @@ export interface ProductTranslations_translations_edges_node_ProductTranslatable
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ export interface ProductTranslations_translations_edges_node_ProductTranslatable
|
||||||
export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_translation {
|
export interface ProductTranslations_translations_edges_node_ProductTranslatableContent_translation {
|
||||||
__typename: "ProductTranslation";
|
__typename: "ProductTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: ProductTranslations_translations_edges_node_ProductTranslatableContent_translation_language;
|
language: ProductTranslations_translations_edges_node_ProductTranslatableContent_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
|
|
@ -22,7 +22,7 @@ export interface UpdateCategoryTranslations_categoryTranslate_category_translati
|
||||||
export interface UpdateCategoryTranslations_categoryTranslate_category_translation {
|
export interface UpdateCategoryTranslations_categoryTranslate_category_translation {
|
||||||
__typename: "CategoryTranslation";
|
__typename: "CategoryTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: UpdateCategoryTranslations_categoryTranslate_category_translation_language;
|
language: UpdateCategoryTranslations_categoryTranslate_category_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
@ -33,7 +33,7 @@ export interface UpdateCategoryTranslations_categoryTranslate_category {
|
||||||
__typename: "Category";
|
__typename: "Category";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
translation: UpdateCategoryTranslations_categoryTranslate_category_translation | null;
|
translation: UpdateCategoryTranslations_categoryTranslate_category_translation | null;
|
||||||
|
|
|
@ -22,7 +22,7 @@ export interface UpdateCollectionTranslations_collectionTranslate_collection_tra
|
||||||
export interface UpdateCollectionTranslations_collectionTranslate_collection_translation {
|
export interface UpdateCollectionTranslations_collectionTranslate_collection_translation {
|
||||||
__typename: "CollectionTranslation";
|
__typename: "CollectionTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: UpdateCollectionTranslations_collectionTranslate_collection_translation_language;
|
language: UpdateCollectionTranslations_collectionTranslate_collection_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
@ -33,7 +33,7 @@ export interface UpdateCollectionTranslations_collectionTranslate_collection {
|
||||||
__typename: "Collection";
|
__typename: "Collection";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
translation: UpdateCollectionTranslations_collectionTranslate_collection_translation | null;
|
translation: UpdateCollectionTranslations_collectionTranslate_collection_translation | null;
|
||||||
|
|
|
@ -17,7 +17,7 @@ export interface UpdatePageTranslations_pageTranslate_errors {
|
||||||
export interface UpdatePageTranslations_pageTranslate_page_page {
|
export interface UpdatePageTranslations_pageTranslate_page_page {
|
||||||
__typename: "Page";
|
__typename: "Page";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -32,7 +32,7 @@ export interface UpdatePageTranslations_pageTranslate_page_translation_language
|
||||||
export interface UpdatePageTranslations_pageTranslate_page_translation {
|
export interface UpdatePageTranslations_pageTranslate_page_translation {
|
||||||
__typename: "PageTranslation";
|
__typename: "PageTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
contentJson: any;
|
content: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -23,7 +23,7 @@ export interface UpdateProductTranslations_productTranslate_product_translation_
|
||||||
export interface UpdateProductTranslations_productTranslate_product_translation {
|
export interface UpdateProductTranslations_productTranslate_product_translation {
|
||||||
__typename: "ProductTranslation";
|
__typename: "ProductTranslation";
|
||||||
id: string;
|
id: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
language: UpdateProductTranslations_productTranslate_product_translation_language;
|
language: UpdateProductTranslations_productTranslate_product_translation_language;
|
||||||
name: string;
|
name: string;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
|
@ -34,7 +34,7 @@ export interface UpdateProductTranslations_productTranslate_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
descriptionJson: any;
|
description: any;
|
||||||
seoDescription: string | null;
|
seoDescription: string | null;
|
||||||
seoTitle: string | null;
|
seoTitle: string | null;
|
||||||
translation: UpdateProductTranslations_productTranslate_product_translation | null;
|
translation: UpdateProductTranslations_productTranslate_product_translation | null;
|
||||||
|
|
|
@ -69,8 +69,8 @@ const TranslationsCategories: React.FC<TranslationsCategoriesProps> = ({
|
||||||
{(updateTranslations, updateTranslationsOpts) => {
|
{(updateTranslations, updateTranslationsOpts) => {
|
||||||
const handleSubmit = (field: string, data: string) => {
|
const handleSubmit = (field: string, data: string) => {
|
||||||
const input: TranslationInput = {};
|
const input: TranslationInput = {};
|
||||||
if (field === fieldNames.descriptionJson) {
|
if (field === fieldNames.description) {
|
||||||
input.descriptionJson = JSON.stringify(data);
|
input.description = JSON.stringify(data);
|
||||||
} else if (field === fieldNames.name) {
|
} else if (field === fieldNames.name) {
|
||||||
input.name = data;
|
input.name = data;
|
||||||
} else if (field === fieldNames.seoDescription) {
|
} else if (field === fieldNames.seoDescription) {
|
||||||
|
|
|
@ -71,8 +71,8 @@ const TranslationsCollections: React.FC<TranslationsCollectionsProps> = ({
|
||||||
{(updateTranslations, updateTranslationsOpts) => {
|
{(updateTranslations, updateTranslationsOpts) => {
|
||||||
const handleSubmit = (field: string, data: string) => {
|
const handleSubmit = (field: string, data: string) => {
|
||||||
const input: TranslationInput = {};
|
const input: TranslationInput = {};
|
||||||
if (field === fieldNames.descriptionJson) {
|
if (field === fieldNames.description) {
|
||||||
input.descriptionJson = JSON.stringify(data);
|
input.description = JSON.stringify(data);
|
||||||
} else if (field === fieldNames.name) {
|
} else if (field === fieldNames.name) {
|
||||||
input.name = data;
|
input.name = data;
|
||||||
} else if (field === fieldNames.seoDescription) {
|
} else if (field === fieldNames.seoDescription) {
|
||||||
|
|
|
@ -147,7 +147,7 @@ const TranslationsEntities: React.FC<TranslationsEntitiesProps> = ({
|
||||||
completion: {
|
completion: {
|
||||||
current: node.translation
|
current: node.translation
|
||||||
? [
|
? [
|
||||||
node.translation.descriptionJson,
|
node.translation.description,
|
||||||
node.translation.name,
|
node.translation.name,
|
||||||
node.translation.seoDescription,
|
node.translation.seoDescription,
|
||||||
node.translation.seoTitle
|
node.translation.seoTitle
|
||||||
|
@ -197,7 +197,7 @@ const TranslationsEntities: React.FC<TranslationsEntitiesProps> = ({
|
||||||
completion: {
|
completion: {
|
||||||
current: node.translation
|
current: node.translation
|
||||||
? [
|
? [
|
||||||
node.translation.descriptionJson,
|
node.translation.description,
|
||||||
node.translation.name,
|
node.translation.name,
|
||||||
node.translation.seoDescription,
|
node.translation.seoDescription,
|
||||||
node.translation.seoTitle
|
node.translation.seoTitle
|
||||||
|
@ -248,7 +248,7 @@ const TranslationsEntities: React.FC<TranslationsEntitiesProps> = ({
|
||||||
completion: {
|
completion: {
|
||||||
current: node.translation
|
current: node.translation
|
||||||
? [
|
? [
|
||||||
node.translation.descriptionJson,
|
node.translation.description,
|
||||||
node.translation.name,
|
node.translation.name,
|
||||||
node.translation.seoDescription,
|
node.translation.seoDescription,
|
||||||
node.translation.seoTitle
|
node.translation.seoTitle
|
||||||
|
@ -385,7 +385,7 @@ const TranslationsEntities: React.FC<TranslationsEntitiesProps> = ({
|
||||||
completion: {
|
completion: {
|
||||||
current: node.translation
|
current: node.translation
|
||||||
? [
|
? [
|
||||||
node.translation.contentJson,
|
node.translation.content,
|
||||||
node.translation.seoDescription,
|
node.translation.seoDescription,
|
||||||
node.translation.seoTitle,
|
node.translation.seoTitle,
|
||||||
node.translation.title
|
node.translation.title
|
||||||
|
|
|
@ -72,8 +72,8 @@ const TranslationsPages: React.FC<TranslationsPagesProps> = ({
|
||||||
{(updateTranslations, updateTranslationsOpts) => {
|
{(updateTranslations, updateTranslationsOpts) => {
|
||||||
const handleSubmit = (field: string, data: string) => {
|
const handleSubmit = (field: string, data: string) => {
|
||||||
const input: PageTranslationInput = {};
|
const input: PageTranslationInput = {};
|
||||||
if (field === fieldNames.contentJson) {
|
if (field === fieldNames.content) {
|
||||||
input.contentJson = JSON.stringify(data);
|
input.content = JSON.stringify(data);
|
||||||
} else if (field === fieldNames.title) {
|
} else if (field === fieldNames.title) {
|
||||||
input.title = data;
|
input.title = data;
|
||||||
} else if (field === fieldNames.seoDescription) {
|
} else if (field === fieldNames.seoDescription) {
|
||||||
|
|
|
@ -70,8 +70,8 @@ const TranslationsProducts: React.FC<TranslationsProductsProps> = ({
|
||||||
{(updateTranslations, updateTranslationsOpts) => {
|
{(updateTranslations, updateTranslationsOpts) => {
|
||||||
const handleSubmit = (field: string, data: string) => {
|
const handleSubmit = (field: string, data: string) => {
|
||||||
const input: TranslationInput = {};
|
const input: TranslationInput = {};
|
||||||
if (field === fieldNames.descriptionJson) {
|
if (field === fieldNames.description) {
|
||||||
input.descriptionJson = JSON.stringify(data);
|
input.description = JSON.stringify(data);
|
||||||
} else if (field === fieldNames.name) {
|
} else if (field === fieldNames.name) {
|
||||||
input.name = data;
|
input.name = data;
|
||||||
} else if (field === fieldNames.seoDescription) {
|
} else if (field === fieldNames.seoDescription) {
|
||||||
|
|
|
@ -1119,8 +1119,7 @@ export interface CategoryFilterInput {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CategoryInput {
|
export interface CategoryInput {
|
||||||
description?: string | null;
|
description?: any | null;
|
||||||
descriptionJson?: any | null;
|
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
slug?: string | null;
|
slug?: string | null;
|
||||||
seo?: SeoInput | null;
|
seo?: SeoInput | null;
|
||||||
|
@ -1160,8 +1159,7 @@ export interface CollectionCreateInput {
|
||||||
isPublished?: boolean | null;
|
isPublished?: boolean | null;
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
slug?: string | null;
|
slug?: string | null;
|
||||||
description?: string | null;
|
description?: any | null;
|
||||||
descriptionJson?: any | null;
|
|
||||||
backgroundImage?: any | null;
|
backgroundImage?: any | null;
|
||||||
backgroundImageAlt?: string | null;
|
backgroundImageAlt?: string | null;
|
||||||
seo?: SeoInput | null;
|
seo?: SeoInput | null;
|
||||||
|
@ -1180,8 +1178,7 @@ export interface CollectionInput {
|
||||||
isPublished?: boolean | null;
|
isPublished?: boolean | null;
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
slug?: string | null;
|
slug?: string | null;
|
||||||
description?: string | null;
|
description?: any | null;
|
||||||
descriptionJson?: any | null;
|
|
||||||
backgroundImage?: any | null;
|
backgroundImage?: any | null;
|
||||||
backgroundImageAlt?: string | null;
|
backgroundImageAlt?: string | null;
|
||||||
seo?: SeoInput | null;
|
seo?: SeoInput | null;
|
||||||
|
@ -1429,8 +1426,7 @@ export interface OrderUpdateShippingInput {
|
||||||
export interface PageCreateInput {
|
export interface PageCreateInput {
|
||||||
slug?: string | null;
|
slug?: string | null;
|
||||||
title?: string | null;
|
title?: string | null;
|
||||||
content?: string | null;
|
content?: any | null;
|
||||||
contentJson?: any | null;
|
|
||||||
attributes?: AttributeValueInput[] | null;
|
attributes?: AttributeValueInput[] | null;
|
||||||
isPublished?: boolean | null;
|
isPublished?: boolean | null;
|
||||||
publicationDate?: string | null;
|
publicationDate?: string | null;
|
||||||
|
@ -1441,8 +1437,7 @@ export interface PageCreateInput {
|
||||||
export interface PageInput {
|
export interface PageInput {
|
||||||
slug?: string | null;
|
slug?: string | null;
|
||||||
title?: string | null;
|
title?: string | null;
|
||||||
content?: string | null;
|
content?: any | null;
|
||||||
contentJson?: any | null;
|
|
||||||
attributes?: AttributeValueInput[] | null;
|
attributes?: AttributeValueInput[] | null;
|
||||||
isPublished?: boolean | null;
|
isPublished?: boolean | null;
|
||||||
publicationDate?: string | null;
|
publicationDate?: string | null;
|
||||||
|
@ -1551,8 +1546,7 @@ export interface ProductCreateInput {
|
||||||
category?: string | null;
|
category?: string | null;
|
||||||
chargeTaxes?: boolean | null;
|
chargeTaxes?: boolean | null;
|
||||||
collections?: (string | null)[] | null;
|
collections?: (string | null)[] | null;
|
||||||
description?: string | null;
|
description?: any | null;
|
||||||
descriptionJson?: any | null;
|
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
slug?: string | null;
|
slug?: string | null;
|
||||||
taxCode?: string | null;
|
taxCode?: string | null;
|
||||||
|
@ -1584,8 +1578,7 @@ export interface ProductInput {
|
||||||
category?: string | null;
|
category?: string | null;
|
||||||
chargeTaxes?: boolean | null;
|
chargeTaxes?: boolean | null;
|
||||||
collections?: (string | null)[] | null;
|
collections?: (string | null)[] | null;
|
||||||
description?: string | null;
|
description?: any | null;
|
||||||
descriptionJson?: any | null;
|
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
slug?: string | null;
|
slug?: string | null;
|
||||||
taxCode?: string | null;
|
taxCode?: string | null;
|
||||||
|
@ -1818,8 +1811,7 @@ export interface TranslationInput {
|
||||||
seoTitle?: string | null;
|
seoTitle?: string | null;
|
||||||
seoDescription?: string | null;
|
seoDescription?: string | null;
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
description?: string | null;
|
description?: any | null;
|
||||||
descriptionJson?: any | null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserCreateInput {
|
export interface UserCreateInput {
|
||||||
|
|
Loading…
Reference in a new issue