mirror of
https://github.com/zhigang1992/firecms.git
synced 2026-06-15 01:58:59 +08:00
Dependencies fix
Release 0.1.1
This commit is contained in:
@@ -1,38 +1,42 @@
|
||||
{
|
||||
"name": "firecms-example",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"react": "link:../node_modules/react",
|
||||
"react-dom": "link:../node_modules/react-dom",
|
||||
"react-scripts": "link:../node_modules/react-scripts",
|
||||
"firecms": "link:.."
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node ../node_modules/react-scripts/bin/react-scripts.js start",
|
||||
"build": "node ../node_modules/react-scripts/bin/react-scripts.js build",
|
||||
"test": "node ../node_modules/react-scripts/bin/react-scripts.js test",
|
||||
"eject": "node ../node_modules/react-scripts/bin/react-scripts.js eject",
|
||||
"deploy": "yarn run build && firebase deploy --only hosting"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^16.9.23",
|
||||
"@types/react-dom": "^16.9.5",
|
||||
"@types/react-router-dom": "^5.1.3"
|
||||
}
|
||||
"name": "firecms-example",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@material-ui/core": "link:../node_modules/@material-ui/core",
|
||||
"@material-ui/icons": "link:../node_modules/@material-ui/icons",
|
||||
"@material-ui/pickers": "link:../node_modules/firebase",
|
||||
"firebase": "link:../node_modules/firebase",
|
||||
"react": "link:../node_modules/react",
|
||||
"react-dom": "link:../node_modules/react-dom",
|
||||
"react-scripts": "link:../node_modules/react-scripts",
|
||||
"firecms": "link:.."
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node ../node_modules/react-scripts/bin/react-scripts.js start",
|
||||
"build": "node ../node_modules/react-scripts/bin/react-scripts.js build",
|
||||
"test": "node ../node_modules/react-scripts/bin/react-scripts.js test",
|
||||
"eject": "node ../node_modules/react-scripts/bin/react-scripts.js eject",
|
||||
"deploy": "yarn run build && firebase deploy --only hosting"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^16.9.23",
|
||||
"@types/react-dom": "^16.9.5",
|
||||
"@types/react-router-dom": "^5.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ const blogSchema: EntitySchema = {
|
||||
ReactDOM.render(
|
||||
<CMSApp
|
||||
name={"Test shop CMS"}
|
||||
authentication={false}
|
||||
authentication={true}
|
||||
navigation={[
|
||||
{
|
||||
relativePath: "products",
|
||||
|
||||
@@ -966,7 +966,7 @@
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.1.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7":
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.1.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7":
|
||||
version "7.9.2"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06"
|
||||
integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==
|
||||
@@ -1024,7 +1024,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-10.1.0.tgz#f0950bba18819512d42f7197e56c518aa491cf18"
|
||||
integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==
|
||||
|
||||
"@date-io/core@1.x", "@date-io/core@^1.3.13":
|
||||
"@date-io/core@^1.3.13":
|
||||
version "1.3.13"
|
||||
resolved "https://registry.yarnpkg.com/@date-io/core/-/core-1.3.13.tgz#90c71da493f20204b7a972929cc5c482d078b3fa"
|
||||
integrity sha512-AlEKV7TxjeK+jxWVKcCFrfYAk8spX9aCyiToFIiLPtfQbsjmRGLIhb5VZgptQcJdHtLXo7+m0DuurwFgUToQuA==
|
||||
@@ -1531,30 +1531,13 @@
|
||||
"@types/istanbul-reports" "^1.1.1"
|
||||
"@types/yargs" "^13.0.0"
|
||||
|
||||
"@material-ui/core@^4.9.9":
|
||||
version "4.9.10"
|
||||
resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.10.tgz#53f1d18bd274c258698b6cfdab3c4bee0edf7892"
|
||||
integrity sha512-CQuZU9Y10RkwSdxjn785kw2EPcXhv5GKauuVQufR9LlD37kjfn21Im1yvr6wsUzn81oLhEvVPz727UWC0gbqxg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@material-ui/styles" "^4.9.10"
|
||||
"@material-ui/system" "^4.9.10"
|
||||
"@material-ui/types" "^5.0.1"
|
||||
"@material-ui/utils" "^4.9.6"
|
||||
"@types/react-transition-group" "^4.2.0"
|
||||
clsx "^1.0.4"
|
||||
hoist-non-react-statics "^3.3.2"
|
||||
popper.js "^1.16.1-lts"
|
||||
prop-types "^15.7.2"
|
||||
react-is "^16.8.0"
|
||||
react-transition-group "^4.3.0"
|
||||
"@material-ui/core@link:../node_modules/@material-ui/core":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@material-ui/icons@^4.9.1":
|
||||
version "4.9.1"
|
||||
resolved "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.9.1.tgz#fdeadf8cb3d89208945b33dbc50c7c616d0bd665"
|
||||
integrity sha512-GBitL3oBWO0hzBhvA9KxqcowRUsA0qzwKkURyC8nppnC3fw54KPKZ+d4V1Eeg/UnDRSzDaI9nGCdel/eh9AQMg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@material-ui/icons@link:../node_modules/@material-ui/icons":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@material-ui/lab@latest":
|
||||
version "4.0.0-alpha.49"
|
||||
@@ -1567,17 +1550,9 @@
|
||||
prop-types "^15.7.2"
|
||||
react-is "^16.8.0"
|
||||
|
||||
"@material-ui/pickers@^3.2.10":
|
||||
version "3.2.10"
|
||||
resolved "https://registry.yarnpkg.com/@material-ui/pickers/-/pickers-3.2.10.tgz#19df024895876eb0ec7cd239bbaea595f703f0ae"
|
||||
integrity sha512-B8G6Obn5S3RCl7hwahkQj9sKUapwXWFjiaz/Bsw1fhYFdNMnDUolRiWQSoKPb1/oKe37Dtfszoywi1Ynbo3y8w==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.6.0"
|
||||
"@date-io/core" "1.x"
|
||||
"@types/styled-jsx" "^2.2.8"
|
||||
clsx "^1.0.2"
|
||||
react-transition-group "^4.0.0"
|
||||
rifm "^0.7.0"
|
||||
"@material-ui/pickers@link:../node_modules/firebase":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@material-ui/styles@^4.9.10":
|
||||
version "4.9.10"
|
||||
@@ -1697,25 +1672,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
|
||||
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=
|
||||
|
||||
"@react-google-maps/api@^1.8.6":
|
||||
version "1.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@react-google-maps/api/-/api-1.8.6.tgz#0a68f5f726f2cb2551f855c9f8493c854fb2782f"
|
||||
integrity sha512-zioXQwqc6Cuw8hOkuf4TIJdvzgXGT+h7Hj2SVFm9AHvfaYMfhNxVnID/8txaX/iDxKG83qTFwMH3AoRrNSlaFQ==
|
||||
dependencies:
|
||||
"@react-google-maps/infobox" "1.8.6"
|
||||
"@react-google-maps/marker-clusterer" "1.8.6"
|
||||
invariant "2.2.4"
|
||||
|
||||
"@react-google-maps/infobox@1.8.6":
|
||||
version "1.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@react-google-maps/infobox/-/infobox-1.8.6.tgz#16b00052581fcafc3ca073e73100f05cb1f13002"
|
||||
integrity sha512-q3V1NdVzMLesW2/TEoszzLPOFXpovjrEgyXR0ftZIZBRqXWPl/YKjYUYDDSKf6GDo0d91r8K/yBqkywQBfQENQ==
|
||||
|
||||
"@react-google-maps/marker-clusterer@1.8.6":
|
||||
version "1.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@react-google-maps/marker-clusterer/-/marker-clusterer-1.8.6.tgz#ec26d76e890fa8a7ee7d6a810fce29a39e156e7b"
|
||||
integrity sha512-aEJikokaGBd6hPhTXDSaQCSUaXrvSoKUmmXRFIq2sQz0hp4oJJnlkSl2Me6cV0inUaboNCK2lunKGCsgDrzOzQ==
|
||||
|
||||
"@svgr/babel-plugin-add-jsx-attribute@^4.2.0":
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.2.0.tgz#dadcb6218503532d6884b210e7f3c502caaa44b1"
|
||||
@@ -1876,11 +1832,6 @@
|
||||
"@types/minimatch" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/googlemaps@^3.39.3":
|
||||
version "3.39.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/googlemaps/-/googlemaps-3.39.3.tgz#8664e424f335802c8aa46a94676666b0a0f31d97"
|
||||
integrity sha512-L8O9HAVFZj0TuiS8h5ORthiMsrrhjxTC8XUusp5k47oXCst4VTm+qWKvrAvmYMybZVokbp4Udco1mNwJrTNZPQ==
|
||||
|
||||
"@types/history@*":
|
||||
version "4.7.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.5.tgz#527d20ef68571a4af02ed74350164e7a67544860"
|
||||
@@ -1990,13 +1941,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
|
||||
integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==
|
||||
|
||||
"@types/styled-jsx@^2.2.8":
|
||||
version "2.2.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/styled-jsx/-/styled-jsx-2.2.8.tgz#b50d13d8a3c34036282d65194554cf186bab7234"
|
||||
integrity sha512-Yjye9VwMdYeXfS71ihueWRSxrruuXTwKCbzue4+5b2rjnQ//AtyM7myZ1BEhNhBQ/nL/RE7bdToUoLln2miKvg==
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/yargs-parser@*":
|
||||
version "15.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d"
|
||||
@@ -5029,25 +4973,9 @@ find-up@^3.0.0:
|
||||
dependencies:
|
||||
locate-path "^3.0.0"
|
||||
|
||||
firebase@^7.10.0:
|
||||
version "7.14.0"
|
||||
resolved "https://registry.yarnpkg.com/firebase/-/firebase-7.14.0.tgz#8a6adfa2fa3200c128bb45e3da029b52917154c8"
|
||||
integrity sha512-4QjP8WxVwVh6lvP8I96Wg11coJQ8si093xxUmafdOL7hWzG8u80EdlJOClK9zG8R37OjJRNsmXdslqFiJoGK5g==
|
||||
dependencies:
|
||||
"@firebase/analytics" "0.3.2"
|
||||
"@firebase/app" "0.6.1"
|
||||
"@firebase/app-types" "0.6.0"
|
||||
"@firebase/auth" "0.14.2"
|
||||
"@firebase/database" "0.6.0"
|
||||
"@firebase/firestore" "1.14.0"
|
||||
"@firebase/functions" "0.4.40"
|
||||
"@firebase/installations" "0.4.7"
|
||||
"@firebase/messaging" "0.6.12"
|
||||
"@firebase/performance" "0.3.0"
|
||||
"@firebase/polyfill" "0.3.33"
|
||||
"@firebase/remote-config" "0.1.18"
|
||||
"@firebase/storage" "0.3.31"
|
||||
"@firebase/util" "0.2.44"
|
||||
"firebase@link:../node_modules/firebase":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"firecms@link:..":
|
||||
version "0.0.0"
|
||||
@@ -5887,7 +5815,7 @@ internal-slot@^1.0.2:
|
||||
has "^1.0.3"
|
||||
side-channel "^1.0.2"
|
||||
|
||||
invariant@2.2.4, invariant@^2.2.2, invariant@^2.2.4:
|
||||
invariant@^2.2.2, invariant@^2.2.4:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
|
||||
integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
|
||||
@@ -7241,7 +7169,7 @@ map-visit@^1.0.0:
|
||||
dependencies:
|
||||
object-visit "^1.0.0"
|
||||
|
||||
material-ui-chip-input@>=1:
|
||||
material-ui-chip-input@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/material-ui-chip-input/-/material-ui-chip-input-1.1.0.tgz#46550074da358fcfe075350181c315c9a405dc7d"
|
||||
integrity sha512-95JsxYtzBFUyvzLC0Ae8qo1h8heu9wcSgnGjF/Sy9QQ9pL/ufLVUyjS8uFULW4kEyeNZbZurux3KZKC3FLnoqg==
|
||||
@@ -9389,7 +9317,7 @@ react-select@>=3:
|
||||
react-input-autosize "^2.2.2"
|
||||
react-transition-group "^4.3.0"
|
||||
|
||||
react-transition-group@^4.0.0, react-transition-group@^4.3.0:
|
||||
react-transition-group@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.3.0.tgz#fea832e386cf8796c58b61874a3319704f5ce683"
|
||||
integrity sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw==
|
||||
@@ -9770,13 +9698,6 @@ rgba-regex@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3"
|
||||
integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=
|
||||
|
||||
rifm@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/rifm/-/rifm-0.7.0.tgz#debe951a9c83549ca6b33e5919f716044c2230be"
|
||||
integrity sha512-DSOJTWHD67860I5ojetXdEQRIBvF6YcpNe53j0vn1vp9EUb9N80EiZTxgP+FkDKorWC8PZw052kTF4C1GOivCQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.3.1"
|
||||
|
||||
rimraf@2.6.3:
|
||||
version "2.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
|
||||
@@ -10907,11 +10828,6 @@ typedarray@^0.0.6:
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript-eslint@^0.0.1-alpha.0:
|
||||
version "0.0.1-alpha.0"
|
||||
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-0.0.1-alpha.0.tgz#285d68a4e96588295cd436278801bcb6a6b916c1"
|
||||
integrity sha512-1hNKM37dAWML/2ltRXupOq2uqcdRQyDFphl+341NTPXFLLLiDhErXx8VtaSLh3xP7SyHZdcCgpt9boYYVb3fQg==
|
||||
|
||||
unicode-canonical-property-names-ecmascript@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
|
||||
|
||||
16
package.json
16
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@camberi/firecms",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"description": "Awesome Firestore based CMS",
|
||||
"author": "camberi",
|
||||
"license": "GPL-3.0",
|
||||
@@ -26,16 +26,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@date-io/date-fns": "^1.3.11",
|
||||
"@material-ui/core": "^4.9.9",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "latest",
|
||||
"@material-ui/pickers": "^3.2.10",
|
||||
"date-fns": "^2.10.0",
|
||||
"firebase": "^7.10.0",
|
||||
"formik": "^2.1.4",
|
||||
"material-ui-chip-input": "^1.1.0",
|
||||
"material-ui-dropzone": "^2.4.9",
|
||||
"material-ui-popup-state": "^1.5.4",
|
||||
"@material-ui/lab": "latest",
|
||||
"object-hash": "^2.0.3",
|
||||
"react-router-dom": "^5.1.2",
|
||||
"react-select": ">=3",
|
||||
@@ -44,7 +40,11 @@
|
||||
"peerDependencies": {
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-scripts": "^3.4.1"
|
||||
"react-scripts": "^3.4.1",
|
||||
"@material-ui/core": "^4.9.9",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/pickers": "^3.2.10",
|
||||
"firebase": "^7.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prop-types": "^15.7.2",
|
||||
@@ -94,7 +94,7 @@
|
||||
"react-scripts": "^3.4.1",
|
||||
"react-select": ">=3",
|
||||
"typescript": "^3.8.3",
|
||||
"typescript-eslint": "^0.0.1-alpha.0",
|
||||
"@typescript-eslint/eslint-plugin": "^2.28.0",
|
||||
"yup": "^0.28.3"
|
||||
},
|
||||
"files": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect } from "react";
|
||||
import {
|
||||
AppBar,
|
||||
AppBar, Box,
|
||||
Button,
|
||||
CssBaseline,
|
||||
Divider,
|
||||
@@ -290,7 +290,7 @@ export default function CMSApp({
|
||||
|
||||
function renderMainView() {
|
||||
if (error) {
|
||||
return <div> {error} </div>;
|
||||
return <Box> {error} </Box>;
|
||||
}
|
||||
|
||||
if (!firebaseConfigInitialized) {
|
||||
@@ -301,8 +301,8 @@ export default function CMSApp({
|
||||
includeMedia !== undefined && includeMedia;
|
||||
|
||||
const drawer = (
|
||||
<div>
|
||||
<div className={classes.toolbar}/>
|
||||
<React.Fragment>
|
||||
<Box className={classes.toolbar}/>
|
||||
<Divider/>
|
||||
<List>
|
||||
{Object.entries(navigation).map(([key, view], index) => (
|
||||
@@ -341,13 +341,13 @@ export default function CMSApp({
|
||||
</React.Fragment>
|
||||
)}
|
||||
</List>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
return (
|
||||
<AuthContext.Provider value={loggedUser}>
|
||||
<Router>
|
||||
<div className={classes.root}>
|
||||
<Box className={classes.root}>
|
||||
<CssBaseline/>
|
||||
<AppBar position="fixed" className={classes.appBar}>
|
||||
<Toolbar>
|
||||
@@ -363,7 +363,7 @@ export default function CMSApp({
|
||||
<Typography variant="h6" noWrap>
|
||||
{name}
|
||||
</Typography>
|
||||
<div className={classes.grow}/>
|
||||
<Box className={classes.grow}/>
|
||||
<Button variant="text" color="inherit"
|
||||
onClick={onSignOut}>
|
||||
Log Out
|
||||
@@ -401,10 +401,10 @@ export default function CMSApp({
|
||||
</Hidden>
|
||||
</nav>
|
||||
<main className={classes.content}>
|
||||
<div className={classes.toolbar}/>
|
||||
<Box className={classes.toolbar}/>
|
||||
{getRouterSwitch(shouldIncludeMedia)}
|
||||
</main>
|
||||
</div>
|
||||
</Box>
|
||||
</Router>
|
||||
</AuthContext.Provider>
|
||||
);
|
||||
|
||||
@@ -159,7 +159,9 @@ interface BaseProperty<T> {
|
||||
|
||||
/**
|
||||
* When the entity is rendered as the target of a reference or as part of a
|
||||
* map, should this property be included
|
||||
* map, should this property be included.
|
||||
* If includeAsMapPreview is not specified in any property of an entity, when
|
||||
* the given entity is rendered, the first 3 properties are displayed.
|
||||
*/
|
||||
includeAsMapPreview?: boolean;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface ReferencePreviewProps<S extends EntitySchema> {
|
||||
|
||||
schema: S;
|
||||
|
||||
renderPreviewComponent(value: any, property: Property):JSX.Element
|
||||
renderPreviewComponent(value: any, property: Property): JSX.Element
|
||||
}
|
||||
|
||||
export default function ReferencePreview<S extends EntitySchema>(
|
||||
@@ -37,7 +37,10 @@ export default function ReferencePreview<S extends EntitySchema>(
|
||||
if (!entity)
|
||||
return (<CircularProgress/>);
|
||||
|
||||
const listProperties = Object.entries(schema.properties).filter(([_, property]) => property.includeInListView );
|
||||
let listProperties = Object.entries(schema.properties).filter(([_, property]) => property.includeAsMapPreview);
|
||||
if (!listProperties) {
|
||||
listProperties = Object.entries(schema.properties).slice(0, 3);
|
||||
}
|
||||
|
||||
return (
|
||||
<List>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
Box,
|
||||
CardMedia,
|
||||
Chip,
|
||||
Container,
|
||||
@@ -71,7 +72,11 @@ export default function renderPreviewComponent(value: any, property: Property):
|
||||
|
||||
|
||||
function renderMap(property: MapProperty<any>, values: any) {
|
||||
const listProperties = Object.entries(property.properties).filter(([_, property]) => property.includeAsMapPreview);
|
||||
|
||||
let listProperties = Object.entries(property.properties).filter(([_, property]) => property.includeAsMapPreview);
|
||||
if (!listProperties) {
|
||||
listProperties = Object.entries(property.properties).slice(0, 3);
|
||||
}
|
||||
|
||||
return (
|
||||
<List>
|
||||
@@ -86,7 +91,10 @@ function renderMap(property: MapProperty<any>, values: any) {
|
||||
|
||||
function renderArrayOfMaps(properties: Properties, values: any[]) {
|
||||
|
||||
const tableProperties = Object.entries(properties).filter(([_, property]) => property.includeAsMapPreview);
|
||||
let tableProperties = Object.entries(properties).filter(([_, property]) => property.includeAsMapPreview);
|
||||
if (!tableProperties) {
|
||||
tableProperties = Object.entries(properties).slice(0, 3);
|
||||
}
|
||||
|
||||
return <Table
|
||||
size={"small"}>
|
||||
@@ -161,12 +169,12 @@ function renderUrlAudioComponent(value: any) {
|
||||
|
||||
function renderUrlImageThumbnail(url: string) {
|
||||
return (
|
||||
<Container maxWidth={"sm"}>
|
||||
<Box maxWidth={300} maxHeight={300}>
|
||||
<CardMedia
|
||||
component="img"
|
||||
image={url}
|
||||
/>
|
||||
</Container>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -99,9 +99,6 @@ export const formStyles = makeStyles(theme => ({
|
||||
|
||||
},
|
||||
},
|
||||
stepper: {
|
||||
padding: theme.spacing(3, 0, 5)
|
||||
},
|
||||
buttons: {
|
||||
display: "flex",
|
||||
justifyContent: "flex-end"
|
||||
|
||||
38
yarn.lock
38
yarn.lock
@@ -2257,6 +2257,16 @@
|
||||
regexpp "^3.0.0"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^2.28.0":
|
||||
version "2.28.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz#4431bc6d3af41903e5255770703d4e55a0ccbdec"
|
||||
integrity sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "2.28.0"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
regexpp "^3.0.0"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@typescript-eslint/experimental-utils@2.27.0":
|
||||
version "2.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.27.0.tgz#801a952c10b58e486c9a0b36cf21e2aab1e9e01a"
|
||||
@@ -2267,6 +2277,16 @@
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
"@typescript-eslint/experimental-utils@2.28.0":
|
||||
version "2.28.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz#1fd0961cd8ef6522687b4c562647da6e71f8833d"
|
||||
integrity sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.3"
|
||||
"@typescript-eslint/typescript-estree" "2.28.0"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
"@typescript-eslint/parser@^2.10.0":
|
||||
version "2.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.27.0.tgz#d91664335b2c46584294e42eb4ff35838c427287"
|
||||
@@ -2290,6 +2310,19 @@
|
||||
semver "^6.3.0"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@typescript-eslint/typescript-estree@2.28.0":
|
||||
version "2.28.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz#d34949099ff81092c36dc275b6a1ea580729ba00"
|
||||
integrity sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
glob "^7.1.6"
|
||||
is-glob "^4.0.1"
|
||||
lodash "^4.17.15"
|
||||
semver "^6.3.0"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@webassemblyjs/ast@1.8.5":
|
||||
version "1.8.5"
|
||||
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359"
|
||||
@@ -12439,11 +12472,6 @@ typedarray@^0.0.6:
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript-eslint@^0.0.1-alpha.0:
|
||||
version "0.0.1-alpha.0"
|
||||
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-0.0.1-alpha.0.tgz#285d68a4e96588295cd436278801bcb6a6b916c1"
|
||||
integrity sha512-1hNKM37dAWML/2ltRXupOq2uqcdRQyDFphl+341NTPXFLLLiDhErXx8VtaSLh3xP7SyHZdcCgpt9boYYVb3fQg==
|
||||
|
||||
typescript@^3.8.3:
|
||||
version "3.8.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
|
||||
|
||||
Reference in New Issue
Block a user