@koech/esm-core 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/.eslintignore +3 -0
- package/.eslintrc +72 -0
- package/.github/pull_request_template.md +22 -0
- package/.github/workflows/bundle-size.yml +30 -0
- package/.github/workflows/ci.yml +159 -0
- package/.github/workflows/code-ql.yml +71 -0
- package/.github/workflows/docs.yml +21 -0
- package/.github/workflows/e2e.yml +214 -0
- package/.github/workflows/tx-pull.yml +57 -0
- package/.github/workflows/tx-push.yml +21 -0
- package/.husky/pre-commit +8 -0
- package/.husky/pre-push +6 -0
- package/.prettierignore +9 -0
- package/.tx/config +42 -0
- package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
- package/.yarn/releases/yarn-4.10.3.cjs +942 -0
- package/.yarn/versions/643d2b70.yml +21 -0
- package/.yarnrc.yml +14 -0
- package/LICENSE +401 -0
- package/README.md +371 -0
- package/document.sh +10 -0
- package/e2e/core/global-setup.ts +32 -0
- package/e2e/core/index.ts +1 -0
- package/e2e/core/test.ts +9 -0
- package/e2e/pages/home-page.ts +9 -0
- package/e2e/pages/index.ts +2 -0
- package/e2e/pages/login-page.ts +9 -0
- package/e2e/specs/login.spec.ts +55 -0
- package/e2e/specs/logout.spec.ts +42 -0
- package/e2e/specs/navbar.spec.ts +48 -0
- package/e2e/support/bamboo/docker-compose.yml +56 -0
- package/e2e/support/bamboo/e2e-test-runner.sh +13 -0
- package/e2e/support/bamboo/playwright.Dockerfile +12 -0
- package/e2e/support/github/.dockerignore +2 -0
- package/e2e/support/github/Dockerfile +21 -0
- package/e2e/support/github/commit_and_export_images.sh +17 -0
- package/e2e/support/github/docker-compose.yml +31 -0
- package/e2e/support/github/run-e2e-docker-env.sh +354 -0
- package/example.env +6 -0
- package/markdown_link_check_config.json +24 -0
- package/package.json +73 -0
- package/packages/apps/esm-devtools-app/README.md +37 -0
- package/packages/apps/esm-devtools-app/package.json +65 -0
- package/packages/apps/esm-devtools-app/setup-tests.ts +8 -0
- package/packages/apps/esm-devtools-app/src/declarations.d.ts +2 -0
- package/packages/apps/esm-devtools-app/src/devtools/devtools-popup.component.tsx +25 -0
- package/packages/apps/esm-devtools-app/src/devtools/devtools-popup.styles.scss +39 -0
- package/packages/apps/esm-devtools-app/src/devtools/devtools.component.tsx +37 -0
- package/packages/apps/esm-devtools-app/src/devtools/devtools.styles.scss +32 -0
- package/packages/apps/esm-devtools-app/src/devtools/devtools.test.tsx +84 -0
- package/packages/apps/esm-devtools-app/src/devtools/import-map-list/import-map.modal.tsx +131 -0
- package/packages/apps/esm-devtools-app/src/devtools/import-map-list/import-map.scss +5 -0
- package/packages/apps/esm-devtools-app/src/devtools/import-map-list/list.component.tsx +391 -0
- package/packages/apps/esm-devtools-app/src/devtools/import-map-list/list.scss +82 -0
- package/packages/apps/esm-devtools-app/src/devtools/import-map-list/types.ts +7 -0
- package/packages/apps/esm-devtools-app/src/devtools/import-map.component.tsx +32 -0
- package/packages/apps/esm-devtools-app/src/devtools/import-map.styles.css +4 -0
- package/packages/apps/esm-devtools-app/src/index.ts +15 -0
- package/packages/apps/esm-devtools-app/src/routes.json +17 -0
- package/packages/apps/esm-devtools-app/translations/en.json +19 -0
- package/packages/apps/esm-devtools-app/tsconfig.json +24 -0
- package/packages/apps/esm-devtools-app/vitest.config.ts +9 -0
- package/packages/apps/esm-devtools-app/webpack.config.js +1 -0
- package/packages/apps/esm-help-menu-app/package.json +65 -0
- package/packages/apps/esm-help-menu-app/setup-tests.ts +11 -0
- package/packages/apps/esm-help-menu-app/src/declarations.d.ts +1 -0
- package/packages/apps/esm-help-menu-app/src/help-menu/components/contact-us.component.tsx +22 -0
- package/packages/apps/esm-help-menu-app/src/help-menu/components/docs.component.tsx +22 -0
- package/packages/apps/esm-help-menu-app/src/help-menu/components/release-notes.component.tsx +23 -0
- package/packages/apps/esm-help-menu-app/src/help-menu/components/styles.scss +13 -0
- package/packages/apps/esm-help-menu-app/src/help-menu/help-popup.component.tsx +20 -0
- package/packages/apps/esm-help-menu-app/src/help-menu/help-popup.styles.scss +31 -0
- package/packages/apps/esm-help-menu-app/src/help-menu/help.component.tsx +63 -0
- package/packages/apps/esm-help-menu-app/src/help-menu/help.styles.scss +27 -0
- package/packages/apps/esm-help-menu-app/src/index.ts +17 -0
- package/packages/apps/esm-help-menu-app/src/root.component.tsx +8 -0
- package/packages/apps/esm-help-menu-app/src/routes.json +32 -0
- package/packages/apps/esm-help-menu-app/translations/en.json +6 -0
- package/packages/apps/esm-help-menu-app/tsconfig.json +24 -0
- package/packages/apps/esm-help-menu-app/vitest.config.ts +9 -0
- package/packages/apps/esm-help-menu-app/webpack.config.js +2 -0
- package/packages/apps/esm-implementer-tools-app/README.md +6 -0
- package/packages/apps/esm-implementer-tools-app/__mocks__/react-i18next.js +49 -0
- package/packages/apps/esm-implementer-tools-app/jest.config.js +22 -0
- package/packages/apps/esm-implementer-tools-app/package.json +65 -0
- package/packages/apps/esm-implementer-tools-app/setup-tests.ts +3 -0
- package/packages/apps/esm-implementer-tools-app/src/backend-dependencies/backend-dependencies.component.tsx +88 -0
- package/packages/apps/esm-implementer-tools-app/src/backend-dependencies/backend-dependencies.styles.scss +14 -0
- package/packages/apps/esm-implementer-tools-app/src/backend-dependencies/openmrs-backend-dependencies.test.ts +434 -0
- package/packages/apps/esm-implementer-tools-app/src/backend-dependencies/openmrs-backend-dependencies.ts +221 -0
- package/packages/apps/esm-implementer-tools-app/src/backend-dependencies/useBackendDependencies.ts +16 -0
- package/packages/apps/esm-implementer-tools-app/src/config-edit-button/config-edit-button.component.tsx +20 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/configuration.component.tsx +202 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/configuration.styles.scss +92 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/configuration.test.tsx +394 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/config-subtree.component.tsx +59 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/config-tree-for-module.component.tsx +19 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/config-tree.component.tsx +36 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/config-tree.styles.scss +15 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/description.component.tsx +38 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/description.styles.scss +29 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/display-value.scss +6 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/display-value.tsx +40 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/editable-value.component.tsx +151 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/editable-value.styles.scss +30 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/extension-configure-tree.tsx +23 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/extension-slots-config-tree.tsx +138 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/layout/layout.styles.scss +25 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/layout/subtree.component.tsx +45 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/layout/tree-container.component.tsx +15 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/validators.resource.ts +147 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editor.styles.scss +20 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editor.tsx +88 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/array-editor.styles.scss +25 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/array-editor.tsx +84 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/concept-search.resource.tsx +45 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/concept-search.styles.scss +42 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/concept-search.tsx +87 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/extension-slot-add.tsx +28 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/extension-slot-order.tsx +5 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/extension-slot-remove.tsx +18 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/object-editor.styles.scss +13 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/object-editor.tsx +59 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/patient-identifier-type-search.tsx +82 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/patient-identifier-type.resource.tsx +32 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/person-attribute-search.resource.tsx +13 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/person-attribute-search.tsx +96 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/uuid-search.scss +40 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/value-editors/value-editor-field.tsx +92 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/json-editor/json-editor.component.tsx +80 -0
- package/packages/apps/esm-implementer-tools-app/src/configuration/json-editor/json-editor.scss +27 -0
- package/packages/apps/esm-implementer-tools-app/src/declarations.d.ts +1 -0
- package/packages/apps/esm-implementer-tools-app/src/feature-flags/feature-flags.component.tsx +99 -0
- package/packages/apps/esm-implementer-tools-app/src/feature-flags/feature-flags.scss +18 -0
- package/packages/apps/esm-implementer-tools-app/src/frontend-modules/frontend-modules.component.tsx +82 -0
- package/packages/apps/esm-implementer-tools-app/src/frontend-modules/frontend-modules.scss +18 -0
- package/packages/apps/esm-implementer-tools-app/src/global-implementer-tools-button.test.tsx +12 -0
- package/packages/apps/esm-implementer-tools-app/src/global-implementer-tools.component.tsx +27 -0
- package/packages/apps/esm-implementer-tools-app/src/hooks.ts +13 -0
- package/packages/apps/esm-implementer-tools-app/src/implementer-tools.button.tsx +26 -0
- package/packages/apps/esm-implementer-tools-app/src/implementer-tools.component.tsx +64 -0
- package/packages/apps/esm-implementer-tools-app/src/implementer-tools.styles.scss +43 -0
- package/packages/apps/esm-implementer-tools-app/src/implementer-tools.test.tsx +9 -0
- package/packages/apps/esm-implementer-tools-app/src/index.ts +20 -0
- package/packages/apps/esm-implementer-tools-app/src/popup/popup.component.tsx +89 -0
- package/packages/apps/esm-implementer-tools-app/src/popup/popup.styles.scss +78 -0
- package/packages/apps/esm-implementer-tools-app/src/routes.json +21 -0
- package/packages/apps/esm-implementer-tools-app/src/store.ts +110 -0
- package/packages/apps/esm-implementer-tools-app/src/types.ts +5 -0
- package/packages/apps/esm-implementer-tools-app/src/ui-editor/extension-overlay.component.tsx +40 -0
- package/packages/apps/esm-implementer-tools-app/src/ui-editor/portal.tsx +5 -0
- package/packages/apps/esm-implementer-tools-app/src/ui-editor/styles.scss +87 -0
- package/packages/apps/esm-implementer-tools-app/src/ui-editor/ui-editor.tsx +201 -0
- package/packages/apps/esm-implementer-tools-app/translations/am.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/ar.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/ar_SY.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/bn.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/cs.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/de.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/en.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/en_US.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/es.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/es_MX.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/fr.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/he.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/hi.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/hi_IN.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/id.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/it.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/ka.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/km.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/ku.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/ky.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/lg.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/ne.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/pl.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/pt.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/pt_BR.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/qu.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/ro_RO.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/ru_RU.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/si.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/sq.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/sw.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/sw_KE.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/tr.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/tr_TR.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/uk.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/uz.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/uz@Latn.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/uz_UZ.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/vi.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/zh.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/zh_CN.json +46 -0
- package/packages/apps/esm-implementer-tools-app/translations/zh_TW.json +46 -0
- package/packages/apps/esm-implementer-tools-app/tsconfig.json +27 -0
- package/packages/apps/esm-implementer-tools-app/webpack.config.js +1 -0
- package/packages/apps/esm-login-app/README.md +4 -0
- package/packages/apps/esm-login-app/__mocks__/config.mock.ts +26 -0
- package/packages/apps/esm-login-app/__mocks__/locations.mock.ts +540 -0
- package/packages/apps/esm-login-app/__mocks__/react-i18next.js +49 -0
- package/packages/apps/esm-login-app/assets/medicine.jpg +0 -0
- package/packages/apps/esm-login-app/jest.config.js +20 -0
- package/packages/apps/esm-login-app/package.json +72 -0
- package/packages/apps/esm-login-app/rspack.config.js +1 -0
- package/packages/apps/esm-login-app/src/change-location-link/change-location-link.extension.tsx +32 -0
- package/packages/apps/esm-login-app/src/change-location-link/change-location-link.scss +17 -0
- package/packages/apps/esm-login-app/src/change-location-link/change-location-link.test.tsx +36 -0
- package/packages/apps/esm-login-app/src/change-password/change-password-link.extension.tsx +30 -0
- package/packages/apps/esm-login-app/src/change-password/change-password-link.test.tsx +27 -0
- package/packages/apps/esm-login-app/src/change-password/change-password-modal.scss +11 -0
- package/packages/apps/esm-login-app/src/change-password/change-password.component.tsx +159 -0
- package/packages/apps/esm-login-app/src/change-password/change-password.modal.tsx +175 -0
- package/packages/apps/esm-login-app/src/change-password/change-password.resource.ts +12 -0
- package/packages/apps/esm-login-app/src/change-password/change-password.scss +51 -0
- package/packages/apps/esm-login-app/src/change-password/change-password.test.tsx +53 -0
- package/packages/apps/esm-login-app/src/common/otp/otp.component.tsx +54 -0
- package/packages/apps/esm-login-app/src/common/otp/otp.scss +13 -0
- package/packages/apps/esm-login-app/src/common/resend-timer/resend-timer.component.tsx +51 -0
- package/packages/apps/esm-login-app/src/common/resend-timer/resend-timer.scss +7 -0
- package/packages/apps/esm-login-app/src/config-schema.ts +130 -0
- package/packages/apps/esm-login-app/src/declarations.d.ts +3 -0
- package/packages/apps/esm-login-app/src/footer.component.tsx +60 -0
- package/packages/apps/esm-login-app/src/footer.scss +113 -0
- package/packages/apps/esm-login-app/src/index.ts +27 -0
- package/packages/apps/esm-login-app/src/loading/loading.component.tsx +11 -0
- package/packages/apps/esm-login-app/src/loading/loading.scss +7 -0
- package/packages/apps/esm-login-app/src/location-picker/location-picker-view.component.tsx +174 -0
- package/packages/apps/esm-login-app/src/location-picker/location-picker.resource.ts +111 -0
- package/packages/apps/esm-login-app/src/location-picker/location-picker.scss +94 -0
- package/packages/apps/esm-login-app/src/location-picker/location-picker.test.tsx +341 -0
- package/packages/apps/esm-login-app/src/login/login.component.tsx +273 -0
- package/packages/apps/esm-login-app/src/login/login.scss +167 -0
- package/packages/apps/esm-login-app/src/login/login.test.tsx +288 -0
- package/packages/apps/esm-login-app/src/login.resource.ts +147 -0
- package/packages/apps/esm-login-app/src/logo.component.tsx +23 -0
- package/packages/apps/esm-login-app/src/logout/logout.extension.tsx +23 -0
- package/packages/apps/esm-login-app/src/logout/logout.scss +12 -0
- package/packages/apps/esm-login-app/src/otp/otp.component.tsx +102 -0
- package/packages/apps/esm-login-app/src/otp/otp.scss +46 -0
- package/packages/apps/esm-login-app/src/redirect-logout/logout.resource.ts +15 -0
- package/packages/apps/esm-login-app/src/redirect-logout/redirect-logout.component.tsx +42 -0
- package/packages/apps/esm-login-app/src/redirect-logout/redirect-logout.test.tsx +180 -0
- package/packages/apps/esm-login-app/src/resources/otp.resource.ts +40 -0
- package/packages/apps/esm-login-app/src/root.component.tsx +24 -0
- package/packages/apps/esm-login-app/src/routes.json +63 -0
- package/packages/apps/esm-login-app/src/setupTests.ts +15 -0
- package/packages/apps/esm-login-app/src/test-helpers/render-with-router.tsx +17 -0
- package/packages/apps/esm-login-app/src/types.ts +34 -0
- package/packages/apps/esm-login-app/translations/am.json +41 -0
- package/packages/apps/esm-login-app/translations/ar.json +41 -0
- package/packages/apps/esm-login-app/translations/ar_SY.json +41 -0
- package/packages/apps/esm-login-app/translations/bn.json +41 -0
- package/packages/apps/esm-login-app/translations/cs.json +41 -0
- package/packages/apps/esm-login-app/translations/de.json +41 -0
- package/packages/apps/esm-login-app/translations/en.json +41 -0
- package/packages/apps/esm-login-app/translations/en_US.json +41 -0
- package/packages/apps/esm-login-app/translations/es.json +41 -0
- package/packages/apps/esm-login-app/translations/es_MX.json +41 -0
- package/packages/apps/esm-login-app/translations/fr.json +41 -0
- package/packages/apps/esm-login-app/translations/he.json +41 -0
- package/packages/apps/esm-login-app/translations/hi.json +41 -0
- package/packages/apps/esm-login-app/translations/hi_IN.json +41 -0
- package/packages/apps/esm-login-app/translations/id.json +41 -0
- package/packages/apps/esm-login-app/translations/it.json +41 -0
- package/packages/apps/esm-login-app/translations/ka.json +41 -0
- package/packages/apps/esm-login-app/translations/km.json +41 -0
- package/packages/apps/esm-login-app/translations/ku.json +41 -0
- package/packages/apps/esm-login-app/translations/ky.json +41 -0
- package/packages/apps/esm-login-app/translations/lg.json +41 -0
- package/packages/apps/esm-login-app/translations/ne.json +41 -0
- package/packages/apps/esm-login-app/translations/pl.json +41 -0
- package/packages/apps/esm-login-app/translations/pt.json +41 -0
- package/packages/apps/esm-login-app/translations/pt_BR.json +41 -0
- package/packages/apps/esm-login-app/translations/qu.json +41 -0
- package/packages/apps/esm-login-app/translations/ro_RO.json +41 -0
- package/packages/apps/esm-login-app/translations/ru_RU.json +41 -0
- package/packages/apps/esm-login-app/translations/si.json +41 -0
- package/packages/apps/esm-login-app/translations/sq.json +41 -0
- package/packages/apps/esm-login-app/translations/sw.json +41 -0
- package/packages/apps/esm-login-app/translations/sw_KE.json +41 -0
- package/packages/apps/esm-login-app/translations/tr.json +41 -0
- package/packages/apps/esm-login-app/translations/tr_TR.json +41 -0
- package/packages/apps/esm-login-app/translations/uk.json +41 -0
- package/packages/apps/esm-login-app/translations/uz.json +41 -0
- package/packages/apps/esm-login-app/translations/uz@Latn.json +41 -0
- package/packages/apps/esm-login-app/translations/uz_UZ.json +41 -0
- package/packages/apps/esm-login-app/translations/vi.json +41 -0
- package/packages/apps/esm-login-app/translations/zh.json +41 -0
- package/packages/apps/esm-login-app/translations/zh_CN.json +41 -0
- package/packages/apps/esm-login-app/translations/zh_TW.json +41 -0
- package/packages/apps/esm-login-app/tsconfig.json +25 -0
- package/packages/apps/esm-offline-tools-app/README.md +3 -0
- package/packages/apps/esm-offline-tools-app/jest.config.js +16 -0
- package/packages/apps/esm-offline-tools-app/package.json +67 -0
- package/packages/apps/esm-offline-tools-app/src/assets/success-notification.svg +8 -0
- package/packages/apps/esm-offline-tools-app/src/components/confirmation.modal.tsx +54 -0
- package/packages/apps/esm-offline-tools-app/src/components/headered-quick-info.component.tsx +20 -0
- package/packages/apps/esm-offline-tools-app/src/components/headered-quick-info.styles.scss +11 -0
- package/packages/apps/esm-offline-tools-app/src/components/overview-card.component.tsx +38 -0
- package/packages/apps/esm-offline-tools-app/src/components/overview-card.styles.scss +33 -0
- package/packages/apps/esm-offline-tools-app/src/components/shared-page-layout.component.tsx +23 -0
- package/packages/apps/esm-offline-tools-app/src/components/shared-page-layout.styles.scss +22 -0
- package/packages/apps/esm-offline-tools-app/src/constants.ts +14 -0
- package/packages/apps/esm-offline-tools-app/src/createDashboardLink.tsx +55 -0
- package/packages/apps/esm-offline-tools-app/src/dashboard.meta.ts +6 -0
- package/packages/apps/esm-offline-tools-app/src/declarations.d.ts +2 -0
- package/packages/apps/esm-offline-tools-app/src/home/cards-container.component.tsx +14 -0
- package/packages/apps/esm-offline-tools-app/src/home/cards-container.styles.scss +14 -0
- package/packages/apps/esm-offline-tools-app/src/home/home.component.tsx +30 -0
- package/packages/apps/esm-offline-tools-app/src/home/home.styles.scss +7 -0
- package/packages/apps/esm-offline-tools-app/src/hooks/offline-actions.ts +16 -0
- package/packages/apps/esm-offline-tools-app/src/hooks/offline-patient-data-hooks.ts +106 -0
- package/packages/apps/esm-offline-tools-app/src/index.ts +113 -0
- package/packages/apps/esm-offline-tools-app/src/nav/desktop-side-nav.component.tsx +23 -0
- package/packages/apps/esm-offline-tools-app/src/nav/desktop-side-nav.styles.scss +38 -0
- package/packages/apps/esm-offline-tools-app/src/nav/offline-tools-nav-link.component.tsx +24 -0
- package/packages/apps/esm-offline-tools-app/src/nav/offline-tools-nav-menu.component.tsx +16 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/no-actions-empty-state.component.tsx +31 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/no-actions-empty-state.styles.scss +30 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions-mode-button.extension.tsx +36 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions-mode-button.scss +27 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions-overview-card.component.tsx +31 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions-page.component.tsx +53 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions-page.styles.scss +14 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions-patient-chart-widget.component.tsx +36 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions-patient-chart-widget.styles.scss +46 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions-table.component.tsx +255 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions-table.styles.scss +39 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/offline-actions.component.tsx +75 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/synchronizing-notification.styles.scss +9 -0
- package/packages/apps/esm-offline-tools-app/src/offline-actions/synchronizing-notification.tsx +85 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/empty-data-illustration.component.tsx +39 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/empty-state.component.tsx +33 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/empty-state.scss +56 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/last-updated-table-cell.component.tsx +90 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/last-updated-table-cell.scss +16 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/offline-patient-sync-details.component.tsx +71 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/offline-patient-sync-details.styles.scss +57 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/offline-patient-table.component.tsx +315 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/offline-patient-table.scss +63 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/offline-patients.component.tsx +35 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/offline-patients.styles.scss +6 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/overview-offline-patient-table.component.tsx +8 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/patient-name-table-cell.component.tsx +32 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/patient-name-table-cell.scss +8 -0
- package/packages/apps/esm-offline-tools-app/src/offline-patients/patients-overview-card.component.tsx +28 -0
- package/packages/apps/esm-offline-tools-app/src/offline-tools-app-menu-link.component.tsx +12 -0
- package/packages/apps/esm-offline-tools-app/src/offline-tools-page/offline-tools-page.component.tsx +31 -0
- package/packages/apps/esm-offline-tools-app/src/offline.ts +32 -0
- package/packages/apps/esm-offline-tools-app/src/root.component.tsx +25 -0
- package/packages/apps/esm-offline-tools-app/src/root.styles.scss +5 -0
- package/packages/apps/esm-offline-tools-app/src/routes.json +144 -0
- package/packages/apps/esm-offline-tools-app/src/setup-tests.js +5 -0
- package/packages/apps/esm-offline-tools-app/src/types/index.ts +4 -0
- package/packages/apps/esm-offline-tools-app/translations/am.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/ar.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/ar_SY.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/bn.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/cs.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/de.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/en.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/en_US.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/es.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/es_MX.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/fr.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/he.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/hi.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/hi_IN.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/id.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/it.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/ka.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/km.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/ku.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/ky.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/lg.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/ne.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/pl.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/pt.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/pt_BR.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/qu.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/ro_RO.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/ru_RU.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/si.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/sq.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/sw.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/sw_KE.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/tr.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/tr_TR.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/uk.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/uz.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/uz@Latn.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/uz_UZ.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/vi.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/zh.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/zh_CN.json +57 -0
- package/packages/apps/esm-offline-tools-app/translations/zh_TW.json +57 -0
- package/packages/apps/esm-offline-tools-app/tsconfig.json +25 -0
- package/packages/apps/esm-offline-tools-app/webpack.config.js +1 -0
- package/packages/apps/esm-primary-navigation-app/README.md +3 -0
- package/packages/apps/esm-primary-navigation-app/__mocks__/mock-session.ts +23 -0
- package/packages/apps/esm-primary-navigation-app/__mocks__/mock-user.ts +23 -0
- package/packages/apps/esm-primary-navigation-app/__mocks__/openmrs-esm-framework.mock.tsx +30 -0
- package/packages/apps/esm-primary-navigation-app/__mocks__/react-i18next.mock.js +49 -0
- package/packages/apps/esm-primary-navigation-app/jest.config.js +18 -0
- package/packages/apps/esm-primary-navigation-app/package.json +66 -0
- package/packages/apps/esm-primary-navigation-app/src/components/change-language/change-language-link.extension.tsx +37 -0
- package/packages/apps/esm-primary-navigation-app/src/components/change-language/change-language-link.scss +14 -0
- package/packages/apps/esm-primary-navigation-app/src/components/change-language/change-language.modal.tsx +115 -0
- package/packages/apps/esm-primary-navigation-app/src/components/change-language/change-language.resource.ts +35 -0
- package/packages/apps/esm-primary-navigation-app/src/components/change-language/change-language.scss +43 -0
- package/packages/apps/esm-primary-navigation-app/src/components/change-language/change-language.test.tsx +107 -0
- package/packages/apps/esm-primary-navigation-app/src/components/dashboard/dashboard.component.tsx +96 -0
- package/packages/apps/esm-primary-navigation-app/src/components/generic-link/generic-link.component.tsx +25 -0
- package/packages/apps/esm-primary-navigation-app/src/components/logo/logo.component.tsx +28 -0
- package/packages/apps/esm-primary-navigation-app/src/components/logo/logo.scss +11 -0
- package/packages/apps/esm-primary-navigation-app/src/components/logo/logo.test.tsx +79 -0
- package/packages/apps/esm-primary-navigation-app/src/components/nav-group/nav-group.component.tsx +52 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar/app-menu-button.component.tsx +43 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar/navbar.component.tsx +123 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar/navbar.scss +51 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar/types.ts +5 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar/user-menu-button.component.tsx +44 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/app-menu-panel.component.tsx +48 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/app-menu-panel.scss +43 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/notifications-menu-panel.component.tsx +23 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/notifications-menu-panel.test.tsx +9 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/notifications-menu.panel.scss +9 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/side-menu-panel.component.tsx +37 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/user-menu-panel.component.tsx +32 -0
- package/packages/apps/esm-primary-navigation-app/src/components/navbar-header-panels/user-menu-panel.scss +65 -0
- package/packages/apps/esm-primary-navigation-app/src/components/user-panel-switcher-item/user-panel-switcher.component.tsx +15 -0
- package/packages/apps/esm-primary-navigation-app/src/components/user-panel-switcher-item/user-panel-switcher.test.tsx +22 -0
- package/packages/apps/esm-primary-navigation-app/src/config-schema.ts +56 -0
- package/packages/apps/esm-primary-navigation-app/src/constants.ts +2 -0
- package/packages/apps/esm-primary-navigation-app/src/declarations.d.ts +1 -0
- package/packages/apps/esm-primary-navigation-app/src/index.ts +68 -0
- package/packages/apps/esm-primary-navigation-app/src/root.component.test.tsx +57 -0
- package/packages/apps/esm-primary-navigation-app/src/root.component.tsx +25 -0
- package/packages/apps/esm-primary-navigation-app/src/root.resource.tsx +13 -0
- package/packages/apps/esm-primary-navigation-app/src/root.scss +5 -0
- package/packages/apps/esm-primary-navigation-app/src/routes.json +78 -0
- package/packages/apps/esm-primary-navigation-app/src/setupTests.ts +7 -0
- package/packages/apps/esm-primary-navigation-app/src/utils.ts +3 -0
- package/packages/apps/esm-primary-navigation-app/translations/am.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/ar.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/ar_SY.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/bn.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/cs.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/de.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/en.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/en_US.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/es.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/es_MX.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/fr.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/he.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/hi.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/hi_IN.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/id.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/it.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/ka.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/km.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/ku.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/ky.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/lg.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/ne.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/pl.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/pt.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/pt_BR.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/qu.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/ro_RO.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/ru_RU.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/si.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/sq.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/sw.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/sw_KE.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/tr.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/tr_TR.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/uk.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/uz.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/uz@Latn.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/uz_UZ.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/vi.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/zh.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/zh_CN.json +14 -0
- package/packages/apps/esm-primary-navigation-app/translations/zh_TW.json +14 -0
- package/packages/apps/esm-primary-navigation-app/tsconfig.json +24 -0
- package/packages/apps/esm-primary-navigation-app/webpack.config.js +1 -0
- package/packages/framework/esm-api/.swcrc +16 -0
- package/packages/framework/esm-api/README.md +6 -0
- package/packages/framework/esm-api/__mocks__/openmrs-esm-config.mock.ts +3 -0
- package/packages/framework/esm-api/__mocks__/openmrs-esm-error-handling.mock.ts +2 -0
- package/packages/framework/esm-api/__mocks__/openmrs-esm-navigation.mock.ts +5 -0
- package/packages/framework/esm-api/__mocks__/single-spa.mock.ts +1 -0
- package/packages/framework/esm-api/mock-jest.ts +22 -0
- package/packages/framework/esm-api/mock.ts +23 -0
- package/packages/framework/esm-api/package.json +79 -0
- package/packages/framework/esm-api/setup-tests.ts +3 -0
- package/packages/framework/esm-api/src/config-schema.ts +50 -0
- package/packages/framework/esm-api/src/current-user.test.ts +747 -0
- package/packages/framework/esm-api/src/current-user.ts +288 -0
- package/packages/framework/esm-api/src/environment.ts +5 -0
- package/packages/framework/esm-api/src/index.ts +6 -0
- package/packages/framework/esm-api/src/openmrs-backend-dependencies.ts +4 -0
- package/packages/framework/esm-api/src/openmrs-fetch.test.ts +293 -0
- package/packages/framework/esm-api/src/openmrs-fetch.ts +339 -0
- package/packages/framework/esm-api/src/public.ts +19 -0
- package/packages/framework/esm-api/src/setup.ts +12 -0
- package/packages/framework/esm-api/src/types/concept-resource.ts +38 -0
- package/packages/framework/esm-api/src/types/fetch.ts +9 -0
- package/packages/framework/esm-api/src/types/index.ts +5 -0
- package/packages/framework/esm-api/src/types/openmrs-resource.ts +39 -0
- package/packages/framework/esm-api/src/types/person-resource.ts +69 -0
- package/packages/framework/esm-api/src/types/user-resource.ts +72 -0
- package/packages/framework/esm-api/tsconfig.build.json +9 -0
- package/packages/framework/esm-api/tsconfig.json +8 -0
- package/packages/framework/esm-api/vitest.config.ts +9 -0
- package/packages/framework/esm-config/.swcrc +16 -0
- package/packages/framework/esm-config/README.md +16 -0
- package/packages/framework/esm-config/__mocks__/openmrs-esm-context.mock.tsx +3 -0
- package/packages/framework/esm-config/__mocks__/openmrs-esm-globals.mock.tsx +1 -0
- package/packages/framework/esm-config/mock-jest.ts +37 -0
- package/packages/framework/esm-config/mock.ts +35 -0
- package/packages/framework/esm-config/package.json +79 -0
- package/packages/framework/esm-config/src/index.ts +5 -0
- package/packages/framework/esm-config/src/module-config/module-config.test.ts +1449 -0
- package/packages/framework/esm-config/src/module-config/module-config.ts +941 -0
- package/packages/framework/esm-config/src/module-config/state.ts +258 -0
- package/packages/framework/esm-config/src/public.ts +5 -0
- package/packages/framework/esm-config/src/setup-tests.js +14 -0
- package/packages/framework/esm-config/src/types.ts +69 -0
- package/packages/framework/esm-config/src/validators/type-validators.test.ts +111 -0
- package/packages/framework/esm-config/src/validators/type-validators.ts +19 -0
- package/packages/framework/esm-config/src/validators/validator.ts +38 -0
- package/packages/framework/esm-config/src/validators/validators.test.ts +35 -0
- package/packages/framework/esm-config/src/validators/validators.ts +70 -0
- package/packages/framework/esm-config/tsconfig.build.json +9 -0
- package/packages/framework/esm-config/tsconfig.json +5 -0
- package/packages/framework/esm-config/vitest.config.ts +8 -0
- package/packages/framework/esm-context/.swcrc +16 -0
- package/packages/framework/esm-context/README.md +3 -0
- package/packages/framework/esm-context/mock.ts +24 -0
- package/packages/framework/esm-context/package.json +63 -0
- package/packages/framework/esm-context/src/context.ts +129 -0
- package/packages/framework/esm-context/src/index.ts +1 -0
- package/packages/framework/esm-context/src/public.ts +1 -0
- package/packages/framework/esm-context/tsconfig.build.json +9 -0
- package/packages/framework/esm-context/tsconfig.json +5 -0
- package/packages/framework/esm-dynamic-loading/.swcrc +16 -0
- package/packages/framework/esm-dynamic-loading/README.md +4 -0
- package/packages/framework/esm-dynamic-loading/package.json +66 -0
- package/packages/framework/esm-dynamic-loading/src/dynamic-loading.ts +296 -0
- package/packages/framework/esm-dynamic-loading/src/index.ts +1 -0
- package/packages/framework/esm-dynamic-loading/src/public.ts +1 -0
- package/packages/framework/esm-dynamic-loading/tsconfig.build.json +9 -0
- package/packages/framework/esm-dynamic-loading/tsconfig.json +5 -0
- package/packages/framework/esm-emr-api/.swcrc +16 -0
- package/packages/framework/esm-emr-api/README.md +7 -0
- package/packages/framework/esm-emr-api/mock-jest.ts +10 -0
- package/packages/framework/esm-emr-api/mock.ts +12 -0
- package/packages/framework/esm-emr-api/package.json +78 -0
- package/packages/framework/esm-emr-api/src/attachments.ts +43 -0
- package/packages/framework/esm-emr-api/src/current-patient.test.ts +53 -0
- package/packages/framework/esm-emr-api/src/current-patient.ts +58 -0
- package/packages/framework/esm-emr-api/src/events/events.test.ts +136 -0
- package/packages/framework/esm-emr-api/src/events/index.ts +45 -0
- package/packages/framework/esm-emr-api/src/events/types.ts +55 -0
- package/packages/framework/esm-emr-api/src/index.ts +7 -0
- package/packages/framework/esm-emr-api/src/location.ts +36 -0
- package/packages/framework/esm-emr-api/src/public.ts +7 -0
- package/packages/framework/esm-emr-api/src/types/attachments-types.ts +28 -0
- package/packages/framework/esm-emr-api/src/types/diagnosis-resource.ts +24 -0
- package/packages/framework/esm-emr-api/src/types/drug-resource.ts +9 -0
- package/packages/framework/esm-emr-api/src/types/encounter-resource.ts +36 -0
- package/packages/framework/esm-emr-api/src/types/fhir-resource.ts +32 -0
- package/packages/framework/esm-emr-api/src/types/fhir.ts +102 -0
- package/packages/framework/esm-emr-api/src/types/index.ts +11 -0
- package/packages/framework/esm-emr-api/src/types/location-resource.ts +49 -0
- package/packages/framework/esm-emr-api/src/types/obs-resource.ts +23 -0
- package/packages/framework/esm-emr-api/src/types/order-resource.ts +79 -0
- package/packages/framework/esm-emr-api/src/types/patient-resource.ts +27 -0
- package/packages/framework/esm-emr-api/src/types/visit-resource.ts +43 -0
- package/packages/framework/esm-emr-api/src/visit-type.ts +24 -0
- package/packages/framework/esm-emr-api/src/visit-utils.ts +127 -0
- package/packages/framework/esm-emr-api/tsconfig.build.json +9 -0
- package/packages/framework/esm-emr-api/tsconfig.json +5 -0
- package/packages/framework/esm-emr-api/vitest.config.ts +8 -0
- package/packages/framework/esm-error-handling/.swcrc +16 -0
- package/packages/framework/esm-error-handling/README.md +4 -0
- package/packages/framework/esm-error-handling/__mocks__/openmrs-esm-globals.mock.tsx +1 -0
- package/packages/framework/esm-error-handling/package.json +60 -0
- package/packages/framework/esm-error-handling/src/index.ts +58 -0
- package/packages/framework/esm-error-handling/src/openmrs-esm-error-handling.test.ts +28 -0
- package/packages/framework/esm-error-handling/tsconfig.build.json +9 -0
- package/packages/framework/esm-error-handling/tsconfig.json +5 -0
- package/packages/framework/esm-error-handling/vitest.config.ts +8 -0
- package/packages/framework/esm-expression-evaluator/.swcrc +16 -0
- package/packages/framework/esm-expression-evaluator/README.md +3 -0
- package/packages/framework/esm-expression-evaluator/package.json +72 -0
- package/packages/framework/esm-expression-evaluator/src/evaluator.test.ts +226 -0
- package/packages/framework/esm-expression-evaluator/src/evaluator.ts +750 -0
- package/packages/framework/esm-expression-evaluator/src/extractor.test.ts +69 -0
- package/packages/framework/esm-expression-evaluator/src/extractor.ts +194 -0
- package/packages/framework/esm-expression-evaluator/src/globals.ts +34 -0
- package/packages/framework/esm-expression-evaluator/src/index.ts +2 -0
- package/packages/framework/esm-expression-evaluator/src/public.ts +14 -0
- package/packages/framework/esm-expression-evaluator/tsconfig.build.json +9 -0
- package/packages/framework/esm-expression-evaluator/tsconfig.json +5 -0
- package/packages/framework/esm-expression-evaluator/vitest.config.ts +7 -0
- package/packages/framework/esm-extensions/.swcrc +16 -0
- package/packages/framework/esm-extensions/README.md +4 -0
- package/packages/framework/esm-extensions/__mocks__/openmrs-esm-config.mock.tsx +1 -0
- package/packages/framework/esm-extensions/mock-jest.ts +31 -0
- package/packages/framework/esm-extensions/mock.ts +33 -0
- package/packages/framework/esm-extensions/package.json +84 -0
- package/packages/framework/esm-extensions/src/extensions.test.ts +483 -0
- package/packages/framework/esm-extensions/src/extensions.ts +551 -0
- package/packages/framework/esm-extensions/src/helpers.ts +9 -0
- package/packages/framework/esm-extensions/src/index.ts +9 -0
- package/packages/framework/esm-extensions/src/left-nav.ts +53 -0
- package/packages/framework/esm-extensions/src/modals.ts +48 -0
- package/packages/framework/esm-extensions/src/public.ts +22 -0
- package/packages/framework/esm-extensions/src/render.ts +82 -0
- package/packages/framework/esm-extensions/src/store.ts +164 -0
- package/packages/framework/esm-extensions/src/types.ts +11 -0
- package/packages/framework/esm-extensions/src/workspaces.ts +177 -0
- package/packages/framework/esm-extensions/src/workspaces2.ts +157 -0
- package/packages/framework/esm-extensions/tsconfig.build.json +9 -0
- package/packages/framework/esm-extensions/tsconfig.json +5 -0
- package/packages/framework/esm-extensions/vitest.config.ts +8 -0
- package/packages/framework/esm-feature-flags/.swcrc +16 -0
- package/packages/framework/esm-feature-flags/README.md +16 -0
- package/packages/framework/esm-feature-flags/package.json +61 -0
- package/packages/framework/esm-feature-flags/src/feature-flags.ts +109 -0
- package/packages/framework/esm-feature-flags/src/index.ts +1 -0
- package/packages/framework/esm-feature-flags/src/public.ts +1 -0
- package/packages/framework/esm-feature-flags/tsconfig.build.json +9 -0
- package/packages/framework/esm-feature-flags/tsconfig.json +5 -0
- package/packages/framework/esm-framework/README.md +5 -0
- package/packages/framework/esm-framework/__mocks__/fileMock.js +1 -0
- package/packages/framework/esm-framework/docs/API.md +290 -0
- package/packages/framework/esm-framework/docs/classes/OpenmrsFetchError.md +191 -0
- package/packages/framework/esm-framework/docs/enumerations/Type.md +77 -0
- package/packages/framework/esm-framework/docs/enumerations/VisitMode.md +29 -0
- package/packages/framework/esm-framework/docs/enumerations/VisitStatus.md +21 -0
- package/packages/framework/esm-framework/docs/functions/CardHeader.md +19 -0
- package/packages/framework/esm-framework/docs/functions/ConfigurableLink.md +19 -0
- package/packages/framework/esm-framework/docs/functions/CustomOverflowMenu.md +17 -0
- package/packages/framework/esm-framework/docs/functions/DashboardExtension.md +17 -0
- package/packages/framework/esm-framework/docs/functions/EmptyCardIllustration.md +23 -0
- package/packages/framework/esm-framework/docs/functions/ExtensionSlot.md +46 -0
- package/packages/framework/esm-framework/docs/functions/OpenmrsAppContext.md +36 -0
- package/packages/framework/esm-framework/docs/functions/PatientBannerActionsMenu.md +17 -0
- package/packages/framework/esm-framework/docs/functions/PatientBannerContactDetails.md +17 -0
- package/packages/framework/esm-framework/docs/functions/PatientBannerPatientIdentifiers.md +17 -0
- package/packages/framework/esm-framework/docs/functions/PatientBannerPatientInfo.md +17 -0
- package/packages/framework/esm-framework/docs/functions/PatientBannerToggleContactDetailsButton.md +17 -0
- package/packages/framework/esm-framework/docs/functions/PatientPhoto.md +19 -0
- package/packages/framework/esm-framework/docs/functions/WorkspaceContainer.md +55 -0
- package/packages/framework/esm-framework/docs/functions/age.md +32 -0
- package/packages/framework/esm-framework/docs/functions/attach.md +40 -0
- package/packages/framework/esm-framework/docs/functions/beginEditSynchronizationItem.md +22 -0
- package/packages/framework/esm-framework/docs/functions/canAccessStorage.md +25 -0
- package/packages/framework/esm-framework/docs/functions/canBeginEditSynchronizationItemsOfType.md +22 -0
- package/packages/framework/esm-framework/docs/functions/clearCurrentUser.md +11 -0
- package/packages/framework/esm-framework/docs/functions/closeWorkspace.md +27 -0
- package/packages/framework/esm-framework/docs/functions/closeWorkspaceGroup2.md +29 -0
- package/packages/framework/esm-framework/docs/functions/compile.md +30 -0
- package/packages/framework/esm-framework/docs/functions/convertToLocaleCalendar.md +25 -0
- package/packages/framework/esm-framework/docs/functions/createAttachment.md +21 -0
- package/packages/framework/esm-framework/docs/functions/createDashboard.md +29 -0
- package/packages/framework/esm-framework/docs/functions/createErrorHandler.md +21 -0
- package/packages/framework/esm-framework/docs/functions/createGlobalStore.md +36 -0
- package/packages/framework/esm-framework/docs/functions/createUseStore.md +66 -0
- package/packages/framework/esm-framework/docs/functions/defineConfigSchema.md +33 -0
- package/packages/framework/esm-framework/docs/functions/defineExtensionConfigSchema.md +38 -0
- package/packages/framework/esm-framework/docs/functions/deleteAttachmentPermanently.md +21 -0
- package/packages/framework/esm-framework/docs/functions/deleteSynchronizationItem.md +21 -0
- package/packages/framework/esm-framework/docs/functions/detach.md +25 -0
- package/packages/framework/esm-framework/docs/functions/detachAll.md +21 -0
- package/packages/framework/esm-framework/docs/functions/dispatchNotificationShown.md +17 -0
- package/packages/framework/esm-framework/docs/functions/dispatchPrecacheStaticDependencies.md +17 -0
- package/packages/framework/esm-framework/docs/functions/displayName.md +21 -0
- package/packages/framework/esm-framework/docs/functions/evaluate.md +84 -0
- package/packages/framework/esm-framework/docs/functions/evaluateAsBoolean.md +31 -0
- package/packages/framework/esm-framework/docs/functions/evaluateAsBooleanAsync.md +31 -0
- package/packages/framework/esm-framework/docs/functions/evaluateAsNumber.md +31 -0
- package/packages/framework/esm-framework/docs/functions/evaluateAsNumberAsync.md +31 -0
- package/packages/framework/esm-framework/docs/functions/evaluateAsType.md +46 -0
- package/packages/framework/esm-framework/docs/functions/evaluateAsTypeAsync.md +46 -0
- package/packages/framework/esm-framework/docs/functions/evaluateAsync.md +87 -0
- package/packages/framework/esm-framework/docs/functions/extractVariableNames.md +50 -0
- package/packages/framework/esm-framework/docs/functions/fetchCurrentPatient.md +25 -0
- package/packages/framework/esm-framework/docs/functions/filterBreadcrumbs.md +21 -0
- package/packages/framework/esm-framework/docs/functions/formatDate.md +39 -0
- package/packages/framework/esm-framework/docs/functions/formatDatetime.md +29 -0
- package/packages/framework/esm-framework/docs/functions/formatDuration.md +29 -0
- package/packages/framework/esm-framework/docs/functions/formatPartialDate.md +39 -0
- package/packages/framework/esm-framework/docs/functions/formatPatientName.md +23 -0
- package/packages/framework/esm-framework/docs/functions/formatTime.md +20 -0
- package/packages/framework/esm-framework/docs/functions/formattedName.md +21 -0
- package/packages/framework/esm-framework/docs/functions/generateOfflineUuid.md +13 -0
- package/packages/framework/esm-framework/docs/functions/getAssignedExtensions.md +23 -0
- package/packages/framework/esm-framework/docs/functions/getAsyncLifecycle.md +31 -0
- package/packages/framework/esm-framework/docs/functions/getAttachmentByUuid.md +21 -0
- package/packages/framework/esm-framework/docs/functions/getAttachments.md +25 -0
- package/packages/framework/esm-framework/docs/functions/getBreadcrumbs.md +11 -0
- package/packages/framework/esm-framework/docs/functions/getBreadcrumbsFor.md +17 -0
- package/packages/framework/esm-framework/docs/functions/getConfig.md +31 -0
- package/packages/framework/esm-framework/docs/functions/getContext.md +29 -0
- package/packages/framework/esm-framework/docs/functions/getCoreTranslation.md +35 -0
- package/packages/framework/esm-framework/docs/functions/getCurrentOfflineMode.md +11 -0
- package/packages/framework/esm-framework/docs/functions/getCurrentUser.md +154 -0
- package/packages/framework/esm-framework/docs/functions/getDefaultCalendar.md +21 -0
- package/packages/framework/esm-framework/docs/functions/getDefaultsFromConfigSchema.md +32 -0
- package/packages/framework/esm-framework/docs/functions/getDynamicOfflineDataEntries.md +28 -0
- package/packages/framework/esm-framework/docs/functions/getDynamicOfflineDataEntriesFor.md +34 -0
- package/packages/framework/esm-framework/docs/functions/getDynamicOfflineDataHandlers.md +13 -0
- package/packages/framework/esm-framework/docs/functions/getExtensionNameFromId.md +30 -0
- package/packages/framework/esm-framework/docs/functions/getExtensionStore.md +14 -0
- package/packages/framework/esm-framework/docs/functions/getFeatureFlag.md +21 -0
- package/packages/framework/esm-framework/docs/functions/getFhirServerPaginationHandlers.md +17 -0
- package/packages/framework/esm-framework/docs/functions/getFullSynchronizationItems.md +27 -0
- package/packages/framework/esm-framework/docs/functions/getFullSynchronizationItemsFor.md +33 -0
- package/packages/framework/esm-framework/docs/functions/getGlobalStore.md +36 -0
- package/packages/framework/esm-framework/docs/functions/getHistory.md +13 -0
- package/packages/framework/esm-framework/docs/functions/getLifecycle.md +27 -0
- package/packages/framework/esm-framework/docs/functions/getLocale.md +15 -0
- package/packages/framework/esm-framework/docs/functions/getLocations.md +21 -0
- package/packages/framework/esm-framework/docs/functions/getLoggedInUser.md +11 -0
- package/packages/framework/esm-framework/docs/functions/getOfflinePatientDataStore.md +15 -0
- package/packages/framework/esm-framework/docs/functions/getPatientName.md +26 -0
- package/packages/framework/esm-framework/docs/functions/getRegisteredWorkspace2Names.md +13 -0
- package/packages/framework/esm-framework/docs/functions/getSessionLocation.md +11 -0
- package/packages/framework/esm-framework/docs/functions/getSessionStore.md +11 -0
- package/packages/framework/esm-framework/docs/functions/getSyncLifecycle.md +31 -0
- package/packages/framework/esm-framework/docs/functions/getSynchronizationItem.md +27 -0
- package/packages/framework/esm-framework/docs/functions/getSynchronizationItems.md +27 -0
- package/packages/framework/esm-framework/docs/functions/getVisitStore.md +11 -0
- package/packages/framework/esm-framework/docs/functions/getVisitTypes.md +11 -0
- package/packages/framework/esm-framework/docs/functions/getVisitsForPatient.md +29 -0
- package/packages/framework/esm-framework/docs/functions/goBackInHistory.md +25 -0
- package/packages/framework/esm-framework/docs/functions/importDynamic.md +58 -0
- package/packages/framework/esm-framework/docs/functions/inRange.md +27 -0
- package/packages/framework/esm-framework/docs/functions/interpolateString.md +34 -0
- package/packages/framework/esm-framework/docs/functions/interpolateUrl.md +48 -0
- package/packages/framework/esm-framework/docs/functions/isDesktop.md +17 -0
- package/packages/framework/esm-framework/docs/functions/isDevEnabled.md +11 -0
- package/packages/framework/esm-framework/docs/functions/isOfflineUuid.md +19 -0
- package/packages/framework/esm-framework/docs/functions/isOmrsDateStrict.md +20 -0
- package/packages/framework/esm-framework/docs/functions/isOmrsDateToday.md +19 -0
- package/packages/framework/esm-framework/docs/functions/isOnline.md +17 -0
- package/packages/framework/esm-framework/docs/functions/isUrlWithTemplateParameters.md +22 -0
- package/packages/framework/esm-framework/docs/functions/isVersionSatisfied.md +21 -0
- package/packages/framework/esm-framework/docs/functions/launchWorkspace.md +56 -0
- package/packages/framework/esm-framework/docs/functions/launchWorkspace2.md +79 -0
- package/packages/framework/esm-framework/docs/functions/launchWorkspaceGroup.md +38 -0
- package/packages/framework/esm-framework/docs/functions/launchWorkspaceGroup2.md +40 -0
- package/packages/framework/esm-framework/docs/functions/makeUrl.md +26 -0
- package/packages/framework/esm-framework/docs/functions/messageOmrsServiceWorker.md +23 -0
- package/packages/framework/esm-framework/docs/functions/navigate.md +48 -0
- package/packages/framework/esm-framework/docs/functions/navigateAndLaunchWorkspace.md +33 -0
- package/packages/framework/esm-framework/docs/functions/oneOf.md +21 -0
- package/packages/framework/esm-framework/docs/functions/openmrsFetch.md +75 -0
- package/packages/framework/esm-framework/docs/functions/openmrsObservableFetch.md +55 -0
- package/packages/framework/esm-framework/docs/functions/parseDate.md +20 -0
- package/packages/framework/esm-framework/docs/functions/provide.md +21 -0
- package/packages/framework/esm-framework/docs/functions/putDynamicOfflineData.md +28 -0
- package/packages/framework/esm-framework/docs/functions/putDynamicOfflineDataFor.md +34 -0
- package/packages/framework/esm-framework/docs/functions/queueSynchronizationItem.md +39 -0
- package/packages/framework/esm-framework/docs/functions/refetchCurrentUser.md +33 -0
- package/packages/framework/esm-framework/docs/functions/registerBreadcrumb.md +17 -0
- package/packages/framework/esm-framework/docs/functions/registerBreadcrumbs.md +17 -0
- package/packages/framework/esm-framework/docs/functions/registerContext.md +34 -0
- package/packages/framework/esm-framework/docs/functions/registerDefaultCalendar.md +33 -0
- package/packages/framework/esm-framework/docs/functions/registerFeatureFlag.md +36 -0
- package/packages/framework/esm-framework/docs/functions/registerOfflinePatientHandler.md +25 -0
- package/packages/framework/esm-framework/docs/functions/removeDynamicOfflineData.md +28 -0
- package/packages/framework/esm-framework/docs/functions/removeDynamicOfflineDataFor.md +34 -0
- package/packages/framework/esm-framework/docs/functions/renderExtension.md +41 -0
- package/packages/framework/esm-framework/docs/functions/reportError.md +17 -0
- package/packages/framework/esm-framework/docs/functions/retry.md +44 -0
- package/packages/framework/esm-framework/docs/functions/saveVisit.md +21 -0
- package/packages/framework/esm-framework/docs/functions/selectPreferredName.md +46 -0
- package/packages/framework/esm-framework/docs/functions/setCurrentVisit.md +21 -0
- package/packages/framework/esm-framework/docs/functions/setLeftNav.md +23 -0
- package/packages/framework/esm-framework/docs/functions/setSessionLocation.md +21 -0
- package/packages/framework/esm-framework/docs/functions/setUserLanguage.md +17 -0
- package/packages/framework/esm-framework/docs/functions/setUserProperties.md +23 -0
- package/packages/framework/esm-framework/docs/functions/setupDynamicOfflineDataHandler.md +22 -0
- package/packages/framework/esm-framework/docs/functions/setupOfflineSync.md +49 -0
- package/packages/framework/esm-framework/docs/functions/shallowEqual.md +32 -0
- package/packages/framework/esm-framework/docs/functions/showActionableNotification.md +21 -0
- package/packages/framework/esm-framework/docs/functions/showModal.md +44 -0
- package/packages/framework/esm-framework/docs/functions/showNotification.md +21 -0
- package/packages/framework/esm-framework/docs/functions/showSnackbar.md +21 -0
- package/packages/framework/esm-framework/docs/functions/showToast.md +21 -0
- package/packages/framework/esm-framework/docs/functions/subscribeActionableNotificationShown.md +21 -0
- package/packages/framework/esm-framework/docs/functions/subscribeConnectivity.md +21 -0
- package/packages/framework/esm-framework/docs/functions/subscribeConnectivityChanged.md +21 -0
- package/packages/framework/esm-framework/docs/functions/subscribeNotificationShown.md +21 -0
- package/packages/framework/esm-framework/docs/functions/subscribeOpenmrsEvent.md +55 -0
- package/packages/framework/esm-framework/docs/functions/subscribePrecacheStaticDependencies.md +21 -0
- package/packages/framework/esm-framework/docs/functions/subscribeSnackbarShown.md +21 -0
- package/packages/framework/esm-framework/docs/functions/subscribeTo.md +75 -0
- package/packages/framework/esm-framework/docs/functions/subscribeToContext.md +39 -0
- package/packages/framework/esm-framework/docs/functions/subscribeToastShown.md +21 -0
- package/packages/framework/esm-framework/docs/functions/syncAllDynamicOfflineData.md +27 -0
- package/packages/framework/esm-framework/docs/functions/syncDynamicOfflineData.md +33 -0
- package/packages/framework/esm-framework/docs/functions/syncOfflinePatientData.md +21 -0
- package/packages/framework/esm-framework/docs/functions/toDateObjectStrict.md +20 -0
- package/packages/framework/esm-framework/docs/functions/toLocationObject.md +17 -0
- package/packages/framework/esm-framework/docs/functions/toOmrsIsoString.md +23 -0
- package/packages/framework/esm-framework/docs/functions/toVisitTypeObject.md +17 -0
- package/packages/framework/esm-framework/docs/functions/translateFrom.md +55 -0
- package/packages/framework/esm-framework/docs/functions/unregisterContext.md +20 -0
- package/packages/framework/esm-framework/docs/functions/unsetLeftNav.md +23 -0
- package/packages/framework/esm-framework/docs/functions/updateContext.md +29 -0
- package/packages/framework/esm-framework/docs/functions/updateVisit.md +25 -0
- package/packages/framework/esm-framework/docs/functions/useAbortController.md +32 -0
- package/packages/framework/esm-framework/docs/functions/useAppContext.md +43 -0
- package/packages/framework/esm-framework/docs/functions/useAssignedExtensionIds.md +26 -0
- package/packages/framework/esm-framework/docs/functions/useAssignedExtensions.md +21 -0
- package/packages/framework/esm-framework/docs/functions/useAttachments.md +41 -0
- package/packages/framework/esm-framework/docs/functions/useBodyScrollLock.md +17 -0
- package/packages/framework/esm-framework/docs/functions/useConfig.md +27 -0
- package/packages/framework/esm-framework/docs/functions/useConnectivity.md +11 -0
- package/packages/framework/esm-framework/docs/functions/useDebounce.md +57 -0
- package/packages/framework/esm-framework/docs/functions/useDefineAppContext.md +70 -0
- package/packages/framework/esm-framework/docs/functions/useEmrConfiguration.md +35 -0
- package/packages/framework/esm-framework/docs/functions/useExtensionSlotMeta.md +25 -0
- package/packages/framework/esm-framework/docs/functions/useExtensionSlotStore.md +17 -0
- package/packages/framework/esm-framework/docs/functions/useFeatureFlag.md +30 -0
- package/packages/framework/esm-framework/docs/functions/useFhirFetchAll.md +44 -0
- package/packages/framework/esm-framework/docs/functions/useFhirInfinite.md +46 -0
- package/packages/framework/esm-framework/docs/functions/useFhirPagination.md +129 -0
- package/packages/framework/esm-framework/docs/functions/useLayoutType.md +11 -0
- package/packages/framework/esm-framework/docs/functions/useLeftNav.md +17 -0
- package/packages/framework/esm-framework/docs/functions/useLeftNavStore.md +11 -0
- package/packages/framework/esm-framework/docs/functions/useLocations.md +21 -0
- package/packages/framework/esm-framework/docs/functions/useOnClickOutside.md +27 -0
- package/packages/framework/esm-framework/docs/functions/useOnVisible.md +28 -0
- package/packages/framework/esm-framework/docs/functions/useOpenmrsFetchAll.md +46 -0
- package/packages/framework/esm-framework/docs/functions/useOpenmrsInfinite.md +54 -0
- package/packages/framework/esm-framework/docs/functions/useOpenmrsPagination.md +140 -0
- package/packages/framework/esm-framework/docs/functions/useOpenmrsSWR.md +71 -0
- package/packages/framework/esm-framework/docs/functions/usePagination.md +89 -0
- package/packages/framework/esm-framework/docs/functions/usePatient.md +38 -0
- package/packages/framework/esm-framework/docs/functions/usePatientPhoto.md +17 -0
- package/packages/framework/esm-framework/docs/functions/usePrimaryIdentifierCode.md +23 -0
- package/packages/framework/esm-framework/docs/functions/useRenderableExtensions.md +43 -0
- package/packages/framework/esm-framework/docs/functions/useSession.md +19 -0
- package/packages/framework/esm-framework/docs/functions/useStore.md +131 -0
- package/packages/framework/esm-framework/docs/functions/useStoreWithActions.md +33 -0
- package/packages/framework/esm-framework/docs/functions/useVisit.md +41 -0
- package/packages/framework/esm-framework/docs/functions/useVisitContextStore.md +23 -0
- package/packages/framework/esm-framework/docs/functions/useVisitTypes.md +11 -0
- package/packages/framework/esm-framework/docs/functions/useWorkspace2Context.md +14 -0
- package/packages/framework/esm-framework/docs/functions/useWorkspaces.md +11 -0
- package/packages/framework/esm-framework/docs/functions/userHasAccess.md +27 -0
- package/packages/framework/esm-framework/docs/functions/validator.md +44 -0
- package/packages/framework/esm-framework/docs/interfaces/ActionMenuButtonProps.md +67 -0
- package/packages/framework/esm-framework/docs/interfaces/ActionableNotificationDescriptor.md +77 -0
- package/packages/framework/esm-framework/docs/interfaces/AssignedExtension.md +71 -0
- package/packages/framework/esm-framework/docs/interfaces/Attachment.md +61 -0
- package/packages/framework/esm-framework/docs/interfaces/AttachmentResponse.md +53 -0
- package/packages/framework/esm-framework/docs/interfaces/AuditInfo.md +101 -0
- package/packages/framework/esm-framework/docs/interfaces/BreadcrumbRegistration.md +21 -0
- package/packages/framework/esm-framework/docs/interfaces/BreadcrumbSettings.md +55 -0
- package/packages/framework/esm-framework/docs/interfaces/CancelLoading.md +13 -0
- package/packages/framework/esm-framework/docs/interfaces/CardHeaderProps.md +25 -0
- package/packages/framework/esm-framework/docs/interfaces/ClearDynamicRoutesMessage.md +21 -0
- package/packages/framework/esm-framework/docs/interfaces/CloseWorkspaceOptions.md +54 -0
- package/packages/framework/esm-framework/docs/interfaces/ComponentConfig.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/Concept.md +173 -0
- package/packages/framework/esm-framework/docs/interfaces/ConceptClass.md +101 -0
- package/packages/framework/esm-framework/docs/interfaces/ConceptDatatype.md +109 -0
- package/packages/framework/esm-framework/docs/interfaces/ConceptName.md +109 -0
- package/packages/framework/esm-framework/docs/interfaces/Config.md +9 -0
- package/packages/framework/esm-framework/docs/interfaces/ConfigObject.md +27 -0
- package/packages/framework/esm-framework/docs/interfaces/ConfigSchema.md +33 -0
- package/packages/framework/esm-framework/docs/interfaces/ConfigurableLinkProps.md +49 -0
- package/packages/framework/esm-framework/docs/interfaces/ConnectedExtension.md +51 -0
- package/packages/framework/esm-framework/docs/interfaces/ConnectivityChangedEvent.md +13 -0
- package/packages/framework/esm-framework/docs/interfaces/CurrentPatientOptions.md +18 -0
- package/packages/framework/esm-framework/docs/interfaces/DashboardExtensionProps.md +37 -0
- package/packages/framework/esm-framework/docs/interfaces/DefaultWorkspaceProps.md +113 -0
- package/packages/framework/esm-framework/docs/interfaces/Diagnosis.md +165 -0
- package/packages/framework/esm-framework/docs/interfaces/DisplayConditionsConfigObject.md +45 -0
- package/packages/framework/esm-framework/docs/interfaces/Drug.md +97 -0
- package/packages/framework/esm-framework/docs/interfaces/DynamicOfflineData.md +60 -0
- package/packages/framework/esm-framework/docs/interfaces/DynamicOfflineDataHandler.md +98 -0
- package/packages/framework/esm-framework/docs/interfaces/DynamicOfflineDataSyncState.md +65 -0
- package/packages/framework/esm-framework/docs/interfaces/EmptyCardProps.md +39 -0
- package/packages/framework/esm-framework/docs/interfaces/EmrApiConfigurationResponse.md +489 -0
- package/packages/framework/esm-framework/docs/interfaces/Encounter.md +145 -0
- package/packages/framework/esm-framework/docs/interfaces/EncounterProvider.md +89 -0
- package/packages/framework/esm-framework/docs/interfaces/EncounterRole.md +97 -0
- package/packages/framework/esm-framework/docs/interfaces/EncounterType.md +97 -0
- package/packages/framework/esm-framework/docs/interfaces/ErrorStateProps.md +25 -0
- package/packages/framework/esm-framework/docs/interfaces/ExtensionData.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/ExtensionMeta.md +9 -0
- package/packages/framework/esm-framework/docs/interfaces/ExtensionRegistration.md +89 -0
- package/packages/framework/esm-framework/docs/interfaces/ExtensionSlotBaseProps.md +67 -0
- package/packages/framework/esm-framework/docs/interfaces/ExtensionSlotConfig.md +43 -0
- package/packages/framework/esm-framework/docs/interfaces/ExtensionSlotConfigureValueObject.md +9 -0
- package/packages/framework/esm-framework/docs/interfaces/ExtensionSlotProps.md +3520 -0
- package/packages/framework/esm-framework/docs/interfaces/ExtensionSlotState.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/ExtensionStore.md +13 -0
- package/packages/framework/esm-framework/docs/interfaces/FHIRCode.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/FHIRLocationResource.md +37 -0
- package/packages/framework/esm-framework/docs/interfaces/FHIRResource.md +113 -0
- package/packages/framework/esm-framework/docs/interfaces/FeatureFlagDefinition.md +37 -0
- package/packages/framework/esm-framework/docs/interfaces/FetchConfig.md +191 -0
- package/packages/framework/esm-framework/docs/interfaces/FetchError.md +21 -0
- package/packages/framework/esm-framework/docs/interfaces/FetchHeaders.md +9 -0
- package/packages/framework/esm-framework/docs/interfaces/FetchResponse.md +279 -0
- package/packages/framework/esm-framework/docs/interfaces/FetchResponseJson.md +9 -0
- package/packages/framework/esm-framework/docs/interfaces/ImportMap.md +13 -0
- package/packages/framework/esm-framework/docs/interfaces/LeftNavStore.md +45 -0
- package/packages/framework/esm-framework/docs/interfaces/Link.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/Location.md +305 -0
- package/packages/framework/esm-framework/docs/interfaces/LoggedInUser.md +131 -0
- package/packages/framework/esm-framework/docs/interfaces/LoggedInUserFetchResponse.md +273 -0
- package/packages/framework/esm-framework/docs/interfaces/MessageServiceWorkerResult.md +35 -0
- package/packages/framework/esm-framework/docs/interfaces/NavigateOptions.md +21 -0
- package/packages/framework/esm-framework/docs/interfaces/NewVisitPayload.md +69 -0
- package/packages/framework/esm-framework/docs/interfaces/NotificationDescriptor.md +65 -0
- package/packages/framework/esm-framework/docs/interfaces/Obs.md +209 -0
- package/packages/framework/esm-framework/docs/interfaces/OfflineModeResult.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/OfflinePatientArgs.md +25 -0
- package/packages/framework/esm-framework/docs/interfaces/OfflinePatientDataSyncHandler.md +35 -0
- package/packages/framework/esm-framework/docs/interfaces/OfflinePatientDataSyncState.md +61 -0
- package/packages/framework/esm-framework/docs/interfaces/OfflinePatientDataSyncStore.md +25 -0
- package/packages/framework/esm-framework/docs/interfaces/OmrsServiceWorkerMessage.md +25 -0
- package/packages/framework/esm-framework/docs/interfaces/OnImportMapChangedMessage.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/OnlyThePatient.md +21 -0
- package/packages/framework/esm-framework/docs/interfaces/OpenWorkspace.md +281 -0
- package/packages/framework/esm-framework/docs/interfaces/OpenmrsAppContextProps.md +31 -0
- package/packages/framework/esm-framework/docs/interfaces/OpenmrsAppRoutes.md +133 -0
- package/packages/framework/esm-framework/docs/interfaces/OpenmrsDatePickerProps.md +776 -0
- package/packages/framework/esm-framework/docs/interfaces/OpenmrsDateRangePickerProps.md +783 -0
- package/packages/framework/esm-framework/docs/interfaces/OpenmrsEventTypes.md +28 -0
- package/packages/framework/esm-framework/docs/interfaces/OpenmrsResource.md +85 -0
- package/packages/framework/esm-framework/docs/interfaces/OpenmrsResourceStrict.md +57 -0
- package/packages/framework/esm-framework/docs/interfaces/Order.md +461 -0
- package/packages/framework/esm-framework/docs/interfaces/PageHeaderContentProps.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/PageHeaderWrapperProps.md +21 -0
- package/packages/framework/esm-framework/docs/interfaces/PaginationProps.md +95 -0
- package/packages/framework/esm-framework/docs/interfaces/Patient.md +93 -0
- package/packages/framework/esm-framework/docs/interfaces/PatientBannerActionsMenuProps.md +40 -0
- package/packages/framework/esm-framework/docs/interfaces/PatientBannerToggleContactDetailsButtonProps.md +45 -0
- package/packages/framework/esm-framework/docs/interfaces/PatientIdentifier.md +109 -0
- package/packages/framework/esm-framework/docs/interfaces/PatientIdentifierType.md +141 -0
- package/packages/framework/esm-framework/docs/interfaces/PatientPhotoProps.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/PatientWithFullResponse.md +21 -0
- package/packages/framework/esm-framework/docs/interfaces/Person.md +201 -0
- package/packages/framework/esm-framework/docs/interfaces/PersonAddress.md +281 -0
- package/packages/framework/esm-framework/docs/interfaces/PersonAttribute.md +97 -0
- package/packages/framework/esm-framework/docs/interfaces/PersonName.md +153 -0
- package/packages/framework/esm-framework/docs/interfaces/PrecacheStaticDependenciesEvent.md +5 -0
- package/packages/framework/esm-framework/docs/interfaces/PrimaryIdentifier.md +13 -0
- package/packages/framework/esm-framework/docs/interfaces/Privilege.md +37 -0
- package/packages/framework/esm-framework/docs/interfaces/Prompt.md +53 -0
- package/packages/framework/esm-framework/docs/interfaces/QueueItemDescriptor.md +50 -0
- package/packages/framework/esm-framework/docs/interfaces/RegisterDynamicRouteMessage.md +45 -0
- package/packages/framework/esm-framework/docs/interfaces/ResourceLoader.md +19 -0
- package/packages/framework/esm-framework/docs/interfaces/ResponsiveWrapperProps.md +13 -0
- package/packages/framework/esm-framework/docs/interfaces/RetryOptions.md +82 -0
- package/packages/framework/esm-framework/docs/interfaces/Role.md +37 -0
- package/packages/framework/esm-framework/docs/interfaces/Session.md +69 -0
- package/packages/framework/esm-framework/docs/interfaces/SessionLocation.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/SetLeftNavParams.md +49 -0
- package/packages/framework/esm-framework/docs/interfaces/ShowActionableNotificationEvent.md +57 -0
- package/packages/framework/esm-framework/docs/interfaces/ShowNotificationEvent.md +45 -0
- package/packages/framework/esm-framework/docs/interfaces/ShowSnackbarEvent.md +73 -0
- package/packages/framework/esm-framework/docs/interfaces/ShowToastEvent.md +49 -0
- package/packages/framework/esm-framework/docs/interfaces/SnackbarDescriptor.md +85 -0
- package/packages/framework/esm-framework/docs/interfaces/SnackbarMeta.md +129 -0
- package/packages/framework/esm-framework/docs/interfaces/SpaConfig.md +69 -0
- package/packages/framework/esm-framework/docs/interfaces/StyleguideConfigObject.md +97 -0
- package/packages/framework/esm-framework/docs/interfaces/SyncItem.md +79 -0
- package/packages/framework/esm-framework/docs/interfaces/SyncProcessOptions.md +53 -0
- package/packages/framework/esm-framework/docs/interfaces/ToastDescriptor.md +61 -0
- package/packages/framework/esm-framework/docs/interfaces/ToastNotificationMeta.md +93 -0
- package/packages/framework/esm-framework/docs/interfaces/UploadedFile.md +61 -0
- package/packages/framework/esm-framework/docs/interfaces/UseConfigOptions.md +16 -0
- package/packages/framework/esm-framework/docs/interfaces/UsePatientPhotoResult.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/UseServerFetchAllOptions.md +80 -0
- package/packages/framework/esm-framework/docs/interfaces/UseServerInfiniteOptions.md +55 -0
- package/packages/framework/esm-framework/docs/interfaces/UseServerPaginationOptions.md +51 -0
- package/packages/framework/esm-framework/docs/interfaces/User.md +77 -0
- package/packages/framework/esm-framework/docs/interfaces/UserHasAccessProps.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/Visit.md +81 -0
- package/packages/framework/esm-framework/docs/interfaces/VisitItem.md +37 -0
- package/packages/framework/esm-framework/docs/interfaces/VisitReturnType.md +65 -0
- package/packages/framework/esm-framework/docs/interfaces/VisitStoreState.md +37 -0
- package/packages/framework/esm-framework/docs/interfaces/VisitType.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/Workspace2DefinitionProps.md +145 -0
- package/packages/framework/esm-framework/docs/interfaces/WorkspaceContainerProps.md +45 -0
- package/packages/framework/esm-framework/docs/interfaces/WorkspaceDefinition2.md +29 -0
- package/packages/framework/esm-framework/docs/interfaces/WorkspaceGroupDefinition.md +25 -0
- package/packages/framework/esm-framework/docs/interfaces/WorkspaceGroupDefinition2.md +45 -0
- package/packages/framework/esm-framework/docs/interfaces/WorkspaceRegistration.md +99 -0
- package/packages/framework/esm-framework/docs/interfaces/WorkspaceWindowDefinition2.md +53 -0
- package/packages/framework/esm-framework/docs/interfaces/WorkspacesInfo.md +61 -0
- package/packages/framework/esm-framework/docs/type-aliases/ActionFunction.md +27 -0
- package/packages/framework/esm-framework/docs/type-aliases/ActionableNotificationType.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/Actions.md +13 -0
- package/packages/framework/esm-framework/docs/type-aliases/ArgumentsTuple.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/BoundActions.md +17 -0
- package/packages/framework/esm-framework/docs/type-aliases/ConfigValue.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/ContextCallback.md +23 -0
- package/packages/framework/esm-framework/docs/type-aliases/CoreTranslationKey.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/CurrentPatient.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/DateInput.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/DefaultEvaluateReturnType.md +9 -0
- package/packages/framework/esm-framework/docs/type-aliases/ErrorCardProps.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/ExtensionDefinition.md +123 -0
- package/packages/framework/esm-framework/docs/type-aliases/ExtensionProps.md +13 -0
- package/packages/framework/esm-framework/docs/type-aliases/FormatDateMode.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/FormatDateOptions.md +102 -0
- package/packages/framework/esm-framework/docs/type-aliases/FulfillerStatus.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/IconId.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/IconProps.md +31 -0
- package/packages/framework/esm-framework/docs/type-aliases/InlineNotificationType.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/Key.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/KnownOmrsServiceWorkerMessages.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/LayoutType.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/LoadedSessionStore.md +23 -0
- package/packages/framework/esm-framework/docs/type-aliases/ModalDefinition.md +29 -0
- package/packages/framework/esm-framework/docs/type-aliases/NameUse.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/NullablePatient.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/OfflineMode.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/OmrsOfflineCachingStrategy.md +12 -0
- package/packages/framework/esm-framework/docs/type-aliases/OmrsOfflineHttpHeaderNames.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/OmrsOfflineHttpHeaders.md +44 -0
- package/packages/framework/esm-framework/docs/type-aliases/OpenmrsEvent.md +9 -0
- package/packages/framework/esm-framework/docs/type-aliases/OpenmrsRoutes.md +10 -0
- package/packages/framework/esm-framework/docs/type-aliases/OrderAction.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/OrderUrgency.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/PageDefinition.md +41 -0
- package/packages/framework/esm-framework/docs/type-aliases/PageHeaderProps.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/PatientUuid.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/PictogramId.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/PictogramProps.md +23 -0
- package/packages/framework/esm-framework/docs/type-aliases/ProvidedConfig.md +23 -0
- package/packages/framework/esm-framework/docs/type-aliases/ResourceName.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/SessionStore.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/SnackbarType.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/SpaEnvironment.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/SvgIconProps.md +23 -0
- package/packages/framework/esm-framework/docs/type-aliases/SvgPictogramProps.md +27 -0
- package/packages/framework/esm-framework/docs/type-aliases/TemplateParams.md +11 -0
- package/packages/framework/esm-framework/docs/type-aliases/ToastType.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/UnloadedSessionStore.md +23 -0
- package/packages/framework/esm-framework/docs/type-aliases/UpdateVisitPayload.md +7 -0
- package/packages/framework/esm-framework/docs/type-aliases/UseOpenmrsSWROptions.md +39 -0
- package/packages/framework/esm-framework/docs/type-aliases/Validator.md +17 -0
- package/packages/framework/esm-framework/docs/type-aliases/ValidatorFunction.md +17 -0
- package/packages/framework/esm-framework/docs/type-aliases/VariablesMap.md +13 -0
- package/packages/framework/esm-framework/docs/type-aliases/Workspace2Definition.md +23 -0
- package/packages/framework/esm-framework/docs/type-aliases/WorkspaceDefinition.md +118 -0
- package/packages/framework/esm-framework/docs/type-aliases/WorkspaceWindowState.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ActionMenuButton.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ActionMenuButton2.md +19 -0
- package/packages/framework/esm-framework/docs/variables/ActivityIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/AddIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/AllergiesIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/AppointmentsAltPictogram.md +11 -0
- package/packages/framework/esm-framework/docs/variables/AppointmentsPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ArrowDownIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ArrowLeftIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ArrowRightIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ArrowUpIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/Assessment1Pictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/Assessment2Pictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/AttachmentIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/BabyIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/BloodBankPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CalendarHeatMapIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CalendarIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CardiologyPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CaretDownIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CaretLeftIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CaretRightIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CaretUpIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ChartAverageIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CheckmarkFilledIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CheckmarkOutlineIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ChemistryIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ChevronDownIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ChevronLeftIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ChevronRightIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ChevronUpIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CloseFilledIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CloseIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/CloseOutlineIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ConditionsIcon.md +11 -0
- package/packages/framework/esm-framework/docs/variables/CtScanPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/DentistryPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/DiagnosisTags.md +11 -0
- package/packages/framework/esm-framework/docs/variables/DocumentAttachmentIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/DocumentIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/DownloadIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/DrugOrderIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/EditIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/EmergencyDepartmentPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/EmptyCard.md +9 -0
- package/packages/framework/esm-framework/docs/variables/ErrorCard.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ErrorState.md +7 -0
- package/packages/framework/esm-framework/docs/variables/EventScheduleIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/EventsIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/Extension.md +15 -0
- package/packages/framework/esm-framework/docs/variables/FacilityPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/GenderFemaleIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/GenderMaleIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/GenderOtherIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/GenderUnknownIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/GenericOrderTypeIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/GeriatricsPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/GroupAccessIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/GroupIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/GynaecologyPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/HomePictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/HospitalBedIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/Icon.md +9 -0
- package/packages/framework/esm-framework/docs/variables/ImageMedicalIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/InPatientPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/InformationFilledIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/InformationIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/InformationSquareIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/InventoryManagementIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/LabOrderIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/LaboratoryPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/Labs2Pictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/LeftNavMenu.md +13 -0
- package/packages/framework/esm-framework/docs/variables/ListCheckedIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/LocationIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/LocationPicker.md +7 -0
- package/packages/framework/esm-framework/docs/variables/MaterialOrderIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/MaximizeIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/MaybeIcon.md +16 -0
- package/packages/framework/esm-framework/docs/variables/MaybePictogram.md +16 -0
- package/packages/framework/esm-framework/docs/variables/MedicationIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/MessageQueueIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/MicroscopeIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/MoneyIcon.md +9 -0
- package/packages/framework/esm-framework/docs/variables/MotherIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/MovementIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ObstetricsPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/OpenmrsDatePicker.md +9 -0
- package/packages/framework/esm-framework/docs/variables/OpenmrsDateRangePicker.md +9 -0
- package/packages/framework/esm-framework/docs/variables/OverflowMenuHorizontalIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/OverflowMenuVerticalIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/PageHeader.md +30 -0
- package/packages/framework/esm-framework/docs/variables/PageHeaderContent.md +21 -0
- package/packages/framework/esm-framework/docs/variables/Pagination.md +9 -0
- package/packages/framework/esm-framework/docs/variables/PasswordIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/PatientListsPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/PatientSearchPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/PatientsPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/PaymentsDeskPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/PedestrianFamilyIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/PenIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/Pharmacy2Pictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/PharmacyPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/Pictogram.md +9 -0
- package/packages/framework/esm-framework/docs/variables/PrinterIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ProcedureOrderIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ProgramsIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/RadiologyIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ReferralOrderIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/RegistrationPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/RenderIfValueIsTruthy.md +21 -0
- package/packages/framework/esm-framework/docs/variables/RenewIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ReportIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ResetIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ResponsiveWrapper.md +11 -0
- package/packages/framework/esm-framework/docs/variables/SaveIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/SearchIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ServiceQueuesPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/SettingsIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ShoppingCartAddItemIcon.md +11 -0
- package/packages/framework/esm-framework/docs/variables/ShoppingCartArrowDownIcon.md +9 -0
- package/packages/framework/esm-framework/docs/variables/ShoppingCartIcon.md +9 -0
- package/packages/framework/esm-framework/docs/variables/StickyNoteAddIcon.md +9 -0
- package/packages/framework/esm-framework/docs/variables/StockManagementPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/SwitcherIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/SyringeIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/TableIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/TableOfContentsIcon.md +9 -0
- package/packages/framework/esm-framework/docs/variables/TimeIcon.md +9 -0
- package/packages/framework/esm-framework/docs/variables/ToolsIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/TransferPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/TranslateIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/TrashCanIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/TreeViewAltIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/TriagePictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/UserAvatarIcon.md +9 -0
- package/packages/framework/esm-framework/docs/variables/UserFollowIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/UserHasAccess.md +35 -0
- package/packages/framework/esm-framework/docs/variables/UserIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/UserXrayIcon.md +11 -0
- package/packages/framework/esm-framework/docs/variables/ViewIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/ViewOffIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/WarningIcon.md +7 -0
- package/packages/framework/esm-framework/docs/variables/Workspace2.md +14 -0
- package/packages/framework/esm-framework/docs/variables/XrayPictogram.md +7 -0
- package/packages/framework/esm-framework/docs/variables/attachmentUrl.md +7 -0
- package/packages/framework/esm-framework/docs/variables/backendDependencies.md +17 -0
- package/packages/framework/esm-framework/docs/variables/defaultVisitCustomRepresentation.md +7 -0
- package/packages/framework/esm-framework/docs/variables/fhirBaseUrl.md +7 -0
- package/packages/framework/esm-framework/docs/variables/getAsyncExtensionLifecycle.md +35 -0
- package/packages/framework/esm-framework/docs/variables/getStartedVisit.md +9 -0
- package/packages/framework/esm-framework/docs/variables/iconIds.md +7 -0
- package/packages/framework/esm-framework/docs/variables/isUrl.md +9 -0
- package/packages/framework/esm-framework/docs/variables/offlineUuidPrefix.md +7 -0
- package/packages/framework/esm-framework/docs/variables/omrsOfflineCachingStrategyHttpHeaderName.md +7 -0
- package/packages/framework/esm-framework/docs/variables/omrsOfflineResponseBodyHttpHeaderName.md +7 -0
- package/packages/framework/esm-framework/docs/variables/omrsOfflineResponseStatusHttpHeaderName.md +7 -0
- package/packages/framework/esm-framework/docs/variables/pictogramIds.md +7 -0
- package/packages/framework/esm-framework/docs/variables/restBaseUrl.md +7 -0
- package/packages/framework/esm-framework/docs/variables/sessionEndpoint.md +7 -0
- package/packages/framework/esm-framework/docs/variables/useConnectedExtensions.md +25 -0
- package/packages/framework/esm-framework/docs/variables/useExtensionStore.md +55 -0
- package/packages/framework/esm-framework/docs/variables/validators.md +78 -0
- package/packages/framework/esm-framework/mock-jest.tsx +163 -0
- package/packages/framework/esm-framework/mock.tsx +164 -0
- package/packages/framework/esm-framework/package.json +109 -0
- package/packages/framework/esm-framework/rspack.config.cjs +89 -0
- package/packages/framework/esm-framework/setup-tests.ts +58 -0
- package/packages/framework/esm-framework/src/declarations.d.ts +10 -0
- package/packages/framework/esm-framework/src/index.ts +17 -0
- package/packages/framework/esm-framework/src/integration-tests/extension-config-expressions.test.tsx +312 -0
- package/packages/framework/esm-framework/src/integration-tests/extension-config.test.tsx +527 -0
- package/packages/framework/esm-framework/src/internal.ts +17 -0
- package/packages/framework/esm-framework/src/mock-test.test.ts +25 -0
- package/packages/framework/esm-framework/tsconfig.build.json +11 -0
- package/packages/framework/esm-framework/tsconfig.json +5 -0
- package/packages/framework/esm-framework/typedoc.json +23 -0
- package/packages/framework/esm-framework/vitest.config.ts +9 -0
- package/packages/framework/esm-globals/.swcrc +16 -0
- package/packages/framework/esm-globals/README.md +4 -0
- package/packages/framework/esm-globals/package.json +59 -0
- package/packages/framework/esm-globals/src/events.ts +134 -0
- package/packages/framework/esm-globals/src/index.ts +2 -0
- package/packages/framework/esm-globals/src/public.ts +16 -0
- package/packages/framework/esm-globals/src/types.ts +415 -0
- package/packages/framework/esm-globals/tsconfig.build.json +9 -0
- package/packages/framework/esm-globals/tsconfig.json +5 -0
- package/packages/framework/esm-navigation/.swcrc +16 -0
- package/packages/framework/esm-navigation/README.md +1 -0
- package/packages/framework/esm-navigation/package.json +70 -0
- package/packages/framework/esm-navigation/src/breadcrumbs/db.ts +34 -0
- package/packages/framework/esm-navigation/src/breadcrumbs/filter.ts +57 -0
- package/packages/framework/esm-navigation/src/history/history.test.ts +109 -0
- package/packages/framework/esm-navigation/src/history/history.ts +76 -0
- package/packages/framework/esm-navigation/src/index.ts +6 -0
- package/packages/framework/esm-navigation/src/navigation/interpolate-string.test.ts +61 -0
- package/packages/framework/esm-navigation/src/navigation/interpolate-string.ts +63 -0
- package/packages/framework/esm-navigation/src/navigation/navigate.test.ts +69 -0
- package/packages/framework/esm-navigation/src/navigation/navigate.ts +59 -0
- package/packages/framework/esm-navigation/src/public.ts +6 -0
- package/packages/framework/esm-navigation/src/setup-tests.js +6 -0
- package/packages/framework/esm-navigation/src/types.ts +35 -0
- package/packages/framework/esm-navigation/tsconfig.build.json +9 -0
- package/packages/framework/esm-navigation/tsconfig.json +5 -0
- package/packages/framework/esm-navigation/vitest.config.ts +9 -0
- package/packages/framework/esm-offline/.swcrc +16 -0
- package/packages/framework/esm-offline/README.md +3 -0
- package/packages/framework/esm-offline/package.json +78 -0
- package/packages/framework/esm-offline/src/dynamic-offline-data.test.ts +81 -0
- package/packages/framework/esm-offline/src/dynamic-offline-data.ts +316 -0
- package/packages/framework/esm-offline/src/index.ts +9 -0
- package/packages/framework/esm-offline/src/mode.ts +74 -0
- package/packages/framework/esm-offline/src/offline-db.ts +36 -0
- package/packages/framework/esm-offline/src/offline-patient-data.ts +72 -0
- package/packages/framework/esm-offline/src/public.ts +21 -0
- package/packages/framework/esm-offline/src/service-worker-http-headers.ts +40 -0
- package/packages/framework/esm-offline/src/service-worker-messaging.ts +51 -0
- package/packages/framework/esm-offline/src/service-worker.ts +39 -0
- package/packages/framework/esm-offline/src/sync.test.ts +140 -0
- package/packages/framework/esm-offline/src/sync.ts +377 -0
- package/packages/framework/esm-offline/src/uuid-support.ts +14 -0
- package/packages/framework/esm-offline/tsconfig.build.json +9 -0
- package/packages/framework/esm-offline/tsconfig.json +5 -0
- package/packages/framework/esm-offline/vitest.config.ts +8 -0
- package/packages/framework/esm-react-utils/.swcrc +16 -0
- package/packages/framework/esm-react-utils/README.md +3 -0
- package/packages/framework/esm-react-utils/__mocks__/openmrs-esm-error-handling.mock.ts +2 -0
- package/packages/framework/esm-react-utils/__mocks__/set-public-path.tsx +1 -0
- package/packages/framework/esm-react-utils/mock-jest.tsx +164 -0
- package/packages/framework/esm-react-utils/mock.tsx +167 -0
- package/packages/framework/esm-react-utils/package.json +109 -0
- package/packages/framework/esm-react-utils/setup-tests.ts +19 -0
- package/packages/framework/esm-react-utils/src/ComponentContext.ts +10 -0
- package/packages/framework/esm-react-utils/src/ConfigurableLink.test.tsx +92 -0
- package/packages/framework/esm-react-utils/src/ConfigurableLink.tsx +77 -0
- package/packages/framework/esm-react-utils/src/Extension.tsx +99 -0
- package/packages/framework/esm-react-utils/src/ExtensionSlot.tsx +127 -0
- package/packages/framework/esm-react-utils/src/OpenmrsContext.ts +31 -0
- package/packages/framework/esm-react-utils/src/RenderIfValueIsTruthy.tsx +26 -0
- package/packages/framework/esm-react-utils/src/UserHasAccess.test.tsx +311 -0
- package/packages/framework/esm-react-utils/src/UserHasAccess.tsx +55 -0
- package/packages/framework/esm-react-utils/src/extensions.test.tsx +303 -0
- package/packages/framework/esm-react-utils/src/getLifecycle.ts +32 -0
- package/packages/framework/esm-react-utils/src/index.ts +51 -0
- package/packages/framework/esm-react-utils/src/openmrsComponentDecorator.test.tsx +76 -0
- package/packages/framework/esm-react-utils/src/openmrsComponentDecorator.tsx +158 -0
- package/packages/framework/esm-react-utils/src/public.ts +45 -0
- package/packages/framework/esm-react-utils/src/useAbortController.test.tsx +41 -0
- package/packages/framework/esm-react-utils/src/useAbortController.ts +40 -0
- package/packages/framework/esm-react-utils/src/useAppContext.ts +76 -0
- package/packages/framework/esm-react-utils/src/useAssignedExtensionIds.ts +26 -0
- package/packages/framework/esm-react-utils/src/useAssignedExtensions.ts +11 -0
- package/packages/framework/esm-react-utils/src/useAttachments.ts +24 -0
- package/packages/framework/esm-react-utils/src/useBodyScrollLock.ts +14 -0
- package/packages/framework/esm-react-utils/src/useConfig.test.tsx +345 -0
- package/packages/framework/esm-react-utils/src/useConfig.ts +167 -0
- package/packages/framework/esm-react-utils/src/useConnectedExtensions.ts +10 -0
- package/packages/framework/esm-react-utils/src/useConnectivity.ts +12 -0
- package/packages/framework/esm-react-utils/src/useDebounce.ts +44 -0
- package/packages/framework/esm-react-utils/src/useDefineAppContext.ts +58 -0
- package/packages/framework/esm-react-utils/src/useEmrConfiguration.ts +173 -0
- package/packages/framework/esm-react-utils/src/useExtensionInternalStore.ts +8 -0
- package/packages/framework/esm-react-utils/src/useExtensionSlot.ts +37 -0
- package/packages/framework/esm-react-utils/src/useExtensionSlotMeta.ts +14 -0
- package/packages/framework/esm-react-utils/src/useExtensionSlotStore.ts +6 -0
- package/packages/framework/esm-react-utils/src/useExtensionStore.ts +5 -0
- package/packages/framework/esm-react-utils/src/useFeatureFlag.ts +23 -0
- package/packages/framework/esm-react-utils/src/useFhirFetchAll.ts +24 -0
- package/packages/framework/esm-react-utils/src/useFhirInfinite.ts +29 -0
- package/packages/framework/esm-react-utils/src/useFhirPagination.ts +66 -0
- package/packages/framework/esm-react-utils/src/useForceUpdate.ts +9 -0
- package/packages/framework/esm-react-utils/src/useLayoutType.ts +40 -0
- package/packages/framework/esm-react-utils/src/useLeftNav.ts +19 -0
- package/packages/framework/esm-react-utils/src/useLeftNavStore.ts +6 -0
- package/packages/framework/esm-react-utils/src/useLocations.tsx +21 -0
- package/packages/framework/esm-react-utils/src/useOnClickOutside.test.tsx +65 -0
- package/packages/framework/esm-react-utils/src/useOnClickOutside.ts +32 -0
- package/packages/framework/esm-react-utils/src/useOnVisible.ts +46 -0
- package/packages/framework/esm-react-utils/src/useOpenmrsFetchAll.test.ts +53 -0
- package/packages/framework/esm-react-utils/src/useOpenmrsFetchAll.ts +70 -0
- package/packages/framework/esm-react-utils/src/useOpenmrsInfinite.test.ts +69 -0
- package/packages/framework/esm-react-utils/src/useOpenmrsInfinite.ts +156 -0
- package/packages/framework/esm-react-utils/src/useOpenmrsPagination.test.ts +137 -0
- package/packages/framework/esm-react-utils/src/useOpenmrsPagination.ts +173 -0
- package/packages/framework/esm-react-utils/src/useOpenmrsSWR.ts +87 -0
- package/packages/framework/esm-react-utils/src/usePagination.ts +65 -0
- package/packages/framework/esm-react-utils/src/usePaginationInfo.ts +32 -0
- package/packages/framework/esm-react-utils/src/usePatient.test.ts +433 -0
- package/packages/framework/esm-react-utils/src/usePatient.ts +51 -0
- package/packages/framework/esm-react-utils/src/usePrimaryIdentifierResource.ts +31 -0
- package/packages/framework/esm-react-utils/src/useRenderableExtensions.tsx +51 -0
- package/packages/framework/esm-react-utils/src/useSession.test.tsx +113 -0
- package/packages/framework/esm-react-utils/src/useSession.ts +123 -0
- package/packages/framework/esm-react-utils/src/useStore.test.ts +49 -0
- package/packages/framework/esm-react-utils/src/useStore.ts +124 -0
- package/packages/framework/esm-react-utils/src/useVisit.test.ts +505 -0
- package/packages/framework/esm-react-utils/src/useVisit.ts +119 -0
- package/packages/framework/esm-react-utils/src/useVisitContextStore.ts +57 -0
- package/packages/framework/esm-react-utils/src/useVisitTypes.ts +20 -0
- package/packages/framework/esm-react-utils/tsconfig.build.json +9 -0
- package/packages/framework/esm-react-utils/tsconfig.json +5 -0
- package/packages/framework/esm-react-utils/vitest.config.ts +9 -0
- package/packages/framework/esm-routes/.swcrc +16 -0
- package/packages/framework/esm-routes/README.md +3 -0
- package/packages/framework/esm-routes/package.json +75 -0
- package/packages/framework/esm-routes/src/constants.ts +1 -0
- package/packages/framework/esm-routes/src/index.ts +3 -0
- package/packages/framework/esm-routes/src/loaders/components.ts +258 -0
- package/packages/framework/esm-routes/src/loaders/helpers.ts +4 -0
- package/packages/framework/esm-routes/src/loaders/index.ts +3 -0
- package/packages/framework/esm-routes/src/loaders/load-lifecycles.ts +109 -0
- package/packages/framework/esm-routes/src/loaders/pages.ts +276 -0
- package/packages/framework/esm-routes/src/public.ts +2 -0
- package/packages/framework/esm-routes/src/routes.test.ts +177 -0
- package/packages/framework/esm-routes/src/routes.ts +154 -0
- package/packages/framework/esm-routes/tsconfig.build.json +9 -0
- package/packages/framework/esm-routes/tsconfig.json +5 -0
- package/packages/framework/esm-routes/vitest.config.ts +8 -0
- package/packages/framework/esm-state/.swcrc +16 -0
- package/packages/framework/esm-state/README.md +9 -0
- package/packages/framework/esm-state/mock-jest.ts +68 -0
- package/packages/framework/esm-state/mock.ts +68 -0
- package/packages/framework/esm-state/package.json +74 -0
- package/packages/framework/esm-state/src/index.ts +1 -0
- package/packages/framework/esm-state/src/public.ts +1 -0
- package/packages/framework/esm-state/src/state.test.ts +531 -0
- package/packages/framework/esm-state/src/state.ts +135 -0
- package/packages/framework/esm-state/src/utils.ts +16 -0
- package/packages/framework/esm-state/tsconfig.build.json +9 -0
- package/packages/framework/esm-state/tsconfig.json +5 -0
- package/packages/framework/esm-state/vitest.config.ts +7 -0
- package/packages/framework/esm-styleguide/README.md +7 -0
- package/packages/framework/esm-styleguide/__mocks__/config.mock.ts +23 -0
- package/packages/framework/esm-styleguide/__mocks__/locations.mock.ts +576 -0
- package/packages/framework/esm-styleguide/__mocks__/react-i18next.js +49 -0
- package/packages/framework/esm-styleguide/logo/openmrs_logo.png +0 -0
- package/packages/framework/esm-styleguide/mock-jest.tsx +208 -0
- package/packages/framework/esm-styleguide/mock.tsx +209 -0
- package/packages/framework/esm-styleguide/package.json +131 -0
- package/packages/framework/esm-styleguide/postcss.config.js +8 -0
- package/packages/framework/esm-styleguide/rspack.config.cjs +96 -0
- package/packages/framework/esm-styleguide/setup-tests.ts +24 -0
- package/packages/framework/esm-styleguide/src/_all.scss +20 -0
- package/packages/framework/esm-styleguide/src/_overrides.scss +750 -0
- package/packages/framework/esm-styleguide/src/_vars.scss +77 -0
- package/packages/framework/esm-styleguide/src/brand.ts +15 -0
- package/packages/framework/esm-styleguide/src/breakpoints/index.ts +25 -0
- package/packages/framework/esm-styleguide/src/cards/card-header.component.tsx +30 -0
- package/packages/framework/esm-styleguide/src/cards/card-header.module.scss +45 -0
- package/packages/framework/esm-styleguide/src/cards/index.ts +1 -0
- package/packages/framework/esm-styleguide/src/components/_breadcrumbs.scss +11 -0
- package/packages/framework/esm-styleguide/src/components/_canvas.scss +8 -0
- package/packages/framework/esm-styleguide/src/components/_colors.scss +31 -0
- package/packages/framework/esm-styleguide/src/components/_general.scss +64 -0
- package/packages/framework/esm-styleguide/src/components/_main-content.scss +24 -0
- package/packages/framework/esm-styleguide/src/config-schema.ts +118 -0
- package/packages/framework/esm-styleguide/src/custom-overflow-menu/custom-overflow-menu.component.tsx +55 -0
- package/packages/framework/esm-styleguide/src/custom-overflow-menu/custom-overflow-menu.module.scss +38 -0
- package/packages/framework/esm-styleguide/src/custom-overflow-menu/custom-overflow-menu.test.tsx +96 -0
- package/packages/framework/esm-styleguide/src/custom-overflow-menu/index.ts +1 -0
- package/packages/framework/esm-styleguide/src/dashboard-extension/dashboard.module.scss +13 -0
- package/packages/framework/esm-styleguide/src/dashboard-extension/index.tsx +61 -0
- package/packages/framework/esm-styleguide/src/datepicker/DatePickerIcon.tsx +17 -0
- package/packages/framework/esm-styleguide/src/datepicker/DatePickerInput.tsx +71 -0
- package/packages/framework/esm-styleguide/src/datepicker/DateSegment.tsx +72 -0
- package/packages/framework/esm-styleguide/src/datepicker/MonthYear.tsx +87 -0
- package/packages/framework/esm-styleguide/src/datepicker/OpenmrsDatePicker.tsx +243 -0
- package/packages/framework/esm-styleguide/src/datepicker/auto-close-dialog.component.tsx +24 -0
- package/packages/framework/esm-styleguide/src/datepicker/date-range/date-range-icon.component.tsx +13 -0
- package/packages/framework/esm-styleguide/src/datepicker/date-range/date-range-picker.component.tsx +248 -0
- package/packages/framework/esm-styleguide/src/datepicker/date-range/date-range-picker.module.scss +38 -0
- package/packages/framework/esm-styleguide/src/datepicker/date-range/date-range-picker.test.tsx +98 -0
- package/packages/framework/esm-styleguide/src/datepicker/datepicker.module.scss +389 -0
- package/packages/framework/esm-styleguide/src/datepicker/datepicker.test.tsx +64 -0
- package/packages/framework/esm-styleguide/src/datepicker/hooks.ts +98 -0
- package/packages/framework/esm-styleguide/src/datepicker/index.tsx +2 -0
- package/packages/framework/esm-styleguide/src/datepicker/locale-context.ts +5 -0
- package/packages/framework/esm-styleguide/src/datepicker/utils.ts +75 -0
- package/packages/framework/esm-styleguide/src/declarations.d.ts +19 -0
- package/packages/framework/esm-styleguide/src/diagnosis-tags/diagnosis-tags.component.tsx +38 -0
- package/packages/framework/esm-styleguide/src/diagnosis-tags/diagnosis-tags.module.scss +8 -0
- package/packages/framework/esm-styleguide/src/diagnosis-tags/index.tsx +1 -0
- package/packages/framework/esm-styleguide/src/empty-card/empty-card-registration.ts +6 -0
- package/packages/framework/esm-styleguide/src/empty-card/empty-card.component.tsx +55 -0
- package/packages/framework/esm-styleguide/src/empty-card/empty-card.module.scss +27 -0
- package/packages/framework/esm-styleguide/src/empty-card/empty-card.test.tsx +58 -0
- package/packages/framework/esm-styleguide/src/empty-card/empty-data-illustration.svg +32 -0
- package/packages/framework/esm-styleguide/src/empty-card/index.ts +1 -0
- package/packages/framework/esm-styleguide/src/error-state/error-state.component.tsx +30 -0
- package/packages/framework/esm-styleguide/src/error-state/error-state.module.scss +21 -0
- package/packages/framework/esm-styleguide/src/error-state/error-state.test.tsx +50 -0
- package/packages/framework/esm-styleguide/src/error-state/index.ts +1 -0
- package/packages/framework/esm-styleguide/src/icons/icon-registration.ts +194 -0
- package/packages/framework/esm-styleguide/src/icons/icons.module.scss +5 -0
- package/packages/framework/esm-styleguide/src/icons/icons.tsx +936 -0
- package/packages/framework/esm-styleguide/src/icons/index.ts +1 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/activity.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/add.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/arrow-down.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/arrow-left.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/arrow-right.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/arrow-up.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/baby.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/calendar--heat-map.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/calendar.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/caret-down.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/caret-left.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/caret-right.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/caret-up.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/chart-average.svg +9 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/checkmark--filled.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/checkmark--outline.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/chemistry.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/chevron-down.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/chevron-left.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/chevron-right.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/chevron-up.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/close--filled.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/close--outline.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/close.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/document-attachment.svg +7 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/document.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/download.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/drug-order.svg +11 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/edit.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/event-schedule.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/events.svg +8 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/gender-female.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/gender-male.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/gender-other.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/gender-unknown.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/generic-order-type.svg +18 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/group-access.svg +8 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/group.svg +6 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/hospital-bed.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/image-medical.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/information--filled.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/information--square.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/information.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/inventory-management.svg +7 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/lab-order.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/list-checked.svg +6 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/location.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/material-order.svg +13 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/maximize.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/medication.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/message-queue.svg +7 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/microscope.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/money.svg +8 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/mother.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/movement.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/overflow-menu--horizontal.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/overflow-menu--vertical.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/password.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/pedestrian-family.svg +7 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/pen.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/printer.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/procedure-order.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/programs.svg +13 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/referral-order.svg +11 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/renew.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/report.svg +6 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/reset.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/save.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/search.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/settings.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/shopping-cart--arrow-down.svg +6 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/shopping-cart.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/sticky-note-add.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/switcher.svg +11 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/syringe.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/table-of-contents.svg +10 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/table.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/time.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/tools.svg +3 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/translate.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/trash-can.svg +6 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/tree-view--alt.svg +10 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/user-avatar.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/user-follow.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/user-xray.svg +12 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/user.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/view-off.svg +5 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/view.svg +4 -0
- package/packages/framework/esm-styleguide/src/icons/svgs/warning.svg +5 -0
- package/packages/framework/esm-styleguide/src/index.ts +26 -0
- package/packages/framework/esm-styleguide/src/internal.ts +30 -0
- package/packages/framework/esm-styleguide/src/left-nav/index.tsx +63 -0
- package/packages/framework/esm-styleguide/src/left-nav/left-nav.module.scss +43 -0
- package/packages/framework/esm-styleguide/src/location-picker/index.tsx +1 -0
- package/packages/framework/esm-styleguide/src/location-picker/location-picker.component.tsx +142 -0
- package/packages/framework/esm-styleguide/src/location-picker/location-picker.module.scss +71 -0
- package/packages/framework/esm-styleguide/src/location-picker/location-picker.resource.ts +118 -0
- package/packages/framework/esm-styleguide/src/location-picker/location-picker.test.tsx +429 -0
- package/packages/framework/esm-styleguide/src/logo/_logo.scss +34 -0
- package/packages/framework/esm-styleguide/src/logo/index.ts +18 -0
- package/packages/framework/esm-styleguide/src/logo/openmrs-logo-full.svg +32 -0
- package/packages/framework/esm-styleguide/src/logo/openmrs-logo-icon.svg +6 -0
- package/packages/framework/esm-styleguide/src/logo/openmrs-logo-partial.svg +13 -0
- package/packages/framework/esm-styleguide/src/logo/openmrs-logo-white.svg +13 -0
- package/packages/framework/esm-styleguide/src/modals/_modals.scss +13 -0
- package/packages/framework/esm-styleguide/src/modals/index.tsx +226 -0
- package/packages/framework/esm-styleguide/src/notifications/_actionable-notifications.scss +23 -0
- package/packages/framework/esm-styleguide/src/notifications/_notifications.scss +22 -0
- package/packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx +63 -0
- package/packages/framework/esm-styleguide/src/notifications/active-actionable-notifications.component.tsx +40 -0
- package/packages/framework/esm-styleguide/src/notifications/active-notifications.component.tsx +39 -0
- package/packages/framework/esm-styleguide/src/notifications/index.tsx +97 -0
- package/packages/framework/esm-styleguide/src/notifications/notification.component.tsx +39 -0
- package/packages/framework/esm-styleguide/src/page-header/index.ts +1 -0
- package/packages/framework/esm-styleguide/src/page-header/page-header.component.tsx +108 -0
- package/packages/framework/esm-styleguide/src/page-header/page-header.module.scss +28 -0
- package/packages/framework/esm-styleguide/src/page-header/page-header.test.tsx +65 -0
- package/packages/framework/esm-styleguide/src/pagination/index.ts +1 -0
- package/packages/framework/esm-styleguide/src/pagination/pagination.component.tsx +77 -0
- package/packages/framework/esm-styleguide/src/pagination/pagination.module.scss +66 -0
- package/packages/framework/esm-styleguide/src/pagination/pagination.test.tsx +72 -0
- package/packages/framework/esm-styleguide/src/patient-banner/actions-menu/patient-banner-actions-menu.component.tsx +50 -0
- package/packages/framework/esm-styleguide/src/patient-banner/actions-menu/patient-banner-actions-menu.module.scss +23 -0
- package/packages/framework/esm-styleguide/src/patient-banner/contact-details/patient-banner-contact-details.component.tsx +212 -0
- package/packages/framework/esm-styleguide/src/patient-banner/contact-details/patient-banner-contact-details.module.scss +47 -0
- package/packages/framework/esm-styleguide/src/patient-banner/contact-details/patient-banner-contact-details.test.tsx +195 -0
- package/packages/framework/esm-styleguide/src/patient-banner/contact-details/patient-banner-toggle-contact-details-button.component.tsx +32 -0
- package/packages/framework/esm-styleguide/src/patient-banner/contact-details/types.ts +54 -0
- package/packages/framework/esm-styleguide/src/patient-banner/contact-details/usePatientAttributes.ts +59 -0
- package/packages/framework/esm-styleguide/src/patient-banner/contact-details/usePatientListsForPatient.ts +21 -0
- package/packages/framework/esm-styleguide/src/patient-banner/contact-details/useRelationships.ts +85 -0
- package/packages/framework/esm-styleguide/src/patient-banner/index.ts +5 -0
- package/packages/framework/esm-styleguide/src/patient-banner/patient-info/patient-banner-patient-identifiers.component.tsx +72 -0
- package/packages/framework/esm-styleguide/src/patient-banner/patient-info/patient-banner-patient-identifiers.test.tsx +76 -0
- package/packages/framework/esm-styleguide/src/patient-banner/patient-info/patient-banner-patient-info.component.tsx +100 -0
- package/packages/framework/esm-styleguide/src/patient-banner/patient-info/patient-banner-patient-info.module.scss +156 -0
- package/packages/framework/esm-styleguide/src/patient-banner/patient-info/patient-banner-patient-info.test.tsx +91 -0
- package/packages/framework/esm-styleguide/src/patient-photo/index.ts +2 -0
- package/packages/framework/esm-styleguide/src/patient-photo/loader-icon.component.tsx +16 -0
- package/packages/framework/esm-styleguide/src/patient-photo/patient-photo.component.tsx +99 -0
- package/packages/framework/esm-styleguide/src/patient-photo/patient-photo.module.scss +4 -0
- package/packages/framework/esm-styleguide/src/patient-photo/patient-photo.test.tsx +187 -0
- package/packages/framework/esm-styleguide/src/patient-photo/placeholder-icon.component.tsx +32 -0
- package/packages/framework/esm-styleguide/src/patient-photo/usePatientPhoto.ts +53 -0
- package/packages/framework/esm-styleguide/src/pictograms/index.ts +1 -0
- package/packages/framework/esm-styleguide/src/pictograms/pictogram-registration.ts +66 -0
- package/packages/framework/esm-styleguide/src/pictograms/pictograms.module.scss +5 -0
- package/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx +277 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/appointments.svg +10 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/assessment-1.svg +8 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/assessment-2.svg +6 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/blood-bank.svg +4 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/cardiology.svg +4 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/ct-scan.svg +5 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/dentistry.svg +3 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/emergency-department.svg +4 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/facility.svg +23 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/geriatrics.svg +8 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/gynaecology.svg +7 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/in-patient.svg +7 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/inventory.svg +6 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/labs-2.svg +12 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/labs.svg +7 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/obstetrics.svg +5 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/patient-search.svg +4 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/patients.svg +5 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/payments-desk.svg +11 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/pharmacy-1.svg +4 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/pharmacy-2.svg +6 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/registration.svg +7 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/service-queues.svg +5 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/transfer.svg +6 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/triage.svg +6 -0
- package/packages/framework/esm-styleguide/src/pictograms/svgs/x-ray.svg +5 -0
- package/packages/framework/esm-styleguide/src/public.ts +38 -0
- package/packages/framework/esm-styleguide/src/responsive-wrapper/index.ts +1 -0
- package/packages/framework/esm-styleguide/src/responsive-wrapper/responsive-wrapper.component.tsx +24 -0
- package/packages/framework/esm-styleguide/src/snackbars/_snackbars.scss +31 -0
- package/packages/framework/esm-styleguide/src/snackbars/active-snackbar.component.tsx +45 -0
- package/packages/framework/esm-styleguide/src/snackbars/index.tsx +45 -0
- package/packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx +104 -0
- package/packages/framework/esm-styleguide/src/snackbars/snackbar.module.scss +30 -0
- package/packages/framework/esm-styleguide/src/snackbars/snackbar.test.tsx +89 -0
- package/packages/framework/esm-styleguide/src/spinner/_spinner.scss +14 -0
- package/packages/framework/esm-styleguide/src/spinner/index.ts +14 -0
- package/packages/framework/esm-styleguide/src/svg-utils.ts +31 -0
- package/packages/framework/esm-styleguide/src/test-utils.tsx +19 -0
- package/packages/framework/esm-styleguide/src/toasts/_toasts.scss +22 -0
- package/packages/framework/esm-styleguide/src/toasts/active-toasts.component.tsx +45 -0
- package/packages/framework/esm-styleguide/src/toasts/index.tsx +52 -0
- package/packages/framework/esm-styleguide/src/toasts/toast.component.tsx +45 -0
- package/packages/framework/esm-styleguide/src/utils.ts +20 -0
- package/packages/framework/esm-styleguide/src/workspaces/action-menu-button/action-menu-button.component.tsx +89 -0
- package/packages/framework/esm-styleguide/src/workspaces/action-menu-button/action-menu-button.module.scss +111 -0
- package/packages/framework/esm-styleguide/src/workspaces/action-menu-button/action-menu-button.test.tsx +263 -0
- package/packages/framework/esm-styleguide/src/workspaces/container/action-menu.component.tsx +47 -0
- package/packages/framework/esm-styleguide/src/workspaces/container/action-menu.module.scss +89 -0
- package/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx +258 -0
- package/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.test.tsx +261 -0
- package/packages/framework/esm-styleguide/src/workspaces/container/workspace-renderer.component.tsx +50 -0
- package/packages/framework/esm-styleguide/src/workspaces/container/workspace-renderer.test.tsx +66 -0
- package/packages/framework/esm-styleguide/src/workspaces/container/workspace.module.scss +276 -0
- package/packages/framework/esm-styleguide/src/workspaces/index.ts +5 -0
- package/packages/framework/esm-styleguide/src/workspaces/notification/workspace-notification.component.tsx +101 -0
- package/packages/framework/esm-styleguide/src/workspaces/notification/workspace-notification.module.scss +5 -0
- package/packages/framework/esm-styleguide/src/workspaces/public.ts +16 -0
- package/packages/framework/esm-styleguide/src/workspaces/workspace-sidebar-store/useWorkspaceGroupStore.ts +39 -0
- package/packages/framework/esm-styleguide/src/workspaces/workspaces.test.ts +820 -0
- package/packages/framework/esm-styleguide/src/workspaces/workspaces.ts +677 -0
- package/packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu-button2.component.tsx +134 -0
- package/packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu-button2.module.scss +103 -0
- package/packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu2.component.tsx +75 -0
- package/packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu2.module.scss +95 -0
- package/packages/framework/esm-styleguide/src/workspaces2/active-workspace-window.component.tsx +152 -0
- package/packages/framework/esm-styleguide/src/workspaces2/index.tsx +3 -0
- package/packages/framework/esm-styleguide/src/workspaces2/workspace-windows-and-menu.component.tsx +67 -0
- package/packages/framework/esm-styleguide/src/workspaces2/workspace-windows-and-menu.module.scss +33 -0
- package/packages/framework/esm-styleguide/src/workspaces2/workspace2-close-prompt.modal.tsx +43 -0
- package/packages/framework/esm-styleguide/src/workspaces2/workspace2-close-prompt.module.scss +8 -0
- package/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx +211 -0
- package/packages/framework/esm-styleguide/src/workspaces2/workspace2.module.scss +208 -0
- package/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts +611 -0
- package/packages/framework/esm-styleguide/tsconfig.build.json +10 -0
- package/packages/framework/esm-styleguide/tsconfig.json +5 -0
- package/packages/framework/esm-styleguide/vitest.config.ts +17 -0
- package/packages/framework/esm-translations/.swcrc +16 -0
- package/packages/framework/esm-translations/README.md +15 -0
- package/packages/framework/esm-translations/custom-i18next-parser-lexer.mjs +25 -0
- package/packages/framework/esm-translations/i18next-parser.config.mjs +76 -0
- package/packages/framework/esm-translations/mock-jest.ts +25 -0
- package/packages/framework/esm-translations/mock.ts +26 -0
- package/packages/framework/esm-translations/package.json +69 -0
- package/packages/framework/esm-translations/src/index.ts +76 -0
- package/packages/framework/esm-translations/src/public.ts +1 -0
- package/packages/framework/esm-translations/src/translations.ts +106 -0
- package/packages/framework/esm-translations/translations/am.json +85 -0
- package/packages/framework/esm-translations/translations/ar.json +85 -0
- package/packages/framework/esm-translations/translations/ar_SY.json +85 -0
- package/packages/framework/esm-translations/translations/bn.json +85 -0
- package/packages/framework/esm-translations/translations/cs.json +85 -0
- package/packages/framework/esm-translations/translations/de.json +85 -0
- package/packages/framework/esm-translations/translations/en.json +85 -0
- package/packages/framework/esm-translations/translations/en_US.json +85 -0
- package/packages/framework/esm-translations/translations/es.json +85 -0
- package/packages/framework/esm-translations/translations/es_MX.json +85 -0
- package/packages/framework/esm-translations/translations/fr.json +85 -0
- package/packages/framework/esm-translations/translations/he.json +85 -0
- package/packages/framework/esm-translations/translations/hi.json +85 -0
- package/packages/framework/esm-translations/translations/hi_IN.json +85 -0
- package/packages/framework/esm-translations/translations/id.json +85 -0
- package/packages/framework/esm-translations/translations/it.json +85 -0
- package/packages/framework/esm-translations/translations/ka.json +85 -0
- package/packages/framework/esm-translations/translations/km.json +85 -0
- package/packages/framework/esm-translations/translations/ku.json +85 -0
- package/packages/framework/esm-translations/translations/ky.json +85 -0
- package/packages/framework/esm-translations/translations/lg.json +85 -0
- package/packages/framework/esm-translations/translations/ne.json +85 -0
- package/packages/framework/esm-translations/translations/pl.json +85 -0
- package/packages/framework/esm-translations/translations/pt.json +85 -0
- package/packages/framework/esm-translations/translations/pt_BR.json +85 -0
- package/packages/framework/esm-translations/translations/qu.json +85 -0
- package/packages/framework/esm-translations/translations/ro_RO.json +85 -0
- package/packages/framework/esm-translations/translations/ru_RU.json +85 -0
- package/packages/framework/esm-translations/translations/si.json +85 -0
- package/packages/framework/esm-translations/translations/sq.json +85 -0
- package/packages/framework/esm-translations/translations/sw.json +85 -0
- package/packages/framework/esm-translations/translations/sw_KE.json +85 -0
- package/packages/framework/esm-translations/translations/tr.json +85 -0
- package/packages/framework/esm-translations/translations/tr_TR.json +85 -0
- package/packages/framework/esm-translations/translations/uk.json +85 -0
- package/packages/framework/esm-translations/translations/uz.json +85 -0
- package/packages/framework/esm-translations/translations/uz@Latn.json +85 -0
- package/packages/framework/esm-translations/translations/uz_UZ.json +85 -0
- package/packages/framework/esm-translations/translations/vi.json +85 -0
- package/packages/framework/esm-translations/translations/zh.json +85 -0
- package/packages/framework/esm-translations/translations/zh_CN.json +85 -0
- package/packages/framework/esm-translations/translations/zh_TW.json +85 -0
- package/packages/framework/esm-translations/tsconfig.build.json +9 -0
- package/packages/framework/esm-translations/tsconfig.json +5 -0
- package/packages/framework/esm-utils/.swcrc +16 -0
- package/packages/framework/esm-utils/README.md +3 -0
- package/packages/framework/esm-utils/package.json +76 -0
- package/packages/framework/esm-utils/src/age-helpers.test.ts +103 -0
- package/packages/framework/esm-utils/src/age-helpers.ts +95 -0
- package/packages/framework/esm-utils/src/dates/date-util.test.ts +212 -0
- package/packages/framework/esm-utils/src/dates/date-util.ts +429 -0
- package/packages/framework/esm-utils/src/dates/index.ts +1 -0
- package/packages/framework/esm-utils/src/get-locale.ts +14 -0
- package/packages/framework/esm-utils/src/index.ts +10 -0
- package/packages/framework/esm-utils/src/is-online.ts +5 -0
- package/packages/framework/esm-utils/src/patient-helpers.test.data.ts +146 -0
- package/packages/framework/esm-utils/src/patient-helpers.test.ts +70 -0
- package/packages/framework/esm-utils/src/patient-helpers.ts +95 -0
- package/packages/framework/esm-utils/src/retry.ts +78 -0
- package/packages/framework/esm-utils/src/shallowEqual.ts +46 -0
- package/packages/framework/esm-utils/src/storage.ts +18 -0
- package/packages/framework/esm-utils/src/test-helpers.ts +36 -0
- package/packages/framework/esm-utils/src/version.test.ts +69 -0
- package/packages/framework/esm-utils/src/version.ts +28 -0
- package/packages/framework/esm-utils/tsconfig.build.json +9 -0
- package/packages/framework/esm-utils/tsconfig.json +5 -0
- package/packages/framework/esm-utils/vitest.config.ts +8 -0
- package/packages/framework/tsconfig.json +15 -0
- package/packages/shell/esm-app-shell/dependencies.json +14 -0
- package/packages/shell/esm-app-shell/package.json +68 -0
- package/packages/shell/esm-app-shell/src/assets/favicon.ico +0 -0
- package/packages/shell/esm-app-shell/src/assets/logo-512.png +0 -0
- package/packages/shell/esm-app-shell/src/assets/logo.svg +30 -0
- package/packages/shell/esm-app-shell/src/core-config.ts +38 -0
- package/packages/shell/esm-app-shell/src/events.ts +16 -0
- package/packages/shell/esm-app-shell/src/index.ejs +102 -0
- package/packages/shell/esm-app-shell/src/index.ts +79 -0
- package/packages/shell/esm-app-shell/src/locale.ts +129 -0
- package/packages/shell/esm-app-shell/src/optionaldeps.ts +64 -0
- package/packages/shell/esm-app-shell/src/routing-events.ts +59 -0
- package/packages/shell/esm-app-shell/src/run.ts +450 -0
- package/packages/shell/esm-app-shell/src/service-worker/caching.ts +96 -0
- package/packages/shell/esm-app-shell/src/service-worker/constants.ts +19 -0
- package/packages/shell/esm-app-shell/src/service-worker/http-header-utils.ts +29 -0
- package/packages/shell/esm-app-shell/src/service-worker/import-map-utils.ts +65 -0
- package/packages/shell/esm-app-shell/src/service-worker/index.ts +27 -0
- package/packages/shell/esm-app-shell/src/service-worker/message.ts +78 -0
- package/packages/shell/esm-app-shell/src/service-worker/noop.ts +27 -0
- package/packages/shell/esm-app-shell/src/service-worker/routing.ts +113 -0
- package/packages/shell/esm-app-shell/src/service-worker/storage.ts +37 -0
- package/packages/shell/esm-app-shell/src/service-worker/types.ts +21 -0
- package/packages/shell/esm-app-shell/src/ui/breadcrumbs.tsx +86 -0
- package/packages/shell/esm-app-shell/src/ui/index.ts +20 -0
- package/packages/shell/esm-app-shell/tools/helpers.js +26 -0
- package/packages/shell/esm-app-shell/tsconfig.json +24 -0
- package/packages/shell/esm-app-shell/webpack.config.js +438 -0
- package/packages/tooling/openmrs/README.md +71 -0
- package/packages/tooling/openmrs/default-rspack-config.js +3 -0
- package/packages/tooling/openmrs/default-webpack-config.js +3 -0
- package/packages/tooling/openmrs/package.json +88 -0
- package/packages/tooling/openmrs/src/cli.ts +426 -0
- package/packages/tooling/openmrs/src/commands/assemble.ts +331 -0
- package/packages/tooling/openmrs/src/commands/build.ts +157 -0
- package/packages/tooling/openmrs/src/commands/debug.ts +55 -0
- package/packages/tooling/openmrs/src/commands/develop.ts +187 -0
- package/packages/tooling/openmrs/src/commands/index.ts +5 -0
- package/packages/tooling/openmrs/src/commands/start.ts +58 -0
- package/packages/tooling/openmrs/src/index.ts +3 -0
- package/packages/tooling/openmrs/src/runner.ts +23 -0
- package/packages/tooling/openmrs/src/utils/config.ts +108 -0
- package/packages/tooling/openmrs/src/utils/debugger.ts +60 -0
- package/packages/tooling/openmrs/src/utils/dependencies.ts +48 -0
- package/packages/tooling/openmrs/src/utils/devserver.ts +11 -0
- package/packages/tooling/openmrs/src/utils/helpers.ts +19 -0
- package/packages/tooling/openmrs/src/utils/importmap.ts +419 -0
- package/packages/tooling/openmrs/src/utils/index.ts +6 -0
- package/packages/tooling/openmrs/src/utils/logger.ts +14 -0
- package/packages/tooling/openmrs/src/utils/npmConfig.ts +50 -0
- package/packages/tooling/openmrs/src/utils/untar.ts +36 -0
- package/packages/tooling/openmrs/src/utils/variables.ts +5 -0
- package/packages/tooling/openmrs/tsconfig.json +15 -0
- package/packages/tooling/rspack-config/package.json +53 -0
- package/packages/tooling/rspack-config/src/index.ts +363 -0
- package/packages/tooling/rspack-config/tsconfig.json +15 -0
- package/packages/tooling/typedoc-plugin-file-categories/.swcrc +16 -0
- package/packages/tooling/typedoc-plugin-file-categories/package.json +25 -0
- package/packages/tooling/typedoc-plugin-file-categories/src/index.ts +53 -0
- package/packages/tooling/typedoc-plugin-file-categories/tsconfig.json +15 -0
- package/packages/tooling/typedoc-plugin-file-categories/vitest.config.ts +7 -0
- package/packages/tooling/webpack-config/package.json +56 -0
- package/packages/tooling/webpack-config/src/index.ts +364 -0
- package/packages/tooling/webpack-config/tsconfig.json +15 -0
- package/playwright.config.ts +50 -0
- package/prettier.config.js +11 -0
- package/staging-config.json +4 -0
- package/tools/i18next-parser.config.js +104 -0
- package/turbo.json +32 -0
|
@@ -0,0 +1,941 @@
|
|
|
1
|
+
/** @module @category Config */
|
|
2
|
+
import { clone, equals, reduce, mergeDeepRight, omit } from 'ramda';
|
|
3
|
+
import type { Config, ConfigObject, ConfigSchema, ExtensionSlotConfig } from '../types';
|
|
4
|
+
import { Type } from '../types';
|
|
5
|
+
import { isArray, isBoolean, isUuid, isNumber, isObject, isString } from '../validators/type-validators';
|
|
6
|
+
import { validator } from '../validators/validator';
|
|
7
|
+
import { type ConfigExtensionStore, type ConfigInternalStore, type ConfigStore } from './state';
|
|
8
|
+
import {
|
|
9
|
+
configExtensionStore,
|
|
10
|
+
configInternalStore,
|
|
11
|
+
getConfigStore,
|
|
12
|
+
getExtensionConfig,
|
|
13
|
+
getExtensionSlotsConfigStore,
|
|
14
|
+
getExtensionsConfigStore,
|
|
15
|
+
implementerToolsConfigStore,
|
|
16
|
+
temporaryConfigStore,
|
|
17
|
+
} from './state';
|
|
18
|
+
import { type TemporaryConfigStore } from '..';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Store setup
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* Set up stores and subscriptions so that inputs get processed appropriately.
|
|
25
|
+
*
|
|
26
|
+
* There are *input* stores and *output* stores. The *input* stores
|
|
27
|
+
* are configInternalStore, temporaryConfigStore, and configExtensionStore. The
|
|
28
|
+
* output stores are set in the `compute...` functions. They are the module
|
|
29
|
+
* config stores, the extension slot config stores (by module), the extension
|
|
30
|
+
* config stores, and the implementer tools config store.
|
|
31
|
+
*
|
|
32
|
+
* This code sets up the subscriptions so that when an input store changes,
|
|
33
|
+
* the correct set of output stores are updated.
|
|
34
|
+
*
|
|
35
|
+
* All `compute...` functions except `computeExtensionConfigs` are pure
|
|
36
|
+
* (or are supposed to be), other than the fact that they all `setState`
|
|
37
|
+
* store values at the end. `computeExtensionConfigs` calls `getGlobalStore`,
|
|
38
|
+
* which creates stores.
|
|
39
|
+
*/
|
|
40
|
+
// Store unsubscribe functions to allow cleanup (e.g., in tests or hot module reloading)
|
|
41
|
+
const configSubscriptions: Array<() => void> = [];
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Recomputes all configuration derived stores based on current state of input stores.
|
|
45
|
+
* Called whenever any input store (configInternalStore, temporaryConfigStore, configExtensionStore) changes.
|
|
46
|
+
*/
|
|
47
|
+
function recomputeAllConfigs() {
|
|
48
|
+
const configState = configInternalStore.getState();
|
|
49
|
+
const tempConfigState = temporaryConfigStore.getState();
|
|
50
|
+
const extensionState = configExtensionStore.getState();
|
|
51
|
+
|
|
52
|
+
computeModuleConfig(configState, tempConfigState);
|
|
53
|
+
computeImplementerToolsConfig(configState, tempConfigState);
|
|
54
|
+
computeExtensionSlotConfigs(configState, tempConfigState);
|
|
55
|
+
computeExtensionConfigs(configState, extensionState, tempConfigState);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function setupConfigSubscriptions() {
|
|
59
|
+
// Initial computation
|
|
60
|
+
recomputeAllConfigs();
|
|
61
|
+
|
|
62
|
+
// Subscribe to all input stores with a single handler
|
|
63
|
+
// This ensures we only recompute once even if multiple stores change simultaneously
|
|
64
|
+
configSubscriptions.push(configInternalStore.subscribe(recomputeAllConfigs));
|
|
65
|
+
configSubscriptions.push(temporaryConfigStore.subscribe(recomputeAllConfigs));
|
|
66
|
+
configSubscriptions.push(configExtensionStore.subscribe(recomputeAllConfigs));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Set up subscriptions at module load time
|
|
70
|
+
setupConfigSubscriptions();
|
|
71
|
+
|
|
72
|
+
function computeModuleConfig(state: ConfigInternalStore, tempState: TemporaryConfigStore) {
|
|
73
|
+
for (let moduleName of Object.keys(state.schemas)) {
|
|
74
|
+
// At this point the schema could be either just the implicit schema or the actually
|
|
75
|
+
// defined schema. We run with just the implicit schema because we want to populate
|
|
76
|
+
// the config store with the translation overrides as soon as possible. In fact, the
|
|
77
|
+
// translation system will throw for Suspense until the translation overrides are
|
|
78
|
+
// available, which as of this writing blocks the schema definition from occurring
|
|
79
|
+
// for modules loaded based on their extensions.
|
|
80
|
+
const moduleStore = getConfigStore(moduleName);
|
|
81
|
+
let newState;
|
|
82
|
+
if (state.moduleLoaded[moduleName]) {
|
|
83
|
+
const config = getConfigForModule(moduleName, state, tempState);
|
|
84
|
+
newState = {
|
|
85
|
+
translationOverridesLoaded: true,
|
|
86
|
+
loaded: true,
|
|
87
|
+
config,
|
|
88
|
+
};
|
|
89
|
+
} else {
|
|
90
|
+
const config = getConfigForModuleImplicitSchema(moduleName, state, tempState);
|
|
91
|
+
newState = {
|
|
92
|
+
translationOverridesLoaded: true,
|
|
93
|
+
loaded: false,
|
|
94
|
+
config,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
moduleStore.setState(newState);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function computeExtensionSlotConfigs(state: ConfigInternalStore, tempState: TemporaryConfigStore) {
|
|
103
|
+
const slotConfigs = getExtensionSlotConfigs(state, tempState);
|
|
104
|
+
const newSlotStoreEntries = Object.fromEntries(
|
|
105
|
+
Object.entries(slotConfigs).map(([slotName, config]) => [slotName, { loaded: true, config }]),
|
|
106
|
+
);
|
|
107
|
+
const slotStore = getExtensionSlotsConfigStore();
|
|
108
|
+
const oldState = slotStore.getState();
|
|
109
|
+
const newState = { slots: { ...oldState.slots, ...newSlotStoreEntries } };
|
|
110
|
+
|
|
111
|
+
if (!equals(oldState.slots, newState.slots)) {
|
|
112
|
+
slotStore.setState(newState);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function computeImplementerToolsConfig(state: ConfigInternalStore, tempConfigState: TemporaryConfigStore) {
|
|
117
|
+
const oldState = implementerToolsConfigStore.getState();
|
|
118
|
+
const config = getImplementerToolsConfig(state, tempConfigState);
|
|
119
|
+
const newState = { config };
|
|
120
|
+
|
|
121
|
+
// Use deep equality on the actual config content, not the wrapper object
|
|
122
|
+
if (!equals(oldState.config, newState.config)) {
|
|
123
|
+
implementerToolsConfigStore.setState(newState);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function computeExtensionConfigs(
|
|
128
|
+
configState: ConfigInternalStore,
|
|
129
|
+
extensionState: ConfigExtensionStore,
|
|
130
|
+
tempConfigState: TemporaryConfigStore,
|
|
131
|
+
) {
|
|
132
|
+
const configs = {};
|
|
133
|
+
// We assume that the module schema has already been defined, since the extension
|
|
134
|
+
// it contains is mounted.
|
|
135
|
+
for (let extension of extensionState.mountedExtensions) {
|
|
136
|
+
const config = computeExtensionConfig(
|
|
137
|
+
extension.slotModuleName,
|
|
138
|
+
extension.extensionModuleName,
|
|
139
|
+
extension.slotName,
|
|
140
|
+
extension.extensionId,
|
|
141
|
+
configState,
|
|
142
|
+
tempConfigState,
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
if (!configs[extension.slotName]) {
|
|
146
|
+
configs[extension.slotName] = {};
|
|
147
|
+
}
|
|
148
|
+
configs[extension.slotName][extension.extensionId] = { config, loaded: true };
|
|
149
|
+
}
|
|
150
|
+
const extensionsConfigStore = getExtensionsConfigStore();
|
|
151
|
+
const oldState = extensionsConfigStore.getState();
|
|
152
|
+
const newState = { configs };
|
|
153
|
+
|
|
154
|
+
// Use deep equality to only update if configs actually changed
|
|
155
|
+
if (!equals(oldState.configs, newState.configs)) {
|
|
156
|
+
extensionsConfigStore.setState(newState);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/*
|
|
161
|
+
* API
|
|
162
|
+
*
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* This defines a configuration schema for a module. The schema tells the
|
|
167
|
+
* configuration system how the module can be configured. It specifies
|
|
168
|
+
* what makes configuration valid or invalid.
|
|
169
|
+
*
|
|
170
|
+
* See [Configuration System](https://o3-docs.openmrs.org/docs/configuration-system)
|
|
171
|
+
* for more information about defining a config schema.
|
|
172
|
+
*
|
|
173
|
+
* @param moduleName Name of the module the schema is being defined for. Generally
|
|
174
|
+
* should be the one in which the `defineConfigSchema` call takes place.
|
|
175
|
+
* @param schema The config schema for the module
|
|
176
|
+
*/
|
|
177
|
+
export function defineConfigSchema(moduleName: string, schema: ConfigSchema) {
|
|
178
|
+
validateConfigSchema(moduleName, schema);
|
|
179
|
+
const enhancedSchema = mergeDeepRight(schema, implicitConfigSchema) as ConfigSchema;
|
|
180
|
+
|
|
181
|
+
configInternalStore.setState((state) => ({
|
|
182
|
+
...state,
|
|
183
|
+
schemas: { ...state.schemas, [moduleName]: enhancedSchema },
|
|
184
|
+
moduleLoaded: { ...state.moduleLoaded, [moduleName]: true },
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* This alerts the configuration system that a module exists. This allows config to be
|
|
190
|
+
* processed, while still allowing the extension system to know whether the module has
|
|
191
|
+
* actually had its front bundle executed yet.
|
|
192
|
+
*
|
|
193
|
+
* This should only be used in esm-app-shell.
|
|
194
|
+
*
|
|
195
|
+
* @internal
|
|
196
|
+
* @param moduleName
|
|
197
|
+
*/
|
|
198
|
+
export function registerModuleWithConfigSystem(moduleName: string) {
|
|
199
|
+
configInternalStore.setState((state) => ({
|
|
200
|
+
...state,
|
|
201
|
+
schemas: { ...state.schemas, [moduleName]: implicitConfigSchema },
|
|
202
|
+
}));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* This alerts the configuration system that a module has been loaded.
|
|
207
|
+
*
|
|
208
|
+
* This should only be used in esm-app-shell.
|
|
209
|
+
*
|
|
210
|
+
* @internal
|
|
211
|
+
* @param moduleName
|
|
212
|
+
*/
|
|
213
|
+
export function registerModuleLoad(moduleName: string) {
|
|
214
|
+
configInternalStore.setState((state) => ({
|
|
215
|
+
...state,
|
|
216
|
+
moduleLoaded: { ...state.moduleLoaded, [moduleName]: true },
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* This allows the config system to support translation overrides for namespaces that
|
|
222
|
+
* do not correspond to modules.
|
|
223
|
+
*
|
|
224
|
+
* This should only be used in esm-app-shell.
|
|
225
|
+
*
|
|
226
|
+
* @internal
|
|
227
|
+
* @param namespace
|
|
228
|
+
*/
|
|
229
|
+
export function registerTranslationNamespace(namespace: string) {
|
|
230
|
+
configInternalStore.setState((state) => ({
|
|
231
|
+
...state,
|
|
232
|
+
schemas: { ...state.schemas, [namespace]: translationOverridesSchema },
|
|
233
|
+
}));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* This defines a configuration schema for an extension. When a schema is defined
|
|
238
|
+
* for an extension, that extension will receive the configuration corresponding
|
|
239
|
+
* to that schema, rather than the configuration corresponding to the module
|
|
240
|
+
* in which it is defined.
|
|
241
|
+
*
|
|
242
|
+
* The schema tells the configuration system how the module can be configured.
|
|
243
|
+
* It specifies what makes configuration valid or invalid.
|
|
244
|
+
*
|
|
245
|
+
* See [Configuration System](https://o3-docs.openmrs.org/docs/configuration-system)
|
|
246
|
+
* for more information about defining a config schema.
|
|
247
|
+
*
|
|
248
|
+
* @param extensionName Name of the extension the schema is being defined for.
|
|
249
|
+
* Should match the `name` of one of the `extensions` entries defined in
|
|
250
|
+
* the app's `routes.json` file.
|
|
251
|
+
* @param schema The config schema for the extension
|
|
252
|
+
*/
|
|
253
|
+
export function defineExtensionConfigSchema(extensionName: string, schema: ConfigSchema) {
|
|
254
|
+
validateConfigSchema(extensionName, schema);
|
|
255
|
+
const enhancedSchema = mergeDeepRight(schema, implicitConfigSchema) as ConfigSchema;
|
|
256
|
+
|
|
257
|
+
const state = configInternalStore.getState();
|
|
258
|
+
if (state.schemas[extensionName]) {
|
|
259
|
+
console.error(
|
|
260
|
+
`Config schema for extension ${extensionName} already exists. If there are multiple extensions with this same name, one will probably crash.`,
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
configInternalStore.setState((state) => ({
|
|
265
|
+
...state,
|
|
266
|
+
schemas: { ...state.schemas, [extensionName]: enhancedSchema },
|
|
267
|
+
}));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function provide(config: Config, sourceName = 'provided') {
|
|
271
|
+
configInternalStore.setState((state) => ({
|
|
272
|
+
...state,
|
|
273
|
+
providedConfigs: [...state.providedConfigs, { source: sourceName, config }],
|
|
274
|
+
}));
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* A promise-based way to access the config as soon as it is fully loaded.
|
|
279
|
+
* If it is already loaded, resolves the config in its present state.
|
|
280
|
+
*
|
|
281
|
+
* This is a useful function if you need to get the config in the course
|
|
282
|
+
* of the execution of a function.
|
|
283
|
+
*
|
|
284
|
+
* @param moduleName The name of the module for which to look up the config
|
|
285
|
+
*/
|
|
286
|
+
export function getConfig<T = Record<string, any>>(moduleName: string): Promise<T> {
|
|
287
|
+
return new Promise<T>((resolve) => {
|
|
288
|
+
const store = getConfigStore(moduleName);
|
|
289
|
+
function update(state: ConfigStore) {
|
|
290
|
+
if (state.loaded && state.config) {
|
|
291
|
+
const config = omit(['Display conditions', 'Translation overrides'], state.config);
|
|
292
|
+
resolve(config as T);
|
|
293
|
+
|
|
294
|
+
if (unsubscribe) {
|
|
295
|
+
unsubscribe();
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
update(store.getState());
|
|
300
|
+
const unsubscribe = store.subscribe(update);
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** @internal */
|
|
305
|
+
export function getTranslationOverrides(
|
|
306
|
+
moduleName: string,
|
|
307
|
+
slotName?: string,
|
|
308
|
+
extensionId?: string,
|
|
309
|
+
): Promise<Array<Record<string, Record<string, string>>>> {
|
|
310
|
+
const promises = [
|
|
311
|
+
new Promise<Record<string, Record<string, string>>>((resolve) => {
|
|
312
|
+
const configStore = getConfigStore(moduleName);
|
|
313
|
+
function update(state: ReturnType<(typeof configStore)['getState']>) {
|
|
314
|
+
if (state.translationOverridesLoaded && state.config) {
|
|
315
|
+
const translationOverrides = state.config['Translation overrides'] ?? {};
|
|
316
|
+
resolve(translationOverrides);
|
|
317
|
+
|
|
318
|
+
if (unsubscribe) {
|
|
319
|
+
unsubscribe();
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
update(configStore.getState());
|
|
324
|
+
const unsubscribe = configStore.subscribe(update);
|
|
325
|
+
}),
|
|
326
|
+
];
|
|
327
|
+
|
|
328
|
+
if (slotName && extensionId) {
|
|
329
|
+
promises.push(
|
|
330
|
+
new Promise<Record<string, Record<string, string>>>((resolve) => {
|
|
331
|
+
const configStore = getExtensionConfig(slotName, extensionId);
|
|
332
|
+
function update(state: ReturnType<(typeof configStore)['getState']>) {
|
|
333
|
+
if (state.loaded && state.config) {
|
|
334
|
+
const translationOverrides = state.config['Translation overrides'] ?? {};
|
|
335
|
+
resolve(translationOverrides);
|
|
336
|
+
|
|
337
|
+
if (unsubscribe) {
|
|
338
|
+
unsubscribe();
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
update(configStore.getState());
|
|
343
|
+
const unsubscribe = configStore.subscribe(update);
|
|
344
|
+
}),
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return Promise.all(promises);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Validate and interpolate defaults for `providedConfig` according to `schema`
|
|
353
|
+
*
|
|
354
|
+
* @param schema a configuration schema
|
|
355
|
+
* @param providedConfig an object of config values (without the top-level module name)
|
|
356
|
+
* @param keyPathContext a dot-deparated string which helps the user figure out where
|
|
357
|
+
* the provided config came from
|
|
358
|
+
* @internal
|
|
359
|
+
*/
|
|
360
|
+
export function processConfig(schema: ConfigSchema, providedConfig: ConfigObject, keyPathContext: string) {
|
|
361
|
+
validateStructure(schema, providedConfig, keyPathContext);
|
|
362
|
+
const config = setDefaults(schema, providedConfig);
|
|
363
|
+
runAllValidatorsInConfigTree(schema, config, keyPathContext);
|
|
364
|
+
return config;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/*
|
|
368
|
+
* Helper functions
|
|
369
|
+
*
|
|
370
|
+
*/
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Returns the configuration for an extension. This configuration is specific
|
|
374
|
+
* to the slot in which it is mounted, and its ID within that slot.
|
|
375
|
+
*
|
|
376
|
+
* The schema for that configuration is the extension schema. If no extension
|
|
377
|
+
* schema has been provided, the schema used is the schema of the module in
|
|
378
|
+
* which the extension is defined.
|
|
379
|
+
*
|
|
380
|
+
* @param slotModuleName The name of the module which defines the extension slot
|
|
381
|
+
* @param extensionModuleName The name of the module which defines the extension (and therefore the config schema)
|
|
382
|
+
* @param slotName The name of the extension slot where the extension is mounted
|
|
383
|
+
* @param extensionId The ID of the extension in its slot
|
|
384
|
+
*/
|
|
385
|
+
function computeExtensionConfig(
|
|
386
|
+
slotModuleName: string,
|
|
387
|
+
extensionModuleName: string,
|
|
388
|
+
slotName: string,
|
|
389
|
+
extensionId: string,
|
|
390
|
+
configState: ConfigInternalStore,
|
|
391
|
+
tempConfigState: TemporaryConfigStore,
|
|
392
|
+
) {
|
|
393
|
+
const extensionName = getExtensionNameFromId(extensionId);
|
|
394
|
+
const extensionConfigSchema = configState.schemas[extensionName];
|
|
395
|
+
const nameOfSchemaSource = extensionConfigSchema ? extensionName : extensionModuleName;
|
|
396
|
+
const providedConfigs = getProvidedConfigs(configState, tempConfigState);
|
|
397
|
+
const slotModuleConfig = mergeConfigsFor(slotModuleName, providedConfigs);
|
|
398
|
+
const configOverride = slotModuleConfig?.extensionSlots?.[slotName]?.configure?.[extensionId] ?? {};
|
|
399
|
+
const extensionConfig = mergeConfigsFor(nameOfSchemaSource, providedConfigs);
|
|
400
|
+
const combinedConfig = mergeConfigs([extensionConfig, configOverride]);
|
|
401
|
+
const schema = extensionConfigSchema ?? configState.schemas[extensionModuleName];
|
|
402
|
+
validateStructure(schema, combinedConfig, nameOfSchemaSource);
|
|
403
|
+
const config = setDefaults(schema, combinedConfig);
|
|
404
|
+
runAllValidatorsInConfigTree(schema, config, nameOfSchemaSource);
|
|
405
|
+
delete config.extensionSlots;
|
|
406
|
+
return config;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
function getImplementerToolsConfig(
|
|
410
|
+
configState: ConfigInternalStore,
|
|
411
|
+
tempConfigState: TemporaryConfigStore,
|
|
412
|
+
): Record<string, Config> {
|
|
413
|
+
let result = getSchemaWithValuesAndSources(clone(configState.schemas));
|
|
414
|
+
const configsAndSources = [
|
|
415
|
+
...configState.providedConfigs.map((c) => [c.config, c.source]),
|
|
416
|
+
[tempConfigState.config, 'temporary config'],
|
|
417
|
+
] as Array<[Config, string]>;
|
|
418
|
+
for (let [config, source] of configsAndSources) {
|
|
419
|
+
result = mergeConfigs([result, createValuesAndSourcesTree(config, source)]);
|
|
420
|
+
}
|
|
421
|
+
return result;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
function getSchemaWithValuesAndSources(schema) {
|
|
425
|
+
if (schema.hasOwnProperty('_default')) {
|
|
426
|
+
return { ...schema, _value: schema._default, _source: 'default' };
|
|
427
|
+
} else if (isOrdinaryObject(schema)) {
|
|
428
|
+
return Object.keys(schema).reduce((obj, key) => {
|
|
429
|
+
obj[key] = getSchemaWithValuesAndSources(schema[key]);
|
|
430
|
+
return obj;
|
|
431
|
+
}, {});
|
|
432
|
+
} else {
|
|
433
|
+
// at this point, the schema is bad and an error will have been logged during schema validation
|
|
434
|
+
return {};
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function createValuesAndSourcesTree(config: ConfigObject, source: string) {
|
|
439
|
+
if (isOrdinaryObject(config)) {
|
|
440
|
+
return Object.keys(config).reduce((obj, key) => {
|
|
441
|
+
obj[key] = createValuesAndSourcesTree(config[key], source);
|
|
442
|
+
return obj;
|
|
443
|
+
}, {});
|
|
444
|
+
} else {
|
|
445
|
+
return { _value: config, _source: source };
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
function getExtensionSlotConfigs(
|
|
450
|
+
configState: ConfigInternalStore,
|
|
451
|
+
tempConfigState: TemporaryConfigStore,
|
|
452
|
+
): Record<string, ExtensionSlotConfig> {
|
|
453
|
+
const allConfigs = mergeConfigs(getProvidedConfigs(configState, tempConfigState));
|
|
454
|
+
const slotConfigPerModule: Record<string, Record<string, ExtensionSlotConfig>> = Object.keys(allConfigs).reduce(
|
|
455
|
+
(obj, key) => {
|
|
456
|
+
if (allConfigs[key]?.extensionSlots) {
|
|
457
|
+
obj[key] = allConfigs[key]?.extensionSlots;
|
|
458
|
+
}
|
|
459
|
+
return obj;
|
|
460
|
+
},
|
|
461
|
+
{},
|
|
462
|
+
);
|
|
463
|
+
validateAllExtensionSlotConfigs(slotConfigPerModule);
|
|
464
|
+
const slotConfigs = Object.keys(slotConfigPerModule).reduce((obj, key) => {
|
|
465
|
+
obj = { ...obj, ...slotConfigPerModule[key] };
|
|
466
|
+
return obj;
|
|
467
|
+
}, {});
|
|
468
|
+
return slotConfigs;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function validateAllExtensionSlotConfigs(slotConfigPerModule: Record<string, Record<string, ExtensionSlotConfig>>) {
|
|
472
|
+
for (let [moduleName, configBySlotName] of Object.entries(slotConfigPerModule)) {
|
|
473
|
+
for (let [slotName, config] of Object.entries(configBySlotName)) {
|
|
474
|
+
validateExtensionSlotConfig(config, moduleName, slotName);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
function validateExtensionSlotConfig(config: ExtensionSlotConfig, moduleName: string, slotName: string): void {
|
|
480
|
+
const keyPath = `${moduleName}.extensionSlots.${slotName}`;
|
|
481
|
+
const errorPrefix = `Extension slot config '${keyPath}'`;
|
|
482
|
+
const invalidKeys = Object.keys(config).filter((k) => !['add', 'remove', 'order', 'configure'].includes(k));
|
|
483
|
+
if (invalidKeys.length) {
|
|
484
|
+
logError(keyPath, errorPrefix + `' contains invalid keys '${invalidKeys.join("', '")}'`);
|
|
485
|
+
}
|
|
486
|
+
if (config.add) {
|
|
487
|
+
if (!Array.isArray(config.add) || !config.add.every((n) => typeof n === 'string')) {
|
|
488
|
+
logError(keyPath, errorPrefix + `.add' is invalid. Must be an array of strings (extension IDs)`);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (config.remove) {
|
|
492
|
+
if (!Array.isArray(config.remove) || !config.remove.every((n) => typeof n === 'string')) {
|
|
493
|
+
logError(keyPath, errorPrefix + `.remove' is invalid. Must be an array of strings (extension IDs)`);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
if (config.order) {
|
|
497
|
+
if (!Array.isArray(config.order) || !config.order.every((n) => typeof n === 'string')) {
|
|
498
|
+
logError(keyPath, errorPrefix + `.order' is invalid. Must be an array of strings (extension IDs)`);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
if (config.configure) {
|
|
502
|
+
if (!isOrdinaryObject(config.configure)) {
|
|
503
|
+
logError(keyPath, errorPrefix + `.configure' is invalid. Must be an object with extension IDs for keys`);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
function getProvidedConfigs(configState: ConfigInternalStore, tempConfigState: TemporaryConfigStore): Array<Config> {
|
|
509
|
+
return [...configState.providedConfigs.map((c) => c.config), tempConfigState.config];
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Validates the config schema for a module. Since problems identified here are programming errors
|
|
514
|
+
* that hopefully will be caught during development, this function logs errors to the console directly;
|
|
515
|
+
* it's fine if we spam the user with these errors.
|
|
516
|
+
*/
|
|
517
|
+
function validateConfigSchema(moduleName: string, schema: ConfigSchema, keyPath = '') {
|
|
518
|
+
const updateMessage = `Please verify that you are running the latest version and, if so, alert the maintainer.`;
|
|
519
|
+
|
|
520
|
+
for (const key of Object.keys(schema).filter((k) => !k.startsWith('_'))) {
|
|
521
|
+
const thisKeyPath = keyPath + (keyPath && '.') + key;
|
|
522
|
+
const schemaPart = schema[key] as ConfigSchema;
|
|
523
|
+
|
|
524
|
+
if (thisKeyPath === 'Display conditions') {
|
|
525
|
+
console.error(
|
|
526
|
+
`${moduleName} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${updateMessage}`,
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
if (thisKeyPath === 'Translation overrides') {
|
|
531
|
+
console.error(
|
|
532
|
+
`${moduleName} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${updateMessage}`,
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
if (!isOrdinaryObject(schemaPart)) {
|
|
537
|
+
console.error(`${moduleName} has bad config schema definition for key '${thisKeyPath}'. ${updateMessage}`);
|
|
538
|
+
continue;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
if (!schemaPart.hasOwnProperty('_default')) {
|
|
542
|
+
// recurse for nested config keys
|
|
543
|
+
validateConfigSchema(moduleName, schemaPart, thisKeyPath);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
const elements = schemaPart._elements;
|
|
547
|
+
if (hasObjectSchema(elements)) {
|
|
548
|
+
validateConfigSchema(moduleName, elements, thisKeyPath + '._elements');
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (schemaPart._validators) {
|
|
552
|
+
for (let validator of schemaPart._validators) {
|
|
553
|
+
if (typeof validator !== 'function') {
|
|
554
|
+
console.error(
|
|
555
|
+
`${moduleName} has invalid validator for key '${thisKeyPath}' ${updateMessage}.` +
|
|
556
|
+
`\n\nIf you're the maintainer: validators must be functions that return either ` +
|
|
557
|
+
`undefined or an error string. Received ${validator}.`,
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
const valueType = schemaPart._type;
|
|
564
|
+
if (valueType && !Object.values(Type).includes(valueType)) {
|
|
565
|
+
console.error(
|
|
566
|
+
`${moduleName} has invalid type for key '${thisKeyPath}' ${updateMessage}.` +
|
|
567
|
+
`\n\nIf you're the maintainer: the allowed types are ${Object.values(Type).join(', ')}. ` +
|
|
568
|
+
`Received '${valueType}'`,
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
if (
|
|
573
|
+
Object.keys(schemaPart).every((k) => ['_description', '_validators', '_elements', '_type'].includes(k)) &&
|
|
574
|
+
!keyPath.includes('._elements')
|
|
575
|
+
) {
|
|
576
|
+
console.error(
|
|
577
|
+
`${moduleName} has bad config schema definition for key '${thisKeyPath}'. ${updateMessage}.` +
|
|
578
|
+
`\n\nIf you're the maintainer: all config elements must have a default. ` +
|
|
579
|
+
`Received ${JSON.stringify(schemaPart)}`,
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
if (elements && valueType && ![Type.Array, Type.Object].includes(valueType)) {
|
|
584
|
+
console.error(
|
|
585
|
+
`${moduleName} has bad config schema definition for key '${thisKeyPath}'. ${updateMessage}.` +
|
|
586
|
+
`\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. ` +
|
|
587
|
+
`Received ${JSON.stringify(valueType)}`,
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
function getConfigForModule(
|
|
594
|
+
moduleName: string,
|
|
595
|
+
configState: ConfigInternalStore,
|
|
596
|
+
tempConfigState: TemporaryConfigStore,
|
|
597
|
+
): ConfigObject {
|
|
598
|
+
const schema = configState.schemas[moduleName];
|
|
599
|
+
const inputConfig = mergeConfigsFor(moduleName, getProvidedConfigs(configState, tempConfigState));
|
|
600
|
+
validateStructure(schema, inputConfig, moduleName);
|
|
601
|
+
const config = setDefaults(schema, inputConfig);
|
|
602
|
+
runAllValidatorsInConfigTree(schema, config, moduleName);
|
|
603
|
+
delete config.extensionSlots;
|
|
604
|
+
return config;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
function getConfigForModuleImplicitSchema(
|
|
608
|
+
moduleName: string,
|
|
609
|
+
configState: ConfigInternalStore,
|
|
610
|
+
tempConfigState: TemporaryConfigStore,
|
|
611
|
+
): ConfigObject {
|
|
612
|
+
const inputConfig = mergeConfigsFor(moduleName, getProvidedConfigs(configState, tempConfigState));
|
|
613
|
+
const config = setDefaults(implicitConfigSchema, inputConfig);
|
|
614
|
+
runAllValidatorsInConfigTree(implicitConfigSchema, config, moduleName);
|
|
615
|
+
delete config.extensionSlots;
|
|
616
|
+
return config;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
function mergeConfigsFor(moduleName: string, allConfigs: Array<Config>): ConfigObject {
|
|
620
|
+
const allConfigsForModule = allConfigs.map(({ [moduleName]: c }) => c).filter((c) => !!c);
|
|
621
|
+
|
|
622
|
+
return mergeConfigs(allConfigsForModule);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
function mergeConfigs(configs: Array<Config>) {
|
|
626
|
+
const mergeDeepAll = reduce(mergeDeepRight);
|
|
627
|
+
return mergeDeepAll({}, configs) as Config;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Recursively check the provided config tree to make sure that all
|
|
632
|
+
* of the provided properties exist in the schema, and that types are
|
|
633
|
+
* correct. Does not run validators yet, since those will be run on
|
|
634
|
+
* the config with the defaults filled in.
|
|
635
|
+
*/
|
|
636
|
+
function validateStructure(schema: ConfigSchema, config: ConfigObject, keyPath = '') {
|
|
637
|
+
// validate each constituent element
|
|
638
|
+
for (const key of Object.keys(config)) {
|
|
639
|
+
const value = config[key];
|
|
640
|
+
const thisKeyPath = keyPath + '.' + key;
|
|
641
|
+
const schemaPart = schema[key] as ConfigSchema;
|
|
642
|
+
|
|
643
|
+
if (!schema.hasOwnProperty(key)) {
|
|
644
|
+
if (!(key === 'extensionSlots' && keyPath !== '')) {
|
|
645
|
+
logError(thisKeyPath, `Unknown config key '${thisKeyPath}' provided. Ignoring.`);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
continue;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
validateBranchStructure(schemaPart, value, thisKeyPath);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
function validateBranchStructure(schemaPart: ConfigSchema, value: any, keyPath: string) {
|
|
656
|
+
checkType(keyPath, schemaPart._type, value);
|
|
657
|
+
|
|
658
|
+
if (isOrdinaryObject(value)) {
|
|
659
|
+
if (schemaPart._type === Type.Object) {
|
|
660
|
+
// validate as freeform object
|
|
661
|
+
validateFreeformObjectStructure(schemaPart, value, keyPath);
|
|
662
|
+
} else if (!(schemaPart.hasOwnProperty('_default') || schemaPart.hasOwnProperty('_type'))) {
|
|
663
|
+
// validate as normal nested config
|
|
664
|
+
validateStructure(schemaPart, value, keyPath);
|
|
665
|
+
}
|
|
666
|
+
} else {
|
|
667
|
+
if (schemaPart._type === Type.Array) {
|
|
668
|
+
validateArrayStructure(schemaPart, value, keyPath);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
function validateFreeformObjectStructure(freeformObjectSchema: ConfigSchema, config: ConfigObject, keyPath: string) {
|
|
674
|
+
if (freeformObjectSchema._elements) {
|
|
675
|
+
for (const key of Object.keys(config)) {
|
|
676
|
+
const value = config[key];
|
|
677
|
+
validateBranchStructure(freeformObjectSchema._elements, value, `${keyPath}.${key}`);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
function validateArrayStructure(arraySchema: ConfigSchema, value: ConfigObject, keyPath: string) {
|
|
683
|
+
const validatedAsArray = checkType(keyPath, Type.Array, value);
|
|
684
|
+
if (!validatedAsArray) {
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
// if there is an array element object schema, verify that elements match it
|
|
688
|
+
if (hasObjectSchema(arraySchema._elements)) {
|
|
689
|
+
for (let i = 0; i < value.length; i++) {
|
|
690
|
+
validateBranchStructure(arraySchema._elements, value[i], `${keyPath}[${i}]`);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
for (let i = 0; i < value.length; i++) {
|
|
695
|
+
checkType(`${keyPath}[${i}]`, arraySchema._elements?._type, value[i]);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Run all the validators in the config tree. This should be run
|
|
701
|
+
* on the config object after it has been filled in with all the defaults, since
|
|
702
|
+
* higher-level validators may refer to default values.
|
|
703
|
+
*/
|
|
704
|
+
function runAllValidatorsInConfigTree(schema: ConfigSchema, config: ConfigObject, keyPath = '') {
|
|
705
|
+
// If `!schema`, there should have been a structural validation error printed already.
|
|
706
|
+
if (schema) {
|
|
707
|
+
if (config !== schema._default) {
|
|
708
|
+
runValidators(keyPath, schema._validators, config);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
if (isOrdinaryObject(config)) {
|
|
712
|
+
for (const key of Object.keys(config)) {
|
|
713
|
+
const value = config[key];
|
|
714
|
+
const thisKeyPath = keyPath + '.' + key;
|
|
715
|
+
const schemaPart = schema[key] as ConfigSchema;
|
|
716
|
+
if (schema._type === Type.Object && schema._elements) {
|
|
717
|
+
runAllValidatorsInConfigTree(schema._elements, value, thisKeyPath);
|
|
718
|
+
} else {
|
|
719
|
+
runAllValidatorsInConfigTree(schemaPart, value, thisKeyPath);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
} else if (Array.isArray(config) && schema._elements) {
|
|
723
|
+
for (let i = 0; i < config.length; i++) {
|
|
724
|
+
runAllValidatorsInConfigTree(schema._elements, config[i], `${keyPath}[${i}]`);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Run type validation for the value, logging any errors.
|
|
732
|
+
* @returns true if validation passes, false otherwise
|
|
733
|
+
*/
|
|
734
|
+
function checkType(keyPath: string, _type: Type | undefined, value: any) {
|
|
735
|
+
if (_type) {
|
|
736
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
737
|
+
const validator: Record<string, Function> = {
|
|
738
|
+
Array: isArray,
|
|
739
|
+
Boolean: isBoolean,
|
|
740
|
+
ConceptUuid: isUuid,
|
|
741
|
+
Number: isNumber,
|
|
742
|
+
Object: isObject,
|
|
743
|
+
String: isString,
|
|
744
|
+
UUID: isUuid,
|
|
745
|
+
PersonAttributeTypeUuid: isUuid,
|
|
746
|
+
PatientIdentifierTypeUuid: isUuid,
|
|
747
|
+
};
|
|
748
|
+
return runValidators(keyPath, [validator[_type]], value);
|
|
749
|
+
}
|
|
750
|
+
return true;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Runs validators, logging errors.
|
|
755
|
+
* @returns true if all pass, false otherwise.
|
|
756
|
+
*/
|
|
757
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
758
|
+
function runValidators(keyPath: string, validators: Array<Function> | undefined, value: any) {
|
|
759
|
+
let returnValue = true;
|
|
760
|
+
if (validators) {
|
|
761
|
+
try {
|
|
762
|
+
for (let validator of validators) {
|
|
763
|
+
const validatorResult = validator(value);
|
|
764
|
+
|
|
765
|
+
if (typeof validatorResult === 'string') {
|
|
766
|
+
const message =
|
|
767
|
+
typeof value === 'object'
|
|
768
|
+
? `Invalid configuration for ${keyPath}: ${validatorResult}`
|
|
769
|
+
: `Invalid configuration value ${value} for ${keyPath}: ${validatorResult}`;
|
|
770
|
+
logError(keyPath, message);
|
|
771
|
+
returnValue = false;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
} catch (e) {
|
|
775
|
+
console.error(`Skipping invalid validator at "${keyPath}". Encountered error\n\t${e}`);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
return returnValue;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
// Recursively fill in the config with values from the schema.
|
|
782
|
+
const setDefaults = (schema: ConfigSchema, inputConfig: Config) => {
|
|
783
|
+
const config = clone(inputConfig);
|
|
784
|
+
|
|
785
|
+
if (!schema) {
|
|
786
|
+
return config;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
for (const key of Object.keys(schema)) {
|
|
790
|
+
const configPart = config[key];
|
|
791
|
+
const schemaPart = schema[key] as ConfigSchema;
|
|
792
|
+
|
|
793
|
+
// The `schemaPart &&` clause of this `if` statement will only fail
|
|
794
|
+
// if the schema is very invalid. It is there to prevent the app from
|
|
795
|
+
// crashing completely, though it will produce unexpected behavior.
|
|
796
|
+
// If this happens, there should be legible errors in the console from
|
|
797
|
+
// the schema validator.
|
|
798
|
+
if (schemaPart && (schemaPart.hasOwnProperty('_type') || schemaPart.hasOwnProperty('_default'))) {
|
|
799
|
+
// We assume that schemaPart defines a config value, since it has
|
|
800
|
+
// a property `_type` or `_default`.
|
|
801
|
+
if (!config.hasOwnProperty(key)) {
|
|
802
|
+
(config[key] as any) = schemaPart['_default'];
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// We also check if it is an object or array with object elements, in which case we recurse
|
|
806
|
+
const elements = schemaPart._elements;
|
|
807
|
+
|
|
808
|
+
if (configPart && hasObjectSchema(elements)) {
|
|
809
|
+
if (schemaPart._type === Type.Array && Array.isArray(configPart)) {
|
|
810
|
+
const configWithDefaults = configPart.map((conf: Config) => setDefaults(elements, conf));
|
|
811
|
+
config[key] = configWithDefaults;
|
|
812
|
+
} else if (schemaPart._type === Type.Object) {
|
|
813
|
+
for (let objectKey of Object.keys(configPart)) {
|
|
814
|
+
configPart[objectKey] = setDefaults(elements, configPart[objectKey]);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
} else if (isOrdinaryObject(schemaPart)) {
|
|
819
|
+
// Since schemaPart has no property "_type", if it's an ordinary object
|
|
820
|
+
// (unlike, importantly, the validators array), we assume it is a parent config property.
|
|
821
|
+
// We recurse to config[key] and schema[key]. Default config[key] to {}.
|
|
822
|
+
const selectedConfigPart = configPart ?? {};
|
|
823
|
+
|
|
824
|
+
// There will have been a validation error already if configPart is not a plain object.
|
|
825
|
+
if (isOrdinaryObject(selectedConfigPart)) {
|
|
826
|
+
config[key] = setDefaults(schemaPart, selectedConfigPart);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
return config;
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
function hasObjectSchema(elementsSchema: unknown): elementsSchema is ConfigSchema {
|
|
835
|
+
return (
|
|
836
|
+
!!elementsSchema && Object.keys(elementsSchema).filter((e) => !['_default', '_validators'].includes(e)).length > 0
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
function isOrdinaryObject(value) {
|
|
841
|
+
return typeof value === 'object' && !Array.isArray(value) && value !== null;
|
|
842
|
+
}
|
|
843
|
+
/** Keep track of which validation errors we have displayed. Each one should only be displayed once. */
|
|
844
|
+
let displayedValidationMessages = new Set<string>();
|
|
845
|
+
|
|
846
|
+
function logError(keyPath: string, message: string) {
|
|
847
|
+
const key = `${keyPath}:::${message}`;
|
|
848
|
+
// technically, this should not be possible, but because of how things wind-up transpiled, this isn't impossible
|
|
849
|
+
if (!displayedValidationMessages) {
|
|
850
|
+
displayedValidationMessages = new Set<string>();
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
if (!displayedValidationMessages.has(key)) {
|
|
854
|
+
console.error(message);
|
|
855
|
+
displayedValidationMessages.add(key);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Normally, configuration errors are only displayed once. This function clears the list of
|
|
861
|
+
* displayed errors, so that they will be displayed again.
|
|
862
|
+
*
|
|
863
|
+
* @internal
|
|
864
|
+
*/
|
|
865
|
+
export function clearConfigErrors(keyPath?: string) {
|
|
866
|
+
if (keyPath) {
|
|
867
|
+
displayedValidationMessages.forEach((key) => {
|
|
868
|
+
if (key.startsWith(keyPath)) {
|
|
869
|
+
displayedValidationMessages.delete(key);
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
} else {
|
|
873
|
+
displayedValidationMessages.clear();
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Cleans up all config store subscriptions and re-establishes them. This is primarily
|
|
879
|
+
* useful for testing, where subscriptions set up at module load time need to be cleared
|
|
880
|
+
* between tests to prevent infinite update loops. After clearing, subscriptions are
|
|
881
|
+
* re-established so the config system continues to work normally.
|
|
882
|
+
*
|
|
883
|
+
* @internal
|
|
884
|
+
*/
|
|
885
|
+
export function resetConfigSystem() {
|
|
886
|
+
configSubscriptions.forEach((unsubscribe) => unsubscribe());
|
|
887
|
+
configSubscriptions.length = 0;
|
|
888
|
+
setupConfigSubscriptions();
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Copied over from esm-extensions. It rightly belongs to that module, but esm-config
|
|
893
|
+
* cannot depend on esm-extensions.
|
|
894
|
+
*/
|
|
895
|
+
function getExtensionNameFromId(extensionId: string) {
|
|
896
|
+
const [extensionName] = extensionId.split('#');
|
|
897
|
+
return extensionName;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* The translation overrides schema is used in the implicit schema given to every module;
|
|
902
|
+
* plus any additional translation namespaces (at time of writing, this is just 'core').
|
|
903
|
+
*/
|
|
904
|
+
const translationOverridesSchema: ConfigSchema = {
|
|
905
|
+
'Translation overrides': {
|
|
906
|
+
_description:
|
|
907
|
+
'Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value',
|
|
908
|
+
_type: Type.Object,
|
|
909
|
+
_default: {},
|
|
910
|
+
_validators: [
|
|
911
|
+
validator(
|
|
912
|
+
(o) => Object.keys(o).every((k) => /^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(k)),
|
|
913
|
+
(o) => {
|
|
914
|
+
const badKeys = Object.keys(o).filter((k) => !/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(k));
|
|
915
|
+
return `The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${badKeys.join(
|
|
916
|
+
', ',
|
|
917
|
+
)}.`;
|
|
918
|
+
},
|
|
919
|
+
),
|
|
920
|
+
],
|
|
921
|
+
},
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* The implicitConfigSchema is implicitly included in every configuration schema
|
|
926
|
+
*/
|
|
927
|
+
const implicitConfigSchema: ConfigSchema = {
|
|
928
|
+
'Display conditions': {
|
|
929
|
+
privileges: {
|
|
930
|
+
_description: 'The privilege(s) the user must have to use this extension',
|
|
931
|
+
_type: Type.Array,
|
|
932
|
+
_default: [],
|
|
933
|
+
},
|
|
934
|
+
expression: {
|
|
935
|
+
_description: 'The expression that determines whether the extension is displayed',
|
|
936
|
+
_type: Type.String,
|
|
937
|
+
_default: undefined,
|
|
938
|
+
},
|
|
939
|
+
},
|
|
940
|
+
...translationOverridesSchema,
|
|
941
|
+
};
|