Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add product pages (#2045)

Dominik Żegleńea4d01b32941
diff --git a/package-lock.json b/package-lock.json
index 895d7e23f3..d3b2d25ce2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3901,6 +3901,11 @@
"integrity": "sha512-/mQMARXVSuGbwOFFBKA4s0qRKtOaaTgnllp3qU4sMzDVGGAroPblyd529yBALnK/WEY8nHyRGx0/RFUDmhpVmQ==",
"optional": true
},
+ "@types/graphql": {
+ "version": "0.12.6",
+ "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-0.12.6.tgz",
+ "integrity": "sha512-wXAVyLfkG1UMkKOdMijVWFky39+OD/41KftzqfX1Oejd0Gm6dOIKjCihSVECg6X7PHjftxXmfOKA/d1H79ZfvQ=="
+ },
"@types/history": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/@types/history/-/history-4.6.2.tgz",
@@ -4534,6 +4539,31 @@
"requires": {
"apollo-link": "^1.2.2",
"apollo-link-http-common": "^0.2.4"
+ },
+ "dependencies": {
+ "apollo-link": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.2.tgz",
+ "integrity": "sha512-Uk/BC09dm61DZRDSu52nGq0nFhq7mcBPTjy5EEH1eunJndtCaNXQhQz/BjkI2NdrfGI+B+i5he6YSoRBhYizdw==",
+ "requires": {
+ "@types/graphql": "0.12.6",
+ "apollo-utilities": "^1.0.0",
+ "zen-observable-ts": "^0.8.9"
+ }
+ },
+ "zen-observable": {
+ "version": "0.8.8",
+ "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.8.tgz",
+ "integrity": "sha512-HnhhyNnwTFzS48nihkCZIJGsWGFcYUz+XPDlPK5W84Ifji8SksC6m7sQWOf8zdCGhzQ4tDYuMYGu5B0N1dXTtg=="
+ },
+ "zen-observable-ts": {
+ "version": "0.8.9",
+ "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.9.tgz",
+ "integrity": "sha512-KJz2O8FxbAdAU5CSc8qZ1K2WYEJb1HxS6XDRF+hOJ1rOYcg6eTMmS9xYHCXzqZZzKw6BbXWyF4UpwSsBQnHJeA==",
+ "requires": {
+ "zen-observable": "^0.8.0"
+ }
+ }
}
},
"apollo-link-http-common": {
@@ -4542,6 +4572,31 @@
"integrity": "sha512-4j6o6WoXuSPen9xh4NBaX8/vL98X1xY2cYzUEK1F8SzvHe2oFONfxJBTekwU8hnvapcuq8Qh9Uct+gelu8T10g==",
"requires": {
"apollo-link": "^1.2.2"
+ },
+ "dependencies": {
+ "apollo-link": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.2.tgz",
+ "integrity": "sha512-Uk/BC09dm61DZRDSu52nGq0nFhq7mcBPTjy5EEH1eunJndtCaNXQhQz/BjkI2NdrfGI+B+i5he6YSoRBhYizdw==",
+ "requires": {
+ "@types/graphql": "0.12.6",
+ "apollo-utilities": "^1.0.0",
+ "zen-observable-ts": "^0.8.9"
+ }
+ },
+ "zen-observable": {
+ "version": "0.8.8",
+ "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.8.tgz",
+ "integrity": "sha512-HnhhyNnwTFzS48nihkCZIJGsWGFcYUz+XPDlPK5W84Ifji8SksC6m7sQWOf8zdCGhzQ4tDYuMYGu5B0N1dXTtg=="
+ },
+ "zen-observable-ts": {
+ "version": "0.8.9",
+ "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.9.tgz",
+ "integrity": "sha512-KJz2O8FxbAdAU5CSc8qZ1K2WYEJb1HxS6XDRF+hOJ1rOYcg6eTMmS9xYHCXzqZZzKw6BbXWyF4UpwSsBQnHJeA==",
+ "requires": {
+ "zen-observable": "^0.8.0"
+ }
+ }
}
},
"apollo-utilities": {
@@ -7014,9 +7069,9 @@
}
},
"caniuse-db": {
- "version": "1.0.30000824",
- "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000824.tgz",
- "integrity": "sha1-u6P/QlKW4EyqN/5CYlkganBWVRs=",
+ "version": "1.0.30000830",
+ "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000830.tgz",
+ "integrity": "sha1-bkUlWzRWSf0V/1kHLaHhK7PeLxM=",
"dev": true
},
"caniuse-lite": {
@@ -7948,7 +8003,16 @@
"integrity": "sha512-PJF0SpJT+WdbVVt0AOYp9C8GnuruRlL/UFW7932nLWmFLQTaWEzTBQEx7/hn4BuV+WON75iAViSUJLiU3PKbpA==",
"dev": true,
"requires": {
- "hyphenate-style-name": "^1.0.2"
+ "hyphenate-style-name": "^1.0.2",
+ "isobject": "^3.0.1"
+ },
+ "dependencies": {
+ "isobject": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+ "dev": true
+ }
}
},
"css-loader": {
@@ -9631,6 +9695,56 @@
"jest-matcher-utils": "^22.4.3",
"jest-message-util": "^22.4.3",
"jest-regex-util": "^22.4.3"
+ },
+ "dependencies": {
+ "jest-diff": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-22.4.3.tgz",
+ "integrity": "sha512-/QqGvCDP5oZOF6PebDuLwrB2BMD8ffJv6TAGAdEVuDx1+uEgrHpSFrfrOiMRx2eJ1hgNjlQrOQEHetVwij90KA==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.0.1",
+ "diff": "^3.2.0",
+ "jest-get-type": "^22.4.3",
+ "pretty-format": "^22.4.3"
+ }
+ },
+ "jest-get-type": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
+ "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
+ "dev": true
+ },
+ "jest-matcher-utils": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz",
+ "integrity": "sha512-lsEHVaTnKzdAPR5t4B6OcxXo9Vy4K+kRRbG5gtddY8lBEC+Mlpvm1CJcsMESRjzUhzkz568exMV1hTB76nAKbA==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.0.1",
+ "jest-get-type": "^22.4.3",
+ "pretty-format": "^22.4.3"
+ }
+ },
+ "jest-message-util": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.3.tgz",
+ "integrity": "sha512-iAMeKxhB3Se5xkSjU0NndLLCHtP4n+GtCqV0bISKA5dmOXQfEbdEmYiu2qpnWBDCQdEafNDDU6Q+l6oBMd/+BA==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0-beta.35",
+ "chalk": "^2.0.1",
+ "micromatch": "^2.3.11",
+ "slash": "^1.0.0",
+ "stack-utils": "^1.0.1"
+ }
+ },
+ "jest-regex-util": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-22.4.3.tgz",
+ "integrity": "sha512-LFg1gWr3QinIjb8j833bq7jtQopiwdAs67OGfkPrvy7uNUbVMfTXXcOKXJaeY5GgjobELkKvKENqq1xrUectWg==",
+ "dev": true
+ }
}
},
"express": {
@@ -10535,7 +10649,14 @@
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
"integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=",
"dev": true,
- "optional": true
+ "optional": true,
+ "dependencies": {
+ "supports-color": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
+ }
+ }
},
"balanced-match": {
"version": "0.4.2",
@@ -13876,15 +13997,23 @@
}
},
"jest-diff": {
- "version": "22.4.3",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-22.4.3.tgz",
- "integrity": "sha512-/QqGvCDP5oZOF6PebDuLwrB2BMD8ffJv6TAGAdEVuDx1+uEgrHpSFrfrOiMRx2eJ1hgNjlQrOQEHetVwij90KA==",
+ "version": "22.4.0",
+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-22.4.0.tgz",
+ "integrity": "sha512-+/t20WmnkOkB8MOaGaPziI8zWKxquMvYw4Ub+wOzi7AUhmpFXz43buWSxVoZo4J5RnCozpGbX3/FssjJ5KV9Nw==",
"dev": true,
"requires": {
"chalk": "^2.0.1",
"diff": "^3.2.0",
- "jest-get-type": "^22.4.3",
- "pretty-format": "^22.4.3"
+ "jest-get-type": "^22.1.0",
+ "pretty-format": "^22.4.0"
+ },
+ "dependencies": {
+ "jest-get-type": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
+ "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
+ "dev": true
+ }
}
},
"jest-docblock": {
@@ -13897,30 +14026,126 @@
}
},
"jest-environment-jsdom": {
- "version": "22.4.3",
- "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz",
- "integrity": "sha512-FviwfR+VyT3Datf13+ULjIMO5CSeajlayhhYQwpzgunswoaLIPutdbrnfUHEMyJCwvqQFaVtTmn9+Y8WCt6n1w==",
+ "version": "22.4.1",
+ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-22.4.1.tgz",
+ "integrity": "sha512-x/JzAoH+dWPBnIMv5OQKiIR0TYf6UvbRjsIuDZ11yDFXkHKGJZg6jNnLAsokAm3cq9kUa2hH5BPUC9XU4n1ELQ==",
"dev": true,
"requires": {
- "jest-mock": "^22.4.3",
- "jest-util": "^22.4.3",
+ "jest-mock": "^22.2.0",
+ "jest-util": "^22.4.1",
"jsdom": "^11.5.1"
+ },
+ "dependencies": {
+ "callsites": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
+ "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
+ "dev": true
+ },
+ "jest-message-util": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.3.tgz",
+ "integrity": "sha512-iAMeKxhB3Se5xkSjU0NndLLCHtP4n+GtCqV0bISKA5dmOXQfEbdEmYiu2qpnWBDCQdEafNDDU6Q+l6oBMd/+BA==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0-beta.35",
+ "chalk": "^2.0.1",
+ "micromatch": "^2.3.11",
+ "slash": "^1.0.0",
+ "stack-utils": "^1.0.1"
+ }
+ },
+ "jest-mock": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-22.4.3.tgz",
+ "integrity": "sha512-+4R6mH5M1G4NK16CKg9N1DtCaFmuxhcIqF4lQK/Q1CIotqMs/XBemfpDPeVZBFow6iyUNu6EBT9ugdNOTT5o5Q==",
+ "dev": true
+ },
+ "jest-util": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-22.4.3.tgz",
+ "integrity": "sha512-rfDfG8wyC5pDPNdcnAlZgwKnzHvZDu8Td2NJI/jAGKEGxJPYiE4F0ss/gSAkG4778Y23Hvbz+0GMrDJTeo7RjQ==",
+ "dev": true,
+ "requires": {
+ "callsites": "^2.0.0",
+ "chalk": "^2.0.1",
+ "graceful-fs": "^4.1.11",
+ "is-ci": "^1.0.10",
+ "jest-message-util": "^22.4.3",
+ "mkdirp": "^0.5.1",
+ "source-map": "^0.6.0"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"jest-environment-node": {
- "version": "22.4.3",
- "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-22.4.3.tgz",
- "integrity": "sha512-reZl8XF6t/lMEuPWwo9OLfttyC26A5AMgDyEQ6DBgZuyfyeNUzYT8BFo6uxCCP/Av/b7eb9fTi3sIHFPBzmlRA==",
+ "version": "22.4.1",
+ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-22.4.1.tgz",
+ "integrity": "sha512-wj9+zzfRgnUbm5VwFOCGgG1QmbucUyrjPKBKUJdLW8K5Ss5zrNc1k+v6feZhFg6sS3ZGnjgtIyklaxEARxu+LQ==",
"dev": true,
"requires": {
- "jest-mock": "^22.4.3",
- "jest-util": "^22.4.3"
+ "jest-mock": "^22.2.0",
+ "jest-util": "^22.4.1"
+ },
+ "dependencies": {
+ "callsites": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
+ "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
+ "dev": true
+ },
+ "jest-message-util": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.3.tgz",
+ "integrity": "sha512-iAMeKxhB3Se5xkSjU0NndLLCHtP4n+GtCqV0bISKA5dmOXQfEbdEmYiu2qpnWBDCQdEafNDDU6Q+l6oBMd/+BA==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0-beta.35",
+ "chalk": "^2.0.1",
+ "micromatch": "^2.3.11",
+ "slash": "^1.0.0",
+ "stack-utils": "^1.0.1"
+ }
+ },
+ "jest-mock": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-22.4.3.tgz",
+ "integrity": "sha512-+4R6mH5M1G4NK16CKg9N1DtCaFmuxhcIqF4lQK/Q1CIotqMs/XBemfpDPeVZBFow6iyUNu6EBT9ugdNOTT5o5Q==",
+ "dev": true
+ },
+ "jest-util": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-22.4.3.tgz",
+ "integrity": "sha512-rfDfG8wyC5pDPNdcnAlZgwKnzHvZDu8Td2NJI/jAGKEGxJPYiE4F0ss/gSAkG4778Y23Hvbz+0GMrDJTeo7RjQ==",
+ "dev": true,
+ "requires": {
+ "callsites": "^2.0.0",
+ "chalk": "^2.0.1",
+ "graceful-fs": "^4.1.11",
+ "is-ci": "^1.0.10",
+ "jest-message-util": "^22.4.3",
+ "mkdirp": "^0.5.1",
+ "source-map": "^0.6.0"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
}
},
"jest-get-type": {
- "version": "22.4.3",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
- "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
+ "version": "22.1.0",
+ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.1.0.tgz",
+ "integrity": "sha512-nD97IVOlNP6fjIN5i7j5XRH+hFsHL7VlauBbzRvueaaUe70uohrkz7pL/N8lx/IAwZRTJ//wOdVgh85OgM7g3w==",
"dev": true
},
"jest-haste-map": {
@@ -13985,20 +14210,28 @@
}
},
"jest-matcher-utils": {
- "version": "22.4.3",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz",
- "integrity": "sha512-lsEHVaTnKzdAPR5t4B6OcxXo9Vy4K+kRRbG5gtddY8lBEC+Mlpvm1CJcsMESRjzUhzkz568exMV1hTB76nAKbA==",
+ "version": "22.4.0",
+ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-22.4.0.tgz",
+ "integrity": "sha512-03m3issxUXpWMwDYTfmL8hRNewUB0yCRTeXPm+eq058rZxLHD9f5NtSSO98CWHqe4UyISIxd9Ao9iDVjHWd2qg==",
"dev": true,
"requires": {
"chalk": "^2.0.1",
- "jest-get-type": "^22.4.3",
- "pretty-format": "^22.4.3"
+ "jest-get-type": "^22.1.0",
+ "pretty-format": "^22.4.0"
+ },
+ "dependencies": {
+ "jest-get-type": {
+ "version": "22.4.3",
+ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
+ "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
+ "dev": true
+ }
}
},
"jest-message-util": {
- "version": "22.4.3",
- "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.3.tgz",
- "integrity": "sha512-iAMeKxhB3Se5xkSjU0NndLLCHtP4n+GtCqV0bISKA5dmOXQfEbdEmYiu2qpnWBDCQdEafNDDU6Q+l6oBMd/+BA==",
+ "version": "22.4.0",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.0.tgz",
+ "integrity": "sha512-eyCJB0T3hrlpFF2FqQoIB093OulP+1qvATQmD3IOgJgMGqPL6eYw8TbC5P/VCWPqKhGL51xvjIIhow5eZ2wHFw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0-beta.35",
@@ -14008,22 +14241,16 @@
"stack-utils": "^1.0.1"
}
},
- "jest-mock": {
- "version": "22.4.3",
- "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-22.4.3.tgz",
- "integrity": "sha512-+4R6mH5M1G4NK16CKg9N1DtCaFmuxhcIqF4lQK/Q1CIotqMs/XBemfpDPeVZBFow6iyUNu6EBT9ugdNOTT5o5Q==",
- "dev": true
- },
"jest-regex-util": {
- "version": "22.4.3",
- "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-22.4.3.tgz",
- "integrity": "sha512-LFg1gWr3QinIjb8j833bq7jtQopiwdAs67OGfkPrvy7uNUbVMfTXXcOKXJaeY5GgjobELkKvKENqq1xrUectWg==",
+ "version": "22.1.0",
+ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-22.1.0.tgz",
+ "integrity": "sha512-on0LqVS6Xeh69sw3d1RukVnur+lVOl3zkmb0Q54FHj9wHoq6dbtWqb3TSlnVUyx36hqjJhjgs/QLqs07Bzu72Q==",
"dev": true
},
"jest-resolve": {
- "version": "22.4.3",
- "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-22.4.3.tgz",
- "integrity": "sha512-u3BkD/MQBmwrOJDzDIaxpyqTxYH+XqAXzVJP51gt29H8jpj3QgKof5GGO2uPGKGeA1yTMlpbMs1gIQ6U4vcRhw==",
+ "version": "22.4.2",
+ "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-22.4.2.tgz",
+ "integrity": "sha512-P1hSfcc2HJYT5t+WPu/11OfFMa7m8pBb2Gf2vm6W9OVs7YTXQ5RCC3nDqaYZQaTqxEM1ZZaTcQGcE6U2xMOsqQ==",
"dev": true,
"requires": {
"browser-resolve": "^1.11.2",
@@ -15200,9 +15427,9 @@
}
},
"material-ui": {
- "version": "1.0.0-beta.42",
- "resolved": "https://registry.npmjs.org/material-ui/-/material-ui-1.0.0-beta.42.tgz",
- "integrity": "sha512-b8eniowlv5dKU5eyrCnh9SP/NXxm2QE/kECvv+QNhkvDFdSL8QPmOTJjP2ytF1ghapRwJal+Ld2tBt+gKng/DA==",
+ "version": "1.0.0-beta.43",
+ "resolved": "https://registry.npmjs.org/material-ui/-/material-ui-1.0.0-beta.43.tgz",
+ "integrity": "sha512-6prcG6pwOBAH3s44GJg1WiylByz/TSL6oXlDXnBW1Sb0mSjL1ezfdZj4nSO2qjrPyfDm9sjwxaR9ZoVIHxU17g==",
"requires": {
"@types/jss": "^9.3.0",
"@types/react-transition-group": "^2.0.8",
@@ -19782,6 +20009,24 @@
"stifle": "^1.0.2"
}
},
+ "react-sortable-hoc": {
+ "version": "0.6.8",
+ "resolved": "https://registry.npmjs.org/react-sortable-hoc/-/react-sortable-hoc-0.6.8.tgz",
+ "integrity": "sha512-sUUAtNdV84AKZ2o+F5lVOOFWcyWG6aGDkNFgHoieB1zFLeWLWENkix06asPS4/GhigfuRh06aZix1j3Qx8+NSQ==",
+ "requires": {
+ "babel-runtime": "^6.11.6",
+ "invariant": "^2.2.1",
+ "lodash": "^4.12.0",
+ "prop-types": "^15.5.7"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.5",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz",
+ "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw=="
+ }
+ }
+ },
"react-split-pane": {
"version": "0.1.77",
"resolved": "https://registry.npmjs.org/react-split-pane/-/react-split-pane-0.1.77.tgz",
@@ -22158,6 +22403,16 @@
"requires": {
"ms": "2.0.0"
}
+ },
+ "has-values": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
+ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E="
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
}
}
},
@@ -24300,30 +24555,28 @@
},
"dependencies": {
"lodash": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
- "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
+ "version": "4.17.10",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
"dev": true
},
"react-transition-group": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.1.tgz",
- "integrity": "sha512-CWaL3laCmgAFdxdKbhhps+c0HRGF4c+hdM4H23+FI1QBNUyx/AMeIJGWorehPNSaKnQNOAxL7PQmqMu78CDj3Q==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.3.1.tgz",
+ "integrity": "sha512-hu4/LAOFSKjWt1+1hgnOv3ldxmt6lvZGTWz4KUkFrqzXrNDIVSu6txIcPszw7PNduR8en9YTN55JLRyd/L1ZiQ==",
"dev": true,
"requires": {
- "chain-function": "^1.0.0",
- "dom-helpers": "^3.2.0",
+ "dom-helpers": "^3.3.1",
"loose-envify": "^1.3.1",
- "prop-types": "^15.5.6",
- "warning": "^3.0.0"
+ "prop-types": "^15.6.1"
}
}
}
},
"vendors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.1.tgz",
- "integrity": "sha1-N61zyO5Bf7PVgOeFMSMH0nSEfyI=",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz",
+ "integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==",
"dev": true
},
"verror": {
@@ -24942,6 +25195,17 @@
"dev": true,
"requires": {
"ms": "2.0.0"
+ },
+ "dependencies": {
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ }
}
},
"expand-brackets": {
diff --git a/package.json b/package.json
index 68fd0f9e72..8d2db255ff 100644
--- a/package.json
+++ b/package.json
@@ -55,6 +55,7 @@
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
+ "react-sortable-hoc": "^0.6.8",
"react-svg": "^2.2.11",
"redux": "^3.7.2",
"select2": "^4.0.5",
diff --git a/saleor/static/dashboard-next/AppRoot.tsx b/saleor/static/dashboard-next/AppRoot.tsx
index 9df0699ac4..2ef78c30dc 100644
--- a/saleor/static/dashboard-next/AppRoot.tsx
+++ b/saleor/static/dashboard-next/AppRoot.tsx
@@ -175,6 +175,15 @@ export const AppRoot = decorate<{}>(
>
<ListItemText primary={i18n.t("Pages")} />
</ListItem>
+ <ListItem
+ button
+ onClick={() => {
+ this.closeDrawer();
+ navigate("/products/");
+ }}
+ >
+ <ListItemText primary={i18n.t("Products")} />
+ </ListItem>
</List>
</ResponsiveDrawer>
<main className={classes.content}>{children}</main>
diff --git a/saleor/static/dashboard-next/category/components/CategoryBaseForm/__snapshots__/CategoryBaseForm.test.tsx.snap b/saleor/static/dashboard-next/category/components/CategoryBaseForm/__snapshots__/CategoryBaseForm.test.tsx.snap
index 3619a47bd5..96faacc5e7 100644
--- a/saleor/static/dashboard-next/category/components/CategoryBaseForm/__snapshots__/CategoryBaseForm.test.tsx.snap
+++ b/saleor/static/dashboard-next/category/components/CategoryBaseForm/__snapshots__/CategoryBaseForm.test.tsx.snap
@@ -67,7 +67,7 @@ exports[`<CategoryBaseForm /> renders when errors occured 1`] = `
className="MuiInput-root-18 MuiInput-fullWidth-25 MuiInput-formControl-19 MuiInput-multiline-24 MuiInput-underline-22"
>
<div
- className="MuiTextarea-root-31"
+ className="Textarea-root-31"
style={
Object {
"height": 19,
@@ -76,7 +76,7 @@ exports[`<CategoryBaseForm /> renders when errors occured 1`] = `
>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-33 MuiTextarea-textarea-32"
+ className="Textarea-shadow-33 Textarea-textarea-32"
readOnly={true}
rows="1"
tabIndex={-1}
@@ -84,7 +84,7 @@ exports[`<CategoryBaseForm /> renders when errors occured 1`] = `
/>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-33 MuiTextarea-textarea-32"
+ className="Textarea-shadow-33 Textarea-textarea-32"
defaultValue={undefined}
readOnly={true}
rows={1}
@@ -97,7 +97,7 @@ Tell lose part purpose do when. Whatever drug contain particularly defense."
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiTextarea-textarea-32 MuiInput-input-26 MuiInput-inputMultiline-28"
+ className="Textarea-textarea-32 MuiInput-input-26 MuiInput-inputMultiline-28"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -188,7 +188,7 @@ exports[`<CategoryBaseForm /> renders with initial data 1`] = `
className="MuiInput-root-18 MuiInput-fullWidth-25 MuiInput-formControl-19 MuiInput-multiline-24 MuiInput-underline-22"
>
<div
- className="MuiTextarea-root-31"
+ className="Textarea-root-31"
style={
Object {
"height": 19,
@@ -197,7 +197,7 @@ exports[`<CategoryBaseForm /> renders with initial data 1`] = `
>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-33 MuiTextarea-textarea-32"
+ className="Textarea-shadow-33 Textarea-textarea-32"
readOnly={true}
rows="1"
tabIndex={-1}
@@ -205,7 +205,7 @@ exports[`<CategoryBaseForm /> renders with initial data 1`] = `
/>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-33 MuiTextarea-textarea-32"
+ className="Textarea-shadow-33 Textarea-textarea-32"
defaultValue={undefined}
readOnly={true}
rows={1}
@@ -218,7 +218,7 @@ Tell lose part purpose do when. Whatever drug contain particularly defense."
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiTextarea-textarea-32 MuiInput-input-26 MuiInput-inputMultiline-28"
+ className="Textarea-textarea-32 MuiInput-input-26 MuiInput-inputMultiline-28"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -309,7 +309,7 @@ exports[`<CategoryBaseForm /> renders without initial data 1`] = `
className="MuiInput-root-18 MuiInput-fullWidth-25 MuiInput-formControl-19 MuiInput-multiline-24 MuiInput-underline-22"
>
<div
- className="MuiTextarea-root-31"
+ className="Textarea-root-31"
style={
Object {
"height": 19,
@@ -318,7 +318,7 @@ exports[`<CategoryBaseForm /> renders without initial data 1`] = `
>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-33 MuiTextarea-textarea-32"
+ className="Textarea-shadow-33 Textarea-textarea-32"
readOnly={true}
rows="1"
tabIndex={-1}
@@ -326,7 +326,7 @@ exports[`<CategoryBaseForm /> renders without initial data 1`] = `
/>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-33 MuiTextarea-textarea-32"
+ className="Textarea-shadow-33 Textarea-textarea-32"
defaultValue={undefined}
readOnly={true}
rows={1}
@@ -338,7 +338,7 @@ exports[`<CategoryBaseForm /> renders without initial data 1`] = `
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiTextarea-textarea-32 MuiInput-input-26 MuiInput-inputMultiline-28"
+ className="Textarea-textarea-32 MuiInput-input-26 MuiInput-inputMultiline-28"
defaultValue={undefined}
disabled={false}
id={undefined}
diff --git a/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.tsx b/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.tsx
index 846fbd0980..e8e3e03600 100644
--- a/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.tsx
+++ b/saleor/static/dashboard-next/category/components/CategoryProducts/CategoryProducts.tsx
@@ -25,6 +25,7 @@ interface CategoryProductsProps {
onFilter?();
onNextPage?();
onPreviousPage?();
+ onRowClick?(id: string);
}
const CategoryProducts: React.StatelessComponent<CategoryProductsProps> = ({
@@ -34,6 +35,7 @@ const CategoryProducts: React.StatelessComponent<CategoryProductsProps> = ({
onFilter,
onNextPage,
onPreviousPage,
+ onRowClick,
products
}) => (
<Card>
@@ -57,6 +59,7 @@ const CategoryProducts: React.StatelessComponent<CategoryProductsProps> = ({
onNextPage={onNextPage}
onPreviousPage={onPreviousPage}
products={products}
+ onRowClick={onRowClick}
/>
</Card>
);
diff --git a/saleor/static/dashboard-next/category/components/CategoryProducts/__snapshots__/CategoryProducts.test.tsx.snap b/saleor/static/dashboard-next/category/components/CategoryProducts/__snapshots__/CategoryProducts.test.tsx.snap
index 90c99de008..10222bce10 100644
--- a/saleor/static/dashboard-next/category/components/CategoryProducts/__snapshots__/CategoryProducts.test.tsx.snap
+++ b/saleor/static/dashboard-next/category/components/CategoryProducts/__snapshots__/CategoryProducts.test.tsx.snap
@@ -37,7 +37,7 @@ exports[`<CategoryProducts /> renders when loading data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -50,7 +50,7 @@ exports[`<CategoryProducts /> renders when loading data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
@@ -66,7 +66,7 @@ exports[`<CategoryProducts /> renders when loading data 1`] = `
>
<th
aria-sort={null}
- className="MuiTableCell-root-89 MuiTableCell-head-90 Component-avatarCell-81"
+ className="MuiTableCell-root-89 MuiTableCell-head-90 Component-avatarCell-80"
scope="col"
/>
<th
@@ -126,7 +126,7 @@ exports[`<CategoryProducts /> renders when loading data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -159,7 +159,7 @@ exports[`<CategoryProducts /> renders when loading data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -170,7 +170,7 @@ exports[`<CategoryProducts /> renders when loading data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
@@ -186,7 +186,7 @@ exports[`<CategoryProducts /> renders when loading data 1`] = `
>
<td
aria-sort={null}
- className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-81"
+ className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-80"
scope={undefined}
>
<div
@@ -194,7 +194,7 @@ exports[`<CategoryProducts /> renders when loading data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -274,7 +274,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -287,7 +287,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
@@ -303,7 +303,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
>
<th
aria-sort={null}
- className="MuiTableCell-root-89 MuiTableCell-head-90 Component-avatarCell-81"
+ className="MuiTableCell-root-89 MuiTableCell-head-90 Component-avatarCell-80"
scope="col"
/>
<th
@@ -363,7 +363,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -396,7 +396,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -407,7 +407,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
@@ -423,7 +423,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
>
<td
aria-sort={null}
- className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-81"
+ className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-80"
scope={undefined}
>
<div
@@ -443,7 +443,12 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
className="MuiTableCell-root-89 MuiTableCell-body-91"
scope={undefined}
>
- Gardner, Graham and King
+ <span
+ className=""
+ onClick={[Function]}
+ >
+ Gardner, Graham and King
+ </span>
</td>
<td
aria-sort={null}
@@ -458,7 +463,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
>
<td
aria-sort={null}
- className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-81"
+ className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-80"
scope={undefined}
>
<div
@@ -478,7 +483,12 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
className="MuiTableCell-root-89 MuiTableCell-body-91"
scope={undefined}
>
- Gardner, Graham and King
+ <span
+ className=""
+ onClick={[Function]}
+ >
+ Gardner, Graham and King
+ </span>
</td>
<td
aria-sort={null}
@@ -493,7 +503,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
>
<td
aria-sort={null}
- className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-81"
+ className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-80"
scope={undefined}
>
<div
@@ -513,7 +523,12 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
className="MuiTableCell-root-89 MuiTableCell-body-91"
scope={undefined}
>
- Gardner, Graham and King
+ <span
+ className=""
+ onClick={[Function]}
+ >
+ Gardner, Graham and King
+ </span>
</td>
<td
aria-sort={null}
@@ -528,7 +543,7 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
>
<td
aria-sort={null}
- className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-81"
+ className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-80"
scope={undefined}
>
<div
@@ -548,7 +563,12 @@ exports[`<CategoryProducts /> renders with initial data 1`] = `
className="MuiTableCell-root-89 MuiTableCell-body-91"
scope={undefined}
>
- Gardner, Graham and King
+ <span
+ className=""
+ onClick={[Function]}
+ >
+ Gardner, Graham and King
+ </span>
</td>
<td
aria-sort={null}
@@ -600,7 +620,7 @@ exports[`<CategoryProducts /> renders without initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -613,7 +633,7 @@ exports[`<CategoryProducts /> renders without initial data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
@@ -629,7 +649,7 @@ exports[`<CategoryProducts /> renders without initial data 1`] = `
>
<th
aria-sort={null}
- className="MuiTableCell-root-89 MuiTableCell-head-90 Component-avatarCell-81"
+ className="MuiTableCell-root-89 MuiTableCell-head-90 Component-avatarCell-80"
scope="col"
/>
<th
@@ -689,7 +709,7 @@ exports[`<CategoryProducts /> renders without initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -722,7 +742,7 @@ exports[`<CategoryProducts /> renders without initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -733,7 +753,7 @@ exports[`<CategoryProducts /> renders without initial data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
@@ -749,7 +769,7 @@ exports[`<CategoryProducts /> renders without initial data 1`] = `
>
<td
aria-sort={null}
- className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-81"
+ className="MuiTableCell-root-89 MuiTableCell-body-91 Component-avatarCell-80"
scope={undefined}
/>
<td
diff --git a/saleor/static/dashboard-next/category/components/CategorySubcategories/__snapshots__/CategorySubcategories.test.tsx.snap b/saleor/static/dashboard-next/category/components/CategorySubcategories/__snapshots__/CategorySubcategories.test.tsx.snap
index 69d85758e0..038a577242 100644
--- a/saleor/static/dashboard-next/category/components/CategorySubcategories/__snapshots__/CategorySubcategories.test.tsx.snap
+++ b/saleor/static/dashboard-next/category/components/CategorySubcategories/__snapshots__/CategorySubcategories.test.tsx.snap
@@ -37,7 +37,7 @@ exports[`<CategorySubcategories /> renders when loading data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -50,21 +50,21 @@ exports[`<CategorySubcategories /> renders when loading data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<ul
- className="MuiList-root-81 MuiList-padding-82"
+ className="MuiList-root-80 MuiList-padding-81"
>
<li
- className="MuiListItem-root-85 MuiListItem-default-88 MuiListItem-gutters-92"
+ className="MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91"
disabled={false}
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiListItemIcon-root-95"
+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -76,13 +76,13 @@ exports[`<CategorySubcategories /> renders when loading data 1`] = `
</g>
</svg>
<div
- className="MuiListItemText-root-96"
+ className="MuiListItemText-root-95"
>
<h3
- className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-99"
+ className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-98"
>
<span
- className="Component-skeleton-107"
+ className="Component-skeleton-106"
style={undefined}
>
‌
@@ -131,7 +131,7 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -144,16 +144,16 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<ul
- className="MuiList-root-81 MuiList-padding-82"
+ className="MuiList-root-80 MuiList-padding-81"
>
<div
- className="MuiButtonBase-root-65 MuiListItem-root-85 MuiListItem-default-88 MuiListItem-gutters-92 MuiListItem-button-93"
+ className="MuiButtonBase-root-65 MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91 MuiListItem-button-92"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -170,7 +170,7 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiListItemIcon-root-95"
+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -182,20 +182,20 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
</g>
</svg>
<div
- className="MuiListItemText-root-96"
+ className="MuiListItemText-root-95"
>
<h3
- className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-99"
+ className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-98"
>
Lorem ipsum dolor
</h3>
</div>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</div>
<div
- className="MuiButtonBase-root-65 MuiListItem-root-85 MuiListItem-default-88 MuiListItem-gutters-92 MuiListItem-button-93"
+ className="MuiButtonBase-root-65 MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91 MuiListItem-button-92"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -212,7 +212,7 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiListItemIcon-root-95"
+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -224,16 +224,16 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
</g>
</svg>
<div
- className="MuiListItemText-root-96"
+ className="MuiListItemText-root-95"
>
<h3
- className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-99"
+ className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-98"
>
Mauris vehicula tortor vulputate
</h3>
</div>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</div>
</ul>
@@ -277,7 +277,7 @@ exports[`<CategorySubcategories /> renders without initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -290,16 +290,16 @@ exports[`<CategorySubcategories /> renders without initial data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<ul
- className="MuiList-root-81 MuiList-padding-82"
+ className="MuiList-root-80 MuiList-padding-81"
>
<li
- className="MuiListSubheader-root-102 MuiListSubheader-sticky-106"
+ className="MuiListSubheader-root-101 MuiListSubheader-sticky-105"
>
No categories found
</li>
diff --git a/saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.tsx b/saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.tsx
index dd0d4b0227..1a5bcc31d7 100644
--- a/saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.tsx
+++ b/saleor/static/dashboard-next/category/components/ProductFilters/ProductFilters.tsx
@@ -4,7 +4,7 @@ import * as React from "react";
import FilterCard from "../../../components/FilterCard";
import FormSpacer from "../../../components/FormSpacer";
import MultiSelectField from "../../../components/MultiSelectField";
-import PriceField from "../../../components/PriceField";
+import { PriceRangeField } from "../../../components/PriceField";
import SingleSelectField from "../../../components/SingleSelectField";
import i18n from "../../../i18n";
@@ -138,7 +138,7 @@ export class ProductFilters extends Component<
value={this.state.productTypes || []}
/>
<FormSpacer />
- <PriceField
+ <PriceRangeField
currencySymbol="USD"
label={i18n.t("Price")}
name="price"
diff --git a/saleor/static/dashboard-next/category/components/ProductFilters/__snapshots__/ProductFilters.test.tsx.snap b/saleor/static/dashboard-next/category/components/ProductFilters/__snapshots__/ProductFilters.test.tsx.snap
index 05ff54a136..a96e8c7a0e 100644
--- a/saleor/static/dashboard-next/category/components/ProductFilters/__snapshots__/ProductFilters.test.tsx.snap
+++ b/saleor/static/dashboard-next/category/components/ProductFilters/__snapshots__/ProductFilters.test.tsx.snap
@@ -42,7 +42,7 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -55,36 +55,36 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<div
- className="MuiCardContent-root-81"
+ className="MuiCardContent-root-80"
>
<div
aria-describedby={undefined}
- className="MuiFormControl-root-82 MuiFormControl-fullWidth-85"
+ className="MuiFormControl-root-81 MuiFormControl-fullWidth-84"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90 MuiInputLabel-shrink-89"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"
data-shrink={true}
htmlFor={undefined}
>
Name
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104"
+ className="MuiInput-input-103"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -104,30 +104,30 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
- className="MuiFormControl-root-82 Component-formControl-112"
+ className="MuiFormControl-root-81 Component-formControl-111"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90 MuiInputLabel-shrink-89"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"
data-shrink={true}
>
Product type
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<div
- className="MuiSelect-root-113"
+ className="MuiSelect-root-112"
>
<div
aria-haspopup="true"
aria-owns={null}
aria-pressed="false"
- className="MuiSelect-select-114 MuiSelect-selectMenu-115 MuiInput-input-104"
+ className="MuiSelect-select-113 MuiSelect-selectMenu-114 MuiInput-input-103"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -136,30 +136,30 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
tabIndex={0}
>
<div
- className="Component-chipContainer-111"
+ className="Component-chipContainer-110"
>
<div
- className="MuiChip-root-130 Component-chip-110"
+ className="MuiChip-root-129 Component-chip-109"
onClick={undefined}
onKeyDown={[Function]}
role="button"
tabIndex={-1}
>
<span
- className="MuiChip-label-135"
+ className="MuiChip-label-134"
>
Type 1
</span>
</div>
<div
- className="MuiChip-root-130 Component-chip-110"
+ className="MuiChip-root-129 Component-chip-109"
onClick={undefined}
onKeyDown={[Function]}
role="button"
tabIndex={-1}
>
<span
- className="MuiChip-label-135"
+ className="MuiChip-label-134"
>
Type 4
</span>
@@ -185,7 +185,7 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
/>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiSelect-icon-117"
+ className="MuiSvgIcon-root-67 MuiSelect-icon-116"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -198,35 +198,35 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
- className="Component-widgetContainer-125"
+ className="Component-widgetContainer-124"
>
<div
- className="Component-inputContainer-122"
+ className="Component-inputContainer-121"
>
<div
- className="MuiFormControl-root-82"
+ className="MuiFormControl-root-81"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90 MuiInputLabel-shrink-89"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"
data-shrink={true}
htmlFor="price_min"
>
Price
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104 MuiInput-inputType-107"
+ className="MuiInput-input-103 MuiInput-inputType-106"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -244,7 +244,7 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
value="30"
/>
<div
- className="MuiInputAdornment-root-126 MuiInputAdornment-positionEnd-128"
+ className="MuiInputAdornment-root-125 MuiInputAdornment-positionEnd-127"
>
<p
className="MuiTypography-root-35 MuiTypography-body1-44 MuiTypography-colorTextSecondary-57"
@@ -255,24 +255,24 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
</div>
</div>
<span
- className="Component-separator-124"
+ className="Component-separator-123"
>
-
</span>
<div
- className="MuiFormControl-root-82"
+ className="MuiFormControl-root-81"
onBlur={[Function]}
onFocus={[Function]}
>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100 Component-pullDown-123"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99 Component-pullDown-122"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104 MuiInput-inputType-107"
+ className="MuiInput-input-103 MuiInput-inputType-106"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -290,7 +290,7 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
value="50"
/>
<div
- className="MuiInputAdornment-root-126 MuiInputAdornment-positionEnd-128"
+ className="MuiInputAdornment-root-125 MuiInputAdornment-positionEnd-127"
>
<p
className="MuiTypography-root-35 MuiTypography-body1-44 MuiTypography-colorTextSecondary-57"
@@ -303,30 +303,30 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
- className="MuiFormControl-root-82 Component-formControl-129"
+ className="MuiFormControl-root-81 Component-formControl-128"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90 MuiInputLabel-shrink-89"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"
data-shrink={true}
>
Published
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<div
- className="MuiSelect-root-113"
+ className="MuiSelect-root-112"
>
<div
aria-haspopup="true"
aria-owns={null}
aria-pressed="false"
- className="MuiSelect-select-114 MuiSelect-selectMenu-115 MuiInput-input-104"
+ className="MuiSelect-select-113 MuiSelect-selectMenu-114 MuiInput-input-103"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -361,7 +361,7 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
/>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiSelect-icon-117"
+ className="MuiSvgIcon-root-67 MuiSelect-icon-116"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -374,30 +374,30 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
- className="MuiFormControl-root-82 Component-formControl-129"
+ className="MuiFormControl-root-81 Component-formControl-128"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90 MuiInputLabel-shrink-89"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"
data-shrink={true}
>
Highlighted
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<div
- className="MuiSelect-root-113"
+ className="MuiSelect-root-112"
>
<div
aria-haspopup="true"
aria-owns={null}
aria-pressed="false"
- className="MuiSelect-select-114 MuiSelect-selectMenu-115 MuiInput-input-104"
+ className="MuiSelect-select-113 MuiSelect-selectMenu-114 MuiInput-input-103"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -432,7 +432,7 @@ exports[`<ProductFilters /> renders with initial state 1`] = `
/>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiSelect-icon-117"
+ className="MuiSvgIcon-root-67 MuiSelect-icon-116"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -491,7 +491,7 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -504,36 +504,36 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<div
- className="MuiCardContent-root-81"
+ className="MuiCardContent-root-80"
>
<div
aria-describedby={undefined}
- className="MuiFormControl-root-82 MuiFormControl-fullWidth-85"
+ className="MuiFormControl-root-81 MuiFormControl-fullWidth-84"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"
data-shrink={false}
htmlFor={undefined}
>
Name
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104"
+ className="MuiInput-input-103"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -553,30 +553,30 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
- className="MuiFormControl-root-82 Component-formControl-112"
+ className="MuiFormControl-root-81 Component-formControl-111"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"
data-shrink={false}
>
Product type
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<div
- className="MuiSelect-root-113"
+ className="MuiSelect-root-112"
>
<div
aria-haspopup="true"
aria-owns={null}
aria-pressed="false"
- className="MuiSelect-select-114 MuiSelect-selectMenu-115 MuiInput-input-104"
+ className="MuiSelect-select-113 MuiSelect-selectMenu-114 MuiInput-input-103"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -611,7 +611,7 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
/>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiSelect-icon-117"
+ className="MuiSvgIcon-root-67 MuiSelect-icon-116"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -624,35 +624,35 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
- className="Component-widgetContainer-125"
+ className="Component-widgetContainer-124"
>
<div
- className="Component-inputContainer-122"
+ className="Component-inputContainer-121"
>
<div
- className="MuiFormControl-root-82"
+ className="MuiFormControl-root-81"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"
data-shrink={false}
htmlFor="price_min"
>
Price
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104 MuiInput-inputType-107"
+ className="MuiInput-input-103 MuiInput-inputType-106"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -670,7 +670,7 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
value=""
/>
<div
- className="MuiInputAdornment-root-126 MuiInputAdornment-positionEnd-128"
+ className="MuiInputAdornment-root-125 MuiInputAdornment-positionEnd-127"
>
<p
className="MuiTypography-root-35 MuiTypography-body1-44 MuiTypography-colorTextSecondary-57"
@@ -681,24 +681,24 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
</div>
</div>
<span
- className="Component-separator-124"
+ className="Component-separator-123"
>
-
</span>
<div
- className="MuiFormControl-root-82"
+ className="MuiFormControl-root-81"
onBlur={[Function]}
onFocus={[Function]}
>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100 Component-pullDown-123"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99 Component-pullDown-122"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104 MuiInput-inputType-107"
+ className="MuiInput-input-103 MuiInput-inputType-106"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -716,7 +716,7 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
value=""
/>
<div
- className="MuiInputAdornment-root-126 MuiInputAdornment-positionEnd-128"
+ className="MuiInputAdornment-root-125 MuiInputAdornment-positionEnd-127"
>
<p
className="MuiTypography-root-35 MuiTypography-body1-44 MuiTypography-colorTextSecondary-57"
@@ -729,30 +729,30 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
- className="MuiFormControl-root-82 Component-formControl-129"
+ className="MuiFormControl-root-81 Component-formControl-128"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"
data-shrink={false}
>
Published
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<div
- className="MuiSelect-root-113"
+ className="MuiSelect-root-112"
>
<div
aria-haspopup="true"
aria-owns={null}
aria-pressed="false"
- className="MuiSelect-select-114 MuiSelect-selectMenu-115 MuiInput-input-104"
+ className="MuiSelect-select-113 MuiSelect-selectMenu-114 MuiInput-input-103"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -787,7 +787,7 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
/>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiSelect-icon-117"
+ className="MuiSvgIcon-root-67 MuiSelect-icon-116"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -800,30 +800,30 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
- className="MuiFormControl-root-82 Component-formControl-129"
+ className="MuiFormControl-root-81 Component-formControl-128"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"
data-shrink={false}
>
Highlighted
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<div
- className="MuiSelect-root-113"
+ className="MuiSelect-root-112"
>
<div
aria-haspopup="true"
aria-owns={null}
aria-pressed="false"
- className="MuiSelect-select-114 MuiSelect-selectMenu-115 MuiInput-input-104"
+ className="MuiSelect-select-113 MuiSelect-selectMenu-114 MuiInput-input-103"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -858,7 +858,7 @@ exports[`<ProductFilters /> renders without initial state 1`] = `
/>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiSelect-icon-117"
+ className="MuiSvgIcon-root-67 MuiSelect-icon-116"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
diff --git a/saleor/static/dashboard-next/category/components/RootCategoryList/__snapshots__/RootCategoryList.test.tsx.snap b/saleor/static/dashboard-next/category/components/RootCategoryList/__snapshots__/RootCategoryList.test.tsx.snap
index b9a750320d..37fdb16d14 100644
--- a/saleor/static/dashboard-next/category/components/RootCategoryList/__snapshots__/RootCategoryList.test.tsx.snap
+++ b/saleor/static/dashboard-next/category/components/RootCategoryList/__snapshots__/RootCategoryList.test.tsx.snap
@@ -37,7 +37,7 @@ exports[`<CategorySubcategories /> renders when loading data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -50,21 +50,21 @@ exports[`<CategorySubcategories /> renders when loading data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<ul
- className="MuiList-root-81 MuiList-padding-82"
+ className="MuiList-root-80 MuiList-padding-81"
>
<li
- className="MuiListItem-root-85 MuiListItem-default-88 MuiListItem-gutters-92"
+ className="MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91"
disabled={false}
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiListItemIcon-root-95"
+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -76,13 +76,13 @@ exports[`<CategorySubcategories /> renders when loading data 1`] = `
</g>
</svg>
<div
- className="MuiListItemText-root-96"
+ className="MuiListItemText-root-95"
>
<h3
- className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-99"
+ className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-98"
>
<span
- className="Component-skeleton-107"
+ className="Component-skeleton-106"
style={undefined}
>
‌
@@ -131,7 +131,7 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -144,16 +144,16 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<ul
- className="MuiList-root-81 MuiList-padding-82"
+ className="MuiList-root-80 MuiList-padding-81"
>
<div
- className="MuiButtonBase-root-65 MuiListItem-root-85 MuiListItem-default-88 MuiListItem-gutters-92 MuiListItem-button-93"
+ className="MuiButtonBase-root-65 MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91 MuiListItem-button-92"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -170,7 +170,7 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiListItemIcon-root-95"
+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -182,20 +182,20 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
</g>
</svg>
<div
- className="MuiListItemText-root-96"
+ className="MuiListItemText-root-95"
>
<h3
- className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-99"
+ className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-98"
>
Lorem ipsum dolor
</h3>
</div>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</div>
<div
- className="MuiButtonBase-root-65 MuiListItem-root-85 MuiListItem-default-88 MuiListItem-gutters-92 MuiListItem-button-93"
+ className="MuiButtonBase-root-65 MuiListItem-root-84 MuiListItem-default-87 MuiListItem-gutters-91 MuiListItem-button-92"
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
@@ -212,7 +212,7 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68 MuiListItemIcon-root-95"
+ className="MuiSvgIcon-root-67 MuiListItemIcon-root-94"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -224,16 +224,16 @@ exports[`<CategorySubcategories /> renders with initial data 1`] = `
</g>
</svg>
<div
- className="MuiListItemText-root-96"
+ className="MuiListItemText-root-95"
>
<h3
- className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-99"
+ className="MuiTypography-root-35 MuiTypography-subheading-42 MuiListItemText-primary-98"
>
Mauris vehicula tortor vulputate
</h3>
</div>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</div>
</ul>
@@ -277,7 +277,7 @@ exports[`<CategorySubcategories /> renders without initial data 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -290,16 +290,16 @@ exports[`<CategorySubcategories /> renders without initial data 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<ul
- className="MuiList-root-81 MuiList-padding-82"
+ className="MuiList-root-80 MuiList-padding-81"
>
<li
- className="MuiListSubheader-root-102 MuiListSubheader-sticky-106"
+ className="MuiListSubheader-root-101 MuiListSubheader-sticky-105"
>
No categories found
</li>
diff --git a/saleor/static/dashboard-next/category/views/details.tsx b/saleor/static/dashboard-next/category/views/details.tsx
index 83c68cc449..31a99da46e 100644
--- a/saleor/static/dashboard-next/category/views/details.tsx
+++ b/saleor/static/dashboard-next/category/views/details.tsx
@@ -12,6 +12,7 @@ import ErrorMessageCard from "../../components/ErrorMessageCard";
import Navigator, { NavigatorLink } from "../../components/Navigator";
import Toggle from "../../components/Toggle";
import { CategoryPropertiesQuery } from "../../gql-types";
+import { productShowUrl } from "../../products";
import CategoryProducts from "../components/CategoryProducts";
import CategorySubcategories from "../components/CategorySubcategories";
import ProductFilters from "../components/ProductFilters";
diff --git a/saleor/static/dashboard-next/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx b/saleor/static/dashboard-next/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx
index 00d7ed0cce..edfb860b75 100644
--- a/saleor/static/dashboard-next/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx
+++ b/saleor/static/dashboard-next/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx
@@ -21,7 +21,8 @@ const decorate = withStyles(theme => ({
}
}));
-export interface CategoryDeleteDialogProps extends DialogProps {
+export interface CategoryDeleteDialogProps {
+ open: boolean;
name: string;
productCount?: number;
onClose?();
@@ -33,13 +34,14 @@ const CategoryDeleteDialog = decorate<CategoryDeleteDialogProps>(props => {
children,
classes,
name,
+ open,
onConfirm,
onClose,
productCount,
...dialogProps
} = props;
return (
- <Dialog {...dialogProps}>
+ <Dialog open={open}>
<DialogTitle>
{i18n.t("Delete category", { context: "title" })}
</DialogTitle>
diff --git a/saleor/static/dashboard-next/components/CategoryList/__snapshots__/CategoryList.test.tsx.snap b/saleor/static/dashboard-next/components/CategoryList/__snapshots__/CategoryList.test.tsx.snap
index dd509c43a9..a18ebd250c 100644
--- a/saleor/static/dashboard-next/components/CategoryList/__snapshots__/CategoryList.test.tsx.snap
+++ b/saleor/static/dashboard-next/components/CategoryList/__snapshots__/CategoryList.test.tsx.snap
@@ -5,7 +5,7 @@ exports[`<CategoryList /> renders when category list is empty 1`] = `
className="MuiList-root-1 MuiList-padding-2"
>
<li
- className="MuiListSubheader-root-63 MuiListSubheader-sticky-67"
+ className="MuiListSubheader-root-62 MuiListSubheader-sticky-66"
>
No categories found
</li>
@@ -55,7 +55,7 @@ exports[`<CategoryList /> renders when data is fully loaded 1`] = `
</h3>
</div>
<span
- className="MuiTouchRipple-root-56"
+ className="MuiTouchRipple-root-55"
/>
</div>
<div
@@ -97,7 +97,7 @@ exports[`<CategoryList /> renders when data is fully loaded 1`] = `
</h3>
</div>
<span
- className="MuiTouchRipple-root-56"
+ className="MuiTouchRipple-root-55"
/>
</div>
<div
@@ -139,7 +139,7 @@ exports[`<CategoryList /> renders when data is fully loaded 1`] = `
</h3>
</div>
<span
- className="MuiTouchRipple-root-56"
+ className="MuiTouchRipple-root-55"
/>
</div>
<div
@@ -181,7 +181,7 @@ exports[`<CategoryList /> renders when data is fully loaded 1`] = `
</h3>
</div>
<span
- className="MuiTouchRipple-root-56"
+ className="MuiTouchRipple-root-55"
/>
</div>
</ul>
diff --git a/saleor/static/dashboard-next/components/CategoryPropertiesCard/__snapshots__/CategoryPropertiesCard.test.tsx.snap b/saleor/static/dashboard-next/components/CategoryPropertiesCard/__snapshots__/CategoryPropertiesCard.test.tsx.snap
index 4ab27bd71e..7f5063abac 100644
--- a/saleor/static/dashboard-next/components/CategoryPropertiesCard/__snapshots__/CategoryPropertiesCard.test.tsx.snap
+++ b/saleor/static/dashboard-next/components/CategoryPropertiesCard/__snapshots__/CategoryPropertiesCard.test.tsx.snap
@@ -37,7 +37,7 @@ exports[`<CategoryPropertiesCard /> renders when data is loaded 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -50,7 +50,7 @@ exports[`<CategoryPropertiesCard /> renders when data is loaded 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
<button
@@ -75,7 +75,7 @@ exports[`<CategoryPropertiesCard /> renders when data is loaded 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -88,13 +88,13 @@ exports[`<CategoryPropertiesCard /> renders when data is loaded 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<div
- className="MuiCardContent-root-81"
+ className="MuiCardContent-root-80"
>
<p
className="MuiTypography-root-35 MuiTypography-body1-44"
@@ -142,7 +142,7 @@ exports[`<CategoryPropertiesCard /> renders while data is loading 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -155,7 +155,7 @@ exports[`<CategoryPropertiesCard /> renders while data is loading 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
<button
@@ -180,7 +180,7 @@ exports[`<CategoryPropertiesCard /> renders while data is loading 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -193,13 +193,13 @@ exports[`<CategoryPropertiesCard /> renders while data is loading 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<div
- className="MuiCardContent-root-81"
+ className="MuiCardContent-root-80"
>
<p
className="MuiTypography-root-35 MuiTypography-body1-44"
diff --git a/saleor/static/dashboard-next/components/Container.tsx b/saleor/static/dashboard-next/components/Container.tsx
new file mode 100644
index 0000000000..8f836224a2
--- /dev/null
+++ b/saleor/static/dashboard-next/components/Container.tsx
@@ -0,0 +1,25 @@
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+interface ContainerProps {
+ width: "xs" | "sm" | "md" | "lg" | "xl";
+}
+
+const decorate = withStyles(theme =>
+ ["xs", "sm", "md", "lg", "xl"].reduce((prev, current) => {
+ prev[current] = {
+ [theme.breakpoints.up(current as any)]: {
+ marginLeft: "auto",
+ marginRight: "auto",
+ maxWidth: theme.breakpoints.width(current as any)
+ }
+ };
+ return prev;
+ }, {})
+);
+export const Container = decorate<ContainerProps>(
+ ({ classes, width, theme, ...props }) => (
+ <div className={classes[width]} {...props} />
+ )
+);
+export default Container;
diff --git a/saleor/static/dashboard-next/components/ControlledCheckbox.tsx b/saleor/static/dashboard-next/components/ControlledCheckbox.tsx
index c083e320ea..c10f2c485d 100644
--- a/saleor/static/dashboard-next/components/ControlledCheckbox.tsx
+++ b/saleor/static/dashboard-next/components/ControlledCheckbox.tsx
@@ -6,13 +6,15 @@ interface ControlledCheckboxProps {
name: string;
label?: string;
checked: boolean;
+ disabled?: boolean;
onChange(event: any);
}
export const ControlledCheckbox: React.StatelessComponent<
ControlledCheckboxProps
-> = ({ checked, name, label, onChange }) => (
+> = ({ checked, disabled, name, label, onChange }) => (
<FormControlLabel
+ disabled={disabled}
control={
<Checkbox
checked={checked}
diff --git a/saleor/static/dashboard-next/components/ControlledSwitch.tsx b/saleor/static/dashboard-next/components/ControlledSwitch.tsx
new file mode 100644
index 0000000000..c53309ef3e
--- /dev/null
+++ b/saleor/static/dashboard-next/components/ControlledSwitch.tsx
@@ -0,0 +1,22 @@
+import { FormControlLabel } from "material-ui/Form";
+import Switch from "material-ui/Switch";
+import * as React from "react";
+
+interface ControlledSwitchProps {
+ checked: boolean;
+ disabled?: boolean;
+ uncheckedLabel?: string;
+ label: string;
+ onChange?(event: React.ChangeEvent<any>);
+}
+
+export const ControlledSwitch: React.StatelessComponent<
+ ControlledSwitchProps
+> = ({ checked, disabled, onChange, label, uncheckedLabel }) => (
+ <FormControlLabel
+ control={<Switch onChange={onChange} checked={checked} color="primary" />}
+ label={uncheckedLabel ? (checked ? label : uncheckedLabel) : label}
+ disabled={disabled}
+ />
+);
+export default ControlledSwitch;
diff --git a/saleor/static/dashboard-next/components/FilterCard/__snapshots__/FilterCard.test.tsx.snap b/saleor/static/dashboard-next/components/FilterCard/__snapshots__/FilterCard.test.tsx.snap
index 9aaa87e673..a0e40e7a72 100644
--- a/saleor/static/dashboard-next/components/FilterCard/__snapshots__/FilterCard.test.tsx.snap
+++ b/saleor/static/dashboard-next/components/FilterCard/__snapshots__/FilterCard.test.tsx.snap
@@ -42,7 +42,7 @@ exports[`<FilterCard /> renders properly 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -55,13 +55,13 @@ exports[`<FilterCard /> renders properly 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<div
- className="MuiCardContent-root-81"
+ className="MuiCardContent-root-80"
/>
</form>
</div>
diff --git a/saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.tsx b/saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.tsx
index 8128a499ae..7f9301456d 100644
--- a/saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.tsx
+++ b/saleor/static/dashboard-next/components/MultiSelectField/MultiSelectField.tsx
@@ -26,6 +26,7 @@ interface MultiSelectFieldProps {
value: string;
label: string;
}>;
+ disabled?: boolean;
error?: boolean;
hint?: string;
label?: string;
@@ -37,6 +38,7 @@ interface MultiSelectFieldProps {
export const MultiSelectField = decorate<MultiSelectFieldProps>(
({
classes,
+ disabled,
error,
label,
choices,
@@ -46,13 +48,19 @@ export const MultiSelectField = decorate<MultiSelectFieldProps>(
hint,
selectProps
}) => {
- const choicesByKey = choices.reduce((prev, curr) => {
- prev[curr.value] = curr.label;
- return prev;
- }, {});
+ const choicesByKey = disabled
+ ? {}
+ : choices.reduce((prev, curr) => {
+ prev[curr.value] = curr.label;
+ return prev;
+ }, {});
return (
- <FormControl className={classes.formControl} error={error}>
+ <FormControl
+ className={classes.formControl}
+ error={error}
+ disabled={disabled}
+ >
{label && <InputLabel>{label}</InputLabel>}
<Select
multiple
diff --git a/saleor/static/dashboard-next/components/PageHeader/__snapshots__/PageHeader.test.tsx.snap b/saleor/static/dashboard-next/components/PageHeader/__snapshots__/PageHeader.test.tsx.snap
index 3e1bc912fc..99d04766b5 100644
--- a/saleor/static/dashboard-next/components/PageHeader/__snapshots__/PageHeader.test.tsx.snap
+++ b/saleor/static/dashboard-next/components/PageHeader/__snapshots__/PageHeader.test.tsx.snap
@@ -41,7 +41,7 @@ exports[`<PageHeader /> renders with title and back button 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-41"
+ className="MuiSvgIcon-root-40"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -54,7 +54,7 @@ exports[`<PageHeader /> renders with title and back button 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-47"
+ className="MuiTouchRipple-root-46"
/>
</button>
<h2
@@ -101,7 +101,7 @@ exports[`<PageHeader /> renders with title icon bar 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-41"
+ className="MuiSvgIcon-root-40"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -114,7 +114,7 @@ exports[`<PageHeader /> renders with title icon bar 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-47"
+ className="MuiTouchRipple-root-46"
/>
</button>
</div>
@@ -147,7 +147,7 @@ exports[`<PageHeader /> renders with title, back button and icon bar 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-41"
+ className="MuiSvgIcon-root-40"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -160,7 +160,7 @@ exports[`<PageHeader /> renders with title, back button and icon bar 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-47"
+ className="MuiTouchRipple-root-46"
/>
</button>
<h2
@@ -192,7 +192,7 @@ exports[`<PageHeader /> renders with title, back button and icon bar 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-41"
+ className="MuiSvgIcon-root-40"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -205,7 +205,7 @@ exports[`<PageHeader /> renders with title, back button and icon bar 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-47"
+ className="MuiTouchRipple-root-46"
/>
</button>
</div>
diff --git a/saleor/static/dashboard-next/components/PriceField/PriceField.test.tsx b/saleor/static/dashboard-next/components/PriceField/PriceField.test.tsx
index 88b778ece6..f21801240c 100644
--- a/saleor/static/dashboard-next/components/PriceField/PriceField.test.tsx
+++ b/saleor/static/dashboard-next/components/PriceField/PriceField.test.tsx
@@ -1,45 +1,57 @@
import * as React from "react";
import * as renderer from "react-test-renderer";
-import PriceField from "./";
+import PriceField, { PriceRangeField } from "./";
const value = {
max: "30",
min: "10"
};
-describe("<PriceField />", () => {
+describe("<PriceRangeField />", () => {
it("renders with no value", () => {
- const component = renderer.create(<PriceField onChange={() => {}} />);
+ const component = renderer.create(<PriceRangeField onChange={() => {}} />);
expect(component).toMatchSnapshot();
});
it("renders with value", () => {
const component = renderer.create(
- <PriceField value={value} onChange={() => {}} />
+ <PriceRangeField value={value} onChange={() => {}} />
);
expect(component).toMatchSnapshot();
});
it("renders with label", () => {
const component = renderer.create(
- <PriceField label="Lorem ipsum" onChange={() => {}} />
+ <PriceRangeField label="Lorem ipsum" onChange={() => {}} />
);
expect(component).toMatchSnapshot();
});
it("renders with hint", () => {
const component = renderer.create(
- <PriceField hint="Lorem ipsum" onChange={() => {}} />
+ <PriceRangeField hint="Lorem ipsum" onChange={() => {}} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders with currency symbol", () => {
+ const component = renderer.create(
+ <PriceRangeField currencySymbol="$" onChange={() => {}} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders when disabled", () => {
+ const component = renderer.create(
+ <PriceRangeField disabled onChange={() => {}} />
);
expect(component).toMatchSnapshot();
});
it("renders with label and hint", () => {
const component = renderer.create(
- <PriceField label="Lorem" hint="Ipsum" onChange={() => {}} />
+ <PriceRangeField label="Lorem" hint="Ipsum" onChange={() => {}} />
);
expect(component).toMatchSnapshot();
});
it("renders with value, label and hint", () => {
const component = renderer.create(
- <PriceField
+ <PriceRangeField
value={value}
label="Lorem"
hint="Ipsum"
@@ -50,7 +62,7 @@ describe("<PriceField />", () => {
});
it("renders with value, label and error", () => {
const component = renderer.create(
- <PriceField
+ <PriceRangeField
value={value}
label="Lorem"
hint="Ipsum"
@@ -61,3 +73,65 @@ describe("<PriceField />", () => {
expect(component).toMatchSnapshot();
});
});
+
+describe("<PriceField />", () => {
+ it("renders with no value", () => {
+ const component = renderer.create(<PriceField onChange={() => {}} />);
+ expect(component).toMatchSnapshot();
+ });
+ it("renders with value", () => {
+ const component = renderer.create(
+ <PriceField value={"30"} onChange={() => {}} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders with label", () => {
+ const component = renderer.create(
+ <PriceField label="Lorem ipsum" onChange={() => {}} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders with hint", () => {
+ const component = renderer.create(
+ <PriceField hint="Lorem ipsum" onChange={() => {}} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders with currency symbol", () => {
+ const component = renderer.create(
+ <PriceField currencySymbol="$" onChange={() => {}} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders when disabled", () => {
+ const component = renderer.create(
+ <PriceField disabled onChange={() => {}} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders with label and hint", () => {
+ const component = renderer.create(
+ <PriceField label="Lorem" hint="Ipsum" onChange={() => {}} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders with value, label and hint", () => {
+ const component = renderer.create(
+ <PriceField value={"30"} label="Lorem" hint="Ipsum" onChange={() => {}} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders with value, label, currency symbol and error", () => {
+ const component = renderer.create(
+ <PriceField
+ value={"30"}
+ label="Lorem"
+ hint="Ipsum"
+ error={true}
+ onChange={() => {}}
+ currencySymbol="$"
+ />
+ );
+ expect(component).toMatchSnapshot();
+ });
+});
diff --git a/saleor/static/dashboard-next/components/PriceField/PriceField.tsx b/saleor/static/dashboard-next/components/PriceField/PriceField.tsx
index babbfaeb02..95c362e6c6 100644
--- a/saleor/static/dashboard-next/components/PriceField/PriceField.tsx
+++ b/saleor/static/dashboard-next/components/PriceField/PriceField.tsx
@@ -3,15 +3,16 @@ import Input, { InputAdornment, InputLabel } from "material-ui/Input";
import { withStyles } from "material-ui/styles";
import * as React from "react";
-interface PriceFieldProps {
+interface PriceRangeFieldProps {
currencySymbol?: string;
+ disabled?: boolean;
error?: boolean;
hint?: string;
label?: string;
name?: string;
value?: {
- max?: string;
- min?: string;
+ max?: string | number;
+ min?: string | number;
};
onChange(event: any);
}
@@ -19,7 +20,7 @@ interface PriceFieldProps {
const decorate = withStyles(theme => ({
inputContainer: {
display: "grid",
- gridTemplateColumns: "calc(50% - 1rem) 2rem calc(50% - 1rem)"
+ gridTemplateColumns: "1fr 2rem 1fr"
},
pullDown: {
marginTop: theme.spacing.unit * 2
@@ -34,8 +35,18 @@ const decorate = withStyles(theme => ({
}
}));
-export const PriceField = decorate<PriceFieldProps>(
- ({ error, label, hint, currencySymbol, name, classes, onChange, value }) => (
+export const PriceRangeField = decorate<PriceRangeFieldProps>(
+ ({
+ disabled,
+ error,
+ label,
+ hint,
+ currencySymbol,
+ name,
+ classes,
+ onChange,
+ value
+ }) => (
<div className={classes.widgetContainer}>
<div className={classes.inputContainer}>
<FormControl error={error}>
@@ -54,6 +65,7 @@ export const PriceField = decorate<PriceFieldProps>(
name={`${name}_min`}
onChange={onChange}
type="number"
+ disabled={disabled}
/>
{hint && <FormHelperText>{hint}</FormHelperText>}
</FormControl>
@@ -73,12 +85,60 @@ export const PriceField = decorate<PriceFieldProps>(
name={`${name}_max`}
onChange={onChange}
type="number"
+ disabled={disabled}
/>
</FormControl>
</div>
</div>
)
);
+PriceRangeField.defaultProps = {
+ name: "price"
+};
+
+interface PriceFieldProps {
+ currencySymbol?: string;
+ disabled?: boolean;
+ error?: boolean;
+ hint?: string;
+ label?: string;
+ name?: string;
+ value?: string | number;
+ onChange(event: any);
+}
+
+export const PriceField = decorate<PriceFieldProps>(
+ ({
+ disabled,
+ error,
+ label,
+ hint,
+ currencySymbol,
+ name,
+ classes,
+ onChange,
+ value
+ }) => (
+ <FormControl error={error} fullWidth>
+ {label && <InputLabel htmlFor={name}>{label}</InputLabel>}
+ <Input
+ value={value || ""}
+ endAdornment={
+ currencySymbol ? (
+ <InputAdornment position="end">{currencySymbol}</InputAdornment>
+ ) : (
+ <span />
+ )
+ }
+ name={name}
+ onChange={onChange}
+ type="number"
+ disabled={disabled}
+ />
+ {hint && <FormHelperText>{hint}</FormHelperText>}
+ </FormControl>
+ )
+);
PriceField.defaultProps = {
name: "price"
};
diff --git a/saleor/static/dashboard-next/components/PriceField/__snapshots__/PriceField.test.tsx.snap b/saleor/static/dashboard-next/components/PriceField/__snapshots__/PriceField.test.tsx.snap
index c7437f5ac3..10683c0301 100644
--- a/saleor/static/dashboard-next/components/PriceField/__snapshots__/PriceField.test.tsx.snap
+++ b/saleor/static/dashboard-next/components/PriceField/__snapshots__/PriceField.test.tsx.snap
@@ -1,6 +1,574 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`<PriceField /> renders when disabled 1`] = `
+<div
+ className="MuiFormControl-root-5 MuiFormControl-fullWidth-8"
+ onBlur={[Function]}
+ onFocus={[Function]}
+>
+ <div
+ className="MuiInput-root-9 MuiInput-disabled-12 MuiInput-formControl-10 MuiInput-underline-13"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-disabled-12 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={true}
+ id={undefined}
+ name="price"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <span />
+ </div>
+</div>
+`;
+
+exports[`<PriceField /> renders with currency symbol 1`] = `
+<div
+ className="MuiFormControl-root-5 MuiFormControl-fullWidth-8"
+ onBlur={[Function]}
+ onFocus={[Function]}
+>
+ <div
+ className="MuiInput-root-9 MuiInput-formControl-10 MuiInput-underline-13"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <div
+ className="MuiInputAdornment-root-36 MuiInputAdornment-positionEnd-38"
+ >
+ <p
+ className="MuiTypography-root-39 MuiTypography-body1-48 MuiTypography-colorTextSecondary-61"
+ >
+ $
+ </p>
+ </div>
+ </div>
+</div>
+`;
+
exports[`<PriceField /> renders with hint 1`] = `
+<div
+ className="MuiFormControl-root-5 MuiFormControl-fullWidth-8"
+ onBlur={[Function]}
+ onFocus={[Function]}
+>
+ <div
+ className="MuiInput-root-9 MuiInput-formControl-10 MuiInput-underline-13"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <span />
+ </div>
+ <p
+ className="MuiFormHelperText-root-32"
+ >
+ Lorem ipsum
+ </p>
+</div>
+`;
+
+exports[`<PriceField /> renders with label 1`] = `
+<div
+ className="MuiFormControl-root-5 MuiFormControl-fullWidth-8"
+ onBlur={[Function]}
+ onFocus={[Function]}
+>
+ <label
+ className="MuiFormLabel-root-27 MuiInputLabel-root-22 MuiInputLabel-formControl-23 MuiInputLabel-animated-26"
+ data-shrink={false}
+ htmlFor="price"
+ >
+ Lorem ipsum
+ </label>
+ <div
+ className="MuiInput-root-9 MuiInput-formControl-10 MuiInput-underline-13"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <span />
+ </div>
+</div>
+`;
+
+exports[`<PriceField /> renders with label and hint 1`] = `
+<div
+ className="MuiFormControl-root-5 MuiFormControl-fullWidth-8"
+ onBlur={[Function]}
+ onFocus={[Function]}
+>
+ <label
+ className="MuiFormLabel-root-27 MuiInputLabel-root-22 MuiInputLabel-formControl-23 MuiInputLabel-animated-26"
+ data-shrink={false}
+ htmlFor="price"
+ >
+ Lorem
+ </label>
+ <div
+ className="MuiInput-root-9 MuiInput-formControl-10 MuiInput-underline-13"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <span />
+ </div>
+ <p
+ className="MuiFormHelperText-root-32"
+ >
+ Ipsum
+ </p>
+</div>
+`;
+
+exports[`<PriceField /> renders with no value 1`] = `
+<div
+ className="MuiFormControl-root-5 MuiFormControl-fullWidth-8"
+ onBlur={[Function]}
+ onFocus={[Function]}
+>
+ <div
+ className="MuiInput-root-9 MuiInput-formControl-10 MuiInput-underline-13"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <span />
+ </div>
+</div>
+`;
+
+exports[`<PriceField /> renders with value 1`] = `
+<div
+ className="MuiFormControl-root-5 MuiFormControl-fullWidth-8"
+ onBlur={[Function]}
+ onFocus={[Function]}
+>
+ <div
+ className="MuiInput-root-9 MuiInput-formControl-10 MuiInput-underline-13"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value="30"
+ />
+ <span />
+ </div>
+</div>
+`;
+
+exports[`<PriceField /> renders with value, label and hint 1`] = `
+<div
+ className="MuiFormControl-root-5 MuiFormControl-fullWidth-8"
+ onBlur={[Function]}
+ onFocus={[Function]}
+>
+ <label
+ className="MuiFormLabel-root-27 MuiInputLabel-root-22 MuiInputLabel-formControl-23 MuiInputLabel-animated-26 MuiInputLabel-shrink-25"
+ data-shrink={true}
+ htmlFor="price"
+ >
+ Lorem
+ </label>
+ <div
+ className="MuiInput-root-9 MuiInput-formControl-10 MuiInput-underline-13"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value="30"
+ />
+ <span />
+ </div>
+ <p
+ className="MuiFormHelperText-root-32"
+ >
+ Ipsum
+ </p>
+</div>
+`;
+
+exports[`<PriceField /> renders with value, label, currency symbol and error 1`] = `
+<div
+ className="MuiFormControl-root-5 MuiFormControl-fullWidth-8"
+ onBlur={[Function]}
+ onFocus={[Function]}
+>
+ <label
+ className="MuiFormLabel-root-27 MuiFormLabel-error-30 MuiInputLabel-root-22 MuiInputLabel-formControl-23 MuiInputLabel-animated-26 MuiInputLabel-shrink-25"
+ data-shrink={true}
+ htmlFor="price"
+ >
+ Lorem
+ </label>
+ <div
+ className="MuiInput-root-9 MuiInput-error-14 MuiInput-formControl-10 MuiInput-underline-13"
+ >
+ <input
+ aria-invalid={true}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value="30"
+ />
+ <div
+ className="MuiInputAdornment-root-36 MuiInputAdornment-positionEnd-38"
+ >
+ <p
+ className="MuiTypography-root-39 MuiTypography-body1-48 MuiTypography-colorTextSecondary-61"
+ >
+ $
+ </p>
+ </div>
+ </div>
+ <p
+ className="MuiFormHelperText-root-32 MuiFormHelperText-error-33"
+ >
+ Ipsum
+ </p>
+</div>
+`;
+
+exports[`<PriceRangeField /> renders when disabled 1`] = `
+<div
+ className="Component-widgetContainer-4"
+>
+ <div
+ className="Component-inputContainer-1"
+ >
+ <div
+ className="MuiFormControl-root-5"
+ onBlur={[Function]}
+ onFocus={[Function]}
+ >
+ <div
+ className="MuiInput-root-9 MuiInput-disabled-12 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-disabled-12 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={true}
+ id={undefined}
+ name="price_min"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <span />
+ </div>
+ </div>
+ <span
+ className="Component-separator-3"
+ >
+ -
+ </span>
+ <div
+ className="MuiFormControl-root-5"
+ onBlur={[Function]}
+ onFocus={[Function]}
+ >
+ <div
+ className="MuiInput-root-9 MuiInput-disabled-12 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-disabled-12 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={true}
+ id={undefined}
+ name="price_max"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <span />
+ </div>
+ </div>
+ </div>
+</div>
+`;
+
+exports[`<PriceRangeField /> renders with currency symbol 1`] = `
+<div
+ className="Component-widgetContainer-4"
+>
+ <div
+ className="Component-inputContainer-1"
+ >
+ <div
+ className="MuiFormControl-root-5"
+ onBlur={[Function]}
+ onFocus={[Function]}
+ >
+ <div
+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price_min"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <div
+ className="MuiInputAdornment-root-36 MuiInputAdornment-positionEnd-38"
+ >
+ <p
+ className="MuiTypography-root-39 MuiTypography-body1-48 MuiTypography-colorTextSecondary-61"
+ >
+ $
+ </p>
+ </div>
+ </div>
+ </div>
+ <span
+ className="Component-separator-3"
+ >
+ -
+ </span>
+ <div
+ className="MuiFormControl-root-5"
+ onBlur={[Function]}
+ onFocus={[Function]}
+ >
+ <div
+ className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13 Component-pullDown-2"
+ >
+ <input
+ aria-invalid={false}
+ aria-required={false}
+ autoComplete={undefined}
+ autoFocus={undefined}
+ className="MuiInput-input-17 MuiInput-inputType-20"
+ defaultValue={undefined}
+ disabled={false}
+ id={undefined}
+ name="price_max"
+ onBlur={[Function]}
+ onChange={[Function]}
+ onFocus={[Function]}
+ onKeyDown={undefined}
+ onKeyUp={undefined}
+ placeholder={undefined}
+ readOnly={undefined}
+ required={undefined}
+ rows={undefined}
+ type="number"
+ value=""
+ />
+ <div
+ className="MuiInputAdornment-root-36 MuiInputAdornment-positionEnd-38"
+ >
+ <p
+ className="MuiTypography-root-39 MuiTypography-body1-48 MuiTypography-colorTextSecondary-61"
+ >
+ $
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+`;
+
+exports[`<PriceRangeField /> renders with hint 1`] = `
<div
className="Component-widgetContainer-4"
>
@@ -87,7 +655,7 @@ exports[`<PriceField /> renders with hint 1`] = `
</div>
`;
-exports[`<PriceField /> renders with label 1`] = `
+exports[`<PriceRangeField /> renders with label 1`] = `
<div
className="Component-widgetContainer-4"
>
@@ -176,7 +744,7 @@ exports[`<PriceField /> renders with label 1`] = `
</div>
`;
-exports[`<PriceField /> renders with label and hint 1`] = `
+exports[`<PriceRangeField /> renders with label and hint 1`] = `
<div
className="Component-widgetContainer-4"
>
@@ -270,7 +838,7 @@ exports[`<PriceField /> renders with label and hint 1`] = `
</div>
`;
-exports[`<PriceField /> renders with no value 1`] = `
+exports[`<PriceRangeField /> renders with no value 1`] = `
<div
className="Component-widgetContainer-4"
>
@@ -352,7 +920,7 @@ exports[`<PriceField /> renders with no value 1`] = `
</div>
`;
-exports[`<PriceField /> renders with value 1`] = `
+exports[`<PriceRangeField /> renders with value 1`] = `
<div
className="Component-widgetContainer-4"
>
@@ -434,7 +1002,7 @@ exports[`<PriceField /> renders with value 1`] = `
</div>
`;
-exports[`<PriceField /> renders with value, label and error 1`] = `
+exports[`<PriceRangeField /> renders with value, label and error 1`] = `
<div
className="Component-widgetContainer-4"
>
@@ -528,7 +1096,7 @@ exports[`<PriceField /> renders with value, label and error 1`] = `
</div>
`;
-exports[`<PriceField /> renders with value, label and hint 1`] = `
+exports[`<PriceRangeField /> renders with value, label and hint 1`] = `
<div
className="Component-widgetContainer-4"
>
diff --git a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx b/saleor/static/dashboard-next/components/ProductList/ProductList.tsx
index 975d32082f..60b9dfdb16 100644
--- a/saleor/static/dashboard-next/components/ProductList/ProductList.tsx
+++ b/saleor/static/dashboard-next/components/ProductList/ProductList.tsx
@@ -1,5 +1,6 @@
import Cached from "@material-ui/icons/Cached";
import Avatar from "material-ui/Avatar";
+import blue from "material-ui/colors/blue";
import { withStyles } from "material-ui/styles";
import Table, {
TableBody,
@@ -20,6 +21,10 @@ const decorate = withStyles(theme => ({
paddingLeft: theme.spacing.unit * 2,
paddingRight: 0,
width: theme.spacing.unit * 5
+ },
+ link: {
+ color: blue[500],
+ cursor: "pointer"
}
}));
@@ -36,6 +41,7 @@ interface ProductListProps {
}>;
onNextPage();
onPreviousPage();
+ onRowClick?(id: string);
}
export const ProductList = decorate<ProductListProps>(
@@ -45,6 +51,7 @@ export const ProductList = decorate<ProductListProps>(
hasPreviousPage,
onNextPage,
onPreviousPage,
+ onRowClick,
products
}) => (
<Table>
@@ -87,7 +94,14 @@ export const ProductList = decorate<ProductListProps>(
<TableCell className={classes.avatarCell}>
<Avatar src={product.thumbnailUrl} />
</TableCell>
- <TableCell>{product.name}</TableCell>
+ <TableCell>
+ <span
+ onClick={onRowClick ? onRowClick(product.id) : () => {}}
+ className={onRowClick ? classes.link : ""}
+ >
+ {product.name}
+ </span>
+ </TableCell>
<TableCell>{product.productType.name}</TableCell>
</TableRow>
))
diff --git a/saleor/static/dashboard-next/components/ProductList/__snapshots__/ProductList.test.tsx.snap b/saleor/static/dashboard-next/components/ProductList/__snapshots__/ProductList.test.tsx.snap
index 70db38dcc0..e7ae0bfa2d 100644
--- a/saleor/static/dashboard-next/components/ProductList/__snapshots__/ProductList.test.tsx.snap
+++ b/saleor/static/dashboard-next/components/ProductList/__snapshots__/ProductList.test.tsx.snap
@@ -2,29 +2,29 @@
exports[`<ProductList /> renders properly when data is loaded 1`] = `
<table
- className="MuiTable-root-2"
+ className="MuiTable-root-3"
>
<thead
- className="MuiTableHead-root-3"
+ className="MuiTableHead-root-4"
>
<tr
- className="MuiTableRow-root-4 MuiTableRow-head-7"
+ className="MuiTableRow-root-5 MuiTableRow-head-8"
>
<th
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-head-10 Component-avatarCell-1"
+ className="MuiTableCell-root-10 MuiTableCell-head-11 Component-avatarCell-1"
scope="col"
/>
<th
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-head-10"
+ className="MuiTableCell-root-10 MuiTableCell-head-11"
scope="col"
>
Name
</th>
<th
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-head-10"
+ className="MuiTableCell-root-10 MuiTableCell-head-11"
scope="col"
>
Type
@@ -33,25 +33,25 @@ exports[`<ProductList /> renders properly when data is loaded 1`] = `
</thead>
<tfoot>
<tr
- className="MuiTableRow-root-4 MuiTableRow-footer-8"
+ className="MuiTableRow-root-5 MuiTableRow-footer-9"
>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-footer-12 MuiTablePagination-root-20"
+ className="MuiTableCell-root-10 MuiTableCell-footer-13 MuiTablePagination-root-21"
colSpan={3}
scope={undefined}
>
<div
- className="MuiToolbar-root-26 MuiToolbar-gutters-27 MuiTablePagination-toolbar-25"
+ className="MuiToolbar-root-27 MuiToolbar-gutters-28 MuiTablePagination-toolbar-26"
>
<div
- className="MuiTablePagination-spacer-24"
+ className="MuiTablePagination-spacer-25"
/>
<div
- className="MuiTablePaginationActions-root-28"
+ className="MuiTablePaginationActions-root-29"
>
<button
- className="MuiButtonBase-root-35 MuiButtonBase-disabled-36 MuiIconButton-root-29 MuiIconButton-disabled-33"
+ className="MuiButtonBase-root-36 MuiButtonBase-disabled-37 MuiIconButton-root-30 MuiIconButton-disabled-34"
disabled={true}
onBlur={[Function]}
onClick={[MockFunction]}
@@ -68,7 +68,7 @@ exports[`<ProductList /> renders properly when data is loaded 1`] = `
type="button"
>
<span
- className="MuiIconButton-label-34"
+ className="MuiIconButton-label-35"
>
<svg
aria-hidden="true"
@@ -84,7 +84,7 @@ exports[`<ProductList /> renders properly when data is loaded 1`] = `
</span>
</button>
<button
- className="MuiButtonBase-root-35 MuiButtonBase-disabled-36 MuiIconButton-root-29 MuiIconButton-disabled-33"
+ className="MuiButtonBase-root-36 MuiButtonBase-disabled-37 MuiIconButton-root-30 MuiIconButton-disabled-34"
disabled={true}
onBlur={[Function]}
onClick={[MockFunction]}
@@ -101,7 +101,7 @@ exports[`<ProductList /> renders properly when data is loaded 1`] = `
type="button"
>
<span
- className="MuiIconButton-label-34"
+ className="MuiIconButton-label-35"
>
<svg
aria-hidden="true"
@@ -125,11 +125,11 @@ exports[`<ProductList /> renders properly when data is loaded 1`] = `
className="MuiTableBody-root-44"
>
<tr
- className="MuiTableRow-root-4"
+ className="MuiTableRow-root-5"
>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11 Component-avatarCell-1"
+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-avatarCell-1"
scope={undefined}
>
<div
@@ -146,25 +146,30 @@ exports[`<ProductList /> renders properly when data is loaded 1`] = `
</td>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11"
+ className="MuiTableCell-root-10 MuiTableCell-body-12"
scope={undefined}
>
- Lewis PLC
+ <span
+ className=""
+ onClick={[Function]}
+ >
+ Lewis PLC
+ </span>
</td>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11"
+ className="MuiTableCell-root-10 MuiTableCell-body-12"
scope={undefined}
>
T-sirts
</td>
</tr>
<tr
- className="MuiTableRow-root-4"
+ className="MuiTableRow-root-5"
>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11 Component-avatarCell-1"
+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-avatarCell-1"
scope={undefined}
>
<div
@@ -181,25 +186,30 @@ exports[`<ProductList /> renders properly when data is loaded 1`] = `
</td>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11"
+ className="MuiTableCell-root-10 MuiTableCell-body-12"
scope={undefined}
>
- Kennedy-Ramirez
+ <span
+ className=""
+ onClick={[Function]}
+ >
+ Kennedy-Ramirez
+ </span>
</td>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11"
+ className="MuiTableCell-root-10 MuiTableCell-body-12"
scope={undefined}
>
T-sirts
</td>
</tr>
<tr
- className="MuiTableRow-root-4"
+ className="MuiTableRow-root-5"
>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11 Component-avatarCell-1"
+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-avatarCell-1"
scope={undefined}
>
<div
@@ -216,14 +226,19 @@ exports[`<ProductList /> renders properly when data is loaded 1`] = `
</td>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11"
+ className="MuiTableCell-root-10 MuiTableCell-body-12"
scope={undefined}
>
- Newman, Ashley and Roberson
+ <span
+ className=""
+ onClick={[Function]}
+ >
+ Newman, Ashley and Roberson
+ </span>
</td>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11"
+ className="MuiTableCell-root-10 MuiTableCell-body-12"
scope={undefined}
>
T-sirts
@@ -235,29 +250,29 @@ exports[`<ProductList /> renders properly when data is loaded 1`] = `
exports[`<ProductList /> renders properly when product list is empty 1`] = `
<table
- className="MuiTable-root-2"
+ className="MuiTable-root-3"
>
<thead
- className="MuiTableHead-root-3"
+ className="MuiTableHead-root-4"
>
<tr
- className="MuiTableRow-root-4 MuiTableRow-head-7"
+ className="MuiTableRow-root-5 MuiTableRow-head-8"
>
<th
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-head-10 Component-avatarCell-1"
+ className="MuiTableCell-root-10 MuiTableCell-head-11 Component-avatarCell-1"
scope="col"
/>
<th
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-head-10"
+ className="MuiTableCell-root-10 MuiTableCell-head-11"
scope="col"
>
Name
</th>
<th
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-head-10"
+ className="MuiTableCell-root-10 MuiTableCell-head-11"
scope="col"
>
Type
@@ -266,25 +281,25 @@ exports[`<ProductList /> renders properly when product list is empty 1`] = `
</thead>
<tfoot>
<tr
- className="MuiTableRow-root-4 MuiTableRow-footer-8"
+ className="MuiTableRow-root-5 MuiTableRow-footer-9"
>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-footer-12 MuiTablePagination-root-20"
+ className="MuiTableCell-root-10 MuiTableCell-footer-13 MuiTablePagination-root-21"
colSpan={3}
scope={undefined}
>
<div
- className="MuiToolbar-root-26 MuiToolbar-gutters-27 MuiTablePagination-toolbar-25"
+ className="MuiToolbar-root-27 MuiToolbar-gutters-28 MuiTablePagination-toolbar-26"
>
<div
- className="MuiTablePagination-spacer-24"
+ className="MuiTablePagination-spacer-25"
/>
<div
- className="MuiTablePaginationActions-root-28"
+ className="MuiTablePaginationActions-root-29"
>
<button
- className="MuiButtonBase-root-35 MuiButtonBase-disabled-36 MuiIconButton-root-29 MuiIconButton-disabled-33"
+ className="MuiButtonBase-root-36 MuiButtonBase-disabled-37 MuiIconButton-root-30 MuiIconButton-disabled-34"
disabled={true}
onBlur={[Function]}
onClick={[MockFunction]}
@@ -301,7 +316,7 @@ exports[`<ProductList /> renders properly when product list is empty 1`] = `
type="button"
>
<span
- className="MuiIconButton-label-34"
+ className="MuiIconButton-label-35"
>
<svg
aria-hidden="true"
@@ -317,7 +332,7 @@ exports[`<ProductList /> renders properly when product list is empty 1`] = `
</span>
</button>
<button
- className="MuiButtonBase-root-35 MuiButtonBase-disabled-36 MuiIconButton-root-29 MuiIconButton-disabled-33"
+ className="MuiButtonBase-root-36 MuiButtonBase-disabled-37 MuiIconButton-root-30 MuiIconButton-disabled-34"
disabled={true}
onBlur={[Function]}
onClick={[MockFunction]}
@@ -334,7 +349,7 @@ exports[`<ProductList /> renders properly when product list is empty 1`] = `
type="button"
>
<span
- className="MuiIconButton-label-34"
+ className="MuiIconButton-label-35"
>
<svg
aria-hidden="true"
@@ -358,16 +373,16 @@ exports[`<ProductList /> renders properly when product list is empty 1`] = `
className="MuiTableBody-root-44"
>
<tr
- className="MuiTableRow-root-4"
+ className="MuiTableRow-root-5"
>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11 Component-avatarCell-1"
+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-avatarCell-1"
scope={undefined}
/>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11"
+ className="MuiTableCell-root-10 MuiTableCell-body-12"
colSpan={2}
scope={undefined}
>
@@ -380,29 +395,29 @@ exports[`<ProductList /> renders properly when product list is empty 1`] = `
exports[`<ProductList /> renders while data is loading 1`] = `
<table
- className="MuiTable-root-2"
+ className="MuiTable-root-3"
>
<thead
- className="MuiTableHead-root-3"
+ className="MuiTableHead-root-4"
>
<tr
- className="MuiTableRow-root-4 MuiTableRow-head-7"
+ className="MuiTableRow-root-5 MuiTableRow-head-8"
>
<th
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-head-10 Component-avatarCell-1"
+ className="MuiTableCell-root-10 MuiTableCell-head-11 Component-avatarCell-1"
scope="col"
/>
<th
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-head-10"
+ className="MuiTableCell-root-10 MuiTableCell-head-11"
scope="col"
>
Name
</th>
<th
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-head-10"
+ className="MuiTableCell-root-10 MuiTableCell-head-11"
scope="col"
>
Type
@@ -411,25 +426,25 @@ exports[`<ProductList /> renders while data is loading 1`] = `
</thead>
<tfoot>
<tr
- className="MuiTableRow-root-4 MuiTableRow-footer-8"
+ className="MuiTableRow-root-5 MuiTableRow-footer-9"
>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-footer-12 MuiTablePagination-root-20"
+ className="MuiTableCell-root-10 MuiTableCell-footer-13 MuiTablePagination-root-21"
colSpan={3}
scope={undefined}
>
<div
- className="MuiToolbar-root-26 MuiToolbar-gutters-27 MuiTablePagination-toolbar-25"
+ className="MuiToolbar-root-27 MuiToolbar-gutters-28 MuiTablePagination-toolbar-26"
>
<div
- className="MuiTablePagination-spacer-24"
+ className="MuiTablePagination-spacer-25"
/>
<div
- className="MuiTablePaginationActions-root-28"
+ className="MuiTablePaginationActions-root-29"
>
<button
- className="MuiButtonBase-root-35 MuiButtonBase-disabled-36 MuiIconButton-root-29 MuiIconButton-disabled-33"
+ className="MuiButtonBase-root-36 MuiButtonBase-disabled-37 MuiIconButton-root-30 MuiIconButton-disabled-34"
disabled={true}
onBlur={[Function]}
onClick={[MockFunction]}
@@ -446,7 +461,7 @@ exports[`<ProductList /> renders while data is loading 1`] = `
type="button"
>
<span
- className="MuiIconButton-label-34"
+ className="MuiIconButton-label-35"
>
<svg
aria-hidden="true"
@@ -462,7 +477,7 @@ exports[`<ProductList /> renders while data is loading 1`] = `
</span>
</button>
<button
- className="MuiButtonBase-root-35 MuiButtonBase-disabled-36 MuiIconButton-root-29 MuiIconButton-disabled-33"
+ className="MuiButtonBase-root-36 MuiButtonBase-disabled-37 MuiIconButton-root-30 MuiIconButton-disabled-34"
disabled={true}
onBlur={[Function]}
onClick={[MockFunction]}
@@ -479,7 +494,7 @@ exports[`<ProductList /> renders while data is loading 1`] = `
type="button"
>
<span
- className="MuiIconButton-label-34"
+ className="MuiIconButton-label-35"
>
<svg
aria-hidden="true"
@@ -503,11 +518,11 @@ exports[`<ProductList /> renders while data is loading 1`] = `
className="MuiTableBody-root-44"
>
<tr
- className="MuiTableRow-root-4"
+ className="MuiTableRow-root-5"
>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11 Component-avatarCell-1"
+ className="MuiTableCell-root-10 MuiTableCell-body-12 Component-avatarCell-1"
scope={undefined}
>
<div
@@ -530,7 +545,7 @@ exports[`<ProductList /> renders while data is loading 1`] = `
</td>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11"
+ className="MuiTableCell-root-10 MuiTableCell-body-12"
scope={undefined}
>
<span
@@ -542,7 +557,7 @@ exports[`<ProductList /> renders while data is loading 1`] = `
</td>
<td
aria-sort={null}
- className="MuiTableCell-root-9 MuiTableCell-body-11"
+ className="MuiTableCell-root-10 MuiTableCell-body-12"
scope={undefined}
>
<span
diff --git a/saleor/static/dashboard-next/components/RichTextEditor.tsx b/saleor/static/dashboard-next/components/RichTextEditor.tsx
index 39eeff1e55..20110d74d5 100644
--- a/saleor/static/dashboard-next/components/RichTextEditor.tsx
+++ b/saleor/static/dashboard-next/components/RichTextEditor.tsx
@@ -4,10 +4,11 @@ import * as React from "react";
interface RichTextEditorProps {
defaultValue?: string;
+ disabled?: boolean;
error?: boolean;
fullWidth?: boolean;
helperText: string;
- label: string;
+ label?: string;
name: string;
value?: string;
onChange(event: any);
@@ -15,6 +16,7 @@ interface RichTextEditorProps {
export const RichTextEditor: React.StatelessComponent<RichTextEditorProps> = ({
defaultValue,
+ disabled,
error,
fullWidth,
helperText,
@@ -24,8 +26,11 @@ export const RichTextEditor: React.StatelessComponent<RichTextEditorProps> = ({
value
}) => (
<FormControl style={fullWidth ? { width: "100%" } : {}} error={error}>
- <InputLabel shrink={!!(value || defaultValue)}>{label}</InputLabel>
+ {label && (
+ <InputLabel shrink={!!(value || defaultValue)}>{label}</InputLabel>
+ )}
<Input
+ disabled={disabled}
multiline
name={name}
{...(value ? { value } : {})}
@@ -33,7 +38,7 @@ export const RichTextEditor: React.StatelessComponent<RichTextEditorProps> = ({
onChange={onChange}
fullWidth={fullWidth}
/>
- <FormHelperText>{helperText}</FormHelperText>
+ {helperText && <FormHelperText>{helperText}</FormHelperText>}
</FormControl>
);
diff --git a/saleor/static/dashboard-next/components/SaveButtonBar/SaveButtonBar.test.tsx b/saleor/static/dashboard-next/components/SaveButtonBar/SaveButtonBar.test.tsx
new file mode 100644
index 0000000000..23846dceec
--- /dev/null
+++ b/saleor/static/dashboard-next/components/SaveButtonBar/SaveButtonBar.test.tsx
@@ -0,0 +1,19 @@
+import * as React from "react";
+import * as renderer from "react-test-renderer";
+
+import SaveButtonBar from "./SaveButtonBar";
+
+describe("<SaveButtonBar />", () => {
+ it("renders", () => {
+ const component = renderer.create(
+ <SaveButtonBar onBack={jest.fn()} onSave={jest.fn()} />
+ );
+ expect(component).toMatchSnapshot();
+ });
+ it("renders when disabled", () => {
+ const component = renderer.create(
+ <SaveButtonBar onBack={jest.fn()} onSave={jest.fn()} disabled />
+ );
+ expect(component).toMatchSnapshot();
+ });
+});
diff --git a/saleor/static/dashboard-next/components/SaveButtonBar/SaveButtonBar.tsx b/saleor/static/dashboard-next/components/SaveButtonBar/SaveButtonBar.tsx
new file mode 100644
index 0000000000..c42cbf0479
--- /dev/null
+++ b/saleor/static/dashboard-next/components/SaveButtonBar/SaveButtonBar.tsx
@@ -0,0 +1,48 @@
+import Button from "material-ui/Button";
+import gray from "material-ui/colors/grey";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+import i18n from "../../i18n";
+
+interface SaveButtonBarProps {
+ disabled?: boolean;
+ onBack(event: any);
+ onSave(event: any);
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ borderTop: `1px ${gray[300]} solid`,
+ display: "flex",
+ marginTop: theme.spacing.unit * 2,
+ paddingTop: theme.spacing.unit * 2,
+ [theme.breakpoints.down("sm")]: {
+ marginTop: theme.spacing.unit
+ }
+ },
+ spacer: {
+ flex: "1"
+ },
+ button: {
+ marginRight: theme.spacing.unit
+ }
+}));
+export const SaveButtonBar = decorate<SaveButtonBarProps>(
+ ({ classes, disabled, onBack, onSave, ...props }) => (
+ <div className={classes.root}>
+ <div className={classes.spacer} />
+ <Button onClick={onBack} className={classes.button}>
+ {i18n.t("Cancel")}
+ </Button>
+ <Button
+ variant="raised"
+ onClick={onSave}
+ color="primary"
+ disabled={disabled}
+ >
+ {i18n.t("Save")}
+ </Button>
+ </div>
+ )
+);
+export default SaveButtonBar;
diff --git a/saleor/static/dashboard-next/components/SaveButtonBar/__snapshots__/SaveButtonBar.test.tsx.snap b/saleor/static/dashboard-next/components/SaveButtonBar/__snapshots__/SaveButtonBar.test.tsx.snap
new file mode 100644
index 0000000000..7e80394151
--- /dev/null
+++ b/saleor/static/dashboard-next/components/SaveButtonBar/__snapshots__/SaveButtonBar.test.tsx.snap
@@ -0,0 +1,122 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`<SaveButtonBar /> renders 1`] = `
+<div
+ className="Component-root-1"
+>
+ <div
+ className="Component-spacer-2"
+ />
+ <button
+ className="MuiButtonBase-root-19 MuiButton-root-4 Component-button-3"
+ disabled={false}
+ onBlur={[Function]}
+ onClick={[MockFunction]}
+ onFocus={[Function]}
+ onKeyDown={[Function]}
+ onKeyUp={[Function]}
+ onMouseDown={[Function]}
+ onMouseLeave={[Function]}
+ onMouseUp={[Function]}
+ onTouchEnd={[Function]}
+ onTouchMove={[Function]}
+ onTouchStart={[Function]}
+ tabIndex="0"
+ type="button"
+ >
+ <span
+ className="MuiButton-label-5"
+ >
+ Cancel
+ </span>
+ <span
+ className="MuiTouchRipple-root-21"
+ />
+ </button>
+ <button
+ className="MuiButtonBase-root-19 MuiButton-root-4 MuiButton-raised-9 MuiButton-raisedPrimary-10"
+ disabled={false}
+ onBlur={[Function]}
+ onClick={[MockFunction]}
+ onFocus={[Function]}
+ onKeyDown={[Function]}
+ onKeyUp={[Function]}
+ onMouseDown={[Function]}
+ onMouseLeave={[Function]}
+ onMouseUp={[Function]}
+ onTouchEnd={[Function]}
+ onTouchMove={[Function]}
+ onTouchStart={[Function]}
+ tabIndex="0"
+ type="button"
+ >
+ <span
+ className="MuiButton-label-5"
+ >
+ Save
+ </span>
+ <span
+ className="MuiTouchRipple-root-21"
+ />
+ </button>
+</div>
+`;
+
+exports[`<SaveButtonBar /> renders when disabled 1`] = `
+<div
+ className="Component-root-1"
+>
+ <div
+ className="Component-spacer-2"
+ />
+ <button
+ className="MuiButtonBase-root-19 MuiButton-root-4 Component-button-3"
+ disabled={false}
+ onBlur={[Function]}
+ onClick={[MockFunction]}
+ onFocus={[Function]}
+ onKeyDown={[Function]}
+ onKeyUp={[Function]}
+ onMouseDown={[Function]}
+ onMouseLeave={[Function]}
+ onMouseUp={[Function]}
+ onTouchEnd={[Function]}
+ onTouchMove={[Function]}
+ onTouchStart={[Function]}
+ tabIndex="0"
+ type="button"
+ >
+ <span
+ className="MuiButton-label-5"
+ >
+ Cancel
+ </span>
+ <span
+ className="MuiTouchRipple-root-21"
+ />
+ </button>
+ <button
+ className="MuiButtonBase-root-19 MuiButtonBase-disabled-20 MuiButton-root-4 MuiButton-raised-9 MuiButton-raisedPrimary-10 MuiButton-disabled-13"
+ disabled={true}
+ onBlur={[Function]}
+ onClick={[MockFunction]}
+ onFocus={[Function]}
+ onKeyDown={[Function]}
+ onKeyUp={[Function]}
+ onMouseDown={[Function]}
+ onMouseLeave={[Function]}
+ onMouseUp={[Function]}
+ onTouchEnd={[Function]}
+ onTouchMove={[Function]}
+ onTouchStart={[Function]}
+ tabIndex="-1"
+ type="button"
+ >
+ <span
+ className="MuiButton-label-5"
+ >
+ Save
+ </span>
+ </button>
+</div>
+`;
diff --git a/saleor/static/dashboard-next/components/SaveButtonBar/index.ts b/saleor/static/dashboard-next/components/SaveButtonBar/index.ts
new file mode 100644
index 0000000000..edc3e63979
--- /dev/null
+++ b/saleor/static/dashboard-next/components/SaveButtonBar/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./SaveButtonBar";
+export * from "./SaveButtonBar";
diff --git a/saleor/static/dashboard-next/components/SeoForm/SeoForm.tsx b/saleor/static/dashboard-next/components/SeoForm/SeoForm.tsx
new file mode 100644
index 0000000000..6536905929
--- /dev/null
+++ b/saleor/static/dashboard-next/components/SeoForm/SeoForm.tsx
@@ -0,0 +1,107 @@
+import Card, { CardContent } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import Typography from "material-ui/Typography";
+import * as React from "react";
+
+import TextField from "material-ui/TextField";
+import i18n from "../../i18n";
+import FormSpacer from "../FormSpacer";
+import PageHeader from "../PageHeader";
+import Skeleton from "../Skeleton";
+
+interface SeoFormProps {
+ title: string;
+ titlePlaceholder: string;
+ description: string;
+ descriptionPlaceholder: string;
+ storefrontUrl: string;
+ loading?: boolean;
+ onClick();
+ onChange(event: any);
+}
+
+const decorate = withStyles(theme => ({
+ titleBar: {
+ color: "#1a0dab",
+ cursor: "pointer",
+ fontSize: "18px",
+ lineHeight: "21px",
+ textDecoration: "none",
+ wordWrap: "break-word" as "break-word",
+ overflowWrap: "break-word" as "break-word"
+ },
+ addressBar: {
+ color: "#006621",
+ fontSize: "13px",
+ lineHeight: "16px",
+ whiteSpace: "nowrap" as "nowrap",
+ marginBottom: "2px",
+ overflow: "hidden" as "hidden",
+ textOverflow: "ellipsis" as "ellipsis"
+ },
+ descriptionBar: {
+ color: "#545454",
+ fontSize: "13px",
+ lineHeight: "18px",
+ overflowWrap: "break-word" as "break-word"
+ }
+}));
+const SeoForm = decorate<SeoFormProps>(
+ ({
+ classes,
+ title,
+ titlePlaceholder,
+ description,
+ descriptionPlaceholder,
+ storefrontUrl,
+ loading,
+ onClick,
+ onChange
+ }) => (
+ <Card>
+ <PageHeader title={i18n.t("Search Engine Preview")} />
+ <CardContent>
+ <div>
+ {loading ? (
+ <Skeleton />
+ ) : (
+ <>
+ <Typography className={classes.titleBar} onClick={onClick}>
+ {(title || titlePlaceholder).substr(0, 70)}
+ </Typography>
+ <Typography className={classes.addressBar}>
+ {storefrontUrl}
+ </Typography>
+ <Typography className={classes.descriptionBar}>
+ {(description || descriptionPlaceholder).substr(0, 300)}
+ </Typography>
+ </>
+ )}
+ </div>
+ <FormSpacer />
+ <TextField
+ name="seoTitle"
+ label={i18n.t("Search engine title")}
+ helperText={i18n.t(
+ "If empty, the preview shows what will be autogenerated."
+ )}
+ value={title.slice(0, 70)}
+ onChange={onChange}
+ fullWidth
+ />
+ <FormSpacer />
+ <TextField
+ name="seoDescription"
+ label={i18n.t("Search engine title")}
+ helperText={i18n.t(
+ "If empty, the preview shows what will be autogenerated."
+ )}
+ value={description.slice(0, 300)}
+ onChange={onChange}
+ fullWidth
+ />
+ </CardContent>
+ </Card>
+ )
+);
+export default SeoForm;
diff --git a/saleor/static/dashboard-next/components/SeoForm/index.ts b/saleor/static/dashboard-next/components/SeoForm/index.ts
new file mode 100644
index 0000000000..1f13932436
--- /dev/null
+++ b/saleor/static/dashboard-next/components/SeoForm/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./SeoForm";
+export * from "./SeoForm";
diff --git a/saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.tsx b/saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.tsx
index c50a0f2efd..5608b5c584 100644
--- a/saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.tsx
+++ b/saleor/static/dashboard-next/components/SingleSelectField/SingleSelectField.tsx
@@ -16,6 +16,7 @@ interface SingleSelectFieldProps {
value: string;
label: string;
}>;
+ disabled?: boolean;
error?: boolean;
hint?: string;
label?: string;
@@ -28,6 +29,7 @@ interface SingleSelectFieldProps {
export const SingleSelectField = decorate<SingleSelectFieldProps>(
({
classes,
+ disabled,
error,
label,
choices,
@@ -37,16 +39,19 @@ export const SingleSelectField = decorate<SingleSelectFieldProps>(
hint,
selectProps
}) => {
- const choicesByKey: { [key: string]: string } = choices.reduce(
- (prev, curr) => {
- prev[curr.value] = curr.label;
- return prev;
- },
- {}
- );
+ const choicesByKey: { [key: string]: string } = disabled
+ ? {}
+ : choices.reduce((prev, curr) => {
+ prev[curr.value] = curr.label;
+ return prev;
+ }, {});
return (
- <FormControl className={classes.formControl} error={error}>
+ <FormControl
+ className={classes.formControl}
+ error={error}
+ disabled={disabled}
+ >
<InputLabel shrink={!!value}>{label}</InputLabel>
<Select
fullWidth
diff --git a/saleor/static/dashboard-next/components/TablePagination/__snapshots__/TablePagination.test.tsx.snap b/saleor/static/dashboard-next/components/TablePagination/__snapshots__/TablePagination.test.tsx.snap
index 5ba8b891dd..9e025b1b13 100644
--- a/saleor/static/dashboard-next/components/TablePagination/__snapshots__/TablePagination.test.tsx.snap
+++ b/saleor/static/dashboard-next/components/TablePagination/__snapshots__/TablePagination.test.tsx.snap
@@ -41,7 +41,7 @@ exports[`<TablePagination /> renders when next page is available 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-31"
+ className="MuiSvgIcon-root-30"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -74,7 +74,7 @@ exports[`<TablePagination /> renders when next page is available 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-31"
+ className="MuiSvgIcon-root-30"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -85,7 +85,7 @@ exports[`<TablePagination /> renders when next page is available 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-37"
+ className="MuiTouchRipple-root-36"
/>
</button>
</div>
@@ -135,7 +135,7 @@ exports[`<TablePagination /> renders when no previous / next page are available
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-31"
+ className="MuiSvgIcon-root-30"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -168,7 +168,7 @@ exports[`<TablePagination /> renders when no previous / next page are available
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-31"
+ className="MuiSvgIcon-root-30"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -226,7 +226,7 @@ exports[`<TablePagination /> renders when previous and next pages are available
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-31"
+ className="MuiSvgIcon-root-30"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -237,7 +237,7 @@ exports[`<TablePagination /> renders when previous and next pages are available
</svg>
</span>
<span
- className="MuiTouchRipple-root-37"
+ className="MuiTouchRipple-root-36"
/>
</button>
<button
@@ -262,7 +262,7 @@ exports[`<TablePagination /> renders when previous and next pages are available
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-31"
+ className="MuiSvgIcon-root-30"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -273,7 +273,7 @@ exports[`<TablePagination /> renders when previous and next pages are available
</svg>
</span>
<span
- className="MuiTouchRipple-root-37"
+ className="MuiTouchRipple-root-36"
/>
</button>
</div>
@@ -323,7 +323,7 @@ exports[`<TablePagination /> renders when previous page is available 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-31"
+ className="MuiSvgIcon-root-30"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -334,7 +334,7 @@ exports[`<TablePagination /> renders when previous page is available 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-37"
+ className="MuiTouchRipple-root-36"
/>
</button>
<button
@@ -359,7 +359,7 @@ exports[`<TablePagination /> renders when previous page is available 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-31"
+ className="MuiSvgIcon-root-30"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
diff --git a/saleor/static/dashboard-next/gql-types.ts b/saleor/static/dashboard-next/gql-types.ts
index 752b3a834d..f9b758b896 100644
--- a/saleor/static/dashboard-next/gql-types.ts
+++ b/saleor/static/dashboard-next/gql-types.ts
@@ -312,3 +312,155 @@ export interface PageDetailsQuery {
availableOn: string | null,
} | null,
};
+
+export interface ProductListQueryVariables {
+ first?: number | null,
+ after?: string | null,
+ last?: number | null,
+ before?: string | null,
+};
+
+export interface ProductListQuery {
+ // List of the shop's products.
+ products: {
+ edges: Array< {
+ // The item at the end of the edge
+ node: {
+ // The ID of the object.
+ id: string,
+ name: string,
+ // The URL of a main thumbnail for a product.
+ thumbnailUrl: string | null,
+ productType: {
+ // The ID of the object.
+ id: string,
+ name: string,
+ },
+ } | null,
+ } | null >,
+ pageInfo: {
+ // When paginating backwards, are there more items?
+ hasPreviousPage: boolean,
+ // When paginating forwards, are there more items?
+ hasNextPage: boolean,
+ // When paginating backwards, the cursor to continue.
+ startCursor: string | null,
+ // When paginating forwards, the cursor to continue.
+ endCursor: string | null,
+ },
+ } | null,
+};
+
+export interface ProductDetailsQueryVariables {
+ id: string,
+};
+
+export interface ProductDetailsQuery {
+ // Lookup a product by ID.
+ product: {
+ // The ID of the object.
+ id: string,
+ name: string,
+ description: string,
+ collections: {
+ edges: Array< {
+ // The item at the end of the edge
+ node: {
+ // The ID of the object.
+ id: string,
+ name: string,
+ } | null,
+ } | null >,
+ } | null,
+ // The product's base price (without any discounts
+ // applied).
+ price: {
+ // Money formatted according to the current locale.
+ localized: string | null,
+ } | null,
+ grossMargin: Array< {
+ start: number | null,
+ stop: number | null,
+ } | null > | null,
+ purchaseCost: {
+ // Lower bound of a price range.
+ start: {
+ // Amount of money including taxes.
+ gross: {
+ // Money formatted according to the current locale.
+ localized: string | null,
+ } | null,
+ } | null,
+ // Upper bound of a price range.
+ stop: {
+ // Amount of money including taxes.
+ gross: {
+ // Money formatted according to the current locale.
+ localized: string | null,
+ } | null,
+ } | null,
+ } | null,
+ isPublished: boolean,
+ // Informs about product's availability in the storefront,
+ // current price and discounts.
+ availability: {
+ available: boolean | null,
+ priceRange: {
+ // Lower bound of a price range.
+ start: {
+ // Amount of money without taxes.
+ net: {
+ // Money formatted according to the current locale.
+ localized: string | null,
+ } | null,
+ } | null,
+ // Upper bound of a price range.
+ stop: {
+ // Amount of money without taxes.
+ net: {
+ // Money formatted according to the current locale.
+ localized: string | null,
+ } | null,
+ } | null,
+ } | null,
+ } | null,
+ images: {
+ edges: Array< {
+ // The item at the end of the edge
+ node: {
+ // The ID of the object.
+ id: string,
+ alt: string,
+ order: number,
+ url: string,
+ } | null,
+ } | null >,
+ } | null,
+ variants: {
+ edges: Array< {
+ // The item at the end of the edge
+ node: {
+ // The ID of the object.
+ id: string,
+ sku: string,
+ name: string,
+ // Override the base price of a product if necessary.
+ // A value of `null` indicates that the default product price is used.
+ priceOverride: {
+ // Money formatted according to the current locale.
+ localized: string | null,
+ } | null,
+ // Quantity of a product available for sale.
+ stockQuantity: number,
+ } | null,
+ } | null >,
+ } | null,
+ productType: {
+ // The ID of the object.
+ id: string,
+ name: string,
+ },
+ // The storefront URL for the product.
+ url: string,
+ } | null,
+};
diff --git a/saleor/static/dashboard-next/index.tsx b/saleor/static/dashboard-next/index.tsx
index 4aaf809e40..6168a194f5 100644
--- a/saleor/static/dashboard-next/index.tsx
+++ b/saleor/static/dashboard-next/index.tsx
@@ -15,6 +15,7 @@ import AppRoot from "./AppRoot";
import CategorySection from "./category";
import "./i18n";
import PageSection from "./page";
+import ProductSection from "./products";
import theme from "./theme";
const cookies = new Cookies();
@@ -41,6 +42,7 @@ render(
<Switch>
<Route path="/categories" component={CategorySection} />
<Route path="/pages" component={PageSection} />
+ <Route path="/products" component={ProductSection} />
</Switch>
</AppRoot>
</MuiThemeProvider>
diff --git a/saleor/static/dashboard-next/page/components/PageBaseForm/__snapshots__/PageBaseForm.test.tsx.snap b/saleor/static/dashboard-next/page/components/PageBaseForm/__snapshots__/PageBaseForm.test.tsx.snap
index 432cf415ee..1eaf9dec7a 100644
--- a/saleor/static/dashboard-next/page/components/PageBaseForm/__snapshots__/PageBaseForm.test.tsx.snap
+++ b/saleor/static/dashboard-next/page/components/PageBaseForm/__snapshots__/PageBaseForm.test.tsx.snap
@@ -79,7 +79,7 @@ exports[`<PageBaseForm /> renders errors 1`] = `
className="MuiInput-root-108 MuiInput-error-113 MuiInput-fullWidth-115 MuiInput-formControl-109 MuiInput-multiline-114 MuiInput-underline-112"
>
<div
- className="MuiTextarea-root-122"
+ className="Textarea-root-122"
style={
Object {
"height": 19,
@@ -88,7 +88,7 @@ exports[`<PageBaseForm /> renders errors 1`] = `
>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-124 MuiTextarea-textarea-123"
+ className="Textarea-shadow-124 Textarea-textarea-123"
readOnly={true}
rows="1"
tabIndex={-1}
@@ -96,7 +96,7 @@ exports[`<PageBaseForm /> renders errors 1`] = `
/>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-124 MuiTextarea-textarea-123"
+ className="Textarea-shadow-124 Textarea-textarea-123"
defaultValue={undefined}
readOnly={true}
rows={1}
@@ -108,7 +108,7 @@ exports[`<PageBaseForm /> renders errors 1`] = `
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiTextarea-textarea-123 MuiInput-input-116 MuiInput-inputMultiline-118"
+ className="Textarea-textarea-123 MuiInput-input-116 MuiInput-inputMultiline-118"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -256,7 +256,7 @@ exports[`<PageBaseForm /> renders errors 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-150"
+ className="MuiSvgIcon-root-149"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -278,11 +278,11 @@ exports[`<PageBaseForm /> renders errors 1`] = `
/>
</span>
<span
- className="MuiTouchRipple-root-156"
+ className="MuiTouchRipple-root-155"
/>
</span>
<span
- className="MuiTypography-root-163 MuiTypography-body1-172 MuiFormControlLabel-label-131"
+ className="MuiTypography-root-162 MuiTypography-body1-171 MuiFormControlLabel-label-131"
>
Published
</span>
@@ -366,7 +366,7 @@ exports[`<PageBaseForm /> renders with 'created' property 1`] = `
className="MuiInput-root-108 MuiInput-fullWidth-115 MuiInput-formControl-109 MuiInput-multiline-114 MuiInput-underline-112"
>
<div
- className="MuiTextarea-root-122"
+ className="Textarea-root-122"
style={
Object {
"height": 19,
@@ -375,7 +375,7 @@ exports[`<PageBaseForm /> renders with 'created' property 1`] = `
>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-124 MuiTextarea-textarea-123"
+ className="Textarea-shadow-124 Textarea-textarea-123"
readOnly={true}
rows="1"
tabIndex={-1}
@@ -383,7 +383,7 @@ exports[`<PageBaseForm /> renders with 'created' property 1`] = `
/>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-124 MuiTextarea-textarea-123"
+ className="Textarea-shadow-124 Textarea-textarea-123"
defaultValue={undefined}
readOnly={true}
rows={1}
@@ -395,7 +395,7 @@ exports[`<PageBaseForm /> renders with 'created' property 1`] = `
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiTextarea-textarea-123 MuiInput-input-116 MuiInput-inputMultiline-118"
+ className="Textarea-textarea-123 MuiInput-input-116 MuiInput-inputMultiline-118"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -518,7 +518,7 @@ exports[`<PageBaseForm /> renders with 'created' property 1`] = `
className="Component-spacer-121"
/>
<p
- className="MuiTypography-root-163 MuiTypography-body1-172"
+ className="MuiTypography-root-162 MuiTypography-body1-171"
>
Created at:
2018-03-20T16:39:08.850105+00:00
@@ -549,7 +549,7 @@ exports[`<PageBaseForm /> renders with 'created' property 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-150"
+ className="MuiSvgIcon-root-149"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -571,11 +571,11 @@ exports[`<PageBaseForm /> renders with 'created' property 1`] = `
/>
</span>
<span
- className="MuiTouchRipple-root-156"
+ className="MuiTouchRipple-root-155"
/>
</span>
<span
- className="MuiTypography-root-163 MuiTypography-body1-172 MuiFormControlLabel-label-131"
+ className="MuiTypography-root-162 MuiTypography-body1-171 MuiFormControlLabel-label-131"
>
Published
</span>
@@ -659,7 +659,7 @@ exports[`<PageBaseForm /> renders without 'created' property 1`] = `
className="MuiInput-root-108 MuiInput-fullWidth-115 MuiInput-formControl-109 MuiInput-multiline-114 MuiInput-underline-112"
>
<div
- className="MuiTextarea-root-122"
+ className="Textarea-root-122"
style={
Object {
"height": 19,
@@ -668,7 +668,7 @@ exports[`<PageBaseForm /> renders without 'created' property 1`] = `
>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-124 MuiTextarea-textarea-123"
+ className="Textarea-shadow-124 Textarea-textarea-123"
readOnly={true}
rows="1"
tabIndex={-1}
@@ -676,7 +676,7 @@ exports[`<PageBaseForm /> renders without 'created' property 1`] = `
/>
<textarea
aria-hidden="true"
- className="MuiTextarea-shadow-124 MuiTextarea-textarea-123"
+ className="Textarea-shadow-124 Textarea-textarea-123"
defaultValue={undefined}
readOnly={true}
rows={1}
@@ -688,7 +688,7 @@ exports[`<PageBaseForm /> renders without 'created' property 1`] = `
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiTextarea-textarea-123 MuiInput-input-116 MuiInput-inputMultiline-118"
+ className="Textarea-textarea-123 MuiInput-input-116 MuiInput-inputMultiline-118"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -836,7 +836,7 @@ exports[`<PageBaseForm /> renders without 'created' property 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-150"
+ className="MuiSvgIcon-root-149"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -858,11 +858,11 @@ exports[`<PageBaseForm /> renders without 'created' property 1`] = `
/>
</span>
<span
- className="MuiTouchRipple-root-156"
+ className="MuiTouchRipple-root-155"
/>
</span>
<span
- className="MuiTypography-root-163 MuiTypography-body1-172 MuiFormControlLabel-label-131"
+ className="MuiTypography-root-162 MuiTypography-body1-171 MuiFormControlLabel-label-131"
>
Published
</span>
diff --git a/saleor/static/dashboard-next/page/components/PageFilters/__snapshots__/PageFilters.test.tsx.snap b/saleor/static/dashboard-next/page/components/PageFilters/__snapshots__/PageFilters.test.tsx.snap
index 557a2b9a5a..7f3dcad4a4 100644
--- a/saleor/static/dashboard-next/page/components/PageFilters/__snapshots__/PageFilters.test.tsx.snap
+++ b/saleor/static/dashboard-next/page/components/PageFilters/__snapshots__/PageFilters.test.tsx.snap
@@ -42,7 +42,7 @@ exports[`<PageFilters /> renders with initial state 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -55,36 +55,36 @@ exports[`<PageFilters /> renders with initial state 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<div
- className="MuiCardContent-root-81"
+ className="MuiCardContent-root-80"
>
<div
aria-describedby={undefined}
- className="MuiFormControl-root-82 MuiFormControl-fullWidth-85"
+ className="MuiFormControl-root-81 MuiFormControl-fullWidth-84"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90 MuiInputLabel-shrink-89"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"
data-shrink={true}
htmlFor={undefined}
>
Title
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104"
+ className="MuiInput-input-103"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -104,30 +104,30 @@ exports[`<PageFilters /> renders with initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
aria-describedby={undefined}
- className="MuiFormControl-root-82 MuiFormControl-fullWidth-85"
+ className="MuiFormControl-root-81 MuiFormControl-fullWidth-84"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90 MuiInputLabel-shrink-89"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89 MuiInputLabel-shrink-88"
data-shrink={true}
htmlFor={undefined}
>
Url
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104"
+ className="MuiInput-input-103"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -193,7 +193,7 @@ exports[`<PageFilters /> renders without initial state 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-68"
+ className="MuiSvgIcon-root-67"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -206,36 +206,36 @@ exports[`<PageFilters /> renders without initial state 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-74"
+ className="MuiTouchRipple-root-73"
/>
</button>
</div>
</div>
<div
- className="MuiCardContent-root-81"
+ className="MuiCardContent-root-80"
>
<div
aria-describedby={undefined}
- className="MuiFormControl-root-82 MuiFormControl-fullWidth-85"
+ className="MuiFormControl-root-81 MuiFormControl-fullWidth-84"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"
data-shrink={false}
htmlFor={undefined}
>
Title
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104"
+ className="MuiInput-input-103"
defaultValue={undefined}
disabled={false}
id={undefined}
@@ -255,30 +255,30 @@ exports[`<PageFilters /> renders without initial state 1`] = `
</div>
</div>
<div
- className="Component-spacer-109"
+ className="Component-spacer-108"
/>
<div
aria-describedby={undefined}
- className="MuiFormControl-root-82 MuiFormControl-fullWidth-85"
+ className="MuiFormControl-root-81 MuiFormControl-fullWidth-84"
onBlur={[Function]}
onFocus={[Function]}
>
<label
- className="MuiFormLabel-root-91 MuiInputLabel-root-86 MuiInputLabel-formControl-87 MuiInputLabel-animated-90"
+ className="MuiFormLabel-root-90 MuiInputLabel-root-85 MuiInputLabel-formControl-86 MuiInputLabel-animated-89"
data-shrink={false}
htmlFor={undefined}
>
Url
</label>
<div
- className="MuiInput-root-96 MuiInput-fullWidth-103 MuiInput-formControl-97 MuiInput-underline-100"
+ className="MuiInput-root-95 MuiInput-fullWidth-102 MuiInput-formControl-96 MuiInput-underline-99"
>
<input
aria-invalid={false}
aria-required={false}
autoComplete={undefined}
autoFocus={undefined}
- className="MuiInput-input-104"
+ className="MuiInput-input-103"
defaultValue={undefined}
disabled={false}
id={undefined}
diff --git a/saleor/static/dashboard-next/page/components/PageList/__snapshots__/PageList.test.tsx.snap b/saleor/static/dashboard-next/page/components/PageList/__snapshots__/PageList.test.tsx.snap
index aa2252e420..7b32bf01d2 100644
--- a/saleor/static/dashboard-next/page/components/PageList/__snapshots__/PageList.test.tsx.snap
+++ b/saleor/static/dashboard-next/page/components/PageList/__snapshots__/PageList.test.tsx.snap
@@ -81,7 +81,7 @@ exports[`<PageList /> renders when category list is empty 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -114,7 +114,7 @@ exports[`<PageList /> renders when category list is empty 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -131,7 +131,7 @@ exports[`<PageList /> renders when category list is empty 1`] = `
</tr>
</tfoot>
<tbody
- className="MuiTableBody-root-45"
+ className="MuiTableBody-root-44"
>
<tr
className="MuiTableRow-root-5"
@@ -230,7 +230,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -263,7 +263,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -280,7 +280,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
</tr>
</tfoot>
<tbody
- className="MuiTableBody-root-45"
+ className="MuiTableBody-root-44"
>
<tr
className="MuiTableRow-root-5"
@@ -334,7 +334,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -347,7 +347,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-47"
+ className="MuiTouchRipple-root-46"
/>
</button>
</td>
@@ -404,7 +404,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -417,7 +417,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-47"
+ className="MuiTouchRipple-root-46"
/>
</button>
</td>
@@ -474,7 +474,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -487,7 +487,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-47"
+ className="MuiTouchRipple-root-46"
/>
</button>
</td>
@@ -544,7 +544,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -557,7 +557,7 @@ exports[`<PageList /> renders when data is fully loaded 1`] = `
</svg>
</span>
<span
- className="MuiTouchRipple-root-47"
+ className="MuiTouchRipple-root-46"
/>
</button>
</td>
@@ -647,7 +647,7 @@ exports[`<PageList /> renders while data is loading 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -680,7 +680,7 @@ exports[`<PageList /> renders while data is loading 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
@@ -697,7 +697,7 @@ exports[`<PageList /> renders while data is loading 1`] = `
</tr>
</tfoot>
<tbody
- className="MuiTableBody-root-45"
+ className="MuiTableBody-root-44"
>
<tr
className="MuiTableRow-root-5"
@@ -708,7 +708,7 @@ exports[`<PageList /> renders while data is loading 1`] = `
scope={undefined}
>
<span
- className="Component-skeleton-46"
+ className="Component-skeleton-45"
style={undefined}
>
‌
@@ -720,7 +720,7 @@ exports[`<PageList /> renders while data is loading 1`] = `
scope={undefined}
>
<span
- className="Component-skeleton-46"
+ className="Component-skeleton-45"
style={undefined}
>
‌
@@ -732,7 +732,7 @@ exports[`<PageList /> renders while data is loading 1`] = `
scope={undefined}
>
<span
- className="Component-skeleton-46"
+ className="Component-skeleton-45"
style={undefined}
>
‌
@@ -764,7 +764,7 @@ exports[`<PageList /> renders while data is loading 1`] = `
>
<svg
aria-hidden="true"
- className="MuiSvgIcon-root-39"
+ className="MuiSvgIcon-root-38"
color={undefined}
focusable="false"
viewBox="0 0 24 24"
diff --git a/saleor/static/dashboard-next/page/views/PageList.tsx b/saleor/static/dashboard-next/page/views/PageList.tsx
index 57e04c247b..64e6922c34 100644
--- a/saleor/static/dashboard-next/page/views/PageList.tsx
+++ b/saleor/static/dashboard-next/page/views/PageList.tsx
@@ -69,7 +69,7 @@ export class PageList extends React.Component<PageListProps, PageListState> {
},
variables: {
after: data.pages.pageInfo.endCursor,
- first: 3
+ first: 12
}
});
};
diff --git a/saleor/static/dashboard-next/products/components/ProductAttributesForm/ProductAttributesForm.tsx b/saleor/static/dashboard-next/products/components/ProductAttributesForm/ProductAttributesForm.tsx
new file mode 100644
index 0000000000..bea949ceb3
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductAttributesForm/ProductAttributesForm.tsx
@@ -0,0 +1,69 @@
+import Card, { CardContent } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import FormSpacer from "../../../components/FormSpacer";
+import PageHeader from "../../../components/PageHeader";
+import SingleSelectField from "../../../components/SingleSelectField";
+import Skeleton from "../../../components/Skeleton";
+import i18n from "../../../i18n";
+
+interface ProductAttributesFormProps {
+ // TODO: type when API blah blah blah
+ attributes?: any[];
+ productAttributes?: any[];
+ loading?: boolean;
+ onChange(event: any);
+}
+
+const decorate = withStyles(theme => ({}));
+export const ProductAttributesForm = decorate<ProductAttributesFormProps>(
+ ({ classes, attributes, productAttributes, loading, onChange }) => {
+ if (loading) {
+ return (
+ <Card>
+ <PageHeader title={i18n.t("Attributes")} />
+ <CardContent>
+ <Skeleton />
+ </CardContent>
+ </Card>
+ );
+ }
+ const keyedAttributes = attributes.reduce((prev, curr) => {
+ prev[curr.slug] = curr;
+ return prev;
+ }, {});
+ const keyedProductAttributes = productAttributes.reduce((prev, curr) => {
+ prev[curr.name] = curr.value;
+ return prev;
+ }, {});
+ return (
+ <Card>
+ <PageHeader title={i18n.t("Attributes")} />
+ <CardContent>
+ {attributes.map((attribute, index) => (
+ <React.Fragment key={index}>
+ <SingleSelectField
+ name={attribute.slug}
+ label={attribute.name}
+ onChange={onChange}
+ value={
+ keyedAttributes[attribute.slug].values.filter(
+ attr => attr.slug === keyedProductAttributes[attribute.slug]
+ )[0].slug
+ }
+ choices={attribute.values.map(choice => ({
+ label: choice.name,
+ value: choice.slug
+ }))}
+ key={index}
+ />
+ <FormSpacer />
+ </React.Fragment>
+ ))}
+ </CardContent>
+ </Card>
+ );
+ }
+);
+export default ProductAttributesForm;
diff --git a/saleor/static/dashboard-next/products/components/ProductAttributesForm/index.ts b/saleor/static/dashboard-next/products/components/ProductAttributesForm/index.ts
new file mode 100644
index 0000000000..724931497f
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductAttributesForm/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductAttributesForm";
+export * from "./ProductAttributesForm";
diff --git a/saleor/static/dashboard-next/products/components/ProductAvailabilityForm/ProductAvailabilityForm.tsx b/saleor/static/dashboard-next/products/components/ProductAvailabilityForm/ProductAvailabilityForm.tsx
new file mode 100644
index 0000000000..97543a363e
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductAvailabilityForm/ProductAvailabilityForm.tsx
@@ -0,0 +1,50 @@
+import Card, { CardContent } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import TextField from "material-ui/TextField";
+import * as React from "react";
+
+import ControlledCheckbox from "../../../components//ControlledCheckbox";
+import PageHeader from "../../../components/PageHeader";
+import i18n from "../../../i18n";
+
+interface ProductAvailabilityFormProps {
+ available?: boolean;
+ availableOn?: string;
+ loading?: boolean;
+ onChange(event: any);
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ display: "grid",
+ gridTemplateColumns: "1fr 3fr"
+ }
+}));
+export const ProductAvailabilityForm = decorate<ProductAvailabilityFormProps>(
+ ({ classes, available, availableOn, loading, onChange }) => (
+ <Card>
+ <PageHeader title={i18n.t("Status")} />
+ <CardContent className={classes.root}>
+ <ControlledCheckbox
+ name="available"
+ label={i18n.t("Available")}
+ checked={available}
+ onChange={onChange}
+ disabled={loading}
+ />
+ <TextField
+ disabled={!available || loading}
+ name="availableOn"
+ label={i18n.t("Available on", { context: "label" })}
+ type="date"
+ value={availableOn}
+ onChange={onChange}
+ InputLabelProps={{
+ shrink: true
+ }}
+ />
+ </CardContent>
+ </Card>
+ )
+);
+export default ProductAvailabilityForm;
diff --git a/saleor/static/dashboard-next/products/components/ProductAvailabilityForm/index.ts b/saleor/static/dashboard-next/products/components/ProductAvailabilityForm/index.ts
new file mode 100644
index 0000000000..651d40d87f
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductAvailabilityForm/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductAvailabilityForm";
+export * from "./ProductAvailabilityForm";
diff --git a/saleor/static/dashboard-next/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx b/saleor/static/dashboard-next/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx
new file mode 100644
index 0000000000..8f37f526ee
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductCategoryAndCollectionsForm/ProductCategoryAndCollectionsForm.tsx
@@ -0,0 +1,58 @@
+import Card, { CardContent } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import FormSpacer from "../../../components/FormSpacer";
+import MultiSelectField from "../../../components/MultiSelectField";
+import PageHeader from "../../../components/PageHeader";
+import SingleSelectField from "../../../components/SingleSelectField";
+import i18n from "../../../i18n";
+
+interface ProductCategoryAndCollectionsFormProps {
+ // TODO: TYPE IT
+ categories?: any[];
+ collections?: any[];
+ productCollections?: any[];
+ category?: any;
+ loading?: boolean;
+ onChange(event: any);
+}
+
+const decorate = withStyles(theme => ({}));
+const ProductCategoryAndCollectionsForm = decorate<
+ ProductCategoryAndCollectionsFormProps
+>(
+ ({
+ classes,
+ categories,
+ collections,
+ productCollections,
+ category,
+ loading,
+ onChange
+ }) => (
+ <Card>
+ <PageHeader title={i18n.t("Organisation")} />
+ <CardContent>
+ <SingleSelectField
+ disabled={loading}
+ label={i18n.t("Category")}
+ choices={loading ? [] : categories}
+ name="category"
+ value={category}
+ onChange={onChange}
+ />
+ <FormSpacer />
+ <MultiSelectField
+ disabled={loading}
+ label={i18n.t("Collections")}
+ choices={loading ? [] : collections}
+ name="collections"
+ value={productCollections}
+ onChange={onChange}
+ />
+ </CardContent>
+ </Card>
+ )
+);
+export default ProductCategoryAndCollectionsForm;
diff --git a/saleor/static/dashboard-next/products/components/ProductCategoryAndCollectionsForm/index.ts b/saleor/static/dashboard-next/products/components/ProductCategoryAndCollectionsForm/index.ts
new file mode 100644
index 0000000000..a706be21cf
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductCategoryAndCollectionsForm/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductCategoryAndCollectionsForm";
+export * from "./ProductCategoryAndCollectionsForm";
diff --git a/saleor/static/dashboard-next/products/components/ProductCollections/ProductCollections.tsx b/saleor/static/dashboard-next/products/components/ProductCollections/ProductCollections.tsx
new file mode 100644
index 0000000000..245aa43ecf
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductCollections/ProductCollections.tsx
@@ -0,0 +1,67 @@
+import Card, { CardContent } from "material-ui/Card";
+import blue from "material-ui/colors/blue";
+import { FormControlLabel } from "material-ui/Form";
+import { withStyles } from "material-ui/styles";
+import Table, { TableBody, TableCell, TableRow } from "material-ui/Table";
+import * as React from "react";
+
+import PageHeader from "../../../components/PageHeader";
+import Skeleton from "../../../components/Skeleton";
+import i18n from "../../../i18n";
+
+interface ProductPriceAndAvailabilityProps {
+ collections?: Array<{
+ id: string;
+ name: string;
+ }>;
+ onRowClick(id: string);
+}
+
+const decorate = withStyles(theme => ({
+ card: {
+ marginTop: theme.spacing.unit * 2,
+ [theme.breakpoints.down("sm")]: {
+ marginTop: theme.spacing.unit
+ }
+ },
+ link: {
+ color: blue[500],
+ cursor: "pointer"
+ }
+}));
+export const ProductPriceAndAvailability = decorate<
+ ProductPriceAndAvailabilityProps
+>(({ classes, collections, onRowClick }) => (
+ <Card className={classes.card}>
+ <PageHeader title={i18n.t("Collections")} />
+ <Table>
+ <TableBody>
+ {collections === undefined || collections === null ? (
+ <TableRow>
+ <TableCell>
+ <Skeleton />
+ </TableCell>
+ </TableRow>
+ ) : collections.length > 0 ? (
+ collections.map(collection => (
+ <TableRow key={collection.id}>
+ <TableCell
+ className={classes.link}
+ onClick={onRowClick(collection.id)}
+ >
+ {collection.name}
+ </TableCell>
+ </TableRow>
+ ))
+ ) : (
+ <TableRow>
+ <TableCell>
+ {i18n.t("This product is not in any collection")}
+ </TableCell>
+ </TableRow>
+ )}
+ </TableBody>
+ </Table>
+ </Card>
+));
+export default ProductPriceAndAvailability;
diff --git a/saleor/static/dashboard-next/products/components/ProductCollections/index.ts b/saleor/static/dashboard-next/products/components/ProductCollections/index.ts
new file mode 100644
index 0000000000..f542d12d3b
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductCollections/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductCollections";
+export * from "./ProductCollections";
diff --git a/saleor/static/dashboard-next/products/components/ProductDescription/ProductDescription.tsx b/saleor/static/dashboard-next/products/components/ProductDescription/ProductDescription.tsx
new file mode 100644
index 0000000000..2f09921394
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductDescription/ProductDescription.tsx
@@ -0,0 +1,52 @@
+import DeleteIcon from "@material-ui/icons/Delete";
+import EditIcon from "@material-ui/icons/Edit";
+import VisibilityIcon from "@material-ui/icons/Visibility";
+import Card, { CardContent } from "material-ui/Card";
+import IconButton from "material-ui/IconButton";
+import Typography from "material-ui/Typography";
+import * as React from "react";
+
+import PageHeader from "../../../components/PageHeader";
+import Skeleton from "../../../components/Skeleton";
+import i18n from "../../../i18n";
+
+interface ProductDetailsCardProps {
+ id?: string;
+ name?: string;
+ description?: string;
+ url?: string;
+ onBack();
+ onDelete();
+ onEdit(id: string);
+ onShow(url: string);
+}
+
+export const ProductDetailsCard: React.StatelessComponent<
+ ProductDetailsCardProps
+> = ({ onBack, onDelete, onEdit, onShow, id, name, description, url }) => (
+ <Card>
+ <PageHeader onBack={onBack} title={name}>
+ <IconButton onClick={url ? onShow(url) : () => {}} disabled={!url}>
+ <VisibilityIcon />
+ </IconButton>
+ <IconButton onClick={id ? onEdit(id) : () => {}} disabled={!id}>
+ <EditIcon />
+ </IconButton>
+ <IconButton onClick={id ? onEdit(id) : () => {}} disabled={!id}>
+ <DeleteIcon />
+ </IconButton>
+ </PageHeader>
+ <CardContent>
+ <Typography>
+ {description ? (
+ description
+ ) : description === undefined || description === null ? (
+ <Skeleton />
+ ) : (
+ i18n.t("No description")
+ )}
+ </Typography>
+ </CardContent>
+ </Card>
+);
+export default ProductDetailsCard;
diff --git a/saleor/static/dashboard-next/products/components/ProductDescription/index.ts b/saleor/static/dashboard-next/products/components/ProductDescription/index.ts
new file mode 100644
index 0000000000..950bef03c0
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductDescription/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductDescription";
+export * from "./ProductDescription";
diff --git a/saleor/static/dashboard-next/products/components/ProductDetailsForm/ProductDetailsForm.tsx b/saleor/static/dashboard-next/products/components/ProductDetailsForm/ProductDetailsForm.tsx
new file mode 100644
index 0000000000..23b56c3043
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductDetailsForm/ProductDetailsForm.tsx
@@ -0,0 +1,75 @@
+import Card, { CardContent } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import TextField from "material-ui/TextField";
+import * as React from "react";
+
+import { FormSpacer } from "../../../components/FormSpacer";
+import PageHeader from "../../../components/PageHeader";
+import PriceField from "../../../components/PriceField";
+import { RichTextEditor } from "../../../components/RichTextEditor";
+import i18n from "../../../i18n";
+
+interface ProductDetailsFormProps {
+ currencySymbol?: string;
+ description?: string;
+ loading?: boolean;
+ name?: string;
+ price?: string;
+ onBack();
+ onChange(event: any);
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ display: "grid",
+ gridTemplateColumns: `1fr ${theme.spacing.unit}px 6rem`
+ }
+}));
+
+export const ProductDetailsForm = decorate<ProductDetailsFormProps>(
+ ({
+ classes,
+ currencySymbol,
+ name,
+ price,
+ description,
+ loading,
+ onBack,
+ onChange
+ }) => (
+ <Card>
+ <PageHeader title={i18n.t("Edit product")} onBack={onBack} />
+ <CardContent>
+ <div className={classes.root}>
+ <TextField
+ disabled={loading}
+ value={name}
+ fullWidth
+ label={i18n.t("Name")}
+ name="name"
+ onChange={onChange}
+ />
+ <span />
+ <PriceField
+ label={i18n.t("Price")}
+ disabled={loading}
+ value={price}
+ onChange={onChange}
+ currencySymbol={currencySymbol}
+ />
+ </div>
+ <FormSpacer />
+ <RichTextEditor
+ label={i18n.t("Description")}
+ fullWidth
+ disabled={loading}
+ value={description}
+ helperText={i18n.t("Select text to enable text-formatting tools.")}
+ onChange={onChange}
+ name="description"
+ />
+ </CardContent>
+ </Card>
+ )
+);
+export default ProductDetailsForm;
diff --git a/saleor/static/dashboard-next/products/components/ProductDetailsForm/index.ts b/saleor/static/dashboard-next/products/components/ProductDetailsForm/index.ts
new file mode 100644
index 0000000000..a8c9159320
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductDetailsForm/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductDetailsForm";
+export * from "./ProductDetailsForm";
diff --git a/saleor/static/dashboard-next/products/components/ProductDetailsPage/ProductDetailsPage.tsx b/saleor/static/dashboard-next/products/components/ProductDetailsPage/ProductDetailsPage.tsx
new file mode 100644
index 0000000000..d8891c9c2e
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductDetailsPage/ProductDetailsPage.tsx
@@ -0,0 +1,206 @@
+import Hidden from "material-ui/Hidden";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import ProductCollections from "../ProductCollections";
+import ProductDescription from "../ProductDescription";
+import ProductImages from "../ProductImages";
+import ProductPriceAndAvailability from "../ProductPriceAndAvailability";
+import ProductVariants from "../ProductVariants";
+
+interface ProductDetailsPageProps {
+ placeholderImage: string;
+ product?: {
+ id: string;
+ name: string;
+ collections: {
+ edges: Array<{
+ node: {
+ id: string;
+ name: string;
+ };
+ }>;
+ };
+ description: string;
+ price: {
+ localized: string;
+ };
+ grossMargin: Array<{
+ start: number;
+ stop: number;
+ }>;
+ purchaseCost: {
+ start: {
+ gross: {
+ localized: string;
+ };
+ };
+ stop: {
+ gross: {
+ localized: string;
+ };
+ };
+ };
+ isPublished: boolean;
+ availability: {
+ available: boolean;
+ priceRange: {
+ start: {
+ net: {
+ localized: string;
+ };
+ };
+ stop: {
+ net: {
+ localized: string;
+ };
+ };
+ };
+ };
+ images: {
+ edges: Array<{
+ node: {
+ id: string;
+ alt: string;
+ order: number;
+ url: string;
+ };
+ }>;
+ };
+ variants: {
+ edges: Array<{
+ node: {
+ id: string;
+ sku: string;
+ name: string;
+ priceOverride: {
+ localized: string;
+ };
+ stockQuantity: number;
+ };
+ }>;
+ };
+ productType: {
+ id: string;
+ name: string;
+ };
+ url: string;
+ };
+ onBack();
+ onDelete();
+ onEdit(id: string);
+ onImageEdit(id: string);
+ onImageUpload();
+ onImageReorder();
+ onProductShow(url: string);
+ onVariantShow(id: string);
+ onCollectionShow(id: string);
+ onProductPublish();
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ display: "grid",
+ gridGap: theme.spacing.unit + "px",
+ gridTemplateColumns: "100%",
+ [theme.breakpoints.up("md")]: {
+ gridGap: theme.spacing.unit * 2 + "px",
+ gridTemplateColumns: "3fr 1fr"
+ }
+ }
+}));
+
+export const ProductDetailsPage = decorate<ProductDetailsPageProps>(
+ ({
+ classes,
+ placeholderImage,
+ product,
+ onBack,
+ onDelete,
+ onEdit,
+ onImageEdit,
+ onImageReorder,
+ onImageUpload,
+ onProductShow,
+ onVariantShow,
+ onCollectionShow,
+ onProductPublish
+ }) => (
+ <div className={classes.root}>
+ <div>
+ <ProductDescription
+ id={product ? product.id : null}
+ name={product ? product.name : null}
+ description={product ? product.description : null}
+ url={product ? product.url : null}
+ onBack={onBack}
+ onDelete={onDelete}
+ onEdit={onEdit}
+ onShow={onProductShow}
+ />
+ <Hidden smDown>
+ <ProductImages
+ images={
+ product ? product.images.edges.map(edge => edge.node) : null
+ }
+ placeholderImage={placeholderImage}
+ onImageReorder={onImageReorder}
+ onImageEdit={onImageEdit}
+ onImageUpload={onImageUpload}
+ />
+ </Hidden>
+ </div>
+ <div>
+ <ProductPriceAndAvailability
+ onPublish={onProductPublish}
+ grossMargin={product ? product.grossMargin[0] : null}
+ isAvailable={product ? product.availability.available : null}
+ purchaseCost={
+ product
+ ? {
+ start: product.purchaseCost.start.gross.localized,
+ stop: product.purchaseCost.stop.gross.localized
+ }
+ : null
+ }
+ salePrice={
+ product
+ ? {
+ start: product.availability.priceRange.start.net.localized,
+ stop: product.availability.priceRange.stop.net.localized
+ }
+ : null
+ }
+ isPublished={product ? product.isPublished : null}
+ />
+ <ProductCollections
+ collections={
+ product ? product.collections.edges.map(edge => edge.node) : null
+ }
+ onRowClick={onCollectionShow}
+ />
+ </div>
+ <Hidden mdUp>
+ <div>
+ <ProductImages
+ images={
+ product ? product.images.edges.map(edge => edge.node) : null
+ }
+ placeholderImage={placeholderImage}
+ onImageReorder={onImageReorder}
+ onImageEdit={onImageEdit}
+ onImageUpload={onImageUpload}
+ />
+ </div>
+ </Hidden>
+ <ProductVariants
+ variants={
+ product ? product.variants.edges.map(edge => edge.node) : null
+ }
+ fallbackPrice={product ? product.price.localized : ""}
+ onRowClick={onVariantShow}
+ />
+ </div>
+ )
+);
+export default ProductDetailsPage;
diff --git a/saleor/static/dashboard-next/products/components/ProductDetailsPage/index.ts b/saleor/static/dashboard-next/products/components/ProductDetailsPage/index.ts
new file mode 100644
index 0000000000..f8683be501
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductDetailsPage/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductDetailsPage";
+export * from "./ProductDetailsPage";
diff --git a/saleor/static/dashboard-next/products/components/ProductImagePage/ProductImagePage.tsx b/saleor/static/dashboard-next/products/components/ProductImagePage/ProductImagePage.tsx
new file mode 100644
index 0000000000..f1d2f8ef05
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductImagePage/ProductImagePage.tsx
@@ -0,0 +1,61 @@
+import Card, { CardContent, CardMedia } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import TextField from "material-ui/TextField";
+import Container from "../../../components/Container";
+import Form from "../../../components/Form";
+import PageHeader from "../../../components/PageHeader";
+import SaveButtonBar from "../../../components/SaveButtonBar";
+import Skeleton from "../../../components/Skeleton";
+import i18n from "../../../i18n";
+
+interface ProductImagePageProps {
+ image?: string;
+ description?: string;
+ loading?: boolean;
+ onSubmit();
+ onBack();
+}
+
+const decorate = withStyles(theme => ({
+ root: {},
+ image: {
+ display: "block",
+ marginLeft: "auto",
+ marginRight: "auto",
+ marginBottom: theme.spacing.unit * 2
+ }
+}));
+const ProductImagePage = decorate<ProductImagePageProps>(
+ ({ classes, image, description, loading, onSubmit, onBack }) => (
+ <Container width="sm">
+ <Form initial={{ description }} onSubmit={onSubmit}>
+ {({ change, data, submit }) => (
+ <>
+ <PageHeader title={i18n.t("Edit image")} onBack={onBack} />
+ <Card>
+ <CardContent>
+ {loading ? (
+ <Skeleton />
+ ) : (
+ <img src={image} className={classes.image} />
+ )}
+ <TextField
+ name="description"
+ label={i18n.t("Description")}
+ helperText={i18n.t("Optional")}
+ disabled={loading}
+ multiline
+ fullWidth
+ />
+ </CardContent>
+ </Card>
+ <SaveButtonBar onBack={onBack} onSave={submit} />
+ </>
+ )}
+ </Form>
+ </Container>
+ )
+);
+export default ProductImagePage;
diff --git a/saleor/static/dashboard-next/products/components/ProductImagePage/index.ts b/saleor/static/dashboard-next/products/components/ProductImagePage/index.ts
new file mode 100644
index 0000000000..75e8f7bdaf
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductImagePage/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductImagePage";
+export * from "./ProductImagePage";
diff --git a/saleor/static/dashboard-next/products/components/ProductImages/ProductImages.tsx b/saleor/static/dashboard-next/products/components/ProductImages/ProductImages.tsx
new file mode 100644
index 0000000000..7413d9c46c
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductImages/ProductImages.tsx
@@ -0,0 +1,149 @@
+import AddIcon from "@material-ui/icons/Add";
+import ModeEditIcon from "@material-ui/icons/ModeEdit";
+import Card, { CardContent } from "material-ui/Card";
+import GridList, { GridListTile, GridListTileBar } from "material-ui/GridList";
+import IconButton from "material-ui/IconButton";
+import Subheader from "material-ui/List/ListSubheader";
+import { withStyles } from "material-ui/styles";
+import Typography from "material-ui/Typography";
+import * as React from "react";
+import {
+ arrayMove,
+ SortableContainer,
+ SortableElement
+} from "react-sortable-hoc";
+
+import PageHeader from "../../../components/PageHeader";
+import i18n from "../../../i18n";
+
+interface ProductImagesProps {
+ placeholderImage?: string;
+ images?: Array<{
+ id: string;
+ url: string;
+ alt: string;
+ order: number;
+ }>;
+ loading?: boolean;
+ onImageEdit?(id: string);
+ onImageUpload?();
+ onImageReorder?(event: { oldIndex: number; newIndex: number });
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ display: "grid",
+ gridTemplateColumns: "repeat(3, 1fr)",
+ gridColumnGap: `${theme.spacing.unit * 2}px`,
+ gridRowGap: `${theme.spacing.unit * 2}px`,
+ [theme.breakpoints.down("sm")]: {
+ gridTemplateColumns: "repeat(2, 1fr)"
+ }
+ },
+ card: {
+ marginTop: theme.spacing.unit * 2,
+ [theme.breakpoints.down("sm")]: {
+ marginTop: 0
+ }
+ },
+ gridElement: {
+ cursor: "move",
+ userSelect: "none" as "none",
+ "& img": {
+ pointerEvents: "none" as "none",
+ width: "100%"
+ }
+ },
+ icon: {
+ color: "rgba(255, 255, 255, 0.54)"
+ },
+ fileField: {
+ display: "none"
+ }
+}));
+
+const ImageListElement = SortableElement(
+ decorate<{ tile: any; onImageEdit() }>(({ classes, onImageEdit, tile }) => (
+ <GridListTile key={tile.id} component="div" className={classes.gridElement}>
+ <img src={tile.url} alt={tile.alt} />
+ <GridListTileBar
+ title={tile.alt || i18n.t("No description")}
+ actionIcon={
+ onImageEdit ? (
+ <IconButton className={classes.icon} onClick={onImageEdit}>
+ <ModeEditIcon />
+ </IconButton>
+ ) : (
+ ""
+ )
+ }
+ />
+ </GridListTile>
+ ))
+);
+const ImageListContainer = SortableContainer(
+ decorate<{ items: any; onImageEdit(id: string) }>(
+ ({ classes, items, onImageEdit, ...props }) => {
+ return (
+ <div {...props}>
+ {items.map((value, index) => (
+ <ImageListElement
+ key={`item-${index}`}
+ index={index}
+ tile={value}
+ onImageEdit={onImageEdit ? onImageEdit(value.id) : null}
+ />
+ ))}
+ </div>
+ );
+ }
+ )
+);
+const ProductImages = decorate<ProductImagesProps>(
+ ({
+ classes,
+ images,
+ placeholderImage,
+ loading,
+ onImageEdit,
+ onImageReorder,
+ onImageUpload
+ }) => (
+ <Card className={classes.card}>
+ <PageHeader title={i18n.t("Images")}>
+ <IconButton onClick={e => this.upload.click()} disabled={loading}>
+ <AddIcon />
+ </IconButton>
+
+ <input
+ className={classes.fileField}
+ id="fileUpload"
+ onChange={onImageUpload}
+ type="file"
+ ref={ref => (this.upload = ref)}
+ />
+ </PageHeader>
+ <CardContent>
+ {images === undefined || images === null ? (
+ <div className={classes.root}>
+ <GridListTile className={classes.gridElement} component="div">
+ <img src={placeholderImage} />
+ <GridListTileBar title={i18n.t("Loading...")} />
+ </GridListTile>
+ </div>
+ ) : images.length > 0 ? (
+ <ImageListContainer
+ axis="xy"
+ items={images}
+ onSortEnd={onImageReorder}
+ className={classes.root}
+ onImageEdit={onImageEdit}
+ />
+ ) : (
+ <Typography>{i18n.t("No images available")}</Typography>
+ )}
+ </CardContent>
+ </Card>
+ )
+);
+export default ProductImages;
diff --git a/saleor/static/dashboard-next/products/components/ProductImages/index.ts b/saleor/static/dashboard-next/products/components/ProductImages/index.ts
new file mode 100644
index 0000000000..0ec8845a80
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductImages/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductImages";
+export * from "./ProductImages";
diff --git a/saleor/static/dashboard-next/products/components/ProductListCard/ProductListCard.tsx b/saleor/static/dashboard-next/products/components/ProductListCard/ProductListCard.tsx
new file mode 100644
index 0000000000..90fd44d87b
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductListCard/ProductListCard.tsx
@@ -0,0 +1,58 @@
+import Card from "material-ui/Card";
+import * as React from "react";
+
+import FilterListIcon from "@material-ui/icons/FilterList";
+import Hidden from "material-ui/Hidden";
+import IconButton from "material-ui/IconButton";
+import PageHeader from "../../../components/PageHeader";
+import ProductList from "../../../components/ProductList";
+import i18n from "../../../i18n";
+
+interface ProductListCardProps {
+ products?: Array<{
+ id: string;
+ name: string;
+ productType: {
+ name: string;
+ };
+ thumbnailUrl: string;
+ }>;
+ hasPreviousPage?: boolean;
+ hasNextPage?: boolean;
+ onFilter();
+ onNextPage?();
+ onPreviousPage?();
+ onRowClick?(id: string);
+}
+
+export const ProductListCard: React.StatelessComponent<
+ ProductListCardProps
+> = ({
+ products,
+ hasNextPage,
+ hasPreviousPage,
+ onFilter,
+ onNextPage,
+ onPreviousPage,
+ onRowClick
+}) => (
+ <Card>
+ <PageHeader title={i18n.t("Product list")}>
+ <Hidden mdUp>
+ <IconButton onClick={onFilter}>
+ <FilterListIcon />
+ </IconButton>
+ </Hidden>
+ </PageHeader>
+ <ProductList
+ products={products}
+ hasNextPage={hasNextPage}
+ hasPreviousPage={hasPreviousPage}
+ onNextPage={onNextPage}
+ onPreviousPage={onPreviousPage}
+ onRowClick={onRowClick}
+ />
+ </Card>
+);
+
+export default ProductListCard;
diff --git a/saleor/static/dashboard-next/products/components/ProductListCard/index.ts b/saleor/static/dashboard-next/products/components/ProductListCard/index.ts
new file mode 100644
index 0000000000..995a575ae1
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductListCard/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductListCard";
+export * from "./ProductListCard";
diff --git a/saleor/static/dashboard-next/products/components/ProductPriceAndAvailability/ProductPriceAndAvailability.tsx b/saleor/static/dashboard-next/products/components/ProductPriceAndAvailability/ProductPriceAndAvailability.tsx
new file mode 100644
index 0000000000..c05282c30b
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductPriceAndAvailability/ProductPriceAndAvailability.tsx
@@ -0,0 +1,133 @@
+import Card, { CardContent } from "material-ui/Card";
+import green from "material-ui/colors/green";
+import red from "material-ui/colors/red";
+import { FormControlLabel } from "material-ui/Form";
+import { withStyles } from "material-ui/styles";
+import Switch from "material-ui/Switch";
+import Table, { TableBody, TableCell, TableRow } from "material-ui/Table";
+import Typography from "material-ui/Typography";
+import * as React from "react";
+
+import ControlledSwitch from "../../../components/ControlledSwitch";
+import Skeleton from "../../../components/Skeleton";
+import i18n from "../../../i18n";
+
+interface ProductPriceAndAvailabilityProps {
+ grossMargin?: {
+ start: number;
+ stop: number;
+ };
+ salePrice?: {
+ start: string;
+ stop: string;
+ };
+ purchaseCost?: {
+ start: string;
+ stop: string;
+ };
+ isPublished?: boolean;
+ isAvailable?: boolean;
+ onPublish(event: React.ChangeEvent<any>);
+}
+
+const decorate = withStyles(theme => ({
+ greenText: {
+ color: green[500]
+ },
+ leftCell: {
+ paddingRight: theme.spacing.unit
+ },
+ redText: {
+ color: red[500]
+ },
+ rightCell: {
+ paddingLeft: theme.spacing.unit,
+ textAlign: "right" as "right"
+ }
+}));
+export const ProductPriceAndAvailability = decorate<
+ ProductPriceAndAvailabilityProps
+>(
+ ({
+ classes,
+ grossMargin,
+ salePrice,
+ purchaseCost,
+ isPublished,
+ isAvailable,
+ onPublish
+ }) => (
+ <Card>
+ <CardContent>
+ <ControlledSwitch
+ onChange={onPublish}
+ uncheckedLabel={
+ isPublished === undefined || isPublished === null
+ ? " "
+ : i18n.t("Draft")
+ }
+ label={i18n.t("Published")}
+ checked={!(isPublished === undefined || isPublished === null)}
+ disabled={isPublished === undefined || isPublished === null}
+ />
+ <Typography>
+ {isAvailable === undefined || isAvailable === null ? (
+ <Skeleton />
+ ) : isAvailable ? (
+ <span className={classes.greenText}>{i18n.t("Available")}</span>
+ ) : (
+ <span className={classes.redText}>{i18n.t("Unavailable")}</span>
+ )}
+ </Typography>
+ </CardContent>
+ <Table>
+ <TableBody>
+ <TableRow>
+ <TableCell className={classes.leftCell}>
+ {i18n.t("Sale price")}
+ </TableCell>
+ <TableCell className={classes.rightCell}>
+ {salePrice ? (
+ <span>
+ {salePrice.start} - {salePrice.stop}
+ </span>
+ ) : (
+ <Skeleton />
+ )}
+ </TableCell>
+ </TableRow>
+ <TableRow>
+ <TableCell className={classes.leftCell}>
+ {i18n.t("Purchase cost")}
+ </TableCell>
+ <TableCell className={classes.rightCell}>
+ {purchaseCost ? (
+ <span>
+ {purchaseCost.start} - {purchaseCost.stop}
+ </span>
+ ) : (
+ <Skeleton />
+ )}
+ </TableCell>
+ </TableRow>
+ <TableRow>
+ <TableCell className={classes.leftCell}>
+ {i18n.t("Gross margin")}
+ </TableCell>
+ <TableCell className={classes.rightCell}>
+ {grossMargin ? (
+ <span>
+ {grossMargin.start}% - {grossMargin.stop}%
+ </span>
+ ) : (
+ <Skeleton />
+ )}
+ </TableCell>
+ </TableRow>
+ </TableBody>
+ </Table>
+ </Card>
+ )
+);
+ProductPriceAndAvailability.displayName = "ProductPriceAndAvailability";
+export default ProductPriceAndAvailability;
diff --git a/saleor/static/dashboard-next/products/components/ProductPriceAndAvailability/index.ts b/saleor/static/dashboard-next/products/components/ProductPriceAndAvailability/index.ts
new file mode 100644
index 0000000000..58686ffc71
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductPriceAndAvailability/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductPriceAndAvailability";
+export * from "./ProductPriceAndAvailability";
diff --git a/saleor/static/dashboard-next/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/saleor/static/dashboard-next/products/components/ProductUpdatePage/ProductUpdatePage.tsx
new file mode 100644
index 0000000000..ca70376c42
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductUpdatePage/ProductUpdatePage.tsx
@@ -0,0 +1,165 @@
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import Form from "../../../components/Form";
+import SaveButtonBar from "../../../components/SaveButtonBar/SaveButtonBar";
+import SeoForm from "../../../components/SeoForm";
+import ProductAttributesForm from "../ProductAttributesForm";
+import ProductAvailabilityForm from "../ProductAvailabilityForm";
+import ProductCategoryAndCollectionsForm from "../ProductCategoryAndCollectionsForm";
+import ProductDetailsForm from "../ProductDetailsForm";
+
+interface ProductUpdateProps {
+ collections?: any[];
+ categories?: any[];
+ loading?: boolean;
+ // TODO: Type it when done
+ product?: any;
+ onBack();
+ onSubmit();
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ marginBottom: theme.spacing.unit * 2,
+ [theme.breakpoints.up("md")]: {
+ marginLeft: "auto",
+ marginRight: "auto",
+ maxWidth: theme.breakpoints.width("md")
+ }
+ },
+ grid: {
+ gridGap: theme.spacing.unit * 2 + "px",
+ display: "grid",
+ gridTemplateColumns: "3fr 2fr",
+ marginTop: theme.spacing.unit * 2,
+ [theme.breakpoints.down("sm")]: {
+ marginTop: theme.spacing.unit,
+ gridGap: theme.spacing.unit + "px",
+ gridTemplateColumns: "1fr"
+ }
+ },
+ cardContainer: {
+ marginTop: theme.spacing.unit * 2,
+ [theme.breakpoints.down("sm")]: {
+ marginTop: theme.spacing.unit
+ }
+ }
+}));
+export const ProductUpdate = decorate<ProductUpdateProps>(
+ ({
+ classes,
+ loading,
+ categories,
+ collections,
+ product,
+ onBack,
+ onSubmit
+ }) => {
+ const initialData = {
+ attributes: loading ? [] : product.attributes,
+ available: loading ? "" : product.available,
+ availableOn: loading ? "" : product.availableOn,
+ category: loading ? "" : product.category.id,
+ collections: loading
+ ? []
+ : product.collections.edges.map(edge => edge.node).map(node => node.id),
+ description: loading ? "" : product.description,
+ name: loading ? "" : product.name,
+ price: loading ? "" : product.price.net,
+ seoDescription: loading ? "" : product.seo.description,
+ seoTitle: loading ? "" : product.seo.title
+ };
+ return (
+ <div className={classes.root}>
+ <Form onSubmit={onSubmit} initial={initialData}>
+ {({ change, data, submit }) => (
+ <>
+ <div className={classes.grid}>
+ <div>
+ <ProductDetailsForm
+ onBack={onBack}
+ onChange={change}
+ name={data.name}
+ description={data.description}
+ currencySymbol={loading ? "" : product.price.currencySymbol}
+ price={data.price}
+ loading={loading}
+ />
+ <div className={classes.cardContainer}>
+ <SeoForm
+ title={data.seoTitle}
+ titlePlaceholder={data.name}
+ description={data.seoDescription}
+ descriptionPlaceholder={data.description}
+ storefrontUrl={
+ loading
+ ? ""
+ : `http://demo.getsaleor.com/product/${product.slug}`
+ }
+ loading={loading}
+ onClick={() => {}}
+ onChange={change}
+ />
+ </div>
+ </div>
+ <div>
+ <ProductAvailabilityForm
+ available={data.available}
+ availableOn={data.availableOn}
+ loading={loading}
+ onChange={change}
+ />
+ <div className={classes.cardContainer}>
+ <ProductCategoryAndCollectionsForm
+ category={data.category}
+ categories={
+ categories !== undefined && categories !== null
+ ? categories.map(category => ({
+ label: category.name,
+ value: category.id
+ }))
+ : []
+ }
+ productCollections={data.collections}
+ collections={
+ collections !== undefined && collections !== null
+ ? collections.map(collection => ({
+ label: collection.name,
+ value: collection.id
+ }))
+ : []
+ }
+ loading={loading}
+ onChange={change}
+ />
+ </div>
+ <div className={classes.cardContainer}>
+ <ProductAttributesForm
+ attributes={
+ loading
+ ? []
+ : product.productType.productAttributes.edges.map(
+ edge => edge.node
+ )
+ }
+ productAttributes={data.attributes}
+ loading={loading}
+ onChange={change}
+ />
+ </div>
+ </div>
+ </div>
+ <SaveButtonBar
+ onSave={submit}
+ onBack={onBack}
+ disabled={loading}
+ />
+ </>
+ )}
+ </Form>
+ </div>
+ );
+ }
+);
+export default ProductUpdate;
diff --git a/saleor/static/dashboard-next/products/components/ProductUpdatePage/index.ts b/saleor/static/dashboard-next/products/components/ProductUpdatePage/index.ts
new file mode 100644
index 0000000000..0eb59fe6a9
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductUpdatePage/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductUpdatePage";
+export * from "./ProductUpdatePage";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx b/saleor/static/dashboard-next/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx
new file mode 100644
index 0000000000..bf9f41799e
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantAttributes/ProductVariantAttributes.tsx
@@ -0,0 +1,60 @@
+import Card, { CardContent } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import FormSpacer from "../../../components/FormSpacer";
+import PageHeader from "../../../components/PageHeader";
+import SingleSelectField from "../../../components/SingleSelectField";
+import Skeleton from "../../../components/Skeleton";
+import i18n from "../../../i18n";
+
+interface ProductVariantAttributesProps {
+ attributes?: Array<{
+ value: string;
+ attribute: {
+ slug: string;
+ name: string;
+ values: string[];
+ };
+ }>;
+ formData?: any;
+ loading?: boolean;
+ onChange(event: any);
+}
+
+const decorate = withStyles(theme => ({
+ grid: {
+ display: "grid",
+ gridGap: `${theme.spacing.unit * 2}px`,
+ gridTemplateColumns: "1fr 1fr",
+ "& input": {
+ width: "100%"
+ }
+ }
+}));
+const ProductVariantAttributes = decorate<ProductVariantAttributesProps>(
+ ({ attributes, classes, formData, loading, onChange }) => (
+ <Card>
+ <PageHeader title={i18n.t("Attributes")} />
+ <CardContent className={classes.grid}>
+ {loading ? (
+ <Skeleton />
+ ) : (
+ attributes.map(attribute => (
+ <SingleSelectField
+ choices={attribute.attribute.values.map(attr => ({
+ label: attr,
+ value: attr
+ }))}
+ onChange={onChange}
+ value={formData ? formData[attribute.attribute.slug] : ""}
+ label={attribute.attribute.name}
+ name={attribute.attribute.slug}
+ />
+ ))
+ )}
+ </CardContent>
+ </Card>
+ )
+);
+export default ProductVariantAttributes;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantAttributes/index.ts b/saleor/static/dashboard-next/products/components/ProductVariantAttributes/index.ts
new file mode 100644
index 0000000000..e8ffccfe72
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantAttributes/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariantAttributes";
+export * from "./ProductVariantAttributes";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx b/saleor/static/dashboard-next/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx
new file mode 100644
index 0000000000..f8336b92c8
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantDeleteDialog/ProductVariantDeleteDialog.tsx
@@ -0,0 +1,66 @@
+import Button from "material-ui/Button";
+import Dialog, {
+ DialogActions,
+ DialogContent,
+ DialogContentText,
+ DialogProps,
+ DialogTitle
+} from "material-ui/Dialog";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import i18n from "../../../i18n";
+
+const decorate = withStyles(theme => ({
+ deleteButton: {
+ "&:hover": {
+ backgroundColor: theme.palette.error.main
+ },
+ backgroundColor: theme.palette.error.main,
+ color: theme.palette.error.contrastText
+ }
+}));
+
+export interface ProductVariantDeleteDialogProps {
+ open: boolean;
+ name: string;
+ onClose?();
+ onConfirm?();
+}
+
+const ProductVariantDeleteDialog = decorate<ProductVariantDeleteDialogProps>(
+ props => {
+ const { children, classes, name, open, onConfirm, onClose } = props;
+ return (
+ <Dialog open={open}>
+ <DialogTitle>
+ {i18n.t("Delete variant", { context: "title" })}
+ </DialogTitle>
+ <DialogContent>
+ <DialogContentText
+ dangerouslySetInnerHTML={{
+ __html: i18n.t(
+ "Are you sure you want to remove <strong>{{name}}</strong>?",
+ { name }
+ )
+ }}
+ />
+ </DialogContent>
+ <DialogActions>
+ <Button onClick={onClose}>
+ {i18n.t("Cancel", { context: "button" })}
+ </Button>
+ <Button
+ className={classes.deleteButton}
+ variant="raised"
+ onClick={onConfirm}
+ >
+ {i18n.t("Delete variant", { context: "button" })}
+ </Button>
+ </DialogActions>
+ </Dialog>
+ );
+ }
+);
+
+export default ProductVariantDeleteDialog;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantDeleteDialog/index.ts b/saleor/static/dashboard-next/products/components/ProductVariantDeleteDialog/index.ts
new file mode 100644
index 0000000000..2310ca8b99
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantDeleteDialog/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariantDeleteDialog";
+export * from "./ProductVariantDeleteDialog";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantImageSelectDialog/ProductVariantImageSelectDialog.tsx b/saleor/static/dashboard-next/products/components/ProductVariantImageSelectDialog/ProductVariantImageSelectDialog.tsx
new file mode 100644
index 0000000000..92c30a2ca5
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantImageSelectDialog/ProductVariantImageSelectDialog.tsx
@@ -0,0 +1,150 @@
+import CheckCircleIcon from "@material-ui/icons/CheckCircle";
+import Button from "material-ui/Button";
+import Dialog, {
+ DialogActions,
+ DialogContent,
+ DialogContentText,
+ DialogProps,
+ DialogTitle
+} from "material-ui/Dialog";
+import GridList, { GridListTile, GridListTileBar } from "material-ui/GridList";
+import IconButton from "material-ui/IconButton";
+import Subheader from "material-ui/List/ListSubheader";
+import { withStyles, WithStyles } from "material-ui/styles";
+import * as React from "react";
+
+import i18n from "../../../i18n";
+
+const decorate = withStyles(theme => ({
+ root: {
+ display: "grid",
+ gridTemplateColumns: "repeat(3, 1fr)",
+ gridColumnGap: `${theme.spacing.unit * 2}px`,
+ gridRowGap: `${theme.spacing.unit * 2}px`,
+ width: theme.breakpoints.values.lg,
+ maxWidth: "100%",
+ [theme.breakpoints.down("sm")]: {
+ gridTemplateColumns: "repeat(2, 1fr)"
+ }
+ },
+ gridElement: {
+ "& img": {
+ width: "100%"
+ }
+ },
+ icon: {
+ color: "white"
+ },
+ iconChecked: {
+ color: theme.palette.secondary.main
+ }
+}));
+
+interface ProductVariantImageSelectDialogProps {
+ images?: Array<{
+ id: string;
+ url: string;
+ alt: string;
+ order: number;
+ }>;
+ selectedImages?: Array<{
+ id: string;
+ }>;
+ open: boolean;
+ onClose?();
+ onConfirm?(images: string[]);
+}
+
+interface ProductVariantImageSelectDialogState {
+ images: string[];
+}
+
+const ProductVariantImageSelectDialog = decorate<
+ ProductVariantImageSelectDialogProps
+>(
+ class ProductVariantImageSelectDialogComponent extends React.Component<
+ ProductVariantImageSelectDialogProps &
+ WithStyles<"root" | "gridElement" | "icon" | "iconChecked">,
+ ProductVariantImageSelectDialogState
+ > {
+ constructor(props) {
+ super(props);
+ this.state = {
+ images: this.props.selectedImages
+ ? this.props.selectedImages.map(image => image.id)
+ : []
+ };
+ }
+
+ handleConfirm = () => this.state.images;
+ handleImageSelect = id => () =>
+ this.state.images.indexOf(id) === -1
+ ? this.setState(prevState => ({ images: [...prevState.images, id] }))
+ : this.setState(prevState => ({
+ images: prevState.images.filter(image => image !== id)
+ }));
+
+ render() {
+ const {
+ children,
+ classes,
+ images,
+ open,
+ onConfirm,
+ onClose
+ } = this.props;
+ return (
+ <Dialog open={open}>
+ <DialogTitle>
+ {i18n.t("Image selection", { context: "title" })}
+ </DialogTitle>
+ <DialogContent>
+ <DialogContentText>{i18n.t("Select images")}</DialogContentText>
+ <div className={classes.root}>
+ {images
+ .sort((prev, next) => (prev.order > next.order ? 1 : -1))
+ .map(tile => (
+ <GridListTile
+ key={tile.id}
+ className={classes.gridElement}
+ component="div"
+ onClick={this.handleImageSelect(tile.id)}
+ >
+ <img src={tile.url} alt={tile.alt} />
+ <GridListTileBar
+ title={tile.alt || i18n.t("No description")}
+ actionIcon={
+ <IconButton
+ className={
+ this.state.images.indexOf(tile.id) !== -1
+ ? classes.iconChecked
+ : classes.icon
+ }
+ >
+ <CheckCircleIcon />
+ </IconButton>
+ }
+ />
+ </GridListTile>
+ ))}
+ </div>
+ </DialogContent>
+ <DialogActions>
+ <Button onClick={onClose}>
+ {i18n.t("Cancel", { context: "button" })}
+ </Button>
+ <Button
+ variant="raised"
+ onClick={this.handleConfirm}
+ color="primary"
+ >
+ {i18n.t("Save", { context: "button" })}
+ </Button>
+ </DialogActions>
+ </Dialog>
+ );
+ }
+ }
+);
+
+export default ProductVariantImageSelectDialog;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantImageSelectDialog/index.ts b/saleor/static/dashboard-next/products/components/ProductVariantImageSelectDialog/index.ts
new file mode 100644
index 0000000000..91232d9cbd
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantImageSelectDialog/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariantImageSelectDialog";
+export * from "./ProductVariantImageSelectDialog";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantImages/ProductVariantImages.tsx b/saleor/static/dashboard-next/products/components/ProductVariantImages/ProductVariantImages.tsx
new file mode 100644
index 0000000000..0e67bbd88b
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantImages/ProductVariantImages.tsx
@@ -0,0 +1,94 @@
+import AddIcon from "@material-ui/icons/Add";
+import InfoIcon from "@material-ui/icons/Info";
+import Card, { CardContent } from "material-ui/Card";
+import GridList, { GridListTile, GridListTileBar } from "material-ui/GridList";
+import IconButton from "material-ui/IconButton";
+import Subheader from "material-ui/List/ListSubheader";
+import { withStyles } from "material-ui/styles";
+import Typography from "material-ui/Typography";
+import * as React from "react";
+
+import { CircularProgress } from "material-ui/Progress";
+import PageHeader from "../../../components/PageHeader";
+import i18n from "../../../i18n";
+
+interface ProductVariantImagesProps {
+ images?: Array<{
+ id: string;
+ alt: string;
+ url: string;
+ order: number;
+ }>;
+ placeholderImage?: string;
+ loading?: boolean;
+ onImageAdd();
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ display: "grid",
+ gridTemplateColumns: "repeat(4, 1fr)",
+ gridColumnGap: `${theme.spacing.unit * 2}px`,
+ gridRowGap: `${theme.spacing.unit * 2}px`,
+ [theme.breakpoints.down("md")]: {
+ gridTemplateColumns: "repeat(3, 1fr)"
+ },
+ [theme.breakpoints.down("sm")]: {
+ gridTemplateColumns: "repeat(2, 1fr)"
+ }
+ },
+ card: {
+ marginTop: theme.spacing.unit * 2,
+ [theme.breakpoints.down("sm")]: {
+ marginTop: 0
+ }
+ },
+ gridElement: {
+ "& img": {
+ width: "100%"
+ }
+ }
+}));
+
+export const ProductVariantImages = decorate<ProductVariantImagesProps>(
+ ({ classes, images, placeholderImage, loading, onImageAdd }) => (
+ <Card className={classes.card}>
+ <PageHeader title={i18n.t("Images")}>
+ <IconButton
+ onClick={loading ? () => {} : onImageAdd}
+ disabled={loading}
+ >
+ <AddIcon />
+ </IconButton>
+ </PageHeader>
+ <CardContent>
+ <div className={classes.root}>
+ {images === undefined || images === null ? (
+ <GridListTile className={classes.gridElement} component="div">
+ <img src={placeholderImage} />
+ <GridListTileBar title={i18n.t("Loading...")} />
+ </GridListTile>
+ ) : images.length > 0 ? (
+ images
+ .sort((prev, next) => (prev.order > next.order ? 1 : -1))
+ .map(tile => (
+ <GridListTile
+ key={tile.id}
+ className={classes.gridElement}
+ component="div"
+ >
+ <img src={tile.url} alt={tile.alt} />
+ <GridListTileBar
+ title={tile.alt || i18n.t("No description")}
+ />
+ </GridListTile>
+ ))
+ ) : (
+ <Typography>{i18n.t("No images available")}</Typography>
+ )}
+ </div>
+ </CardContent>
+ </Card>
+ )
+);
+export default ProductVariantImages;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantImages/index.ts b/saleor/static/dashboard-next/products/components/ProductVariantImages/index.ts
new file mode 100644
index 0000000000..cd0ac0f9f2
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantImages/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariantImages";
+export * from "./ProductVariantImages";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx b/saleor/static/dashboard-next/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx
new file mode 100644
index 0000000000..5df116ebf7
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx
@@ -0,0 +1,66 @@
+import Card from "material-ui/Card";
+import blue from "material-ui/colors/blue";
+import { withStyles } from "material-ui/styles";
+import Table, { TableBody, TableCell, TableRow } from "material-ui/Table";
+import * as React from "react";
+
+import PageHeader from "../../../components/PageHeader";
+import Skeleton from "../../../components/Skeleton";
+import i18n from "../../../i18n";
+
+interface ProductVariantNavigationProps {
+ variants?: Array<{
+ id: string;
+ name: string;
+ }>;
+ current?: string;
+ loading?: boolean;
+ onRowClick?(id: string);
+}
+
+const decorate = withStyles(theme => ({
+ card: {
+ marginTop: theme.spacing.unit * 2,
+ [theme.breakpoints.down("sm")]: {
+ marginTop: theme.spacing.unit
+ }
+ },
+ link: {
+ color: blue[500],
+ cursor: "pointer"
+ }
+}));
+const ProductVariantNavigation = decorate<ProductVariantNavigationProps>(
+ ({ classes, variants, current, loading, onRowClick }) => (
+ <Card className={classes.card}>
+ <PageHeader title={i18n.t("Variants")} />
+ <Table>
+ <TableBody>
+ {loading ? (
+ <TableRow>
+ <TableCell>
+ <Skeleton />
+ </TableCell>
+ </TableRow>
+ ) : variants.length > 0 ? (
+ variants.map(variant => (
+ <TableRow key={variant.id}>
+ <TableCell
+ className={onRowClick ? classes.link : ""}
+ onClick={onRowClick ? onRowClick(variant.id) : () => {}}
+ >
+ {variant.name}
+ </TableCell>
+ </TableRow>
+ ))
+ ) : (
+ <TableRow>
+ <TableCell>{i18n.t("This product has no variants")}</TableCell>
+ </TableRow>
+ )}
+ </TableBody>
+ </Table>
+ </Card>
+ )
+);
+export default ProductVariantNavigation;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantNavigation/index.ts b/saleor/static/dashboard-next/products/components/ProductVariantNavigation/index.ts
new file mode 100644
index 0000000000..00e2930d8e
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantNavigation/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariantNavigation";
+export * from "./ProductVariantNavigation";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantPage/ProductVariantPage.tsx b/saleor/static/dashboard-next/products/components/ProductVariantPage/ProductVariantPage.tsx
new file mode 100644
index 0000000000..8f318866a8
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantPage/ProductVariantPage.tsx
@@ -0,0 +1,240 @@
+import DeleteIcon from "@material-ui/icons/Delete";
+import IconButton from "material-ui/IconButton";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import Container from "../../../components/Container";
+import Form from "../../../components/Form";
+import PageHeader from "../../../components/PageHeader";
+import SaveButtonBar from "../../../components/SaveButtonBar";
+import Toggle from "../../../components/Toggle";
+import ProductVariantAttributes from "../ProductVariantAttributes";
+import ProductVariantDeleteDialog from "../ProductVariantDeleteDialog";
+import ProductVariantImages from "../ProductVariantImages";
+import ProductVariantImageSelectDialog from "../ProductVariantImageSelectDialog";
+import ProductVariantNavigation from "../ProductVariantNavigation";
+import ProductVariantPrice from "../ProductVariantPrice";
+import ProductVariantProduct from "../ProductVariantProduct";
+import ProductVariantStock from "../ProductVariantStock";
+
+interface ProductVariantPageProps {
+ variant?: {
+ id: string;
+ attributes: Array<{
+ attribute: {
+ name: string;
+ slug: string;
+ values: string[];
+ };
+ value: string;
+ }>;
+ images: {
+ edges: Array<{
+ node: {
+ id: string;
+ };
+ }>;
+ };
+ name: string;
+ priceOverride: {
+ currency: string;
+ amount: number;
+ };
+ product: {
+ id: string;
+ name: string;
+ thumbnailUrl: string;
+ variants: {
+ totalCount: number;
+ edges: Array<{
+ node: {
+ id: string;
+ name: string;
+ };
+ }>;
+ };
+ images: {
+ edges: Array<{
+ node: {
+ id: string;
+ url: string;
+ alt: string;
+ order: number;
+ };
+ }>;
+ };
+ };
+ sku: string;
+ stock: number;
+ stockAllocated: number;
+ };
+ loading?: boolean;
+ placeholderImage?: string;
+ onBack();
+ onDelete();
+ onImageSelect(images: string[]);
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ gridGap: `${theme.spacing.unit * 2}px`,
+ display: "grid",
+ gridTemplateColumns: "1fr 2fr",
+ [theme.breakpoints.down("sm")]: {
+ gridGap: `${theme.spacing.unit}px`,
+ gridTemplateColumns: "1fr"
+ },
+ "& input": {
+ width: "100%"
+ }
+ }
+}));
+const ProductVariantPage = decorate<ProductVariantPageProps>(
+ ({
+ classes,
+ variant,
+ loading,
+ placeholderImage,
+ onBack,
+ onDelete,
+ onImageSelect
+ }) => {
+ const attributes = loading
+ ? {}
+ : variant.attributes.reduce((prev, curr) => {
+ prev[curr.attribute.slug] = curr.value;
+ return prev;
+ }, {});
+ const variantImages = loading
+ ? undefined
+ : variant.images.edges.map(edge => edge.node.id);
+ const productImages = loading
+ ? undefined
+ : variant.product.images.edges
+ .map(edge => edge.node)
+ .sort((prev, next) => (prev.order > next.order ? 1 : -1));
+ const images = loading
+ ? undefined
+ : productImages
+ .filter(image => variantImages.indexOf(image.id) !== -1)
+ .sort((prev, next) => (prev.order > next.order ? 1 : -1));
+ const handleImageSelect = (images: string[]) => {};
+ return (
+ <Toggle>
+ {(isModalActive, { toggle: toggleDeleteModal }) => (
+ <Toggle>
+ {(isImageSelectModalActive, { toggle: toggleImageSelectModal }) => (
+ <>
+ <Container width="md">
+ <PageHeader
+ title={loading ? undefined : variant.name}
+ onBack={onBack}
+ >
+ <IconButton onClick={toggleDeleteModal} disabled={loading}>
+ <DeleteIcon />
+ </IconButton>
+ </PageHeader>
+ <Form
+ initial={{
+ costPrice: loading
+ ? undefined
+ : variant.priceOverride.amount,
+ priceOverride: loading
+ ? undefined
+ : variant.priceOverride.amount,
+ stock: loading ? undefined : variant.stock,
+ sku: loading ? undefined : variant.sku,
+ ...attributes
+ }}
+ >
+ {({ change, data, submit }) => (
+ <>
+ <div className={classes.root}>
+ <div>
+ <ProductVariantProduct
+ product={loading ? undefined : variant.product}
+ loading={loading}
+ placeholderImage={placeholderImage}
+ />
+ <ProductVariantNavigation
+ variants={
+ loading
+ ? undefined
+ : variant.product.variants.edges.map(
+ edge => edge.node
+ )
+ }
+ current={loading ? undefined : variant.id}
+ loading={loading}
+ onRowClick={(id: string) => () => {}}
+ />
+ </div>
+ <div>
+ <ProductVariantAttributes
+ attributes={
+ loading ? undefined : variant.attributes
+ }
+ formData={data}
+ onChange={change}
+ loading={loading}
+ />
+ <ProductVariantPrice
+ priceOverride={data.priceOverride}
+ currencySymbol={
+ loading ? "" : variant.priceOverride.currency
+ }
+ costPrice={data.costPrice}
+ loading={loading}
+ onChange={change}
+ />
+ <ProductVariantStock
+ sku={data.sku}
+ stock={data.stock}
+ stockAllocated={
+ loading ? undefined : variant.stockAllocated
+ }
+ loading={loading}
+ onChange={change}
+ />
+ <ProductVariantImages
+ images={images}
+ placeholderImage={placeholderImage}
+ onImageAdd={toggleImageSelectModal}
+ loading={loading}
+ />
+ </div>
+ </div>
+ <SaveButtonBar
+ disabled={loading}
+ onBack={onBack}
+ onSave={submit}
+ />
+ </>
+ )}
+ </Form>
+ </Container>
+ {!loading && (
+ <>
+ <ProductVariantDeleteDialog
+ onClose={toggleDeleteModal}
+ onConfirm={onDelete}
+ open={isModalActive}
+ name={variant.name}
+ />
+ <ProductVariantImageSelectDialog
+ onClose={toggleImageSelectModal}
+ onConfirm={handleImageSelect}
+ open={isImageSelectModalActive}
+ images={productImages}
+ />
+ </>
+ )}
+ </>
+ )}
+ </Toggle>
+ )}
+ </Toggle>
+ );
+ }
+);
+export default ProductVariantPage;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantPage/index.ts b/saleor/static/dashboard-next/products/components/ProductVariantPage/index.ts
new file mode 100644
index 0000000000..3e9311e1de
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantPage/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariantPage";
+export * from "./ProductVariantPage";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantPrice/ProductVariantPrice.tsx b/saleor/static/dashboard-next/products/components/ProductVariantPrice/ProductVariantPrice.tsx
new file mode 100644
index 0000000000..9b5f976ba5
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantPrice/ProductVariantPrice.tsx
@@ -0,0 +1,69 @@
+import Card, { CardContent } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import { FormSpacer } from "../../../components/FormSpacer";
+import PageHeader from "../../../components/PageHeader";
+import PriceField from "../../../components/PriceField";
+import i18n from "../../../i18n";
+
+interface ProductVariantPriceProps {
+ currencySymbol?: string;
+ priceOverride?: number;
+ costPrice?: number;
+ loading?: boolean;
+ onChange(event: any);
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ marginTop: theme.spacing.unit * 2,
+ [theme.breakpoints.down("sm")]: {
+ marginTop: theme.spacing.unit
+ }
+ },
+ grid: {
+ display: "grid",
+ gridColumnGap: `${theme.spacing.unit * 2}px`,
+ gridTemplateColumns: "1fr 1fr"
+ }
+}));
+const ProductVariantPrice = decorate<ProductVariantPriceProps>(
+ ({
+ classes,
+ currencySymbol,
+ costPrice,
+ priceOverride,
+ loading,
+ onChange
+ }) => (
+ <Card className={classes.root}>
+ <PageHeader title={i18n.t("Pricing")} />
+ <CardContent>
+ <div className={classes.grid}>
+ <div>
+ <PriceField
+ label={i18n.t("Selling price override")}
+ hint={i18n.t("Optional")}
+ value={priceOverride}
+ currencySymbol={currencySymbol}
+ onChange={onChange}
+ disabled={loading}
+ />
+ </div>
+ <div>
+ <PriceField
+ label={i18n.t("Cost price override")}
+ hint={i18n.t("Optional")}
+ value={costPrice}
+ currencySymbol={currencySymbol}
+ onChange={onChange}
+ disabled={loading}
+ />
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ )
+);
+export default ProductVariantPrice;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantPrice/index.ts b/saleor/static/dashboard-next/products/components/ProductVariantPrice/index.ts
new file mode 100644
index 0000000000..104957ff1a
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantPrice/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariantPrice";
+export * from "./ProductVariantPrice";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantProduct/ProductVariantProduct.tsx b/saleor/static/dashboard-next/products/components/ProductVariantProduct/ProductVariantProduct.tsx
new file mode 100644
index 0000000000..9e54490749
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantProduct/ProductVariantProduct.tsx
@@ -0,0 +1,50 @@
+import Card, { CardContent } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import Typography from "material-ui/Typography";
+import * as React from "react";
+
+import Skeleton from "../../../components/Skeleton";
+import i18n from "../../../i18n";
+
+interface ProductVariantProductProps {
+ product?: {
+ id: string;
+ name: string;
+ thumbnailUrl: string;
+ variants: {
+ totalCount: number;
+ };
+ };
+ loading?: boolean;
+ placeholderImage?: string;
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ display: "grid",
+ gridColumnGap: `${theme.spacing.unit * 2}px`,
+ gridTemplateColumns: "60px 1fr"
+ }
+}));
+const ProductVariantProduct = decorate<ProductVariantProductProps>(
+ ({ classes, product, loading, placeholderImage }) => (
+ <Card>
+ <CardContent>
+ <div className={classes.root}>
+ <img src={loading ? placeholderImage : product.thumbnailUrl} />
+ <div>
+ <Typography>{loading ? <Skeleton /> : product.name}</Typography>
+ <Typography variant="caption">
+ {loading ? (
+ <Skeleton />
+ ) : (
+ i18n.t("Variants:") + " " + product.variants.totalCount
+ )}
+ </Typography>
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ )
+);
+export default ProductVariantProduct;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantProduct/index.ts b/saleor/static/dashboard-next/products/components/ProductVariantProduct/index.ts
new file mode 100644
index 0000000000..b0b819429e
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantProduct/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariantProduct";
+export * from "./ProductVariantProduct";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantStock/ProductVariantStock.tsx b/saleor/static/dashboard-next/products/components/ProductVariantStock/ProductVariantStock.tsx
new file mode 100644
index 0000000000..9b4af8933c
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantStock/ProductVariantStock.tsx
@@ -0,0 +1,68 @@
+import Card, { CardContent } from "material-ui/Card";
+import { withStyles } from "material-ui/styles";
+import TextField from "material-ui/TextField";
+import * as React from "react";
+
+import { FormSpacer } from "../../../components/FormSpacer";
+import PageHeader from "../../../components/PageHeader";
+import i18n from "../../../i18n";
+
+interface ProductVariantStockProps {
+ sku?: string;
+ stock?: number;
+ stockAllocated?: number;
+ loading?: boolean;
+ onChange(event: any);
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ marginTop: theme.spacing.unit * 2,
+ [theme.breakpoints.down("sm")]: {
+ marginTop: theme.spacing.unit
+ }
+ },
+ grid: {
+ display: "grid",
+ gridColumnGap: `${theme.spacing.unit * 2}px`,
+ gridTemplateColumns: "1fr 1fr",
+ "& input": {
+ width: "100%"
+ }
+ }
+}));
+const ProductVariantStock = decorate<ProductVariantStockProps>(
+ ({ classes, sku, stock, stockAllocated, loading, onChange }) => (
+ <Card className={classes.root}>
+ <PageHeader title={i18n.t("Stock")} />
+ <CardContent>
+ <div className={classes.grid}>
+ <div>
+ <TextField
+ name="stock"
+ value={stock}
+ label={i18n.t("In stock")}
+ helperText={
+ loading ? "" : `${i18n.t("Allocated:")} ${stockAllocated}`
+ }
+ onChange={onChange}
+ disabled={loading}
+ fullWidth
+ />
+ </div>
+ <div>
+ <TextField
+ name="sku"
+ value={sku}
+ label={i18n.t("SKU")}
+ onChange={onChange}
+ disabled={loading}
+ fullWidth
+ />
+ </div>
+ </div>
+ </CardContent>
+ </Card>
+ )
+);
+export default ProductVariantStock;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariantStock/index.ts b/saleor/static/dashboard-next/products/components/ProductVariantStock/index.ts
new file mode 100644
index 0000000000..0cb07fabde
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariantStock/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariantStock";
+export * from "./ProductVariantStock";
diff --git a/saleor/static/dashboard-next/products/components/ProductVariants/ProductVariants.tsx b/saleor/static/dashboard-next/products/components/ProductVariants/ProductVariants.tsx
new file mode 100644
index 0000000000..f61015b5f9
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariants/ProductVariants.tsx
@@ -0,0 +1,160 @@
+import Card, { CardContent } from "material-ui/Card";
+import blue from "material-ui/colors/blue";
+import green from "material-ui/colors/green";
+import red from "material-ui/colors/red";
+import { FormControlLabel } from "material-ui/Form";
+import Hidden from "material-ui/Hidden";
+import { withStyles } from "material-ui/styles";
+import Switch from "material-ui/Switch";
+import Table, {
+ TableBody,
+ TableCell,
+ TableHead,
+ TableRow
+} from "material-ui/Table";
+import Typography from "material-ui/Typography";
+import * as React from "react";
+
+import PageHeader from "../../../components/PageHeader";
+import Skeleton from "../../../components/Skeleton";
+import i18n from "../../../i18n";
+
+interface ProductVariantsProps {
+ variants?: Array<{
+ id: string;
+ sku: string;
+ name: string;
+ priceOverride: {
+ localized: string;
+ };
+ stockQuantity: number;
+ }>;
+ fallbackPrice?: string;
+ fallbackGross?: string;
+ onRowClick?(id: string);
+}
+
+const decorate = withStyles(theme => {
+ const dot = {
+ borderRadius: "100%",
+ display: "inline-block",
+ height: theme.spacing.unit,
+ marginRight: theme.spacing.unit,
+ width: theme.spacing.unit
+ };
+ return {
+ alignRightText: {
+ textAlign: "right" as "right"
+ },
+ greenDot: {
+ ...dot,
+ backgroundColor: green[500]
+ },
+ link: {
+ color: blue[500],
+ cursor: "pointer"
+ },
+ redDot: {
+ ...dot,
+ backgroundColor: red[500]
+ }
+ };
+});
+export const ProductVariants = decorate<ProductVariantsProps>(
+ ({ classes, variants, fallbackPrice, fallbackGross, onRowClick }) => (
+ <Card>
+ <PageHeader title={i18n.t("Variants")} />
+ <Table>
+ <TableHead>
+ <TableRow>
+ <Hidden smDown>
+ <TableCell>{i18n.t("SKU")}</TableCell>
+ </Hidden>
+ <TableCell>{i18n.t("Name")}</TableCell>
+ <TableCell>{i18n.t("Status")}</TableCell>
+ <Hidden smDown>
+ <TableCell className={classes.alignRightText}>
+ {i18n.t("Price")}
+ </TableCell>
+ <TableCell className={classes.alignRightText}>
+ {i18n.t("Gross margin")}
+ </TableCell>
+ </Hidden>
+ </TableRow>
+ </TableHead>
+ <TableBody>
+ {variants === undefined || variants === null ? (
+ <TableRow>
+ <Hidden smDown>
+ <TableCell>
+ <Skeleton />
+ </TableCell>
+ </Hidden>
+ <TableCell>
+ <Skeleton />
+ </TableCell>
+ <TableCell>
+ <Skeleton />
+ </TableCell>
+ <Hidden smDown>
+ <TableCell className={classes.alignRightText}>
+ <Skeleton />
+ </TableCell>
+ <TableCell className={classes.alignRightText}>
+ <Skeleton />
+ </TableCell>
+ </Hidden>
+ </TableRow>
+ ) : variants.length > 0 ? (
+ variants.map(variant => (
+ <TableRow key={variant.id}>
+ <Hidden smDown>
+ <TableCell>{variant.sku}</TableCell>
+ </Hidden>
+ <TableCell
+ className={onRowClick ? classes.link : ""}
+ onClick={onRowClick ? onRowClick(variant.id) : () => {}}
+ >
+ {variant.name}
+ </TableCell>
+ <TableCell>
+ <span
+ className={
+ variant.stockQuantity > 0
+ ? classes.greenDot
+ : classes.redDot
+ }
+ />
+ {variant.stockQuantity > 0
+ ? i18n.t("Available")
+ : i18n.t("Unavailable")}
+ </TableCell>
+ <Hidden smDown>
+ <TableCell className={classes.alignRightText}>
+ {variant.priceOverride
+ ? variant.priceOverride.localized
+ : fallbackPrice}
+ </TableCell>
+ <TableCell className={classes.alignRightText}>
+ {/* TODO: replace with costPrice */}
+ {variant.priceOverride
+ ? variant.priceOverride.localized
+ : fallbackGross}
+ </TableCell>
+ </Hidden>
+ </TableRow>
+ ))
+ ) : (
+ <TableRow>
+ <TableCell colSpan={2}>
+ {i18n.t("This product has no variants")}
+ </TableCell>
+ </TableRow>
+ )}
+ </TableBody>
+ </Table>
+ </Card>
+ )
+);
+ProductVariants.displayName = "ProductVariants";
+export default ProductVariants;
diff --git a/saleor/static/dashboard-next/products/components/ProductVariants/index.ts b/saleor/static/dashboard-next/products/components/ProductVariants/index.ts
new file mode 100644
index 0000000000..f62aea928c
--- /dev/null
+++ b/saleor/static/dashboard-next/products/components/ProductVariants/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./ProductVariants";
+export * from "./ProductVariants";
diff --git a/saleor/static/dashboard-next/products/fixtures.ts b/saleor/static/dashboard-next/products/fixtures.ts
new file mode 100644
index 0000000000..b428cf8871
--- /dev/null
+++ b/saleor/static/dashboard-next/products/fixtures.ts
@@ -0,0 +1,372 @@
+export const product = {
+ id: "UHJvZHVjdDoyOA==",
+ name: "Stewart-Barrera",
+ description:
+ "Light light office style present life military. Enough executive coach cause own.\n\nCare season wrong fly. Example age between discuss assume.\n\nTheir third build might strong account. Worry enter room note level air.\n\nWeight director mother. Because find task with now enter tree management.\n\nSoon name recently ground green. There owner sport box them red information.",
+ collections: {
+ edges: [
+ {
+ node: {
+ id: "collection-1",
+ name: "Winter Collection"
+ }
+ },
+ {
+ node: {
+ id: "collection-2",
+ name: "Summer Collection"
+ }
+ }
+ ]
+ },
+ price: {
+ localized: "95,47 USD"
+ },
+ grossMargin: [
+ {
+ start: 56,
+ stop: 98
+ }
+ ],
+ purchaseCost: {
+ start: {
+ gross: {
+ localized: "1,88 USD"
+ }
+ },
+ stop: {
+ gross: {
+ localized: "48,10 USD"
+ }
+ }
+ },
+ isPublished: true,
+ availability: {
+ available: true,
+ priceRange: {
+ start: {
+ net: {
+ localized: "55,14 USD"
+ }
+ },
+ stop: {
+ net: {
+ localized: "88,36 USD"
+ }
+ }
+ }
+ },
+ images: {
+ edges: [
+ {
+ node: {
+ id: "UHJvZHVjdEltYWdlOjY2",
+ alt: "",
+ order: 0,
+ url:
+ "/media/products/saleor/static/placeholders/coffee/coffee-02_IS8e8b3.jpg"
+ }
+ },
+ {
+ node: {
+ id: "UHJvZHVjdEltYWdlOjY3",
+ alt: "",
+ order: 1,
+ url:
+ "/media/products/saleor/static/placeholders/coffee/coffee-02_ZIk8H8C.jpg"
+ }
+ },
+ {
+ node: {
+ id: "UHJvZHVjdEltYWdlOjY4",
+ alt: "",
+ order: 2,
+ url:
+ "/media/products/saleor/static/placeholders/coffee/coffee-03_i5b2KpM.jpg"
+ }
+ }
+ ]
+ },
+ variants: {
+ edges: [
+ {
+ node: {
+ id: "UHJvZHVjdFZhcmlhbnQ6Nw==",
+ sku: "2-1337",
+ name: "XXL",
+ priceOverride: null,
+ stockQuantity: 5
+ }
+ },
+ {
+ node: {
+ id: "UHJvZHVjdFZhcmlhbnQ6OA==",
+ sku: "2-1338",
+ name: "XL",
+ priceOverride: null,
+ stockQuantity: 0
+ }
+ },
+ {
+ node: {
+ id: "UHJvZHVjdFZhcmlhbnQ6OQ==",
+ sku: "2-1339",
+ name: "L",
+ priceOverride: null,
+ stockQuantity: 15
+ }
+ },
+ {
+ node: {
+ id: "UHJvZHVjdFZhcmlhbnQ6MTA=",
+ sku: "2-1340",
+ name: "M",
+ priceOverride: null,
+ stockQuantity: 33
+ }
+ },
+ {
+ node: {
+ id: "UHJvZHVjdFZhcmlhbnQ6MTE=",
+ sku: "2-1341",
+ name: "S",
+ priceOverride: null,
+ stockQuantity: 0
+ }
+ },
+ {
+ node: {
+ id: "UHJvZHVjdFZhcmlhbnQ6MTI=",
+ sku: "2-1342",
+ name: "XS",
+ priceOverride: null,
+ stockQuantity: 0
+ }
+ }
+ ]
+ },
+ productType: {
+ id: "UHJvZHVjdFR5cGU6Mw==",
+ name: "Coffee"
+ },
+ url: "/pl/products/stewart-barrera-28/"
+};
+export const products = [
+ {
+ id: "UHJvZHVjdDox",
+ name: "Gardner, Graham and King",
+ thumbnailUrl:
+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",
+ productType: {
+ id: "1",
+ name: "T-Shirt"
+ }
+ },
+ {
+ id: "UHJvZHVjdDoy",
+ name: "Gardner, Graham and King",
+ thumbnailUrl:
+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",
+ productType: {
+ id: "1",
+ name: "T-Shirt"
+ }
+ },
+ {
+ id: "UHJvZHVjdDoz",
+ name: "Gardner, Graham and King",
+ thumbnailUrl:
+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",
+ productType: {
+ id: "1",
+ name: "T-Shirt"
+ }
+ },
+ {
+ id: "UHJvZHVjdDoa",
+ name: "Gardner, Graham and King",
+ thumbnailUrl:
+ "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",
+ productType: {
+ id: "1",
+ name: "T-Shirt"
+ }
+ }
+];
+
+export const variants = product.variants.edges.map(edge => edge.node);
+export const grossMargin = product.grossMargin[0];
+export const salePrice = {
+ start: product.availability.priceRange.start.net.localized,
+ stop: product.availability.priceRange.stop.net.localized
+};
+export const purchaseCost = {
+ start: product.purchaseCost.start.gross.localized,
+ stop: product.purchaseCost.stop.gross.localized
+};
+export const collections = product.collections.edges.map(edge => edge.node);
+export const images = product.images.edges.map(edge => edge.node);
+
+export const variant = (placeholderImage: string) => ({
+ attributes: [
+ {
+ attribute: {
+ name: "Cover",
+ slug: "cover",
+ values: ["hard", "soft"]
+ },
+ value: "hard"
+ },
+ {
+ attribute: {
+ name: "Version",
+ slug: "version",
+ values: ["regular", "extended"]
+ },
+ value: "extended"
+ }
+ ],
+ images: {
+ edges: [
+ {
+ node: {
+ id: "img1"
+ }
+ },
+ {
+ node: {
+ id: "img2"
+ }
+ },
+ {
+ node: {
+ id: "img7"
+ }
+ },
+ {
+ node: {
+ id: "img8"
+ }
+ }
+ ]
+ },
+ id: "var1",
+ name: "Extended Hard",
+ priceOverride: {
+ currency: "USD",
+ amount: 100
+ },
+ product: {
+ id: "prod1",
+ name: "Our Awesome Book",
+ thumbnailUrl: placeholderImage,
+ images: {
+ edges: [
+ {
+ node: {
+ id: "img1",
+ url: placeholderImage,
+ alt: "Front",
+ order: 1
+ }
+ },
+ {
+ node: {
+ id: "img2",
+ url: placeholderImage,
+ alt: "Back",
+ order: 4
+ }
+ },
+ {
+ node: {
+ id: "img3",
+ url: placeholderImage,
+ alt: "Right side",
+ order: 2
+ }
+ },
+ {
+ node: {
+ id: "img4",
+ url: placeholderImage,
+ alt: "Left side",
+ order: 3
+ }
+ },
+ {
+ node: {
+ id: "img5",
+ url: placeholderImage,
+ alt: "Paper",
+ order: 0
+ }
+ },
+ {
+ node: {
+ id: "img6",
+ url: placeholderImage,
+ alt: "Hard cover",
+ order: 1
+ }
+ },
+ {
+ node: {
+ id: "img7",
+ url: placeholderImage,
+ alt: "Extended version",
+ order: 0
+ }
+ },
+ {
+ node: {
+ id: "img8",
+ url: placeholderImage,
+ alt: "Cut version",
+ order: 2
+ }
+ },
+ {
+ node: {
+ id: "img9",
+ url: placeholderImage,
+ alt: "Soft cover",
+ order: 2
+ }
+ }
+ ]
+ },
+ variants: {
+ totalCount: 11,
+ edges: [
+ {
+ node: {
+ id: "var2",
+ name: "Extended Soft"
+ }
+ },
+ {
+ node: {
+ id: "var3",
+ name: "Normal Hard"
+ }
+ },
+ {
+ node: {
+ id: "var4",
+ name: "Normal Soft"
+ }
+ }
+ ]
+ }
+ },
+ sku: "1230959124123",
+ stock: 49,
+ stockAllocated: 12
+});
+export const variantImages = (placeholderImage: string) =>
+ variant(placeholderImage).images.edges.map(edge => edge.node);
+export const variantProductImages = (placeholderImage: string) =>
+ variant(placeholderImage).product.images.edges.map(edge => edge.node);
+export const variantSiblings = (placeholderImage: string) =>
+ variant(placeholderImage).product.variants.edges.map(edge => edge.node);
diff --git a/saleor/static/dashboard-next/products/index.tsx b/saleor/static/dashboard-next/products/index.tsx
new file mode 100644
index 0000000000..bbb1409b13
--- /dev/null
+++ b/saleor/static/dashboard-next/products/index.tsx
@@ -0,0 +1,47 @@
+import { parse as parseQs } from "qs";
+import * as React from "react";
+import { Route, RouteComponentProps, Switch } from "react-router-dom";
+
+import ProductDetailsComponent from "./views/ProductDetails";
+import ProductListComponent from "./views/ProductList";
+import ProductUpdate from "./views/ProductUpdate";
+
+const ProductList: React.StatelessComponent<RouteComponentProps<any>> = ({
+ location,
+ match
+}) => {
+ const qs = parseQs(location.search.substr(1));
+ return <ProductListComponent filters={qs} />;
+};
+const ProductDetails: React.StatelessComponent<RouteComponentProps<any>> = ({
+ match
+}) => {
+ return <ProductDetailsComponent id={match.params.id} />;
+};
+
+const Component = ({ match }) => (
+ <Switch>
+ <Route exact path={match.url} component={ProductList} />
+ <Route exact path={`${match.url}/:id/`} component={ProductDetails} />
+ {/* <Route exact path={`${match.url}/add/`} component={ProductCreateForm} /> */}
+ <Route exact path={`${match.url}/:id/edit`} component={ProductUpdate} />
+ </Switch>
+);
+
+export function productShowUrl(id: string) {
+ return `/products/${id}/`;
+}
+export function productEditUrl(id: string) {
+ return `/products/${id}/edit/`;
+}
+export function productImageEditUrl(id: string) {
+ return `/products/${id}/image/`;
+}
+export function productStorefrontUrl(slug: string) {
+ return `/product/${slug}/`;
+}
+
+export const productListUrl = "/products/";
+export const productAddUrl = "/products/add/";
+
+export default Component;
diff --git a/saleor/static/dashboard-next/products/queries.ts b/saleor/static/dashboard-next/products/queries.ts
new file mode 100644
index 0000000000..f651b7acf5
--- /dev/null
+++ b/saleor/static/dashboard-next/products/queries.ts
@@ -0,0 +1,120 @@
+import gql from "graphql-tag";
+import { Query, QueryProps } from "react-apollo";
+
+import {
+ ProductListQuery,
+ ProductListQueryVariables,
+ ProductDetailsQuery,
+ ProductDetailsQueryVariables
+} from "../gql-types";
+
+export const TypedProductListQuery = Query as React.ComponentType<
+ QueryProps<ProductListQuery, ProductListQueryVariables>
+>;
+export const productListQuery = gql`
+ query ProductList($first: Int, $after: String, $last: Int, $before: String) {
+ products(before: $before, after: $after, first: $first, last: $last) {
+ edges {
+ node {
+ id
+ name
+ thumbnailUrl
+ productType {
+ id
+ name
+ }
+ }
+ }
+ pageInfo {
+ hasPreviousPage
+ hasNextPage
+ startCursor
+ endCursor
+ }
+ }
+ }
+`;
+
+export const TypedProductDetailsQuery = Query as React.ComponentType<
+ QueryProps<ProductDetailsQuery, ProductDetailsQueryVariables>
+>;
+export const productDetailsQuery = gql`
+ query ProductDetails($id: ID!) {
+ product(id: $id) {
+ id
+ name
+ description
+ collections {
+ edges {
+ node {
+ id
+ name
+ }
+ }
+ }
+ price {
+ localized
+ }
+ grossMargin {
+ start
+ stop
+ }
+ purchaseCost {
+ start {
+ gross {
+ localized
+ }
+ }
+ stop {
+ gross {
+ localized
+ }
+ }
+ }
+ isPublished
+ availability {
+ available
+ priceRange {
+ start {
+ net {
+ localized
+ }
+ }
+ stop {
+ net {
+ localized
+ }
+ }
+ }
+ }
+ images {
+ edges {
+ node {
+ id
+ alt
+ order
+ url
+ }
+ }
+ }
+ variants {
+ edges {
+ node {
+ id
+ sku
+ name
+ priceOverride {
+ localized
+ }
+ stockQuantity
+ }
+ }
+ }
+ productType {
+ id
+ name
+ }
+ url
+ }
+ }
+`;
diff --git a/saleor/static/dashboard-next/products/views/ProductDetails.tsx b/saleor/static/dashboard-next/products/views/ProductDetails.tsx
new file mode 100644
index 0000000000..fdf4b08ed2
--- /dev/null
+++ b/saleor/static/dashboard-next/products/views/ProductDetails.tsx
@@ -0,0 +1,62 @@
+import Hidden from "material-ui/Hidden";
+import { withStyles } from "material-ui/styles";
+import * as React from "react";
+
+import { productEditUrl, productImageEditUrl, productShowUrl } from "..";
+import { productStorefrontUrl } from "../";
+import Navigator from "../../components/Navigator";
+import ProductCollections from "../components/ProductCollections";
+import ProductDescription from "../components/ProductDescription";
+import ProductDetailsPage from "../components/ProductDetailsPage";
+import ProductImages from "../components/ProductImages";
+import ProductPriceAndAvailability from "../components/ProductPriceAndAvailability";
+import ProductVariants from "../components/ProductVariants";
+import { productDetailsQuery, TypedProductDetailsQuery } from "../queries";
+
+interface ProductDetailsProps {
+ id: string;
+}
+
+const decorate = withStyles(theme => ({
+ root: {
+ display: "grid",
+ gridGap: theme.spacing.unit + "px",
+ gridTemplateColumns: "100%",
+ [theme.breakpoints.up("md")]: {
+ gridGap: theme.spacing.unit * 2 + "px",
+ gridTemplateColumns: "3fr 1fr"
+ }
+ }
+}));
+
+export const ProductDetails = decorate<ProductDetailsProps>(
+ ({ classes, id }) => (
+ <Navigator>
+ {navigate => (
+ <TypedProductDetailsQuery
+ query={productDetailsQuery}
+ variables={{ id }}
+ >
+ {({ data, error, loading }) => (
+ <ProductDetailsPage
+ onBack={() => window.history.back()}
+ onCollectionShow={() => () => navigate("#")}
+ onDelete={() => {}}
+ onEdit={id => () => navigate(productEditUrl(id))}
+ onImageEdit={id => () => navigate(productImageEditUrl(id))}
+ onImageUpload={() => {}}
+ onImageReorder={() => {}}
+ onProductPublish={() => {}}
+ onProductShow={id => () => navigate(productShowUrl(id))}
+ onVariantShow={() => {}}
+ // TODO: replace with something nicers
+ placeholderImage={"/static/images/placeholder255x255.png"}
+ product={loading ? undefined : data && data.product}
+ />
+ )}
+ </TypedProductDetailsQuery>
+ )}
+ </Navigator>
+ )
+);
+export default ProductDetails;
diff --git a/saleor/static/dashboard-next/products/views/ProductList.tsx b/saleor/static/dashboard-next/products/views/ProductList.tsx
new file mode 100644
index 0000000000..9519267fc3
--- /dev/null
+++ b/saleor/static/dashboard-next/products/views/ProductList.tsx
@@ -0,0 +1,180 @@
+import Card from "material-ui/Card";
+import Drawer from "material-ui/Drawer";
+import Hidden from "material-ui/Hidden";
+import { withStyles } from "material-ui/styles";
+import { stringify as stringifyQs } from "qs";
+import * as React from "react";
+
+import { productShowUrl } from "..";
+import { ProductFilters } from "../../category/components/ProductFilters";
+import ErrorMessageCard from "../../components/ErrorMessageCard";
+import Navigator from "../../components/Navigator";
+import Toggle from "../../components/Toggle";
+import ProductListCard from "../components/ProductListCard";
+import { productListQuery, TypedProductListQuery } from "../queries";
+
+interface ProductListProps {
+ filters: any;
+}
+
+// TODO: Replace when API is ready
+const dummyProductTypes = [
+ { id: "123123123", name: "Type 1" },
+ { id: "123123124", name: "Type 2" },
+ { id: "123123125", name: "Type 3" },
+ { id: "123123126", name: "Type 4" }
+];
+
+const decorate = withStyles(theme => ({
+ root: {
+ display: "grid",
+ gridGap: theme.spacing.unit + "px",
+ gridTemplateColumns: "100%",
+ [theme.breakpoints.up("md")]: {
+ gridGap: theme.spacing.unit * 2 + "px",
+ // TODO: Check on firefox
+ gridTemplateColumns: "3fr 1fr"
+ }
+ }
+}));
+export const ProductList = decorate<ProductListProps>(
+ ({ classes, filters }) => (
+ <div className={classes.root}>
+ <Navigator>
+ {navigate => {
+ const applyFilters = data => {
+ navigate(`?${stringifyQs({ ...filters, ...data.formData })}`, true);
+ };
+ const clearFilters = () => navigate("?");
+ return (
+ <Toggle>
+ {(
+ filtersVisible,
+ { disable: hideFilters, enable: showFilters }
+ ) => (
+ <TypedProductListQuery
+ query={productListQuery}
+ variables={{ first: 12 }}
+ fetchPolicy="network-only"
+ >
+ {({ data, loading, error, fetchMore }) => {
+ if (error) {
+ return (
+ <ErrorMessageCard message="Something went wrong" />
+ );
+ }
+ const loadNextPage = () => {
+ if (loading) {
+ return;
+ }
+ return fetchMore({
+ updateQuery: (previousResult, { fetchMoreResult }) => {
+ return {
+ ...fetchMoreResult,
+ products: {
+ ...fetchMoreResult.products,
+ pageInfo: {
+ ...fetchMoreResult.products.pageInfo,
+ hasPreviousPage: true
+ }
+ }
+ };
+ },
+ variables: {
+ after: data.products.pageInfo.endCursor,
+ first: 12
+ }
+ });
+ };
+ const loadPreviousPage = () => {
+ if (loading) {
+ return;
+ }
+ return fetchMore({
+ updateQuery: (
+ previousResult,
+ { fetchMoreResult, variables }
+ ) => {
+ return {
+ ...fetchMoreResult,
+ products: {
+ ...fetchMoreResult.products,
+ pageInfo: {
+ ...fetchMoreResult.products.pageInfo,
+ hasNextPage: true
+ }
+ }
+ };
+ },
+ variables: {
+ before: data.products.pageInfo.startCursor,
+ first: undefined,
+ last: 12
+ }
+ });
+ };
+ return (
+ <>
+ <div>
+ <ProductListCard
+ products={
+ data &&
+ data.products !== undefined &&
+ data.products !== null
+ ? data.products.edges.map(p => p.node)
+ : undefined
+ }
+ onFilter={showFilters}
+ onNextPage={loadNextPage}
+ onPreviousPage={loadPreviousPage}
+ hasPreviousPage={
+ data && data.products && !loading
+ ? data.products.pageInfo.hasPreviousPage
+ : false
+ }
+ hasNextPage={
+ data && data.products && !loading
+ ? data.products.pageInfo.hasNextPage
+ : false
+ }
+ onRowClick={id => () =>
+ navigate(productShowUrl(id))}
+ />
+ </div>
+ <div>
+ <Hidden smDown>
+ <ProductFilters
+ handleSubmit={applyFilters}
+ handleClear={clearFilters}
+ productTypes={dummyProductTypes}
+ formState={filters}
+ />
+ </Hidden>
+ <Hidden mdUp>
+ <Drawer
+ open={filtersVisible}
+ onClose={hideFilters}
+ anchor="bottom"
+ >
+ <ProductFilters
+ handleSubmit={applyFilters}
+ handleClear={clearFilters}
+ productTypes={dummyProductTypes}
+ formState={filters}
+ />
+ </Drawer>
+ </Hidden>
+ </div>
+ </>
+ );
+ }}
+ </TypedProductListQuery>
+ )}
+ </Toggle>
+ );
+ }}
+ </Navigator>
+ </div>
+ )
+);
+export default ProductList;
diff --git a/saleor/static/dashboard-next/products/views/ProductUpdate.tsx b/saleor/static/dashboard-next/products/views/ProductUpdate.tsx
new file mode 100644
index 0000000000..a43a81d6c7
--- /dev/null
+++ b/saleor/static/dashboard-next/products/views/ProductUpdate.tsx
@@ -0,0 +1,23 @@
+import * as React from "react";
+
+import Form from "../../components/Form";
+import ProductDetailsForm from "../components/ProductDetailsForm";
+
+interface ProductUpdateProps {
+ id: string;
+}
+export const ProductUpdate: React.StatelessComponent<ProductUpdateProps> = ({
+ id
+}) => (
+ <div>
+ <Form onSubmit={() => {}}>
+ {({ change, data, submit }) => (
+ <ProductDetailsForm
+ onBack={() => window.history.back()}
+ onChange={() => {}}
+ />
+ )}
+ </Form>
+ </div>
+);
+export default ProductUpdate;
diff --git a/saleor/static/dashboard-next/schema.json b/saleor/static/dashboard-next/schema.json
index 9d34752608..75c05fd097 100644
--- a/saleor/static/dashboard-next/schema.json
+++ b/saleor/static/dashboard-next/schema.json
@@ -1 +1 @@
-{"data": {"__schema": {"queryType": {"name": "Query"}, "mutationType": {"name": "Mutations"}, "subscriptionType": null, "types": [{"kind": "OBJECT", "name": "Query", "description": null, "fields": [{"name": "attributes", "description": "List of the shop's product attributes.", "args": [{"name": "inCategory", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductAttributeCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "categories", "description": "List of the shop's categories.", "args": [{"name": "level", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": "Lookup a category by ID.", "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "page", "description": "Lookup a page by ID or by slug.", "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "pages", "description": "List of the shop's pages.", "args": [{"name": "level", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "PageCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": "Lookup a product by ID.", "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "products", "description": "List of the shop's products.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "category", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "price", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Range", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Lte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Gte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "AttributeScalar", "ofType": null}}, "defaultValue": null}, {"name": "name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name_Icontains", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "productType_Name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "isFeatured", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "sortBy", "description": "Ordering", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": "Lookup a product type by ID.", "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productTypes", "description": "List of the shop's product types.", "args": [{"name": "level", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductTypeCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "node", "description": "The ID of the object", "args": [{"name": "id", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}], "type": {"kind": "INTERFACE", "name": "Node", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAttributeCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductAttributeCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageInfo", "description": null, "fields": [{"name": "hasNextPage", "description": "When paginating forwards, are there more items?", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "hasPreviousPage", "description": "When paginating backwards, are there more items?", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "startCursor", "description": "When paginating backwards, the cursor to continue.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "endCursor", "description": "When paginating forwards, the cursor to continue.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "Boolean", "description": "The `Boolean` scalar type represents `true` or `false`.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "String", "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAttributeCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "ProductAttribute", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAttribute", "description": "Custom attribute of a product. Attributes can be\n dynamically assigned to products and variants at the product type\n level.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "values", "description": "List of attribute's values.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductAttributeValue", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "INTERFACE", "name": "Node", "description": "An object with an ID", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": [{"kind": "OBJECT", "name": "ProductAttribute", "ofType": null}, {"kind": "OBJECT", "name": "ProductAttributeValue", "ofType": null}, {"kind": "OBJECT", "name": "Category", "ofType": null}, {"kind": "OBJECT", "name": "Product", "ofType": null}, {"kind": "OBJECT", "name": "ProductType", "ofType": null}, {"kind": "OBJECT", "name": "ProductVariant", "ofType": null}, {"kind": "OBJECT", "name": "ProductImage", "ofType": null}, {"kind": "OBJECT", "name": "Collection", "ofType": null}, {"kind": "OBJECT", "name": "Page", "ofType": null}]}, {"kind": "SCALAR", "name": "ID", "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAttributeValue", "description": "Represents a value of an attribute.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "color", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "Int", "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since represented in JSON as double-precision floating point numbers specifiedby [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "CategoryCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Category", "description": "Represents a single category of products. Categories\n allow to organize products in a tree-hierarchies which can be used for\n navigation in the storefront.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoTitle", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoDescription", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "parent", "description": "", "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "backgroundImage", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "level", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "children", "description": "List of children of the category.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "products", "description": "List of products in the category.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "category", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "price", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Range", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Lte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Gte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "AttributeScalar", "ofType": null}}, "defaultValue": null}, {"name": "name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name_Icontains", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "productType_Name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "isFeatured", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "sortBy", "description": "Ordering", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "url", "description": "The storefront's URL for the category.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "ancestors", "description": "List of ancestors of the category.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Product", "description": "Represents an individual item for sale in the\n storefront.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoTitle", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoDescription", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductType", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "Category", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "price", "description": "The product's base price (without any discounts\n applied).", "args": [], "type": {"kind": "OBJECT", "name": "Money", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "availableOn", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "DateTime", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isPublished", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "attributes", "description": "List of product attributes assigned to this product.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "SelectedAttribute", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "updatedAt", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "DateTime", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isFeatured", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "variants", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductVariantCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "images", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductImageCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "collections", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CollectionCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "url", "description": "The storefront URL for the product.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "thumbnailUrl", "description": "The URL of a main thumbnail for a product.", "args": [{"name": "size", "description": "Size of a thumbnail, for example 255x255.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "availability", "description": "Informs about product's availability in the storefront,\n current price and discounts.", "args": [], "type": {"kind": "OBJECT", "name": "ProductAvailability", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "purchaseCost", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoneyRange", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "grossMargin", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "GrossMargin", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductType", "description": "Represents a type of product. It defines what\n attributes are available to products of this type.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "hasVariants", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "productAttributes", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductAttributeCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "variantAttributes", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductAttributeCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isShippingRequired", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "products", "description": "List of products of this type.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "category", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "price", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Range", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Lte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Gte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "AttributeScalar", "ofType": null}}, "defaultValue": null}, {"name": "name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name_Icontains", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "productType_Name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "isFeatured", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "sortBy", "description": "Ordering", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "Float", "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "AttributeScalar", "description": null, "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Money", "description": "Represents amount of money in specific currency.", "fields": [{"name": "currency", "description": "Currency code.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "amount", "description": "Amount of money.", "args": [], "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "localized", "description": "Money formatted according to the current locale.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "DateTime", "description": "The `DateTime` scalar type represents a DateTime\nvalue as specified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "SelectedAttribute", "description": "Represents a custom product attribute.", "fields": [{"name": "name", "description": "Name of an attribute", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "value", "description": "Value of an attribute.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductVariantCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductVariantCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductVariantCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "ProductVariant", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductVariant", "description": "Represents a version of a product such as different\n size or color.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "sku", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "priceOverride", "description": "Override the base price of a product if necessary.\n A value of `null` indicates that the default product price is used.", "args": [], "type": {"kind": "OBJECT", "name": "Money", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "Product", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "attributes", "description": "List of attributes assigned to this variant.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "SelectedAttribute", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "images", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductImageCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "quantity", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "quantityAllocated", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "costPrice", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "stockQuantity", "description": "Quantity of a product available for sale.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductImageCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductImageCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductImageCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "ProductImage", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductImage", "description": "Represents a product image.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "image", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "ppoi", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "alt", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "order", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "url", "description": "", "args": [{"name": "size", "description": "Size of an image, for example 255x255.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CollectionCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "CollectionCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CollectionCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "Collection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Collection", "description": "Represents a collection of products.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoTitle", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoDescription", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "products", "description": "List of collection products.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "category", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "price", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Range", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Lte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Gte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "AttributeScalar", "ofType": null}}, "defaultValue": null}, {"name": "name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name_Icontains", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "productType_Name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "isFeatured", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "sortBy", "description": "Ordering", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "backgroundImage", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAvailability", "description": "Represents availability of a product in the storefront.", "fields": [{"name": "available", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "onSale", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "discount", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoney", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "discountLocalCurrency", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoney", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "priceRange", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoneyRange", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "priceRangeUndiscounted", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoneyRange", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "priceRangeLocalCurrency", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoneyRange", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "TaxedMoney", "description": "Represents a monetary value with taxes. In\n case when taxes were not applied, net and gross values will be equal.\n ", "fields": [{"name": "currency", "description": "Currency code.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "gross", "description": "Amount of money including taxes.", "args": [], "type": {"kind": "OBJECT", "name": "Money", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "net", "description": "Amount of money without taxes.", "args": [], "type": {"kind": "OBJECT", "name": "Money", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "TaxedMoneyRange", "description": "Represents a range of monetary values.", "fields": [{"name": "start", "description": "Lower bound of a price range.", "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoney", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "stop", "description": "Upper bound of a price range.", "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoney", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "GrossMargin", "description": null, "fields": [{"name": "start", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "stop", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Page", "description": "A static page that can be manually added by a shop\n operator through the dashboard.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoTitle", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoDescription", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "title", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "content", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "created", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "DateTime", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "isVisible", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "availableOn", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "DateTime", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "PageCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductTypeCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Mutations", "description": null, "fields": [{"name": "tokenCreate", "description": null, "args": [{"name": "email", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "password", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CreateToken", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "tokenRefresh", "description": null, "args": [{"name": "token", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "Refresh", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "categoryCreate", "description": null, "args": [{"name": "parentId", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "description", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "parent", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "backgroundImage", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryCreateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "categoryDelete", "description": null, "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryDelete", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "categoryUpdate", "description": null, "args": [{"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "description", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "parent", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "backgroundImage", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryUpdateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "pageCreate", "description": null, "args": [{"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": "Slug is being used to create page URL", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "title", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "content", "description": "Select text to enable text-formatting tools.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "isVisible", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "availableOn", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "PageCreate", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "pageDelete", "description": null, "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "PageDelete", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "pageUpdate", "description": null, "args": [{"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": "Slug is being used to create page URL", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "title", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "content", "description": "Select text to enable text-formatting tools.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "isVisible", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "availableOn", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "PageUpdate", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productCreate", "description": null, "args": [{"name": "productTypeId", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "categoryId", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "INPUT_OBJECT", "name": "AttributeValueInput", "ofType": null}}, "defaultValue": null}, {"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "description", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "price", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Float", "ofType": null}}, "defaultValue": null}, {"name": "availableOn", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "isFeatured", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCreateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productDelete", "description": null, "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductDeleteMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productUpdate", "description": null, "args": [{"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "INPUT_OBJECT", "name": "AttributeValueInput", "ofType": null}}, "defaultValue": null}, {"name": "categoryId", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "description", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "price", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Float", "ofType": null}}, "defaultValue": null}, {"name": "availableOn", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "isFeatured", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductUpdateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productTypeCreate", "description": null, "args": [{"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "hasVariants", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "productAttributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}, {"name": "variantAttributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}, {"name": "isShippingRequired", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductTypeCreateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productTypeUpdate", "description": null, "args": [{"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "hasVariants", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "productAttributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}, {"name": "variantAttributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}, {"name": "isShippingRequired", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductTypeUpdateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productTypeDelete", "description": null, "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductTypeDeleteMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CreateToken", "description": "Mutation that authenticates a user and returns token.\n\nIt overrides the default graphql_jwt.ObtainJSONWebToken to wrap potential\nauthentication errors in our Error type, which is consistent to how rest of\nthe mutation works.", "fields": [{"name": "token", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "errors", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Error", "description": "Represents an error in the input of a mutation.", "fields": [{"name": "field", "description": "Name of a field that caused the error. A value of\n `null` indicates that the error isn't associated with a particular\n field.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "message", "description": "The error message.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Refresh", "description": null, "fields": [{"name": "token", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "payload", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "GenericScalar", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "GenericScalar", "description": "The `GenericScalar` scalar type represents a generic\nGraphQL scalar value that could be:\nString, Boolean, Int, Float, List or Object.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryCreateMutation", "description": "Creates a new category.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryDelete", "description": "Deletes a category.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryUpdateMutation", "description": "Updates an existing category.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageCreate", "description": "Creates a new page.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "page", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageDelete", "description": "Deletes a page.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "page", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageUpdate", "description": "Updates an existing page.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "page", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductCreateMutation", "description": "Creates a new product.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "AttributeValueInput", "description": null, "fields": null, "inputFields": [{"name": "slug", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "value", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductDeleteMutation", "description": "Deletes a product.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductUpdateMutation", "description": "Update an existing product.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeCreateMutation", "description": "Creates a new product type.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeUpdateMutation", "description": "Update an existing product type.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeDeleteMutation", "description": "Deletes a product type.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__Schema", "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation and subscription operations.", "fields": [{"name": "types", "description": "A list of all types supported by this server.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "queryType", "description": "The type that query operations will be rooted at.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "mutationType", "description": "If this server supports mutation, the type that mutation operations will be rooted at.", "args": [], "type": {"kind": "OBJECT", "name": "__Type", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "subscriptionType", "description": "If this server support subscription, the type that subscription operations will be rooted at.", "args": [], "type": {"kind": "OBJECT", "name": "__Type", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "directives", "description": "A list of all directives supported by this server.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Directive", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__Type", "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", "fields": [{"name": "kind", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "__TypeKind", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "fields", "description": null, "args": [{"name": "includeDeprecated", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": "false"}], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Field", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "interfaces", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "possibleTypes", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "enumValues", "description": null, "args": [{"name": "includeDeprecated", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": "false"}], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__EnumValue", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "inputFields", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__InputValue", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "ofType", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "__Type", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "ENUM", "name": "__TypeKind", "description": "An enum describing what kind of type a given `__Type` is", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "SCALAR", "description": "Indicates this type is a scalar.", "isDeprecated": false, "deprecationReason": null}, {"name": "OBJECT", "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", "isDeprecated": false, "deprecationReason": null}, {"name": "INTERFACE", "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", "isDeprecated": false, "deprecationReason": null}, {"name": "UNION", "description": "Indicates this type is a union. `possibleTypes` is a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "ENUM", "description": "Indicates this type is an enum. `enumValues` is a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "INPUT_OBJECT", "description": "Indicates this type is an input object. `inputFields` is a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "LIST", "description": "Indicates this type is a list. `ofType` is a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "NON_NULL", "description": "Indicates this type is a non-null. `ofType` is a valid field.", "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}, {"kind": "OBJECT", "name": "__Field", "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "args", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__InputValue", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "type", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "isDeprecated", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "deprecationReason", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__InputValue", "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "type", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "defaultValue", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__EnumValue", "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isDeprecated", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "deprecationReason", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__Directive", "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "locations", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "__DirectiveLocation", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "args", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__InputValue", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "onOperation", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": true, "deprecationReason": "Use `locations`."}, {"name": "onFragment", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": true, "deprecationReason": "Use `locations`."}, {"name": "onField", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": true, "deprecationReason": "Use `locations`."}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "ENUM", "name": "__DirectiveLocation", "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "QUERY", "description": "Location adjacent to a query operation.", "isDeprecated": false, "deprecationReason": null}, {"name": "MUTATION", "description": "Location adjacent to a mutation operation.", "isDeprecated": false, "deprecationReason": null}, {"name": "SUBSCRIPTION", "description": "Location adjacent to a subscription operation.", "isDeprecated": false, "deprecationReason": null}, {"name": "FIELD", "description": "Location adjacent to a field.", "isDeprecated": false, "deprecationReason": null}, {"name": "FRAGMENT_DEFINITION", "description": "Location adjacent to a fragment definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "FRAGMENT_SPREAD", "description": "Location adjacent to a fragment spread.", "isDeprecated": false, "deprecationReason": null}, {"name": "INLINE_FRAGMENT", "description": "Location adjacent to an inline fragment.", "isDeprecated": false, "deprecationReason": null}, {"name": "SCHEMA", "description": "Location adjacent to a schema definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "SCALAR", "description": "Location adjacent to a scalar definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "OBJECT", "description": "Location adjacent to an object definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "FIELD_DEFINITION", "description": "Location adjacent to a field definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "ARGUMENT_DEFINITION", "description": "Location adjacent to an argument definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "INTERFACE", "description": "Location adjacent to an interface definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "UNION", "description": "Location adjacent to a union definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "ENUM", "description": "Location adjacent to an enum definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "ENUM_VALUE", "description": "Location adjacent to an enum value definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "INPUT_OBJECT", "description": "Location adjacent to an input object definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "INPUT_FIELD_DEFINITION", "description": "Location adjacent to an input object field definition.", "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}], "directives": [{"name": "include", "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [{"name": "if", "description": "Included when true.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}]}, {"name": "skip", "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [{"name": "if", "description": "Skipped when true.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}]}]}}}
\ No newline at end of file
+{"data": {"__schema": {"queryType": {"name": "Query"}, "mutationType": {"name": "Mutations"}, "subscriptionType": null, "types": [{"kind": "OBJECT", "name": "Query", "description": null, "fields": [{"name": "attributes", "description": "List of the shop's product attributes.", "args": [{"name": "inCategory", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductAttributeCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "categories", "description": "List of the shop's categories.", "args": [{"name": "level", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": "Lookup a category by ID.", "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "page", "description": "Lookup a page by ID or by slug.", "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "pages", "description": "List of the shop's pages.", "args": [{"name": "level", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "PageCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": "Lookup a product by ID.", "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "products", "description": "List of the shop's products.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "category", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "price", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Range", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Lte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Gte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "AttributeScalar", "ofType": null}}, "defaultValue": null}, {"name": "name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name_Icontains", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "productType_Name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "isFeatured", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "sortBy", "description": "Ordering", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": "Lookup a product type by ID.", "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productTypes", "description": "List of the shop's product types.", "args": [{"name": "level", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductTypeCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "node", "description": "The ID of the object", "args": [{"name": "id", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}], "type": {"kind": "INTERFACE", "name": "Node", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAttributeCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductAttributeCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageInfo", "description": null, "fields": [{"name": "hasNextPage", "description": "When paginating forwards, are there more items?", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "hasPreviousPage", "description": "When paginating backwards, are there more items?", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "startCursor", "description": "When paginating backwards, the cursor to continue.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "endCursor", "description": "When paginating forwards, the cursor to continue.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "Boolean", "description": "The `Boolean` scalar type represents `true` or `false`.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "String", "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAttributeCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "ProductAttribute", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAttribute", "description": "Custom attribute of a product. Attributes can be\n dynamically assigned to products and variants at the product type\n level.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "values", "description": "List of attribute's values.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductAttributeValue", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "INTERFACE", "name": "Node", "description": "An object with an ID", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": [{"kind": "OBJECT", "name": "ProductAttribute", "ofType": null}, {"kind": "OBJECT", "name": "ProductAttributeValue", "ofType": null}, {"kind": "OBJECT", "name": "Category", "ofType": null}, {"kind": "OBJECT", "name": "Product", "ofType": null}, {"kind": "OBJECT", "name": "ProductType", "ofType": null}, {"kind": "OBJECT", "name": "ProductVariant", "ofType": null}, {"kind": "OBJECT", "name": "ProductImage", "ofType": null}, {"kind": "OBJECT", "name": "Collection", "ofType": null}, {"kind": "OBJECT", "name": "Page", "ofType": null}]}, {"kind": "SCALAR", "name": "ID", "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAttributeValue", "description": "Represents a value of an attribute.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "color", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "Int", "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^53 - 1) and 2^53 - 1 since represented in JSON as double-precision floating point numbers specifiedby [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "CategoryCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Category", "description": "Represents a single category of products. Categories\n allow to organize products in a tree-hierarchies which can be used for\n navigation in the storefront.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoTitle", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoDescription", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "parent", "description": "", "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "backgroundImage", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "level", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "children", "description": "List of children of the category.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "products", "description": "List of products in the category.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "category", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "price", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Range", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Lte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Gte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "AttributeScalar", "ofType": null}}, "defaultValue": null}, {"name": "name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name_Icontains", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "productType_Name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "isFeatured", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "sortBy", "description": "Ordering", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "url", "description": "The storefront's URL for the category.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "ancestors", "description": "List of ancestors of the category.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Product", "description": "Represents an individual item for sale in the\n storefront.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoTitle", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoDescription", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductType", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "Category", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "price", "description": "The product's base price (without any discounts\n applied).", "args": [], "type": {"kind": "OBJECT", "name": "Money", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "availableOn", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "DateTime", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isPublished", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "attributes", "description": "List of product attributes assigned to this product.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "SelectedAttribute", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "updatedAt", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "DateTime", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isFeatured", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "variants", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductVariantCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "images", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductImageCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "collections", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CollectionCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "url", "description": "The storefront URL for the product.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "thumbnailUrl", "description": "The URL of a main thumbnail for a product.", "args": [{"name": "size", "description": "Size of a thumbnail, for example 255x255.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "availability", "description": "Informs about product's availability in the storefront,\n current price and discounts.", "args": [], "type": {"kind": "OBJECT", "name": "ProductAvailability", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "purchaseCost", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoneyRange", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "grossMargin", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "GrossMargin", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductType", "description": "Represents a type of product. It defines what\n attributes are available to products of this type.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "hasVariants", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "productAttributes", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductAttributeCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "variantAttributes", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductAttributeCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isShippingRequired", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "products", "description": "List of products of this type.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "category", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "price", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Range", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Lte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Gte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "AttributeScalar", "ofType": null}}, "defaultValue": null}, {"name": "name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name_Icontains", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "productType_Name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "isFeatured", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "sortBy", "description": "Ordering", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "Float", "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "AttributeScalar", "description": null, "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Money", "description": "Represents amount of money in specific currency.", "fields": [{"name": "currency", "description": "Currency code.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "amount", "description": "Amount of money.", "args": [], "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "localized", "description": "Money formatted according to the current locale.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "DateTime", "description": "The `DateTime` scalar type represents a DateTime\nvalue as specified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "SelectedAttribute", "description": "Represents a custom product attribute.", "fields": [{"name": "name", "description": "Name of an attribute", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "value", "description": "Value of an attribute.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductVariantCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductVariantCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductVariantCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "ProductVariant", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductVariant", "description": "Represents a version of a product such as different\n size or color.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "sku", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "priceOverride", "description": "Override the base price of a product if necessary.\n A value of `null` indicates that the default product price is used.", "args": [], "type": {"kind": "OBJECT", "name": "Money", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "Product", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "attributes", "description": "List of attributes assigned to this variant.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "SelectedAttribute", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "images", "description": null, "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductImageCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "quantity", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "quantityAllocated", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "costPrice", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "stockQuantity", "description": "Quantity of a product available for sale.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductImageCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductImageCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductImageCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "ProductImage", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductImage", "description": "Represents a product image.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "image", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "ppoi", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "alt", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "order", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "url", "description": "", "args": [{"name": "size", "description": "Size of an image, for example 255x255.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CollectionCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "CollectionCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CollectionCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "Collection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Collection", "description": "Represents a collection of products.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoTitle", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoDescription", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "products", "description": "List of collection products.", "args": [{"name": "before", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "after", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "first", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "last", "description": null, "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "defaultValue": null}, {"name": "category", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "price", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Range", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Lte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "price_Gte", "description": null, "type": {"kind": "SCALAR", "name": "Float", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "AttributeScalar", "ofType": null}}, "defaultValue": null}, {"name": "name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name_Icontains", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "productType_Name", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "isFeatured", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "sortBy", "description": "Ordering", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCountableConnection", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "backgroundImage", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductAvailability", "description": "Represents availability of a product in the storefront.", "fields": [{"name": "available", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "onSale", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "discount", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoney", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "discountLocalCurrency", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoney", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "priceRange", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoneyRange", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "priceRangeUndiscounted", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoneyRange", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "priceRangeLocalCurrency", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoneyRange", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "TaxedMoney", "description": "Represents a monetary value with taxes. In\n case when taxes were not applied, net and gross values will be equal.\n ", "fields": [{"name": "currency", "description": "Currency code.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "gross", "description": "Amount of money including taxes.", "args": [], "type": {"kind": "OBJECT", "name": "Money", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "net", "description": "Amount of money without taxes.", "args": [], "type": {"kind": "OBJECT", "name": "Money", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "TaxedMoneyRange", "description": "Represents a range of monetary values.", "fields": [{"name": "start", "description": "Lower bound of a price range.", "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoney", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "stop", "description": "Upper bound of a price range.", "args": [], "type": {"kind": "OBJECT", "name": "TaxedMoney", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "GrossMargin", "description": null, "fields": [{"name": "start", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "stop", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Page", "description": "A static page that can be manually added by a shop\n operator through the dashboard.", "fields": [{"name": "id", "description": "The ID of the object.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoTitle", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "seoDescription", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "slug", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "title", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "content", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "created", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "DateTime", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "isVisible", "description": "", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "availableOn", "description": "", "args": [], "type": {"kind": "SCALAR", "name": "DateTime", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [{"kind": "INTERFACE", "name": "Node", "ofType": null}], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "PageCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeCountableConnection", "description": null, "fields": [{"name": "pageInfo", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PageInfo", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "edges", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "ProductTypeCountableEdge", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "totalCount", "description": "A total count of items in the collection", "args": [], "type": {"kind": "SCALAR", "name": "Int", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeCountableEdge", "description": null, "fields": [{"name": "node", "description": "The item at the end of the edge", "args": [], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "cursor", "description": "A cursor for use in pagination", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Mutations", "description": null, "fields": [{"name": "tokenCreate", "description": null, "args": [{"name": "email", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "password", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CreateToken", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "tokenRefresh", "description": null, "args": [{"name": "token", "description": null, "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "Refresh", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "categoryCreate", "description": null, "args": [{"name": "parentId", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "description", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "parent", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "backgroundImage", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryCreateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "categoryDelete", "description": null, "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryDelete", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "categoryUpdate", "description": null, "args": [{"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "description", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "parent", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "backgroundImage", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "CategoryUpdateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "pageCreate", "description": null, "args": [{"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": "Slug is being used to create page URL", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "title", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "content", "description": "Select text to enable text-formatting tools.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "isVisible", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "availableOn", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "PageCreate", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "pageDelete", "description": null, "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "PageDelete", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "pageUpdate", "description": null, "args": [{"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "slug", "description": "Slug is being used to create page URL", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "title", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "content", "description": "Select text to enable text-formatting tools.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "isVisible", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "availableOn", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "PageUpdate", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productCreate", "description": null, "args": [{"name": "productTypeId", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "categoryId", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "INPUT_OBJECT", "name": "AttributeValueInput", "ofType": null}}, "defaultValue": null}, {"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "description", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "price", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Float", "ofType": null}}, "defaultValue": null}, {"name": "availableOn", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "isFeatured", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductCreateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productDelete", "description": null, "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductDeleteMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productUpdate", "description": null, "args": [{"name": "attributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "INPUT_OBJECT", "name": "AttributeValueInput", "ofType": null}}, "defaultValue": null}, {"name": "categoryId", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}, {"name": "seoTitle", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "seoDescription", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "description", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "price", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Float", "ofType": null}}, "defaultValue": null}, {"name": "availableOn", "description": "", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isPublished", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "isFeatured", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductUpdateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productTypeCreate", "description": null, "args": [{"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "hasVariants", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "productAttributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}, {"name": "variantAttributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}, {"name": "isShippingRequired", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductTypeCreateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productTypeUpdate", "description": null, "args": [{"name": "name", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "hasVariants", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "productAttributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}, {"name": "variantAttributes", "description": null, "type": {"kind": "LIST", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}, "defaultValue": null}, {"name": "isShippingRequired", "description": "", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}, {"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductTypeUpdateMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "productTypeDelete", "description": null, "args": [{"name": "id", "description": null, "type": {"kind": "SCALAR", "name": "ID", "ofType": null}, "defaultValue": null}], "type": {"kind": "OBJECT", "name": "ProductTypeDeleteMutation", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CreateToken", "description": "Mutation that authenticates a user and returns token.\n\nIt overrides the default graphql_jwt.ObtainJSONWebToken to wrap potential\nauthentication errors in our Error type, which is consistent to how rest of\nthe mutation works.", "fields": [{"name": "token", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "errors", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Error", "description": "Represents an error in the input of a mutation.", "fields": [{"name": "field", "description": "Name of a field that caused the error. A value of\n `null` indicates that the error isn't associated with a particular\n field.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "message", "description": "The error message.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "Refresh", "description": null, "fields": [{"name": "token", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "payload", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "GenericScalar", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "GenericScalar", "description": "The `GenericScalar` scalar type represents a generic\nGraphQL scalar value that could be:\nString, Boolean, Int, Float, List or Object.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryCreateMutation", "description": "Creates a new category.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryDelete", "description": "Deletes a category.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CategoryUpdateMutation", "description": "Updates an existing category.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "category", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Category", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageCreate", "description": "Creates a new page.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "page", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageDelete", "description": "Deletes a page.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "page", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PageUpdate", "description": "Updates an existing page.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "page", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Page", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductCreateMutation", "description": "Creates a new product.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "AttributeValueInput", "description": null, "fields": null, "inputFields": [{"name": "slug", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "value", "description": null, "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductDeleteMutation", "description": "Deletes a product.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductUpdateMutation", "description": "Update an existing product.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "product", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Product", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeCreateMutation", "description": "Creates a new product type.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeUpdateMutation", "description": "Update an existing product type.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ProductTypeDeleteMutation", "description": "Deletes a product type.", "fields": [{"name": "errors", "description": "List of errors that occurred executing the mutation.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "OBJECT", "name": "Error", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "productType", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "ProductType", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__Schema", "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation and subscription operations.", "fields": [{"name": "types", "description": "A list of all types supported by this server.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "queryType", "description": "The type that query operations will be rooted at.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "mutationType", "description": "If this server supports mutation, the type that mutation operations will be rooted at.", "args": [], "type": {"kind": "OBJECT", "name": "__Type", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "subscriptionType", "description": "If this server support subscription, the type that subscription operations will be rooted at.", "args": [], "type": {"kind": "OBJECT", "name": "__Type", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "directives", "description": "A list of all directives supported by this server.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Directive", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__Type", "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", "fields": [{"name": "kind", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "__TypeKind", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "fields", "description": null, "args": [{"name": "includeDeprecated", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": "false"}], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Field", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "interfaces", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "possibleTypes", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "enumValues", "description": null, "args": [{"name": "includeDeprecated", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": "false"}], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__EnumValue", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "inputFields", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__InputValue", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "ofType", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "__Type", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "ENUM", "name": "__TypeKind", "description": "An enum describing what kind of type a given `__Type` is", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "SCALAR", "description": "Indicates this type is a scalar.", "isDeprecated": false, "deprecationReason": null}, {"name": "OBJECT", "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", "isDeprecated": false, "deprecationReason": null}, {"name": "INTERFACE", "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", "isDeprecated": false, "deprecationReason": null}, {"name": "UNION", "description": "Indicates this type is a union. `possibleTypes` is a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "ENUM", "description": "Indicates this type is an enum. `enumValues` is a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "INPUT_OBJECT", "description": "Indicates this type is an input object. `inputFields` is a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "LIST", "description": "Indicates this type is a list. `ofType` is a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "NON_NULL", "description": "Indicates this type is a non-null. `ofType` is a valid field.", "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}, {"kind": "OBJECT", "name": "__Field", "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "args", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__InputValue", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "type", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "isDeprecated", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "deprecationReason", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__InputValue", "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "type", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "defaultValue", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__EnumValue", "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isDeprecated", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "deprecationReason", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__Directive", "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "locations", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "__DirectiveLocation", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "args", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__InputValue", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "onOperation", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": true, "deprecationReason": "Use `locations`."}, {"name": "onFragment", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": true, "deprecationReason": "Use `locations`."}, {"name": "onField", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": true, "deprecationReason": "Use `locations`."}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "ENUM", "name": "__DirectiveLocation", "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "QUERY", "description": "Location adjacent to a query operation.", "isDeprecated": false, "deprecationReason": null}, {"name": "MUTATION", "description": "Location adjacent to a mutation operation.", "isDeprecated": false, "deprecationReason": null}, {"name": "SUBSCRIPTION", "description": "Location adjacent to a subscription operation.", "isDeprecated": false, "deprecationReason": null}, {"name": "FIELD", "description": "Location adjacent to a field.", "isDeprecated": false, "deprecationReason": null}, {"name": "FRAGMENT_DEFINITION", "description": "Location adjacent to a fragment definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "FRAGMENT_SPREAD", "description": "Location adjacent to a fragment spread.", "isDeprecated": false, "deprecationReason": null}, {"name": "INLINE_FRAGMENT", "description": "Location adjacent to an inline fragment.", "isDeprecated": false, "deprecationReason": null}, {"name": "SCHEMA", "description": "Location adjacent to a schema definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "SCALAR", "description": "Location adjacent to a scalar definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "OBJECT", "description": "Location adjacent to an object definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "FIELD_DEFINITION", "description": "Location adjacent to a field definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "ARGUMENT_DEFINITION", "description": "Location adjacent to an argument definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "INTERFACE", "description": "Location adjacent to an interface definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "UNION", "description": "Location adjacent to a union definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "ENUM", "description": "Location adjacent to an enum definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "ENUM_VALUE", "description": "Location adjacent to an enum value definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "INPUT_OBJECT", "description": "Location adjacent to an input object definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "INPUT_FIELD_DEFINITION", "description": "Location adjacent to an input object field definition.", "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}], "directives": [{"name": "include", "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [{"name": "if", "description": "Included when true.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}]}, {"name": "skip", "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [{"name": "if", "description": "Skipped when true.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}]}]}}}
diff --git a/saleor/static/dashboard-next/storybook/config.js b/saleor/static/dashboard-next/storybook/config.js
index 1c3bedea75..c723698a49 100644
--- a/saleor/static/dashboard-next/storybook/config.js
+++ b/saleor/static/dashboard-next/storybook/config.js
@@ -22,6 +22,30 @@ function loadStories() {
require("./stories/pages/PageDeleteDialog");
require("./stories/pages/PageFilters");
require("./stories/pages/PageList");
+
+ // Products
+ require("./stories/products/ProductAttributesForm");
+ require("./stories/products/ProductAvailabilityForm");
+ require("./stories/products/ProductCategoryAndCollectionsForm");
+ require("./stories/products/ProductCollections");
+ require("./stories/products/ProductDescription");
+ require("./stories/products/ProductDetailsForm");
+ require("./stories/products/ProductDetailsPage");
+ require("./stories/products/ProductImagePage");
+ require("./stories/products/ProductImages");
+ require("./stories/products/ProductListCard");
+ require("./stories/products/ProductPriceAndAvailability");
+ require("./stories/products/ProductUpdatePage");
+ require("./stories/products/ProductVariantAttributes");
+ require("./stories/products/ProductVariantDeleteDialog");
+ require("./stories/products/ProductVariantImageSelectDialog");
+ require("./stories/products/ProductVariantImages");
+ require("./stories/products/ProductVariantNavigation");
+ require("./stories/products/ProductVariantPage");
+ require("./stories/products/ProductVariantPrice");
+ require("./stories/products/ProductVariantProduct");
+ require("./stories/products/ProductVariantStock");
+ require("./stories/products/ProductVariants");
}
configure(loadStories, module);
diff --git a/saleor/static/dashboard-next/storybook/stories/categories/CategoryProducts.tsx b/saleor/static/dashboard-next/storybook/stories/categories/CategoryProducts.tsx
index 0212603503..2da8a53c16 100644
--- a/saleor/static/dashboard-next/storybook/stories/categories/CategoryProducts.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/categories/CategoryProducts.tsx
@@ -3,13 +3,13 @@ import { DialogContentText } from "material-ui/Dialog";
import * as React from "react";
import CategoryProducts from "../../../category/components/CategoryProducts";
+import * as placeholder from "../../../../images/placeholder60x60.png";
const products = [
{
id: "UHJvZHVjdDox",
name: "Gardner, Graham and King",
- thumbnailUrl:
- "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",
+ thumbnailUrl: placeholder,
productType: {
id: "1",
name: "T-Shirt"
@@ -18,8 +18,7 @@ const products = [
{
id: "UHJvZHVjdDoy",
name: "Gardner, Graham and King",
- thumbnailUrl:
- "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",
+ thumbnailUrl: placeholder,
productType: {
id: "1",
name: "T-Shirt"
@@ -28,8 +27,7 @@ const products = [
{
id: "UHJvZHVjdDoz",
name: "Gardner, Graham and King",
- thumbnailUrl:
- "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",
+ thumbnailUrl: placeholder,
productType: {
id: "1",
name: "T-Shirt"
@@ -38,8 +36,7 @@ const products = [
{
id: "UHJvZHVjdDoa",
name: "Gardner, Graham and King",
- thumbnailUrl:
- "/media/__sized__/products/saleor/static/placeholders/t-shirts/6_tdo7a5D-crop-c0-5__0-5-255x255-70.jpg",
+ thumbnailUrl: placeholder,
productType: {
id: "1",
name: "T-Shirt"
@@ -48,6 +45,17 @@ const products = [
];
storiesOf("Categories / CategoryProducts", module)
+ .add("without initial data", () => (
+ <CategoryProducts
+ hasNextPage={true}
+ hasPreviousPage={false}
+ products={[]}
+ onCreate={() => {}}
+ onFilter={() => {}}
+ onNextPage={() => {}}
+ onPreviousPage={() => {}}
+ />
+ ))
.add("with initial data", () => (
<CategoryProducts
hasNextPage={true}
@@ -59,15 +67,16 @@ storiesOf("Categories / CategoryProducts", module)
onPreviousPage={() => {}}
/>
))
- .add("without initial data", () => (
+ .add("with clickable rows", () => (
<CategoryProducts
hasNextPage={true}
hasPreviousPage={false}
- products={[]}
+ products={products}
onCreate={() => {}}
onFilter={() => {}}
onNextPage={() => {}}
onPreviousPage={() => {}}
+ onRowClick={() => {}}
/>
))
.add("when loading data", () => (
diff --git a/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsx b/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsx
index 2e919e6a59..a7335fe9c1 100644
--- a/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsx
@@ -1,32 +1,81 @@
import { storiesOf } from "@storybook/react";
import * as React from "react";
-import PriceField from "../../../components/PriceField";
+import PriceField, { PriceRangeField } from "../../../components/PriceField";
const value = {
max: "30",
min: "10"
};
+storiesOf("Generics / PriceRangeField", module)
+ .add("with no value", () => <PriceRangeField onChange={() => {}} />)
+ .add("with value", () => (
+ <PriceRangeField value={value} onChange={() => {}} />
+ ))
+ .add("with label", () => (
+ <PriceRangeField label="Lorem ipsum" onChange={() => {}} />
+ ))
+ .add("with hint", () => (
+ <PriceRangeField hint="Lorem ipsum" onChange={() => {}} />
+ ))
+ .add("with currency symbol", () => (
+ <PriceRangeField currencySymbol="$" onChange={() => {}} />
+ ))
+ .add("disabled", () => <PriceRangeField disabled onChange={() => {}} />)
+ .add("with label and hint", () => (
+ <PriceRangeField label="Lorem" hint="Ipsum" onChange={() => {}} />
+ ))
+ .add("with value, label, currency symbol and hint", () => (
+ <PriceRangeField
+ value={value}
+ label="Lorem"
+ hint="Ipsum"
+ onChange={() => {}}
+ currencySymbol="$"
+ />
+ ))
+ .add("with value, label, currency symbol and error", () => (
+ <PriceRangeField
+ value={value}
+ label="Lorem"
+ hint="Ipsum"
+ error={true}
+ onChange={() => {}}
+ currencySymbol="$"
+ />
+ ));
+
storiesOf("Generics / PriceField", module)
.add("with no value", () => <PriceField onChange={() => {}} />)
- .add("with value", () => <PriceField value={value} onChange={() => {}} />)
+ .add("with value", () => <PriceField value={"30"} onChange={() => {}} />)
.add("with label", () => (
<PriceField label="Lorem ipsum" onChange={() => {}} />
))
.add("with hint", () => <PriceField hint="Lorem ipsum" onChange={() => {}} />)
+ .add("with currency symbol", () => (
+ <PriceField currencySymbol="$" onChange={() => {}} />
+ ))
+ .add("disabled", () => <PriceField disabled onChange={() => {}} />)
.add("with label and hint", () => (
<PriceField label="Lorem" hint="Ipsum" onChange={() => {}} />
))
- .add("with value, label and hint", () => (
- <PriceField value={value} label="Lorem" hint="Ipsum" onChange={() => {}} />
+ .add("with value, label, currency symbol and hint", () => (
+ <PriceField
+ value={"30"}
+ label="Lorem"
+ hint="Ipsum"
+ onChange={() => {}}
+ currencySymbol="$"
+ />
))
- .add("with value, label and error", () => (
+ .add("with value, label, currency symbol and error", () => (
<PriceField
- value={value}
+ value={"30"}
label="Lorem"
hint="Ipsum"
error={true}
onChange={() => {}}
+ currencySymbol="$"
/>
));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductAttributesForm.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductAttributesForm.tsx
new file mode 100644
index 0000000000..8ef7978619
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductAttributesForm.tsx
@@ -0,0 +1,99 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductAttributesForm from "../../../products/components/ProductAttributesForm";
+
+const productAttributes = [
+ {
+ name: "brand",
+ value: "superbrand"
+ },
+ {
+ name: "collar",
+ value: "round"
+ },
+ {
+ name: "color",
+ value: "blue"
+ }
+];
+const attributes = [
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZToz",
+ slug: "brand",
+ name: "Brand",
+ values: [
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjQw",
+ name: "dominikibrand",
+ slug: "dominikibrand"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM5",
+ name: "superbrand",
+ slug: "superbrand"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM4",
+ name: "Mirumee",
+ slug: "mirumee"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjY=",
+ name: "Saleor",
+ slug: "saleor"
+ }
+ ]
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZToy",
+ slug: "collar",
+ name: "Collar",
+ values: [
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjU=",
+ name: "Polo",
+ slug: "polo"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjQ=",
+ name: "V-Neck",
+ slug: "v-neck"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM=",
+ name: "Round",
+ slug: "round"
+ }
+ ]
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZTox",
+ slug: "color",
+ name: "Color",
+ values: [
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI=",
+ name: "White",
+ slug: "white"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE=",
+ name: "Blue",
+ slug: "blue"
+ }
+ ]
+ }
+];
+
+storiesOf("Products / ProductAttributesForm", module)
+ .add("when loading data", () => (
+ <ProductAttributesForm loading={true} onChange={() => {}} />
+ ))
+ .add("when data loaded", () => (
+ <ProductAttributesForm
+ attributes={attributes}
+ productAttributes={productAttributes}
+ onChange={() => {}}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductAvailabilityForm.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductAvailabilityForm.tsx
new file mode 100644
index 0000000000..75197cb819
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductAvailabilityForm.tsx
@@ -0,0 +1,16 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductAvailabilityForm from "../../../products/components/ProductAvailabilityForm";
+
+storiesOf("Products / ProductAvailabilityForm", module)
+ .add("when loading data", () => (
+ <ProductAvailabilityForm onChange={() => {}} />
+ ))
+ .add("with loaded data", () => (
+ <ProductAvailabilityForm
+ onChange={() => {}}
+ available={true}
+ availableOn={"04-10-2010"}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductCategoryAndCollectionsForm.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductCategoryAndCollectionsForm.tsx
new file mode 100644
index 0000000000..620a59a359
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductCategoryAndCollectionsForm.tsx
@@ -0,0 +1,35 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductCategoryAndCollectionsForm from "../../../products/components/ProductCategoryAndCollectionsForm";
+
+const category = "876752";
+const collections = [
+ { value: "1", label: "Winter collection" },
+ { value: "2", label: "Emperor's choice" }
+];
+const categories = [
+ {
+ value: "123123",
+ label: "Lorem ipsum dolor"
+ },
+ {
+ value: "876752",
+ label: "Mauris vehicula tortor vulputate"
+ }
+];
+const productCollections = ["1"];
+
+storiesOf("Products / ProductCategoryAndCollectionsForm", module)
+ .add("while loading data", () => (
+ <ProductCategoryAndCollectionsForm onChange={() => {}} loading={true} />
+ ))
+ .add("when data is loaded", () => (
+ <ProductCategoryAndCollectionsForm
+ onChange={() => {}}
+ collections={collections}
+ categories={categories}
+ category={category}
+ productCollections={productCollections}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductCollections.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductCollections.tsx
new file mode 100644
index 0000000000..bde40c4595
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductCollections.tsx
@@ -0,0 +1,14 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductCollections from "../../../products/components/ProductCollections";
+import { collections } from "../../../products/fixtures";
+
+storiesOf("Products / ProductCollections", module)
+ .add("when loading data", () => <ProductCollections onRowClick={() => {}} />)
+ .add("with no collections", () => (
+ <ProductCollections collections={[]} onRowClick={() => {}} />
+ ))
+ .add("with collections", () => (
+ <ProductCollections collections={collections} onRowClick={() => {}} />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductDescription.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductDescription.tsx
new file mode 100644
index 0000000000..1e4d06c689
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductDescription.tsx
@@ -0,0 +1,39 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductDescription from "../../../products/components/ProductDescription";
+import { product } from "../../../products/fixtures";
+
+storiesOf("Products / ProductDescription", module)
+ .add("with no description", () => (
+ <ProductDescription
+ id={product.id}
+ name={product.name}
+ url={product.url}
+ description={""}
+ onBack={() => {}}
+ onDelete={() => {}}
+ onEdit={() => {}}
+ onShow={() => {}}
+ />
+ ))
+ .add("with description", () => (
+ <ProductDescription
+ id={product.id}
+ name={product.name}
+ description={product.description}
+ url={product.url}
+ onBack={() => {}}
+ onDelete={() => {}}
+ onEdit={() => {}}
+ onShow={() => {}}
+ />
+ ))
+ .add("when loading data", () => (
+ <ProductDescription
+ onBack={() => {}}
+ onDelete={() => {}}
+ onEdit={() => {}}
+ onShow={() => {}}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductDetailsForm.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductDetailsForm.tsx
new file mode 100644
index 0000000000..683c9e750c
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductDetailsForm.tsx
@@ -0,0 +1,32 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductDetailsForm from "../../../products/components/ProductDetailsForm";
+
+const product = {
+ id: "1",
+ name: "Our totally awesome book",
+ description:
+ "Aenean sit amet malesuada nibh. Proin nisi lorem, facilisis at tortor vel, convallis ornare nibh. In nec ipsum porta, varius leo eu, condimentum quam. Donec gravida euismod ipsum, at consequat orci efficitur nec. Phasellus lectus arcu, auctor eget porttitor eget, venenatis a lacus. Suspendisse quis urna rhoncus, commodo justo at, tempor nisl.",
+ slug: "awesome-book",
+ currencySymbol: "USD",
+ price: "300"
+};
+
+storiesOf("Products / ProductDetailsForm", module)
+ .add("with no initial data", () => (
+ <ProductDetailsForm onBack={() => {}} onChange={() => {}} />
+ ))
+ .add("with initial data", () => (
+ <ProductDetailsForm
+ onBack={() => {}}
+ onChange={() => {}}
+ name={product.name}
+ description={product.description}
+ currencySymbol={product.currencySymbol}
+ price={product.price}
+ />
+ ))
+ .add("when loading data", () => (
+ <ProductDetailsForm onBack={() => {}} onChange={() => {}} loading={true} />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductDetailsPage.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductDetailsPage.tsx
new file mode 100644
index 0000000000..bd3103e440
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductDetailsPage.tsx
@@ -0,0 +1,44 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import * as placeholder from "../../../../images/placeholder255x255.png";
+import ProductDetailsPage from "../../../products/components/ProductDetailsPage";
+import { product } from "../../../products/fixtures";
+
+product.images.edges = product.images.edges.map(edge => ({
+ ...edge,
+ node: { ...edge.node, url: placeholder }
+}));
+
+storiesOf("Products / ProductDetailsPage", module)
+ .add("when loading data", () => (
+ <ProductDetailsPage
+ placeholderImage={placeholder}
+ onBack={() => {}}
+ onCollectionShow={() => {}}
+ onDelete={() => {}}
+ onEdit={() => {}}
+ onImageReorder={() => {}}
+ onProductPublish={() => {}}
+ onProductShow={() => {}}
+ onVariantShow={() => {}}
+ onImageUpload={() => {}}
+ onImageEdit={() => () => {}}
+ />
+ ))
+ .add("when loaded data", () => (
+ <ProductDetailsPage
+ product={product}
+ placeholderImage={placeholder}
+ onBack={() => {}}
+ onCollectionShow={() => {}}
+ onDelete={() => {}}
+ onEdit={() => {}}
+ onImageReorder={() => {}}
+ onProductPublish={() => {}}
+ onProductShow={() => {}}
+ onVariantShow={() => {}}
+ onImageUpload={() => {}}
+ onImageEdit={() => () => {}}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductImagePage.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductImagePage.tsx
new file mode 100644
index 0000000000..808ac6ac8a
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductImagePage.tsx
@@ -0,0 +1,17 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import * as placeholder from "../../../../images/placeholder255x255.png";
+import ProductImagePage from "../../../products/components/ProductImagePage";
+
+storiesOf("Products / ProductImagePage", module)
+ .add("loading", () => (
+ <ProductImagePage loading={true} onSubmit={() => {}} onBack={() => {}} />
+ ))
+ .add("data loaded", () => (
+ <ProductImagePage
+ onSubmit={() => {}}
+ onBack={() => {}}
+ image={placeholder}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductImages.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductImages.tsx
new file mode 100644
index 0000000000..42c9d09f0b
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductImages.tsx
@@ -0,0 +1,31 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import * as placeholder from "../../../../images/placeholder255x255.png";
+import ProductImages from "../../../products/components/ProductImages";
+import { images as imagesFixture } from "../../../products/fixtures";
+
+const images = imagesFixture.map(image => ({ ...image, url: placeholder }));
+
+storiesOf("Products / ProductImages", module)
+ .add("without data", () => (
+ <ProductImages
+ images={[]}
+ onImageReorder={() => {}}
+ onImageUpload={() => {}}
+ />
+ ))
+ .add("with data", () => (
+ <ProductImages
+ images={images}
+ onImageReorder={() => {}}
+ onImageUpload={() => {}}
+ />
+ ))
+ .add("when loading data", () => (
+ <ProductImages
+ placeholderImage={placeholder}
+ onImageReorder={() => {}}
+ onImageUpload={() => {}}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductListCard.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductListCard.tsx
new file mode 100644
index 0000000000..c90d68bb6c
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductListCard.tsx
@@ -0,0 +1,101 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import * as placeholder from "../../../../images/placeholder255x255.png";
+import ProductListCard from "../../../products/components/ProductListCard";
+
+const images = [
+ {
+ id: "2",
+ alt: "Image 2",
+ url: placeholder as string,
+ order: 2
+ },
+ {
+ id: "1",
+ alt: "Image 1",
+ url: placeholder as string,
+ order: 1
+ }
+];
+
+const products = [
+ {
+ id: "UHJvZHVjdDox",
+ name: "Gardner, Graham and King",
+ thumbnailUrl: placeholder,
+ productType: {
+ id: "1",
+ name: "T-Shirt"
+ }
+ },
+ {
+ id: "UHJvZHVjdDoy",
+ name: "Gardner, Graham and King",
+ thumbnailUrl: placeholder,
+ productType: {
+ id: "1",
+ name: "T-Shirt"
+ }
+ },
+ {
+ id: "UHJvZHVjdDoz",
+ name: "Gardner, Graham and King",
+ thumbnailUrl: placeholder,
+ productType: {
+ id: "1",
+ name: "T-Shirt"
+ }
+ },
+ {
+ id: "UHJvZHVjdDoa",
+ name: "Gardner, Graham and King",
+ thumbnailUrl: placeholder,
+ productType: {
+ id: "1",
+ name: "T-Shirt"
+ }
+ }
+];
+
+storiesOf("Products / ProductListCard", module)
+ .add("without initial data", () => (
+ <ProductListCard
+ hasNextPage={true}
+ hasPreviousPage={false}
+ products={[]}
+ onFilter={() => {}}
+ onNextPage={() => {}}
+ onPreviousPage={() => {}}
+ />
+ ))
+ .add("with initial data", () => (
+ <ProductListCard
+ hasNextPage={true}
+ hasPreviousPage={false}
+ products={products}
+ onFilter={() => {}}
+ onNextPage={() => {}}
+ onPreviousPage={() => {}}
+ />
+ ))
+ .add("with clickable rows", () => (
+ <ProductListCard
+ hasNextPage={true}
+ hasPreviousPage={false}
+ products={products}
+ onFilter={() => {}}
+ onNextPage={() => {}}
+ onPreviousPage={() => {}}
+ onRowClick={() => {}}
+ />
+ ))
+ .add("when loading data", () => (
+ <ProductListCard
+ hasNextPage={true}
+ hasPreviousPage={false}
+ onFilter={() => {}}
+ onNextPage={() => {}}
+ onPreviousPage={() => {}}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductPriceAndAvailability.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductPriceAndAvailability.tsx
new file mode 100644
index 0000000000..73baecd401
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductPriceAndAvailability.tsx
@@ -0,0 +1,32 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductPriceAndAvailability from "../../../products/components/ProductPriceAndAvailability";
+import {
+ grossMargin,
+ purchaseCost,
+ salePrice
+} from "../../../products/fixtures";
+
+storiesOf("Products / ProductPriceAndAvailability", module)
+ .add("when loading data", () => (
+ <ProductPriceAndAvailability onPublish={() => {}} />
+ ))
+ .add("when product is available", () => (
+ <ProductPriceAndAvailability
+ onPublish={() => {}}
+ grossMargin={grossMargin}
+ salePrice={salePrice}
+ purchaseCost={purchaseCost}
+ isAvailable={true}
+ />
+ ))
+ .add("when product is not available", () => (
+ <ProductPriceAndAvailability
+ onPublish={() => {}}
+ grossMargin={grossMargin}
+ salePrice={salePrice}
+ purchaseCost={purchaseCost}
+ isAvailable={false}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductUpdatePage.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductUpdatePage.tsx
new file mode 100644
index 0000000000..98e9539236
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductUpdatePage.tsx
@@ -0,0 +1,147 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductUpdatePage from "../../../products/components/ProductUpdatePage";
+
+const product = {
+ id: "1231u",
+ description:
+ "Aenean sit amet malesuada nibh. Proin nisi lorem, facilisis at tortor vel, convallis ornare nibh. In nec ipsum porta, varius leo eu, condimentum quam. Donec gravida euismod ipsum, at consequat orci efficitur nec. Phasellus lectus arcu, auctor eget porttitor eget, venenatis a lacus. Suspendisse quis urna rhoncus, commodo justo at, tempor nisl.",
+ name: "Our awesome book",
+ price: {
+ currencySymbol: "$",
+ net: 3000.1
+ },
+ available: true,
+ availableOn: "23-01-2006",
+ seo: {
+ title: "Buy our awesome book now!",
+ description: "Order our awesome book right now!"
+ },
+ category: {
+ id: "123123"
+ },
+ slug: "our-awesome-book-1231u",
+ attributes: [
+ {
+ name: "brand",
+ value: "superbrand"
+ },
+ {
+ name: "collar",
+ value: "round"
+ },
+ {
+ name: "color",
+ value: "blue"
+ }
+ ],
+ collections: { edges: [{ node: { id: "1", name: "Winter collection" } }] },
+ productType: {
+ name: "Book",
+ productAttributes: {
+ edges: [
+ {
+ node: {
+ id: "UHJvZHVjdEF0dHJpYnV0ZToz",
+ slug: "brand",
+ name: "Brand",
+ values: [
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjQw",
+ name: "dominikibrand",
+ slug: "dominikibrand"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM5",
+ name: "superbrand",
+ slug: "superbrand"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM4",
+ name: "Mirumee",
+ slug: "mirumee"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjY=",
+ name: "Saleor",
+ slug: "saleor"
+ }
+ ]
+ }
+ },
+ {
+ node: {
+ id: "UHJvZHVjdEF0dHJpYnV0ZToy",
+ slug: "collar",
+ name: "Collar",
+ values: [
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjU=",
+ name: "Polo",
+ slug: "polo"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjQ=",
+ name: "V-Neck",
+ slug: "v-neck"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjM=",
+ name: "Round",
+ slug: "round"
+ }
+ ]
+ }
+ },
+ {
+ node: {
+ id: "UHJvZHVjdEF0dHJpYnV0ZTox",
+ slug: "color",
+ name: "Color",
+ values: [
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjI=",
+ name: "White",
+ slug: "white"
+ },
+ {
+ id: "UHJvZHVjdEF0dHJpYnV0ZVZhbHVlOjE=",
+ name: "Blue",
+ slug: "blue"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+};
+const collections = [
+ { id: "1", name: "Winter collection" },
+ { id: "2", name: "Emperor's choice" }
+];
+const categories = [
+ {
+ id: "123123",
+ name: "Lorem ipsum dolor"
+ },
+ {
+ id: "876752",
+ name: "Mauris vehicula tortor vulputate"
+ }
+];
+
+storiesOf("Products / ProductUpdatePage", module)
+ .add("when loading data", () => (
+ <ProductUpdatePage onBack={() => {}} onSubmit={() => {}} loading={true} />
+ ))
+ .add("when data is fully loaded", () => (
+ <ProductUpdatePage
+ onBack={() => {}}
+ onSubmit={() => {}}
+ product={product}
+ collections={collections}
+ categories={categories}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariantAttributes.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantAttributes.tsx
new file mode 100644
index 0000000000..b65abcd4b3
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantAttributes.tsx
@@ -0,0 +1,18 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductVariantAttributes from "../../../products/components/ProductVariantAttributes";
+import { variant as variantFixture } from "../../../products/fixtures";
+
+const variant = variantFixture("");
+
+storiesOf("Products / ProductVariantAttributes", module)
+ .add("when loading data", () => (
+ <ProductVariantAttributes onChange={() => {}} loading={true} />
+ ))
+ .add("when loaded data", () => (
+ <ProductVariantAttributes
+ attributes={variant.attributes}
+ onChange={() => {}}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariantDeleteDialog.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantDeleteDialog.tsx
new file mode 100644
index 0000000000..5427e809b0
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantDeleteDialog.tsx
@@ -0,0 +1,10 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductVariantDeleteDialog from "../../../products/components/ProductVariantDeleteDialog";
+import { variant } from "../../../products/fixtures";
+
+storiesOf("Products / ProductVariantDeleteDialog", module).add(
+ "default",
+ () => <ProductVariantDeleteDialog open={true} name={variant("").name} />
+);
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariantImageSelectDialog.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantImageSelectDialog.tsx
new file mode 100644
index 0000000000..0c08bbab68
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantImageSelectDialog.tsx
@@ -0,0 +1,23 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import * as placeholderImage from "../../../../images/placeholder255x255.png";
+import ProductVariantImageSelectDialog from "../../../products/components/ProductVariantImageSelectDialog";
+import {
+ variantImages as variantImagesFixture,
+ variantProductImages as variantProductImagesFixture
+} from "../../../products/fixtures";
+
+const variantImages = variantImagesFixture(placeholderImage);
+const variantProductImages = variantProductImagesFixture(placeholderImage);
+
+storiesOf("Products / ProductVariantImageSelectDialog", module).add(
+ "default",
+ () => (
+ <ProductVariantImageSelectDialog
+ images={variantProductImages}
+ selectedImages={variantImages}
+ open={true}
+ />
+ )
+);
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariantImages.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantImages.tsx
new file mode 100644
index 0000000000..5c28beeb22
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantImages.tsx
@@ -0,0 +1,24 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import * as placeholderImage from "../../../../images/placeholder255x255.png";
+import ProductVariantImages from "../../../products/components/ProductVariantImages";
+import { variantProductImages as imagesFixture } from "../../../products/fixtures";
+
+const images = imagesFixture(placeholderImage);
+
+storiesOf("Products / ProductVariantImages", module)
+ .add("when loading data", () => (
+ <ProductVariantImages
+ onImageAdd={() => {}}
+ loading={true}
+ placeholderImage={placeholderImage}
+ />
+ ))
+ .add("when loaded data", () => (
+ <ProductVariantImages
+ images={images}
+ onImageAdd={() => {}}
+ placeholderImage={placeholderImage}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariantNavigation.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantNavigation.tsx
new file mode 100644
index 0000000000..d01ff68193
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantNavigation.tsx
@@ -0,0 +1,17 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductVariantNavigation from "../../../products/components/ProductVariantNavigation";
+import { variantSiblings as variantSiblingsFixture } from "../../../products/fixtures";
+
+storiesOf("Products / ProductVariantNavigation", module)
+ .add("when loading data", () => <ProductVariantNavigation loading={true} />)
+ .add("when loaded data", () => (
+ <ProductVariantNavigation variants={variantSiblingsFixture("")} />
+ ))
+ .add("with clickable rows", () => (
+ <ProductVariantNavigation
+ variants={variantSiblingsFixture("")}
+ onRowClick={() => {}}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariantPage.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantPage.tsx
new file mode 100644
index 0000000000..1fb706a3be
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantPage.tsx
@@ -0,0 +1,27 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import * as placeholderImage from "../../../../images/placeholder60x60.png";
+import ProductVariantPage from "../../../products/components/ProductVariantPage";
+import { variant as variantFixture } from "../../../products/fixtures";
+
+const variant = variantFixture(placeholderImage);
+
+storiesOf("Products / ProductVariantPage", module)
+ .add("when loading data", () => (
+ <ProductVariantPage
+ loading={true}
+ onBack={() => () => {}}
+ placeholderImage={placeholderImage}
+ onDelete={() => {}}
+ onImageSelect={() => {}}
+ />
+ ))
+ .add("when loaded data", () => (
+ <ProductVariantPage
+ variant={variant}
+ onBack={() => () => {}}
+ onDelete={() => {}}
+ onImageSelect={() => {}}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariantPrice.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantPrice.tsx
new file mode 100644
index 0000000000..14b21609bb
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantPrice.tsx
@@ -0,0 +1,20 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductVariantPrice from "../../../products/components/ProductVariantPrice";
+import { variant as variantFixture } from "../../../products/fixtures";
+
+const variant = variantFixture("");
+
+storiesOf("Products / ProductVariantPrice", module)
+ .add("when loading data", () => (
+ <ProductVariantPrice onChange={() => {}} loading={true} />
+ ))
+ .add("when loaded data", () => (
+ <ProductVariantPrice
+ costPrice={variant.priceOverride.amount}
+ onChange={() => {}}
+ priceOverride={variant.priceOverride.amount}
+ currencySymbol={variant.priceOverride.currency}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariantProduct.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantProduct.tsx
new file mode 100644
index 0000000000..900793fe49
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantProduct.tsx
@@ -0,0 +1,14 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import * as placeholderImage from "../../../../images/placeholder60x60.png";
+import ProductVariantProduct from "../../../products/components/ProductVariantProduct";
+import { variant as variantFixture } from "../../../products/fixtures";
+
+const product = variantFixture(placeholderImage).product;
+
+storiesOf("Products / ProductVariantProduct", module)
+ .add("when loading data", () => (
+ <ProductVariantProduct loading={true} placeholderImage={placeholderImage} />
+ ))
+ .add("when loaded data", () => <ProductVariantProduct product={product} />);
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariantStock.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantStock.tsx
new file mode 100644
index 0000000000..729c21f8ae
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariantStock.tsx
@@ -0,0 +1,20 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductVariantStock from "../../../products/components/ProductVariantStock";
+import { variant as variantFixture } from "../../../products/fixtures";
+
+const variant = variantFixture("");
+
+storiesOf("Products / ProductVariantStock", module)
+ .add("when loading data", () => (
+ <ProductVariantStock loading={true} onChange={() => {}} />
+ ))
+ .add("when loaded data", () => (
+ <ProductVariantStock
+ onChange={() => {}}
+ sku={variant.sku}
+ stock={variant.stock}
+ stockAllocated={variant.stockAllocated}
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductVariants.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductVariants.tsx
new file mode 100644
index 0000000000..8ebc8aa110
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductVariants.tsx
@@ -0,0 +1,24 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import ProductVariants from "../../../products/components/ProductVariants";
+import { variants } from "../../../products/fixtures";
+
+storiesOf("Products / ProductVariants", module)
+ .add("when loading data", () => <ProductVariants />)
+ .add("when product has no variants", () => <ProductVariants variants={[]} />)
+ .add("when product has variants", () => (
+ <ProductVariants
+ variants={variants}
+ fallbackGross="80%"
+ fallbackPrice="90.00 USD"
+ />
+ ))
+ .add("with clickable rows", () => (
+ <ProductVariants
+ variants={variants}
+ onRowClick={() => {}}
+ fallbackGross="80%"
+ fallbackPrice="90.00 USD"
+ />
+ ));
diff --git a/saleor/static/dashboard-next/storybook/webpack.config.js b/saleor/static/dashboard-next/storybook/webpack.config.js
index 411a771f89..82d2ee18f8 100644
--- a/saleor/static/dashboard-next/storybook/webpack.config.js
+++ b/saleor/static/dashboard-next/storybook/webpack.config.js
@@ -31,6 +31,13 @@ var config = {
{
test: /\.tsx?$/,
loader: "ts-loader"
+ },
+ {
+ test: /\.(svg|png)$/,
+ loader: "file-loader",
+ options: {
+ name: "[name].[ext]"
+ }
}
]
},
diff --git a/tsconfig.json b/tsconfig.json
index 83c2a16a9a..16da43c451 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,10 +1,8 @@
{
- "compilerOptions": {
- "jsx": "react",
- "lib": ["es5", "es2015.promise", "dom"],
- "target": "es5"
- },
- "include": [
- "saleor/static/dashboard-next/index.tsx"
- ]
+ "compilerOptions": {
+ "jsx": "react",
+ "lib": ["es5", "es2015.promise", "dom"],
+ "target": "es5"
+ },
+ "include": ["saleor/static/dashboard-next/index.tsx", "webpack.d.ts"]
}
diff --git a/webpack.d.ts b/webpack.d.ts
new file mode 100644
index 0000000000..49977505d3
--- /dev/null
+++ b/webpack.d.ts
@@ -0,0 +1 @@
+declare module "*.png";