Merge branch 'master' of github.com:mirumee/saleor-dashboard into feature/unconfirmed-order-line-manipulation
This commit is contained in:
commit
b4a7c9f471
89 changed files with 3264 additions and 2285 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM node:10 as builder
|
FROM node:14 as builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
FROM node:10
|
FROM node:14
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
|
@ -18,7 +18,7 @@ These instructions will get you a copy of the project up and running on your loc
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- Node.js 10.0+
|
- Node.js v14+
|
||||||
- A running instance of [Saleor](https://github.com/mirumee/saleor/).
|
- A running instance of [Saleor](https://github.com/mirumee/saleor/).
|
||||||
|
|
||||||
### Installing
|
### Installing
|
||||||
|
|
|
@ -35,6 +35,7 @@ export function createDraftOrder(customerId, shippingMethodId, channelId) {
|
||||||
}
|
}
|
||||||
order{
|
order{
|
||||||
id
|
id
|
||||||
|
number
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
export const ORDERS_SELECTORS = {
|
export const ORDERS_SELECTORS = {
|
||||||
orders: "[data-test='submenu-item-label'][data-test-id='orders']",
|
orders: "[data-test='submenu-item-label'][data-test-id='orders']",
|
||||||
createOrder: "[data-test-id='create-order-button']",
|
createOrder: "[data-test-id='create-order-button']",
|
||||||
orderRow: "[data-test-id='order-table-row']"
|
orderRow: "[data-test-id='order-table-row']",
|
||||||
|
salesChannel: "[data-test-id='order-sales-channel']"
|
||||||
};
|
};
|
||||||
|
|
116
cypress/integration/orders/orders.js
Normal file
116
cypress/integration/orders/orders.js
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
// <reference types="cypress" />
|
||||||
|
import faker from "faker";
|
||||||
|
|
||||||
|
import {
|
||||||
|
createCustomer,
|
||||||
|
deleteCustomersStartsWith
|
||||||
|
} from "../../apiRequests/Customer";
|
||||||
|
import { ORDERS_SELECTORS } from "../../elements/orders/orders-selectors";
|
||||||
|
import { selectChannelInPicker } from "../../steps/channelsSteps";
|
||||||
|
import { finalizeDraftOrder } from "../../steps/draftOrderSteps";
|
||||||
|
import { urlList } from "../../url/urlList";
|
||||||
|
import { getDefaultChannel } from "../../utils/channelsUtils";
|
||||||
|
import { createOrder } from "../../utils/ordersUtils";
|
||||||
|
import * as productsUtils from "../../utils/productsUtils";
|
||||||
|
import {
|
||||||
|
createShipping,
|
||||||
|
deleteShippingStartsWith
|
||||||
|
} from "../../utils/shippingUtils";
|
||||||
|
|
||||||
|
describe("Orders", () => {
|
||||||
|
const startsWith = "Cy-";
|
||||||
|
const randomName = startsWith + faker.random.number();
|
||||||
|
|
||||||
|
let customer;
|
||||||
|
let defaultChannel;
|
||||||
|
let warehouse;
|
||||||
|
let shippingMethod;
|
||||||
|
let variantsList;
|
||||||
|
|
||||||
|
before(() => {
|
||||||
|
cy.clearSessionData().loginUserViaRequest();
|
||||||
|
deleteCustomersStartsWith(startsWith);
|
||||||
|
deleteShippingStartsWith(startsWith);
|
||||||
|
productsUtils.deleteProductsStartsWith(startsWith);
|
||||||
|
|
||||||
|
let address;
|
||||||
|
|
||||||
|
getDefaultChannel()
|
||||||
|
.then(channel => {
|
||||||
|
defaultChannel = channel;
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
cy.fixture("addresses");
|
||||||
|
})
|
||||||
|
.then(addresses => {
|
||||||
|
address = addresses.plAddress;
|
||||||
|
createCustomer(`${randomName}@example.com`, randomName, address, true);
|
||||||
|
})
|
||||||
|
.then(customerResp => {
|
||||||
|
customer = customerResp.body.data.customerCreate.user;
|
||||||
|
createShipping({
|
||||||
|
channelId: defaultChannel.id,
|
||||||
|
name: randomName,
|
||||||
|
address
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.then(
|
||||||
|
({ warehouse: warehouseResp, shippingMethod: shippingMethodResp }) => {
|
||||||
|
shippingMethod = shippingMethodResp;
|
||||||
|
warehouse = warehouseResp;
|
||||||
|
productsUtils.createTypeAttributeAndCategoryForProduct(randomName);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(
|
||||||
|
({
|
||||||
|
productType: productTypeResp,
|
||||||
|
attribute: attributeResp,
|
||||||
|
category: categoryResp
|
||||||
|
}) => {
|
||||||
|
productsUtils.createProductInChannel({
|
||||||
|
name: randomName,
|
||||||
|
channelId: defaultChannel.id,
|
||||||
|
warehouseId: warehouse.id,
|
||||||
|
productTypeId: productTypeResp.id,
|
||||||
|
attributeId: attributeResp.id,
|
||||||
|
categoryId: categoryResp.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(({ variants: variantsResp }) => {
|
||||||
|
variantsList = variantsResp;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.clearSessionData().loginUserViaRequest();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should create order with selected channel", () => {
|
||||||
|
cy.visit(urlList.orders)
|
||||||
|
.get(ORDERS_SELECTORS.createOrder)
|
||||||
|
.click();
|
||||||
|
selectChannelInPicker(defaultChannel.name);
|
||||||
|
finalizeDraftOrder(randomName).then(draftOrderNumber => {
|
||||||
|
cy.visit(urlList.orders);
|
||||||
|
cy.contains(ORDERS_SELECTORS.orderRow, draftOrderNumber).click();
|
||||||
|
cy.contains(ORDERS_SELECTORS.salesChannel, defaultChannel.name).should(
|
||||||
|
"be.visible"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
it("should not be possible to change channel in order", () => {
|
||||||
|
createOrder({
|
||||||
|
customerId: customer.id,
|
||||||
|
channelId: defaultChannel.id,
|
||||||
|
shippingMethodId: shippingMethod.id,
|
||||||
|
variantsList
|
||||||
|
}).then(order => {
|
||||||
|
cy.visit(urlList.orders);
|
||||||
|
cy.contains(ORDERS_SELECTORS.orderRow, order.number).click();
|
||||||
|
cy.get(ORDERS_SELECTORS.salesChannel)
|
||||||
|
.find("[button]")
|
||||||
|
.should("not.exist");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -27,13 +27,34 @@ export function createReadyToFulfillOrder(
|
||||||
return createDraftOrder(customerId, shippingMethodId, channelId)
|
return createDraftOrder(customerId, shippingMethodId, channelId)
|
||||||
.then(orderResp => {
|
.then(orderResp => {
|
||||||
order = orderResp;
|
order = orderResp;
|
||||||
variantsList.forEach(variantElement => {
|
assignVariantsToOrder(order, variantsList);
|
||||||
orderRequest.addProductToOrder(order.id, variantElement.id);
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.then(() => orderRequest.markOrderAsPaid(order.id))
|
.then(() => orderRequest.markOrderAsPaid(order.id))
|
||||||
.then(() => orderRequest.completeOrder(order.id));
|
.then(() => orderRequest.completeOrder(order.id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function createOrder({
|
||||||
|
customerId,
|
||||||
|
shippingMethodId,
|
||||||
|
channelId,
|
||||||
|
variantsList
|
||||||
|
}) {
|
||||||
|
let order;
|
||||||
|
return createDraftOrder(customerId, shippingMethodId, channelId)
|
||||||
|
.then(orderResp => {
|
||||||
|
order = orderResp;
|
||||||
|
assignVariantsToOrder(order, variantsList);
|
||||||
|
})
|
||||||
|
.then(() => orderRequest.completeOrder(order.id))
|
||||||
|
.then(() => order);
|
||||||
|
}
|
||||||
|
|
||||||
|
function assignVariantsToOrder(order, variantsList) {
|
||||||
|
variantsList.forEach(variantElement => {
|
||||||
|
orderRequest.addProductToOrder(order.id, variantElement.id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export function createDraftOrder(customerId, shippingMethodId, channelId) {
|
export function createDraftOrder(customerId, shippingMethodId, channelId) {
|
||||||
return orderRequest
|
return orderRequest
|
||||||
.createDraftOrder(customerId, shippingMethodId, channelId)
|
.createDraftOrder(customerId, shippingMethodId, channelId)
|
||||||
|
|
|
@ -5019,29 +5019,13 @@
|
||||||
"context": "informations about product prices etc, header",
|
"context": "informations about product prices etc, header",
|
||||||
"string": "Financial Information"
|
"string": "Financial Information"
|
||||||
},
|
},
|
||||||
"src_dot_products_dot_components_dot_ProductImageNavigation_dot_3060635772": {
|
"src_dot_products_dot_components_dot_ProductExternalMediaDialog_dot_4146081479": {
|
||||||
"context": "section header",
|
"context": "modal header",
|
||||||
"string": "All Photos"
|
"string": "Media from the URL you supply will be shown in the media gallery. You will be able to define the order of the gallery."
|
||||||
},
|
},
|
||||||
"src_dot_products_dot_components_dot_ProductImagePage_dot_1905082483": {
|
"src_dot_products_dot_components_dot_ProductExternalMediaDialog_dot_buttonMessage": {
|
||||||
"context": "field is optional",
|
"context": "modal button",
|
||||||
"string": "Optional"
|
"string": "Upload URL"
|
||||||
},
|
|
||||||
"src_dot_products_dot_components_dot_ProductImagePage_dot_2546267317": {
|
|
||||||
"context": "header",
|
|
||||||
"string": "Edit Photo"
|
|
||||||
},
|
|
||||||
"src_dot_products_dot_components_dot_ProductImagePage_dot_367472710": {
|
|
||||||
"context": "section header",
|
|
||||||
"string": "Photo View"
|
|
||||||
},
|
|
||||||
"src_dot_products_dot_components_dot_ProductImagePage_dot_3822382625": {
|
|
||||||
"context": "section header",
|
|
||||||
"string": "Photo Information"
|
|
||||||
},
|
|
||||||
"src_dot_products_dot_components_dot_ProductImages_dot_3240888698": {
|
|
||||||
"context": "section header",
|
|
||||||
"string": "Images"
|
|
||||||
},
|
},
|
||||||
"src_dot_products_dot_components_dot_ProductListPage_dot_1134347598": {
|
"src_dot_products_dot_components_dot_ProductListPage_dot_1134347598": {
|
||||||
"context": "product price",
|
"context": "product price",
|
||||||
|
@ -5120,6 +5104,42 @@
|
||||||
"context": "product",
|
"context": "product",
|
||||||
"string": "Name"
|
"string": "Name"
|
||||||
},
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductMediaNavigation_dot_allMedia": {
|
||||||
|
"context": "section header",
|
||||||
|
"string": "All Media"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductMediaPage_dot_editMedia": {
|
||||||
|
"context": "header",
|
||||||
|
"string": "Edit Media"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductMediaPage_dot_mediaInformation": {
|
||||||
|
"context": "section header",
|
||||||
|
"string": "Media Information"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductMediaPage_dot_mediaView": {
|
||||||
|
"context": "section header",
|
||||||
|
"string": "Media View"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductMediaPage_dot_optional": {
|
||||||
|
"context": "field is optional",
|
||||||
|
"string": "Optional"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductMediaPopper_dot_uploadImages": {
|
||||||
|
"context": "modal button images upload",
|
||||||
|
"string": "Upload Images"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductMediaPopper_dot_uploadUrl": {
|
||||||
|
"context": "modal button url upload",
|
||||||
|
"string": "Upload URL"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductMedia_dot_media": {
|
||||||
|
"context": "section header",
|
||||||
|
"string": "Media"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductMedia_dot_upload": {
|
||||||
|
"context": "modal button upload",
|
||||||
|
"string": "Upload"
|
||||||
|
},
|
||||||
"src_dot_products_dot_components_dot_ProductOrganization_dot_150865454": {
|
"src_dot_products_dot_components_dot_ProductOrganization_dot_150865454": {
|
||||||
"context": "product is not configurable",
|
"context": "product is not configurable",
|
||||||
"string": "Simple"
|
"string": "Simple"
|
||||||
|
@ -5323,20 +5343,21 @@
|
||||||
"context": "dialog header",
|
"context": "dialog header",
|
||||||
"string": "Delete Variant"
|
"string": "Delete Variant"
|
||||||
},
|
},
|
||||||
"src_dot_products_dot_components_dot_ProductVariantImageSelectDialog_dot_3196043669": {
|
"src_dot_products_dot_components_dot_ProductVariantImageSelectDialog_dot_2015102342": {
|
||||||
"context": "dialog header",
|
"context": "dialog header",
|
||||||
"string": "Image Selection"
|
"string": "Media Selection"
|
||||||
},
|
},
|
||||||
"src_dot_products_dot_components_dot_ProductVariantImages_dot_3240888698": {
|
"src_dot_products_dot_components_dot_ProductVariantMedia_dot_chooseMedia": {
|
||||||
"context": "section header",
|
|
||||||
"string": "Images"
|
|
||||||
},
|
|
||||||
"src_dot_products_dot_components_dot_ProductVariantImages_dot_3449133076": {
|
|
||||||
"string": "Select a specific variant image from product images"
|
|
||||||
},
|
|
||||||
"src_dot_products_dot_components_dot_ProductVariantImages_dot_989683980": {
|
|
||||||
"context": "button",
|
"context": "button",
|
||||||
"string": "Choose photos"
|
"string": "Choose media"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductVariantMedia_dot_media": {
|
||||||
|
"context": "section header",
|
||||||
|
"string": "Media"
|
||||||
|
},
|
||||||
|
"src_dot_products_dot_components_dot_ProductVariantMedia_dot_selectSpecificVariant": {
|
||||||
|
"context": "select variant media",
|
||||||
|
"string": "Select a specific variant media from product media"
|
||||||
},
|
},
|
||||||
"src_dot_products_dot_components_dot_ProductVariantNavigation_dot_1222345317": {
|
"src_dot_products_dot_components_dot_ProductVariantNavigation_dot_1222345317": {
|
||||||
"context": "default product variant indicator",
|
"context": "default product variant indicator",
|
||||||
|
@ -6725,6 +6746,9 @@
|
||||||
"src_dot_utils_dot_errors_dot_unknownError": {
|
"src_dot_utils_dot_errors_dot_unknownError": {
|
||||||
"string": "Unknown error"
|
"string": "Unknown error"
|
||||||
},
|
},
|
||||||
|
"src_dot_utils_dot_errors_dot_unsupportedMediaProvider": {
|
||||||
|
"string": "Unsupported media provider or incorrect URL"
|
||||||
|
},
|
||||||
"src_dot_utils_dot_errors_dot_urlNotSet": {
|
"src_dot_utils_dot_errors_dot_urlNotSet": {
|
||||||
"context": "error message",
|
"context": "error message",
|
||||||
"string": "URL not set for an invoice"
|
"string": "URL not set for an invoice"
|
||||||
|
|
777
package-lock.json
generated
777
package-lock.json
generated
|
@ -1625,7 +1625,8 @@
|
||||||
"@emotion/hash": {
|
"@emotion/hash": {
|
||||||
"version": "0.7.3",
|
"version": "0.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.7.3.tgz",
|
||||||
"integrity": "sha512-14ZVlsB9akwvydAdaEnVnvqu6J2P6ySv39hYyl/aoB6w/V+bXX0tay8cF6paqbgZsN2n5Xh15uF4pE+GvE+itw=="
|
"integrity": "sha512-14ZVlsB9akwvydAdaEnVnvqu6J2P6ySv39hYyl/aoB6w/V+bXX0tay8cF6paqbgZsN2n5Xh15uF4pE+GvE+itw==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"@emotion/is-prop-valid": {
|
"@emotion/is-prop-valid": {
|
||||||
"version": "0.8.5",
|
"version": "0.8.5",
|
||||||
|
@ -2076,95 +2077,203 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@material-ui/core": {
|
"@material-ui/core": {
|
||||||
"version": "4.6.0",
|
"version": "4.11.3",
|
||||||
"resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.11.3.tgz",
|
||||||
"integrity": "sha512-nzD0oO3R2dcX/+hmi5FUFSddMKySK76Ryuno3J/iOotbKvzXwbf9szzhL8KPNmsj+vizVNfkEfhzOuuCHRBKKQ==",
|
"integrity": "sha512-Adt40rGW6Uds+cAyk3pVgcErpzU/qxc7KBR94jFHBYretU4AtWZltYcNsbeMn9tXL86jjVL1kuGcIHsgLgFGRw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.4.4",
|
"@babel/runtime": "^7.4.4",
|
||||||
"@material-ui/styles": "^4.6.0",
|
"@material-ui/styles": "^4.11.3",
|
||||||
"@material-ui/system": "^4.5.2",
|
"@material-ui/system": "^4.11.3",
|
||||||
"@material-ui/types": "^4.1.1",
|
"@material-ui/types": "^5.1.0",
|
||||||
"@material-ui/utils": "^4.5.2",
|
"@material-ui/utils": "^4.11.2",
|
||||||
"@types/react-transition-group": "^4.2.0",
|
"@types/react-transition-group": "^4.2.0",
|
||||||
"clsx": "^1.0.2",
|
"clsx": "^1.0.4",
|
||||||
"convert-css-length": "^2.0.1",
|
"hoist-non-react-statics": "^3.3.2",
|
||||||
"hoist-non-react-statics": "^3.2.1",
|
"popper.js": "1.16.1-lts",
|
||||||
"normalize-scroll-left": "^0.2.0",
|
|
||||||
"popper.js": "^1.14.1",
|
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"react-transition-group": "^4.3.0"
|
"react-is": "^16.8.0 || ^17.0.0",
|
||||||
|
"react-transition-group": "^4.4.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"popper.js": {
|
||||||
|
"version": "1.16.1-lts",
|
||||||
|
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz",
|
||||||
|
"integrity": "sha512-Kjw8nKRl1m+VrSFCoVGPph93W/qrSO7ZkqPpTf7F4bk/sqcfWK019dWBUpE/fBOsOQY1dks/Bmcbfn1heM/IsA=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@material-ui/icons": {
|
"@material-ui/icons": {
|
||||||
"version": "4.5.1",
|
"version": "4.11.2",
|
||||||
"resolved": "https://registry.npmjs.org/@material-ui/icons/-/icons-4.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/@material-ui/icons/-/icons-4.11.2.tgz",
|
||||||
"integrity": "sha512-YZ/BgJbXX4a0gOuKWb30mBaHaoXRqPanlePam83JQPZ/y4kl+3aW0Wv9tlR70hB5EGAkEJGW5m4ktJwMgxQAeA==",
|
"integrity": "sha512-fQNsKX2TxBmqIGJCSi3tGTO/gZ+eJgWmMJkgDiOfyNaunNaxcklJQFaFogYcFl0qFuaEz1qaXYXboa/bUXVSOQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.4.4"
|
"@babel/runtime": "^7.4.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@material-ui/styles": {
|
"@material-ui/styles": {
|
||||||
"version": "4.6.0",
|
"version": "4.11.3",
|
||||||
"resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.3.tgz",
|
||||||
"integrity": "sha512-lqqh4UEMdIYcU1Yth4pQyMTah02uAkg3NOT3MirN9FUexdL8pNA6zCHigEgDSfwmvnXyxHhxTkphfy0DRfnt9w==",
|
"integrity": "sha512-HzVzCG+PpgUGMUYEJ2rTEmQYeonGh41BYfILNFb/1ueqma+p1meSdu4RX6NjxYBMhf7k+jgfHFTTz+L1SXL/Zg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.4.4",
|
"@babel/runtime": "^7.4.4",
|
||||||
"@emotion/hash": "^0.7.1",
|
"@emotion/hash": "^0.8.0",
|
||||||
"@material-ui/types": "^4.1.1",
|
"@material-ui/types": "^5.1.0",
|
||||||
"@material-ui/utils": "^4.5.2",
|
"@material-ui/utils": "^4.11.2",
|
||||||
"clsx": "^1.0.2",
|
"clsx": "^1.0.4",
|
||||||
"csstype": "^2.5.2",
|
"csstype": "^2.5.2",
|
||||||
"hoist-non-react-statics": "^3.2.1",
|
"hoist-non-react-statics": "^3.3.2",
|
||||||
"jss": "^10.0.0",
|
"jss": "^10.5.1",
|
||||||
"jss-plugin-camel-case": "^10.0.0",
|
"jss-plugin-camel-case": "^10.5.1",
|
||||||
"jss-plugin-default-unit": "^10.0.0",
|
"jss-plugin-default-unit": "^10.5.1",
|
||||||
"jss-plugin-global": "^10.0.0",
|
"jss-plugin-global": "^10.5.1",
|
||||||
"jss-plugin-nested": "^10.0.0",
|
"jss-plugin-nested": "^10.5.1",
|
||||||
"jss-plugin-props-sort": "^10.0.0",
|
"jss-plugin-props-sort": "^10.5.1",
|
||||||
"jss-plugin-rule-value-function": "^10.0.0",
|
"jss-plugin-rule-value-function": "^10.5.1",
|
||||||
"jss-plugin-vendor-prefixer": "^10.0.0",
|
"jss-plugin-vendor-prefixer": "^10.5.1",
|
||||||
"prop-types": "^15.7.2"
|
"prop-types": "^15.7.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@emotion/hash": {
|
||||||
|
"version": "0.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz",
|
||||||
|
"integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow=="
|
||||||
|
},
|
||||||
|
"css-vendor": {
|
||||||
|
"version": "2.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz",
|
||||||
|
"integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.8.3",
|
||||||
|
"is-in-browser": "^1.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": {
|
||||||
|
"version": "7.13.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz",
|
||||||
|
"integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==",
|
||||||
|
"requires": {
|
||||||
|
"regenerator-runtime": "^0.13.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"jss": {
|
"jss": {
|
||||||
"version": "10.0.0",
|
"version": "10.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/jss/-/jss-10.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/jss/-/jss-10.6.0.tgz",
|
||||||
"integrity": "sha512-TPpDFsiBjuERiL+dFDq8QCdiF9oDasPcNqCKLGCo/qED3fNYOQ8PX2lZhknyTiAt3tZrfOFbb0lbQ9lTjPZxsQ==",
|
"integrity": "sha512-n7SHdCozmxnzYGXBHe0NsO0eUf9TvsHVq2MXvi4JmTn3x5raynodDVE/9VQmBdWFyyj9HpHZ2B4xNZ7MMy7lkw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"csstype": "^2.6.5",
|
"csstype": "^3.0.2",
|
||||||
|
"indefinite-observable": "^2.0.1",
|
||||||
"is-in-browser": "^1.1.3",
|
"is-in-browser": "^1.1.3",
|
||||||
"tiny-warning": "^1.0.2"
|
"tiny-warning": "^1.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"csstype": {
|
||||||
|
"version": "3.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz",
|
||||||
|
"integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"jss-plugin-camel-case": {
|
||||||
|
"version": "10.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.6.0.tgz",
|
||||||
|
"integrity": "sha512-JdLpA3aI/npwj3nDMKk308pvnhoSzkW3PXlbgHAzfx0yHWnPPVUjPhXFtLJzgKZge8lsfkUxvYSQ3X2OYIFU6A==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.3.1",
|
||||||
|
"hyphenate-style-name": "^1.0.3",
|
||||||
|
"jss": "10.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jss-plugin-default-unit": {
|
||||||
|
"version": "10.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.6.0.tgz",
|
||||||
|
"integrity": "sha512-7y4cAScMHAxvslBK2JRK37ES9UT0YfTIXWgzUWD5euvR+JR3q+o8sQKzBw7GmkQRfZijrRJKNTiSt1PBsLI9/w==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.3.1",
|
||||||
|
"jss": "10.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jss-plugin-global": {
|
||||||
|
"version": "10.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.6.0.tgz",
|
||||||
|
"integrity": "sha512-I3w7ji/UXPi3VuWrTCbHG9rVCgB4yoBQLehGDTmsnDfXQb3r1l3WIdcO8JFp9m0YMmyy2CU7UOV6oPI7/Tmu+w==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.3.1",
|
||||||
|
"jss": "10.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jss-plugin-nested": {
|
||||||
|
"version": "10.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.6.0.tgz",
|
||||||
|
"integrity": "sha512-fOFQWgd98H89E6aJSNkEh2fAXquC9aZcAVjSw4q4RoQ9gU++emg18encR4AT4OOIFl4lQwt5nEyBBRn9V1Rk8g==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.3.1",
|
||||||
|
"jss": "10.6.0",
|
||||||
|
"tiny-warning": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jss-plugin-props-sort": {
|
||||||
|
"version": "10.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.6.0.tgz",
|
||||||
|
"integrity": "sha512-oMCe7hgho2FllNc60d9VAfdtMrZPo9n1Iu6RNa+3p9n0Bkvnv/XX5San8fTPujrTBScPqv9mOE0nWVvIaohNuw==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.3.1",
|
||||||
|
"jss": "10.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jss-plugin-rule-value-function": {
|
||||||
|
"version": "10.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.6.0.tgz",
|
||||||
|
"integrity": "sha512-TKFqhRTDHN1QrPTMYRlIQUOC2FFQb271+AbnetURKlGvRl/eWLswcgHQajwuxI464uZk91sPiTtdGi7r7XaWfA==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.3.1",
|
||||||
|
"jss": "10.6.0",
|
||||||
|
"tiny-warning": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jss-plugin-vendor-prefixer": {
|
||||||
|
"version": "10.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.6.0.tgz",
|
||||||
|
"integrity": "sha512-doJ7MouBXT1lypLLctCwb4nJ6lDYqrTfVS3LtXgox42Xz0gXusXIIDboeh6UwnSmox90QpVnub7au8ybrb0krQ==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.3.1",
|
||||||
|
"css-vendor": "^2.0.8",
|
||||||
|
"jss": "10.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"regenerator-runtime": {
|
||||||
|
"version": "0.13.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
|
||||||
|
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@material-ui/system": {
|
"@material-ui/system": {
|
||||||
"version": "4.5.2",
|
"version": "4.11.3",
|
||||||
"resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.11.3.tgz",
|
||||||
"integrity": "sha512-h9RWvdM9XKlHHqwiuhyvWdobptQkHli+m2jJFs7i1AI/hmGsIc4reDmS7fInhETgt/Txx7uiAIznfRNIIVHmQw==",
|
"integrity": "sha512-SY7otguNGol41Mu2Sg6KbBP1ZRFIbFLHGK81y4KYbsV2yIcaEPOmsCK6zwWlp+2yTV3J/VwT6oSBARtGIVdXPw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.4.4",
|
"@babel/runtime": "^7.4.4",
|
||||||
"@material-ui/utils": "^4.5.2",
|
"@material-ui/utils": "^4.11.2",
|
||||||
|
"csstype": "^2.5.2",
|
||||||
"prop-types": "^15.7.2"
|
"prop-types": "^15.7.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@material-ui/types": {
|
"@material-ui/types": {
|
||||||
"version": "4.1.1",
|
"version": "5.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@material-ui/types/-/types-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.0.tgz",
|
||||||
"integrity": "sha512-AN+GZNXytX9yxGi0JOfxHrRTbhFybjUJ05rnsBVjcB+16e466Z0Xe5IxawuOayVZgTBNDxmPKo5j4V6OnMtaSQ==",
|
"integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A=="
|
||||||
"requires": {
|
|
||||||
"@types/react": "*"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"@material-ui/utils": {
|
"@material-ui/utils": {
|
||||||
"version": "4.5.2",
|
"version": "4.11.2",
|
||||||
"resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.11.2.tgz",
|
||||||
"integrity": "sha512-zhbNfHd1gLa8At6RPDG7uMZubHxbY+LtM6IkSfeWi6Lo4Ax80l62YaN1QmUpO1IvGCkn/j62tQX3yObiQZrJsQ==",
|
"integrity": "sha512-Uul8w38u+PICe2Fg2pDKCaIG7kOyhowZ9vjiC1FsVwPABTW8vPPKfF6OvxRq3IiBaI1faOJmgdvMG7rMJARBhA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.4.4",
|
"@babel/runtime": "^7.4.4",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"react-is": "^16.8.6"
|
"react-is": "^16.8.0 || ^17.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@mrmlnc/readdir-enhanced": {
|
"@mrmlnc/readdir-enhanced": {
|
||||||
|
@ -3926,12 +4035,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/react-test-renderer": {
|
"@types/react-test-renderer": {
|
||||||
"version": "16.9.1",
|
"version": "16.9.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-16.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-16.9.5.tgz",
|
||||||
"integrity": "sha512-nCXQokZN1jp+QkoDNmDZwoWpKY8HDczqevIDO4Uv9/s9rbGPbSpy8Uaxa5ixHKkcm/Wt0Y9C3wCxZivh4Al+rQ==",
|
"integrity": "sha512-C4cN7C2uSSGOYelp2XfdtJb5TsCP+QiZ+0Bm4U3ZfUswN8oN9O/l86XO/OvBSFCmWY7w75fzsQvZ50eGkFN34A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/react": "*"
|
"@types/react": "^16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/react-textarea-autosize": {
|
"@types/react-textarea-autosize": {
|
||||||
|
@ -3944,9 +4053,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/react-transition-group": {
|
"@types/react-transition-group": {
|
||||||
"version": "4.2.3",
|
"version": "4.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.1.tgz",
|
||||||
"integrity": "sha512-Hk8jiuT7iLOHrcjKP/ZVSyCNXK73wJAUz60xm0mVhiRujrdiI++j4duLiL282VGxwAgxetHQFfqA29LgEeSkFA==",
|
"integrity": "sha512-vIo69qKKcYoJ8wKCJjwSgCTM+z3chw3g18dkrDfVX665tMH7tmbDxEAnPdey4gTlwZz5QuHGzd+hul0OVZDqqQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/react": "*"
|
"@types/react": "*"
|
||||||
}
|
}
|
||||||
|
@ -7068,7 +7177,6 @@
|
||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"file-uri-to-path": "1.0.0"
|
"file-uri-to-path": "1.0.0"
|
||||||
|
@ -8222,11 +8330,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
|
||||||
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
|
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
|
||||||
},
|
},
|
||||||
"convert-css-length": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/convert-css-length/-/convert-css-length-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-iGpbcvhLPRKUbBc0Quxx7w/bV14AC3ItuBEGMahA5WTYqB8lq9jH0kTXFheCBASsYnqeMFZhiTruNxr1N59Axg=="
|
|
||||||
},
|
|
||||||
"convert-source-map": {
|
"convert-source-map": {
|
||||||
"version": "1.7.0",
|
"version": "1.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
|
||||||
|
@ -9305,12 +9408,32 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dom-helpers": {
|
"dom-helpers": {
|
||||||
"version": "5.1.3",
|
"version": "5.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.0.tgz",
|
||||||
"integrity": "sha512-nZD1OtwfWGRBWlpANxacBEZrEuLa16o1nh7YopFWeoF68Zt8GGEmzHu6Xv4F3XaFIC+YXtTLrzgqKxFgLEe4jw==",
|
"integrity": "sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.6.3",
|
"@babel/runtime": "^7.8.7",
|
||||||
"csstype": "^2.6.7"
|
"csstype": "^3.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": {
|
||||||
|
"version": "7.13.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz",
|
||||||
|
"integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==",
|
||||||
|
"requires": {
|
||||||
|
"regenerator-runtime": "^0.13.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"csstype": {
|
||||||
|
"version": "3.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz",
|
||||||
|
"integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g=="
|
||||||
|
},
|
||||||
|
"regenerator-runtime": {
|
||||||
|
"version": "0.13.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
|
||||||
|
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dom-serializer": {
|
"dom-serializer": {
|
||||||
|
@ -11689,7 +11812,6 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"filename-regex": {
|
"filename-regex": {
|
||||||
|
@ -11997,9 +12119,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fsevents": {
|
"fsevents": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
|
||||||
"integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==",
|
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
@ -12149,484 +12271,13 @@
|
||||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||||
},
|
},
|
||||||
"fsevents": {
|
"fsevents": {
|
||||||
"version": "1.2.9",
|
"version": "1.2.13",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||||
"integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==",
|
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"nan": "^2.12.1",
|
"bindings": "^1.5.0",
|
||||||
"node-pre-gyp": "^0.12.0"
|
"nan": "^2.12.1"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"abbrev": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"ansi-regex": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"aproba": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"are-we-there-yet": {
|
|
||||||
"version": "1.1.5",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"delegates": "^1.0.0",
|
|
||||||
"readable-stream": "^2.0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"balanced-match": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"brace-expansion": {
|
|
||||||
"version": "1.1.11",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"balanced-match": "^1.0.0",
|
|
||||||
"concat-map": "0.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chownr": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"code-point-at": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"concat-map": {
|
|
||||||
"version": "0.0.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"console-control-strings": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"core-util-is": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"debug": {
|
|
||||||
"version": "4.1.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"ms": "^2.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"deep-extend": {
|
|
||||||
"version": "0.6.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"delegates": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"detect-libc": {
|
|
||||||
"version": "1.0.3",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"fs-minipass": {
|
|
||||||
"version": "1.2.5",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"minipass": "^2.2.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fs.realpath": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"gauge": {
|
|
||||||
"version": "2.7.4",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"aproba": "^1.0.3",
|
|
||||||
"console-control-strings": "^1.0.0",
|
|
||||||
"has-unicode": "^2.0.0",
|
|
||||||
"object-assign": "^4.1.0",
|
|
||||||
"signal-exit": "^3.0.0",
|
|
||||||
"string-width": "^1.0.1",
|
|
||||||
"strip-ansi": "^3.0.1",
|
|
||||||
"wide-align": "^1.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"glob": {
|
|
||||||
"version": "7.1.3",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"fs.realpath": "^1.0.0",
|
|
||||||
"inflight": "^1.0.4",
|
|
||||||
"inherits": "2",
|
|
||||||
"minimatch": "^3.0.4",
|
|
||||||
"once": "^1.3.0",
|
|
||||||
"path-is-absolute": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"has-unicode": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"iconv-lite": {
|
|
||||||
"version": "0.4.24",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"safer-buffer": ">= 2.1.2 < 3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ignore-walk": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"minimatch": "^3.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"inflight": {
|
|
||||||
"version": "1.0.6",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"once": "^1.3.0",
|
|
||||||
"wrappy": "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"inherits": {
|
|
||||||
"version": "2.0.3",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"ini": {
|
|
||||||
"version": "1.3.5",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"is-fullwidth-code-point": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"number-is-nan": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"isarray": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"minimatch": {
|
|
||||||
"version": "3.0.4",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"brace-expansion": "^1.1.7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"minimist": {
|
|
||||||
"version": "0.0.8",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"minipass": {
|
|
||||||
"version": "2.3.5",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"safe-buffer": "^5.1.2",
|
|
||||||
"yallist": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"minizlib": {
|
|
||||||
"version": "1.2.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"minipass": "^2.2.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mkdirp": {
|
|
||||||
"version": "0.5.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"minimist": "0.0.8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ms": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"needle": {
|
|
||||||
"version": "2.3.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"debug": "^4.1.0",
|
|
||||||
"iconv-lite": "^0.4.4",
|
|
||||||
"sax": "^1.2.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node-pre-gyp": {
|
|
||||||
"version": "0.12.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"detect-libc": "^1.0.2",
|
|
||||||
"mkdirp": "^0.5.1",
|
|
||||||
"needle": "^2.2.1",
|
|
||||||
"nopt": "^4.0.1",
|
|
||||||
"npm-packlist": "^1.1.6",
|
|
||||||
"npmlog": "^4.0.2",
|
|
||||||
"rc": "^1.2.7",
|
|
||||||
"rimraf": "^2.6.1",
|
|
||||||
"semver": "^5.3.0",
|
|
||||||
"tar": "^4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nopt": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"abbrev": "1",
|
|
||||||
"osenv": "^0.1.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"npm-bundled": {
|
|
||||||
"version": "1.0.6",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"npm-packlist": {
|
|
||||||
"version": "1.4.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"ignore-walk": "^3.0.1",
|
|
||||||
"npm-bundled": "^1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"npmlog": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"are-we-there-yet": "~1.1.2",
|
|
||||||
"console-control-strings": "~1.1.0",
|
|
||||||
"gauge": "~2.7.3",
|
|
||||||
"set-blocking": "~2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"number-is-nan": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"object-assign": {
|
|
||||||
"version": "4.1.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"once": {
|
|
||||||
"version": "1.4.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"wrappy": "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"os-homedir": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"os-tmpdir": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"osenv": {
|
|
||||||
"version": "0.1.5",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"os-homedir": "^1.0.0",
|
|
||||||
"os-tmpdir": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"path-is-absolute": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"process-nextick-args": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"rc": {
|
|
||||||
"version": "1.2.8",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"deep-extend": "^0.6.0",
|
|
||||||
"ini": "~1.3.0",
|
|
||||||
"minimist": "^1.2.0",
|
|
||||||
"strip-json-comments": "~2.0.1"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"minimist": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"readable-stream": {
|
|
||||||
"version": "2.3.6",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"core-util-is": "~1.0.0",
|
|
||||||
"inherits": "~2.0.3",
|
|
||||||
"isarray": "~1.0.0",
|
|
||||||
"process-nextick-args": "~2.0.0",
|
|
||||||
"safe-buffer": "~5.1.1",
|
|
||||||
"string_decoder": "~1.1.1",
|
|
||||||
"util-deprecate": "~1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rimraf": {
|
|
||||||
"version": "2.6.3",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"glob": "^7.1.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"safe-buffer": {
|
|
||||||
"version": "5.1.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"safer-buffer": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"sax": {
|
|
||||||
"version": "1.2.4",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"semver": {
|
|
||||||
"version": "5.7.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"set-blocking": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"signal-exit": {
|
|
||||||
"version": "3.0.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"string-width": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"code-point-at": "^1.0.0",
|
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
|
||||||
"strip-ansi": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"string_decoder": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"safe-buffer": "~5.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"strip-ansi": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"ansi-regex": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"strip-json-comments": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"tar": {
|
|
||||||
"version": "4.4.8",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"chownr": "^1.1.1",
|
|
||||||
"fs-minipass": "^1.2.5",
|
|
||||||
"minipass": "^2.3.4",
|
|
||||||
"minizlib": "^1.1.1",
|
|
||||||
"mkdirp": "^0.5.0",
|
|
||||||
"safe-buffer": "^5.1.2",
|
|
||||||
"yallist": "^3.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"util-deprecate": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"wide-align": {
|
|
||||||
"version": "1.1.3",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"string-width": "^1.0.2 || 2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"wrappy": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"yallist": {
|
|
||||||
"version": "3.0.3",
|
|
||||||
"bundled": true,
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"function-bind": {
|
"function-bind": {
|
||||||
|
@ -13878,6 +13529,14 @@
|
||||||
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
|
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"indefinite-observable": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/indefinite-observable/-/indefinite-observable-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-G8vgmork+6H9S8lUAg1gtXEj2JxIQTo0g2PbFiYOdjkziSI0F7UYBiVwhZRuixhBCNGczAls34+5HJPyZysvxQ==",
|
||||||
|
"requires": {
|
||||||
|
"symbol-observable": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"indent-string": {
|
"indent-string": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
|
||||||
|
@ -17183,9 +16842,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"nan": {
|
"nan": {
|
||||||
"version": "2.14.0",
|
"version": "2.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
|
||||||
"integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==",
|
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"nanomatch": {
|
"nanomatch": {
|
||||||
|
@ -17393,11 +17052,6 @@
|
||||||
"integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
|
"integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"normalize-scroll-left": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/normalize-scroll-left/-/normalize-scroll-left-0.2.0.tgz",
|
|
||||||
"integrity": "sha512-t5oCENZJl8TGusJKoCJm7+asaSsPuNmK6+iEjrZ5TyBj2f02brCRsd4c83hwtu+e5d4LCSBZ0uoDlMjBo+A8yA=="
|
|
||||||
},
|
|
||||||
"normalize-url": {
|
"normalize-url": {
|
||||||
"version": "1.9.1",
|
"version": "1.9.1",
|
||||||
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz",
|
||||||
|
@ -18199,7 +17853,8 @@
|
||||||
"popper.js": {
|
"popper.js": {
|
||||||
"version": "1.16.0",
|
"version": "1.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.0.tgz",
|
||||||
"integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw=="
|
"integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"portfinder": {
|
"portfinder": {
|
||||||
"version": "1.0.26",
|
"version": "1.0.26",
|
||||||
|
@ -19403,9 +19058,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-transition-group": {
|
"react-transition-group": {
|
||||||
"version": "4.3.0",
|
"version": "4.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz",
|
||||||
"integrity": "sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw==",
|
"integrity": "sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.5.5",
|
"@babel/runtime": "^7.5.5",
|
||||||
"dom-helpers": "^5.0.1",
|
"dom-helpers": "^5.0.1",
|
||||||
|
|
14
package.json
14
package.json
|
@ -11,10 +11,10 @@
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/mirumee/saleor-dashboard/issues"
|
"url": "https://github.com/mirumee/saleor-dashboard/issues"
|
||||||
},
|
},
|
||||||
"homepage": "http://getsaleor.com/",
|
"homepage": "https://saleor.io/",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.12.0",
|
"node": ">=14 <15",
|
||||||
"npm": ">=6.11.0"
|
"npm": ">=6.11.0 <7"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@editorjs/editorjs": "^2.19.1",
|
"@editorjs/editorjs": "^2.19.1",
|
||||||
|
@ -22,9 +22,9 @@
|
||||||
"@editorjs/image": "^2.6.0",
|
"@editorjs/image": "^2.6.0",
|
||||||
"@editorjs/list": "^1.6.1",
|
"@editorjs/list": "^1.6.1",
|
||||||
"@editorjs/quote": "^2.4.0",
|
"@editorjs/quote": "^2.4.0",
|
||||||
"@material-ui/core": "^4.5.1",
|
"@material-ui/core": "^4.11.3",
|
||||||
"@material-ui/icons": "^4.5.1",
|
"@material-ui/icons": "^4.11.2",
|
||||||
"@material-ui/styles": "^4.5.2",
|
"@material-ui/styles": "^4.11.3",
|
||||||
"@saleor/macaw-ui": "^0.1.1-9",
|
"@saleor/macaw-ui": "^0.1.1-9",
|
||||||
"@sentry/react": "^6.0.0",
|
"@sentry/react": "^6.0.0",
|
||||||
"@types/faker": "^5.1.6",
|
"@types/faker": "^5.1.6",
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
"@types/react-router-dom": "^4.3.4",
|
"@types/react-router-dom": "^4.3.4",
|
||||||
"@types/react-sortable-hoc": "^0.7.1",
|
"@types/react-sortable-hoc": "^0.7.1",
|
||||||
"@types/react-sortable-tree": "^0.3.6",
|
"@types/react-sortable-tree": "^0.3.6",
|
||||||
"@types/react-test-renderer": "^16.8.2",
|
"@types/react-test-renderer": "^16.9.5",
|
||||||
"@types/semver-compare": "^1.0.1",
|
"@types/semver-compare": "^1.0.1",
|
||||||
"@types/setup-polly-jest": "^0.5.0",
|
"@types/setup-polly-jest": "^0.5.0",
|
||||||
"@types/storybook__addon-storyshots": "^3.4.9",
|
"@types/storybook__addon-storyshots": "^3.4.9",
|
||||||
|
|
163
schema.graphql
163
schema.graphql
|
@ -2307,6 +2307,19 @@ type LanguageDisplay {
|
||||||
language: String!
|
language: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LimitInfo {
|
||||||
|
currentUsage: Limits!
|
||||||
|
allowedUsage: Limits!
|
||||||
|
}
|
||||||
|
|
||||||
|
type Limits {
|
||||||
|
channels: Int
|
||||||
|
orders: Int
|
||||||
|
productVariants: Int
|
||||||
|
staffUsers: Int
|
||||||
|
warehouses: Int
|
||||||
|
}
|
||||||
|
|
||||||
type Manifest {
|
type Manifest {
|
||||||
identifier: String!
|
identifier: String!
|
||||||
version: String!
|
version: String!
|
||||||
|
@ -2619,12 +2632,12 @@ type Mutation {
|
||||||
productUpdate(id: ID!, input: ProductInput!): ProductUpdate
|
productUpdate(id: ID!, input: ProductInput!): ProductUpdate
|
||||||
productTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): ProductTranslate
|
productTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): ProductTranslate
|
||||||
productChannelListingUpdate(id: ID!, input: ProductChannelListingUpdateInput!): ProductChannelListingUpdate
|
productChannelListingUpdate(id: ID!, input: ProductChannelListingUpdateInput!): ProductChannelListingUpdate
|
||||||
productImageCreate(input: ProductImageCreateInput!): ProductImageCreate
|
productMediaCreate(input: ProductMediaCreateInput!): ProductMediaCreate
|
||||||
productVariantReorder(moves: [ReorderInput]!, productId: ID!): ProductVariantReorder
|
productVariantReorder(moves: [ReorderInput]!, productId: ID!): ProductVariantReorder
|
||||||
productImageDelete(id: ID!): ProductImageDelete
|
productMediaDelete(id: ID!): ProductMediaDelete
|
||||||
productImageBulkDelete(ids: [ID]!): ProductImageBulkDelete
|
productMediaBulkDelete(ids: [ID]!): ProductMediaBulkDelete
|
||||||
productImageReorder(imagesIds: [ID]!, productId: ID!): ProductImageReorder
|
productMediaReorder(mediaIds: [ID]!, productId: ID!): ProductMediaReorder
|
||||||
productImageUpdate(id: ID!, input: ProductImageUpdateInput!): ProductImageUpdate
|
productMediaUpdate(id: ID!, input: ProductMediaUpdateInput!): ProductMediaUpdate
|
||||||
productTypeCreate(input: ProductTypeInput!): ProductTypeCreate
|
productTypeCreate(input: ProductTypeInput!): ProductTypeCreate
|
||||||
productTypeDelete(id: ID!): ProductTypeDelete
|
productTypeDelete(id: ID!): ProductTypeDelete
|
||||||
productTypeBulkDelete(ids: [ID]!): ProductTypeBulkDelete
|
productTypeBulkDelete(ids: [ID]!): ProductTypeBulkDelete
|
||||||
|
@ -2647,8 +2660,8 @@ type Mutation {
|
||||||
productVariantTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): ProductVariantTranslate
|
productVariantTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): ProductVariantTranslate
|
||||||
productVariantChannelListingUpdate(id: ID!, input: [ProductVariantChannelListingAddInput!]!): ProductVariantChannelListingUpdate
|
productVariantChannelListingUpdate(id: ID!, input: [ProductVariantChannelListingAddInput!]!): ProductVariantChannelListingUpdate
|
||||||
productVariantReorderAttributeValues(attributeId: ID!, moves: [ReorderInput]!, variantId: ID!): ProductVariantReorderAttributeValues
|
productVariantReorderAttributeValues(attributeId: ID!, moves: [ReorderInput]!, variantId: ID!): ProductVariantReorderAttributeValues
|
||||||
variantImageAssign(imageId: ID!, variantId: ID!): VariantImageAssign
|
variantMediaAssign(mediaId: ID!, variantId: ID!): VariantMediaAssign
|
||||||
variantImageUnassign(imageId: ID!, variantId: ID!): VariantImageUnassign
|
variantMediaUnassign(mediaId: ID!, variantId: ID!): VariantMediaUnassign
|
||||||
paymentCapture(amount: PositiveDecimal, paymentId: ID!): PaymentCapture
|
paymentCapture(amount: PositiveDecimal, paymentId: ID!): PaymentCapture
|
||||||
paymentRefund(amount: PositiveDecimal, paymentId: ID!): PaymentRefund
|
paymentRefund(amount: PositiveDecimal, paymentId: ID!): PaymentRefund
|
||||||
paymentVoid(paymentId: ID!): PaymentVoid
|
paymentVoid(paymentId: ID!): PaymentVoid
|
||||||
|
@ -3941,9 +3954,11 @@ type Product implements Node & ObjectWithMetadata {
|
||||||
taxType: TaxType
|
taxType: TaxType
|
||||||
attributes: [SelectedAttribute!]!
|
attributes: [SelectedAttribute!]!
|
||||||
channelListings: [ProductChannelListing!]
|
channelListings: [ProductChannelListing!]
|
||||||
imageById(id: ID): ProductImage
|
mediaById(id: ID): ProductMedia!
|
||||||
|
imageById(id: ID): ProductImage @deprecated(reason: "Will be removed in Saleor 4.0. Use the `mediaById` field instead.")
|
||||||
variants: [ProductVariant]
|
variants: [ProductVariant]
|
||||||
images: [ProductImage]
|
media: [ProductMedia]
|
||||||
|
images: [ProductImage] @deprecated(reason: "Will be removed in Saleor 4.0. Use the `media` field instead.")
|
||||||
collections: [Collection]
|
collections: [Collection]
|
||||||
translation(languageCode: LanguageCodeEnum!): ProductTranslation
|
translation(languageCode: LanguageCodeEnum!): ProductTranslation
|
||||||
availableForPurchase: Date
|
availableForPurchase: Date
|
||||||
|
@ -4039,10 +4054,10 @@ type ProductCreate {
|
||||||
}
|
}
|
||||||
|
|
||||||
input ProductCreateInput {
|
input ProductCreateInput {
|
||||||
attributes: [AttributeValueInput]
|
attributes: [AttributeValueInput!]
|
||||||
category: ID
|
category: ID
|
||||||
chargeTaxes: Boolean
|
chargeTaxes: Boolean
|
||||||
collections: [ID]
|
collections: [ID!]
|
||||||
description: JSONString
|
description: JSONString
|
||||||
name: String
|
name: String
|
||||||
slug: String
|
slug: String
|
||||||
|
@ -4084,6 +4099,7 @@ enum ProductErrorCode {
|
||||||
VARIANT_NO_DIGITAL_CONTENT
|
VARIANT_NO_DIGITAL_CONTENT
|
||||||
CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT
|
CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT
|
||||||
PRODUCT_NOT_ASSIGNED_TO_CHANNEL
|
PRODUCT_NOT_ASSIGNED_TO_CHANNEL
|
||||||
|
UNSUPPORTED_MEDIA_PROVIDER
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ProductFieldEnum {
|
enum ProductFieldEnum {
|
||||||
|
@ -4118,62 +4134,18 @@ input ProductFilterInput {
|
||||||
channel: String
|
channel: String
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProductImage implements Node {
|
type ProductImage {
|
||||||
id: ID!
|
id: ID!
|
||||||
|
alt: String
|
||||||
sortOrder: Int
|
sortOrder: Int
|
||||||
alt: String!
|
|
||||||
url(size: Int): String!
|
url(size: Int): String!
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProductImageBulkDelete {
|
|
||||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
|
||||||
count: Int!
|
|
||||||
productErrors: [ProductError!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProductImageCreate {
|
|
||||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
|
||||||
product: Product
|
|
||||||
image: ProductImage
|
|
||||||
productErrors: [ProductError!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
input ProductImageCreateInput {
|
|
||||||
alt: String
|
|
||||||
image: Upload!
|
|
||||||
product: ID!
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProductImageDelete {
|
|
||||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
|
||||||
product: Product
|
|
||||||
image: ProductImage
|
|
||||||
productErrors: [ProductError!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProductImageReorder {
|
|
||||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
|
||||||
product: Product
|
|
||||||
images: [ProductImage]
|
|
||||||
productErrors: [ProductError!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProductImageUpdate {
|
|
||||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
|
||||||
product: Product
|
|
||||||
image: ProductImage
|
|
||||||
productErrors: [ProductError!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
input ProductImageUpdateInput {
|
|
||||||
alt: String
|
|
||||||
}
|
|
||||||
|
|
||||||
input ProductInput {
|
input ProductInput {
|
||||||
attributes: [AttributeValueInput]
|
attributes: [AttributeValueInput!]
|
||||||
category: ID
|
category: ID
|
||||||
chargeTaxes: Boolean
|
chargeTaxes: Boolean
|
||||||
collections: [ID]
|
collections: [ID!]
|
||||||
description: JSONString
|
description: JSONString
|
||||||
name: String
|
name: String
|
||||||
slug: String
|
slug: String
|
||||||
|
@ -4183,6 +4155,65 @@ input ProductInput {
|
||||||
rating: Float
|
rating: Float
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ProductMedia implements Node {
|
||||||
|
id: ID!
|
||||||
|
sortOrder: Int
|
||||||
|
alt: String!
|
||||||
|
type: ProductMediaType!
|
||||||
|
oembedData: JSONString!
|
||||||
|
url(size: Int): String!
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductMediaBulkDelete {
|
||||||
|
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||||
|
count: Int!
|
||||||
|
productErrors: [ProductError!]!
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductMediaCreate {
|
||||||
|
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||||
|
product: Product
|
||||||
|
media: ProductMedia
|
||||||
|
productErrors: [ProductError!]!
|
||||||
|
}
|
||||||
|
|
||||||
|
input ProductMediaCreateInput {
|
||||||
|
alt: String
|
||||||
|
image: Upload
|
||||||
|
product: ID!
|
||||||
|
mediaUrl: String
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductMediaDelete {
|
||||||
|
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||||
|
product: Product
|
||||||
|
media: ProductMedia
|
||||||
|
productErrors: [ProductError!]!
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductMediaReorder {
|
||||||
|
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||||
|
product: Product
|
||||||
|
media: [ProductMedia!]
|
||||||
|
productErrors: [ProductError!]!
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ProductMediaType {
|
||||||
|
IMAGE
|
||||||
|
VIDEO
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductMediaUpdate {
|
||||||
|
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||||
|
product: Product
|
||||||
|
media: ProductMedia
|
||||||
|
productErrors: [ProductError!]!
|
||||||
|
}
|
||||||
|
|
||||||
|
input ProductMediaUpdateInput {
|
||||||
|
alt: String
|
||||||
|
}
|
||||||
|
|
||||||
input ProductOrder {
|
input ProductOrder {
|
||||||
direction: OrderDirection!
|
direction: OrderDirection!
|
||||||
channel: String
|
channel: String
|
||||||
|
@ -4370,7 +4401,8 @@ type ProductVariant implements Node & ObjectWithMetadata {
|
||||||
margin: Int
|
margin: Int
|
||||||
quantityOrdered: Int
|
quantityOrdered: Int
|
||||||
revenue(period: ReportingPeriod): TaxedMoney
|
revenue(period: ReportingPeriod): TaxedMoney
|
||||||
images: [ProductImage]
|
images: [ProductImage] @deprecated(reason: "Will be removed in Saleor 4.0. Use the `media` instead.")
|
||||||
|
media: [ProductMedia!]
|
||||||
translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation
|
translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation
|
||||||
digitalContent: DigitalContent
|
digitalContent: DigitalContent
|
||||||
stocks(address: AddressInput, countryCode: CountryCode): [Stock]
|
stocks(address: AddressInput, countryCode: CountryCode): [Stock]
|
||||||
|
@ -5049,6 +5081,7 @@ type Shop {
|
||||||
companyAddress: Address
|
companyAddress: Address
|
||||||
customerSetPasswordUrl: String
|
customerSetPasswordUrl: String
|
||||||
staffNotificationRecipients: [StaffNotificationRecipient]
|
staffNotificationRecipients: [StaffNotificationRecipient]
|
||||||
|
limits: LimitInfo!
|
||||||
version: String!
|
version: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5531,17 +5564,17 @@ enum VariantAttributeScope {
|
||||||
NOT_VARIANT_SELECTION
|
NOT_VARIANT_SELECTION
|
||||||
}
|
}
|
||||||
|
|
||||||
type VariantImageAssign {
|
type VariantMediaAssign {
|
||||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||||
productVariant: ProductVariant
|
productVariant: ProductVariant
|
||||||
image: ProductImage
|
media: ProductMedia
|
||||||
productErrors: [ProductError!]!
|
productErrors: [ProductError!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
type VariantImageUnassign {
|
type VariantMediaUnassign {
|
||||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||||
productVariant: ProductVariant
|
productVariant: ProductVariant
|
||||||
image: ProductImage
|
media: ProductMedia
|
||||||
productErrors: [ProductError!]!
|
productErrors: [ProductError!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5974,7 +6007,7 @@ enum WeightUnitsEnum {
|
||||||
|
|
||||||
scalar _Any
|
scalar _Any
|
||||||
|
|
||||||
union _Entity = Address | User | Group | App | ProductVariant | Product | ProductType | Collection | Category | ProductImage | PageType
|
union _Entity = Address | User | Group | App | ProductVariant | Product | ProductType | Collection | Category | ProductMedia | ProductImage | PageType
|
||||||
|
|
||||||
type _Service {
|
type _Service {
|
||||||
sdl: String
|
sdl: String
|
||||||
|
|
|
@ -47,7 +47,7 @@ const AppInstall: React.FC<RouteComponentProps> = props => {
|
||||||
return <AppInstallView params={params} {...props} />;
|
return <AppInstallView params={params} {...props} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface CustomAppDetailsProps extends RouteComponentProps<{ id: string }> {
|
interface CustomAppDetailsProps extends RouteComponentProps<{ id?: string }> {
|
||||||
token: string;
|
token: string;
|
||||||
onTokenClose: () => void;
|
onTokenClose: () => void;
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,11 @@ const CustomAppDetails: React.FC<CustomAppDetailsProps> = ({
|
||||||
}) => {
|
}) => {
|
||||||
const qs = parseQs(location.search.substr(1));
|
const qs = parseQs(location.search.substr(1));
|
||||||
const params: CustomAppUrlQueryParams = qs;
|
const params: CustomAppUrlQueryParams = qs;
|
||||||
|
const id = match.params.id;
|
||||||
|
|
||||||
|
if (!id) {
|
||||||
|
throw new Error("No ID provided");
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomAppDetailsView
|
<CustomAppDetailsView
|
||||||
|
|
|
@ -40,9 +40,12 @@ describe("User", () => {
|
||||||
it("will be logged in if has valid credentials", async done => {
|
it("will be logged in if has valid credentials", async done => {
|
||||||
const hook = renderAuthProvider(apolloClient);
|
const hook = renderAuthProvider(apolloClient);
|
||||||
|
|
||||||
await act(() =>
|
await act(async () => {
|
||||||
hook.current.login(adminCredentials.email, adminCredentials.password)
|
await hook.current.login(
|
||||||
|
adminCredentials.email,
|
||||||
|
adminCredentials.password
|
||||||
);
|
);
|
||||||
|
});
|
||||||
expect(hook.current.user.email).toBe(adminCredentials.email);
|
expect(hook.current.user.email).toBe(adminCredentials.email);
|
||||||
adminCredentials.token = getTokens().auth;
|
adminCredentials.token = getTokens().auth;
|
||||||
|
|
||||||
|
@ -52,9 +55,9 @@ describe("User", () => {
|
||||||
it("will not be logged in if doesn't have valid credentials", async done => {
|
it("will not be logged in if doesn't have valid credentials", async done => {
|
||||||
const hook = renderAuthProvider(apolloClient);
|
const hook = renderAuthProvider(apolloClient);
|
||||||
|
|
||||||
await act(() =>
|
await act(async () => {
|
||||||
hook.current.login(adminCredentials.email, "NotAValidPassword123!")
|
await hook.current.login(adminCredentials.email, "NotAValidPassword123!");
|
||||||
);
|
});
|
||||||
expect(hook.current.user).toBe(null);
|
expect(hook.current.user).toBe(null);
|
||||||
|
|
||||||
done();
|
done();
|
||||||
|
@ -63,12 +66,12 @@ describe("User", () => {
|
||||||
it("will not be logged in if is non-staff", async done => {
|
it("will not be logged in if is non-staff", async done => {
|
||||||
const hook = renderAuthProvider(apolloClient);
|
const hook = renderAuthProvider(apolloClient);
|
||||||
|
|
||||||
await act(() =>
|
await act(async () => {
|
||||||
hook.current.login(
|
await hook.current.login(
|
||||||
nonStaffUserCredentials.email,
|
nonStaffUserCredentials.email,
|
||||||
nonStaffUserCredentials.password
|
nonStaffUserCredentials.password
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
});
|
||||||
expect(hook.current.user).toBe(undefined);
|
expect(hook.current.user).toBe(undefined);
|
||||||
|
|
||||||
done();
|
done();
|
||||||
|
|
|
@ -5,8 +5,8 @@ import makeStyles from "@material-ui/core/styles/makeStyles";
|
||||||
import TextField from "@material-ui/core/TextField";
|
import TextField from "@material-ui/core/TextField";
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Hr from "@saleor/components/Hr";
|
import Hr from "@saleor/components/Hr";
|
||||||
import ImageTile from "@saleor/components/ImageTile";
|
|
||||||
import ImageUpload from "@saleor/components/ImageUpload";
|
import ImageUpload from "@saleor/components/ImageUpload";
|
||||||
|
import MediaTile from "@saleor/components/MediaTile";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { commonMessages } from "@saleor/intl";
|
import { commonMessages } from "@saleor/intl";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
@ -97,7 +97,7 @@ const CategoryBackground: React.FC<CategoryBackgroundProps> = props => {
|
||||||
<ImageUpload onImageUpload={files => onImageUpload(files[0])} />
|
<ImageUpload onImageUpload={files => onImageUpload(files[0])} />
|
||||||
) : (
|
) : (
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<ImageTile image={image} onImageDelete={onImageDelete} />
|
<MediaTile media={image} onDelete={onImageDelete} />
|
||||||
</CardContent>
|
</CardContent>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,7 @@ export const category: (
|
||||||
backgroundImage: {
|
backgroundImage: {
|
||||||
__typename: "Image",
|
__typename: "Image",
|
||||||
alt: "Alt text",
|
alt: "Alt text",
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
children: {
|
children: {
|
||||||
|
@ -211,7 +212,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -265,7 +270,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -319,7 +328,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -373,7 +386,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -427,7 +444,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -481,7 +502,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -535,7 +560,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -589,7 +618,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -643,7 +676,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -697,7 +734,11 @@ export const category: (
|
||||||
id: "UHJvZHVjdFR5cGU6Mw==",
|
id: "UHJvZHVjdFR5cGU6Mw==",
|
||||||
name: "Coffee"
|
name: "Coffee"
|
||||||
},
|
},
|
||||||
thumbnail: { __typename: "Image", url: placeholderImage }
|
thumbnail: {
|
||||||
|
__typename: "Image",
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -5,8 +5,8 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||||
import TextField from "@material-ui/core/TextField";
|
import TextField from "@material-ui/core/TextField";
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Hr from "@saleor/components/Hr";
|
import Hr from "@saleor/components/Hr";
|
||||||
import ImageTile from "@saleor/components/ImageTile";
|
|
||||||
import ImageUpload from "@saleor/components/ImageUpload";
|
import ImageUpload from "@saleor/components/ImageUpload";
|
||||||
|
import MediaTile from "@saleor/components/MediaTile";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { commonMessages } from "@saleor/intl";
|
import { commonMessages } from "@saleor/intl";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
@ -109,7 +109,7 @@ export const CollectionImage: React.FC<CollectionImageProps> = props => {
|
||||||
<ImageUpload onImageUpload={files => onImageUpload(files[0])} />
|
<ImageUpload onImageUpload={files => onImageUpload(files[0])} />
|
||||||
) : (
|
) : (
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<ImageTile image={image} onImageDelete={onImageDelete} />
|
<MediaTile media={image} onDelete={onImageDelete} />
|
||||||
</CardContent>
|
</CardContent>
|
||||||
)}
|
)}
|
||||||
{image && (
|
{image && (
|
||||||
|
|
|
@ -143,6 +143,7 @@ export const collection: (
|
||||||
backgroundImage: {
|
backgroundImage: {
|
||||||
__typename: "Image",
|
__typename: "Image",
|
||||||
alt: "Alt text",
|
alt: "Alt text",
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderCollectionImage
|
url: placeholderCollectionImage
|
||||||
},
|
},
|
||||||
channelListings: [
|
channelListings: [
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import renderer from "react-test-renderer";
|
import renderer, { ReactTestRendererJSON } from "react-test-renderer";
|
||||||
|
|
||||||
import { TimezoneProvider } from "../Timezone";
|
import { TimezoneProvider } from "../Timezone";
|
||||||
import Date from "./Date";
|
import Date from "./Date";
|
||||||
|
@ -31,7 +31,9 @@ test("Render humanized date with timezone GMT-11", () => {
|
||||||
<Date date={testDate} />
|
<Date date={testDate} />
|
||||||
</TimezoneProvider>
|
</TimezoneProvider>
|
||||||
);
|
);
|
||||||
expect(date.toJSON().props.dateTime).toEqual(testDate);
|
expect((date.toJSON() as ReactTestRendererJSON).props.dateTime).toEqual(
|
||||||
|
testDate
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Render humanized date with timezone GMT+13", () => {
|
test("Render humanized date with timezone GMT+13", () => {
|
||||||
|
@ -40,5 +42,7 @@ test("Render humanized date with timezone GMT+13", () => {
|
||||||
<Date date={testDate} />
|
<Date date={testDate} />
|
||||||
</TimezoneProvider>
|
</TimezoneProvider>
|
||||||
);
|
);
|
||||||
expect(date.toJSON().props.dateTime).toEqual(testDate);
|
expect((date.toJSON() as ReactTestRendererJSON).props.dateTime).toEqual(
|
||||||
|
testDate
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
export { default } from "./ImageTile";
|
|
||||||
export * from "./ImageTile";
|
|
|
@ -8,15 +8,15 @@ import React from "react";
|
||||||
|
|
||||||
const useStyles = makeStyles(
|
const useStyles = makeStyles(
|
||||||
theme => ({
|
theme => ({
|
||||||
image: {
|
media: {
|
||||||
height: "100%",
|
height: "100%",
|
||||||
objectFit: "contain",
|
objectFit: "contain",
|
||||||
userSelect: "none",
|
userSelect: "none",
|
||||||
width: "100%"
|
width: "100%"
|
||||||
},
|
},
|
||||||
imageContainer: {
|
mediaContainer: {
|
||||||
"&:hover, &.dragged": {
|
"&:hover, &.dragged": {
|
||||||
"& $imageOverlay": {
|
"& $mediaOverlay": {
|
||||||
display: "block"
|
display: "block"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -29,7 +29,7 @@ const useStyles = makeStyles(
|
||||||
position: "relative",
|
position: "relative",
|
||||||
width: 148
|
width: 148
|
||||||
},
|
},
|
||||||
imageOverlay: {
|
mediaOverlay: {
|
||||||
background: "rgba(0, 0, 0, 0.6)",
|
background: "rgba(0, 0, 0, 0.6)",
|
||||||
cursor: "move",
|
cursor: "move",
|
||||||
display: "none",
|
display: "none",
|
||||||
|
@ -39,63 +39,68 @@ const useStyles = makeStyles(
|
||||||
top: 0,
|
top: 0,
|
||||||
width: 148
|
width: 148
|
||||||
},
|
},
|
||||||
imageOverlayShow: {
|
mediaOverlayShadow: {
|
||||||
"&$imageOverlay": {
|
"&mediaOverlay": {
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "center"
|
justifyContent: "center"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
imageOverlayToolbar: {
|
mediaOverlayToolbar: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "flex-end"
|
justifyContent: "flex-end"
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
{ name: "ImageTile" }
|
{ name: "MediaTile" }
|
||||||
);
|
);
|
||||||
|
|
||||||
interface ImageTileProps {
|
interface MediaTileProps {
|
||||||
image: {
|
media: {
|
||||||
alt?: string;
|
alt: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type?: string;
|
||||||
|
oembedData?: string;
|
||||||
};
|
};
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
onImageDelete?: () => void;
|
onDelete?: () => void;
|
||||||
onImageEdit?: (event: React.ChangeEvent<any>) => void;
|
onEdit?: (event: React.ChangeEvent<any>) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ImageTile: React.FC<ImageTileProps> = props => {
|
const MediaTile: React.FC<MediaTileProps> = props => {
|
||||||
const { loading, onImageDelete, onImageEdit, image } = props;
|
const { loading, onDelete, onEdit, media } = props;
|
||||||
|
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
const parsedMediaOembedData = media?.oembedData
|
||||||
|
? JSON.parse(media.oembedData)
|
||||||
|
: null;
|
||||||
|
const mediaUrl = parsedMediaOembedData?.thumbnail_url || media.url;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.imageContainer} data-test="product-image">
|
<div className={classes.mediaContainer} data-test="product-image">
|
||||||
<div
|
<div
|
||||||
className={classNames(classes.imageOverlay, {
|
className={classNames(classes.mediaOverlay, {
|
||||||
[classes.imageOverlayShow]: loading
|
[classes.mediaOverlayShadow]: loading
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<CircularProgress size={32} />
|
<CircularProgress size={32} />
|
||||||
) : (
|
) : (
|
||||||
<div className={classes.imageOverlayToolbar}>
|
<div className={classes.mediaOverlayToolbar}>
|
||||||
{onImageEdit && (
|
{onEdit && (
|
||||||
<IconButton color="primary" onClick={onImageEdit}>
|
<IconButton color="primary" onClick={onEdit}>
|
||||||
<EditIcon />
|
<EditIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
)}
|
||||||
{onImageDelete && (
|
{onDelete && (
|
||||||
<IconButton color="primary" onClick={onImageDelete}>
|
<IconButton color="primary" onClick={onDelete}>
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<img className={classes.image} src={image.url} alt={image.alt} />
|
<img className={classes.media} src={mediaUrl} alt={media.alt} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
ImageTile.displayName = "ImageTile";
|
MediaTile.displayName = "MediaTile";
|
||||||
export default ImageTile;
|
export default MediaTile;
|
2
src/components/MediaTile/index.ts
Normal file
2
src/components/MediaTile/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export { default } from "./MediaTile";
|
||||||
|
export * from "./MediaTile";
|
|
@ -249,4 +249,5 @@ const SingleAutocompleteSelectField: React.FC<SingleAutocompleteSelectFieldProps
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SingleAutocompleteSelectField;
|
export default SingleAutocompleteSelectField;
|
||||||
|
|
|
@ -40,12 +40,14 @@ export const priceRangeFragment = gql`
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const fragmentProductImage = gql`
|
export const fragmentProductMedia = gql`
|
||||||
fragment ProductImageFragment on ProductImage {
|
fragment ProductMediaFragment on ProductMedia {
|
||||||
id
|
id
|
||||||
alt
|
alt
|
||||||
sortOrder
|
sortOrder
|
||||||
url
|
url
|
||||||
|
type
|
||||||
|
oembedData
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -159,7 +161,7 @@ export const productVariantAttributesFragment = gql`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const productFragmentDetails = gql`
|
export const productFragmentDetails = gql`
|
||||||
${fragmentProductImage}
|
${fragmentProductMedia}
|
||||||
${productVariantAttributesFragment}
|
${productVariantAttributesFragment}
|
||||||
${stockFragment}
|
${stockFragment}
|
||||||
${weightFragment}
|
${weightFragment}
|
||||||
|
@ -191,8 +193,8 @@ export const productFragmentDetails = gql`
|
||||||
channelListings {
|
channelListings {
|
||||||
...ChannelListingProductFragment
|
...ChannelListingProductFragment
|
||||||
}
|
}
|
||||||
images {
|
media {
|
||||||
...ProductImageFragment
|
...ProductMediaFragment
|
||||||
}
|
}
|
||||||
isAvailable
|
isAvailable
|
||||||
variants {
|
variants {
|
||||||
|
@ -256,7 +258,7 @@ export const selectedVariantAttributeFragment = gql`
|
||||||
export const fragmentVariant = gql`
|
export const fragmentVariant = gql`
|
||||||
${selectedVariantAttributeFragment}
|
${selectedVariantAttributeFragment}
|
||||||
${priceRangeFragment}
|
${priceRangeFragment}
|
||||||
${fragmentProductImage}
|
${fragmentProductMedia}
|
||||||
${stockFragment}
|
${stockFragment}
|
||||||
${weightFragment}
|
${weightFragment}
|
||||||
${metadataFragment}
|
${metadataFragment}
|
||||||
|
@ -272,9 +274,11 @@ export const fragmentVariant = gql`
|
||||||
) {
|
) {
|
||||||
...SelectedVariantAttributeFragment
|
...SelectedVariantAttributeFragment
|
||||||
}
|
}
|
||||||
images {
|
media {
|
||||||
id
|
id
|
||||||
url
|
url
|
||||||
|
type
|
||||||
|
oembedData
|
||||||
}
|
}
|
||||||
name
|
name
|
||||||
product {
|
product {
|
||||||
|
@ -282,8 +286,8 @@ export const fragmentVariant = gql`
|
||||||
defaultVariant {
|
defaultVariant {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
images {
|
media {
|
||||||
...ProductImageFragment
|
...ProductMediaFragment
|
||||||
}
|
}
|
||||||
name
|
name
|
||||||
thumbnail {
|
thumbnail {
|
||||||
|
@ -305,9 +309,11 @@ export const fragmentVariant = gql`
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
sku
|
sku
|
||||||
images {
|
media {
|
||||||
id
|
id
|
||||||
url
|
url
|
||||||
|
type
|
||||||
|
oembedData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defaultVariant {
|
defaultVariant {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL fragment: Product
|
// GraphQL fragment: Product
|
||||||
|
@ -172,12 +172,14 @@ export interface Product_collections {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Product_images {
|
export interface Product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Product_variants_stocks_warehouse {
|
export interface Product_variants_stocks_warehouse {
|
||||||
|
@ -261,7 +263,7 @@ export interface Product {
|
||||||
category: Product_category | null;
|
category: Product_category | null;
|
||||||
collections: (Product_collections | null)[] | null;
|
collections: (Product_collections | null)[] | null;
|
||||||
chargeTaxes: boolean;
|
chargeTaxes: boolean;
|
||||||
images: (Product_images | null)[] | null;
|
media: (Product_media | null)[] | null;
|
||||||
isAvailable: boolean | null;
|
isAvailable: boolean | null;
|
||||||
variants: (Product_variants | null)[] | null;
|
variants: (Product_variants | null)[] | null;
|
||||||
weight: Product_weight | null;
|
weight: Product_weight | null;
|
||||||
|
|
|
@ -2,14 +2,18 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
|
import { ProductMediaType } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL fragment: ProductImageFragment
|
// GraphQL fragment: ProductMediaFragment
|
||||||
// ====================================================
|
// ====================================================
|
||||||
|
|
||||||
export interface ProductImageFragment {
|
export interface ProductMediaFragment {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL fragment: ProductVariant
|
// GraphQL fragment: ProductVariant
|
||||||
|
@ -114,10 +114,12 @@ export interface ProductVariant_nonSelectionAttributes {
|
||||||
values: (ProductVariant_nonSelectionAttributes_values | null)[];
|
values: (ProductVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariant_images {
|
export interface ProductVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariant_product_defaultVariant {
|
export interface ProductVariant_product_defaultVariant {
|
||||||
|
@ -125,12 +127,14 @@ export interface ProductVariant_product_defaultVariant {
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariant_product_images {
|
export interface ProductVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariant_product_thumbnail {
|
export interface ProductVariant_product_thumbnail {
|
||||||
|
@ -184,10 +188,12 @@ export interface ProductVariant_product_channelListings {
|
||||||
pricing: ProductVariant_product_channelListings_pricing | null;
|
pricing: ProductVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariant_product_variants_images {
|
export interface ProductVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariant_product_variants {
|
export interface ProductVariant_product_variants {
|
||||||
|
@ -195,14 +201,14 @@ export interface ProductVariant_product_variants {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (ProductVariant_product_variants_images | null)[] | null;
|
media: ProductVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariant_product {
|
export interface ProductVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: ProductVariant_product_defaultVariant | null;
|
defaultVariant: ProductVariant_product_defaultVariant | null;
|
||||||
images: (ProductVariant_product_images | null)[] | null;
|
media: (ProductVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: ProductVariant_product_thumbnail | null;
|
thumbnail: ProductVariant_product_thumbnail | null;
|
||||||
channelListings: ProductVariant_product_channelListings[] | null;
|
channelListings: ProductVariant_product_channelListings[] | null;
|
||||||
|
@ -262,7 +268,7 @@ export interface ProductVariant {
|
||||||
privateMetadata: (ProductVariant_privateMetadata | null)[];
|
privateMetadata: (ProductVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: ProductVariant_selectionAttributes[];
|
selectionAttributes: ProductVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: ProductVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: ProductVariant_nonSelectionAttributes[];
|
||||||
images: (ProductVariant_images | null)[] | null;
|
media: ProductVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: ProductVariant_product;
|
product: ProductVariant_product;
|
||||||
channelListings: ProductVariant_channelListings[] | null;
|
channelListings: ProductVariant_channelListings[] | null;
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const OrderChannelSectionCard: React.FC<OrderChannelSectionCardProps> = (
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card data-test-id="order-sales-channel">
|
||||||
<CardTitle
|
<CardTitle
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage({
|
||||||
defaultMessage: "Sales channel",
|
defaultMessage: "Sales channel",
|
||||||
|
|
|
@ -0,0 +1,88 @@
|
||||||
|
import Button from "@material-ui/core/Button";
|
||||||
|
import Dialog from "@material-ui/core/Dialog";
|
||||||
|
import DialogActions from "@material-ui/core/DialogActions";
|
||||||
|
import DialogContent from "@material-ui/core/DialogContent";
|
||||||
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
|
import TextField from "@material-ui/core/TextField";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import Form from "@saleor/components/Form";
|
||||||
|
import FormSpacer from "@saleor/components/FormSpacer";
|
||||||
|
import { buttonMessages } from "@saleor/intl";
|
||||||
|
import { ProductDetails_product } from "@saleor/products/types/ProductDetails";
|
||||||
|
import React from "react";
|
||||||
|
import { defineMessages, FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
interface ProductExternalMediaDialogProps {
|
||||||
|
product: ProductDetails_product;
|
||||||
|
open: boolean;
|
||||||
|
onClose: () => void;
|
||||||
|
onSubmit: (mediaUrl: string) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FormValues {
|
||||||
|
mediaUrl: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const messages = defineMessages({
|
||||||
|
buttonMessage: {
|
||||||
|
defaultMessage: "Upload URL",
|
||||||
|
description: "modal button"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const ProductExternalMediaDialog: React.FC<ProductExternalMediaDialogProps> = ({
|
||||||
|
open,
|
||||||
|
onClose,
|
||||||
|
onSubmit
|
||||||
|
}) => {
|
||||||
|
const intl = useIntl();
|
||||||
|
const initialValues: FormValues = {
|
||||||
|
mediaUrl: ""
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleOnSubmit = (values: FormValues) => {
|
||||||
|
onSubmit(values.mediaUrl);
|
||||||
|
onClose();
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog onClose={onClose} open={open}>
|
||||||
|
<DialogTitle>{intl.formatMessage(messages.buttonMessage)}</DialogTitle>
|
||||||
|
<Form initial={initialValues} onSubmit={handleOnSubmit}>
|
||||||
|
{({ change, data, submit }) => (
|
||||||
|
<>
|
||||||
|
<DialogContent>
|
||||||
|
<Typography>
|
||||||
|
<FormattedMessage
|
||||||
|
defaultMessage="Media from the URL you supply will be shown in the media gallery. You will be able to define the order of the gallery."
|
||||||
|
description="modal header"
|
||||||
|
/>
|
||||||
|
</Typography>
|
||||||
|
<FormSpacer />
|
||||||
|
<TextField
|
||||||
|
label="URL"
|
||||||
|
value={data.mediaUrl}
|
||||||
|
name="mediaUrl"
|
||||||
|
type="url"
|
||||||
|
onChange={change}
|
||||||
|
autoFocus
|
||||||
|
fullWidth
|
||||||
|
/>
|
||||||
|
</DialogContent>
|
||||||
|
|
||||||
|
<DialogActions>
|
||||||
|
<Button onClick={onClose}>
|
||||||
|
<FormattedMessage {...buttonMessages.back} />
|
||||||
|
</Button>
|
||||||
|
<Button onClick={submit}>
|
||||||
|
{intl.formatMessage(messages.buttonMessage)}
|
||||||
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Form>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ProductExternalMediaDialog;
|
|
@ -0,0 +1,2 @@
|
||||||
|
export * from "./ProductExternalMediaDialog";
|
||||||
|
export { default } from "./ProductExternalMediaDialog";
|
|
@ -1,2 +0,0 @@
|
||||||
export { default } from "./ProductImageNavigation";
|
|
||||||
export * from "./ProductImageNavigation";
|
|
|
@ -1,2 +0,0 @@
|
||||||
export { default } from "./ProductImagePage";
|
|
||||||
export * from "./ProductImagePage";
|
|
|
@ -1,2 +0,0 @@
|
||||||
export { default } from "./ProductImages";
|
|
||||||
export * from "./ProductImages";
|
|
|
@ -3,17 +3,28 @@ import Card from "@material-ui/core/Card";
|
||||||
import CardContent from "@material-ui/core/CardContent";
|
import CardContent from "@material-ui/core/CardContent";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import ImageTile from "@saleor/components/ImageTile";
|
|
||||||
import ImageUpload from "@saleor/components/ImageUpload";
|
import ImageUpload from "@saleor/components/ImageUpload";
|
||||||
import { commonMessages } from "@saleor/intl";
|
import MediaTile from "@saleor/components/MediaTile";
|
||||||
|
import { ProductMediaFragment } from "@saleor/fragments/types/ProductMediaFragment";
|
||||||
|
import { ProductMediaPopper } from "@saleor/products/components/ProductMediaPopper/ProductMediaPopper";
|
||||||
import { ReorderAction } from "@saleor/types";
|
import { ReorderAction } from "@saleor/types";
|
||||||
|
import { ProductMediaType } from "@saleor/types/globalTypes";
|
||||||
import createMultiFileUploadHandler from "@saleor/utils/handlers/multiFileUploadHandler";
|
import createMultiFileUploadHandler from "@saleor/utils/handlers/multiFileUploadHandler";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { defineMessages, useIntl } from "react-intl";
|
||||||
import { SortableContainer, SortableElement } from "react-sortable-hoc";
|
import { SortableContainer, SortableElement } from "react-sortable-hoc";
|
||||||
|
|
||||||
import { ProductDetails_product_images } from "../../types/ProductDetails";
|
const messages = defineMessages({
|
||||||
|
media: {
|
||||||
|
defaultMessage: "Media",
|
||||||
|
description: "section header"
|
||||||
|
},
|
||||||
|
upload: {
|
||||||
|
defaultMessage: "Upload",
|
||||||
|
description: "modal button upload"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const useStyles = makeStyles(
|
const useStyles = makeStyles(
|
||||||
theme => ({
|
theme => ({
|
||||||
|
@ -102,85 +113,88 @@ const useStyles = makeStyles(
|
||||||
opacity: 0.2
|
opacity: 0.2
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
{ name: "ProductImages" }
|
{ name: "ProductMedia" }
|
||||||
);
|
);
|
||||||
|
|
||||||
interface ProductImagesProps {
|
interface SortableMediaProps {
|
||||||
placeholderImage?: string;
|
media: {
|
||||||
images: ProductDetails_product_images[];
|
|
||||||
loading?: boolean;
|
|
||||||
onImageDelete: (id: string) => () => void;
|
|
||||||
onImageEdit: (id: string) => () => void;
|
|
||||||
onImageReorder?: ReorderAction;
|
|
||||||
onImageUpload(file: File);
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SortableImageProps {
|
|
||||||
image: {
|
|
||||||
id: string;
|
id: string;
|
||||||
alt?: string;
|
alt?: string;
|
||||||
url: string;
|
url: string;
|
||||||
};
|
};
|
||||||
onImageEdit: (id: string) => void;
|
onEdit: (id: string) => void;
|
||||||
onImageDelete: () => void;
|
onDelete: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SortableImage = SortableElement<SortableImageProps>(
|
const SortableMedia = SortableElement<SortableMediaProps>(
|
||||||
({ image, onImageEdit, onImageDelete }) => (
|
({ media, onEdit, onDelete }) => (
|
||||||
<ImageTile
|
<MediaTile
|
||||||
image={image}
|
media={media}
|
||||||
onImageEdit={onImageEdit ? () => onImageEdit(image.id) : undefined}
|
onEdit={onEdit ? () => onEdit(media.id) : undefined}
|
||||||
onImageDelete={onImageDelete}
|
onDelete={onDelete}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
interface ImageListContainerProps {
|
interface MediaListContainerProps {
|
||||||
className: string;
|
className: string;
|
||||||
items: ProductDetails_product_images[];
|
media: ProductMediaFragment[];
|
||||||
preview: ProductDetails_product_images[];
|
preview: ProductMediaFragment[];
|
||||||
onImageDelete: (id: string) => () => void;
|
onDelete: (id: string) => () => void;
|
||||||
onImageEdit: (id: string) => () => void;
|
onEdit: (id: string) => () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ImageListContainer = SortableContainer<ImageListContainerProps>(
|
const MediaListContainer = SortableContainer<MediaListContainerProps>(
|
||||||
({ items, preview, onImageDelete, onImageEdit, ...props }) => (
|
({ media, preview, onDelete, onEdit, ...props }) => (
|
||||||
<div {...props}>
|
<div {...props}>
|
||||||
{items.map((image, index) => (
|
{media.map((mediaObj, index) => (
|
||||||
<SortableImage
|
<SortableMedia
|
||||||
key={`item-${index}`}
|
key={`item-${index}`}
|
||||||
index={index}
|
index={index}
|
||||||
image={image}
|
media={mediaObj}
|
||||||
onImageEdit={onImageEdit ? onImageEdit(image.id) : null}
|
onEdit={onEdit ? onEdit(mediaObj.id) : null}
|
||||||
onImageDelete={onImageDelete(image.id)}
|
onDelete={onDelete(mediaObj.id)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
{preview
|
{preview
|
||||||
.sort((a, b) => (a.sortOrder > b.sortOrder ? 1 : -1))
|
.sort((a, b) => (a.sortOrder > b.sortOrder ? 1 : -1))
|
||||||
.map(image => (
|
.map((mediaObj, index) => (
|
||||||
<ImageTile loading={true} image={image} />
|
<MediaTile loading={true} media={mediaObj} key={index} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const ProductImages: React.FC<ProductImagesProps> = props => {
|
interface ProductMediaProps {
|
||||||
|
placeholderImage?: string;
|
||||||
|
media: ProductMediaFragment[];
|
||||||
|
loading?: boolean;
|
||||||
|
onImageDelete: (id: string) => () => void;
|
||||||
|
onImageEdit: (id: string) => () => void;
|
||||||
|
onImageReorder?: ReorderAction;
|
||||||
|
onImageUpload(file: File);
|
||||||
|
openMediaUrlModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
const ProductMedia: React.FC<ProductMediaProps> = props => {
|
||||||
const {
|
const {
|
||||||
images,
|
media,
|
||||||
placeholderImage,
|
placeholderImage,
|
||||||
loading,
|
|
||||||
onImageEdit,
|
onImageEdit,
|
||||||
onImageDelete,
|
onImageDelete,
|
||||||
onImageReorder,
|
onImageReorder,
|
||||||
onImageUpload
|
onImageUpload,
|
||||||
|
openMediaUrlModal
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const upload = React.useRef(null);
|
const imagesUpload = React.useRef<HTMLInputElement>(null);
|
||||||
|
const anchor = React.useRef<HTMLButtonElement>();
|
||||||
const [imagesToUpload, setImagesToUpload] = React.useState<
|
const [imagesToUpload, setImagesToUpload] = React.useState<
|
||||||
ProductDetails_product_images[]
|
ProductMediaFragment[]
|
||||||
>([]);
|
>([]);
|
||||||
|
const [popperOpenStatus, setPopperOpenStatus] = React.useState(false);
|
||||||
|
|
||||||
const handleImageUpload = createMultiFileUploadHandler(onImageUpload, {
|
const handleImageUpload = createMultiFileUploadHandler(onImageUpload, {
|
||||||
onAfterUpload: () =>
|
onAfterUpload: () =>
|
||||||
|
@ -192,11 +206,13 @@ const ProductImages: React.FC<ProductImagesProps> = props => {
|
||||||
setImagesToUpload(prevImagesToUpload => [
|
setImagesToUpload(prevImagesToUpload => [
|
||||||
...prevImagesToUpload,
|
...prevImagesToUpload,
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "",
|
alt: "",
|
||||||
id: "",
|
id: "",
|
||||||
sortOrder: fileIndex,
|
sortOrder: fileIndex,
|
||||||
url: event.target.result as string
|
type: ProductMediaType.IMAGE,
|
||||||
|
url: event.target.result as string,
|
||||||
|
oembedData: null
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
@ -208,35 +224,41 @@ const ProductImages: React.FC<ProductImagesProps> = props => {
|
||||||
return (
|
return (
|
||||||
<Card className={classes.card}>
|
<Card className={classes.card}>
|
||||||
<CardTitle
|
<CardTitle
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage(messages.media)}
|
||||||
defaultMessage: "Images",
|
|
||||||
description: "section header"
|
|
||||||
})}
|
|
||||||
toolbar={
|
toolbar={
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => upload.current.click()}
|
onClick={() => setPopperOpenStatus(true)}
|
||||||
disabled={loading}
|
|
||||||
variant="text"
|
variant="text"
|
||||||
color="primary"
|
color="primary"
|
||||||
data-test="button-upload-image"
|
data-test="button-upload-image"
|
||||||
|
ref={anchor}
|
||||||
>
|
>
|
||||||
{intl.formatMessage(commonMessages.uploadImage)}
|
{intl.formatMessage(messages.upload)}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<ProductMediaPopper
|
||||||
|
anchorRef={anchor.current}
|
||||||
|
imagesUploadRef={imagesUpload.current}
|
||||||
|
setPopperStatus={setPopperOpenStatus}
|
||||||
|
popperStatus={popperOpenStatus}
|
||||||
|
openMediaUrlModal={openMediaUrlModal}
|
||||||
|
/>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
className={classes.fileField}
|
className={classes.fileField}
|
||||||
id="fileUpload"
|
id="fileUpload"
|
||||||
onChange={event => handleImageUpload(event.target.files)}
|
onChange={event => handleImageUpload(event.target.files)}
|
||||||
multiple
|
multiple
|
||||||
type="file"
|
type="file"
|
||||||
ref={upload}
|
ref={imagesUpload}
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<div className={classes.imageGridContainer}>
|
<div className={classes.imageGridContainer}>
|
||||||
{images === undefined ? (
|
{media === undefined ? (
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<div className={classes.imageContainer}>
|
<div className={classes.imageContainer}>
|
||||||
|
@ -244,7 +266,7 @@ const ProductImages: React.FC<ProductImagesProps> = props => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
) : images.length > 0 ? (
|
) : media.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
className={classes.imageUpload}
|
className={classes.imageUpload}
|
||||||
|
@ -256,19 +278,19 @@ const ProductImages: React.FC<ProductImagesProps> = props => {
|
||||||
>
|
>
|
||||||
{({ isDragActive }) => (
|
{({ isDragActive }) => (
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<ImageListContainer
|
<MediaListContainer
|
||||||
distance={20}
|
distance={20}
|
||||||
helperClass="dragged"
|
helperClass="dragged"
|
||||||
axis="xy"
|
axis="xy"
|
||||||
items={images}
|
media={media}
|
||||||
preview={imagesToUpload}
|
preview={imagesToUpload}
|
||||||
onSortEnd={onImageReorder}
|
onSortEnd={onImageReorder}
|
||||||
className={classNames({
|
className={classNames({
|
||||||
[classes.root]: true,
|
[classes.root]: true,
|
||||||
[classes.rootDragActive]: isDragActive
|
[classes.rootDragActive]: isDragActive
|
||||||
})}
|
})}
|
||||||
onImageDelete={onImageDelete}
|
onDelete={onImageDelete}
|
||||||
onImageEdit={onImageEdit}
|
onEdit={onImageEdit}
|
||||||
/>
|
/>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
)}
|
)}
|
||||||
|
@ -281,5 +303,5 @@ const ProductImages: React.FC<ProductImagesProps> = props => {
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
ProductImages.displayName = "ProductImages";
|
ProductMedia.displayName = "ProductMedia";
|
||||||
export default ProductImages;
|
export default ProductMedia;
|
2
src/products/components/ProductMedia/index.ts
Normal file
2
src/products/components/ProductMedia/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export { default } from "./ProductMedia";
|
||||||
|
export * from "./ProductMedia";
|
|
@ -5,7 +5,14 @@ import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { defineMessages, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
const messages = defineMessages({
|
||||||
|
allMedia: {
|
||||||
|
defaultMessage: "All Media",
|
||||||
|
description: "section header"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const useStyles = makeStyles(
|
const useStyles = makeStyles(
|
||||||
theme => ({
|
theme => ({
|
||||||
|
@ -39,55 +46,63 @@ const useStyles = makeStyles(
|
||||||
},
|
},
|
||||||
toolbar: { marginTop: -theme.spacing(0.5) }
|
toolbar: { marginTop: -theme.spacing(0.5) }
|
||||||
}),
|
}),
|
||||||
{ name: "ProductImageNavigation" }
|
{ name: "ProductMediaNavigation" }
|
||||||
);
|
);
|
||||||
|
|
||||||
interface ProductImageNavigationProps {
|
interface ProductMediaNavigationProps {
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
images?: Array<{
|
media?: Array<{
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
alt?: string;
|
||||||
|
type?: string;
|
||||||
|
oembedData?: string;
|
||||||
}>;
|
}>;
|
||||||
highlighted?: string;
|
highlighted?: string;
|
||||||
onRowClick: (id: string) => () => void;
|
onRowClick: (id: string) => () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ProductImageNavigation: React.FC<ProductImageNavigationProps> = props => {
|
const ProductMediaNavigation: React.FC<ProductMediaNavigationProps> = props => {
|
||||||
const { highlighted, images, onRowClick } = props;
|
const { highlighted, media, onRowClick } = props;
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className={classes.card}>
|
<Card className={classes.card}>
|
||||||
<CardTitle
|
<CardTitle title={intl.formatMessage(messages.allMedia)} />
|
||||||
title={intl.formatMessage({
|
|
||||||
defaultMessage: "All Photos",
|
|
||||||
description: "section header"
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
{images === undefined ? (
|
{!media ? (
|
||||||
<Skeleton />
|
<Skeleton />
|
||||||
) : (
|
) : (
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
{images.map(image => (
|
{media.map(mediaObj => {
|
||||||
|
const mediaObjOembedData = JSON.parse(mediaObj?.oembedData);
|
||||||
|
const mediaUrl =
|
||||||
|
mediaObjOembedData?.thumbnail_url || mediaObj.url;
|
||||||
|
|
||||||
|
return (
|
||||||
<div
|
<div
|
||||||
className={classNames({
|
className={classNames({
|
||||||
[classes.imageContainer]: true,
|
[classes.imageContainer]: true,
|
||||||
[classes.highlightedImageContainer]: image.id === highlighted
|
[classes.highlightedImageContainer]:
|
||||||
|
mediaObj.id === highlighted
|
||||||
})}
|
})}
|
||||||
onClick={onRowClick(image.id)}
|
onClick={onRowClick(mediaObj.id)}
|
||||||
key={image.id}
|
key={mediaObj.id}
|
||||||
>
|
>
|
||||||
<img className={classes.image} src={image.url} />
|
<img
|
||||||
|
className={classes.image}
|
||||||
|
src={mediaUrl}
|
||||||
|
alt={mediaObj.alt}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
))}
|
);
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
ProductImageNavigation.displayName = "ProductImageNavigation";
|
ProductMediaNavigation.displayName = "ProductMediaNavigation";
|
||||||
export default ProductImageNavigation;
|
export default ProductMediaNavigation;
|
2
src/products/components/ProductMediaNavigation/index.ts
Normal file
2
src/products/components/ProductMediaNavigation/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export { default } from "./ProductMediaNavigation";
|
||||||
|
export * from "./ProductMediaNavigation";
|
|
@ -12,10 +12,30 @@ import PageHeader from "@saleor/components/PageHeader";
|
||||||
import SaveButtonBar from "@saleor/components/SaveButtonBar";
|
import SaveButtonBar from "@saleor/components/SaveButtonBar";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { commonMessages } from "@saleor/intl";
|
import { commonMessages } from "@saleor/intl";
|
||||||
|
import { ProductMediaType } from "@saleor/types/globalTypes";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { defineMessages, useIntl } from "react-intl";
|
||||||
|
|
||||||
import ProductImageNavigation from "../ProductImageNavigation";
|
import ProductMediaNavigation from "../ProductMediaNavigation";
|
||||||
|
|
||||||
|
const messages = defineMessages({
|
||||||
|
editMedia: {
|
||||||
|
defaultMessage: "Edit Media",
|
||||||
|
description: "header"
|
||||||
|
},
|
||||||
|
mediaInformation: {
|
||||||
|
defaultMessage: "Media Information",
|
||||||
|
description: "section header"
|
||||||
|
},
|
||||||
|
mediaView: {
|
||||||
|
defaultMessage: "Media View",
|
||||||
|
description: "section header"
|
||||||
|
},
|
||||||
|
optional: {
|
||||||
|
defaultMessage: "Optional",
|
||||||
|
description: "field is optional"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const useStyles = makeStyles(
|
const useStyles = makeStyles(
|
||||||
theme => ({
|
theme => ({
|
||||||
|
@ -25,24 +45,30 @@ const useStyles = makeStyles(
|
||||||
width: "100%"
|
width: "100%"
|
||||||
},
|
},
|
||||||
imageContainer: {
|
imageContainer: {
|
||||||
|
"& iframe": {
|
||||||
|
width: "100%",
|
||||||
|
maxHeight: 420
|
||||||
|
},
|
||||||
background: "#ffffff",
|
background: "#ffffff",
|
||||||
border: "1px solid #eaeaea",
|
border: "1px solid #eaeaea",
|
||||||
borderRadius: theme.spacing(),
|
borderRadius: theme.spacing(),
|
||||||
margin: `0 auto ${theme.spacing(2)}px`,
|
margin: `0 auto ${theme.spacing(2)}px`,
|
||||||
maxWidth: 552,
|
width: "100%",
|
||||||
padding: theme.spacing(2)
|
padding: theme.spacing(2)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
{ name: "ProductImagePage" }
|
{ name: "ProductMediaPage" }
|
||||||
);
|
);
|
||||||
|
|
||||||
interface ProductImagePageProps {
|
interface ProductMediaPageProps {
|
||||||
image?: {
|
mediaObj?: {
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: string;
|
||||||
|
oembedData?: string;
|
||||||
};
|
};
|
||||||
images?: Array<{
|
media?: Array<{
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
}>;
|
}>;
|
||||||
|
@ -55,11 +81,11 @@ interface ProductImagePageProps {
|
||||||
onSubmit: (data: { description: string }) => void;
|
onSubmit: (data: { description: string }) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ProductImagePage: React.FC<ProductImagePageProps> = props => {
|
const ProductMediaPage: React.FC<ProductMediaPageProps> = props => {
|
||||||
const {
|
const {
|
||||||
disabled,
|
disabled,
|
||||||
image,
|
mediaObj,
|
||||||
images,
|
media,
|
||||||
product,
|
product,
|
||||||
saveButtonBarState,
|
saveButtonBarState,
|
||||||
onBack,
|
onBack,
|
||||||
|
@ -73,42 +99,31 @@ const ProductImagePage: React.FC<ProductImagePageProps> = props => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form
|
<Form
|
||||||
initial={{ description: image ? image.alt : "" }}
|
initial={{ description: mediaObj ? mediaObj.alt : "" }}
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
confirmLeave
|
confirmLeave
|
||||||
>
|
>
|
||||||
{({ change, data, hasChanged, submit }) => (
|
{({ change, data, hasChanged, submit }) => (
|
||||||
<Container>
|
<Container>
|
||||||
<AppHeader onBack={onBack}>{product}</AppHeader>
|
<AppHeader onBack={onBack}>{product}</AppHeader>
|
||||||
<PageHeader
|
<PageHeader title={intl.formatMessage(messages.editMedia)} />
|
||||||
title={intl.formatMessage({
|
|
||||||
defaultMessage: "Edit Photo",
|
|
||||||
description: "header"
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
<Grid variant="inverted">
|
<Grid variant="inverted">
|
||||||
<div>
|
<div>
|
||||||
<ProductImageNavigation
|
<ProductMediaNavigation
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
images={images}
|
media={media}
|
||||||
highlighted={image ? image.id : undefined}
|
highlighted={media ? mediaObj.id : undefined}
|
||||||
onRowClick={onRowClick}
|
onRowClick={onRowClick}
|
||||||
/>
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
<CardTitle
|
<CardTitle
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage(messages.mediaInformation)}
|
||||||
defaultMessage: "Photo Information",
|
|
||||||
description: "section header"
|
|
||||||
})}
|
|
||||||
/>
|
/>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<TextField
|
<TextField
|
||||||
name="description"
|
name="description"
|
||||||
label={intl.formatMessage(commonMessages.description)}
|
label={intl.formatMessage(commonMessages.description)}
|
||||||
helperText={intl.formatMessage({
|
helperText={intl.formatMessage(messages.optional)}
|
||||||
defaultMessage: "Optional",
|
|
||||||
description: "field is optional"
|
|
||||||
})}
|
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onChange={change}
|
onChange={change}
|
||||||
value={data.description}
|
value={data.description}
|
||||||
|
@ -120,17 +135,25 @@ const ProductImagePage: React.FC<ProductImagePageProps> = props => {
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Card>
|
<Card>
|
||||||
<CardTitle
|
<CardTitle title={intl.formatMessage(messages.mediaView)} />
|
||||||
title={intl.formatMessage({
|
|
||||||
defaultMessage: "Photo View",
|
|
||||||
description: "section header"
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
{!!image ? (
|
{!!mediaObj ? (
|
||||||
|
mediaObj?.type === ProductMediaType.IMAGE ? (
|
||||||
<div className={classes.imageContainer}>
|
<div className={classes.imageContainer}>
|
||||||
<img src={image.url} className={classes.image} />
|
<img
|
||||||
|
className={classes.image}
|
||||||
|
src={mediaObj.url}
|
||||||
|
alt={mediaObj.alt}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
) : (
|
||||||
|
<div
|
||||||
|
className={classes.imageContainer}
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: JSON.parse(mediaObj?.oembedData)?.html
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)
|
||||||
) : (
|
) : (
|
||||||
<Skeleton />
|
<Skeleton />
|
||||||
)}
|
)}
|
||||||
|
@ -150,5 +173,5 @@ const ProductImagePage: React.FC<ProductImagePageProps> = props => {
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
ProductImagePage.displayName = "ProductImagePage";
|
ProductMediaPage.displayName = "ProductMediaPage";
|
||||||
export default ProductImagePage;
|
export default ProductMediaPage;
|
2
src/products/components/ProductMediaPage/index.ts
Normal file
2
src/products/components/ProductMediaPage/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export { default } from "./ProductMediaPage";
|
||||||
|
export * from "./ProductMediaPage";
|
|
@ -0,0 +1,74 @@
|
||||||
|
import ClickAwayListener from "@material-ui/core/ClickAwayListener";
|
||||||
|
import Grow from "@material-ui/core/Grow";
|
||||||
|
import MenuItem from "@material-ui/core/MenuItem";
|
||||||
|
import Menu from "@material-ui/core/MenuList";
|
||||||
|
import Paper from "@material-ui/core/Paper";
|
||||||
|
import Popper from "@material-ui/core/Popper";
|
||||||
|
import React from "react";
|
||||||
|
import { defineMessages, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
interface ProductMediaPopperProps {
|
||||||
|
anchorRef: HTMLButtonElement;
|
||||||
|
imagesUploadRef: HTMLInputElement;
|
||||||
|
openMediaUrlModal: () => void;
|
||||||
|
popperStatus: boolean;
|
||||||
|
setPopperStatus: (popperStatus: boolean) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
const messages = defineMessages({
|
||||||
|
uploadImages: {
|
||||||
|
defaultMessage: "Upload Images",
|
||||||
|
description: "modal button images upload"
|
||||||
|
},
|
||||||
|
uploadUrl: {
|
||||||
|
defaultMessage: "Upload URL",
|
||||||
|
description: "modal button url upload"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export const ProductMediaPopper = ({
|
||||||
|
anchorRef,
|
||||||
|
imagesUploadRef,
|
||||||
|
setPopperStatus,
|
||||||
|
openMediaUrlModal,
|
||||||
|
popperStatus
|
||||||
|
}: ProductMediaPopperProps) => {
|
||||||
|
const intl = useIntl();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Popper
|
||||||
|
open={popperStatus}
|
||||||
|
anchorEl={anchorRef}
|
||||||
|
transition
|
||||||
|
placement="bottom-end"
|
||||||
|
>
|
||||||
|
{({ TransitionProps }) => (
|
||||||
|
<Grow {...TransitionProps}>
|
||||||
|
<Paper>
|
||||||
|
<ClickAwayListener
|
||||||
|
onClickAway={() => setPopperStatus(false)}
|
||||||
|
mouseEvent="onClick"
|
||||||
|
>
|
||||||
|
<Menu>
|
||||||
|
<MenuItem
|
||||||
|
onClick={() => imagesUploadRef.click()}
|
||||||
|
data-test="uploadImages"
|
||||||
|
key="upload-images"
|
||||||
|
>
|
||||||
|
{intl.formatMessage(messages.uploadImages)}
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
onClick={openMediaUrlModal}
|
||||||
|
data-test="uploadMediaUrl"
|
||||||
|
key="upload-media-url"
|
||||||
|
>
|
||||||
|
{intl.formatMessage(messages.uploadUrl)}
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
|
</ClickAwayListener>
|
||||||
|
</Paper>
|
||||||
|
</Grow>
|
||||||
|
)}
|
||||||
|
</Popper>
|
||||||
|
);
|
||||||
|
};
|
|
@ -41,7 +41,7 @@ const props: ProductUpdatePageProps = {
|
||||||
fetchMoreCollections: fetchMoreProps,
|
fetchMoreCollections: fetchMoreProps,
|
||||||
hasChannelChanged: false,
|
hasChannelChanged: false,
|
||||||
header: product.name,
|
header: product.name,
|
||||||
images: product.images,
|
media: product.media,
|
||||||
onAssignReferencesClick: () => undefined,
|
onAssignReferencesClick: () => undefined,
|
||||||
onBack: () => undefined,
|
onBack: () => undefined,
|
||||||
onChannelsChange: () => undefined,
|
onChannelsChange: () => undefined,
|
||||||
|
@ -49,6 +49,7 @@ const props: ProductUpdatePageProps = {
|
||||||
onDelete: () => undefined,
|
onDelete: () => undefined,
|
||||||
onImageDelete: () => undefined,
|
onImageDelete: () => undefined,
|
||||||
onImageUpload: () => undefined,
|
onImageUpload: () => undefined,
|
||||||
|
onMediaUrlUpload: () => undefined,
|
||||||
onSetDefaultVariant: () => undefined,
|
onSetDefaultVariant: () => undefined,
|
||||||
onSubmit,
|
onSubmit,
|
||||||
onVariantAdd: () => undefined,
|
onVariantAdd: () => undefined,
|
||||||
|
|
|
@ -26,6 +26,7 @@ import { FormsetData } from "@saleor/hooks/useFormset";
|
||||||
import useStateFromProps from "@saleor/hooks/useStateFromProps";
|
import useStateFromProps from "@saleor/hooks/useStateFromProps";
|
||||||
import { sectionNames } from "@saleor/intl";
|
import { sectionNames } from "@saleor/intl";
|
||||||
import { maybe } from "@saleor/misc";
|
import { maybe } from "@saleor/misc";
|
||||||
|
import ProductExternalMediaDialog from "@saleor/products/components/ProductExternalMediaDialog";
|
||||||
import ProductVariantPrice from "@saleor/products/components/ProductVariantPrice";
|
import ProductVariantPrice from "@saleor/products/components/ProductVariantPrice";
|
||||||
import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories";
|
import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories";
|
||||||
import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections";
|
import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections";
|
||||||
|
@ -42,12 +43,12 @@ import { useIntl } from "react-intl";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ProductDetails_product,
|
ProductDetails_product,
|
||||||
ProductDetails_product_images,
|
ProductDetails_product_media,
|
||||||
ProductDetails_product_variants
|
ProductDetails_product_variants
|
||||||
} from "../../types/ProductDetails";
|
} from "../../types/ProductDetails";
|
||||||
import { getChoices, ProductUpdatePageFormData } from "../../utils/data";
|
import { getChoices, ProductUpdatePageFormData } from "../../utils/data";
|
||||||
import ProductDetailsForm from "../ProductDetailsForm";
|
import ProductDetailsForm from "../ProductDetailsForm";
|
||||||
import ProductImages from "../ProductImages";
|
import ProductMedia from "../ProductMedia";
|
||||||
import ProductOrganization from "../ProductOrganization";
|
import ProductOrganization from "../ProductOrganization";
|
||||||
import ProductShipping from "../ProductShipping/ProductShipping";
|
import ProductShipping from "../ProductShipping/ProductShipping";
|
||||||
import ProductStocks, { ProductStockInput } from "../ProductStocks";
|
import ProductStocks, { ProductStockInput } from "../ProductStocks";
|
||||||
|
@ -71,8 +72,9 @@ export interface ProductUpdatePageProps extends ListActions, ChannelProps {
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
fetchMoreCategories: FetchMoreProps;
|
fetchMoreCategories: FetchMoreProps;
|
||||||
fetchMoreCollections: FetchMoreProps;
|
fetchMoreCollections: FetchMoreProps;
|
||||||
|
isMediaUrlModalVisible?: boolean;
|
||||||
variants: ProductDetails_product_variants[];
|
variants: ProductDetails_product_variants[];
|
||||||
images: ProductDetails_product_images[];
|
media: ProductDetails_product_media[];
|
||||||
hasChannelChanged: boolean;
|
hasChannelChanged: boolean;
|
||||||
product: ProductDetails_product;
|
product: ProductDetails_product;
|
||||||
header: string;
|
header: string;
|
||||||
|
@ -102,6 +104,7 @@ export interface ProductUpdatePageProps extends ListActions, ChannelProps {
|
||||||
onImageEdit?(id: string);
|
onImageEdit?(id: string);
|
||||||
onImageReorder?(event: { oldIndex: number; newIndex: number });
|
onImageReorder?(event: { oldIndex: number; newIndex: number });
|
||||||
onImageUpload(file: File);
|
onImageUpload(file: File);
|
||||||
|
onMediaUrlUpload(mediaUrl: string);
|
||||||
onSeoClick?();
|
onSeoClick?();
|
||||||
onVariantAdd?();
|
onVariantAdd?();
|
||||||
onSetDefaultVariant(variant: ProductDetails_product_variants);
|
onSetDefaultVariant(variant: ProductDetails_product_variants);
|
||||||
|
@ -133,7 +136,7 @@ export const ProductUpdatePage: React.FC<ProductUpdatePageProps> = ({
|
||||||
fetchCollections,
|
fetchCollections,
|
||||||
fetchMoreCategories,
|
fetchMoreCategories,
|
||||||
fetchMoreCollections,
|
fetchMoreCollections,
|
||||||
images,
|
media,
|
||||||
hasChannelChanged,
|
hasChannelChanged,
|
||||||
header,
|
header,
|
||||||
placeholderImage,
|
placeholderImage,
|
||||||
|
@ -150,6 +153,7 @@ export const ProductUpdatePage: React.FC<ProductUpdatePageProps> = ({
|
||||||
onImageEdit,
|
onImageEdit,
|
||||||
onImageReorder,
|
onImageReorder,
|
||||||
onImageUpload,
|
onImageUpload,
|
||||||
|
onMediaUrlUpload,
|
||||||
onChannelsChange,
|
onChannelsChange,
|
||||||
openChannelsModal,
|
openChannelsModal,
|
||||||
onSeoClick,
|
onSeoClick,
|
||||||
|
@ -161,6 +165,7 @@ export const ProductUpdatePage: React.FC<ProductUpdatePageProps> = ({
|
||||||
onVariantReorder,
|
onVariantReorder,
|
||||||
onWarehouseConfigure,
|
onWarehouseConfigure,
|
||||||
isChecked,
|
isChecked,
|
||||||
|
isMediaUrlModalVisible,
|
||||||
selected,
|
selected,
|
||||||
selectedChannelId,
|
selectedChannelId,
|
||||||
toggle,
|
toggle,
|
||||||
|
@ -180,6 +185,10 @@ export const ProductUpdatePage: React.FC<ProductUpdatePageProps> = ({
|
||||||
product?.category?.name || ""
|
product?.category?.name || ""
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const [mediaUrlModalStatus, setMediaUrlModalStatus] = useStateFromProps(
|
||||||
|
isMediaUrlModalVisible || false
|
||||||
|
);
|
||||||
|
|
||||||
const [selectedCollections, setSelectedCollections] = useStateFromProps(
|
const [selectedCollections, setSelectedCollections] = useStateFromProps(
|
||||||
getChoices(maybe(() => product.collections, []))
|
getChoices(maybe(() => product.collections, []))
|
||||||
);
|
);
|
||||||
|
@ -262,13 +271,14 @@ export const ProductUpdatePage: React.FC<ProductUpdatePageProps> = ({
|
||||||
onChange={change}
|
onChange={change}
|
||||||
/>
|
/>
|
||||||
<CardSpacer />
|
<CardSpacer />
|
||||||
<ProductImages
|
<ProductMedia
|
||||||
images={images}
|
media={media}
|
||||||
placeholderImage={placeholderImage}
|
placeholderImage={placeholderImage}
|
||||||
onImageDelete={onImageDelete}
|
onImageDelete={onImageDelete}
|
||||||
onImageReorder={onImageReorder}
|
onImageReorder={onImageReorder}
|
||||||
onImageEdit={onImageEdit}
|
onImageEdit={onImageEdit}
|
||||||
onImageUpload={onImageUpload}
|
onImageUpload={onImageUpload}
|
||||||
|
openMediaUrlModal={() => setMediaUrlModalStatus(true)}
|
||||||
/>
|
/>
|
||||||
<CardSpacer />
|
<CardSpacer />
|
||||||
{data.attributes.length > 0 && (
|
{data.attributes.length > 0 && (
|
||||||
|
@ -441,6 +451,13 @@ export const ProductUpdatePage: React.FC<ProductUpdatePageProps> = ({
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<ProductExternalMediaDialog
|
||||||
|
product={product}
|
||||||
|
onClose={() => setMediaUrlModalStatus(false)}
|
||||||
|
open={mediaUrlModalStatus}
|
||||||
|
onSubmit={onMediaUrlUpload}
|
||||||
|
/>
|
||||||
</Container>
|
</Container>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import DialogActions from "@material-ui/core/DialogActions";
|
||||||
import DialogContent from "@material-ui/core/DialogContent";
|
import DialogContent from "@material-ui/core/DialogContent";
|
||||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import { ProductImageFragment } from "@saleor/fragments/types/ProductImageFragment";
|
import { ProductMediaFragment } from "@saleor/fragments/types/ProductMediaFragment";
|
||||||
import { buttonMessages } from "@saleor/intl";
|
import { buttonMessages } from "@saleor/intl";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
@ -48,45 +48,53 @@ const useStyles = makeStyles(
|
||||||
);
|
);
|
||||||
|
|
||||||
interface ProductVariantImageSelectDialogProps {
|
interface ProductVariantImageSelectDialogProps {
|
||||||
images?: ProductImageFragment[];
|
media?: ProductMediaFragment[];
|
||||||
selectedImages?: string[];
|
selectedMedia?: string[];
|
||||||
open: boolean;
|
open: boolean;
|
||||||
onClose();
|
onClose();
|
||||||
onImageSelect(id: string);
|
onMediaSelect(id: string);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ProductVariantImageSelectDialog: React.FC<ProductVariantImageSelectDialogProps> = props => {
|
const ProductVariantMediaSelectDialog: React.FC<ProductVariantImageSelectDialogProps> = props => {
|
||||||
const { images, open, selectedImages, onClose, onImageSelect } = props;
|
const { media, open, selectedMedia, onClose, onMediaSelect } = props;
|
||||||
|
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog onClose={onClose} open={open}>
|
<Dialog onClose={onClose} open={open}>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Image Selection"
|
defaultMessage="Media Selection"
|
||||||
description="dialog header"
|
description="dialog header"
|
||||||
/>
|
/>
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
{images
|
{media
|
||||||
.sort((prev, next) => (prev.sortOrder > next.sortOrder ? 1 : -1))
|
.sort((prev, next) => (prev.sortOrder > next.sortOrder ? 1 : -1))
|
||||||
.map(tile => (
|
.map(mediaObj => {
|
||||||
|
const parsedMediaOembedData = JSON.parse(mediaObj?.oembedData);
|
||||||
|
const mediaUrl =
|
||||||
|
parsedMediaOembedData?.thumbnail_url || mediaObj.url;
|
||||||
|
return (
|
||||||
<div
|
<div
|
||||||
className={classNames([
|
className={classNames([
|
||||||
classes.imageContainer,
|
classes.imageContainer,
|
||||||
{
|
{
|
||||||
[classes.selectedImageContainer]:
|
[classes.selectedImageContainer]:
|
||||||
selectedImages.indexOf(tile.id) !== -1
|
selectedMedia.indexOf(mediaObj.id) !== -1
|
||||||
}
|
}
|
||||||
])}
|
])}
|
||||||
onClick={onImageSelect(tile.id)}
|
onClick={onMediaSelect(mediaObj.id)}
|
||||||
key={tile.id}
|
key={mediaObj.id}
|
||||||
>
|
>
|
||||||
<img className={classes.image} src={tile.url} />
|
<img
|
||||||
|
className={classes.image}
|
||||||
|
src={mediaUrl}
|
||||||
|
alt={mediaObj.alt}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
))}
|
);
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
@ -97,5 +105,6 @@ const ProductVariantImageSelectDialog: React.FC<ProductVariantImageSelectDialogP
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
ProductVariantImageSelectDialog.displayName = "ProductVariantImageSelectDialog";
|
|
||||||
export default ProductVariantImageSelectDialog;
|
ProductVariantMediaSelectDialog.displayName = "ProductVariantMediaSelectDialog";
|
||||||
|
export default ProductVariantMediaSelectDialog;
|
|
@ -1,2 +1,2 @@
|
||||||
export { default } from "./ProductVariantImageSelectDialog";
|
export { default } from "./ProductVariantMediaSelectDialog";
|
||||||
export * from "./ProductVariantImageSelectDialog";
|
export * from "./ProductVariantMediaSelectDialog";
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
export { default } from "./ProductVariantImages";
|
|
||||||
export * from "./ProductVariantImages";
|
|
|
@ -5,9 +5,24 @@ import { makeStyles } from "@material-ui/core/styles";
|
||||||
import Typography from "@material-ui/core/Typography";
|
import Typography from "@material-ui/core/Typography";
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import { ProductImageFragment } from "@saleor/fragments/types/ProductImageFragment";
|
import { ProductMediaFragment } from "@saleor/fragments/types/ProductMediaFragment";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { defineMessages, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
const messages = defineMessages({
|
||||||
|
chooseMedia: {
|
||||||
|
defaultMessage: "Choose media",
|
||||||
|
description: "button"
|
||||||
|
},
|
||||||
|
media: {
|
||||||
|
defaultMessage: "Media",
|
||||||
|
description: "section header"
|
||||||
|
},
|
||||||
|
selectSpecificVariant: {
|
||||||
|
defaultMessage: "Select a specific variant media from product media",
|
||||||
|
description: "select variant media"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const useStyles = makeStyles(
|
const useStyles = makeStyles(
|
||||||
theme => ({
|
theme => ({
|
||||||
|
@ -38,29 +53,25 @@ const useStyles = makeStyles(
|
||||||
gridTemplateColumns: "repeat(4, 1fr)"
|
gridTemplateColumns: "repeat(4, 1fr)"
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
{ name: "ProductVariantImages" }
|
{ name: "ProductVariantMedia" }
|
||||||
);
|
);
|
||||||
|
|
||||||
interface ProductVariantImagesProps {
|
interface ProductVariantMediaProps {
|
||||||
images?: ProductImageFragment[];
|
media?: ProductMediaFragment[];
|
||||||
placeholderImage?: string;
|
placeholderImage?: string;
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
onImageAdd();
|
onImageAdd();
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ProductVariantImages: React.FC<ProductVariantImagesProps> = props => {
|
export const ProductVariantMedia: React.FC<ProductVariantMediaProps> = props => {
|
||||||
const { disabled, images, onImageAdd } = props;
|
|
||||||
|
|
||||||
const classes = useStyles(props);
|
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
const classes = useStyles(props);
|
||||||
|
const { disabled, media, onImageAdd } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<CardTitle
|
<CardTitle
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage(messages.media)}
|
||||||
defaultMessage: "Images",
|
|
||||||
description: "section header"
|
|
||||||
})}
|
|
||||||
toolbar={
|
toolbar={
|
||||||
<Button
|
<Button
|
||||||
color="primary"
|
color="primary"
|
||||||
|
@ -68,28 +79,33 @@ export const ProductVariantImages: React.FC<ProductVariantImagesProps> = props =
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={onImageAdd}
|
onClick={onImageAdd}
|
||||||
>
|
>
|
||||||
<FormattedMessage
|
{intl.formatMessage(messages.chooseMedia)}
|
||||||
defaultMessage="Choose photos"
|
|
||||||
description="button"
|
|
||||||
/>
|
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
{images === undefined || images === null ? (
|
{media === undefined || media === null ? (
|
||||||
<Skeleton />
|
<Skeleton />
|
||||||
) : images.length > 0 ? (
|
) : media.length > 0 ? (
|
||||||
images
|
media
|
||||||
.sort((prev, next) => (prev.sortOrder > next.sortOrder ? 1 : -1))
|
.sort((prev, next) => (prev.sortOrder > next.sortOrder ? 1 : -1))
|
||||||
.map(tile => (
|
.map(mediaObj => {
|
||||||
<div className={classes.imageContainer} key={tile.id}>
|
const parsedMediaOembedData = JSON.parse(mediaObj?.oembedData);
|
||||||
<img className={classes.image} src={tile.url} />
|
const mediaUrl =
|
||||||
</div>
|
parsedMediaOembedData?.thumbnail_url || mediaObj.url;
|
||||||
))
|
return (
|
||||||
|
<img
|
||||||
|
key={mediaObj.id}
|
||||||
|
className={classes.image}
|
||||||
|
src={mediaUrl}
|
||||||
|
alt={mediaObj.alt}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})
|
||||||
) : (
|
) : (
|
||||||
<Typography className={classes.helpText}>
|
<Typography className={classes.helpText}>
|
||||||
<FormattedMessage defaultMessage="Select a specific variant image from product images" />
|
{intl.formatMessage(messages.selectSpecificVariant)}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -97,5 +113,5 @@ export const ProductVariantImages: React.FC<ProductVariantImagesProps> = props =
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
ProductVariantImages.displayName = "ProductVariantImages";
|
ProductVariantMedia.displayName = "ProductVariantMedia";
|
||||||
export default ProductVariantImages;
|
export default ProductVariantMedia;
|
2
src/products/components/ProductVariantMedia/index.ts
Normal file
2
src/products/components/ProductVariantMedia/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export { default } from "./ProductVariantMedia";
|
||||||
|
export * from "./ProductVariantMedia";
|
|
@ -99,6 +99,10 @@ const ProductVariantNavigation: React.FC<ProductVariantNavigationProps> = props
|
||||||
{renderCollection(variants, (variant, variantIndex) => {
|
{renderCollection(variants, (variant, variantIndex) => {
|
||||||
const isDefault = variant && variant.id === defaultVariantId;
|
const isDefault = variant && variant.id === defaultVariantId;
|
||||||
const isActive = variant && variant.id === current;
|
const isActive = variant && variant.id === current;
|
||||||
|
const thumbnail = variant?.media?.filter(
|
||||||
|
mediaObj => mediaObj.type === "IMAGE"
|
||||||
|
)[0];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SortableTableRow
|
<SortableTableRow
|
||||||
hover={!!variant}
|
hover={!!variant}
|
||||||
|
@ -111,7 +115,7 @@ const ProductVariantNavigation: React.FC<ProductVariantNavigationProps> = props
|
||||||
>
|
>
|
||||||
<TableCellAvatar
|
<TableCellAvatar
|
||||||
className={classes.colAvatar}
|
className={classes.colAvatar}
|
||||||
thumbnail={variant?.images[0]?.url || fallbackThumbnail}
|
thumbnail={thumbnail?.url || fallbackThumbnail}
|
||||||
/>
|
/>
|
||||||
<TableCell className={classes.colName}>
|
<TableCell className={classes.colName}>
|
||||||
{variant ? variant.name || variant.sku : <Skeleton />}
|
{variant ? variant.name || variant.sku : <Skeleton />}
|
||||||
|
|
|
@ -31,8 +31,8 @@ import { defineMessages, useIntl } from "react-intl";
|
||||||
import { maybe } from "../../../misc";
|
import { maybe } from "../../../misc";
|
||||||
import ProductShipping from "../ProductShipping/ProductShipping";
|
import ProductShipping from "../ProductShipping/ProductShipping";
|
||||||
import ProductStocks, { ProductStockInput } from "../ProductStocks";
|
import ProductStocks, { ProductStockInput } from "../ProductStocks";
|
||||||
import ProductVariantImages from "../ProductVariantImages";
|
import ProductVariantMediaSelectDialog from "../ProductVariantImageSelectDialog";
|
||||||
import ProductVariantImageSelectDialog from "../ProductVariantImageSelectDialog";
|
import ProductVariantMedia from "../ProductVariantMedia";
|
||||||
import ProductVariantNavigation from "../ProductVariantNavigation";
|
import ProductVariantNavigation from "../ProductVariantNavigation";
|
||||||
import ProductVariantPrice from "../ProductVariantPrice";
|
import ProductVariantPrice from "../ProductVariantPrice";
|
||||||
import ProductVariantSetDefault from "../ProductVariantSetDefault";
|
import ProductVariantSetDefault from "../ProductVariantSetDefault";
|
||||||
|
@ -97,7 +97,7 @@ interface ProductVariantPageProps {
|
||||||
onBack();
|
onBack();
|
||||||
onDelete();
|
onDelete();
|
||||||
onSubmit(data: ProductVariantUpdateSubmitData);
|
onSubmit(data: ProductVariantUpdateSubmitData);
|
||||||
onImageSelect(id: string);
|
onMediaSelect(id: string);
|
||||||
onVariantClick(variantId: string);
|
onVariantClick(variantId: string);
|
||||||
onSetDefaultVariant();
|
onSetDefaultVariant();
|
||||||
onWarehouseConfigure();
|
onWarehouseConfigure();
|
||||||
|
@ -120,7 +120,7 @@ const ProductVariantPage: React.FC<ProductVariantPageProps> = ({
|
||||||
onAdd,
|
onAdd,
|
||||||
onBack,
|
onBack,
|
||||||
onDelete,
|
onDelete,
|
||||||
onImageSelect,
|
onMediaSelect,
|
||||||
onSubmit,
|
onSubmit,
|
||||||
onVariantClick,
|
onVariantClick,
|
||||||
onVariantReorder,
|
onVariantReorder,
|
||||||
|
@ -139,12 +139,12 @@ const ProductVariantPage: React.FC<ProductVariantPageProps> = ({
|
||||||
const [isModalOpened, setModalStatus] = React.useState(false);
|
const [isModalOpened, setModalStatus] = React.useState(false);
|
||||||
const toggleModal = () => setModalStatus(!isModalOpened);
|
const toggleModal = () => setModalStatus(!isModalOpened);
|
||||||
|
|
||||||
const variantImages = variant?.images?.map(image => image.id);
|
const variantMedia = variant?.media?.map(image => image.id);
|
||||||
const productImages = variant?.product?.images?.sort((prev, next) =>
|
const productMedia = variant?.product?.media?.sort((prev, next) =>
|
||||||
prev.sortOrder > next.sortOrder ? 1 : -1
|
prev.sortOrder > next.sortOrder ? 1 : -1
|
||||||
);
|
);
|
||||||
const images = productImages
|
const media = productMedia
|
||||||
?.filter(image => variantImages.indexOf(image.id) !== -1)
|
?.filter(image => variantMedia.indexOf(image.id) !== -1)
|
||||||
.sort((prev, next) => (prev.sortOrder > next.sortOrder ? 1 : -1));
|
.sort((prev, next) => (prev.sortOrder > next.sortOrder ? 1 : -1));
|
||||||
|
|
||||||
const canOpenAssignReferencesAttributeDialog = !!assignReferencesAttributeId;
|
const canOpenAssignReferencesAttributeDialog = !!assignReferencesAttributeId;
|
||||||
|
@ -255,9 +255,9 @@ const ProductVariantPage: React.FC<ProductVariantPageProps> = ({
|
||||||
onReferencesReorder={handlers.reorderAttributeValue}
|
onReferencesReorder={handlers.reorderAttributeValue}
|
||||||
/>
|
/>
|
||||||
<CardSpacer />
|
<CardSpacer />
|
||||||
<ProductVariantImages
|
<ProductVariantMedia
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
images={images}
|
media={media}
|
||||||
placeholderImage={placeholderImage}
|
placeholderImage={placeholderImage}
|
||||||
onImageAdd={toggleModal}
|
onImageAdd={toggleModal}
|
||||||
/>
|
/>
|
||||||
|
@ -334,12 +334,12 @@ const ProductVariantPage: React.FC<ProductVariantPageProps> = ({
|
||||||
</ProductVariantUpdateForm>
|
</ProductVariantUpdateForm>
|
||||||
</Container>
|
</Container>
|
||||||
{variant && (
|
{variant && (
|
||||||
<ProductVariantImageSelectDialog
|
<ProductVariantMediaSelectDialog
|
||||||
onClose={toggleModal}
|
onClose={toggleModal}
|
||||||
onImageSelect={onImageSelect}
|
onMediaSelect={onMediaSelect}
|
||||||
open={isModalOpened}
|
open={isModalOpened}
|
||||||
images={productImages}
|
media={productMedia}
|
||||||
selectedImages={maybe(() => variant.images.map(image => image.id))}
|
selectedMedia={maybe(() => variant.media.map(image => image.id))}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -1,55 +1,56 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import { TypedMutationInnerProps } from "../../mutations";
|
import { TypedMutationInnerProps } from "../../mutations";
|
||||||
import { useProductImagesReorder } from "../mutations";
|
import { useProductMediaReorder } from "../mutations";
|
||||||
import {
|
import {
|
||||||
ProductImageReorder,
|
ProductMediaReorder,
|
||||||
ProductImageReorderVariables
|
ProductMediaReorderVariables
|
||||||
} from "../types/ProductImageReorder";
|
} from "../types/ProductMediaReorder";
|
||||||
|
|
||||||
interface ProductImagesReorderProviderProps
|
interface ProductMediaReorderProviderProps
|
||||||
extends TypedMutationInnerProps<
|
extends TypedMutationInnerProps<
|
||||||
ProductImageReorder,
|
ProductMediaReorder,
|
||||||
ProductImageReorderVariables
|
ProductMediaReorderVariables
|
||||||
> {
|
> {
|
||||||
productId: string;
|
productId: string;
|
||||||
productImages: Array<{
|
productMedia: Array<{
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ProductImagesReorderProvider: React.FC<ProductImagesReorderProviderProps> = ({
|
const ProductMediaReorderProvider: React.FC<ProductMediaReorderProviderProps> = ({
|
||||||
children,
|
children,
|
||||||
productId,
|
productId,
|
||||||
productImages,
|
productMedia,
|
||||||
...mutationProps
|
...mutationProps
|
||||||
}) => {
|
}) => {
|
||||||
const [mutate, mutationResult] = useProductImagesReorder(mutationProps);
|
const [mutate, mutationResult] = useProductMediaReorder(mutationProps);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{children(opts => {
|
{children(opts => {
|
||||||
const productImagesMap = productImages.reduce((prev, curr) => {
|
const productMediaMap = productMedia.reduce((prev, curr) => {
|
||||||
prev[curr.id] = curr;
|
prev[curr.id] = curr;
|
||||||
return prev;
|
return prev;
|
||||||
}, {});
|
}, {});
|
||||||
const newProductImages = opts.variables.imagesIds.map((id, index) => ({
|
const newProductMedia = opts.variables.mediaIds.map((id, index) => ({
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
...productImagesMap[id],
|
...productMediaMap[id],
|
||||||
sortOrder: index
|
sortOrder: index
|
||||||
}));
|
}));
|
||||||
const optimisticResponse: typeof mutationResult["data"] = {
|
const optimisticResponse: typeof mutationResult["data"] = {
|
||||||
productImageReorder: {
|
productMediaReorder: {
|
||||||
__typename: "ProductImageReorder",
|
__typename: "ProductMediaReorder",
|
||||||
errors: null,
|
errors: null,
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: productId,
|
id: productId,
|
||||||
images: newProductImages
|
media: newProductMedia
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return mutate({
|
return mutate({
|
||||||
...opts,
|
...opts,
|
||||||
optimisticResponse
|
optimisticResponse
|
||||||
|
@ -59,4 +60,4 @@ const ProductImagesReorderProvider: React.FC<ProductImagesReorderProviderProps>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ProductImagesReorderProvider;
|
export default ProductMediaReorderProvider;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { ProductVariant } from "@saleor/fragments/types/ProductVariant";
|
import { ProductVariant } from "@saleor/fragments/types/ProductVariant";
|
||||||
import {
|
import {
|
||||||
AttributeInputTypeEnum,
|
AttributeInputTypeEnum,
|
||||||
|
ProductMediaType,
|
||||||
WeightUnitsEnum
|
WeightUnitsEnum
|
||||||
} from "@saleor/types/globalTypes";
|
} from "@saleor/types/globalTypes";
|
||||||
import { warehouseList } from "@saleor/warehouses/fixtures";
|
import { warehouseList } from "@saleor/warehouses/fixtures";
|
||||||
|
@ -206,47 +207,57 @@ export const product: (
|
||||||
defaultVariant: { __typename: "ProductVariant", id: "pv75934" },
|
defaultVariant: { __typename: "ProductVariant", id: "pv75934" },
|
||||||
description: JSON.stringify(content),
|
description: JSON.stringify(content),
|
||||||
id: "p10171",
|
id: "p10171",
|
||||||
images: [
|
|
||||||
{
|
|
||||||
__typename: "ProductImage",
|
|
||||||
alt: "Id sit dolores adipisci",
|
|
||||||
id: "UHJvZHVjdEltYWdlOjE=",
|
|
||||||
sortOrder: 0,
|
|
||||||
url: placeholderImage
|
|
||||||
},
|
|
||||||
{
|
|
||||||
__typename: "ProductImage",
|
|
||||||
alt: "Id sit dolores adipisci",
|
|
||||||
id: "UHJvZHVjdEltYWdlOaE=",
|
|
||||||
sortOrder: 2,
|
|
||||||
url: placeholderImage
|
|
||||||
},
|
|
||||||
{
|
|
||||||
__typename: "ProductImage",
|
|
||||||
alt: "Id sit dolores adipisci",
|
|
||||||
id: "UPJvZHVjdEltYWdlOjV=",
|
|
||||||
sortOrder: 1,
|
|
||||||
url: placeholderImage
|
|
||||||
},
|
|
||||||
{
|
|
||||||
__typename: "ProductImage",
|
|
||||||
alt: "Id sit dolores adipisci",
|
|
||||||
id: "UHJvZHVjdEltYHdlOjX=",
|
|
||||||
sortOrder: 3,
|
|
||||||
url: placeholderImage
|
|
||||||
},
|
|
||||||
{
|
|
||||||
__typename: "ProductImage",
|
|
||||||
alt: "Id sit dolores adipisci",
|
|
||||||
id: "UHJvZHVjdIlnYWdlOjX=",
|
|
||||||
sortOrder: 4,
|
|
||||||
url: placeholderImage
|
|
||||||
}
|
|
||||||
],
|
|
||||||
isAvailable: false,
|
isAvailable: false,
|
||||||
isAvailableForPurchase: false,
|
isAvailableForPurchase: false,
|
||||||
isFeatured: false,
|
isFeatured: false,
|
||||||
margin: { __typename: "Margin", start: 2, stop: 7 },
|
margin: { __typename: "Margin", start: 2, stop: 7 },
|
||||||
|
media: [
|
||||||
|
{
|
||||||
|
__typename: "ProductMedia",
|
||||||
|
alt: "Id sit dolores adipisci",
|
||||||
|
id: "UHJvZHVjdEltYWdlOjE=",
|
||||||
|
sortOrder: 0,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
},
|
||||||
|
{
|
||||||
|
__typename: "ProductMedia",
|
||||||
|
alt: "Id sit dolores adipisci",
|
||||||
|
id: "UHJvZHVjdEltYWdlOaE=",
|
||||||
|
sortOrder: 2,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
},
|
||||||
|
{
|
||||||
|
__typename: "ProductMedia",
|
||||||
|
alt: "Id sit dolores adipisci",
|
||||||
|
id: "UPJvZHVjdEltYWdlOjV=",
|
||||||
|
sortOrder: 1,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
},
|
||||||
|
{
|
||||||
|
__typename: "ProductMedia",
|
||||||
|
alt: "Id sit dolores adipisci",
|
||||||
|
id: "UHJvZHVjdEltYHdlOjX=",
|
||||||
|
sortOrder: 3,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
},
|
||||||
|
{
|
||||||
|
__typename: "ProductMedia",
|
||||||
|
alt: "Id sit dolores adipisci",
|
||||||
|
id: "UHJvZHVjdIlnYWdlOjX=",
|
||||||
|
sortOrder: 4,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
|
url: placeholderImage
|
||||||
|
}
|
||||||
|
],
|
||||||
metadata: [
|
metadata: [
|
||||||
{
|
{
|
||||||
__typename: "MetadataItem",
|
__typename: "MetadataItem",
|
||||||
|
@ -404,19 +415,23 @@ export const product: (
|
||||||
__typename: "ProductVariant",
|
__typename: "ProductVariant",
|
||||||
channelListings: [],
|
channelListings: [],
|
||||||
id: "pv75934",
|
id: "pv75934",
|
||||||
images: [
|
margin: 2,
|
||||||
|
media: [
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "pi92837",
|
id: "pi92837",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "pi92838",
|
id: "pi92838",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
margin: 2,
|
|
||||||
name: "Cordoba Oro",
|
name: "Cordoba Oro",
|
||||||
sku: "87192-94370",
|
sku: "87192-94370",
|
||||||
stocks: [
|
stocks: [
|
||||||
|
@ -485,19 +500,23 @@ export const product: (
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
id: "pv68615",
|
id: "pv68615",
|
||||||
images: [
|
margin: 7,
|
||||||
|
media: [
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "pi81234",
|
id: "pi81234",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "pi1236912",
|
id: "pi1236912",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
margin: 7,
|
|
||||||
name: "silver",
|
name: "silver",
|
||||||
sku: "69055-15190",
|
sku: "69055-15190",
|
||||||
stocks: [
|
stocks: [
|
||||||
|
@ -2679,25 +2698,33 @@ export const variant = (placeholderImage: string): ProductVariant => ({
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
id: "var1",
|
id: "var1",
|
||||||
images: [
|
media: [
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "img1",
|
id: "img1",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "img2",
|
id: "img2",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "img7",
|
id: "img7",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "img8",
|
id: "img8",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -2823,68 +2850,86 @@ export const variant = (placeholderImage: string): ProductVariant => ({
|
||||||
id: "var1"
|
id: "var1"
|
||||||
},
|
},
|
||||||
id: "prod1",
|
id: "prod1",
|
||||||
images: [
|
media: [
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "Front",
|
alt: "Front",
|
||||||
id: "img1",
|
id: "img1",
|
||||||
sortOrder: 1,
|
sortOrder: 1,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "Back",
|
alt: "Back",
|
||||||
id: "img2",
|
id: "img2",
|
||||||
sortOrder: 4,
|
sortOrder: 4,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "Right side",
|
alt: "Right side",
|
||||||
id: "img3",
|
id: "img3",
|
||||||
sortOrder: 2,
|
sortOrder: 2,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "Left side",
|
alt: "Left side",
|
||||||
id: "img4",
|
id: "img4",
|
||||||
sortOrder: 3,
|
sortOrder: 3,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "Paper",
|
alt: "Paper",
|
||||||
id: "img5",
|
id: "img5",
|
||||||
sortOrder: 0,
|
sortOrder: 0,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "Hard cover",
|
alt: "Hard cover",
|
||||||
id: "img6",
|
id: "img6",
|
||||||
sortOrder: 1,
|
sortOrder: 1,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "Extended version",
|
alt: "Extended version",
|
||||||
id: "img7",
|
id: "img7",
|
||||||
sortOrder: 0,
|
sortOrder: 0,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "Cut version",
|
alt: "Cut version",
|
||||||
id: "img8",
|
id: "img8",
|
||||||
sortOrder: 2,
|
sortOrder: 2,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
alt: "Soft cover",
|
alt: "Soft cover",
|
||||||
id: "img9",
|
id: "img9",
|
||||||
sortOrder: 2,
|
sortOrder: 2,
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -2894,10 +2939,12 @@ export const variant = (placeholderImage: string): ProductVariant => ({
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant",
|
__typename: "ProductVariant",
|
||||||
id: "var1",
|
id: "var1",
|
||||||
images: [
|
media: [
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "23123",
|
id: "23123",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -2907,10 +2954,12 @@ export const variant = (placeholderImage: string): ProductVariant => ({
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant",
|
__typename: "ProductVariant",
|
||||||
id: "var2",
|
id: "var2",
|
||||||
images: [
|
media: [
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "23123",
|
id: "23123",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -2920,10 +2969,12 @@ export const variant = (placeholderImage: string): ProductVariant => ({
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant",
|
__typename: "ProductVariant",
|
||||||
id: "var3",
|
id: "var3",
|
||||||
images: [
|
media: [
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "23123",
|
id: "23123",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -2933,10 +2984,12 @@ export const variant = (placeholderImage: string): ProductVariant => ({
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant",
|
__typename: "ProductVariant",
|
||||||
id: "var4",
|
id: "var4",
|
||||||
images: [
|
media: [
|
||||||
{
|
{
|
||||||
__typename: "ProductImage",
|
__typename: "ProductMedia",
|
||||||
id: "23123",
|
id: "23123",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
oembedData: "{}",
|
||||||
url: placeholderImage
|
url: placeholderImage
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -3075,9 +3128,9 @@ export const variant = (placeholderImage: string): ProductVariant => ({
|
||||||
value: 6
|
value: 6
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
export const variantImages = (placeholderImage: string) =>
|
export const variantMedia = (placeholderImage: string) =>
|
||||||
variant(placeholderImage).images;
|
variant(placeholderImage).media;
|
||||||
export const variantProductImages = (placeholderImage: string) =>
|
export const variantProductImages = (placeholderImage: string) =>
|
||||||
variant(placeholderImage).product.images;
|
variant(placeholderImage).product.media;
|
||||||
export const variantSiblings = (placeholderImage: string) =>
|
export const variantSiblings = (placeholderImage: string) =>
|
||||||
variant(placeholderImage).product.variants;
|
variant(placeholderImage).product.variants;
|
||||||
|
|
|
@ -91,7 +91,7 @@ const ProductImage: React.FC<RouteComponentProps<any>> = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProductImageComponent
|
<ProductImageComponent
|
||||||
imageId={decodeURIComponent(match.params.imageId)}
|
mediaId={decodeURIComponent(match.params.imageId)}
|
||||||
productId={decodeURIComponent(match.params.productId)}
|
productId={decodeURIComponent(match.params.productId)}
|
||||||
params={params}
|
params={params}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -13,6 +13,26 @@ import {
|
||||||
productFragmentDetails
|
productFragmentDetails
|
||||||
} from "@saleor/fragments/products";
|
} from "@saleor/fragments/products";
|
||||||
import makeMutation from "@saleor/hooks/makeMutation";
|
import makeMutation from "@saleor/hooks/makeMutation";
|
||||||
|
import {
|
||||||
|
ProductMediaDelete,
|
||||||
|
ProductMediaDeleteVariables
|
||||||
|
} from "@saleor/products/types/ProductMediaDelete";
|
||||||
|
import {
|
||||||
|
ProductMediaReorder,
|
||||||
|
ProductMediaReorderVariables
|
||||||
|
} from "@saleor/products/types/ProductMediaReorder";
|
||||||
|
import {
|
||||||
|
ProductMediaUpdate,
|
||||||
|
ProductMediaUpdateVariables
|
||||||
|
} from "@saleor/products/types/ProductMediaUpdate";
|
||||||
|
import {
|
||||||
|
VariantMediaAssign,
|
||||||
|
VariantMediaAssignVariables
|
||||||
|
} from "@saleor/products/types/VariantMediaAssign";
|
||||||
|
import {
|
||||||
|
VariantMediaUnassign,
|
||||||
|
VariantMediaUnassignVariables
|
||||||
|
} from "@saleor/products/types/VariantMediaUnassign";
|
||||||
import gql from "graphql-tag";
|
import gql from "graphql-tag";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -27,21 +47,9 @@ import { ProductCreate, ProductCreateVariables } from "./types/ProductCreate";
|
||||||
import { ProductDelete, ProductDeleteVariables } from "./types/ProductDelete";
|
import { ProductDelete, ProductDeleteVariables } from "./types/ProductDelete";
|
||||||
import { ProductExport, ProductExportVariables } from "./types/ProductExport";
|
import { ProductExport, ProductExportVariables } from "./types/ProductExport";
|
||||||
import {
|
import {
|
||||||
ProductImageCreate,
|
ProductMediaCreate,
|
||||||
ProductImageCreateVariables
|
ProductMediaCreateVariables
|
||||||
} from "./types/ProductImageCreate";
|
} from "./types/ProductMediaCreate";
|
||||||
import {
|
|
||||||
ProductImageDelete,
|
|
||||||
ProductImageDeleteVariables
|
|
||||||
} from "./types/ProductImageDelete";
|
|
||||||
import {
|
|
||||||
ProductImageReorder,
|
|
||||||
ProductImageReorderVariables
|
|
||||||
} from "./types/ProductImageReorder";
|
|
||||||
import {
|
|
||||||
ProductImageUpdate,
|
|
||||||
ProductImageUpdateVariables
|
|
||||||
} from "./types/ProductImageUpdate";
|
|
||||||
import { ProductUpdate, ProductUpdateVariables } from "./types/ProductUpdate";
|
import { ProductUpdate, ProductUpdateVariables } from "./types/ProductUpdate";
|
||||||
import {
|
import {
|
||||||
ProductVariantBulkCreate,
|
ProductVariantBulkCreate,
|
||||||
|
@ -69,21 +77,25 @@ import {
|
||||||
} from "./types/SimpleProductUpdate";
|
} from "./types/SimpleProductUpdate";
|
||||||
import { VariantCreate, VariantCreateVariables } from "./types/VariantCreate";
|
import { VariantCreate, VariantCreateVariables } from "./types/VariantCreate";
|
||||||
import { VariantDelete, VariantDeleteVariables } from "./types/VariantDelete";
|
import { VariantDelete, VariantDeleteVariables } from "./types/VariantDelete";
|
||||||
import {
|
|
||||||
VariantImageAssign,
|
|
||||||
VariantImageAssignVariables
|
|
||||||
} from "./types/VariantImageAssign";
|
|
||||||
import {
|
|
||||||
VariantImageUnassign,
|
|
||||||
VariantImageUnassignVariables
|
|
||||||
} from "./types/VariantImageUnassign";
|
|
||||||
import { VariantUpdate, VariantUpdateVariables } from "./types/VariantUpdate";
|
import { VariantUpdate, VariantUpdateVariables } from "./types/VariantUpdate";
|
||||||
|
|
||||||
export const productImageCreateMutation = gql`
|
export const productMediaCreateMutation = gql`
|
||||||
${productErrorFragment}
|
${productErrorFragment}
|
||||||
${productFragmentDetails}
|
${productFragmentDetails}
|
||||||
mutation ProductImageCreate($product: ID!, $image: Upload!, $alt: String) {
|
mutation ProductMediaCreate(
|
||||||
productImageCreate(input: { alt: $alt, image: $image, product: $product }) {
|
$product: ID!
|
||||||
|
$image: Upload
|
||||||
|
$alt: String
|
||||||
|
$mediaUrl: String
|
||||||
|
) {
|
||||||
|
productMediaCreate(
|
||||||
|
input: {
|
||||||
|
alt: $alt
|
||||||
|
image: $image
|
||||||
|
product: $product
|
||||||
|
mediaUrl: $mediaUrl
|
||||||
|
}
|
||||||
|
) {
|
||||||
errors: productErrors {
|
errors: productErrors {
|
||||||
...ProductErrorFragment
|
...ProductErrorFragment
|
||||||
}
|
}
|
||||||
|
@ -93,10 +105,10 @@ export const productImageCreateMutation = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const useProductImageCreateMutation = makeMutation<
|
export const useProductMediaCreateMutation = makeMutation<
|
||||||
ProductImageCreate,
|
ProductMediaCreate,
|
||||||
ProductImageCreateVariables
|
ProductMediaCreateVariables
|
||||||
>(productImageCreateMutation);
|
>(productMediaCreateMutation);
|
||||||
|
|
||||||
export const productDeleteMutation = gql`
|
export const productDeleteMutation = gql`
|
||||||
${productErrorFragment}
|
${productErrorFragment}
|
||||||
|
@ -116,16 +128,16 @@ export const useProductDeleteMutation = makeMutation<
|
||||||
ProductDeleteVariables
|
ProductDeleteVariables
|
||||||
>(productDeleteMutation);
|
>(productDeleteMutation);
|
||||||
|
|
||||||
export const productImagesReorder = gql`
|
export const productMediaReorder = gql`
|
||||||
${productErrorFragment}
|
${productErrorFragment}
|
||||||
mutation ProductImageReorder($productId: ID!, $imagesIds: [ID]!) {
|
mutation ProductMediaReorder($productId: ID!, $mediaIds: [ID]!) {
|
||||||
productImageReorder(productId: $productId, imagesIds: $imagesIds) {
|
productMediaReorder(productId: $productId, mediaIds: $mediaIds) {
|
||||||
errors: productErrors {
|
errors: productErrors {
|
||||||
...ProductErrorFragment
|
...ProductErrorFragment
|
||||||
}
|
}
|
||||||
product {
|
product {
|
||||||
id
|
id
|
||||||
images {
|
media {
|
||||||
id
|
id
|
||||||
alt
|
alt
|
||||||
sortOrder
|
sortOrder
|
||||||
|
@ -135,10 +147,10 @@ export const productImagesReorder = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const useProductImagesReorder = makeMutation<
|
export const useProductMediaReorder = makeMutation<
|
||||||
ProductImageReorder,
|
ProductMediaReorder,
|
||||||
ProductImageReorderVariables
|
ProductMediaReorderVariables
|
||||||
>(productImagesReorder);
|
>(productMediaReorder);
|
||||||
|
|
||||||
const productVariantSetDefault = gql`
|
const productVariantSetDefault = gql`
|
||||||
${productErrorFragment}
|
${productErrorFragment}
|
||||||
|
@ -374,32 +386,32 @@ export const useVariantCreateMutation = makeMutation<
|
||||||
VariantCreateVariables
|
VariantCreateVariables
|
||||||
>(variantCreateMutation);
|
>(variantCreateMutation);
|
||||||
|
|
||||||
export const productImageDeleteMutation = gql`
|
export const productMediaDeleteMutation = gql`
|
||||||
${productErrorFragment}
|
${productErrorFragment}
|
||||||
mutation ProductImageDelete($id: ID!) {
|
mutation ProductMediaDelete($id: ID!) {
|
||||||
productImageDelete(id: $id) {
|
productMediaDelete(id: $id) {
|
||||||
errors: productErrors {
|
errors: productErrors {
|
||||||
...ProductErrorFragment
|
...ProductErrorFragment
|
||||||
}
|
}
|
||||||
product {
|
product {
|
||||||
id
|
id
|
||||||
images {
|
media {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const useProductImageDeleteMutation = makeMutation<
|
export const useProductMediaDeleteMutation = makeMutation<
|
||||||
ProductImageDelete,
|
ProductMediaDelete,
|
||||||
ProductImageDeleteVariables
|
ProductMediaDeleteVariables
|
||||||
>(productImageDeleteMutation);
|
>(productMediaDeleteMutation);
|
||||||
|
|
||||||
export const productImageUpdateMutation = gql`
|
export const productMediaUpdateMutation = gql`
|
||||||
${productErrorFragment}
|
${productErrorFragment}
|
||||||
${productFragmentDetails}
|
${productFragmentDetails}
|
||||||
mutation ProductImageUpdate($id: ID!, $alt: String!) {
|
mutation ProductMediaUpdate($id: ID!, $alt: String!) {
|
||||||
productImageUpdate(id: $id, input: { alt: $alt }) {
|
productMediaUpdate(id: $id, input: { alt: $alt }) {
|
||||||
errors: productErrors {
|
errors: productErrors {
|
||||||
...ProductErrorFragment
|
...ProductErrorFragment
|
||||||
}
|
}
|
||||||
|
@ -409,16 +421,16 @@ export const productImageUpdateMutation = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const useProductImageUpdateMutation = makeMutation<
|
export const useProductMediaUpdateMutation = makeMutation<
|
||||||
ProductImageUpdate,
|
ProductMediaUpdate,
|
||||||
ProductImageUpdateVariables
|
ProductMediaUpdateVariables
|
||||||
>(productImageUpdateMutation);
|
>(productMediaUpdateMutation);
|
||||||
|
|
||||||
export const variantImageAssignMutation = gql`
|
export const variantMediaAssignMutation = gql`
|
||||||
${fragmentVariant}
|
${fragmentVariant}
|
||||||
${productErrorFragment}
|
${productErrorFragment}
|
||||||
mutation VariantImageAssign($variantId: ID!, $imageId: ID!) {
|
mutation VariantMediaAssign($variantId: ID!, $mediaId: ID!) {
|
||||||
variantImageAssign(variantId: $variantId, imageId: $imageId) {
|
variantMediaAssign(variantId: $variantId, mediaId: $mediaId) {
|
||||||
errors: productErrors {
|
errors: productErrors {
|
||||||
...ProductErrorFragment
|
...ProductErrorFragment
|
||||||
}
|
}
|
||||||
|
@ -428,16 +440,16 @@ export const variantImageAssignMutation = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const useVariantImageAssignMutation = makeMutation<
|
export const useVariantMediaAssignMutation = makeMutation<
|
||||||
VariantImageAssign,
|
VariantMediaAssign,
|
||||||
VariantImageAssignVariables
|
VariantMediaAssignVariables
|
||||||
>(variantImageAssignMutation);
|
>(variantMediaAssignMutation);
|
||||||
|
|
||||||
export const variantImageUnassignMutation = gql`
|
export const variantMediaUnassignMutation = gql`
|
||||||
${fragmentVariant}
|
${fragmentVariant}
|
||||||
${productErrorFragment}
|
${productErrorFragment}
|
||||||
mutation VariantImageUnassign($variantId: ID!, $imageId: ID!) {
|
mutation VariantMediaUnassign($variantId: ID!, $mediaId: ID!) {
|
||||||
variantImageUnassign(variantId: $variantId, imageId: $imageId) {
|
variantMediaUnassign(variantId: $variantId, mediaId: $mediaId) {
|
||||||
errors: productErrors {
|
errors: productErrors {
|
||||||
...ProductErrorFragment
|
...ProductErrorFragment
|
||||||
}
|
}
|
||||||
|
@ -447,10 +459,10 @@ export const variantImageUnassignMutation = gql`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const useVariantImageUnassignMutation = makeMutation<
|
export const useVariantMediaUnassignMutation = makeMutation<
|
||||||
VariantImageUnassign,
|
VariantMediaUnassign,
|
||||||
VariantImageUnassignVariables
|
VariantMediaUnassignVariables
|
||||||
>(variantImageUnassignMutation);
|
>(variantMediaUnassignMutation);
|
||||||
|
|
||||||
export const productBulkDeleteMutation = gql`
|
export const productBulkDeleteMutation = gql`
|
||||||
${productErrorFragment}
|
${productErrorFragment}
|
||||||
|
|
|
@ -10,6 +10,10 @@ import {
|
||||||
import { taxTypeFragment } from "@saleor/fragments/taxes";
|
import { taxTypeFragment } from "@saleor/fragments/taxes";
|
||||||
import { warehouseFragment } from "@saleor/fragments/warehouses";
|
import { warehouseFragment } from "@saleor/fragments/warehouses";
|
||||||
import makeQuery from "@saleor/hooks/makeQuery";
|
import makeQuery from "@saleor/hooks/makeQuery";
|
||||||
|
import {
|
||||||
|
ProductMediaById,
|
||||||
|
ProductMediaByIdVariables
|
||||||
|
} from "@saleor/products/types/ProductMediaById";
|
||||||
import gql from "graphql-tag";
|
import gql from "graphql-tag";
|
||||||
|
|
||||||
import { CountAllProducts } from "./types/CountAllProducts";
|
import { CountAllProducts } from "./types/CountAllProducts";
|
||||||
|
@ -29,10 +33,6 @@ import {
|
||||||
ProductDetails,
|
ProductDetails,
|
||||||
ProductDetailsVariables
|
ProductDetailsVariables
|
||||||
} from "./types/ProductDetails";
|
} from "./types/ProductDetails";
|
||||||
import {
|
|
||||||
ProductImageById,
|
|
||||||
ProductImageByIdVariables
|
|
||||||
} from "./types/ProductImageById";
|
|
||||||
import { ProductList, ProductListVariables } from "./types/ProductList";
|
import { ProductList, ProductListVariables } from "./types/ProductList";
|
||||||
import {
|
import {
|
||||||
ProductVariantCreateData,
|
ProductVariantCreateData,
|
||||||
|
@ -191,7 +191,7 @@ const productVariantCreateQuery = gql`
|
||||||
query ProductVariantCreateData($id: ID!) {
|
query ProductVariantCreateData($id: ID!) {
|
||||||
product(id: $id) {
|
product(id: $id) {
|
||||||
id
|
id
|
||||||
images {
|
media {
|
||||||
id
|
id
|
||||||
sortOrder
|
sortOrder
|
||||||
url
|
url
|
||||||
|
@ -224,9 +224,10 @@ const productVariantCreateQuery = gql`
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
sku
|
sku
|
||||||
images {
|
media {
|
||||||
id
|
id
|
||||||
url
|
url
|
||||||
|
type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -237,27 +238,32 @@ export const useProductVariantCreateQuery = makeQuery<
|
||||||
ProductVariantCreateDataVariables
|
ProductVariantCreateDataVariables
|
||||||
>(productVariantCreateQuery);
|
>(productVariantCreateQuery);
|
||||||
|
|
||||||
const productImageQuery = gql`
|
const productMediaQuery = gql`
|
||||||
query ProductImageById($productId: ID!, $imageId: ID!) {
|
query ProductMediaById($productId: ID!, $mediaId: ID!) {
|
||||||
product(id: $productId) {
|
product(id: $productId) {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
mainImage: imageById(id: $imageId) {
|
mainImage: mediaById(id: $mediaId) {
|
||||||
id
|
id
|
||||||
alt
|
alt
|
||||||
url
|
url
|
||||||
|
type
|
||||||
|
oembedData
|
||||||
}
|
}
|
||||||
images {
|
media {
|
||||||
id
|
id
|
||||||
url(size: 48)
|
url(size: 48)
|
||||||
|
alt
|
||||||
|
type
|
||||||
|
oembedData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const useProductImageQuery = makeQuery<
|
export const useProductMediaQuery = makeQuery<
|
||||||
ProductImageById,
|
ProductMediaById,
|
||||||
ProductImageByIdVariables
|
ProductMediaByIdVariables
|
||||||
>(productImageQuery);
|
>(productMediaQuery);
|
||||||
|
|
||||||
const availableInGridAttributes = gql`
|
const availableInGridAttributes = gql`
|
||||||
${pageInfoFragment}
|
${pageInfoFragment}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { ProductChannelListingUpdateInput, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum, ProductErrorCode } from "./../../types/globalTypes";
|
import { ProductChannelListingUpdateInput, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum, ProductErrorCode } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: ProductChannelListingUpdate
|
// GraphQL mutation operation: ProductChannelListingUpdate
|
||||||
|
@ -172,12 +172,14 @@ export interface ProductChannelListingUpdate_productChannelListingUpdate_product
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductChannelListingUpdate_productChannelListingUpdate_product_images {
|
export interface ProductChannelListingUpdate_productChannelListingUpdate_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductChannelListingUpdate_productChannelListingUpdate_product_variants_stocks_warehouse {
|
export interface ProductChannelListingUpdate_productChannelListingUpdate_product_variants_stocks_warehouse {
|
||||||
|
@ -261,7 +263,7 @@ export interface ProductChannelListingUpdate_productChannelListingUpdate_product
|
||||||
category: ProductChannelListingUpdate_productChannelListingUpdate_product_category | null;
|
category: ProductChannelListingUpdate_productChannelListingUpdate_product_category | null;
|
||||||
collections: (ProductChannelListingUpdate_productChannelListingUpdate_product_collections | null)[] | null;
|
collections: (ProductChannelListingUpdate_productChannelListingUpdate_product_collections | null)[] | null;
|
||||||
chargeTaxes: boolean;
|
chargeTaxes: boolean;
|
||||||
images: (ProductChannelListingUpdate_productChannelListingUpdate_product_images | null)[] | null;
|
media: (ProductChannelListingUpdate_productChannelListingUpdate_product_media | null)[] | null;
|
||||||
isAvailable: boolean | null;
|
isAvailable: boolean | null;
|
||||||
variants: (ProductChannelListingUpdate_productChannelListingUpdate_product_variants | null)[] | null;
|
variants: (ProductChannelListingUpdate_productChannelListingUpdate_product_variants | null)[] | null;
|
||||||
weight: ProductChannelListingUpdate_productChannelListingUpdate_product_weight | null;
|
weight: ProductChannelListingUpdate_productChannelListingUpdate_product_weight | null;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { ProductCreateInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { ProductCreateInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: ProductCreate
|
// GraphQL mutation operation: ProductCreate
|
||||||
|
@ -179,12 +179,14 @@ export interface ProductCreate_productCreate_product_collections {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductCreate_productCreate_product_images {
|
export interface ProductCreate_productCreate_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductCreate_productCreate_product_variants_stocks_warehouse {
|
export interface ProductCreate_productCreate_product_variants_stocks_warehouse {
|
||||||
|
@ -268,7 +270,7 @@ export interface ProductCreate_productCreate_product {
|
||||||
category: ProductCreate_productCreate_product_category | null;
|
category: ProductCreate_productCreate_product_category | null;
|
||||||
collections: (ProductCreate_productCreate_product_collections | null)[] | null;
|
collections: (ProductCreate_productCreate_product_collections | null)[] | null;
|
||||||
chargeTaxes: boolean;
|
chargeTaxes: boolean;
|
||||||
images: (ProductCreate_productCreate_product_images | null)[] | null;
|
media: (ProductCreate_productCreate_product_media | null)[] | null;
|
||||||
isAvailable: boolean | null;
|
isAvailable: boolean | null;
|
||||||
variants: (ProductCreate_productCreate_product_variants | null)[] | null;
|
variants: (ProductCreate_productCreate_product_variants | null)[] | null;
|
||||||
weight: ProductCreate_productCreate_product_weight | null;
|
weight: ProductCreate_productCreate_product_weight | null;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL query operation: ProductDetails
|
// GraphQL query operation: ProductDetails
|
||||||
|
@ -172,12 +172,14 @@ export interface ProductDetails_product_collections {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductDetails_product_images {
|
export interface ProductDetails_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductDetails_product_variants_stocks_warehouse {
|
export interface ProductDetails_product_variants_stocks_warehouse {
|
||||||
|
@ -261,7 +263,7 @@ export interface ProductDetails_product {
|
||||||
category: ProductDetails_product_category | null;
|
category: ProductDetails_product_category | null;
|
||||||
collections: (ProductDetails_product_collections | null)[] | null;
|
collections: (ProductDetails_product_collections | null)[] | null;
|
||||||
chargeTaxes: boolean;
|
chargeTaxes: boolean;
|
||||||
images: (ProductDetails_product_images | null)[] | null;
|
media: (ProductDetails_product_media | null)[] | null;
|
||||||
isAvailable: boolean | null;
|
isAvailable: boolean | null;
|
||||||
variants: (ProductDetails_product_variants | null)[] | null;
|
variants: (ProductDetails_product_variants | null)[] | null;
|
||||||
weight: ProductDetails_product_weight | null;
|
weight: ProductDetails_product_weight | null;
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
// This file was automatically generated and should not be edited.
|
|
||||||
|
|
||||||
// ====================================================
|
|
||||||
// GraphQL query operation: ProductImageById
|
|
||||||
// ====================================================
|
|
||||||
|
|
||||||
export interface ProductImageById_product_mainImage {
|
|
||||||
__typename: "ProductImage";
|
|
||||||
id: string;
|
|
||||||
alt: string;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageById_product_images {
|
|
||||||
__typename: "ProductImage";
|
|
||||||
id: string;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageById_product {
|
|
||||||
__typename: "Product";
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
mainImage: ProductImageById_product_mainImage | null;
|
|
||||||
images: (ProductImageById_product_images | null)[] | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageById {
|
|
||||||
product: ProductImageById_product | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageByIdVariables {
|
|
||||||
productId: string;
|
|
||||||
imageId: string;
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
// This file was automatically generated and should not be edited.
|
|
||||||
|
|
||||||
import { ProductErrorCode } from "./../../types/globalTypes";
|
|
||||||
|
|
||||||
// ====================================================
|
|
||||||
// GraphQL mutation operation: ProductImageDelete
|
|
||||||
// ====================================================
|
|
||||||
|
|
||||||
export interface ProductImageDelete_productImageDelete_errors {
|
|
||||||
__typename: "ProductError";
|
|
||||||
code: ProductErrorCode;
|
|
||||||
field: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageDelete_productImageDelete_product_images {
|
|
||||||
__typename: "ProductImage";
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageDelete_productImageDelete_product {
|
|
||||||
__typename: "Product";
|
|
||||||
id: string;
|
|
||||||
images: (ProductImageDelete_productImageDelete_product_images | null)[] | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageDelete_productImageDelete {
|
|
||||||
__typename: "ProductImageDelete";
|
|
||||||
errors: ProductImageDelete_productImageDelete_errors[];
|
|
||||||
product: ProductImageDelete_productImageDelete_product | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageDelete {
|
|
||||||
productImageDelete: ProductImageDelete_productImageDelete | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageDeleteVariables {
|
|
||||||
id: string;
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
// This file was automatically generated and should not be edited.
|
|
||||||
|
|
||||||
import { ProductErrorCode } from "./../../types/globalTypes";
|
|
||||||
|
|
||||||
// ====================================================
|
|
||||||
// GraphQL mutation operation: ProductImageReorder
|
|
||||||
// ====================================================
|
|
||||||
|
|
||||||
export interface ProductImageReorder_productImageReorder_errors {
|
|
||||||
__typename: "ProductError";
|
|
||||||
code: ProductErrorCode;
|
|
||||||
field: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageReorder_productImageReorder_product_images {
|
|
||||||
__typename: "ProductImage";
|
|
||||||
id: string;
|
|
||||||
alt: string;
|
|
||||||
sortOrder: number | null;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageReorder_productImageReorder_product {
|
|
||||||
__typename: "Product";
|
|
||||||
id: string;
|
|
||||||
images: (ProductImageReorder_productImageReorder_product_images | null)[] | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageReorder_productImageReorder {
|
|
||||||
__typename: "ProductImageReorder";
|
|
||||||
errors: ProductImageReorder_productImageReorder_errors[];
|
|
||||||
product: ProductImageReorder_productImageReorder_product | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageReorder {
|
|
||||||
productImageReorder: ProductImageReorder_productImageReorder | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductImageReorderVariables {
|
|
||||||
productId: string;
|
|
||||||
imagesIds: (string | null)[];
|
|
||||||
}
|
|
44
src/products/types/ProductMediaById.ts
Normal file
44
src/products/types/ProductMediaById.ts
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
|
import { ProductMediaType } from "./../../types/globalTypes";
|
||||||
|
|
||||||
|
// ====================================================
|
||||||
|
// GraphQL query operation: ProductMediaById
|
||||||
|
// ====================================================
|
||||||
|
|
||||||
|
export interface ProductMediaById_product_mainImage {
|
||||||
|
__typename: "ProductMedia";
|
||||||
|
id: string;
|
||||||
|
alt: string;
|
||||||
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaById_product_media {
|
||||||
|
__typename: "ProductMedia";
|
||||||
|
id: string;
|
||||||
|
url: string;
|
||||||
|
alt: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaById_product {
|
||||||
|
__typename: "Product";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
mainImage: ProductMediaById_product_mainImage;
|
||||||
|
media: (ProductMediaById_product_media | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaById {
|
||||||
|
product: ProductMediaById_product | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaByIdVariables {
|
||||||
|
productId: string;
|
||||||
|
mediaId: string;
|
||||||
|
}
|
294
src/products/types/ProductMediaCreate.ts
Normal file
294
src/products/types/ProductMediaCreate.ts
Normal file
|
@ -0,0 +1,294 @@
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
|
import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
|
// ====================================================
|
||||||
|
// GraphQL mutation operation: ProductMediaCreate
|
||||||
|
// ====================================================
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_errors {
|
||||||
|
__typename: "ProductError";
|
||||||
|
code: ProductErrorCode;
|
||||||
|
field: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_attributes_attribute_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_attributes_attribute_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: ProductMediaCreate_productMediaCreate_product_attributes_attribute_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_attributes_attribute {
|
||||||
|
__typename: "Attribute";
|
||||||
|
id: string;
|
||||||
|
slug: string | null;
|
||||||
|
name: string | null;
|
||||||
|
inputType: AttributeInputTypeEnum | null;
|
||||||
|
entityType: AttributeEntityTypeEnum | null;
|
||||||
|
valueRequired: boolean;
|
||||||
|
values: (ProductMediaCreate_productMediaCreate_product_attributes_attribute_values | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_attributes_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_attributes_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: ProductMediaCreate_productMediaCreate_product_attributes_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_attributes {
|
||||||
|
__typename: "SelectedAttribute";
|
||||||
|
attribute: ProductMediaCreate_productMediaCreate_product_attributes_attribute;
|
||||||
|
values: (ProductMediaCreate_productMediaCreate_product_attributes_values | null)[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_productType_variantAttributes_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_productType_variantAttributes_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: ProductMediaCreate_productMediaCreate_product_productType_variantAttributes_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_productType_variantAttributes {
|
||||||
|
__typename: "Attribute";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
values: (ProductMediaCreate_productMediaCreate_product_productType_variantAttributes_values | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_productType_taxType {
|
||||||
|
__typename: "TaxType";
|
||||||
|
description: string | null;
|
||||||
|
taxCode: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_productType {
|
||||||
|
__typename: "ProductType";
|
||||||
|
id: string;
|
||||||
|
variantAttributes: (ProductMediaCreate_productMediaCreate_product_productType_variantAttributes | null)[] | null;
|
||||||
|
name: string;
|
||||||
|
hasVariants: boolean;
|
||||||
|
taxType: ProductMediaCreate_productMediaCreate_product_productType_taxType | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_channelListings_channel {
|
||||||
|
__typename: "Channel";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
currencyCode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange_start_net {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange_start {
|
||||||
|
__typename: "TaxedMoney";
|
||||||
|
net: ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange_start_net;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange_stop_net {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange_stop {
|
||||||
|
__typename: "TaxedMoney";
|
||||||
|
net: ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange_stop_net;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange {
|
||||||
|
__typename: "TaxedMoneyRange";
|
||||||
|
start: ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange_start | null;
|
||||||
|
stop: ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange_stop | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_channelListings_pricing {
|
||||||
|
__typename: "ProductPricingInfo";
|
||||||
|
priceRange: ProductMediaCreate_productMediaCreate_product_channelListings_pricing_priceRange | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_channelListings {
|
||||||
|
__typename: "ProductChannelListing";
|
||||||
|
channel: ProductMediaCreate_productMediaCreate_product_channelListings_channel;
|
||||||
|
pricing: ProductMediaCreate_productMediaCreate_product_channelListings_pricing | null;
|
||||||
|
isPublished: boolean;
|
||||||
|
publicationDate: any | null;
|
||||||
|
isAvailableForPurchase: boolean | null;
|
||||||
|
availableForPurchase: any | null;
|
||||||
|
visibleInListings: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_metadata {
|
||||||
|
__typename: "MetadataItem";
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_privateMetadata {
|
||||||
|
__typename: "MetadataItem";
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_defaultVariant {
|
||||||
|
__typename: "ProductVariant";
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_category {
|
||||||
|
__typename: "Category";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_collections {
|
||||||
|
__typename: "Collection";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_media {
|
||||||
|
__typename: "ProductMedia";
|
||||||
|
id: string;
|
||||||
|
alt: string;
|
||||||
|
sortOrder: number | null;
|
||||||
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_variants_stocks_warehouse {
|
||||||
|
__typename: "Warehouse";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_variants_stocks {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
quantityAllocated: number;
|
||||||
|
warehouse: ProductMediaCreate_productMediaCreate_product_variants_stocks_warehouse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_variants_channelListings_channel {
|
||||||
|
__typename: "Channel";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
currencyCode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_variants_channelListings_price {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_variants_channelListings_costPrice {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_variants_channelListings {
|
||||||
|
__typename: "ProductVariantChannelListing";
|
||||||
|
channel: ProductMediaCreate_productMediaCreate_product_variants_channelListings_channel;
|
||||||
|
price: ProductMediaCreate_productMediaCreate_product_variants_channelListings_price | null;
|
||||||
|
costPrice: ProductMediaCreate_productMediaCreate_product_variants_channelListings_costPrice | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_variants {
|
||||||
|
__typename: "ProductVariant";
|
||||||
|
id: string;
|
||||||
|
sku: string;
|
||||||
|
name: string;
|
||||||
|
margin: number | null;
|
||||||
|
stocks: (ProductMediaCreate_productMediaCreate_product_variants_stocks | null)[] | null;
|
||||||
|
trackInventory: boolean;
|
||||||
|
channelListings: ProductMediaCreate_productMediaCreate_product_variants_channelListings[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_weight {
|
||||||
|
__typename: "Weight";
|
||||||
|
unit: WeightUnitsEnum;
|
||||||
|
value: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product_taxType {
|
||||||
|
__typename: "TaxType";
|
||||||
|
description: string | null;
|
||||||
|
taxCode: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate_product {
|
||||||
|
__typename: "Product";
|
||||||
|
id: string;
|
||||||
|
attributes: ProductMediaCreate_productMediaCreate_product_attributes[];
|
||||||
|
productType: ProductMediaCreate_productMediaCreate_product_productType;
|
||||||
|
channelListings: ProductMediaCreate_productMediaCreate_product_channelListings[] | null;
|
||||||
|
metadata: (ProductMediaCreate_productMediaCreate_product_metadata | null)[];
|
||||||
|
privateMetadata: (ProductMediaCreate_productMediaCreate_product_privateMetadata | null)[];
|
||||||
|
name: string;
|
||||||
|
slug: string;
|
||||||
|
description: any | null;
|
||||||
|
seoTitle: string | null;
|
||||||
|
seoDescription: string | null;
|
||||||
|
rating: number | null;
|
||||||
|
defaultVariant: ProductMediaCreate_productMediaCreate_product_defaultVariant | null;
|
||||||
|
category: ProductMediaCreate_productMediaCreate_product_category | null;
|
||||||
|
collections: (ProductMediaCreate_productMediaCreate_product_collections | null)[] | null;
|
||||||
|
chargeTaxes: boolean;
|
||||||
|
media: (ProductMediaCreate_productMediaCreate_product_media | null)[] | null;
|
||||||
|
isAvailable: boolean | null;
|
||||||
|
variants: (ProductMediaCreate_productMediaCreate_product_variants | null)[] | null;
|
||||||
|
weight: ProductMediaCreate_productMediaCreate_product_weight | null;
|
||||||
|
taxType: ProductMediaCreate_productMediaCreate_product_taxType | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate_productMediaCreate {
|
||||||
|
__typename: "ProductMediaCreate";
|
||||||
|
errors: ProductMediaCreate_productMediaCreate_errors[];
|
||||||
|
product: ProductMediaCreate_productMediaCreate_product | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreate {
|
||||||
|
productMediaCreate: ProductMediaCreate_productMediaCreate | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaCreateVariables {
|
||||||
|
product: string;
|
||||||
|
image?: any | null;
|
||||||
|
alt?: string | null;
|
||||||
|
mediaUrl?: string | null;
|
||||||
|
}
|
40
src/products/types/ProductMediaDelete.ts
Normal file
40
src/products/types/ProductMediaDelete.ts
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
|
import { ProductErrorCode } from "./../../types/globalTypes";
|
||||||
|
|
||||||
|
// ====================================================
|
||||||
|
// GraphQL mutation operation: ProductMediaDelete
|
||||||
|
// ====================================================
|
||||||
|
|
||||||
|
export interface ProductMediaDelete_productMediaDelete_errors {
|
||||||
|
__typename: "ProductError";
|
||||||
|
code: ProductErrorCode;
|
||||||
|
field: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaDelete_productMediaDelete_product_media {
|
||||||
|
__typename: "ProductMedia";
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaDelete_productMediaDelete_product {
|
||||||
|
__typename: "Product";
|
||||||
|
id: string;
|
||||||
|
media: (ProductMediaDelete_productMediaDelete_product_media | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaDelete_productMediaDelete {
|
||||||
|
__typename: "ProductMediaDelete";
|
||||||
|
errors: ProductMediaDelete_productMediaDelete_errors[];
|
||||||
|
product: ProductMediaDelete_productMediaDelete_product | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaDelete {
|
||||||
|
productMediaDelete: ProductMediaDelete_productMediaDelete | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaDeleteVariables {
|
||||||
|
id: string;
|
||||||
|
}
|
44
src/products/types/ProductMediaReorder.ts
Normal file
44
src/products/types/ProductMediaReorder.ts
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
|
import { ProductErrorCode } from "./../../types/globalTypes";
|
||||||
|
|
||||||
|
// ====================================================
|
||||||
|
// GraphQL mutation operation: ProductMediaReorder
|
||||||
|
// ====================================================
|
||||||
|
|
||||||
|
export interface ProductMediaReorder_productMediaReorder_errors {
|
||||||
|
__typename: "ProductError";
|
||||||
|
code: ProductErrorCode;
|
||||||
|
field: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaReorder_productMediaReorder_product_media {
|
||||||
|
__typename: "ProductMedia";
|
||||||
|
id: string;
|
||||||
|
alt: string;
|
||||||
|
sortOrder: number | null;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaReorder_productMediaReorder_product {
|
||||||
|
__typename: "Product";
|
||||||
|
id: string;
|
||||||
|
media: (ProductMediaReorder_productMediaReorder_product_media | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaReorder_productMediaReorder {
|
||||||
|
__typename: "ProductMediaReorder";
|
||||||
|
errors: ProductMediaReorder_productMediaReorder_errors[];
|
||||||
|
product: ProductMediaReorder_productMediaReorder_product | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaReorder {
|
||||||
|
productMediaReorder: ProductMediaReorder_productMediaReorder | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaReorderVariables {
|
||||||
|
productId: string;
|
||||||
|
mediaIds: (string | null)[];
|
||||||
|
}
|
292
src/products/types/ProductMediaUpdate.ts
Normal file
292
src/products/types/ProductMediaUpdate.ts
Normal file
|
@ -0,0 +1,292 @@
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
|
import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
|
// ====================================================
|
||||||
|
// GraphQL mutation operation: ProductMediaUpdate
|
||||||
|
// ====================================================
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_errors {
|
||||||
|
__typename: "ProductError";
|
||||||
|
code: ProductErrorCode;
|
||||||
|
field: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_attributes_attribute_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_attributes_attribute_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: ProductMediaUpdate_productMediaUpdate_product_attributes_attribute_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_attributes_attribute {
|
||||||
|
__typename: "Attribute";
|
||||||
|
id: string;
|
||||||
|
slug: string | null;
|
||||||
|
name: string | null;
|
||||||
|
inputType: AttributeInputTypeEnum | null;
|
||||||
|
entityType: AttributeEntityTypeEnum | null;
|
||||||
|
valueRequired: boolean;
|
||||||
|
values: (ProductMediaUpdate_productMediaUpdate_product_attributes_attribute_values | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_attributes_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_attributes_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: ProductMediaUpdate_productMediaUpdate_product_attributes_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_attributes {
|
||||||
|
__typename: "SelectedAttribute";
|
||||||
|
attribute: ProductMediaUpdate_productMediaUpdate_product_attributes_attribute;
|
||||||
|
values: (ProductMediaUpdate_productMediaUpdate_product_attributes_values | null)[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_productType_variantAttributes_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_productType_variantAttributes_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: ProductMediaUpdate_productMediaUpdate_product_productType_variantAttributes_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_productType_variantAttributes {
|
||||||
|
__typename: "Attribute";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
values: (ProductMediaUpdate_productMediaUpdate_product_productType_variantAttributes_values | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_productType_taxType {
|
||||||
|
__typename: "TaxType";
|
||||||
|
description: string | null;
|
||||||
|
taxCode: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_productType {
|
||||||
|
__typename: "ProductType";
|
||||||
|
id: string;
|
||||||
|
variantAttributes: (ProductMediaUpdate_productMediaUpdate_product_productType_variantAttributes | null)[] | null;
|
||||||
|
name: string;
|
||||||
|
hasVariants: boolean;
|
||||||
|
taxType: ProductMediaUpdate_productMediaUpdate_product_productType_taxType | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_channelListings_channel {
|
||||||
|
__typename: "Channel";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
currencyCode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange_start_net {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange_start {
|
||||||
|
__typename: "TaxedMoney";
|
||||||
|
net: ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange_start_net;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange_stop_net {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange_stop {
|
||||||
|
__typename: "TaxedMoney";
|
||||||
|
net: ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange_stop_net;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange {
|
||||||
|
__typename: "TaxedMoneyRange";
|
||||||
|
start: ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange_start | null;
|
||||||
|
stop: ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange_stop | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing {
|
||||||
|
__typename: "ProductPricingInfo";
|
||||||
|
priceRange: ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing_priceRange | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_channelListings {
|
||||||
|
__typename: "ProductChannelListing";
|
||||||
|
channel: ProductMediaUpdate_productMediaUpdate_product_channelListings_channel;
|
||||||
|
pricing: ProductMediaUpdate_productMediaUpdate_product_channelListings_pricing | null;
|
||||||
|
isPublished: boolean;
|
||||||
|
publicationDate: any | null;
|
||||||
|
isAvailableForPurchase: boolean | null;
|
||||||
|
availableForPurchase: any | null;
|
||||||
|
visibleInListings: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_metadata {
|
||||||
|
__typename: "MetadataItem";
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_privateMetadata {
|
||||||
|
__typename: "MetadataItem";
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_defaultVariant {
|
||||||
|
__typename: "ProductVariant";
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_category {
|
||||||
|
__typename: "Category";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_collections {
|
||||||
|
__typename: "Collection";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_media {
|
||||||
|
__typename: "ProductMedia";
|
||||||
|
id: string;
|
||||||
|
alt: string;
|
||||||
|
sortOrder: number | null;
|
||||||
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_variants_stocks_warehouse {
|
||||||
|
__typename: "Warehouse";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_variants_stocks {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
quantityAllocated: number;
|
||||||
|
warehouse: ProductMediaUpdate_productMediaUpdate_product_variants_stocks_warehouse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_variants_channelListings_channel {
|
||||||
|
__typename: "Channel";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
currencyCode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_variants_channelListings_price {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_variants_channelListings_costPrice {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_variants_channelListings {
|
||||||
|
__typename: "ProductVariantChannelListing";
|
||||||
|
channel: ProductMediaUpdate_productMediaUpdate_product_variants_channelListings_channel;
|
||||||
|
price: ProductMediaUpdate_productMediaUpdate_product_variants_channelListings_price | null;
|
||||||
|
costPrice: ProductMediaUpdate_productMediaUpdate_product_variants_channelListings_costPrice | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_variants {
|
||||||
|
__typename: "ProductVariant";
|
||||||
|
id: string;
|
||||||
|
sku: string;
|
||||||
|
name: string;
|
||||||
|
margin: number | null;
|
||||||
|
stocks: (ProductMediaUpdate_productMediaUpdate_product_variants_stocks | null)[] | null;
|
||||||
|
trackInventory: boolean;
|
||||||
|
channelListings: ProductMediaUpdate_productMediaUpdate_product_variants_channelListings[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_weight {
|
||||||
|
__typename: "Weight";
|
||||||
|
unit: WeightUnitsEnum;
|
||||||
|
value: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product_taxType {
|
||||||
|
__typename: "TaxType";
|
||||||
|
description: string | null;
|
||||||
|
taxCode: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate_product {
|
||||||
|
__typename: "Product";
|
||||||
|
id: string;
|
||||||
|
attributes: ProductMediaUpdate_productMediaUpdate_product_attributes[];
|
||||||
|
productType: ProductMediaUpdate_productMediaUpdate_product_productType;
|
||||||
|
channelListings: ProductMediaUpdate_productMediaUpdate_product_channelListings[] | null;
|
||||||
|
metadata: (ProductMediaUpdate_productMediaUpdate_product_metadata | null)[];
|
||||||
|
privateMetadata: (ProductMediaUpdate_productMediaUpdate_product_privateMetadata | null)[];
|
||||||
|
name: string;
|
||||||
|
slug: string;
|
||||||
|
description: any | null;
|
||||||
|
seoTitle: string | null;
|
||||||
|
seoDescription: string | null;
|
||||||
|
rating: number | null;
|
||||||
|
defaultVariant: ProductMediaUpdate_productMediaUpdate_product_defaultVariant | null;
|
||||||
|
category: ProductMediaUpdate_productMediaUpdate_product_category | null;
|
||||||
|
collections: (ProductMediaUpdate_productMediaUpdate_product_collections | null)[] | null;
|
||||||
|
chargeTaxes: boolean;
|
||||||
|
media: (ProductMediaUpdate_productMediaUpdate_product_media | null)[] | null;
|
||||||
|
isAvailable: boolean | null;
|
||||||
|
variants: (ProductMediaUpdate_productMediaUpdate_product_variants | null)[] | null;
|
||||||
|
weight: ProductMediaUpdate_productMediaUpdate_product_weight | null;
|
||||||
|
taxType: ProductMediaUpdate_productMediaUpdate_product_taxType | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate_productMediaUpdate {
|
||||||
|
__typename: "ProductMediaUpdate";
|
||||||
|
errors: ProductMediaUpdate_productMediaUpdate_errors[];
|
||||||
|
product: ProductMediaUpdate_productMediaUpdate_product | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdate {
|
||||||
|
productMediaUpdate: ProductMediaUpdate_productMediaUpdate | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductMediaUpdateVariables {
|
||||||
|
id: string;
|
||||||
|
alt: string;
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { ProductInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { ProductInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: ProductUpdate
|
// GraphQL mutation operation: ProductUpdate
|
||||||
|
@ -179,12 +179,14 @@ export interface ProductUpdate_productUpdate_product_collections {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductUpdate_productUpdate_product_images {
|
export interface ProductUpdate_productUpdate_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductUpdate_productUpdate_product_variants_stocks_warehouse {
|
export interface ProductUpdate_productUpdate_product_variants_stocks_warehouse {
|
||||||
|
@ -268,7 +270,7 @@ export interface ProductUpdate_productUpdate_product {
|
||||||
category: ProductUpdate_productUpdate_product_category | null;
|
category: ProductUpdate_productUpdate_product_category | null;
|
||||||
collections: (ProductUpdate_productUpdate_product_collections | null)[] | null;
|
collections: (ProductUpdate_productUpdate_product_collections | null)[] | null;
|
||||||
chargeTaxes: boolean;
|
chargeTaxes: boolean;
|
||||||
images: (ProductUpdate_productUpdate_product_images | null)[] | null;
|
media: (ProductUpdate_productUpdate_product_media | null)[] | null;
|
||||||
isAvailable: boolean | null;
|
isAvailable: boolean | null;
|
||||||
variants: (ProductUpdate_productUpdate_product_variants | null)[] | null;
|
variants: (ProductUpdate_productUpdate_product_variants | null)[] | null;
|
||||||
weight: ProductUpdate_productUpdate_product_weight | null;
|
weight: ProductUpdate_productUpdate_product_weight | null;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { ProductVariantChannelListingAddInput, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum, ProductErrorCode } from "./../../types/globalTypes";
|
import { ProductVariantChannelListingAddInput, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum, ProductErrorCode } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: ProductVariantChannelListingUpdate
|
// GraphQL mutation operation: ProductVariantChannelListingUpdate
|
||||||
|
@ -114,10 +114,12 @@ export interface ProductVariantChannelListingUpdate_productVariantChannelListing
|
||||||
values: (ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_nonSelectionAttributes_values | null)[];
|
values: (ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_images {
|
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_defaultVariant {
|
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_defaultVariant {
|
||||||
|
@ -125,12 +127,14 @@ export interface ProductVariantChannelListingUpdate_productVariantChannelListing
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_images {
|
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_thumbnail {
|
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_thumbnail {
|
||||||
|
@ -184,10 +188,12 @@ export interface ProductVariantChannelListingUpdate_productVariantChannelListing
|
||||||
pricing: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing | null;
|
pricing: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_variants_images {
|
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_variants {
|
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_variants {
|
||||||
|
@ -195,14 +201,14 @@ export interface ProductVariantChannelListingUpdate_productVariantChannelListing
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_variants_images | null)[] | null;
|
media: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product {
|
export interface ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_defaultVariant | null;
|
defaultVariant: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_defaultVariant | null;
|
||||||
images: (ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_images | null)[] | null;
|
media: (ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_thumbnail | null;
|
thumbnail: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_thumbnail | null;
|
||||||
channelListings: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings[] | null;
|
channelListings: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product_channelListings[] | null;
|
||||||
|
@ -262,7 +268,7 @@ export interface ProductVariantChannelListingUpdate_productVariantChannelListing
|
||||||
privateMetadata: (ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_privateMetadata | null)[];
|
privateMetadata: (ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_privateMetadata | null)[];
|
||||||
selectionAttributes: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_selectionAttributes[];
|
selectionAttributes: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_selectionAttributes[];
|
||||||
nonSelectionAttributes: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_nonSelectionAttributes[];
|
nonSelectionAttributes: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_nonSelectionAttributes[];
|
||||||
images: (ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_images | null)[] | null;
|
media: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product;
|
product: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_product;
|
||||||
channelListings: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings[] | null;
|
channelListings: ProductVariantChannelListingUpdate_productVariantChannelListingUpdate_variant_channelListings[] | null;
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { AttributeInputTypeEnum, AttributeEntityTypeEnum } from "./../../types/globalTypes";
|
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL query operation: ProductVariantCreateData
|
// GraphQL query operation: ProductVariantCreateData
|
||||||
// ====================================================
|
// ====================================================
|
||||||
|
|
||||||
export interface ProductVariantCreateData_product_images {
|
export interface ProductVariantCreateData_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
@ -91,10 +91,11 @@ export interface ProductVariantCreateData_product_thumbnail {
|
||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantCreateData_product_variants_images {
|
export interface ProductVariantCreateData_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantCreateData_product_variants {
|
export interface ProductVariantCreateData_product_variants {
|
||||||
|
@ -102,13 +103,13 @@ export interface ProductVariantCreateData_product_variants {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (ProductVariantCreateData_product_variants_images | null)[] | null;
|
media: ProductVariantCreateData_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantCreateData_product {
|
export interface ProductVariantCreateData_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
images: (ProductVariantCreateData_product_images | null)[] | null;
|
media: (ProductVariantCreateData_product_media | null)[] | null;
|
||||||
channelListings: ProductVariantCreateData_product_channelListings[] | null;
|
channelListings: ProductVariantCreateData_product_channelListings[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
productType: ProductVariantCreateData_product_productType;
|
productType: ProductVariantCreateData_product_productType;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL query operation: ProductVariantDetails
|
// GraphQL query operation: ProductVariantDetails
|
||||||
|
@ -114,10 +114,12 @@ export interface ProductVariantDetails_productVariant_nonSelectionAttributes {
|
||||||
values: (ProductVariantDetails_productVariant_nonSelectionAttributes_values | null)[];
|
values: (ProductVariantDetails_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantDetails_productVariant_images {
|
export interface ProductVariantDetails_productVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantDetails_productVariant_product_defaultVariant {
|
export interface ProductVariantDetails_productVariant_product_defaultVariant {
|
||||||
|
@ -125,12 +127,14 @@ export interface ProductVariantDetails_productVariant_product_defaultVariant {
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantDetails_productVariant_product_images {
|
export interface ProductVariantDetails_productVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantDetails_productVariant_product_thumbnail {
|
export interface ProductVariantDetails_productVariant_product_thumbnail {
|
||||||
|
@ -184,10 +188,12 @@ export interface ProductVariantDetails_productVariant_product_channelListings {
|
||||||
pricing: ProductVariantDetails_productVariant_product_channelListings_pricing | null;
|
pricing: ProductVariantDetails_productVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantDetails_productVariant_product_variants_images {
|
export interface ProductVariantDetails_productVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantDetails_productVariant_product_variants {
|
export interface ProductVariantDetails_productVariant_product_variants {
|
||||||
|
@ -195,14 +201,14 @@ export interface ProductVariantDetails_productVariant_product_variants {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (ProductVariantDetails_productVariant_product_variants_images | null)[] | null;
|
media: ProductVariantDetails_productVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantDetails_productVariant_product {
|
export interface ProductVariantDetails_productVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: ProductVariantDetails_productVariant_product_defaultVariant | null;
|
defaultVariant: ProductVariantDetails_productVariant_product_defaultVariant | null;
|
||||||
images: (ProductVariantDetails_productVariant_product_images | null)[] | null;
|
media: (ProductVariantDetails_productVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: ProductVariantDetails_productVariant_product_thumbnail | null;
|
thumbnail: ProductVariantDetails_productVariant_product_thumbnail | null;
|
||||||
channelListings: ProductVariantDetails_productVariant_product_channelListings[] | null;
|
channelListings: ProductVariantDetails_productVariant_product_channelListings[] | null;
|
||||||
|
@ -262,7 +268,7 @@ export interface ProductVariantDetails_productVariant {
|
||||||
privateMetadata: (ProductVariantDetails_productVariant_privateMetadata | null)[];
|
privateMetadata: (ProductVariantDetails_productVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: ProductVariantDetails_productVariant_selectionAttributes[];
|
selectionAttributes: ProductVariantDetails_productVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: ProductVariantDetails_productVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: ProductVariantDetails_productVariant_nonSelectionAttributes[];
|
||||||
images: (ProductVariantDetails_productVariant_images | null)[] | null;
|
media: ProductVariantDetails_productVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: ProductVariantDetails_productVariant_product;
|
product: ProductVariantDetails_productVariant_product;
|
||||||
channelListings: ProductVariantDetails_productVariant_channelListings[] | null;
|
channelListings: ProductVariantDetails_productVariant_channelListings[] | null;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { ReorderInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { ReorderInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: ProductVariantReorder
|
// GraphQL mutation operation: ProductVariantReorder
|
||||||
|
@ -178,12 +178,14 @@ export interface ProductVariantReorder_productVariantReorder_product_collections
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantReorder_productVariantReorder_product_images {
|
export interface ProductVariantReorder_productVariantReorder_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantReorder_productVariantReorder_product_variants_stocks_warehouse {
|
export interface ProductVariantReorder_productVariantReorder_product_variants_stocks_warehouse {
|
||||||
|
@ -267,7 +269,7 @@ export interface ProductVariantReorder_productVariantReorder_product {
|
||||||
category: ProductVariantReorder_productVariantReorder_product_category | null;
|
category: ProductVariantReorder_productVariantReorder_product_category | null;
|
||||||
collections: (ProductVariantReorder_productVariantReorder_product_collections | null)[] | null;
|
collections: (ProductVariantReorder_productVariantReorder_product_collections | null)[] | null;
|
||||||
chargeTaxes: boolean;
|
chargeTaxes: boolean;
|
||||||
images: (ProductVariantReorder_productVariantReorder_product_images | null)[] | null;
|
media: (ProductVariantReorder_productVariantReorder_product_media | null)[] | null;
|
||||||
isAvailable: boolean | null;
|
isAvailable: boolean | null;
|
||||||
variants: (ProductVariantReorder_productVariantReorder_product_variants | null)[] | null;
|
variants: (ProductVariantReorder_productVariantReorder_product_variants | null)[] | null;
|
||||||
weight: ProductVariantReorder_productVariantReorder_product_weight | null;
|
weight: ProductVariantReorder_productVariantReorder_product_weight | null;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: ProductVariantSetDefault
|
// GraphQL mutation operation: ProductVariantSetDefault
|
||||||
|
@ -178,12 +178,14 @@ export interface ProductVariantSetDefault_productVariantSetDefault_product_colle
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantSetDefault_productVariantSetDefault_product_images {
|
export interface ProductVariantSetDefault_productVariantSetDefault_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantSetDefault_productVariantSetDefault_product_variants_stocks_warehouse {
|
export interface ProductVariantSetDefault_productVariantSetDefault_product_variants_stocks_warehouse {
|
||||||
|
@ -267,7 +269,7 @@ export interface ProductVariantSetDefault_productVariantSetDefault_product {
|
||||||
category: ProductVariantSetDefault_productVariantSetDefault_product_category | null;
|
category: ProductVariantSetDefault_productVariantSetDefault_product_category | null;
|
||||||
collections: (ProductVariantSetDefault_productVariantSetDefault_product_collections | null)[] | null;
|
collections: (ProductVariantSetDefault_productVariantSetDefault_product_collections | null)[] | null;
|
||||||
chargeTaxes: boolean;
|
chargeTaxes: boolean;
|
||||||
images: (ProductVariantSetDefault_productVariantSetDefault_product_images | null)[] | null;
|
media: (ProductVariantSetDefault_productVariantSetDefault_product_media | null)[] | null;
|
||||||
isAvailable: boolean | null;
|
isAvailable: boolean | null;
|
||||||
variants: (ProductVariantSetDefault_productVariantSetDefault_product_variants | null)[] | null;
|
variants: (ProductVariantSetDefault_productVariantSetDefault_product_variants | null)[] | null;
|
||||||
weight: ProductVariantSetDefault_productVariantSetDefault_product_weight | null;
|
weight: ProductVariantSetDefault_productVariantSetDefault_product_weight | null;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { ProductInput, ProductVariantInput, StockInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum, StockErrorCode } from "./../../types/globalTypes";
|
import { ProductInput, ProductVariantInput, StockInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum, StockErrorCode } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: SimpleProductUpdate
|
// GraphQL mutation operation: SimpleProductUpdate
|
||||||
|
@ -179,12 +179,14 @@ export interface SimpleProductUpdate_productUpdate_product_collections {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productUpdate_product_images {
|
export interface SimpleProductUpdate_productUpdate_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse {
|
export interface SimpleProductUpdate_productUpdate_product_variants_stocks_warehouse {
|
||||||
|
@ -268,7 +270,7 @@ export interface SimpleProductUpdate_productUpdate_product {
|
||||||
category: SimpleProductUpdate_productUpdate_product_category | null;
|
category: SimpleProductUpdate_productUpdate_product_category | null;
|
||||||
collections: (SimpleProductUpdate_productUpdate_product_collections | null)[] | null;
|
collections: (SimpleProductUpdate_productUpdate_product_collections | null)[] | null;
|
||||||
chargeTaxes: boolean;
|
chargeTaxes: boolean;
|
||||||
images: (SimpleProductUpdate_productUpdate_product_images | null)[] | null;
|
media: (SimpleProductUpdate_productUpdate_product_media | null)[] | null;
|
||||||
isAvailable: boolean | null;
|
isAvailable: boolean | null;
|
||||||
variants: (SimpleProductUpdate_productUpdate_product_variants | null)[] | null;
|
variants: (SimpleProductUpdate_productUpdate_product_variants | null)[] | null;
|
||||||
weight: SimpleProductUpdate_productUpdate_product_weight | null;
|
weight: SimpleProductUpdate_productUpdate_product_weight | null;
|
||||||
|
@ -394,10 +396,12 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_nonSele
|
||||||
values: (SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values | null)[];
|
values: (SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_images {
|
export interface SimpleProductUpdate_productVariantUpdate_productVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_defaultVariant {
|
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_defaultVariant {
|
||||||
|
@ -405,12 +409,14 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_product
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_images {
|
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_thumbnail {
|
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_thumbnail {
|
||||||
|
@ -464,10 +470,12 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_product
|
||||||
pricing: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing | null;
|
pricing: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_variants_images {
|
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_variants {
|
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product_variants {
|
||||||
|
@ -475,14 +483,14 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_product
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (SimpleProductUpdate_productVariantUpdate_productVariant_product_variants_images | null)[] | null;
|
media: SimpleProductUpdate_productVariantUpdate_productVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product {
|
export interface SimpleProductUpdate_productVariantUpdate_productVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: SimpleProductUpdate_productVariantUpdate_productVariant_product_defaultVariant | null;
|
defaultVariant: SimpleProductUpdate_productVariantUpdate_productVariant_product_defaultVariant | null;
|
||||||
images: (SimpleProductUpdate_productVariantUpdate_productVariant_product_images | null)[] | null;
|
media: (SimpleProductUpdate_productVariantUpdate_productVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: SimpleProductUpdate_productVariantUpdate_productVariant_product_thumbnail | null;
|
thumbnail: SimpleProductUpdate_productVariantUpdate_productVariant_product_thumbnail | null;
|
||||||
channelListings: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings[] | null;
|
channelListings: SimpleProductUpdate_productVariantUpdate_productVariant_product_channelListings[] | null;
|
||||||
|
@ -542,7 +550,7 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant {
|
||||||
privateMetadata: (SimpleProductUpdate_productVariantUpdate_productVariant_privateMetadata | null)[];
|
privateMetadata: (SimpleProductUpdate_productVariantUpdate_productVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes[];
|
selectionAttributes: SimpleProductUpdate_productVariantUpdate_productVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: SimpleProductUpdate_productVariantUpdate_productVariant_nonSelectionAttributes[];
|
||||||
images: (SimpleProductUpdate_productVariantUpdate_productVariant_images | null)[] | null;
|
media: SimpleProductUpdate_productVariantUpdate_productVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: SimpleProductUpdate_productVariantUpdate_productVariant_product;
|
product: SimpleProductUpdate_productVariantUpdate_productVariant_product;
|
||||||
channelListings: SimpleProductUpdate_productVariantUpdate_productVariant_channelListings[] | null;
|
channelListings: SimpleProductUpdate_productVariantUpdate_productVariant_channelListings[] | null;
|
||||||
|
@ -671,10 +679,12 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_n
|
||||||
values: (SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_values | null)[];
|
values: (SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_images {
|
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_defaultVariant {
|
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_defaultVariant {
|
||||||
|
@ -682,12 +692,14 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_p
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_images {
|
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_thumbnail {
|
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_thumbnail {
|
||||||
|
@ -741,10 +753,12 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_p
|
||||||
pricing: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing | null;
|
pricing: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants_images {
|
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants {
|
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants {
|
||||||
|
@ -752,14 +766,14 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_p
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants_images | null)[] | null;
|
media: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product {
|
export interface SimpleProductUpdate_productVariantStocksCreate_productVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_defaultVariant | null;
|
defaultVariant: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_defaultVariant | null;
|
||||||
images: (SimpleProductUpdate_productVariantStocksCreate_productVariant_product_images | null)[] | null;
|
media: (SimpleProductUpdate_productVariantStocksCreate_productVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_thumbnail | null;
|
thumbnail: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_thumbnail | null;
|
||||||
channelListings: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings[] | null;
|
channelListings: SimpleProductUpdate_productVariantStocksCreate_productVariant_product_channelListings[] | null;
|
||||||
|
@ -819,7 +833,7 @@ export interface SimpleProductUpdate_productVariantStocksCreate_productVariant {
|
||||||
privateMetadata: (SimpleProductUpdate_productVariantStocksCreate_productVariant_privateMetadata | null)[];
|
privateMetadata: (SimpleProductUpdate_productVariantStocksCreate_productVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes[];
|
selectionAttributes: SimpleProductUpdate_productVariantStocksCreate_productVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: SimpleProductUpdate_productVariantStocksCreate_productVariant_nonSelectionAttributes[];
|
||||||
images: (SimpleProductUpdate_productVariantStocksCreate_productVariant_images | null)[] | null;
|
media: SimpleProductUpdate_productVariantStocksCreate_productVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: SimpleProductUpdate_productVariantStocksCreate_productVariant_product;
|
product: SimpleProductUpdate_productVariantStocksCreate_productVariant_product;
|
||||||
channelListings: SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings[] | null;
|
channelListings: SimpleProductUpdate_productVariantStocksCreate_productVariant_channelListings[] | null;
|
||||||
|
@ -947,10 +961,12 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_n
|
||||||
values: (SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_values | null)[];
|
values: (SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_images {
|
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_defaultVariant {
|
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_defaultVariant {
|
||||||
|
@ -958,12 +974,14 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_p
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_images {
|
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_thumbnail {
|
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_thumbnail {
|
||||||
|
@ -1017,10 +1035,12 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_p
|
||||||
pricing: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing | null;
|
pricing: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants_images {
|
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants {
|
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants {
|
||||||
|
@ -1028,14 +1048,14 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_p
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants_images | null)[] | null;
|
media: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product {
|
export interface SimpleProductUpdate_productVariantStocksDelete_productVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_defaultVariant | null;
|
defaultVariant: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_defaultVariant | null;
|
||||||
images: (SimpleProductUpdate_productVariantStocksDelete_productVariant_product_images | null)[] | null;
|
media: (SimpleProductUpdate_productVariantStocksDelete_productVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_thumbnail | null;
|
thumbnail: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_thumbnail | null;
|
||||||
channelListings: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings[] | null;
|
channelListings: SimpleProductUpdate_productVariantStocksDelete_productVariant_product_channelListings[] | null;
|
||||||
|
@ -1095,7 +1115,7 @@ export interface SimpleProductUpdate_productVariantStocksDelete_productVariant {
|
||||||
privateMetadata: (SimpleProductUpdate_productVariantStocksDelete_productVariant_privateMetadata | null)[];
|
privateMetadata: (SimpleProductUpdate_productVariantStocksDelete_productVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes[];
|
selectionAttributes: SimpleProductUpdate_productVariantStocksDelete_productVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: SimpleProductUpdate_productVariantStocksDelete_productVariant_nonSelectionAttributes[];
|
||||||
images: (SimpleProductUpdate_productVariantStocksDelete_productVariant_images | null)[] | null;
|
media: SimpleProductUpdate_productVariantStocksDelete_productVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: SimpleProductUpdate_productVariantStocksDelete_productVariant_product;
|
product: SimpleProductUpdate_productVariantStocksDelete_productVariant_product;
|
||||||
channelListings: SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings[] | null;
|
channelListings: SimpleProductUpdate_productVariantStocksDelete_productVariant_channelListings[] | null;
|
||||||
|
@ -1224,10 +1244,12 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_n
|
||||||
values: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values | null)[];
|
values: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_images {
|
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant {
|
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant {
|
||||||
|
@ -1235,12 +1257,14 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_p
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_images {
|
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_thumbnail {
|
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_thumbnail {
|
||||||
|
@ -1294,10 +1318,12 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_p
|
||||||
pricing: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing | null;
|
pricing: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants_images {
|
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants {
|
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants {
|
||||||
|
@ -1305,14 +1331,14 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_p
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants_images | null)[] | null;
|
media: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product {
|
export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant | null;
|
defaultVariant: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant | null;
|
||||||
images: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_images | null)[] | null;
|
media: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_thumbnail | null;
|
thumbnail: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_thumbnail | null;
|
||||||
channelListings: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings[] | null;
|
channelListings: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product_channelListings[] | null;
|
||||||
|
@ -1372,7 +1398,7 @@ export interface SimpleProductUpdate_productVariantStocksUpdate_productVariant {
|
||||||
privateMetadata: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_privateMetadata | null)[];
|
privateMetadata: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes[];
|
selectionAttributes: SimpleProductUpdate_productVariantStocksUpdate_productVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: SimpleProductUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes[];
|
||||||
images: (SimpleProductUpdate_productVariantStocksUpdate_productVariant_images | null)[] | null;
|
media: SimpleProductUpdate_productVariantStocksUpdate_productVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product;
|
product: SimpleProductUpdate_productVariantStocksUpdate_productVariant_product;
|
||||||
channelListings: SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings[] | null;
|
channelListings: SimpleProductUpdate_productVariantStocksUpdate_productVariant_channelListings[] | null;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { ProductVariantCreateInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { ProductVariantCreateInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: VariantCreate
|
// GraphQL mutation operation: VariantCreate
|
||||||
|
@ -121,10 +121,12 @@ export interface VariantCreate_productVariantCreate_productVariant_nonSelectionA
|
||||||
values: (VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_values | null)[];
|
values: (VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantCreate_productVariantCreate_productVariant_images {
|
export interface VariantCreate_productVariantCreate_productVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantCreate_productVariantCreate_productVariant_product_defaultVariant {
|
export interface VariantCreate_productVariantCreate_productVariant_product_defaultVariant {
|
||||||
|
@ -132,12 +134,14 @@ export interface VariantCreate_productVariantCreate_productVariant_product_defau
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantCreate_productVariantCreate_productVariant_product_images {
|
export interface VariantCreate_productVariantCreate_productVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantCreate_productVariantCreate_productVariant_product_thumbnail {
|
export interface VariantCreate_productVariantCreate_productVariant_product_thumbnail {
|
||||||
|
@ -191,10 +195,12 @@ export interface VariantCreate_productVariantCreate_productVariant_product_chann
|
||||||
pricing: VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing | null;
|
pricing: VariantCreate_productVariantCreate_productVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantCreate_productVariantCreate_productVariant_product_variants_images {
|
export interface VariantCreate_productVariantCreate_productVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantCreate_productVariantCreate_productVariant_product_variants {
|
export interface VariantCreate_productVariantCreate_productVariant_product_variants {
|
||||||
|
@ -202,14 +208,14 @@ export interface VariantCreate_productVariantCreate_productVariant_product_varia
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (VariantCreate_productVariantCreate_productVariant_product_variants_images | null)[] | null;
|
media: VariantCreate_productVariantCreate_productVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantCreate_productVariantCreate_productVariant_product {
|
export interface VariantCreate_productVariantCreate_productVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: VariantCreate_productVariantCreate_productVariant_product_defaultVariant | null;
|
defaultVariant: VariantCreate_productVariantCreate_productVariant_product_defaultVariant | null;
|
||||||
images: (VariantCreate_productVariantCreate_productVariant_product_images | null)[] | null;
|
media: (VariantCreate_productVariantCreate_productVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: VariantCreate_productVariantCreate_productVariant_product_thumbnail | null;
|
thumbnail: VariantCreate_productVariantCreate_productVariant_product_thumbnail | null;
|
||||||
channelListings: VariantCreate_productVariantCreate_productVariant_product_channelListings[] | null;
|
channelListings: VariantCreate_productVariantCreate_productVariant_product_channelListings[] | null;
|
||||||
|
@ -269,7 +275,7 @@ export interface VariantCreate_productVariantCreate_productVariant {
|
||||||
privateMetadata: (VariantCreate_productVariantCreate_productVariant_privateMetadata | null)[];
|
privateMetadata: (VariantCreate_productVariantCreate_productVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: VariantCreate_productVariantCreate_productVariant_selectionAttributes[];
|
selectionAttributes: VariantCreate_productVariantCreate_productVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: VariantCreate_productVariantCreate_productVariant_nonSelectionAttributes[];
|
||||||
images: (VariantCreate_productVariantCreate_productVariant_images | null)[] | null;
|
media: VariantCreate_productVariantCreate_productVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: VariantCreate_productVariantCreate_productVariant_product;
|
product: VariantCreate_productVariantCreate_productVariant_product;
|
||||||
channelListings: VariantCreate_productVariantCreate_productVariant_channelListings[] | null;
|
channelListings: VariantCreate_productVariantCreate_productVariant_channelListings[] | null;
|
||||||
|
|
|
@ -1,294 +0,0 @@
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
// This file was automatically generated and should not be edited.
|
|
||||||
|
|
||||||
import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
|
||||||
|
|
||||||
// ====================================================
|
|
||||||
// GraphQL mutation operation: VariantImageAssign
|
|
||||||
// ====================================================
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_errors {
|
|
||||||
__typename: "ProductError";
|
|
||||||
code: ProductErrorCode;
|
|
||||||
field: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_metadata {
|
|
||||||
__typename: "MetadataItem";
|
|
||||||
key: string;
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_privateMetadata {
|
|
||||||
__typename: "MetadataItem";
|
|
||||||
key: string;
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_attribute_values_file {
|
|
||||||
__typename: "File";
|
|
||||||
url: string;
|
|
||||||
contentType: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_attribute_values {
|
|
||||||
__typename: "AttributeValue";
|
|
||||||
id: string;
|
|
||||||
name: string | null;
|
|
||||||
slug: string | null;
|
|
||||||
file: VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_attribute_values_file | null;
|
|
||||||
reference: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_attribute {
|
|
||||||
__typename: "Attribute";
|
|
||||||
id: string;
|
|
||||||
name: string | null;
|
|
||||||
slug: string | null;
|
|
||||||
inputType: AttributeInputTypeEnum | null;
|
|
||||||
entityType: AttributeEntityTypeEnum | null;
|
|
||||||
valueRequired: boolean;
|
|
||||||
values: (VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_attribute_values | null)[] | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_values_file {
|
|
||||||
__typename: "File";
|
|
||||||
url: string;
|
|
||||||
contentType: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_values {
|
|
||||||
__typename: "AttributeValue";
|
|
||||||
id: string;
|
|
||||||
name: string | null;
|
|
||||||
slug: string | null;
|
|
||||||
file: VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_values_file | null;
|
|
||||||
reference: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_selectionAttributes {
|
|
||||||
__typename: "SelectedAttribute";
|
|
||||||
attribute: VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_attribute;
|
|
||||||
values: (VariantImageAssign_variantImageAssign_productVariant_selectionAttributes_values | null)[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_attribute_values_file {
|
|
||||||
__typename: "File";
|
|
||||||
url: string;
|
|
||||||
contentType: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_attribute_values {
|
|
||||||
__typename: "AttributeValue";
|
|
||||||
id: string;
|
|
||||||
name: string | null;
|
|
||||||
slug: string | null;
|
|
||||||
file: VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_attribute_values_file | null;
|
|
||||||
reference: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_attribute {
|
|
||||||
__typename: "Attribute";
|
|
||||||
id: string;
|
|
||||||
name: string | null;
|
|
||||||
slug: string | null;
|
|
||||||
inputType: AttributeInputTypeEnum | null;
|
|
||||||
entityType: AttributeEntityTypeEnum | null;
|
|
||||||
valueRequired: boolean;
|
|
||||||
values: (VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_attribute_values | null)[] | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_values_file {
|
|
||||||
__typename: "File";
|
|
||||||
url: string;
|
|
||||||
contentType: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_values {
|
|
||||||
__typename: "AttributeValue";
|
|
||||||
id: string;
|
|
||||||
name: string | null;
|
|
||||||
slug: string | null;
|
|
||||||
file: VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_values_file | null;
|
|
||||||
reference: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes {
|
|
||||||
__typename: "SelectedAttribute";
|
|
||||||
attribute: VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_attribute;
|
|
||||||
values: (VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes_values | null)[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_images {
|
|
||||||
__typename: "ProductImage";
|
|
||||||
id: string;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_defaultVariant {
|
|
||||||
__typename: "ProductVariant";
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_images {
|
|
||||||
__typename: "ProductImage";
|
|
||||||
id: string;
|
|
||||||
alt: string;
|
|
||||||
sortOrder: number | null;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_thumbnail {
|
|
||||||
__typename: "Image";
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_channel {
|
|
||||||
__typename: "Channel";
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
currencyCode: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_start_net {
|
|
||||||
__typename: "Money";
|
|
||||||
amount: number;
|
|
||||||
currency: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_start {
|
|
||||||
__typename: "TaxedMoney";
|
|
||||||
net: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_start_net;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_stop_net {
|
|
||||||
__typename: "Money";
|
|
||||||
amount: number;
|
|
||||||
currency: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_stop {
|
|
||||||
__typename: "TaxedMoney";
|
|
||||||
net: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_stop_net;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange {
|
|
||||||
__typename: "TaxedMoneyRange";
|
|
||||||
start: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_start | null;
|
|
||||||
stop: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange_stop | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing {
|
|
||||||
__typename: "ProductPricingInfo";
|
|
||||||
priceRange: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing_priceRange | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_channelListings {
|
|
||||||
__typename: "ProductChannelListing";
|
|
||||||
channel: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_channel;
|
|
||||||
pricing: VariantImageAssign_variantImageAssign_productVariant_product_channelListings_pricing | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_variants_images {
|
|
||||||
__typename: "ProductImage";
|
|
||||||
id: string;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product_variants {
|
|
||||||
__typename: "ProductVariant";
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
sku: string;
|
|
||||||
images: (VariantImageAssign_variantImageAssign_productVariant_product_variants_images | null)[] | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_product {
|
|
||||||
__typename: "Product";
|
|
||||||
id: string;
|
|
||||||
defaultVariant: VariantImageAssign_variantImageAssign_productVariant_product_defaultVariant | null;
|
|
||||||
images: (VariantImageAssign_variantImageAssign_productVariant_product_images | null)[] | null;
|
|
||||||
name: string;
|
|
||||||
thumbnail: VariantImageAssign_variantImageAssign_productVariant_product_thumbnail | null;
|
|
||||||
channelListings: VariantImageAssign_variantImageAssign_productVariant_product_channelListings[] | null;
|
|
||||||
variants: (VariantImageAssign_variantImageAssign_productVariant_product_variants | null)[] | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_channelListings_channel {
|
|
||||||
__typename: "Channel";
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
currencyCode: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_channelListings_price {
|
|
||||||
__typename: "Money";
|
|
||||||
amount: number;
|
|
||||||
currency: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_channelListings_costPrice {
|
|
||||||
__typename: "Money";
|
|
||||||
amount: number;
|
|
||||||
currency: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_channelListings {
|
|
||||||
__typename: "ProductVariantChannelListing";
|
|
||||||
channel: VariantImageAssign_variantImageAssign_productVariant_channelListings_channel;
|
|
||||||
price: VariantImageAssign_variantImageAssign_productVariant_channelListings_price | null;
|
|
||||||
costPrice: VariantImageAssign_variantImageAssign_productVariant_channelListings_costPrice | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_stocks_warehouse {
|
|
||||||
__typename: "Warehouse";
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_stocks {
|
|
||||||
__typename: "Stock";
|
|
||||||
id: string;
|
|
||||||
quantity: number;
|
|
||||||
quantityAllocated: number;
|
|
||||||
warehouse: VariantImageAssign_variantImageAssign_productVariant_stocks_warehouse;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant_weight {
|
|
||||||
__typename: "Weight";
|
|
||||||
unit: WeightUnitsEnum;
|
|
||||||
value: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant {
|
|
||||||
__typename: "ProductVariant";
|
|
||||||
id: string;
|
|
||||||
metadata: (VariantImageAssign_variantImageAssign_productVariant_metadata | null)[];
|
|
||||||
privateMetadata: (VariantImageAssign_variantImageAssign_productVariant_privateMetadata | null)[];
|
|
||||||
selectionAttributes: VariantImageAssign_variantImageAssign_productVariant_selectionAttributes[];
|
|
||||||
nonSelectionAttributes: VariantImageAssign_variantImageAssign_productVariant_nonSelectionAttributes[];
|
|
||||||
images: (VariantImageAssign_variantImageAssign_productVariant_images | null)[] | null;
|
|
||||||
name: string;
|
|
||||||
product: VariantImageAssign_variantImageAssign_productVariant_product;
|
|
||||||
channelListings: VariantImageAssign_variantImageAssign_productVariant_channelListings[] | null;
|
|
||||||
sku: string;
|
|
||||||
stocks: (VariantImageAssign_variantImageAssign_productVariant_stocks | null)[] | null;
|
|
||||||
trackInventory: boolean;
|
|
||||||
weight: VariantImageAssign_variantImageAssign_productVariant_weight | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign {
|
|
||||||
__typename: "VariantImageAssign";
|
|
||||||
errors: VariantImageAssign_variantImageAssign_errors[];
|
|
||||||
productVariant: VariantImageAssign_variantImageAssign_productVariant | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssign {
|
|
||||||
variantImageAssign: VariantImageAssign_variantImageAssign | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface VariantImageAssignVariables {
|
|
||||||
variantId: string;
|
|
||||||
imageId: string;
|
|
||||||
}
|
|
300
src/products/types/VariantMediaAssign.ts
Normal file
300
src/products/types/VariantMediaAssign.ts
Normal file
|
@ -0,0 +1,300 @@
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
|
import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
|
// ====================================================
|
||||||
|
// GraphQL mutation operation: VariantMediaAssign
|
||||||
|
// ====================================================
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_errors {
|
||||||
|
__typename: "ProductError";
|
||||||
|
code: ProductErrorCode;
|
||||||
|
field: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_metadata {
|
||||||
|
__typename: "MetadataItem";
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_privateMetadata {
|
||||||
|
__typename: "MetadataItem";
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_attribute_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_attribute_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_attribute_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_attribute {
|
||||||
|
__typename: "Attribute";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
inputType: AttributeInputTypeEnum | null;
|
||||||
|
entityType: AttributeEntityTypeEnum | null;
|
||||||
|
valueRequired: boolean;
|
||||||
|
values: (VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_attribute_values | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes {
|
||||||
|
__typename: "SelectedAttribute";
|
||||||
|
attribute: VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_attribute;
|
||||||
|
values: (VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes_values | null)[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_attribute_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_attribute_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_attribute_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_attribute {
|
||||||
|
__typename: "Attribute";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
inputType: AttributeInputTypeEnum | null;
|
||||||
|
entityType: AttributeEntityTypeEnum | null;
|
||||||
|
valueRequired: boolean;
|
||||||
|
values: (VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_attribute_values | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_values_file {
|
||||||
|
__typename: "File";
|
||||||
|
url: string;
|
||||||
|
contentType: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_values {
|
||||||
|
__typename: "AttributeValue";
|
||||||
|
id: string;
|
||||||
|
name: string | null;
|
||||||
|
slug: string | null;
|
||||||
|
file: VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_values_file | null;
|
||||||
|
reference: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes {
|
||||||
|
__typename: "SelectedAttribute";
|
||||||
|
attribute: VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_attribute;
|
||||||
|
values: (VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_media {
|
||||||
|
__typename: "ProductMedia";
|
||||||
|
id: string;
|
||||||
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_defaultVariant {
|
||||||
|
__typename: "ProductVariant";
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_media {
|
||||||
|
__typename: "ProductMedia";
|
||||||
|
id: string;
|
||||||
|
alt: string;
|
||||||
|
sortOrder: number | null;
|
||||||
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_thumbnail {
|
||||||
|
__typename: "Image";
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_channel {
|
||||||
|
__typename: "Channel";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
currencyCode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange_start_net {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange_start {
|
||||||
|
__typename: "TaxedMoney";
|
||||||
|
net: VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange_start_net;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange_stop_net {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange_stop {
|
||||||
|
__typename: "TaxedMoney";
|
||||||
|
net: VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange_stop_net;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange {
|
||||||
|
__typename: "TaxedMoneyRange";
|
||||||
|
start: VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange_start | null;
|
||||||
|
stop: VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange_stop | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing {
|
||||||
|
__typename: "ProductPricingInfo";
|
||||||
|
priceRange: VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing_priceRange | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings {
|
||||||
|
__typename: "ProductChannelListing";
|
||||||
|
channel: VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_channel;
|
||||||
|
pricing: VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings_pricing | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_variants_media {
|
||||||
|
__typename: "ProductMedia";
|
||||||
|
id: string;
|
||||||
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product_variants {
|
||||||
|
__typename: "ProductVariant";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
sku: string;
|
||||||
|
media: VariantMediaAssign_variantMediaAssign_productVariant_product_variants_media[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_product {
|
||||||
|
__typename: "Product";
|
||||||
|
id: string;
|
||||||
|
defaultVariant: VariantMediaAssign_variantMediaAssign_productVariant_product_defaultVariant | null;
|
||||||
|
media: (VariantMediaAssign_variantMediaAssign_productVariant_product_media | null)[] | null;
|
||||||
|
name: string;
|
||||||
|
thumbnail: VariantMediaAssign_variantMediaAssign_productVariant_product_thumbnail | null;
|
||||||
|
channelListings: VariantMediaAssign_variantMediaAssign_productVariant_product_channelListings[] | null;
|
||||||
|
variants: (VariantMediaAssign_variantMediaAssign_productVariant_product_variants | null)[] | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_channelListings_channel {
|
||||||
|
__typename: "Channel";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
currencyCode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_channelListings_price {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_channelListings_costPrice {
|
||||||
|
__typename: "Money";
|
||||||
|
amount: number;
|
||||||
|
currency: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_channelListings {
|
||||||
|
__typename: "ProductVariantChannelListing";
|
||||||
|
channel: VariantMediaAssign_variantMediaAssign_productVariant_channelListings_channel;
|
||||||
|
price: VariantMediaAssign_variantMediaAssign_productVariant_channelListings_price | null;
|
||||||
|
costPrice: VariantMediaAssign_variantMediaAssign_productVariant_channelListings_costPrice | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_stocks_warehouse {
|
||||||
|
__typename: "Warehouse";
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_stocks {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
quantityAllocated: number;
|
||||||
|
warehouse: VariantMediaAssign_variantMediaAssign_productVariant_stocks_warehouse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant_weight {
|
||||||
|
__typename: "Weight";
|
||||||
|
unit: WeightUnitsEnum;
|
||||||
|
value: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign_productVariant {
|
||||||
|
__typename: "ProductVariant";
|
||||||
|
id: string;
|
||||||
|
metadata: (VariantMediaAssign_variantMediaAssign_productVariant_metadata | null)[];
|
||||||
|
privateMetadata: (VariantMediaAssign_variantMediaAssign_productVariant_privateMetadata | null)[];
|
||||||
|
selectionAttributes: VariantMediaAssign_variantMediaAssign_productVariant_selectionAttributes[];
|
||||||
|
nonSelectionAttributes: VariantMediaAssign_variantMediaAssign_productVariant_nonSelectionAttributes[];
|
||||||
|
media: VariantMediaAssign_variantMediaAssign_productVariant_media[] | null;
|
||||||
|
name: string;
|
||||||
|
product: VariantMediaAssign_variantMediaAssign_productVariant_product;
|
||||||
|
channelListings: VariantMediaAssign_variantMediaAssign_productVariant_channelListings[] | null;
|
||||||
|
sku: string;
|
||||||
|
stocks: (VariantMediaAssign_variantMediaAssign_productVariant_stocks | null)[] | null;
|
||||||
|
trackInventory: boolean;
|
||||||
|
weight: VariantMediaAssign_variantMediaAssign_productVariant_weight | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign_variantMediaAssign {
|
||||||
|
__typename: "VariantMediaAssign";
|
||||||
|
errors: VariantMediaAssign_variantMediaAssign_errors[];
|
||||||
|
productVariant: VariantMediaAssign_variantMediaAssign_productVariant | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssign {
|
||||||
|
variantMediaAssign: VariantMediaAssign_variantMediaAssign | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface VariantMediaAssignVariables {
|
||||||
|
variantId: string;
|
||||||
|
mediaId: string;
|
||||||
|
}
|
|
@ -2,46 +2,46 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum } from "./../../types/globalTypes";
|
import { ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: VariantImageUnassign
|
// GraphQL mutation operation: VariantMediaUnassign
|
||||||
// ====================================================
|
// ====================================================
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_errors {
|
export interface VariantMediaUnassign_variantMediaUnassign_errors {
|
||||||
__typename: "ProductError";
|
__typename: "ProductError";
|
||||||
code: ProductErrorCode;
|
code: ProductErrorCode;
|
||||||
field: string | null;
|
field: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_metadata {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_metadata {
|
||||||
__typename: "MetadataItem";
|
__typename: "MetadataItem";
|
||||||
key: string;
|
key: string;
|
||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_privateMetadata {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_privateMetadata {
|
||||||
__typename: "MetadataItem";
|
__typename: "MetadataItem";
|
||||||
key: string;
|
key: string;
|
||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_attribute_values_file {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_attribute_values_file {
|
||||||
__typename: "File";
|
__typename: "File";
|
||||||
url: string;
|
url: string;
|
||||||
contentType: string | null;
|
contentType: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_attribute_values {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_attribute_values {
|
||||||
__typename: "AttributeValue";
|
__typename: "AttributeValue";
|
||||||
id: string;
|
id: string;
|
||||||
name: string | null;
|
name: string | null;
|
||||||
slug: string | null;
|
slug: string | null;
|
||||||
file: VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_attribute_values_file | null;
|
file: VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_attribute_values_file | null;
|
||||||
reference: string | null;
|
reference: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_attribute {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_attribute {
|
||||||
__typename: "Attribute";
|
__typename: "Attribute";
|
||||||
id: string;
|
id: string;
|
||||||
name: string | null;
|
name: string | null;
|
||||||
|
@ -49,46 +49,46 @@ export interface VariantImageUnassign_variantImageUnassign_productVariant_select
|
||||||
inputType: AttributeInputTypeEnum | null;
|
inputType: AttributeInputTypeEnum | null;
|
||||||
entityType: AttributeEntityTypeEnum | null;
|
entityType: AttributeEntityTypeEnum | null;
|
||||||
valueRequired: boolean;
|
valueRequired: boolean;
|
||||||
values: (VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_attribute_values | null)[] | null;
|
values: (VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_attribute_values | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_values_file {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_values_file {
|
||||||
__typename: "File";
|
__typename: "File";
|
||||||
url: string;
|
url: string;
|
||||||
contentType: string | null;
|
contentType: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_values {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_values {
|
||||||
__typename: "AttributeValue";
|
__typename: "AttributeValue";
|
||||||
id: string;
|
id: string;
|
||||||
name: string | null;
|
name: string | null;
|
||||||
slug: string | null;
|
slug: string | null;
|
||||||
file: VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_values_file | null;
|
file: VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_values_file | null;
|
||||||
reference: string | null;
|
reference: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes {
|
||||||
__typename: "SelectedAttribute";
|
__typename: "SelectedAttribute";
|
||||||
attribute: VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_attribute;
|
attribute: VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_attribute;
|
||||||
values: (VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes_values | null)[];
|
values: (VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_attribute_values_file {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_attribute_values_file {
|
||||||
__typename: "File";
|
__typename: "File";
|
||||||
url: string;
|
url: string;
|
||||||
contentType: string | null;
|
contentType: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_attribute_values {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_attribute_values {
|
||||||
__typename: "AttributeValue";
|
__typename: "AttributeValue";
|
||||||
id: string;
|
id: string;
|
||||||
name: string | null;
|
name: string | null;
|
||||||
slug: string | null;
|
slug: string | null;
|
||||||
file: VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_attribute_values_file | null;
|
file: VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_attribute_values_file | null;
|
||||||
reference: string | null;
|
reference: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_attribute {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_attribute {
|
||||||
__typename: "Attribute";
|
__typename: "Attribute";
|
||||||
id: string;
|
id: string;
|
||||||
name: string | null;
|
name: string | null;
|
||||||
|
@ -96,199 +96,205 @@ export interface VariantImageUnassign_variantImageUnassign_productVariant_nonSel
|
||||||
inputType: AttributeInputTypeEnum | null;
|
inputType: AttributeInputTypeEnum | null;
|
||||||
entityType: AttributeEntityTypeEnum | null;
|
entityType: AttributeEntityTypeEnum | null;
|
||||||
valueRequired: boolean;
|
valueRequired: boolean;
|
||||||
values: (VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_attribute_values | null)[] | null;
|
values: (VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_attribute_values | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_values_file {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_values_file {
|
||||||
__typename: "File";
|
__typename: "File";
|
||||||
url: string;
|
url: string;
|
||||||
contentType: string | null;
|
contentType: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_values {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_values {
|
||||||
__typename: "AttributeValue";
|
__typename: "AttributeValue";
|
||||||
id: string;
|
id: string;
|
||||||
name: string | null;
|
name: string | null;
|
||||||
slug: string | null;
|
slug: string | null;
|
||||||
file: VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_values_file | null;
|
file: VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_values_file | null;
|
||||||
reference: string | null;
|
reference: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes {
|
||||||
__typename: "SelectedAttribute";
|
__typename: "SelectedAttribute";
|
||||||
attribute: VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_attribute;
|
attribute: VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_attribute;
|
||||||
values: (VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes_values | null)[];
|
values: (VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_images {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_defaultVariant {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_defaultVariant {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_images {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_thumbnail {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_thumbnail {
|
||||||
__typename: "Image";
|
__typename: "Image";
|
||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_channel {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_channel {
|
||||||
__typename: "Channel";
|
__typename: "Channel";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
currencyCode: string;
|
currencyCode: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_start_net {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange_start_net {
|
||||||
__typename: "Money";
|
__typename: "Money";
|
||||||
amount: number;
|
amount: number;
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_start {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange_start {
|
||||||
__typename: "TaxedMoney";
|
__typename: "TaxedMoney";
|
||||||
net: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_start_net;
|
net: VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange_start_net;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_stop_net {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange_stop_net {
|
||||||
__typename: "Money";
|
__typename: "Money";
|
||||||
amount: number;
|
amount: number;
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_stop {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange_stop {
|
||||||
__typename: "TaxedMoney";
|
__typename: "TaxedMoney";
|
||||||
net: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_stop_net;
|
net: VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange_stop_net;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange {
|
||||||
__typename: "TaxedMoneyRange";
|
__typename: "TaxedMoneyRange";
|
||||||
start: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_start | null;
|
start: VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange_start | null;
|
||||||
stop: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange_stop | null;
|
stop: VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange_stop | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing {
|
||||||
__typename: "ProductPricingInfo";
|
__typename: "ProductPricingInfo";
|
||||||
priceRange: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing_priceRange | null;
|
priceRange: VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing_priceRange | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings {
|
||||||
__typename: "ProductChannelListing";
|
__typename: "ProductChannelListing";
|
||||||
channel: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_channel;
|
channel: VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_channel;
|
||||||
pricing: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings_pricing | null;
|
pricing: VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_variants_images {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product_variants {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product_variants {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (VariantImageUnassign_variantImageUnassign_productVariant_product_variants_images | null)[] | null;
|
media: VariantMediaUnassign_variantMediaUnassign_productVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_product {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: VariantImageUnassign_variantImageUnassign_productVariant_product_defaultVariant | null;
|
defaultVariant: VariantMediaUnassign_variantMediaUnassign_productVariant_product_defaultVariant | null;
|
||||||
images: (VariantImageUnassign_variantImageUnassign_productVariant_product_images | null)[] | null;
|
media: (VariantMediaUnassign_variantMediaUnassign_productVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: VariantImageUnassign_variantImageUnassign_productVariant_product_thumbnail | null;
|
thumbnail: VariantMediaUnassign_variantMediaUnassign_productVariant_product_thumbnail | null;
|
||||||
channelListings: VariantImageUnassign_variantImageUnassign_productVariant_product_channelListings[] | null;
|
channelListings: VariantMediaUnassign_variantMediaUnassign_productVariant_product_channelListings[] | null;
|
||||||
variants: (VariantImageUnassign_variantImageUnassign_productVariant_product_variants | null)[] | null;
|
variants: (VariantMediaUnassign_variantMediaUnassign_productVariant_product_variants | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_channelListings_channel {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_channelListings_channel {
|
||||||
__typename: "Channel";
|
__typename: "Channel";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
currencyCode: string;
|
currencyCode: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_channelListings_price {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_channelListings_price {
|
||||||
__typename: "Money";
|
__typename: "Money";
|
||||||
amount: number;
|
amount: number;
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_channelListings_costPrice {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_channelListings_costPrice {
|
||||||
__typename: "Money";
|
__typename: "Money";
|
||||||
amount: number;
|
amount: number;
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_channelListings {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_channelListings {
|
||||||
__typename: "ProductVariantChannelListing";
|
__typename: "ProductVariantChannelListing";
|
||||||
channel: VariantImageUnassign_variantImageUnassign_productVariant_channelListings_channel;
|
channel: VariantMediaUnassign_variantMediaUnassign_productVariant_channelListings_channel;
|
||||||
price: VariantImageUnassign_variantImageUnassign_productVariant_channelListings_price | null;
|
price: VariantMediaUnassign_variantMediaUnassign_productVariant_channelListings_price | null;
|
||||||
costPrice: VariantImageUnassign_variantImageUnassign_productVariant_channelListings_costPrice | null;
|
costPrice: VariantMediaUnassign_variantMediaUnassign_productVariant_channelListings_costPrice | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_stocks_warehouse {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_stocks_warehouse {
|
||||||
__typename: "Warehouse";
|
__typename: "Warehouse";
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_stocks {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_stocks {
|
||||||
__typename: "Stock";
|
__typename: "Stock";
|
||||||
id: string;
|
id: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number;
|
quantityAllocated: number;
|
||||||
warehouse: VariantImageUnassign_variantImageUnassign_productVariant_stocks_warehouse;
|
warehouse: VariantMediaUnassign_variantMediaUnassign_productVariant_stocks_warehouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant_weight {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant_weight {
|
||||||
__typename: "Weight";
|
__typename: "Weight";
|
||||||
unit: WeightUnitsEnum;
|
unit: WeightUnitsEnum;
|
||||||
value: number;
|
value: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant {
|
export interface VariantMediaUnassign_variantMediaUnassign_productVariant {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
metadata: (VariantImageUnassign_variantImageUnassign_productVariant_metadata | null)[];
|
metadata: (VariantMediaUnassign_variantMediaUnassign_productVariant_metadata | null)[];
|
||||||
privateMetadata: (VariantImageUnassign_variantImageUnassign_productVariant_privateMetadata | null)[];
|
privateMetadata: (VariantMediaUnassign_variantMediaUnassign_productVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: VariantImageUnassign_variantImageUnassign_productVariant_selectionAttributes[];
|
selectionAttributes: VariantMediaUnassign_variantMediaUnassign_productVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: VariantImageUnassign_variantImageUnassign_productVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: VariantMediaUnassign_variantMediaUnassign_productVariant_nonSelectionAttributes[];
|
||||||
images: (VariantImageUnassign_variantImageUnassign_productVariant_images | null)[] | null;
|
media: VariantMediaUnassign_variantMediaUnassign_productVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: VariantImageUnassign_variantImageUnassign_productVariant_product;
|
product: VariantMediaUnassign_variantMediaUnassign_productVariant_product;
|
||||||
channelListings: VariantImageUnassign_variantImageUnassign_productVariant_channelListings[] | null;
|
channelListings: VariantMediaUnassign_variantMediaUnassign_productVariant_channelListings[] | null;
|
||||||
sku: string;
|
sku: string;
|
||||||
stocks: (VariantImageUnassign_variantImageUnassign_productVariant_stocks | null)[] | null;
|
stocks: (VariantMediaUnassign_variantMediaUnassign_productVariant_stocks | null)[] | null;
|
||||||
trackInventory: boolean;
|
trackInventory: boolean;
|
||||||
weight: VariantImageUnassign_variantImageUnassign_productVariant_weight | null;
|
weight: VariantMediaUnassign_variantMediaUnassign_productVariant_weight | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign {
|
export interface VariantMediaUnassign_variantMediaUnassign {
|
||||||
__typename: "VariantImageUnassign";
|
__typename: "VariantMediaUnassign";
|
||||||
errors: VariantImageUnassign_variantImageUnassign_errors[];
|
errors: VariantMediaUnassign_variantMediaUnassign_errors[];
|
||||||
productVariant: VariantImageUnassign_variantImageUnassign_productVariant | null;
|
productVariant: VariantMediaUnassign_variantMediaUnassign_productVariant | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign {
|
export interface VariantMediaUnassign {
|
||||||
variantImageUnassign: VariantImageUnassign_variantImageUnassign | null;
|
variantMediaUnassign: VariantMediaUnassign_variantMediaUnassign | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassignVariables {
|
export interface VariantMediaUnassignVariables {
|
||||||
variantId: string;
|
variantId: string;
|
||||||
imageId: string;
|
mediaId: string;
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { StockInput, AttributeValueInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, WeightUnitsEnum, StockErrorCode } from "./../../types/globalTypes";
|
import { StockInput, AttributeValueInput, ProductErrorCode, AttributeInputTypeEnum, AttributeEntityTypeEnum, ProductMediaType, WeightUnitsEnum, StockErrorCode } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: VariantUpdate
|
// GraphQL mutation operation: VariantUpdate
|
||||||
|
@ -121,10 +121,12 @@ export interface VariantUpdate_productVariantUpdate_productVariant_nonSelectionA
|
||||||
values: (VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values | null)[];
|
values: (VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantUpdate_productVariant_images {
|
export interface VariantUpdate_productVariantUpdate_productVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantUpdate_productVariant_product_defaultVariant {
|
export interface VariantUpdate_productVariantUpdate_productVariant_product_defaultVariant {
|
||||||
|
@ -132,12 +134,14 @@ export interface VariantUpdate_productVariantUpdate_productVariant_product_defau
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantUpdate_productVariant_product_images {
|
export interface VariantUpdate_productVariantUpdate_productVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantUpdate_productVariant_product_thumbnail {
|
export interface VariantUpdate_productVariantUpdate_productVariant_product_thumbnail {
|
||||||
|
@ -191,10 +195,12 @@ export interface VariantUpdate_productVariantUpdate_productVariant_product_chann
|
||||||
pricing: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing | null;
|
pricing: VariantUpdate_productVariantUpdate_productVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantUpdate_productVariant_product_variants_images {
|
export interface VariantUpdate_productVariantUpdate_productVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantUpdate_productVariant_product_variants {
|
export interface VariantUpdate_productVariantUpdate_productVariant_product_variants {
|
||||||
|
@ -202,14 +208,14 @@ export interface VariantUpdate_productVariantUpdate_productVariant_product_varia
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (VariantUpdate_productVariantUpdate_productVariant_product_variants_images | null)[] | null;
|
media: VariantUpdate_productVariantUpdate_productVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantUpdate_productVariant_product {
|
export interface VariantUpdate_productVariantUpdate_productVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: VariantUpdate_productVariantUpdate_productVariant_product_defaultVariant | null;
|
defaultVariant: VariantUpdate_productVariantUpdate_productVariant_product_defaultVariant | null;
|
||||||
images: (VariantUpdate_productVariantUpdate_productVariant_product_images | null)[] | null;
|
media: (VariantUpdate_productVariantUpdate_productVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: VariantUpdate_productVariantUpdate_productVariant_product_thumbnail | null;
|
thumbnail: VariantUpdate_productVariantUpdate_productVariant_product_thumbnail | null;
|
||||||
channelListings: VariantUpdate_productVariantUpdate_productVariant_product_channelListings[] | null;
|
channelListings: VariantUpdate_productVariantUpdate_productVariant_product_channelListings[] | null;
|
||||||
|
@ -269,7 +275,7 @@ export interface VariantUpdate_productVariantUpdate_productVariant {
|
||||||
privateMetadata: (VariantUpdate_productVariantUpdate_productVariant_privateMetadata | null)[];
|
privateMetadata: (VariantUpdate_productVariantUpdate_productVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes[];
|
selectionAttributes: VariantUpdate_productVariantUpdate_productVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: VariantUpdate_productVariantUpdate_productVariant_nonSelectionAttributes[];
|
||||||
images: (VariantUpdate_productVariantUpdate_productVariant_images | null)[] | null;
|
media: VariantUpdate_productVariantUpdate_productVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: VariantUpdate_productVariantUpdate_productVariant_product;
|
product: VariantUpdate_productVariantUpdate_productVariant_product;
|
||||||
channelListings: VariantUpdate_productVariantUpdate_productVariant_channelListings[] | null;
|
channelListings: VariantUpdate_productVariantUpdate_productVariant_channelListings[] | null;
|
||||||
|
@ -398,10 +404,12 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant_nonSele
|
||||||
values: (VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values | null)[];
|
values: (VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes_values | null)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantStocksUpdate_productVariant_images {
|
export interface VariantUpdate_productVariantStocksUpdate_productVariant_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant {
|
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant {
|
||||||
|
@ -409,12 +417,14 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant_product
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_images {
|
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
sortOrder: number | null;
|
sortOrder: number | null;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_thumbnail {
|
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_thumbnail {
|
||||||
|
@ -468,10 +478,12 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant_product
|
||||||
pricing: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing | null;
|
pricing: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings_pricing | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_variants_images {
|
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_variants_media {
|
||||||
__typename: "ProductImage";
|
__typename: "ProductMedia";
|
||||||
id: string;
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
type: ProductMediaType;
|
||||||
|
oembedData: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_variants {
|
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product_variants {
|
||||||
|
@ -479,14 +491,14 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant_product
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
sku: string;
|
sku: string;
|
||||||
images: (VariantUpdate_productVariantStocksUpdate_productVariant_product_variants_images | null)[] | null;
|
media: VariantUpdate_productVariantStocksUpdate_productVariant_product_variants_media[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product {
|
export interface VariantUpdate_productVariantStocksUpdate_productVariant_product {
|
||||||
__typename: "Product";
|
__typename: "Product";
|
||||||
id: string;
|
id: string;
|
||||||
defaultVariant: VariantUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant | null;
|
defaultVariant: VariantUpdate_productVariantStocksUpdate_productVariant_product_defaultVariant | null;
|
||||||
images: (VariantUpdate_productVariantStocksUpdate_productVariant_product_images | null)[] | null;
|
media: (VariantUpdate_productVariantStocksUpdate_productVariant_product_media | null)[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
thumbnail: VariantUpdate_productVariantStocksUpdate_productVariant_product_thumbnail | null;
|
thumbnail: VariantUpdate_productVariantStocksUpdate_productVariant_product_thumbnail | null;
|
||||||
channelListings: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings[] | null;
|
channelListings: VariantUpdate_productVariantStocksUpdate_productVariant_product_channelListings[] | null;
|
||||||
|
@ -546,7 +558,7 @@ export interface VariantUpdate_productVariantStocksUpdate_productVariant {
|
||||||
privateMetadata: (VariantUpdate_productVariantStocksUpdate_productVariant_privateMetadata | null)[];
|
privateMetadata: (VariantUpdate_productVariantStocksUpdate_productVariant_privateMetadata | null)[];
|
||||||
selectionAttributes: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes[];
|
selectionAttributes: VariantUpdate_productVariantStocksUpdate_productVariant_selectionAttributes[];
|
||||||
nonSelectionAttributes: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes[];
|
nonSelectionAttributes: VariantUpdate_productVariantStocksUpdate_productVariant_nonSelectionAttributes[];
|
||||||
images: (VariantUpdate_productVariantStocksUpdate_productVariant_images | null)[] | null;
|
media: VariantUpdate_productVariantStocksUpdate_productVariant_media[] | null;
|
||||||
name: string;
|
name: string;
|
||||||
product: VariantUpdate_productVariantStocksUpdate_productVariant_product;
|
product: VariantUpdate_productVariantStocksUpdate_productVariant_product;
|
||||||
channelListings: VariantUpdate_productVariantStocksUpdate_productVariant_channelListings[] | null;
|
channelListings: VariantUpdate_productVariantStocksUpdate_productVariant_channelListings[] | null;
|
||||||
|
|
|
@ -7,12 +7,12 @@ import { commonMessages } from "@saleor/intl";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import ProductImagePage from "../components/ProductImagePage";
|
import ProductMediaPage from "../components/ProductMediaPage";
|
||||||
import {
|
import {
|
||||||
useProductImageDeleteMutation,
|
useProductMediaDeleteMutation,
|
||||||
useProductImageUpdateMutation
|
useProductMediaUpdateMutation
|
||||||
} from "../mutations";
|
} from "../mutations";
|
||||||
import { useProductImageQuery } from "../queries";
|
import { useProductMediaQuery } from "../queries";
|
||||||
import {
|
import {
|
||||||
productImageUrl,
|
productImageUrl,
|
||||||
ProductImageUrlQueryParams,
|
ProductImageUrlQueryParams,
|
||||||
|
@ -20,14 +20,14 @@ import {
|
||||||
productUrl
|
productUrl
|
||||||
} from "../urls";
|
} from "../urls";
|
||||||
|
|
||||||
interface ProductImageProps {
|
interface ProductMediaProps {
|
||||||
imageId: string;
|
mediaId: string;
|
||||||
productId: string;
|
productId: string;
|
||||||
params: ProductImageUrlQueryParams;
|
params: ProductImageUrlQueryParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ProductImage: React.FC<ProductImageProps> = ({
|
export const ProductImage: React.FC<ProductMediaProps> = ({
|
||||||
imageId,
|
mediaId,
|
||||||
productId,
|
productId,
|
||||||
params
|
params
|
||||||
}) => {
|
}) => {
|
||||||
|
@ -37,17 +37,17 @@ export const ProductImage: React.FC<ProductImageProps> = ({
|
||||||
|
|
||||||
const handleBack = () => navigate(productUrl(productId));
|
const handleBack = () => navigate(productUrl(productId));
|
||||||
|
|
||||||
const { data, loading } = useProductImageQuery({
|
const { data, loading } = useProductMediaQuery({
|
||||||
displayLoader: true,
|
displayLoader: true,
|
||||||
variables: {
|
variables: {
|
||||||
imageId,
|
mediaId,
|
||||||
productId
|
productId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const [updateImage, updateResult] = useProductImageUpdateMutation({
|
const [updateImage, updateResult] = useProductMediaUpdateMutation({
|
||||||
onCompleted: data => {
|
onCompleted: data => {
|
||||||
if (data.productImageUpdate.errors.length === 0) {
|
if (data.productMediaUpdate.errors.length === 0) {
|
||||||
notify({
|
notify({
|
||||||
status: "success",
|
status: "success",
|
||||||
text: intl.formatMessage(commonMessages.savedChanges)
|
text: intl.formatMessage(commonMessages.savedChanges)
|
||||||
|
@ -56,7 +56,7 @@ export const ProductImage: React.FC<ProductImageProps> = ({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const [deleteImage, deleteResult] = useProductImageDeleteMutation({
|
const [deleteImage, deleteResult] = useProductMediaDeleteMutation({
|
||||||
onCompleted: handleBack
|
onCompleted: handleBack
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -66,30 +66,30 @@ export const ProductImage: React.FC<ProductImageProps> = ({
|
||||||
return <NotFoundPage onBack={() => navigate(productListUrl())} />;
|
return <NotFoundPage onBack={() => navigate(productListUrl())} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDelete = () => deleteImage({ variables: { id: imageId } });
|
const handleDelete = () => deleteImage({ variables: { id: mediaId } });
|
||||||
const handleImageClick = (id: string) => () =>
|
const handleImageClick = (id: string) => () =>
|
||||||
navigate(productImageUrl(productId, id));
|
navigate(productImageUrl(productId, id));
|
||||||
const handleUpdate = (formData: { description: string }) => {
|
const handleUpdate = (formData: { description: string }) => {
|
||||||
updateImage({
|
updateImage({
|
||||||
variables: {
|
variables: {
|
||||||
alt: formData.description,
|
alt: formData.description,
|
||||||
id: imageId
|
id: mediaId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const image = data?.product?.mainImage;
|
const mediaObj = data?.product?.mainImage;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ProductImagePage
|
<ProductMediaPage
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
product={data?.product?.name}
|
product={data?.product?.name}
|
||||||
image={image || null}
|
mediaObj={mediaObj || null}
|
||||||
images={data?.product?.images}
|
media={data?.product?.media}
|
||||||
onBack={handleBack}
|
onBack={handleBack}
|
||||||
onDelete={() =>
|
onDelete={() =>
|
||||||
navigate(
|
navigate(
|
||||||
productImageUrl(productId, imageId, {
|
productImageUrl(productId, mediaId, {
|
||||||
action: "remove"
|
action: "remove"
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -99,7 +99,7 @@ export const ProductImage: React.FC<ProductImageProps> = ({
|
||||||
saveButtonBarState={updateResult.status}
|
saveButtonBarState={updateResult.status}
|
||||||
/>
|
/>
|
||||||
<ActionDialog
|
<ActionDialog
|
||||||
onClose={() => navigate(productImageUrl(productId, imageId), true)}
|
onClose={() => navigate(productImageUrl(productId, mediaId), true)}
|
||||||
onConfirm={handleDelete}
|
onConfirm={handleDelete}
|
||||||
open={params.action === "remove"}
|
open={params.action === "remove"}
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage({
|
||||||
|
|
|
@ -27,9 +27,9 @@ import { commonMessages } from "@saleor/intl";
|
||||||
import {
|
import {
|
||||||
useProductChannelListingUpdate,
|
useProductChannelListingUpdate,
|
||||||
useProductDeleteMutation,
|
useProductDeleteMutation,
|
||||||
useProductImageCreateMutation,
|
useProductMediaCreateMutation,
|
||||||
useProductImageDeleteMutation,
|
useProductMediaDeleteMutation,
|
||||||
useProductImagesReorder,
|
useProductMediaReorder,
|
||||||
useProductUpdateMutation,
|
useProductUpdateMutation,
|
||||||
useProductVariantBulkDeleteMutation,
|
useProductVariantBulkDeleteMutation,
|
||||||
useProductVariantChannelListingUpdate,
|
useProductVariantChannelListingUpdate,
|
||||||
|
@ -41,6 +41,7 @@ import useCategorySearch from "@saleor/searches/useCategorySearch";
|
||||||
import useCollectionSearch from "@saleor/searches/useCollectionSearch";
|
import useCollectionSearch from "@saleor/searches/useCollectionSearch";
|
||||||
import usePageSearch from "@saleor/searches/usePageSearch";
|
import usePageSearch from "@saleor/searches/usePageSearch";
|
||||||
import useProductSearch from "@saleor/searches/useProductSearch";
|
import useProductSearch from "@saleor/searches/useProductSearch";
|
||||||
|
import { getProductErrorMessage } from "@saleor/utils/errors";
|
||||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||||
import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler";
|
import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler";
|
||||||
import {
|
import {
|
||||||
|
@ -55,7 +56,7 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||||
import { getMutationState } from "../../../misc";
|
import { getMutationState } from "../../../misc";
|
||||||
import ProductUpdatePage from "../../components/ProductUpdatePage";
|
import ProductUpdatePage from "../../components/ProductUpdatePage";
|
||||||
import { useProductDetails } from "../../queries";
|
import { useProductDetails } from "../../queries";
|
||||||
import { ProductImageCreateVariables } from "../../types/ProductImageCreate";
|
import { ProductMediaCreateVariables } from "../../types/ProductMediaCreate";
|
||||||
import { ProductUpdate as ProductUpdateMutationResult } from "../../types/ProductUpdate";
|
import { ProductUpdate as ProductUpdateMutationResult } from "../../types/ProductUpdate";
|
||||||
import {
|
import {
|
||||||
productImageUrl,
|
productImageUrl,
|
||||||
|
@ -159,7 +160,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
const [
|
const [
|
||||||
reorderProductImages,
|
reorderProductImages,
|
||||||
reorderProductImagesOpts
|
reorderProductImagesOpts
|
||||||
] = useProductImagesReorder({});
|
] = useProductMediaReorder({});
|
||||||
|
|
||||||
const [deleteProduct, deleteProductOpts] = useProductDeleteMutation({
|
const [deleteProduct, deleteProductOpts] = useProductDeleteMutation({
|
||||||
onCompleted: () => {
|
onCompleted: () => {
|
||||||
|
@ -176,10 +177,10 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
const [
|
const [
|
||||||
createProductImage,
|
createProductImage,
|
||||||
createProductImageOpts
|
createProductImageOpts
|
||||||
] = useProductImageCreateMutation({
|
] = useProductMediaCreateMutation({
|
||||||
onCompleted: data => {
|
onCompleted: data => {
|
||||||
const imageError = data.productImageCreate.errors.find(
|
const imageError = data.productMediaCreate.errors.find(
|
||||||
error => error.field === ("image" as keyof ProductImageCreateVariables)
|
error => error.field === ("image" as keyof ProductMediaCreateVariables)
|
||||||
);
|
);
|
||||||
if (imageError) {
|
if (imageError) {
|
||||||
notify({
|
notify({
|
||||||
|
@ -190,7 +191,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const [deleteProductImage] = useProductImageDeleteMutation({
|
const [deleteProductImage] = useProductMediaDeleteMutation({
|
||||||
onCompleted: () =>
|
onCompleted: () =>
|
||||||
notify({
|
notify({
|
||||||
status: "success",
|
status: "success",
|
||||||
|
@ -264,6 +265,41 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
value: listing.channel.id
|
value: listing.channel.id
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const [
|
||||||
|
createProductMedia,
|
||||||
|
createProductMediaOpts
|
||||||
|
] = useProductMediaCreateMutation({
|
||||||
|
onCompleted: data => {
|
||||||
|
const errors = data.productMediaCreate.errors;
|
||||||
|
|
||||||
|
if (errors.length) {
|
||||||
|
errors.map(error =>
|
||||||
|
notify({
|
||||||
|
status: "error",
|
||||||
|
text: getProductErrorMessage(error, intl)
|
||||||
|
})
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
notify({
|
||||||
|
status: "success",
|
||||||
|
text: intl.formatMessage(commonMessages.savedChanges)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleMediaUrlUpload = (mediaUrl: string) => {
|
||||||
|
const variables = {
|
||||||
|
alt: "",
|
||||||
|
mediaUrl,
|
||||||
|
product: product.id
|
||||||
|
};
|
||||||
|
|
||||||
|
createProductMedia({
|
||||||
|
variables
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const [
|
const [
|
||||||
deleteAttributeValue,
|
deleteAttributeValue,
|
||||||
deleteAttributeValueOpts
|
deleteAttributeValueOpts
|
||||||
|
@ -332,6 +368,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
updateVariantChannelsOpts.loading ||
|
updateVariantChannelsOpts.loading ||
|
||||||
productVariantCreateOpts.loading ||
|
productVariantCreateOpts.loading ||
|
||||||
deleteAttributeValueOpts.loading ||
|
deleteAttributeValueOpts.loading ||
|
||||||
|
createProductMediaOpts.loading ||
|
||||||
loading;
|
loading;
|
||||||
|
|
||||||
const formTransitionState = getMutationState(
|
const formTransitionState = getMutationState(
|
||||||
|
@ -339,7 +376,8 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
updateProductOpts.loading || updateSimpleProductOpts.loading,
|
updateProductOpts.loading || updateSimpleProductOpts.loading,
|
||||||
updateProductOpts.data?.productUpdate.errors,
|
updateProductOpts.data?.productUpdate.errors,
|
||||||
updateSimpleProductOpts.data?.productUpdate.errors,
|
updateSimpleProductOpts.data?.productUpdate.errors,
|
||||||
updateSimpleProductOpts.data?.productVariantUpdate.errors
|
updateSimpleProductOpts.data?.productVariantUpdate.errors,
|
||||||
|
createProductMediaOpts.data?.productMediaCreate.errors
|
||||||
);
|
);
|
||||||
|
|
||||||
const categories = (searchCategoriesOpts?.data?.search?.edges || []).map(
|
const categories = (searchCategoriesOpts?.data?.search?.edges || []).map(
|
||||||
|
@ -353,6 +391,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
...(updateSimpleProductOpts.data?.productUpdate.errors || []),
|
...(updateSimpleProductOpts.data?.productUpdate.errors || []),
|
||||||
...(productVariantCreateOpts.data?.productVariantCreate.errors || [])
|
...(productVariantCreateOpts.data?.productVariantCreate.errors || [])
|
||||||
];
|
];
|
||||||
|
|
||||||
const onSetDefaultVariant = useOnSetDefaultVariant(
|
const onSetDefaultVariant = useOnSetDefaultVariant(
|
||||||
product ? product.id : null,
|
product ? product.id : null,
|
||||||
null
|
null
|
||||||
|
@ -421,7 +460,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
fetchCategories={searchCategories}
|
fetchCategories={searchCategories}
|
||||||
fetchCollections={searchCollections}
|
fetchCollections={searchCollections}
|
||||||
saveButtonBarState={formTransitionState}
|
saveButtonBarState={formTransitionState}
|
||||||
images={data?.product?.images}
|
media={data?.product?.media}
|
||||||
header={product?.name}
|
header={product?.name}
|
||||||
placeholderImage={placeholderImg}
|
placeholderImage={placeholderImg}
|
||||||
product={product}
|
product={product}
|
||||||
|
@ -433,6 +472,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
onBack={handleBack}
|
onBack={handleBack}
|
||||||
onDelete={() => openModal("remove")}
|
onDelete={() => openModal("remove")}
|
||||||
onImageReorder={handleImageReorder}
|
onImageReorder={handleImageReorder}
|
||||||
|
onMediaUrlUpload={handleMediaUrlUpload}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
onWarehouseConfigure={() => navigate(warehouseAddPath)}
|
onWarehouseConfigure={() => navigate(warehouseAddPath)}
|
||||||
onVariantAdd={handleVariantAdd}
|
onVariantAdd={handleVariantAdd}
|
||||||
|
|
|
@ -33,8 +33,8 @@ import {
|
||||||
ProductDetails_product,
|
ProductDetails_product,
|
||||||
ProductDetails_product_variants
|
ProductDetails_product_variants
|
||||||
} from "@saleor/products/types/ProductDetails";
|
} from "@saleor/products/types/ProductDetails";
|
||||||
import { ProductImageCreateVariables } from "@saleor/products/types/ProductImageCreate";
|
import { ProductMediaCreateVariables } from "@saleor/products/types/ProductMediaCreate";
|
||||||
import { ProductImageReorderVariables } from "@saleor/products/types/ProductImageReorder";
|
import { ProductMediaReorderVariables } from "@saleor/products/types/ProductMediaReorder";
|
||||||
import {
|
import {
|
||||||
ProductUpdate,
|
ProductUpdate,
|
||||||
ProductUpdateVariables
|
ProductUpdateVariables
|
||||||
|
@ -271,7 +271,7 @@ export function createUpdateHandler(
|
||||||
|
|
||||||
export function createImageUploadHandler(
|
export function createImageUploadHandler(
|
||||||
id: string,
|
id: string,
|
||||||
createProductImage: (variables: ProductImageCreateVariables) => void
|
createProductImage: (variables: ProductMediaCreateVariables) => void
|
||||||
) {
|
) {
|
||||||
return (file: File) =>
|
return (file: File) =>
|
||||||
createProductImage({
|
createProductImage({
|
||||||
|
@ -283,13 +283,13 @@ export function createImageUploadHandler(
|
||||||
|
|
||||||
export function createImageReorderHandler(
|
export function createImageReorderHandler(
|
||||||
product: ProductDetails_product,
|
product: ProductDetails_product,
|
||||||
reorderProductImages: (variables: ProductImageReorderVariables) => void
|
reorderProductImages: (variables: ProductMediaReorderVariables) => void
|
||||||
) {
|
) {
|
||||||
return ({ newIndex, oldIndex }: ReorderEvent) => {
|
return ({ newIndex, oldIndex }: ReorderEvent) => {
|
||||||
let ids = product.images.map(image => image.id);
|
let ids = product.media.map(image => image.id);
|
||||||
ids = arrayMove(ids, oldIndex, newIndex);
|
ids = arrayMove(ids, oldIndex, newIndex);
|
||||||
reorderProductImages({
|
reorderProductImages({
|
||||||
imagesIds: ids,
|
mediaIds: ids,
|
||||||
productId: product.id
|
productId: product.id
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -43,8 +43,8 @@ import { ProductVariantUpdateSubmitData } from "../components/ProductVariantPage
|
||||||
import {
|
import {
|
||||||
useProductVariantReorderMutation,
|
useProductVariantReorderMutation,
|
||||||
useVariantDeleteMutation,
|
useVariantDeleteMutation,
|
||||||
useVariantImageAssignMutation,
|
useVariantMediaAssignMutation,
|
||||||
useVariantImageUnassignMutation,
|
useVariantMediaUnassignMutation,
|
||||||
useVariantUpdateMutation
|
useVariantUpdateMutation
|
||||||
} from "../mutations";
|
} from "../mutations";
|
||||||
import { useProductVariantQuery } from "../queries";
|
import { useProductVariantQuery } from "../queries";
|
||||||
|
@ -115,8 +115,8 @@ export const ProductVariant: React.FC<ProductUpdateProps> = ({
|
||||||
|
|
||||||
const [uploadFile, uploadFileOpts] = useFileUploadMutation({});
|
const [uploadFile, uploadFileOpts] = useFileUploadMutation({});
|
||||||
|
|
||||||
const [assignImage, assignImageOpts] = useVariantImageAssignMutation({});
|
const [assignMedia, assignMediaOpts] = useVariantMediaAssignMutation({});
|
||||||
const [unassignImage, unassignImageOpts] = useVariantImageUnassignMutation(
|
const [unassignMedia, unassignMediaOpts] = useVariantMediaUnassignMutation(
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
const [deleteVariant, deleteVariantOpts] = useVariantDeleteMutation({
|
const [deleteVariant, deleteVariantOpts] = useVariantDeleteMutation({
|
||||||
|
@ -130,6 +130,7 @@ export const ProductVariant: React.FC<ProductUpdateProps> = ({
|
||||||
navigate(productUrl(productId));
|
navigate(productUrl(productId));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const [updateVariant, updateVariantOpts] = useVariantUpdateMutation({
|
const [updateVariant, updateVariantOpts] = useVariantUpdateMutation({
|
||||||
onCompleted: data => {
|
onCompleted: data => {
|
||||||
if (data.productVariantUpdate.errors.length === 0) {
|
if (data.productVariantUpdate.errors.length === 0) {
|
||||||
|
@ -198,24 +199,24 @@ export const ProductVariant: React.FC<ProductUpdateProps> = ({
|
||||||
uploadFileOpts.loading ||
|
uploadFileOpts.loading ||
|
||||||
deleteVariantOpts.loading ||
|
deleteVariantOpts.loading ||
|
||||||
updateVariantOpts.loading ||
|
updateVariantOpts.loading ||
|
||||||
assignImageOpts.loading ||
|
assignMediaOpts.loading ||
|
||||||
unassignImageOpts.loading ||
|
unassignMediaOpts.loading ||
|
||||||
reorderProductVariantsOpts.loading ||
|
reorderProductVariantsOpts.loading ||
|
||||||
deleteAttributeValueOpts.loading;
|
deleteAttributeValueOpts.loading;
|
||||||
|
|
||||||
const handleImageSelect = (id: string) => () => {
|
const handleMediaSelect = (id: string) => () => {
|
||||||
if (variant) {
|
if (variant) {
|
||||||
if (variant?.images?.map(image => image.id).indexOf(id) !== -1) {
|
if (variant?.media?.map(media_obj => media_obj.id).indexOf(id) !== -1) {
|
||||||
unassignImage({
|
unassignMedia({
|
||||||
variables: {
|
variables: {
|
||||||
imageId: id,
|
mediaId: id,
|
||||||
variantId: variant.id
|
variantId: variant.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
assignImage({
|
assignMedia({
|
||||||
variables: {
|
variables: {
|
||||||
imageId: id,
|
mediaId: id,
|
||||||
variantId: variant.id
|
variantId: variant.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -331,7 +332,7 @@ export const ProductVariant: React.FC<ProductUpdateProps> = ({
|
||||||
onAdd={() => navigate(productVariantAddUrl(productId))}
|
onAdd={() => navigate(productVariantAddUrl(productId))}
|
||||||
onBack={handleBack}
|
onBack={handleBack}
|
||||||
onDelete={() => openModal("remove")}
|
onDelete={() => openModal("remove")}
|
||||||
onImageSelect={handleImageSelect}
|
onMediaSelect={handleMediaSelect}
|
||||||
onSubmit={async data => {
|
onSubmit={async data => {
|
||||||
await handleSubmit(data);
|
await handleSubmit(data);
|
||||||
await handleSubmitChannels(data, variant);
|
await handleSubmitChannels(data, variant);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -41,7 +41,7 @@ const props: Omit<CollectionDetailsPageProps, "classes"> = {
|
||||||
selectedChannelId: "123"
|
selectedChannelId: "123"
|
||||||
};
|
};
|
||||||
|
|
||||||
storiesOf("Views / Collections / Collection details", module)
|
storiesOf("Views / Collections / Collection detailsCollection details", module)
|
||||||
.addDecorator(Decorator)
|
.addDecorator(Decorator)
|
||||||
.add("default", () => <CollectionDetailsPage {...props} />)
|
.add("default", () => <CollectionDetailsPage {...props} />)
|
||||||
.add("loading", () => (
|
.add("loading", () => (
|
||||||
|
|
|
@ -1,23 +1,29 @@
|
||||||
import placeholder from "@assets/images/placeholder1080x1080.png";
|
import placeholder from "@assets/images/placeholder1080x1080.png";
|
||||||
|
import { ProductMediaType } from "@saleor/types/globalTypes";
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import ProductImagePage from "../../../products/components/ProductImagePage";
|
import ProductMediaPage from "../../../products/components/ProductMediaPage";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
|
|
||||||
const image = { alt: "Lorem ipsum", id: "", url: placeholder };
|
const mediaObj = {
|
||||||
const images = (Array(8) as any)
|
alt: "Lorem ipsum",
|
||||||
.fill({ id: "img", url: placeholder })
|
id: "",
|
||||||
|
type: ProductMediaType.IMAGE,
|
||||||
|
url: placeholder
|
||||||
|
};
|
||||||
|
const media = (Array(8) as any)
|
||||||
|
.fill({ id: "img", url: placeholder, oembedData: "{}" })
|
||||||
.map((image, imageIndex) => ({ ...image, id: image.id + imageIndex }));
|
.map((image, imageIndex) => ({ ...image, id: image.id + imageIndex }));
|
||||||
|
|
||||||
storiesOf("Views / Products / Product image details", module)
|
storiesOf("Views / Products / Product image details", module)
|
||||||
.addDecorator(Decorator)
|
.addDecorator(Decorator)
|
||||||
.add("when loaded data", () => (
|
.add("when loaded data", () => (
|
||||||
<ProductImagePage
|
<ProductMediaPage
|
||||||
product="Example product"
|
product="Example product"
|
||||||
disabled={false}
|
disabled={false}
|
||||||
image={image}
|
mediaObj={mediaObj}
|
||||||
images={images}
|
media={media}
|
||||||
onBack={() => undefined}
|
onBack={() => undefined}
|
||||||
onDelete={undefined}
|
onDelete={undefined}
|
||||||
onRowClick={() => undefined}
|
onRowClick={() => undefined}
|
||||||
|
@ -26,7 +32,7 @@ storiesOf("Views / Products / Product image details", module)
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
.add("when loading data", () => (
|
.add("when loading data", () => (
|
||||||
<ProductImagePage
|
<ProductMediaPage
|
||||||
product="Example product"
|
product="Example product"
|
||||||
disabled={true}
|
disabled={true}
|
||||||
onBack={() => undefined}
|
onBack={() => undefined}
|
||||||
|
|
|
@ -41,7 +41,7 @@ const props: ProductUpdatePageProps = {
|
||||||
fetchMoreCollections: fetchMoreProps,
|
fetchMoreCollections: fetchMoreProps,
|
||||||
hasChannelChanged: false,
|
hasChannelChanged: false,
|
||||||
header: product.name,
|
header: product.name,
|
||||||
images: product.images,
|
media: product.media,
|
||||||
onAssignReferencesClick: () => undefined,
|
onAssignReferencesClick: () => undefined,
|
||||||
onBack: () => undefined,
|
onBack: () => undefined,
|
||||||
onChannelsChange: () => undefined,
|
onChannelsChange: () => undefined,
|
||||||
|
@ -49,6 +49,7 @@ const props: ProductUpdatePageProps = {
|
||||||
onDelete: () => undefined,
|
onDelete: () => undefined,
|
||||||
onImageDelete: () => undefined,
|
onImageDelete: () => undefined,
|
||||||
onImageUpload: () => undefined,
|
onImageUpload: () => undefined,
|
||||||
|
onMediaUrlUpload: () => undefined,
|
||||||
onSetDefaultVariant: () => undefined,
|
onSetDefaultVariant: () => undefined,
|
||||||
onSubmit: () => undefined,
|
onSubmit: () => undefined,
|
||||||
onVariantAdd: () => undefined,
|
onVariantAdd: () => undefined,
|
||||||
|
@ -72,7 +73,7 @@ storiesOf("Views / Products / Product edit", module)
|
||||||
.addDecorator(Decorator)
|
.addDecorator(Decorator)
|
||||||
.add("when data is fully loaded", () => <ProductUpdatePage {...props} />)
|
.add("when data is fully loaded", () => <ProductUpdatePage {...props} />)
|
||||||
.add("when product has no images", () => (
|
.add("when product has no images", () => (
|
||||||
<ProductUpdatePage {...props} images={[]} />
|
<ProductUpdatePage {...props} media={[]} />
|
||||||
))
|
))
|
||||||
.add("when product has no variants", () => (
|
.add("when product has no variants", () => (
|
||||||
<ProductUpdatePage
|
<ProductUpdatePage
|
||||||
|
@ -92,7 +93,7 @@ storiesOf("Views / Products / Product edit", module)
|
||||||
variants={undefined}
|
variants={undefined}
|
||||||
product={undefined}
|
product={undefined}
|
||||||
collections={undefined}
|
collections={undefined}
|
||||||
images={undefined}
|
media={undefined}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
.add("no variants", () => (
|
.add("no variants", () => (
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
import placeholderImage from "@assets/images/placeholder255x255.png";
|
import placeholderImage from "@assets/images/placeholder255x255.png";
|
||||||
|
import Decorator from "@saleor/storybook/Decorator";
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import ProductVariantImageSelectDialog from "../../../products/components/ProductVariantImageSelectDialog";
|
import ProductVariantMediaSelectDialog from "../../../products/components/ProductVariantImageSelectDialog";
|
||||||
import {
|
import {
|
||||||
variantImages as variantImagesFixture,
|
variantMedia as variantImagesFixture,
|
||||||
variantProductImages as variantProductImagesFixture
|
variantProductImages as variantProductImagesFixture
|
||||||
} from "../../../products/fixtures";
|
} from "../../../products/fixtures";
|
||||||
|
|
||||||
const variantImages = variantImagesFixture(placeholderImage);
|
const variantImages = variantImagesFixture(placeholderImage);
|
||||||
const variantProductImages = variantProductImagesFixture(placeholderImage);
|
const variantProductImages = variantProductImagesFixture(placeholderImage);
|
||||||
|
|
||||||
storiesOf("Products / ProductVariantImageSelectDialog", module).add(
|
storiesOf("Products / ProductVariantImageSelectDialog", module)
|
||||||
"default",
|
.addDecorator(Decorator)
|
||||||
() => (
|
.add("default", () => (
|
||||||
<ProductVariantImageSelectDialog
|
<ProductVariantMediaSelectDialog
|
||||||
images={variantProductImages}
|
media={variantProductImages}
|
||||||
selectedImages={variantImages.map(image => image.id)}
|
selectedMedia={variantImages.map(image => image.id)}
|
||||||
onClose={() => undefined}
|
onClose={() => undefined}
|
||||||
onImageSelect={() => undefined}
|
onMediaSelect={() => undefined}
|
||||||
open={true}
|
open={true}
|
||||||
/>
|
/>
|
||||||
)
|
));
|
||||||
);
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ storiesOf("Views / Products / Product variant details", module)
|
||||||
onBack={() => undefined}
|
onBack={() => undefined}
|
||||||
onDelete={undefined}
|
onDelete={undefined}
|
||||||
onSetDefaultVariant={() => undefined}
|
onSetDefaultVariant={() => undefined}
|
||||||
onImageSelect={() => undefined}
|
onMediaSelect={() => undefined}
|
||||||
onSubmit={() => undefined}
|
onSubmit={() => undefined}
|
||||||
onVariantClick={() => undefined}
|
onVariantClick={() => undefined}
|
||||||
onVariantReorder={() => undefined}
|
onVariantReorder={() => undefined}
|
||||||
|
@ -52,7 +52,7 @@ storiesOf("Views / Products / Product variant details", module)
|
||||||
onAdd={() => undefined}
|
onAdd={() => undefined}
|
||||||
onDelete={undefined}
|
onDelete={undefined}
|
||||||
onSetDefaultVariant={() => undefined}
|
onSetDefaultVariant={() => undefined}
|
||||||
onImageSelect={() => undefined}
|
onMediaSelect={() => undefined}
|
||||||
onSubmit={() => undefined}
|
onSubmit={() => undefined}
|
||||||
onVariantClick={() => undefined}
|
onVariantClick={() => undefined}
|
||||||
onVariantReorder={() => undefined}
|
onVariantReorder={() => undefined}
|
||||||
|
@ -77,7 +77,7 @@ storiesOf("Views / Products / Product variant details", module)
|
||||||
onBack={() => undefined}
|
onBack={() => undefined}
|
||||||
onDelete={undefined}
|
onDelete={undefined}
|
||||||
onSetDefaultVariant={() => undefined}
|
onSetDefaultVariant={() => undefined}
|
||||||
onImageSelect={() => undefined}
|
onMediaSelect={() => undefined}
|
||||||
onSubmit={() => undefined}
|
onSubmit={() => undefined}
|
||||||
onVariantClick={() => undefined}
|
onVariantClick={() => undefined}
|
||||||
onVariantReorder={() => undefined}
|
onVariantReorder={() => undefined}
|
||||||
|
@ -100,7 +100,7 @@ storiesOf("Views / Products / Product variant details", module)
|
||||||
onBack={() => undefined}
|
onBack={() => undefined}
|
||||||
onDelete={undefined}
|
onDelete={undefined}
|
||||||
onSetDefaultVariant={() => undefined}
|
onSetDefaultVariant={() => undefined}
|
||||||
onImageSelect={() => undefined}
|
onMediaSelect={() => undefined}
|
||||||
onSubmit={() => undefined}
|
onSubmit={() => undefined}
|
||||||
onVariantClick={() => undefined}
|
onVariantClick={() => undefined}
|
||||||
onVariantReorder={() => undefined}
|
onVariantReorder={() => undefined}
|
||||||
|
|
40
src/theme.ts
40
src/theme.ts
|
@ -1,5 +1,3 @@
|
||||||
import Card from "@material-ui/core/Card";
|
|
||||||
import Checkbox from "@material-ui/core/Checkbox";
|
|
||||||
import { createMuiTheme, Theme } from "@material-ui/core/styles";
|
import { createMuiTheme, Theme } from "@material-ui/core/styles";
|
||||||
import { darken, fade } from "@material-ui/core/styles/colorManipulator";
|
import { darken, fade } from "@material-ui/core/styles/colorManipulator";
|
||||||
import { ThemeOptions } from "@material-ui/core/styles/createMuiTheme";
|
import { ThemeOptions } from "@material-ui/core/styles/createMuiTheme";
|
||||||
|
@ -8,8 +6,6 @@ import {
|
||||||
PaletteOptions
|
PaletteOptions
|
||||||
} from "@material-ui/core/styles/createPalette";
|
} from "@material-ui/core/styles/createPalette";
|
||||||
import { Overrides } from "@material-ui/core/styles/overrides";
|
import { Overrides } from "@material-ui/core/styles/overrides";
|
||||||
import TextField from "@material-ui/core/TextField";
|
|
||||||
import Typography from "@material-ui/core/Typography";
|
|
||||||
import { createElement } from "react";
|
import { createElement } from "react";
|
||||||
|
|
||||||
import { IThemeColors } from "./components/Theme/themes";
|
import { IThemeColors } from "./components/Theme/themes";
|
||||||
|
@ -551,6 +547,21 @@ const createTheme = (colors: IThemeColors): ITheme =>
|
||||||
props: {
|
props: {
|
||||||
MuiFormControl: {
|
MuiFormControl: {
|
||||||
variant: "filled"
|
variant: "filled"
|
||||||
|
},
|
||||||
|
MuiTextField: {
|
||||||
|
variant: "outlined"
|
||||||
|
},
|
||||||
|
MuiCard: {
|
||||||
|
elevation: 0
|
||||||
|
},
|
||||||
|
MuiTypography: {
|
||||||
|
component: "div"
|
||||||
|
},
|
||||||
|
MuiCheckbox: {
|
||||||
|
checkedIcon: createElement(CheckboxCheckedIcon),
|
||||||
|
color: "primary",
|
||||||
|
icon: createElement(CheckboxIcon),
|
||||||
|
indeterminateIcon: createElement(CheckboxIndeterminateIcon)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
shadows: [
|
shadows: [
|
||||||
|
@ -597,25 +608,4 @@ const createTheme = (colors: IThemeColors): ITheme =>
|
||||||
}
|
}
|
||||||
} as IThemeOptions);
|
} as IThemeOptions);
|
||||||
|
|
||||||
TextField.defaultProps = {
|
|
||||||
...TextField.defaultProps,
|
|
||||||
variant: "outlined"
|
|
||||||
};
|
|
||||||
|
|
||||||
Card.defaultProps = {
|
|
||||||
...Card.defaultProps,
|
|
||||||
elevation: 0
|
|
||||||
};
|
|
||||||
|
|
||||||
Typography.defaultProps = {
|
|
||||||
component: "div"
|
|
||||||
};
|
|
||||||
|
|
||||||
Checkbox.defaultProps = {
|
|
||||||
checkedIcon: createElement(CheckboxCheckedIcon),
|
|
||||||
color: "primary",
|
|
||||||
icon: createElement(CheckboxIcon),
|
|
||||||
indeterminateIcon: createElement(CheckboxIndeterminateIcon)
|
|
||||||
};
|
|
||||||
|
|
||||||
export default createTheme;
|
export default createTheme;
|
||||||
|
|
|
@ -795,6 +795,7 @@ export enum ProductErrorCode {
|
||||||
PRODUCT_WITHOUT_CATEGORY = "PRODUCT_WITHOUT_CATEGORY",
|
PRODUCT_WITHOUT_CATEGORY = "PRODUCT_WITHOUT_CATEGORY",
|
||||||
REQUIRED = "REQUIRED",
|
REQUIRED = "REQUIRED",
|
||||||
UNIQUE = "UNIQUE",
|
UNIQUE = "UNIQUE",
|
||||||
|
UNSUPPORTED_MEDIA_PROVIDER = "UNSUPPORTED_MEDIA_PROVIDER",
|
||||||
VARIANT_NO_DIGITAL_CONTENT = "VARIANT_NO_DIGITAL_CONTENT",
|
VARIANT_NO_DIGITAL_CONTENT = "VARIANT_NO_DIGITAL_CONTENT",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -813,6 +814,11 @@ export enum ProductFieldEnum {
|
||||||
VISIBLE = "VISIBLE",
|
VISIBLE = "VISIBLE",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum ProductMediaType {
|
||||||
|
IMAGE = "IMAGE",
|
||||||
|
VIDEO = "VIDEO",
|
||||||
|
}
|
||||||
|
|
||||||
export enum ProductOrderField {
|
export enum ProductOrderField {
|
||||||
COLLECTION = "COLLECTION",
|
COLLECTION = "COLLECTION",
|
||||||
DATE = "DATE",
|
DATE = "DATE",
|
||||||
|
@ -1572,10 +1578,10 @@ export interface ProductChannelListingUpdateInput {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductCreateInput {
|
export interface ProductCreateInput {
|
||||||
attributes?: (AttributeValueInput | null)[] | null;
|
attributes?: AttributeValueInput[] | null;
|
||||||
category?: string | null;
|
category?: string | null;
|
||||||
chargeTaxes?: boolean | null;
|
chargeTaxes?: boolean | null;
|
||||||
collections?: (string | null)[] | null;
|
collections?: string[] | null;
|
||||||
description?: any | null;
|
description?: any | null;
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
slug?: string | null;
|
slug?: string | null;
|
||||||
|
@ -1604,10 +1610,10 @@ export interface ProductFilterInput {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductInput {
|
export interface ProductInput {
|
||||||
attributes?: (AttributeValueInput | null)[] | null;
|
attributes?: AttributeValueInput[] | null;
|
||||||
category?: string | null;
|
category?: string | null;
|
||||||
chargeTaxes?: boolean | null;
|
chargeTaxes?: boolean | null;
|
||||||
collections?: (string | null)[] | null;
|
collections?: string[] | null;
|
||||||
description?: any | null;
|
description?: any | null;
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
slug?: string | null;
|
slug?: string | null;
|
||||||
|
|
|
@ -41,6 +41,9 @@ const messages = defineMessages({
|
||||||
defaultMessage: "SKUs must be unique",
|
defaultMessage: "SKUs must be unique",
|
||||||
description: "bulk variant create error"
|
description: "bulk variant create error"
|
||||||
},
|
},
|
||||||
|
unsupportedMediaProvider: {
|
||||||
|
defaultMessage: "Unsupported media provider or incorrect URL"
|
||||||
|
},
|
||||||
variantNoDigitalContent: {
|
variantNoDigitalContent: {
|
||||||
defaultMessage: "This variant does not have any digital content"
|
defaultMessage: "This variant does not have any digital content"
|
||||||
},
|
},
|
||||||
|
@ -74,6 +77,8 @@ function getProductErrorMessage(
|
||||||
return intl.formatMessage(commonMessages.requiredField);
|
return intl.formatMessage(commonMessages.requiredField);
|
||||||
case ProductErrorCode.VARIANT_NO_DIGITAL_CONTENT:
|
case ProductErrorCode.VARIANT_NO_DIGITAL_CONTENT:
|
||||||
return intl.formatMessage(messages.variantNoDigitalContent);
|
return intl.formatMessage(messages.variantNoDigitalContent);
|
||||||
|
case ProductErrorCode.UNSUPPORTED_MEDIA_PROVIDER:
|
||||||
|
return intl.formatMessage(messages.unsupportedMediaProvider);
|
||||||
case ProductErrorCode.INVALID:
|
case ProductErrorCode.INVALID:
|
||||||
if (err.field === "price") {
|
if (err.field === "price") {
|
||||||
return intl.formatMessage(messages.priceInvalid);
|
return intl.formatMessage(messages.priceInvalid);
|
||||||
|
|
Loading…
Reference in a new issue