From 3c2ec526e1fb7b45cea1f75f260a580252b51caf Mon Sep 17 00:00:00 2001 From: Diana Nanyanzi Date: Tue, 26 Nov 2024 06:28:42 +0300 Subject: [PATCH 1/4] feat: add minimal routing setup --- i18n/en.pot | 19 +- package.json | 5 +- src/App.tsx | 55 ++- src/components/appWrapper.tsx | 19 + src/components/list.tsx | 53 +++ src/pages/errorPage.tsx | 27 ++ src/routes/layout.tsx | 43 ++ yarn.lock | 725 +++++++++++++++++++++++++++++++++- 8 files changed, 904 insertions(+), 42 deletions(-) create mode 100644 src/components/appWrapper.tsx create mode 100644 src/components/list.tsx create mode 100644 src/pages/errorPage.tsx create mode 100644 src/routes/layout.tsx diff --git a/i18n/en.pot b/i18n/en.pot index 633477d..0cca95d 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,17 +5,14 @@ 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: 2024-11-21T12:50:12.197Z\n" -"PO-Revision-Date: 2024-11-21T12:50:12.198Z\n" +"POT-Creation-Date: 2024-11-28T02:03:19.120Z\n" +"PO-Revision-Date: 2024-11-28T02:03:19.121Z\n" -msgid "ERROR" -msgstr "ERROR" - -msgid "Loading..." -msgstr "Loading..." +msgid "dataStore" +msgstr "dataStore" -msgid "Hello {{name}}" -msgstr "Hello {{name}}" +msgid "userDataStore" +msgstr "userDataStore" -msgid "Welcome to DHIS2 with TypeScript!" -msgstr "Welcome to DHIS2 with TypeScript!" +msgid "ERROR" +msgstr "ERROR" diff --git a/package.json b/package.json index 3ad8b0b..5348395 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,12 @@ "@types/jest": "^29.5.14", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", + "react-router-dom": "^7.0.1", "typescript": "^5" }, "dependencies": { - "@dhis2/app-runtime": "^3.11.3" + "@dhis2/app-runtime": "^3.11.3", + "@dhis2/ui": "^10.1.0", + "prop-types": "^15.8.1" } } diff --git a/src/App.tsx b/src/App.tsx index 430298d..3149666 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,37 +1,34 @@ -import { useDataQuery } from '@dhis2/app-runtime' -import i18n from '@dhis2/d2-i18n' import React, { FC } from 'react' -import classes from './App.module.css' +import { RouterProvider, createHashRouter } from 'react-router-dom' +import AppWrapper from './components/appWrapper' +import { DataStoreList, UserDataStoreList } from './components/list' +import ErrorPage from './pages/errorPage' +import Layout from './routes/layout' -interface QueryResults { - me: { - name: string - } -} - -const query = { - me: { - resource: 'me', +export const router = createHashRouter([ + { + path: '/', + errorElement: , + element: , + children: [ + { + path: 'dataStore', + element: , + }, + { + path: 'userDataStore', + element: , + }, + ], }, -} - -const MyApp: FC = () => { - const { error, loading, data } = useDataQuery(query) - - if (error) { - return {i18n.t('ERROR')} - } - - if (loading) { - return {i18n.t('Loading...')} - } +]) +const App: FC = () => { return ( -
-

{i18n.t('Hello {{name}}', { name: data?.me?.name })}

-

{i18n.t('Welcome to DHIS2 with TypeScript!')}

-
+ + + ) } -export default MyApp +export default App diff --git a/src/components/appWrapper.tsx b/src/components/appWrapper.tsx new file mode 100644 index 0000000..0b8f2c3 --- /dev/null +++ b/src/components/appWrapper.tsx @@ -0,0 +1,19 @@ +import { CssReset, CssVariables } from '@dhis2/ui' +import PropTypes from 'prop-types' +import React from 'react' + +function AppWrapper({ children }) { + return ( + <> + + + {children} + + ) +} + +AppWrapper.propTypes = { + children: PropTypes.node, +} + +export default AppWrapper diff --git a/src/components/list.tsx b/src/components/list.tsx new file mode 100644 index 0000000..14b488c --- /dev/null +++ b/src/components/list.tsx @@ -0,0 +1,53 @@ +import { useDataQuery } from '@dhis2/app-runtime' +import { CircularLoader } from '@dhis2/ui' +import PropTypes from 'prop-types' +import React from 'react' + +interface QueryResults { + results: [] +} + +const dataStoreQuery = { + results: { + resource: 'dataStore', + }, +} + +const userDataStoreQuery = { + results: { + resource: 'userDataStore', + }, +} + +function List({ data, error, loading }) { + return ( +
+ {error &&
Error fetching this data...
} + {loading && } + {data && ( +
+                    {data.results.map((namespace) => namespace).join('\n')}
+                
+ )} +
+ ) +} + +List.propTypes = { + data: PropTypes.object, + error: PropTypes.any, + loading: PropTypes.any, +} + +export function DataStoreList() { + const { error, loading, data } = useDataQuery(dataStoreQuery) + + return +} + +export function UserDataStoreList() { + const { error, loading, data } = + useDataQuery(userDataStoreQuery) + + return +} diff --git a/src/pages/errorPage.tsx b/src/pages/errorPage.tsx new file mode 100644 index 0000000..62f4064 --- /dev/null +++ b/src/pages/errorPage.tsx @@ -0,0 +1,27 @@ +import { Center } from '@dhis2/ui' +import React from 'react' +import { useRouteError } from 'react-router-dom' + +interface Error { + status?: number + statusText?: string + internal?: boolean + data?: string + message?: string +} + +export default function ErrorPage() { + const error: Error = useRouteError() + + return ( +
+
+

Oops!

+

Sorry, an unexpected error has occurred

+

+ {error.statusText || error.message} +

+
+
+ ) +} diff --git a/src/routes/layout.tsx b/src/routes/layout.tsx new file mode 100644 index 0000000..2e86659 --- /dev/null +++ b/src/routes/layout.tsx @@ -0,0 +1,43 @@ +import React from 'react' +import { Outlet, Link } from 'react-router-dom' + +export default function Layout() { + return ( +
+ +
+ +
+
+ ) +} diff --git a/yarn.lock b/yarn.lock index 2c13786..eacee6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1012,7 +1012,7 @@ "@babel/plugin-transform-modules-commonjs" "^7.25.9" "@babel/plugin-transform-typescript" "^7.25.9" -"@babel/runtime@^7.10.0", "@babel/runtime@^7.11.2", "@babel/runtime@^7.15.4", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.8", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.10.0", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.8", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== @@ -1219,6 +1219,18 @@ resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz#7dfccb9df5499e627e7bfdbb4021a06813a45dba" integrity sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ== +"@dhis2-ui/alert@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/alert/-/alert-10.1.0.tgz#1eb193c173237f436fce7e8540fc45e097f63953" + integrity sha512-HjXPtPaD/6AY/u2DfoO6DIP0YKD5WBrkT/2eKXUlGaAmcJMaJUwkCzVPJ0qx47DICilPzNLrDc5mbbJOMgtzWQ== + dependencies: + "@dhis2-ui/portal" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/alert@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/alert/-/alert-9.15.0.tgz#19b5fef58fdcce69dcf1f7f6fe6f0551e4b130cf" @@ -1231,6 +1243,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/box@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/box/-/box-10.1.0.tgz#e1873616fdcacccac684aebd0672ae7fe93b32da" + integrity sha512-xI1hBIKmBdyM+swA9fV4Nv5D7JS53ugpCscVhgeP5Cy3/nMOkkOAx1U5XzAvVm47cYm8XQ2NtW570wi/ztUhyA== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/box@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/box/-/box-9.15.0.tgz#f16498fa7a261d6304879ecb615cab57979825bd" @@ -1241,6 +1263,20 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/button@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/button/-/button-10.1.0.tgz#4cfd5c65b595cb756ca29365023832a9e277f4f2" + integrity sha512-WQDRY7len+5kgwfUUVyPVAzjPZXEtMIub2PszrYqD2KoubwCBf7jALoZpPWRTymySmCPgzbTWbigT1vLlIgpsQ== + dependencies: + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/loader" "10.1.0" + "@dhis2-ui/popper" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/button@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/button/-/button-9.15.0.tgz#d27cb64cd935f86218862c01c9fe3bbeb3604163" @@ -1255,6 +1291,23 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/calendar@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/calendar/-/calendar-10.1.0.tgz#97708960331b519a9276d62022a211403e2bfa03" + integrity sha512-GtrRMvM0wmj4k5171/RSRmwDmeH6FSmBaqFP3PWGbYiV2ag6ApWQs4nl5tEYtX4mnrFwWcW9TfkYe+mohH67mw== + dependencies: + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/card" "10.1.0" + "@dhis2-ui/input" "10.1.0" + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/popper" "10.1.0" + "@dhis2/multi-calendar-dates" "2.0.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/calendar@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/calendar/-/calendar-9.15.0.tgz#7f6e42973bd96a95eee6386ec3866fff0de4009e" @@ -1272,6 +1325,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/card@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/card/-/card-10.1.0.tgz#12f9528a49ec77d5bc44fd96819d9bfb3aef258a" + integrity sha512-ryvROrbBtbfJ9bZAyfjCqi2YtIUq+Z/j/TDv54DZcYP4UN+665J8jRNWf4n1EPLaxzktxfOvR02ZW0FcZAc62g== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/card@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/card/-/card-9.15.0.tgz#af7d00438d2818cae8731ae56430547619090858" @@ -1282,6 +1345,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/center@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/center/-/center-10.1.0.tgz#b65d72a5876f59bad5a3cb336fbc9f2d062e65ad" + integrity sha512-EmDTqJTbY0yOkFcJOTDi91ZcOgt0wO1ylJKMCoynwWlMsRycC3tmgO4fKfsZEsncxM+600ejc7/gUvISTeCmjw== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/center@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/center/-/center-9.15.0.tgz#8c493157b9efe8b778cff796b6ffa2fd6f58289e" @@ -1292,6 +1365,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/checkbox@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/checkbox/-/checkbox-10.1.0.tgz#a09157bc2933af5cb42a48a479738a6242366dfa" + integrity sha512-+0rN1W09p9rX/NEJfx7It+9NJGhwBtrJuix993fj3vflHkJfiEw3mV2SISyZVJUHT5ryAvGyhm+greeToLeOJQ== + dependencies: + "@dhis2-ui/field" "10.1.0" + "@dhis2-ui/required" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/checkbox@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/checkbox/-/checkbox-9.15.0.tgz#bcb377be5f165b6bfc001361c246a7c6db25a364" @@ -1304,6 +1389,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/chip@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/chip/-/chip-10.1.0.tgz#645c080d6910eb93399fdcf6cd3308e765c9fb5f" + integrity sha512-g5pnTWKe1dkU6q83a5NzoF8LOxKEo2uGxZezxbu4Pe8vfyXUaNsqVrSchduk333UUeOG+yWrVYq2iU2QlBthCw== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/chip@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/chip/-/chip-9.15.0.tgz#3ebb89d4cae3ae49ddfcde67d129caf6db8d08c7" @@ -1314,6 +1409,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/cover@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/cover/-/cover-10.1.0.tgz#317c6a396a1038d95bfc39f0c0dcf980534e26c1" + integrity sha512-Im+nW9kOuELdy0RXJQ6stdDm6ZNeSYH7qZJZRYvZxuilgnslygW4XjT1+YkJa2Z/lPTPvxERD671I6zWZg+ACg== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/cover@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/cover/-/cover-9.15.0.tgz#dd81ab446d02b4aad43fdd7fa3a730928c7a0fba" @@ -1324,6 +1429,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/css@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/css/-/css-10.1.0.tgz#e72e128599de92e6c3778bb4508b9d05b2e4ad07" + integrity sha512-7HqNmu3PDZlsTxCbNIIuZvVAmiKQT3hXV7FjuhajWieGJ4KbS77g9W6mANe1g0zXIKi6/GQA6Z4WiNw39/dENg== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/css@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/css/-/css-9.15.0.tgz#44fc993264010852d4935d2248b11e0a851c6992" @@ -1334,6 +1449,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/divider@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/divider/-/divider-10.1.0.tgz#498b71e28871abc2f148fa5fdf9cf22121078223" + integrity sha512-nh+H/J6lIesrpgDh4JgHXKetdGqkxNPqc6Bvj8n88nj7cejb42XCDeiSJNt/sTBt0PcdpguG+IybV4B3v06MrA== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/divider@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/divider/-/divider-9.15.0.tgz#8191d80469ba55d1ac404d100b915f45bc56602a" @@ -1344,6 +1469,19 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/field@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/field/-/field-10.1.0.tgz#59c639c44349f88d3dac048d31c8403eaac20a33" + integrity sha512-Dgl/Li/qv3oIq6gGvOXTYVMYczNz8GWC5nc+TKuUgzSC4f0IgtxWWErIZi0P3knbnsBCZC1wXb0VLYdAUS8EqQ== + dependencies: + "@dhis2-ui/box" "10.1.0" + "@dhis2-ui/help" "10.1.0" + "@dhis2-ui/label" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/field@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/field/-/field-9.15.0.tgz#92f234ab41094a61d3c26e76b2944711ebd36e0b" @@ -1357,6 +1495,22 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/file-input@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/file-input/-/file-input-10.1.0.tgz#35e987fab248cfa2facba1b263a37de785b32d86" + integrity sha512-hM1zQRkrolMPyxIYAt6tBSyLWjdL6fbax0/30C4J5gUIm4y56NWcfooQJ2INzoMANb330gG7WatJXYuotcuszg== + dependencies: + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/field" "10.1.0" + "@dhis2-ui/label" "10.1.0" + "@dhis2-ui/loader" "10.1.0" + "@dhis2-ui/status-icon" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/file-input@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/file-input/-/file-input-9.15.0.tgz#7ca98fb317b551d39d8e0e95e5df88218b91f78d" @@ -1373,6 +1527,30 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/header-bar@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/header-bar/-/header-bar-10.1.0.tgz#1849bb2d70144c6cd282d315f5abfdf35d8e0d87" + integrity sha512-mgcVEIJLlVixgmkVOq5C85cKblpqAmYvufSW16/0jcTf1IEcXsVOMK5h+QCXzUJQ+ERsDLoGxznKAU1dX81iTQ== + dependencies: + "@dhis2-ui/box" "10.1.0" + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/card" "10.1.0" + "@dhis2-ui/center" "10.1.0" + "@dhis2-ui/divider" "10.1.0" + "@dhis2-ui/input" "10.1.0" + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/loader" "10.1.0" + "@dhis2-ui/logo" "10.1.0" + "@dhis2-ui/menu" "10.1.0" + "@dhis2-ui/modal" "10.1.0" + "@dhis2-ui/user-avatar" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + moment "^2.29.1" + prop-types "^15.7.2" + "@dhis2-ui/header-bar@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/header-bar/-/header-bar-9.15.0.tgz#9d4af4385ac4433ce17c57dcaf51f803e62c8137" @@ -1397,6 +1575,16 @@ moment "^2.29.1" prop-types "^15.7.2" +"@dhis2-ui/help@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/help/-/help-10.1.0.tgz#451056013e57e3ce5e38a6fcdce67752d606adc2" + integrity sha512-TFQu5kLid4O1mX+EVxJ5DxJA9aYfC4nzaebqKPAGNpMyG8q92gvTS2t3I7FC0x+je4462yyRj/Ct2lPZs+w3Mg== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/help@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/help/-/help-9.15.0.tgz#04a63e1ee3c31879bad4b46d74dac4e1dce11861" @@ -1407,6 +1595,22 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/input@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/input/-/input-10.1.0.tgz#94a4ce42f9cb34ceec64f8ed1a746cef284c662a" + integrity sha512-Q7TtY/nTJckA3WD9pKkRmjidzRcuDpghqiD77WOS/XWNxh8uMSZ0GU8TiNce/qgQkgdd/ToAlYrQ7jtVXxvVxg== + dependencies: + "@dhis2-ui/box" "10.1.0" + "@dhis2-ui/field" "10.1.0" + "@dhis2-ui/input" "10.1.0" + "@dhis2-ui/loader" "10.1.0" + "@dhis2-ui/status-icon" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/input@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/input/-/input-9.15.0.tgz#7610f7a4a6164ddeeda0add18446a2f2dac6e26e" @@ -1423,6 +1627,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/intersection-detector@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/intersection-detector/-/intersection-detector-10.1.0.tgz#d961125835fe80f11544e591b244f9bd6eaae411" + integrity sha512-Nh9sN8eXO1fyJmasVgNaAqZfUdZhu0Y2CIvrQy3clQXtvcaczPStdqRseOzMzqzhbJsEf6SwFEXNhY3m1milUQ== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/intersection-detector@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/intersection-detector/-/intersection-detector-9.15.0.tgz#43fb307a6bf44550a4e5d1cc9f7911dcb242b38c" @@ -1433,6 +1647,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/label@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/label/-/label-10.1.0.tgz#f1123cf16eb6a12f4059a686659f70f3ffbaba08" + integrity sha512-yphCtHbYH11+NFjAW4I3QQDp5/9azbWqsEkU13mhXhUl/OJleLEbj0zDFu7rwv5F7hne+vtgddSojvwaWGhwWQ== + dependencies: + "@dhis2-ui/required" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/label@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/label/-/label-9.15.0.tgz#db60d1fa7e0f288d45bcb1a90087874416512a4f" @@ -1444,6 +1669,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/layer@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/layer/-/layer-10.1.0.tgz#a439e8d35a3cfa274280b45070cb80aee2860ac4" + integrity sha512-KYHPpipPOmZaiilk2bnFYL+ZXCpQri0AD63z67UEEPByS6/GdIVaqdi5OTJDGaD6KR/bgtCuJv8Dogp2NQYkZg== + dependencies: + "@dhis2-ui/portal" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/layer@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/layer/-/layer-9.15.0.tgz#525181a352c26d0ae2a5a3c0df3e2611fd9065df" @@ -1455,6 +1691,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/legend@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/legend/-/legend-10.1.0.tgz#c43a9c5007a0fa8b6f83e7631efdf05cd0a3b1c2" + integrity sha512-mxVYIEyamOoUkSgfjeVC1RsXd1UGQhDBHhALJw7OHrJKvvXxW58OeQGvrM8Zum/QF8msUNQ4evC27ttF4FC5Tw== + dependencies: + "@dhis2-ui/required" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/legend@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/legend/-/legend-9.15.0.tgz#c71d862366aa0d51bfbf64fa79ec9277e86a4b32" @@ -1466,6 +1713,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/loader@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/loader/-/loader-10.1.0.tgz#e62d87578294700faf1457cb263188267ee57812" + integrity sha512-9RUnvUvTLhmhOuEcg1+MIFpHCyD+ufgjS6eJ8spMnxy2zfO49LKgjRASeA8SEpFXRhgA9J7G/bdDJ7F5yBTN7A== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/loader@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/loader/-/loader-9.15.0.tgz#52afc749cd4fd791dcc4da179e0066b65c4eae42" @@ -1476,6 +1733,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/logo@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/logo/-/logo-10.1.0.tgz#d43bdbab159825207e04473428085ead4242964b" + integrity sha512-X1oqeSbR2mvlnzTmDzEjglRfMwqjm1TvHu+jwFknWlPoIHX39jlmTYheIxO1hlP7+psQIDVsspSzZqGWyD5+Cw== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/logo@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/logo/-/logo-9.15.0.tgz#af7adf3fc15ae8bcc453bcfc9c6fdaadf8903ae0" @@ -1486,6 +1753,22 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/menu@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/menu/-/menu-10.1.0.tgz#575ed169faa1f9bb2217bc5d91cf249f7f559388" + integrity sha512-sBSV4usGMJnJbzBSu7cuVazT6tQedpveB2civHSun6jl0uwQUHi/fmfGrzf4YIO+sZTy8keU0KgkdL9n/zrgGw== + dependencies: + "@dhis2-ui/card" "10.1.0" + "@dhis2-ui/divider" "10.1.0" + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/popper" "10.1.0" + "@dhis2-ui/portal" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/menu@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/menu/-/menu-9.15.0.tgz#d4ac6e9025b58f34ead3fbfc49cf5a4d27b53073" @@ -1502,6 +1785,21 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/modal@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/modal/-/modal-10.1.0.tgz#5c7c193e4be07df5c800b3baca9619125313682d" + integrity sha512-+XzjgsyWbD5fEmE4JXuGchzhMhHqM+qveKydINFhKGlsMHKWMDqvENaZuLjV/xEb8Zi9qXDXNsbhfo2mb7yfUg== + dependencies: + "@dhis2-ui/card" "10.1.0" + "@dhis2-ui/center" "10.1.0" + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/portal" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/modal@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/modal/-/modal-9.15.0.tgz#b8f0f5d7ba510c35407582d60d94d7bdf5226404" @@ -1517,6 +1815,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/node@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/node/-/node-10.1.0.tgz#2dcee2c445ea937daff2b9b51a8a771398b948ad" + integrity sha512-T+pP1nGuvR6V1PbmkyT8Y/QAdJnsI1VNekJrBa9aH9MNhJFWTmmLnseKp2Xusg8YBKcpKCWAirORIwztw7vsow== + dependencies: + "@dhis2-ui/loader" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/node@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/node/-/node-9.15.0.tgz#71bde9dfaa929a42d288623aace2c443cbcf53f8" @@ -1528,6 +1837,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/notice-box@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/notice-box/-/notice-box-10.1.0.tgz#f300833cee7e2d8f1e5de712e13d4b2e75aae6dd" + integrity sha512-d0PIaMNnmeLYvRBCZVS3WphbtF/joM1w2zuqw0QnCqSHELohml4ADO1zrU43M9SODN3jLQC85+wuEqAhanfF2w== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/notice-box@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/notice-box/-/notice-box-9.15.0.tgz#b113c2dcbf4674407e25cc041f3c497d767bdb36" @@ -1539,6 +1859,20 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/organisation-unit-tree@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/organisation-unit-tree/-/organisation-unit-tree-10.1.0.tgz#3882feb23b1f0697b0a3ece3b8286f82af7f4fa6" + integrity sha512-9El9f2Jh4dWTwrZlWAoRZ1m7uykVctTg+9n98wBMTliksvqu/uMYBua9lsatqvKdh5vo3MUHRe1DsyLhP6d5Rg== + dependencies: + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/checkbox" "10.1.0" + "@dhis2-ui/loader" "10.1.0" + "@dhis2-ui/node" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/organisation-unit-tree@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/organisation-unit-tree/-/organisation-unit-tree-9.15.0.tgz#be25c73482f67a3076445c5742e6edf4efc0dd65" @@ -1553,6 +1887,19 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/pagination@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/pagination/-/pagination-10.1.0.tgz#46472300ad7983170289c8b292ac2761613de78e" + integrity sha512-JnJjkIDoSaIVLCCakYbXCiZjdCT3A+aXngWD0zOAggII9iJiYvwzcDzjr6IfZrbHB+qF+vu5i9if0D1isy8jsA== + dependencies: + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/select" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/pagination@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/pagination/-/pagination-9.15.0.tgz#f008e22a4132989089bebc61cec820d19d326a89" @@ -1566,6 +1913,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/popover@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/popover/-/popover-10.1.0.tgz#35f56863a5d2b10d73f44ad2c71525d9a5da0f14" + integrity sha512-JcrQjMSArUmPebI1NEgg0h0hhcjv+12SfI7Ox0+3PFbEJGh4GmzcP1TjfE7SHB2mN2unYqE9axxtlfsWgUCx4g== + dependencies: + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/popper" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/popover@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/popover/-/popover-9.15.0.tgz#1fc7d39cc8ed069a34b873c52f9127b274da19fb" @@ -1578,6 +1937,19 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/popper@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/popper/-/popper-10.1.0.tgz#4674253e4b082d85d0a2409cf7f6e9eda79d0a63" + integrity sha512-4SyVd5DAz94H7UlD8m607jHIU/QmXBGC3Ca/OZFFK3b0mzJzbSGiDymFFTjspcCMaxjpV9Y6VHsE+NrmbjBP9Q== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@popperjs/core" "^2.10.1" + classnames "^2.3.1" + prop-types "^15.7.2" + react-popper "^2.2.5" + resize-observer-polyfill "^1.5.1" + "@dhis2-ui/popper@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/popper/-/popper-9.15.0.tgz#e2ccab3164eca5e74a8c5a6c3e5cc4c14bb4551f" @@ -1591,6 +1963,14 @@ react-popper "^2.2.5" resize-observer-polyfill "^1.5.1" +"@dhis2-ui/portal@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/portal/-/portal-10.1.0.tgz#91b9d7cff5d56f63ba656c49b744fabd3c46c738" + integrity sha512-XNjK6D5hbInqcYigpW29cqOMcc9woOnEd8n2v5T5u7xEuDH4hrnpdJ0mAuICSMs/QGpVsDQuiHDpeaX/BGwmxg== + dependencies: + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/portal@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/portal/-/portal-9.15.0.tgz#b3d2b94ca61d3660c9cdb584e0fcc21e8146893a" @@ -1599,6 +1979,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/radio@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/radio/-/radio-10.1.0.tgz#ae576b7ebb71ef53795a10a409843976d18840f8" + integrity sha512-gr9pgFUg0j50306pqVMzaTloD8/LafziT3UWHGIQ8g1Z0sUoZ/TEmNE6hx2sRBSnsXQqeuCQz1l3ppjtIzkI+w== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/radio@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/radio/-/radio-9.15.0.tgz#b731c14b14e2a9f4062dde46ca42ddae9f2b573e" @@ -1609,6 +1999,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/required@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/required/-/required-10.1.0.tgz#edcca99b3fae5737783fc1b396506a751cd9feb4" + integrity sha512-41WO12gv9PbjkfvXYx0FWTRo53Uc2+0XVvszIos8QrvnmzutvYBAwsvvZlUjqYEQIh9PfQ1HXuGR6qrNj74+3g== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/required@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/required/-/required-9.15.0.tgz#24a96b62d33d8f190a7fd62648ba323011aabcb4" @@ -1619,6 +2019,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/segmented-control@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/segmented-control/-/segmented-control-10.1.0.tgz#5062bfd729b557dd4a405ce86fb82dc9913ea66c" + integrity sha512-NttPo1cNQVuPgHKRGE3UjSNGDFTyg9IB76tF1qDFBOjEdAsxP+cpAn4OhbB9Epyg9CJ0uUEFHbmpzRlMHro6mA== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/segmented-control@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/segmented-control/-/segmented-control-9.15.0.tgz#3db3ad4af9b95a9de478871c059d2bc4d50dafd6" @@ -1629,6 +2039,29 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/select@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/select/-/select-10.1.0.tgz#1595eec2de046c7e83d2fd8b44fc4389e16fcc15" + integrity sha512-FH4tvnerMHzzOKi26u+lFkmRN3o6ADkXUOYqdfdNUOr23Iq+KaLa0sl+IZet2JNsi/uVB3nLE+zOOKWqqzxRUA== + dependencies: + "@dhis2-ui/box" "10.1.0" + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/card" "10.1.0" + "@dhis2-ui/checkbox" "10.1.0" + "@dhis2-ui/chip" "10.1.0" + "@dhis2-ui/field" "10.1.0" + "@dhis2-ui/input" "10.1.0" + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/loader" "10.1.0" + "@dhis2-ui/popper" "10.1.0" + "@dhis2-ui/status-icon" "10.1.0" + "@dhis2-ui/tooltip" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/select@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/select/-/select-9.15.0.tgz#e076b8a044c1ea94c4e6fb449c2ed246bb7caaa9" @@ -1652,6 +2085,21 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/selector-bar@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/selector-bar/-/selector-bar-10.1.0.tgz#b818513cd52403fb0f5cba9dbad0b6ddd541b411" + integrity sha512-H/KJpH+ypEIm5Mp0k+SXe3HJ/J4hdFeDFtoBk60M/1gszuoyCOA2Xi9ycjlJ+oar7iUtepgB5NHpjnI1DG7IZQ== + dependencies: + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/card" "10.1.0" + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/popper" "10.1.0" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + "@testing-library/react" "^16.0.1" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/selector-bar@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/selector-bar/-/selector-bar-9.15.0.tgz#922b1079e47ee214f524a92128d91597c10d800d" @@ -1666,6 +2114,32 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/sharing-dialog@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/sharing-dialog/-/sharing-dialog-10.1.0.tgz#b94055352ffe6f7c523716bb450c7865a8bcc466" + integrity sha512-x7WgEeiXSdFOKncUbI7P7NWRfVdTVuGYcegG+WN6PfWmVAtK0K46KMnqk4wxjGW/43VWYof9ESfnrlZM28UaTA== + dependencies: + "@dhis2-ui/box" "10.1.0" + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/card" "10.1.0" + "@dhis2-ui/divider" "10.1.0" + "@dhis2-ui/input" "10.1.0" + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/menu" "10.1.0" + "@dhis2-ui/modal" "10.1.0" + "@dhis2-ui/notice-box" "10.1.0" + "@dhis2-ui/popper" "10.1.0" + "@dhis2-ui/select" "10.1.0" + "@dhis2-ui/tab" "10.1.0" + "@dhis2-ui/tooltip" "10.1.0" + "@dhis2-ui/user-avatar" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + "@react-hook/size" "^2.1.2" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/sharing-dialog@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/sharing-dialog/-/sharing-dialog-9.15.0.tgz#f5622051d6e80d3b3b489b7c0d394fc1b6d5a4a4" @@ -1692,6 +2166,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/status-icon@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/status-icon/-/status-icon-10.1.0.tgz#9d7415bfe65d6dc17e05145f703d58ebe01d7bbd" + integrity sha512-Olz7nOg1XX/QcreUe/ym9k7xNXunDRn0Fb6PN37VCEVOaQJ7nJimdnnPX6FJcZw0oFswpLDEnl599MNr+OOmQw== + dependencies: + "@dhis2-ui/loader" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/status-icon@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/status-icon/-/status-icon-9.15.0.tgz#43c68cf1fcdae66e9adeac938584602e8ba62864" @@ -1704,6 +2190,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/switch@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/switch/-/switch-10.1.0.tgz#0b17c28d0101bd0961e41a322e7f50f63c23160f" + integrity sha512-DTXroVGAmw2X59k3m0MN6nIfCMwMWiqVKv49b61a7tAnGn4bDyu6aCqQ6/Uh/+p8Et8f74POI77HLA3p09iMkg== + dependencies: + "@dhis2-ui/field" "10.1.0" + "@dhis2-ui/required" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/switch@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/switch/-/switch-9.15.0.tgz#d5ca2930bfeb5ac3531d2b5e580718e99585bcdf" @@ -1716,6 +2214,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/tab@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/tab/-/tab-10.1.0.tgz#be2bdde6cfc2652ddec1c0373308529ed6b7c662" + integrity sha512-G61Jauk+6QcHmWetU9PNaAHn7uVWrKLZKvPB2mKUN5MP0x885DWis2tW2+lCBhds16UsQVT4HWu5r/EQ4auHnA== + dependencies: + "@dhis2-ui/tooltip" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/tab@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/tab/-/tab-9.15.0.tgz#ed9b7143a55124c0efef7bb1164c6dd4752c2337" @@ -1728,6 +2238,17 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/table@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/table/-/table-10.1.0.tgz#fae4397dac52b484f94c854e4849de3249fee5fb" + integrity sha512-yfJAGlfpZ8yRO8eO70ITyedzE35lTosy3uERGHKxODIR4gbqiM+8UpvVRiKAbZ8Ouj1GNQnkERXWsKnOEw1R2g== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/table@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/table/-/table-9.15.0.tgz#dd949b37eff0360905ea7cecbd0c3bbc802bde74" @@ -1739,6 +2260,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/tag@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/tag/-/tag-10.1.0.tgz#09e20f79407bc4400fcb92d3052a1fcdaa383e2c" + integrity sha512-HZY/gpPKK5yskLY9sONdwVRPig05xOdggPuo58lSikO9w6oODCxxTO/rUnEyvfzqYR/NpQfb0xFJGgz+vOes5Q== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/tag@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/tag/-/tag-9.15.0.tgz#28ce45d955c1b9e7d70b7b80e1d70d92d97d3683" @@ -1749,6 +2280,21 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/text-area@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/text-area/-/text-area-10.1.0.tgz#9cf2d20ba7caa1b63077b04e6b55054d1a36396f" + integrity sha512-FEOOMsm33fp6qqqqCMbA8HGFFud/PMfS9ZNPHf0/oqP2hIzHt1WQ7UWiUDTmQko7QzgXBcZaAfT9Xi0TgeTBoA== + dependencies: + "@dhis2-ui/box" "10.1.0" + "@dhis2-ui/field" "10.1.0" + "@dhis2-ui/loader" "10.1.0" + "@dhis2-ui/status-icon" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/text-area@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/text-area/-/text-area-9.15.0.tgz#cc2b5f92a678593a429a3c48c35c1c95c4907b06" @@ -1764,6 +2310,18 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/tooltip@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/tooltip/-/tooltip-10.1.0.tgz#a21a35cfe6ffcfdd319374cd7c7dcbed01139313" + integrity sha512-7Pn4drVkmVUxrqlcjo88VgX8OqSFP3ufW+HO77uu8vN9WgGr1RV9QH0JjaE3VTz51+7UgTETYZAX9cTF8DPuzA== + dependencies: + "@dhis2-ui/popper" "10.1.0" + "@dhis2-ui/portal" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/tooltip@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/tooltip/-/tooltip-9.15.0.tgz#d2766965304178ee4498038ea6322d54f44fc048" @@ -1776,6 +2334,21 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/transfer@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/transfer/-/transfer-10.1.0.tgz#4c20a4dac7a8573ab0ba8e710341e722b4626708" + integrity sha512-b25S/lhm9fYd2bRIF/tjtuD3L1p3TW42zpi/AcN8Ud2zFUoIr0Xvb6OGw/5kakqlvWTehh43YunwNbS40GCGYw== + dependencies: + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/field" "10.1.0" + "@dhis2-ui/input" "10.1.0" + "@dhis2-ui/intersection-detector" "10.1.0" + "@dhis2-ui/loader" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/transfer@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/transfer/-/transfer-9.15.0.tgz#467362081884c9b55ad4f79ca68ea2a8f39cf4ad" @@ -1791,6 +2364,16 @@ classnames "^2.3.1" prop-types "^15.7.2" +"@dhis2-ui/user-avatar@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2-ui/user-avatar/-/user-avatar-10.1.0.tgz#764208e0cd5c743af526d66cb515b543fde8bdc1" + integrity sha512-UWYbLPLfLr0pP4K4rK0CeIgXfLwePDyI/w5vaAI8qHCO8VPtXkbLK4XkdUyBwWG4RcC6aMbm0NWBTIOtkW6phw== + dependencies: + "@dhis2/prop-types" "^3.1.2" + "@dhis2/ui-constants" "10.1.0" + classnames "^2.3.1" + prop-types "^15.7.2" + "@dhis2-ui/user-avatar@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2-ui/user-avatar/-/user-avatar-9.15.0.tgz#c5abc6c6615fc36147101d9870c1d8fe6ed42b81" @@ -1987,6 +2570,15 @@ i18next "^10.3" moment "^2.24.0" +"@dhis2/multi-calendar-dates@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@dhis2/multi-calendar-dates/-/multi-calendar-dates-2.0.0.tgz#febf04f873670960804d38c9ebaa1cadf8050db3" + integrity sha512-pxu81kkkh70tB+CyAub41ulpNJPHyxDGwH2pdcc+NUqrKu4OTQr5ScdCBL2MndShrEKj9J6qj9zKVagvvymH5w== + dependencies: + "@dhis2/d2-i18n" "^1.1.3" + "@js-temporal/polyfill" "0.4.3" + classnames "^2.3.2" + "@dhis2/multi-calendar-dates@^1.2.3": version "1.3.2" resolved "https://registry.yarnpkg.com/@dhis2/multi-calendar-dates/-/multi-calendar-dates-1.3.2.tgz#34e5896f7fdfb761a2ee6035d848cba00446cde5" @@ -2011,6 +2603,13 @@ workbox-routing "^7.1.0" workbox-strategies "^7.1.0" +"@dhis2/ui-constants@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2/ui-constants/-/ui-constants-10.1.0.tgz#5fc22d2d312004931fa2e3b3b639d994d7d9692a" + integrity sha512-pWQDgQbuU0JwTRG8lvhh631q2LMtly5kVTYTMETJn83k4UGt1RXcsv+layPpAkXzobVA9/yRknLxIyCdsuEiuw== + dependencies: + prop-types "^15.7.2" + "@dhis2/ui-constants@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2/ui-constants/-/ui-constants-9.15.0.tgz#e63e3bc5d098fc63c0d05496bbbaf65a59fca286" @@ -2018,6 +2617,26 @@ dependencies: prop-types "^15.7.2" +"@dhis2/ui-forms@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2/ui-forms/-/ui-forms-10.1.0.tgz#44dfb4645bb13301a5c57c964b9c6d88a15b53e6" + integrity sha512-d+dJNJZTXPtQIaM+PnwvS+01AalfDJzLzT4NWPfH0stjnpU3TO6NoacYkrchVkfFx3xogVNMo3tIpf7wPbLuiQ== + dependencies: + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/checkbox" "10.1.0" + "@dhis2-ui/field" "10.1.0" + "@dhis2-ui/file-input" "10.1.0" + "@dhis2-ui/input" "10.1.0" + "@dhis2-ui/radio" "10.1.0" + "@dhis2-ui/select" "10.1.0" + "@dhis2-ui/switch" "10.1.0" + "@dhis2-ui/text-area" "10.1.0" + "@dhis2/prop-types" "^3.1.2" + classnames "^2.3.1" + final-form "^4.20.2" + prop-types "^15.7.2" + react-final-form "^6.5.3" + "@dhis2/ui-forms@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2/ui-forms/-/ui-forms-9.15.0.tgz#3579588b40aa4eaec2afa888c1a31e347dd09f94" @@ -2038,11 +2657,71 @@ prop-types "^15.7.2" react-final-form "^6.5.3" +"@dhis2/ui-icons@10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2/ui-icons/-/ui-icons-10.1.0.tgz#5b075a8323251d1d7b50f34bb6eb9ca9cfdcc99d" + integrity sha512-vIvZa8E25KjsFBUaS7y1EnQT5wNnDTnUAEMD7E7iUxHaG4wLkui4/UH8sHtjl39GqEHvVjrYAKx2jh7Cz6hdFg== + "@dhis2/ui-icons@9.15.0": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2/ui-icons/-/ui-icons-9.15.0.tgz#48865538b95f621ce3ed3b94eb9a438a879aa263" integrity sha512-SEgzWN+YEpV/zQxb7tPL4/qog+0irfM7Oy5OOd4h1jMx7UVroRhsOMJUPpG0L1MyKL7gmsAUg2Z3pa9KN5EFKw== +"@dhis2/ui@^10.1.0": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@dhis2/ui/-/ui-10.1.0.tgz#e5ab3b4fef187ea30fa5b6305ce1d387ae97f536" + integrity sha512-Mc5pmj0o1i/wR3nhREfY2e5yH43NRzI2U5HB8ryXf90+No82vHWJ0pCeakTBzlCgfQGs9TrwgfOUD9MCZ2wapA== + dependencies: + "@dhis2-ui/alert" "10.1.0" + "@dhis2-ui/box" "10.1.0" + "@dhis2-ui/button" "10.1.0" + "@dhis2-ui/calendar" "10.1.0" + "@dhis2-ui/card" "10.1.0" + "@dhis2-ui/center" "10.1.0" + "@dhis2-ui/checkbox" "10.1.0" + "@dhis2-ui/chip" "10.1.0" + "@dhis2-ui/cover" "10.1.0" + "@dhis2-ui/css" "10.1.0" + "@dhis2-ui/divider" "10.1.0" + "@dhis2-ui/field" "10.1.0" + "@dhis2-ui/file-input" "10.1.0" + "@dhis2-ui/header-bar" "10.1.0" + "@dhis2-ui/help" "10.1.0" + "@dhis2-ui/input" "10.1.0" + "@dhis2-ui/intersection-detector" "10.1.0" + "@dhis2-ui/label" "10.1.0" + "@dhis2-ui/layer" "10.1.0" + "@dhis2-ui/legend" "10.1.0" + "@dhis2-ui/loader" "10.1.0" + "@dhis2-ui/logo" "10.1.0" + "@dhis2-ui/menu" "10.1.0" + "@dhis2-ui/modal" "10.1.0" + "@dhis2-ui/node" "10.1.0" + "@dhis2-ui/notice-box" "10.1.0" + "@dhis2-ui/organisation-unit-tree" "10.1.0" + "@dhis2-ui/pagination" "10.1.0" + "@dhis2-ui/popover" "10.1.0" + "@dhis2-ui/popper" "10.1.0" + "@dhis2-ui/portal" "10.1.0" + "@dhis2-ui/radio" "10.1.0" + "@dhis2-ui/required" "10.1.0" + "@dhis2-ui/segmented-control" "10.1.0" + "@dhis2-ui/select" "10.1.0" + "@dhis2-ui/selector-bar" "10.1.0" + "@dhis2-ui/sharing-dialog" "10.1.0" + "@dhis2-ui/switch" "10.1.0" + "@dhis2-ui/tab" "10.1.0" + "@dhis2-ui/table" "10.1.0" + "@dhis2-ui/tag" "10.1.0" + "@dhis2-ui/text-area" "10.1.0" + "@dhis2-ui/tooltip" "10.1.0" + "@dhis2-ui/transfer" "10.1.0" + "@dhis2-ui/user-avatar" "10.1.0" + "@dhis2/ui-constants" "10.1.0" + "@dhis2/ui-forms" "10.1.0" + "@dhis2/ui-icons" "10.1.0" + prop-types "^15.7.2" + "@dhis2/ui@^9.11.7": version "9.15.0" resolved "https://registry.yarnpkg.com/@dhis2/ui/-/ui-9.15.0.tgz#b9e12416922653b07ffb927db93b56ecb0083bd3" @@ -2799,6 +3478,13 @@ dependencies: defer-to-connect "^1.0.1" +"@testing-library/react@^16.0.1": + version "16.0.1" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-16.0.1.tgz#29c0ee878d672703f5e7579f239005e4e0faa875" + integrity sha512-dSmwJVtJXmku+iocRhWOUFbrERC76TX2Mnf0ATODz8brzAZrMBbzLwQixlBSanZxR6LddK3eiwpSFZgDET1URg== + dependencies: + "@babel/runtime" "^7.12.5" + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -2872,6 +3558,11 @@ dependencies: "@types/node" "*" +"@types/cookie@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5" + integrity sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA== + "@types/eslint-scope@^3.7.7": version "3.7.7" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" @@ -4587,6 +5278,11 @@ cookie@0.7.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== +cookie@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.0.2.tgz#27360701532116bd3f1f9416929d176afe1e4610" + integrity sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA== + core-js-compat@^3.38.0, core-js-compat@^3.38.1: version "3.39.0" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.39.0.tgz#b12dccb495f2601dc860bdbe7b4e3ffa8ba63f61" @@ -9563,6 +10259,23 @@ react-refresh@^0.14.2: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9" integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== +react-router-dom@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-7.0.1.tgz#b1438100800313e1b4c48da0c5fdb498f81c7f96" + integrity sha512-duBzwAAiIabhFPZfDjcYpJ+f08TMbPMETgq254GWne2NW1ZwRHhZLj7tpSp8KGb7JvZzlLcjGUnqLxpZQVEPng== + dependencies: + react-router "7.0.1" + +react-router@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-7.0.1.tgz#a171e35a5c6463f76b23353c4ce57b53c8b7b1b9" + integrity sha512-WVAhv9oWCNsja5AkK6KLpXJDSJCQizOIyOd4vvB/+eHGbYx5vkhcmcmwWjQ9yqkRClogi+xjEg9fNEOd5EX/tw== + dependencies: + "@types/cookie" "^0.6.0" + cookie "^1.0.1" + set-cookie-parser "^2.6.0" + turbo-stream "2.4.0" + react@^18: version "18.3.1" resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" @@ -10137,6 +10850,11 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-cookie-parser@^2.6.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz#3016f150072202dfbe90fadee053573cc89d2943" + integrity sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ== + set-function-length@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" @@ -11037,6 +11755,11 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +turbo-stream@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/turbo-stream/-/turbo-stream-2.4.0.tgz#1e4fca6725e90fa14ac4adb782f2d3759a5695f0" + integrity sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g== + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" From 7ee779e3192d21b7d65f1bd6a2c168548d58f9ca Mon Sep 17 00:00:00 2001 From: Diana Nanyanzi Date: Sat, 30 Nov 2024 07:03:57 +0300 Subject: [PATCH 2/4] feat: display namespace keys in table --- i18n/en.pot | 25 +++++--- src/App.module.css | 36 ++++++++++- src/App.tsx | 24 +------ src/components/keys/keysTable.tsx | 74 ++++++++++++++++++++++ src/components/list.tsx | 53 ---------------- src/components/namespaces/list.tsx | 87 ++++++++++++++++++++++++++ src/components/sidebar/searchField.tsx | 18 ++++++ src/components/sidebar/select.tsx | 33 ++++++++++ src/components/sidebar/sidebar.tsx | 60 ++++++++++++++++++ src/routes/layout.tsx | 40 +++--------- src/routes/router.tsx | 24 +++++++ 11 files changed, 355 insertions(+), 119 deletions(-) create mode 100644 src/components/keys/keysTable.tsx delete mode 100644 src/components/list.tsx create mode 100644 src/components/namespaces/list.tsx create mode 100644 src/components/sidebar/searchField.tsx create mode 100644 src/components/sidebar/select.tsx create mode 100644 src/components/sidebar/sidebar.tsx create mode 100644 src/routes/router.tsx diff --git a/i18n/en.pot b/i18n/en.pot index 0cca95d..c673c94 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,14 +5,23 @@ 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: 2024-11-28T02:03:19.120Z\n" -"PO-Revision-Date: 2024-11-28T02:03:19.121Z\n" - -msgid "dataStore" -msgstr "dataStore" - -msgid "userDataStore" -msgstr "userDataStore" +"POT-Creation-Date: 2024-11-29T23:15:51.985Z\n" +"PO-Revision-Date: 2024-11-29T23:15:51.986Z\n" msgid "ERROR" msgstr "ERROR" + +msgid "Namespaces" +msgstr "Namespaces" + +msgid "Search" +msgstr "Search" + +msgid "Namespace" +msgstr "Namespace" + +msgid "DataStore" +msgstr "DataStore" + +msgid "User DataStore" +msgstr "User DataStore" diff --git a/src/App.module.css b/src/App.module.css index a824cff..a8b2006 100644 --- a/src/App.module.css +++ b/src/App.module.css @@ -2,8 +2,38 @@ width: 100%; height: 100%; display: flex; - flex-direction: column; - align-items: center; - justify-content: center; + flex-direction: row; + /* align-items: center; + justify-content: center; */ font-size: 1rem; } + +.sidebar { + width: 20%; + /* background-color: aliceblue; */ + margin: 0.1em; +} + +.sidebarContent { + padding: 0.3em; + width: 20%; +} + +.sidebarList { + margin-top: 1em; +} + +.top { + margin-top: 0.5em; +} + +.bottom { + margin-bottom: 0.5em; +} + +.main { + width: 80%; + /* background-color: aqua; */ + margin: 0.1em; + padding: 0.5em; +} diff --git a/src/App.tsx b/src/App.tsx index 3149666..aa18058 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,27 +1,7 @@ import React, { FC } from 'react' -import { RouterProvider, createHashRouter } from 'react-router-dom' +import { RouterProvider } from 'react-router-dom' import AppWrapper from './components/appWrapper' -import { DataStoreList, UserDataStoreList } from './components/list' -import ErrorPage from './pages/errorPage' -import Layout from './routes/layout' - -export const router = createHashRouter([ - { - path: '/', - errorElement: , - element: , - children: [ - { - path: 'dataStore', - element: , - }, - { - path: 'userDataStore', - element: , - }, - ], - }, -]) +import { router } from './routes/router' const App: FC = () => { return ( diff --git a/src/components/keys/keysTable.tsx b/src/components/keys/keysTable.tsx new file mode 100644 index 0000000..af99ed5 --- /dev/null +++ b/src/components/keys/keysTable.tsx @@ -0,0 +1,74 @@ +import { useDataQuery } from '@dhis2/app-runtime' +import { + DataTable, + DataTableCell, + DataTableColumnHeader, + DataTableRow, + TableBody, + TableHead, +} from '@dhis2/ui' +import PropTypes from 'prop-types' +import React, { useEffect } from 'react' +import { useParams } from 'react-router-dom' + +interface QueryResults { + results: [] +} + +const useNameSpaceQuery = ({ store, namespace }) => { + return useDataQuery( + { + results: { + resource: `${store}`, + id: ({ id }) => id, + }, + }, + { + variables: { + id: namespace, + }, + } + ) +} + +const Keys = () => { + const { store, namespace } = useParams() + const { data, refetch } = useNameSpaceQuery({ store, namespace }) + + useEffect(() => { + refetch({ id: namespace }) + }, [namespace]) + + return +} + +export const KeysTable = ({ data }) => { + return ( + + + + Keys + Actions + + + + {data?.results?.length && ( + <> + {data.results.map((key, index) => ( + + {key} + Edit, Delete + + ))} + + )} + + + ) +} + +KeysTable.propTypes = { + data: PropTypes.object, +} + +export default Keys diff --git a/src/components/list.tsx b/src/components/list.tsx deleted file mode 100644 index 14b488c..0000000 --- a/src/components/list.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { useDataQuery } from '@dhis2/app-runtime' -import { CircularLoader } from '@dhis2/ui' -import PropTypes from 'prop-types' -import React from 'react' - -interface QueryResults { - results: [] -} - -const dataStoreQuery = { - results: { - resource: 'dataStore', - }, -} - -const userDataStoreQuery = { - results: { - resource: 'userDataStore', - }, -} - -function List({ data, error, loading }) { - return ( -
- {error &&
Error fetching this data...
} - {loading && } - {data && ( -
-                    {data.results.map((namespace) => namespace).join('\n')}
-                
- )} -
- ) -} - -List.propTypes = { - data: PropTypes.object, - error: PropTypes.any, - loading: PropTypes.any, -} - -export function DataStoreList() { - const { error, loading, data } = useDataQuery(dataStoreQuery) - - return -} - -export function UserDataStoreList() { - const { error, loading, data } = - useDataQuery(userDataStoreQuery) - - return -} diff --git a/src/components/namespaces/list.tsx b/src/components/namespaces/list.tsx new file mode 100644 index 0000000..3efa6a1 --- /dev/null +++ b/src/components/namespaces/list.tsx @@ -0,0 +1,87 @@ +import { useDataQuery } from '@dhis2/app-runtime' +import { CircularLoader } from '@dhis2/ui' +import PropTypes from 'prop-types' +import React from 'react' +import { useParams } from 'react-router-dom' +import classes from '../../App.module.css' +import i18n from '../../locales' +import { SidebarNavLink } from '../sidebar/sidebar' + +interface QueryResults { + results: [] +} + +const dataStoreQuery = { + results: { + resource: 'dataStore', + }, +} + +const userDataStoreQuery = { + results: { + resource: 'userDataStore', + }, +} + +function List({ data, error, loading, store }) { + return ( +
+ {error && {i18n.t('ERROR')}} + {loading && } + {data && ( + <> +

{i18n.t('Namespaces')}

+ {data.results.map((namespace: string, index) => { + return ( + + ) + })} + + )} +
+ ) +} + +List.propTypes = { + data: PropTypes.object, + error: PropTypes.any, + loading: PropTypes.any, + store: PropTypes.string, +} + +export function DataStoreList({ store }) { + const { error, loading, data } = useDataQuery(dataStoreQuery) + + return +} + +DataStoreList.propTypes = { + store: PropTypes.string, +} + +export function UserDataStoreList({ store }) { + const { error, loading, data } = + useDataQuery(userDataStoreQuery) + + return +} + +UserDataStoreList.propTypes = { + store: PropTypes.string, +} + +export function NameSpaceLinks() { + const { store } = useParams() + + if (store === 'userDataStore') { + return + } + + if (store === 'dataStore') { + return + } +} diff --git a/src/components/sidebar/searchField.tsx b/src/components/sidebar/searchField.tsx new file mode 100644 index 0000000..c2a0cf4 --- /dev/null +++ b/src/components/sidebar/searchField.tsx @@ -0,0 +1,18 @@ +import { InputField } from '@dhis2/ui' +import React from 'react' +import classes from '../../App.module.css' +import i18n from '../../locales' + +const SearchField = () => { + return ( +
+ +
+ ) +} + +export default SearchField diff --git a/src/components/sidebar/select.tsx b/src/components/sidebar/select.tsx new file mode 100644 index 0000000..3453be8 --- /dev/null +++ b/src/components/sidebar/select.tsx @@ -0,0 +1,33 @@ +import { SingleSelectField, SingleSelectOption } from '@dhis2/ui' +import PropTypes from 'prop-types' +import React from 'react' +import classes from '../../App.module.css' +import i18n from '../../locales' + +const SelectDataStore = ({ option, handleChange }) => { + return ( +
+ + + + +
+ ) +} + +SelectDataStore.propTypes = { + handleChange: PropTypes.func, + option: PropTypes.string, +} + +export default SelectDataStore diff --git a/src/components/sidebar/sidebar.tsx b/src/components/sidebar/sidebar.tsx new file mode 100644 index 0000000..79f210c --- /dev/null +++ b/src/components/sidebar/sidebar.tsx @@ -0,0 +1,60 @@ +import { Card, Divider } from '@dhis2/ui' +import PropTypes from 'prop-types' +import React, { useState } from 'react' +import { NavLink, useNavigate, useParams } from 'react-router-dom' +import classes from '../../App.module.css' +import { NameSpaceLinks } from '../namespaces/list' +import SearchField from './searchField' +import SelectDataStore from './select' + +export const SidebarNavLink = ({ to, label }) => { + return ( +
  • + + isActive ? 'active' : isPending ? 'pending' : '' + } + > + {label} + +
  • + ) +} + +SidebarNavLink.propTypes = { + label: PropTypes.string, + to: PropTypes.string, +} + +export const SidebarNavigation = () => { + return ( + <> + + + + ) +} + +const Sidebar = () => { + const navigate = useNavigate() + const { store } = useParams() + const [option, setOption] = useState(store) + + const handleDataStoreSelect = ({ selected }) => { + setOption(selected) + navigate(`/${selected}`) + } + return ( + + + + {store && } + + ) +} + +export default Sidebar diff --git a/src/routes/layout.tsx b/src/routes/layout.tsx index 2e86659..87d0402 100644 --- a/src/routes/layout.tsx +++ b/src/routes/layout.tsx @@ -1,41 +1,15 @@ import React from 'react' -import { Outlet, Link } from 'react-router-dom' +import { Outlet } from 'react-router-dom' +import classes from '../App.module.css' +import Sidebar from '../components/sidebar/sidebar' export default function Layout() { return ( -
    -