@openmrs/esm-react-utils 3.2.1-pre.1094 → 3.2.1-pre.1102
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/openmrs-esm-react-utils.js.map +1 -1
- package/package.json +7 -7
- package/src/ConfigurableLink.tsx +1 -1
- package/src/UserHasAccess.tsx +1 -0
- package/src/createUseStore.ts +1 -0
- package/src/getLifecycle.ts +1 -0
- package/src/public.ts +26 -0
- package/src/useAssignedExtensionIds.ts +1 -0
- package/src/useAssignedExtensions.ts +1 -0
- package/src/useBodyScrollLock.ts +1 -0
- package/src/useConfig.ts +1 -0
- package/src/useConnectedExtensions.ts +1 -0
- package/src/useConnectivity.ts +1 -0
- package/src/useCurrentPatient.ts +1 -0
- package/src/useExtensionSlotMeta.ts +1 -0
- package/src/useExtensionStore.ts +1 -0
- package/src/useLayoutType.ts +1 -0
- package/src/useLocations.tsx +1 -0
- package/src/useOnClickOutside.tsx +2 -1
- package/src/usePagination.ts +1 -0
- package/src/usePatient.ts +2 -1
- package/src/useSessionUser.tsx +1 -0
- package/src/useStore.ts +1 -0
- package/src/useVisit.ts +1 -0
- package/src/useVisitTypes.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-react-utils",
|
|
3
|
-
"version": "3.2.1-pre.
|
|
3
|
+
"version": "3.2.1-pre.1102",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "React utilities for OpenMRS.",
|
|
6
6
|
"browser": "dist/openmrs-esm-react-utils.js",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"react-i18next": "11.x"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@openmrs/esm-api": "^3.2.1-pre.
|
|
59
|
-
"@openmrs/esm-config": "^3.2.1-pre.
|
|
60
|
-
"@openmrs/esm-error-handling": "^3.2.1-pre.
|
|
61
|
-
"@openmrs/esm-extensions": "^3.2.1-pre.
|
|
62
|
-
"@openmrs/esm-globals": "^3.2.1-pre.
|
|
58
|
+
"@openmrs/esm-api": "^3.2.1-pre.1102",
|
|
59
|
+
"@openmrs/esm-config": "^3.2.1-pre.1102",
|
|
60
|
+
"@openmrs/esm-error-handling": "^3.2.1-pre.1102",
|
|
61
|
+
"@openmrs/esm-extensions": "^3.2.1-pre.1102",
|
|
62
|
+
"@openmrs/esm-globals": "^3.2.1-pre.1102",
|
|
63
63
|
"dayjs": "^1.10.8",
|
|
64
64
|
"i18next": "^19.6.0",
|
|
65
65
|
"react": "^16.13.1",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"rxjs": "^6.5.3",
|
|
69
69
|
"unistore": "^3.5.2"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "6780e8f11ac37b73336935de1f56ed5b82eb51c0"
|
|
72
72
|
}
|
package/src/ConfigurableLink.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @module @category Navigation */
|
|
1
2
|
import React, { MouseEvent, AnchorHTMLAttributes } from "react";
|
|
2
3
|
import { navigate, interpolateUrl } from "@openmrs/esm-config";
|
|
3
4
|
|
|
@@ -27,7 +28,6 @@ export interface ConfigurableLinkProps
|
|
|
27
28
|
* @param to The target path or URL. Supports interpolation. See [[navigate]]
|
|
28
29
|
* @param children Inline elements within the link
|
|
29
30
|
* @param otherProps Any other valid props for an <a> tag except `href` and `onClick`
|
|
30
|
-
* @category Navigation
|
|
31
31
|
*/
|
|
32
32
|
export const ConfigurableLink: React.FC<ConfigurableLinkProps> = ({
|
|
33
33
|
to,
|
package/src/UserHasAccess.tsx
CHANGED
package/src/createUseStore.ts
CHANGED
package/src/getLifecycle.ts
CHANGED
package/src/public.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export { ExtensionData } from "./ComponentContext";
|
|
2
|
+
export * from "./ConfigurableLink";
|
|
3
|
+
export * from "./createUseStore";
|
|
4
|
+
export * from "./Extension";
|
|
5
|
+
export * from "./ExtensionSlot";
|
|
6
|
+
export * from "./getLifecycle";
|
|
7
|
+
export * from "./useAssignedExtensions";
|
|
8
|
+
export * from "./useAssignedExtensionIds";
|
|
9
|
+
export * from "./useBodyScrollLock";
|
|
10
|
+
export * from "./useConfig";
|
|
11
|
+
export * from "./useConnectedExtensions";
|
|
12
|
+
export * from "./useConnectivity";
|
|
13
|
+
export * from "./usePatient";
|
|
14
|
+
export * from "./useCurrentPatient";
|
|
15
|
+
export * from "./useExtensionSlot";
|
|
16
|
+
export * from "./useExtensionSlotMeta";
|
|
17
|
+
export * from "./useExtensionStore";
|
|
18
|
+
export * from "./useLayoutType";
|
|
19
|
+
export * from "./useLocations";
|
|
20
|
+
export * from "./useOnClickOutside";
|
|
21
|
+
export * from "./UserHasAccess";
|
|
22
|
+
export * from "./useSessionUser";
|
|
23
|
+
export * from "./useStore";
|
|
24
|
+
export * from "./useVisit";
|
|
25
|
+
export * from "./useVisitTypes";
|
|
26
|
+
export * from "./usePagination";
|
package/src/useBodyScrollLock.ts
CHANGED
package/src/useConfig.ts
CHANGED
package/src/useConnectivity.ts
CHANGED
package/src/useCurrentPatient.ts
CHANGED
package/src/useExtensionStore.ts
CHANGED
package/src/useLayoutType.ts
CHANGED
package/src/useLocations.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @module @category UI */
|
|
1
2
|
import { useRef, useEffect } from "react";
|
|
2
3
|
|
|
3
4
|
export function useOnClickOutside<T extends HTMLElement = HTMLElement>(
|
|
@@ -10,7 +11,7 @@ export function useOnClickOutside<T extends HTMLElement = HTMLElement>(
|
|
|
10
11
|
if (active) {
|
|
11
12
|
const listener = (event: Event) => {
|
|
12
13
|
if (ref?.current?.contains(event.target as Node)) {
|
|
13
|
-
|
|
14
|
+
return;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
handler(event);
|
package/src/usePagination.ts
CHANGED
package/src/usePatient.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/** @module @category API */
|
|
1
2
|
import { useEffect, useReducer } from "react";
|
|
2
3
|
import { fetchCurrentPatient, PatientUuid } from "@openmrs/esm-api";
|
|
3
4
|
|
|
4
|
-
type NullablePatient = fhir.Patient | null;
|
|
5
|
+
export type NullablePatient = fhir.Patient | null;
|
|
5
6
|
|
|
6
7
|
interface CurrentPatientState {
|
|
7
8
|
patientUuid: string | null;
|
package/src/useSessionUser.tsx
CHANGED
package/src/useStore.ts
CHANGED
package/src/useVisit.ts
CHANGED
package/src/useVisitTypes.ts
CHANGED