From 6162979e646e458ae71bc129b1395d1b787b3c50 Mon Sep 17 00:00:00 2001 From: Michael Beckemeyer Date: Tue, 27 Feb 2024 15:40:15 +0100 Subject: [PATCH] Move packages and merge theme upstream (#269, #132, #288) - Remove packages that are now located in the core packages repository - Remove redundant samples - Update all package versions to new releases of core packages --- .changeset/swift-readers-beam.md | 24 + package.json | 6 +- pnpm-lock.yaml | 581 ++++++++---------- .../layout-sidebar/package.json | 2 +- src/index.html | 15 - .../authentication/AuthServiceImpl.test.ts | 146 ----- .../authentication/AuthServiceImpl.ts | 87 --- src/packages/authentication/CHANGELOG.md | 19 - .../authentication/ForceAuth.test.tsx | 235 ------- src/packages/authentication/ForceAuth.tsx | 112 ---- src/packages/authentication/LICENSE | 202 ------ src/packages/authentication/README.md | 95 --- src/packages/authentication/api.ts | 174 ------ src/packages/authentication/build.config.mjs | 21 - src/packages/authentication/index.ts | 5 - src/packages/authentication/package.json | 25 - src/packages/authentication/services.ts | 3 - src/packages/authentication/typedoc.json | 5 - src/packages/authentication/useAuthState.ts | 25 - src/packages/basemap-switcher/package.json | 2 +- src/packages/coordinate-viewer/package.json | 2 +- src/packages/editing/package.json | 4 +- src/packages/geolocation/package.json | 4 +- src/packages/legend/package.json | 2 +- src/packages/local-storage/CHANGELOG.md | 31 - src/packages/local-storage/LICENSE | 202 ------ .../LocalStorageServiceImpl.test.ts | 365 ----------- .../local-storage/LocalStorageServiceImpl.ts | 350 ----------- src/packages/local-storage/README.md | 103 ---- src/packages/local-storage/api.ts | 101 --- src/packages/local-storage/build.config.mjs | 15 - src/packages/local-storage/index.ts | 3 - src/packages/local-storage/package.json | 21 - src/packages/local-storage/services.ts | 3 - src/packages/local-storage/typedoc.json | 5 - src/packages/map-navigation/package.json | 2 +- src/packages/map/package.json | 4 +- src/packages/measurement/package.json | 2 +- src/packages/notifier/CHANGELOG.md | 34 - src/packages/notifier/LICENSE | 202 ------ .../notifier/NotificationServiceImpl.test.ts | 98 --- .../notifier/NotificationServiceImpl.ts | 145 ----- src/packages/notifier/Notifier.test.tsx | 82 --- src/packages/notifier/Notifier.tsx | 89 --- src/packages/notifier/README.md | 96 --- .../__snapshots__/Notifier.test.tsx.snap | 79 --- src/packages/notifier/api.ts | 53 -- src/packages/notifier/build.config.mjs | 18 - src/packages/notifier/index.ts | 4 - src/packages/notifier/package.json | 26 - src/packages/notifier/services.ts | 3 - src/packages/notifier/typedoc.json | 5 - src/packages/ogc-features/package.json | 2 +- src/packages/overview-map/package.json | 2 +- src/packages/printing/package.json | 4 +- src/packages/result-list/package.json | 2 +- src/packages/scale-bar/package.json | 2 +- src/packages/scale-viewer/package.json | 2 +- src/packages/search/package.json | 2 +- src/packages/selection/package.json | 4 +- src/packages/spatial-bookmarks/package.json | 4 +- src/packages/theme/README.md | 69 +-- src/packages/theme/package.json | 4 +- src/packages/theme/theme.ts | 318 +--------- src/packages/toc/package.json | 2 +- src/samples/auth-sample/README.md | 11 - src/samples/auth-sample/auth-app/AppUI.tsx | 19 - src/samples/auth-sample/auth-app/CHANGELOG.md | 26 - .../auth-sample/auth-app/LogoutButton.tsx | 22 - src/samples/auth-sample/auth-app/app.ts | 14 - .../auth-app/auth-plugin/LoginMask.tsx | 101 --- .../auth-app/auth-plugin/TestAuthPlugin.ts | 86 --- .../auth-sample/auth-app/build.config.mjs | 14 - src/samples/auth-sample/auth-app/package.json | 13 - src/samples/auth-sample/auth-app/services.ts | 3 - src/samples/auth-sample/index.html | 25 - .../sidebar-app/package.json | 2 +- src/samples/map-sample/ol-app/package.json | 10 +- src/samples/notify-sample/README.md | 6 - src/samples/notify-sample/index.html | 20 - .../notify-sample/notify-app/AppUI.tsx | 115 ---- .../notify-sample/notify-app/CHANGELOG.md | 26 - src/samples/notify-sample/notify-app/app.ts | 14 - .../notify-sample/notify-app/build.config.mjs | 8 - .../notify-sample/notify-app/package.json | 12 - .../ogc-api-sample/ogc-app/package.json | 4 +- .../basemap-switcher-app/package.json | 2 +- .../highlight-and-zoom-app/package.json | 2 +- .../test-menu-fix/menu-fix-app/package.json | 2 +- .../result-list-app/package.json | 2 +- src/samples/test-toc/toc-app/package.json | 2 +- src/samples/theming-sample/index.html | 13 - .../theming-sample/theming-app/AppUI.tsx | 175 ------ .../theming-sample/theming-app/CHANGELOG.md | 22 - src/samples/theming-sample/theming-app/app.ts | 14 - .../theming-app/build.config.mjs | 5 - .../theming-sample/theming-app/package.json | 10 - typedoc.config.cjs | 3 - vite.config.ts | 7 +- 99 files changed, 318 insertions(+), 4846 deletions(-) create mode 100644 .changeset/swift-readers-beam.md delete mode 100644 src/packages/authentication/AuthServiceImpl.test.ts delete mode 100644 src/packages/authentication/AuthServiceImpl.ts delete mode 100644 src/packages/authentication/CHANGELOG.md delete mode 100644 src/packages/authentication/ForceAuth.test.tsx delete mode 100644 src/packages/authentication/ForceAuth.tsx delete mode 100644 src/packages/authentication/LICENSE delete mode 100644 src/packages/authentication/README.md delete mode 100644 src/packages/authentication/api.ts delete mode 100644 src/packages/authentication/build.config.mjs delete mode 100644 src/packages/authentication/index.ts delete mode 100644 src/packages/authentication/package.json delete mode 100644 src/packages/authentication/services.ts delete mode 100644 src/packages/authentication/typedoc.json delete mode 100644 src/packages/authentication/useAuthState.ts delete mode 100644 src/packages/local-storage/CHANGELOG.md delete mode 100644 src/packages/local-storage/LICENSE delete mode 100644 src/packages/local-storage/LocalStorageServiceImpl.test.ts delete mode 100644 src/packages/local-storage/LocalStorageServiceImpl.ts delete mode 100644 src/packages/local-storage/README.md delete mode 100644 src/packages/local-storage/api.ts delete mode 100644 src/packages/local-storage/build.config.mjs delete mode 100644 src/packages/local-storage/index.ts delete mode 100644 src/packages/local-storage/package.json delete mode 100644 src/packages/local-storage/services.ts delete mode 100644 src/packages/local-storage/typedoc.json delete mode 100644 src/packages/notifier/CHANGELOG.md delete mode 100644 src/packages/notifier/LICENSE delete mode 100644 src/packages/notifier/NotificationServiceImpl.test.ts delete mode 100644 src/packages/notifier/NotificationServiceImpl.ts delete mode 100644 src/packages/notifier/Notifier.test.tsx delete mode 100644 src/packages/notifier/Notifier.tsx delete mode 100644 src/packages/notifier/README.md delete mode 100644 src/packages/notifier/__snapshots__/Notifier.test.tsx.snap delete mode 100644 src/packages/notifier/api.ts delete mode 100644 src/packages/notifier/build.config.mjs delete mode 100644 src/packages/notifier/index.ts delete mode 100644 src/packages/notifier/package.json delete mode 100644 src/packages/notifier/services.ts delete mode 100644 src/packages/notifier/typedoc.json delete mode 100644 src/samples/auth-sample/README.md delete mode 100644 src/samples/auth-sample/auth-app/AppUI.tsx delete mode 100644 src/samples/auth-sample/auth-app/CHANGELOG.md delete mode 100644 src/samples/auth-sample/auth-app/LogoutButton.tsx delete mode 100644 src/samples/auth-sample/auth-app/app.ts delete mode 100644 src/samples/auth-sample/auth-app/auth-plugin/LoginMask.tsx delete mode 100644 src/samples/auth-sample/auth-app/auth-plugin/TestAuthPlugin.ts delete mode 100644 src/samples/auth-sample/auth-app/build.config.mjs delete mode 100644 src/samples/auth-sample/auth-app/package.json delete mode 100644 src/samples/auth-sample/auth-app/services.ts delete mode 100644 src/samples/auth-sample/index.html delete mode 100644 src/samples/notify-sample/README.md delete mode 100644 src/samples/notify-sample/index.html delete mode 100644 src/samples/notify-sample/notify-app/AppUI.tsx delete mode 100644 src/samples/notify-sample/notify-app/CHANGELOG.md delete mode 100644 src/samples/notify-sample/notify-app/app.ts delete mode 100644 src/samples/notify-sample/notify-app/build.config.mjs delete mode 100644 src/samples/notify-sample/notify-app/package.json delete mode 100644 src/samples/theming-sample/index.html delete mode 100644 src/samples/theming-sample/theming-app/AppUI.tsx delete mode 100644 src/samples/theming-sample/theming-app/CHANGELOG.md delete mode 100644 src/samples/theming-sample/theming-app/app.ts delete mode 100644 src/samples/theming-sample/theming-app/build.config.mjs delete mode 100644 src/samples/theming-sample/theming-app/package.json diff --git a/.changeset/swift-readers-beam.md b/.changeset/swift-readers-beam.md new file mode 100644 index 00000000..6993db47 --- /dev/null +++ b/.changeset/swift-readers-beam.md @@ -0,0 +1,24 @@ +--- +"@open-pioneer/experimental-layout-sidebar": patch +"@open-pioneer/coordinate-viewer": patch +"@open-pioneer/spatial-bookmarks": patch +"@open-pioneer/basemap-switcher": patch +"@open-pioneer/map-navigation": patch +"@open-pioneer/ogc-features": patch +"@open-pioneer/overview-map": patch +"@open-pioneer/scale-viewer": patch +"@open-pioneer/geolocation": patch +"@open-pioneer/measurement": patch +"@open-pioneer/result-list": patch +"@open-pioneer/scale-bar": patch +"@open-pioneer/selection": patch +"@open-pioneer/printing": patch +"@open-pioneer/editing": patch +"@open-pioneer/legend": patch +"@open-pioneer/search": patch +"@open-pioneer/theme": patch +"@open-pioneer/map": patch +"@open-pioneer/toc": patch +--- + +Update versions of core packages diff --git a/package.json b/package.json index 9e164646..7e13995b 100644 --- a/package.json +++ b/package.json @@ -72,9 +72,9 @@ "@maplibre/maplibre-gl-style-spec": "^19.3.3", "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/core": "^1.2.1", - "@open-pioneer/http": "^2.1.2", - "@open-pioneer/integration": "^2.0.3", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/http": "^2.1.4", + "@open-pioneer/integration": "^2.0.5", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/test-utils": "^1.1.1", "framer-motion": "^10.17.4", "html2canvas": "^1.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 46fcb62e..ebb22fd0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,19 +36,19 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/react': specifier: ^2.8.2 - version: 2.8.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(@types/react@18.2.55)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 2.8.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(@types/react@18.2.55)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@chakra-ui/system': specifier: ^2.6.2 - version: 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + version: 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@emotion/cache': specifier: ^11.11.0 version: 11.11.0 '@emotion/react': specifier: ^11.11.3 - version: 11.11.3(@types/react@18.2.55)(react@18.2.0) + version: 11.11.4(@types/react@18.2.55)(react@18.2.0) '@emotion/styled': specifier: ^11.11.0 - version: 11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0) + version: 11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0) '@formatjs/intl': specifier: ^2.9.9 version: 2.10.0(typescript@5.3.3) @@ -57,19 +57,19 @@ importers: version: 19.3.3 '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 '@open-pioneer/http': - specifier: ^2.1.2 - version: 2.1.2(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.1) + specifier: ^2.1.4 + version: 2.1.4(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2) '@open-pioneer/integration': - specifier: ^2.0.3 - version: 2.0.3(@open-pioneer/runtime@2.1.1) + specifier: ^2.0.5 + version: 2.0.5(@open-pioneer/runtime@2.1.2) '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/test-utils': specifier: ^1.1.1 version: 1.1.1(@formatjs/intl@2.10.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/runtime-react-support@1.0.0)(@testing-library/dom@9.3.4)(@testing-library/react@14.2.1)(react-dom@18.2.0)(react@18.2.0) @@ -112,7 +112,7 @@ importers: version: 2.0.0 '@open-pioneer/vite-plugin-pioneer': specifier: ^2.0.0 - version: 2.0.0(@open-pioneer/runtime@2.1.1)(sass@1.69.7)(vite@4.5.2) + version: 2.0.0(@open-pioneer/runtime@2.1.2)(sass@1.69.7)(vite@4.5.2) '@testing-library/dom': specifier: ^9.3.3 version: 9.3.4 @@ -235,49 +235,23 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/system': specifier: ^2.6.2 - version: 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + version: 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@emotion/react': specifier: ^11.11.3 - version: 11.11.3(@types/react@18.2.55)(react@18.2.0) + version: 11.11.4(@types/react@18.2.55)(react@18.2.0) '@emotion/styled': specifier: ^11.11.0 - version: 11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0) + version: 11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0) '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) - react: - specifier: ^18.2.0 - version: 18.2.0 - devDependencies: - openlayers-base-packages: - specifier: workspace:* - version: link:../../.. - publishDirectory: dist - - src/packages/authentication: - dependencies: - '@open-pioneer/core': - specifier: ^1.2.1 - version: 1.2.1 - '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) react: specifier: ^18.2.0 version: 18.2.0 - react-use: - specifier: ^17.4.2 - version: 17.4.2(react-dom@18.2.0)(react@18.2.0) devDependencies: - '@open-pioneer/test-utils': - specifier: ^1.1.1 - version: 1.1.1(@formatjs/intl@2.10.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/runtime-react-support@1.0.0)(@testing-library/dom@9.3.4)(@testing-library/react@14.2.1)(react-dom@18.2.0)(react@18.2.0) - '@testing-library/react': - specifier: ^14.1.2 - version: 14.2.1(react-dom@18.2.0)(react@18.2.0) openlayers-base-packages: specifier: workspace:* version: link:../../.. @@ -287,7 +261,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -295,11 +269,11 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) chakra-react-select: specifier: ^4.7.6 - version: 4.7.6(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/layout@2.3.1)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@emotion/react@11.11.3)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) + version: 4.7.6(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/layout@2.3.1)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@emotion/react@11.11.4)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) ol: specifier: ^8.2.0 version: 8.2.0 @@ -325,7 +299,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -333,8 +307,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) ol: specifier: ^8.2.0 version: 8.2.0 @@ -362,14 +336,14 @@ importers: specifier: ^1.2.1 version: 1.2.1 '@open-pioneer/http': - specifier: ^2.1.2 - version: 2.1.2(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.1) + specifier: ^2.1.4 + version: 2.1.4(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2) '@open-pioneer/map': specifier: workspace:^ version: link:../map '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) ol: specifier: ^8.2.0 version: 8.2.0 @@ -386,7 +360,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 @@ -394,14 +368,14 @@ importers: specifier: workspace:^ version: link:../map '@open-pioneer/notifier': - specifier: workspace:^ - version: link:../notifier + specifier: ^0.3.1 + version: 0.3.1(@chakra-ui/icons@2.1.1)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2)(react@18.2.0) '@open-pioneer/react-utils': specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) ol: specifier: ^8.2.0 version: 8.2.0 @@ -430,7 +404,7 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -438,8 +412,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -461,40 +435,23 @@ importers: version: link:../../.. publishDirectory: dist - src/packages/local-storage: - dependencies: - '@open-pioneer/core': - specifier: ^1.2.1 - version: 1.2.1 - '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) - devDependencies: - '@open-pioneer/test-utils': - specifier: ^1.1.1 - version: 1.1.1(@formatjs/intl@2.10.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/runtime-react-support@1.0.0)(@testing-library/dom@9.3.4)(@testing-library/react@14.2.1)(react-dom@18.2.0)(react@18.2.0) - openlayers-base-packages: - specifier: workspace:* - version: link:../../.. - publishDirectory: dist - src/packages/map: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 '@open-pioneer/http': - specifier: ^2.1.2 - version: 2.1.2(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.1) + specifier: ^2.1.4 + version: 2.1.4(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2) '@open-pioneer/react-utils': specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) '@types/proj4': specifier: ^2.5.2 version: 2.5.2 @@ -535,7 +492,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -543,8 +500,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -593,7 +550,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -601,8 +558,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -624,43 +581,14 @@ importers: version: link:../../.. publishDirectory: dist - src/packages/notifier: - dependencies: - '@chakra-ui/icons': - specifier: ^2.1.1 - version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) - '@open-pioneer/chakra-integration': - specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) - '@open-pioneer/core': - specifier: ^1.2.1 - version: 1.2.1 - '@open-pioneer/react-utils': - specifier: workspace:^ - version: link:../react-utils - '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) - react: - specifier: ^18.2.0 - version: 18.2.0 - devDependencies: - '@open-pioneer/test-utils': - specifier: ^1.1.1 - version: 1.1.1(@formatjs/intl@2.10.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/runtime-react-support@1.0.0)(@testing-library/dom@9.3.4)(@testing-library/react@14.2.1)(react-dom@18.2.0)(react@18.2.0) - openlayers-base-packages: - specifier: workspace:* - version: link:../../.. - publishDirectory: dist - src/packages/ogc-features: dependencies: '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 '@open-pioneer/http': - specifier: ^2.1.2 - version: 2.1.2(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.1) + specifier: ^2.1.4 + version: 2.1.4(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2) '@open-pioneer/search': specifier: workspace:^ version: link:../search @@ -686,7 +614,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -697,8 +625,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) ol: specifier: ^8.2.0 version: 8.2.0 @@ -721,7 +649,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 @@ -729,14 +657,14 @@ importers: specifier: workspace:^ version: link:../map '@open-pioneer/notifier': - specifier: workspace:^ - version: link:../notifier + specifier: ^0.3.1 + version: 0.3.1(@chakra-ui/icons@2.1.1)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2)(react@18.2.0) '@open-pioneer/react-utils': specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -771,7 +699,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 @@ -800,7 +728,7 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 @@ -811,8 +739,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) '@tanstack/react-table': specifier: ^8.11.6 version: 8.11.6(react-dom@18.2.0)(react@18.2.0) @@ -841,7 +769,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -849,8 +777,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) ol: specifier: ^8.2.0 version: 8.2.0 @@ -873,7 +801,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -881,8 +809,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) react: specifier: ^18.2.0 version: 18.2.0 @@ -905,7 +833,7 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 @@ -916,11 +844,11 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) chakra-react-select: specifier: ^4.7.6 - version: 4.7.6(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/layout@2.3.1)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@emotion/react@11.11.3)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) + version: 4.7.6(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/layout@2.3.1)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@emotion/react@11.11.4)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -952,7 +880,7 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 @@ -960,17 +888,17 @@ importers: specifier: workspace:^ version: link:../map '@open-pioneer/notifier': - specifier: workspace:^ - version: link:../notifier + specifier: ^0.3.1 + version: 0.3.1(@chakra-ui/icons@2.1.1)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2)(react@18.2.0) '@open-pioneer/react-utils': specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) chakra-react-select: specifier: ^4.7.6 - version: 4.7.6(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/layout@2.3.1)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@emotion/react@11.11.3)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) + version: 4.7.6(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/layout@2.3.1)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@emotion/react@11.11.4)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -1005,13 +933,13 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': specifier: ^1.2.1 version: 1.2.1 '@open-pioneer/local-storage': - specifier: workspace:^ - version: link:../local-storage + specifier: ^0.3.1 + version: 0.3.1(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -1019,8 +947,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -1057,14 +985,14 @@ importers: src/packages/theme: dependencies: '@open-pioneer/base-theme': - specifier: ^0.2.0 - version: 0.2.0(@open-pioneer/chakra-integration@1.1.1) + specifier: ^0.3.0 + version: 0.3.0(@open-pioneer/chakra-integration@1.1.1) '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) devDependencies: openlayers-base-packages: specifier: workspace:* @@ -1078,7 +1006,7 @@ importers: version: link:../basemap-switcher '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../map @@ -1086,8 +1014,8 @@ importers: specifier: workspace:^ version: link:../react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -1115,27 +1043,6 @@ importers: version: 1.5.1 publishDirectory: dist - src/samples/auth-sample/auth-app: - dependencies: - '@open-pioneer/authentication': - specifier: workspace:^ - version: link:../../../packages/authentication - '@open-pioneer/chakra-integration': - specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) - '@open-pioneer/core': - specifier: ^1.2.1 - version: 1.2.1 - '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) - '@open-pioneer/theme': - specifier: workspace:^ - version: link:../../../packages/theme - react: - specifier: ^18.2.0 - version: 18.2.0 - src/samples/experimental-sidebar/sidebar-app: dependencies: '@chakra-ui/icons': @@ -1143,19 +1050,19 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/system': specifier: ^2.6.2 - version: 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + version: 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@emotion/react': specifier: ^11.11.3 - version: 11.11.3(@types/react@18.2.55)(react@18.2.0) + version: 11.11.4(@types/react@18.2.55)(react@18.2.0) '@emotion/styled': specifier: ^11.11.0 - version: 11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0) + version: 11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0) '@open-pioneer/basemap-switcher': specifier: workspace:^ version: link:../../../packages/basemap-switcher '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/experimental-layout-sidebar': specifier: workspace:^ version: link:../../../experimental-packages/layout-sidebar @@ -1166,8 +1073,8 @@ importers: specifier: workspace:^ version: link:../../../packages/react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/theme': specifier: workspace:^ version: link:../../../packages/theme @@ -1194,16 +1101,16 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/system': specifier: ^2.6.2 - version: 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + version: 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@emotion/react': specifier: ^11.11.3 - version: 11.11.3(@types/react@18.2.55)(react@18.2.0) + version: 11.11.4(@types/react@18.2.55)(react@18.2.0) '@emotion/styled': specifier: ^11.11.0 - version: 11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0) + version: 11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0) '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/coordinate-viewer': specifier: workspace:^ version: link:../../../packages/coordinate-viewer @@ -1217,8 +1124,8 @@ importers: specifier: workspace:^ version: link:../../../packages/geolocation '@open-pioneer/http': - specifier: ^2.1.2 - version: 2.1.2(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.1) + specifier: ^2.1.4 + version: 2.1.4(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2) '@open-pioneer/legend': specifier: workspace:^ version: link:../../../packages/legend @@ -1232,8 +1139,8 @@ importers: specifier: workspace:^ version: link:../../../packages/measurement '@open-pioneer/notifier': - specifier: workspace:^ - version: link:../../../packages/notifier + specifier: ^0.3.1 + version: 0.3.1(@chakra-ui/icons@2.1.1)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2)(react@18.2.0) '@open-pioneer/ogc-features': specifier: workspace:^ version: link:../../../packages/ogc-features @@ -1250,8 +1157,8 @@ importers: specifier: workspace:^ version: link:../../../packages/result-list '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/scale-bar': specifier: workspace:^ version: link:../../../packages/scale-bar @@ -1292,24 +1199,6 @@ importers: specifier: ^1.12.1 version: 1.12.1(@types/react@18.2.55)(react@18.2.0) - src/samples/notify-sample/notify-app: - dependencies: - '@open-pioneer/chakra-integration': - specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) - '@open-pioneer/notifier': - specifier: workspace:^ - version: link:../../../packages/notifier - '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) - '@open-pioneer/theme': - specifier: workspace:^ - version: link:../../../packages/theme - react: - specifier: ^18.2.0 - version: 18.2.0 - src/samples/ogc-api-sample/ogc-app: dependencies: '@open-pioneer/basemap-switcher': @@ -1317,10 +1206,10 @@ importers: version: link:../../../packages/basemap-switcher '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/http': - specifier: ^2.1.2 - version: 2.1.2(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.1) + specifier: ^2.1.4 + version: 2.1.4(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2) '@open-pioneer/map': specifier: workspace:^ version: link:../../../packages/map @@ -1334,8 +1223,8 @@ importers: specifier: workspace:^ version: link:../../../packages/react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/theme': specifier: workspace:^ version: link:../../../packages/theme @@ -1359,7 +1248,7 @@ importers: version: link:../../../packages/basemap-switcher '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../../../packages/map @@ -1367,8 +1256,8 @@ importers: specifier: workspace:^ version: link:../../../packages/react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/theme': specifier: workspace:^ version: link:../../../packages/theme @@ -1380,7 +1269,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../../../packages/map @@ -1388,8 +1277,8 @@ importers: specifier: workspace:^ version: link:../../../packages/react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) react: specifier: ^18.2.0 version: 18.2.0 @@ -1398,10 +1287,10 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) react: specifier: ^18.2.0 version: 18.2.0 @@ -1410,7 +1299,7 @@ importers: dependencies: '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../../../packages/map @@ -1421,8 +1310,8 @@ importers: specifier: workspace:^ version: link:../../../packages/result-list '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/theme': specifier: workspace:^ version: link:../../../packages/theme @@ -1437,16 +1326,16 @@ importers: version: 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/system': specifier: ^2.6.2 - version: 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + version: 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@emotion/react': specifier: ^11.11.3 - version: 11.11.3(@types/react@18.2.55)(react@18.2.0) + version: 11.11.4(@types/react@18.2.55)(react@18.2.0) '@emotion/styled': specifier: ^11.11.0 - version: 11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0) + version: 11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0) '@open-pioneer/chakra-integration': specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/map': specifier: workspace:^ version: link:../../../packages/map @@ -1454,8 +1343,8 @@ importers: specifier: workspace:^ version: link:../../../packages/react-utils '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.1.2 + version: 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/toc': specifier: workspace:^ version: link:../../../packages/toc @@ -1472,18 +1361,6 @@ importers: specifier: ^4.12.0 version: 4.12.0(react@18.2.0) - src/samples/theming-sample/theming-app: - dependencies: - '@open-pioneer/chakra-integration': - specifier: ^1.1.1 - version: 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) - '@open-pioneer/runtime': - specifier: ^2.1.0 - version: 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) - '@open-pioneer/theme': - specifier: workspace:^ - version: link:../../../packages/theme - src/testing/test-utils: {} support/disabled-package: {} @@ -1582,7 +1459,7 @@ packages: '@chakra-ui/react-use-controllable-state': 2.1.0(react@18.2.0) '@chakra-ui/react-use-merge-refs': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@chakra-ui/transition': 2.1.0(framer-motion@10.18.0)(react@18.2.0) framer-motion: 10.18.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 @@ -1597,7 +1474,7 @@ packages: '@chakra-ui/react-context': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 '@chakra-ui/spinner': 2.1.0(@chakra-ui/system@2.6.2)(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/anatomy@2.2.2: @@ -1613,7 +1490,7 @@ packages: '@chakra-ui/react-children-utils': 2.0.6(react@18.2.0) '@chakra-ui/react-context': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/breadcrumb@2.2.0(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -1625,7 +1502,7 @@ packages: '@chakra-ui/react-children-utils': 2.0.6(react@18.2.0) '@chakra-ui/react-context': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/breakpoint-utils@2.0.8: @@ -1643,7 +1520,7 @@ packages: '@chakra-ui/react-use-merge-refs': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 '@chakra-ui/spinner': 2.1.0(@chakra-ui/system@2.6.2)(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/card@2.2.0(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -1653,7 +1530,7 @@ packages: react: '>=18' dependencies: '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/checkbox@2.3.2(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -1671,7 +1548,7 @@ packages: '@chakra-ui/react-use-safe-layout-effect': 2.1.0(react@18.2.0) '@chakra-ui/react-use-update-effect': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@chakra-ui/visually-hidden': 2.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@zag-js/focus-visible': 0.16.0 react: 18.2.0 @@ -1692,7 +1569,7 @@ packages: react: '>=18' dependencies: '@chakra-ui/icon': 3.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/color-mode@2.2.0(react@18.2.0): @@ -1709,7 +1586,7 @@ packages: '@chakra-ui/system': '>=2.0.0' react: '>=18' dependencies: - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/counter@2.1.0(react@18.2.0): @@ -1722,13 +1599,13 @@ packages: '@chakra-ui/shared-utils': 2.0.5 react: 18.2.0 - /@chakra-ui/css-reset@2.3.0(@emotion/react@11.11.3)(react@18.2.0): + /@chakra-ui/css-reset@2.3.0(@emotion/react@11.11.4)(react@18.2.0): resolution: {integrity: sha512-cQwwBy5O0jzvl0K7PLTLgp8ijqLPKyuEMiDXwYzl95seD3AoeuoCLyzZcJtVqaUZ573PiBdAbY/IlZcwDOItWg==} peerDependencies: '@emotion/react': '>=10.0.35' react: '>=18' dependencies: - '@emotion/react': 11.11.3(@types/react@18.2.55)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.55)(react@18.2.0) react: 18.2.0 /@chakra-ui/descendant@3.1.0(react@18.2.0): @@ -1758,7 +1635,7 @@ packages: '@chakra-ui/react-use-safe-layout-effect': 2.1.0(react@18.2.0) '@chakra-ui/react-use-update-effect': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/event-utils@2.0.8: @@ -1786,7 +1663,7 @@ packages: '@chakra-ui/react-types': 2.0.7(react@18.2.0) '@chakra-ui/react-use-merge-refs': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/hooks@2.2.1(patch_hash=zntq7izvicj3ptw5qmsyjygbmu)(react@18.2.0): @@ -1808,7 +1685,7 @@ packages: react: '>=18' dependencies: '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/icons@2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -1818,7 +1695,7 @@ packages: react: '>=18' dependencies: '@chakra-ui/icon': 3.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 dev: false @@ -1830,7 +1707,7 @@ packages: dependencies: '@chakra-ui/react-use-safe-layout-effect': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/input@2.1.2(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -1844,7 +1721,7 @@ packages: '@chakra-ui/react-children-utils': 2.0.6(react@18.2.0) '@chakra-ui/react-context': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/layout@2.3.1(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -1859,7 +1736,7 @@ packages: '@chakra-ui/react-children-utils': 2.0.6(react@18.2.0) '@chakra-ui/react-context': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/lazy-utils@2.0.5: @@ -1881,7 +1758,7 @@ packages: '@chakra-ui/breakpoint-utils': 2.0.8 '@chakra-ui/react-env': 3.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/menu@2.2.1(patch_hash=x7y3u4pvzv3wpkejsnxo3rp5vq)(@chakra-ui/system@2.6.2)(framer-motion@10.18.0)(react@18.2.0): @@ -1905,7 +1782,7 @@ packages: '@chakra-ui/react-use-outside-click': 2.2.0(patch_hash=uw4qsrve2rd7lemccfb44ornky)(react@18.2.0) '@chakra-ui/react-use-update-effect': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@chakra-ui/transition': 2.1.0(framer-motion@10.18.0)(react@18.2.0) framer-motion: 10.18.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 @@ -1926,7 +1803,7 @@ packages: '@chakra-ui/react-types': 2.0.7(react@18.2.0) '@chakra-ui/react-use-merge-refs': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@chakra-ui/transition': 2.1.0(framer-motion@10.18.0)(react@18.2.0) aria-hidden: 1.2.3 framer-motion: 10.18.0(react-dom@18.2.0)(react@18.2.0) @@ -1954,7 +1831,7 @@ packages: '@chakra-ui/react-use-safe-layout-effect': 2.1.0(react@18.2.0) '@chakra-ui/react-use-update-effect': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/number-utils@2.0.7: @@ -1975,7 +1852,7 @@ packages: '@chakra-ui/react-use-controllable-state': 2.1.0(react@18.2.0) '@chakra-ui/react-use-merge-refs': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/popover@2.2.1(@chakra-ui/system@2.6.2)(framer-motion@10.18.0)(react@18.2.0): @@ -1996,7 +1873,7 @@ packages: '@chakra-ui/react-use-focus-on-pointer-down': 2.1.0(react@18.2.0) '@chakra-ui/react-use-merge-refs': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) framer-motion: 10.18.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 @@ -2028,10 +1905,10 @@ packages: react: '>=18' dependencies: '@chakra-ui/react-context': 2.1.0(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 - /@chakra-ui/provider@2.4.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react-dom@18.2.0)(react@18.2.0): + /@chakra-ui/provider@2.4.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-w0Tef5ZCJK1mlJorcSjItCSbyvVuqpvyWdxZiVQmE6fvSJR83wZof42ux0+sfWD+I7rHSfj+f9nzhNaEWClysw==} peerDependencies: '@emotion/react': ^11.0.0 @@ -2039,13 +1916,13 @@ packages: react: '>=18' react-dom: '>=18' dependencies: - '@chakra-ui/css-reset': 2.3.0(@emotion/react@11.11.3)(react@18.2.0) + '@chakra-ui/css-reset': 2.3.0(@emotion/react@11.11.4)(react@18.2.0) '@chakra-ui/portal': 2.1.0(react-dom@18.2.0)(react@18.2.0) '@chakra-ui/react-env': 3.1.0(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@chakra-ui/utils': 2.0.15 - '@emotion/react': 11.11.3(@types/react@18.2.55)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.55)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2060,7 +1937,7 @@ packages: '@chakra-ui/react-types': 2.0.7(react@18.2.0) '@chakra-ui/react-use-merge-refs': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@zag-js/focus-visible': 0.16.0 react: 18.2.0 @@ -2238,7 +2115,7 @@ packages: '@chakra-ui/utils': 2.0.15 react: 18.2.0 - /@chakra-ui/react@2.8.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(@types/react@18.2.55)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0): + /@chakra-ui/react@2.8.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(@types/react@18.2.55)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-Hn0moyxxyCDKuR9ywYpqgX8dvjqwu9ArwpIb9wHNYjnODETjLwazgNIliCVBRcJvysGRiV51U2/JtJVrpeCjUQ==} peerDependencies: '@emotion/react': ^11.0.0 @@ -2257,7 +2134,7 @@ packages: '@chakra-ui/close-button': 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/control-box': 2.1.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/counter': 2.1.0(react@18.2.0) - '@chakra-ui/css-reset': 2.3.0(@emotion/react@11.11.3)(react@18.2.0) + '@chakra-ui/css-reset': 2.3.0(@emotion/react@11.11.4)(react@18.2.0) '@chakra-ui/editable': 3.1.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/focus-lock': 2.1.0(@types/react@18.2.55)(react@18.2.0) '@chakra-ui/form-control': 2.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) @@ -2276,7 +2153,7 @@ packages: '@chakra-ui/popper': 3.1.0(react@18.2.0) '@chakra-ui/portal': 2.1.0(react-dom@18.2.0)(react@18.2.0) '@chakra-ui/progress': 2.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) - '@chakra-ui/provider': 2.4.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react-dom@18.2.0)(react@18.2.0) + '@chakra-ui/provider': 2.4.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react-dom@18.2.0)(react@18.2.0) '@chakra-ui/radio': 2.1.2(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/react-env': 3.1.0(react@18.2.0) '@chakra-ui/select': 2.1.2(@chakra-ui/system@2.6.2)(react@18.2.0) @@ -2288,7 +2165,7 @@ packages: '@chakra-ui/stepper': 2.3.1(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/styled-system': 2.9.2 '@chakra-ui/switch': 2.1.2(@chakra-ui/system@2.6.2)(framer-motion@10.18.0)(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@chakra-ui/table': 2.1.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/tabs': 3.0.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/tag': 3.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) @@ -2300,8 +2177,8 @@ packages: '@chakra-ui/transition': 2.1.0(framer-motion@10.18.0)(react@18.2.0) '@chakra-ui/utils': 2.0.15 '@chakra-ui/visually-hidden': 2.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) - '@emotion/react': 11.11.3(@types/react@18.2.55)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.55)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0) framer-motion: 10.18.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2316,7 +2193,7 @@ packages: dependencies: '@chakra-ui/form-control': 2.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/shared-utils@2.0.5: @@ -2331,7 +2208,7 @@ packages: '@chakra-ui/media-query': 3.3.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/react-use-previous': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/skip-nav@2.1.0(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -2340,7 +2217,7 @@ packages: '@chakra-ui/system': '>=2.0.0' react: '>=18' dependencies: - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/slider@2.1.0(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -2359,7 +2236,7 @@ packages: '@chakra-ui/react-use-pan-event': 2.1.0(react@18.2.0) '@chakra-ui/react-use-size': 2.1.0(react@18.2.0) '@chakra-ui/react-use-update-effect': 2.1.0(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/spinner@2.1.0(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -2369,7 +2246,7 @@ packages: react: '>=18' dependencies: '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/stat@2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -2381,7 +2258,7 @@ packages: '@chakra-ui/icon': 3.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/react-context': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/stepper@2.3.1(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -2393,7 +2270,7 @@ packages: '@chakra-ui/icon': 3.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/react-context': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/styled-system@2.9.2: @@ -2412,11 +2289,11 @@ packages: dependencies: '@chakra-ui/checkbox': 2.3.2(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) framer-motion: 10.18.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 - /@chakra-ui/system@2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0): + /@chakra-ui/system@2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0): resolution: {integrity: sha512-EGtpoEjLrUu4W1fHD+a62XR+hzC5YfsWm+6lO0Kybcga3yYEij9beegO0jZgug27V+Rf7vns95VPVP6mFd/DEQ==} peerDependencies: '@emotion/react': ^11.0.0 @@ -2429,8 +2306,8 @@ packages: '@chakra-ui/styled-system': 2.9.2 '@chakra-ui/theme-utils': 2.0.21 '@chakra-ui/utils': 2.0.15 - '@emotion/react': 11.11.3(@types/react@18.2.55)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.55)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0) react: 18.2.0 react-fast-compare: 3.2.2 @@ -2442,7 +2319,7 @@ packages: dependencies: '@chakra-ui/react-context': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/tabs@3.0.0(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -2460,7 +2337,7 @@ packages: '@chakra-ui/react-use-merge-refs': 2.1.0(react@18.2.0) '@chakra-ui/react-use-safe-layout-effect': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/tag@3.1.1(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -2471,7 +2348,7 @@ packages: dependencies: '@chakra-ui/icon': 3.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/react-context': 2.1.0(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/textarea@2.1.2(@chakra-ui/system@2.6.2)(react@18.2.0): @@ -2482,7 +2359,7 @@ packages: dependencies: '@chakra-ui/form-control': 2.2.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@chakra-ui/theme-tools@2.1.2(@chakra-ui/styled-system@2.9.2): @@ -2529,7 +2406,7 @@ packages: '@chakra-ui/react-use-update-effect': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 '@chakra-ui/styled-system': 2.9.2 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) '@chakra-ui/theme': 3.3.1(@chakra-ui/styled-system@2.9.2) framer-motion: 10.18.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 @@ -2551,7 +2428,7 @@ packages: '@chakra-ui/react-use-event-listener': 2.1.0(react@18.2.0) '@chakra-ui/react-use-merge-refs': 2.1.0(react@18.2.0) '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) framer-motion: 10.18.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2580,7 +2457,7 @@ packages: '@chakra-ui/system': '>=2.0.0' react: '>=18' dependencies: - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) react: 18.2.0 /@changesets/apply-release-plan@6.1.4: @@ -2860,8 +2737,8 @@ packages: /@emotion/memoize@0.8.1: resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} - /@emotion/react@11.11.3(@types/react@18.2.55)(react@18.2.0): - resolution: {integrity: sha512-Cnn0kuq4DoONOMcnoVsTOR8E+AdnKFf//6kUWc4LCdnxj31pZWn7rIULd6Y7/Js1PiPHzn7SKCM9vB/jBni8eA==} + /@emotion/react@11.11.4(@types/react@18.2.55)(react@18.2.0): + resolution: {integrity: sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==} peerDependencies: '@types/react': '*' react: '>=16.8.0' @@ -2892,7 +2769,7 @@ packages: /@emotion/sheet@1.2.2: resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} - /@emotion/styled@11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0): + /@emotion/styled@11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0): resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==} peerDependencies: '@emotion/react': ^11.0.0-rc.0 @@ -2905,7 +2782,7 @@ packages: '@babel/runtime': 7.23.9 '@emotion/babel-plugin': 11.11.0 '@emotion/is-prop-valid': 1.2.1 - '@emotion/react': 11.11.3(@types/react@18.2.55)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.55)(react@18.2.0) '@emotion/serialize': 1.1.3 '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 @@ -3607,12 +3484,12 @@ packages: fastq: 1.15.0 dev: true - /@open-pioneer/base-theme@0.2.0(@open-pioneer/chakra-integration@1.1.1): - resolution: {integrity: sha512-aUn7pPBjErXGLJ665oef27P7tkc81e7BhwSWNh6dw3mS30hLRb9Vzqi10U6VkOd65HzgI4uw6ZT/1YvK5mqsRg==} + /@open-pioneer/base-theme@0.3.0(@open-pioneer/chakra-integration@1.1.1): + resolution: {integrity: sha512-I/ea7kEWrD+OvSwt2Y3utVY9jbywjmD2+gS5BMOJEDhEzdOK0g9EWzVupTODQPf9SuZ2IymeObR07tH92ICztA==} peerDependencies: '@open-pioneer/chakra-integration': ^1.1.1 dependencies: - '@open-pioneer/chakra-integration': 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + '@open-pioneer/chakra-integration': 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) /@open-pioneer/build-common@2.0.0: resolution: {integrity: sha512-8j88qeRWTRWsYFhVQl8WmX2NJaQP9oJuKnAe8f4MRgb6ZQ6yrPvkZh916CYT2VF0nsa7X2Hl9hFUKbJJnKp7UQ==} @@ -3671,7 +3548,7 @@ packages: engines: {node: '>= 18'} dev: true - /@open-pioneer/chakra-integration@1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0): + /@open-pioneer/chakra-integration@1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-ZXdyr/5dgY13y/wzS9T6gDgZNxc1Tk6cPSDgqIHA/isjSK9rpyHBJsQXoP+i7+PhoMCZiKMbljG/sBSDTpOQjg==} peerDependencies: '@chakra-ui/react': ^2.8.2 @@ -3682,10 +3559,10 @@ packages: react: ^18.2.0 react-dom: ^18.2.0 dependencies: - '@chakra-ui/react': 2.8.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(@types/react@18.2.55)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + '@chakra-ui/react': 2.8.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(@types/react@18.2.55)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@emotion/cache': 11.11.0 - '@emotion/react': 11.11.3(@types/react@18.2.55)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.3)(@types/react@18.2.55)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.55)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.4)(@types/react@18.2.55)(react@18.2.0) framer-motion: 10.18.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -3693,22 +3570,48 @@ packages: /@open-pioneer/core@1.2.1: resolution: {integrity: sha512-LuDc+jPxI5U+B0L6+dHu1PNqeVni2FD/mG2A/EoZQMnoT9ICDp3jChEFooGA7RbbR6wSum2DS4OjxBRoJvx0Ng==} - /@open-pioneer/http@2.1.2(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.1): - resolution: {integrity: sha512-rmoiiAdBUItCXqo7siQ0DPPEaZyfGB1E56syDGu/6x3Ww9bQmDxUfCcgb8ZHBi4o2KQNtfdcgdRpkcBlTwRIjQ==} + /@open-pioneer/http@2.1.4(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2): + resolution: {integrity: sha512-VlLUTHbqiYfIGDET3szESbHIrRnnjYSYGLN6POkRald21HeQFb/5FMnCj5rz1LCGP/OGcm/nIssR14XbP3oMdg==} peerDependencies: '@open-pioneer/core': ^1.2.1 - '@open-pioneer/runtime': ^2.1.0 + '@open-pioneer/runtime': ^2.1.2 dependencies: '@open-pioneer/core': 1.2.1 - '@open-pioneer/runtime': 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + '@open-pioneer/runtime': 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + dev: false + + /@open-pioneer/integration@2.0.5(@open-pioneer/runtime@2.1.2): + resolution: {integrity: sha512-T68w3wHrKbKn2UvMk8KdNaOgwAKm50CegfOdA1itgqT1XG8Um6DLN0IWG5qhQr2h+Bnx8q0V6xCYr7dw1tqymQ==} + peerDependencies: + '@open-pioneer/runtime': ^2.1.2 + dependencies: + '@open-pioneer/runtime': 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) dev: false - /@open-pioneer/integration@2.0.3(@open-pioneer/runtime@2.1.1): - resolution: {integrity: sha512-cgEYL3zSOrNgGw9KgaqUofMWE5qGtCdF+RDUvheT6HRuuzXfBMMT9KwVUhj4oE5i18JHb7ETpRvZ21zqo9Ks0w==} + /@open-pioneer/local-storage@0.3.1(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2): + resolution: {integrity: sha512-59ypfHxxX6A6uKNbmJZvXHsSXf83yseBb4MDXsalKbAysPiG1xh4IxCcgzdbjzhTEGUjU89ZQxLsktOGXSQ0oQ==} peerDependencies: - '@open-pioneer/runtime': ^2.1.0 + '@open-pioneer/core': ^1.2.1 + '@open-pioneer/runtime': ^2.1.2 dependencies: - '@open-pioneer/runtime': 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + '@open-pioneer/core': 1.2.1 + '@open-pioneer/runtime': 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + dev: false + + /@open-pioneer/notifier@0.3.1(@chakra-ui/icons@2.1.1)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime@2.1.2)(react@18.2.0): + resolution: {integrity: sha512-DE0wdWJgZDbfI73a47omNS39FAvSz4Df+b6pJq+9M0aU0HVBZrI9yU0sW/eI6St718wd27SL1ScxU6VacgU0CQ==} + peerDependencies: + '@chakra-ui/icons': ^2.1.1 + '@open-pioneer/chakra-integration': ^1.1.1 + '@open-pioneer/core': ^1.2.1 + '@open-pioneer/runtime': ^2.1.2 + react: ^18.2.0 + dependencies: + '@chakra-ui/icons': 2.1.1(@chakra-ui/system@2.6.2)(react@18.2.0) + '@open-pioneer/chakra-integration': 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + '@open-pioneer/core': 1.2.1 + '@open-pioneer/runtime': 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 dev: false /@open-pioneer/runtime-react-support@1.0.0(react@18.2.0): @@ -3718,11 +3621,11 @@ packages: dependencies: react: 18.2.0 - /@open-pioneer/runtime@2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-byyu91ghgSMzTKTKs8FNyl2lwV7qTBTw0r0c/AfAK6nZMzzfZGbOMTWMyZYiOqtyidFOQQnAI2v9iIcwbP1svA==} + /@open-pioneer/runtime@2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-fZ7uEPxHLGK4usOuzqZpet0e508gm7rQW8zITxQaS6t5oq+j0Sya0EPzMn2ymBEvhwgkbOAVCd27i+IidNeTaw==} peerDependencies: '@formatjs/intl': ^2.9.9 - '@open-pioneer/base-theme': ^0.2.0 + '@open-pioneer/base-theme': ^0.3.0 '@open-pioneer/chakra-integration': ^1.1.1 '@open-pioneer/core': ^1.2.1 '@open-pioneer/runtime-react-support': ^1.0.0 @@ -3730,8 +3633,8 @@ packages: react-dom: ^18.2.0 dependencies: '@formatjs/intl': 2.10.0(typescript@5.3.3) - '@open-pioneer/base-theme': 0.2.0(@open-pioneer/chakra-integration@1.1.1) - '@open-pioneer/chakra-integration': 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + '@open-pioneer/base-theme': 0.3.0(@open-pioneer/chakra-integration@1.1.1) + '@open-pioneer/chakra-integration': 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/core': 1.2.1 '@open-pioneer/runtime-react-support': 1.0.0(react@18.2.0) react: 18.2.0 @@ -3759,14 +3662,14 @@ packages: react-dom: ^18.2.0 dependencies: '@formatjs/intl': 2.10.0(typescript@5.3.3) - '@open-pioneer/chakra-integration': 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) + '@open-pioneer/chakra-integration': 1.1.1(@chakra-ui/react@2.8.2)(@emotion/cache@11.11.0)(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@open-pioneer/runtime-react-support': 1.0.0(react@18.2.0) '@testing-library/dom': 9.3.4 '@testing-library/react': 14.2.1(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - /@open-pioneer/vite-plugin-pioneer@2.0.0(@open-pioneer/runtime@2.1.1)(sass@1.69.7)(vite@4.5.2): + /@open-pioneer/vite-plugin-pioneer@2.0.0(@open-pioneer/runtime@2.1.2)(sass@1.69.7)(vite@4.5.2): resolution: {integrity: sha512-tiM2tmsM6TkpaPVdVgn889gnFv0kpRcGvict4Ig9ZkhIxyuhz0EFA+cstIQBT+ZEOOefeiAw9ryvMp83V7fL+Q==} engines: {node: '>= 18'} peerDependencies: @@ -3778,7 +3681,7 @@ packages: '@babel/template': 7.22.15 '@babel/types': 7.23.6 '@open-pioneer/build-common': 2.0.0 - '@open-pioneer/runtime': 2.1.1(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.2.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) + '@open-pioneer/runtime': 2.1.2(@formatjs/intl@2.10.0)(@open-pioneer/base-theme@0.3.0)(@open-pioneer/chakra-integration@1.1.1)(@open-pioneer/core@1.2.1)(@open-pioneer/runtime-react-support@1.0.0)(react-dom@18.2.0)(react@18.2.0) debug: 4.3.4 js-yaml: 4.1.0 sass: 1.69.7 @@ -4902,7 +4805,7 @@ packages: type-detect: 4.0.8 dev: true - /chakra-react-select@4.7.6(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/layout@2.3.1)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@emotion/react@11.11.3)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0): + /chakra-react-select@4.7.6(@chakra-ui/form-control@2.2.0)(@chakra-ui/icon@3.2.0)(@chakra-ui/layout@2.3.1)(@chakra-ui/media-query@3.3.0)(@chakra-ui/menu@2.2.1)(@chakra-ui/spinner@2.1.0)(@chakra-ui/system@2.6.2)(@emotion/react@11.11.4)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-ZL43hyXPnWf1g/HjsZDecbeJ4F2Q6tTPYJozlKWkrQ7lIX7ORP0aZYwmc5/Wly4UNzMimj2Vuosl6MmIXH+G2g==} peerDependencies: '@chakra-ui/form-control': ^2.0.0 @@ -4922,8 +4825,8 @@ packages: '@chakra-ui/media-query': 3.3.0(@chakra-ui/system@2.6.2)(react@18.2.0) '@chakra-ui/menu': 2.2.1(patch_hash=x7y3u4pvzv3wpkejsnxo3rp5vq)(@chakra-ui/system@2.6.2)(framer-motion@10.18.0)(react@18.2.0) '@chakra-ui/spinner': 2.1.0(@chakra-ui/system@2.6.2)(react@18.2.0) - '@chakra-ui/system': 2.6.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(react@18.2.0) - '@emotion/react': 11.11.3(@types/react@18.2.55)(react@18.2.0) + '@chakra-ui/system': 2.6.2(@emotion/react@11.11.4)(@emotion/styled@11.11.0)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.55)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-select: 5.8.0(patch_hash=5qabpn4zzsogoweiwbsb3mxt7y)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) @@ -7965,7 +7868,7 @@ packages: dependencies: '@babel/runtime': 7.23.9 '@emotion/cache': 11.11.0 - '@emotion/react': 11.11.3(@types/react@18.2.55)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.55)(react@18.2.0) '@floating-ui/dom': 1.5.3 '@types/react-transition-group': 4.4.9 memoize-one: 6.0.0 diff --git a/src/experimental-packages/layout-sidebar/package.json b/src/experimental-packages/layout-sidebar/package.json index e823b3af..06d17469 100644 --- a/src/experimental-packages/layout-sidebar/package.json +++ b/src/experimental-packages/layout-sidebar/package.json @@ -12,7 +12,7 @@ "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", "@open-pioneer/chakra-integration": "^1.1.1", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "react": "^18.2.0" }, "devDependencies": { diff --git a/src/index.html b/src/index.html index a9141ebc..0e394cc5 100644 --- a/src/index.html +++ b/src/index.html @@ -49,16 +49,6 @@

Samples

Demonstrates the usage of an "OGC API Features" and "OGC API Tiles" layer in the map. -
  • - Authentication -
    - Sample app for the authentication package. -
  • -
  • - Notifier -
    - Demonstrates how to use notifications. -
  • Test applications

    @@ -79,11 +69,6 @@

    Test applications


    Demonstrates the TOC and health check to detect unavailable services. -
  • - Theming -
    - Test app that shows the "trails" theme on Chakra UI components. -
  • Highlight and zoom
    diff --git a/src/packages/authentication/AuthServiceImpl.test.ts b/src/packages/authentication/AuthServiceImpl.test.ts deleted file mode 100644 index 6283f855..00000000 --- a/src/packages/authentication/AuthServiceImpl.test.ts +++ /dev/null @@ -1,146 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -/** - * @vitest-environment node - */ -import { EventEmitter } from "@open-pioneer/core"; -import { it, expect } from "vitest"; -import { AuthPlugin, AuthPluginEvents, AuthState, LoginFallback } from "./api"; -import { createElement } from "react"; -import { createService } from "@open-pioneer/test-utils/services"; -import { AuthServiceImpl } from "./AuthServiceImpl"; - -it("forwards the authentication plugin's state changes", async () => { - const plugin = new TestPlugin(); - const authService = await createService(AuthServiceImpl, { - references: { - plugin: plugin - } - }); - - const observedStates: AuthState[] = [authService.getAuthState()]; - authService.on("changed", () => { - observedStates.push(authService.getAuthState()); - }); - - plugin.$setAuthState({ kind: "pending" }); - plugin.$setAuthState({ - kind: "authenticated", - sessionInfo: { - userId: "t.user" - } - }); - plugin.$setAuthState({ kind: "not-authenticated" }); - - expect(observedStates).toMatchInlineSnapshot(` - [ - { - "kind": "not-authenticated", - }, - { - "kind": "pending", - }, - { - "kind": "authenticated", - "sessionInfo": { - "userId": "t.user", - }, - }, - { - "kind": "not-authenticated", - }, - ] - `); -}); - -it("creates a promise that resolves once the plugin is no longer pending", async () => { - const plugin = new TestPlugin(); - plugin.$setAuthState({ kind: "pending" }); - const authService = await createService(AuthServiceImpl, { - references: { - plugin: plugin - } - }); - expect(authService.getAuthState().kind).toBe("pending"); - - let didResolve = false; - const sessionInfoPromise = authService.getSessionInfo().then((info) => { - didResolve = true; - return info; - }); - await sleep(25); - expect(didResolve).toBe(false); - - plugin.$setAuthState({ - kind: "authenticated", - sessionInfo: { - userId: "t.user" - } - }); - const sessionInfo = await sessionInfoPromise; - expect(sessionInfo?.userId).toBe("t.user"); -}); - -it("returns the authentication plugins fallback", async () => { - const plugin = new TestPlugin(); - const authService = await createService(AuthServiceImpl, { - references: { - plugin: plugin - } - }); - - const behavior = authService.getLoginBehavior(); - expect(behavior.kind).toBe("fallback"); - expect((behavior as LoginFallback).Fallback).toBe(DummyFallback); -}); - -it("calls the plugin's logout method", async () => { - const plugin = new TestPlugin(); - const authService = await createService(AuthServiceImpl, { - references: { - plugin: plugin - } - }); - - expect(plugin.$logoutCalled).toBe(0); - await authService.logout(); - expect(plugin.$logoutCalled).toBe(1); -}); - -class TestPlugin extends EventEmitter implements AuthPlugin { - #state: AuthState = { - kind: "not-authenticated" - }; - - $logoutCalled = 0; - - getAuthState(): AuthState { - return this.#state; - } - - getLoginBehavior(): LoginFallback { - return { - kind: "fallback", - Fallback: DummyFallback - }; - } - - logout(): void { - ++this.$logoutCalled; - } - - $setAuthState(newState: AuthState) { - this.#state = newState; - this.emit("changed"); - } -} - -function DummyFallback(): JSX.Element { - return createElement("span", undefined, "Permission denied"); -} - -function sleep(ms: number) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); -} diff --git a/src/packages/authentication/AuthServiceImpl.ts b/src/packages/authentication/AuthServiceImpl.ts deleted file mode 100644 index c67b6f7f..00000000 --- a/src/packages/authentication/AuthServiceImpl.ts +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { - EventEmitter, - ManualPromise, - Resource, - createAbortError, - createManualPromise, - destroyResource, - createLogger -} from "@open-pioneer/core"; -import type { - AuthEvents, - AuthPlugin, - AuthService, - AuthState, - LoginBehavior, - SessionInfo -} from "./api"; -import type { Service, ServiceOptions } from "@open-pioneer/runtime"; - -const LOG = createLogger("authentication:AuthService"); - -export class AuthServiceImpl extends EventEmitter implements AuthService, Service { - #plugin: AuthPlugin; - #currentState: AuthState; - #whenUserInfo: ManualPromise | undefined; - #eventHandle: Resource | undefined; - - constructor(serviceOptions: ServiceOptions<{ plugin: AuthPlugin }>) { - super(); - this.#plugin = serviceOptions.references.plugin; - - // Init from plugin state and watch for changes. - this.#currentState = this.#plugin.getAuthState(); - this.#eventHandle = this.#plugin.on?.("changed", () => this.#onPluginStateChanged()); - LOG.debug( - `Constructed with initial auth state '${this.#currentState.kind}'`, - this.#currentState - ); - } - - destroy(): void { - this.#whenUserInfo?.reject(createAbortError()); - this.#whenUserInfo = undefined; - this.#eventHandle = destroyResource(this.#eventHandle); - } - - getAuthState(): AuthState { - return this.#currentState; - } - - getSessionInfo(): Promise { - if (this.#currentState.kind !== "pending") { - return Promise.resolve(getSessionInfo(this.#currentState)); - } - - if (!this.#whenUserInfo) { - this.#whenUserInfo = createManualPromise(); - } - return this.#whenUserInfo.promise; - } - - getLoginBehavior(): LoginBehavior { - return this.#plugin.getLoginBehavior(); - } - - logout(): void { - LOG.debug("Triggering logout"); - this.#plugin.logout(); - } - - #onPluginStateChanged() { - const newState = this.#plugin.getAuthState(); - this.#currentState = newState; - if (newState.kind !== "pending" && this.#whenUserInfo) { - this.#whenUserInfo.resolve(getSessionInfo(newState)); - this.#whenUserInfo = undefined; - } - LOG.debug(`Auth state changed to '${this.#currentState.kind}'`, this.#currentState); - this.emit("changed"); - } -} - -function getSessionInfo(state: AuthState): SessionInfo | undefined { - return state.kind === "authenticated" ? state.sessionInfo : undefined; -} diff --git a/src/packages/authentication/CHANGELOG.md b/src/packages/authentication/CHANGELOG.md deleted file mode 100644 index 663062ba..00000000 --- a/src/packages/authentication/CHANGELOG.md +++ /dev/null @@ -1,19 +0,0 @@ -# @open-pioneer/authentication - -## 0.3.0 - -### Minor Changes - -- ee7c2d4: Update runtime version. - -## 0.2.0 - -### Minor Changes - -- 70349a8: Update to new core packages major versions - -## 0.1.0 - -### Minor Changes - -- 13a0289: Initial release. diff --git a/src/packages/authentication/ForceAuth.test.tsx b/src/packages/authentication/ForceAuth.test.tsx deleted file mode 100644 index 728574c2..00000000 --- a/src/packages/authentication/ForceAuth.test.tsx +++ /dev/null @@ -1,235 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { EventEmitter } from "@open-pioneer/core"; -import { PackageContextProvider } from "@open-pioneer/test-utils/react"; -import { act, render, screen, waitFor } from "@testing-library/react"; -import { expect, it } from "vitest"; -import { ForceAuth } from "./ForceAuth"; -import { AuthEvents, AuthService, AuthState, LoginBehavior, SessionInfo } from "./api"; - -it("renders children if the user is authenticated", async () => { - const mocks = { - services: { - "authentication.AuthService": new TestAuthService({ - kind: "authenticated", - sessionInfo: { - userId: "test-id" - } - }) - } - }; - - render( - - -
    testDiv
    -
    -
    - ); - - await screen.findByTestId("1234"); -}); - -it("renders no children if the state is pending", async () => { - const mocks = { - services: { - "authentication.AuthService": new TestAuthService({ - kind: "pending" - }) - } - }; - - render( - -
    - -
    testDiv
    -
    -
    -
    - ); - - const result = await screen.findByTestId("1234"); - expect(result.outerHTML).toMatchInlineSnapshot('"
    "'); -}); - -it("renders AuthFallback if the user is not authenticated", async () => { - const mocks = { - services: { - "authentication.AuthService": new TestAuthService({ - kind: "not-authenticated" - }) - } - }; - - render( - - -
    testDiv
    -
    -
    - ); - - await screen.findByTestId("LoginFallBack"); -}); - -it("renders the AuthFallback with custom props", async () => { - const mocks = { - services: { - "authentication.AuthService": new TestAuthService({ - kind: "not-authenticated" - }) - } - }; - - render( - - -
    testDiv
    -
    -
    - ); - - const result = await screen.findByTestId("LoginFallBack"); - expect(result.textContent).toMatchInlineSnapshot('"\\"TestProp\\""'); -}); - -it("renders the AuthFallback with a custom render function", async () => { - const mocks = { - services: { - "authentication.AuthService": new TestAuthService({ - kind: "not-authenticated" - }) - } - }; - - render( - - { - return ( -
    - -
    - ); - }} - > -
    testDiv
    -
    -
    - ); - - const result = await screen.findByTestId("LoginFallBack-wrapper"); - expect(result).toMatchInlineSnapshot(` -
    -
    - "TestProp" -
    -
    - `); -}); - -it("re-renders when the service's state changes", async () => { - const testAuthService = new TestAuthService({ - kind: "pending" - }); - const mocks = { - services: { - "authentication.AuthService": testAuthService - } - }; - - render( - -
    - -
    testDiv
    -
    -
    -
    - ); - - const result = await screen.findByTestId("outer-div"); - expect(result.outerHTML).toMatchInlineSnapshot('"
    "'); - - act(() => { - testAuthService.setAuthState({ - kind: "authenticated", - sessionInfo: { - userId: "test-id" - } - }); - }); - - const innerDiv = await screen.findByTestId("inner-div"); - expect(innerDiv.outerHTML).toMatchInlineSnapshot( - '"
    testDiv
    "' - ); -}); - -it("calls a login effect if present", async () => { - let loginCalled = false; - const testAuthService = new TestAuthService( - { - kind: "not-authenticated" - }, - { - kind: "effect", - login() { - loginCalled = true; - } - } - ); - const mocks = { - services: { - "authentication.AuthService": testAuthService - } - }; - - render( - - Content - - ); - - await waitFor(() => { - if (!loginCalled) { - throw new Error("login effect was not called"); - } - }); -}); - -class TestAuthService extends EventEmitter implements AuthService { - #currentState: AuthState; - #behavior: LoginBehavior; - constructor(initState: AuthState, loginBehavior?: LoginBehavior) { - super(); - this.#currentState = initState; - this.#behavior = loginBehavior ?? { - kind: "fallback", - Fallback(props: Record) { - return
    {JSON.stringify(props.name)}
    ; - } - }; - } - getAuthState(): AuthState { - return this.#currentState; - } - getSessionInfo(): Promise { - throw new Error("Method not implemented."); - } - getLoginBehavior(): LoginBehavior { - return this.#behavior; - } - logout() { - throw new Error("Method not implemented."); - } - setAuthState(newState: AuthState) { - this.#currentState = newState; - this.emit("changed"); - } -} diff --git a/src/packages/authentication/ForceAuth.tsx b/src/packages/authentication/ForceAuth.tsx deleted file mode 100644 index fa8f26e1..00000000 --- a/src/packages/authentication/ForceAuth.tsx +++ /dev/null @@ -1,112 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { useService } from "open-pioneer:react-hooks"; -import { ComponentType, FC, ReactNode, useEffect, useMemo } from "react"; -import { - // For typedoc link - // eslint-disable-next-line unused-imports/no-unused-imports - AuthPlugin, - AuthService -} from "./api"; -import { useAuthState } from "./useAuthState"; - -/** - * Properties for the ForceAuth component. - */ -export interface ForceAuthProps { - /** - * These properties will be provided to the AuthFallback component implemented by the authentication plugin. - * - * NOTE: This property is not used when {@link renderFallback} is specified. - */ - fallbackProps?: Record; - - /** - * This property can be used to customize rendering of the authentication fallback. - * - * The `AuthFallback` parameter passed to the render prop is the fallback implemented by the authentication plugin. - * You can customize the rendering of the fallback by implementing this function. - * For example, `AuthFallback` could be wrapped with a few parent components. - * - * NOTE: `renderFallback` takes precedence before {@link fallbackProps}. - * - * Example: - * - * ```jsx - * { - * return ( - * - * - * - * ); - * }} - * > - * App Content - * - * ``` - */ - renderFallback?: (AuthFallback: ComponentType>) => ReactNode; - - /** The children are rendered if the current user is authenticated. */ - children?: ReactNode; -} - -/** - * `ForceAuth` renders its children if the current user is authenticated. - * If the user is not authenticated, a `AuthFallback` will be presented to the user. - * - * The implementation of the `AuthFallback` depends on the authentication plugin used by the application - * (see {@link AuthPlugin}). - * - * For an application that requires the user to always be logged in, simply - * surround the entire application UI with the `ForceAuth` component: - * - * ```jsx - * import { ForceAuth } from "@open-pioneer/authentication"; - * - * export function AppUI() { - * return ( - * - * - * - * ); - * } - * ``` - */ -export const ForceAuth: FC = (props) => { - const authService = useService("authentication.AuthService"); - const state = useAuthState(authService); - - // Extract login behavior from service (only when needed). - const behavior = useMemo(() => { - if (state.kind === "not-authenticated") { - return authService.getLoginBehavior(); - } - }, [authService, state.kind]); - - // Call the login effect (if any) if not authenticated. - useEffect(() => { - if (state.kind === "not-authenticated" && behavior?.kind === "effect") { - behavior.login(); - } - }, [behavior, state.kind]); - - switch (state.kind) { - case "pending": - return null; - case "not-authenticated": { - if (!behavior || behavior.kind !== "fallback") { - return null; - } - - const AuthFallback = behavior.Fallback; - if (props.renderFallback) { - return <>{props.renderFallback(AuthFallback)}; - } - return ; - } - case "authenticated": - return <>{props.children}; - } -}; diff --git a/src/packages/authentication/LICENSE b/src/packages/authentication/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/src/packages/authentication/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/src/packages/authentication/README.md b/src/packages/authentication/README.md deleted file mode 100644 index 4ddc1aef..00000000 --- a/src/packages/authentication/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# @open-pioneer/authentication - -This package provides a central service to handle the current user's session. -It cannot be used on its own, but requires an [authentication plugin](#implementing-an-authentication-plugin), that implements the actual authentication flow. - -## Usage - -### Retrieving the current authentication state - -To inspect the current authentication state, inject a reference to the `AuthService` by referencing `"authentication.AuthService"`. - -The methods `getAuthState()` and `getSessionInfo()` return information about the current state: - -```js -const authService = ...; // injected - -// Returns SessionInfo if the user is currently logged in, or undefined otherwise. -const sessionInfo = await authService.getSessionInfo(); - -// Like the above, but synchronous and includes intermediate states like "pending". -const state = authService.getAuthState(); - -// Use `on("changed", ...)` to be notified about changes. -const handle = authService.on("changed", () => { - const newState = authService.getAuthState(); -}); - -// Don't forget to clean up event handles in the future -handle.destroy(); -``` - -### Enforcing authentication - -To make sure that only users, that are logged in, can use an application, enforce the authentication flow by wrapping the application with the `` component: - -```jsx -// AppUI.jsx -import { ForceAuth } from "@open-pioneer/authentication"; - -export function AppUI() { - return ( - - - - ); -} -``` - -`ForceAuth` renders its children (your application) if the user is authenticated. -Otherwise, it renders the authentication plugin's _fallback_ component (see below). -It is updated if the authentication state changes. - -#### _Fallback_ - -If the user is not logged in, a _fallback_ is shown to the user. -The _fallback_ must be implemented in the authentication plugin. -Depending on the implementation of the authentication plugin, -a fallback can be a login prompt, or a simple message. -Some plugins do not provide a visual fallback but an "effect" instead: an action to perform, such as a redirect to the authentication provider. - -Rendering of the login fallback can be customized by passing custom properties (`fallbackProps`) or by supplying a custom render function (`renderFallback`), see the API documentation. - -### Triggering logout - -To explicitly end the current session, call the `AuthService`'s `logout()` method: - -```js -const authService = ...; // injected -authService.logout(); -``` - -### Implementing an authentication plugin - -An authentication plugin (providing `authentication.AuthPlugin`) must be present in the application to support authentication. -The plugin implements the actual authentication flow. - -The plugin must implement the `AuthPlugin` TypeScript interface exported by this package: - -- Provide the current authentication state by implementing `getAuthState()`. - When authenticated, a user's authentication state contains session information, such as the user's `id`, - an optional display name and arbitrary additional `attributes` that can be defined by the plugin. - - If the state changes internally (for example successful login, explicit logout, logout due to timeout, etc.), - the `changed` event must be emitted to notify the `AuthService`. - -- Return the login behavior value (a React component or a function to call) by implementing `getLoginBehavior()`. - This could be a login dialog, a "forbidden" message (_"fallback"_) or a function implementing a redirect ("effect"). - -- Implement the `logout()` method: this method is called when the user attempts to end their session. - -A simple example is available in this project's `auth-sample`. - -## License - -Apache-2.0 (see `LICENSE` file) diff --git a/src/packages/authentication/api.ts b/src/packages/authentication/api.ts deleted file mode 100644 index 440c8fe7..00000000 --- a/src/packages/authentication/api.ts +++ /dev/null @@ -1,174 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import type { EventSource } from "@open-pioneer/core"; -import type { DeclaredService } from "@open-pioneer/runtime"; -import type { ComponentType } from "react"; - -/** - * Events emitted by the {@link AuthService}. - */ -export interface AuthEvents { - /** Emitted when there were any changes to the service's state. */ - changed: void; -} - -/** - * Information about the authenticated user's session. - */ -export interface SessionInfo { - /** Technical user id of the authenticated user, for example an email address. */ - userId: string; - - /** - * Display name of the authenticated user. - * Use the {@link userId} as a default value if this value is not available. - */ - userName?: string | undefined; - - /** Set to a date if the session expires at some point. Optional. */ - expiresAt?: Date | undefined; - - /** Arbitrary attributes from the authentication plugin. */ - attributes?: Record | undefined; -} - -/** - * Models the current authentication state. - * - * NOTE: Future versions of this package may define additional states. - * Your code should contain sensible fallback or error logic. - */ -export type AuthState = AuthStatePending | AuthStateNotAuthenticated | AuthStateAuthenticated; - -/** - * This state is active when the authentication service - * is still checking whether the current user is authenticated or not. - */ -export interface AuthStatePending { - kind: "pending"; -} - -/** - * The user not authenticated. - */ -export interface AuthStateNotAuthenticated { - kind: "not-authenticated"; -} - -/** - * The user is authenticated and its session attributes - * can be retrieved. - */ -export interface AuthStateAuthenticated { - kind: "authenticated"; - sessionInfo: SessionInfo; -} - -/** - * Defines the behavior of the authentication service when attempting to - * authenticate a user. - */ -export type LoginBehavior = LoginFallback | LoginEffect; - -/** - * A fallback react component to present to the user. - * For example, this can be a login form or a message. - */ -export interface LoginFallback { - kind: "fallback"; - Fallback: ComponentType; -} - -/** - * An effect to perform when the user shall be authenticated. - * `login()` may, for example, perform a redirect to an authentication provider. - */ -export interface LoginEffect { - kind: "effect"; - login(): void; -} - -/** - * Manages the current user's authentication state. - * - * The current state (such as session info) can be retrieved and watched for changes. - */ -export interface AuthService - extends EventSource, - DeclaredService<"authentication.AuthService"> { - /** - * Returns the current authentication state. - * - * The state may initially be `pending` to allow for async initialization in the authentication plugin. - * After initialization, the state is either `not-authenticated` or `authenticated`. - * - This method must be called again after the {@link AuthService} has emitted the `changed` event. - */ - getAuthState(): AuthState; - - /** - * Returns the current user's {@link SessionInfo} or `undefined`, if the current user is not authenticated. - * - * The method is asynchronous to allow for async initialization in the authentication plugin. - * - * This method must be called again after the {@link AuthService} has emitted the `changed` event. - */ - getSessionInfo(): Promise; - - /** - * Returns the login behavior that should be performed if the user is not authenticated. - * - * The actual implementation of this component depends on the application's authentication plugin. - */ - getLoginBehavior(): LoginBehavior; - - /** - * Terminates the current session (if any). - */ - logout(): void; -} - -/** Events that may be emitted by an authentication plugin. */ -export interface AuthPluginEvents { - changed: void; -} - -/** Optional base type for an authentication plugin: the event emitter interface is not required. */ -export type AuthPluginEventBase = EventSource; - -/** - * The authentication service requires an AuthPlugin to implement a concrete authentication flow. - * - * The plugin provides the current authentication state and the authentication fallback to the service. - * - * The current authentication state returned by {@link getAuthState} may change. - * If that is the case, the plugin must also emit the `changed` event to notify the service. - * - * The implementation of `AuthPluginEventBase` is optional: it is only necessary if the state changes - * during the lifetime of the plugin. - * To implement the event, you can write `class MyPlugin extends EventEmitter`. - */ -export interface AuthPlugin - extends Partial, - DeclaredService<"authentication.AuthPlugin"> { - /** - * Returns the current authentication state. - * - * Objects returned by this method should not be mutated. - * Emit the `changed` event instead to communicate that there is a new state. - */ - getAuthState(): AuthState; - - /** - * Returns the login behavior that should be performed if the user is not authenticated. - */ - getLoginBehavior(): LoginBehavior; - - /** - * Explicitly triggers a logout. - * - * Should result in a new state (including a `changed` event) if the user - * was authenticated. - */ - logout(): Promise | void; -} diff --git a/src/packages/authentication/build.config.mjs b/src/packages/authentication/build.config.mjs deleted file mode 100644 index 0882eba7..00000000 --- a/src/packages/authentication/build.config.mjs +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { defineBuildConfig } from "@open-pioneer/build-support"; - -export default defineBuildConfig({ - entryPoints: ["index"], - services: { - AuthServiceImpl: { - provides: "authentication.AuthService", - references: { - plugin: "authentication.AuthPlugin" - } - } - }, - ui: { - references: ["authentication.AuthService"] - }, - publishConfig: { - strict: true - } -}); diff --git a/src/packages/authentication/index.ts b/src/packages/authentication/index.ts deleted file mode 100644 index 60fc22a7..00000000 --- a/src/packages/authentication/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -export * from "./api"; -export { ForceAuth, type ForceAuthProps } from "./ForceAuth"; -export { useAuthState } from "./useAuthState"; diff --git a/src/packages/authentication/package.json b/src/packages/authentication/package.json deleted file mode 100644 index 5a8bc0cb..00000000 --- a/src/packages/authentication/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@open-pioneer/authentication", - "description": "Authentication API for open pioneer trails applications.", - "license": "Apache-2.0", - "version": "0.3.0", - "main": "index.ts", - "scripts": { - "build": "build-pioneer-package" - }, - "peerDependencies": { - "@open-pioneer/runtime": "^2.1.0", - "@open-pioneer/core": "^1.2.1", - "react": "^18.2.0", - "react-use": "^17.4.2" - }, - "devDependencies": { - "openlayers-base-packages": "workspace:*", - "@open-pioneer/test-utils": "^1.1.1", - "@testing-library/react": "^14.1.2" - }, - "publishConfig": { - "directory": "dist", - "linkDirectory": false - } -} diff --git a/src/packages/authentication/services.ts b/src/packages/authentication/services.ts deleted file mode 100644 index a3efaa5c..00000000 --- a/src/packages/authentication/services.ts +++ /dev/null @@ -1,3 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -export { AuthServiceImpl } from "./AuthServiceImpl"; diff --git a/src/packages/authentication/typedoc.json b/src/packages/authentication/typedoc.json deleted file mode 100644 index f823a8d8..00000000 --- a/src/packages/authentication/typedoc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - // openlayers-base-packages is a dev dependency (link to the project root) - "extends": ["openlayers-base-packages/typedoc.base.json"], - "entryPoints": ["./index.ts"] -} diff --git a/src/packages/authentication/useAuthState.ts b/src/packages/authentication/useAuthState.ts deleted file mode 100644 index 8949895b..00000000 --- a/src/packages/authentication/useAuthState.ts +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { useCallback, useSyncExternalStore } from "react"; -import { AuthService, AuthState } from "./api"; - -/** - * React hook that always returns the `authService`'s current auth state. - */ -export function useAuthState(authService: AuthService): AuthState { - // subscribe to changes of the auth service. - // useCallback (or useMemo) is needed for stable function references: - // otherwise `useSyncExternalStore` would re-subscribe on every render. - const subscribe = useCallback( - (callback: () => void) => { - const handle = authService.on("changed", callback); - return () => handle.destroy(); - }, - [authService] - ); - const getSnapshot = useCallback(() => { - return authService.getAuthState(); - }, [authService]); - const state = useSyncExternalStore(subscribe, getSnapshot); - return state; -} diff --git a/src/packages/basemap-switcher/package.json b/src/packages/basemap-switcher/package.json index 521f1a7a..ff8df73a 100644 --- a/src/packages/basemap-switcher/package.json +++ b/src/packages/basemap-switcher/package.json @@ -9,7 +9,7 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "chakra-react-select": "^4.7.6", "ol": "^8.2.0", diff --git a/src/packages/coordinate-viewer/package.json b/src/packages/coordinate-viewer/package.json index 2aa9793c..806741e5 100644 --- a/src/packages/coordinate-viewer/package.json +++ b/src/packages/coordinate-viewer/package.json @@ -9,7 +9,7 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "ol": "^8.2.0", "react": "^18.2.0", diff --git a/src/packages/editing/package.json b/src/packages/editing/package.json index afbe34ab..cb6f9c64 100644 --- a/src/packages/editing/package.json +++ b/src/packages/editing/package.json @@ -8,8 +8,8 @@ }, "peerDependencies": { "@open-pioneer/core": "^1.2.1", - "@open-pioneer/http": "^2.1.2", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/http": "^2.1.4", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/map": "workspace:^", "ol": "^8.2.0" }, diff --git a/src/packages/geolocation/package.json b/src/packages/geolocation/package.json index 9a7482ec..95d163f6 100644 --- a/src/packages/geolocation/package.json +++ b/src/packages/geolocation/package.json @@ -9,10 +9,10 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "@open-pioneer/core": "^1.2.1", - "@open-pioneer/notifier": "workspace:^", + "@open-pioneer/notifier": "^0.3.1", "ol": "^8.2.0", "react": "^18.2.0", "react-icons": "^4.12.0" diff --git a/src/packages/legend/package.json b/src/packages/legend/package.json index 17e99fa4..28da9df8 100644 --- a/src/packages/legend/package.json +++ b/src/packages/legend/package.json @@ -9,7 +9,7 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@chakra-ui/icons": "^2.1.1", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "@open-pioneer/map": "workspace:^", "ol": "^8.2.0", diff --git a/src/packages/local-storage/CHANGELOG.md b/src/packages/local-storage/CHANGELOG.md deleted file mode 100644 index 27be10a1..00000000 --- a/src/packages/local-storage/CHANGELOG.md +++ /dev/null @@ -1,31 +0,0 @@ -# @open-pioneer/local-storage - -## 0.3.0 - -### Minor Changes - -- ee7c2d4: Update runtime version. - -## 0.2.0 - -### Minor Changes - -- 70349a8: Update to new core packages major versions - -## 0.1.0 - -### Minor Changes - -- 3ca8a25: Initial release - -## 0.2.0 - -### Minor Changes - -- 70349a8: Update to new core packages major versions - -## 0.1.0 - -### Minor Changes - -- 3ca8a25: Initial release diff --git a/src/packages/local-storage/LICENSE b/src/packages/local-storage/LICENSE deleted file mode 100644 index 7a4a3ea2..00000000 --- a/src/packages/local-storage/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/src/packages/local-storage/LocalStorageServiceImpl.test.ts b/src/packages/local-storage/LocalStorageServiceImpl.test.ts deleted file mode 100644 index eb1f8110..00000000 --- a/src/packages/local-storage/LocalStorageServiceImpl.test.ts +++ /dev/null @@ -1,365 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { createService } from "@open-pioneer/test-utils/services"; -import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import { LocalStorageServiceImpl } from "./LocalStorageServiceImpl"; - -const MOCKED_STORAGE = new Map(); - -const DEFAULT_STORAGE_ID = "test-storage-id"; - -beforeEach(() => { - vi.useFakeTimers(); - mockLocalStorage(); -}); - -afterEach(() => { - MOCKED_STORAGE.clear(); - vi.useRealTimers(); - vi.restoreAllMocks(); -}); - -it("Supports local storage by default", async () => { - const storageService = await setup(); - expect(storageService.isSupported).toBe(true); -}); - -it("Detects missing local storage", async () => { - vi.spyOn(window, "localStorage", "get").mockReturnValue(undefined as any); - const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => undefined); - - const storageService = await setup(); - expect(storageService.isSupported).toBe(false); - expect(warnSpy).toMatchInlineSnapshot(` - [MockFunction warn] { - "calls": [ - [ - "[WARN] local-storage: Local storage is not supported by this browser.", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - ], - } - `); - - expect(() => storageService.get("foo")).toThrowErrorMatchingInlineSnapshot( - '"local-storage:not-supported: Local storage is not supported by this browser."' - ); -}); - -it("Reports errors if local storage does not work", async () => { - const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => undefined); - - vi.spyOn(window, "localStorage", "get").mockImplementation(() => { - throw new Error("Some problem!"); - }); - - const _storageService = await setup(); - expect(warnSpy).toMatchInlineSnapshot(` - [MockFunction warn] { - "calls": [ - [ - "[WARN] local-storage: Local storage is not supported by this browser.", - [Error: Some problem!], - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - ], - } - `); -}); - -it("Persists data to local storage", async () => { - const storageService = await setup(); - storageService.set("foo", "bar"); - storageService.set("answer", 42); - storageService.set("null", null); - storageService.set("isAdmin", true); - storageService.set("array", [1, 2, 3]); - storageService.set("object", { "baz": "qux" }); - - expect(getStorageData()).toMatchInlineSnapshot(` - { - "answer": 42, - "array": [ - 1, - 2, - 3, - ], - "foo": "bar", - "isAdmin": true, - "null": null, - "object": { - "baz": "qux", - }, - } - `); -}); - -it("Restores previous data on next run", async () => { - MOCKED_STORAGE.set( - DEFAULT_STORAGE_ID, - JSON.stringify({ - "answer": 42, - "object": { - "baz": "qux" - } - }) - ); - - const storageService = await setup(); - expect(storageService.get("answer")).toBe(42); - expect(storageService.get("object")).toEqual({ - "baz": "qux" - }); -}); - -it("Overwrites invalid data on load", async () => { - const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => undefined); - - MOCKED_STORAGE.set(DEFAULT_STORAGE_ID, "garbage"); - - const _storageService = await setup(); - expect(getStorageData()).toMatchInlineSnapshot("{}"); - - expect(warnSpy).toHaveBeenCalledOnce(); - const args = warnSpy.mock.calls[0]! as unknown[]; - expect(args[0]).toMatchInlineSnapshot( - '"[WARN] local-storage: Invalid persisted data, reverting to default."' - ); - expect(args[1]).toMatch(/unexpected token/i); -}); - -it("Returns previously set values in get()", async () => { - const storageService = await setup(); - storageService.set("foo", "bar"); - expect(storageService.get("foo")).toBe("bar"); -}); - -it("Clones values to avoid accidental side effects", async () => { - const foo = { - bar: 2 - }; - - const storageService = await setup(); - storageService.set("foo", foo); - foo.bar += 1; - - const foo2 = storageService.get("foo") as typeof foo; - expect(foo2).not.toBe(foo); - expect(foo2.bar).toBe(2); -}); - -it("Returns undefined for missing values", async () => { - const storageService = await setup(); - expect(storageService.get("foo")).toBeUndefined(); -}); - -it("Allows removing a key", async () => { - const storageService = await setup(); - storageService.set("foo", "bar"); - expect(storageService.get("foo")).toBe("bar"); - - storageService.remove("foo"); - expect(storageService.get("foo")).toBeUndefined(); -}); - -it("Supports removing all keys", async () => { - const storageService = await setup(); - storageService.set("foo", "bar"); - storageService.set("answer", 42); - storageService.removeAll(); - - expect(getStorageData()).toMatchInlineSnapshot("{}"); -}); - -it("Throws for invalid values", async () => { - const storageService = await setup(); - expect(() => storageService.set("foo", () => 1)).toThrowErrorMatchingInlineSnapshot( - '"local-storage:invalid-value: The value is not supported by local storage."' - ); - expect(() => storageService.set("foo", Symbol("symbol"))).toThrowErrorMatchingInlineSnapshot( - '"local-storage:invalid-value: The value is not supported by local storage."' - ); - expect(() => storageService.set("foo", BigInt(1))).toThrowErrorMatchingInlineSnapshot( - '"local-storage:invalid-value: The value is not supported by local storage."' - ); -}); - -it("Detects missing storage id", async () => { - const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => undefined); - - const storageService = await setup({ - storageId: undefined - }); - expect(storageService.isSupported).toBe(true); - expect(warnSpy).toMatchInlineSnapshot(` - [MockFunction warn] { - "calls": [ - [ - "[WARN] local-storage: The 'storageId' property of the 'local-storage' package should be set to a valid string to avoid collisions with other applications. Defaulting to 'trails-state'.", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - ], - } - `); -}); - -describe("nested namespaces", () => { - it("supports creating a nested namespace", async () => { - const storageService = await setup(); - const namespace = storageService.getNamespace("toc"); - namespace.set("foo", "bar"); - - expect(getStorageData()).toMatchInlineSnapshot(` - { - "toc": { - "foo": "bar", - }, - } - `); - }); - - it("supports removing keys", async () => { - const storageService = await setup(); - const namespace = storageService.getNamespace("toc"); - namespace.set("foo", "bar"); - namespace.set("bar", "baz"); - namespace.remove("foo"); - - expect(getStorageData()).toMatchInlineSnapshot(` - { - "toc": { - "bar": "baz", - }, - } - `); - }); - - it("clearing a namespace only removes the nested properties", async () => { - const storageService = await setup(); - storageService.set("outer", 1); - - const namespace = storageService.getNamespace("nested"); - namespace.set("inner", 2); - namespace.removeAll(); - - expect(getStorageData()).toMatchInlineSnapshot(` - { - "nested": {}, - "outer": 1, - } - `); - }); - - it("supports deeply nested namespaces", async () => { - const storageService = await setup(); - const namespace = storageService.getNamespace("a").getNamespace("b").getNamespace("c"); - namespace.set("foo", "bar"); - expect(getStorageData()).toMatchInlineSnapshot(` - { - "a": { - "b": { - "c": { - "foo": "bar", - }, - }, - }, - } - `); - }); - - it("returns the same values from namespace objects referencing the same key", async () => { - const storageService = await setup(); - const ns1 = storageService.getNamespace("ns"); - const ns2 = storageService.getNamespace("ns"); - - ns1.set("foo", "bar"); - expect(ns1).not.toBe(ns2); // different instances ... - expect(ns2.get("foo")).toBe("bar"); // observe the same values - }); - - it("throws if getNamespace() is called for a non-object value", async () => { - const storageService = await setup(); - storageService.set("a", "invalid"); - expect(() => storageService.getNamespace("a")).toThrowErrorMatchingInlineSnapshot( - "\"local-storage:invalid-path: Cannot use 'a' as a namespace because it is not associated with an object.\"" - ); - }); - - it("throws if a parent is not an object (set)", async () => { - const storageService = await setup(); - const namespace = storageService.getNamespace("a"); - storageService.set("a", 123); - expect(() => namespace.set("foo", 456)).toThrowErrorMatchingInlineSnapshot( - "\"local-storage:invalid-path: Cannot set property on 'a' because it is no object.\"" - ); - }); - - it("throws if a parent is not an object (get)", async () => { - const storageService = await setup(); - const namespace = storageService.getNamespace("a"); - storageService.set("a", 123); - expect(() => namespace.get("foo")).toThrowErrorMatchingInlineSnapshot( - "\"local-storage:invalid-path: Cannot get nested property 'foo' because the parent is no object.\"" - ); - }); - - it("returns the namespace's object value on get", async () => { - const storageService = await setup(); - const packageNamespace = storageService.getNamespace("my-package-name"); - packageNamespace.set("foo", "bar"); - - const backingObject = storageService.get("my-package-name"); - expect(backingObject).toEqual({ foo: "bar" }); - }); -}); - -async function setup(options?: { storageId?: string }) { - const storageId = options && "storageId" in options ? options.storageId : DEFAULT_STORAGE_ID; - const storageService = await createService(LocalStorageServiceImpl, { - properties: { - storageId - } - }); - return storageService; -} - -function getStorageData() { - // Wait for internal timeouts (debounced save) - vi.advanceTimersByTime(25); - - const entry = MOCKED_STORAGE.get(DEFAULT_STORAGE_ID); - if (entry == null) { - throw new Error("No data in local storage"); - } - return JSON.parse(entry); -} - -function mockLocalStorage() { - const storage = window.localStorage; - vi.spyOn(storage, "setItem").mockImplementation((key, value) => MOCKED_STORAGE.set(key, value)); - vi.spyOn(storage, "getItem").mockImplementation((key) => MOCKED_STORAGE.get(key) ?? null); - vi.spyOn(storage, "clear").mockImplementation(() => MOCKED_STORAGE.clear()); - - vi.spyOn(storage, "removeItem").mockImplementation(notImplemented); - vi.spyOn(storage, "clear").mockImplementation(notImplemented); - vi.spyOn(storage, "length", "get").mockImplementation(notImplemented); -} - -function notImplemented(): never { - throw new Error("not implemented"); -} diff --git a/src/packages/local-storage/LocalStorageServiceImpl.ts b/src/packages/local-storage/LocalStorageServiceImpl.ts deleted file mode 100644 index 90b42f4a..00000000 --- a/src/packages/local-storage/LocalStorageServiceImpl.ts +++ /dev/null @@ -1,350 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { ServiceOptions } from "@open-pioneer/runtime"; -import { LocalStorageNamespace, LocalStorageProperties, LocalStorageService } from "./api"; -import { createLogger, Error } from "@open-pioneer/core"; - -const LOG = createLogger("local-storage"); - -const SAVE_TIMEOUT = 0; - -const ERROR_IDS = { - CORRUPTED_DATA: "local-storage:corrupted-data", - INVALID_PATH: "local-storage:invalid-path", - INVALID_VALUE: "local-storage:invalid-value", - NOT_SUPPORTED: "local-storage:not-supported", - INTERNAL: "local-storage:internal-error" -} as const; - -export class LocalStorageServiceImpl implements LocalStorageService { - // Key in local storage. - #rootKey: string; - - // Root value. A (possibly nested) JSON structure that is persisted into local storage. - // This value (or its children) are modified via the various `get` / `set` / `clear` / etc. methods - // on the service itself and on the namespace objects obtained through the service. - #rootValue: Record = {}; - - // Reference to the local storage (if supported). - #localStorage: Storage | undefined; - - // The root namespace works on `rootValue` directly. - #rootNamespace: StorageNamespaceImpl | undefined; - - constructor(options: ServiceOptions) { - this.#rootKey = getRootKey(options.properties); - this.#localStorage = getLocalStorage(); - if (this.#localStorage) { - this.#load(); - this.#rootNamespace = this.#createRootNamespace(); - } - } - - destroy() { - if (this.#saveTimeout) { - clearTimeout(this.#saveTimeout); - this.#saveTimeout = undefined; - } - if (this.#localStorage) { - this.#save(); - } - } - - get isSupported(): boolean { - return !!this.#rootNamespace; - } - - get(key: string): unknown { - return this.#getRootNamespace().get(key); - } - - set(key: string, value: unknown): void { - return this.#getRootNamespace().set(key, value); - } - - remove(key: string): void { - return this.#getRootNamespace().remove(key); - } - - removeAll(): void { - return this.#getRootNamespace().removeAll(); - } - - getNamespace(key: string): LocalStorageNamespace { - return this.#getRootNamespace().getNamespace(key); - } - - // Debounce save() calls to avoid saving after every 'set'. - // This gives us some improved performance when there are multiple sets - // in quick succession. - #saveTimeout: ReturnType<(typeof globalThis)["setTimeout"]> | undefined; - #triggerSave(): void { - if (this.#saveTimeout) { - clearTimeout(this.#saveTimeout); - } - this.#saveTimeout = setTimeout(() => { - this.#saveTimeout = undefined; - this.#save(); - }, SAVE_TIMEOUT); - } - - /** - * Loads persisted data from local storage. - * If the data is invalid (e.g. bad json), this will revert to the default (an empty object). - * - * This method is called during service startup to load the initial state. - */ - #load() { - try { - const storage = this.#localStorage; - if (!storage) { - // Should not happen (load is called only when storage is available). - throw new Error(ERROR_IDS.INTERNAL, "Local storage is not available."); - } - - const json = storage.getItem(this.#rootKey); - if (json == null) { - // No previous value - this.#rootValue = {}; - this.#save(); - return; - } - - try { - const data = JSON.parse(json); - if (!isObject(data)) { - throw new Error( - ERROR_IDS.CORRUPTED_DATA, - "Persisted value should be an object." - ); - } - this.#rootValue = data; - } catch (jsonError) { - LOG.warn("Invalid persisted data, reverting to default.", jsonError); - this.#rootValue = {}; - this.#save(); - } - } catch (e) { - LOG.error(`Failed to load from local storage`, e); - } - } - - /** - * Persists the current state of `rootValue` to local storage. - * This method is called whenever the state was modified. - */ - #save() { - try { - const storage = this.#localStorage; - if (!storage) { - // Should not happen (setting values is only possible if supported). - throw new Error(ERROR_IDS.INTERNAL, "Local storage is not available."); - } - - const json = JSON.stringify(this.#rootValue); - storage.setItem(this.#rootKey, json); - } catch (e) { - LOG.error(`Failed to save to local storage`, e); - } - } - - #getRootNamespace(): StorageNamespaceImpl { - const root = this.#rootNamespace; - if (!root) { - throw new Error( - ERROR_IDS.NOT_SUPPORTED, - "Local storage is not supported by this browser." - ); - } - return root; - } - - #createRootNamespace(): StorageNamespaceImpl { - const storageAccess: StorageAccess = { - getByPath: (path) => { - // Clone to protect against side effects on internal value - return cloneJSON(getPath(this.#rootValue, path)); - }, - setByPath: (path, value) => { - if (!isSupportedValue(value)) { - throw new Error( - ERROR_IDS.INVALID_VALUE, - "The value is not supported by local storage." - ); - } - - // Clone to protect against side effects on original value - value = cloneJSON(value); - - // Rewrite root object if path is empty. - if (path.length === 0) { - if (!isObject(value)) { - throw new Error( - ERROR_IDS.INVALID_VALUE, - "The root value must be a plain object." - ); - } - this.#rootValue = value; - } else { - setPath(this.#rootValue, path, value); - } - - this.#triggerSave(); - } - }; - return new StorageNamespaceImpl([], storageAccess); - } -} - -interface StorageAccess { - getByPath(path: string[]): unknown; - setByPath(path: string[], value: unknown): void; -} - -class StorageNamespaceImpl implements LocalStorageNamespace { - private path: string[]; - private access: StorageAccess; - - constructor(path: string[], access: StorageAccess) { - this.path = path; - this.access = access; - } - - get(key: string): unknown { - return this.access.getByPath([...this.path, key]); - } - - set(key: string, value: unknown): void { - this.access.setByPath([...this.path, key], value); - } - - remove(key: string): void { - this.access.setByPath([...this.path, key], undefined); - } - - removeAll(): void { - this.access.setByPath(this.path, {}); - } - - getNamespace(key: string): StorageNamespaceImpl { - const existingValue = this.get(key); - if (existingValue === undefined) { - this.set(key, {}); - } else if (!isObject(existingValue)) { - throw new Error( - ERROR_IDS.INVALID_PATH, - `Cannot use '${key}' as a namespace because it is not associated with an object.` - ); - } - - return new StorageNamespaceImpl(this.path.concat([key]), this.access); - } -} - -const DEFAULT_KEY = "trails-state"; - -/** - * Retrieves the property at `path` from the nested `object`. - * Returns `object` if path is empty. - */ -function getPath(object: Record, path: string[]): unknown { - let current: unknown = object; - for (const p of path) { - if (!isObject(current)) { - throw new Error( - ERROR_IDS.INVALID_PATH, - `Cannot get nested property '${p}' because the parent is no object.` - ); - } - current = current[p]; - } - return current; -} - -/** - * Sets the property at `path` in the nested `object` to `value`. - * Throws an error if the path is empty. - */ -function setPath(object: Record, path: string[], value: unknown): void { - if (!path.length) { - throw new Error(ERROR_IDS.INTERNAL, "Path must not be empty."); - } - - let current = object; - for (let i = 0, n = path.length - 1; i < n; ++i) { - const p = path[i]!; - - const next = current[p]; - if (!isObject(next)) { - throw new Error( - ERROR_IDS.INVALID_PATH, - `Cannot set property on '${p}' because it is no object.` - ); - } - current = next; - } - - const prop = path[path.length - 1]!; - current[prop] = value; -} - -/** - * Returns true if `object` is a plain object (or record). - */ -function isObject(object: unknown): object is Record { - return !!(object && typeof object === "object" && !Array.isArray(object)); -} - -/** - * Returns true if `value` looks like a JSON value. - */ -function isSupportedValue(value: unknown) { - const type = typeof value; - return ( - type === "boolean" || - type === "number" || - type === "string" || - type === "undefined" || - value === null || - Array.isArray(value) || - isObject(value) - ); -} - -function getRootKey(properties: Partial): string { - const storageId = properties.storageId; - if (!storageId || typeof storageId !== "string") { - LOG.warn( - `The 'storageId' property of the 'local-storage' package should be set to a valid string to avoid collisions with other applications.` + - ` Defaulting to '${DEFAULT_KEY}'.` - ); - return DEFAULT_KEY; - } - return storageId; -} - -function getLocalStorage(): Storage | undefined { - if (typeof Storage === "undefined") { - LOG.warn("Local storage is not supported by this browser."); - return undefined; - } - - try { - const storage = globalThis.localStorage; - if (!storage) { - LOG.warn("Local storage is not supported by this browser."); - return undefined; - } - return storage; - } catch (e) { - LOG.warn("Local storage is not supported by this browser.", e); - return undefined; - } -} - -function cloneJSON(value: unknown): unknown { - if (value != null) { - value = JSON.parse(JSON.stringify(value)); - } - return value; -} diff --git a/src/packages/local-storage/README.md b/src/packages/local-storage/README.md deleted file mode 100644 index e6d18244..00000000 --- a/src/packages/local-storage/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# @open-pioneer/local-storage - -This package provides access to the browser's [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage). - -A single local storage key (configurable, see [Configuration](#configuration)) is used to keep track of the application's persistent data. -Packages using the `LocalStorageService` can work with arbitrary values (including nested data structures) through a convenient API. - -> NOTE: The `LocalStorageService` will read the persistent data from the browser's local storage on application startup. -> Changes to that data made via the `LocalStorageService` will be reflected in the browser's local storage immediately. -> Concurrent changes made to the browser's local storage **will not** be reflected by the `LocalStorageService`. -> In other words, there is no two-way synchronization between the two systems while the application is running. -> -> You should not attempt to modify the local storage value managed by the `LocalStorageService` (see `storageId` in [Configuration](#configuration)) through the "raw" Browser APIs while the application is running. -> Other keys are safe to use. - -## Usage - -Reference the interface name `local-storage.LocalStorageService` to inject an instance of `LocalStorageService`. - -### Checking for local storage support - -Not all browsers implement or enable support for local storage. -Use the `.isSupported` property to check whether local storage can be used at all: - -```js -const storageService = ...; // injected -console.log(storageService.isSupported); -``` - -If local storage is not supported, other methods (such as `get()` and `set()`) will throw an error. - -### Reading and writing values - -In its most basic form, you can use the `LocalStorageService` similar to a map. -In the background, changes to the service will always be persisted into local storage. - -All keys and values used in the `LocalStorageService` will be serialized to JSON via `JSON.stringify()`. -Thus, only values supported by JSON can be used. - -Example: - -```js -const storageService = ...; // injected -storageService.set("foo", "bar"); -storageService.set("foo", ["array"]); -storageService.set("foo", { - nested: { - object: "hello world" - } -}); -storageService.get("foo"); // returns (copy of) previous value -storageService.remove("foo"); -storageService.clear(); -``` - -### Namespaces - -You can use the `LocalStorageService` to manage hierarchical data, including objects and arrays (see above). -_Namespaces_ can help you treat an object as a group of (nested) properties. -Getting or setting entries in the namespace will update an object behind the scenes. - -To use a namespace, call `getNamespace(key)` on either the `LocalStorageService` or another `LocalStorageNamespace` object. -The `key` used in `getNamespace(key)` should either already be associated with an object or it should not be set to a value at all. -If `key` is not yet associated with an existing object, a new empty object will be created. - -Example: - -```js -const storageService = ...; // injected -const namespace = storageService.getNamespace("my-key"); -namespace.set("foo", "bar"); // actually sets `"my-key" -> "foo"` -``` - -`getNamespace("my-key")` returns a `LocalStorageNamespace` instance that manipulates the object at `"my-key"`. - -Namespaces provide a convenient way to scope your component's persistent values, avoiding conflicts with other packages. -For example, you can use your package name as the namespace key: - -```js -const storageService = ...; // injected -const namespace = storageService.getNamespace("my-package-name"); -namespace.set("my-state", "some-value-to-save"); -``` - -> NOTE: Multiple namespace instances using the same `key` will manipulate the same object and see each other's effects. - -### Configuration - -| Name | Type | Description | -| ----------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `storageId` | String | The key under which the persistent data will be saved. This value should be configured to a reasonably unique value to avoid clashes with other applications at the same origin. Defaults to `trails-state` (with a warning). | - -### Implementation notes - -The `LocalStorageService` manages the persistent data as a single, hierarchical JSON object. -This JSON object is loaded from and saved to the browser's local storage using the `storageId` key. - -The top level value is always an object; its properties are manipulated when calling `get`, `set` etc. on the `LocalStorageService`. -Nested values can be arbitrary (JSON-compatible) values. - -## License - -Apache-2.0 (see `LICENSE` file) diff --git a/src/packages/local-storage/api.ts b/src/packages/local-storage/api.ts deleted file mode 100644 index 55a8b852..00000000 --- a/src/packages/local-storage/api.ts +++ /dev/null @@ -1,101 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { DeclaredService } from "@open-pioneer/runtime"; - -/** - * Provides access to the browser's local storage for trails packages through a convenient API. - * Use the interface name `"local-storage.LocalStorageService"` to inject an instance of this interface. - */ -export interface LocalStorageService - extends LocalStorageAPI, - DeclaredService<"local-storage.LocalStorageService"> { - /** - * Whether local storage is supported by the current environment. - * - * Getters and setters working on local storage will throw if this value is `false`. - */ - readonly isSupported: boolean; -} - -/** - * A namespace provides access to the properties of an object in local storage. - * This can be used to manage groups of related values under a common name. - */ -export type LocalStorageNamespace = LocalStorageAPI; - -/** - * Provides basic operations to interact with the browser's local storage. - * - * The operations provided by this interface always act on an object in local storage: - * either the root value or a nested object. - */ -export interface LocalStorageAPI { - /** - * Returns the value associated with the given `key`, or `undefined` if - * no such value exists. - */ - get(key: string): unknown; - - /** - * Associates the given `value` with `key`. - * - * This method supports arbitrary [JSON](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) compatible values, - * including objects and arrays. - * If you store an object, you can later access (or modify) its individual properties using {@link getNamespace}. - * - * > NOTE: This function creates a clone of the original value to protect against accidental side effects. - * > Updating the original value after `set()` will have no effect on the stored value. - */ - set(key: string, value: unknown): void; - - /** - * Removes any value associated with `key`. - */ - remove(key: string): void; - - /** - * Removes all entries associated managed by this instance. - * - * If `this` represents the root object, _all_ entries will be removed. - * If `this` represents a (possibly nested) namespace, only the contents of that - * namespace will be removed. - */ - removeAll(): void; - - /** - * Returns a storage namespace operating on the given `key` that can be used to group - * multiple related properties. - * `key` should either be associated with an object or it's value should be undefined. - * If `key` is not associated with a value, a new empty object will be created. - * - * Namespaces allow you to treat an object in local storage as a group of properties. - * Getting (or setting) a key using a {@link LocalStorageNamespace | Namespace} object - * will simply read (or update) properties on the managed object instead. - * - * If `key` has already been set to something that is _not_ an object, you will receive an error - * if you attempt to call this method. - * - * Example: - * - * ```js - * const storageService = ...; // injected - * - * // Namespace operates on the "my-package-name" object (which may not exist yet) - * const packageNamespace = storageService.getNamespace("my-package-name"); - * - * // Setting the first value will ensure that the object exists - * packageNamespace.set("foo", "bar"); // actually sets `"my-package-name" -> "foo"` - * - * // Retrieving the same object ("my-package-name") via get(): - * const backingObject = storageService.get("my-package-name"); // {"foo": "bar"} - * console.log(backingObject); - * ``` - */ - getNamespace(key: string): LocalStorageNamespace; -} - -/** Package properties of the `"local-storage"` package. */ -export interface LocalStorageProperties { - /** The root local storage key used to store application state. */ - storageId: string | null; -} diff --git a/src/packages/local-storage/build.config.mjs b/src/packages/local-storage/build.config.mjs deleted file mode 100644 index 1ee85b0c..00000000 --- a/src/packages/local-storage/build.config.mjs +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { defineBuildConfig } from "@open-pioneer/build-support"; - -export default defineBuildConfig({ - entryPoints: ["index"], - services: { - LocalStorageServiceImpl: { - provides: ["local-storage.LocalStorageService"] - } - }, - properties: { - "storageId": null - } -}); diff --git a/src/packages/local-storage/index.ts b/src/packages/local-storage/index.ts deleted file mode 100644 index 5914fbc7..00000000 --- a/src/packages/local-storage/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -export * from "./api"; diff --git a/src/packages/local-storage/package.json b/src/packages/local-storage/package.json deleted file mode 100644 index f51853db..00000000 --- a/src/packages/local-storage/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@open-pioneer/local-storage", - "version": "0.3.0", - "license": "Apache-2.0", - "main": "index.ts", - "scripts": { - "build": "build-pioneer-package" - }, - "peerDependencies": { - "@open-pioneer/core": "^1.2.1", - "@open-pioneer/runtime": "^2.1.0" - }, - "devDependencies": { - "@open-pioneer/test-utils": "^1.1.1", - "openlayers-base-packages": "workspace:*" - }, - "publishConfig": { - "directory": "dist", - "linkDirectory": false - } -} diff --git a/src/packages/local-storage/services.ts b/src/packages/local-storage/services.ts deleted file mode 100644 index 5ac4f326..00000000 --- a/src/packages/local-storage/services.ts +++ /dev/null @@ -1,3 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -export { LocalStorageServiceImpl } from "./LocalStorageServiceImpl"; diff --git a/src/packages/local-storage/typedoc.json b/src/packages/local-storage/typedoc.json deleted file mode 100644 index f823a8d8..00000000 --- a/src/packages/local-storage/typedoc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - // openlayers-base-packages is a dev dependency (link to the project root) - "extends": ["openlayers-base-packages/typedoc.base.json"], - "entryPoints": ["./index.ts"] -} diff --git a/src/packages/map-navigation/package.json b/src/packages/map-navigation/package.json index c3ba829e..ceb00af8 100644 --- a/src/packages/map-navigation/package.json +++ b/src/packages/map-navigation/package.json @@ -10,7 +10,7 @@ "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", "@open-pioneer/react-utils": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "classnames": "^2.3.2", "ol": "^8.2.0", "react": "^18.2.0", diff --git a/src/packages/map/package.json b/src/packages/map/package.json index ff6f2618..7934e77d 100644 --- a/src/packages/map/package.json +++ b/src/packages/map/package.json @@ -9,9 +9,9 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/core": "^1.2.1", - "@open-pioneer/http": "^2.1.2", + "@open-pioneer/http": "^2.1.4", "@open-pioneer/react-utils": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@types/proj4": "^2.5.2", "ol": "^8.2.0", "proj4": "^2.9.0", diff --git a/src/packages/measurement/package.json b/src/packages/measurement/package.json index a14fbdbf..7b8137dd 100644 --- a/src/packages/measurement/package.json +++ b/src/packages/measurement/package.json @@ -9,7 +9,7 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "ol": "^8.2.0", "react": "^18.2.0", diff --git a/src/packages/notifier/CHANGELOG.md b/src/packages/notifier/CHANGELOG.md deleted file mode 100644 index 988fcbd5..00000000 --- a/src/packages/notifier/CHANGELOG.md +++ /dev/null @@ -1,34 +0,0 @@ -# @open-pioneer/notifier - -## 0.3.0 - -### Minor Changes - -- ee7c2d4: Update runtime version. - -### Patch Changes - -- Updated dependencies [762e7b9] - - @open-pioneer/react-utils@0.2.1 - -## 0.2.0 - -### Minor Changes - -- 70349a8: Update to new core packages major versions - -### Patch Changes - -- Updated dependencies [70349a8] - - @open-pioneer/react-utils@0.2.0 - -## 0.1.0 - -### Minor Changes - -- 182da1c: Initial release. - -### Patch Changes - -- Updated dependencies [182da1c] - - @open-pioneer/react-utils@0.1.0 diff --git a/src/packages/notifier/LICENSE b/src/packages/notifier/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/src/packages/notifier/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/src/packages/notifier/NotificationServiceImpl.test.ts b/src/packages/notifier/NotificationServiceImpl.test.ts deleted file mode 100644 index db623cf7..00000000 --- a/src/packages/notifier/NotificationServiceImpl.test.ts +++ /dev/null @@ -1,98 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 - -import { it, expect } from "vitest"; -import { createService } from "@open-pioneer/test-utils/services"; -import { NotificationServiceImpl, Notification } from "./NotificationServiceImpl"; - -it("dispatches events to the notification handler", async () => { - const service = await createService(NotificationServiceImpl, {}); - - const events: unknown[] = []; - - const handlerResource = service.registerHandler({ - showNotification(notification: Notification) { - events.push({ type: "notification", notification: notification }); - }, - closeAll() { - events.push({ type: "closeAll" }); - } - }); - - service.notify({ title: "test" }); - expect(events).toMatchInlineSnapshot(` - [ - { - "notification": { - "displayDuration": undefined, - "level": "info", - "message": undefined, - "title": "test", - }, - "type": "notification", - }, - ] - `); - - events.splice(0, events.length); - - service.closeAll(); - expect(events).toMatchInlineSnapshot(` - [ - { - "type": "closeAll", - }, - ] - `); - - events.splice(0, events.length); - - handlerResource.destroy(); - service.closeAll(); - expect(events).toHaveLength(0); -}); - -it("dispatches events to a later registered notification handler", async () => { - const service = await createService(NotificationServiceImpl, {}); - - const events: unknown[] = []; - - service.notify({ title: "test" }); - service.closeAll(); - service.notify({ title: "test2" }); - - service.registerHandler({ - showNotification(notification: Notification) { - events.push({ type: "notification", notification: notification }); - }, - closeAll() { - events.push({ type: "closeAll" }); - } - }); - - expect(events).toMatchInlineSnapshot(` - [ - { - "notification": { - "displayDuration": undefined, - "level": "info", - "message": undefined, - "title": "test", - }, - "type": "notification", - }, - { - "type": "closeAll", - }, - { - "notification": { - "displayDuration": undefined, - "level": "info", - "message": undefined, - "title": "test2", - }, - "type": "notification", - }, - ] - `); -}); diff --git a/src/packages/notifier/NotificationServiceImpl.ts b/src/packages/notifier/NotificationServiceImpl.ts deleted file mode 100644 index 64ab9d85..00000000 --- a/src/packages/notifier/NotificationServiceImpl.ts +++ /dev/null @@ -1,145 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import type { NotificationLevel, NotificationOptions, NotificationService } from "./api"; -import { Resource, createLogger } from "@open-pioneer/core"; -import type { ReactNode } from "react"; -const LOG = createLogger("notifier:NotificationService"); - -export interface Notification { - title: ReactNode; - message: ReactNode; - level: NotificationLevel; - displayDuration: number | undefined; -} - -/** - * The notification handler is implemented by the UI in order to receive events. - * There can only be one handler at a time. - * - * Calls to the handler may be buffered to allow for notifications before the UI has become ready. - */ -export interface NotificationHandler { - /** Called by the service to emit the notification. */ - showNotification(notification: Notification): void; - - /** Removes all active notifications. */ - closeAll(): void; -} - -export interface InternalNotificationAPI extends NotificationService { - /** - * Registers the notification handler. - * The returned resource can be used to unregister it again. - */ - registerHandler(handler: NotificationHandler): Resource; -} - -export class NotificationServiceImpl implements InternalNotificationAPI { - #handler: NotificationHandler | undefined; - #buffered: [keyof NotificationHandler, ...unknown[]][] | undefined; - #checkTimeoutId: any; // eslint-disable-line @typescript-eslint/no-explicit-any - - constructor() { - if (import.meta.env.DEV) { - this.#checkTimeoutId = setTimeout(() => { - this.#checkHandlerRegistration(); - this.#checkTimeoutId = undefined; - }, 5000); - } - } - - destroy() { - clearTimeout(this.#checkTimeoutId); - this.#checkTimeoutId = undefined; - } - - notify(options: NotificationOptions): void { - this.#dispatchHandlerMethod("showNotification", { - title: options.title ?? undefined, - message: options.message ?? undefined, - level: options.level ?? "info", - displayDuration: options.displayDuration - }); - } - - closeAll(): void { - this.#dispatchHandlerMethod("closeAll"); - } - - registerHandler(handler: NotificationHandler): Resource { - // We only support exactly one handler. - if (this.#handler) { - LOG.warn( - "A notification handler has already been registered; this new handler will be ignored.\n" + - "The component has likely been used twice in your application." - ); - return { - destroy() { - return undefined; - } - }; - } - - // Dispatch buffered calls (if any). - // These happened during the time no handler was registered. - this.#handler = handler; - const buffered = this.#buffered; - this.#buffered = undefined; - if (buffered) { - for (const [name, ...args] of buffered) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (handler[name] as any)(...args); - } - } - - // Return a resource to undo the registration - let destroyed = false; - return { - destroy: () => { - if (destroyed) { - return; - } - - destroyed = true; - if (this.#handler === handler) { - this.#handler = undefined; - } - } - }; - } - - /** - * Calls a method on the handler (if present) or buffers the method call for later once the handler - * has arrived. - */ - #dispatchHandlerMethod( - method: Method, - ...args: Parameters - ): void; - #dispatchHandlerMethod(method: keyof NotificationHandler, ...args: unknown[]): void { - if (this.#handler) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this.#handler[method] as any)(...args); - } else { - const buffered = (this.#buffered ??= []); - if (buffered.length >= 1024) { - LOG.error( - "Internal notification buffer overflow: this event will be dropped to prevent a memory leak.\n" + - "Make sure that the UI is configured to display notifications (use ).", - { method, args } - ); - return; - } - buffered.push([method, ...args]); - } - } - - #checkHandlerRegistration() { - if (!this.#handler) { - LOG.warn( - `No notification handler has been registered: notifications will not be visible.\n` + - `Make sure that your app contains the component.` - ); - } - } -} diff --git a/src/packages/notifier/Notifier.test.tsx b/src/packages/notifier/Notifier.test.tsx deleted file mode 100644 index 92361b5c..00000000 --- a/src/packages/notifier/Notifier.test.tsx +++ /dev/null @@ -1,82 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { expect, it } from "vitest"; -import { createService } from "@open-pioneer/test-utils/services"; -import { NotificationServiceImpl } from "./NotificationServiceImpl"; -import { render, screen, waitForElementToBeRemoved, act, waitFor } from "@testing-library/react"; -import { PackageContextProvider } from "@open-pioneer/test-utils/react"; -import { Notifier } from "./Notifier"; - -function findToastInnerElement(messageDiv: HTMLElement) { - let currentElement = messageDiv.parentElement; - while (currentElement) { - if (currentElement.classList.contains("chakra-toast__inner")) { - return currentElement; - } else { - currentElement = currentElement.parentElement; - } - } - return undefined; -} - -it("shows notifications as toasts", async () => { - const service = await createService(NotificationServiceImpl, {}); - - const services = { - "notifier.NotificationService": service - }; - - render( - - - - ); - - act(() => { - service.notify({ - title: "test", - message:
    Message
    - }); - }); - - const messageDiv = await screen.findByTestId("notification-message", {}); - const toastElement = findToastInnerElement(messageDiv); - - expect(toastElement).toMatchSnapshot(); -}); - -it("closes all notifications", async () => { - const service = await createService(NotificationServiceImpl, {}); - - const services = { - "notifier.NotificationService": service - }; - - render( - - - - ); - - act(() => { - service.notify({ title: "test1" }); - service.notify({ title: "test1" }); - service.notify({ title: "test1" }); - }); - - const messageElements = await waitFor(async () => { - const messageElements = await screen.findAllByText("test1"); - if (messageElements.length !== 3) { - throw new Error("Did not open three notifications"); - } - return messageElements; - }); - expect(messageElements).toHaveLength(3); - - act(() => { - service.closeAll(); - }); - await waitForElementToBeRemoved(messageElements); - const messageElementsAfterClear = await screen.queryAllByText("test1"); - expect(messageElementsAfterClear).toHaveLength(0); -}); diff --git a/src/packages/notifier/Notifier.tsx b/src/packages/notifier/Notifier.tsx deleted file mode 100644 index 75e7c863..00000000 --- a/src/packages/notifier/Notifier.tsx +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { useToast } from "@open-pioneer/chakra-integration"; -import { useEvent } from "@open-pioneer/react-utils"; -import { useService } from "open-pioneer:react-hooks"; -import { ReactElement, useEffect, useState } from "react"; -import { InternalNotificationAPI, Notification } from "./NotificationServiceImpl"; -import { WarningTwoIcon } from "@chakra-ui/icons"; - -/** Props supported by the {@link Notifier} component. */ -export interface NotifierProps { - /** - * The position for new notifications. - * - * @default "top-right" - */ - position?: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right"; -} - -const isDev = import.meta.env.DEV; - -/** - * Shows notifications sent via the `NotificationService`. - * - * Only one instance of `` should be present in the application. - * It currently does not matter where the Notifier is located in the react tree. - * - * ```ts - * import { Notifier } from "@open-pioneer/notifier"; - * - * export function AppUI() { - * return ( - * <> - * - *

    Your application

    - * - * ); - * } - * ``` - */ -export function Notifier(props: NotifierProps): ReactElement { - const { position = "top-right" } = props; - const toast = useToast(); - const notifications = useService("notifier.NotificationService") as InternalNotificationAPI; - const [ready, setReady] = useState(!isDev); - - const showNotification = useEvent((notification: Notification) => { - // use different icons for warning and error - const icon = - notification.level === "error" ? : undefined; - toast({ - position, - title: notification.title, - description: notification.message || null, - status: notification.level, - isClosable: true, - duration: notification.displayDuration ?? null, // Null: does not auto-close - icon - }); - }); - const closeAll = useEvent(() => { - toast.closeAll(); - }); - - useEffect(() => { - /* - * Delay registering the notification handler a bit during development. - * Chakra's toast implementation clears its store when it gets unmounted. - * During development, that may also happen during initialization because of React's - * StrictMode (https://react.dev/reference/react/StrictMode). - * - * Unfortunately, that means that toasts that were emitted very early (such as in service constructors) - * will be deleted. Waiting for a few milliseconds prevents this issue and has no effect on production. - */ - if (isDev && !ready) { - const id = setTimeout(() => setReady(true), 100); - return () => clearTimeout(id); - } - - const handle = notifications.registerHandler({ - showNotification, - closeAll - }); - return () => handle.destroy(); - }, [ready, notifications, showNotification, closeAll]); - - // No actual UI representation right now - return <>; -} diff --git a/src/packages/notifier/README.md b/src/packages/notifier/README.md deleted file mode 100644 index 74b27cd3..00000000 --- a/src/packages/notifier/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# @open-pioneer/notifier - -This package allows a developer to emit global notifications from any application component and provides a component to display the notifications. - -## Usage - -### Displaying notifications in an application - -The `` must be used in your app's UI , otherwise notifications from application components will not be shown. It should be present exactly once. - -```jsx -import { Notifier } from "@open-pioneer/notifier"; - -export function AppUI() { - return ( - <> - - {/* The rest of your application */} - - ); -} -``` - -> Note: In most cases the notifier should be located at or near the root of your app's UI. - -The following properties are supported by the Notifier: - -```ts -export interface NotifierProps { - /** - * The position for new notifications. - * - * @default "top-right" - */ - position?: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right"; -} -``` - -The implementation of `` is currently based on [Chakra's Toast](https://chakra-ui.com/docs/components/toast). - -### Emitting notifications - -Reference the interface name `notifier.NotificationService` to inject an instance of `NotificationService`. -That service can be used to emit events from any service or UI component in the application: - -```ts -const notificationService = ...; // injected -notificationService.notify({ - level: "info", - title: "Job complete", - message: "Optional additional message ..." -}) -``` - -All options in `notify` are optional, but at least the `title` or `message` should be specified. - -The following options are supported by the service: - -```ts -export type NotificationLevel = "success" | "info" | "warning" | "error"; - -export interface NotificationOptions { - /** The title of the notification. */ - title?: string | ReactNode | undefined; - - /** An optional message, shown below the title. */ - message?: string | ReactNode | undefined; - - /** - * The level of this notification. - * @default "info" - */ - level?: NotificationLevel | undefined; - - /** - * The duration (in milliseconds) how long the notification is displayed. - * By default, notifications are displayed until they are explicitly closed by the user. - * - * Note that important messages should not be hidden automatically for a11y reasons. - */ - displayDuration?: number | undefined; -} -``` - -### Closing all notifications - -All currently displayed notifications can be closed by calling the `closeAll` method on the `NotificationService`: - -```ts -const notificationService = ...; // injected -notificationService.closeAll(); -``` - -## License - -Apache-2.0 (see `LICENSE` file) diff --git a/src/packages/notifier/__snapshots__/Notifier.test.tsx.snap b/src/packages/notifier/__snapshots__/Notifier.test.tsx.snap deleted file mode 100644 index 82b05c65..00000000 --- a/src/packages/notifier/__snapshots__/Notifier.test.tsx.snap +++ /dev/null @@ -1,79 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`shows notifications as toasts 1`] = ` -
    -
    - - - - - -
    -
    - test -
    -
    -
    - Message -
    -
    -
    - -
    -
    -`; diff --git a/src/packages/notifier/api.ts b/src/packages/notifier/api.ts deleted file mode 100644 index 6c58ae3d..00000000 --- a/src/packages/notifier/api.ts +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import type { ReactNode } from "react"; -import type { DeclaredService } from "@open-pioneer/runtime"; - -/** Represents the severity or kind of a notification. */ -export type NotificationLevel = "success" | "info" | "warning" | "error"; - -/** - * Options used when emitting a new notification via {@link NotificationService.notify}. - */ -export interface NotificationOptions { - /** The title of the notification. */ - title?: string | ReactNode | undefined; - - /** An optional message, shown below the title. */ - message?: string | ReactNode | undefined; - - /** - * The level of this notification. - * @default "info" - */ - level?: NotificationLevel | undefined; - - /** - * The duration (in milliseconds) how long the notification is displayed. - * By default, notifications are displayed until they are explicitly closed by the user. - * - * Note that important messages should not be hidden automatically for a11y reasons. - */ - displayDuration?: number | undefined; -} - -/** - * The `NotificationService` allows any part of the application to emit - * notifications to the user. - * - * You can inject an instance of this service by referencing the interface name `notifier.NotificationService`. - */ -export interface NotificationService extends DeclaredService<"notifier.NotificationService"> { - /** - * Emits a new notification. - * - * Notifications are shown by the `` component, - * which must be present in your application. - * - * @param options Options for the new notification. - */ - notify(options: NotificationOptions): void; - - /** Closes all active notifications. */ - closeAll(): void; -} diff --git a/src/packages/notifier/build.config.mjs b/src/packages/notifier/build.config.mjs deleted file mode 100644 index 34501e75..00000000 --- a/src/packages/notifier/build.config.mjs +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { defineBuildConfig } from "@open-pioneer/build-support"; - -export default defineBuildConfig({ - entryPoints: ["index"], - services: { - NotificationServiceImpl: { - provides: "notifier.NotificationService" - } - }, - ui: { - references: ["notifier.NotificationService"] - }, - publishConfig: { - strict: true - } -}); diff --git a/src/packages/notifier/index.ts b/src/packages/notifier/index.ts deleted file mode 100644 index 6b21f135..00000000 --- a/src/packages/notifier/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -export * from "./api"; -export { Notifier, type NotifierProps } from "./Notifier"; diff --git a/src/packages/notifier/package.json b/src/packages/notifier/package.json deleted file mode 100644 index a5b0d7cd..00000000 --- a/src/packages/notifier/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@open-pioneer/notifier", - "description": "Provides support for application-wide notifications", - "version": "0.3.0", - "license": "Apache-2.0", - "main": "index.ts", - "scripts": { - "build": "build-pioneer-package" - }, - "peerDependencies": { - "@open-pioneer/core": "^1.2.1", - "@open-pioneer/chakra-integration": "^1.1.1", - "@chakra-ui/icons": "^2.1.1", - "@open-pioneer/runtime": "^2.1.0", - "@open-pioneer/react-utils": "workspace:^", - "react": "^18.2.0" - }, - "devDependencies": { - "@open-pioneer/test-utils": "^1.1.1", - "openlayers-base-packages": "workspace:*" - }, - "publishConfig": { - "directory": "dist", - "linkDirectory": false - } -} diff --git a/src/packages/notifier/services.ts b/src/packages/notifier/services.ts deleted file mode 100644 index 2578c949..00000000 --- a/src/packages/notifier/services.ts +++ /dev/null @@ -1,3 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -export { NotificationServiceImpl } from "./NotificationServiceImpl"; diff --git a/src/packages/notifier/typedoc.json b/src/packages/notifier/typedoc.json deleted file mode 100644 index f823a8d8..00000000 --- a/src/packages/notifier/typedoc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - // openlayers-base-packages is a dev dependency (link to the project root) - "extends": ["openlayers-base-packages/typedoc.base.json"], - "entryPoints": ["./index.ts"] -} diff --git a/src/packages/ogc-features/package.json b/src/packages/ogc-features/package.json index 042dff82..2ca7b370 100644 --- a/src/packages/ogc-features/package.json +++ b/src/packages/ogc-features/package.json @@ -8,7 +8,7 @@ }, "peerDependencies": { "@open-pioneer/core": "^1.2.1", - "@open-pioneer/http": "^2.1.2", + "@open-pioneer/http": "^2.1.4", "ol": "^8.2.0", "uuid": "^9.0.1", "@open-pioneer/search": "workspace:^" diff --git a/src/packages/overview-map/package.json b/src/packages/overview-map/package.json index e0276ba8..67c6249e 100644 --- a/src/packages/overview-map/package.json +++ b/src/packages/overview-map/package.json @@ -10,7 +10,7 @@ "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", "@open-pioneer/ogc-features": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "ol": "^8.2.0", "react": "^18.2.0" diff --git a/src/packages/printing/package.json b/src/packages/printing/package.json index 1ccde9d0..7465ab8c 100644 --- a/src/packages/printing/package.json +++ b/src/packages/printing/package.json @@ -9,10 +9,10 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "@open-pioneer/core": "^1.2.1", - "@open-pioneer/notifier": "workspace:^", + "@open-pioneer/notifier": "^0.3.1", "ol": "^8.2.0", "react": "^18.2.0", "classnames": "^2.3.2", diff --git a/src/packages/result-list/package.json b/src/packages/result-list/package.json index 9173a3a3..72b5b4fa 100644 --- a/src/packages/result-list/package.json +++ b/src/packages/result-list/package.json @@ -9,7 +9,7 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "@open-pioneer/core": "^1.2.1", "ol": "^8.2.0", diff --git a/src/packages/scale-bar/package.json b/src/packages/scale-bar/package.json index 8996ce49..82dd8899 100644 --- a/src/packages/scale-bar/package.json +++ b/src/packages/scale-bar/package.json @@ -10,7 +10,7 @@ "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", "@open-pioneer/react-utils": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "ol": "^8.2.0", "react": "^18.2.0" }, diff --git a/src/packages/scale-viewer/package.json b/src/packages/scale-viewer/package.json index ad46b8f0..2c4fc83a 100644 --- a/src/packages/scale-viewer/package.json +++ b/src/packages/scale-viewer/package.json @@ -10,7 +10,7 @@ "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", "@open-pioneer/react-utils": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "react": "^18.2.0" }, "devDependencies": { diff --git a/src/packages/search/package.json b/src/packages/search/package.json index b4175969..6870c1af 100644 --- a/src/packages/search/package.json +++ b/src/packages/search/package.json @@ -9,7 +9,7 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "@open-pioneer/core": "^1.2.1", "ol": "^8.2.0", diff --git a/src/packages/selection/package.json b/src/packages/selection/package.json index 385935ae..89d7606a 100644 --- a/src/packages/selection/package.json +++ b/src/packages/selection/package.json @@ -9,10 +9,10 @@ "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/map": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/react-utils": "workspace:^", "@open-pioneer/core": "^1.2.1", - "@open-pioneer/notifier": "workspace:^", + "@open-pioneer/notifier": "^0.3.1", "ol": "^8.2.0", "react": "^18.2.0", "chakra-react-select": "^4.7.6", diff --git a/src/packages/spatial-bookmarks/package.json b/src/packages/spatial-bookmarks/package.json index c9bb032c..06633110 100644 --- a/src/packages/spatial-bookmarks/package.json +++ b/src/packages/spatial-bookmarks/package.json @@ -10,10 +10,10 @@ "@chakra-ui/icons": "^2.1.1", "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/core": "^1.2.1", - "@open-pioneer/local-storage": "workspace:^", + "@open-pioneer/local-storage": "^0.3.1", "@open-pioneer/map": "workspace:^", "@open-pioneer/react-utils": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "classnames": "^2.3.2", "ol": "^8.2.0", "react": "^18.2.0", diff --git a/src/packages/theme/README.md b/src/packages/theme/README.md index a0f34ed4..f1b5c0db 100644 --- a/src/packages/theme/README.md +++ b/src/packages/theme/README.md @@ -2,6 +2,9 @@ This package provides a theme that uses the "trails" color scheme. +This theme is based on `@open-pioneer/base-theme`. +It may define additional style rules that diverge from the global default theme. + ## Usage To use the theme in your app, first import: @@ -19,71 +22,7 @@ createCustomElement({ }); ``` -### How to override the `trails` color scheme - -Import the `extendTheme` helper function: - -```jsx -import { extendTheme } from "@open-pioneer/chakra-integration"; -``` - -Define your custom `trails` (or `trails_alt`) colors: - -```jsx -const colors = { - trails: { - 50: "#f5edfd", - 100: "#eedcff", - 200: "#d6c2ea", - 300: "#bfa8d5", - 400: "#a890c1", - 500: "#9177ad", - 600: "#7b609a", - 700: "#654986", - 800: "#4f3373", - 900: "#391e61" - } -}; -``` - -Use `extendTheme` function to override the `trails` colors: - -```jsx -const customTheme = extendTheme({ colors }, theme); -``` - -Or use Chakra UI color schemes to override the `trails` (or `trails_alt`) colors: - -```jsx -const customTheme = extendTheme( - { - colors: { - trails: theme.colors.gray - } - }, - theme -); -``` - -`options: gray | red | orange | yellow | green | teal | blue | cyan | purple | pink` - -Then pass in the custom theme in `createCustomElement`: - -```jsx -createCustomElement({ - ..., - theme: customTheme -}); -``` - -### How to use button variants - -```jsx - -``` - -`options: solid | outline | ghost | link | primary | secondary | cancel` -`default: solid` +See `@open-pioneer/base-theme` for more details. ## License diff --git a/src/packages/theme/package.json b/src/packages/theme/package.json index 02fbc36a..c8c933c8 100644 --- a/src/packages/theme/package.json +++ b/src/packages/theme/package.json @@ -8,8 +8,8 @@ }, "peerDependencies": { "@open-pioneer/chakra-integration": "^1.1.1", - "@open-pioneer/runtime": "^2.1.0", - "@open-pioneer/base-theme": "^0.2.0" + "@open-pioneer/runtime": "^2.1.2", + "@open-pioneer/base-theme": "^0.3.0" }, "devDependencies": { "openlayers-base-packages": "workspace:*" diff --git a/src/packages/theme/theme.ts b/src/packages/theme/theme.ts index acebf71e..4c68e4e4 100644 --- a/src/packages/theme/theme.ts +++ b/src/packages/theme/theme.ts @@ -1,323 +1,11 @@ // SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) // SPDX-License-Identifier: Apache-2.0 -import { - StyleFunctionProps, - extendTheme, - withDefaultColorScheme -} from "@open-pioneer/chakra-integration"; +import { extendTheme } from "@open-pioneer/chakra-integration"; import { theme as baseTheme } from "@open-pioneer/base-theme"; -const fonts = { - /* heading: "Tahoma", - body: "Courier New" */ -}; - -//10 colors as hex values from 50 to 900 (light to dark) -const colors = { - //trails = default color scheme - trails: { - 50: "#eaf2f5", - 100: "#d5e5ec", - 200: "#abcbd9", - 300: "#81b1c5", - 400: "#5797b2", - 500: "#2d7d9f", - 600: "#24647f", - 700: "#1b4b5f", - 800: "#123240", - 900: "#091920" - }, - //trails_alt = currently only used for: - trails_alt: { - 50: "#eaf3e9", - 100: "#d5e7d2", - 200: "#abcea5", - 300: "#80b678", - 400: "#569d4b", - 500: "#2c851e", - 600: "#236a18", - 700: "#1a5012", - 800: "#12350c", - 900: "#091b06" - } -}; - -const semanticTokens = { - colors: { - "background_body": "white", - "background_primary": "trails.500", - "background_light": "trails.50", - //"background_secondary": "trails.700", - "placeholder": "gray.500", - "font_primary": "black", - //"font_secondary": "gray.500", - "font_inverse": "white", - "font_link": "trails.600", - "border": "gray.300", - - //override internal chakra theming variables - //https://github.com/chakra-ui/chakra-ui/blob/main/packages/components/theme/src/semantic-tokens.ts - "chakra-body-text": "font_primary", - "chakra-body-bg": "background_body", - "chakra-border-color": "border", - "chakra-placeholder-color": "placeholder" - //"chakra-inverse-text": "font_inverse", - //"chakra-subtle-bg": "background_secondary", - //"chakra-subtle-text": "font_secondary" - } -}; - -//Create an intermediate theme to have access to all colors and semantic tokens (function: getColor) -const intermediateTheme = extendTheme({ fonts, colors, semanticTokens }, baseTheme); - -//Get the color defined by a semantic token. -//If it points to a color (e.g. red.500), get the hex color value out of the color scheme. -//Overrides: "boxShadow" and "outline" -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const getColor = (semanticToken: string, theme: any) => { - const color = theme.semanticTokens.colors[semanticToken]; - if (color && color.includes(".")) { - const kvp = color.split("."); - const key = kvp[0], - value = kvp[1]; - return theme.colors[key][value]; - } - return color; -}; - -/** - * Provides a theme that uses the "trails" color scheme. - */ export const theme = extendTheme( - withDefaultColorScheme({ colorScheme: "trails" }), { - styles: { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - global({ theme }: any) { - return { - ".chakra-host": { - //TODO: Hack! Additional Hex digits only work because colors are hex, too - //opacity-to-hex: 0.6 => 99 - "--trails-theme-shadow-color": `${getColor("background_primary", theme)}99` - } - }; - } - }, - shadows: { - outline: `0 0 0 3px var(--trails-theme-shadow-color)` - }, - components: { - Button: { - defaultProps: { - //colorScheme: "gray" - //size: "md", //"lg" | "md" | "sm" | "xs" - //variant: "solid" //"primary" | "secondary" | "cancel" | "solid" | "outline" | "ghost" | "link" - }, - variants: { - //primary === default - primary: { - color: "font_inverse", - bg: "trails.500", - _hover: { - bg: "trails.600" - }, - _active: { - bg: "trails.700" - } - }, - secondary: { - color: "font_inverse", - bg: "trails_alt.500", - _hover: { - bg: "trails_alt.600" - }, - _active: { - bg: "trails_alt.700" - } - }, - cancel: { - color: "font_inverse", - bg: "gray.500", - _hover: { - bg: "gray.600" - }, - _active: { - bg: "gray.700" - } - } - } - }, - Checkbox: { - defaultProps: { - //colorScheme: "blue" - //size: "md" //"lg" | "md" | "sm" - } - }, - Divider: { - baseStyle: { - borderColor: "background_primary" - } - }, - Input: { - defaultProps: { - //size: "md" //"lg" | "md" | "sm" | "xs" - //variant: "outline" //"outline" | "filled" | "flushed" | "unstyled" - }, - variants: { - outline({ theme }: StyleFunctionProps) { - return { - field: { - borderColor: "border", - _focusVisible: { - borderColor: "background_primary", - boxShadow: `0 0 0 1px ${getColor("background_primary", theme)}` - } - }, - addon: { - borderColor: "border", - bg: "background_primary" - } - }; - }, - filled: { - field: { - _focusVisible: { - borderColor: "background_primary" - } - }, - addon: { - bg: "background_primary" - } - }, - flushed({ theme }: StyleFunctionProps) { - return { - field: { - _focusVisible: { - borderColor: "background_primary", - boxShadow: `0px 1px 0px 0px ${getColor( - "background_primary", - theme - )}` - } - } - }; - } - } - }, - Link: { - baseStyle: { - color: "font_link" - } - }, - Radio: { - defaultProps: { - //colorScheme: "blue", - //size: "md" //"lg" | "md" | "sm" - } - }, - Select: { - defaultProps: { - //size: "md" //"lg" | "md" | "sm" | "xs" - //variant: "outline" //"outline" | "filled" | "flushed" | "unstyled" - }, - variants: { - outline({ theme }: StyleFunctionProps) { - return { - field: { - borderColor: "border", - _focusVisible: { - borderColor: "background_primary", - boxShadow: `0 0 0 1px ${getColor("background_primary", theme)}` - } - } - }; - }, - filled: { - field: { - _focusVisible: { - borderColor: "background_primary" - } - }, - addon: { - bg: "background_primary" - } - }, - flushed({ theme }: StyleFunctionProps) { - return { - field: { - _focusVisible: { - borderColor: "background_primary", - boxShadow: `0px 1px 0px 0px ${getColor( - "background_primary", - theme - )}` - } - } - }; - } - } - }, - Slider: { - defaultProps: { - //colorScheme: "blue" - //size: "md" //"lg" | "md" | "sm" - }, - baseStyle: { - thumb: { - borderColor: "background_primary", - _hover: { - bg: "background_primary" - } - } - } - }, - Switch: { - defaultProps: { - //colorScheme: "blue", - //size: "md" //"lg" | "md" | "sm" - } - }, - Textarea: { - defaultProps: { - //size: "md", //"lg" | "md" | "sm" | "xs" - //variant: "outline" //"outline" | "filled" | "flushed" | "unstyled" - }, - variants: { - outline({ theme }: StyleFunctionProps) { - return { - borderColor: "border", - _focusVisible: { - borderColor: "background_primary", - boxShadow: `0 0 0 1px ${getColor("background_primary", theme)}` - } - }; - }, - filled: { - _focusVisible: { - borderColor: "background_primary" - } - }, - flushed({ theme }: StyleFunctionProps) { - return { - _focusVisible: { - borderColor: "background_primary", - boxShadow: `0px 1px 0px 0px ${getColor( - "background_primary", - theme - )}` - } - }; - } - } - }, - Tooltip: { - baseStyle: { - //bg: "background_primary", - //color: "font_inverse", - borderRadius: "md" - } - } - } + // Nothing here at the moment }, - intermediateTheme + baseTheme ); diff --git a/src/packages/toc/package.json b/src/packages/toc/package.json index cb98d303..25511e1a 100644 --- a/src/packages/toc/package.json +++ b/src/packages/toc/package.json @@ -11,7 +11,7 @@ "@open-pioneer/map": "workspace:^", "@open-pioneer/basemap-switcher": "workspace:^", "@open-pioneer/react-utils": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "ol": "^8.2.0", "react": "^18.2.0", "classnames": "^2.3.2", diff --git a/src/samples/auth-sample/README.md b/src/samples/auth-sample/README.md deleted file mode 100644 index db3b8a30..00000000 --- a/src/samples/auth-sample/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# auth-sample - -This example demonstrates the `` component and the `AuthPlugin`-API supported by the `authentication` package. - -The content of the application is protected: only authenticated users can interact with it. -If a user is not logged in, a login fallback (a simple login form) is presented to the user instead. -Once a user has logged in, the content of the application becomes visible. -A logout button can be used to end the session (hiding the content again). - -The `TestAuthPlugin` in this example only does trivial access control by comparing the entered user name and password with hard coded strings ("admin" / "admin"). -A real implementation would send the credentials to a backend to begin a session. diff --git a/src/samples/auth-sample/auth-app/AppUI.tsx b/src/samples/auth-sample/auth-app/AppUI.tsx deleted file mode 100644 index 22a7f253..00000000 --- a/src/samples/auth-sample/auth-app/AppUI.tsx +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { ForceAuth } from "@open-pioneer/authentication"; -import { Container, Flex, Heading } from "@open-pioneer/chakra-integration"; -import { LogoutButton } from "./LogoutButton"; - -export function AppUI() { - return ( - - - Authenticated - This is the actual content of the app. Authentication was successful. - - - - - - ); -} diff --git a/src/samples/auth-sample/auth-app/CHANGELOG.md b/src/samples/auth-sample/auth-app/CHANGELOG.md deleted file mode 100644 index b50684d1..00000000 --- a/src/samples/auth-sample/auth-app/CHANGELOG.md +++ /dev/null @@ -1,26 +0,0 @@ -# auth-app - -## 0.0.4 - -### Patch Changes - -- Updated dependencies [ee7c2d4] - - @open-pioneer/authentication@0.3.0 - - @open-pioneer/theme@0.3.0 - -## 0.0.3 - -### Patch Changes - -- Updated dependencies [70349a8] - - @open-pioneer/authentication@0.2.0 - - @open-pioneer/theme@0.2.0 - -## 0.0.2 - -### Patch Changes - -- Updated dependencies [2cee00c] -- Updated dependencies [13a0289] - - @open-pioneer/theme@0.1.0 - - @open-pioneer/authentication@0.1.0 diff --git a/src/samples/auth-sample/auth-app/LogoutButton.tsx b/src/samples/auth-sample/auth-app/LogoutButton.tsx deleted file mode 100644 index 86e71cda..00000000 --- a/src/samples/auth-sample/auth-app/LogoutButton.tsx +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { AuthService, useAuthState } from "@open-pioneer/authentication"; -import { Button } from "@open-pioneer/chakra-integration"; -import { useService } from "open-pioneer:react-hooks"; - -export function LogoutButton() { - const authService = useService("authentication.AuthService"); - const authState = useAuthState(authService); - const doLogout = () => { - authService.logout(); - }; - - if (authState.kind === "not-authenticated" || authState.kind === "pending") { - return null; - } - return ( - - ); -} diff --git a/src/samples/auth-sample/auth-app/app.ts b/src/samples/auth-sample/auth-app/app.ts deleted file mode 100644 index 90c9a518..00000000 --- a/src/samples/auth-sample/auth-app/app.ts +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { createCustomElement } from "@open-pioneer/runtime"; -import { theme } from "@open-pioneer/theme"; -import * as appMetadata from "open-pioneer:app"; -import { AppUI } from "./AppUI"; - -const element = createCustomElement({ - component: AppUI, - theme, - appMetadata -}); - -customElements.define("auth-app", element); diff --git a/src/samples/auth-sample/auth-app/auth-plugin/LoginMask.tsx b/src/samples/auth-sample/auth-app/auth-plugin/LoginMask.tsx deleted file mode 100644 index 200eb512..00000000 --- a/src/samples/auth-sample/auth-app/auth-plugin/LoginMask.tsx +++ /dev/null @@ -1,101 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { - Alert, - AlertDescription, - AlertIcon, - AlertTitle, - Button, - Container, - FormControl, - FormLabel, - Heading, - Input, - InputGroup, - InputRightElement, - Text, - VStack -} from "@open-pioneer/chakra-integration"; -import { useState } from "react"; - -interface LoginMaskProps { - wasLoggedIn: boolean; - doLogin: (userName: string, password: string) => string | undefined; -} - -export function LoginMask({ doLogin, wasLoggedIn }: LoginMaskProps) { - const [userName, setUserName] = useState(""); - const [password, setPassword] = useState(""); - const [showPassword, setShowPassword] = useState(false); - const [errorMessage, setErrorMessage] = useState(); - const [showLoggedOutMessage, setShowLoggedOutMessage] = useState(wasLoggedIn); - const onSubmit = (e: Pick) => { - e.preventDefault(); - const errorMessage = doLogin(userName, password); - setErrorMessage(errorMessage || ""); - setShowLoggedOutMessage(false); - }; - - return ( - - - - Login - - - Please enter your user name and password to authenticate. -
    - Note: credentials are {'"admin"'} / {'"admin"'} -
    - {errorMessage && ( - - - {errorMessage} - - )} - {showLoggedOutMessage && ( - - - - Logout successful. -
    - You can use the form below to log in again. -
    -
    - )} - - User name - setUserName(e.target.value)} - autoComplete="username" - /> - - - Password - - setPassword(e.target.value)} - autoComplete="current-password" - /> - - - - - - -
    -
    - ); -} diff --git a/src/samples/auth-sample/auth-app/auth-plugin/TestAuthPlugin.ts b/src/samples/auth-sample/auth-app/auth-plugin/TestAuthPlugin.ts deleted file mode 100644 index 00409fb0..00000000 --- a/src/samples/auth-sample/auth-app/auth-plugin/TestAuthPlugin.ts +++ /dev/null @@ -1,86 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { - AuthPlugin, - AuthPluginEvents, - AuthState, - LoginBehavior -} from "@open-pioneer/authentication"; -import { EventEmitter } from "@open-pioneer/core"; -import { Service } from "@open-pioneer/runtime"; -import { createElement } from "react"; -import { LoginMask } from "./LoginMask"; - -export class TestAuthPlugin extends EventEmitter implements Service, AuthPlugin { - #state: AuthState = { - kind: "pending" - }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - #timerId: any; - #wasLoggedIn = false; - - constructor() { - super(); - - // Delay state change to simulate a delay that may be needed to - // determine the user's login state (e.g. rest request). - this.#timerId = setTimeout(() => { - this.#state = { - kind: "not-authenticated" - }; - this.emit("changed"); - }, 500); - } - - destroy() { - clearTimeout(this.#timerId); - this.#timerId = undefined; - } - - getAuthState(): AuthState { - return this.#state; - } - - getLoginBehavior(): LoginBehavior { - // Trivial username / password check called by the react component. - // The plugin's state changes if the credentials are correct. - const doLogin = (userName: string, password: string): string | undefined => { - if (userName === "admin" && password === "admin") { - this.#state = { - kind: "authenticated", - sessionInfo: { - userId: "admin", - userName: "Arnold Administrator" - } - }; - this.#wasLoggedIn = true; - this.emit("changed"); - } else { - return "Invalid user name or password!"; - } - }; - - // This component is rendered when the user is not logged in, for example - // by the `` component. - const AuthFallback = () => - createElement(LoginMask, { - doLogin: doLogin, - wasLoggedIn: this.#wasLoggedIn - }); - return { - kind: "fallback", - Fallback: AuthFallback - }; - } - - logout() { - if (this.#state.kind === "authenticated" || this.#state.kind === "pending") { - this.#state = { - kind: "not-authenticated" - }; - clearTimeout(this.#timerId); - this.#timerId = undefined; - this.emit("changed"); - } - } -} diff --git a/src/samples/auth-sample/auth-app/build.config.mjs b/src/samples/auth-sample/auth-app/build.config.mjs deleted file mode 100644 index a50250ca..00000000 --- a/src/samples/auth-sample/auth-app/build.config.mjs +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { defineBuildConfig } from "@open-pioneer/build-support"; - -export default defineBuildConfig({ - services: { - TestAuthPlugin: { - provides: "authentication.AuthPlugin" - } - }, - ui: { - references: ["authentication.AuthService"] - } -}); diff --git a/src/samples/auth-sample/auth-app/package.json b/src/samples/auth-sample/auth-app/package.json deleted file mode 100644 index a9281da0..00000000 --- a/src/samples/auth-sample/auth-app/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "auth-app", - "version": "0.0.4", - "private": true, - "dependencies": { - "@open-pioneer/authentication": "workspace:^", - "@open-pioneer/chakra-integration": "^1.1.1", - "@open-pioneer/core": "^1.2.1", - "@open-pioneer/runtime": "^2.1.0", - "@open-pioneer/theme": "workspace:^", - "react": "^18.2.0" - } -} diff --git a/src/samples/auth-sample/auth-app/services.ts b/src/samples/auth-sample/auth-app/services.ts deleted file mode 100644 index 73a52afd..00000000 --- a/src/samples/auth-sample/auth-app/services.ts +++ /dev/null @@ -1,3 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -export { TestAuthPlugin } from "./auth-plugin/TestAuthPlugin"; diff --git a/src/samples/auth-sample/index.html b/src/samples/auth-sample/index.html deleted file mode 100644 index 1c63f0a3..00000000 --- a/src/samples/auth-sample/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - Authentication Sample - - - - - - - - - diff --git a/src/samples/experimental-sidebar/sidebar-app/package.json b/src/samples/experimental-sidebar/sidebar-app/package.json index ef2c6a0d..71233177 100644 --- a/src/samples/experimental-sidebar/sidebar-app/package.json +++ b/src/samples/experimental-sidebar/sidebar-app/package.json @@ -11,7 +11,7 @@ "@open-pioneer/experimental-layout-sidebar": "workspace:^", "@open-pioneer/map": "workspace:^", "@open-pioneer/react-utils": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/theme": "workspace:^", "ol": "^8.2.0", "react": "^18.2.0", diff --git a/src/samples/map-sample/ol-app/package.json b/src/samples/map-sample/ol-app/package.json index 073fe838..4ecf0353 100644 --- a/src/samples/map-sample/ol-app/package.json +++ b/src/samples/map-sample/ol-app/package.json @@ -8,20 +8,21 @@ "@emotion/styled": "^11.11.0", "@open-pioneer/chakra-integration": "^1.1.1", "@open-pioneer/coordinate-viewer": "workspace:^", + "@open-pioneer/editing": "workspace:^", "@open-pioneer/experimental-layout-sidebar": "workspace:^", "@open-pioneer/geolocation": "workspace:^", - "@open-pioneer/http": "^2.1.2", + "@open-pioneer/http": "^2.1.4", "@open-pioneer/legend": "workspace:^", - "@open-pioneer/editing": "workspace:^", "@open-pioneer/map": "workspace:^", "@open-pioneer/map-navigation": "workspace:^", "@open-pioneer/measurement": "workspace:^", - "@open-pioneer/notifier": "workspace:^", + "@open-pioneer/notifier": "^0.3.1", "@open-pioneer/ogc-features": "workspace:^", "@open-pioneer/overview-map": "workspace:^", + "@open-pioneer/printing": "workspace:^", "@open-pioneer/react-utils": "workspace:^", "@open-pioneer/result-list": "workspace:^", - "@open-pioneer/runtime": "^2.1.0", + "@open-pioneer/runtime": "^2.1.2", "@open-pioneer/scale-bar": "workspace:^", "@open-pioneer/scale-viewer": "workspace:^", "@open-pioneer/search": "workspace:^", @@ -29,7 +30,6 @@ "@open-pioneer/spatial-bookmarks": "workspace:^", "@open-pioneer/theme": "workspace:^", "@open-pioneer/toc": "workspace:^", - "@open-pioneer/printing": "workspace:^", "ol": "^8.2.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/src/samples/notify-sample/README.md b/src/samples/notify-sample/README.md deleted file mode 100644 index e33ecd97..00000000 --- a/src/samples/notify-sample/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# notify-sample - -This example demonstrates how to use the `@open-pioneer/notifier` package. -The `` component must be embedded somewhere into the application. - -Any component (or service) can emit notifications by calling `notify()` on the NotificationService. diff --git a/src/samples/notify-sample/index.html b/src/samples/notify-sample/index.html deleted file mode 100644 index 6d130ddc..00000000 --- a/src/samples/notify-sample/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - Notify Sample - - - - - - - - - diff --git a/src/samples/notify-sample/notify-app/AppUI.tsx b/src/samples/notify-sample/notify-app/AppUI.tsx deleted file mode 100644 index 42bf9d68..00000000 --- a/src/samples/notify-sample/notify-app/AppUI.tsx +++ /dev/null @@ -1,115 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) -// SPDX-License-Identifier: Apache-2.0 -import { - Box, - Button, - ButtonGroup, - Checkbox, - Container, - FormControl, - FormLabel, - Heading, - Input, - Select, - Stack, - Text, - Textarea -} from "@open-pioneer/chakra-integration"; -import { - NotificationLevel, - NotificationOptions, - NotificationService, - Notifier -} from "@open-pioneer/notifier"; -import { useService } from "open-pioneer:react-hooks"; -import { useState } from "react"; - -export function AppUI() { - const notifications = useService("notifier.NotificationService"); - const [title, setTitle] = useState(""); - const [level, setLevel] = useState("info"); - const [message, setMessage] = useState(""); - const [autoHide, setAutoHide] = useState(false); - const emitNotification = () => { - const options: NotificationOptions = { - title, - level: level as NotificationLevel, // quick and dirty, we only allow supported strings in select - message: message, - displayDuration: autoHide ? 5000 : undefined - }; - if (!options.title) { - notifications.notify({ - title: "Title is required", - level: "error" - }); - return; - } - - notifications.notify(options); - }; - const clearNotifications = () => { - notifications.closeAll(); - }; - - return ( - <> - - - - - Notify Sample - Use the form below to emit notifications. - - - - - Title - setTitle(e.target.value)} - /> - - - Level - - - - Message -