@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.
- package/cc-openmrs-cc-esm-active-prescriptions-1.0.63.tgz +0 -0
- package/dist/177.js +2 -0
- package/dist/184.js +1 -2
- package/dist/197.js +1 -1
- package/dist/225.js +1 -1
- package/dist/237.js +2 -0
- package/dist/{606.js.LICENSE.txt → 237.js.LICENSE.txt} +2 -2
- package/dist/300.js +1 -1
- package/dist/31.js +2 -0
- package/dist/{68.js.LICENSE.txt → 31.js.LICENSE.txt} +2 -2
- package/dist/311.js +2 -1
- package/dist/{184.js.LICENSE.txt → 311.js.LICENSE.txt} +37 -0
- package/dist/319.js +1 -1
- package/dist/335.js +1 -1
- package/dist/41.js +1 -1
- package/dist/422.js +1 -2
- package/dist/437.js +1 -0
- package/dist/533.js +1 -0
- package/dist/537.js +1 -1
- package/dist/540.js +1 -1
- package/dist/55.js +1 -1
- package/dist/606.js +1 -2
- package/dist/618.js +2 -0
- package/dist/618.js.LICENSE.txt +9 -0
- package/dist/635.js +1 -1
- package/dist/647.js +2 -0
- package/dist/647.js.LICENSE.txt +9 -0
- package/dist/652.js +1 -1
- package/dist/679.js +1 -1
- package/dist/692.js +1 -1
- package/dist/761.js +2 -0
- package/dist/761.js.LICENSE.txt +29 -0
- package/dist/875.js +2 -0
- package/dist/875.js.LICENSE.txt +5 -0
- package/dist/961.js +1 -1
- package/dist/966.js +1 -1
- package/dist/99.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +2 -2
- package/dist/openmrs-esm-template-app.js +1 -1
- package/dist/openmrs-esm-template-app.js.buildmanifest.json +221 -166
- package/dist/routes.json +1 -1
- package/package.json +26 -47
- package/src/carbon-react.d.ts +9 -0
- package/src/index.ts +6 -30
- package/src/prescriptions-actions/prescriptions-action-button.component.tsx +10 -8
- package/dist/279.js +0 -2
- package/dist/279.js.LICENSE.txt +0 -14
- package/dist/353.js +0 -1
- package/dist/499.js +0 -1
- package/dist/68.js +0 -2
- package/dist/845.js +0 -1
- package/dist/866.js +0 -2
- package/dist/866.js.LICENSE.txt +0 -30
- package/dist/993.js +0 -1
- package/src/prescriptions-actions/prescriptions-action-menu-item.component.tsx +0 -29
- package/src/prescriptions-actions/prescriptions-action-menu-item.scss +0 -12
- /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.
|
|
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.
|
|
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
|
-
"
|
|
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
|
-
"@
|
|
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/
|
|
65
|
-
"@swc/core": "^1.7.14",
|
|
60
|
+
"@swc/core": "^1.3.68",
|
|
66
61
|
"@swc/jest": "^0.2.36",
|
|
67
|
-
"@testing-library/dom": "^
|
|
68
|
-
"@testing-library/
|
|
69
|
-
"@
|
|
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/
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
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": "^
|
|
94
|
-
"jest-
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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"
|
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
|
|
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 =
|
|
64
|
-
export const blueBox =
|
|
65
|
-
export const brandBox =
|
|
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 =
|
|
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 =
|
|
51
|
+
export const root = getAsyncLifecycle(() => import('./root.component'), options);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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 = () =>
|
|
7
|
-
|
|
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={
|
|
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
|
);
|