- ComponentConfig
- ComponentDecoratorOptions
- ConfigurableLinkProps
- ExtensionData
- ExtensionProps
- ExtensionSlotBaseProps
- OpenmrsReactComponentProps
- OpenmrsReactComponentState
- UserHasAccessProps
- createUseStore
- getAsyncExtensionLifecycle
- getAsyncLifecycle
- getLifecycle
- getSyncLifecycle
- openmrsComponentDecorator
- useAssignedExtensionIds
- useAttachedExtensionIds
- useConfig
- useConnectedExtensions
- useConnectivity
- useCurrentPatient
- useExtension
- useExtensionSlot
- useExtensionSlotConfig
- useExtensionSlotMeta
- useExtensionStore
- useForceUpdate
- useLayoutType
- useLocations
- useNavigationContext
- usePagination
- useSessionUser
- useStore
- useStoreState
- useVisit
- useVisitTypes
Ƭ Actions: Function
| { [key: string]: Function
; }
packages/framework/esm-react-utils/src/createUseStore.ts:4
Ƭ BoundActions: Object
▪ [key: string
]: BoundAction
packages/framework/esm-react-utils/src/createUseStore.ts:5
Ƭ ExtensionSlotProps: ExtensionSlotBaseProps & React.HTMLAttributes
<HTMLDivElement>
packages/framework/esm-react-utils/src/ExtensionSlot.tsx:54
Ƭ LayoutType: "tablet"
| "phone"
| "desktop"
packages/framework/esm-react-utils/src/useLayoutType.ts:3
• Const
ConfigurableLink: React.FC
<ConfigurableLinkProps>
A React link component which calls [[navigate]] when clicked
param
The target path or URL. Supports interpolation. See [[navigate]]
param
Inline elements within the link
param
Any other valid props for an tag except href
and onClick
packages/framework/esm-react-utils/src/ConfigurableLink.tsx:32
• Const
ComponentContext: Context
<ComponentConfig>
Available to all components. Provided by openmrsComponentDecorator
.
packages/framework/esm-react-utils/src/ComponentContext.ts:17
• Const
Extension: React.FC
<ExtensionProps>
Represents the position in the DOM where each extension within an extension slot is rendered.
Renders once for each extension attached to that extension slot.
Usage of this component must have an ancestor <ExtensionSlot>
.
packages/framework/esm-react-utils/src/Extension.tsx:21
• Const
ExtensionSlot: React.FC
<ExtensionSlotProps>
packages/framework/esm-react-utils/src/ExtensionSlot.tsx:57
• Const
UserHasAccess: React.FC
<UserHasAccessProps>
packages/framework/esm-react-utils/src/UserHasAccess.tsx:8
▸ createUseStore<T>(store
): () => T
(actions
: Actions) => T
& BoundActions(actions?
: Actions) => T
& BoundActions
Name |
---|
T |
Name | Type |
---|---|
store |
Store <T> |
fn
▸ (): T
T
▸ (actions
): T
& BoundActions
Name | Type |
---|---|
actions |
Actions |
T
& BoundActions
▸ (actions?
): T
& BoundActions
Name | Type |
---|---|
actions? |
Actions |
T
& BoundActions
packages/framework/esm-react-utils/src/createUseStore.ts:21
▸ Const
getAsyncExtensionLifecycle<T>(lazy
, options
): () => Promise
<ReactAppOrParcel<any>>
deprecated
Use getAsyncLifecycle instead.
Name |
---|
T |
Name | Type |
---|---|
lazy |
() => Promise <Object > |
options |
ComponentDecoratorOptions |
fn
▸ (): Promise
<ReactAppOrParcel<any>>
Promise
<ReactAppOrParcel<any>>
packages/framework/esm-react-utils/src/getLifecycle.ts:38
▸ getAsyncLifecycle<T>(lazy
, options
): () => Promise
<ReactAppOrParcel<any>>
Name |
---|
T |
Name | Type |
---|---|
lazy |
() => Promise <Object > |
options |
ComponentDecoratorOptions |
fn
▸ (): Promise
<ReactAppOrParcel<any>>
Promise
<ReactAppOrParcel<any>>
packages/framework/esm-react-utils/src/getLifecycle.ts:20
▸ getLifecycle<T>(Component
, options
): ReactAppOrParcel
<any>
Name |
---|
T |
Name | Type |
---|---|
Component |
React.ComponentType <T> |
options |
ComponentDecoratorOptions |
ReactAppOrParcel
<any>
packages/framework/esm-react-utils/src/getLifecycle.ts:9
▸ getSyncLifecycle<T>(Component
, options
): () => Promise
<ReactAppOrParcel<any>>
Name |
---|
T |
Name | Type |
---|---|
Component |
React.ComponentType <T> |
options |
ComponentDecoratorOptions |
fn
▸ (): Promise
<ReactAppOrParcel<any>>
Promise
<ReactAppOrParcel<any>>
packages/framework/esm-react-utils/src/getLifecycle.ts:28
▸ openmrsComponentDecorator(userOpts
): (Comp
: ComponentType
<Object
>) => ComponentType
<any>
Name | Type |
---|---|
userOpts |
ComponentDecoratorOptions |
fn
▸ (Comp
): ComponentType
<any>
Name | Type |
---|---|
Comp |
ComponentType <Object > |
ComponentType
<any>
packages/framework/esm-react-utils/src/openmrsComponentDecorator.tsx:71
▸ useAssignedExtensionIds(extensionSlotName
): string
[]
Gets the assigned extension ids for a given extension slot name. Does not consider if offline or online.
Name | Type | Description |
---|---|---|
extensionSlotName |
string |
The name of the slot to get the assigned IDs for. |
string
[]
packages/framework/esm-react-utils/src/useAssignedExtensionIds.ts:11
▸ useAttachedExtensionIds(extensionSlotName
): string
[]
Gets the assigned extension ids for the given slot.
Name | Type |
---|---|
extensionSlotName |
string |
string
[]
packages/framework/esm-react-utils/src/useAttachedExtensionIds.ts:11
▸ useConfig(): Object
Use this React Hook to obtain your module's configuration.
Object
Name | Type | Description |
---|---|---|
constructor |
Function |
The initial value of Object.prototype.constructor is the standard built-in Object constructor. |
hasOwnProperty |
(v : PropertyKey ) => boolean |
- |
isPrototypeOf |
(v : Object ) => boolean |
- |
propertyIsEnumerable |
(v : PropertyKey ) => boolean |
- |
toLocaleString |
() => string |
- |
toString |
() => string |
- |
valueOf |
() => Object |
- |
packages/framework/esm-react-utils/src/useConfig.ts:104
▸ useConnectedExtensions(extensionSlotName
): ExtensionRegistration
[]
Gets the assigned extension for a given extension slot name. Considers if offline or online.
Name | Type | Description |
---|---|---|
extensionSlotName |
string |
The name of the slot to get the assigned extensions for. |
ExtensionRegistration
[]
packages/framework/esm-react-utils/src/useConnectedExtensions.ts:31
▸ useConnectivity(): boolean
boolean
packages/framework/esm-react-utils/src/useConnectivity.ts:4
▸ useCurrentPatient(patientUuid?
): [boolean
, NullablePatient
, PatientUuid
, Error
| null
]
Name | Type |
---|---|
patientUuid |
PatientUuid |
[boolean
, NullablePatient
, PatientUuid
, Error
| null
]
packages/framework/esm-react-utils/src/useCurrentPatient.ts:79
▸ useExtension<TRef>(state?
): [RefObject
<TRef>, ExtensionData | undefined
]
Name | Type |
---|---|
TRef |
TRef : HTMLElement |
Name | Type |
---|---|
state? |
Record <string, any> |
[RefObject
<TRef>, ExtensionData | undefined
]
packages/framework/esm-react-utils/src/useExtension.ts:5
▸ useExtensionSlot(extensionSlotName
): Object
Name | Type |
---|---|
extensionSlotName |
string |
Object
Name | Type |
---|---|
extensionSlotModuleName |
string |
extensionSlotName |
string |
extensions |
ExtensionRegistration [] |
packages/framework/esm-react-utils/src/useExtensionSlot.ts:9
▸ useExtensionSlotConfig(extensionSlotName
): ExtensionSlotConfigObject
Name | Type |
---|---|
extensionSlotName |
string |
ExtensionSlotConfigObject
packages/framework/esm-react-utils/src/useExtensionSlotConfig.ts:16
▸ useExtensionSlotMeta(extensionSlotName
): Object
Extract meta data from all extension for a given extension slot.
Name | Type |
---|---|
extensionSlotName |
string |
Object
packages/framework/esm-react-utils/src/useExtensionSlotMeta.ts:8
▸ Const
useExtensionStore(): T
T
packages/framework/esm-react-utils/src/useExtensionStore.ts:4
▸ Const
useExtensionStore(actions
): T
& BoundActions
Name | Type |
---|---|
actions |
Actions |
T
& BoundActions
packages/framework/esm-react-utils/src/useExtensionStore.ts:4
▸ Const
useExtensionStore(actions?
): T
& BoundActions
Name | Type |
---|---|
actions? |
Actions |
T
& BoundActions
packages/framework/esm-react-utils/src/useExtensionStore.ts:4
▸ useForceUpdate(): () => void
fn
▸ (): void
void
packages/framework/esm-react-utils/src/useForceUpdate.ts:3
▸ useLayoutType(): LayoutType
packages/framework/esm-react-utils/src/useLayoutType.ts:22
▸ useLocations(): Location
[]
Location
[]
packages/framework/esm-react-utils/src/useLocations.tsx:4
▸ useNavigationContext(context
): void
deprecated
Don't use this anymore.
Name | Type |
---|---|
context |
NavigationContext |
void
packages/framework/esm-react-utils/src/useNavigationContext.ts:10
▸ usePagination<T>(data?
, resultsPerPage?
): Object
Name |
---|
T |
Name | Type | Default value |
---|---|---|
data |
T [] |
[] |
resultsPerPage |
number |
undefined |
Object
Name | Type |
---|---|
currentPage |
number |
paginated |
boolean |
results |
T [] |
showNextButton |
boolean |
showPreviousButton |
boolean |
totalPages |
number |
goTo |
(page : number ) => void |
goToNext |
() => void |
goToPrevious |
() => void |
packages/framework/esm-react-utils/src/usePagination.ts:5
▸ useSessionUser(): null
| SessionUser
null
| SessionUser
packages/framework/esm-react-utils/src/useSessionUser.tsx:4
▸ useStore<T>(store
): T
Name |
---|
T |
Name | Type |
---|---|
store |
Store <T> |
T
packages/framework/esm-react-utils/src/useStore.ts:4
▸ useStore<T>(store
, actions
): T
& BoundActions
Name |
---|
T |
Name | Type |
---|---|
store |
Store <T> |
actions |
Actions |
T
& BoundActions
packages/framework/esm-react-utils/src/useStore.ts:5
▸ useStoreState<T, U>(store
, select
): U
Name |
---|
T |
U |
Name | Type |
---|---|
store |
Store <T> |
select |
(state : T ) => U |
U
packages/framework/esm-react-utils/src/useStoreState.ts:5
▸ useVisit(patientUuid
): Object
Name | Type |
---|---|
patientUuid |
string |
Object
Name | Type |
---|---|
currentVisit |
null | Visit |
error |
null |
packages/framework/esm-react-utils/src/useVisit.ts:11
▸ useVisitTypes(): VisitType
[]
VisitType
[]