From 7d41d04fe3d7be22628e4d8bb3078f76204656be Mon Sep 17 00:00:00 2001 From: Antonin Cezard Date: Mon, 20 Dec 2021 14:55:22 +0100 Subject: [PATCH] fix: Update dependencies --- .nvmrc | 1 + package.json | 2 +- src/components/notes/EditorCorner.jsx | 11 ++- src/components/notes/EditorCorner.spec.jsx | 3 +- src/components/notes/editor.jsx | 2 +- src/targets/browser/index.jsx | 2 +- yarn.lock | 106 ++++++++++++++++++--- 7 files changed, 110 insertions(+), 17 deletions(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..48082f72 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +12 diff --git a/package.json b/package.json index c1efd81f..82898cda 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@material-ui/styles": "4.11.4", "classnames": "2.3.1", "cozy-bar": "7.16.0", - "cozy-client": "^24.9.1", + "cozy-client": "^27.6.5", "cozy-device-helper": "1.12.0", "cozy-doctypes": "1.82.2", "cozy-editor-core": "134.0.3", diff --git a/src/components/notes/EditorCorner.jsx b/src/components/notes/EditorCorner.jsx index 15e7c209..b579f14a 100644 --- a/src/components/notes/EditorCorner.jsx +++ b/src/components/notes/EditorCorner.jsx @@ -7,13 +7,22 @@ import { useI18n } from 'cozy-ui/transpiled/react/I18n' import SharingWidget from 'components/notes/sharing' +// https://mui.com/components/tooltips/#custom-child-element +const ForwardedIcon = React.forwardRef(function ForwardedIcon(props, ref) { + return ( +
+ +
+ ) +}) + const EditorCorner = ({ doc, isPublic, isReadOnly, title }) => { const { t } = useI18n() if (!isPublic) return else if (isReadOnly) { return ( - + ) } else return null diff --git a/src/components/notes/EditorCorner.spec.jsx b/src/components/notes/EditorCorner.spec.jsx index e298e1a0..7461b9d2 100644 --- a/src/components/notes/EditorCorner.spec.jsx +++ b/src/components/notes/EditorCorner.spec.jsx @@ -38,10 +38,9 @@ describe('EditorCorner', () => { - `) diff --git a/src/components/notes/editor.jsx b/src/components/notes/editor.jsx index aa2c6149..d902f0e9 100644 --- a/src/components/notes/editor.jsx +++ b/src/components/notes/editor.jsx @@ -152,5 +152,5 @@ Editor.propTypes = { noteId: PropTypes.string.isRequired, readOnly: PropTypes.bool.isRequired, userName: PropTypes.string, - returnUrl: PropTypes.string + returnUrl: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]).isRequired } diff --git a/src/targets/browser/index.jsx b/src/targets/browser/index.jsx index 676ea025..af4d9bff 100644 --- a/src/targets/browser/index.jsx +++ b/src/targets/browser/index.jsx @@ -110,7 +110,7 @@ export const initApp = () => { const shareCode = getPublicSharecode() const token = shareCode || data.token - const isPublic = shareCode || !token || token == '' + const isPublic = Boolean(shareCode || !token || token == '') // initialize the client to interact with the cozy stack const client = new CozyClient({ diff --git a/yarn.lock b/yarn.lock index 1b15f5b8..3f68d35d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4333,6 +4333,18 @@ array.prototype.flatmap@^1.2.4: es-abstract "^1.18.0-next.1" function-bind "^1.1.1" +array.prototype.foreach@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array.prototype.foreach/-/array.prototype.foreach-1.0.2.tgz#592b177c8d6abb84e14de1649eb6e7cc5eb9c9ae" + integrity sha512-gCOgyBKIaFL5hekfQLhsNmF0TY4Y5JdtOyFKtbSpL72oiCAZ9Zi7TFvcfSsM1LnBFMog1RYVJF0PHgtnY+U5nA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + es-array-method-boxes-properly "^1.0.0" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + asap@~2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -5830,10 +5842,10 @@ cozy-client@13.8.3: sift "^6.0.0" url-search-params-polyfill "^7.0.0" -cozy-client@^24.9.1: - version "24.10.0" - resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-24.10.0.tgz#78eaafc8ea9150488f7c4d1db6585fa2a94d3e14" - integrity sha512-hNr4hZD8NAKRQsNoUgHO0fJz1kF8sD42k0l9u0swq4NNBOJYteZfdE+TV1tu1Pzy/u+6KJKlt19PiLNnzD1/tg== +cozy-client@^27.6.5: + version "27.6.5" + resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-27.6.5.tgz#07ea2be571c030cd05df7841c8fc837ec8f7b3d2" + integrity sha512-FjgHfoNC3EM/d/ov2UEYPxDKkybzCWrJuM+VvP8QSpBsQILVVZUymUZaJNXZTwOB+r6Bd9z9e0X6AZ9u7z545w== dependencies: "@cozy/minilog" "1.0.0" "@types/jest" "^26.0.20" @@ -5842,11 +5854,12 @@ cozy-client@^24.9.1: cozy-device-helper "^1.12.0" cozy-flags "2.7.1" cozy-logger "^1.6.0" - cozy-stack-client "^24.10.0" + cozy-stack-client "^27.6.5" json-stable-stringify "^1.0.1" lodash "^4.17.13" microee "^0.0.6" node-fetch "^2.6.1" + node-polyglot "2.4.2" open "7.4.2" prop-types "^15.6.2" react-redux "^7.2.0" @@ -6135,10 +6148,10 @@ cozy-stack-client@^13.8.3: mime "^2.4.0" qs "^6.7.0" -cozy-stack-client@^24.10.0: - version "24.10.0" - resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-24.10.0.tgz#892996c4a144bf838e23ce6801ef581e9e7145bd" - integrity sha512-N5BsJAic4YFyctU/GQ+CXxq+fRzMrggBLEqbm3my/N8MccBnWpS4U35ljeOUrZPSEUsiLnZKGUL6RI1i2beuxA== +cozy-stack-client@^27.6.5: + version "27.6.5" + resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-27.6.5.tgz#4b40ad59821b957f161a77132b5346e99be0bc2c" + integrity sha512-aGkchVfvVGfI38qt+R8/BKv8nFN6Ihhx1LFsDYDtV+mW6OxOqVYdd22sIg9iHkusaqJgxgkMYnB9NcnDlC8Ajg== dependencies: cozy-flags "2.7.1" detect-node "^2.0.4" @@ -7136,6 +7149,32 @@ es-abstract@^1.17.2, es-abstract@^1.17.4, es-abstract@^1.18.0, es-abstract@^1.18 string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" +es-abstract@^1.19.0, es-abstract@^1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" + integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.1" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.1" + is-string "^1.0.7" + is-weakref "^1.0.1" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + es-array-method-boxes-properly@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" @@ -8340,6 +8379,14 @@ get-stream@^5.0.0: dependencies: pump "^3.0.0" +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -9276,6 +9323,11 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.1.5, is-callable@^1.2.3: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== +is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -9513,7 +9565,7 @@ is-primitive@^2.0.0: resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= -is-regex@^1.0.4, is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.3: +is-regex@^1.0.4, is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.3, is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -9521,6 +9573,11 @@ is-regex@^1.0.4, is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.3: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-shared-array-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" + integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== + is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -9531,7 +9588,7 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-string@^1.0.5, is-string@^1.0.6: +is-string@^1.0.5, is-string@^1.0.6, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== @@ -9560,6 +9617,13 @@ is-utf8@^0.2.0: resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= +is-weakref@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-whitespace-character@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" @@ -11444,6 +11508,17 @@ node-notifier@^8.0.0: uuid "^8.3.0" which "^2.0.2" +node-polyglot@2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/node-polyglot/-/node-polyglot-2.4.2.tgz#e4876e6710b70dc00b1351a9a68de4af47a5d61d" + integrity sha512-AgTVpQ32BQ5XPI+tFHJ9bCYxWwSLvtmEodX8ooftFhEuyCgBG6ijWulIVb7pH3THigtgvc9uLiPn0IO51KHpkg== + dependencies: + array.prototype.foreach "^1.0.0" + has "^1.0.3" + object.entries "^1.1.4" + string.prototype.trim "^1.2.4" + warning "^4.0.3" + node-polyglot@^2.2.2: version "2.4.0" resolved "https://registry.yarnpkg.com/node-polyglot/-/node-polyglot-2.4.0.tgz#0d2717ed06640d9ff48a2aebe8d13e39ef03518f" @@ -14663,6 +14738,15 @@ string.prototype.trim@^1.1.2, string.prototype.trim@^1.2.1: define-properties "^1.1.3" es-abstract "^1.18.0-next.2" +string.prototype.trim@^1.2.4: + version "1.2.5" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz#a587bcc8bfad8cb9829a577f5de30dd170c1682c" + integrity sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + string.prototype.trimend@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80"