This reverts commit 796383637c
.
This commit is contained in:
parent
8ab097b7d3
commit
7fd2eb2a2c
16 changed files with 241 additions and 205 deletions
|
@ -9357,22 +9357,6 @@
|
||||||
"isDeprecated": false,
|
"isDeprecated": false,
|
||||||
"deprecationReason": null
|
"deprecationReason": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "attribute",
|
|
||||||
"description": "Represents a value of an attribute.",
|
|
||||||
"args": [],
|
|
||||||
"type": {
|
|
||||||
"kind": "NON_NULL",
|
|
||||||
"name": null,
|
|
||||||
"ofType": {
|
|
||||||
"kind": "OBJECT",
|
|
||||||
"name": "AttributeTranslatableContent",
|
|
||||||
"ofType": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"isDeprecated": false,
|
|
||||||
"deprecationReason": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "attributeValue",
|
"name": "attributeValue",
|
||||||
"description": "Represents a value of an attribute.",
|
"description": "Represents a value of an attribute.",
|
||||||
|
|
|
@ -3460,6 +3460,10 @@
|
||||||
"context": "window title",
|
"context": "window title",
|
||||||
"string": "Create Product"
|
"string": "Create Product"
|
||||||
},
|
},
|
||||||
|
"PajjqE": {
|
||||||
|
"context": "attribute list",
|
||||||
|
"string": "Attribute {number}"
|
||||||
|
},
|
||||||
"PbQJY5": {
|
"PbQJY5": {
|
||||||
"context": "section header",
|
"context": "section header",
|
||||||
"string": "Saleor Apps"
|
"string": "Saleor Apps"
|
||||||
|
@ -7878,10 +7882,6 @@
|
||||||
"context": "attribute type",
|
"context": "attribute type",
|
||||||
"string": "Content Attribute"
|
"string": "Content Attribute"
|
||||||
},
|
},
|
||||||
"zgqPGF": {
|
|
||||||
"context": "attribute list",
|
|
||||||
"string": "Attribute {name}"
|
|
||||||
},
|
|
||||||
"zjHH6b": {
|
"zjHH6b": {
|
||||||
"context": "sale start date",
|
"context": "sale start date",
|
||||||
"string": "Started"
|
"string": "Started"
|
||||||
|
|
|
@ -1881,9 +1881,6 @@ type AttributeValueTranslatableContent implements Node {
|
||||||
languageCode: LanguageCodeEnum!
|
languageCode: LanguageCodeEnum!
|
||||||
): AttributeValueTranslation
|
): AttributeValueTranslation
|
||||||
|
|
||||||
"""Represents an attribute."""
|
|
||||||
attribute: Attribute!
|
|
||||||
|
|
||||||
"""Represents a value of an attribute."""
|
"""Represents a value of an attribute."""
|
||||||
attributeValue: AttributeValue @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
|
attributeValue: AttributeValue @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +1,5 @@
|
||||||
import { gql } from "@apollo/client";
|
import { gql } from "@apollo/client";
|
||||||
|
|
||||||
export const attributeValueTranslatableFragment = gql`
|
|
||||||
fragment AttributeValueTranslatable on AttributeValueTranslatableContent {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
plainText
|
|
||||||
richText
|
|
||||||
attributeValue {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
attribute {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
}
|
|
||||||
translation(languageCode: $language) {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
plainText
|
|
||||||
richText
|
|
||||||
language {
|
|
||||||
code
|
|
||||||
language
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
export const categoryTranslationFragment = gql`
|
export const categoryTranslationFragment = gql`
|
||||||
fragment CategoryTranslation on CategoryTranslatableContent {
|
fragment CategoryTranslation on CategoryTranslatableContent {
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
|
@ -90,7 +64,21 @@ export const productTranslationFragment = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
attributeValues {
|
attributeValues {
|
||||||
...AttributeValueTranslatable
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
attributeValue {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
translation(languageCode: $language) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
language {
|
||||||
|
code
|
||||||
|
language
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -110,7 +98,21 @@ export const productVariantTranslationFragment = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
attributeValues {
|
attributeValues {
|
||||||
...AttributeValueTranslatable
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
attributeValue {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
translation(languageCode: $language) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
language {
|
||||||
|
code
|
||||||
|
language
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -189,7 +191,21 @@ export const pageTranslationFragment = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
attributeValues {
|
attributeValues {
|
||||||
...AttributeValueTranslatable
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
attributeValue {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
translation(languageCode: $language) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
language {
|
||||||
|
code
|
||||||
|
language
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -224,13 +240,11 @@ export const attributeChoicesTranslationFragment = gql`
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
plainText
|
|
||||||
richText
|
richText
|
||||||
inputType
|
inputType
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
plainText
|
|
||||||
richText
|
richText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -277,6 +291,28 @@ export const attributeTranslationDetailsFragment = gql`
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const attributeValueTranslatableContentFragment = gql`
|
||||||
|
fragment AttributeValueTranslatableContent on AttributeTranslatableContent {
|
||||||
|
translation(languageCode: $language) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
attribute {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
inputType
|
||||||
|
choices(
|
||||||
|
first: $firstValues
|
||||||
|
after: $afterValues
|
||||||
|
last: $lastValues
|
||||||
|
before: $beforeValues
|
||||||
|
) {
|
||||||
|
...AttributeChoicesTranslation
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
export const menuItemTranslationFragment = gql`
|
export const menuItemTranslationFragment = gql`
|
||||||
fragment MenuItemTranslation on MenuItemTranslatableContent {
|
fragment MenuItemTranslation on MenuItemTranslatableContent {
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
|
|
|
@ -2437,31 +2437,6 @@ export const CollectionTranslationFragmentDoc = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const AttributeValueTranslatableFragmentDoc = gql`
|
|
||||||
fragment AttributeValueTranslatable on AttributeValueTranslatableContent {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
plainText
|
|
||||||
richText
|
|
||||||
attributeValue {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
attribute {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
}
|
|
||||||
translation(languageCode: $language) {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
plainText
|
|
||||||
richText
|
|
||||||
language {
|
|
||||||
code
|
|
||||||
language
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
export const ProductTranslationFragmentDoc = gql`
|
export const ProductTranslationFragmentDoc = gql`
|
||||||
fragment ProductTranslation on ProductTranslatableContent {
|
fragment ProductTranslation on ProductTranslatableContent {
|
||||||
product {
|
product {
|
||||||
|
@ -2483,10 +2458,24 @@ export const ProductTranslationFragmentDoc = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
attributeValues {
|
attributeValues {
|
||||||
...AttributeValueTranslatable
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
attributeValue {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
translation(languageCode: $language) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
language {
|
||||||
|
code
|
||||||
|
language
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${AttributeValueTranslatableFragmentDoc}`;
|
`;
|
||||||
export const ProductVariantTranslationFragmentDoc = gql`
|
export const ProductVariantTranslationFragmentDoc = gql`
|
||||||
fragment ProductVariantTranslation on ProductVariantTranslatableContent {
|
fragment ProductVariantTranslation on ProductVariantTranslatableContent {
|
||||||
productVariant {
|
productVariant {
|
||||||
|
@ -2502,10 +2491,24 @@ export const ProductVariantTranslationFragmentDoc = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
attributeValues {
|
attributeValues {
|
||||||
...AttributeValueTranslatable
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
attributeValue {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
translation(languageCode: $language) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
language {
|
||||||
|
code
|
||||||
|
language
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${AttributeValueTranslatableFragmentDoc}`;
|
`;
|
||||||
export const SaleTranslationFragmentDoc = gql`
|
export const SaleTranslationFragmentDoc = gql`
|
||||||
fragment SaleTranslation on SaleTranslatableContent {
|
fragment SaleTranslation on SaleTranslatableContent {
|
||||||
sale {
|
sale {
|
||||||
|
@ -2579,10 +2582,24 @@ export const PageTranslationFragmentDoc = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
attributeValues {
|
attributeValues {
|
||||||
...AttributeValueTranslatable
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
attributeValue {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
translation(languageCode: $language) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
richText
|
||||||
|
language {
|
||||||
|
code
|
||||||
|
language
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${AttributeValueTranslatableFragmentDoc}`;
|
`;
|
||||||
export const PageTranslatableFragmentDoc = gql`
|
export const PageTranslatableFragmentDoc = gql`
|
||||||
fragment PageTranslatable on PageTranslatableContent {
|
fragment PageTranslatable on PageTranslatableContent {
|
||||||
id
|
id
|
||||||
|
@ -2628,13 +2645,11 @@ export const AttributeChoicesTranslationFragmentDoc = gql`
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
plainText
|
|
||||||
richText
|
richText
|
||||||
inputType
|
inputType
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
plainText
|
|
||||||
richText
|
richText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2663,6 +2678,27 @@ export const AttributeTranslationDetailsFragmentDoc = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${AttributeChoicesTranslationFragmentDoc}`;
|
${AttributeChoicesTranslationFragmentDoc}`;
|
||||||
|
export const AttributeValueTranslatableContentFragmentDoc = gql`
|
||||||
|
fragment AttributeValueTranslatableContent on AttributeTranslatableContent {
|
||||||
|
translation(languageCode: $language) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
attribute {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
inputType
|
||||||
|
choices(
|
||||||
|
first: $firstValues
|
||||||
|
after: $afterValues
|
||||||
|
last: $lastValues
|
||||||
|
before: $beforeValues
|
||||||
|
) {
|
||||||
|
...AttributeChoicesTranslation
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
${AttributeChoicesTranslationFragmentDoc}`;
|
||||||
export const MenuItemTranslationFragmentDoc = gql`
|
export const MenuItemTranslationFragmentDoc = gql`
|
||||||
fragment MenuItemTranslation on MenuItemTranslatableContent {
|
fragment MenuItemTranslation on MenuItemTranslatableContent {
|
||||||
translation(languageCode: $language) {
|
translation(languageCode: $language) {
|
||||||
|
|
|
@ -549,14 +549,13 @@ export type AttributeValueDeletedFieldPolicy = {
|
||||||
recipient?: FieldPolicy<any> | FieldReadFunction<any>,
|
recipient?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
attributeValue?: FieldPolicy<any> | FieldReadFunction<any>
|
attributeValue?: FieldPolicy<any> | FieldReadFunction<any>
|
||||||
};
|
};
|
||||||
export type AttributeValueTranslatableContentKeySpecifier = ('id' | 'name' | 'richText' | 'plainText' | 'translation' | 'attribute' | 'attributeValue' | AttributeValueTranslatableContentKeySpecifier)[];
|
export type AttributeValueTranslatableContentKeySpecifier = ('id' | 'name' | 'richText' | 'plainText' | 'translation' | 'attributeValue' | AttributeValueTranslatableContentKeySpecifier)[];
|
||||||
export type AttributeValueTranslatableContentFieldPolicy = {
|
export type AttributeValueTranslatableContentFieldPolicy = {
|
||||||
id?: FieldPolicy<any> | FieldReadFunction<any>,
|
id?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
name?: FieldPolicy<any> | FieldReadFunction<any>,
|
name?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
richText?: FieldPolicy<any> | FieldReadFunction<any>,
|
richText?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
plainText?: FieldPolicy<any> | FieldReadFunction<any>,
|
plainText?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
translation?: FieldPolicy<any> | FieldReadFunction<any>,
|
translation?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
attribute?: FieldPolicy<any> | FieldReadFunction<any>,
|
|
||||||
attributeValue?: FieldPolicy<any> | FieldReadFunction<any>
|
attributeValue?: FieldPolicy<any> | FieldReadFunction<any>
|
||||||
};
|
};
|
||||||
export type AttributeValueTranslateKeySpecifier = ('translationErrors' | 'errors' | 'attributeValue' | AttributeValueTranslateKeySpecifier)[];
|
export type AttributeValueTranslateKeySpecifier = ('translationErrors' | 'errors' | 'attributeValue' | AttributeValueTranslateKeySpecifier)[];
|
||||||
|
|
|
@ -7215,15 +7215,13 @@ export type TaxTypeFragment = { __typename: 'TaxType', description: string | nul
|
||||||
|
|
||||||
export type TimePeriodFragment = { __typename: 'TimePeriod', amount: number, type: TimePeriodTypeEnum };
|
export type TimePeriodFragment = { __typename: 'TimePeriod', amount: number, type: TimePeriodTypeEnum };
|
||||||
|
|
||||||
export type AttributeValueTranslatableFragment = { __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null };
|
|
||||||
|
|
||||||
export type CategoryTranslationFragment = { __typename: 'CategoryTranslatableContent', translation: { __typename: 'CategoryTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null, category: { __typename: 'Category', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null };
|
export type CategoryTranslationFragment = { __typename: 'CategoryTranslatableContent', translation: { __typename: 'CategoryTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null, category: { __typename: 'Category', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null };
|
||||||
|
|
||||||
export type CollectionTranslationFragment = { __typename: 'CollectionTranslatableContent', collection: { __typename: 'Collection', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'CollectionTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null };
|
export type CollectionTranslationFragment = { __typename: 'CollectionTranslatableContent', collection: { __typename: 'Collection', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'CollectionTranslation', id: string, description: any | null, name: string | null, seoDescription: string | null, seoTitle: string | null, language: { __typename: 'LanguageDisplay', language: string } } | null };
|
||||||
|
|
||||||
export type ProductTranslationFragment = { __typename: 'ProductTranslatableContent', product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'ProductTranslation', id: string, seoTitle: string | null, seoDescription: string | null, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> };
|
export type ProductTranslationFragment = { __typename: 'ProductTranslatableContent', product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'ProductTranslation', id: string, seoTitle: string | null, seoDescription: string | null, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> };
|
||||||
|
|
||||||
export type ProductVariantTranslationFragment = { __typename: 'ProductVariantTranslatableContent', name: string, productVariant: { __typename: 'ProductVariant', id: string } | null, translation: { __typename: 'ProductVariantTranslation', id: string, name: string, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> };
|
export type ProductVariantTranslationFragment = { __typename: 'ProductVariantTranslatableContent', name: string, productVariant: { __typename: 'ProductVariant', id: string } | null, translation: { __typename: 'ProductVariantTranslation', id: string, name: string, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> };
|
||||||
|
|
||||||
export type SaleTranslationFragment = { __typename: 'SaleTranslatableContent', sale: { __typename: 'Sale', id: string, name: string } | null, translation: { __typename: 'SaleTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null };
|
export type SaleTranslationFragment = { __typename: 'SaleTranslatableContent', sale: { __typename: 'Sale', id: string, name: string } | null, translation: { __typename: 'SaleTranslation', id: string, name: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null };
|
||||||
|
|
||||||
|
@ -7231,15 +7229,17 @@ export type VoucherTranslationFragment = { __typename: 'VoucherTranslatableConte
|
||||||
|
|
||||||
export type ShippingMethodTranslationFragment = { __typename: 'ShippingMethodTranslatableContent', id: string, name: string, description: any | null, shippingMethod: { __typename: 'ShippingMethodType', id: string } | null, translation: { __typename: 'ShippingMethodTranslation', id: string, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null };
|
export type ShippingMethodTranslationFragment = { __typename: 'ShippingMethodTranslatableContent', id: string, name: string, description: any | null, shippingMethod: { __typename: 'ShippingMethodType', id: string } | null, translation: { __typename: 'ShippingMethodTranslation', id: string, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null };
|
||||||
|
|
||||||
export type PageTranslationFragment = { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> };
|
export type PageTranslationFragment = { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> };
|
||||||
|
|
||||||
export type PageTranslatableFragment = { __typename: 'PageTranslatableContent', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null };
|
export type PageTranslatableFragment = { __typename: 'PageTranslatableContent', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null };
|
||||||
|
|
||||||
export type AttributeChoicesTranslationFragment = { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, plainText: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null } | null } }> };
|
export type AttributeChoicesTranslationFragment = { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null } | null } }> };
|
||||||
|
|
||||||
export type AttributeTranslationFragment = { __typename: 'AttributeTranslatableContent', id: string, name: string, translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null } | null };
|
export type AttributeTranslationFragment = { __typename: 'AttributeTranslatableContent', id: string, name: string, translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null } | null };
|
||||||
|
|
||||||
export type AttributeTranslationDetailsFragment = { __typename: 'AttributeTranslatableContent', translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, withChoices: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, plainText: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null } | null } }> } | null } | null };
|
export type AttributeTranslationDetailsFragment = { __typename: 'AttributeTranslatableContent', translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, withChoices: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null } | null } }> } | null } | null };
|
||||||
|
|
||||||
|
export type AttributeValueTranslatableContentFragment = { __typename: 'AttributeTranslatableContent', translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null } | null } }> } | null } | null };
|
||||||
|
|
||||||
export type MenuItemTranslationFragment = { __typename: 'MenuItemTranslatableContent', translation: { __typename: 'MenuItemTranslation', id: string, name: string, language: { __typename: 'LanguageDisplay', language: string } } | null, menuItem: { __typename: 'MenuItem', id: string, name: string } | null };
|
export type MenuItemTranslationFragment = { __typename: 'MenuItemTranslatableContent', translation: { __typename: 'MenuItemTranslation', id: string, name: string, language: { __typename: 'LanguageDisplay', language: string } } | null, menuItem: { __typename: 'MenuItem', id: string, name: string } | null };
|
||||||
|
|
||||||
|
@ -8836,7 +8836,7 @@ export type UpdatePageTranslationsMutationVariables = Exact<{
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type UpdatePageTranslationsMutation = { __typename: 'Mutation', pageTranslate: { __typename: 'PageTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, page: { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | null } | null };
|
export type UpdatePageTranslationsMutation = { __typename: 'Mutation', pageTranslate: { __typename: 'PageTranslate', errors: Array<{ __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }>, page: { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | null } | null };
|
||||||
|
|
||||||
export type UpdateVoucherTranslationsMutationVariables = Exact<{
|
export type UpdateVoucherTranslationsMutationVariables = Exact<{
|
||||||
id: Scalars['ID'];
|
id: Scalars['ID'];
|
||||||
|
@ -8923,7 +8923,7 @@ export type ProductTranslationsQueryVariables = Exact<{
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type ProductTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent', product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'ProductTranslation', id: string, seoTitle: string | null, seoDescription: string | null, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null };
|
export type ProductTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent', product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'ProductTranslation', id: string, seoTitle: string | null, seoDescription: string | null, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null };
|
||||||
|
|
||||||
export type PageTranslationsQueryVariables = Exact<{
|
export type PageTranslationsQueryVariables = Exact<{
|
||||||
language: LanguageCodeEnum;
|
language: LanguageCodeEnum;
|
||||||
|
@ -8934,7 +8934,7 @@ export type PageTranslationsQueryVariables = Exact<{
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type PageTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null };
|
export type PageTranslationsQuery = { __typename: 'Query', translations: { __typename: 'TranslatableItemConnection', edges: Array<{ __typename: 'TranslatableItemEdge', node: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null };
|
||||||
|
|
||||||
export type VoucherTranslationsQueryVariables = Exact<{
|
export type VoucherTranslationsQueryVariables = Exact<{
|
||||||
language: LanguageCodeEnum;
|
language: LanguageCodeEnum;
|
||||||
|
@ -8997,7 +8997,7 @@ export type ProductTranslationDetailsQueryVariables = Exact<{
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type ProductTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent', product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'ProductTranslation', id: string, seoTitle: string | null, seoDescription: string | null, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null };
|
export type ProductTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent', product: { __typename: 'Product', id: string, name: string, description: any | null, seoDescription: string | null, seoTitle: string | null } | null, translation: { __typename: 'ProductTranslation', id: string, seoTitle: string | null, seoDescription: string | null, name: string | null, description: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null };
|
||||||
|
|
||||||
export type ProductVariantListQueryVariables = Exact<{
|
export type ProductVariantListQueryVariables = Exact<{
|
||||||
id: Scalars['ID'];
|
id: Scalars['ID'];
|
||||||
|
@ -9012,7 +9012,7 @@ export type ProductVariantTranslationDetailsQueryVariables = Exact<{
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type ProductVariantTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent', name: string, productVariant: { __typename: 'ProductVariant', id: string } | null, translation: { __typename: 'ProductVariantTranslation', id: string, name: string, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null };
|
export type ProductVariantTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent', name: string, productVariant: { __typename: 'ProductVariant', id: string } | null, translation: { __typename: 'ProductVariantTranslation', id: string, name: string, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null };
|
||||||
|
|
||||||
export type CategoryTranslationDetailsQueryVariables = Exact<{
|
export type CategoryTranslationDetailsQueryVariables = Exact<{
|
||||||
id: Scalars['ID'];
|
id: Scalars['ID'];
|
||||||
|
@ -9036,7 +9036,7 @@ export type PageTranslationDetailsQueryVariables = Exact<{
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type PageTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, plainText: string | null, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, attribute: { __typename: 'AttributeTranslatableContent', id: string, name: string }, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null };
|
export type PageTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent' } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent', page: { __typename: 'Page', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string } | null, translation: { __typename: 'PageTranslation', id: string, content: any | null, seoDescription: string | null, seoTitle: string | null, title: string | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null, attributeValues: Array<{ __typename: 'AttributeValueTranslatableContent', id: string, name: string, richText: any | null, attributeValue: { __typename: 'AttributeValue', id: string } | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null, language: { __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string } } | null }> } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null };
|
||||||
|
|
||||||
export type SaleTranslationDetailsQueryVariables = Exact<{
|
export type SaleTranslationDetailsQueryVariables = Exact<{
|
||||||
id: Scalars['ID'];
|
id: Scalars['ID'];
|
||||||
|
@ -9064,7 +9064,7 @@ export type AttributeTranslationDetailsQueryVariables = Exact<{
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type AttributeTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent', translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, withChoices: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, plainText: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, plainText: string | null, richText: any | null } | null } }> } | null } | null } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null };
|
export type AttributeTranslationDetailsQuery = { __typename: 'Query', translation: { __typename: 'ProductTranslatableContent' } | { __typename: 'CollectionTranslatableContent' } | { __typename: 'CategoryTranslatableContent' } | { __typename: 'AttributeTranslatableContent', translation: { __typename: 'AttributeTranslation', id: string, name: string } | null, attribute: { __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, withChoices: boolean, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', id: string, name: string | null, richText: any | null, inputType: AttributeInputTypeEnum | null, translation: { __typename: 'AttributeValueTranslation', id: string, name: string, richText: any | null } | null } }> } | null } | null } | { __typename: 'AttributeValueTranslatableContent' } | { __typename: 'ProductVariantTranslatableContent' } | { __typename: 'PageTranslatableContent' } | { __typename: 'ShippingMethodTranslatableContent' } | { __typename: 'SaleTranslatableContent' } | { __typename: 'VoucherTranslatableContent' } | { __typename: 'MenuItemTranslatableContent' } | null };
|
||||||
|
|
||||||
export type ShippingMethodTranslationDetailsQueryVariables = Exact<{
|
export type ShippingMethodTranslationDetailsQueryVariables = Exact<{
|
||||||
id: Scalars['ID'];
|
id: Scalars['ID'];
|
||||||
|
|
|
@ -14,10 +14,7 @@ import {
|
||||||
IconButton,
|
IconButton,
|
||||||
makeStyles,
|
makeStyles,
|
||||||
} from "@saleor/macaw-ui";
|
} from "@saleor/macaw-ui";
|
||||||
import {
|
import { TranslationField } from "@saleor/translations/types";
|
||||||
TranslationField,
|
|
||||||
TranslationFieldType,
|
|
||||||
} from "@saleor/translations/types";
|
|
||||||
import { ListProps } from "@saleor/types";
|
import { ListProps } from "@saleor/types";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
@ -181,7 +178,7 @@ const TranslationFields: React.FC<TranslationFieldsProps> = props => {
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.content}>
|
<div className={classes.content}>
|
||||||
{field && field.value !== undefined ? (
|
{field && field.value !== undefined ? (
|
||||||
field.type === TranslationFieldType.SHORT ? (
|
field.type === "short" ? (
|
||||||
<TranslationFieldsShort
|
<TranslationFieldsShort
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
edit={false}
|
edit={false}
|
||||||
|
@ -190,7 +187,7 @@ const TranslationFields: React.FC<TranslationFieldsProps> = props => {
|
||||||
onDiscard={onDiscard}
|
onDiscard={onDiscard}
|
||||||
onSubmit={undefined}
|
onSubmit={undefined}
|
||||||
/>
|
/>
|
||||||
) : field.type === TranslationFieldType.LONG ? (
|
) : field.type === "long" ? (
|
||||||
<TranslationFieldsLong
|
<TranslationFieldsLong
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
edit={false}
|
edit={false}
|
||||||
|
@ -216,7 +213,7 @@ const TranslationFields: React.FC<TranslationFieldsProps> = props => {
|
||||||
</div>
|
</div>
|
||||||
<Typography className={classes.content}>
|
<Typography className={classes.content}>
|
||||||
{field && field.translation !== undefined ? (
|
{field && field.translation !== undefined ? (
|
||||||
field.type === TranslationFieldType.SHORT ? (
|
field.type === "short" ? (
|
||||||
<TranslationFieldsShort
|
<TranslationFieldsShort
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
edit={activeField === field.name}
|
edit={activeField === field.name}
|
||||||
|
@ -225,7 +222,7 @@ const TranslationFields: React.FC<TranslationFieldsProps> = props => {
|
||||||
onDiscard={onDiscard}
|
onDiscard={onDiscard}
|
||||||
onSubmit={data => onSubmit(field, data)}
|
onSubmit={data => onSubmit(field, data)}
|
||||||
/>
|
/>
|
||||||
) : field.type === TranslationFieldType.LONG ? (
|
) : field.type === "long" ? (
|
||||||
<TranslationFieldsLong
|
<TranslationFieldsLong
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
edit={activeField === field.name}
|
edit={activeField === field.name}
|
||||||
|
|
|
@ -15,7 +15,6 @@ import {
|
||||||
languageEntityUrl,
|
languageEntityUrl,
|
||||||
TranslatableEntities,
|
TranslatableEntities,
|
||||||
} from "@saleor/translations/urls";
|
} from "@saleor/translations/urls";
|
||||||
import { mapAttributeValuesToTranslationFields } from "@saleor/translations/utils";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
|
@ -85,7 +84,7 @@ const TranslationsPagesPage: React.FC<TranslationsPagesPageProps> = ({
|
||||||
}),
|
}),
|
||||||
name: PageTranslationInputFieldName.title,
|
name: PageTranslationInputFieldName.title,
|
||||||
translation: data?.translation?.title || null,
|
translation: data?.translation?.title || null,
|
||||||
type: "short",
|
type: "short" as "short",
|
||||||
value: data?.page?.title,
|
value: data?.page?.title,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -96,7 +95,7 @@ const TranslationsPagesPage: React.FC<TranslationsPagesPageProps> = ({
|
||||||
}),
|
}),
|
||||||
name: PageTranslationInputFieldName.content,
|
name: PageTranslationInputFieldName.content,
|
||||||
translation: data?.translation?.content || null,
|
translation: data?.translation?.content || null,
|
||||||
type: "rich",
|
type: "rich" as "rich",
|
||||||
value: data?.page?.content,
|
value: data?.page?.content,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
@ -124,7 +123,7 @@ const TranslationsPagesPage: React.FC<TranslationsPagesPageProps> = ({
|
||||||
}),
|
}),
|
||||||
name: PageTranslationInputFieldName.seoTitle,
|
name: PageTranslationInputFieldName.seoTitle,
|
||||||
translation: data?.translation?.seoTitle || null,
|
translation: data?.translation?.seoTitle || null,
|
||||||
type: "short",
|
type: "short" as "short",
|
||||||
value: data?.page?.seoTitle,
|
value: data?.page?.seoTitle,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -134,7 +133,7 @@ const TranslationsPagesPage: React.FC<TranslationsPagesPageProps> = ({
|
||||||
}),
|
}),
|
||||||
name: PageTranslationInputFieldName.seoDescription,
|
name: PageTranslationInputFieldName.seoDescription,
|
||||||
translation: data?.translation?.seoDescription || null,
|
translation: data?.translation?.seoDescription || null,
|
||||||
type: "long",
|
type: "long" as "long",
|
||||||
value: data?.page?.seoDescription,
|
value: data?.page?.seoDescription,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
@ -152,10 +151,25 @@ const TranslationsPagesPage: React.FC<TranslationsPagesPageProps> = ({
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
initialState={true}
|
initialState={true}
|
||||||
title={intl.formatMessage(commonMessages.translationAttributes)}
|
title={intl.formatMessage(commonMessages.translationAttributes)}
|
||||||
fields={mapAttributeValuesToTranslationFields(
|
fields={
|
||||||
data.attributeValues,
|
data.attributeValues.map((attrVal, i) => ({
|
||||||
intl,
|
id: attrVal.attributeValue.id,
|
||||||
)}
|
displayName: intl.formatMessage(
|
||||||
|
{
|
||||||
|
id: "PajjqE",
|
||||||
|
defaultMessage: "Attribute {number}",
|
||||||
|
description: "attribute list",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
number: i + 1,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
name: attrVal?.name,
|
||||||
|
translation: attrVal?.translation?.richText || null,
|
||||||
|
type: "rich" as "rich",
|
||||||
|
value: attrVal?.richText,
|
||||||
|
})) || []
|
||||||
|
}
|
||||||
saveButtonState={saveButtonState}
|
saveButtonState={saveButtonState}
|
||||||
richTextResetKey={languageCode}
|
richTextResetKey={languageCode}
|
||||||
onEdit={onEdit}
|
onEdit={onEdit}
|
||||||
|
|
|
@ -18,7 +18,6 @@ import {
|
||||||
productVariantUrl,
|
productVariantUrl,
|
||||||
TranslatableEntities,
|
TranslatableEntities,
|
||||||
} from "@saleor/translations/urls";
|
} from "@saleor/translations/urls";
|
||||||
import { mapAttributeValuesToTranslationFields } from "@saleor/translations/utils";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
|
@ -99,7 +98,7 @@ const TranslationsProductsPage: React.FC<TranslationsProductsPageProps> = ({
|
||||||
}),
|
}),
|
||||||
name: TranslationInputFieldName.name,
|
name: TranslationInputFieldName.name,
|
||||||
translation: data?.translation?.name || null,
|
translation: data?.translation?.name || null,
|
||||||
type: "short",
|
type: "short" as "short",
|
||||||
value: data?.name,
|
value: data?.name,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
@ -117,10 +116,25 @@ const TranslationsProductsPage: React.FC<TranslationsProductsPageProps> = ({
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
initialState={true}
|
initialState={true}
|
||||||
title={intl.formatMessage(commonMessages.translationAttributes)}
|
title={intl.formatMessage(commonMessages.translationAttributes)}
|
||||||
fields={mapAttributeValuesToTranslationFields(
|
fields={
|
||||||
data.attributeValues,
|
data.attributeValues.map((attrVal, i) => ({
|
||||||
intl,
|
id: attrVal.attributeValue.id,
|
||||||
)}
|
displayName: intl.formatMessage(
|
||||||
|
{
|
||||||
|
id: "PajjqE",
|
||||||
|
defaultMessage: "Attribute {number}",
|
||||||
|
description: "attribute list",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
number: i + 1,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
name: attrVal?.name,
|
||||||
|
translation: attrVal?.translation?.richText || null,
|
||||||
|
type: "rich" as "rich",
|
||||||
|
value: attrVal?.richText,
|
||||||
|
})) || []
|
||||||
|
}
|
||||||
saveButtonState={saveButtonState}
|
saveButtonState={saveButtonState}
|
||||||
richTextResetKey={languageCode}
|
richTextResetKey={languageCode}
|
||||||
onEdit={onEdit}
|
onEdit={onEdit}
|
||||||
|
|
|
@ -15,7 +15,6 @@ import {
|
||||||
languageEntityUrl,
|
languageEntityUrl,
|
||||||
TranslatableEntities,
|
TranslatableEntities,
|
||||||
} from "@saleor/translations/urls";
|
} from "@saleor/translations/urls";
|
||||||
import { mapAttributeValuesToTranslationFields } from "@saleor/translations/utils";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
|
@ -98,7 +97,7 @@ const TranslationsProductsPage: React.FC<TranslationsProductsPageProps> = ({
|
||||||
}),
|
}),
|
||||||
name: TranslationInputFieldName.name,
|
name: TranslationInputFieldName.name,
|
||||||
translation: data?.translation?.name || null,
|
translation: data?.translation?.name || null,
|
||||||
type: "short",
|
type: "short" as "short",
|
||||||
value: data?.product?.name,
|
value: data?.product?.name,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -108,7 +107,7 @@ const TranslationsProductsPage: React.FC<TranslationsProductsPageProps> = ({
|
||||||
}),
|
}),
|
||||||
name: TranslationInputFieldName.description,
|
name: TranslationInputFieldName.description,
|
||||||
translation: data?.translation?.description || null,
|
translation: data?.translation?.description || null,
|
||||||
type: "rich",
|
type: "rich" as "rich",
|
||||||
value: data?.product?.description,
|
value: data?.product?.description,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
@ -135,7 +134,7 @@ const TranslationsProductsPage: React.FC<TranslationsProductsPageProps> = ({
|
||||||
}),
|
}),
|
||||||
name: TranslationInputFieldName.seoTitle,
|
name: TranslationInputFieldName.seoTitle,
|
||||||
translation: data?.translation?.seoTitle || null,
|
translation: data?.translation?.seoTitle || null,
|
||||||
type: "short",
|
type: "short" as "short",
|
||||||
value: data?.product?.seoTitle,
|
value: data?.product?.seoTitle,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -145,7 +144,7 @@ const TranslationsProductsPage: React.FC<TranslationsProductsPageProps> = ({
|
||||||
}),
|
}),
|
||||||
name: TranslationInputFieldName.seoDescription,
|
name: TranslationInputFieldName.seoDescription,
|
||||||
translation: data?.translation?.seoDescription || null,
|
translation: data?.translation?.seoDescription || null,
|
||||||
type: "long",
|
type: "long" as "long",
|
||||||
value: data?.product?.seoDescription,
|
value: data?.product?.seoDescription,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
@ -163,10 +162,25 @@ const TranslationsProductsPage: React.FC<TranslationsProductsPageProps> = ({
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
initialState={true}
|
initialState={true}
|
||||||
title={intl.formatMessage(commonMessages.translationAttributes)}
|
title={intl.formatMessage(commonMessages.translationAttributes)}
|
||||||
fields={mapAttributeValuesToTranslationFields(
|
fields={
|
||||||
data.attributeValues,
|
data.attributeValues.map((attrVal, i) => ({
|
||||||
intl,
|
id: attrVal.attributeValue.id,
|
||||||
)}
|
displayName: intl.formatMessage(
|
||||||
|
{
|
||||||
|
id: "PajjqE",
|
||||||
|
defaultMessage: "Attribute {number}",
|
||||||
|
description: "attribute list",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
number: i + 1,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
name: attrVal?.name,
|
||||||
|
translation: attrVal?.translation?.richText || null,
|
||||||
|
type: "rich" as "rich",
|
||||||
|
value: attrVal?.richText,
|
||||||
|
})) || []
|
||||||
|
}
|
||||||
saveButtonState={saveButtonState}
|
saveButtonState={saveButtonState}
|
||||||
richTextResetKey={languageCode}
|
richTextResetKey={languageCode}
|
||||||
onEdit={onEdit}
|
onEdit={onEdit}
|
||||||
|
|
|
@ -19,20 +19,12 @@ export enum PageTranslationInputFieldName {
|
||||||
richText = "richText",
|
richText = "richText",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TranslationFieldType = {
|
|
||||||
SHORT: "short",
|
|
||||||
LONG: "long",
|
|
||||||
RICH: "rich",
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
export type TranslationFieldType = typeof TranslationFieldType[keyof typeof TranslationFieldType];
|
|
||||||
|
|
||||||
export interface TranslationField<T extends string = string> {
|
export interface TranslationField<T extends string = string> {
|
||||||
id?: string;
|
id?: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
name: T;
|
name: T;
|
||||||
translation: string;
|
translation: string;
|
||||||
type: TranslationFieldType;
|
type: "short" | "long" | "rich";
|
||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
import { OutputData } from "@editorjs/editorjs";
|
import { OutputData } from "@editorjs/editorjs";
|
||||||
import {
|
import { AttributeTranslationDetailsFragment } from "@saleor/graphql";
|
||||||
AttributeTranslationDetailsFragment,
|
import { TranslationField } from "@saleor/translations/types";
|
||||||
AttributeValueTranslatableFragment,
|
|
||||||
AttributeValueTranslationInput,
|
|
||||||
} from "@saleor/graphql";
|
|
||||||
import {
|
|
||||||
TranslationField,
|
|
||||||
TranslationFieldType,
|
|
||||||
} from "@saleor/translations/types";
|
|
||||||
import { mapEdgesToItems } from "@saleor/utils/maps";
|
import { mapEdgesToItems } from "@saleor/utils/maps";
|
||||||
import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc";
|
import { getParsedDataForJsonStringField } from "@saleor/utils/richText/misc";
|
||||||
import { IntlShape } from "react-intl";
|
import { IntlShape } from "react-intl";
|
||||||
|
@ -59,34 +52,3 @@ export const getTranslationFields = (
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
) || [];
|
) || [];
|
||||||
|
|
||||||
export const mapAttributeValuesToTranslationFields = (
|
|
||||||
attributeValues: AttributeValueTranslatableFragment[],
|
|
||||||
intl: IntlShape,
|
|
||||||
) =>
|
|
||||||
attributeValues.map<TranslationField>(attrVal => ({
|
|
||||||
id: attrVal.attributeValue.id,
|
|
||||||
displayName: intl.formatMessage(
|
|
||||||
{
|
|
||||||
id: "zgqPGF",
|
|
||||||
defaultMessage: "Attribute {name}",
|
|
||||||
description: "attribute list",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: attrVal.attribute.name,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
name: attrVal.name,
|
|
||||||
translation:
|
|
||||||
attrVal.translation?.richText || attrVal.translation?.plainText || null,
|
|
||||||
type: attrVal.richText ? "rich" : "short",
|
|
||||||
value: attrVal.richText || attrVal.plainText,
|
|
||||||
})) || [];
|
|
||||||
|
|
||||||
export const getAttributeValueTranslationsInputData = (
|
|
||||||
type: TranslationFieldType,
|
|
||||||
data: OutputData | string,
|
|
||||||
): AttributeValueTranslationInput =>
|
|
||||||
type === TranslationFieldType.RICH
|
|
||||||
? { richText: JSON.stringify(data) }
|
|
||||||
: { plainText: data as string };
|
|
||||||
|
|
|
@ -16,10 +16,7 @@ import { useIntl } from "react-intl";
|
||||||
|
|
||||||
import TranslationsPagesPage from "../components/TranslationsPagesPage";
|
import TranslationsPagesPage from "../components/TranslationsPagesPage";
|
||||||
import { PageTranslationInputFieldName, TranslationField } from "../types";
|
import { PageTranslationInputFieldName, TranslationField } from "../types";
|
||||||
import {
|
import { getParsedTranslationInputData } from "../utils";
|
||||||
getAttributeValueTranslationsInputData,
|
|
||||||
getParsedTranslationInputData,
|
|
||||||
} from "../utils";
|
|
||||||
|
|
||||||
export interface TranslationsPagesQueryParams {
|
export interface TranslationsPagesQueryParams {
|
||||||
activeField: string;
|
activeField: string;
|
||||||
|
@ -99,14 +96,14 @@ const TranslationsPages: React.FC<TranslationsPagesProps> = ({
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleAttributeValueSubmit = (
|
const handleAttributeValueSubmit = (
|
||||||
{ id, type }: TranslationField<PageTranslationInputFieldName>,
|
{ id }: TranslationField<PageTranslationInputFieldName>,
|
||||||
data: OutputData | string,
|
data: OutputData,
|
||||||
) =>
|
) =>
|
||||||
extractMutationErrors(
|
extractMutationErrors(
|
||||||
updateAttributeValueTranslations({
|
updateAttributeValueTranslations({
|
||||||
variables: {
|
variables: {
|
||||||
id,
|
id,
|
||||||
input: getAttributeValueTranslationsInputData(type, data),
|
input: { richText: JSON.stringify(data) },
|
||||||
language: languageCode,
|
language: languageCode,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -16,10 +16,7 @@ import { useIntl } from "react-intl";
|
||||||
import { extractMutationErrors, maybe } from "../../misc";
|
import { extractMutationErrors, maybe } from "../../misc";
|
||||||
import TranslationsProductVariantsPage from "../components/TranslationsProductVariantsPage";
|
import TranslationsProductVariantsPage from "../components/TranslationsProductVariantsPage";
|
||||||
import { TranslationField, TranslationInputFieldName } from "../types";
|
import { TranslationField, TranslationInputFieldName } from "../types";
|
||||||
import {
|
import { getParsedTranslationInputData } from "../utils";
|
||||||
getAttributeValueTranslationsInputData,
|
|
||||||
getParsedTranslationInputData,
|
|
||||||
} from "../utils";
|
|
||||||
|
|
||||||
export interface TranslationsProductVariantsQueryParams {
|
export interface TranslationsProductVariantsQueryParams {
|
||||||
activeField: string;
|
activeField: string;
|
||||||
|
@ -101,14 +98,14 @@ const TranslationsProductVariants: React.FC<TranslationsProductVariantsProps> =
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleAttributeValueSubmit = (
|
const handleAttributeValueSubmit = (
|
||||||
{ id, type }: TranslationField<TranslationInputFieldName>,
|
{ id }: TranslationField<TranslationInputFieldName>,
|
||||||
data: OutputData | string,
|
data: OutputData,
|
||||||
) =>
|
) =>
|
||||||
extractMutationErrors(
|
extractMutationErrors(
|
||||||
updateAttributeValueTranslations({
|
updateAttributeValueTranslations({
|
||||||
variables: {
|
variables: {
|
||||||
id,
|
id,
|
||||||
input: getAttributeValueTranslationsInputData(type, data),
|
input: { richText: JSON.stringify(data) },
|
||||||
language: languageCode,
|
language: languageCode,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -16,10 +16,7 @@ import { useIntl } from "react-intl";
|
||||||
import { extractMutationErrors, maybe } from "../../misc";
|
import { extractMutationErrors, maybe } from "../../misc";
|
||||||
import TranslationsProductsPage from "../components/TranslationsProductsPage";
|
import TranslationsProductsPage from "../components/TranslationsProductsPage";
|
||||||
import { TranslationField, TranslationInputFieldName } from "../types";
|
import { TranslationField, TranslationInputFieldName } from "../types";
|
||||||
import {
|
import { getParsedTranslationInputData } from "../utils";
|
||||||
getAttributeValueTranslationsInputData,
|
|
||||||
getParsedTranslationInputData,
|
|
||||||
} from "../utils";
|
|
||||||
|
|
||||||
export interface TranslationsProductsQueryParams {
|
export interface TranslationsProductsQueryParams {
|
||||||
activeField: string;
|
activeField: string;
|
||||||
|
@ -99,14 +96,14 @@ const TranslationsProducts: React.FC<TranslationsProductsProps> = ({
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleAttributeValueSubmit = (
|
const handleAttributeValueSubmit = (
|
||||||
{ id, type }: TranslationField<TranslationInputFieldName>,
|
{ id }: TranslationField<TranslationInputFieldName>,
|
||||||
data: OutputData | string,
|
data: OutputData,
|
||||||
) =>
|
) =>
|
||||||
extractMutationErrors(
|
extractMutationErrors(
|
||||||
updateAttributeValueTranslations({
|
updateAttributeValueTranslations({
|
||||||
variables: {
|
variables: {
|
||||||
id,
|
id,
|
||||||
input: getAttributeValueTranslationsInputData(type, data),
|
input: { richText: JSON.stringify(data) },
|
||||||
language: languageCode,
|
language: languageCode,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue