@cc-openmrs/cc-esm-active-prescriptions 1.0.63 → 1.0.65

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.
Files changed (58) hide show
  1. package/cc-openmrs-cc-esm-active-prescriptions-1.0.63.tgz +0 -0
  2. package/dist/177.js +2 -0
  3. package/dist/184.js +1 -2
  4. package/dist/197.js +1 -1
  5. package/dist/225.js +1 -1
  6. package/dist/237.js +2 -0
  7. package/dist/{606.js.LICENSE.txt → 237.js.LICENSE.txt} +2 -2
  8. package/dist/300.js +1 -1
  9. package/dist/31.js +2 -0
  10. package/dist/{68.js.LICENSE.txt → 31.js.LICENSE.txt} +2 -2
  11. package/dist/311.js +2 -1
  12. package/dist/{184.js.LICENSE.txt → 311.js.LICENSE.txt} +37 -0
  13. package/dist/319.js +1 -1
  14. package/dist/335.js +1 -1
  15. package/dist/41.js +1 -1
  16. package/dist/422.js +1 -2
  17. package/dist/437.js +1 -0
  18. package/dist/533.js +1 -0
  19. package/dist/537.js +1 -1
  20. package/dist/540.js +1 -1
  21. package/dist/55.js +1 -1
  22. package/dist/606.js +1 -2
  23. package/dist/618.js +2 -0
  24. package/dist/618.js.LICENSE.txt +9 -0
  25. package/dist/635.js +1 -1
  26. package/dist/647.js +2 -0
  27. package/dist/647.js.LICENSE.txt +9 -0
  28. package/dist/652.js +1 -1
  29. package/dist/679.js +1 -1
  30. package/dist/692.js +1 -1
  31. package/dist/761.js +2 -0
  32. package/dist/761.js.LICENSE.txt +29 -0
  33. package/dist/875.js +2 -0
  34. package/dist/875.js.LICENSE.txt +5 -0
  35. package/dist/961.js +1 -1
  36. package/dist/966.js +1 -1
  37. package/dist/99.js +1 -1
  38. package/dist/main.js +1 -1
  39. package/dist/main.js.LICENSE.txt +2 -2
  40. package/dist/openmrs-esm-template-app.js +1 -1
  41. package/dist/openmrs-esm-template-app.js.buildmanifest.json +221 -166
  42. package/dist/routes.json +1 -1
  43. package/package.json +26 -47
  44. package/src/carbon-react.d.ts +9 -0
  45. package/src/index.ts +6 -30
  46. package/src/prescriptions-actions/prescriptions-action-button.component.tsx +10 -8
  47. package/dist/279.js +0 -2
  48. package/dist/279.js.LICENSE.txt +0 -14
  49. package/dist/353.js +0 -1
  50. package/dist/499.js +0 -1
  51. package/dist/68.js +0 -2
  52. package/dist/845.js +0 -1
  53. package/dist/866.js +0 -2
  54. package/dist/866.js.LICENSE.txt +0 -30
  55. package/dist/993.js +0 -1
  56. package/src/prescriptions-actions/prescriptions-action-menu-item.component.tsx +0 -29
  57. package/src/prescriptions-actions/prescriptions-action-menu-item.scss +0 -12
  58. /package/dist/{422.js.LICENSE.txt → 177.js.LICENSE.txt} +0 -0
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"Red box","component":"redBox","slot":"Boxes"},{"name":"Blue box","component":"blueBox","slot":"Boxes"},{"name":"Brand box","component":"blueBox","slot":"Boxes"},{"name":"prescriptions-action-menu","component":"prescriptionsActionButton","slot":"action-menu-patient-chart-items-slot"}],"workspaces":[{"name":"active-prescriptions","title":"activePrescriptionsWorkspaceTitle","component":"root","type":"active-prescriptions","canHide":false,"width":"wider"}],"version":"1.0.63"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"Red box","component":"redBox","slot":"Boxes"},{"name":"Blue box","component":"blueBox","slot":"Boxes"},{"name":"Brand box","component":"blueBox","slot":"Boxes"},{"name":"prescriptions-action-menu","component":"prescriptionsActionButton","slot":"action-menu-patient-chart-items-slot"}],"workspaces":[{"name":"active-prescriptions","title":"activePrescriptionsWorkspaceTitle","component":"root","type":"active-prescriptions","canHide":false,"width":"wider"}],"version":"1.0.65"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-openmrs/cc-esm-active-prescriptions",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "license": "MPL-2.0",
5
5
  "description": "An OpenMRS seed application for building microfrontends",
6
6
  "browser": "dist/openmrs-esm-template-app.js",
@@ -43,73 +43,52 @@
43
43
  "frontendModuleName": "@cc-openmrs/cc-esm-active-prescriptions",
44
44
  "routes": "src/routes.json"
45
45
  },
46
- "dependencies": {
47
- "@carbon/react": "^1.83.0",
48
- "classnames": "^2.5.1",
49
- "lodash-es": "^4.17.21",
50
- "react-to-print": "^2.14.13"
51
- },
52
46
  "peerDependencies": {
47
+ "@carbon/react": "^1.x",
53
48
  "@openmrs/esm-framework": "9.x",
54
- "dayjs": "1.x",
49
+ "@openmrs/esm-styleguide": "9.x",
55
50
  "react": "18.x",
56
51
  "react-dom": "18.x",
57
52
  "react-i18next": "16.x",
58
- "rxjs": "6.x",
59
53
  "swr": "2.x"
60
54
  },
61
55
  "devDependencies": {
62
- "@openmrs/esm-framework": "next",
56
+ "@carbon/react": "^1.83.0",
57
+ "@openmrs/esm-framework": "9.x",
58
+ "@openmrs/esm-styleguide": "9.x",
63
59
  "@playwright/test": "^1.52.0",
64
- "@swc/cli": "^0.3.12",
65
- "@swc/core": "^1.7.14",
60
+ "@swc/core": "^1.3.68",
66
61
  "@swc/jest": "^0.2.36",
67
- "@testing-library/dom": "^8.20.1",
68
- "@testing-library/jest-dom": "^5.17.0",
69
- "@testing-library/react": "^13.4.0",
70
- "@testing-library/user-event": "^14.5.2",
71
- "@types/jest": "^28.1.4",
62
+ "@testing-library/jest-dom": "^6.4.5",
63
+ "@testing-library/react": "^15.0.6",
64
+ "@types/jest": "^29.5.12",
72
65
  "@types/react": "^18.3.21",
73
66
  "@types/react-dom": "^18.3.0",
74
- "@types/react-router": "^5.1.20",
75
- "@types/react-router-dom": "^5.1.7",
76
- "@types/webpack-env": "^1.16.0",
77
- "@typescript-eslint/eslint-plugin": "^8.54.0",
78
- "@typescript-eslint/parser": "^8.54.0",
79
- "css-loader": "^6.8.1",
80
- "dayjs": "^1.11.13",
81
- "dotenv": "^16.3.1",
82
- "eslint": "^8.57.0",
83
- "eslint-config-prettier": "^8.8.0",
84
- "eslint-plugin-import": "^2.31.0",
85
- "eslint-plugin-jest-dom": "^5.4.0",
86
- "eslint-plugin-prettier": "^5.1.3",
87
- "eslint-plugin-react-hooks": "^5.0.0",
88
- "eslint-plugin-unused-imports": "^4.3.0",
89
- "husky": "^6.0.0",
67
+ "@types/webpack-env": "^1.18.1",
68
+ "@typescript-eslint/eslint-plugin": "^7.8.0",
69
+ "@typescript-eslint/parser": "^7.8.0",
70
+ "dayjs": "^1.x",
71
+ "dotenv": "^16.0.3",
72
+ "eslint": "^8.50.0",
73
+ "eslint-plugin-react-hooks": "^4.6.2",
74
+ "husky": "^8.0.3",
90
75
  "i18next": "^25.0.0",
91
76
  "i18next-parser": "^9.3.0",
92
77
  "identity-obj-proxy": "^3.0.0",
93
- "jest": "^28.1.3",
94
- "jest-cli": "^28.1.3",
95
- "jest-environment-jsdom": "^28.1.3",
96
- "lint-staged": "^15.2.9",
97
- "openmrs": "next",
98
- "prettier": "^3.2.5",
78
+ "jest": "^29.7.0",
79
+ "jest-environment-jsdom": "^29.7.0",
80
+ "lint-staged": "^15.2.2",
81
+ "openmrs": "9.x",
82
+ "prettier": "^3.3.3",
99
83
  "react": "^18.3.1",
100
84
  "react-dom": "^18.3.1",
101
85
  "react-i18next": "^16.0.0",
102
- "react-router-dom": "^6.3.0",
103
- "rxjs": "^6.6.7",
104
- "swr": "^2.2.5",
105
- "swc-loader": "^0.2.3",
86
+ "swr": "^2.3.3",
106
87
  "turbo": "^2.5.2",
107
- "typescript": "^5.0.0",
108
- "webpack": "^5.99.9",
109
- "webpack-cli": "^6.0.1"
88
+ "typescript": "^5.0.0"
110
89
  },
111
90
  "lint-staged": {
112
- "*.{ts,tsx}": "eslint --cache --fix --max-warnings 0",
91
+ "packages/**/src/**/*.{ts,tsx}": "eslint --cache --fix --max-warnings 0",
113
92
  "*.{css,scss,ts,tsx}": "prettier --write --list-different"
114
93
  },
115
94
  "packageManager": "yarn@4.10.3"
@@ -0,0 +1,9 @@
1
+ import '@carbon/react';
2
+
3
+ declare module '@carbon/react' {
4
+ interface SideNavProps {
5
+ inert?: boolean;
6
+ }
7
+ }
8
+
9
+ export {};
package/src/index.ts CHANGED
@@ -4,11 +4,7 @@
4
4
  * connects the app shell to the React application(s) that make up this
5
5
  * microfrontend.
6
6
  */
7
- import React, { type ComponentType } from 'react';
8
- import ReactDOM from 'react-dom';
9
- import { defineConfigSchema } from '@openmrs/esm-framework';
10
- import { openmrsComponentDecorator } from '../node_modules/@openmrs/esm-react-utils/dist/openmrsComponentDecorator.js';
11
- import singleSpaReact from 'single-spa-react';
7
+ import { getAsyncLifecycle, defineConfigSchema, getSyncLifecycle } from '@openmrs/esm-framework';
12
8
  import { configSchema } from './config-schema';
13
9
 
14
10
  import prescriptionsActionButtonComponent from './prescriptions-actions/prescriptions-action-button.component';
@@ -20,26 +16,6 @@ const options = {
20
16
  moduleName,
21
17
  };
22
18
 
23
- function getCompatibleLifecycle<T>(Component: ComponentType<T>, lifecycleOptions: typeof options) {
24
- return singleSpaReact({
25
- React,
26
- ReactDOM,
27
- renderType: 'render',
28
- rootComponent: openmrsComponentDecorator(lifecycleOptions)(Component as any) as any,
29
- });
30
- }
31
-
32
- function getCompatibleAsyncLifecycle<T>(
33
- lazy: () => Promise<{ default: ComponentType<T> }>,
34
- lifecycleOptions: typeof options,
35
- ) {
36
- return () => lazy().then(({ default: Component }) => getCompatibleLifecycle(Component, lifecycleOptions));
37
- }
38
-
39
- function getCompatibleSyncLifecycle<T>(Component: ComponentType<T>, lifecycleOptions: typeof options) {
40
- return () => Promise.resolve(getCompatibleLifecycle(Component, lifecycleOptions));
41
- }
42
-
43
19
  /**
44
20
  * This tells the app shell how to obtain translation files: that they
45
21
  * are JSON files in the directory `../translations` (which you should
@@ -60,11 +36,11 @@ export function startupApp() {
60
36
  /**
61
37
  * The following are named exports for the extensions defined in this frontend modules. See the `routes.json` file to see how these are used.
62
38
  */
63
- export const redBox = getCompatibleAsyncLifecycle(() => import('./boxes/extensions/red-box.component'), options);
64
- export const blueBox = getCompatibleAsyncLifecycle(() => import('./boxes/extensions/blue-box.component'), options);
65
- export const brandBox = getCompatibleAsyncLifecycle(() => import('./boxes/extensions/brand-box.component'), options);
39
+ export const redBox = getAsyncLifecycle(() => import('./boxes/extensions/red-box.component'), options);
40
+ export const blueBox = getAsyncLifecycle(() => import('./boxes/extensions/blue-box.component'), options);
41
+ export const brandBox = getAsyncLifecycle(() => import('./boxes/extensions/brand-box.component'), options);
66
42
 
67
- export const prescriptionsActionButton = getCompatibleSyncLifecycle(prescriptionsActionButtonComponent, options);
43
+ export const prescriptionsActionButton = getSyncLifecycle(prescriptionsActionButtonComponent, options);
68
44
 
69
45
  /**
70
46
  * This named export tells the app shell that the default export of `root.component.tsx`
@@ -72,4 +48,4 @@ export const prescriptionsActionButton = getCompatibleSyncLifecycle(prescription
72
48
  * will be `openmrsSpaBase() + 'root'`, which is usually
73
49
  * `/openmrs/spa/root`.
74
50
  */
75
- export const root = getCompatibleAsyncLifecycle(() => import('./root.component'), options);
51
+ export const root = getAsyncLifecycle(() => import('./root.component'), options);
@@ -1,10 +1,12 @@
1
- import React from 'react';
2
- import { ActionMenuButton, launchWorkspace } from '@openmrs/esm-framework';
3
- import { Events } from '@carbon/react/icons';
1
+ import React, { useCallback } from 'react';
2
+ import { launchWorkspace2 } from '@openmrs/esm-framework';
3
+ import { ChevronRight } from '@carbon/icons-react';
4
+ import { ActionMenuButton } from '@openmrs/esm-styleguide';
4
5
  import { useTranslation } from 'react-i18next';
5
6
 
6
- const handleClick = () => launchWorkspace('active-prescriptions');
7
- const getEventsIcon = (props: object) => <Events {...props} />;
7
+ const handleClick = () => {
8
+ void launchWorkspace2('active-prescriptions');
9
+ };
8
10
 
9
11
  const PrescriptionsActionButton: React.FC = () => {
10
12
  const { t } = useTranslation();
@@ -12,10 +14,10 @@ const PrescriptionsActionButton: React.FC = () => {
12
14
 
13
15
  return (
14
16
  <ActionMenuButton
15
- getIcon={getEventsIcon}
16
- handler={handleClick}
17
- iconDescription={label}
17
+ getIcon={(props) => <ChevronRight {...props} />}
18
18
  label={label}
19
+ iconDescription={label}
20
+ handler={handleClick}
19
21
  type="active-prescriptions"
20
22
  />
21
23
  );