@cc-openmrs/cc-esm-active-prescriptions 1.0.65 → 1.0.67
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/dist/116.js +1 -0
- package/dist/184.js +2 -1
- package/dist/{311.js.LICENSE.txt → 184.js.LICENSE.txt} +0 -37
- package/dist/197.js +1 -1
- package/dist/225.js +1 -1
- package/dist/282.js +2 -0
- package/dist/282.js.LICENSE.txt +32 -0
- package/dist/300.js +1 -1
- package/dist/311.js +1 -2
- package/dist/319.js +1 -1
- package/dist/335.js +1 -1
- package/dist/353.js +1 -0
- package/dist/41.js +1 -1
- package/dist/422.js +2 -1
- package/dist/478.js +2 -0
- package/dist/499.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 +2 -1
- package/dist/{618.js.LICENSE.txt → 606.js.LICENSE.txt} +2 -2
- package/dist/652.js +1 -1
- package/dist/679.js +1 -1
- package/dist/765.js +2 -0
- package/dist/765.js.LICENSE.txt +19 -0
- package/dist/779.js +2 -0
- package/dist/{31.js.LICENSE.txt → 779.js.LICENSE.txt} +11 -0
- package/dist/845.js +1 -0
- package/dist/961.js +1 -1
- package/dist/966.js +1 -1
- package/dist/99.js +1 -1
- package/dist/993.js +1 -0
- package/dist/main.js +1 -2
- package/dist/openmrs-esm-patient-lists-app.js +1 -0
- package/dist/{openmrs-esm-template-app.js.buildmanifest.json → openmrs-esm-patient-lists-app.js.buildmanifest.json} +158 -227
- package/dist/routes.json +1 -1
- package/package.json +61 -51
- package/src/declarations.d.ts +4 -5
- package/src/prescriptions-actions/prescriptions-action-button.component.tsx +7 -13
- package/src/prescriptions-actions/prescriptions-action-menu-item.component.tsx +29 -0
- package/src/prescriptions-actions/prescriptions-action-menu-item.scss +12 -0
- package/src/root.component.tsx +117 -117
- package/src/routes.json +12 -11
- package/dist/177.js +0 -2
- package/dist/237.js +0 -2
- package/dist/237.js.LICENSE.txt +0 -9
- package/dist/31.js +0 -2
- package/dist/437.js +0 -1
- package/dist/533.js +0 -1
- package/dist/618.js +0 -2
- package/dist/635.js +0 -1
- package/dist/647.js +0 -2
- package/dist/647.js.LICENSE.txt +0 -9
- package/dist/692.js +0 -2
- package/dist/761.js +0 -2
- package/dist/761.js.LICENSE.txt +0 -29
- package/dist/875.js +0 -2
- package/dist/875.js.LICENSE.txt +0 -5
- package/dist/main.js.LICENSE.txt +0 -9
- package/dist/openmrs-esm-template-app.js +0 -1
- package/src/carbon-react.d.ts +0 -9
- /package/dist/{177.js.LICENSE.txt → 422.js.LICENSE.txt} +0 -0
- /package/dist/{692.js.LICENSE.txt → 478.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-
|
|
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"}],"workspaces2":[{"name":"active-prescriptions-workspace","component":"root","window":"active-prescriptions-workspace"}],"workspaceWindows2":[{"name":"active-prescriptions-workspace","group":"patient-chart","icon":"prescriptionsActionButton","width":"wider","order":4}],"version":"1.0.57"}
|
package/package.json
CHANGED
|
@@ -1,95 +1,105 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cc-openmrs/cc-esm-active-prescriptions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.67",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
|
-
"description": "An OpenMRS
|
|
6
|
-
"browser": "dist/openmrs-esm-
|
|
5
|
+
"description": "An OpenMRS frontend module for managing patient lists in the Patient Chart",
|
|
6
|
+
"browser": "dist/openmrs-esm-patient-lists-app.js",
|
|
7
7
|
"main": "src/index.ts",
|
|
8
8
|
"source": true,
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "openmrs develop",
|
|
11
11
|
"serve": "webpack serve --mode=development",
|
|
12
|
-
"build": "webpack --mode production",
|
|
12
|
+
"build": "webpack --mode production --color",
|
|
13
13
|
"analyze": "webpack --mode=production --env analyze=true",
|
|
14
|
-
"lint": "eslint src --ext js,jsx,ts,tsx --max-warnings
|
|
15
|
-
"prettier": "prettier --write \"src/**/*.{ts,tsx}\"
|
|
14
|
+
"lint": "cross-env eslint src --ext js,jsx,ts,tsx --fix --max-warnings=0",
|
|
15
|
+
"prettier": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
16
16
|
"typescript": "tsc",
|
|
17
|
-
"test": "jest --config jest.config.js --passWithNoTests",
|
|
18
|
-
"
|
|
17
|
+
"test": "cross-env TZ=UTC jest --config jest.config.js --verbose false --passWithNoTests --color",
|
|
18
|
+
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
|
|
19
19
|
"coverage": "yarn test --coverage",
|
|
20
|
-
"
|
|
21
|
-
"extract-translations": "i18next 'src/**/*.component.tsx' --config ./tools/i18next-parser.config.js",
|
|
22
|
-
"test-e2e": "playwright test"
|
|
20
|
+
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/**/*.hook.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
|
|
23
21
|
},
|
|
24
22
|
"browserslist": [
|
|
25
23
|
"extends browserslist-config-openmrs"
|
|
26
24
|
],
|
|
27
25
|
"keywords": [
|
|
28
|
-
"openmrs"
|
|
29
|
-
"microfrontends"
|
|
26
|
+
"openmrs"
|
|
30
27
|
],
|
|
31
|
-
"
|
|
32
|
-
"type": "git",
|
|
33
|
-
"url": "git+https://github.com/openmrs/openmrs-esm-template-app.git"
|
|
34
|
-
},
|
|
35
|
-
"homepage": "https://github.com/openmrs/openmrs-esm-template-app#readme",
|
|
28
|
+
"homepage": "https://github.com/openmrs/openmrs-esm-patient-chart#readme",
|
|
36
29
|
"publishConfig": {
|
|
37
30
|
"access": "public"
|
|
38
31
|
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/openmrs/openmrs-esm-patient-chart.git"
|
|
35
|
+
},
|
|
39
36
|
"bugs": {
|
|
40
|
-
"url": "https://github.com/openmrs/openmrs-esm-
|
|
37
|
+
"url": "https://github.com/openmrs/openmrs-esm-patient-chart/issues"
|
|
41
38
|
},
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"routes": "src/routes.json"
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@carbon/react": "^1.83.0"
|
|
45
41
|
},
|
|
46
42
|
"peerDependencies": {
|
|
47
|
-
"@carbon/react": "^1.x",
|
|
48
43
|
"@openmrs/esm-framework": "9.x",
|
|
49
|
-
"@openmrs/esm-
|
|
44
|
+
"@openmrs/esm-patient-common-lib": "12.x",
|
|
45
|
+
"dayjs": "1.x",
|
|
50
46
|
"react": "18.x",
|
|
51
|
-
"react-dom": "18.x",
|
|
52
47
|
"react-i18next": "16.x",
|
|
48
|
+
"react-router-dom": "6.x",
|
|
49
|
+
"rxjs": "6.x",
|
|
53
50
|
"swr": "2.x"
|
|
54
51
|
},
|
|
55
52
|
"devDependencies": {
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@swc/
|
|
61
|
-
"@
|
|
53
|
+
"@openmrs/esm-framework": "next",
|
|
54
|
+
"@playwright/test": "^1.51.1",
|
|
55
|
+
"@swc/cli": "^0.1.62",
|
|
56
|
+
"@swc/core": "^1.3.89",
|
|
57
|
+
"@swc/jest": "^0.2.29",
|
|
58
|
+
"@testing-library/dom": "^10.1.0",
|
|
62
59
|
"@testing-library/jest-dom": "^6.4.5",
|
|
63
|
-
"@testing-library/react": "^15.0.
|
|
64
|
-
"@
|
|
65
|
-
"@types/
|
|
60
|
+
"@testing-library/react": "^15.0.7",
|
|
61
|
+
"@testing-library/user-event": "^14.5.2",
|
|
62
|
+
"@types/fhir": "^0.0.31",
|
|
63
|
+
"@types/jest": "^29.5.11",
|
|
64
|
+
"@types/lodash-es": "^4.17.9",
|
|
65
|
+
"@types/react": "^18.3.2",
|
|
66
66
|
"@types/react-dom": "^18.3.0",
|
|
67
|
-
"@types/webpack-env": "^1.18.
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
69
|
-
"@typescript-eslint/parser": "^
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
67
|
+
"@types/webpack-env": "^1.18.8",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
69
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
70
|
+
"babel-preset-minify": "^0.5.2",
|
|
71
|
+
"concurrently": "^8.2.1",
|
|
72
|
+
"cross-env": "^7.0.3",
|
|
73
|
+
"css-loader": "^6.6.0",
|
|
74
|
+
"d3-selection": "^3.0.0",
|
|
75
|
+
"dayjs": "^1.11.10",
|
|
76
|
+
"dotenv": "^16.3.1",
|
|
77
|
+
"eslint": "^8.57.0",
|
|
78
|
+
"eslint-plugin-import": "^2.31.0",
|
|
79
|
+
"eslint-plugin-jest-dom": "^5.4.0",
|
|
80
|
+
"eslint-plugin-playwright": "^0.16.0",
|
|
81
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
82
|
+
"eslint-plugin-testing-library": "^6.2.2",
|
|
74
83
|
"husky": "^8.0.3",
|
|
75
84
|
"i18next": "^25.0.0",
|
|
76
85
|
"i18next-parser": "^9.3.0",
|
|
77
86
|
"identity-obj-proxy": "^3.0.0",
|
|
78
87
|
"jest": "^29.7.0",
|
|
88
|
+
"jest-cli": "^29.7.0",
|
|
79
89
|
"jest-environment-jsdom": "^29.7.0",
|
|
80
|
-
"lint-staged": "^
|
|
81
|
-
"
|
|
82
|
-
"
|
|
90
|
+
"lint-staged": "^14.0.1",
|
|
91
|
+
"lodash": "^4.17.23",
|
|
92
|
+
"openmrs": "next",
|
|
93
|
+
"prettier": "^3.0.3",
|
|
83
94
|
"react": "^18.3.1",
|
|
84
95
|
"react-dom": "^18.3.1",
|
|
85
96
|
"react-i18next": "^16.0.0",
|
|
86
|
-
"
|
|
97
|
+
"react-router-dom": "^6.16.0",
|
|
98
|
+
"rxjs": "^6.6.7",
|
|
99
|
+
"sass": "^1.54.3",
|
|
100
|
+
"swc-loader": "^0.2.3",
|
|
101
|
+
"swr": "2.2.5",
|
|
87
102
|
"turbo": "^2.5.2",
|
|
88
103
|
"typescript": "^5.0.0"
|
|
89
|
-
}
|
|
90
|
-
"lint-staged": {
|
|
91
|
-
"packages/**/src/**/*.{ts,tsx}": "eslint --cache --fix --max-warnings 0",
|
|
92
|
-
"*.{css,scss,ts,tsx}": "prettier --write --list-different"
|
|
93
|
-
},
|
|
94
|
-
"packageManager": "yarn@4.10.3"
|
|
104
|
+
}
|
|
95
105
|
}
|
package/src/declarations.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
declare module '*.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare type SideNavProps = object;
|
|
1
|
+
declare module '*.scss' {
|
|
2
|
+
const content: { [className: string]: string };
|
|
3
|
+
export default content;
|
|
4
|
+
}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import {
|
|
3
|
-
import { ChevronRight } from '@carbon/icons-react';
|
|
4
|
-
import { ActionMenuButton } from '@openmrs/esm-styleguide';
|
|
1
|
+
import React, { type ComponentProps } from 'react';
|
|
2
|
+
import { ActionMenuButton2, EventsIcon } from '@openmrs/esm-framework';
|
|
5
3
|
import { useTranslation } from 'react-i18next';
|
|
6
4
|
|
|
7
|
-
const handleClick = () => {
|
|
8
|
-
void launchWorkspace2('active-prescriptions');
|
|
9
|
-
};
|
|
10
|
-
|
|
11
5
|
const PrescriptionsActionButton: React.FC = () => {
|
|
12
6
|
const { t } = useTranslation();
|
|
13
7
|
const label = t('activePrescriptions', 'Active prescriptions');
|
|
14
8
|
|
|
15
9
|
return (
|
|
16
|
-
<
|
|
17
|
-
|
|
10
|
+
<ActionMenuButton2
|
|
11
|
+
icon={(props: ComponentProps<typeof EventsIcon>) => <EventsIcon {...props} />}
|
|
18
12
|
label={label}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
workspaceToLaunch={{
|
|
14
|
+
workspaceName: 'active-prescriptions-workspace',
|
|
15
|
+
}}
|
|
22
16
|
/>
|
|
23
17
|
);
|
|
24
18
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { OverflowMenuItem } from '@carbon/react';
|
|
3
|
+
import { CertificateCheck } from '@carbon/react/icons';
|
|
4
|
+
import { launchWorkspace } from '@openmrs/esm-framework';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import styles from './prescriptions-action-menu-item.scss';
|
|
7
|
+
|
|
8
|
+
const PrescriptionsActionMenuItem: React.FC = () => {
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
|
|
11
|
+
const handleClick = useCallback(() => {
|
|
12
|
+
launchWorkspace('active-prescriptions-workspace');
|
|
13
|
+
}, []);
|
|
14
|
+
|
|
15
|
+
const label = t('prescriptionsActionMenuItem', 'Active prescriptions');
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<OverflowMenuItem
|
|
19
|
+
itemText={
|
|
20
|
+
<span className={styles.iconOnly} aria-label={label} title={label}>
|
|
21
|
+
<CertificateCheck size={16} aria-hidden="true" />
|
|
22
|
+
</span>
|
|
23
|
+
}
|
|
24
|
+
onClick={handleClick}
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// export default PrescriptionsActionMenuItem;
|
package/src/root.component.tsx
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import React, { useMemo, useState } from 'react';
|
|
12
12
|
import { PrescriptionService, PrescriptionPayload } from './prescriptions.service';
|
|
13
13
|
import useSWR from 'swr';
|
|
14
|
-
import { openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
|
|
14
|
+
import { openmrsFetch, restBaseUrl, Workspace2 } from '@openmrs/esm-framework';
|
|
15
15
|
import {
|
|
16
16
|
Checkbox,
|
|
17
17
|
ComboBox,
|
|
@@ -240,127 +240,127 @@ const Root: React.FC<RootProps> = ({ patientUuid, patient }) => {
|
|
|
240
240
|
};
|
|
241
241
|
|
|
242
242
|
return (
|
|
243
|
-
<
|
|
244
|
-
<div className={styles.
|
|
245
|
-
<
|
|
246
|
-
|
|
247
|
-
{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
243
|
+
<Workspace2 title={t('activePrescriptionsWorkspaceTitle', 'Prescrições ativas')} hasUnsavedChanges={false}>
|
|
244
|
+
<div className={styles.workspace}>
|
|
245
|
+
<div className={styles.header}>
|
|
246
|
+
<h2>{t('activePrescriptionsWorkspaceTitle', 'Prescrições ativas')}</h2>
|
|
247
|
+
<p className={styles.subtitle}>
|
|
248
|
+
{t(
|
|
249
|
+
'activePrescriptionsHelper',
|
|
250
|
+
'Revise o contexto do paciente, escolha os detalhes da visita e adicione os medicamentos à prescrição.',
|
|
251
|
+
)}
|
|
252
|
+
</p>
|
|
253
|
+
</div>
|
|
253
254
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
255
|
+
<section className={styles.section}>
|
|
256
|
+
<p className={styles.fieldLabel}>{t('visitTimingLabel', 'A visita é')}</p>
|
|
257
|
+
<Tabs
|
|
258
|
+
selectedIndex={activeTab === 'new' ? 0 : 1}
|
|
259
|
+
onChange={({ selectedIndex }) => setActiveTab(selectedIndex === 0 ? 'new' : 'past')}
|
|
260
|
+
>
|
|
261
|
+
<TabList aria-label={t('visitTimingLabel', 'A visita é')}>
|
|
262
|
+
<Tab>{t('visitTimingNew', 'Nova')}</Tab>
|
|
263
|
+
<Tab>{t('visitTimingPast', 'No passado')}</Tab>
|
|
264
|
+
</TabList>
|
|
265
|
+
<TabPanels>
|
|
266
|
+
<TabPanel className={styles.tabContent}>
|
|
267
|
+
<div className={styles.fieldGroup}>
|
|
268
|
+
<ComboBox
|
|
269
|
+
id="visit-location"
|
|
270
|
+
items={locationItems}
|
|
271
|
+
itemToString={(item) => item?.display ?? ''}
|
|
272
|
+
selectedItem={selectedLocation}
|
|
273
|
+
onChange={({ selectedItem }) => setSelectedLocation((selectedItem as Location) ?? null)}
|
|
274
|
+
placeholder={t('visitLocationPlaceholder', 'Selecione o local')}
|
|
275
|
+
titleText={t('visitLocationHeading', 'Local da visita')}
|
|
276
|
+
helperText={t('visitLocationHelper', 'Selecione onde a visita ocorrerá.')}
|
|
277
|
+
/>
|
|
278
|
+
</div>
|
|
278
279
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
280
|
+
<div className={styles.fieldGroup}>
|
|
281
|
+
<TextInput
|
|
282
|
+
id="insurance-policy"
|
|
283
|
+
labelText={t('insurancePolicyNumberLabel', 'Número da apólice (opcional)')}
|
|
284
|
+
placeholder={t('insurancePolicyNumberPlaceholder', 'Digite o número da apólice')}
|
|
285
|
+
value={policyNumber}
|
|
286
|
+
onChange={(event) => setPolicyNumber(event.target.value)}
|
|
287
|
+
/>
|
|
288
|
+
</div>
|
|
289
|
+
<div className={styles.fieldGroup}>
|
|
290
|
+
<Checkbox
|
|
291
|
+
id="sign-prescription-checkbox"
|
|
292
|
+
labelText={t('signPrescriptionLabel', 'Assinar digitalmente a prescrição')}
|
|
293
|
+
checked={digitallySigned}
|
|
294
|
+
onChange={() => setDigitallySigned((prev) => !prev)}
|
|
295
|
+
/>
|
|
296
|
+
<Checkbox
|
|
297
|
+
id="print-prescription-checkbox"
|
|
298
|
+
labelText={t('printPrescriptionLabel', 'Imprimir a prescrição')}
|
|
299
|
+
checked={printRequested}
|
|
300
|
+
onChange={() => setPrintRequested((prev) => !prev)}
|
|
301
|
+
/>
|
|
302
|
+
</div>
|
|
302
303
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
</
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
</
|
|
328
|
-
</div>
|
|
304
|
+
<div className={styles.fieldGroup}>
|
|
305
|
+
<h3>{t('medicationsList', 'Medicamentos adicionados')}</h3>
|
|
306
|
+
{medications.length === 0 ? (
|
|
307
|
+
<p>{t('noMedicationsAdded', 'Nenhum medicamento adicionado ainda.')}</p>
|
|
308
|
+
) : (
|
|
309
|
+
<ul className={styles.medicationsList}>
|
|
310
|
+
{medications.map((med, idx) => (
|
|
311
|
+
<li key={idx} className={styles.medicationItem}>
|
|
312
|
+
<span>
|
|
313
|
+
<b>{med.drugName}</b> - {med.dosage} {med.unit} - {med.frequency}
|
|
314
|
+
</span>
|
|
315
|
+
<button type="button" onClick={() => openEditMedication(idx)}>
|
|
316
|
+
{t('edit', 'Editar')}
|
|
317
|
+
</button>
|
|
318
|
+
<button type="button" onClick={() => handleRemoveMedication(idx)}>
|
|
319
|
+
{t('remove', 'Remover')}
|
|
320
|
+
</button>
|
|
321
|
+
</li>
|
|
322
|
+
))}
|
|
323
|
+
</ul>
|
|
324
|
+
)}
|
|
325
|
+
<button type="button" onClick={openAddMedication} className={styles.addMedicationBtn}>
|
|
326
|
+
{t('addMedication', '+ Adicionar medicamento')}
|
|
327
|
+
</button>
|
|
328
|
+
</div>
|
|
329
329
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
330
|
+
{showAddMedication && (
|
|
331
|
+
<div className={styles.overlayForm}>
|
|
332
|
+
<div className={styles.overlayContent}>
|
|
333
|
+
<h3>
|
|
334
|
+
{editIndex === null
|
|
335
|
+
? t('addMedication', 'Adicionar medicamento')
|
|
336
|
+
: t('editMedication', 'Editar medicamento')}
|
|
337
|
+
</h3>
|
|
338
|
+
<MedicationForm
|
|
339
|
+
initialData={editIndex !== null ? medications[editIndex] : undefined}
|
|
340
|
+
onSubmit={editIndex === null ? handleAddMedication : handleEditMedication}
|
|
341
|
+
onCancel={() => {
|
|
342
|
+
setShowAddMedication(false);
|
|
343
|
+
setEditIndex(null);
|
|
344
|
+
}}
|
|
345
|
+
t={t}
|
|
346
|
+
/>
|
|
347
|
+
</div>
|
|
348
348
|
</div>
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
</
|
|
360
|
-
</
|
|
361
|
-
</
|
|
362
|
-
</
|
|
363
|
-
</
|
|
349
|
+
)}
|
|
350
|
+
</TabPanel>
|
|
351
|
+
<TabPanel className={styles.tabContent}>
|
|
352
|
+
<InlineNotification
|
|
353
|
+
lowContrast
|
|
354
|
+
kind="info"
|
|
355
|
+
title={t('inPastTabPlaceholderTitle', 'Receitas históricas em breve')}
|
|
356
|
+
subtitle={t('inPastTabPlaceholderSubtitle', 'Volte para Nova para gerenciar medicamentos atuais.')}
|
|
357
|
+
/>
|
|
358
|
+
</TabPanel>
|
|
359
|
+
</TabPanels>
|
|
360
|
+
</Tabs>
|
|
361
|
+
</section>
|
|
362
|
+
</div>
|
|
363
|
+
</Workspace2>
|
|
364
364
|
);
|
|
365
365
|
};
|
|
366
366
|
|
package/src/routes.json
CHANGED
|
@@ -19,21 +19,22 @@
|
|
|
19
19
|
"name": "Brand box",
|
|
20
20
|
"component": "blueBox",
|
|
21
21
|
"slot": "Boxes"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "prescriptions-action-menu",
|
|
25
|
-
"component": "prescriptionsActionButton",
|
|
26
|
-
"slot": "action-menu-patient-chart-items-slot"
|
|
27
22
|
}
|
|
28
23
|
],
|
|
29
|
-
"
|
|
24
|
+
"workspaces2": [
|
|
30
25
|
{
|
|
31
|
-
"name": "active-prescriptions",
|
|
32
|
-
"title": "activePrescriptionsWorkspaceTitle",
|
|
26
|
+
"name": "active-prescriptions-workspace",
|
|
33
27
|
"component": "root",
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
"window": "active-prescriptions-workspace"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"workspaceWindows2": [
|
|
32
|
+
{
|
|
33
|
+
"name": "active-prescriptions-workspace",
|
|
34
|
+
"group": "patient-chart",
|
|
35
|
+
"icon": "prescriptionsActionButton",
|
|
36
|
+
"width": "wider",
|
|
37
|
+
"order": 4
|
|
37
38
|
}
|
|
38
39
|
]
|
|
39
40
|
}
|
package/dist/177.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 177.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[177],{1496:(e,t,n)=>{n.d(t,{CC:()=>r,I0:()=>a,jB:()=>i,q2:()=>o});const r=0,i=1,o=2,a=3},2177:(e,t,n)=>{n.d(t,{Ay:()=>h,BE:()=>g});var r=n(6072),i=n(9888),o=n(6965),a=n(1496),s=n(4993);const c=()=>{};c(),new WeakMap;const u=r.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),l={dedupe:!0},d=Promise.resolve(o.U),f=()=>o.A,g=o.O.defineProperty(o.g,"defaultValue",{value:o.d}),h=(0,s.qm)((e,t,n)=>{const{cache:c,compare:g,suspense:h,fallbackData:v,revalidateOnMount:p,revalidateIfStale:w,refreshInterval:y,refreshWhenHidden:b,refreshWhenOffline:m,keepPreviousData:S,strictServerPrefetchWarning:O}=n,[_,E,R,k]=o.b.get(c),[T,C]=(0,o.s)(e),L=(0,r.useRef)(!1),j=(0,r.useRef)(!1),D=(0,r.useRef)(T),I=(0,r.useRef)(t),V=(0,r.useRef)(n),P=()=>V.current,x=()=>P().isVisible()&&P().isOnline(),[W,A,M,q]=(0,o.z)(c,T),F=(0,r.useRef)({}).current,U=(0,o.e)(v)?(0,o.e)(n.fallback)?o.U:n.fallback[T]:v,B=(e,t)=>{for(const n in F){const r=n;if("data"===r){if(!g(e[r],t[r])){if(!(0,o.e)(e[r]))return!1;if(!g(Q,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},$=!L.current,z=(0,r.useMemo)(()=>{const e=W(),n=q(),r=e=>{const n=(0,o.m)(e);delete n._k;const r=(()=>{if(!T)return!1;if(!t)return!1;if(P().isPaused())return!1;if($&&!(0,o.e)(p))return p;const e=(0,o.e)(U)?n.data:U;return(0,o.e)(e)||w})();return r?{isValidating:!0,isLoading:!0,...n}:n},i=r(e),a=e===n?i:r(n);let s=i;return[()=>{const e=r(W());return B(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[c,T]),H=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>M(T,(t,n)=>{B(n,t)||e()}),[c,T]),z[0],z[1]),J=_[T]&&_[T].length>0,N=H.data,Y=(0,o.e)(N)?U&&(0,o.B)(U)?u(U):U:N,G=H.error,K=(0,r.useRef)(Y),Q=S?(0,o.e)(N)?(0,o.e)(K.current)?Y:K.current:N:Y,X=T&&(0,o.e)(Y),Z=(0,r.useRef)(null);!o.I&&(0,i.useSyncExternalStore)(f,()=>(Z.current=!1,Z),()=>(Z.current=!0,Z));const ee=Z.current;O&&ee&&!h&&X&&console.warn(`Missing pre-initiated data for serialized key "${T}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const te=!(!T||!t)&&!P().isPaused()&&!(J&&!(0,o.e)(G))&&($&&!(0,o.e)(p)?p:h?!(0,o.e)(Y)&&w:(0,o.e)(Y)||w),ne=$&&te,re=(0,o.e)(H.isValidating)?ne:H.isValidating,ie=(0,o.e)(H.isLoading)?ne:H.isLoading,oe=(0,r.useCallback)(async e=>{const t=I.current;if(!T||!t||j.current||P().isPaused())return!1;let r,i,s=!0;const c=e||{},u=!R[T]||!c.dedupe,l=()=>o.r?!j.current&&T===D.current&&L.current:T===D.current,d={isValidating:!1,isLoading:!1},f=()=>{A(d)},h=()=>{const e=R[T];e&&e[1]===i&&delete R[T]},v={isValidating:!0};(0,o.e)(W().data)&&(v.isLoading=!0);try{if(u&&(A(v),n.loadingTimeout&&(0,o.e)(W().data)&&setTimeout(()=>{s&&l()&&P().onLoadingSlow(T,n)},n.loadingTimeout),R[T]=[t(C),(0,o.o)()]),[r,i]=R[T],r=await r,u&&setTimeout(h,n.dedupingInterval),!R[T]||R[T][1]!==i)return u&&l()&&P().onDiscarded(T),!1;d.error=o.U;const e=E[T];if(!(0,o.e)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),u&&l()&&P().onDiscarded(T),!1;const a=W().data;d.data=g(a,r)?a:r,u&&l()&&P().onSuccess(r,T,n)}catch(e){h();const t=P(),{shouldRetryOnError:n}=t;t.isPaused()||(d.error=e,u&&l()&&(t.onError(e,T,t),(!0===n||(0,o.a)(n)&&n(e))&&(P().revalidateOnFocus&&P().revalidateOnReconnect&&!x()||t.onErrorRetry(e,T,t,e=>{const t=_[T];t&&t[0]&&t[0](a.I0,e)},{retryCount:(c.retryCount||0)+1,dedupe:!0}))))}return s=!1,f(),!0},[T,c]),ae=(0,r.useCallback)((...e)=>(0,o.n)(c,D.current,...e),[]);if((0,o.u)(()=>{I.current=t,V.current=n,(0,o.e)(N)||(K.current=N)}),(0,o.u)(()=>{if(!T)return;const e=oe.bind(o.U,l);let t=0;if(P().revalidateOnFocus){const e=Date.now();t=e+P().focusThrottleInterval}const n=(0,s.aw)(T,_,(n,r={})=>{if(n==a.CC){const n=Date.now();P().revalidateOnFocus&&n>t&&x()&&(t=n+P().focusThrottleInterval,e())}else if(n==a.jB)P().revalidateOnReconnect&&x()&&e();else{if(n==a.q2)return oe();if(n==a.I0)return oe(r)}});return j.current=!1,D.current=T,L.current=!0,A({_k:C}),te&&(R[T]||((0,o.e)(Y)||o.I?e():(0,o.t)(e))),()=>{j.current=!0,n()}},[T]),(0,o.u)(()=>{let e;function t(){const t=(0,o.a)(y)?y(W().data):y;t&&-1!==e&&(e=setTimeout(n,t))}function n(){W().error||!b&&!P().isVisible()||!m&&!P().isOnline()?t():oe(l).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[y,b,m,T]),(0,r.useDebugValue)(Q),h){if(!o.r&&o.I&&X)throw new Error("Fallback data is required when using Suspense in SSR.");X&&(I.current=t,V.current=n,j.current=!1);const e=k[T],r=!(0,o.e)(e)&&X?ae(e):d;if(u(r),!(0,o.e)(G)&&X)throw G;const i=X?oe(l):d;!(0,o.e)(Q)&&X&&(i.status="fulfilled",i.value=!0),u(i)}return{mutate:ae,get data(){return F.data=!0,Q},get error(){return F.error=!0,G},get isValidating(){return F.isValidating=!0,re},get isLoading(){return F.isLoading=!0,ie}}})},4993:(e,t,n)=>{n.d(t,{Ht:()=>f,aw:()=>d,qm:()=>l});var r=n(6965),i=n(5430),o=n(6072);const a=r.i&&window.__SWR_DEVTOOLS_USE__,s=a?window.__SWR_DEVTOOLS_USE__:[],c=e=>(0,r.a)(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],u=s.concat(e=>(t,n,o)=>e(t,n&&((...e)=>{const[o]=(0,r.s)(t),[,,,a]=r.b.get(r.c);if(o.startsWith(i.q))return n(...e);const s=a[o];return(0,r.e)(s)?n(...e):(delete a[o],s)}),o)),l=e=>function(...t){const n=(()=>{const e=(0,o.useContext)(r.S);return(0,o.useMemo)(()=>(0,r.m)(r.d,e),[e])})(),[i,a,s]=c(t),l=(0,r.f)(n,s);let d=e;const{use:f}=l,g=(f||[]).concat(u);for(let e=g.length;e--;)d=g[e](d);return d(i,a||l.fetcher||null,l)},d=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},f=(e,t)=>(...n)=>{const[r,i,o]=c(n),a=(o.use||[]).concat(t);return e(r,i,{...o,use:a})};a&&(window.__SWR_DEVTOOLS_REACT__=o)},5430:(e,t,n)=>{n.d(t,{q:()=>r});const r="$inf$"},6965:(e,t,n)=>{n.d(t,{A:()=>s,B:()=>g,I:()=>T,O:()=>u,S:()=>J,U:()=>c,a:()=>d,b:()=>a,c:()=>B,d:()=>z,e:()=>l,f:()=>H,g:()=>N,i:()=>w,m:()=>f,n:()=>q,o:()=>M,r:()=>k,s:()=>W,t:()=>C,u:()=>L,z:()=>m});var r=n(6072),i=n(1496),o=Object.prototype.hasOwnProperty;const a=new WeakMap,s=()=>{},c=s(),u=Object,l=e=>e===c,d=e=>"function"==typeof e,f=(e,t)=>({...e,...t}),g=e=>d(e.then),h={},v={},p="undefined",w=typeof window!=p,y=typeof document!=p,b=w&&"Deno"in window,m=(e,t)=>{const n=a.get(e);return[()=>!l(t)&&e.get(t)||h,r=>{if(!l(t)){const i=e.get(t);t in v||(v[t]=i),n[5](t,f(i,r),i||h)}},n[6],()=>!l(t)&&t in v?v[t]:!l(t)&&e.get(t)||h]};let S=!0;const[O,_]=w&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[s,s],E={isOnline:()=>S,isVisible:()=>{const e=y&&document.visibilityState;return l(e)||"hidden"!==e}},R={initFocus:e=>(y&&document.addEventListener("visibilitychange",e),O("focus",e),()=>{y&&document.removeEventListener("visibilitychange",e),_("focus",e)}),initReconnect:e=>{const t=()=>{S=!0,e()},n=()=>{S=!1};return O("online",t),O("offline",n),()=>{_("online",t),_("offline",n)}}},k=!r.useId,T=!w||b,C=e=>w&&typeof window.requestAnimationFrame!=p?window.requestAnimationFrame(e):setTimeout(e,1),L=T?r.useEffect:r.useLayoutEffect,j="undefined"!=typeof navigator&&navigator.connection,D=!T&&j&&(["slow-2g","2g"].includes(j.effectiveType)||j.saveData),I=new WeakMap,V=(e,t)=>e===`[object ${t}]`;let P=0;const x=e=>{const t=typeof e,n=(r=e,u.prototype.toString.call(r));var r;const i=V(n,"Date"),o=V(n,"RegExp"),a=V(n,"Object");let s,c;if(u(e)!==e||i||o)s=i?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(s=I.get(e),s)return s;if(s=++P+"~",I.set(e,s),Array.isArray(e)){for(s="@",c=0;c<e.length;c++)s+=x(e[c])+",";I.set(e,s)}if(a){s="#";const t=u.keys(e).sort();for(;!l(c=t.pop());)l(e[c])||(s+=c+":"+x(e[c])+",");I.set(e,s)}}return s},W=e=>{if(d(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?x(e):"",t]};let A=0;const M=()=>++A;async function q(...e){const[t,n,r,o]=e,s=f({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let u=s.populateCache;const h=s.rollbackOnError;let v=s.optimisticData;const p=s.throwOnError;if(d(n)){const e=n,r=[],i=t.keys();for(const n of i)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(w))}return w(n);async function w(n){const[o]=W(n);if(!o)return;const[f,w]=m(t,o),[y,b,S,O]=a.get(t),_=()=>{const e=y[o];return(d(s.revalidate)?s.revalidate(f().data,n):!1!==s.revalidate)&&(delete S[o],delete O[o],e&&e[0])?e[0](i.q2).then(()=>f().data):f().data};if(e.length<3)return _();let E,R=r,k=!1;const T=M();b[o]=[T,0];const C=!l(v),L=f(),j=L.data,D=L._c,I=l(D)?j:D;if(C&&(v=d(v)?v(I,j):v,w({data:v,_c:I})),d(R))try{R=R(I)}catch(e){E=e,k=!0}if(R&&g(R)){if(R=await R.catch(e=>{E=e,k=!0}),T!==b[o][0]){if(k)throw E;return R}k&&C&&(e=>"function"==typeof h?h(e):!1!==h)(E)&&(u=!0,w({data:I,_c:c}))}if(u&&!k)if(d(u)){const e=u(R,I);w({data:e,error:c,_c:c})}else w({data:R,error:c,_c:c});if(b[o][1]=M(),Promise.resolve(_()).then(()=>{w({_c:c})}),!k)return R;if(p)throw E}}const F=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},U=(e,t)=>{if(!a.has(e)){const n=f(R,t),r=Object.create(null),o=q.bind(c,e);let u=s;const l=Object.create(null),d=(e,t)=>{const n=l[e]||[];return l[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},g=(t,n,r)=>{e.set(t,n);const i=l[t];if(i)for(const e of i)e(n,r)},h=()=>{if(!a.has(e)&&(a.set(e,[r,Object.create(null),Object.create(null),Object.create(null),o,g,d]),!T)){const t=n.initFocus(setTimeout.bind(c,F.bind(c,r,i.CC))),o=n.initReconnect(setTimeout.bind(c,F.bind(c,r,i.jB)));u=()=>{t&&t(),o&&o(),a.delete(e)}}};return h(),[e,o,h,u]}return[e,a.get(e)[4]]},[B,$]=U(new Map),z=f({onLoadingSlow:s,onSuccess:s,onError:s,onErrorRetry:(e,t,n,r,i)=>{const o=n.errorRetryCount,a=i.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!l(o)&&a>o||setTimeout(r,s,i)},onDiscarded:s,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:D?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:D?5e3:3e3,compare:function e(t,n){var r,i;if(t===n)return!0;if(t&&n&&(r=t.constructor)===n.constructor){if(r===Date)return t.getTime()===n.getTime();if(r===RegExp)return t.toString()===n.toString();if(r===Array){if((i=t.length)===n.length)for(;i--&&e(t[i],n[i]););return-1===i}if(!r||"object"==typeof t){for(r in i=0,t){if(o.call(t,r)&&++i&&!o.call(n,r))return!1;if(!(r in n)||!e(t[r],n[r]))return!1}return Object.keys(n).length===i}}return t!=t&&n!=n},isPaused:()=>!1,cache:B,mutate:$,fallback:{}},E),H=(e,t)=>{const n=f(e,t);if(t){const{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=f(i,a))}return n},J=(0,r.createContext)({}),N=e=>{const{value:t}=e,n=(0,r.useContext)(J),i=d(t),o=(0,r.useMemo)(()=>i?t(n):t,[i,n,t]),a=(0,r.useMemo)(()=>i?o:H(n,o),[i,n,o]),s=o&&o.provider,u=(0,r.useRef)(c);s&&!u.current&&(u.current=U(s(a.cache||B),o));const l=u.current;return l&&(a.cache=l[0],a.mutate=l[1]),L(()=>{if(l)return l[2]&&l[2](),l[3]},[]),(0,r.createElement)(J.Provider,f(e,{value:a}))}},8493:(e,t,n)=>{var r=n(6072),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),a(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},9888:(e,t,n)=>{e.exports=n(8493)}}]);
|
package/dist/237.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 237.js.LICENSE.txt */
|
|
2
|
-
(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[237,618,647],{428:(e,r,t)=>{"use strict";t.d(r,{A:()=>c});const n={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var s=t(5556),o=t.n(s),a=t(6072),i=t.n(a);const c=(0,a.forwardRef)(function({className:e,children:r,tabIndex:t,xmlns:s="http://www.w3.org/2000/svg",preserveAspectRatio:o="xMidYMid meet",...a},c){const{tabindex:p,...l}=function({width:e,height:r,viewBox:t=`0 0 ${e} ${r}`,...s}={}){const{tabindex:o,...a}=s,i={...n,...a,width:e,height:r,viewBox:t};return i["aria-label"]||i["aria-labelledby"]?(i.role="img",null!=o&&(i.focusable="true",i.tabindex=o)):i["aria-hidden"]=!0,i}({...a,tabindex:t}),u=l;return e&&(u.className=e),null!=p&&(u.tabIndex="number"==typeof p?p:Number(t)),c&&(u.ref=c),s&&(u.xmlns=s),o&&(u.preserveAspectRatio=o),i().createElement("svg",u,r)});c.displayName="Icon",c.propTypes={"aria-hidden":o().oneOfType([o().bool,o().oneOf(["true","false"])]),"aria-label":o().string,"aria-labelledby":o().string,children:o().node,className:o().string,height:o().oneOfType([o().number,o().string]),preserveAspectRatio:o().string,tabIndex:o().oneOfType([o().number,o().string]),viewBox:o().string,width:o().oneOfType([o().number,o().string]),xmlns:o().string}},1020:(e,r,t)=>{"use strict";var n=t(6072),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function p(e,r,t){var n,o={},p=null,l=null;for(n in void 0!==t&&(p=""+t),void 0!==r.key&&(p=""+r.key),void 0!==r.ref&&(l=r.ref),r)a.call(r,n)&&!c.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:s,type:e,key:p,ref:l,props:o,_owner:i.current}}r.Fragment=o,r.jsx=p,r.jsxs=p},2694:(e,r,t)=>{"use strict";var n=t(6925);function s(){}function o(){}o.resetWarningCache=s,e.exports=function(){function e(e,r,t,s,o,a){if(a!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:o,resetWarningCache:s};return t.PropTypes=t,t}},4848:(e,r,t)=>{"use strict";e.exports=t(1020)},5556:(e,r,t)=>{e.exports=t(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
|
package/dist/237.js.LICENSE.txt
DELETED
package/dist/31.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 31.js.LICENSE.txt */
|
|
2
|
-
(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[31,237,618,647],{428:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});const n={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var o=r(5556),i=r.n(o),s=r(6072),a=r.n(s);const c=(0,s.forwardRef)(function({className:e,children:t,tabIndex:r,xmlns:o="http://www.w3.org/2000/svg",preserveAspectRatio:i="xMidYMid meet",...s},c){const{tabindex:p,...l}=function({width:e,height:t,viewBox:r=`0 0 ${e} ${t}`,...o}={}){const{tabindex:i,...s}=o,a={...n,...s,width:e,height:t,viewBox:r};return a["aria-label"]||a["aria-labelledby"]?(a.role="img",null!=i&&(a.focusable="true",a.tabindex=i)):a["aria-hidden"]=!0,a}({...s,tabindex:r}),u=l;return e&&(u.className=e),null!=p&&(u.tabIndex="number"==typeof p?p:Number(r)),c&&(u.ref=c),o&&(u.xmlns=o),i&&(u.preserveAspectRatio=i),a().createElement("svg",u,t)});c.displayName="Icon",c.propTypes={"aria-hidden":i().oneOfType([i().bool,i().oneOf(["true","false"])]),"aria-label":i().string,"aria-labelledby":i().string,children:i().node,className:i().string,height:i().oneOfType([i().number,i().string]),preserveAspectRatio:i().string,tabIndex:i().oneOfType([i().number,i().string]),viewBox:i().string,width:i().oneOfType([i().number,i().string]),xmlns:i().string}},1020:(e,t,r)=>{"use strict";var n=r(6072),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function p(e,t,r){var n,i={},p=null,l=null;for(n in void 0!==r&&(p=""+r),void 0!==t.key&&(p=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,n)&&!c.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:p,ref:l,props:i,_owner:a.current}}t.Fragment=i,t.jsx=p,t.jsxs=p},2499:(e,t,r)=>{"use strict";r.r(t),r.d(t,{blueBox:()=>_,brandBox:()=>b,importTranslation:()=>d,prescriptionsActionButton:()=>h,redBox:()=>m,root:()=>g,startupApp:()=>y});var n=r(6920),o={casualGreeting:{_type:n.Type.Boolean,_default:!1,_description:"Whether to use a casual greeting (or a formal one)."},whoToGreet:{_type:n.Type.Array,_default:["World"],_description:"Who should be greeted. Names will be separated by a comma and space.",_elements:{_type:n.Type.String},_validators:[(0,n.validator)(function(e){return e.length>0},"At least one person must be greeted.")]}},i=r(6072),s=r.n(i),a=r(9184),c=r(3806),p=r(2076),l=function(){(0,n.launchWorkspace2)("active-prescriptions")};var u="@cc-openmrs/cc-esm-active-prescriptions",f={featureName:"active-prescriptions",moduleName:u},d=r(4767);function y(){(0,n.defineConfigSchema)(u,o)}var m=(0,n.getAsyncLifecycle)(function(){return r.e(319).then(r.bind(r,4319))},f),_=(0,n.getAsyncLifecycle)(function(){return r.e(966).then(r.bind(r,966))},f),b=(0,n.getAsyncLifecycle)(function(){return r.e(537).then(r.bind(r,1537))},f),h=(0,n.getSyncLifecycle)(function(){var e=(0,(0,p.useTranslation)().t)("activePrescriptions","Active prescriptions");return s().createElement(c.ActionMenuButton,{getIcon:function(e){return s().createElement(a.c_,e)},label:e,iconDescription:e,handler:l,type:"active-prescriptions"})},f),g=(0,n.getAsyncLifecycle)(function(){return Promise.all([r.e(177),r.e(559),r.e(437)]).then(r.bind(r,5437))},f)},2694:(e,t,r)=>{"use strict";var n=r(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,s){if(s!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},4767:(e,t,r)=>{var n={"./am.json":[1197,197],"./en.json":[4300,300],"./es.json":[3099,99],"./fr.json":[4055,55],"./he.json":[2271,652],"./km.json":[6716,335],"./pt.json":[6679,679]};function o(e){if(!r.o(n,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=n[e],o=t[0];return r.e(t[1]).then(()=>r(o))}o.keys=()=>Object.keys(n),o.id=4767,e.exports=o},4848:(e,t,r)=>{"use strict";e.exports=r(1020)},5556:(e,t,r)=>{e.exports=r(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
|