From 7fd0605c3e4ff52f30a1fb3bd0d8da2168f583f5 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Mon, 6 Feb 2023 15:28:33 +0100 Subject: [PATCH 01/18] feat: plugin error handling --- adapter/package.json | 3 +- adapter/src/components/AppWrapper.js | 34 +- adapter/src/components/ErrorBoundary.js | 17 + .../components/styles/ErrorBoundary.style.js | 12 +- adapter/src/index.js | 9 +- shell/package.json | 4 +- yarn.lock | 2003 +++++------------ 7 files changed, 622 insertions(+), 1460 deletions(-) diff --git a/adapter/package.json b/adapter/package.json index 83a8ef9ce..743efad5c 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -22,7 +22,8 @@ ], "dependencies": { "@dhis2/pwa": "10.2.0", - "moment": "^2.24.0" + "moment": "^2.24.0", + "post-robot": "^10.0.46" }, "devDependencies": { "@dhis2/cli-app-scripts": "10.2.0", diff --git a/adapter/src/components/AppWrapper.js b/adapter/src/components/AppWrapper.js index bbc9c799a..cc70d7e6c 100644 --- a/adapter/src/components/AppWrapper.js +++ b/adapter/src/components/AppWrapper.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import React from 'react' +import React, {createContext, useContext, useState} from 'react' import { useCurrentUserLocale } from '../utils/useLocale.js' import { useVerifyLatestUser } from '../utils/useVerifyLatestUser.js' import { Alerts } from './Alerts.js' @@ -7,15 +7,41 @@ import { ConnectedHeaderBar } from './ConnectedHeaderBar.js' import { ErrorBoundary } from './ErrorBoundary.js' import { LoadingMask } from './LoadingMask.js' import { styles } from './styles/AppWrapper.style.js' +import { PluginErrorProvider, usePluginErrorContext } from '@dhis2/app-runtime' -export const AppWrapper = ({ children, plugin }) => { +const PluginErrorBoundaryWrapper = ({children}) => { + const {onPluginError} = usePluginErrorContext() + return ( + window.location.reload()}> + {children} + + ) +} + +const AppWrapper = ({ children, plugin }) => { const { loading: localeLoading } = useCurrentUserLocale() - const { loading: latestUserLoading } = useVerifyLatestUser() + const { loading: latestUserLoading } = useVerifyLatestUser() if (localeLoading || latestUserLoading) { return } + if (plugin) { + return ( +
+ +
+ + + {children} + + +
+ +
+ ) + } + return (
@@ -34,3 +60,5 @@ AppWrapper.propTypes = { children: PropTypes.node, plugin: PropTypes.bool, } + +export {usePluginErrorContext, AppWrapper} \ No newline at end of file diff --git a/adapter/src/components/ErrorBoundary.js b/adapter/src/components/ErrorBoundary.js index 36d7ce92d..6aaec1a32 100644 --- a/adapter/src/components/ErrorBoundary.js +++ b/adapter/src/components/ErrorBoundary.js @@ -36,6 +36,13 @@ export class ErrorBoundary extends Component { } componentDidCatch(error, errorInfo) { + if (this.props.plugin) { + if (this.props.onPluginError) { + console.log('special handling for error (from app)') + console.error(error) + this.props.onPluginError(error) + } + } this.setState({ error, errorInfo, @@ -58,6 +65,16 @@ export class ErrorBoundary extends Component { render() { const { children, fullscreen, onRetry } = this.props if (this.state.error) { + if (this.props.plugin) { + return ( + <> + +
+ I am the default plugin boundary +
+ + ) + } return (
diff --git a/adapter/src/components/styles/ErrorBoundary.style.js b/adapter/src/components/styles/ErrorBoundary.style.js index 917361d6b..d68333336 100644 --- a/adapter/src/components/styles/ErrorBoundary.style.js +++ b/adapter/src/components/styles/ErrorBoundary.style.js @@ -5,7 +5,8 @@ const bgColor = '#F4F6F8', primaryTextColor = '#000000', secondaryTextColor = '#494949', errorColor = '#D32F2F', - grey050 = '#FBFCFD' + grey050 = '#FBFCFD', + red200 = '#ffcdd2' export default css` .mask { @@ -100,4 +101,13 @@ export default css` color: ${errorColor}; font-family: Menlo, Courier, monospace !important; } + + .pluginBoundary { + background-color: ${red200}; + } + + .pluginBoundary span { + display: inline-block; + } + ` diff --git a/adapter/src/index.js b/adapter/src/index.js index c78084be6..d9bd62150 100644 --- a/adapter/src/index.js +++ b/adapter/src/index.js @@ -1,7 +1,7 @@ import { checkForSWUpdateAndReload } from '@dhis2/pwa' import PropTypes from 'prop-types' import React from 'react' -import { AppWrapper } from './components/AppWrapper.js' +import { usePluginErrorContext, AppWrapper } from './components/AppWrapper.js' import { ErrorBoundary } from './components/ErrorBoundary.js' import { OfflineInterfaceProvider } from './components/OfflineInterfaceContext.js' import { PWALoadingBoundary } from './components/PWALoadingBoundary.js' @@ -16,7 +16,11 @@ const AppAdapter = ({ plugin, children, }) => ( - + = 1.43.0 < 2": - version "1.51.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== - -mime-db@1.52.0: +mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -10170,14 +9662,7 @@ mime-types@2.1.18: dependencies: mime-db "~1.33.0" -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.34" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" - integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== - dependencies: - mime-db "1.51.0" - -mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -10204,20 +9689,13 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -mini-css-extract-plugin@^2.4.5: +mini-css-extract-plugin@^2.4.5, mini-css-extract-plugin@^2.5.3: version "2.6.1" resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.1.tgz#9a1251d15f2035c342d99a468ab9da7a0451b71e" integrity sha512-wd+SD57/K6DiV7jIR34P+s3uckTRuQvx0tKPcvjFlrEylk6P4mQ2KSWk1hblj1Kxaqok7LogKOieygXqBczNlg== dependencies: schema-utils "^4.0.0" -mini-css-extract-plugin@^2.5.3: - version "2.5.3" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.5.3.tgz#c5c79f9b22ce9b4f164e9492267358dbe35376d9" - integrity sha512-YseMB8cs8U/KCaAGQoqYmfUuhhGW0a9p9XvWXrxVOkE3/IiISTLw4ALNt7JR5B2eYauFM+PQGSbXMDmVbR7Tfw== - dependencies: - schema-utils "^4.0.0" - minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -10341,19 +9819,6 @@ ms@2.1.3, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -multicast-dns-service-types@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" - integrity sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ== - -multicast-dns@^6.0.1: - version "6.2.3" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" - integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g== - dependencies: - dns-packet "^1.3.1" - thunky "^1.0.2" - multicast-dns@^7.2.5: version "7.2.5" resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" @@ -10379,11 +9844,6 @@ nano-time@1.0.0: dependencies: big-integer "^1.6.16" -nanoid@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" - integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== - nanoid@^3.3.4: version "3.3.4" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" @@ -10456,11 +9916,6 @@ node-forge@^1: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== -node-forge@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.2.1.tgz#82794919071ef2eb5c509293325cec8afd0fd53c" - integrity sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w== - node-gettext@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/node-gettext/-/node-gettext-2.1.0.tgz#94d63e9cc0bcabd1e67de0680a44c812721a9023" @@ -10481,11 +9936,6 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" - integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg== - node-releases@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" @@ -10607,12 +10057,12 @@ object-hash@^3.0.0: resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== -object-inspect@^1.12.0, object-inspect@^1.12.2, object-inspect@^1.7.0, object-inspect@^1.9.0: +object-inspect@^1.12.2, object-inspect@^1.7.0, object-inspect@^1.9.0: version "1.12.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== -object-is@^1.0.1, object-is@^1.0.2, object-is@^1.1.2: +object-is@^1.0.2, object-is@^1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== @@ -10620,7 +10070,7 @@ object-is@^1.0.1, object-is@^1.0.2, object-is@^1.1.2: call-bind "^1.0.2" define-properties "^1.1.3" -object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -10637,17 +10087,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.0.4, object.assign@^4.1.0, object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.assign@^4.1.4: +object.assign@^4.0.4, object.assign@^4.1.0, object.assign@^4.1.2, object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -10657,16 +10097,7 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.1, object.entries@^1.1.2, object.entries@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" - integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.entries@^1.1.6: +object.entries@^1.1.1, object.entries@^1.1.2, object.entries@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== @@ -10675,16 +10106,7 @@ object.entries@^1.1.6: define-properties "^1.1.4" es-abstract "^1.20.4" -object.fromentries@^2.0.3, object.fromentries@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251" - integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.fromentries@^2.0.6: +object.fromentries@^2.0.3, object.fromentries@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.6.tgz#cdb04da08c539cffa912dcd368b886e0904bfa73" integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== @@ -10703,14 +10125,6 @@ object.getownpropertydescriptors@^2.1.0: define-properties "^1.1.4" es-abstract "^1.20.1" -object.hasown@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.1.tgz#ad1eecc60d03f49460600430d97f23882cf592a3" - integrity sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A== - dependencies: - define-properties "^1.1.4" - es-abstract "^1.19.5" - object.hasown@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.2.tgz#f919e21fad4eb38a57bc6345b3afd496515c3f92" @@ -10726,16 +10140,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0, object.values@^1.1.1, object.values@^1.1.2, object.values@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" - integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.values@^1.1.6: +object.values@^1.1.0, object.values@^1.1.1, object.values@^1.1.2, object.values@^1.1.5, object.values@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== @@ -10911,13 +10316,6 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - p-retry@^4.5.0: version "4.6.1" resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.1.tgz#8fcddd5cdf7a67a0911a9cf2ef0e5df7f602316c" @@ -11108,12 +10506,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" - integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== - -picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -11147,20 +10540,22 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -portfinder@^1.0.28: - version "1.0.28" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" - integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== - dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.5" - posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +post-robot@^10.0.46: + version "10.0.46" + resolved "https://registry.yarnpkg.com/post-robot/-/post-robot-10.0.46.tgz#39cea5b51033729390fc7c90be3285cd285f0377" + integrity sha512-EgVJiuvI4iRWDZvzObWes0X/n8olWBEJWxlSw79zmhpgkigX8UsVL4VOBhVtoJKwf0Y9qP9g2zOONw1rv80QbA== + dependencies: + belter "^1.0.41" + cross-domain-safe-weakmap "^1.0.1" + cross-domain-utils "^2.0.0" + universal-serialize "^1.0.4" + zalgo-promise "^1.0.3" + postcss-attribute-case-insensitive@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-5.0.1.tgz#86d323c77ab8896ed90500071c2c8329fba64fda" @@ -11672,7 +11067,7 @@ postcss-selector-not@^6.0.0: dependencies: postcss-selector-parser "^6.0.10" -postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.6: +postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.0.9: version "6.0.10" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== @@ -11680,14 +11075,6 @@ postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.6: cssesc "^3.0.0" util-deprecate "^1.0.2" -postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9: - version "6.0.9" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz#ee71c3b9ff63d9cd130838876c13a2ec1a992b2f" - integrity sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - postcss-svgo@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-5.1.0.tgz#0a317400ced789f233a28826e77523f15857d80d" @@ -11716,16 +11103,7 @@ postcss@^7.0.35: picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.3.5: - version "8.4.7" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.7.tgz#f99862069ec4541de386bf57f5660a6c7a0875a8" - integrity sha512-L9Ye3r6hkkCeOETQX6iOaWZgjp3LL6Lpqm6EtgbKrgqGGteRMNb9vzBfRL96YOSu8o7x3MfIH9Mo5cPJFGrW6A== - dependencies: - nanoid "^3.3.1" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -postcss@^8.4.14, postcss@^8.4.4, postcss@^8.4.7: +postcss@^8.3.5, postcss@^8.4.14, postcss@^8.4.4, postcss@^8.4.7: version "8.4.14" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== @@ -11993,37 +11371,7 @@ react-app-polyfill@^3.0.0: regenerator-runtime "^0.13.9" whatwg-fetch "^3.6.2" -react-dev-utils@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.0.tgz#4eab12cdb95692a077616770b5988f0adf806526" - integrity sha512-xBQkitdxozPxt1YZ9O1097EJiVpwHr9FoAuEVURCKV0Av8NBERovJauzP7bo1ThvuhZ4shsQ1AJiu4vQpoT1AQ== - dependencies: - "@babel/code-frame" "^7.16.0" - address "^1.1.2" - browserslist "^4.18.1" - chalk "^4.1.2" - cross-spawn "^7.0.3" - detect-port-alt "^1.1.6" - escape-string-regexp "^4.0.0" - filesize "^8.0.6" - find-up "^5.0.0" - fork-ts-checker-webpack-plugin "^6.5.0" - global-modules "^2.0.0" - globby "^11.0.4" - gzip-size "^6.0.0" - immer "^9.0.7" - is-root "^2.1.0" - loader-utils "^3.2.0" - open "^8.4.0" - pkg-up "^3.1.0" - prompts "^2.4.2" - react-error-overlay "^6.0.10" - recursive-readdir "^2.2.2" - shell-quote "^1.7.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -react-dev-utils@^12.0.1: +react-dev-utils@^12.0.0, react-dev-utils@^12.0.1: version "12.0.1" resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73" integrity sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ== @@ -12079,11 +11427,6 @@ react-dom@^16.8, react-dom@^16.8.6: prop-types "^15.6.2" scheduler "^0.19.1" -react-error-overlay@^6.0.10: - version "6.0.10" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.10.tgz#0fe26db4fa85d9dbb8624729580e90e7159a59a6" - integrity sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA== - react-error-overlay@^6.0.11: version "6.0.11" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" @@ -12362,7 +11705,7 @@ regex-parser@^2.2.11: resolved "https://registry.yarnpkg.com/regex-parser/-/regex-parser-2.2.11.tgz#3b37ec9049e19479806e878cabe7c1ca83ccfe58" integrity sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q== -regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.4.1, regexp.prototype.flags@^1.4.3: +regexp.prototype.flags@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== @@ -12809,13 +12152,6 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== -selfsigned@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.0.0.tgz#e927cd5377cbb0a1075302cff8df1042cc2bce5b" - integrity sha512-cUdFiCbKoa1mZ6osuJs2uDHrs0k0oprsKveFiiaBKCNq3SYyb5gs2HxhQyDNLCmL51ZZThqi4YNDpCK6GOP1iQ== - dependencies: - node-forge "^1.2.0" - selfsigned@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.0.1.tgz#8b2df7fa56bf014d19b6007655fff209c0ef0a56" @@ -13073,7 +12409,7 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -sockjs@^0.3.21, sockjs@^0.3.24: +sockjs@^0.3.24: version "0.3.24" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== @@ -13169,12 +12505,12 @@ source-map@0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== -source-map@^0.5.0, source-map@^0.5.6: +source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== -source-map@^0.7.3, source-map@~0.7.2: +source-map@^0.7.3: version "0.7.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== @@ -13397,21 +12733,7 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string.prototype.matchall@^4.0.6, string.prototype.matchall@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz#8e6ecb0d8a1fb1fda470d81acecb2dba057a481d" - integrity sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - get-intrinsic "^1.1.1" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.4.1" - side-channel "^1.0.4" - -string.prototype.matchall@^4.0.8: +string.prototype.matchall@^4.0.6, string.prototype.matchall@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" integrity sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg== @@ -13496,7 +12818,7 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-ansi@^7.0.0, strip-ansi@^7.0.1: +strip-ansi@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== @@ -13790,18 +13112,7 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz#0320dcc270ad5372c1e8993fabbd927929773e54" - integrity sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g== - dependencies: - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.0" - source-map "^0.6.1" - terser "^5.7.2" - -terser-webpack-plugin@^5.2.5: +terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.2.5, terser-webpack-plugin@^5.3.1: version "5.3.3" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz#8033db876dd5875487213e87c627bca323e5ed90" integrity sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ== @@ -13812,17 +13123,7 @@ terser-webpack-plugin@^5.2.5: serialize-javascript "^6.0.0" terser "^5.7.2" -terser@^5.0.0, terser@^5.10.0: - version "5.12.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.12.0.tgz#728c6bff05f7d1dcb687d8eace0644802a9dae8a" - integrity sha512-R3AUhNBGWiFc77HXag+1fXpAxTAFRQTJemlJKjAgD9r8xXTpjNKqIXwHM/o7Rh+O0kUJtS3WQVdBeMKFk5sw9A== - dependencies: - acorn "^8.5.0" - commander "^2.20.0" - source-map "~0.7.2" - source-map-support "~0.5.20" - -terser@^5.7.2: +terser@^5.0.0, terser@^5.10.0, terser@^5.7.2: version "5.14.1" resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.1.tgz#7c95eec36436cb11cf1902cc79ac564741d19eca" integrity sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ== @@ -14061,16 +13362,11 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" integrity sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg== -tslib@^2.0.1, tslib@^2.4.0: +tslib@^2.0.1, tslib@^2.0.3, tslib@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^2.0.3: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -14269,6 +13565,11 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" +universal-serialize@^1.0.4: + version "1.0.10" + resolved "https://registry.yarnpkg.com/universal-serialize/-/universal-serialize-1.0.10.tgz#3279bb30f47290ea479f45135620f98fa9d3f3a6" + integrity sha512-FdouA4xSFa0fudk1+z5vLWtxZCoC0Q9lKYV3uUdFl7DttNfolmiw2ASr5ddY+/Yz6Isr68u3IqC9XMSwMP+Pow== + universalify@^0.1.0, universalify@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -14587,7 +13888,7 @@ webpack-dev-middleware@^5.3.1: range-parser "^1.2.1" schema-utils "^4.0.0" -webpack-dev-server@^4.6.0: +webpack-dev-server@^4.6.0, webpack-dev-server@^4.7.4: version "4.9.2" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.9.2.tgz#c188db28c7bff12f87deda2a5595679ebbc3c9bc" integrity sha512-H95Ns95dP24ZsEzO6G9iT+PNw4Q7ltll1GfJHV4fKphuHWgKFzGHWi4alTlTnpk1SPPk41X+l2RB7rLfIhnB9Q== @@ -14622,42 +13923,6 @@ webpack-dev-server@^4.6.0: webpack-dev-middleware "^5.3.1" ws "^8.4.2" -webpack-dev-server@^4.7.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.7.4.tgz#d0ef7da78224578384e795ac228d8efb63d5f945" - integrity sha512-nfdsb02Zi2qzkNmgtZjkrMOcXnYZ6FLKcQwpxT7MvmHKc+oTtDsBju8j+NMyAygZ9GW1jMEUpy3itHtqgEhe1A== - dependencies: - "@types/bonjour" "^3.5.9" - "@types/connect-history-api-fallback" "^1.3.5" - "@types/express" "^4.17.13" - "@types/serve-index" "^1.9.1" - "@types/sockjs" "^0.3.33" - "@types/ws" "^8.2.2" - ansi-html-community "^0.0.8" - bonjour "^3.5.0" - chokidar "^3.5.3" - colorette "^2.0.10" - compression "^1.7.4" - connect-history-api-fallback "^1.6.0" - default-gateway "^6.0.3" - del "^6.0.0" - express "^4.17.1" - graceful-fs "^4.2.6" - html-entities "^2.3.2" - http-proxy-middleware "^2.0.0" - ipaddr.js "^2.0.1" - open "^8.0.9" - p-retry "^4.5.0" - portfinder "^1.0.28" - schema-utils "^4.0.0" - selfsigned "^2.0.0" - serve-index "^1.9.1" - sockjs "^0.3.21" - spdy "^4.0.2" - strip-ansi "^7.0.0" - webpack-dev-middleware "^5.3.1" - ws "^8.4.2" - webpack-manifest-plugin@^4.0.2: version "4.1.1" resolved "https://registry.yarnpkg.com/webpack-manifest-plugin/-/webpack-manifest-plugin-4.1.1.tgz#10f8dbf4714ff93a215d5a45bcc416d80506f94f" @@ -14821,14 +14086,6 @@ wordwrapjs@^3.0.0: reduce-flatten "^1.0.1" typical "^2.6.1" -workbox-background-sync@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-background-sync/-/workbox-background-sync-6.5.3.tgz#7c66c1836aeca6f3762dc48d17a1852a33b3168c" - integrity sha512-0DD/V05FAcek6tWv9XYj2w5T/plxhDSpclIcAGjA/b7t/6PdaRkQ7ZgtAX6Q/L7kV7wZ8uYRJUoH11VjNipMZw== - dependencies: - idb "^6.1.4" - workbox-core "6.5.3" - workbox-background-sync@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-background-sync/-/workbox-background-sync-6.5.4.tgz#3141afba3cc8aa2ae14c24d0f6811374ba8ff6a9" @@ -14837,13 +14094,6 @@ workbox-background-sync@6.5.4: idb "^7.0.1" workbox-core "6.5.4" -workbox-broadcast-update@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-broadcast-update/-/workbox-broadcast-update-6.5.3.tgz#fc2ad79cf507e22950cda9baf1e9a0ccc43f31bc" - integrity sha512-4AwCIA5DiDrYhlN+Miv/fp5T3/whNmSL+KqhTwRBTZIL6pvTgE4lVuRzAt1JltmqyMcQ3SEfCdfxczuI4kwFQg== - dependencies: - workbox-core "6.5.3" - workbox-broadcast-update@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-broadcast-update/-/workbox-broadcast-update-6.5.4.tgz#8441cff5417cd41f384ba7633ca960a7ffe40f66" @@ -14851,50 +14101,7 @@ workbox-broadcast-update@6.5.4: dependencies: workbox-core "6.5.4" -workbox-build@6.5.3, workbox-build@^6.1.5: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-build/-/workbox-build-6.5.3.tgz#38e3f286d63d2745bff4d1478bb3a6ab5c8b1170" - integrity sha512-8JNHHS7u13nhwIYCDea9MNXBNPHXCs5KDZPKI/ZNTr3f4sMGoD7hgFGecbyjX1gw4z6e9bMpMsOEJNyH5htA/w== - dependencies: - "@apideck/better-ajv-errors" "^0.3.1" - "@babel/core" "^7.11.1" - "@babel/preset-env" "^7.11.0" - "@babel/runtime" "^7.11.2" - "@rollup/plugin-babel" "^5.2.0" - "@rollup/plugin-node-resolve" "^11.2.1" - "@rollup/plugin-replace" "^2.4.1" - "@surma/rollup-plugin-off-main-thread" "^2.2.3" - ajv "^8.6.0" - common-tags "^1.8.0" - fast-json-stable-stringify "^2.1.0" - fs-extra "^9.0.1" - glob "^7.1.6" - lodash "^4.17.20" - pretty-bytes "^5.3.0" - rollup "^2.43.1" - rollup-plugin-terser "^7.0.0" - source-map "^0.8.0-beta.0" - stringify-object "^3.3.0" - strip-comments "^2.0.1" - tempy "^0.6.0" - upath "^1.2.0" - workbox-background-sync "6.5.3" - workbox-broadcast-update "6.5.3" - workbox-cacheable-response "6.5.3" - workbox-core "6.5.3" - workbox-expiration "6.5.3" - workbox-google-analytics "6.5.3" - workbox-navigation-preload "6.5.3" - workbox-precaching "6.5.3" - workbox-range-requests "6.5.3" - workbox-recipes "6.5.3" - workbox-routing "6.5.3" - workbox-strategies "6.5.3" - workbox-streams "6.5.3" - workbox-sw "6.5.3" - workbox-window "6.5.3" - -workbox-build@6.5.4: +workbox-build@6.5.4, workbox-build@^6.1.5: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-build/-/workbox-build-6.5.4.tgz#7d06d31eb28a878817e1c991c05c5b93409f0389" integrity sha512-kgRevLXEYvUW9WS4XoziYqZ8Q9j/2ziJYEtTrjdz5/L/cTUa2XfyMP2i7c3p34lgqJ03+mTiz13SdFef2POwbA== @@ -14937,13 +14144,6 @@ workbox-build@6.5.4: workbox-sw "6.5.4" workbox-window "6.5.4" -workbox-cacheable-response@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-cacheable-response/-/workbox-cacheable-response-6.5.3.tgz#b1f8c2bc599a7be8f7e3c262535629c558738e47" - integrity sha512-6JE/Zm05hNasHzzAGKDkqqgYtZZL2H06ic2GxuRLStA4S/rHUfm2mnLFFXuHAaGR1XuuYyVCEey1M6H3PdZ7SQ== - dependencies: - workbox-core "6.5.3" - workbox-cacheable-response@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-cacheable-response/-/workbox-cacheable-response-6.5.4.tgz#a5c6ec0c6e2b6f037379198d4ef07d098f7cf137" @@ -14951,24 +14151,11 @@ workbox-cacheable-response@6.5.4: dependencies: workbox-core "6.5.4" -workbox-core@6.5.3, workbox-core@^6.1.5: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-core/-/workbox-core-6.5.3.tgz#bca038a9ef0d7a634a6db2a60f45313ed22ac249" - integrity sha512-Bb9ey5n/M9x+l3fBTlLpHt9ASTzgSGj6vxni7pY72ilB/Pb3XtN+cZ9yueboVhD5+9cNQrC9n/E1fSrqWsUz7Q== - -workbox-core@6.5.4: +workbox-core@6.5.4, workbox-core@^6.1.5: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-core/-/workbox-core-6.5.4.tgz#df48bf44cd58bb1d1726c49b883fb1dffa24c9ba" integrity sha512-OXYb+m9wZm8GrORlV2vBbE5EC1FKu71GGp0H4rjmxmF4/HLbMCoTFws87M3dFwgpmg0v00K++PImpNQ6J5NQ6Q== -workbox-expiration@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-expiration/-/workbox-expiration-6.5.3.tgz#efc0811f371a2ede1052b9de1c4f072b71d50503" - integrity sha512-jzYopYR1zD04ZMdlbn/R2Ik6ixiXbi15c9iX5H8CTi6RPDz7uhvMLZPKEndZTpfgmUk8mdmT9Vx/AhbuCl5Sqw== - dependencies: - idb "^6.1.4" - workbox-core "6.5.3" - workbox-expiration@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-expiration/-/workbox-expiration-6.5.4.tgz#501056f81e87e1d296c76570bb483ce5e29b4539" @@ -14977,16 +14164,6 @@ workbox-expiration@6.5.4: idb "^7.0.1" workbox-core "6.5.4" -workbox-google-analytics@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-google-analytics/-/workbox-google-analytics-6.5.3.tgz#cc8c3a61f449131660a4ed2f5362d9a3599b18fe" - integrity sha512-3GLCHotz5umoRSb4aNQeTbILETcrTVEozSfLhHSBaegHs1PnqCmN0zbIy2TjTpph2AGXiNwDrWGF0AN+UgDNTw== - dependencies: - workbox-background-sync "6.5.3" - workbox-core "6.5.3" - workbox-routing "6.5.3" - workbox-strategies "6.5.3" - workbox-google-analytics@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-google-analytics/-/workbox-google-analytics-6.5.4.tgz#c74327f80dfa4c1954cbba93cd7ea640fe7ece7d" @@ -14997,13 +14174,6 @@ workbox-google-analytics@6.5.4: workbox-routing "6.5.4" workbox-strategies "6.5.4" -workbox-navigation-preload@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-navigation-preload/-/workbox-navigation-preload-6.5.3.tgz#81b74f598b11aa07e2cf1c21af7a826a4f0f70b3" - integrity sha512-bK1gDFTc5iu6lH3UQ07QVo+0ovErhRNGvJJO/1ngknT0UQ702nmOUhoN9qE5mhuQSrnK+cqu7O7xeaJ+Rd9Tmg== - dependencies: - workbox-core "6.5.3" - workbox-navigation-preload@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-navigation-preload/-/workbox-navigation-preload-6.5.4.tgz#ede56dd5f6fc9e860a7e45b2c1a8f87c1c793212" @@ -15011,16 +14181,7 @@ workbox-navigation-preload@6.5.4: dependencies: workbox-core "6.5.4" -workbox-precaching@6.5.3, workbox-precaching@^6.1.5: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-precaching/-/workbox-precaching-6.5.3.tgz#c870312b2ef901d790ab9e48da084e776c62af47" - integrity sha512-sjNfgNLSsRX5zcc63H/ar/hCf+T19fRtTqvWh795gdpghWb5xsfEkecXEvZ8biEi1QD7X/ljtHphdaPvXDygMQ== - dependencies: - workbox-core "6.5.3" - workbox-routing "6.5.3" - workbox-strategies "6.5.3" - -workbox-precaching@6.5.4: +workbox-precaching@6.5.4, workbox-precaching@^6.1.5: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-precaching/-/workbox-precaching-6.5.4.tgz#740e3561df92c6726ab5f7471e6aac89582cab72" integrity sha512-hSMezMsW6btKnxHB4bFy2Qfwey/8SYdGWvVIKFaUm8vJ4E53JAY+U2JwLTRD8wbLWoP6OVUdFlXsTdKu9yoLTg== @@ -15029,13 +14190,6 @@ workbox-precaching@6.5.4: workbox-routing "6.5.4" workbox-strategies "6.5.4" -workbox-range-requests@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-range-requests/-/workbox-range-requests-6.5.3.tgz#e624ac82ff266a5e4f236d055797def07949d941" - integrity sha512-pGCP80Bpn/0Q0MQsfETSfmtXsQcu3M2QCJwSFuJ6cDp8s2XmbUXkzbuQhCUzKR86ZH2Vex/VUjb2UaZBGamijA== - dependencies: - workbox-core "6.5.3" - workbox-range-requests@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-range-requests/-/workbox-range-requests-6.5.4.tgz#86b3d482e090433dab38d36ae031b2bb0bd74399" @@ -15043,18 +14197,6 @@ workbox-range-requests@6.5.4: dependencies: workbox-core "6.5.4" -workbox-recipes@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-recipes/-/workbox-recipes-6.5.3.tgz#15beac9d8ae7a3a1c100218094a824b4dd3fd59a" - integrity sha512-IcgiKYmbGiDvvf3PMSEtmwqxwfQ5zwI7OZPio3GWu4PfehA8jI8JHI3KZj+PCfRiUPZhjQHJ3v1HbNs+SiSkig== - dependencies: - workbox-cacheable-response "6.5.3" - workbox-core "6.5.3" - workbox-expiration "6.5.3" - workbox-precaching "6.5.3" - workbox-routing "6.5.3" - workbox-strategies "6.5.3" - workbox-recipes@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-recipes/-/workbox-recipes-6.5.4.tgz#cca809ee63b98b158b2702dcfb741b5cc3e24acb" @@ -15067,42 +14209,20 @@ workbox-recipes@6.5.4: workbox-routing "6.5.4" workbox-strategies "6.5.4" -workbox-routing@6.5.3, workbox-routing@^6.1.5: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-routing/-/workbox-routing-6.5.3.tgz#a0a699d8cc90b5692bd3df24679acbbda3913777" - integrity sha512-DFjxcuRAJjjt4T34RbMm3MCn+xnd36UT/2RfPRfa8VWJGItGJIn7tG+GwVTdHmvE54i/QmVTJepyAGWtoLPTmg== - dependencies: - workbox-core "6.5.3" - -workbox-routing@6.5.4: +workbox-routing@6.5.4, workbox-routing@^6.1.5: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-routing/-/workbox-routing-6.5.4.tgz#6a7fbbd23f4ac801038d9a0298bc907ee26fe3da" integrity sha512-apQswLsbrrOsBUWtr9Lf80F+P1sHnQdYodRo32SjiByYi36IDyL2r7BH1lJtFX8fwNHDa1QOVY74WKLLS6o5Pg== dependencies: workbox-core "6.5.4" -workbox-strategies@6.5.3, workbox-strategies@^6.1.5: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-strategies/-/workbox-strategies-6.5.3.tgz#4bea9a48fee16cf43766e0d8138296773c8a9783" - integrity sha512-MgmGRrDVXs7rtSCcetZgkSZyMpRGw8HqL2aguszOc3nUmzGZsT238z/NN9ZouCxSzDu3PQ3ZSKmovAacaIhu1w== - dependencies: - workbox-core "6.5.3" - -workbox-strategies@6.5.4: +workbox-strategies@6.5.4, workbox-strategies@^6.1.5: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-strategies/-/workbox-strategies-6.5.4.tgz#4edda035b3c010fc7f6152918370699334cd204d" integrity sha512-DEtsxhx0LIYWkJBTQolRxG4EI0setTJkqR4m7r4YpBdxtWJH1Mbg01Cj8ZjNOO8etqfA3IZaOPHUxCs8cBsKLw== dependencies: workbox-core "6.5.4" -workbox-streams@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-streams/-/workbox-streams-6.5.3.tgz#b6860290031caa7d0e46ad7142315c94359c780b" - integrity sha512-vN4Qi8o+b7zj1FDVNZ+PlmAcy1sBoV7SC956uhqYvZ9Sg1fViSbOpydULOssVJ4tOyKRifH/eoi6h99d+sJ33w== - dependencies: - workbox-core "6.5.3" - workbox-routing "6.5.3" - workbox-streams@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-streams/-/workbox-streams-6.5.4.tgz#1cb3c168a6101df7b5269d0353c19e36668d7d69" @@ -15111,28 +14231,12 @@ workbox-streams@6.5.4: workbox-core "6.5.4" workbox-routing "6.5.4" -workbox-sw@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-sw/-/workbox-sw-6.5.3.tgz#cd2f0c086f4496acd25774ed02c48504189bebdd" - integrity sha512-BQBzm092w+NqdIEF2yhl32dERt9j9MDGUTa2Eaa+o3YKL4Qqw55W9yQC6f44FdAHdAJrJvp0t+HVrfh8AiGj8A== - workbox-sw@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-sw/-/workbox-sw-6.5.4.tgz#d93e9c67924dd153a61367a4656ff4d2ae2ed736" integrity sha512-vo2RQo7DILVRoH5LjGqw3nphavEjK4Qk+FenXeUsknKn14eCNedHOXWbmnvP4ipKhlE35pvJ4yl4YYf6YsJArA== -workbox-webpack-plugin@^6.4.1: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-webpack-plugin/-/workbox-webpack-plugin-6.5.3.tgz#c37bb323be4952311565c07db51054fe59c87d73" - integrity sha512-Es8Xr02Gi6Kc3zaUwR691ZLy61hz3vhhs5GztcklQ7kl5k2qAusPh0s6LF3wEtlpfs9ZDErnmy5SErwoll7jBA== - dependencies: - fast-json-stable-stringify "^2.1.0" - pretty-bytes "^5.4.1" - upath "^1.2.0" - webpack-sources "^1.4.3" - workbox-build "6.5.3" - -workbox-webpack-plugin@^6.5.4: +workbox-webpack-plugin@^6.4.1, workbox-webpack-plugin@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-webpack-plugin/-/workbox-webpack-plugin-6.5.4.tgz#baf2d3f4b8f435f3469887cf4fba2b7fac3d0fd7" integrity sha512-LmWm/zoaahe0EGmMTrSLUi+BjyR3cdGEfU3fS6PN1zKFYbqAKuQ+Oy/27e4VSXsyIwAw8+QDfk1XHNGtZu9nQg== @@ -15143,14 +14247,6 @@ workbox-webpack-plugin@^6.5.4: webpack-sources "^1.4.3" workbox-build "6.5.4" -workbox-window@6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/workbox-window/-/workbox-window-6.5.3.tgz#4ade70056cb73477ef1cd8fea7cfd0ecbd825c7f" - integrity sha512-GnJbx1kcKXDtoJBVZs/P7ddP0Yt52NNy4nocjBpYPiRhMqTpJCNrSL+fGHZ/i/oP6p/vhE8II0sA6AZGKGnssw== - dependencies: - "@types/trusted-types" "^2.0.2" - workbox-core "6.5.3" - workbox-window@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-window/-/workbox-window-6.5.4.tgz#d991bc0a94dff3c2dbb6b84558cff155ca878e91" @@ -15313,6 +14409,11 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +zalgo-promise@^1, zalgo-promise@^1.0.11, zalgo-promise@^1.0.3: + version "1.0.48" + resolved "https://registry.yarnpkg.com/zalgo-promise/-/zalgo-promise-1.0.48.tgz#9e33eef502d5ed9f5a09fc5728c833c3e87afa2e" + integrity sha512-LLHANmdm53+MucY9aOFIggzYtUdkSBFxUsy4glTTQYNyK6B3uCPWTbfiGvSrEvLojw0mSzyFJ1/RRLv+QMNdzQ== + zenhand@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/zenhand/-/zenhand-2.0.0.tgz#a82c0b3b14016da1888f6e3f38647fe06ad7aa21" From 7ee8ed68b888e3bebb61858fd9002ad2c8c0cd4c Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Thu, 9 Feb 2023 08:46:13 +0100 Subject: [PATCH 02/18] feat: plugin handling --- adapter/i18n/en.pot | 10 +++--- adapter/src/components/AppWrapper.js | 35 +++++++++++-------- adapter/src/components/ErrorBoundary.js | 9 ++++- .../src/components/ServerVersionProvider.js | 3 ++ .../components/styles/ErrorBoundary.style.js | 1 - adapter/src/index.js | 4 +-- 6 files changed, 39 insertions(+), 23 deletions(-) diff --git a/adapter/i18n/en.pot b/adapter/i18n/en.pot index d5654aeda..2adc736b0 100644 --- a/adapter/i18n/en.pot +++ b/adapter/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2022-09-22T19:11:17.660Z\n" -"PO-Revision-Date: 2022-09-22T19:11:17.660Z\n" +"POT-Creation-Date: 2023-02-08T14:36:41.461Z\n" +"PO-Revision-Date: 2023-02-08T14:36:41.461Z\n" msgid "Save your data" msgstr "Save your data" @@ -39,12 +39,12 @@ msgstr "An error occurred in the DHIS2 application." msgid "Technical details copied to clipboard" msgstr "Technical details copied to clipboard" -msgid "Something went wrong" -msgstr "Something went wrong" - msgid "Try again" msgstr "Try again" +msgid "Something went wrong" +msgstr "Something went wrong" + msgid "Hide technical details" msgstr "Hide technical details" diff --git a/adapter/src/components/AppWrapper.js b/adapter/src/components/AppWrapper.js index cc70d7e6c..34a853c27 100644 --- a/adapter/src/components/AppWrapper.js +++ b/adapter/src/components/AppWrapper.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import React, {createContext, useContext, useState} from 'react' +import React, { createContext, useContext, useState } from 'react' import { useCurrentUserLocale } from '../utils/useLocale.js' import { useVerifyLatestUser } from '../utils/useVerifyLatestUser.js' import { Alerts } from './Alerts.js' @@ -7,20 +7,29 @@ import { ConnectedHeaderBar } from './ConnectedHeaderBar.js' import { ErrorBoundary } from './ErrorBoundary.js' import { LoadingMask } from './LoadingMask.js' import { styles } from './styles/AppWrapper.style.js' -import { PluginErrorProvider, usePluginErrorContext } from '@dhis2/app-runtime' +import { usePluginContext } from '@dhis2/app-runtime' -const PluginErrorBoundaryWrapper = ({children}) => { - const {onPluginError} = usePluginErrorContext() +const PluginErrorBoundaryWrapper = ({ children }) => { + const { onPluginError, clearPluginError } = usePluginContext() + + const retry = () => { + clearPluginError() + window.location.reload() + } return ( - window.location.reload()}> + {children} - + ) } const AppWrapper = ({ children, plugin }) => { const { loading: localeLoading } = useCurrentUserLocale() - const { loading: latestUserLoading } = useVerifyLatestUser() + const { loading: latestUserLoading } = useVerifyLatestUser() if (localeLoading || latestUserLoading) { return @@ -31,15 +40,13 @@ const AppWrapper = ({ children, plugin }) => {
- - - {children} - - + + {children} +
- ) + ) } return ( @@ -61,4 +68,4 @@ AppWrapper.propTypes = { plugin: PropTypes.bool, } -export {usePluginErrorContext, AppWrapper} \ No newline at end of file +export { AppWrapper } diff --git a/adapter/src/components/ErrorBoundary.js b/adapter/src/components/ErrorBoundary.js index 6aaec1a32..35ab33c6a 100644 --- a/adapter/src/components/ErrorBoundary.js +++ b/adapter/src/components/ErrorBoundary.js @@ -69,8 +69,15 @@ export class ErrorBoundary extends Component { return ( <> -
+
I am the default plugin boundary + {onRetry && ( +
+ + {i18n.t('Try again')} + +
+ )}
) diff --git a/adapter/src/components/ServerVersionProvider.js b/adapter/src/components/ServerVersionProvider.js index 6a76f86cc..2d38c8df9 100644 --- a/adapter/src/components/ServerVersionProvider.js +++ b/adapter/src/components/ServerVersionProvider.js @@ -13,6 +13,7 @@ export const ServerVersionProvider = ({ url, apiVersion, pwaEnabled, + plugin, children, }) => { const offlineInterface = useOfflineInterface() @@ -66,6 +67,7 @@ export const ServerVersionProvider = ({ pwaEnabled, }} offlineInterface={offlineInterface} + plugin={plugin} > {children} @@ -79,4 +81,5 @@ ServerVersionProvider.propTypes = { children: PropTypes.element, pwaEnabled: PropTypes.bool, url: PropTypes.string, + plugin: PropTypes.bool, } diff --git a/adapter/src/components/styles/ErrorBoundary.style.js b/adapter/src/components/styles/ErrorBoundary.style.js index d68333336..cceaa76c0 100644 --- a/adapter/src/components/styles/ErrorBoundary.style.js +++ b/adapter/src/components/styles/ErrorBoundary.style.js @@ -109,5 +109,4 @@ export default css` .pluginBoundary span { display: inline-block; } - ` diff --git a/adapter/src/index.js b/adapter/src/index.js index d9bd62150..8ee0464c0 100644 --- a/adapter/src/index.js +++ b/adapter/src/index.js @@ -1,7 +1,7 @@ import { checkForSWUpdateAndReload } from '@dhis2/pwa' import PropTypes from 'prop-types' import React from 'react' -import { usePluginErrorContext, AppWrapper } from './components/AppWrapper.js' +import { AppWrapper } from './components/AppWrapper.js' import { ErrorBoundary } from './components/ErrorBoundary.js' import { OfflineInterfaceProvider } from './components/OfflineInterfaceContext.js' import { PWALoadingBoundary } from './components/PWALoadingBoundary.js' @@ -29,6 +29,7 @@ const AppAdapter = ({ url={url} apiVersion={apiVersion} pwaEnabled={pwaEnabled} + plugin={plugin} > {children} @@ -48,4 +49,3 @@ AppAdapter.propTypes = { } export default AppAdapter -export { AppAdapter as AppAdapter, usePluginErrorContext } From ac10119f74a9555c725963f71ecfbcf1d9bb404d Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Fri, 17 Feb 2023 16:12:50 +0100 Subject: [PATCH 03/18] chore: move plugin wrapper logic to app-platform --- adapter/src/components/AppWrapper.js | 38 ++--- adapter/src/components/ErrorBoundary.js | 3 +- .../src/components/ServerVersionProvider.js | 8 +- adapter/src/index.js | 18 ++- cli/config/plugin.webpack.config.js | 1 + shell/package.json | 1 + shell/src/App.js | 57 ++++++- shell/src/PluginLoader.js | 139 ++++++++++++++++++ shell/src/PluginOuterErrorBoundary.js | 32 ++++ 9 files changed, 265 insertions(+), 32 deletions(-) create mode 100644 shell/src/PluginLoader.js create mode 100644 shell/src/PluginOuterErrorBoundary.js diff --git a/adapter/src/components/AppWrapper.js b/adapter/src/components/AppWrapper.js index 34a853c27..b01466156 100644 --- a/adapter/src/components/AppWrapper.js +++ b/adapter/src/components/AppWrapper.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import React, { createContext, useContext, useState } from 'react' +import React from 'react' import { useCurrentUserLocale } from '../utils/useLocale.js' import { useVerifyLatestUser } from '../utils/useVerifyLatestUser.js' import { Alerts } from './Alerts.js' @@ -7,27 +7,8 @@ import { ConnectedHeaderBar } from './ConnectedHeaderBar.js' import { ErrorBoundary } from './ErrorBoundary.js' import { LoadingMask } from './LoadingMask.js' import { styles } from './styles/AppWrapper.style.js' -import { usePluginContext } from '@dhis2/app-runtime' -const PluginErrorBoundaryWrapper = ({ children }) => { - const { onPluginError, clearPluginError } = usePluginContext() - - const retry = () => { - clearPluginError() - window.location.reload() - } - return ( - - {children} - - ) -} - -const AppWrapper = ({ children, plugin }) => { +const AppWrapper = ({ children, plugin, onPluginError, clearPluginError }) => { const { loading: localeLoading } = useCurrentUserLocale() const { loading: latestUserLoading } = useVerifyLatestUser() @@ -40,9 +21,16 @@ const AppWrapper = ({ children, plugin }) => {
- + { + clearPluginError() + window.location.reload() + }} + > {children} - +
@@ -52,7 +40,7 @@ const AppWrapper = ({ children, plugin }) => { return (
- {!plugin && } +
window.location.reload()}> {children} @@ -65,7 +53,9 @@ const AppWrapper = ({ children, plugin }) => { AppWrapper.propTypes = { children: PropTypes.node, + clearPluginError: PropTypes.func, plugin: PropTypes.bool, + onPluginError: PropTypes.func, } export { AppWrapper } diff --git a/adapter/src/components/ErrorBoundary.js b/adapter/src/components/ErrorBoundary.js index 35ab33c6a..a7c25a9cd 100644 --- a/adapter/src/components/ErrorBoundary.js +++ b/adapter/src/components/ErrorBoundary.js @@ -38,7 +38,6 @@ export class ErrorBoundary extends Component { componentDidCatch(error, errorInfo) { if (this.props.plugin) { if (this.props.onPluginError) { - console.log('special handling for error (from app)') console.error(error) this.props.onPluginError(error) } @@ -143,5 +142,7 @@ export class ErrorBoundary extends Component { ErrorBoundary.propTypes = { children: PropTypes.node.isRequired, fullscreen: PropTypes.bool, + plugin: PropTypes.bool, + onPluginError: PropTypes.func, onRetry: PropTypes.func, } diff --git a/adapter/src/components/ServerVersionProvider.js b/adapter/src/components/ServerVersionProvider.js index 2d38c8df9..b23e66c70 100644 --- a/adapter/src/components/ServerVersionProvider.js +++ b/adapter/src/components/ServerVersionProvider.js @@ -14,6 +14,8 @@ export const ServerVersionProvider = ({ apiVersion, pwaEnabled, plugin, + parentAlertsAdd, + showAlertsInPlugin, children, }) => { const offlineInterface = useOfflineInterface() @@ -68,6 +70,8 @@ export const ServerVersionProvider = ({ }} offlineInterface={offlineInterface} plugin={plugin} + parentAlertsAdd={parentAlertsAdd} + showAlertsInPlugin={showAlertsInPlugin} > {children} @@ -79,7 +83,9 @@ ServerVersionProvider.propTypes = { appVersion: PropTypes.string.isRequired, apiVersion: PropTypes.number, children: PropTypes.element, + parentAlertsAdd: PropTypes.func, + plugin: PropTypes.bool, pwaEnabled: PropTypes.bool, + showAlertsInPlugin: PropTypes.bool, url: PropTypes.string, - plugin: PropTypes.bool, } diff --git a/adapter/src/index.js b/adapter/src/index.js index 8ee0464c0..5b7124225 100644 --- a/adapter/src/index.js +++ b/adapter/src/index.js @@ -14,6 +14,10 @@ const AppAdapter = ({ apiVersion, pwaEnabled, plugin, + parentAlertsAdd, + showAlertsInPlugin, + onPluginError, + clearPluginError, children, }) => ( - {children} + + {children} + @@ -43,9 +55,13 @@ AppAdapter.propTypes = { appVersion: PropTypes.string.isRequired, apiVersion: PropTypes.number, children: PropTypes.element, + clearPluginError: PropTypes.func, + parentAlertsAdd: PropTypes.func, plugin: PropTypes.bool, pwaEnabled: PropTypes.bool, + showAlertsInPlugin: PropTypes.func, url: PropTypes.string, + onPluginError: PropTypes.func, } export default AppAdapter diff --git a/cli/config/plugin.webpack.config.js b/cli/config/plugin.webpack.config.js index f907cf72f..54f23b5c9 100644 --- a/cli/config/plugin.webpack.config.js +++ b/cli/config/plugin.webpack.config.js @@ -35,6 +35,7 @@ module.exports = ({ env: webpackEnv, config, paths }) => { const shellEnv = getShellEnv({ plugin: 'true', + requiredProps: config.requiredProps ? config.requiredProps.join() : '', name: config.title, ...getPWAEnvVars(config), }) diff --git a/shell/package.json b/shell/package.json index 5bd507b2f..83ca9a347 100644 --- a/shell/package.json +++ b/shell/package.json @@ -22,6 +22,7 @@ "@dhis2/ui": "^8.7.7", "classnames": "^2.2.6", "moment": "^2.29.1", + "post-robot": "^10.0.46", "prop-types": "^15.7.2", "react": "^16.8.6", "react-dom": "^16.8.6", diff --git a/shell/src/App.js b/shell/src/App.js index a606488e2..a312c544c 100644 --- a/shell/src/App.js +++ b/shell/src/App.js @@ -1,11 +1,26 @@ import AppAdapter from '@dhis2/app-adapter' import { Layer, layers, CenteredContent, CircularLoader } from '@dhis2/ui' +import PropTypes from 'prop-types' import React from 'react' +import { PluginLoader } from './PluginLoader' +import { PluginOuterErrorBoundary } from './PluginOuterErrorBoundary' const D2App = React.lazy(() => import(/*webpackChunkName: 'app'*/ './D2App/app') ) // Automatic bundle splitting! +const parseRequiredProps = (propsEnvVariable) => { + if (!propsEnvVariable || propsEnvVariable === '') { + return [] + } + return propsEnvVariable.split(',') +} + +const isPlugin = process.env.REACT_APP_DHIS2_APP_PLUGIN === 'true' +const requiredPluginProps = parseRequiredProps( + process.env.REACT_APP_DHIS2_APP_REQUIREDPROPS +) + const appConfig = { url: process.env.REACT_APP_DHIS2_BASE_URL || @@ -14,11 +29,16 @@ const appConfig = { appVersion: process.env.REACT_APP_DHIS2_APP_VERSION || '', apiVersion: parseInt(process.env.REACT_APP_DHIS2_API_VERSION), pwaEnabled: process.env.REACT_APP_DHIS2_APP_PWA_ENABLED === 'true', - plugin: process.env.REACT_APP_DHIS2_APP_PLUGIN === 'true', + plugin: isPlugin, } -const App = () => ( - +const pluginConfig = { + ...appConfig, + requiredProps: requiredPluginProps, +} + +const App = ({ config }) => ( + @@ -28,9 +48,36 @@ const App = () => ( } > - + ) -export default App +App.propTypes = { + config: PropTypes.object, +} + +const Plugin = ({ config }) => { + return ( + + + + ) +} + +Plugin.propTypes = { + config: PropTypes.object, +} + +const AppOrPlugin = () => { + if (isPlugin) { + return + } + return +} + +export default AppOrPlugin diff --git a/shell/src/PluginLoader.js b/shell/src/PluginLoader.js new file mode 100644 index 000000000..3680d9ac9 --- /dev/null +++ b/shell/src/PluginLoader.js @@ -0,0 +1,139 @@ +import AppAdapter from '@dhis2/app-adapter' +import { Layer, layers, CenteredContent, CircularLoader } from '@dhis2/ui' +import postRobot from 'post-robot' +import PropTypes from 'prop-types' +import React, { useCallback, useEffect, useState } from 'react' + +export const PluginLoader = ({ config, requiredProps, D2App }) => { + const [propsFromParent, setPropsFromParent] = useState({}) + const [propsThatAreMissing, setPropsThatAreMissing] = useState([]) + const [parentAlertsAdd, setParentAlertsAdd] = useState(() => () => {}) + const [showAlertsInPlugin, setShowAlertsInPlugin] = useState(false) + const [onPluginError, setOnPluginError] = useState(() => () => {}) + const [clearPluginError, setClearPluginError] = useState(() => () => {}) + + const receivePropsFromParent = useCallback( + (event) => { + const { data: receivedProps } = event + const { + setInErrorState, + setCommunicationReceived, + alertsAdd, + showAlertsInPlugin, + onError, + ...explicitlyPassedProps + } = receivedProps + + setPropsFromParent(explicitlyPassedProps) + + // check for required props + const missingProps = requiredProps?.filter( + (prop) => !explicitlyPassedProps[prop] + ) + + // if there are missing props, set to state to throw error + if (missingProps && missingProps.length > 0) { + console.error(`These props are missing: ${missingProps.join()}`) + setPropsThatAreMissing(missingProps) + } + + if (setInErrorState) { + if (onError) { + setOnPluginError(() => (error) => { + setCommunicationReceived(false) + setInErrorState(true) + onError(error) + }) + } else { + setOnPluginError(() => () => { + setCommunicationReceived(false) + setInErrorState(true) + }) + } + } + + if (setInErrorState) { + setClearPluginError(() => () => { + setInErrorState(false) + }) + } + + if (alertsAdd) { + setParentAlertsAdd(() => (alert, alertRef) => { + alertsAdd(alert, alertRef) + }) + } + + if (showAlertsInPlugin) { + setShowAlertsInPlugin(Boolean(showAlertsInPlugin)) + } + }, + [ + requiredProps, + setOnPluginError, + setClearPluginError, + setParentAlertsAdd, + setShowAlertsInPlugin, + ] + ) + + useEffect(() => { + // make first request for props to communicate that iframe is ready + postRobot + .send(window.top, 'getPropsFromParent') + .then(receivePropsFromParent) + .catch((err) => { + console.error(err) + }) + }, [receivePropsFromParent]) + + useEffect(() => { + // set up listener to listen for subsequent sends from parent window + const listener = postRobot.on( + 'updated', + { window: window.top }, + (event) => { + receivePropsFromParent(event) + } + ) + + return () => listener.cancel() + }, [receivePropsFromParent]) + + // throw error if props are missing + useEffect(() => { + if (propsThatAreMissing.length > 0) { + throw new Error( + `These props are missing: ${propsThatAreMissing.join()}` + ) + } + }, [propsThatAreMissing]) + + return ( + + + + + + + } + > + + + + ) +} + +PluginLoader.propTypes = { + D2App: PropTypes.object, + config: PropTypes.object, + requiredProps: PropTypes.array, +} diff --git a/shell/src/PluginOuterErrorBoundary.js b/shell/src/PluginOuterErrorBoundary.js new file mode 100644 index 000000000..38f7092ad --- /dev/null +++ b/shell/src/PluginOuterErrorBoundary.js @@ -0,0 +1,32 @@ +import PropTypes from 'prop-types' +import React, { Component } from 'react' + +export class PluginOuterErrorBoundary extends Component { + constructor(props) { + super(props) + this.state = { + error: null, + errorInfo: null, + } + } + + componentDidCatch(error, errorInfo) { + this.setState({ + error, + errorInfo, + }) + } + + render() { + const { children } = this.props + if (this.state.error) { + return

Plugin outermost error boundary

+ } + + return children + } +} + +PluginOuterErrorBoundary.propTypes = { + children: PropTypes.node.isRequired, +} From d40dfba50cc9fa2e8ada03bf03cc9e4b52ef28bc Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Mon, 20 Feb 2023 09:31:26 +0100 Subject: [PATCH 04/18] fix: simplify error reset logic --- shell/src/PluginLoader.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/shell/src/PluginLoader.js b/shell/src/PluginLoader.js index 3680d9ac9..46374caaa 100644 --- a/shell/src/PluginLoader.js +++ b/shell/src/PluginLoader.js @@ -40,21 +40,15 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { if (setInErrorState) { if (onError) { setOnPluginError(() => (error) => { - setCommunicationReceived(false) - setInErrorState(true) onError(error) }) - } else { - setOnPluginError(() => () => { - setCommunicationReceived(false) - setInErrorState(true) - }) } } - if (setInErrorState) { + // when users clears error, set communicationReceived=false to retrigger communication + if (setCommunicationReceived) { setClearPluginError(() => () => { - setInErrorState(false) + setCommunicationReceived(false) }) } From bd4dccb370823651322d9ea89b3c6112d281b824 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Fri, 24 Feb 2023 18:59:11 +0100 Subject: [PATCH 05/18] fix: pass props with spread operator --- shell/src/PluginLoader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/src/PluginLoader.js b/shell/src/PluginLoader.js index 46374caaa..109fe0b22 100644 --- a/shell/src/PluginLoader.js +++ b/shell/src/PluginLoader.js @@ -120,7 +120,7 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { } > - +
) From d5e17e1ae44a14efc1a4c03291c86e566be964de Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Thu, 9 Mar 2023 11:06:44 +0100 Subject: [PATCH 06/18] fix: style adapter package file --- adapter/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapter/package.json b/adapter/package.json index 1441bc494..0b15dbc30 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -20,7 +20,7 @@ "files": [ "build" ], - "dependencies": { + "dependencies": { "@dhis2/pwa": "10.3.1", "moment": "^2.24.0", "post-robot": "^10.0.46" From 15ecf4d94666d526a68b79c53fb2aaf7972031df Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Mon, 13 Mar 2023 15:32:35 +0000 Subject: [PATCH 07/18] chore(release): cut 10.4.0-alpha.1 [skip release] # [10.4.0-alpha.1](https://github.com/dhis2/app-platform/compare/v10.3.1...v10.4.0-alpha.1) (2023-03-13) ### Bug Fixes * merge in master branch of app-platform ([5c637c0](https://github.com/dhis2/app-platform/commit/5c637c0e6c344c9372f679f4e997b5430e2a26cc)) * pass props with spread operator ([bd4dccb](https://github.com/dhis2/app-platform/commit/bd4dccb370823651322d9ea89b3c6112d281b824)) * simplify error reset logic ([d40dfba](https://github.com/dhis2/app-platform/commit/d40dfba50cc9fa2e8ada03bf03cc9e4b52ef28bc)) * style adapter package file ([d5e17e1](https://github.com/dhis2/app-platform/commit/d5e17e1ae44a14efc1a4c03291c86e566be964de)) ### Features * implement plugin wrapper (receiver in plugin) (alpha) ([#786](https://github.com/dhis2/app-platform/issues/786)) ([d4f1ee2](https://github.com/dhis2/app-platform/commit/d4f1ee21e50bb6d0d79a4cf402d7efe6b99458e8)) * plugin error handling ([7fd0605](https://github.com/dhis2/app-platform/commit/7fd0605c3e4ff52f30a1fb3bd0d8da2168f583f5)) * plugin handling ([7ee8ed6](https://github.com/dhis2/app-platform/commit/7ee8ed68b888e3bebb61858fd9002ad2c8c0cd4c)) --- CHANGELOG.md | 17 +++++++++++++++++ adapter/package.json | 6 +++--- cli/package.json | 4 ++-- examples/pwa-app/package.json | 2 +- examples/simple-app/package.json | 2 +- package.json | 2 +- pwa/package.json | 4 ++-- shell/package.json | 6 +++--- 8 files changed, 30 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b128f5cf0..7048eaee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +# [10.4.0-alpha.1](https://github.com/dhis2/app-platform/compare/v10.3.1...v10.4.0-alpha.1) (2023-03-13) + + +### Bug Fixes + +* merge in master branch of app-platform ([5c637c0](https://github.com/dhis2/app-platform/commit/5c637c0e6c344c9372f679f4e997b5430e2a26cc)) +* pass props with spread operator ([bd4dccb](https://github.com/dhis2/app-platform/commit/bd4dccb370823651322d9ea89b3c6112d281b824)) +* simplify error reset logic ([d40dfba](https://github.com/dhis2/app-platform/commit/d40dfba50cc9fa2e8ada03bf03cc9e4b52ef28bc)) +* style adapter package file ([d5e17e1](https://github.com/dhis2/app-platform/commit/d5e17e1ae44a14efc1a4c03291c86e566be964de)) + + +### Features + +* implement plugin wrapper (receiver in plugin) (alpha) ([#786](https://github.com/dhis2/app-platform/issues/786)) ([d4f1ee2](https://github.com/dhis2/app-platform/commit/d4f1ee21e50bb6d0d79a4cf402d7efe6b99458e8)) +* plugin error handling ([7fd0605](https://github.com/dhis2/app-platform/commit/7fd0605c3e4ff52f30a1fb3bd0d8da2168f583f5)) +* plugin handling ([7ee8ed6](https://github.com/dhis2/app-platform/commit/7ee8ed68b888e3bebb61858fd9002ad2c8c0cd4c)) + ## [10.3.1](https://github.com/dhis2/app-platform/compare/v10.3.0...v10.3.1) (2023-03-06) diff --git a/adapter/package.json b/adapter/package.json index 0b15dbc30..134a26747 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-adapter", - "version": "10.3.1", + "version": "10.4.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/amcgee/dhis2-app-platform", @@ -21,12 +21,12 @@ "build" ], "dependencies": { - "@dhis2/pwa": "10.3.1", + "@dhis2/pwa": "10.4.0-alpha.1", "moment": "^2.24.0", "post-robot": "^10.0.46" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.3.1", + "@dhis2/cli-app-scripts": "10.4.0-alpha.1", "@testing-library/react": "^12.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/cli/package.json b/cli/package.json index 730158685..3a27f8eb3 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/cli-app-scripts", - "version": "10.3.1", + "version": "10.4.0-alpha.1", "engines": { "node": ">=14" }, @@ -28,7 +28,7 @@ "@babel/preset-env": "^7.14.7", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.6.0", - "@dhis2/app-shell": "10.3.1", + "@dhis2/app-shell": "10.4.0-alpha.1", "@dhis2/cli-helpers-engine": "^3.2.0", "@jest/core": "^27.0.6", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", diff --git a/examples/pwa-app/package.json b/examples/pwa-app/package.json index a4ee10636..9ae6641ca 100644 --- a/examples/pwa-app/package.json +++ b/examples/pwa-app/package.json @@ -1,6 +1,6 @@ { "name": "pwa-app", - "version": "10.3.1", + "version": "10.4.0-alpha.1", "description": "", "license": "BSD-3-Clause", "private": true, diff --git a/examples/simple-app/package.json b/examples/simple-app/package.json index 1a9363f80..2d73c98f3 100644 --- a/examples/simple-app/package.json +++ b/examples/simple-app/package.json @@ -1,6 +1,6 @@ { "name": "simple-app", - "version": "10.3.1", + "version": "10.4.0-alpha.1", "repository": "https://github.com/amcgee/dhis2-app-platform", "author": "Austin McGee ", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index d8816da4a..250f432c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "10.3.1", + "version": "10.4.0-alpha.1", "private": true, "repository": { "type": "git", diff --git a/pwa/package.json b/pwa/package.json index f9590b4d2..6435e1a75 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/pwa", - "version": "10.3.1", + "version": "10.4.0-alpha.1", "description": "", "license": "BSD-3-Clause", "publishConfig": { @@ -13,7 +13,7 @@ "deploy": "d2-app-scripts deploy" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.3.1" + "@dhis2/cli-app-scripts": "10.4.0-alpha.1" }, "dependencies": { "idb": "^6.0.0", diff --git a/shell/package.json b/shell/package.json index 0d6b67e78..06460be66 100644 --- a/shell/package.json +++ b/shell/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-shell", - "version": "10.3.1", + "version": "10.4.0-alpha.1", "engines": { "node": ">=14" }, @@ -15,10 +15,10 @@ "access": "public" }, "dependencies": { - "@dhis2/app-adapter": "10.3.1", + "@dhis2/app-adapter": "10.4.0-alpha.1", "@dhis2/app-runtime": "^3.9.0", "@dhis2/d2-i18n": "^1.1.1", - "@dhis2/pwa": "10.3.1", + "@dhis2/pwa": "10.4.0-alpha.1", "@dhis2/ui": "^8.7.7", "classnames": "^2.2.6", "moment": "^2.29.1", From 74bbe00c0f64364b96b2b5b4fb68830b1d91a016 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Wed, 29 Mar 2023 16:45:58 +0200 Subject: [PATCH 08/18] feat: auto resizing for height --- shell/src/PluginLoader.js | 51 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/shell/src/PluginLoader.js b/shell/src/PluginLoader.js index 109fe0b22..6249ed5e2 100644 --- a/shell/src/PluginLoader.js +++ b/shell/src/PluginLoader.js @@ -2,7 +2,41 @@ import AppAdapter from '@dhis2/app-adapter' import { Layer, layers, CenteredContent, CircularLoader } from '@dhis2/ui' import postRobot from 'post-robot' import PropTypes from 'prop-types' -import React, { useCallback, useEffect, useState } from 'react' +import React, { useCallback, useEffect, useRef, useState } from 'react' + +const PluginInner = ({ + D2App, + config, + propsFromParent, + resizePluginHeight, +}) => { + const divRef = useRef() + useEffect(() => { + if (divRef && divRef.current && resizePluginHeight) { + const resizeObserver = new ResizeObserver(() => { + // the additional pixels currently account for possible horizontal scroll bar + resizePluginHeight(divRef.current.offsetHeight + 20) + }) + resizeObserver.observe(divRef.current) + } + }, []) + + // inner div disables margin collapsing which would prevent computing correct height + return ( +
+
+ +
+
+ ) +} + +PluginInner.propTypes = { + D2App: PropTypes.object, + config: PropTypes.object, + propsFromParent: PropTypes.array, + resizePluginHeight: PropTypes.func, +} export const PluginLoader = ({ config, requiredProps, D2App }) => { const [propsFromParent, setPropsFromParent] = useState({}) @@ -11,6 +45,7 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { const [showAlertsInPlugin, setShowAlertsInPlugin] = useState(false) const [onPluginError, setOnPluginError] = useState(() => () => {}) const [clearPluginError, setClearPluginError] = useState(() => () => {}) + const [resizePluginHeight, setResizePluginHeight] = useState(null) const receivePropsFromParent = useCallback( (event) => { @@ -20,6 +55,8 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { setCommunicationReceived, alertsAdd, showAlertsInPlugin, + height, + setPluginHeight, onError, ...explicitlyPassedProps } = receivedProps @@ -61,6 +98,10 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { if (showAlertsInPlugin) { setShowAlertsInPlugin(Boolean(showAlertsInPlugin)) } + + if (!height && setPluginHeight) { + setResizePluginHeight(() => (height) => setPluginHeight(height)) + } }, [ requiredProps, @@ -68,6 +109,7 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { setClearPluginError, setParentAlertsAdd, setShowAlertsInPlugin, + setResizePluginHeight, ] ) @@ -120,7 +162,12 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { } > - + ) From a80ea56f1cd887e3458af8b6995f3136017fa9c2 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Tue, 16 May 2023 16:24:53 +0200 Subject: [PATCH 09/18] fix: auto width adjustment --- shell/src/PluginLoader.js | 56 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/shell/src/PluginLoader.js b/shell/src/PluginLoader.js index 6249ed5e2..05e3d7d2f 100644 --- a/shell/src/PluginLoader.js +++ b/shell/src/PluginLoader.js @@ -9,23 +9,61 @@ const PluginInner = ({ config, propsFromParent, resizePluginHeight, + resizePluginWidth, }) => { const divRef = useRef() + const innerDivRef = useRef() useEffect(() => { - if (divRef && divRef.current && resizePluginHeight) { + if ( + divRef && + divRef.current && + (resizePluginHeight || resizePluginWidth) + ) { const resizeObserver = new ResizeObserver(() => { + console.log( + 'height,scrollHeight,offsetWidth,scrollWidth', + divRef.current.offsetHeight, + divRef.current.scrollHeight, + divRef.current.offsetWidth, + divRef.current.scrollWidth + ) // the additional pixels currently account for possible horizontal scroll bar - resizePluginHeight(divRef.current.offsetHeight + 20) + if (resizePluginHeight) { + resizePluginHeight(divRef.current.offsetHeight + 20) + } }) resizeObserver.observe(divRef.current) } }, []) + let previousWidth + + const resetWidth = () => { + const currentWidth = innerDivRef.current?.scrollWidth + if (resizePluginWidth && currentWidth) { + if (previousWidth && Math.abs(currentWidth - previousWidth) > 20) { + resizePluginWidth(currentWidth + 20) + } + previousWidth = currentWidth + } + requestAnimationFrame(resetWidth) + } + + useEffect(() => { + requestAnimationFrame(resetWidth) + }, []) + // inner div disables margin collapsing which would prevent computing correct height return (
-
- +
+
+ +
) @@ -36,6 +74,7 @@ PluginInner.propTypes = { config: PropTypes.object, propsFromParent: PropTypes.array, resizePluginHeight: PropTypes.func, + resizePluginWidth: PropTypes.func, } export const PluginLoader = ({ config, requiredProps, D2App }) => { @@ -46,6 +85,7 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { const [onPluginError, setOnPluginError] = useState(() => () => {}) const [clearPluginError, setClearPluginError] = useState(() => () => {}) const [resizePluginHeight, setResizePluginHeight] = useState(null) + const [resizePluginWidth, setResizePluginWidth] = useState(null) const receivePropsFromParent = useCallback( (event) => { @@ -57,6 +97,8 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { showAlertsInPlugin, height, setPluginHeight, + width, + setPluginWidth, onError, ...explicitlyPassedProps } = receivedProps @@ -102,6 +144,10 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { if (!height && setPluginHeight) { setResizePluginHeight(() => (height) => setPluginHeight(height)) } + + if (!width && setPluginWidth) { + setResizePluginWidth(() => (width) => setPluginWidth(width)) + } }, [ requiredProps, @@ -110,6 +156,7 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { setParentAlertsAdd, setShowAlertsInPlugin, setResizePluginHeight, + setResizePluginWidth, ] ) @@ -167,6 +214,7 @@ export const PluginLoader = ({ config, requiredProps, D2App }) => { config={config} propsFromParent={propsFromParent} resizePluginHeight={resizePluginHeight} + resizePluginWidth={resizePluginWidth} /> From 343312996e4879f186ecbdf58f1f9816cca8c7f1 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Fri, 16 Jun 2023 08:50:30 -0400 Subject: [PATCH 10/18] fix: update app-runtime dependencies --- adapter/package.json | 2 +- examples/pwa-app/package.json | 2 +- shell/package.json | 2 +- yarn.lock | 64 ++++++++++++++++++++--------------- 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/adapter/package.json b/adapter/package.json index 134a26747..b74bde871 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -38,7 +38,7 @@ "test": "d2-app-scripts test" }, "peerDependencies": { - "@dhis2/app-runtime": "^3.5", + "@dhis2/app-runtime": "^3.10.0-alpha.2", "@dhis2/d2-i18n": "^1", "@dhis2/ui": ">=8.5", "classnames": "^2", diff --git a/examples/pwa-app/package.json b/examples/pwa-app/package.json index 9ae6641ca..b76ffaa7b 100644 --- a/examples/pwa-app/package.json +++ b/examples/pwa-app/package.json @@ -13,7 +13,7 @@ "demo": "yarn build --force --standalone --debug && yarn serve" }, "peerDependencies": { - "@dhis2/app-runtime": "*", + "@dhis2/app-runtime": "^3.10.0-alpha.2", "@dhis2/d2-i18n": "*", "react": "^16.8", "react-dom": "^16.8" diff --git a/shell/package.json b/shell/package.json index 06460be66..2f1c8e24d 100644 --- a/shell/package.json +++ b/shell/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@dhis2/app-adapter": "10.4.0-alpha.1", - "@dhis2/app-runtime": "^3.9.0", + "@dhis2/app-runtime": "^3.10.0-alpha.2", "@dhis2/d2-i18n": "^1.1.1", "@dhis2/pwa": "10.4.0-alpha.1", "@dhis2/ui": "^8.7.7", diff --git a/yarn.lock b/yarn.lock index 792e9e744..fe9d3c24f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1896,40 +1896,48 @@ classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2/app-runtime@^3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-runtime/-/app-runtime-3.9.0.tgz#c7e295fd0a68fac976a930bc77105206ded0b61a" - integrity sha512-n0S4pbyvK7FnBQFMONGrhR9YYavBQI+mQLHfCX/vtvOyeoioBUNIinuQlGysuLMEkSVaK5OjV40rvTMzdxF2kQ== - dependencies: - "@dhis2/app-service-alerts" "3.9.0" - "@dhis2/app-service-config" "3.9.0" - "@dhis2/app-service-data" "3.9.0" - "@dhis2/app-service-offline" "3.9.0" - -"@dhis2/app-service-alerts@3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-service-alerts/-/app-service-alerts-3.9.0.tgz#48d3805676e75ee58104fea4f76cfa779335444e" - integrity sha512-z2eZxm/pxrmFbisbK7/qJKtif2CNWJjaaAH5rfrs5OIajlHy3rO37vSaTQHWv+xWvZFQrs2Op2InxzG0qh5ncA== - -"@dhis2/app-service-config@3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-service-config/-/app-service-config-3.9.0.tgz#8dc59d8de246f54057c0c685d5f94b4cbade6f73" - integrity sha512-OuRn2mJGrQQ8QIC+oIVYYpclB4LErRK2wtsuy/cXLfRbeUti1qWIh110rgd1hnTx+BgRCs5s3NWdIQxS4hYGIQ== - -"@dhis2/app-service-data@3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-service-data/-/app-service-data-3.9.0.tgz#37f528b5f7f589cbab8dcc7f997c1668bc6566a9" - integrity sha512-/FJgJhL6YGtIVNX5oaNmavkGmimrVHQsS8ueeUO4FvTjYXGlnnN3IuxypQcy/x4yiUyigbPgFJRnbC1J2af2fg== +"@dhis2/app-runtime@^3.10.0-alpha.2": + version "3.10.0-alpha.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-runtime/-/app-runtime-3.10.0-alpha.2.tgz#ad005aa43f44b226c773c84c3bbe9703cae284b1" + integrity sha512-2ptgLo7JDJwwAETczX+Loa+gGpStdBYjUzEN1RpCytKSmtPelw+05L3kuEsu/o4KGKHtA9at1gAHIIi9cJGMoA== + dependencies: + "@dhis2/app-service-alerts" "3.10.0-alpha.2" + "@dhis2/app-service-config" "3.10.0-alpha.2" + "@dhis2/app-service-data" "3.10.0-alpha.2" + "@dhis2/app-service-offline" "3.10.0-alpha.2" + "@dhis2/app-service-plugin" "3.10.0-alpha.2" + +"@dhis2/app-service-alerts@3.10.0-alpha.2": + version "3.10.0-alpha.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-service-alerts/-/app-service-alerts-3.10.0-alpha.2.tgz#ed62d2e7ed3c7b43498978b20283cd0f67b98c03" + integrity sha512-kzmlaIGAoUBQVUBL9HoAw78lH9YzrISNeTd6X0F7V/whoI6I4/C4NwcI2ADMcHGpGoPPZSUhX8ftkW9woLrIsQ== + +"@dhis2/app-service-config@3.10.0-alpha.2": + version "3.10.0-alpha.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-service-config/-/app-service-config-3.10.0-alpha.2.tgz#4567d27ca590b1d429493f088da4ce5ab172bf00" + integrity sha512-goaGOS2MVlucJ+YWytgsNSUNlPTzzXpZD61NJNR0om0n1RMxqtpofDkZKE6CDVBPMsSaXSG5U9Jui3fupOlb2g== + +"@dhis2/app-service-data@3.10.0-alpha.2": + version "3.10.0-alpha.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-service-data/-/app-service-data-3.10.0-alpha.2.tgz#acee4a1d8ef399dae15ecf705cdecfdf385430d2" + integrity sha512-3vqH9TcHsPTIJu3Pu738hHT+nCZ/UibCWla6wFvdnQnTUkKDjmfajopsDRixGNuUFGPK3R17zENI5UHMxkKdCg== dependencies: react-query "^3.13.11" -"@dhis2/app-service-offline@3.9.0": - version "3.9.0" - resolved "https://registry.yarnpkg.com/@dhis2/app-service-offline/-/app-service-offline-3.9.0.tgz#fe4f4a91a1da77554965f6a5fe6f6951d4c467f4" - integrity sha512-0q5zl0vw+a47Ab2qgu6hsZY5ybnH/ea43Vkk4aXYdgcf57xB8ck9DkIcNbc2e1+k9FhvimipxsgTZSbEA/8hJA== +"@dhis2/app-service-offline@3.10.0-alpha.2": + version "3.10.0-alpha.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-service-offline/-/app-service-offline-3.10.0-alpha.2.tgz#d35961423f716455a4579f3e6d910973e5f2be60" + integrity sha512-XcP8r7+TeNjXsHSzK7vSJcId14M7ciMn9QiU7ui7d8AU7xkhHaHqR0XFBHGkbjqayVeQxmZeIB/rHqe37Mid0w== dependencies: lodash "^4.17.21" +"@dhis2/app-service-plugin@3.10.0-alpha.2": + version "3.10.0-alpha.2" + resolved "https://registry.yarnpkg.com/@dhis2/app-service-plugin/-/app-service-plugin-3.10.0-alpha.2.tgz#8809ce0a2d46c6657887eac46a59a2e075a8d312" + integrity sha512-gu2xW/5ugBDHR+In6r9V+nikos59JFgQLp0OUIcGKIToOMM9aw5NKfTJtgGiGeajHKjhAfjg3/w7vPj+GLGiSA== + dependencies: + post-robot "^10.0.46" + "@dhis2/cli-helpers-engine@^1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@dhis2/cli-helpers-engine/-/cli-helpers-engine-1.5.0.tgz#5bce097bcb226842d67cffae716b44f9b037390e" From b0f47329f899855ff77a963b6ebc3a8c2e4b79ad Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Fri, 16 Jun 2023 13:29:52 +0000 Subject: [PATCH 11/18] chore(release): cut 10.4.0-alpha.2 [skip release] # [10.4.0-alpha.2](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.1...v10.4.0-alpha.2) (2023-06-16) ### Bug Fixes * update app-runtime dependencies ([3433129](https://github.com/dhis2/app-platform/commit/343312996e4879f186ecbdf58f1f9816cca8c7f1)) --- CHANGELOG.md | 7 +++++++ adapter/package.json | 6 +++--- cli/package.json | 4 ++-- examples/pwa-app/package.json | 2 +- examples/simple-app/package.json | 2 +- package.json | 2 +- pwa/package.json | 4 ++-- shell/package.json | 6 +++--- 8 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7048eaee9..4db2a1bd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [10.4.0-alpha.2](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.1...v10.4.0-alpha.2) (2023-06-16) + + +### Bug Fixes + +* update app-runtime dependencies ([3433129](https://github.com/dhis2/app-platform/commit/343312996e4879f186ecbdf58f1f9816cca8c7f1)) + # [10.4.0-alpha.1](https://github.com/dhis2/app-platform/compare/v10.3.1...v10.4.0-alpha.1) (2023-03-13) diff --git a/adapter/package.json b/adapter/package.json index b74bde871..b86df3795 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-adapter", - "version": "10.4.0-alpha.1", + "version": "10.4.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/amcgee/dhis2-app-platform", @@ -21,12 +21,12 @@ "build" ], "dependencies": { - "@dhis2/pwa": "10.4.0-alpha.1", + "@dhis2/pwa": "10.4.0-alpha.2", "moment": "^2.24.0", "post-robot": "^10.0.46" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.1", + "@dhis2/cli-app-scripts": "10.4.0-alpha.2", "@testing-library/react": "^12.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/cli/package.json b/cli/package.json index 3a27f8eb3..d4add4335 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/cli-app-scripts", - "version": "10.4.0-alpha.1", + "version": "10.4.0-alpha.2", "engines": { "node": ">=14" }, @@ -28,7 +28,7 @@ "@babel/preset-env": "^7.14.7", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.6.0", - "@dhis2/app-shell": "10.4.0-alpha.1", + "@dhis2/app-shell": "10.4.0-alpha.2", "@dhis2/cli-helpers-engine": "^3.2.0", "@jest/core": "^27.0.6", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", diff --git a/examples/pwa-app/package.json b/examples/pwa-app/package.json index b76ffaa7b..3064b6ab7 100644 --- a/examples/pwa-app/package.json +++ b/examples/pwa-app/package.json @@ -1,6 +1,6 @@ { "name": "pwa-app", - "version": "10.4.0-alpha.1", + "version": "10.4.0-alpha.2", "description": "", "license": "BSD-3-Clause", "private": true, diff --git a/examples/simple-app/package.json b/examples/simple-app/package.json index 2d73c98f3..4a69aa0b3 100644 --- a/examples/simple-app/package.json +++ b/examples/simple-app/package.json @@ -1,6 +1,6 @@ { "name": "simple-app", - "version": "10.4.0-alpha.1", + "version": "10.4.0-alpha.2", "repository": "https://github.com/amcgee/dhis2-app-platform", "author": "Austin McGee ", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index 250f432c7..7012c1492 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "10.4.0-alpha.1", + "version": "10.4.0-alpha.2", "private": true, "repository": { "type": "git", diff --git a/pwa/package.json b/pwa/package.json index 6435e1a75..d204a07b7 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/pwa", - "version": "10.4.0-alpha.1", + "version": "10.4.0-alpha.2", "description": "", "license": "BSD-3-Clause", "publishConfig": { @@ -13,7 +13,7 @@ "deploy": "d2-app-scripts deploy" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.1" + "@dhis2/cli-app-scripts": "10.4.0-alpha.2" }, "dependencies": { "idb": "^6.0.0", diff --git a/shell/package.json b/shell/package.json index 2f1c8e24d..1afc14c27 100644 --- a/shell/package.json +++ b/shell/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-shell", - "version": "10.4.0-alpha.1", + "version": "10.4.0-alpha.2", "engines": { "node": ">=14" }, @@ -15,10 +15,10 @@ "access": "public" }, "dependencies": { - "@dhis2/app-adapter": "10.4.0-alpha.1", + "@dhis2/app-adapter": "10.4.0-alpha.2", "@dhis2/app-runtime": "^3.10.0-alpha.2", "@dhis2/d2-i18n": "^1.1.1", - "@dhis2/pwa": "10.4.0-alpha.1", + "@dhis2/pwa": "10.4.0-alpha.2", "@dhis2/ui": "^8.7.7", "classnames": "^2.2.6", "moment": "^2.29.1", From 5a7cd50d7b162d447134bbb5961b93f87a687e71 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Thu, 10 Aug 2023 12:39:07 +0000 Subject: [PATCH 12/18] chore(release): cut 10.4.0-alpha.3 [skip release] # [10.4.0-alpha.3](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.2...v10.4.0-alpha.3) (2023-08-10) ### Bug Fixes * move precache route to reenable navigation handler on login redirects [LIBS-473] ([#809](https://github.com/dhis2/app-platform/issues/809)) ([1ff29b6](https://github.com/dhis2/app-platform/commit/1ff29b645ec07e0bcce76efedbc08f1b76014a42)) * **pwa:** avoid crashing when SW is not available [LIBS-499] ([#807](https://github.com/dhis2/app-platform/issues/807)) ([b681022](https://github.com/dhis2/app-platform/commit/b68102248fad98303dd2c01d954f4430b1934a25)) * omit `moment-locales` from precache ([#806](https://github.com/dhis2/app-platform/issues/806)) ([c8d5494](https://github.com/dhis2/app-platform/commit/c8d5494c5eaf6a2f021166d208a1cc289701a47a)) * **cli:** fix envs to fix plugins in dev ([#799](https://github.com/dhis2/app-platform/issues/799)) ([ba29cea](https://github.com/dhis2/app-platform/commit/ba29ceacfe5a25d42a406f80a9896ccbc7bc82f8)) * **plugins:** omit launch paths when unused [LIBS-477] ([#791](https://github.com/dhis2/app-platform/issues/791)) ([e49a51f](https://github.com/dhis2/app-platform/commit/e49a51fec39a323350c71d4e09caff836aab2262)) * **pwa:** bump ui version for headerbar connection status [LIBS-315] ([#797](https://github.com/dhis2/app-platform/issues/797)) ([61ff0a4](https://github.com/dhis2/app-platform/commit/61ff0a49e63189d892403db8df24c57e170dac0a)) * make loading placeholders transparent ([#795](https://github.com/dhis2/app-platform/issues/795)) ([6e64756](https://github.com/dhis2/app-platform/commit/6e64756325b366b413acbdce8dd0d6b70632d118)) * **plugins:** inject precache manifest correctly ([#792](https://github.com/dhis2/app-platform/issues/792)) ([c0d172e](https://github.com/dhis2/app-platform/commit/c0d172ec362182ce978e43b16e9c411ec61e5039)) * **pwa:** add config option to omit files from precache [LIBS-482] ([#793](https://github.com/dhis2/app-platform/issues/793)) ([d089dda](https://github.com/dhis2/app-platform/commit/d089dda25433ca52f84c42c9369fce95419e4f83)) --- CHANGELOG.md | 15 +++++++++++++++ adapter/package.json | 6 +++--- cli/package.json | 4 ++-- examples/pwa-app/package.json | 2 +- examples/simple-app/package.json | 2 +- package.json | 2 +- pwa/package.json | 4 ++-- shell/package.json | 6 +++--- 8 files changed, 28 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ee90560e..7893ee416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# [10.4.0-alpha.3](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.2...v10.4.0-alpha.3) (2023-08-10) + + +### Bug Fixes + +* move precache route to reenable navigation handler on login redirects [LIBS-473] ([#809](https://github.com/dhis2/app-platform/issues/809)) ([1ff29b6](https://github.com/dhis2/app-platform/commit/1ff29b645ec07e0bcce76efedbc08f1b76014a42)) +* **pwa:** avoid crashing when SW is not available [LIBS-499] ([#807](https://github.com/dhis2/app-platform/issues/807)) ([b681022](https://github.com/dhis2/app-platform/commit/b68102248fad98303dd2c01d954f4430b1934a25)) +* omit `moment-locales` from precache ([#806](https://github.com/dhis2/app-platform/issues/806)) ([c8d5494](https://github.com/dhis2/app-platform/commit/c8d5494c5eaf6a2f021166d208a1cc289701a47a)) +* **cli:** fix envs to fix plugins in dev ([#799](https://github.com/dhis2/app-platform/issues/799)) ([ba29cea](https://github.com/dhis2/app-platform/commit/ba29ceacfe5a25d42a406f80a9896ccbc7bc82f8)) +* **plugins:** omit launch paths when unused [LIBS-477] ([#791](https://github.com/dhis2/app-platform/issues/791)) ([e49a51f](https://github.com/dhis2/app-platform/commit/e49a51fec39a323350c71d4e09caff836aab2262)) +* **pwa:** bump ui version for headerbar connection status [LIBS-315] ([#797](https://github.com/dhis2/app-platform/issues/797)) ([61ff0a4](https://github.com/dhis2/app-platform/commit/61ff0a49e63189d892403db8df24c57e170dac0a)) +* make loading placeholders transparent ([#795](https://github.com/dhis2/app-platform/issues/795)) ([6e64756](https://github.com/dhis2/app-platform/commit/6e64756325b366b413acbdce8dd0d6b70632d118)) +* **plugins:** inject precache manifest correctly ([#792](https://github.com/dhis2/app-platform/issues/792)) ([c0d172e](https://github.com/dhis2/app-platform/commit/c0d172ec362182ce978e43b16e9c411ec61e5039)) +* **pwa:** add config option to omit files from precache [LIBS-482] ([#793](https://github.com/dhis2/app-platform/issues/793)) ([d089dda](https://github.com/dhis2/app-platform/commit/d089dda25433ca52f84c42c9369fce95419e4f83)) + ## [10.3.9](https://github.com/dhis2/app-platform/compare/v10.3.8...v10.3.9) (2023-05-16) diff --git a/adapter/package.json b/adapter/package.json index b86df3795..a7bab0de4 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-adapter", - "version": "10.4.0-alpha.2", + "version": "10.4.0-alpha.3", "repository": { "type": "git", "url": "https://github.com/amcgee/dhis2-app-platform", @@ -21,12 +21,12 @@ "build" ], "dependencies": { - "@dhis2/pwa": "10.4.0-alpha.2", + "@dhis2/pwa": "10.4.0-alpha.3", "moment": "^2.24.0", "post-robot": "^10.0.46" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.2", + "@dhis2/cli-app-scripts": "10.4.0-alpha.3", "@testing-library/react": "^12.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/cli/package.json b/cli/package.json index d4add4335..1a53d1410 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/cli-app-scripts", - "version": "10.4.0-alpha.2", + "version": "10.4.0-alpha.3", "engines": { "node": ">=14" }, @@ -28,7 +28,7 @@ "@babel/preset-env": "^7.14.7", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.6.0", - "@dhis2/app-shell": "10.4.0-alpha.2", + "@dhis2/app-shell": "10.4.0-alpha.3", "@dhis2/cli-helpers-engine": "^3.2.0", "@jest/core": "^27.0.6", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", diff --git a/examples/pwa-app/package.json b/examples/pwa-app/package.json index 3064b6ab7..afb654456 100644 --- a/examples/pwa-app/package.json +++ b/examples/pwa-app/package.json @@ -1,6 +1,6 @@ { "name": "pwa-app", - "version": "10.4.0-alpha.2", + "version": "10.4.0-alpha.3", "description": "", "license": "BSD-3-Clause", "private": true, diff --git a/examples/simple-app/package.json b/examples/simple-app/package.json index 4a69aa0b3..75179f8ff 100644 --- a/examples/simple-app/package.json +++ b/examples/simple-app/package.json @@ -1,6 +1,6 @@ { "name": "simple-app", - "version": "10.4.0-alpha.2", + "version": "10.4.0-alpha.3", "repository": "https://github.com/amcgee/dhis2-app-platform", "author": "Austin McGee ", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index 7012c1492..88e186c7a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "10.4.0-alpha.2", + "version": "10.4.0-alpha.3", "private": true, "repository": { "type": "git", diff --git a/pwa/package.json b/pwa/package.json index d204a07b7..b0b364624 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/pwa", - "version": "10.4.0-alpha.2", + "version": "10.4.0-alpha.3", "description": "", "license": "BSD-3-Clause", "publishConfig": { @@ -13,7 +13,7 @@ "deploy": "d2-app-scripts deploy" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.2" + "@dhis2/cli-app-scripts": "10.4.0-alpha.3" }, "dependencies": { "idb": "^6.0.0", diff --git a/shell/package.json b/shell/package.json index a9b00a392..521e83b1d 100644 --- a/shell/package.json +++ b/shell/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-shell", - "version": "10.4.0-alpha.2", + "version": "10.4.0-alpha.3", "engines": { "node": ">=14" }, @@ -15,10 +15,10 @@ "access": "public" }, "dependencies": { - "@dhis2/app-adapter": "10.4.0-alpha.2", + "@dhis2/app-adapter": "10.4.0-alpha.3", "@dhis2/app-runtime": "^3.10.0-alpha.2", "@dhis2/d2-i18n": "^1.1.1", - "@dhis2/pwa": "10.4.0-alpha.2", + "@dhis2/pwa": "10.4.0-alpha.3", "@dhis2/ui": "^8.12.3", "classnames": "^2.2.6", "moment": "^2.29.1", From 9863ae09c72b65e11ce69ba03034ecd2737dacb3 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Mon, 21 Aug 2023 17:30:03 +0200 Subject: [PATCH 13/18] fix: clean up dependencies --- shell/src/PluginLoader.js | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/shell/src/PluginLoader.js b/shell/src/PluginLoader.js index 05e3d7d2f..f0ce164b8 100644 --- a/shell/src/PluginLoader.js +++ b/shell/src/PluginLoader.js @@ -14,19 +14,8 @@ const PluginInner = ({ const divRef = useRef() const innerDivRef = useRef() useEffect(() => { - if ( - divRef && - divRef.current && - (resizePluginHeight || resizePluginWidth) - ) { + if (divRef && divRef.current && resizePluginHeight) { const resizeObserver = new ResizeObserver(() => { - console.log( - 'height,scrollHeight,offsetWidth,scrollWidth', - divRef.current.offsetHeight, - divRef.current.scrollHeight, - divRef.current.offsetWidth, - divRef.current.scrollWidth - ) // the additional pixels currently account for possible horizontal scroll bar if (resizePluginHeight) { resizePluginHeight(divRef.current.offsetHeight + 20) @@ -34,11 +23,11 @@ const PluginInner = ({ }) resizeObserver.observe(divRef.current) } - }, []) + }, [resizePluginHeight]) let previousWidth - const resetWidth = () => { + const resetWidth = useCallback(() => { const currentWidth = innerDivRef.current?.scrollWidth if (resizePluginWidth && currentWidth) { if (previousWidth && Math.abs(currentWidth - previousWidth) > 20) { @@ -47,11 +36,13 @@ const PluginInner = ({ previousWidth = currentWidth } requestAnimationFrame(resetWidth) - } + }, [resizePluginWidth]) useEffect(() => { - requestAnimationFrame(resetWidth) - }, []) + if (resizePluginWidth) { + requestAnimationFrame(resetWidth) + } + }, [resetWidth, resizePluginWidth]) // inner div disables margin collapsing which would prevent computing correct height return ( From f6c07cf222254379c5e7574087a9364507e9cdd1 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Tue, 22 Aug 2023 10:16:09 +0200 Subject: [PATCH 14/18] fix: use useRef for previous width --- shell/src/PluginLoader.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shell/src/PluginLoader.js b/shell/src/PluginLoader.js index f0ce164b8..ee7c900ec 100644 --- a/shell/src/PluginLoader.js +++ b/shell/src/PluginLoader.js @@ -25,15 +25,18 @@ const PluginInner = ({ } }, [resizePluginHeight]) - let previousWidth + const previousWidth = useRef() const resetWidth = useCallback(() => { const currentWidth = innerDivRef.current?.scrollWidth if (resizePluginWidth && currentWidth) { - if (previousWidth && Math.abs(currentWidth - previousWidth) > 20) { + if ( + previousWidth.current && + Math.abs(currentWidth - previousWidth.current) > 20 + ) { resizePluginWidth(currentWidth + 20) } - previousWidth = currentWidth + previousWidth.current = currentWidth } requestAnimationFrame(resetWidth) }, [resizePluginWidth]) From bb26b38836efa08b35e0390f4893bb2f5cf6414a Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Tue, 22 Aug 2023 15:26:58 +0000 Subject: [PATCH 15/18] chore(release): cut 10.4.0-alpha.4 [skip release] # [10.4.0-alpha.4](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.3...v10.4.0-alpha.4) (2023-08-22) ### Bug Fixes * support yarn.lock discovery on non-unix ([#811](https://github.com/dhis2/app-platform/issues/811)) ([22a6863](https://github.com/dhis2/app-platform/commit/22a6863c1b4a5d9c6c026c502a1b77dded318be7)) --- CHANGELOG.md | 7 +++++++ adapter/package.json | 12 +++--------- cli/package.json | 4 ++-- examples/pwa-app/package.json | 2 +- examples/simple-app/package.json | 2 +- package.json | 2 +- pwa/package.json | 4 ++-- shell/package.json | 6 +++--- 8 files changed, 20 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb7516900..d682ad460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [10.4.0-alpha.4](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.3...v10.4.0-alpha.4) (2023-08-22) + + +### Bug Fixes + +* support yarn.lock discovery on non-unix ([#811](https://github.com/dhis2/app-platform/issues/811)) ([22a6863](https://github.com/dhis2/app-platform/commit/22a6863c1b4a5d9c6c026c502a1b77dded318be7)) + # [10.4.0-alpha.3](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.2...v10.4.0-alpha.3) (2023-08-10) diff --git a/adapter/package.json b/adapter/package.json index 1cc4295e9..0ae94a47a 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-adapter", - "version": "10.4.0-alpha.3", + "version": "10.4.0-alpha.4", "repository": { "type": "git", "url": "https://github.com/amcgee/dhis2-app-platform", @@ -21,17 +21,11 @@ "build" ], "dependencies": { - "@dhis2/pwa": "10.3.10", + "@dhis2/pwa": "10.4.0-alpha.4", "moment": "^2.24.0" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.3.10", - "@dhis2/pwa": "10.4.0-alpha.3", - "moment": "^2.24.0", - "post-robot": "^10.0.46" - }, - "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.3", + "@dhis2/cli-app-scripts": "10.4.0-alpha.4", "@testing-library/react": "^12.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/cli/package.json b/cli/package.json index 1a53d1410..40d1be065 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/cli-app-scripts", - "version": "10.4.0-alpha.3", + "version": "10.4.0-alpha.4", "engines": { "node": ">=14" }, @@ -28,7 +28,7 @@ "@babel/preset-env": "^7.14.7", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.6.0", - "@dhis2/app-shell": "10.4.0-alpha.3", + "@dhis2/app-shell": "10.4.0-alpha.4", "@dhis2/cli-helpers-engine": "^3.2.0", "@jest/core": "^27.0.6", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", diff --git a/examples/pwa-app/package.json b/examples/pwa-app/package.json index afb654456..2df22aa8d 100644 --- a/examples/pwa-app/package.json +++ b/examples/pwa-app/package.json @@ -1,6 +1,6 @@ { "name": "pwa-app", - "version": "10.4.0-alpha.3", + "version": "10.4.0-alpha.4", "description": "", "license": "BSD-3-Clause", "private": true, diff --git a/examples/simple-app/package.json b/examples/simple-app/package.json index 75179f8ff..8abeba960 100644 --- a/examples/simple-app/package.json +++ b/examples/simple-app/package.json @@ -1,6 +1,6 @@ { "name": "simple-app", - "version": "10.4.0-alpha.3", + "version": "10.4.0-alpha.4", "repository": "https://github.com/amcgee/dhis2-app-platform", "author": "Austin McGee ", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index 88e186c7a..f571b600d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "10.4.0-alpha.3", + "version": "10.4.0-alpha.4", "private": true, "repository": { "type": "git", diff --git a/pwa/package.json b/pwa/package.json index b0b364624..4f1096bbf 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/pwa", - "version": "10.4.0-alpha.3", + "version": "10.4.0-alpha.4", "description": "", "license": "BSD-3-Clause", "publishConfig": { @@ -13,7 +13,7 @@ "deploy": "d2-app-scripts deploy" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.3" + "@dhis2/cli-app-scripts": "10.4.0-alpha.4" }, "dependencies": { "idb": "^6.0.0", diff --git a/shell/package.json b/shell/package.json index 521e83b1d..33cfd5083 100644 --- a/shell/package.json +++ b/shell/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-shell", - "version": "10.4.0-alpha.3", + "version": "10.4.0-alpha.4", "engines": { "node": ">=14" }, @@ -15,10 +15,10 @@ "access": "public" }, "dependencies": { - "@dhis2/app-adapter": "10.4.0-alpha.3", + "@dhis2/app-adapter": "10.4.0-alpha.4", "@dhis2/app-runtime": "^3.10.0-alpha.2", "@dhis2/d2-i18n": "^1.1.1", - "@dhis2/pwa": "10.4.0-alpha.3", + "@dhis2/pwa": "10.4.0-alpha.4", "@dhis2/ui": "^8.12.3", "classnames": "^2.2.6", "moment": "^2.29.1", From d3220f093edafc63249fc88a1e2fe8f192ffeda5 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Thu, 28 Sep 2023 08:27:24 +0000 Subject: [PATCH 16/18] chore(release): cut 10.4.0-alpha.5 [skip release] # [10.4.0-alpha.5](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.4...v10.4.0-alpha.5) (2023-09-28) ### Bug Fixes * auto width adjustment ([a80ea56](https://github.com/dhis2/app-platform/commit/a80ea56f1cd887e3458af8b6995f3136017fa9c2)) * clean up dependencies ([9863ae0](https://github.com/dhis2/app-platform/commit/9863ae09c72b65e11ce69ba03034ecd2737dacb3)) * use useRef for previous width ([f6c07cf](https://github.com/dhis2/app-platform/commit/f6c07cf222254379c5e7574087a9364507e9cdd1)) ### Features * auto resizing for height ([74bbe00](https://github.com/dhis2/app-platform/commit/74bbe00c0f64364b96b2b5b4fb68830b1d91a016)) --- CHANGELOG.md | 14 ++++++++++++++ adapter/package.json | 6 +++--- cli/package.json | 4 ++-- examples/pwa-app/package.json | 2 +- examples/simple-app/package.json | 2 +- package.json | 2 +- pwa/package.json | 4 ++-- shell/package.json | 6 +++--- 8 files changed, 27 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d682ad460..17910158e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# [10.4.0-alpha.5](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.4...v10.4.0-alpha.5) (2023-09-28) + + +### Bug Fixes + +* auto width adjustment ([a80ea56](https://github.com/dhis2/app-platform/commit/a80ea56f1cd887e3458af8b6995f3136017fa9c2)) +* clean up dependencies ([9863ae0](https://github.com/dhis2/app-platform/commit/9863ae09c72b65e11ce69ba03034ecd2737dacb3)) +* use useRef for previous width ([f6c07cf](https://github.com/dhis2/app-platform/commit/f6c07cf222254379c5e7574087a9364507e9cdd1)) + + +### Features + +* auto resizing for height ([74bbe00](https://github.com/dhis2/app-platform/commit/74bbe00c0f64364b96b2b5b4fb68830b1d91a016)) + # [10.4.0-alpha.4](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.3...v10.4.0-alpha.4) (2023-08-22) diff --git a/adapter/package.json b/adapter/package.json index 0ae94a47a..a8fce9ab1 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-adapter", - "version": "10.4.0-alpha.4", + "version": "10.4.0-alpha.5", "repository": { "type": "git", "url": "https://github.com/amcgee/dhis2-app-platform", @@ -21,11 +21,11 @@ "build" ], "dependencies": { - "@dhis2/pwa": "10.4.0-alpha.4", + "@dhis2/pwa": "10.4.0-alpha.5", "moment": "^2.24.0" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.4", + "@dhis2/cli-app-scripts": "10.4.0-alpha.5", "@testing-library/react": "^12.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/cli/package.json b/cli/package.json index 40d1be065..cb639797b 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/cli-app-scripts", - "version": "10.4.0-alpha.4", + "version": "10.4.0-alpha.5", "engines": { "node": ">=14" }, @@ -28,7 +28,7 @@ "@babel/preset-env": "^7.14.7", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.6.0", - "@dhis2/app-shell": "10.4.0-alpha.4", + "@dhis2/app-shell": "10.4.0-alpha.5", "@dhis2/cli-helpers-engine": "^3.2.0", "@jest/core": "^27.0.6", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", diff --git a/examples/pwa-app/package.json b/examples/pwa-app/package.json index 2df22aa8d..d4566db0c 100644 --- a/examples/pwa-app/package.json +++ b/examples/pwa-app/package.json @@ -1,6 +1,6 @@ { "name": "pwa-app", - "version": "10.4.0-alpha.4", + "version": "10.4.0-alpha.5", "description": "", "license": "BSD-3-Clause", "private": true, diff --git a/examples/simple-app/package.json b/examples/simple-app/package.json index 8abeba960..1f835076f 100644 --- a/examples/simple-app/package.json +++ b/examples/simple-app/package.json @@ -1,6 +1,6 @@ { "name": "simple-app", - "version": "10.4.0-alpha.4", + "version": "10.4.0-alpha.5", "repository": "https://github.com/amcgee/dhis2-app-platform", "author": "Austin McGee ", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index f571b600d..be9c8259d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "10.4.0-alpha.4", + "version": "10.4.0-alpha.5", "private": true, "repository": { "type": "git", diff --git a/pwa/package.json b/pwa/package.json index 4f1096bbf..9fa995cf5 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/pwa", - "version": "10.4.0-alpha.4", + "version": "10.4.0-alpha.5", "description": "", "license": "BSD-3-Clause", "publishConfig": { @@ -13,7 +13,7 @@ "deploy": "d2-app-scripts deploy" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.4" + "@dhis2/cli-app-scripts": "10.4.0-alpha.5" }, "dependencies": { "idb": "^6.0.0", diff --git a/shell/package.json b/shell/package.json index 33cfd5083..ef91384e0 100644 --- a/shell/package.json +++ b/shell/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-shell", - "version": "10.4.0-alpha.4", + "version": "10.4.0-alpha.5", "engines": { "node": ">=14" }, @@ -15,10 +15,10 @@ "access": "public" }, "dependencies": { - "@dhis2/app-adapter": "10.4.0-alpha.4", + "@dhis2/app-adapter": "10.4.0-alpha.5", "@dhis2/app-runtime": "^3.10.0-alpha.2", "@dhis2/d2-i18n": "^1.1.1", - "@dhis2/pwa": "10.4.0-alpha.4", + "@dhis2/pwa": "10.4.0-alpha.5", "@dhis2/ui": "^8.12.3", "classnames": "^2.2.6", "moment": "^2.29.1", From ec772f655f3160446ab74f523e147d3e129b94a9 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Wed, 20 Dec 2023 15:03:05 +0100 Subject: [PATCH 17/18] fix: update alpha [skip release] From da28835c19baa616905046577c44e8cc8f996327 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Thu, 21 Dec 2023 08:57:01 +0000 Subject: [PATCH 18/18] chore(release): cut 10.4.0-alpha.6 [skip release] # [10.4.0-alpha.6](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.5...v10.4.0-alpha.6) (2023-12-21) ### Bug Fixes * don't open browser for plugins on start [LIBS-503] ([#821](https://github.com/dhis2/app-platform/issues/821)) ([7db7a69](https://github.com/dhis2/app-platform/commit/7db7a69b55d88f681e14e49d4b774e75d7289776)) * update alpha ([e66a8ea](https://github.com/dhis2/app-platform/commit/e66a8ea62c7b30c929f7b5cebab08df3fa4cbf62)) * update alpha [skip release] ([ec772f6](https://github.com/dhis2/app-platform/commit/ec772f655f3160446ab74f523e147d3e129b94a9)) --- CHANGELOG.md | 9 +++++++++ adapter/package.json | 6 +++--- cli/package.json | 4 ++-- examples/pwa-app/package.json | 2 +- examples/simple-app/package.json | 2 +- package.json | 2 +- pwa/package.json | 4 ++-- shell/package.json | 6 +++--- 8 files changed, 22 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 582f4fdc3..955a14ac8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# [10.4.0-alpha.6](https://github.com/dhis2/app-platform/compare/v10.4.0-alpha.5...v10.4.0-alpha.6) (2023-12-21) + + +### Bug Fixes + +* don't open browser for plugins on start [LIBS-503] ([#821](https://github.com/dhis2/app-platform/issues/821)) ([7db7a69](https://github.com/dhis2/app-platform/commit/7db7a69b55d88f681e14e49d4b774e75d7289776)) +* update alpha ([e66a8ea](https://github.com/dhis2/app-platform/commit/e66a8ea62c7b30c929f7b5cebab08df3fa4cbf62)) +* update alpha [skip release] ([ec772f6](https://github.com/dhis2/app-platform/commit/ec772f655f3160446ab74f523e147d3e129b94a9)) + ## [10.3.11](https://github.com/dhis2/app-platform/compare/v10.3.10...v10.3.11) (2023-12-11) diff --git a/adapter/package.json b/adapter/package.json index a8fce9ab1..a2bc379c6 100644 --- a/adapter/package.json +++ b/adapter/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-adapter", - "version": "10.4.0-alpha.5", + "version": "10.4.0-alpha.6", "repository": { "type": "git", "url": "https://github.com/amcgee/dhis2-app-platform", @@ -21,11 +21,11 @@ "build" ], "dependencies": { - "@dhis2/pwa": "10.4.0-alpha.5", + "@dhis2/pwa": "10.4.0-alpha.6", "moment": "^2.24.0" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.5", + "@dhis2/cli-app-scripts": "10.4.0-alpha.6", "@testing-library/react": "^12.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/cli/package.json b/cli/package.json index cb639797b..f00ca0080 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/cli-app-scripts", - "version": "10.4.0-alpha.5", + "version": "10.4.0-alpha.6", "engines": { "node": ">=14" }, @@ -28,7 +28,7 @@ "@babel/preset-env": "^7.14.7", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.6.0", - "@dhis2/app-shell": "10.4.0-alpha.5", + "@dhis2/app-shell": "10.4.0-alpha.6", "@dhis2/cli-helpers-engine": "^3.2.0", "@jest/core": "^27.0.6", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", diff --git a/examples/pwa-app/package.json b/examples/pwa-app/package.json index d4566db0c..b19810ee4 100644 --- a/examples/pwa-app/package.json +++ b/examples/pwa-app/package.json @@ -1,6 +1,6 @@ { "name": "pwa-app", - "version": "10.4.0-alpha.5", + "version": "10.4.0-alpha.6", "description": "", "license": "BSD-3-Clause", "private": true, diff --git a/examples/simple-app/package.json b/examples/simple-app/package.json index 1f835076f..5ffc5a554 100644 --- a/examples/simple-app/package.json +++ b/examples/simple-app/package.json @@ -1,6 +1,6 @@ { "name": "simple-app", - "version": "10.4.0-alpha.5", + "version": "10.4.0-alpha.6", "repository": "https://github.com/amcgee/dhis2-app-platform", "author": "Austin McGee ", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index 5f5bcda70..8a613ac42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "10.4.0-alpha.5", + "version": "10.4.0-alpha.6", "private": true, "repository": { "type": "git", diff --git a/pwa/package.json b/pwa/package.json index 9fa995cf5..9ed119104 100644 --- a/pwa/package.json +++ b/pwa/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/pwa", - "version": "10.4.0-alpha.5", + "version": "10.4.0-alpha.6", "description": "", "license": "BSD-3-Clause", "publishConfig": { @@ -13,7 +13,7 @@ "deploy": "d2-app-scripts deploy" }, "devDependencies": { - "@dhis2/cli-app-scripts": "10.4.0-alpha.5" + "@dhis2/cli-app-scripts": "10.4.0-alpha.6" }, "dependencies": { "idb": "^6.0.0", diff --git a/shell/package.json b/shell/package.json index ef91384e0..8fae29229 100644 --- a/shell/package.json +++ b/shell/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/app-shell", - "version": "10.4.0-alpha.5", + "version": "10.4.0-alpha.6", "engines": { "node": ">=14" }, @@ -15,10 +15,10 @@ "access": "public" }, "dependencies": { - "@dhis2/app-adapter": "10.4.0-alpha.5", + "@dhis2/app-adapter": "10.4.0-alpha.6", "@dhis2/app-runtime": "^3.10.0-alpha.2", "@dhis2/d2-i18n": "^1.1.1", - "@dhis2/pwa": "10.4.0-alpha.5", + "@dhis2/pwa": "10.4.0-alpha.6", "@dhis2/ui": "^8.12.3", "classnames": "^2.2.6", "moment": "^2.29.1",