Add circleci config and enhance our linters (#519)
* Add circleci config * Season linting config * Apply code style
This commit is contained in:
parent
5a6612f0f4
commit
a82de30309
763 changed files with 3156 additions and 5871 deletions
79
.circleci/config.yml
Normal file
79
.circleci/config.yml
Normal file
|
@ -0,0 +1,79 @@
|
|||
version: 2
|
||||
jobs:
|
||||
build-lint-benchmark:
|
||||
docker:
|
||||
- image: circleci/node:10.7.0-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- cache-{{ .Branch }}-{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: Install system dependencies
|
||||
command: sudo apt-get install -y libpng-dev
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: npm install
|
||||
- save_cache:
|
||||
key: cache-{{ .Branch }}-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ~/.npm
|
||||
- ~/.cache
|
||||
- run:
|
||||
name: Build application
|
||||
command: npm run build
|
||||
- run:
|
||||
name: Package lock security test
|
||||
command: npx lockfile-lint --path package-lock.json --allowed-hosts npm
|
||||
- run:
|
||||
name: Run linters
|
||||
command: npm run lint
|
||||
- run:
|
||||
name: Install Lighthouse tools
|
||||
command: sudo npm install -g @lhci/cli
|
||||
- run:
|
||||
name: Lighthouse audit
|
||||
command: npx lhci autorun --upload.target=temporary-public-storage
|
||||
|
||||
cypress:
|
||||
docker:
|
||||
- image: cypress/base:10
|
||||
environment:
|
||||
TERM: xterm
|
||||
parallelism: 1
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- cache-{{ .Branch }}-{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: Npm CI
|
||||
command: npm ci
|
||||
- run:
|
||||
command: npx cypress verify
|
||||
- save_cache:
|
||||
key: cache-{{ .Branch }}-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ~/.npm
|
||||
- ~/.cache
|
||||
- persist_to_workspace:
|
||||
root: ~/
|
||||
paths:
|
||||
- project
|
||||
- .cache/Cypress
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
name: Running E2E tests
|
||||
command: npm run test:e2e:run
|
||||
- store_artifacts:
|
||||
path: cypress/videos
|
||||
- store_artifacts:
|
||||
path: cypress/screenshots
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
qa:
|
||||
jobs:
|
||||
- build-lint-benchmark:
|
||||
context: Lighthouse
|
|
@ -7,7 +7,12 @@
|
|||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": ["@typescript-eslint", "import", "local-rules"],
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"import",
|
||||
"local-rules",
|
||||
"simple-import-sort"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/adjacent-overload-signatures": "error",
|
||||
"@typescript-eslint/array-type": [
|
||||
|
@ -69,9 +74,9 @@
|
|||
"eqeqeq": ["error", "smart"],
|
||||
"guard-for-in": "error",
|
||||
"id-blacklist": "off",
|
||||
"import/no-extraneous-dependencies": "off",
|
||||
"import/no-internal-modules": "off",
|
||||
"import/order": "error",
|
||||
"import/no-extraneous-dependencies": "off", // imports are handled by simple-import-sort/sort
|
||||
"import/no-internal-modules": "off", // imports are handled by simple-import-sort/sort
|
||||
"import/order": "off", // imports are handled by simple-import-sort/sort
|
||||
"linebreak-style": "off",
|
||||
"local-rules/named-styles": "error",
|
||||
"max-classes-per-file": "off",
|
||||
|
@ -113,7 +118,6 @@
|
|||
],
|
||||
"no-debugger": "error",
|
||||
"no-duplicate-case": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-empty": "error",
|
||||
"no-eval": "error",
|
||||
"no-extra-bind": "error",
|
||||
|
@ -149,22 +153,13 @@
|
|||
"prefer-object-spread": "error",
|
||||
"quote-props": "off",
|
||||
"radix": "error",
|
||||
"simple-import-sort/sort": ["error"],
|
||||
"sort-imports": "off", // imports are handled by simple-import-sort/sort
|
||||
"sort-keys": "warn",
|
||||
"space-before-function-paren": "off",
|
||||
"spaced-comment": "error",
|
||||
"use-isnan": "error",
|
||||
"valid-typeof": "off"
|
||||
// "@typescript-eslint/tslint/config": [
|
||||
// "error",
|
||||
// {
|
||||
// "rules": {
|
||||
// "jsdoc-format": [true, "check-multiline-start"],
|
||||
// "no-reference-import": true,
|
||||
// "object-literal-sort-keys": true,
|
||||
// "prefer-conditional-expression": true
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
},
|
||||
"ignorePatterns": ["node_modules/", "**/types/**/*"]
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
9
lighthouserc.json
Normal file
9
lighthouserc.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ci": {
|
||||
"collect": {
|
||||
"url": ["http://localhost:3000/"],
|
||||
"numberOfRuns": 5,
|
||||
"staticDistDir": "./build/dashboard"
|
||||
}
|
||||
}
|
||||
}
|
183
package-lock.json
generated
183
package-lock.json
generated
|
@ -3368,6 +3368,12 @@
|
|||
"integrity": "sha512-MNl+rT5UmZeilaPxAVs6YaPC2m6aA8rofviZbhbxpPpl61uKodfdQVsBtgJGTqGizEf02oW3tsVe7FYB8kK14A==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/color-name": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
|
||||
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/draft-js": {
|
||||
"version": "0.10.37",
|
||||
"resolved": "https://registry.npmjs.org/@types/draft-js/-/draft-js-0.10.37.tgz",
|
||||
|
@ -4043,9 +4049,9 @@
|
|||
}
|
||||
},
|
||||
"acorn-jsx": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz",
|
||||
"integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==",
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz",
|
||||
"integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==",
|
||||
"dev": true
|
||||
},
|
||||
"acorn-walk": {
|
||||
|
@ -9798,9 +9804,9 @@
|
|||
}
|
||||
},
|
||||
"eslint": {
|
||||
"version": "6.7.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.1.tgz",
|
||||
"integrity": "sha512-UWzBS79pNcsDSxgxbdjkmzn/B6BhsXMfUaOHnNwyE8nD+Q6pyT96ow2MccVayUTV4yMid4qLhMiQaywctRkBLA==",
|
||||
"version": "6.8.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
|
||||
"integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
|
@ -9843,12 +9849,20 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"ansi-escapes": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz",
|
||||
"integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
|
||||
"integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"type-fest": "^0.8.1"
|
||||
"type-fest": "^0.11.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"type-fest": {
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
|
||||
"integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"ansi-regex": {
|
||||
|
@ -9857,6 +9871,16 @@
|
|||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/color-name": "^1.1.1",
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"cli-cursor": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
||||
|
@ -9866,6 +9890,21 @@
|
|||
"restore-cursor": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
|
@ -9883,32 +9922,38 @@
|
|||
}
|
||||
},
|
||||
"figures": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz",
|
||||
"integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==",
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
|
||||
"integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
|
||||
"integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
||||
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-glob": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"version": "12.3.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz",
|
||||
"integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==",
|
||||
"version": "12.4.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
|
||||
"integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"type-fest": "^0.8.1"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true
|
||||
},
|
||||
"ignore": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
|
||||
|
@ -9926,24 +9971,45 @@
|
|||
}
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz",
|
||||
"integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==",
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz",
|
||||
"integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-escapes": "^4.2.1",
|
||||
"chalk": "^2.4.2",
|
||||
"chalk": "^3.0.0",
|
||||
"cli-cursor": "^3.1.0",
|
||||
"cli-width": "^2.0.0",
|
||||
"external-editor": "^3.0.3",
|
||||
"figures": "^3.0.0",
|
||||
"lodash": "^4.17.15",
|
||||
"mute-stream": "0.0.8",
|
||||
"run-async": "^2.2.0",
|
||||
"rxjs": "^6.4.0",
|
||||
"run-async": "^2.4.0",
|
||||
"rxjs": "^6.5.3",
|
||||
"string-width": "^4.1.0",
|
||||
"strip-ansi": "^5.1.0",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"through": "^2.3.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
|
||||
"integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^5.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
|
@ -9989,6 +10055,12 @@
|
|||
"signal-exit": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"run-async": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
|
||||
"integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
|
||||
"dev": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
|
@ -10017,6 +10089,15 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
|
||||
"integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"type-fest": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
|
||||
|
@ -10332,6 +10413,12 @@
|
|||
"integrity": "sha512-CT7a5pT6SG9hvhCjyHKFA1+lClB4WA+gvBt04E7/buUTELgatneCrublqTzi++tZuCefUhJXrTm3W1wpK14sqg==",
|
||||
"dev": true
|
||||
},
|
||||
"eslint-plugin-simple-import-sort": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-5.0.3.tgz",
|
||||
"integrity": "sha512-1rf3AWiHeWNCQdAq0iXNnlccnH1UDnelGgrPbjBBHE8d2hXVtOudcmy0vTF4hri3iJ0MKz8jBhmH6lJ0ZWZLHQ==",
|
||||
"dev": true
|
||||
},
|
||||
"eslint-scope": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
|
||||
|
@ -10367,20 +10454,20 @@
|
|||
}
|
||||
},
|
||||
"espree": {
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz",
|
||||
"integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==",
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
|
||||
"integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"acorn": "^7.1.0",
|
||||
"acorn-jsx": "^5.1.0",
|
||||
"acorn": "^7.1.1",
|
||||
"acorn-jsx": "^5.2.0",
|
||||
"eslint-visitor-keys": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
|
||||
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
|
||||
"integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
@ -10391,12 +10478,20 @@
|
|||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||
},
|
||||
"esquery": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz",
|
||||
"integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz",
|
||||
"integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"estraverse": "^4.0.0"
|
||||
"estraverse": "^5.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"estraverse": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz",
|
||||
"integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"esrecurse": {
|
||||
|
@ -11196,9 +11291,9 @@
|
|||
}
|
||||
},
|
||||
"flatted": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz",
|
||||
"integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
|
||||
"integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
|
||||
"dev": true
|
||||
},
|
||||
"flush-write-stream": {
|
||||
|
@ -19953,9 +20048,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"strip-json-comments": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
|
||||
"integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
|
||||
"integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==",
|
||||
"dev": true
|
||||
},
|
||||
"stubs": {
|
||||
|
|
26
package.json
26
package.json
|
@ -117,11 +117,12 @@
|
|||
"enzyme": "^3.10.0",
|
||||
"enzyme-adapter-react-16": "^1.14.0",
|
||||
"enzyme-to-json": "^3.3.5",
|
||||
"eslint": "^6.7.1",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-loader": "^3.0.2",
|
||||
"eslint-plugin-import": "^2.19.1",
|
||||
"eslint-plugin-local-rules": "^0.1.1",
|
||||
"eslint-plugin-prefer-arrow": "^1.1.6",
|
||||
"eslint-plugin-simple-import-sort": "^5.0.3",
|
||||
"file-loader": "^5.0.2",
|
||||
"fork-ts-checker-webpack-plugin": "^3.1.1",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
|
@ -178,22 +179,29 @@
|
|||
"eslint --fix",
|
||||
"prettier --write",
|
||||
"git add"
|
||||
],
|
||||
"*.{js,jsx}": [
|
||||
"eslint --fix",
|
||||
"prettier --write",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"build": "webpack -p",
|
||||
"extract-json-messages": "rimraf build/locale && cross-env NODE_ENV=extract babel src 'src/**/*.{ts,tsx}' -o build/dashboard.bundle.js",
|
||||
"transpile-messages": "node scripts/transpile-tx.js",
|
||||
"extract-messages": "npm run extract-json-messages && npm run transpile-messages",
|
||||
"build-storybook": "build-storybook -c src/storybook/ -o build/storybook",
|
||||
"build-types": "apollo client:codegen --target=typescript types --globalTypesFile=src/types/globalTypes.ts",
|
||||
"check-types": "tsc --noEmit",
|
||||
"build": "webpack -p",
|
||||
"check-strict-null-errors": "tsc --noEmit --strictNullChecks | node scripts/count-strict-null-check-errors.js",
|
||||
"check-types": "tsc --noEmit",
|
||||
"extract-json-messages": "rimraf build/locale && cross-env NODE_ENV=extract babel src 'src/**/*.{ts,tsx}' -o build/dashboard.bundle.js",
|
||||
"extract-messages": "npm run extract-json-messages && npm run transpile-messages",
|
||||
"generate-component": "plop --plopfile .plop/plopfile.js",
|
||||
"heroku-postbuild": "npm run build",
|
||||
"serve:lhci": "NODE_ENV=production npm run server",
|
||||
"start": "webpack-dev-server --open -d",
|
||||
"storybook": "start-storybook -p 3000 -c src/storybook/",
|
||||
"build-storybook": "build-storybook -c src/storybook/ -o build/storybook",
|
||||
"test": "jest src/",
|
||||
"test-e2e": "testcafe 'chrome:headless' .testcafe",
|
||||
"heroku-postbuild": "npm run build"
|
||||
"test": "jest src/",
|
||||
"transpile-messages": "node scripts/transpile-tx.js",
|
||||
"lint": "npx eslint \"src/**/*.@(tsx|ts|jsx|js)\" --fix ; npx prettier --check \"src/**/*.@(tsx|ts|jsx|js)\" --write"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import DialogContentText from "@material-ui/core/DialogContentText";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ActionDialog from "@saleor/components/ActionDialog";
|
||||
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
export interface AttributeBulkDeleteDialogProps {
|
||||
confirmButtonState: ConfirmButtonTransitionState;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import DialogContentText from "@material-ui/core/DialogContentText";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ActionDialog from "@saleor/components/ActionDialog";
|
||||
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
export interface AttributeDeleteDialogProps {
|
||||
confirmButtonState: ConfirmButtonTransitionState;
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
import Card from "@material-ui/core/Card";
|
||||
import CardContent from "@material-ui/core/CardContent";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import slugify from "slugify";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import ControlledCheckbox from "@saleor/components/ControlledCheckbox";
|
||||
import FormSpacer from "@saleor/components/FormSpacer";
|
||||
import SingleSelectField from "@saleor/components/SingleSelectField";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { AttributeInputTypeEnum } from "@saleor/types/globalTypes";
|
||||
import { getProductErrorMessage, getFormErrors } from "@saleor/utils/errors";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import { AttributePageFormData } from "../AttributePage";
|
||||
import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import slugify from "slugify";
|
||||
|
||||
import { getAttributeSlugErrorMessage } from "../../errors";
|
||||
import { AttributePageFormData } from "../AttributePage";
|
||||
|
||||
export interface AttributeDetailsProps {
|
||||
canChangeType: boolean;
|
||||
|
|
|
@ -3,20 +3,20 @@ import TableBody from "@material-ui/core/TableBody";
|
|||
import TableCell from "@material-ui/core/TableCell";
|
||||
import TableFooter from "@material-ui/core/TableFooter";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { AttributeListUrlSortField } from "@saleor/attributes/urls";
|
||||
import Checkbox from "@saleor/components/Checkbox";
|
||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import TableCellHeader from "@saleor/components/TableCellHeader";
|
||||
import TableHead from "@saleor/components/TableHead";
|
||||
import TablePagination from "@saleor/components/TablePagination";
|
||||
import { translateBoolean } from "@saleor/intl";
|
||||
import { maybe, renderCollection } from "@saleor/misc";
|
||||
import { ListActions, ListProps, SortPage } from "@saleor/types";
|
||||
import TableCellHeader from "@saleor/components/TableCellHeader";
|
||||
import { AttributeListUrlSortField } from "@saleor/attributes/urls";
|
||||
import { getArrowDirection } from "@saleor/utils/sort";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { AttributeList_attributes_edges_node } from "../../types/AttributeList";
|
||||
|
||||
export interface AttributeListProps
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
import Button from "@material-ui/core/Button";
|
||||
import Card from "@material-ui/core/Card";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { AttributeListUrlSortField } from "@saleor/attributes/urls";
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import FilterBar from "@saleor/components/FilterBar";
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { AttributeListUrlSortField } from "@saleor/attributes/urls";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import Container from "../../../components/Container";
|
||||
import PageHeader from "../../../components/PageHeader";
|
||||
import {
|
||||
FilterPageProps,
|
||||
ListActions,
|
||||
PageListProps,
|
||||
FilterPageProps,
|
||||
TabPageProps,
|
||||
SortPage
|
||||
SortPage,
|
||||
TabPageProps
|
||||
} from "../../../types";
|
||||
import { AttributeList_attributes_edges_node } from "../../types/AttributeList";
|
||||
import AttributeList from "../AttributeList/AttributeList";
|
||||
import {
|
||||
createFilterStructure,
|
||||
AttributeFilterKeys,
|
||||
AttributeListFilterOpts,
|
||||
AttributeFilterKeys
|
||||
createFilterStructure
|
||||
} from "./filters";
|
||||
|
||||
export interface AttributeListPageProps
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import { defineMessages, IntlShape } from "react-intl";
|
||||
|
||||
import { FilterOpts } from "@saleor/types";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { IFilter } from "@saleor/components/Filter";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { FilterOpts } from "@saleor/types";
|
||||
import { createBooleanField } from "@saleor/utils/filters/fields";
|
||||
import { defineMessages, IntlShape } from "react-intl";
|
||||
|
||||
export enum AttributeFilterKeys {
|
||||
availableInGrid = "availableInGrid",
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import slugify from "slugify";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import CardSpacer from "@saleor/components/CardSpacer";
|
||||
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||
|
@ -14,7 +11,10 @@ import { sectionNames } from "@saleor/intl";
|
|||
import { maybe } from "@saleor/misc";
|
||||
import { ReorderAction } from "@saleor/types";
|
||||
import { AttributeInputTypeEnum } from "@saleor/types/globalTypes";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import slugify from "slugify";
|
||||
|
||||
import {
|
||||
AttributeDetailsFragment,
|
||||
AttributeDetailsFragment_values
|
||||
|
|
|
@ -2,9 +2,7 @@ import Card from "@material-ui/core/Card";
|
|||
import CardContent from "@material-ui/core/CardContent";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import CardSpacer from "@saleor/components/CardSpacer";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import ControlledCheckbox from "@saleor/components/ControlledCheckbox";
|
||||
|
@ -12,7 +10,9 @@ import FormSpacer from "@saleor/components/FormSpacer";
|
|||
import Hr from "@saleor/components/Hr";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { AttributePageFormData } from "../AttributePage";
|
||||
|
||||
export interface AttributePropertiesProps {
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import DialogContentText from "@material-ui/core/DialogContentText";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ActionDialog from "@saleor/components/ActionDialog";
|
||||
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
export interface AttributeValueDeleteDialogProps {
|
||||
attributeName: string;
|
||||
|
|
|
@ -4,9 +4,8 @@ import DialogActions from "@material-ui/core/DialogActions";
|
|||
import DialogContent from "@material-ui/core/DialogContent";
|
||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { getAttributeValueErrorMessage } from "@saleor/attributes/errors";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import ConfirmButton, {
|
||||
ConfirmButtonTransitionState
|
||||
} from "@saleor/components/ConfirmButton";
|
||||
|
@ -15,8 +14,9 @@ import useModalDialogErrors from "@saleor/hooks/useModalDialogErrors";
|
|||
import { buttonMessages } from "@saleor/intl";
|
||||
import { maybe } from "@saleor/misc";
|
||||
import { getFormErrors } from "@saleor/utils/errors";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import { getAttributeValueErrorMessage } from "@saleor/attributes/errors";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { AttributeDetails_attribute_values } from "../../types/AttributeDetails";
|
||||
|
||||
export interface AttributeValueEditDialogFormData {
|
||||
|
|
|
@ -6,9 +6,6 @@ import TableCell from "@material-ui/core/TableCell";
|
|||
import TableHead from "@material-ui/core/TableHead";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import DeleteIcon from "@material-ui/icons/Delete";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
|
@ -18,6 +15,9 @@ import {
|
|||
} from "@saleor/components/SortableTable";
|
||||
import { maybe, renderCollection, stopPropagation } from "@saleor/misc";
|
||||
import { ReorderAction } from "@saleor/types";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { AttributeDetailsFragment_values } from "../../types/AttributeDetailsFragment";
|
||||
|
||||
export interface AttributeValuesProps {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { IntlShape, defineMessages } from "react-intl";
|
||||
|
||||
import { ProductErrorCode } from "@saleor/types/globalTypes";
|
||||
import { getProductErrorMessage } from "@saleor/utils/errors";
|
||||
import { defineMessages, IntlShape } from "react-intl";
|
||||
|
||||
import { ProductErrorFragment } from "./types/ProductErrorFragment";
|
||||
|
||||
const messages = defineMessages({
|
||||
|
|
|
@ -3,6 +3,7 @@ import {
|
|||
AttributeInputTypeEnum,
|
||||
AttributeValueType
|
||||
} from "@saleor/types/globalTypes";
|
||||
|
||||
import { AttributeDetailsFragment } from "./types/AttributeDetailsFragment";
|
||||
import { AttributeList_attributes_edges_node } from "./types/AttributeList";
|
||||
|
||||
|
@ -36,10 +37,8 @@ export const attribute: AttributeDetailsFragment = {
|
|||
visibleInStorefront: true
|
||||
};
|
||||
|
||||
export const attributes: Array<
|
||||
AttributeList_attributes_edges_node &
|
||||
ProductDetails_product_productType_variantAttributes
|
||||
> = [
|
||||
export const attributes: Array<AttributeList_attributes_edges_node &
|
||||
ProductDetails_product_productType_variantAttributes> = [
|
||||
{
|
||||
node: {
|
||||
__typename: "Attribute" as "Attribute",
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import { sectionNames } from "@saleor/intl";
|
||||
import { asSortParams } from "@saleor/utils/sort";
|
||||
import { parse as parseQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import { Route, RouteComponentProps, Switch } from "react-router-dom";
|
||||
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { useIntl } from "react-intl";
|
||||
import { asSortParams } from "@saleor/utils/sort";
|
||||
import { WindowTitle } from "../components/WindowTitle";
|
||||
import {
|
||||
attributeAddPath,
|
||||
AttributeAddUrlQueryParams,
|
||||
attributeListPath,
|
||||
AttributeListUrlQueryParams,
|
||||
AttributeListUrlSortField,
|
||||
attributePath,
|
||||
AttributeUrlQueryParams,
|
||||
AttributeListUrlSortField
|
||||
AttributeUrlQueryParams
|
||||
} from "./urls";
|
||||
import AttributeCreateComponent from "./views/AttributeCreate";
|
||||
import AttributeDetailsComponent from "./views/AttributeDetails";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { TypedMutation } from "@saleor/mutations";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
import { TypedMutation } from "@saleor/mutations";
|
||||
import { attributeDetailsFragment } from "./queries";
|
||||
import {
|
||||
AttributeBulkDelete,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import makeQuery from "@saleor/hooks/makeQuery";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
import makeQuery from "@saleor/hooks/makeQuery";
|
||||
import { pageInfoFragment, TypedQuery } from "../queries";
|
||||
import {
|
||||
AttributeDetails,
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import slugify from "slugify";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import { maybe } from "@saleor/misc";
|
||||
import { ReorderEvent } from "@saleor/types";
|
||||
import { ProductErrorCode } from "@saleor/types/globalTypes";
|
||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||
import {
|
||||
add,
|
||||
isSelected,
|
||||
|
@ -13,9 +12,10 @@ import {
|
|||
remove,
|
||||
updateAtIndex
|
||||
} from "@saleor/utils/lists";
|
||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import { ProductErrorCode } from "@saleor/types/globalTypes";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import slugify from "slugify";
|
||||
|
||||
import AttributePage from "../../components/AttributePage";
|
||||
import AttributeValueDeleteDialog from "../../components/AttributeValueDeleteDialog";
|
||||
import AttributeValueEditDialog, {
|
||||
|
@ -25,10 +25,10 @@ import { AttributeCreateMutation } from "../../mutations";
|
|||
import { AttributeCreate } from "../../types/AttributeCreate";
|
||||
import {
|
||||
attributeAddUrl,
|
||||
AttributeAddUrlDialog,
|
||||
AttributeAddUrlQueryParams,
|
||||
attributeListUrl,
|
||||
attributeUrl,
|
||||
AttributeAddUrlDialog
|
||||
attributeUrl
|
||||
} from "../../urls";
|
||||
|
||||
interface AttributeDetailsProps {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { maybe } from "@saleor/misc";
|
||||
import { ReorderEvent } from "@saleor/types";
|
||||
import { move } from "@saleor/utils/lists";
|
||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||
import { getProductErrorMessage } from "@saleor/utils/errors";
|
||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||
import { move } from "@saleor/utils/lists";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import AttributeDeleteDialog from "../../components/AttributeDeleteDialog";
|
||||
import AttributePage from "../../components/AttributePage";
|
||||
import AttributeValueDeleteDialog from "../../components/AttributeValueDeleteDialog";
|
||||
|
@ -31,8 +31,8 @@ import { AttributeValueUpdate } from "../../types/AttributeValueUpdate";
|
|||
import {
|
||||
attributeListUrl,
|
||||
attributeUrl,
|
||||
AttributeUrlQueryParams,
|
||||
AttributeUrlDialog
|
||||
AttributeUrlDialog,
|
||||
AttributeUrlQueryParams
|
||||
} from "../../urls";
|
||||
|
||||
interface AttributeDetailsProps {
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
import IconButton from "@material-ui/core/IconButton";
|
||||
import DeleteIcon from "@material-ui/icons/Delete";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import {
|
||||
areFiltersApplied,
|
||||
deleteFilterTab,
|
||||
getActiveFilters,
|
||||
getFilterOpts,
|
||||
getFilterTabs,
|
||||
getFilterVariables,
|
||||
saveFilterTab,
|
||||
getFilterOpts
|
||||
saveFilterTab
|
||||
} from "@saleor/attributes/views/AttributeList/filters";
|
||||
import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog";
|
||||
import SaveFilterTabDialog, {
|
||||
|
@ -22,11 +19,14 @@ import useNotifier from "@saleor/hooks/useNotifier";
|
|||
import usePaginator, {
|
||||
createPaginationState
|
||||
} from "@saleor/hooks/usePaginator";
|
||||
import { getSortParams } from "@saleor/utils/sort";
|
||||
import createSortHandler from "@saleor/utils/handlers/sortHandler";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||
import createFilterHandlers from "@saleor/utils/handlers/filterHandlers";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import createSortHandler from "@saleor/utils/handlers/sortHandler";
|
||||
import { getSortParams } from "@saleor/utils/sort";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { PAGINATE_BY } from "../../../config";
|
||||
import useBulkActions from "../../../hooks/useBulkActions";
|
||||
import { maybe } from "../../../misc";
|
||||
|
@ -38,12 +38,12 @@ import { AttributeBulkDelete } from "../../types/AttributeBulkDelete";
|
|||
import {
|
||||
attributeAddUrl,
|
||||
attributeListUrl,
|
||||
AttributeListUrlDialog,
|
||||
AttributeListUrlQueryParams,
|
||||
attributeUrl,
|
||||
AttributeListUrlDialog
|
||||
attributeUrl
|
||||
} from "../../urls";
|
||||
import { getSortQueryVariables } from "./sort";
|
||||
import { getFilterQueryParam } from "./filters";
|
||||
import { getSortQueryVariables } from "./sort";
|
||||
|
||||
interface AttributeListProps {
|
||||
params: AttributeListUrlQueryParams;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { createIntl } from "react-intl";
|
||||
import { stringify as stringifyQs } from "qs";
|
||||
|
||||
import { AttributeListUrlFilters } from "@saleor/attributes/urls";
|
||||
import { createFilterStructure } from "@saleor/attributes/components/AttributeListPage";
|
||||
import { AttributeListUrlFilters } from "@saleor/attributes/urls";
|
||||
import { getFilterQueryParams } from "@saleor/utils/filters";
|
||||
import { config } from "@test/intl";
|
||||
import { getExistingKeys, setFilterOptsStatus } from "@test/filters";
|
||||
import { getFilterVariables, getFilterQueryParam } from "./filters";
|
||||
import { config } from "@test/intl";
|
||||
import { stringify as stringifyQs } from "qs";
|
||||
import { createIntl } from "react-intl";
|
||||
|
||||
import { getFilterQueryParam, getFilterVariables } from "./filters";
|
||||
|
||||
describe("Filtering query params", () => {
|
||||
it("should be empty object if no params given", () => {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { AttributeFilterInput } from "@saleor/types/globalTypes";
|
||||
import { maybe, parseBoolean } from "@saleor/misc";
|
||||
import { IFilterElement } from "@saleor/components/Filter";
|
||||
import {
|
||||
AttributeListFilterOpts,
|
||||
AttributeFilterKeys
|
||||
AttributeFilterKeys,
|
||||
AttributeListFilterOpts
|
||||
} from "@saleor/attributes/components/AttributeListPage";
|
||||
import { IFilterElement } from "@saleor/components/Filter";
|
||||
import { maybe, parseBoolean } from "@saleor/misc";
|
||||
import { AttributeFilterInput } from "@saleor/types/globalTypes";
|
||||
|
||||
import {
|
||||
createFilterTabUtils,
|
||||
createFilterUtils,
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
import React from "react";
|
||||
|
||||
import { maybe } from "@saleor/misc";
|
||||
import {
|
||||
isSupported as isCredentialsManagementAPISupported,
|
||||
login as loginWithCredentialsManagementAPI,
|
||||
saveCredentials
|
||||
} from "@saleor/utils/credentialsManagement";
|
||||
import React from "react";
|
||||
import { MutationFunction, MutationResult } from "react-apollo";
|
||||
import { maybe } from "@saleor/misc";
|
||||
|
||||
import { UserContext } from "./";
|
||||
import {
|
||||
TokenRefreshMutation,
|
||||
TypedTokenAuthMutation,
|
||||
TypedVerifyTokenMutation,
|
||||
TokenRefreshMutation
|
||||
TypedVerifyTokenMutation
|
||||
} from "./mutations";
|
||||
import { RefreshToken, RefreshTokenVariables } from "./types/RefreshToken";
|
||||
import { TokenAuth, TokenAuthVariables } from "./types/TokenAuth";
|
||||
import { User } from "./types/User";
|
||||
import { VerifyToken, VerifyTokenVariables } from "./types/VerifyToken";
|
||||
import { getAuthToken, removeAuthToken, setAuthToken } from "./utils";
|
||||
import { RefreshToken, RefreshTokenVariables } from "./types/RefreshToken";
|
||||
import { UserContext } from "./";
|
||||
|
||||
interface AuthProviderOperationsProps {
|
||||
children: (props: {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import React from "react";
|
||||
import SVG from "react-inlinesvg";
|
||||
|
||||
import backgroundArt from "@assets/images/login-background.svg";
|
||||
import saleorDarkLogo from "@assets/images/logo-dark.svg";
|
||||
import saleorLightLogo from "@assets/images/logo-light.svg";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import useTheme from "@saleor/hooks/useTheme";
|
||||
import React from "react";
|
||||
import SVG from "react-inlinesvg";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
theme => ({
|
||||
|
|
|
@ -2,12 +2,11 @@ import Button from "@material-ui/core/Button";
|
|||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import Form from "@saleor/components/Form";
|
||||
import { FormSpacer } from "@saleor/components/FormSpacer";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
export interface FormData {
|
||||
email: string;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
|
||||
import CardDecorator from "@saleor/storybook//CardDecorator";
|
||||
import Decorator from "@saleor/storybook//Decorator";
|
||||
import { AccountErrorCode } from "@saleor/types/globalTypes";
|
||||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
|
||||
import NewPasswordPage from "./NewPasswordPage";
|
||||
|
||||
storiesOf("Views / Authentication / Set up a new password", module)
|
||||
|
|
|
@ -2,13 +2,12 @@ import Button from "@material-ui/core/Button";
|
|||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { SetPassword_setPassword_errors } from "@saleor/auth/types/SetPassword";
|
||||
import Form from "@saleor/components/Form";
|
||||
import FormSpacer from "@saleor/components/FormSpacer";
|
||||
import { SetPassword_setPassword_errors } from "@saleor/auth/types/SetPassword";
|
||||
import getAccountErrorMessage from "@saleor/utils/errors/account";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
theme => ({
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
|
||||
import CardDecorator from "@saleor/storybook/CardDecorator";
|
||||
import Decorator from "@saleor/storybook/Decorator";
|
||||
import { formError } from "@saleor/storybook/misc";
|
||||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
|
||||
import ResetPasswordPage, { ResetPasswordPageProps } from "./ResetPasswordPage";
|
||||
|
||||
const props: ResetPasswordPageProps = {
|
||||
|
|
|
@ -2,12 +2,11 @@ import Button from "@material-ui/core/Button";
|
|||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import Form from "@saleor/components/Form";
|
||||
import FormSpacer from "@saleor/components/FormSpacer";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
theme => ({
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import CardDecorator from "@saleor/storybook/CardDecorator";
|
||||
import Decorator from "@saleor/storybook/Decorator";
|
||||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
|
||||
import CardDecorator from "@saleor/storybook/CardDecorator";
|
||||
import Decorator from "@saleor/storybook/Decorator";
|
||||
import ResetPasswordSuccessPage from "./ResetPasswordSuccessPage";
|
||||
|
||||
storiesOf("Views / Authentication / Reset password success", module)
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import Button from "@material-ui/core/Button";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import FormSpacer from "@saleor/components/FormSpacer";
|
||||
import React from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import FormSpacer from "@saleor/components/FormSpacer";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
{
|
||||
submit: {
|
||||
|
@ -24,9 +23,7 @@ export interface ResetPasswordSuccessPageProps {
|
|||
onBack: () => void;
|
||||
}
|
||||
|
||||
const ResetPasswordSuccessPage: React.FC<
|
||||
ResetPasswordSuccessPageProps
|
||||
> = props => {
|
||||
const ResetPasswordSuccessPage: React.FC<ResetPasswordSuccessPageProps> = props => {
|
||||
const { onBack } = props;
|
||||
|
||||
const classes = useStyles(props);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import useUser from "@saleor/hooks/useUser";
|
||||
import React from "react";
|
||||
import { Route, RouteProps } from "react-router-dom";
|
||||
|
||||
import useUser from "@saleor/hooks/useUser";
|
||||
import NotFound from "../../NotFound";
|
||||
import { PermissionEnum } from "../../types/globalTypes";
|
||||
import { hasPermission } from "../misc";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { GraphQLError } from "graphql";
|
||||
import { findValueInEnum } from "@saleor/misc";
|
||||
import { GraphQLError } from "graphql";
|
||||
|
||||
export enum JWTError {
|
||||
invalid = "JSONWebTokenError",
|
||||
|
|
|
@ -2,6 +2,7 @@ import React from "react";
|
|||
import { Route, Switch } from "react-router-dom";
|
||||
|
||||
import Layout from "./components/Layout";
|
||||
import LoginLoading from "./components/LoginLoading";
|
||||
import { User } from "./types/User";
|
||||
import {
|
||||
newPasswordPath,
|
||||
|
@ -12,7 +13,6 @@ import LoginView from "./views/Login";
|
|||
import NewPassword from "./views/NewPassword";
|
||||
import ResetPassword from "./views/ResetPassword";
|
||||
import ResetPasswordSuccess from "./views/ResetPasswordSuccess";
|
||||
import LoginLoading from "./components/LoginLoading";
|
||||
|
||||
interface UserContext {
|
||||
login: (username: string, password: string) => void;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { accountErrorFragment } from "@saleor/customers/mutations";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
import { accountErrorFragment } from "@saleor/customers/mutations";
|
||||
import { TypedMutation } from "../mutations";
|
||||
import { RefreshToken, RefreshTokenVariables } from "./types/RefreshToken";
|
||||
import {
|
||||
RequestPasswordReset,
|
||||
RequestPasswordResetVariables
|
||||
|
@ -9,7 +10,6 @@ import {
|
|||
import { SetPassword, SetPasswordVariables } from "./types/SetPassword";
|
||||
import { TokenAuth, TokenAuthVariables } from "./types/TokenAuth";
|
||||
import { VerifyToken, VerifyTokenVariables } from "./types/VerifyToken";
|
||||
import { RefreshToken, RefreshTokenVariables } from "./types/RefreshToken";
|
||||
|
||||
export const fragmentUser = gql`
|
||||
fragment User on User {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useUser from "@saleor/hooks/useUser";
|
||||
import React from "react";
|
||||
|
||||
import LoginPage, { FormData } from "../components/LoginPage";
|
||||
import { passwordResetUrl } from "../urls";
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useUser from "@saleor/hooks/useUser";
|
||||
import { parse as parseQs } from "qs";
|
||||
import React from "react";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useUser from "@saleor/hooks/useUser";
|
||||
import NewPasswordPage, {
|
||||
NewPasswordPageFormData
|
||||
} from "../components/NewPasswordPage";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { APP_MOUNT_URI } from "@saleor/config";
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import urlJoin from "url-join";
|
||||
|
||||
import { APP_MOUNT_URI } from "@saleor/config";
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import ResetPasswordPage, {
|
||||
ResetPasswordPageFormData
|
||||
} from "../components/ResetPasswordPage";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import React from "react";
|
||||
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import ResetPasswordSuccessPage from "../components/ResetPasswordSuccessPage";
|
||||
|
||||
const ResetPasswordSuccessView: React.FC = () => {
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import makeStyles from "@material-ui/core/styles/makeStyles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import React from "react";
|
||||
|
||||
import Button from "@material-ui/core/Button";
|
||||
import Card from "@material-ui/core/Card";
|
||||
import CardContent from "@material-ui/core/CardContent";
|
||||
import makeStyles from "@material-ui/core/styles/makeStyles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import Hr from "@saleor/components/Hr";
|
||||
import ImageTile from "@saleor/components/ImageTile";
|
||||
import ImageUpload from "@saleor/components/ImageUpload";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { CategoryDetails_category_backgroundImage } from "../../types/CategoryDetails";
|
||||
import { FormData } from "../CategoryUpdatePage";
|
||||
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import { ContentState, convertToRaw, RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import { CardSpacer } from "@saleor/components/CardSpacer";
|
||||
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||
|
@ -11,7 +8,10 @@ import PageHeader from "@saleor/components/PageHeader";
|
|||
import SaveButtonBar from "@saleor/components/SaveButtonBar";
|
||||
import SeoForm from "@saleor/components/SeoForm";
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import { ContentState, convertToRaw, RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import CategoryDetailsForm from "../../components/CategoryDetailsForm";
|
||||
|
||||
interface FormData {
|
||||
|
|
|
@ -5,11 +5,10 @@ import DialogContent from "@material-ui/core/DialogContent";
|
|||
import DialogContentText from "@material-ui/core/DialogContentText";
|
||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import React from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
theme => ({
|
||||
deleteButton: {
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import Card from "@material-ui/core/Card";
|
||||
import CardContent from "@material-ui/core/CardContent";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import { RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import FormSpacer from "@saleor/components/FormSpacer";
|
||||
import RichTextEditor from "@saleor/components/RichTextEditor";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import { RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { maybe } from "../../../misc";
|
||||
import { CategoryDetails_category } from "../../types/CategoryDetails";
|
||||
|
||||
|
|
|
@ -3,20 +3,19 @@ import TableBody from "@material-ui/core/TableBody";
|
|||
import TableCell from "@material-ui/core/TableCell";
|
||||
import TableFooter from "@material-ui/core/TableFooter";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import React from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import { CategoryFragment } from "@saleor/categories/types/CategoryFragment";
|
||||
import { CategoryListUrlSortField } from "@saleor/categories/urls";
|
||||
import Checkbox from "@saleor/components/Checkbox";
|
||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import TableCellHeader from "@saleor/components/TableCellHeader";
|
||||
import TableHead from "@saleor/components/TableHead";
|
||||
import TablePagination from "@saleor/components/TablePagination";
|
||||
import { maybe, renderCollection } from "@saleor/misc";
|
||||
import { ListActions, ListProps, SortPage } from "@saleor/types";
|
||||
import { CategoryListUrlSortField } from "@saleor/categories/urls";
|
||||
import TableCellHeader from "@saleor/components/TableCellHeader";
|
||||
import { getArrowDirection } from "@saleor/utils/sort";
|
||||
import React from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
theme => ({
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import Button from "@material-ui/core/Button";
|
||||
import Card from "@material-ui/core/Card";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { CategoryFragment } from "@saleor/categories/types/CategoryFragment";
|
||||
import { CategoryListUrlSortField } from "@saleor/categories/urls";
|
||||
import Container from "@saleor/components/Container";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import SearchBar from "@saleor/components/SearchBar";
|
||||
|
@ -12,10 +10,12 @@ import {
|
|||
ListActions,
|
||||
PageListProps,
|
||||
SearchPageProps,
|
||||
TabPageProps,
|
||||
SortPage
|
||||
SortPage,
|
||||
TabPageProps
|
||||
} from "@saleor/types";
|
||||
import { CategoryListUrlSortField } from "@saleor/categories/urls";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import CategoryList from "../CategoryList";
|
||||
|
||||
export interface CategoryTableProps
|
||||
|
|
|
@ -8,8 +8,6 @@ import Money from "@saleor/components/Money";
|
|||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import StatusLabel from "@saleor/components/StatusLabel";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import TableCellAvatar, {
|
||||
AVATAR_MARGIN
|
||||
} from "@saleor/components/TableCellAvatar";
|
||||
|
@ -18,6 +16,8 @@ import TablePagination from "@saleor/components/TablePagination";
|
|||
import { maybe, renderCollection } from "@saleor/misc";
|
||||
import { ListActions, ListProps } from "@saleor/types";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { CategoryDetails_category_products_edges_node } from "../../types/CategoryDetails";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
|
@ -74,9 +74,7 @@ interface CategoryProductListProps extends ListProps, ListActions {
|
|||
products: CategoryDetails_category_products_edges_node[];
|
||||
}
|
||||
|
||||
export const CategoryProductList: React.FC<
|
||||
CategoryProductListProps
|
||||
> = props => {
|
||||
export const CategoryProductList: React.FC<CategoryProductListProps> = props => {
|
||||
const {
|
||||
disabled,
|
||||
isChecked,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import Button from "@material-ui/core/Button";
|
||||
import Card from "@material-ui/core/Card";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import { ListActions, PageListProps } from "../../../types";
|
||||
import { CategoryDetails_category_products_edges_node } from "../../types/CategoryDetails";
|
||||
import CategoryProductList from "../CategoryProductList";
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import Button from "@material-ui/core/Button";
|
||||
import Card from "@material-ui/core/Card";
|
||||
import { RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import { CardSpacer } from "@saleor/components/CardSpacer";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
|
@ -15,7 +12,10 @@ import SaveButtonBar from "@saleor/components/SaveButtonBar";
|
|||
import SeoForm from "@saleor/components/SeoForm";
|
||||
import { Tab, TabContainer } from "@saleor/components/Tab";
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import { RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { maybe } from "../../../misc";
|
||||
import { TabListActions } from "../../../types";
|
||||
import CategoryDetailsForm from "../../components/CategoryDetailsForm";
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import { sectionNames } from "@saleor/intl";
|
||||
import { asSortParams } from "@saleor/utils/sort";
|
||||
import { parse as parseQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import { Route, RouteComponentProps, Switch } from "react-router-dom";
|
||||
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { asSortParams } from "@saleor/utils/sort";
|
||||
import { WindowTitle } from "../components/WindowTitle";
|
||||
import {
|
||||
categoryAddPath,
|
||||
categoryListPath,
|
||||
CategoryListUrlQueryParams,
|
||||
CategoryListUrlSortField,
|
||||
categoryPath,
|
||||
CategoryUrlQueryParams,
|
||||
CategoryListUrlSortField
|
||||
CategoryUrlQueryParams
|
||||
} from "./urls";
|
||||
import { CategoryCreateView } from "./views/CategoryCreate";
|
||||
import CategoryDetailsView, { getActiveTab } from "./views/CategoryDetails";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { productErrorFragment } from "@saleor/attributes/mutations";
|
||||
import makeMutation from "@saleor/hooks/makeMutation";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
import makeMutation from "@saleor/hooks/makeMutation";
|
||||
import { productErrorFragment } from "@saleor/attributes/mutations";
|
||||
import { categoryDetailsFragment } from "./queries";
|
||||
import {
|
||||
CategoryBulkDelete,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import makeQuery from "@saleor/hooks/makeQuery";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
import makeQuery from "@saleor/hooks/makeQuery";
|
||||
import { pageInfoFragment } from "../queries";
|
||||
import {
|
||||
CategoryDetails,
|
||||
|
|
|
@ -7,8 +7,8 @@ import {
|
|||
Dialog,
|
||||
Filters,
|
||||
Pagination,
|
||||
TabActionDialog,
|
||||
Sort
|
||||
Sort,
|
||||
TabActionDialog
|
||||
} from "../types";
|
||||
import { CategoryPageTab } from "./components/CategoryUpdatePage";
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { WindowTitle } from "@saleor/components/WindowTitle";
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { maybe } from "../../misc";
|
||||
import CategoryCreatePage from "../components/CategoryCreatePage";
|
||||
import { useCategoryCreateMutation } from "../mutations";
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import DialogContentText from "@material-ui/core/DialogContentText";
|
||||
import IconButton from "@material-ui/core/IconButton";
|
||||
import DeleteIcon from "@material-ui/icons/Delete";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ActionDialog from "@saleor/components/ActionDialog";
|
||||
import NotFoundPage from "@saleor/components/NotFoundPage";
|
||||
import { WindowTitle } from "@saleor/components/WindowTitle";
|
||||
import useBulkActions from "@saleor/hooks/useBulkActions";
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
|
@ -14,7 +12,9 @@ import usePaginator, {
|
|||
} from "@saleor/hooks/usePaginator";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||
import NotFoundPage from "@saleor/components/NotFoundPage";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { PAGINATE_BY } from "../../config";
|
||||
import { maybe } from "../../misc";
|
||||
import { TypedProductBulkDeleteMutation } from "../../products/mutations";
|
||||
|
@ -38,8 +38,8 @@ import {
|
|||
categoryAddUrl,
|
||||
categoryListUrl,
|
||||
categoryUrl,
|
||||
CategoryUrlQueryParams,
|
||||
CategoryUrlDialog
|
||||
CategoryUrlDialog,
|
||||
CategoryUrlQueryParams
|
||||
} from "../urls";
|
||||
|
||||
export interface CategoryDetailsProps {
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import DialogContentText from "@material-ui/core/DialogContentText";
|
||||
import IconButton from "@material-ui/core/IconButton";
|
||||
import DeleteIcon from "@material-ui/icons/Delete";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ActionDialog from "@saleor/components/ActionDialog";
|
||||
import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog";
|
||||
import SaveFilterTabDialog, {
|
||||
|
@ -17,9 +14,12 @@ import usePaginator, {
|
|||
} from "@saleor/hooks/usePaginator";
|
||||
import { maybe } from "@saleor/misc";
|
||||
import { ListViews } from "@saleor/types";
|
||||
import { getSortParams } from "@saleor/utils/sort";
|
||||
import createSortHandler from "@saleor/utils/handlers/sortHandler";
|
||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||
import createSortHandler from "@saleor/utils/handlers/sortHandler";
|
||||
import { getSortParams } from "@saleor/utils/sort";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { CategoryListPage } from "../../components/CategoryListPage/CategoryListPage";
|
||||
import { useCategoryBulkDeleteMutation } from "../../mutations";
|
||||
import { useRootCategoriesQuery } from "../../queries";
|
||||
|
@ -27,10 +27,10 @@ import { CategoryBulkDelete } from "../../types/CategoryBulkDelete";
|
|||
import {
|
||||
categoryAddUrl,
|
||||
categoryListUrl,
|
||||
CategoryListUrlDialog,
|
||||
CategoryListUrlFilters,
|
||||
CategoryListUrlQueryParams,
|
||||
categoryUrl,
|
||||
CategoryListUrlDialog
|
||||
categoryUrl
|
||||
} from "../../urls";
|
||||
import {
|
||||
areFiltersApplied,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { CategoryFilterInput } from "@saleor/types/globalTypes";
|
||||
|
||||
import {
|
||||
createFilterTabUtils,
|
||||
createFilterUtils
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import Card from "@material-ui/core/Card";
|
||||
import CardContent from "@material-ui/core/CardContent";
|
||||
import { ContentState, convertToRaw, RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import { CardSpacer } from "@saleor/components/CardSpacer";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
|
@ -17,7 +14,10 @@ import SeoForm from "@saleor/components/SeoForm";
|
|||
import VisibilityCard from "@saleor/components/VisibilityCard";
|
||||
import useDateLocalize from "@saleor/hooks/useDateLocalize";
|
||||
import { commonMessages, sectionNames } from "@saleor/intl";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import { ContentState, convertToRaw, RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import CollectionDetails from "../CollectionDetails/CollectionDetails";
|
||||
import { CollectionImage } from "../CollectionImage/CollectionImage";
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import Card from "@material-ui/core/Card";
|
||||
import CardContent from "@material-ui/core/CardContent";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import { RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import FormSpacer from "@saleor/components/FormSpacer";
|
||||
import RichTextEditor from "@saleor/components/RichTextEditor";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { maybe } from "@saleor/misc";
|
||||
import { getProductErrorMessage, getFormErrors } from "@saleor/utils/errors";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import { getFormErrors, getProductErrorMessage } from "@saleor/utils/errors";
|
||||
import { RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { CollectionDetails_collection } from "../../types/CollectionDetails";
|
||||
|
||||
export interface CollectionDetailsProps {
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import { RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import AppHeader from "@saleor/components/AppHeader";
|
||||
import { CardSpacer } from "@saleor/components/CardSpacer";
|
||||
import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||
|
@ -17,7 +14,10 @@ import SeoForm from "@saleor/components/SeoForm";
|
|||
import VisibilityCard from "@saleor/components/VisibilityCard";
|
||||
import useDateLocalize from "@saleor/hooks/useDateLocalize";
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { ProductErrorFragment } from "@saleor/attributes/types/ProductErrorFragment";
|
||||
import { RawDraftContentState } from "draft-js";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { maybe } from "../../../misc";
|
||||
import { ListActions, PageListProps } from "../../../types";
|
||||
import { CollectionDetails_collection } from "../../types/CollectionDetails";
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import Button from "@material-ui/core/Button";
|
||||
import Card from "@material-ui/core/Card";
|
||||
import CardContent from "@material-ui/core/CardContent";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import Hr from "@saleor/components/Hr";
|
||||
import ImageTile from "@saleor/components/ImageTile";
|
||||
import ImageUpload from "@saleor/components/ImageUpload";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { CollectionDetails_collection_backgroundImage } from "../../types/CollectionDetails";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
|
|
|
@ -3,20 +3,20 @@ import TableBody from "@material-ui/core/TableBody";
|
|||
import TableCell from "@material-ui/core/TableCell";
|
||||
import TableFooter from "@material-ui/core/TableFooter";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { CollectionListUrlSortField } from "@saleor/collections/urls";
|
||||
import Checkbox from "@saleor/components/Checkbox";
|
||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import StatusLabel from "@saleor/components/StatusLabel";
|
||||
import TableCellHeader from "@saleor/components/TableCellHeader";
|
||||
import TableHead from "@saleor/components/TableHead";
|
||||
import TablePagination from "@saleor/components/TablePagination";
|
||||
import { maybe, renderCollection } from "@saleor/misc";
|
||||
import { ListActions, ListProps, SortPage } from "@saleor/types";
|
||||
import { CollectionListUrlSortField } from "@saleor/collections/urls";
|
||||
import TableCellHeader from "@saleor/components/TableCellHeader";
|
||||
import { getArrowDirection } from "@saleor/utils/sort";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { CollectionList_collections_edges_node } from "../../types/CollectionList";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
import Button from "@material-ui/core/Button";
|
||||
import Card from "@material-ui/core/Card";
|
||||
import { CollectionListUrlSortField } from "@saleor/collections/urls";
|
||||
import { Container } from "@saleor/components/Container";
|
||||
import FilterBar from "@saleor/components/FilterBar";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import {
|
||||
FilterPageProps,
|
||||
ListActions,
|
||||
PageListProps,
|
||||
SortPage,
|
||||
TabPageProps
|
||||
} from "@saleor/types";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { Container } from "@saleor/components/Container";
|
||||
import PageHeader from "@saleor/components/PageHeader";
|
||||
import FilterBar from "@saleor/components/FilterBar";
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import {
|
||||
ListActions,
|
||||
PageListProps,
|
||||
FilterPageProps,
|
||||
TabPageProps,
|
||||
SortPage
|
||||
} from "@saleor/types";
|
||||
import { CollectionListUrlSortField } from "@saleor/collections/urls";
|
||||
import { CollectionList_collections_edges_node } from "../../types/CollectionList";
|
||||
import CollectionList from "../CollectionList/CollectionList";
|
||||
import {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import { defineMessages, IntlShape } from "react-intl";
|
||||
|
||||
import { IFilter } from "@saleor/components/Filter";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { FilterOpts } from "@saleor/types";
|
||||
import { CollectionPublished } from "@saleor/types/globalTypes";
|
||||
import { IFilter } from "@saleor/components/Filter";
|
||||
import { createOptionsField } from "@saleor/utils/filters/fields";
|
||||
import { defineMessages, IntlShape } from "react-intl";
|
||||
|
||||
export interface CollectionListFilterOpts {
|
||||
status: FilterOpts<CollectionPublished>;
|
||||
|
|
|
@ -7,9 +7,6 @@ import TableCell from "@material-ui/core/TableCell";
|
|||
import TableFooter from "@material-ui/core/TableFooter";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import DeleteIcon from "@material-ui/icons/Delete";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import Checkbox from "@saleor/components/Checkbox";
|
||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
|
@ -20,6 +17,9 @@ import TableCellAvatar, {
|
|||
} from "@saleor/components/TableCellAvatar";
|
||||
import TableHead from "@saleor/components/TableHead";
|
||||
import TablePagination from "@saleor/components/TablePagination";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { maybe, renderCollection } from "../../../misc";
|
||||
import { ListActions, PageListProps } from "../../../types";
|
||||
import { CollectionDetails_collection } from "../../types/CollectionDetails";
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import { sectionNames } from "@saleor/intl";
|
||||
import { asSortParams } from "@saleor/utils/sort";
|
||||
import { parse as parseQs } from "qs";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import { Route, RouteComponentProps, Switch } from "react-router-dom";
|
||||
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { asSortParams } from "@saleor/utils/sort";
|
||||
import { WindowTitle } from "../components/WindowTitle";
|
||||
import {
|
||||
collectionAddPath,
|
||||
collectionListPath,
|
||||
CollectionListUrlQueryParams,
|
||||
CollectionListUrlSortField,
|
||||
collectionPath,
|
||||
CollectionUrlQueryParams,
|
||||
CollectionListUrlSortField
|
||||
CollectionUrlQueryParams
|
||||
} from "./urls";
|
||||
import CollectionCreate from "./views/CollectionCreate";
|
||||
import CollectionDetailsView from "./views/CollectionDetails";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { productErrorFragment } from "@saleor/attributes/mutations";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
import { productErrorFragment } from "@saleor/attributes/mutations";
|
||||
import { TypedMutation } from "../mutations";
|
||||
import {
|
||||
collectionDetailsFragment,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import makeQuery from "@saleor/hooks/makeQuery";
|
||||
import gql from "graphql-tag";
|
||||
|
||||
import makeQuery from "@saleor/hooks/makeQuery";
|
||||
import { TypedQuery } from "../queries";
|
||||
import {
|
||||
CollectionDetails,
|
||||
|
|
|
@ -7,8 +7,8 @@ import {
|
|||
Dialog,
|
||||
Filters,
|
||||
Pagination,
|
||||
TabActionDialog,
|
||||
Sort
|
||||
Sort,
|
||||
TabActionDialog
|
||||
} from "../types";
|
||||
|
||||
const collectionSectionUrl = "/collections/";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { WindowTitle } from "@saleor/components/WindowTitle";
|
||||
import useNavigator from "@saleor/hooks/useNavigator";
|
||||
import useNotifier from "@saleor/hooks/useNotifier";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import { CollectionCreateInput } from "../../types/globalTypes";
|
||||
import CollectionCreatePage from "../components/CollectionCreatePage/CollectionCreatePage";
|
||||
import { TypedCollectionCreateMutation } from "../mutations";
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import Button from "@material-ui/core/Button";
|
||||
import DialogContentText from "@material-ui/core/DialogContentText";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ActionDialog from "@saleor/components/ActionDialog";
|
||||
import AssignProductDialog from "@saleor/components/AssignProductDialog";
|
||||
import NotFoundPage from "@saleor/components/NotFoundPage";
|
||||
import { WindowTitle } from "@saleor/components/WindowTitle";
|
||||
import { DEFAULT_INITIAL_SEARCH_DATA, PAGINATE_BY } from "@saleor/config";
|
||||
import useBulkActions from "@saleor/hooks/useBulkActions";
|
||||
|
@ -16,7 +14,9 @@ import usePaginator, {
|
|||
import { commonMessages } from "@saleor/intl";
|
||||
import useProductSearch from "@saleor/searches/useProductSearch";
|
||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||
import NotFoundPage from "@saleor/components/NotFoundPage";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { getMutationState, maybe } from "../../misc";
|
||||
import { productUrl } from "../../products/urls";
|
||||
import { CollectionInput } from "../../types/globalTypes";
|
||||
|
@ -27,15 +27,15 @@ import CollectionOperations from "../containers/CollectionOperations";
|
|||
import { TypedCollectionDetailsQuery } from "../queries";
|
||||
import { CollectionAssignProduct } from "../types/CollectionAssignProduct";
|
||||
import { CollectionUpdate } from "../types/CollectionUpdate";
|
||||
import { CollectionUpdateWithHomepage } from "../types/CollectionUpdateWithHomepage";
|
||||
import { RemoveCollection } from "../types/RemoveCollection";
|
||||
import { UnassignCollectionProduct } from "../types/UnassignCollectionProduct";
|
||||
import {
|
||||
collectionListUrl,
|
||||
collectionUrl,
|
||||
CollectionUrlQueryParams,
|
||||
CollectionUrlDialog
|
||||
CollectionUrlDialog,
|
||||
CollectionUrlQueryParams
|
||||
} from "../urls";
|
||||
import { CollectionUpdateWithHomepage } from "../types/CollectionUpdateWithHomepage";
|
||||
|
||||
interface CollectionDetailsProps {
|
||||
id: string;
|
||||
|
|
|
@ -2,9 +2,6 @@ import Button from "@material-ui/core/Button";
|
|||
import DialogContentText from "@material-ui/core/DialogContentText";
|
||||
import IconButton from "@material-ui/core/IconButton";
|
||||
import DeleteIcon from "@material-ui/icons/Delete";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ActionDialog from "@saleor/components/ActionDialog";
|
||||
import DeleteFilterTabDialog from "@saleor/components/DeleteFilterTabDialog";
|
||||
import SaveFilterTabDialog, {
|
||||
|
@ -17,14 +14,17 @@ import useNotifier from "@saleor/hooks/useNotifier";
|
|||
import usePaginator, {
|
||||
createPaginationState
|
||||
} from "@saleor/hooks/usePaginator";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { maybe } from "@saleor/misc";
|
||||
import { ListViews } from "@saleor/types";
|
||||
import { getSortParams } from "@saleor/utils/sort";
|
||||
import createSortHandler from "@saleor/utils/handlers/sortHandler";
|
||||
import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers";
|
||||
import useShop from "@saleor/hooks/useShop";
|
||||
import createFilterHandlers from "@saleor/utils/handlers/filterHandlers";
|
||||
import createSortHandler from "@saleor/utils/handlers/sortHandler";
|
||||
import { getSortParams } from "@saleor/utils/sort";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import CollectionListPage from "../../components/CollectionListPage/CollectionListPage";
|
||||
import {
|
||||
TypedCollectionBulkDelete,
|
||||
|
@ -36,19 +36,19 @@ import { CollectionBulkPublish } from "../../types/CollectionBulkPublish";
|
|||
import {
|
||||
collectionAddUrl,
|
||||
collectionListUrl,
|
||||
CollectionListUrlDialog,
|
||||
CollectionListUrlQueryParams,
|
||||
collectionUrl,
|
||||
CollectionListUrlDialog
|
||||
collectionUrl
|
||||
} from "../../urls";
|
||||
import {
|
||||
areFiltersApplied,
|
||||
deleteFilterTab,
|
||||
getActiveFilters,
|
||||
getFilterOpts,
|
||||
getFilterQueryParam,
|
||||
getFilterTabs,
|
||||
getFilterVariables,
|
||||
saveFilterTab,
|
||||
getFilterQueryParam,
|
||||
getFilterOpts
|
||||
saveFilterTab
|
||||
} from "./filters";
|
||||
import { getSortQueryVariables } from "./sort";
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { createIntl } from "react-intl";
|
||||
import { stringify as stringifyQs } from "qs";
|
||||
|
||||
import { CollectionListUrlFilters } from "@saleor/collections/urls";
|
||||
import { createFilterStructure } from "@saleor/collections/components/CollectionListPage";
|
||||
import { getFilterQueryParams } from "@saleor/utils/filters";
|
||||
import { CollectionListUrlFilters } from "@saleor/collections/urls";
|
||||
import { CollectionPublished } from "@saleor/types/globalTypes";
|
||||
import { config } from "@test/intl";
|
||||
import { getFilterQueryParams } from "@saleor/utils/filters";
|
||||
import { getExistingKeys, setFilterOptsStatus } from "@test/filters";
|
||||
import { getFilterVariables, getFilterQueryParam } from "./filters";
|
||||
import { config } from "@test/intl";
|
||||
import { stringify as stringifyQs } from "qs";
|
||||
import { createIntl } from "react-intl";
|
||||
|
||||
import { getFilterQueryParam, getFilterVariables } from "./filters";
|
||||
|
||||
describe("Filtering query params", () => {
|
||||
it("should be empty object if no params given", () => {
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
import {
|
||||
CollectionFilterKeys,
|
||||
CollectionListFilterOpts
|
||||
} from "@saleor/collections/components/CollectionListPage";
|
||||
import { IFilterElement } from "@saleor/components/Filter";
|
||||
import { findValueInEnum, maybe } from "@saleor/misc";
|
||||
import {
|
||||
CollectionFilterInput,
|
||||
CollectionPublished
|
||||
} from "@saleor/types/globalTypes";
|
||||
import { IFilterElement } from "@saleor/components/Filter";
|
||||
import { maybe, findValueInEnum } from "@saleor/misc";
|
||||
import {
|
||||
CollectionListFilterOpts,
|
||||
CollectionFilterKeys
|
||||
} from "@saleor/collections/components/CollectionListPage";
|
||||
import {
|
||||
CollectionListUrlFilters,
|
||||
CollectionListUrlFiltersEnum,
|
||||
CollectionListUrlQueryParams
|
||||
} from "../../urls";
|
||||
|
||||
import {
|
||||
createFilterTabUtils,
|
||||
createFilterUtils,
|
||||
getSingleEnumValueQueryParam
|
||||
} from "../../../utils/filters";
|
||||
import {
|
||||
CollectionListUrlFilters,
|
||||
CollectionListUrlFiltersEnum,
|
||||
CollectionListUrlQueryParams
|
||||
} from "../../urls";
|
||||
|
||||
export const COLLECTION_FILTERS_KEY = "collectionFilters";
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups";
|
||||
import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment";
|
||||
import Decorator from "@saleor/storybook/Decorator";
|
||||
import { AccountErrorCode } from "@saleor/types/globalTypes";
|
||||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
import Decorator from "@saleor/storybook/Decorator";
|
||||
import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups";
|
||||
import { AccountErrorCode } from "@saleor/types/globalTypes";
|
||||
import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment";
|
||||
|
||||
import { MultiAutocompleteChoiceType } from "../MultiAutocompleteSelectField";
|
||||
import AccountPermissionGroups, { AccountPermissionGroupsProps } from ".";
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import { FormChange } from "@saleor/hooks/useForm";
|
||||
import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups";
|
||||
import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment";
|
||||
import { FetchMoreProps, SearchPageProps } from "@saleor/types";
|
||||
import { getFormErrors } from "@saleor/utils/errors";
|
||||
import { StaffErrorFragment } from "@saleor/staff/types/StaffErrorFragment";
|
||||
import getStaffErrorMessage from "@saleor/utils/errors/staff";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import MultiAutocompleteSelectField, {
|
||||
MultiAutocompleteChoiceType
|
||||
} from "../MultiAutocompleteSelectField";
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
import {
|
||||
Checkbox,
|
||||
List,
|
||||
ListItem,
|
||||
ListItemIcon,
|
||||
ListItemText
|
||||
} from "@material-ui/core";
|
||||
import Card from "@material-ui/core/Card";
|
||||
import CardContent from "@material-ui/core/CardContent";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import {
|
||||
List,
|
||||
ListItem,
|
||||
ListItemText,
|
||||
ListItemIcon,
|
||||
Checkbox
|
||||
} from "@material-ui/core";
|
||||
import useUser from "@saleor/hooks/useUser";
|
||||
import { PermissionData } from "@saleor/permissionGroups/components/PermissionGroupDetailsPage/PermissionGroupDetailsPage";
|
||||
import React from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
const useStyles = makeStyles(
|
||||
theme => ({
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import Card from "@material-ui/core/Card";
|
||||
import CardContent from "@material-ui/core/CardContent";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
interface StaffStatusProps {
|
||||
data: {
|
||||
|
|
|
@ -4,12 +4,12 @@ import DialogActions from "@material-ui/core/DialogActions";
|
|||
import DialogContent from "@material-ui/core/DialogContent";
|
||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import { DialogProps } from "@saleor/types";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import { DialogProps } from "@saleor/types";
|
||||
import ConfirmButton, {
|
||||
ConfirmButtonTransitionState
|
||||
} from "../ConfirmButton/ConfirmButton";
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import React from "react";
|
||||
import { useIntl, IntlShape } from "react-intl";
|
||||
|
||||
import { AddressTypeInput } from "@saleor/customers/types";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { getFormErrors } from "@saleor/utils/errors";
|
||||
import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment";
|
||||
import getAccountErrorMessage from "@saleor/utils/errors/account";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
import { OrderErrorFragment } from "@saleor/orders/types/OrderErrorFragment";
|
||||
import { getFormErrors } from "@saleor/utils/errors";
|
||||
import getAccountErrorMessage from "@saleor/utils/errors/account";
|
||||
import getOrderErrorMessage from "@saleor/utils/errors/order";
|
||||
import React from "react";
|
||||
import { IntlShape, useIntl } from "react-intl";
|
||||
|
||||
import FormSpacer from "../FormSpacer";
|
||||
import SingleAutocompleteSelectField, {
|
||||
SingleAutocompleteChoiceType
|
||||
|
|
|
@ -3,6 +3,7 @@ import { makeStyles } from "@material-ui/core/styles";
|
|||
import Typography from "@material-ui/core/Typography";
|
||||
import ArrowBackIcon from "@material-ui/icons/ArrowBack";
|
||||
import React from "react";
|
||||
|
||||
import AppHeaderContext from "../AppLayout/AppHeaderContext";
|
||||
import Skeleton from "../Skeleton";
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import saleorDarkLogoSmall from "@assets/images/logo-dark-small.svg";
|
||||
import saleorDarkLogo from "@assets/images/logo-dark.svg";
|
||||
import menuArrowIcon from "@assets/images/menu-arrow-icon.svg";
|
||||
import Avatar from "@material-ui/core/Avatar";
|
||||
import Chip from "@material-ui/core/Chip";
|
||||
import ClickAwayListener from "@material-ui/core/ClickAwayListener";
|
||||
|
@ -9,15 +12,6 @@ import Menu from "@material-ui/core/MenuList";
|
|||
import Paper from "@material-ui/core/Paper";
|
||||
import Popper from "@material-ui/core/Popper";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import SVG from "react-inlinesvg";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import useRouter from "use-react-router";
|
||||
|
||||
import saleorDarkLogoSmall from "@assets/images/logo-dark-small.svg";
|
||||
import saleorDarkLogo from "@assets/images/logo-dark.svg";
|
||||
import menuArrowIcon from "@assets/images/menu-arrow-icon.svg";
|
||||
import { createConfigurationMenu } from "@saleor/configuration";
|
||||
import useAppState from "@saleor/hooks/useAppState";
|
||||
import useLocalStorage from "@saleor/hooks/useLocalStorage";
|
||||
|
@ -26,6 +20,12 @@ import useTheme from "@saleor/hooks/useTheme";
|
|||
import useUser from "@saleor/hooks/useUser";
|
||||
import ArrowDropdown from "@saleor/icons/ArrowDropdown";
|
||||
import { staffMemberDetailsUrl } from "@saleor/staff/urls";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import SVG from "react-inlinesvg";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import useRouter from "use-react-router";
|
||||
|
||||
import Container from "../Container";
|
||||
import ErrorPage from "../ErrorPage";
|
||||
import AppActionContext from "./AppActionContext";
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import configureIcon from "@assets/images/menu-configure-icon.svg";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import useTheme from "@saleor/hooks/useTheme";
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import SVG from "react-inlinesvg";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { matchPath } from "react-router";
|
||||
|
||||
import configureIcon from "@assets/images/menu-configure-icon.svg";
|
||||
import useTheme from "@saleor/hooks/useTheme";
|
||||
import { sectionNames } from "@saleor/intl";
|
||||
import { User } from "../../auth/types/User";
|
||||
import {
|
||||
configurationMenuUrl,
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import menuArrowIcon from "@assets/images/menu-arrow-icon.svg";
|
||||
import Hidden from "@material-ui/core/Hidden";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import useTheme from "@saleor/hooks/useTheme";
|
||||
import { createHref } from "@saleor/misc";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import SVG from "react-inlinesvg";
|
||||
|
||||
import menuArrowIcon from "@assets/images/menu-arrow-icon.svg";
|
||||
import useTheme from "@saleor/hooks/useTheme";
|
||||
import { createHref } from "@saleor/misc";
|
||||
import { drawerNestedMenuWidth, drawerWidthExpandedMobile } from "./consts";
|
||||
import { IActiveSubMenu } from "./MenuList";
|
||||
import { IMenuItem } from "./menuStructure";
|
||||
|
|
|
@ -2,6 +2,7 @@ import Drawer from "@material-ui/core/Drawer";
|
|||
import Hidden from "@material-ui/core/Hidden";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import React from "react";
|
||||
|
||||
import {
|
||||
drawerWidth,
|
||||
drawerWidthExpanded,
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import { commonMessages, sectionNames } from "@saleor/intl";
|
||||
import { IntlShape } from "react-intl";
|
||||
|
||||
import catalogIcon from "@assets/images/menu-catalog-icon.svg";
|
||||
import customerIcon from "@assets/images/menu-customers-icon.svg";
|
||||
import discountsIcon from "@assets/images/menu-discounts-icon.svg";
|
||||
import homeIcon from "@assets/images/menu-home-icon.svg";
|
||||
import ordersIcon from "@assets/images/menu-orders-icon.svg";
|
||||
import translationIcon from "@assets/images/menu-translation-icon.svg";
|
||||
import { commonMessages, sectionNames } from "@saleor/intl";
|
||||
import { IntlShape } from "react-intl";
|
||||
|
||||
import { categoryListUrl } from "../../categories/urls";
|
||||
import { collectionListUrl } from "../../collections/urls";
|
||||
import { customerListUrl } from "../../customers/urls";
|
||||
import { saleListUrl, voucherListUrl } from "../../discounts/urls";
|
||||
import { orderDraftListUrl, orderListUrl } from "../../orders/urls";
|
||||
import { productListUrl } from "../../products/urls";
|
||||
import { saleListUrl, voucherListUrl } from "../../discounts/urls";
|
||||
import { languageListUrl } from "../../translations/urls";
|
||||
import { PermissionEnum } from "../../types/globalTypes";
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@ import TableBody from "@material-ui/core/TableBody";
|
|||
import TableCell from "@material-ui/core/TableCell";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ConfirmButton, {
|
||||
ConfirmButtonTransitionState
|
||||
} from "@saleor/components/ConfirmButton";
|
||||
|
@ -20,6 +17,9 @@ import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
|||
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import { SearchCategories_search_edges_node } from "@saleor/searches/types/SearchCategories";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import Checkbox from "../Checkbox";
|
||||
|
||||
export interface FormData {
|
||||
|
|
|
@ -9,13 +9,13 @@ import TableBody from "@material-ui/core/TableBody";
|
|||
import TableCell from "@material-ui/core/TableCell";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import { SearchCollections_search_edges_node } from "@saleor/searches/types/SearchCollections";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import Checkbox from "../Checkbox";
|
||||
import ConfirmButton, {
|
||||
ConfirmButtonTransitionState
|
||||
|
|
|
@ -9,9 +9,6 @@ import TableBody from "@material-ui/core/TableBody";
|
|||
import TableCell from "@material-ui/core/TableCell";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import ConfirmButton, {
|
||||
ConfirmButtonTransitionState
|
||||
} from "@saleor/components/ConfirmButton";
|
||||
|
@ -22,6 +19,9 @@ import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
|||
import { buttonMessages } from "@saleor/intl";
|
||||
import { maybe } from "@saleor/misc";
|
||||
import { SearchProducts_search_edges_node } from "@saleor/searches/types/SearchProducts";
|
||||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import Checkbox from "../Checkbox";
|
||||
|
||||
export interface FormData {
|
||||
|
|
|
@ -4,11 +4,11 @@ import Paper from "@material-ui/core/Paper";
|
|||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import ArrowBack from "@material-ui/icons/ArrowBack";
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import Downshift from "downshift";
|
||||
import React from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import {
|
||||
getMenuItemByPath,
|
||||
IMenu,
|
||||
|
@ -34,9 +34,9 @@ const validationError: Error = new Error(
|
|||
"Values supplied to AutocompleteSelectMenu should be unique"
|
||||
);
|
||||
|
||||
const DebounceAutocomplete: React.ComponentType<
|
||||
DebounceProps<string>
|
||||
> = Debounce;
|
||||
const DebounceAutocomplete: React.ComponentType<DebounceProps<
|
||||
string
|
||||
>> = Debounce;
|
||||
|
||||
const useStyles = makeStyles(
|
||||
theme => ({
|
||||
|
|
|
@ -3,10 +3,10 @@ import Grow from "@material-ui/core/Grow";
|
|||
import Popper from "@material-ui/core/Popper";
|
||||
import { fade } from "@material-ui/core/styles/colorManipulator";
|
||||
import makeStyles from "@material-ui/core/styles/makeStyles";
|
||||
import React from "react";
|
||||
|
||||
import useStateFromProps from "@saleor/hooks/useStateFromProps";
|
||||
import { toggle } from "@saleor/utils/lists";
|
||||
import React from "react";
|
||||
|
||||
import ColumnPickerButton from "./ColumnPickerButton";
|
||||
import ColumnPickerContent, {
|
||||
ColumnPickerContentProps
|
||||
|
|
|
@ -4,15 +4,15 @@ import CardContent from "@material-ui/core/CardContent";
|
|||
import CircularProgress from "@material-ui/core/CircularProgress";
|
||||
import makeStyles from "@material-ui/core/styles/makeStyles";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import useElementScroll from "@saleor/hooks/useElementScroll";
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import { FetchMoreProps } from "@saleor/types";
|
||||
import { isSelected } from "@saleor/utils/lists";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import InfiniteScroll from "react-infinite-scroller";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import useElementScroll from "@saleor/hooks/useElementScroll";
|
||||
import { buttonMessages } from "@saleor/intl";
|
||||
import { FetchMoreProps } from "@saleor/types";
|
||||
import { isSelected } from "@saleor/utils/lists";
|
||||
import ControlledCheckbox from "../ControlledCheckbox";
|
||||
import Hr from "../Hr";
|
||||
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import React from "react";
|
||||
import { useIntl, IntlShape } from "react-intl";
|
||||
|
||||
import FormSpacer from "@saleor/components/FormSpacer";
|
||||
import Grid from "@saleor/components/Grid";
|
||||
import SingleAutocompleteSelectField, {
|
||||
SingleAutocompleteChoiceType
|
||||
} from "@saleor/components/SingleAutocompleteSelectField";
|
||||
import { AddressTypeInput } from "@saleor/customers/types";
|
||||
import { ChangeEvent } from "@saleor/hooks/useForm";
|
||||
import getShopErrorMessage from "@saleor/utils/errors/shop";
|
||||
import { getFormErrors } from "@saleor/utils/errors";
|
||||
import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment";
|
||||
import { AccountErrorFragment } from "@saleor/customers/types/AccountErrorFragment";
|
||||
import { ChangeEvent } from "@saleor/hooks/useForm";
|
||||
import { ShopErrorFragment } from "@saleor/siteSettings/types/ShopErrorFragment";
|
||||
import { getFormErrors } from "@saleor/utils/errors";
|
||||
import getAccountErrorMessage from "@saleor/utils/errors/account";
|
||||
import getShopErrorMessage from "@saleor/utils/errors/shop";
|
||||
import getWarehouseErrorMessage from "@saleor/utils/errors/warehouse";
|
||||
import { WarehouseErrorFragment } from "@saleor/warehouses/types/WarehouseErrorFragment";
|
||||
import React from "react";
|
||||
import { IntlShape, useIntl } from "react-intl";
|
||||
|
||||
export interface CompanyAddressFormProps {
|
||||
countries: SingleAutocompleteChoiceType[];
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import Card from "@material-ui/core/Card";
|
||||
import CardContent from "@material-ui/core/CardContent";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import React from "react";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
|
||||
import CardTitle from "../CardTitle";
|
||||
import CompanyAddressForm, {
|
||||
|
|
|
@ -8,14 +8,14 @@ import TableCell from "@material-ui/core/TableCell";
|
|||
import TableRow from "@material-ui/core/TableRow";
|
||||
import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown";
|
||||
import DeleteIcon from "@material-ui/icons/Delete";
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import CardTitle from "@saleor/components/CardTitle";
|
||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
import Skeleton from "@saleor/components/Skeleton";
|
||||
import { maybe, renderCollection, getStringOrPlaceholder } from "../../misc";
|
||||
import { getStringOrPlaceholder, maybe, renderCollection } from "../../misc";
|
||||
import { CountryFragment } from "../../taxes/types/CountryFragment";
|
||||
|
||||
export interface CountryListProps {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import Tooltip from "@material-ui/core/Tooltip";
|
||||
import useDateLocalize from "@saleor/hooks/useDateLocalize";
|
||||
import moment from "moment-timezone";
|
||||
import React from "react";
|
||||
|
||||
import useDateLocalize from "@saleor/hooks/useDateLocalize";
|
||||
import { LocaleConsumer } from "../Locale";
|
||||
import { Consumer } from "./DateContext";
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue