diff --git a/README.md b/README.md index bd9fc12..2c7a291 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -# Feathers REST Client for Admin-on-rest +# Feathers REST Client for React-admin The perfect match to build Backend and Frontend Admin, based on REST services. -For using [feathers](https://www.feathersjs.com) with [admin-on-rest](https://github.com/marmelab/admin-on-rest). +For using [feathers](https://www.feathersjs.com) with [react-admin](https://github.com/marmelab/react-admin). + +> If you are searching for admin-on-rest (older react-admin version), please use [1.0.0 version](https://github.com/josx/aor-feathers-client/releases/tag/v1.0.0) ## Features * GET_MANY_REFERENCE @@ -20,7 +22,7 @@ For using [feathers](https://www.feathersjs.com) with [admin-on-rest](https://gi ## Installation -In your admin-on-rest app just add aor-feathers-client dependency: +In your react-admin app just add aor-feathers-client dependency: ```sh npm install aor-feathers-client --save @@ -71,9 +73,9 @@ app.service('authentication').hooks({ If your role field has another name than "roles" you must change hook.params.user.roles by hook.params.user.[yourRolesField] in Object.assign(hook.params.payload, {roles: hook.params.user.roles}) -EACH feathers service MUST use a before hook as restrictToRoles. +EACH feathers service MUST use a before hook as restrictToRoles. -For example, +For example, ```js //in feathers-app/src/users.hooks.js @@ -87,26 +89,27 @@ For example, patch: [ ...restrict, hashPassword() ], remove: [ authenticate('jwt'), restrictToRoles({ roles: ['admin']}) ] }, - + ``` ```js // in src/feathersClient.js -import feathers from 'feathers-client'; +import feathers from "@feathersjs/client"; +import auth from "@feathersjs/authentication-client"; const host = 'http://localhost:3030'; +const authOptions = { jwtStrategy: 'jwt', storage: window.localStorage }; export default feathers() - .configure(feathers.hooks()) - .configure(feathers.rest(host).fetch(window.fetch.bind(window))) - .configure(feathers.authentication({ jwtStrategy: 'jwt', storage: window.localStorage })); + .configure(feathers.rest(host).fetch(window.fetch.bind(window))); + .configure(auth(authOptions)); ``` ```js // in src/App.js import React from 'react'; -import { Admin, Resource } from 'admin-on-rest'; +import { Admin, Resource } from 'react-admin'; import { authClient, restClient } from 'aor-feathers-client'; import feathersClient from './feathersClient'; import { PostList } from './posts'; @@ -127,8 +130,8 @@ const options = { usePatch: true }; const App = () => ( {permissions => [ permissions === 'admin' ? : null, diff --git a/package-lock.json b/package-lock.json index 04e2ac6..dc1a223 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,44 +22,109 @@ } } }, + "@material-ui/core": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-1.3.1.tgz", + "integrity": "sha512-h5pVkHgYrKExTdll4Y2Kmvkd5Hr4MxqEQLhRxzGTaXJ8RjOuRd+plfRk5r5ZauAdrIkKEsNcEt75VlEFX9aSGw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.0.0-beta.42", + "@types/jss": "^9.5.3", + "@types/react-transition-group": "^2.0.8", + "brcast": "^3.0.1", + "classnames": "^2.2.5", + "csstype": "^2.5.2", + "debounce": "^1.1.0", + "deepmerge": "^2.0.1", + "dom-helpers": "^3.2.1", + "hoist-non-react-statics": "^2.5.0", + "jss": "^9.3.3", + "jss-camel-case": "^6.0.0", + "jss-default-unit": "^8.0.2", + "jss-global": "^3.0.0", + "jss-nested": "^6.0.1", + "jss-props-sort": "^6.0.0", + "jss-vendor-prefixer": "^7.0.0", + "keycode": "^2.1.9", + "normalize-scroll-left": "^0.1.2", + "prop-types": "^15.6.0", + "react-event-listener": "^0.6.0", + "react-jss": "^8.1.0", + "react-popper": "^0.10.0", + "react-transition-group": "^2.2.1", + "recompose": "^0.27.0", + "scroll": "^2.0.3", + "warning": "^4.0.1" + }, + "dependencies": { + "recompose": { + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.27.1.tgz", + "integrity": "sha512-p7xsyi/rfNjHfdP7vPU02uSFa+Q1eHhjKrvO+3+kRP4Ortj+MxEmpmd+UQtBGM2D2iNAjzNI5rCyBKp9Ob5McA==", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "change-emitter": "^0.1.2", + "fbjs": "^0.8.1", + "hoist-non-react-statics": "^2.3.1", + "react-lifecycles-compat": "^3.0.2", + "symbol-observable": "^1.0.4" + } + }, + "warning": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.1.tgz", + "integrity": "sha512-rAVtTNZw+cQPjvGp1ox0XC5Q2IBFyqoqh+QII4J/oguyu83Bax1apbo2eqB8bHRS+fqYUBagys6lqUoVwKSmXQ==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, + "@material-ui/icons": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@material-ui/icons/-/icons-1.1.0.tgz", + "integrity": "sha512-Z4Xo/EYXuVqCIOjLw7AeBJPtJZsgy9dMAdqu6uYr7gxAefFA8L/QukLv/XE5ByxKYvRhzFG/AjA2OKXwKqfXBQ==", + "dev": true, + "requires": { + "recompose": "^0.26.0 || ^0.27.0" + } + }, + "@types/jss": { + "version": "9.5.3", + "resolved": "https://registry.npmjs.org/@types/jss/-/jss-9.5.3.tgz", + "integrity": "sha512-RQWhcpOVyIhGryKpnUyZARwsgmp+tB82O7c75lC4Tjbmr3hPiCnM1wc+pJipVEOsikYXW0IHgeiQzmxQXbnAIA==", + "dev": true, + "requires": { + "csstype": "^2.0.0", + "indefinite-observable": "^1.0.1" + } + }, + "@types/react": { + "version": "16.4.6", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.6.tgz", + "integrity": "sha512-9LDZdhsuKSc+DjY65SjBkA958oBWcTWSVWAd2cD9XqKBjhGw1KzAkRhWRw2eIsXvaIE/TOTjjKMFVC+JA1iU4g==", + "dev": true, + "requires": { + "csstype": "^2.2.0" + } + }, + "@types/react-transition-group": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-2.0.11.tgz", + "integrity": "sha512-ZLShHPYsjehQBQq1wD9EQBU1BngZOJZMTuUEipENbYPvZMt4bbLcVUaohZTilKLu0viZouadQ6mANHYynNcUOQ==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, "abbrev": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", "dev": true }, - "admin-on-rest": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/admin-on-rest/-/admin-on-rest-1.4.1.tgz", - "integrity": "sha512-AhoxjVIukVT+ySo6IOuDpzxqsgL0ivaYQA1AGsDjwK6WPOJHff3IuheaUY0GDCJ+wKOPZ+9rPOGX6lCEZFOZbA==", - "dev": true, - "requires": { - "babel-runtime": "~6.26.0", - "inflection": "~1.12.0", - "lodash.debounce": "~4.0.8", - "lodash.defaultsdeep": "~4.6.0", - "lodash.get": "~4.4.2", - "lodash.isequal": "~4.5.0", - "lodash.pickby": "~4.6.0", - "lodash.set": "~4.3.2", - "lodash.uniq": "~4.5.0", - "material-ui": "~0.19.0", - "material-ui-chip-input": "~0.18.5", - "node-polyglot": "2.2.2", - "prop-types": "~15.5.7", - "query-string": "~5.0.0", - "react-dropzone": "~4.0.1", - "react-redux": "~5.0.4", - "react-router": "~4.1.0", - "react-router-dom": "~4.1.0", - "react-router-redux": "~5.0.0-alpha.6", - "recompose": "~0.25.0", - "redux": "~3.7.2", - "redux-form": "~7.1.1", - "redux-saga": "~0.15.0", - "reselect": "~3.0.0" - } - }, "align-text": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", @@ -167,6 +232,15 @@ "core-js": "^2.5.0" } }, + "autosuggest-highlight": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/autosuggest-highlight/-/autosuggest-highlight-3.1.1.tgz", + "integrity": "sha512-MQ6GNIGMMZbeA5FlBLXXgkZEthysCdYNkMV4MahB2/qB/9cwBnVsePUPnIqkMuzjzclTtDa67xln7cgLDu2f/g==", + "dev": true, + "requires": { + "diacritic": "0.0.2" + } + }, "babel-cli": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", @@ -226,6 +300,17 @@ "private": "^0.1.8", "slash": "^1.0.0", "source-map": "^0.5.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, "babel-generator": { @@ -1013,6 +1098,17 @@ "globals": "^9.18.0", "invariant": "^2.2.2", "lodash": "^4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, "babel-types": { @@ -1046,12 +1142,6 @@ "dev": true, "optional": true }, - "bowser": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-1.9.4.tgz", - "integrity": "sha512-9IdMmj2KjigRq6oWhmwv1W36pDuA4STQZ8q6YO9um+x07xgYNCD3Oou+WP/3L1HNz7iqythGet3/p4wvc8AAwQ==", - "dev": true - }, "brace-expansion": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", @@ -1074,6 +1164,12 @@ "repeat-element": "^1.1.2" } }, + "brcast": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/brcast/-/brcast-3.0.1.tgz", + "integrity": "sha512-eI3yqf9YEqyGl9PCNTR46MGvDylGtaHjalcz6Q3fAPnP/PhpKkkve52vFdfGpwp4VUvK6LUr4TQN+2stCrEwTg==", + "dev": true + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -1109,12 +1205,6 @@ "type-detect": "^1.0.0" } }, - "chain-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chain-function/-/chain-function-1.0.0.tgz", - "integrity": "sha1-DUqzfn4Y6tC9xHuSB2QRjOWHM9w=", - "dev": true - }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -1152,6 +1242,12 @@ "readdirp": "^2.0.0" } }, + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==", + "dev": true + }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", @@ -1204,29 +1300,31 @@ "dev": true, "optional": true }, - "css-in-js-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-2.0.1.tgz", - "integrity": "sha512-PJF0SpJT+WdbVVt0AOYp9C8GnuruRlL/UFW7932nLWmFLQTaWEzTBQEx7/hn4BuV+WON75iAViSUJLiU3PKbpA==", + "css-vendor": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-0.3.8.tgz", + "integrity": "sha1-ZCHP0wNM5mT+dnOXL9ARn8KJQfo=", "dev": true, "requires": { - "hyphenate-style-name": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } + "is-in-browser": "^1.0.2" } }, + "csstype": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.5.5.tgz", + "integrity": "sha512-EGMjeoiN3aqEX5u/cyH5mSdGBDGdLcCQvcEcBWNGFSPXKd9uOTIeVG91YQ22OxI44DKpvI+4C7VUSmEpsHWJaA==", + "dev": true + }, + "debounce": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.1.0.tgz", + "integrity": "sha512-ZQVKfRVlwRfD150ndzEK8M90ABT+Y/JQKs4Y7U4MXdpuoUkkrr4DwKbVux3YjylA5bUMUj0Nc3pMxPJX6N2QQQ==", + "dev": true + }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { "ms": "2.0.0" } @@ -1273,6 +1371,12 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "deepmerge": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.1.1.tgz", + "integrity": "sha512-urQxA1smbLZ2cBbXbaYObM1dJ82aJ2H57A1C/Kklfh/ZN1bgH4G/n5KWhdNfOK11W98gqZfyYj7W4frJJRwA2w==", + "dev": true + }, "define-properties": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", @@ -1292,6 +1396,12 @@ "repeating": "^2.0.0" } }, + "diacritic": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/diacritic/-/diacritic-0.0.2.tgz", + "integrity": "sha1-/CqIe1pbwKCoVPthTHwvIJBh7gQ=", + "dev": true + }, "diff": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", @@ -1304,6 +1414,12 @@ "integrity": "sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg==", "dev": true }, + "dom-walk": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", + "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", + "dev": true + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -2124,6 +2240,16 @@ "is-glob": "^2.0.0" } }, + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "dev": true, + "requires": { + "min-document": "^2.19.0", + "process": "~0.5.1" + } + }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", @@ -2236,6 +2362,23 @@ "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", "dev": true }, + "indefinite-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indefinite-observable/-/indefinite-observable-1.0.1.tgz", + "integrity": "sha1-CZFUI8yNb36xy3iCrRNGM8mm7cM=", + "dev": true, + "requires": { + "symbol-observable": "1.0.4" + }, + "dependencies": { + "symbol-observable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", + "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=", + "dev": true + } + } + }, "inflection": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", @@ -2258,16 +2401,6 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, - "inline-style-prefixer": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-3.0.8.tgz", - "integrity": "sha1-hVG45bTVcyROZqNLBPfTIHaitTQ=", - "dev": true, - "requires": { - "bowser": "^1.7.3", - "css-in-js-utils": "^2.0.0" - } - }, "invariant": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", @@ -2344,6 +2477,12 @@ "number-is-nan": "^1.0.0" } }, + "is-function": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", + "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=", + "dev": true + }, "is-glob": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", @@ -2353,6 +2492,12 @@ "is-extglob": "^1.0.0" } }, + "is-in-browser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", + "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=", + "dev": true + }, "is-number": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", @@ -2363,6 +2508,23 @@ "kind-of": "^3.0.2" } }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, "is-posix-bracket": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", @@ -2527,11 +2689,117 @@ "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, + "jss": { + "version": "9.8.7", + "resolved": "https://registry.npmjs.org/jss/-/jss-9.8.7.tgz", + "integrity": "sha512-awj3XRZYxbrmmrx9LUSj5pXSUfm12m8xzi/VKeqI1ZwWBtQ0kVPTs3vYs32t4rFw83CgFDukA8wKzOE9sMQnoQ==", + "dev": true, + "requires": { + "is-in-browser": "^1.1.3", + "symbol-observable": "^1.1.0", + "warning": "^3.0.0" + } + }, + "jss-camel-case": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jss-camel-case/-/jss-camel-case-6.1.0.tgz", + "integrity": "sha512-HPF2Q7wmNW1t79mCqSeU2vdd/vFFGpkazwvfHMOhPlMgXrJDzdj9viA2SaHk9ZbD5pfL63a8ylp4++irYbbzMQ==", + "dev": true, + "requires": { + "hyphenate-style-name": "^1.0.2" + } + }, + "jss-compose": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/jss-compose/-/jss-compose-5.0.0.tgz", + "integrity": "sha512-YofRYuiA0+VbeOw0VjgkyO380sA4+TWDrW52nSluD9n+1FWOlDzNbgpZ/Sb3Y46+DcAbOS21W5jo6SAqUEiuwA==", + "dev": true, + "requires": { + "warning": "^3.0.0" + } + }, + "jss-default-unit": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/jss-default-unit/-/jss-default-unit-8.0.2.tgz", + "integrity": "sha512-WxNHrF/18CdoAGw2H0FqOEvJdREXVXLazn7PQYU7V6/BWkCV0GkmWsppNiExdw8dP4TU1ma1dT9zBNJ95feLmg==", + "dev": true + }, + "jss-expand": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/jss-expand/-/jss-expand-5.3.0.tgz", + "integrity": "sha512-NiM4TbDVE0ykXSAw6dfFmB1LIqXP/jdd0ZMnlvlGgEMkMt+weJIl8Ynq1DsuBY9WwkNyzWktdqcEW2VN0RAtQg==", + "dev": true + }, + "jss-extend": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jss-extend/-/jss-extend-6.2.0.tgz", + "integrity": "sha512-YszrmcB6o9HOsKPszK7NeDBNNjVyiW864jfoiHoMlgMIg2qlxKw70axZHqgczXHDcoyi/0/ikP1XaHDPRvYtEA==", + "dev": true, + "requires": { + "warning": "^3.0.0" + } + }, + "jss-global": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jss-global/-/jss-global-3.0.0.tgz", + "integrity": "sha512-wxYn7vL+TImyQYGAfdplg7yaxnPQ9RaXY/cIA8hawaVnmmWxDHzBK32u1y+RAvWboa3lW83ya3nVZ/C+jyjZ5Q==", + "dev": true + }, + "jss-nested": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jss-nested/-/jss-nested-6.0.1.tgz", + "integrity": "sha512-rn964TralHOZxoyEgeq3hXY8hyuCElnvQoVrQwKHVmu55VRDd6IqExAx9be5HgK0yN/+hQdgAXQl/GUrBbbSTA==", + "dev": true, + "requires": { + "warning": "^3.0.0" + } + }, + "jss-preset-default": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/jss-preset-default/-/jss-preset-default-4.5.0.tgz", + "integrity": "sha512-qZbpRVtHT7hBPpZEBPFfafZKWmq3tA/An5RNqywDsZQGrlinIF/mGD9lmj6jGqu8GrED2SMHZ3pPKLmjCZoiaQ==", + "dev": true, + "requires": { + "jss-camel-case": "^6.1.0", + "jss-compose": "^5.0.0", + "jss-default-unit": "^8.0.2", + "jss-expand": "^5.3.0", + "jss-extend": "^6.2.0", + "jss-global": "^3.0.0", + "jss-nested": "^6.0.1", + "jss-props-sort": "^6.0.0", + "jss-template": "^1.0.1", + "jss-vendor-prefixer": "^7.0.0" + } + }, + "jss-props-sort": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/jss-props-sort/-/jss-props-sort-6.0.0.tgz", + "integrity": "sha512-E89UDcrphmI0LzmvYk25Hp4aE5ZBsXqMWlkFXS0EtPkunJkRr+WXdCNYbXbksIPnKlBenGB9OxzQY+mVc70S+g==", + "dev": true + }, + "jss-template": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/jss-template/-/jss-template-1.0.1.tgz", + "integrity": "sha512-m5BqEWha17fmIVXm1z8xbJhY6GFJxNB9H68GVnCWPyGYfxiAgY9WTQyvDAVj+pYRgrXSOfN5V1T4+SzN1sJTeg==", + "dev": true, + "requires": { + "warning": "^3.0.0" + } + }, + "jss-vendor-prefixer": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/jss-vendor-prefixer/-/jss-vendor-prefixer-7.0.0.tgz", + "integrity": "sha512-Agd+FKmvsI0HLcYXkvy8GYOw3AAASBUpsmIRvVQheps+JWaN892uFOInTr0DRydwaD91vSSUCU4NssschvF7MA==", + "dev": true, + "requires": { + "css-vendor": "^0.3.8" + } + }, "jwt-decode": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz", - "integrity": "sha1-fYa9VmefWM5qhHBKZX3TkruoGnk=", - "dev": true + "integrity": "sha1-fYa9VmefWM5qhHBKZX3TkruoGnk=" }, "keycode": { "version": "2.2.0", @@ -2577,60 +2845,6 @@ "integrity": "sha512-iesFYPmxYYGTcmQK0sL8bX3TGHyM6b2qREaB4kamHfQyfPJP0xgoGxp19nsH16nsfquLdiyKyX3mQkfiSGV8Rg==", "dev": true }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.defaultsdeep": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz", - "integrity": "sha1-vsECT4WxvZbL6kBbI8FK1kQ6b4E=", - "dev": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.merge": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", - "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==", - "dev": true - }, - "lodash.pickby": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz", - "integrity": "sha1-feoh2MGNdwOifHBMFdO4SmfjOv8=", - "dev": true - }, - "lodash.set": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", - "dev": true - }, - "lodash.throttle": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", - "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=", - "dev": true - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, "lolex": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", @@ -2652,48 +2866,6 @@ "js-tokens": "^3.0.0" } }, - "material-ui": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/material-ui/-/material-ui-0.19.4.tgz", - "integrity": "sha1-ypzcqKqLtZTfrF2zjsn/BFoyNYc=", - "dev": true, - "requires": { - "babel-runtime": "^6.23.0", - "inline-style-prefixer": "^3.0.2", - "keycode": "^2.1.8", - "lodash.merge": "^4.6.0", - "lodash.throttle": "^4.1.1", - "prop-types": "^15.5.7", - "react-event-listener": "^0.5.1", - "react-transition-group": "^1.2.1", - "recompose": "^0.26.0", - "simple-assign": "^0.1.0", - "warning": "^3.0.0" - }, - "dependencies": { - "recompose": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.26.0.tgz", - "integrity": "sha512-KwOu6ztO0mN5vy3+zDcc45lgnaUoaQse/a5yLVqtzTK13czSWnFGmXbQVmnoMgDkI5POd1EwIKSbjU1V7xdZog==", - "dev": true, - "requires": { - "change-emitter": "^0.1.2", - "fbjs": "^0.8.1", - "hoist-non-react-statics": "^2.3.1", - "symbol-observable": "^1.0.4" - } - } - } - }, - "material-ui-chip-input": { - "version": "0.18.8", - "resolved": "https://registry.npmjs.org/material-ui-chip-input/-/material-ui-chip-input-0.18.8.tgz", - "integrity": "sha512-QrKHmnleXYtVOn7OTPpbe2CJrXf2eIjys2STj9FD1ARSWKJv+bjiby0xNG4qBhDNpmcM8q/XC7tT30wdrisDdQ==", - "dev": true, - "requires": { - "prop-types": "^15.5.7" - } - }, "math-random": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", @@ -2723,6 +2895,15 @@ "regex-cache": "^0.4.2" } }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "dev": true, + "requires": { + "dom-walk": "^0.1.0" + } + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -2807,8 +2988,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nan": { "version": "2.10.0", @@ -2863,6 +3043,12 @@ "remove-trailing-separator": "^1.0.1" } }, + "normalize-scroll-left": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-scroll-left/-/normalize-scroll-left-0.1.2.tgz", + "integrity": "sha512-F9YMRls0zCF6BFIE2YnXDRpHPpfd91nOIaNdDgrx5YMoPLo8Wqj+6jNXHQsYBavJeXP4ww8HCt0xQAKc5qk2Fg==", + "dev": true + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -2878,8 +3064,7 @@ "object-diff": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/object-diff/-/object-diff-0.0.4.tgz", - "integrity": "sha1-2IOwRE/o/W4E5ZXXu2ZWgskWBH8=", - "dev": true + "integrity": "sha1-2IOwRE/o/W4E5ZXXu2ZWgskWBH8=" }, "object-keys": { "version": "1.0.12", @@ -2990,6 +3175,12 @@ "isarray": "0.0.1" } }, + "popper.js": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.3.tgz", + "integrity": "sha1-FDj5jQRqz3tNeM1QK/QYrGTU8JU=", + "dev": true + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -3009,6 +3200,12 @@ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", "dev": true }, + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=", + "dev": true + }, "process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", @@ -3026,19 +3223,19 @@ } }, "prop-types": { - "version": "15.5.10", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.5.10.tgz", - "integrity": "sha1-J5ffwxJhguOpXj37suiT3ddFYVQ=", + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", "dev": true, "requires": { - "fbjs": "^0.8.9", - "loose-envify": "^1.3.1" + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" } }, "query-string": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.0.1.tgz", - "integrity": "sha512-aM+MkQClojlNiKkO09tiN2Fv8jM/L7GWIjG2liWeKljlOdOPNWr+bW3KQ+w5V/uKprpezC7fAsAMsJtJ+2rLKA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { "decode-uri-component": "^0.2.0", @@ -3046,26 +3243,126 @@ "strict-uri-encode": "^1.0.0" } }, + "ra-core": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ra-core/-/ra-core-2.1.0.tgz", + "integrity": "sha512-MxuGtw/J04ZpQrUfw5bnrrkbkU/h4hDqgzmt5Eb1XSk+iwagT9lClrdGEG2Omph39B6+Wjj5Z4L0ZnqseBfxHg==", + "dev": true, + "requires": { + "babel-runtime": "~6.26.0", + "classnames": "~2.2.5", + "inflection": "~1.12.0", + "lodash": "~4.17.5", + "node-polyglot": "2.2.2", + "prop-types": "~15.6.1", + "query-string": "~5.1.1", + "ra-language-english": "^2.0.2", + "react-redux": "~5.0.7", + "react-router": "~4.2.0", + "react-router-dom": "~4.2.2", + "react-router-redux": "~5.0.0-alpha.9", + "recompose": "~0.26.0", + "redux": "~3.7.2", + "redux-form": "~7.3.0", + "redux-saga": "~0.16.0", + "reselect": "~3.0.0", + "warning": "~3.0.0" + } + }, + "ra-language-english": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ra-language-english/-/ra-language-english-2.0.2.tgz", + "integrity": "sha512-mrYUU6Tf2la4leqjtVyKWWrUXDSBWEFJHrhDFaoVO72iRjC5FIL8SD6PuOEkH7gQmnnynn7RM4JgxlSwUio2yQ==", + "dev": true + }, + "ra-ui-materialui": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ra-ui-materialui/-/ra-ui-materialui-2.1.1.tgz", + "integrity": "sha512-zdyYpesBP8yahYh9dx+ImlNqDTwhreH3q/z3daqGikYJNB1TUFffhjaqlPLKWmsU6ix+Y6jxGG4y5yD50Xj9Iw==", + "dev": true, + "requires": { + "@material-ui/core": "^1.0.0", + "@material-ui/icons": "^1.0.0", + "autosuggest-highlight": "^3.1.1", + "classnames": "~2.2.5", + "inflection": "~1.12.0", + "lodash": "~4.17.5", + "prop-types": "~15.6.1", + "ra-core": "^2.1.0", + "react-autosuggest": "^9.3.2", + "react-dropzone": "~4.0.1", + "react-redux": "~5.0.7", + "react-router-dom": "~4.2.2", + "react-transition-group": "^2.2.1", + "recompose": "~0.26.0", + "redux": "~3.7.2", + "redux-form": "~7.3.0" + } + }, + "rafl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/rafl/-/rafl-1.2.2.tgz", + "integrity": "sha1-/pMPdYIRAg1H44gV9Rlqi+QVB0A=", + "dev": true, + "requires": { + "global": "~4.3.0" + } + }, "react": { - "version": "15.4.0", - "resolved": "https://registry.npmjs.org/react/-/react-15.4.0.tgz", - "integrity": "sha1-c2wcfFQugIgScQbh9FCwEPhtFys=", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.4.1.tgz", + "integrity": "sha512-3GEs0giKp6E0Oh/Y9ZC60CmYgUPnp7voH9fbjWsvXtYFb4EWtgQub0ADSq0sJR0BbHc4FThLLtzlcFaFXIorwg==", "dev": true, "requires": { - "fbjs": "^0.8.4", + "fbjs": "^0.8.16", "loose-envify": "^1.1.0", - "object-assign": "^4.1.0" + "object-assign": "^4.1.1", + "prop-types": "^15.6.0" + } + }, + "react-admin": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/react-admin/-/react-admin-2.1.1.tgz", + "integrity": "sha512-GcY3htYU0UDa8qyQxU06l4G4NG1Qd7jkYxTcTmjk+x5UDGPUkepchLSz45xFoZ0XR52mtmxKNFRxGsaqnWesqw==", + "dev": true, + "requires": { + "ra-core": "^2.1.0", + "ra-language-english": "^2.0.2", + "ra-ui-materialui": "^2.1.1" + } + }, + "react-autosuggest": { + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/react-autosuggest/-/react-autosuggest-9.3.4.tgz", + "integrity": "sha512-vcAsZw+6zkjimni4aun1tvuzVCGilmFihAgF8yCeVm/p82ssGgtQb0pnNCcEBcPzPTLJjQc2O8dLJidoOyjlcA==", + "dev": true, + "requires": { + "prop-types": "^15.5.10", + "react-autowhatever": "^10.1.0", + "shallow-equal": "^1.0.0" + } + }, + "react-autowhatever": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/react-autowhatever/-/react-autowhatever-10.1.2.tgz", + "integrity": "sha512-+0XgELT1LF7hHEJv5H5Zwkfb4Q1rqmMZZ5U/XJ2J+UcSPRKnG6CqEjXUJ+hYLXDHgvDqwEN5PBdxczD5rHvOuA==", + "dev": true, + "requires": { + "prop-types": "^15.5.8", + "react-themeable": "^1.1.0", + "section-iterator": "^2.0.0" } }, "react-dom": { - "version": "15.4.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.4.0.tgz", - "integrity": "sha1-apemkACWZXDbSMdGvEt7DKUNFTQ=", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.4.1.tgz", + "integrity": "sha512-1Gin+wghF/7gl4Cqcvr1DxFX2Osz7ugxSwl6gBqCMpdrxHjIFUS7GYxrFftZ9Ln44FHw0JxCFD9YtZsrbR5/4A==", "dev": true, "requires": { - "fbjs": "^0.8.1", + "fbjs": "^0.8.16", "loose-envify": "^1.1.0", - "object-assign": "^4.1.0" + "object-assign": "^4.1.1", + "prop-types": "^15.6.0" } }, "react-dropzone": { @@ -3079,29 +3376,56 @@ } }, "react-event-listener": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.5.9.tgz", - "integrity": "sha1-xk6E93FWpoJhSDW9wbx7oAkS35c=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.6.1.tgz", + "integrity": "sha1-QceoCmazmMJ91RHiJxKwLz1OzMo=", "dev": true, "requires": { "@babel/runtime": "^7.0.0-beta.42", - "fbjs": "^0.8.16", "prop-types": "^15.6.0", - "warning": "^3.0.0" + "warning": "^4.0.1" }, "dependencies": { - "prop-types": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", - "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "warning": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.1.tgz", + "integrity": "sha512-rAVtTNZw+cQPjvGp1ox0XC5Q2IBFyqoqh+QII4J/oguyu83Bax1apbo2eqB8bHRS+fqYUBagys6lqUoVwKSmXQ==", "dev": true, "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" + "loose-envify": "^1.0.0" } } } }, + "react-jss": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/react-jss/-/react-jss-8.6.0.tgz", + "integrity": "sha512-AraNxzf1r9rhWY7uByMIKdOTCqQEP5wvYb5wp6ubhl3g8t+b2daQyuL0TfRZnd/xxmH92REHJhsAdV9APvHUlQ==", + "dev": true, + "requires": { + "hoist-non-react-statics": "^2.5.0", + "jss": "^9.7.0", + "jss-preset-default": "^4.3.0", + "prop-types": "^15.6.0", + "theming": "^1.3.0" + } + }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", + "dev": true + }, + "react-popper": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-0.10.4.tgz", + "integrity": "sha1-rypBXqIike3VBGeNev2opu4ylao=", + "dev": true, + "requires": { + "popper.js": "^1.14.1", + "prop-types": "^15.6.1" + } + }, "react-redux": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.7.tgz", @@ -3114,53 +3438,35 @@ "lodash-es": "^4.17.5", "loose-envify": "^1.1.0", "prop-types": "^15.6.0" - }, - "dependencies": { - "prop-types": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", - "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", - "dev": true, - "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" - } - } } }, "react-router": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.1.2.tgz", - "integrity": "sha512-VyM87OP+GkijVkkOXJw39A9fKtFelLoZYYDxtELhpZefjYatxI2SUxZcImo/9Tv52rR9UnNJBPSBpVRQMdvi8A==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.2.0.tgz", + "integrity": "sha512-DY6pjwRhdARE4TDw7XjxjZsbx9lKmIcyZoZ+SDO7SBJ1KUeWNxT22Kara2AC7u6/c2SYEHlEDLnzBCcNhLE8Vg==", "dev": true, "requires": { - "history": "^4.6.0", - "hoist-non-react-statics": "^1.2.0", + "history": "^4.7.2", + "hoist-non-react-statics": "^2.3.0", "invariant": "^2.2.2", "loose-envify": "^1.3.1", - "path-to-regexp": "^1.5.3", + "path-to-regexp": "^1.7.0", "prop-types": "^15.5.4", "warning": "^3.0.0" - }, - "dependencies": { - "hoist-non-react-statics": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz", - "integrity": "sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs=", - "dev": true - } } }, "react-router-dom": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.1.2.tgz", - "integrity": "sha512-CU6pFlpfvIj/xi36rZAbUiN0x39241q+d5bAfJJLtlEqlM62F3zgyv5aERH9zesmKqyDBBp2kd85rkq9Mo/iNQ==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.2.2.tgz", + "integrity": "sha512-cHMFC1ZoLDfEaMFoKTjN7fry/oczMgRt5BKfMAkTu5zEuJvUiPp1J8d0eXSVTnBh6pxlbdqDhozunOOLtmKfPA==", "dev": true, "requires": { - "history": "^4.5.1", + "history": "^4.7.2", + "invariant": "^2.2.2", "loose-envify": "^1.3.1", "prop-types": "^15.5.4", - "react-router": "^4.1.1" + "react-router": "^4.2.0", + "warning": "^3.0.0" } }, "react-router-redux": { @@ -3172,64 +3478,35 @@ "history": "^4.7.2", "prop-types": "^15.6.0", "react-router": "^4.2.0" + } + }, + "react-themeable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/react-themeable/-/react-themeable-1.1.0.tgz", + "integrity": "sha1-fURm3ZsrX6dQWHJ4JenxUro3mg4=", + "dev": true, + "requires": { + "object-assign": "^3.0.0" }, "dependencies": { - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "prop-types": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", - "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", - "dev": true, - "requires": { - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" - } - }, - "react-router": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz", - "integrity": "sha512-yrvL8AogDh2X42Dt9iknk4wF4V8bWREPirFfS9gLU1huk6qK41sg7Z/1S81jjTrGHxa3B8R3J6xIkDAA6CVarg==", - "dev": true, - "requires": { - "history": "^4.7.2", - "hoist-non-react-statics": "^2.5.0", - "invariant": "^2.2.4", - "loose-envify": "^1.3.1", - "path-to-regexp": "^1.7.0", - "prop-types": "^15.6.1", - "warning": "^4.0.1" - } - }, - "warning": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.1.tgz", - "integrity": "sha512-rAVtTNZw+cQPjvGp1ox0XC5Q2IBFyqoqh+QII4J/oguyu83Bax1apbo2eqB8bHRS+fqYUBagys6lqUoVwKSmXQ==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true } } }, "react-transition-group": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.1.tgz", - "integrity": "sha512-CWaL3laCmgAFdxdKbhhps+c0HRGF4c+hdM4H23+FI1QBNUyx/AMeIJGWorehPNSaKnQNOAxL7PQmqMu78CDj3Q==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.4.0.tgz", + "integrity": "sha512-Xv5d55NkJUxUzLCImGSanK8Cl/30sgpOEMGc5m86t8+kZwrPxPCPcFqyx83kkr+5Lz5gs6djuvE5By+gce+VjA==", "dev": true, "requires": { - "chain-function": "^1.0.0", - "dom-helpers": "^3.2.0", + "dom-helpers": "^3.3.1", "loose-envify": "^1.3.1", - "prop-types": "^15.5.6", - "warning": "^3.0.0" + "prop-types": "^15.6.2", + "react-lifecycles-compat": "^3.0.4" } }, "readable-stream": { @@ -3271,9 +3548,9 @@ } }, "recompose": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.25.1.tgz", - "integrity": "sha512-EwFAv6UBrHbLIsIKHUZJ+BKdjTmyEsIrRlGO3R7PKu0S7hkgNznVDRvb+1upQUntURtBvxhYnTVQ3AcWOlsmWA==", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.26.0.tgz", + "integrity": "sha512-KwOu6ztO0mN5vy3+zDcc45lgnaUoaQse/a5yLVqtzTK13czSWnFGmXbQVmnoMgDkI5POd1EwIKSbjU1V7xdZog==", "dev": true, "requires": { "change-emitter": "^0.1.2", @@ -3295,25 +3572,36 @@ } }, "redux-form": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/redux-form/-/redux-form-7.1.2.tgz", - "integrity": "sha512-NQdYtHx0Tx2oRQs7c3+aiJxoVAwIyn3lmm2sf2vQ/eSRE1xLWdygoCWPLHk0FYT31FJY3Ec1d/5Vtkd0/GVQBg==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/redux-form/-/redux-form-7.3.0.tgz", + "integrity": "sha512-WcZRsRsVG25l8Cih3bEeeoZFxSIvoHqTpBRe5Ifl1ob7xvEpYLXyYYHAFER1DpTfMZPgTPHZ4UkR4ILFP3hzkw==", "dev": true, "requires": { "deep-equal": "^1.0.1", - "es6-error": "^4.0.0", - "hoist-non-react-statics": "^2.3.1", - "invariant": "^2.2.2", + "es6-error": "^4.1.1", + "hoist-non-react-statics": "^2.5.0", + "invariant": "^2.2.3", "is-promise": "^2.1.0", - "lodash": "^4.17.3", - "lodash-es": "^4.17.3", - "prop-types": "^15.5.9" + "lodash": "^4.17.5", + "lodash-es": "^4.17.5", + "prop-types": "^15.6.1" + }, + "dependencies": { + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + } } }, "redux-saga": { - "version": "0.15.6", - "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-0.15.6.tgz", - "integrity": "sha1-hjjcUi3mxsCklv6LK1RmKHrC3E0=", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-0.16.0.tgz", + "integrity": "sha1-CiMdsKFIkwHdmA9vL4jYztQY9yQ=", "dev": true }, "regenerate": { @@ -3450,6 +3738,21 @@ "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", "dev": true }, + "scroll": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scroll/-/scroll-2.0.3.tgz", + "integrity": "sha512-3ncZzf8gUW739h3LeS68nSssO60O+GGjT3SxzgofQmT8PIoyHzebql9HHPJopZX8iT6TKOdwaWFMqL6LzUN3DQ==", + "dev": true, + "requires": { + "rafl": "~1.2.1" + } + }, + "section-iterator": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/section-iterator/-/section-iterator-2.0.0.tgz", + "integrity": "sha1-v0RNev7rlK1Dw5rS+yYVFifMuio=", + "dev": true + }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", @@ -3463,10 +3766,10 @@ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "dev": true }, - "simple-assign": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/simple-assign/-/simple-assign-0.1.0.tgz", - "integrity": "sha1-F/0wZqXz13OPUDIbsPFMooHMS6o=", + "shallow-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.0.0.tgz", + "integrity": "sha1-UI0YOLPeWQq4dXsBGyXkMJAJRfc=", "dev": true }, "sinon": { @@ -3574,6 +3877,18 @@ "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", "dev": true }, + "theming": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/theming/-/theming-1.3.0.tgz", + "integrity": "sha512-ya5Ef7XDGbTPBv5ENTwrwkPUexrlPeiAg/EI9kdlUAZhNlRbCdhMKRgjNX1IcmsmiPcqDQZE6BpSaH+cr31FKw==", + "dev": true, + "requires": { + "brcast": "^3.0.1", + "is-function": "^1.0.1", + "is-plain-object": "^2.0.1", + "prop-types": "^15.5.8" + } + }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", diff --git a/package.json b/package.json index cdf5d5f..03b4bb9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "aor-feathers-client", "version": "1.0.0", - "description": "A feathers client for admin-on-rest", + "description": "A feathers client for react-admin", "main": "lib/index.js", "scripts": { "pretest": "npm run build", @@ -14,8 +14,8 @@ "release:patch": "npm version patch && npm publish", "release:minor": "npm version minor && npm publish", "release:major": "npm version major && npm publish", - "coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --opts mocha.opts", - "mocha": "env DEBUG=aor-feathers-client:* mocha" + "coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --opts mocha.opts --require babel-register", + "mocha": "env DEBUG=aor-feathers-client:* mocha --require babel-register" }, "files": [ "LICENSE", @@ -41,25 +41,26 @@ }, "homepage": "https://github.com/josx/aor-feathers-client#readme", "peerDependencies": { - "admin-on-rest": "^1.4.0", + "react-admin": "^2.1.1", + "@feathersjs/client": "^3.5.3" + }, + "dependencies": { "debug": "^3.0.0", - "feathers-client": ">=1.9.0", "jwt-decode": "^2.2.0", "object-diff": "^0.0.4" }, "devDependencies": { - "admin-on-rest": "^1.4.1", "babel-cli": "^6.18.0", "babel-plugin-add-module-exports": "^0.2.1", "babel-preset-es2015": "^6.18.0", "babel-preset-stage-0": "^6.16.0", + "babel-register": "^6.26.0", "chai": "^3.5.0", "istanbul": "^0.4.5", - "jwt-decode": "^2.2.0", "mocha": "^5.2.0", - "object-diff": "^0.0.4", - "react": "15.4.0", - "react-dom": "15.4.0", + "react-admin": "^2.1.1", + "react": "^16.4.1", + "react-dom": "^16.4.1", "sinon": "^2.2.0" }, "contributors": [ diff --git a/src/authClient.js b/src/authClient.js index 4bdccdd..a62772c 100644 --- a/src/authClient.js +++ b/src/authClient.js @@ -4,7 +4,7 @@ import { AUTH_CHECK, AUTH_ERROR, AUTH_GET_PERMISSIONS -} from 'admin-on-rest'; +} from 'react-admin'; import decodeJwt from 'jwt-decode'; export default (client, options = {}) => (type, params) => { @@ -69,4 +69,4 @@ export default (client, options = {}) => (type, params) => { default: throw new Error(`Unsupported FeathersJS authClient action type ${type}`); } -}; \ No newline at end of file +}; diff --git a/src/restClient.js b/src/restClient.js index 426349d..f86d934 100644 --- a/src/restClient.js +++ b/src/restClient.js @@ -5,9 +5,9 @@ import { GET_ONE, CREATE, UPDATE, - DELETE -} from 'admin-on-rest/lib/rest/types' -import { fetchUtils } from 'admin-on-rest'; + DELETE, + fetchUtils +} from 'react-admin' import debug from 'debug' import diff from 'object-diff' diff --git a/test/restClient.spec.js b/test/restClient.spec.js index 52455fc..1b1de46 100644 --- a/test/restClient.spec.js +++ b/test/restClient.spec.js @@ -3,7 +3,17 @@ const expect = require('chai').expect; const sinon = require('sinon'); const restClient = require('../lib').restClient; -const types = require('admin-on-rest/lib/rest/types'); + +import { + GET_MANY, + GET_MANY_REFERENCE, + GET_LIST, + GET_ONE, + CREATE, + UPDATE, + DELETE, +} from 'react-admin' + const debug = require('debug') const dbg = debug('aor-feathers-client:test') @@ -49,7 +59,7 @@ describe('Rest Client', function () { let ids = [1, 2, 3]; beforeEach(function () { setupClient(); - asyncResult = aorClient(types.GET_MANY, 'posts', { ids }); + asyncResult = aorClient(GET_MANY, 'posts', { ids }); }); it("calls the client's find method", function () { @@ -95,7 +105,7 @@ describe('Rest Client', function () { }; beforeEach(function () { setupClient(); - asyncResult = aorClient(types.GET_MANY_REFERENCE, 'posts', params); + asyncResult = aorClient(GET_MANY_REFERENCE, 'posts', params); }); it("calls the client's find method", function () { @@ -145,7 +155,7 @@ describe('Rest Client', function () { }; beforeEach(function () { setupClient(); - asyncResult = aorClient(types.GET_LIST, 'posts', params); + asyncResult = aorClient(GET_LIST, 'posts', params); }); it("calls the client's find method", function () { @@ -193,7 +203,7 @@ describe('Rest Client', function () { it("id-option: calls the client's find method", function () { setupClient({id: '_id'}); - asyncResult = aorClient(types.GET_LIST, 'posts', params); + asyncResult = aorClient(GET_LIST, 'posts', params); return asyncResult.then(result => { expect(fakeService.find.calledOnce).to.be.true; }); @@ -237,7 +247,7 @@ describe('Rest Client', function () { it("resource-id-option: calls the client's find method", function () { setupClient({posts: {id: '_id'}}); - asyncResult = aorClient(types.GET_LIST, 'posts', params); + asyncResult = aorClient(GET_LIST, 'posts', params); return asyncResult.then(result => { expect(fakeService.find.calledOnce).to.be.true; }); @@ -265,7 +275,7 @@ describe('Rest Client', function () { it("resource-id-option: calls the client's find method for default handled resource", function () { setupClient({widgets: {id: '_id'}}); - asyncResult = aorClient(types.GET_LIST, 'posts', params); + asyncResult = aorClient(GET_LIST, 'posts', params); return asyncResult.then(result => { expect(fakeService.find.calledOnce).to.be.true; }); @@ -296,7 +306,7 @@ describe('Rest Client', function () { let params = { id: 1 }; beforeEach(function () { setupClient(); - asyncResult = aorClient(types.GET_ONE, 'posts', params); + asyncResult = aorClient(GET_ONE, 'posts', params); }); it("calls the client's get method with the id in params", function () { @@ -322,7 +332,7 @@ describe('Rest Client', function () { }; beforeEach(function () { setupClient(); - asyncResult = aorClient(types.UPDATE, 'posts', params); + asyncResult = aorClient(UPDATE, 'posts', params); }); it("calls the client's update method with the id and data in params", function () { @@ -347,7 +357,7 @@ describe('Rest Client', function () { }; beforeEach(function () { setupClient(); - asyncResult = aorClient(types.CREATE, 'posts', params); + asyncResult = aorClient(CREATE, 'posts', params); }); it("calls the client's create method with the data in params", function () { @@ -368,7 +378,7 @@ describe('Rest Client', function () { let params = { id: 1 }; beforeEach(function () { setupClient(); - asyncResult = aorClient(types.DELETE, 'posts', params); + asyncResult = aorClient(DELETE, 'posts', params); }); it("calls the client's remove method with the id in params", function () {