@openmrs/esm-framework 3.1.10-pre.92 → 3.1.11-pre.597
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/README.md +2 -8
- package/dist/openmrs-esm-framework.js +2 -21
- package/dist/openmrs-esm-framework.js.LICENSE.txt +16 -0
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +4381 -0
- package/docs/classes/OpenmrsFetchError.md +186 -0
- package/docs/enums/Type.md +85 -0
- package/docs/enums/VisitMode.md +41 -0
- package/docs/enums/VisitStatus.md +30 -0
- package/docs/interfaces/AppState.md +3 -0
- package/docs/interfaces/BreadcrumbRegistration.md +30 -0
- package/docs/interfaces/BreadcrumbSettings.md +70 -0
- package/docs/interfaces/CancelLoading.md +17 -0
- package/docs/interfaces/ClearDynamicRoutesMessage.md +29 -0
- package/docs/interfaces/ComponentConfig.md +30 -0
- package/docs/interfaces/ComponentDecoratorOptions.md +52 -0
- package/docs/interfaces/ComponentDefinition.md +101 -0
- package/docs/interfaces/Config.md +182 -0
- package/docs/interfaces/ConfigObject.md +182 -0
- package/docs/interfaces/ConfigSchema.md +45 -0
- package/docs/interfaces/ConfigStore.md +34 -0
- package/docs/interfaces/ConfigurableLinkProps.md +25 -0
- package/docs/interfaces/ConnectivityChangedEvent.md +19 -0
- package/docs/interfaces/CurrentPatientOptions.md +27 -0
- package/docs/interfaces/CurrentUserOptions.md +27 -0
- package/docs/interfaces/CurrentUserWithResponseOption.md +29 -0
- package/docs/interfaces/CurrentUserWithoutResponseOption.md +29 -0
- package/docs/interfaces/ExtensionComponentDefinition.md +153 -0
- package/docs/interfaces/ExtensionData.md +41 -0
- package/docs/interfaces/ExtensionDetails.md +81 -0
- package/docs/interfaces/ExtensionInfo.md +140 -0
- package/docs/interfaces/ExtensionInstance.md +19 -0
- package/docs/interfaces/ExtensionMeta.md +7 -0
- package/docs/interfaces/ExtensionProps.md +44 -0
- package/docs/interfaces/ExtensionRegistration.md +98 -0
- package/docs/interfaces/ExtensionSlotBaseProps.md +54 -0
- package/docs/interfaces/ExtensionSlotConfig.md +52 -0
- package/docs/interfaces/ExtensionSlotConfigObject.md +41 -0
- package/docs/interfaces/ExtensionSlotConfigsStore.md +32 -0
- package/docs/interfaces/ExtensionSlotConfigureValueObject.md +7 -0
- package/docs/interfaces/ExtensionSlotInfo.md +50 -0
- package/docs/interfaces/ExtensionSlotInstance.md +51 -0
- package/docs/interfaces/ExtensionStore.md +34 -0
- package/docs/interfaces/FHIRCode.md +30 -0
- package/docs/interfaces/FHIRRequestObj.md +41 -0
- package/docs/interfaces/FHIRResource.md +46 -0
- package/docs/interfaces/FetchHeaders.md +7 -0
- package/docs/interfaces/FetchResponse.md +285 -0
- package/docs/interfaces/ImplementerToolsConfigStore.md +19 -0
- package/docs/interfaces/ImportMap.md +19 -0
- package/docs/interfaces/LegacyAppExtensionDefinition.md +170 -0
- package/docs/interfaces/Lifecycle.md +68 -0
- package/docs/interfaces/Location.md +41 -0
- package/docs/interfaces/LoggedInUser.md +133 -0
- package/docs/interfaces/LoggedInUserFetchResponse.md +281 -0
- package/docs/interfaces/MessageServiceWorkerResult.md +47 -0
- package/docs/interfaces/ModernAppExtensionDefinition.md +196 -0
- package/docs/interfaces/NavigateOptions.md +19 -0
- package/docs/interfaces/NavigationContext.md +50 -0
- package/docs/interfaces/NetworkRequestFailedEvent.md +49 -0
- package/docs/interfaces/NewVisitPayload.md +74 -0
- package/docs/interfaces/OfflinePatientArgs.md +34 -0
- package/docs/interfaces/OfflinePatientDataSyncHandler.md +52 -0
- package/docs/interfaces/OfflinePatientDataSyncState.md +99 -0
- package/docs/interfaces/OfflinePatientDataSyncStore.md +37 -0
- package/docs/interfaces/OfflineSynchronizationStore.md +27 -0
- package/docs/interfaces/OmrsServiceWorkerEvent.md +31 -0
- package/docs/interfaces/OmrsServiceWorkerMessage.md +35 -0
- package/docs/interfaces/OnImportMapChangedMessage.md +40 -0
- package/docs/interfaces/OnlyThePatient.md +29 -0
- package/docs/interfaces/OpenmrsReactComponentProps.md +19 -0
- package/docs/interfaces/OpenmrsReactComponentState.md +41 -0
- package/docs/interfaces/OpenmrsResource.md +34 -0
- package/docs/interfaces/PageDefinition.md +149 -0
- package/docs/interfaces/PatientWithFullResponse.md +29 -0
- package/docs/interfaces/Person.md +41 -0
- package/docs/interfaces/PrecacheStaticDependenciesEvent.md +3 -0
- package/docs/interfaces/Privilege.md +41 -0
- package/docs/interfaces/QueueItemDescriptor.md +52 -0
- package/docs/interfaces/RegisterDynamicRouteMessage.md +51 -0
- package/docs/interfaces/ResourceLoader.md +23 -0
- package/docs/interfaces/RetryOptions.md +83 -0
- package/docs/interfaces/Role.md +41 -0
- package/docs/interfaces/SessionLocation.md +41 -0
- package/docs/interfaces/SessionUser.md +92 -0
- package/docs/interfaces/ShowNotificationEvent.md +63 -0
- package/docs/interfaces/ShowToastEvent.md +52 -0
- package/docs/interfaces/SpaConfig.md +77 -0
- package/docs/interfaces/SyncItem.md +92 -0
- package/docs/interfaces/SyncProcessOptions.md +69 -0
- package/docs/interfaces/UnauthenticatedUser.md +52 -0
- package/docs/interfaces/User.md +107 -0
- package/docs/interfaces/UserHasAccessProps.md +19 -0
- package/docs/interfaces/Visit.md +111 -0
- package/docs/interfaces/VisitItem.md +52 -0
- package/docs/interfaces/VisitType.md +41 -0
- package/docs/interfaces/WorkspaceItem.md +74 -0
- package/mock.tsx +253 -0
- package/package.json +15 -12
- package/src/index.ts +3 -1
- package/tsconfig.json +1 -0
- package/typedoc.json +7 -0
- package/webpack.config.js +4 -10
- package/src/set-public-path.ts +0 -3
- package/src/types.ts +0 -19
package/docs/API.md
ADDED
|
@@ -0,0 +1,4381 @@
|
|
|
1
|
+
[Back to README.md](../README.md)
|
|
2
|
+
|
|
3
|
+
# @openmrs/esm-framework
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Enumerations
|
|
8
|
+
|
|
9
|
+
- [Type](enums/Type.md)
|
|
10
|
+
- [VisitMode](enums/VisitMode.md)
|
|
11
|
+
- [VisitStatus](enums/VisitStatus.md)
|
|
12
|
+
|
|
13
|
+
### Classes
|
|
14
|
+
|
|
15
|
+
- [OpenmrsFetchError](classes/OpenmrsFetchError.md)
|
|
16
|
+
|
|
17
|
+
### Interfaces
|
|
18
|
+
|
|
19
|
+
- [AppState](interfaces/AppState.md)
|
|
20
|
+
- [BreadcrumbRegistration](interfaces/BreadcrumbRegistration.md)
|
|
21
|
+
- [BreadcrumbSettings](interfaces/BreadcrumbSettings.md)
|
|
22
|
+
- [CancelLoading](interfaces/CancelLoading.md)
|
|
23
|
+
- [ClearDynamicRoutesMessage](interfaces/ClearDynamicRoutesMessage.md)
|
|
24
|
+
- [ComponentConfig](interfaces/ComponentConfig.md)
|
|
25
|
+
- [ComponentDecoratorOptions](interfaces/ComponentDecoratorOptions.md)
|
|
26
|
+
- [ComponentDefinition](interfaces/ComponentDefinition.md)
|
|
27
|
+
- [Config](interfaces/Config.md)
|
|
28
|
+
- [ConfigObject](interfaces/ConfigObject.md)
|
|
29
|
+
- [ConfigSchema](interfaces/ConfigSchema.md)
|
|
30
|
+
- [ConfigStore](interfaces/ConfigStore.md)
|
|
31
|
+
- [ConfigurableLinkProps](interfaces/ConfigurableLinkProps.md)
|
|
32
|
+
- [ConnectivityChangedEvent](interfaces/ConnectivityChangedEvent.md)
|
|
33
|
+
- [CurrentPatientOptions](interfaces/CurrentPatientOptions.md)
|
|
34
|
+
- [CurrentUserOptions](interfaces/CurrentUserOptions.md)
|
|
35
|
+
- [CurrentUserWithResponseOption](interfaces/CurrentUserWithResponseOption.md)
|
|
36
|
+
- [CurrentUserWithoutResponseOption](interfaces/CurrentUserWithoutResponseOption.md)
|
|
37
|
+
- [ExtensionComponentDefinition](interfaces/ExtensionComponentDefinition.md)
|
|
38
|
+
- [ExtensionData](interfaces/ExtensionData.md)
|
|
39
|
+
- [ExtensionDetails](interfaces/ExtensionDetails.md)
|
|
40
|
+
- [ExtensionInfo](interfaces/ExtensionInfo.md)
|
|
41
|
+
- [ExtensionInstance](interfaces/ExtensionInstance.md)
|
|
42
|
+
- [ExtensionMeta](interfaces/ExtensionMeta.md)
|
|
43
|
+
- [ExtensionProps](interfaces/ExtensionProps.md)
|
|
44
|
+
- [ExtensionRegistration](interfaces/ExtensionRegistration.md)
|
|
45
|
+
- [ExtensionSlotBaseProps](interfaces/ExtensionSlotBaseProps.md)
|
|
46
|
+
- [ExtensionSlotConfig](interfaces/ExtensionSlotConfig.md)
|
|
47
|
+
- [ExtensionSlotConfigObject](interfaces/ExtensionSlotConfigObject.md)
|
|
48
|
+
- [ExtensionSlotConfigsStore](interfaces/ExtensionSlotConfigsStore.md)
|
|
49
|
+
- [ExtensionSlotConfigureValueObject](interfaces/ExtensionSlotConfigureValueObject.md)
|
|
50
|
+
- [ExtensionSlotInfo](interfaces/ExtensionSlotInfo.md)
|
|
51
|
+
- [ExtensionSlotInstance](interfaces/ExtensionSlotInstance.md)
|
|
52
|
+
- [ExtensionStore](interfaces/ExtensionStore.md)
|
|
53
|
+
- [FHIRCode](interfaces/FHIRCode.md)
|
|
54
|
+
- [FHIRRequestObj](interfaces/FHIRRequestObj.md)
|
|
55
|
+
- [FHIRResource](interfaces/FHIRResource.md)
|
|
56
|
+
- [FetchHeaders](interfaces/FetchHeaders.md)
|
|
57
|
+
- [FetchResponse](interfaces/FetchResponse.md)
|
|
58
|
+
- [ImplementerToolsConfigStore](interfaces/ImplementerToolsConfigStore.md)
|
|
59
|
+
- [ImportMap](interfaces/ImportMap.md)
|
|
60
|
+
- [LegacyAppExtensionDefinition](interfaces/LegacyAppExtensionDefinition.md)
|
|
61
|
+
- [Lifecycle](interfaces/Lifecycle.md)
|
|
62
|
+
- [Location](interfaces/Location.md)
|
|
63
|
+
- [LoggedInUser](interfaces/LoggedInUser.md)
|
|
64
|
+
- [LoggedInUserFetchResponse](interfaces/LoggedInUserFetchResponse.md)
|
|
65
|
+
- [MessageServiceWorkerResult](interfaces/MessageServiceWorkerResult.md)
|
|
66
|
+
- [ModernAppExtensionDefinition](interfaces/ModernAppExtensionDefinition.md)
|
|
67
|
+
- [NavigateOptions](interfaces/NavigateOptions.md)
|
|
68
|
+
- [NavigationContext](interfaces/NavigationContext.md)
|
|
69
|
+
- [NetworkRequestFailedEvent](interfaces/NetworkRequestFailedEvent.md)
|
|
70
|
+
- [NewVisitPayload](interfaces/NewVisitPayload.md)
|
|
71
|
+
- [OfflinePatientArgs](interfaces/OfflinePatientArgs.md)
|
|
72
|
+
- [OfflinePatientDataSyncHandler](interfaces/OfflinePatientDataSyncHandler.md)
|
|
73
|
+
- [OfflinePatientDataSyncState](interfaces/OfflinePatientDataSyncState.md)
|
|
74
|
+
- [OfflinePatientDataSyncStore](interfaces/OfflinePatientDataSyncStore.md)
|
|
75
|
+
- [OfflineSynchronizationStore](interfaces/OfflineSynchronizationStore.md)
|
|
76
|
+
- [OmrsServiceWorkerEvent](interfaces/OmrsServiceWorkerEvent.md)
|
|
77
|
+
- [OmrsServiceWorkerMessage](interfaces/OmrsServiceWorkerMessage.md)
|
|
78
|
+
- [OnImportMapChangedMessage](interfaces/OnImportMapChangedMessage.md)
|
|
79
|
+
- [OnlyThePatient](interfaces/OnlyThePatient.md)
|
|
80
|
+
- [OpenmrsReactComponentProps](interfaces/OpenmrsReactComponentProps.md)
|
|
81
|
+
- [OpenmrsReactComponentState](interfaces/OpenmrsReactComponentState.md)
|
|
82
|
+
- [OpenmrsResource](interfaces/OpenmrsResource.md)
|
|
83
|
+
- [PageDefinition](interfaces/PageDefinition.md)
|
|
84
|
+
- [PatientWithFullResponse](interfaces/PatientWithFullResponse.md)
|
|
85
|
+
- [Person](interfaces/Person.md)
|
|
86
|
+
- [PrecacheStaticDependenciesEvent](interfaces/PrecacheStaticDependenciesEvent.md)
|
|
87
|
+
- [Privilege](interfaces/Privilege.md)
|
|
88
|
+
- [QueueItemDescriptor](interfaces/QueueItemDescriptor.md)
|
|
89
|
+
- [RegisterDynamicRouteMessage](interfaces/RegisterDynamicRouteMessage.md)
|
|
90
|
+
- [ResourceLoader](interfaces/ResourceLoader.md)
|
|
91
|
+
- [RetryOptions](interfaces/RetryOptions.md)
|
|
92
|
+
- [Role](interfaces/Role.md)
|
|
93
|
+
- [SessionLocation](interfaces/SessionLocation.md)
|
|
94
|
+
- [SessionUser](interfaces/SessionUser.md)
|
|
95
|
+
- [ShowNotificationEvent](interfaces/ShowNotificationEvent.md)
|
|
96
|
+
- [ShowToastEvent](interfaces/ShowToastEvent.md)
|
|
97
|
+
- [SpaConfig](interfaces/SpaConfig.md)
|
|
98
|
+
- [SyncItem](interfaces/SyncItem.md)
|
|
99
|
+
- [SyncProcessOptions](interfaces/SyncProcessOptions.md)
|
|
100
|
+
- [UnauthenticatedUser](interfaces/UnauthenticatedUser.md)
|
|
101
|
+
- [User](interfaces/User.md)
|
|
102
|
+
- [UserHasAccessProps](interfaces/UserHasAccessProps.md)
|
|
103
|
+
- [Visit](interfaces/Visit.md)
|
|
104
|
+
- [VisitItem](interfaces/VisitItem.md)
|
|
105
|
+
- [VisitType](interfaces/VisitType.md)
|
|
106
|
+
- [WorkspaceItem](interfaces/WorkspaceItem.md)
|
|
107
|
+
|
|
108
|
+
### Type aliases
|
|
109
|
+
|
|
110
|
+
- [Actions](API.md#actions)
|
|
111
|
+
- [AppExtensionDefinition](API.md#appextensiondefinition)
|
|
112
|
+
- [BoundActions](API.md#boundactions)
|
|
113
|
+
- [ConfigValue](API.md#configvalue)
|
|
114
|
+
- [CurrentPatient](API.md#currentpatient)
|
|
115
|
+
- [DateInput](API.md#dateinput)
|
|
116
|
+
- [ExtensionSlotProps](API.md#extensionslotprops)
|
|
117
|
+
- [KnownOmrsServiceWorkerEvents](API.md#knownomrsserviceworkerevents)
|
|
118
|
+
- [KnownOmrsServiceWorkerMessages](API.md#knownomrsserviceworkermessages)
|
|
119
|
+
- [LayoutType](API.md#layouttype)
|
|
120
|
+
- [LoggedInUserData](API.md#loggedinuserdata)
|
|
121
|
+
- [MaybeAsync](API.md#maybeasync)
|
|
122
|
+
- [NavigationContextType](API.md#navigationcontexttype)
|
|
123
|
+
- [OmrsOfflineHttpHeaderNames](API.md#omrsofflinehttpheadernames)
|
|
124
|
+
- [OmrsOfflineHttpHeaders](API.md#omrsofflinehttpheaders)
|
|
125
|
+
- [PatientUuid](API.md#patientuuid)
|
|
126
|
+
- [ProcessSyncItem](API.md#processsyncitem)
|
|
127
|
+
- [ProvidedConfig](API.md#providedconfig)
|
|
128
|
+
- [SpaEnvironment](API.md#spaenvironment)
|
|
129
|
+
- [UpdateVisitPayload](API.md#updatevisitpayload)
|
|
130
|
+
- [Validator](API.md#validator)
|
|
131
|
+
- [ValidatorFunction](API.md#validatorfunction)
|
|
132
|
+
|
|
133
|
+
### API Variables
|
|
134
|
+
|
|
135
|
+
- [fhir](API.md#fhir)
|
|
136
|
+
|
|
137
|
+
### Navigation Variables
|
|
138
|
+
|
|
139
|
+
- [ConfigurableLink](API.md#configurablelink)
|
|
140
|
+
|
|
141
|
+
### Other Variables
|
|
142
|
+
|
|
143
|
+
- [ComponentContext](API.md#componentcontext)
|
|
144
|
+
- [Extension](API.md#extension)
|
|
145
|
+
- [ExtensionSlot](API.md#extensionslot)
|
|
146
|
+
- [UserHasAccess](API.md#userhasaccess)
|
|
147
|
+
- [backendDependencies](API.md#backenddependencies)
|
|
148
|
+
- [extensionStore](API.md#extensionstore)
|
|
149
|
+
- [fhirBaseUrl](API.md#fhirbaseurl)
|
|
150
|
+
- [getStartedVisit](API.md#getstartedvisit)
|
|
151
|
+
- [implementerToolsConfigStore](API.md#implementertoolsconfigstore)
|
|
152
|
+
- [offlineUuidPrefix](API.md#offlineuuidprefix)
|
|
153
|
+
- [omrsOfflineCachingStrategyHttpHeaderName](API.md#omrsofflinecachingstrategyhttpheadername)
|
|
154
|
+
- [omrsOfflineResponseBodyHttpHeaderName](API.md#omrsofflineresponsebodyhttpheadername)
|
|
155
|
+
- [omrsOfflineResponseStatusHttpHeaderName](API.md#omrsofflineresponsestatushttpheadername)
|
|
156
|
+
- [sessionEndpoint](API.md#sessionendpoint)
|
|
157
|
+
- [temporaryConfigStore](API.md#temporaryconfigstore)
|
|
158
|
+
- [validators](API.md#validators)
|
|
159
|
+
|
|
160
|
+
### API Functions
|
|
161
|
+
|
|
162
|
+
- [openmrsFetch](API.md#openmrsfetch)
|
|
163
|
+
- [openmrsObservableFetch](API.md#openmrsobservablefetch)
|
|
164
|
+
|
|
165
|
+
### API Object Functions
|
|
166
|
+
|
|
167
|
+
- [fetchCurrentPatient](API.md#fetchcurrentpatient)
|
|
168
|
+
- [getCurrentUser](API.md#getcurrentuser)
|
|
169
|
+
- [refetchCurrentUser](API.md#refetchcurrentuser)
|
|
170
|
+
|
|
171
|
+
### Breadcrumb Functions
|
|
172
|
+
|
|
173
|
+
- [filterBreadcrumbs](API.md#filterbreadcrumbs)
|
|
174
|
+
- [getBreadcrumbs](API.md#getbreadcrumbs)
|
|
175
|
+
- [getBreadcrumbsFor](API.md#getbreadcrumbsfor)
|
|
176
|
+
- [registerBreadcrumb](API.md#registerbreadcrumb)
|
|
177
|
+
- [registerBreadcrumbs](API.md#registerbreadcrumbs)
|
|
178
|
+
|
|
179
|
+
### Navigation Functions
|
|
180
|
+
|
|
181
|
+
- [interpolateString](API.md#interpolatestring)
|
|
182
|
+
- [isUrl](API.md#isurl)
|
|
183
|
+
- [isUrlWithTemplateParameters](API.md#isurlwithtemplateparameters)
|
|
184
|
+
- [navigate](API.md#navigate)
|
|
185
|
+
|
|
186
|
+
### Other Functions
|
|
187
|
+
|
|
188
|
+
- [age](API.md#age)
|
|
189
|
+
- [attach](API.md#attach)
|
|
190
|
+
- [checkStatus](API.md#checkstatus)
|
|
191
|
+
- [checkStatusFor](API.md#checkstatusfor)
|
|
192
|
+
- [createErrorHandler](API.md#createerrorhandler)
|
|
193
|
+
- [createGlobalStore](API.md#createglobalstore)
|
|
194
|
+
- [createUseStore](API.md#createusestore)
|
|
195
|
+
- [daysIntoYear](API.md#daysintoyear)
|
|
196
|
+
- [defineConfigSchema](API.md#defineconfigschema)
|
|
197
|
+
- [deleteSynchronizationItem](API.md#deletesynchronizationitem)
|
|
198
|
+
- [detach](API.md#detach)
|
|
199
|
+
- [detachAll](API.md#detachall)
|
|
200
|
+
- [dispatchConnectivityChanged](API.md#dispatchconnectivitychanged)
|
|
201
|
+
- [dispatchNetworkRequestFailed](API.md#dispatchnetworkrequestfailed)
|
|
202
|
+
- [dispatchNotificationShown](API.md#dispatchnotificationshown)
|
|
203
|
+
- [dispatchPrecacheStaticDependencies](API.md#dispatchprecachestaticdependencies)
|
|
204
|
+
- [generateOfflineUuid](API.md#generateofflineuuid)
|
|
205
|
+
- [getAppState](API.md#getappstate)
|
|
206
|
+
- [getAssignedIds](API.md#getassignedids)
|
|
207
|
+
- [getAsyncExtensionLifecycle](API.md#getasyncextensionlifecycle)
|
|
208
|
+
- [getAsyncLifecycle](API.md#getasynclifecycle)
|
|
209
|
+
- [getConfig](API.md#getconfig)
|
|
210
|
+
- [getConfigStore](API.md#getconfigstore)
|
|
211
|
+
- [getCustomProps](API.md#getcustomprops)
|
|
212
|
+
- [getExtensionConfigStore](API.md#getextensionconfigstore)
|
|
213
|
+
- [getExtensionNameFromId](API.md#getextensionnamefromid)
|
|
214
|
+
- [getExtensionRegistration](API.md#getextensionregistration)
|
|
215
|
+
- [getExtensionRegistrationFrom](API.md#getextensionregistrationfrom)
|
|
216
|
+
- [getExtensionSlotsConfigStore](API.md#getextensionslotsconfigstore)
|
|
217
|
+
- [getExtensionSlotsForModule](API.md#getextensionslotsformodule)
|
|
218
|
+
- [getGlobalStore](API.md#getglobalstore)
|
|
219
|
+
- [getLifecycle](API.md#getlifecycle)
|
|
220
|
+
- [getLocations](API.md#getlocations)
|
|
221
|
+
- [getLoggedInUser](API.md#getloggedinuser)
|
|
222
|
+
- [getOfflinePatientDataStore](API.md#getofflinepatientdatastore)
|
|
223
|
+
- [getOfflineSynchronizationStore](API.md#getofflinesynchronizationstore)
|
|
224
|
+
- [getOmrsServiceWorker](API.md#getomrsserviceworker)
|
|
225
|
+
- [getSessionLocation](API.md#getsessionlocation)
|
|
226
|
+
- [getSyncLifecycle](API.md#getsynclifecycle)
|
|
227
|
+
- [getSynchronizationItems](API.md#getsynchronizationitems)
|
|
228
|
+
- [getSynchronizationItemsFor](API.md#getsynchronizationitemsfor)
|
|
229
|
+
- [getUpdatedExtensionSlotInfo](API.md#getupdatedextensionslotinfo)
|
|
230
|
+
- [getVisitTypes](API.md#getvisittypes)
|
|
231
|
+
- [getVisitsForPatient](API.md#getvisitsforpatient)
|
|
232
|
+
- [handleApiError](API.md#handleapierror)
|
|
233
|
+
- [inRange](API.md#inrange)
|
|
234
|
+
- [integrateBreakpoints](API.md#integratebreakpoints)
|
|
235
|
+
- [isOfflineUuid](API.md#isofflineuuid)
|
|
236
|
+
- [isOmrsDateStrict](API.md#isomrsdatestrict)
|
|
237
|
+
- [isOmrsDateToday](API.md#isomrsdatetoday)
|
|
238
|
+
- [isSameDay](API.md#issameday)
|
|
239
|
+
- [isVersionSatisfied](API.md#isversionsatisfied)
|
|
240
|
+
- [loadPersistedPatientDataSyncState](API.md#loadpersistedpatientdatasyncstate)
|
|
241
|
+
- [makeUrl](API.md#makeurl)
|
|
242
|
+
- [messageOmrsServiceWorker](API.md#messageomrsserviceworker)
|
|
243
|
+
- [openVisitsNoteWorkspace](API.md#openvisitsnoteworkspace)
|
|
244
|
+
- [openmrsComponentDecorator](API.md#openmrscomponentdecorator)
|
|
245
|
+
- [patchXMLHttpRequest](API.md#patchxmlhttprequest)
|
|
246
|
+
- [processConfig](API.md#processconfig)
|
|
247
|
+
- [provide](API.md#provide)
|
|
248
|
+
- [pushNavigationContext](API.md#pushnavigationcontext)
|
|
249
|
+
- [queueSynchronizationItem](API.md#queuesynchronizationitem)
|
|
250
|
+
- [queueSynchronizationItemFor](API.md#queuesynchronizationitemfor)
|
|
251
|
+
- [registerExtension](API.md#registerextension)
|
|
252
|
+
- [registerExtensionSlot](API.md#registerextensionslot)
|
|
253
|
+
- [registerOfflinePatientHandler](API.md#registerofflinepatienthandler)
|
|
254
|
+
- [registerOmrsServiceWorker](API.md#registeromrsserviceworker)
|
|
255
|
+
- [renderExtension](API.md#renderextension)
|
|
256
|
+
- [renderInlineNotifications](API.md#renderinlinenotifications)
|
|
257
|
+
- [renderLoadingSpinner](API.md#renderloadingspinner)
|
|
258
|
+
- [renderModals](API.md#rendermodals)
|
|
259
|
+
- [renderToasts](API.md#rendertoasts)
|
|
260
|
+
- [reportError](API.md#reporterror)
|
|
261
|
+
- [retry](API.md#retry)
|
|
262
|
+
- [runSynchronization](API.md#runsynchronization)
|
|
263
|
+
- [saveVisit](API.md#savevisit)
|
|
264
|
+
- [setSessionLocation](API.md#setsessionlocation)
|
|
265
|
+
- [setupOfflineSync](API.md#setupofflinesync)
|
|
266
|
+
- [setupPaths](API.md#setuppaths)
|
|
267
|
+
- [setupUtils](API.md#setuputils)
|
|
268
|
+
- [showModal](API.md#showmodal)
|
|
269
|
+
- [showNotification](API.md#shownotification)
|
|
270
|
+
- [showToast](API.md#showtoast)
|
|
271
|
+
- [subscribeConnectivity](API.md#subscribeconnectivity)
|
|
272
|
+
- [subscribeConnectivityChanged](API.md#subscribeconnectivitychanged)
|
|
273
|
+
- [subscribeNetworkRequestFailed](API.md#subscribenetworkrequestfailed)
|
|
274
|
+
- [subscribeNotificationShown](API.md#subscribenotificationshown)
|
|
275
|
+
- [subscribePrecacheStaticDependencies](API.md#subscribeprecachestaticdependencies)
|
|
276
|
+
- [subscribeTo](API.md#subscribeto)
|
|
277
|
+
- [subscribeToastShown](API.md#subscribetoastshown)
|
|
278
|
+
- [switchTo](API.md#switchto)
|
|
279
|
+
- [syncOfflinePatientData](API.md#syncofflinepatientdata)
|
|
280
|
+
- [toDateObjectStrict](API.md#todateobjectstrict)
|
|
281
|
+
- [toLocationObject](API.md#tolocationobject)
|
|
282
|
+
- [toOmrsDateFormat](API.md#toomrsdateformat)
|
|
283
|
+
- [toOmrsDayDateFormat](API.md#toomrsdaydateformat)
|
|
284
|
+
- [toOmrsIsoString](API.md#toomrsisostring)
|
|
285
|
+
- [toOmrsTimeString](API.md#toomrstimestring)
|
|
286
|
+
- [toOmrsTimeString24](API.md#toomrstimestring24)
|
|
287
|
+
- [toOmrsYearlessDateFormat](API.md#toomrsyearlessdateformat)
|
|
288
|
+
- [toVisitTypeObject](API.md#tovisittypeobject)
|
|
289
|
+
- [translateFrom](API.md#translatefrom)
|
|
290
|
+
- [unregisterExtensionSlot](API.md#unregisterextensionslot)
|
|
291
|
+
- [update](API.md#update)
|
|
292
|
+
- [updateExtensionStore](API.md#updateextensionstore)
|
|
293
|
+
- [updateVisit](API.md#updatevisit)
|
|
294
|
+
- [useAssignedExtensionIds](API.md#useassignedextensionids)
|
|
295
|
+
- [useAttachedExtensionIds](API.md#useattachedextensionids)
|
|
296
|
+
- [useBodyScrollLock](API.md#usebodyscrolllock)
|
|
297
|
+
- [useConfig](API.md#useconfig)
|
|
298
|
+
- [useConnectedExtensions](API.md#useconnectedextensions)
|
|
299
|
+
- [useConnectivity](API.md#useconnectivity)
|
|
300
|
+
- [useCurrentPatient](API.md#usecurrentpatient)
|
|
301
|
+
- [useExtension](API.md#useextension)
|
|
302
|
+
- [useExtensionSlot](API.md#useextensionslot)
|
|
303
|
+
- [useExtensionSlotConfig](API.md#useextensionslotconfig)
|
|
304
|
+
- [useExtensionSlotMeta](API.md#useextensionslotmeta)
|
|
305
|
+
- [useExtensionStore](API.md#useextensionstore)
|
|
306
|
+
- [useForceUpdate](API.md#useforceupdate)
|
|
307
|
+
- [useLayoutType](API.md#uselayouttype)
|
|
308
|
+
- [useLocations](API.md#uselocations)
|
|
309
|
+
- [useNavigationContext](API.md#usenavigationcontext)
|
|
310
|
+
- [useOnClickOutside](API.md#useonclickoutside)
|
|
311
|
+
- [usePagination](API.md#usepagination)
|
|
312
|
+
- [useSessionUser](API.md#usesessionuser)
|
|
313
|
+
- [useStore](API.md#usestore)
|
|
314
|
+
- [useStoreState](API.md#usestorestate)
|
|
315
|
+
- [useVisit](API.md#usevisit)
|
|
316
|
+
- [useVisitTypes](API.md#usevisittypes)
|
|
317
|
+
- [userHasAccess](API.md#userhasaccess)
|
|
318
|
+
- [validator](API.md#validator)
|
|
319
|
+
|
|
320
|
+
### Workspace Functions
|
|
321
|
+
|
|
322
|
+
- [getNewWorkspaceItem](API.md#getnewworkspaceitem)
|
|
323
|
+
- [newWorkspaceItem](API.md#newworkspaceitem)
|
|
324
|
+
|
|
325
|
+
## Type aliases
|
|
326
|
+
|
|
327
|
+
### Actions
|
|
328
|
+
|
|
329
|
+
Ƭ **Actions**: `Function` \| { [key: string]: `Function`; }
|
|
330
|
+
|
|
331
|
+
#### Defined in
|
|
332
|
+
|
|
333
|
+
[packages/framework/esm-react-utils/src/createUseStore.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/createUseStore.ts#L4)
|
|
334
|
+
|
|
335
|
+
___
|
|
336
|
+
|
|
337
|
+
### AppExtensionDefinition
|
|
338
|
+
|
|
339
|
+
Ƭ **AppExtensionDefinition**: [`ModernAppExtensionDefinition`](interfaces/ModernAppExtensionDefinition.md) & [`LegacyAppExtensionDefinition`](interfaces/LegacyAppExtensionDefinition.md)
|
|
340
|
+
|
|
341
|
+
#### Defined in
|
|
342
|
+
|
|
343
|
+
[packages/framework/esm-globals/src/types.ts:144](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L144)
|
|
344
|
+
|
|
345
|
+
___
|
|
346
|
+
|
|
347
|
+
### BoundActions
|
|
348
|
+
|
|
349
|
+
Ƭ **BoundActions**: `Object`
|
|
350
|
+
|
|
351
|
+
#### Index signature
|
|
352
|
+
|
|
353
|
+
▪ [key: `string`]: `BoundAction`
|
|
354
|
+
|
|
355
|
+
#### Defined in
|
|
356
|
+
|
|
357
|
+
[packages/framework/esm-react-utils/src/createUseStore.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/createUseStore.ts#L5)
|
|
358
|
+
|
|
359
|
+
___
|
|
360
|
+
|
|
361
|
+
### ConfigValue
|
|
362
|
+
|
|
363
|
+
Ƭ **ConfigValue**: `string` \| `number` \| `boolean` \| `void` \| `any`[] \| `object`
|
|
364
|
+
|
|
365
|
+
#### Defined in
|
|
366
|
+
|
|
367
|
+
[packages/framework/esm-config/src/types.ts:30](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L30)
|
|
368
|
+
|
|
369
|
+
___
|
|
370
|
+
|
|
371
|
+
### CurrentPatient
|
|
372
|
+
|
|
373
|
+
Ƭ **CurrentPatient**: `fhir.Patient` \| [`FetchResponse`](interfaces/FetchResponse.md)<`fhir.Patient`\>
|
|
374
|
+
|
|
375
|
+
#### Defined in
|
|
376
|
+
|
|
377
|
+
[packages/framework/esm-api/src/shared-api-objects/current-patient.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-patient.ts#L4)
|
|
378
|
+
|
|
379
|
+
___
|
|
380
|
+
|
|
381
|
+
### DateInput
|
|
382
|
+
|
|
383
|
+
Ƭ **DateInput**: `string` \| `number` \| `Date`
|
|
384
|
+
|
|
385
|
+
#### Defined in
|
|
386
|
+
|
|
387
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:8](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L8)
|
|
388
|
+
|
|
389
|
+
___
|
|
390
|
+
|
|
391
|
+
### ExtensionSlotProps
|
|
392
|
+
|
|
393
|
+
Ƭ **ExtensionSlotProps**: [`ExtensionSlotBaseProps`](interfaces/ExtensionSlotBaseProps.md) & `React.HTMLAttributes`<`HTMLDivElement`\>
|
|
394
|
+
|
|
395
|
+
#### Defined in
|
|
396
|
+
|
|
397
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:54](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L54)
|
|
398
|
+
|
|
399
|
+
___
|
|
400
|
+
|
|
401
|
+
### KnownOmrsServiceWorkerEvents
|
|
402
|
+
|
|
403
|
+
Ƭ **KnownOmrsServiceWorkerEvents**: [`NetworkRequestFailedEvent`](interfaces/NetworkRequestFailedEvent.md)
|
|
404
|
+
|
|
405
|
+
#### Defined in
|
|
406
|
+
|
|
407
|
+
[packages/framework/esm-offline/src/service-worker-events.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-events.ts#L15)
|
|
408
|
+
|
|
409
|
+
___
|
|
410
|
+
|
|
411
|
+
### KnownOmrsServiceWorkerMessages
|
|
412
|
+
|
|
413
|
+
Ƭ **KnownOmrsServiceWorkerMessages**: [`OnImportMapChangedMessage`](interfaces/OnImportMapChangedMessage.md) \| [`ClearDynamicRoutesMessage`](interfaces/ClearDynamicRoutesMessage.md) \| [`RegisterDynamicRouteMessage`](interfaces/RegisterDynamicRouteMessage.md)
|
|
414
|
+
|
|
415
|
+
#### Defined in
|
|
416
|
+
|
|
417
|
+
[packages/framework/esm-offline/src/service-worker-messaging.ts:43](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-messaging.ts#L43)
|
|
418
|
+
|
|
419
|
+
___
|
|
420
|
+
|
|
421
|
+
### LayoutType
|
|
422
|
+
|
|
423
|
+
Ƭ **LayoutType**: ``"tablet"`` \| ``"phone"`` \| ``"desktop"``
|
|
424
|
+
|
|
425
|
+
#### Defined in
|
|
426
|
+
|
|
427
|
+
[packages/framework/esm-react-utils/src/useLayoutType.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useLayoutType.ts#L3)
|
|
428
|
+
|
|
429
|
+
___
|
|
430
|
+
|
|
431
|
+
### LoggedInUserData
|
|
432
|
+
|
|
433
|
+
Ƭ **LoggedInUserData**: [`UnauthenticatedUser`](interfaces/UnauthenticatedUser.md) & { `user?`: [`LoggedInUser`](interfaces/LoggedInUser.md) }
|
|
434
|
+
|
|
435
|
+
#### Defined in
|
|
436
|
+
|
|
437
|
+
[packages/framework/esm-api/src/types/fetch.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/fetch.ts#L7)
|
|
438
|
+
|
|
439
|
+
___
|
|
440
|
+
|
|
441
|
+
### MaybeAsync
|
|
442
|
+
|
|
443
|
+
Ƭ **MaybeAsync**<`T`\>: `T` \| `Promise`<`T`\>
|
|
444
|
+
|
|
445
|
+
#### Type parameters
|
|
446
|
+
|
|
447
|
+
| Name |
|
|
448
|
+
| :------ |
|
|
449
|
+
| `T` |
|
|
450
|
+
|
|
451
|
+
#### Defined in
|
|
452
|
+
|
|
453
|
+
[packages/framework/esm-extensions/src/store.ts:82](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L82)
|
|
454
|
+
|
|
455
|
+
___
|
|
456
|
+
|
|
457
|
+
### NavigationContextType
|
|
458
|
+
|
|
459
|
+
Ƭ **NavigationContextType**: ``"workspace"`` \| ``"dialog"`` \| ``"link"``
|
|
460
|
+
|
|
461
|
+
#### Defined in
|
|
462
|
+
|
|
463
|
+
[packages/framework/esm-extensions/src/contexts.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/contexts.ts#L3)
|
|
464
|
+
|
|
465
|
+
___
|
|
466
|
+
|
|
467
|
+
### OmrsOfflineHttpHeaderNames
|
|
468
|
+
|
|
469
|
+
Ƭ **OmrsOfflineHttpHeaderNames**: keyof [`OmrsOfflineHttpHeaders`](API.md#omrsofflinehttpheaders)
|
|
470
|
+
|
|
471
|
+
#### Defined in
|
|
472
|
+
|
|
473
|
+
[packages/framework/esm-offline/src/service-worker-http-headers.ts:36](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-http-headers.ts#L36)
|
|
474
|
+
|
|
475
|
+
___
|
|
476
|
+
|
|
477
|
+
### OmrsOfflineHttpHeaders
|
|
478
|
+
|
|
479
|
+
Ƭ **OmrsOfflineHttpHeaders**: `Object`
|
|
480
|
+
|
|
481
|
+
Defines the keys of the custom headers which can be appended to an HTTP request.
|
|
482
|
+
HTTP requests with these headers are handled in a special way by the SPA's service worker.
|
|
483
|
+
|
|
484
|
+
#### Type declaration
|
|
485
|
+
|
|
486
|
+
| Name | Type | Description |
|
|
487
|
+
| :------ | :------ | :------ |
|
|
488
|
+
| `x-omrs-offline-caching-strategy?` | ``"default"`` \| ``"network-first"`` | Instructs the service worker to use a specific caching strategy for this request. The supported values are: * `default`: Equal to the absence of this header/an invalid value. The service worker decides the strategy to be used. * `network-first`: The service worker will make the request and cache its response. |
|
|
489
|
+
| `x-omrs-offline-response-body?` | `string` | If the client is offline and the request cannot be read from the cache (i.e. if there is no way to receive any kind of data for this request), the service worker will return a response with the body in this header. |
|
|
490
|
+
| `x-omrs-offline-response-status?` | \`${number}\` | If the client is offline and the request cannot be read from the cache (i.e. if there is no way to receive any kind of data for this request), the service worker will return a response with the status code defined in this header. |
|
|
491
|
+
|
|
492
|
+
#### Defined in
|
|
493
|
+
|
|
494
|
+
[packages/framework/esm-offline/src/service-worker-http-headers.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-http-headers.ts#L12)
|
|
495
|
+
|
|
496
|
+
___
|
|
497
|
+
|
|
498
|
+
### PatientUuid
|
|
499
|
+
|
|
500
|
+
Ƭ **PatientUuid**: `string` \| ``null``
|
|
501
|
+
|
|
502
|
+
#### Defined in
|
|
503
|
+
|
|
504
|
+
[packages/framework/esm-api/src/shared-api-objects/current-patient.ts:18](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-patient.ts#L18)
|
|
505
|
+
|
|
506
|
+
___
|
|
507
|
+
|
|
508
|
+
### ProcessSyncItem
|
|
509
|
+
|
|
510
|
+
Ƭ **ProcessSyncItem**<`T`\>: (`item`: `T`, `options`: [`SyncProcessOptions`](interfaces/SyncProcessOptions.md)<`T`\>) => `Promise`<`any`\>
|
|
511
|
+
|
|
512
|
+
#### Type parameters
|
|
513
|
+
|
|
514
|
+
| Name |
|
|
515
|
+
| :------ |
|
|
516
|
+
| `T` |
|
|
517
|
+
|
|
518
|
+
#### Type declaration
|
|
519
|
+
|
|
520
|
+
▸ (`item`, `options`): `Promise`<`any`\>
|
|
521
|
+
|
|
522
|
+
##### Parameters
|
|
523
|
+
|
|
524
|
+
| Name | Type |
|
|
525
|
+
| :------ | :------ |
|
|
526
|
+
| `item` | `T` |
|
|
527
|
+
| `options` | [`SyncProcessOptions`](interfaces/SyncProcessOptions.md)<`T`\> |
|
|
528
|
+
|
|
529
|
+
##### Returns
|
|
530
|
+
|
|
531
|
+
`Promise`<`any`\>
|
|
532
|
+
|
|
533
|
+
#### Defined in
|
|
534
|
+
|
|
535
|
+
[packages/framework/esm-offline/src/sync.ts:28](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L28)
|
|
536
|
+
|
|
537
|
+
___
|
|
538
|
+
|
|
539
|
+
### ProvidedConfig
|
|
540
|
+
|
|
541
|
+
Ƭ **ProvidedConfig**: `Object`
|
|
542
|
+
|
|
543
|
+
#### Type declaration
|
|
544
|
+
|
|
545
|
+
| Name | Type |
|
|
546
|
+
| :------ | :------ |
|
|
547
|
+
| `config` | [`Config`](interfaces/Config.md) |
|
|
548
|
+
| `source` | `string` |
|
|
549
|
+
|
|
550
|
+
#### Defined in
|
|
551
|
+
|
|
552
|
+
[packages/framework/esm-config/src/types.ts:55](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L55)
|
|
553
|
+
|
|
554
|
+
___
|
|
555
|
+
|
|
556
|
+
### SpaEnvironment
|
|
557
|
+
|
|
558
|
+
Ƭ **SpaEnvironment**: ``"production"`` \| ``"development"`` \| ``"test"``
|
|
559
|
+
|
|
560
|
+
#### Defined in
|
|
561
|
+
|
|
562
|
+
[packages/framework/esm-globals/src/types.ts:47](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L47)
|
|
563
|
+
|
|
564
|
+
___
|
|
565
|
+
|
|
566
|
+
### UpdateVisitPayload
|
|
567
|
+
|
|
568
|
+
Ƭ **UpdateVisitPayload**: [`NewVisitPayload`](interfaces/NewVisitPayload.md) & {}
|
|
569
|
+
|
|
570
|
+
#### Defined in
|
|
571
|
+
|
|
572
|
+
[packages/framework/esm-api/src/types/visit-resource.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/visit-resource.ts#L12)
|
|
573
|
+
|
|
574
|
+
___
|
|
575
|
+
|
|
576
|
+
### Validator
|
|
577
|
+
|
|
578
|
+
Ƭ **Validator**: (`value`: `any`) => `void` \| `string`
|
|
579
|
+
|
|
580
|
+
#### Type declaration
|
|
581
|
+
|
|
582
|
+
▸ (`value`): `void` \| `string`
|
|
583
|
+
|
|
584
|
+
##### Parameters
|
|
585
|
+
|
|
586
|
+
| Name | Type |
|
|
587
|
+
| :------ | :------ |
|
|
588
|
+
| `value` | `any` |
|
|
589
|
+
|
|
590
|
+
##### Returns
|
|
591
|
+
|
|
592
|
+
`void` \| `string`
|
|
593
|
+
|
|
594
|
+
#### Defined in
|
|
595
|
+
|
|
596
|
+
[packages/framework/esm-config/src/types.ts:62](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L62)
|
|
597
|
+
|
|
598
|
+
___
|
|
599
|
+
|
|
600
|
+
### ValidatorFunction
|
|
601
|
+
|
|
602
|
+
Ƭ **ValidatorFunction**: (`value`: `any`) => `boolean`
|
|
603
|
+
|
|
604
|
+
#### Type declaration
|
|
605
|
+
|
|
606
|
+
▸ (`value`): `boolean`
|
|
607
|
+
|
|
608
|
+
##### Parameters
|
|
609
|
+
|
|
610
|
+
| Name | Type |
|
|
611
|
+
| :------ | :------ |
|
|
612
|
+
| `value` | `any` |
|
|
613
|
+
|
|
614
|
+
##### Returns
|
|
615
|
+
|
|
616
|
+
`boolean`
|
|
617
|
+
|
|
618
|
+
#### Defined in
|
|
619
|
+
|
|
620
|
+
[packages/framework/esm-config/src/types.ts:60](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L60)
|
|
621
|
+
|
|
622
|
+
## API Variables
|
|
623
|
+
|
|
624
|
+
### fhir
|
|
625
|
+
|
|
626
|
+
• `Const` **fhir**: `FhirClient`
|
|
627
|
+
|
|
628
|
+
The `fhir` object is [an instance of fhir.js](https://github.com/FHIR/fhir.js)
|
|
629
|
+
that can be used to call FHIR-compliant OpenMRS APIs. See
|
|
630
|
+
[the docs for fhir.js](https://github.com/FHIR/fhir.js) for more info
|
|
631
|
+
and example usage.
|
|
632
|
+
|
|
633
|
+
#### Defined in
|
|
634
|
+
|
|
635
|
+
[packages/framework/esm-api/src/fhir.ts:41](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L41)
|
|
636
|
+
|
|
637
|
+
___
|
|
638
|
+
|
|
639
|
+
## Navigation Variables
|
|
640
|
+
|
|
641
|
+
### ConfigurableLink
|
|
642
|
+
|
|
643
|
+
• `Const` **ConfigurableLink**: `React.FC`<[`ConfigurableLinkProps`](interfaces/ConfigurableLinkProps.md)\>
|
|
644
|
+
|
|
645
|
+
A React link component which calls [navigate](API.md#navigate) when clicked
|
|
646
|
+
|
|
647
|
+
**`param`** The target path or URL. Supports interpolation. See [navigate](API.md#navigate)
|
|
648
|
+
|
|
649
|
+
**`param`** Inline elements within the link
|
|
650
|
+
|
|
651
|
+
**`param`** Any other valid props for an <a> tag except `href` and `onClick`
|
|
652
|
+
|
|
653
|
+
#### Defined in
|
|
654
|
+
|
|
655
|
+
[packages/framework/esm-react-utils/src/ConfigurableLink.tsx:32](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ConfigurableLink.tsx#L32)
|
|
656
|
+
|
|
657
|
+
___
|
|
658
|
+
|
|
659
|
+
## Other Variables
|
|
660
|
+
|
|
661
|
+
### ComponentContext
|
|
662
|
+
|
|
663
|
+
• `Const` **ComponentContext**: `Context`<[`ComponentConfig`](interfaces/ComponentConfig.md)\>
|
|
664
|
+
|
|
665
|
+
Available to all components. Provided by `openmrsComponentDecorator`.
|
|
666
|
+
|
|
667
|
+
#### Defined in
|
|
668
|
+
|
|
669
|
+
[packages/framework/esm-react-utils/src/ComponentContext.ts:17](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ComponentContext.ts#L17)
|
|
670
|
+
|
|
671
|
+
___
|
|
672
|
+
|
|
673
|
+
### Extension
|
|
674
|
+
|
|
675
|
+
• `Const` **Extension**: `React.FC`<[`ExtensionProps`](interfaces/ExtensionProps.md)\>
|
|
676
|
+
|
|
677
|
+
Represents the position in the DOM where each extension within
|
|
678
|
+
an extension slot is rendered.
|
|
679
|
+
|
|
680
|
+
Renders once for each extension attached to that extension slot.
|
|
681
|
+
|
|
682
|
+
Usage of this component *must* have an ancestor `<ExtensionSlot>`.
|
|
683
|
+
|
|
684
|
+
#### Defined in
|
|
685
|
+
|
|
686
|
+
[packages/framework/esm-react-utils/src/Extension.tsx:21](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/Extension.tsx#L21)
|
|
687
|
+
|
|
688
|
+
___
|
|
689
|
+
|
|
690
|
+
### ExtensionSlot
|
|
691
|
+
|
|
692
|
+
• `Const` **ExtensionSlot**: `React.FC`<[`ExtensionSlotProps`](API.md#extensionslotprops)\>
|
|
693
|
+
|
|
694
|
+
#### Defined in
|
|
695
|
+
|
|
696
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:57](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L57)
|
|
697
|
+
|
|
698
|
+
___
|
|
699
|
+
|
|
700
|
+
### UserHasAccess
|
|
701
|
+
|
|
702
|
+
• `Const` **UserHasAccess**: `React.FC`<[`UserHasAccessProps`](interfaces/UserHasAccessProps.md)\>
|
|
703
|
+
|
|
704
|
+
#### Defined in
|
|
705
|
+
|
|
706
|
+
[packages/framework/esm-react-utils/src/UserHasAccess.tsx:8](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/UserHasAccess.tsx#L8)
|
|
707
|
+
|
|
708
|
+
___
|
|
709
|
+
|
|
710
|
+
### backendDependencies
|
|
711
|
+
|
|
712
|
+
• `Const` **backendDependencies**: `Object`
|
|
713
|
+
|
|
714
|
+
#### Type declaration
|
|
715
|
+
|
|
716
|
+
| Name | Type |
|
|
717
|
+
| :------ | :------ |
|
|
718
|
+
| `fhir2` | `string` |
|
|
719
|
+
| `webservices.rest` | `string` |
|
|
720
|
+
|
|
721
|
+
#### Defined in
|
|
722
|
+
|
|
723
|
+
[packages/framework/esm-api/src/openmrs-backend-dependencies.ts:1](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-backend-dependencies.ts#L1)
|
|
724
|
+
|
|
725
|
+
___
|
|
726
|
+
|
|
727
|
+
### extensionStore
|
|
728
|
+
|
|
729
|
+
• `Const` **extensionStore**: `Store`<[`ExtensionStore`](interfaces/ExtensionStore.md)\>
|
|
730
|
+
|
|
731
|
+
#### Defined in
|
|
732
|
+
|
|
733
|
+
[packages/framework/esm-extensions/src/store.ts:77](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L77)
|
|
734
|
+
|
|
735
|
+
___
|
|
736
|
+
|
|
737
|
+
### fhirBaseUrl
|
|
738
|
+
|
|
739
|
+
• `Const` **fhirBaseUrl**: ``"/ws/fhir2/R4"``
|
|
740
|
+
|
|
741
|
+
#### Defined in
|
|
742
|
+
|
|
743
|
+
[packages/framework/esm-api/src/fhir.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L4)
|
|
744
|
+
|
|
745
|
+
___
|
|
746
|
+
|
|
747
|
+
### getStartedVisit
|
|
748
|
+
|
|
749
|
+
• `Const` **getStartedVisit**: `BehaviorSubject`<``null`` \| [`VisitItem`](interfaces/VisitItem.md)\>
|
|
750
|
+
|
|
751
|
+
#### Defined in
|
|
752
|
+
|
|
753
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:84](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-utils.ts#L84)
|
|
754
|
+
|
|
755
|
+
___
|
|
756
|
+
|
|
757
|
+
### implementerToolsConfigStore
|
|
758
|
+
|
|
759
|
+
• `Const` **implementerToolsConfigStore**: `Store`<[`ImplementerToolsConfigStore`](interfaces/ImplementerToolsConfigStore.md)\>
|
|
760
|
+
|
|
761
|
+
#### Defined in
|
|
762
|
+
|
|
763
|
+
[packages/framework/esm-config/src/module-config/state.ts:188](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/state.ts#L188)
|
|
764
|
+
|
|
765
|
+
___
|
|
766
|
+
|
|
767
|
+
### offlineUuidPrefix
|
|
768
|
+
|
|
769
|
+
• `Const` **offlineUuidPrefix**: ``"OFFLINE+"``
|
|
770
|
+
|
|
771
|
+
#### Defined in
|
|
772
|
+
|
|
773
|
+
[packages/framework/esm-offline/src/uuid.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/uuid.ts#L3)
|
|
774
|
+
|
|
775
|
+
___
|
|
776
|
+
|
|
777
|
+
### omrsOfflineCachingStrategyHttpHeaderName
|
|
778
|
+
|
|
779
|
+
• `Const` **omrsOfflineCachingStrategyHttpHeaderName**: ``"x-omrs-offline-caching-strategy"``
|
|
780
|
+
|
|
781
|
+
#### Defined in
|
|
782
|
+
|
|
783
|
+
[packages/framework/esm-offline/src/service-worker-http-headers.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-http-headers.ts#L5)
|
|
784
|
+
|
|
785
|
+
___
|
|
786
|
+
|
|
787
|
+
### omrsOfflineResponseBodyHttpHeaderName
|
|
788
|
+
|
|
789
|
+
• `Const` **omrsOfflineResponseBodyHttpHeaderName**: ``"x-omrs-offline-response-body"``
|
|
790
|
+
|
|
791
|
+
#### Defined in
|
|
792
|
+
|
|
793
|
+
[packages/framework/esm-offline/src/service-worker-http-headers.ts:1](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-http-headers.ts#L1)
|
|
794
|
+
|
|
795
|
+
___
|
|
796
|
+
|
|
797
|
+
### omrsOfflineResponseStatusHttpHeaderName
|
|
798
|
+
|
|
799
|
+
• `Const` **omrsOfflineResponseStatusHttpHeaderName**: ``"x-omrs-offline-response-status"``
|
|
800
|
+
|
|
801
|
+
#### Defined in
|
|
802
|
+
|
|
803
|
+
[packages/framework/esm-offline/src/service-worker-http-headers.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-http-headers.ts#L3)
|
|
804
|
+
|
|
805
|
+
___
|
|
806
|
+
|
|
807
|
+
### sessionEndpoint
|
|
808
|
+
|
|
809
|
+
• `Const` **sessionEndpoint**: ``"/ws/rest/v1/session"``
|
|
810
|
+
|
|
811
|
+
#### Defined in
|
|
812
|
+
|
|
813
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:6](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L6)
|
|
814
|
+
|
|
815
|
+
___
|
|
816
|
+
|
|
817
|
+
### temporaryConfigStore
|
|
818
|
+
|
|
819
|
+
• `Const` **temporaryConfigStore**: `Store`<`TemporaryConfigStore`\>
|
|
820
|
+
|
|
821
|
+
#### Defined in
|
|
822
|
+
|
|
823
|
+
[packages/framework/esm-config/src/module-config/state.ts:75](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/state.ts#L75)
|
|
824
|
+
|
|
825
|
+
___
|
|
826
|
+
|
|
827
|
+
### validators
|
|
828
|
+
|
|
829
|
+
• `Const` **validators**: `Object`
|
|
830
|
+
|
|
831
|
+
#### Type declaration
|
|
832
|
+
|
|
833
|
+
| Name | Type |
|
|
834
|
+
| :------ | :------ |
|
|
835
|
+
| `inRange` | (`min`: `number`, `max`: `number`) => [`Validator`](API.md#validator) |
|
|
836
|
+
| `isUrl` | [`Validator`](API.md#validator) |
|
|
837
|
+
| `isUrlWithTemplateParameters` | (`allowedTemplateParameters`: `string`[]) => [`Validator`](API.md#validator) |
|
|
838
|
+
|
|
839
|
+
#### Defined in
|
|
840
|
+
|
|
841
|
+
[packages/framework/esm-config/src/validators/validators.ts:57](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/validators/validators.ts#L57)
|
|
842
|
+
|
|
843
|
+
## API Functions
|
|
844
|
+
|
|
845
|
+
### openmrsFetch
|
|
846
|
+
|
|
847
|
+
▸ **openmrsFetch**<`T`\>(`path`, `fetchInit?`): `Promise`<[`FetchResponse`](interfaces/FetchResponse.md)<`T`\>\>
|
|
848
|
+
|
|
849
|
+
The openmrsFetch function is a wrapper around the
|
|
850
|
+
[browser's built-in fetch function](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch),
|
|
851
|
+
with extra handling for OpenMRS-specific API behaviors, such as
|
|
852
|
+
request headers, authentication, authorization, and the API urls.
|
|
853
|
+
|
|
854
|
+
#### Type parameters
|
|
855
|
+
|
|
856
|
+
| Name | Type |
|
|
857
|
+
| :------ | :------ |
|
|
858
|
+
| `T` | `any` |
|
|
859
|
+
|
|
860
|
+
#### Parameters
|
|
861
|
+
|
|
862
|
+
| Name | Type | Description |
|
|
863
|
+
| :------ | :------ | :------ |
|
|
864
|
+
| `path` | `string` | A string url to make the request to. Note that the openmrs base url (by default `/openmrs`) will be automatically prepended to the URL, so there is no need to include it. |
|
|
865
|
+
| `fetchInit` | `FetchConfig` | A [fetch init object](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Syntax). Note that the `body` property does not need to be `JSON.stringify()`ed because openmrsFetch will do that for you. |
|
|
866
|
+
|
|
867
|
+
#### Returns
|
|
868
|
+
|
|
869
|
+
`Promise`<[`FetchResponse`](interfaces/FetchResponse.md)<`T`\>\>
|
|
870
|
+
|
|
871
|
+
A [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
872
|
+
that resolves with a [Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response).
|
|
873
|
+
Note that the openmrs version of the Response object has already
|
|
874
|
+
downloaded the HTTP response body as json, and has an additional
|
|
875
|
+
`data` property with the HTTP response json as a javascript object.
|
|
876
|
+
|
|
877
|
+
#### Example
|
|
878
|
+
```js
|
|
879
|
+
import { openmrsFetch } from '@openmrs/esm-api'
|
|
880
|
+
const abortController = new AbortController();
|
|
881
|
+
openmrsFetch('/ws/rest/v1/session', {signal: abortController.signal})
|
|
882
|
+
.then(response => {
|
|
883
|
+
console.log(response.data.authenticated)
|
|
884
|
+
})
|
|
885
|
+
.catch(err => {
|
|
886
|
+
console.error(err.status);
|
|
887
|
+
})
|
|
888
|
+
abortController.abort();
|
|
889
|
+
openmrsFetch('/ws/rest/v1/session', {
|
|
890
|
+
method: 'POST',
|
|
891
|
+
body: {
|
|
892
|
+
username: 'hi',
|
|
893
|
+
password: 'there',
|
|
894
|
+
}
|
|
895
|
+
})
|
|
896
|
+
```
|
|
897
|
+
|
|
898
|
+
#### Cancellation
|
|
899
|
+
|
|
900
|
+
To cancel a network request, use an
|
|
901
|
+
[AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort).
|
|
902
|
+
It is best practice to cancel your network requests when the user
|
|
903
|
+
navigates away from a page while the request is pending request, to
|
|
904
|
+
free up memory and network resources and to prevent race conditions.
|
|
905
|
+
|
|
906
|
+
#### Defined in
|
|
907
|
+
|
|
908
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:61](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L61)
|
|
909
|
+
|
|
910
|
+
___
|
|
911
|
+
|
|
912
|
+
### openmrsObservableFetch
|
|
913
|
+
|
|
914
|
+
▸ **openmrsObservableFetch**<`T`\>(`url`, `fetchInit?`): `Observable`<[`FetchResponse`](interfaces/FetchResponse.md)<`T`\>\>
|
|
915
|
+
|
|
916
|
+
The openmrsObservableFetch function is a wrapper around openmrsFetch
|
|
917
|
+
that returns an [Observable](https://rxjs-dev.firebaseapp.com/guide/observable)
|
|
918
|
+
instead of a promise. It exists in case using an Observable is
|
|
919
|
+
preferred or more convenient than a promise.
|
|
920
|
+
|
|
921
|
+
#### Type parameters
|
|
922
|
+
|
|
923
|
+
| Name |
|
|
924
|
+
| :------ |
|
|
925
|
+
| `T` |
|
|
926
|
+
|
|
927
|
+
#### Parameters
|
|
928
|
+
|
|
929
|
+
| Name | Type | Description |
|
|
930
|
+
| :------ | :------ | :------ |
|
|
931
|
+
| `url` | `string` | See [openmrsFetch](API.md#openmrsfetch) |
|
|
932
|
+
| `fetchInit` | `FetchConfig` | See [openmrsFetch](API.md#openmrsfetch) |
|
|
933
|
+
|
|
934
|
+
#### Returns
|
|
935
|
+
|
|
936
|
+
`Observable`<[`FetchResponse`](interfaces/FetchResponse.md)<`T`\>\>
|
|
937
|
+
|
|
938
|
+
An Observable that produces exactly one Response object.
|
|
939
|
+
The response object is exactly the same as for [openmrsFetch](API.md#openmrsfetch).
|
|
940
|
+
|
|
941
|
+
#### Example
|
|
942
|
+
|
|
943
|
+
```js
|
|
944
|
+
import { openmrsObservableFetch } from '@openmrs/esm-api'
|
|
945
|
+
const subscription = openmrsObservableFetch('/ws/rest/v1/session').subscribe(
|
|
946
|
+
response => console.log(response.data),
|
|
947
|
+
err => {throw err},
|
|
948
|
+
() => console.log('finished')
|
|
949
|
+
)
|
|
950
|
+
subscription.unsubscribe()
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
#### Cancellation
|
|
954
|
+
|
|
955
|
+
To cancel the network request, simply call `subscription.unsubscribe();`
|
|
956
|
+
|
|
957
|
+
#### Defined in
|
|
958
|
+
|
|
959
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:232](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L232)
|
|
960
|
+
|
|
961
|
+
___
|
|
962
|
+
|
|
963
|
+
## API Object Functions
|
|
964
|
+
|
|
965
|
+
### fetchCurrentPatient
|
|
966
|
+
|
|
967
|
+
▸ **fetchCurrentPatient**(`patientUuid`, `contentOverrides?`): `Promise`<`Object`\> \| `Promise`<``null``\>
|
|
968
|
+
|
|
969
|
+
#### Parameters
|
|
970
|
+
|
|
971
|
+
| Name | Type |
|
|
972
|
+
| :------ | :------ |
|
|
973
|
+
| `patientUuid` | [`PatientUuid`](API.md#patientuuid) |
|
|
974
|
+
| `contentOverrides?` | `Partial`<`Parameters`<typeof `fhir.read`\>[``0``]\> |
|
|
975
|
+
|
|
976
|
+
#### Returns
|
|
977
|
+
|
|
978
|
+
`Promise`<`Object`\> \| `Promise`<``null``\>
|
|
979
|
+
|
|
980
|
+
#### Defined in
|
|
981
|
+
|
|
982
|
+
[packages/framework/esm-api/src/shared-api-objects/current-patient.ts:23](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-patient.ts#L23)
|
|
983
|
+
|
|
984
|
+
___
|
|
985
|
+
|
|
986
|
+
### getCurrentUser
|
|
987
|
+
|
|
988
|
+
▸ **getCurrentUser**(): `Observable`<[`LoggedInUser`](interfaces/LoggedInUser.md)\>
|
|
989
|
+
|
|
990
|
+
The getCurrentUser function returns an observable that produces
|
|
991
|
+
**zero or more values, over time**. It will produce zero values
|
|
992
|
+
by default if the user is not logged in. And it will provide a
|
|
993
|
+
first value when the logged in user is fetched from the server.
|
|
994
|
+
Subsequent values will be produced whenever the user object is
|
|
995
|
+
updated.
|
|
996
|
+
|
|
997
|
+
#### Returns
|
|
998
|
+
|
|
999
|
+
`Observable`<[`LoggedInUser`](interfaces/LoggedInUser.md)\>
|
|
1000
|
+
|
|
1001
|
+
An Observable that produces zero or more values (as
|
|
1002
|
+
described above). The values produced will be a user object (if
|
|
1003
|
+
`includeAuthStatus` is set to `false`) or an object with a session
|
|
1004
|
+
and authenticated property (if `includeAuthStatus` is set to `true`).
|
|
1005
|
+
|
|
1006
|
+
#### Example
|
|
1007
|
+
|
|
1008
|
+
```js
|
|
1009
|
+
import { getCurrentUser } from '@openmrs/esm-api'
|
|
1010
|
+
const subscription = getCurrentUser().subscribe(
|
|
1011
|
+
user => console.log(user)
|
|
1012
|
+
)
|
|
1013
|
+
subscription.unsubscribe()
|
|
1014
|
+
getCurrentUser({includeAuthStatus: true}).subscribe(
|
|
1015
|
+
data => console.log(data.authenticated)
|
|
1016
|
+
)
|
|
1017
|
+
```
|
|
1018
|
+
|
|
1019
|
+
#### Be sure to unsubscribe when your component unmounts
|
|
1020
|
+
|
|
1021
|
+
Otherwise your code will continue getting updates to the user object
|
|
1022
|
+
even after the UI component is gone from the screen. This is a memory
|
|
1023
|
+
leak and source of bugs.
|
|
1024
|
+
|
|
1025
|
+
#### Defined in
|
|
1026
|
+
|
|
1027
|
+
[packages/framework/esm-api/src/shared-api-objects/current-user.ts:57](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-user.ts#L57)
|
|
1028
|
+
|
|
1029
|
+
▸ **getCurrentUser**(`opts`): `Observable`<[`UnauthenticatedUser`](interfaces/UnauthenticatedUser.md)\>
|
|
1030
|
+
|
|
1031
|
+
#### Parameters
|
|
1032
|
+
|
|
1033
|
+
| Name | Type |
|
|
1034
|
+
| :------ | :------ |
|
|
1035
|
+
| `opts` | [`CurrentUserWithResponseOption`](interfaces/CurrentUserWithResponseOption.md) |
|
|
1036
|
+
|
|
1037
|
+
#### Returns
|
|
1038
|
+
|
|
1039
|
+
`Observable`<[`UnauthenticatedUser`](interfaces/UnauthenticatedUser.md)\>
|
|
1040
|
+
|
|
1041
|
+
#### Defined in
|
|
1042
|
+
|
|
1043
|
+
[packages/framework/esm-api/src/shared-api-objects/current-user.ts:58](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-user.ts#L58)
|
|
1044
|
+
|
|
1045
|
+
▸ **getCurrentUser**(`opts`): `Observable`<[`LoggedInUser`](interfaces/LoggedInUser.md)\>
|
|
1046
|
+
|
|
1047
|
+
#### Parameters
|
|
1048
|
+
|
|
1049
|
+
| Name | Type |
|
|
1050
|
+
| :------ | :------ |
|
|
1051
|
+
| `opts` | [`CurrentUserWithoutResponseOption`](interfaces/CurrentUserWithoutResponseOption.md) |
|
|
1052
|
+
|
|
1053
|
+
#### Returns
|
|
1054
|
+
|
|
1055
|
+
`Observable`<[`LoggedInUser`](interfaces/LoggedInUser.md)\>
|
|
1056
|
+
|
|
1057
|
+
#### Defined in
|
|
1058
|
+
|
|
1059
|
+
[packages/framework/esm-api/src/shared-api-objects/current-user.ts:61](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-user.ts#L61)
|
|
1060
|
+
|
|
1061
|
+
___
|
|
1062
|
+
|
|
1063
|
+
### refetchCurrentUser
|
|
1064
|
+
|
|
1065
|
+
▸ **refetchCurrentUser**(): `void`
|
|
1066
|
+
|
|
1067
|
+
The `refetchCurrentUser` function causes a network request to redownload
|
|
1068
|
+
the user. All subscribers to the current user will be notified of the
|
|
1069
|
+
new users once the new version of the user object is downloaded.
|
|
1070
|
+
|
|
1071
|
+
#### Returns
|
|
1072
|
+
|
|
1073
|
+
`void`
|
|
1074
|
+
|
|
1075
|
+
The same observable as returned by [getCurrentUser](API.md#getcurrentuser).
|
|
1076
|
+
|
|
1077
|
+
#### Example
|
|
1078
|
+
```js
|
|
1079
|
+
import { refetchCurrentUser } from '@openmrs/esm-api'
|
|
1080
|
+
refetchCurrentUser()
|
|
1081
|
+
```
|
|
1082
|
+
|
|
1083
|
+
#### Defined in
|
|
1084
|
+
|
|
1085
|
+
[packages/framework/esm-api/src/shared-api-objects/current-user.ts:116](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-user.ts#L116)
|
|
1086
|
+
|
|
1087
|
+
___
|
|
1088
|
+
|
|
1089
|
+
## Breadcrumb Functions
|
|
1090
|
+
|
|
1091
|
+
### filterBreadcrumbs
|
|
1092
|
+
|
|
1093
|
+
▸ **filterBreadcrumbs**(`list`, `path`): [`BreadcrumbRegistration`](interfaces/BreadcrumbRegistration.md)[]
|
|
1094
|
+
|
|
1095
|
+
#### Parameters
|
|
1096
|
+
|
|
1097
|
+
| Name | Type |
|
|
1098
|
+
| :------ | :------ |
|
|
1099
|
+
| `list` | [`BreadcrumbRegistration`](interfaces/BreadcrumbRegistration.md)[] |
|
|
1100
|
+
| `path` | `string` |
|
|
1101
|
+
|
|
1102
|
+
#### Returns
|
|
1103
|
+
|
|
1104
|
+
[`BreadcrumbRegistration`](interfaces/BreadcrumbRegistration.md)[]
|
|
1105
|
+
|
|
1106
|
+
#### Defined in
|
|
1107
|
+
|
|
1108
|
+
[packages/framework/esm-breadcrumbs/src/filter.ts:49](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-breadcrumbs/src/filter.ts#L49)
|
|
1109
|
+
|
|
1110
|
+
___
|
|
1111
|
+
|
|
1112
|
+
### getBreadcrumbs
|
|
1113
|
+
|
|
1114
|
+
▸ **getBreadcrumbs**(): [`BreadcrumbRegistration`](interfaces/BreadcrumbRegistration.md)[]
|
|
1115
|
+
|
|
1116
|
+
#### Returns
|
|
1117
|
+
|
|
1118
|
+
[`BreadcrumbRegistration`](interfaces/BreadcrumbRegistration.md)[]
|
|
1119
|
+
|
|
1120
|
+
#### Defined in
|
|
1121
|
+
|
|
1122
|
+
[packages/framework/esm-breadcrumbs/src/db.ts:50](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-breadcrumbs/src/db.ts#L50)
|
|
1123
|
+
|
|
1124
|
+
___
|
|
1125
|
+
|
|
1126
|
+
### getBreadcrumbsFor
|
|
1127
|
+
|
|
1128
|
+
▸ **getBreadcrumbsFor**(`path`): [`BreadcrumbRegistration`](interfaces/BreadcrumbRegistration.md)[]
|
|
1129
|
+
|
|
1130
|
+
#### Parameters
|
|
1131
|
+
|
|
1132
|
+
| Name | Type |
|
|
1133
|
+
| :------ | :------ |
|
|
1134
|
+
| `path` | `string` |
|
|
1135
|
+
|
|
1136
|
+
#### Returns
|
|
1137
|
+
|
|
1138
|
+
[`BreadcrumbRegistration`](interfaces/BreadcrumbRegistration.md)[]
|
|
1139
|
+
|
|
1140
|
+
#### Defined in
|
|
1141
|
+
|
|
1142
|
+
[packages/framework/esm-breadcrumbs/src/filter.ts:78](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-breadcrumbs/src/filter.ts#L78)
|
|
1143
|
+
|
|
1144
|
+
___
|
|
1145
|
+
|
|
1146
|
+
### registerBreadcrumb
|
|
1147
|
+
|
|
1148
|
+
▸ **registerBreadcrumb**(`breadcrumb`): `void`
|
|
1149
|
+
|
|
1150
|
+
#### Parameters
|
|
1151
|
+
|
|
1152
|
+
| Name | Type |
|
|
1153
|
+
| :------ | :------ |
|
|
1154
|
+
| `breadcrumb` | [`BreadcrumbSettings`](interfaces/BreadcrumbSettings.md) |
|
|
1155
|
+
|
|
1156
|
+
#### Returns
|
|
1157
|
+
|
|
1158
|
+
`void`
|
|
1159
|
+
|
|
1160
|
+
#### Defined in
|
|
1161
|
+
|
|
1162
|
+
[packages/framework/esm-breadcrumbs/src/db.ts:26](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-breadcrumbs/src/db.ts#L26)
|
|
1163
|
+
|
|
1164
|
+
___
|
|
1165
|
+
|
|
1166
|
+
### registerBreadcrumbs
|
|
1167
|
+
|
|
1168
|
+
▸ **registerBreadcrumbs**(`breadcrumbs`): `void`
|
|
1169
|
+
|
|
1170
|
+
#### Parameters
|
|
1171
|
+
|
|
1172
|
+
| Name | Type |
|
|
1173
|
+
| :------ | :------ |
|
|
1174
|
+
| `breadcrumbs` | [`BreadcrumbSettings`](interfaces/BreadcrumbSettings.md)[] |
|
|
1175
|
+
|
|
1176
|
+
#### Returns
|
|
1177
|
+
|
|
1178
|
+
`void`
|
|
1179
|
+
|
|
1180
|
+
#### Defined in
|
|
1181
|
+
|
|
1182
|
+
[packages/framework/esm-breadcrumbs/src/db.ts:35](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-breadcrumbs/src/db.ts#L35)
|
|
1183
|
+
|
|
1184
|
+
___
|
|
1185
|
+
|
|
1186
|
+
## Navigation Functions
|
|
1187
|
+
|
|
1188
|
+
### interpolateString
|
|
1189
|
+
|
|
1190
|
+
▸ **interpolateString**(`template`, `params`): `string`
|
|
1191
|
+
|
|
1192
|
+
Interpolates values of `params` into the `template` string.
|
|
1193
|
+
|
|
1194
|
+
Useful for additional template parameters in URLs.
|
|
1195
|
+
|
|
1196
|
+
Example usage:
|
|
1197
|
+
```js
|
|
1198
|
+
navigate({
|
|
1199
|
+
to: interpolateString(
|
|
1200
|
+
config.links.patientChart,
|
|
1201
|
+
{ patientUuid: patient.uuid }
|
|
1202
|
+
)
|
|
1203
|
+
});
|
|
1204
|
+
```
|
|
1205
|
+
|
|
1206
|
+
#### Parameters
|
|
1207
|
+
|
|
1208
|
+
| Name | Type | Description |
|
|
1209
|
+
| :------ | :------ | :------ |
|
|
1210
|
+
| `template` | `string` | With optional params wrapped in `${ }` |
|
|
1211
|
+
| `params` | `object` | Values to interpolate into the string template |
|
|
1212
|
+
|
|
1213
|
+
#### Returns
|
|
1214
|
+
|
|
1215
|
+
`string`
|
|
1216
|
+
|
|
1217
|
+
#### Defined in
|
|
1218
|
+
|
|
1219
|
+
[packages/framework/esm-config/src/navigation/interpolate-string.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/interpolate-string.ts#L38)
|
|
1220
|
+
|
|
1221
|
+
___
|
|
1222
|
+
|
|
1223
|
+
### isUrl
|
|
1224
|
+
|
|
1225
|
+
▸ `Const` **isUrl**(`value`): `string` \| `void`
|
|
1226
|
+
|
|
1227
|
+
Verifies that a string contains only the default URL template parameters.
|
|
1228
|
+
|
|
1229
|
+
#### Parameters
|
|
1230
|
+
|
|
1231
|
+
| Name | Type |
|
|
1232
|
+
| :------ | :------ |
|
|
1233
|
+
| `value` | `any` |
|
|
1234
|
+
|
|
1235
|
+
#### Returns
|
|
1236
|
+
|
|
1237
|
+
`string` \| `void`
|
|
1238
|
+
|
|
1239
|
+
#### Defined in
|
|
1240
|
+
|
|
1241
|
+
[packages/framework/esm-config/src/validators/validators.ts:55](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/validators/validators.ts#L55)
|
|
1242
|
+
|
|
1243
|
+
___
|
|
1244
|
+
|
|
1245
|
+
### isUrlWithTemplateParameters
|
|
1246
|
+
|
|
1247
|
+
▸ `Const` **isUrlWithTemplateParameters**(`allowedTemplateParameters`): [`Validator`](API.md#validator)
|
|
1248
|
+
|
|
1249
|
+
Verifies that a string contains only the default URL template
|
|
1250
|
+
parameters, plus any specified in `allowedTemplateParameters`.
|
|
1251
|
+
|
|
1252
|
+
#### Parameters
|
|
1253
|
+
|
|
1254
|
+
| Name | Type | Description |
|
|
1255
|
+
| :------ | :------ | :------ |
|
|
1256
|
+
| `allowedTemplateParameters` | `string`[] | To be added to `openmrsBase` and `openmrsSpaBase` |
|
|
1257
|
+
|
|
1258
|
+
#### Returns
|
|
1259
|
+
|
|
1260
|
+
[`Validator`](API.md#validator)
|
|
1261
|
+
|
|
1262
|
+
#### Defined in
|
|
1263
|
+
|
|
1264
|
+
[packages/framework/esm-config/src/validators/validators.ts:23](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/validators/validators.ts#L23)
|
|
1265
|
+
|
|
1266
|
+
___
|
|
1267
|
+
|
|
1268
|
+
### navigate
|
|
1269
|
+
|
|
1270
|
+
▸ **navigate**(`__namedParameters`): `void`
|
|
1271
|
+
|
|
1272
|
+
Calls `location.assign` for non-SPA paths and [navigateToUrl](https://single-spa.js.org/docs/api/#navigatetourl) for SPA paths
|
|
1273
|
+
|
|
1274
|
+
Example usage:
|
|
1275
|
+
```js
|
|
1276
|
+
const config = getConfig();
|
|
1277
|
+
const submitHandler = () => {
|
|
1278
|
+
navigate({ to: config.links.submitSuccess });
|
|
1279
|
+
};
|
|
1280
|
+
```
|
|
1281
|
+
|
|
1282
|
+
#### Parameters
|
|
1283
|
+
|
|
1284
|
+
| Name | Type |
|
|
1285
|
+
| :------ | :------ |
|
|
1286
|
+
| `__namedParameters` | [`NavigateOptions`](interfaces/NavigateOptions.md) |
|
|
1287
|
+
|
|
1288
|
+
#### Returns
|
|
1289
|
+
|
|
1290
|
+
`void`
|
|
1291
|
+
|
|
1292
|
+
#### Defined in
|
|
1293
|
+
|
|
1294
|
+
[packages/framework/esm-config/src/navigation/navigate.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/navigate.ts#L29)
|
|
1295
|
+
|
|
1296
|
+
___
|
|
1297
|
+
|
|
1298
|
+
## Other Functions
|
|
1299
|
+
|
|
1300
|
+
### age
|
|
1301
|
+
|
|
1302
|
+
▸ **age**(`dateString`): `string`
|
|
1303
|
+
|
|
1304
|
+
Gets a human readable age represention of the provided date string.
|
|
1305
|
+
|
|
1306
|
+
#### Parameters
|
|
1307
|
+
|
|
1308
|
+
| Name | Type | Description |
|
|
1309
|
+
| :------ | :------ | :------ |
|
|
1310
|
+
| `dateString` | `string` | The stringified date. |
|
|
1311
|
+
|
|
1312
|
+
#### Returns
|
|
1313
|
+
|
|
1314
|
+
`string`
|
|
1315
|
+
|
|
1316
|
+
A human-readable string version of the age.
|
|
1317
|
+
|
|
1318
|
+
#### Defined in
|
|
1319
|
+
|
|
1320
|
+
[packages/framework/esm-utils/src/age-helpers.tsx:37](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/age-helpers.tsx#L37)
|
|
1321
|
+
|
|
1322
|
+
___
|
|
1323
|
+
|
|
1324
|
+
### attach
|
|
1325
|
+
|
|
1326
|
+
▸ **attach**(`extensionSlotName`, `extensionId`): `void`
|
|
1327
|
+
|
|
1328
|
+
#### Parameters
|
|
1329
|
+
|
|
1330
|
+
| Name | Type |
|
|
1331
|
+
| :------ | :------ |
|
|
1332
|
+
| `extensionSlotName` | `string` |
|
|
1333
|
+
| `extensionId` | `string` |
|
|
1334
|
+
|
|
1335
|
+
#### Returns
|
|
1336
|
+
|
|
1337
|
+
`void`
|
|
1338
|
+
|
|
1339
|
+
#### Defined in
|
|
1340
|
+
|
|
1341
|
+
[packages/framework/esm-extensions/src/extensions.ts:71](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L71)
|
|
1342
|
+
|
|
1343
|
+
___
|
|
1344
|
+
|
|
1345
|
+
### checkStatus
|
|
1346
|
+
|
|
1347
|
+
▸ **checkStatus**(`online?`, `offline?`): `boolean`
|
|
1348
|
+
|
|
1349
|
+
#### Parameters
|
|
1350
|
+
|
|
1351
|
+
| Name | Type | Default value |
|
|
1352
|
+
| :------ | :------ | :------ |
|
|
1353
|
+
| `online` | `boolean` \| `object` | `true` |
|
|
1354
|
+
| `offline` | `boolean` \| `object` | `false` |
|
|
1355
|
+
|
|
1356
|
+
#### Returns
|
|
1357
|
+
|
|
1358
|
+
`boolean`
|
|
1359
|
+
|
|
1360
|
+
#### Defined in
|
|
1361
|
+
|
|
1362
|
+
[packages/framework/esm-extensions/src/helpers.ts:1](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/helpers.ts#L1)
|
|
1363
|
+
|
|
1364
|
+
___
|
|
1365
|
+
|
|
1366
|
+
### checkStatusFor
|
|
1367
|
+
|
|
1368
|
+
▸ **checkStatusFor**(`status`, `online?`, `offline?`): `boolean`
|
|
1369
|
+
|
|
1370
|
+
#### Parameters
|
|
1371
|
+
|
|
1372
|
+
| Name | Type | Default value |
|
|
1373
|
+
| :------ | :------ | :------ |
|
|
1374
|
+
| `status` | `boolean` | `undefined` |
|
|
1375
|
+
| `online` | `boolean` \| `object` | `true` |
|
|
1376
|
+
| `offline` | `boolean` \| `object` | `false` |
|
|
1377
|
+
|
|
1378
|
+
#### Returns
|
|
1379
|
+
|
|
1380
|
+
`boolean`
|
|
1381
|
+
|
|
1382
|
+
#### Defined in
|
|
1383
|
+
|
|
1384
|
+
[packages/framework/esm-extensions/src/helpers.ts:9](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/helpers.ts#L9)
|
|
1385
|
+
|
|
1386
|
+
___
|
|
1387
|
+
|
|
1388
|
+
### createErrorHandler
|
|
1389
|
+
|
|
1390
|
+
▸ **createErrorHandler**(): (`incomingErr`: `any`) => `void`
|
|
1391
|
+
|
|
1392
|
+
#### Returns
|
|
1393
|
+
|
|
1394
|
+
`fn`
|
|
1395
|
+
|
|
1396
|
+
▸ (`incomingErr`): `void`
|
|
1397
|
+
|
|
1398
|
+
##### Parameters
|
|
1399
|
+
|
|
1400
|
+
| Name | Type |
|
|
1401
|
+
| :------ | :------ |
|
|
1402
|
+
| `incomingErr` | `any` |
|
|
1403
|
+
|
|
1404
|
+
##### Returns
|
|
1405
|
+
|
|
1406
|
+
`void`
|
|
1407
|
+
|
|
1408
|
+
#### Defined in
|
|
1409
|
+
|
|
1410
|
+
[packages/framework/esm-error-handling/src/index.ts:31](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-error-handling/src/index.ts#L31)
|
|
1411
|
+
|
|
1412
|
+
___
|
|
1413
|
+
|
|
1414
|
+
### createGlobalStore
|
|
1415
|
+
|
|
1416
|
+
▸ **createGlobalStore**<`TState`\>(`name`, `initialState`): `Store`<`TState`\>
|
|
1417
|
+
|
|
1418
|
+
Creates a Unistore [store](https://github.com/developit/unistore#store).
|
|
1419
|
+
|
|
1420
|
+
#### Type parameters
|
|
1421
|
+
|
|
1422
|
+
| Name |
|
|
1423
|
+
| :------ |
|
|
1424
|
+
| `TState` |
|
|
1425
|
+
|
|
1426
|
+
#### Parameters
|
|
1427
|
+
|
|
1428
|
+
| Name | Type | Description |
|
|
1429
|
+
| :------ | :------ | :------ |
|
|
1430
|
+
| `name` | `string` | A name by which the store can be looked up later. Must be unique across the entire application. |
|
|
1431
|
+
| `initialState` | `TState` | An object which will be the initial state of the store. |
|
|
1432
|
+
|
|
1433
|
+
#### Returns
|
|
1434
|
+
|
|
1435
|
+
`Store`<`TState`\>
|
|
1436
|
+
|
|
1437
|
+
The newly created store.
|
|
1438
|
+
|
|
1439
|
+
#### Defined in
|
|
1440
|
+
|
|
1441
|
+
[packages/framework/esm-state/src/state.ts:18](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-state/src/state.ts#L18)
|
|
1442
|
+
|
|
1443
|
+
___
|
|
1444
|
+
|
|
1445
|
+
### createUseStore
|
|
1446
|
+
|
|
1447
|
+
▸ **createUseStore**<`T`\>(`store`): () => `T`(`actions`: [`Actions`](API.md#actions)) => `T` & [`BoundActions`](API.md#boundactions)(`actions?`: [`Actions`](API.md#actions)) => `T` & [`BoundActions`](API.md#boundactions)
|
|
1448
|
+
|
|
1449
|
+
#### Type parameters
|
|
1450
|
+
|
|
1451
|
+
| Name |
|
|
1452
|
+
| :------ |
|
|
1453
|
+
| `T` |
|
|
1454
|
+
|
|
1455
|
+
#### Parameters
|
|
1456
|
+
|
|
1457
|
+
| Name | Type |
|
|
1458
|
+
| :------ | :------ |
|
|
1459
|
+
| `store` | `Store`<`T`\> |
|
|
1460
|
+
|
|
1461
|
+
#### Returns
|
|
1462
|
+
|
|
1463
|
+
`fn`
|
|
1464
|
+
|
|
1465
|
+
▸ (): `T`
|
|
1466
|
+
|
|
1467
|
+
##### Returns
|
|
1468
|
+
|
|
1469
|
+
`T`
|
|
1470
|
+
|
|
1471
|
+
▸ (`actions`): `T` & [`BoundActions`](API.md#boundactions)
|
|
1472
|
+
|
|
1473
|
+
##### Parameters
|
|
1474
|
+
|
|
1475
|
+
| Name | Type |
|
|
1476
|
+
| :------ | :------ |
|
|
1477
|
+
| `actions` | [`Actions`](API.md#actions) |
|
|
1478
|
+
|
|
1479
|
+
##### Returns
|
|
1480
|
+
|
|
1481
|
+
`T` & [`BoundActions`](API.md#boundactions)
|
|
1482
|
+
|
|
1483
|
+
▸ (`actions?`): `T` & [`BoundActions`](API.md#boundactions)
|
|
1484
|
+
|
|
1485
|
+
##### Parameters
|
|
1486
|
+
|
|
1487
|
+
| Name | Type |
|
|
1488
|
+
| :------ | :------ |
|
|
1489
|
+
| `actions?` | [`Actions`](API.md#actions) |
|
|
1490
|
+
|
|
1491
|
+
##### Returns
|
|
1492
|
+
|
|
1493
|
+
`T` & [`BoundActions`](API.md#boundactions)
|
|
1494
|
+
|
|
1495
|
+
#### Defined in
|
|
1496
|
+
|
|
1497
|
+
[packages/framework/esm-react-utils/src/createUseStore.ts:21](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/createUseStore.ts#L21)
|
|
1498
|
+
|
|
1499
|
+
___
|
|
1500
|
+
|
|
1501
|
+
### daysIntoYear
|
|
1502
|
+
|
|
1503
|
+
▸ **daysIntoYear**(`date`): `number`
|
|
1504
|
+
|
|
1505
|
+
Gets the number of days in the year of the given date.
|
|
1506
|
+
|
|
1507
|
+
#### Parameters
|
|
1508
|
+
|
|
1509
|
+
| Name | Type | Description |
|
|
1510
|
+
| :------ | :------ | :------ |
|
|
1511
|
+
| `date` | `Date` | The date to compute the days within the year. |
|
|
1512
|
+
|
|
1513
|
+
#### Returns
|
|
1514
|
+
|
|
1515
|
+
`number`
|
|
1516
|
+
|
|
1517
|
+
The number of days.
|
|
1518
|
+
|
|
1519
|
+
#### Defined in
|
|
1520
|
+
|
|
1521
|
+
[packages/framework/esm-utils/src/age-helpers.tsx:6](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/age-helpers.tsx#L6)
|
|
1522
|
+
|
|
1523
|
+
___
|
|
1524
|
+
|
|
1525
|
+
### defineConfigSchema
|
|
1526
|
+
|
|
1527
|
+
▸ **defineConfigSchema**(`moduleName`, `schema`): `void`
|
|
1528
|
+
|
|
1529
|
+
#### Parameters
|
|
1530
|
+
|
|
1531
|
+
| Name | Type |
|
|
1532
|
+
| :------ | :------ |
|
|
1533
|
+
| `moduleName` | `string` |
|
|
1534
|
+
| `schema` | [`ConfigSchema`](interfaces/ConfigSchema.md) |
|
|
1535
|
+
|
|
1536
|
+
#### Returns
|
|
1537
|
+
|
|
1538
|
+
`void`
|
|
1539
|
+
|
|
1540
|
+
#### Defined in
|
|
1541
|
+
|
|
1542
|
+
[packages/framework/esm-config/src/module-config/module-config.ts:203](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/module-config.ts#L203)
|
|
1543
|
+
|
|
1544
|
+
___
|
|
1545
|
+
|
|
1546
|
+
### deleteSynchronizationItem
|
|
1547
|
+
|
|
1548
|
+
▸ **deleteSynchronizationItem**(`id`): `Promise`<`void`\>
|
|
1549
|
+
|
|
1550
|
+
#### Parameters
|
|
1551
|
+
|
|
1552
|
+
| Name | Type |
|
|
1553
|
+
| :------ | :------ |
|
|
1554
|
+
| `id` | `number` |
|
|
1555
|
+
|
|
1556
|
+
#### Returns
|
|
1557
|
+
|
|
1558
|
+
`Promise`<`void`\>
|
|
1559
|
+
|
|
1560
|
+
#### Defined in
|
|
1561
|
+
|
|
1562
|
+
[packages/framework/esm-offline/src/sync.ts:251](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L251)
|
|
1563
|
+
|
|
1564
|
+
___
|
|
1565
|
+
|
|
1566
|
+
### detach
|
|
1567
|
+
|
|
1568
|
+
▸ **detach**(`extensionSlotName`, `extensionId`): `void`
|
|
1569
|
+
|
|
1570
|
+
#### Parameters
|
|
1571
|
+
|
|
1572
|
+
| Name | Type |
|
|
1573
|
+
| :------ | :------ |
|
|
1574
|
+
| `extensionSlotName` | `string` |
|
|
1575
|
+
| `extensionId` | `string` |
|
|
1576
|
+
|
|
1577
|
+
#### Returns
|
|
1578
|
+
|
|
1579
|
+
`void`
|
|
1580
|
+
|
|
1581
|
+
#### Defined in
|
|
1582
|
+
|
|
1583
|
+
[packages/framework/esm-extensions/src/extensions.ts:101](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L101)
|
|
1584
|
+
|
|
1585
|
+
___
|
|
1586
|
+
|
|
1587
|
+
### detachAll
|
|
1588
|
+
|
|
1589
|
+
▸ **detachAll**(`extensionSlotName`): `void`
|
|
1590
|
+
|
|
1591
|
+
#### Parameters
|
|
1592
|
+
|
|
1593
|
+
| Name | Type |
|
|
1594
|
+
| :------ | :------ |
|
|
1595
|
+
| `extensionSlotName` | `string` |
|
|
1596
|
+
|
|
1597
|
+
#### Returns
|
|
1598
|
+
|
|
1599
|
+
`void`
|
|
1600
|
+
|
|
1601
|
+
#### Defined in
|
|
1602
|
+
|
|
1603
|
+
[packages/framework/esm-extensions/src/extensions.ts:124](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L124)
|
|
1604
|
+
|
|
1605
|
+
___
|
|
1606
|
+
|
|
1607
|
+
### dispatchConnectivityChanged
|
|
1608
|
+
|
|
1609
|
+
▸ **dispatchConnectivityChanged**(`online`): `void`
|
|
1610
|
+
|
|
1611
|
+
#### Parameters
|
|
1612
|
+
|
|
1613
|
+
| Name | Type |
|
|
1614
|
+
| :------ | :------ |
|
|
1615
|
+
| `online` | `boolean` |
|
|
1616
|
+
|
|
1617
|
+
#### Returns
|
|
1618
|
+
|
|
1619
|
+
`void`
|
|
1620
|
+
|
|
1621
|
+
#### Defined in
|
|
1622
|
+
|
|
1623
|
+
[packages/framework/esm-globals/src/events.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/events.ts#L7)
|
|
1624
|
+
|
|
1625
|
+
___
|
|
1626
|
+
|
|
1627
|
+
### dispatchNetworkRequestFailed
|
|
1628
|
+
|
|
1629
|
+
▸ **dispatchNetworkRequestFailed**(`data`): `void`
|
|
1630
|
+
|
|
1631
|
+
#### Parameters
|
|
1632
|
+
|
|
1633
|
+
| Name | Type |
|
|
1634
|
+
| :------ | :------ |
|
|
1635
|
+
| `data` | [`NetworkRequestFailedEvent`](interfaces/NetworkRequestFailedEvent.md) |
|
|
1636
|
+
|
|
1637
|
+
#### Returns
|
|
1638
|
+
|
|
1639
|
+
`void`
|
|
1640
|
+
|
|
1641
|
+
#### Defined in
|
|
1642
|
+
|
|
1643
|
+
[packages/framework/esm-offline/src/events.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/events.ts#L5)
|
|
1644
|
+
|
|
1645
|
+
___
|
|
1646
|
+
|
|
1647
|
+
### dispatchNotificationShown
|
|
1648
|
+
|
|
1649
|
+
▸ **dispatchNotificationShown**(`data`): `void`
|
|
1650
|
+
|
|
1651
|
+
#### Parameters
|
|
1652
|
+
|
|
1653
|
+
| Name | Type |
|
|
1654
|
+
| :------ | :------ |
|
|
1655
|
+
| `data` | [`ShowNotificationEvent`](interfaces/ShowNotificationEvent.md) |
|
|
1656
|
+
|
|
1657
|
+
#### Returns
|
|
1658
|
+
|
|
1659
|
+
`void`
|
|
1660
|
+
|
|
1661
|
+
#### Defined in
|
|
1662
|
+
|
|
1663
|
+
[packages/framework/esm-globals/src/events.ts:81](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/events.ts#L81)
|
|
1664
|
+
|
|
1665
|
+
___
|
|
1666
|
+
|
|
1667
|
+
### dispatchPrecacheStaticDependencies
|
|
1668
|
+
|
|
1669
|
+
▸ **dispatchPrecacheStaticDependencies**(`data?`): `void`
|
|
1670
|
+
|
|
1671
|
+
#### Parameters
|
|
1672
|
+
|
|
1673
|
+
| Name | Type |
|
|
1674
|
+
| :------ | :------ |
|
|
1675
|
+
| `data` | [`PrecacheStaticDependenciesEvent`](interfaces/PrecacheStaticDependenciesEvent.md) |
|
|
1676
|
+
|
|
1677
|
+
#### Returns
|
|
1678
|
+
|
|
1679
|
+
`void`
|
|
1680
|
+
|
|
1681
|
+
#### Defined in
|
|
1682
|
+
|
|
1683
|
+
[packages/framework/esm-globals/src/events.ts:34](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/events.ts#L34)
|
|
1684
|
+
|
|
1685
|
+
___
|
|
1686
|
+
|
|
1687
|
+
### generateOfflineUuid
|
|
1688
|
+
|
|
1689
|
+
▸ **generateOfflineUuid**(): `string`
|
|
1690
|
+
|
|
1691
|
+
Generates a UUID-like string which is used for uniquely identifying objects while offline.
|
|
1692
|
+
|
|
1693
|
+
#### Returns
|
|
1694
|
+
|
|
1695
|
+
`string`
|
|
1696
|
+
|
|
1697
|
+
#### Defined in
|
|
1698
|
+
|
|
1699
|
+
[packages/framework/esm-offline/src/uuid.ts:6](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/uuid.ts#L6)
|
|
1700
|
+
|
|
1701
|
+
___
|
|
1702
|
+
|
|
1703
|
+
### getAppState
|
|
1704
|
+
|
|
1705
|
+
▸ **getAppState**(): `Store`<[`AppState`](interfaces/AppState.md)\>
|
|
1706
|
+
|
|
1707
|
+
#### Returns
|
|
1708
|
+
|
|
1709
|
+
`Store`<[`AppState`](interfaces/AppState.md)\>
|
|
1710
|
+
|
|
1711
|
+
The [store](https://github.com/developit/unistore#store) named `app`.
|
|
1712
|
+
|
|
1713
|
+
#### Defined in
|
|
1714
|
+
|
|
1715
|
+
[packages/framework/esm-state/src/state.ts:85](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-state/src/state.ts#L85)
|
|
1716
|
+
|
|
1717
|
+
___
|
|
1718
|
+
|
|
1719
|
+
### getAssignedIds
|
|
1720
|
+
|
|
1721
|
+
▸ **getAssignedIds**(`instance`, `attachedIds`): `string`[]
|
|
1722
|
+
|
|
1723
|
+
#### Parameters
|
|
1724
|
+
|
|
1725
|
+
| Name | Type |
|
|
1726
|
+
| :------ | :------ |
|
|
1727
|
+
| `instance` | [`ExtensionSlotInstance`](interfaces/ExtensionSlotInstance.md) |
|
|
1728
|
+
| `attachedIds` | `string`[] |
|
|
1729
|
+
|
|
1730
|
+
#### Returns
|
|
1731
|
+
|
|
1732
|
+
`string`[]
|
|
1733
|
+
|
|
1734
|
+
#### Defined in
|
|
1735
|
+
|
|
1736
|
+
[packages/framework/esm-extensions/src/extensions.ts:157](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L157)
|
|
1737
|
+
|
|
1738
|
+
___
|
|
1739
|
+
|
|
1740
|
+
### getAsyncExtensionLifecycle
|
|
1741
|
+
|
|
1742
|
+
▸ `Const` **getAsyncExtensionLifecycle**<`T`\>(`lazy`, `options`): () => `Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
1743
|
+
|
|
1744
|
+
**`deprecated`** Use getAsyncLifecycle instead.
|
|
1745
|
+
|
|
1746
|
+
#### Type parameters
|
|
1747
|
+
|
|
1748
|
+
| Name |
|
|
1749
|
+
| :------ |
|
|
1750
|
+
| `T` |
|
|
1751
|
+
|
|
1752
|
+
#### Parameters
|
|
1753
|
+
|
|
1754
|
+
| Name | Type |
|
|
1755
|
+
| :------ | :------ |
|
|
1756
|
+
| `lazy` | () => `Promise`<`Object`\> |
|
|
1757
|
+
| `options` | [`ComponentDecoratorOptions`](interfaces/ComponentDecoratorOptions.md) |
|
|
1758
|
+
|
|
1759
|
+
#### Returns
|
|
1760
|
+
|
|
1761
|
+
`fn`
|
|
1762
|
+
|
|
1763
|
+
▸ (): `Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
1764
|
+
|
|
1765
|
+
##### Returns
|
|
1766
|
+
|
|
1767
|
+
`Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
1768
|
+
|
|
1769
|
+
#### Defined in
|
|
1770
|
+
|
|
1771
|
+
[packages/framework/esm-react-utils/src/getLifecycle.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/getLifecycle.ts#L38)
|
|
1772
|
+
|
|
1773
|
+
___
|
|
1774
|
+
|
|
1775
|
+
### getAsyncLifecycle
|
|
1776
|
+
|
|
1777
|
+
▸ **getAsyncLifecycle**<`T`\>(`lazy`, `options`): () => `Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
1778
|
+
|
|
1779
|
+
#### Type parameters
|
|
1780
|
+
|
|
1781
|
+
| Name |
|
|
1782
|
+
| :------ |
|
|
1783
|
+
| `T` |
|
|
1784
|
+
|
|
1785
|
+
#### Parameters
|
|
1786
|
+
|
|
1787
|
+
| Name | Type |
|
|
1788
|
+
| :------ | :------ |
|
|
1789
|
+
| `lazy` | () => `Promise`<`Object`\> |
|
|
1790
|
+
| `options` | [`ComponentDecoratorOptions`](interfaces/ComponentDecoratorOptions.md) |
|
|
1791
|
+
|
|
1792
|
+
#### Returns
|
|
1793
|
+
|
|
1794
|
+
`fn`
|
|
1795
|
+
|
|
1796
|
+
▸ (): `Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
1797
|
+
|
|
1798
|
+
##### Returns
|
|
1799
|
+
|
|
1800
|
+
`Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
1801
|
+
|
|
1802
|
+
#### Defined in
|
|
1803
|
+
|
|
1804
|
+
[packages/framework/esm-react-utils/src/getLifecycle.ts:20](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/getLifecycle.ts#L20)
|
|
1805
|
+
|
|
1806
|
+
___
|
|
1807
|
+
|
|
1808
|
+
### getConfig
|
|
1809
|
+
|
|
1810
|
+
▸ **getConfig**(`moduleName`): `Promise`<[`Config`](interfaces/Config.md)\>
|
|
1811
|
+
|
|
1812
|
+
A promise-based way to access the config as soon as it is fully loaded
|
|
1813
|
+
from the import-map. If it is already loaded, resolves the config in its
|
|
1814
|
+
present state.
|
|
1815
|
+
|
|
1816
|
+
In general you should use the Unistore-based API provided by
|
|
1817
|
+
`getConfigStore`, which allows creating a subscription so that you always
|
|
1818
|
+
have the latest config. If using React, just use `useConfig`.
|
|
1819
|
+
|
|
1820
|
+
This is a useful function if you need to get the config in the course
|
|
1821
|
+
of the execution of a function.
|
|
1822
|
+
|
|
1823
|
+
#### Parameters
|
|
1824
|
+
|
|
1825
|
+
| Name | Type | Description |
|
|
1826
|
+
| :------ | :------ | :------ |
|
|
1827
|
+
| `moduleName` | `string` | The name of the module for which to look up the config |
|
|
1828
|
+
|
|
1829
|
+
#### Returns
|
|
1830
|
+
|
|
1831
|
+
`Promise`<[`Config`](interfaces/Config.md)\>
|
|
1832
|
+
|
|
1833
|
+
#### Defined in
|
|
1834
|
+
|
|
1835
|
+
[packages/framework/esm-config/src/module-config/module-config.ts:232](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/module-config.ts#L232)
|
|
1836
|
+
|
|
1837
|
+
___
|
|
1838
|
+
|
|
1839
|
+
### getConfigStore
|
|
1840
|
+
|
|
1841
|
+
▸ **getConfigStore**(`moduleName`): `Store`<[`ConfigStore`](interfaces/ConfigStore.md)\>
|
|
1842
|
+
|
|
1843
|
+
#### Parameters
|
|
1844
|
+
|
|
1845
|
+
| Name | Type |
|
|
1846
|
+
| :------ | :------ |
|
|
1847
|
+
| `moduleName` | `string` |
|
|
1848
|
+
|
|
1849
|
+
#### Returns
|
|
1850
|
+
|
|
1851
|
+
`Store`<[`ConfigStore`](interfaces/ConfigStore.md)\>
|
|
1852
|
+
|
|
1853
|
+
#### Defined in
|
|
1854
|
+
|
|
1855
|
+
[packages/framework/esm-config/src/module-config/state.ts:142](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/state.ts#L142)
|
|
1856
|
+
|
|
1857
|
+
___
|
|
1858
|
+
|
|
1859
|
+
### getCustomProps
|
|
1860
|
+
|
|
1861
|
+
▸ **getCustomProps**(`online`, `offline`): `object`
|
|
1862
|
+
|
|
1863
|
+
#### Parameters
|
|
1864
|
+
|
|
1865
|
+
| Name | Type |
|
|
1866
|
+
| :------ | :------ |
|
|
1867
|
+
| `online` | `boolean` \| `object` \| `undefined` |
|
|
1868
|
+
| `offline` | `boolean` \| `object` \| `undefined` |
|
|
1869
|
+
|
|
1870
|
+
#### Returns
|
|
1871
|
+
|
|
1872
|
+
`object`
|
|
1873
|
+
|
|
1874
|
+
#### Defined in
|
|
1875
|
+
|
|
1876
|
+
[packages/framework/esm-extensions/src/helpers.ts:17](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/helpers.ts#L17)
|
|
1877
|
+
|
|
1878
|
+
___
|
|
1879
|
+
|
|
1880
|
+
### getExtensionConfigStore
|
|
1881
|
+
|
|
1882
|
+
▸ **getExtensionConfigStore**(`extensionSlotModuleName`, `attachedExtensionSlotName`, `extensionId`): `Store`<[`ConfigStore`](interfaces/ConfigStore.md)\>
|
|
1883
|
+
|
|
1884
|
+
#### Parameters
|
|
1885
|
+
|
|
1886
|
+
| Name | Type |
|
|
1887
|
+
| :------ | :------ |
|
|
1888
|
+
| `extensionSlotModuleName` | `string` |
|
|
1889
|
+
| `attachedExtensionSlotName` | `string` |
|
|
1890
|
+
| `extensionId` | `string` |
|
|
1891
|
+
|
|
1892
|
+
#### Returns
|
|
1893
|
+
|
|
1894
|
+
`Store`<[`ConfigStore`](interfaces/ConfigStore.md)\>
|
|
1895
|
+
|
|
1896
|
+
#### Defined in
|
|
1897
|
+
|
|
1898
|
+
[packages/framework/esm-config/src/module-config/state.ts:172](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/state.ts#L172)
|
|
1899
|
+
|
|
1900
|
+
___
|
|
1901
|
+
|
|
1902
|
+
### getExtensionNameFromId
|
|
1903
|
+
|
|
1904
|
+
▸ **getExtensionNameFromId**(`extensionId`): `string`
|
|
1905
|
+
|
|
1906
|
+
#### Parameters
|
|
1907
|
+
|
|
1908
|
+
| Name | Type |
|
|
1909
|
+
| :------ | :------ |
|
|
1910
|
+
| `extensionId` | `string` |
|
|
1911
|
+
|
|
1912
|
+
#### Returns
|
|
1913
|
+
|
|
1914
|
+
`string`
|
|
1915
|
+
|
|
1916
|
+
#### Defined in
|
|
1917
|
+
|
|
1918
|
+
[packages/framework/esm-extensions/src/extensions.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L29)
|
|
1919
|
+
|
|
1920
|
+
___
|
|
1921
|
+
|
|
1922
|
+
### getExtensionRegistration
|
|
1923
|
+
|
|
1924
|
+
▸ **getExtensionRegistration**(`extensionId`): [`ExtensionRegistration`](interfaces/ExtensionRegistration.md) \| `undefined`
|
|
1925
|
+
|
|
1926
|
+
#### Parameters
|
|
1927
|
+
|
|
1928
|
+
| Name | Type |
|
|
1929
|
+
| :------ | :------ |
|
|
1930
|
+
| `extensionId` | `string` |
|
|
1931
|
+
|
|
1932
|
+
#### Returns
|
|
1933
|
+
|
|
1934
|
+
[`ExtensionRegistration`](interfaces/ExtensionRegistration.md) \| `undefined`
|
|
1935
|
+
|
|
1936
|
+
#### Defined in
|
|
1937
|
+
|
|
1938
|
+
[packages/framework/esm-extensions/src/extensions.ts:42](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L42)
|
|
1939
|
+
|
|
1940
|
+
___
|
|
1941
|
+
|
|
1942
|
+
### getExtensionRegistrationFrom
|
|
1943
|
+
|
|
1944
|
+
▸ **getExtensionRegistrationFrom**(`state`, `extensionId`): [`ExtensionRegistration`](interfaces/ExtensionRegistration.md) \| `undefined`
|
|
1945
|
+
|
|
1946
|
+
#### Parameters
|
|
1947
|
+
|
|
1948
|
+
| Name | Type |
|
|
1949
|
+
| :------ | :------ |
|
|
1950
|
+
| `state` | [`ExtensionStore`](interfaces/ExtensionStore.md) |
|
|
1951
|
+
| `extensionId` | `string` |
|
|
1952
|
+
|
|
1953
|
+
#### Returns
|
|
1954
|
+
|
|
1955
|
+
[`ExtensionRegistration`](interfaces/ExtensionRegistration.md) \| `undefined`
|
|
1956
|
+
|
|
1957
|
+
#### Defined in
|
|
1958
|
+
|
|
1959
|
+
[packages/framework/esm-extensions/src/extensions.ts:34](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L34)
|
|
1960
|
+
|
|
1961
|
+
___
|
|
1962
|
+
|
|
1963
|
+
### getExtensionSlotsConfigStore
|
|
1964
|
+
|
|
1965
|
+
▸ **getExtensionSlotsConfigStore**(`moduleName`): `Store`<[`ExtensionSlotConfigsStore`](interfaces/ExtensionSlotConfigsStore.md)\>
|
|
1966
|
+
|
|
1967
|
+
#### Parameters
|
|
1968
|
+
|
|
1969
|
+
| Name | Type |
|
|
1970
|
+
| :------ | :------ |
|
|
1971
|
+
| `moduleName` | `string` |
|
|
1972
|
+
|
|
1973
|
+
#### Returns
|
|
1974
|
+
|
|
1975
|
+
`Store`<[`ExtensionSlotConfigsStore`](interfaces/ExtensionSlotConfigsStore.md)\>
|
|
1976
|
+
|
|
1977
|
+
#### Defined in
|
|
1978
|
+
|
|
1979
|
+
[packages/framework/esm-config/src/module-config/state.ts:163](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/state.ts#L163)
|
|
1980
|
+
|
|
1981
|
+
___
|
|
1982
|
+
|
|
1983
|
+
### getExtensionSlotsForModule
|
|
1984
|
+
|
|
1985
|
+
▸ **getExtensionSlotsForModule**(`moduleName`): `string`[]
|
|
1986
|
+
|
|
1987
|
+
#### Parameters
|
|
1988
|
+
|
|
1989
|
+
| Name | Type |
|
|
1990
|
+
| :------ | :------ |
|
|
1991
|
+
| `moduleName` | `string` |
|
|
1992
|
+
|
|
1993
|
+
#### Returns
|
|
1994
|
+
|
|
1995
|
+
`string`[]
|
|
1996
|
+
|
|
1997
|
+
#### Defined in
|
|
1998
|
+
|
|
1999
|
+
[packages/framework/esm-extensions/src/extensions.ts:269](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L269)
|
|
2000
|
+
|
|
2001
|
+
___
|
|
2002
|
+
|
|
2003
|
+
### getGlobalStore
|
|
2004
|
+
|
|
2005
|
+
▸ **getGlobalStore**<`TState`\>(`name`, `fallbackState?`): `Store`<`TState`\>
|
|
2006
|
+
|
|
2007
|
+
Returns the existing [store](https://github.com/developit/unistore#store) named `name`,
|
|
2008
|
+
or creates a new store named `name` if none exists.
|
|
2009
|
+
|
|
2010
|
+
#### Type parameters
|
|
2011
|
+
|
|
2012
|
+
| Name | Type |
|
|
2013
|
+
| :------ | :------ |
|
|
2014
|
+
| `TState` | `any` |
|
|
2015
|
+
|
|
2016
|
+
#### Parameters
|
|
2017
|
+
|
|
2018
|
+
| Name | Type | Description |
|
|
2019
|
+
| :------ | :------ | :------ |
|
|
2020
|
+
| `name` | `string` | The name of the store to look up. |
|
|
2021
|
+
| `fallbackState?` | `TState` | The initial value of the new store if no store named `name` exists. |
|
|
2022
|
+
|
|
2023
|
+
#### Returns
|
|
2024
|
+
|
|
2025
|
+
`Store`<`TState`\>
|
|
2026
|
+
|
|
2027
|
+
The found or newly created store.
|
|
2028
|
+
|
|
2029
|
+
#### Defined in
|
|
2030
|
+
|
|
2031
|
+
[packages/framework/esm-state/src/state.ts:55](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-state/src/state.ts#L55)
|
|
2032
|
+
|
|
2033
|
+
___
|
|
2034
|
+
|
|
2035
|
+
### getLifecycle
|
|
2036
|
+
|
|
2037
|
+
▸ **getLifecycle**<`T`\>(`Component`, `options`): `ReactAppOrParcel`<`any`\>
|
|
2038
|
+
|
|
2039
|
+
#### Type parameters
|
|
2040
|
+
|
|
2041
|
+
| Name |
|
|
2042
|
+
| :------ |
|
|
2043
|
+
| `T` |
|
|
2044
|
+
|
|
2045
|
+
#### Parameters
|
|
2046
|
+
|
|
2047
|
+
| Name | Type |
|
|
2048
|
+
| :------ | :------ |
|
|
2049
|
+
| `Component` | `React.ComponentType`<`T`\> |
|
|
2050
|
+
| `options` | [`ComponentDecoratorOptions`](interfaces/ComponentDecoratorOptions.md) |
|
|
2051
|
+
|
|
2052
|
+
#### Returns
|
|
2053
|
+
|
|
2054
|
+
`ReactAppOrParcel`<`any`\>
|
|
2055
|
+
|
|
2056
|
+
#### Defined in
|
|
2057
|
+
|
|
2058
|
+
[packages/framework/esm-react-utils/src/getLifecycle.ts:9](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/getLifecycle.ts#L9)
|
|
2059
|
+
|
|
2060
|
+
___
|
|
2061
|
+
|
|
2062
|
+
### getLocations
|
|
2063
|
+
|
|
2064
|
+
▸ **getLocations**(): `Observable`<[`Location`](interfaces/Location.md)[]\>
|
|
2065
|
+
|
|
2066
|
+
#### Returns
|
|
2067
|
+
|
|
2068
|
+
`Observable`<[`Location`](interfaces/Location.md)[]\>
|
|
2069
|
+
|
|
2070
|
+
#### Defined in
|
|
2071
|
+
|
|
2072
|
+
[packages/framework/esm-api/src/shared-api-objects/location.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/location.ts#L13)
|
|
2073
|
+
|
|
2074
|
+
___
|
|
2075
|
+
|
|
2076
|
+
### getLoggedInUser
|
|
2077
|
+
|
|
2078
|
+
▸ **getLoggedInUser**(): `Promise`<[`LoggedInUser`](interfaces/LoggedInUser.md)\>
|
|
2079
|
+
|
|
2080
|
+
#### Returns
|
|
2081
|
+
|
|
2082
|
+
`Promise`<[`LoggedInUser`](interfaces/LoggedInUser.md)\>
|
|
2083
|
+
|
|
2084
|
+
#### Defined in
|
|
2085
|
+
|
|
2086
|
+
[packages/framework/esm-api/src/shared-api-objects/current-user.ts:134](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-user.ts#L134)
|
|
2087
|
+
|
|
2088
|
+
___
|
|
2089
|
+
|
|
2090
|
+
### getOfflinePatientDataStore
|
|
2091
|
+
|
|
2092
|
+
▸ **getOfflinePatientDataStore**(): `Store`<[`OfflinePatientDataSyncStore`](interfaces/OfflinePatientDataSyncStore.md)\>
|
|
2093
|
+
|
|
2094
|
+
#### Returns
|
|
2095
|
+
|
|
2096
|
+
`Store`<[`OfflinePatientDataSyncStore`](interfaces/OfflinePatientDataSyncStore.md)\>
|
|
2097
|
+
|
|
2098
|
+
#### Defined in
|
|
2099
|
+
|
|
2100
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:85](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L85)
|
|
2101
|
+
|
|
2102
|
+
___
|
|
2103
|
+
|
|
2104
|
+
### getOfflineSynchronizationStore
|
|
2105
|
+
|
|
2106
|
+
▸ **getOfflineSynchronizationStore**(): `Store`<[`OfflineSynchronizationStore`](interfaces/OfflineSynchronizationStore.md)\>
|
|
2107
|
+
|
|
2108
|
+
#### Returns
|
|
2109
|
+
|
|
2110
|
+
`Store`<[`OfflineSynchronizationStore`](interfaces/OfflineSynchronizationStore.md)\>
|
|
2111
|
+
|
|
2112
|
+
#### Defined in
|
|
2113
|
+
|
|
2114
|
+
[packages/framework/esm-offline/src/sync.ts:80](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L80)
|
|
2115
|
+
|
|
2116
|
+
___
|
|
2117
|
+
|
|
2118
|
+
### getOmrsServiceWorker
|
|
2119
|
+
|
|
2120
|
+
▸ **getOmrsServiceWorker**(): `Promise`<`Workbox` \| `undefined`\>
|
|
2121
|
+
|
|
2122
|
+
If a service worker has been registered, returns a promise that resolves to a {@link Workbox}
|
|
2123
|
+
instance which is used by the application to manage that service worker.
|
|
2124
|
+
|
|
2125
|
+
If no service worker has been registered (e.g. when the application is built without offline specific features),
|
|
2126
|
+
returns a promise which immediately resolves to `undefined`.
|
|
2127
|
+
|
|
2128
|
+
#### Returns
|
|
2129
|
+
|
|
2130
|
+
`Promise`<`Workbox` \| `undefined`\>
|
|
2131
|
+
|
|
2132
|
+
A promise which either resolves to `undefined` or to the app's {@link Workbox} instance.
|
|
2133
|
+
|
|
2134
|
+
#### Defined in
|
|
2135
|
+
|
|
2136
|
+
[packages/framework/esm-offline/src/service-worker.ts:42](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker.ts#L42)
|
|
2137
|
+
|
|
2138
|
+
___
|
|
2139
|
+
|
|
2140
|
+
### getSessionLocation
|
|
2141
|
+
|
|
2142
|
+
▸ **getSessionLocation**(): `Promise`<`undefined` \| [`SessionLocation`](interfaces/SessionLocation.md)\>
|
|
2143
|
+
|
|
2144
|
+
#### Returns
|
|
2145
|
+
|
|
2146
|
+
`Promise`<`undefined` \| [`SessionLocation`](interfaces/SessionLocation.md)\>
|
|
2147
|
+
|
|
2148
|
+
#### Defined in
|
|
2149
|
+
|
|
2150
|
+
[packages/framework/esm-api/src/shared-api-objects/current-user.ts:143](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-user.ts#L143)
|
|
2151
|
+
|
|
2152
|
+
___
|
|
2153
|
+
|
|
2154
|
+
### getSyncLifecycle
|
|
2155
|
+
|
|
2156
|
+
▸ **getSyncLifecycle**<`T`\>(`Component`, `options`): () => `Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
2157
|
+
|
|
2158
|
+
#### Type parameters
|
|
2159
|
+
|
|
2160
|
+
| Name |
|
|
2161
|
+
| :------ |
|
|
2162
|
+
| `T` |
|
|
2163
|
+
|
|
2164
|
+
#### Parameters
|
|
2165
|
+
|
|
2166
|
+
| Name | Type |
|
|
2167
|
+
| :------ | :------ |
|
|
2168
|
+
| `Component` | `React.ComponentType`<`T`\> |
|
|
2169
|
+
| `options` | [`ComponentDecoratorOptions`](interfaces/ComponentDecoratorOptions.md) |
|
|
2170
|
+
|
|
2171
|
+
#### Returns
|
|
2172
|
+
|
|
2173
|
+
`fn`
|
|
2174
|
+
|
|
2175
|
+
▸ (): `Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
2176
|
+
|
|
2177
|
+
##### Returns
|
|
2178
|
+
|
|
2179
|
+
`Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
2180
|
+
|
|
2181
|
+
#### Defined in
|
|
2182
|
+
|
|
2183
|
+
[packages/framework/esm-react-utils/src/getLifecycle.ts:28](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/getLifecycle.ts#L28)
|
|
2184
|
+
|
|
2185
|
+
___
|
|
2186
|
+
|
|
2187
|
+
### getSynchronizationItems
|
|
2188
|
+
|
|
2189
|
+
▸ **getSynchronizationItems**<`T`\>(`type`): `Promise`<`T`[]\>
|
|
2190
|
+
|
|
2191
|
+
#### Type parameters
|
|
2192
|
+
|
|
2193
|
+
| Name |
|
|
2194
|
+
| :------ |
|
|
2195
|
+
| `T` |
|
|
2196
|
+
|
|
2197
|
+
#### Parameters
|
|
2198
|
+
|
|
2199
|
+
| Name | Type |
|
|
2200
|
+
| :------ | :------ |
|
|
2201
|
+
| `type` | `string` |
|
|
2202
|
+
|
|
2203
|
+
#### Returns
|
|
2204
|
+
|
|
2205
|
+
`Promise`<`T`[]\>
|
|
2206
|
+
|
|
2207
|
+
#### Defined in
|
|
2208
|
+
|
|
2209
|
+
[packages/framework/esm-offline/src/sync.ts:246](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L246)
|
|
2210
|
+
|
|
2211
|
+
___
|
|
2212
|
+
|
|
2213
|
+
### getSynchronizationItemsFor
|
|
2214
|
+
|
|
2215
|
+
▸ **getSynchronizationItemsFor**<`T`\>(`userId`, `type`): `Promise`<`T`[]\>
|
|
2216
|
+
|
|
2217
|
+
#### Type parameters
|
|
2218
|
+
|
|
2219
|
+
| Name |
|
|
2220
|
+
| :------ |
|
|
2221
|
+
| `T` |
|
|
2222
|
+
|
|
2223
|
+
#### Parameters
|
|
2224
|
+
|
|
2225
|
+
| Name | Type |
|
|
2226
|
+
| :------ | :------ |
|
|
2227
|
+
| `userId` | `string` |
|
|
2228
|
+
| `type` | `string` |
|
|
2229
|
+
|
|
2230
|
+
#### Returns
|
|
2231
|
+
|
|
2232
|
+
`Promise`<`T`[]\>
|
|
2233
|
+
|
|
2234
|
+
#### Defined in
|
|
2235
|
+
|
|
2236
|
+
[packages/framework/esm-offline/src/sync.ts:232](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L232)
|
|
2237
|
+
|
|
2238
|
+
___
|
|
2239
|
+
|
|
2240
|
+
### getUpdatedExtensionSlotInfo
|
|
2241
|
+
|
|
2242
|
+
▸ **getUpdatedExtensionSlotInfo**(`slotName`, `moduleName`, `extensionSlot`): [`ExtensionSlotInfo`](interfaces/ExtensionSlotInfo.md)
|
|
2243
|
+
|
|
2244
|
+
Returns information describing all extensions which can be rendered into an extension slot with
|
|
2245
|
+
the specified name.
|
|
2246
|
+
The returned information describe the extension itself, as well as the extension slot name(s)
|
|
2247
|
+
with which it has been attached.
|
|
2248
|
+
|
|
2249
|
+
#### Parameters
|
|
2250
|
+
|
|
2251
|
+
| Name | Type | Description |
|
|
2252
|
+
| :------ | :------ | :------ |
|
|
2253
|
+
| `slotName` | `string` | The extension slot name for which matching extension info should be returned. |
|
|
2254
|
+
| `moduleName` | `string` | The module name. Used for applying extension-specific config values to the result. |
|
|
2255
|
+
| `extensionSlot` | [`ExtensionSlotInfo`](interfaces/ExtensionSlotInfo.md) | The extension slot information object. |
|
|
2256
|
+
|
|
2257
|
+
#### Returns
|
|
2258
|
+
|
|
2259
|
+
[`ExtensionSlotInfo`](interfaces/ExtensionSlotInfo.md)
|
|
2260
|
+
|
|
2261
|
+
#### Defined in
|
|
2262
|
+
|
|
2263
|
+
[packages/framework/esm-extensions/src/extensions.ts:296](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L296)
|
|
2264
|
+
|
|
2265
|
+
___
|
|
2266
|
+
|
|
2267
|
+
### getVisitTypes
|
|
2268
|
+
|
|
2269
|
+
▸ **getVisitTypes**(): `Observable`<[`VisitType`](interfaces/VisitType.md)[]\>
|
|
2270
|
+
|
|
2271
|
+
#### Returns
|
|
2272
|
+
|
|
2273
|
+
`Observable`<[`VisitType`](interfaces/VisitType.md)[]\>
|
|
2274
|
+
|
|
2275
|
+
#### Defined in
|
|
2276
|
+
|
|
2277
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-type.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-type.ts#L14)
|
|
2278
|
+
|
|
2279
|
+
___
|
|
2280
|
+
|
|
2281
|
+
### getVisitsForPatient
|
|
2282
|
+
|
|
2283
|
+
▸ **getVisitsForPatient**(`patientUuid`, `abortController`, `v?`): `Observable`<[`FetchResponse`](interfaces/FetchResponse.md)<`Object`\>\>
|
|
2284
|
+
|
|
2285
|
+
#### Parameters
|
|
2286
|
+
|
|
2287
|
+
| Name | Type |
|
|
2288
|
+
| :------ | :------ |
|
|
2289
|
+
| `patientUuid` | `string` |
|
|
2290
|
+
| `abortController` | `AbortController` |
|
|
2291
|
+
| `v?` | `string` |
|
|
2292
|
+
|
|
2293
|
+
#### Returns
|
|
2294
|
+
|
|
2295
|
+
`Observable`<[`FetchResponse`](interfaces/FetchResponse.md)<`Object`\>\>
|
|
2296
|
+
|
|
2297
|
+
#### Defined in
|
|
2298
|
+
|
|
2299
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:23](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-utils.ts#L23)
|
|
2300
|
+
|
|
2301
|
+
___
|
|
2302
|
+
|
|
2303
|
+
### handleApiError
|
|
2304
|
+
|
|
2305
|
+
▸ **handleApiError**(): (`incomingResponseErr`: `any`) => `void`
|
|
2306
|
+
|
|
2307
|
+
#### Returns
|
|
2308
|
+
|
|
2309
|
+
`fn`
|
|
2310
|
+
|
|
2311
|
+
▸ (`incomingResponseErr`): `void`
|
|
2312
|
+
|
|
2313
|
+
##### Parameters
|
|
2314
|
+
|
|
2315
|
+
| Name | Type |
|
|
2316
|
+
| :------ | :------ |
|
|
2317
|
+
| `incomingResponseErr` | `any` |
|
|
2318
|
+
|
|
2319
|
+
##### Returns
|
|
2320
|
+
|
|
2321
|
+
`void`
|
|
2322
|
+
|
|
2323
|
+
#### Defined in
|
|
2324
|
+
|
|
2325
|
+
[packages/framework/esm-error-handling/src/index.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-error-handling/src/index.ts#L3)
|
|
2326
|
+
|
|
2327
|
+
___
|
|
2328
|
+
|
|
2329
|
+
### inRange
|
|
2330
|
+
|
|
2331
|
+
▸ `Const` **inRange**(`min`, `max`): [`Validator`](API.md#validator)
|
|
2332
|
+
|
|
2333
|
+
Verifies that the value is between the provided minimum and maximum
|
|
2334
|
+
|
|
2335
|
+
#### Parameters
|
|
2336
|
+
|
|
2337
|
+
| Name | Type | Description |
|
|
2338
|
+
| :------ | :------ | :------ |
|
|
2339
|
+
| `min` | `number` | Minimum acceptable value |
|
|
2340
|
+
| `max` | `number` | Maximum acceptable value |
|
|
2341
|
+
|
|
2342
|
+
#### Returns
|
|
2343
|
+
|
|
2344
|
+
[`Validator`](API.md#validator)
|
|
2345
|
+
|
|
2346
|
+
#### Defined in
|
|
2347
|
+
|
|
2348
|
+
[packages/framework/esm-config/src/validators/validators.ts:9](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/validators/validators.ts#L9)
|
|
2349
|
+
|
|
2350
|
+
___
|
|
2351
|
+
|
|
2352
|
+
### integrateBreakpoints
|
|
2353
|
+
|
|
2354
|
+
▸ **integrateBreakpoints**(): `void`
|
|
2355
|
+
|
|
2356
|
+
#### Returns
|
|
2357
|
+
|
|
2358
|
+
`void`
|
|
2359
|
+
|
|
2360
|
+
#### Defined in
|
|
2361
|
+
|
|
2362
|
+
[packages/framework/esm-styleguide/src/breakpoints/index.ts:20](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/breakpoints/index.ts#L20)
|
|
2363
|
+
|
|
2364
|
+
___
|
|
2365
|
+
|
|
2366
|
+
### isOfflineUuid
|
|
2367
|
+
|
|
2368
|
+
▸ **isOfflineUuid**(`uuid`): `boolean`
|
|
2369
|
+
|
|
2370
|
+
Checks whether the given string has the format of an offline UUID generated by [generateOfflineUuid](API.md#generateofflineuuid)
|
|
2371
|
+
|
|
2372
|
+
#### Parameters
|
|
2373
|
+
|
|
2374
|
+
| Name | Type |
|
|
2375
|
+
| :------ | :------ |
|
|
2376
|
+
| `uuid` | `string` |
|
|
2377
|
+
|
|
2378
|
+
#### Returns
|
|
2379
|
+
|
|
2380
|
+
`boolean`
|
|
2381
|
+
|
|
2382
|
+
#### Defined in
|
|
2383
|
+
|
|
2384
|
+
[packages/framework/esm-offline/src/uuid.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/uuid.ts#L11)
|
|
2385
|
+
|
|
2386
|
+
___
|
|
2387
|
+
|
|
2388
|
+
### isOmrsDateStrict
|
|
2389
|
+
|
|
2390
|
+
▸ **isOmrsDateStrict**(`omrsPayloadString`): `boolean`
|
|
2391
|
+
|
|
2392
|
+
This function is STRICT on checking whether a date string is the openmrs format.
|
|
2393
|
+
The format should be YYYY-MM-DDTHH:mm:ss.SSSZZ
|
|
2394
|
+
|
|
2395
|
+
#### Parameters
|
|
2396
|
+
|
|
2397
|
+
| Name | Type |
|
|
2398
|
+
| :------ | :------ |
|
|
2399
|
+
| `omrsPayloadString` | `string` |
|
|
2400
|
+
|
|
2401
|
+
#### Returns
|
|
2402
|
+
|
|
2403
|
+
`boolean`
|
|
2404
|
+
|
|
2405
|
+
#### Defined in
|
|
2406
|
+
|
|
2407
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L16)
|
|
2408
|
+
|
|
2409
|
+
___
|
|
2410
|
+
|
|
2411
|
+
### isOmrsDateToday
|
|
2412
|
+
|
|
2413
|
+
▸ **isOmrsDateToday**(`date`): `boolean`
|
|
2414
|
+
|
|
2415
|
+
#### Parameters
|
|
2416
|
+
|
|
2417
|
+
| Name | Type | Description |
|
|
2418
|
+
| :------ | :------ | :------ |
|
|
2419
|
+
| `date` | [`DateInput`](API.md#dateinput) | Checks if the provided date is today. |
|
|
2420
|
+
|
|
2421
|
+
#### Returns
|
|
2422
|
+
|
|
2423
|
+
`boolean`
|
|
2424
|
+
|
|
2425
|
+
#### Defined in
|
|
2426
|
+
|
|
2427
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:53](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L53)
|
|
2428
|
+
|
|
2429
|
+
___
|
|
2430
|
+
|
|
2431
|
+
### isSameDay
|
|
2432
|
+
|
|
2433
|
+
▸ **isSameDay**(`firstDate`, `secondDate`): `boolean`
|
|
2434
|
+
|
|
2435
|
+
Checks if two dates are representing the same day.
|
|
2436
|
+
|
|
2437
|
+
#### Parameters
|
|
2438
|
+
|
|
2439
|
+
| Name | Type | Description |
|
|
2440
|
+
| :------ | :------ | :------ |
|
|
2441
|
+
| `firstDate` | `Date` | The first date. |
|
|
2442
|
+
| `secondDate` | `Date` | The second date. |
|
|
2443
|
+
|
|
2444
|
+
#### Returns
|
|
2445
|
+
|
|
2446
|
+
`boolean`
|
|
2447
|
+
|
|
2448
|
+
True if both are located on the same day.
|
|
2449
|
+
|
|
2450
|
+
#### Defined in
|
|
2451
|
+
|
|
2452
|
+
[packages/framework/esm-utils/src/age-helpers.tsx:23](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/age-helpers.tsx#L23)
|
|
2453
|
+
|
|
2454
|
+
___
|
|
2455
|
+
|
|
2456
|
+
### isVersionSatisfied
|
|
2457
|
+
|
|
2458
|
+
▸ **isVersionSatisfied**(`requiredVersion`, `installedVersion`): `boolean`
|
|
2459
|
+
|
|
2460
|
+
#### Parameters
|
|
2461
|
+
|
|
2462
|
+
| Name | Type |
|
|
2463
|
+
| :------ | :------ |
|
|
2464
|
+
| `requiredVersion` | `string` |
|
|
2465
|
+
| `installedVersion` | `string` |
|
|
2466
|
+
|
|
2467
|
+
#### Returns
|
|
2468
|
+
|
|
2469
|
+
`boolean`
|
|
2470
|
+
|
|
2471
|
+
#### Defined in
|
|
2472
|
+
|
|
2473
|
+
[packages/framework/esm-utils/src/version.ts:21](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/version.ts#L21)
|
|
2474
|
+
|
|
2475
|
+
___
|
|
2476
|
+
|
|
2477
|
+
### loadPersistedPatientDataSyncState
|
|
2478
|
+
|
|
2479
|
+
▸ **loadPersistedPatientDataSyncState**(): `Promise`<`void`\>
|
|
2480
|
+
|
|
2481
|
+
#### Returns
|
|
2482
|
+
|
|
2483
|
+
`Promise`<`void`\>
|
|
2484
|
+
|
|
2485
|
+
#### Defined in
|
|
2486
|
+
|
|
2487
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:199](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L199)
|
|
2488
|
+
|
|
2489
|
+
___
|
|
2490
|
+
|
|
2491
|
+
### makeUrl
|
|
2492
|
+
|
|
2493
|
+
▸ **makeUrl**(`path`): `string`
|
|
2494
|
+
|
|
2495
|
+
#### Parameters
|
|
2496
|
+
|
|
2497
|
+
| Name | Type |
|
|
2498
|
+
| :------ | :------ |
|
|
2499
|
+
| `path` | `string` |
|
|
2500
|
+
|
|
2501
|
+
#### Returns
|
|
2502
|
+
|
|
2503
|
+
`string`
|
|
2504
|
+
|
|
2505
|
+
#### Defined in
|
|
2506
|
+
|
|
2507
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:8](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L8)
|
|
2508
|
+
|
|
2509
|
+
___
|
|
2510
|
+
|
|
2511
|
+
### messageOmrsServiceWorker
|
|
2512
|
+
|
|
2513
|
+
▸ **messageOmrsServiceWorker**(`message`): `Promise`<[`MessageServiceWorkerResult`](interfaces/MessageServiceWorkerResult.md)<`any`\>\>
|
|
2514
|
+
|
|
2515
|
+
Sends the specified message to the application's service worker.
|
|
2516
|
+
|
|
2517
|
+
#### Parameters
|
|
2518
|
+
|
|
2519
|
+
| Name | Type | Description |
|
|
2520
|
+
| :------ | :------ | :------ |
|
|
2521
|
+
| `message` | [`KnownOmrsServiceWorkerMessages`](API.md#knownomrsserviceworkermessages) | The message to be sent. |
|
|
2522
|
+
|
|
2523
|
+
#### Returns
|
|
2524
|
+
|
|
2525
|
+
`Promise`<[`MessageServiceWorkerResult`](interfaces/MessageServiceWorkerResult.md)<`any`\>\>
|
|
2526
|
+
|
|
2527
|
+
A promise which completes when the message has been successfully processed by the Service Worker.
|
|
2528
|
+
|
|
2529
|
+
#### Defined in
|
|
2530
|
+
|
|
2531
|
+
[packages/framework/esm-offline/src/service-worker-messaging.ts:9](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-messaging.ts#L9)
|
|
2532
|
+
|
|
2533
|
+
___
|
|
2534
|
+
|
|
2535
|
+
### openVisitsNoteWorkspace
|
|
2536
|
+
|
|
2537
|
+
▸ **openVisitsNoteWorkspace**(`componentName`, `title`): `void`
|
|
2538
|
+
|
|
2539
|
+
#### Parameters
|
|
2540
|
+
|
|
2541
|
+
| Name | Type |
|
|
2542
|
+
| :------ | :------ |
|
|
2543
|
+
| `componentName` | `string` |
|
|
2544
|
+
| `title` | `string` |
|
|
2545
|
+
|
|
2546
|
+
#### Returns
|
|
2547
|
+
|
|
2548
|
+
`void`
|
|
2549
|
+
|
|
2550
|
+
#### Defined in
|
|
2551
|
+
|
|
2552
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-utils.ts#L12)
|
|
2553
|
+
|
|
2554
|
+
___
|
|
2555
|
+
|
|
2556
|
+
### openmrsComponentDecorator
|
|
2557
|
+
|
|
2558
|
+
▸ **openmrsComponentDecorator**(`userOpts`): (`Comp`: `ComponentType`<`Object`\>) => `ComponentType`<`any`\>
|
|
2559
|
+
|
|
2560
|
+
#### Parameters
|
|
2561
|
+
|
|
2562
|
+
| Name | Type |
|
|
2563
|
+
| :------ | :------ |
|
|
2564
|
+
| `userOpts` | [`ComponentDecoratorOptions`](interfaces/ComponentDecoratorOptions.md) |
|
|
2565
|
+
|
|
2566
|
+
#### Returns
|
|
2567
|
+
|
|
2568
|
+
`fn`
|
|
2569
|
+
|
|
2570
|
+
▸ (`Comp`): `ComponentType`<`any`\>
|
|
2571
|
+
|
|
2572
|
+
##### Parameters
|
|
2573
|
+
|
|
2574
|
+
| Name | Type |
|
|
2575
|
+
| :------ | :------ |
|
|
2576
|
+
| `Comp` | `ComponentType`<`Object`\> |
|
|
2577
|
+
|
|
2578
|
+
##### Returns
|
|
2579
|
+
|
|
2580
|
+
`ComponentType`<`any`\>
|
|
2581
|
+
|
|
2582
|
+
#### Defined in
|
|
2583
|
+
|
|
2584
|
+
[packages/framework/esm-react-utils/src/openmrsComponentDecorator.tsx:71](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/openmrsComponentDecorator.tsx#L71)
|
|
2585
|
+
|
|
2586
|
+
___
|
|
2587
|
+
|
|
2588
|
+
### patchXMLHttpRequest
|
|
2589
|
+
|
|
2590
|
+
▸ **patchXMLHttpRequest**(): `void`
|
|
2591
|
+
|
|
2592
|
+
#### Returns
|
|
2593
|
+
|
|
2594
|
+
`void`
|
|
2595
|
+
|
|
2596
|
+
#### Defined in
|
|
2597
|
+
|
|
2598
|
+
[packages/framework/esm-offline/src/patches.ts:1](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/patches.ts#L1)
|
|
2599
|
+
|
|
2600
|
+
___
|
|
2601
|
+
|
|
2602
|
+
### processConfig
|
|
2603
|
+
|
|
2604
|
+
▸ **processConfig**(`schema`, `providedConfig`, `keyPathContext`): [`Config`](interfaces/Config.md)
|
|
2605
|
+
|
|
2606
|
+
Validate and interpolate defaults for `providedConfig` according to `schema`
|
|
2607
|
+
|
|
2608
|
+
#### Parameters
|
|
2609
|
+
|
|
2610
|
+
| Name | Type | Description |
|
|
2611
|
+
| :------ | :------ | :------ |
|
|
2612
|
+
| `schema` | [`ConfigSchema`](interfaces/ConfigSchema.md) | a configuration schema |
|
|
2613
|
+
| `providedConfig` | [`ConfigObject`](interfaces/ConfigObject.md) | an object of config values (without the top-level module name) |
|
|
2614
|
+
| `keyPathContext` | `string` | a dot-deparated string which helps the user figure out where the provided config came from |
|
|
2615
|
+
|
|
2616
|
+
#### Returns
|
|
2617
|
+
|
|
2618
|
+
[`Config`](interfaces/Config.md)
|
|
2619
|
+
|
|
2620
|
+
#### Defined in
|
|
2621
|
+
|
|
2622
|
+
[packages/framework/esm-config/src/module-config/module-config.ts:254](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/module-config.ts#L254)
|
|
2623
|
+
|
|
2624
|
+
___
|
|
2625
|
+
|
|
2626
|
+
### provide
|
|
2627
|
+
|
|
2628
|
+
▸ **provide**(`config`, `sourceName?`): `void`
|
|
2629
|
+
|
|
2630
|
+
#### Parameters
|
|
2631
|
+
|
|
2632
|
+
| Name | Type | Default value |
|
|
2633
|
+
| :------ | :------ | :------ |
|
|
2634
|
+
| `config` | [`Config`](interfaces/Config.md) | `undefined` |
|
|
2635
|
+
| `sourceName` | `string` | `"provided"` |
|
|
2636
|
+
|
|
2637
|
+
#### Returns
|
|
2638
|
+
|
|
2639
|
+
`void`
|
|
2640
|
+
|
|
2641
|
+
#### Defined in
|
|
2642
|
+
|
|
2643
|
+
[packages/framework/esm-config/src/module-config/module-config.ts:211](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/module-config.ts#L211)
|
|
2644
|
+
|
|
2645
|
+
___
|
|
2646
|
+
|
|
2647
|
+
### pushNavigationContext
|
|
2648
|
+
|
|
2649
|
+
▸ **pushNavigationContext**(`_context`): () => `void`
|
|
2650
|
+
|
|
2651
|
+
**`deprecated`** don't use
|
|
2652
|
+
|
|
2653
|
+
#### Parameters
|
|
2654
|
+
|
|
2655
|
+
| Name | Type |
|
|
2656
|
+
| :------ | :------ |
|
|
2657
|
+
| `_context` | [`NavigationContext`](interfaces/NavigationContext.md) |
|
|
2658
|
+
|
|
2659
|
+
#### Returns
|
|
2660
|
+
|
|
2661
|
+
`fn`
|
|
2662
|
+
|
|
2663
|
+
▸ (): `void`
|
|
2664
|
+
|
|
2665
|
+
##### Returns
|
|
2666
|
+
|
|
2667
|
+
`void`
|
|
2668
|
+
|
|
2669
|
+
#### Defined in
|
|
2670
|
+
|
|
2671
|
+
[packages/framework/esm-extensions/src/contexts.ts:24](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/contexts.ts#L24)
|
|
2672
|
+
|
|
2673
|
+
___
|
|
2674
|
+
|
|
2675
|
+
### queueSynchronizationItem
|
|
2676
|
+
|
|
2677
|
+
▸ **queueSynchronizationItem**<`T`\>(`type`, `content`, `descriptor?`): `Promise`<`number`\>
|
|
2678
|
+
|
|
2679
|
+
#### Type parameters
|
|
2680
|
+
|
|
2681
|
+
| Name |
|
|
2682
|
+
| :------ |
|
|
2683
|
+
| `T` |
|
|
2684
|
+
|
|
2685
|
+
#### Parameters
|
|
2686
|
+
|
|
2687
|
+
| Name | Type |
|
|
2688
|
+
| :------ | :------ |
|
|
2689
|
+
| `type` | `string` |
|
|
2690
|
+
| `content` | `T` |
|
|
2691
|
+
| `descriptor?` | [`QueueItemDescriptor`](interfaces/QueueItemDescriptor.md) |
|
|
2692
|
+
|
|
2693
|
+
#### Returns
|
|
2694
|
+
|
|
2695
|
+
`Promise`<`number`\>
|
|
2696
|
+
|
|
2697
|
+
#### Defined in
|
|
2698
|
+
|
|
2699
|
+
[packages/framework/esm-offline/src/sync.ts:223](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L223)
|
|
2700
|
+
|
|
2701
|
+
___
|
|
2702
|
+
|
|
2703
|
+
### queueSynchronizationItemFor
|
|
2704
|
+
|
|
2705
|
+
▸ **queueSynchronizationItemFor**<`T`\>(`userId`, `type`, `content`, `descriptor?`): `Promise`<`number`\>
|
|
2706
|
+
|
|
2707
|
+
#### Type parameters
|
|
2708
|
+
|
|
2709
|
+
| Name |
|
|
2710
|
+
| :------ |
|
|
2711
|
+
| `T` |
|
|
2712
|
+
|
|
2713
|
+
#### Parameters
|
|
2714
|
+
|
|
2715
|
+
| Name | Type |
|
|
2716
|
+
| :------ | :------ |
|
|
2717
|
+
| `userId` | `string` |
|
|
2718
|
+
| `type` | `string` |
|
|
2719
|
+
| `content` | `T` |
|
|
2720
|
+
| `descriptor?` | [`QueueItemDescriptor`](interfaces/QueueItemDescriptor.md) |
|
|
2721
|
+
|
|
2722
|
+
#### Returns
|
|
2723
|
+
|
|
2724
|
+
`Promise`<`number`\>
|
|
2725
|
+
|
|
2726
|
+
#### Defined in
|
|
2727
|
+
|
|
2728
|
+
[packages/framework/esm-offline/src/sync.ts:195](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L195)
|
|
2729
|
+
|
|
2730
|
+
___
|
|
2731
|
+
|
|
2732
|
+
### registerExtension
|
|
2733
|
+
|
|
2734
|
+
▸ `Const` **registerExtension**(`name`, `details`): `void`
|
|
2735
|
+
|
|
2736
|
+
#### Parameters
|
|
2737
|
+
|
|
2738
|
+
| Name | Type |
|
|
2739
|
+
| :------ | :------ |
|
|
2740
|
+
| `name` | `string` |
|
|
2741
|
+
| `details` | [`ExtensionDetails`](interfaces/ExtensionDetails.md) |
|
|
2742
|
+
|
|
2743
|
+
#### Returns
|
|
2744
|
+
|
|
2745
|
+
`void`
|
|
2746
|
+
|
|
2747
|
+
#### Defined in
|
|
2748
|
+
|
|
2749
|
+
[packages/framework/esm-extensions/src/extensions.ts:58](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L58)
|
|
2750
|
+
|
|
2751
|
+
___
|
|
2752
|
+
|
|
2753
|
+
### registerExtensionSlot
|
|
2754
|
+
|
|
2755
|
+
▸ **registerExtensionSlot**(`moduleName`, `slotName`): `void`
|
|
2756
|
+
|
|
2757
|
+
#### Parameters
|
|
2758
|
+
|
|
2759
|
+
| Name | Type | Description |
|
|
2760
|
+
| :------ | :------ | :------ |
|
|
2761
|
+
| `moduleName` | `string` | The name of the module that contains the extension slot |
|
|
2762
|
+
| `slotName` | `string` | The extension slot name that is actually used |
|
|
2763
|
+
|
|
2764
|
+
#### Returns
|
|
2765
|
+
|
|
2766
|
+
`void`
|
|
2767
|
+
|
|
2768
|
+
#### Defined in
|
|
2769
|
+
|
|
2770
|
+
[packages/framework/esm-extensions/src/extensions.ts:222](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L222)
|
|
2771
|
+
|
|
2772
|
+
___
|
|
2773
|
+
|
|
2774
|
+
### registerOfflinePatientHandler
|
|
2775
|
+
|
|
2776
|
+
▸ **registerOfflinePatientHandler**(`identifier`, `handler`): `void`
|
|
2777
|
+
|
|
2778
|
+
Attempts to add the specified patient handler registration to the list of offline patient handlers.
|
|
2779
|
+
|
|
2780
|
+
#### Parameters
|
|
2781
|
+
|
|
2782
|
+
| Name | Type | Description |
|
|
2783
|
+
| :------ | :------ | :------ |
|
|
2784
|
+
| `identifier` | `string` | A key which uniquely identifies the registration. |
|
|
2785
|
+
| `handler` | [`OfflinePatientDataSyncHandler`](interfaces/OfflinePatientDataSyncHandler.md) | The patient handler registration to be registered. |
|
|
2786
|
+
|
|
2787
|
+
#### Returns
|
|
2788
|
+
|
|
2789
|
+
`void`
|
|
2790
|
+
|
|
2791
|
+
`true` if the registration was successfully made; `false` if another registration with
|
|
2792
|
+
the same identifier has already been registered before.
|
|
2793
|
+
|
|
2794
|
+
#### Defined in
|
|
2795
|
+
|
|
2796
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:96](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L96)
|
|
2797
|
+
|
|
2798
|
+
___
|
|
2799
|
+
|
|
2800
|
+
### registerOmrsServiceWorker
|
|
2801
|
+
|
|
2802
|
+
▸ **registerOmrsServiceWorker**(`scriptUrl`, `registerOptions?`): `Promise`<`Workbox`\>
|
|
2803
|
+
|
|
2804
|
+
If not yet registered, registers the application's global Service Worker.
|
|
2805
|
+
Throws if registration is not possible.
|
|
2806
|
+
|
|
2807
|
+
#### Parameters
|
|
2808
|
+
|
|
2809
|
+
| Name | Type |
|
|
2810
|
+
| :------ | :------ |
|
|
2811
|
+
| `scriptUrl` | `string` |
|
|
2812
|
+
| `registerOptions?` | `object` |
|
|
2813
|
+
|
|
2814
|
+
#### Returns
|
|
2815
|
+
|
|
2816
|
+
`Promise`<`Workbox`\>
|
|
2817
|
+
|
|
2818
|
+
A promise which resolves to the registered {@link Workbox} instance which manages the SW.
|
|
2819
|
+
|
|
2820
|
+
#### Defined in
|
|
2821
|
+
|
|
2822
|
+
[packages/framework/esm-offline/src/service-worker.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker.ts#L12)
|
|
2823
|
+
|
|
2824
|
+
___
|
|
2825
|
+
|
|
2826
|
+
### renderExtension
|
|
2827
|
+
|
|
2828
|
+
▸ **renderExtension**(`domElement`, `extensionSlotName`, `extensionSlotModuleName`, `extensionId`, `renderFunction?`, `additionalProps?`): [`CancelLoading`](interfaces/CancelLoading.md)
|
|
2829
|
+
|
|
2830
|
+
Mounts into a DOM node (representing an extension slot)
|
|
2831
|
+
a lazy-loaded component from *any* frontend module
|
|
2832
|
+
that registered an extension component for this slot.
|
|
2833
|
+
|
|
2834
|
+
#### Parameters
|
|
2835
|
+
|
|
2836
|
+
| Name | Type |
|
|
2837
|
+
| :------ | :------ |
|
|
2838
|
+
| `domElement` | `HTMLElement` |
|
|
2839
|
+
| `extensionSlotName` | `string` |
|
|
2840
|
+
| `extensionSlotModuleName` | `string` |
|
|
2841
|
+
| `extensionId` | `string` |
|
|
2842
|
+
| `renderFunction` | (`lifecycle`: [`Lifecycle`](interfaces/Lifecycle.md)) => [`Lifecycle`](interfaces/Lifecycle.md) |
|
|
2843
|
+
| `additionalProps` | `Record`<`string`, `any`\> |
|
|
2844
|
+
|
|
2845
|
+
#### Returns
|
|
2846
|
+
|
|
2847
|
+
[`CancelLoading`](interfaces/CancelLoading.md)
|
|
2848
|
+
|
|
2849
|
+
#### Defined in
|
|
2850
|
+
|
|
2851
|
+
[packages/framework/esm-extensions/src/render.ts:23](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/render.ts#L23)
|
|
2852
|
+
|
|
2853
|
+
___
|
|
2854
|
+
|
|
2855
|
+
### renderInlineNotifications
|
|
2856
|
+
|
|
2857
|
+
▸ **renderInlineNotifications**(`target`): `void`
|
|
2858
|
+
|
|
2859
|
+
Starts a rendering host for inline notifications. Should only be used by the app shell.
|
|
2860
|
+
Under normal conditions there is no need to use this function.
|
|
2861
|
+
|
|
2862
|
+
#### Parameters
|
|
2863
|
+
|
|
2864
|
+
| Name | Type | Description |
|
|
2865
|
+
| :------ | :------ | :------ |
|
|
2866
|
+
| `target` | `HTMLElement` \| ``null`` | The container target that hosts the inline notifications. |
|
|
2867
|
+
|
|
2868
|
+
#### Returns
|
|
2869
|
+
|
|
2870
|
+
`void`
|
|
2871
|
+
|
|
2872
|
+
#### Defined in
|
|
2873
|
+
|
|
2874
|
+
[packages/framework/esm-styleguide/src/notifications/index.tsx:19](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/notifications/index.tsx#L19)
|
|
2875
|
+
|
|
2876
|
+
___
|
|
2877
|
+
|
|
2878
|
+
### renderLoadingSpinner
|
|
2879
|
+
|
|
2880
|
+
▸ **renderLoadingSpinner**(`target`): () => `any`
|
|
2881
|
+
|
|
2882
|
+
#### Parameters
|
|
2883
|
+
|
|
2884
|
+
| Name | Type |
|
|
2885
|
+
| :------ | :------ |
|
|
2886
|
+
| `target` | `HTMLElement` |
|
|
2887
|
+
|
|
2888
|
+
#### Returns
|
|
2889
|
+
|
|
2890
|
+
`fn`
|
|
2891
|
+
|
|
2892
|
+
▸ (): `any`
|
|
2893
|
+
|
|
2894
|
+
##### Returns
|
|
2895
|
+
|
|
2896
|
+
`any`
|
|
2897
|
+
|
|
2898
|
+
#### Defined in
|
|
2899
|
+
|
|
2900
|
+
[packages/framework/esm-styleguide/src/spinner/index.ts:1](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/spinner/index.ts#L1)
|
|
2901
|
+
|
|
2902
|
+
___
|
|
2903
|
+
|
|
2904
|
+
### renderModals
|
|
2905
|
+
|
|
2906
|
+
▸ **renderModals**(`modalContainer`): `void`
|
|
2907
|
+
|
|
2908
|
+
#### Parameters
|
|
2909
|
+
|
|
2910
|
+
| Name | Type |
|
|
2911
|
+
| :------ | :------ |
|
|
2912
|
+
| `modalContainer` | `HTMLElement` \| ``null`` |
|
|
2913
|
+
|
|
2914
|
+
#### Returns
|
|
2915
|
+
|
|
2916
|
+
`void`
|
|
2917
|
+
|
|
2918
|
+
#### Defined in
|
|
2919
|
+
|
|
2920
|
+
[packages/framework/esm-styleguide/src/modals/index.tsx:109](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/modals/index.tsx#L109)
|
|
2921
|
+
|
|
2922
|
+
___
|
|
2923
|
+
|
|
2924
|
+
### renderToasts
|
|
2925
|
+
|
|
2926
|
+
▸ **renderToasts**(`target`): `void`
|
|
2927
|
+
|
|
2928
|
+
Starts a rendering host for toast notifications. Should only be used by the app shell.
|
|
2929
|
+
Under normal conditions there is no need to use this function.
|
|
2930
|
+
|
|
2931
|
+
#### Parameters
|
|
2932
|
+
|
|
2933
|
+
| Name | Type | Description |
|
|
2934
|
+
| :------ | :------ | :------ |
|
|
2935
|
+
| `target` | `HTMLElement` \| ``null`` | The container target that hosts the toast notifications. |
|
|
2936
|
+
|
|
2937
|
+
#### Returns
|
|
2938
|
+
|
|
2939
|
+
`void`
|
|
2940
|
+
|
|
2941
|
+
#### Defined in
|
|
2942
|
+
|
|
2943
|
+
[packages/framework/esm-styleguide/src/toasts/index.tsx:16](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/toasts/index.tsx#L16)
|
|
2944
|
+
|
|
2945
|
+
___
|
|
2946
|
+
|
|
2947
|
+
### reportError
|
|
2948
|
+
|
|
2949
|
+
▸ **reportError**(`err`): `void`
|
|
2950
|
+
|
|
2951
|
+
#### Parameters
|
|
2952
|
+
|
|
2953
|
+
| Name | Type |
|
|
2954
|
+
| :------ | :------ |
|
|
2955
|
+
| `err` | `any` |
|
|
2956
|
+
|
|
2957
|
+
#### Returns
|
|
2958
|
+
|
|
2959
|
+
`void`
|
|
2960
|
+
|
|
2961
|
+
#### Defined in
|
|
2962
|
+
|
|
2963
|
+
[packages/framework/esm-error-handling/src/index.ts:24](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-error-handling/src/index.ts#L24)
|
|
2964
|
+
|
|
2965
|
+
___
|
|
2966
|
+
|
|
2967
|
+
### retry
|
|
2968
|
+
|
|
2969
|
+
▸ **retry**<`T`\>(`fn`, `options?`): `Promise`<`T`\>
|
|
2970
|
+
|
|
2971
|
+
Executes the specified function and retries executing on failure with a custom backoff strategy
|
|
2972
|
+
defined by the options.
|
|
2973
|
+
|
|
2974
|
+
If not configured otherwise, this function uses the following default options:
|
|
2975
|
+
* Retries 5 times beyond the initial attempt.
|
|
2976
|
+
* Uses an exponential backoff starting with an initial delay of 1000ms.
|
|
2977
|
+
|
|
2978
|
+
**`throws`** Rethrows the final error of running `fn` when the function stops retrying.
|
|
2979
|
+
|
|
2980
|
+
#### Type parameters
|
|
2981
|
+
|
|
2982
|
+
| Name |
|
|
2983
|
+
| :------ |
|
|
2984
|
+
| `T` |
|
|
2985
|
+
|
|
2986
|
+
#### Parameters
|
|
2987
|
+
|
|
2988
|
+
| Name | Type | Description |
|
|
2989
|
+
| :------ | :------ | :------ |
|
|
2990
|
+
| `fn` | () => `Promise`<`T`\> | The function to be executed and retried on failure. |
|
|
2991
|
+
| `options` | [`RetryOptions`](interfaces/RetryOptions.md) | Additional options which configure the retry behavior. |
|
|
2992
|
+
|
|
2993
|
+
#### Returns
|
|
2994
|
+
|
|
2995
|
+
`Promise`<`T`\>
|
|
2996
|
+
|
|
2997
|
+
The result of successfully executing `fn`.
|
|
2998
|
+
|
|
2999
|
+
#### Defined in
|
|
3000
|
+
|
|
3001
|
+
[packages/framework/esm-utils/src/retry.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/retry.ts#L38)
|
|
3002
|
+
|
|
3003
|
+
___
|
|
3004
|
+
|
|
3005
|
+
### runSynchronization
|
|
3006
|
+
|
|
3007
|
+
▸ **runSynchronization**(): `Promise`<`void`\>
|
|
3008
|
+
|
|
3009
|
+
#### Returns
|
|
3010
|
+
|
|
3011
|
+
`Promise`<`void`\>
|
|
3012
|
+
|
|
3013
|
+
#### Defined in
|
|
3014
|
+
|
|
3015
|
+
[packages/framework/esm-offline/src/sync.ts:84](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L84)
|
|
3016
|
+
|
|
3017
|
+
___
|
|
3018
|
+
|
|
3019
|
+
### saveVisit
|
|
3020
|
+
|
|
3021
|
+
▸ **saveVisit**(`payload`, `abortController`): `Observable`<[`FetchResponse`](interfaces/FetchResponse.md)<`any`\>\>
|
|
3022
|
+
|
|
3023
|
+
#### Parameters
|
|
3024
|
+
|
|
3025
|
+
| Name | Type |
|
|
3026
|
+
| :------ | :------ |
|
|
3027
|
+
| `payload` | [`NewVisitPayload`](interfaces/NewVisitPayload.md) |
|
|
3028
|
+
| `abortController` | `AbortController` |
|
|
3029
|
+
|
|
3030
|
+
#### Returns
|
|
3031
|
+
|
|
3032
|
+
`Observable`<[`FetchResponse`](interfaces/FetchResponse.md)<`any`\>\>
|
|
3033
|
+
|
|
3034
|
+
#### Defined in
|
|
3035
|
+
|
|
3036
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:55](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-utils.ts#L55)
|
|
3037
|
+
|
|
3038
|
+
___
|
|
3039
|
+
|
|
3040
|
+
### setSessionLocation
|
|
3041
|
+
|
|
3042
|
+
▸ **setSessionLocation**(`locationUuid`, `abortController`): `Promise`<`any`\>
|
|
3043
|
+
|
|
3044
|
+
#### Parameters
|
|
3045
|
+
|
|
3046
|
+
| Name | Type |
|
|
3047
|
+
| :------ | :------ |
|
|
3048
|
+
| `locationUuid` | `string` |
|
|
3049
|
+
| `abortController` | `AbortController` |
|
|
3050
|
+
|
|
3051
|
+
#### Returns
|
|
3052
|
+
|
|
3053
|
+
`Promise`<`any`\>
|
|
3054
|
+
|
|
3055
|
+
#### Defined in
|
|
3056
|
+
|
|
3057
|
+
[packages/framework/esm-api/src/shared-api-objects/current-user.ts:155](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-user.ts#L155)
|
|
3058
|
+
|
|
3059
|
+
___
|
|
3060
|
+
|
|
3061
|
+
### setupOfflineSync
|
|
3062
|
+
|
|
3063
|
+
▸ **setupOfflineSync**<`T`\>(`type`, `dependsOn`, `process`): `void`
|
|
3064
|
+
|
|
3065
|
+
#### Type parameters
|
|
3066
|
+
|
|
3067
|
+
| Name |
|
|
3068
|
+
| :------ |
|
|
3069
|
+
| `T` |
|
|
3070
|
+
|
|
3071
|
+
#### Parameters
|
|
3072
|
+
|
|
3073
|
+
| Name | Type |
|
|
3074
|
+
| :------ | :------ |
|
|
3075
|
+
| `type` | `string` |
|
|
3076
|
+
| `dependsOn` | `string`[] |
|
|
3077
|
+
| `process` | [`ProcessSyncItem`](API.md#processsyncitem)<`T`\> |
|
|
3078
|
+
|
|
3079
|
+
#### Returns
|
|
3080
|
+
|
|
3081
|
+
`void`
|
|
3082
|
+
|
|
3083
|
+
#### Defined in
|
|
3084
|
+
|
|
3085
|
+
[packages/framework/esm-offline/src/sync.ts:263](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L263)
|
|
3086
|
+
|
|
3087
|
+
___
|
|
3088
|
+
|
|
3089
|
+
### setupPaths
|
|
3090
|
+
|
|
3091
|
+
▸ **setupPaths**(`config`): `void`
|
|
3092
|
+
|
|
3093
|
+
#### Parameters
|
|
3094
|
+
|
|
3095
|
+
| Name | Type |
|
|
3096
|
+
| :------ | :------ |
|
|
3097
|
+
| `config` | [`SpaConfig`](interfaces/SpaConfig.md) |
|
|
3098
|
+
|
|
3099
|
+
#### Returns
|
|
3100
|
+
|
|
3101
|
+
`void`
|
|
3102
|
+
|
|
3103
|
+
#### Defined in
|
|
3104
|
+
|
|
3105
|
+
[packages/framework/esm-globals/src/globals.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/globals.ts#L3)
|
|
3106
|
+
|
|
3107
|
+
___
|
|
3108
|
+
|
|
3109
|
+
### setupUtils
|
|
3110
|
+
|
|
3111
|
+
▸ **setupUtils**(): `void`
|
|
3112
|
+
|
|
3113
|
+
#### Returns
|
|
3114
|
+
|
|
3115
|
+
`void`
|
|
3116
|
+
|
|
3117
|
+
#### Defined in
|
|
3118
|
+
|
|
3119
|
+
[packages/framework/esm-globals/src/globals.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/globals.ts#L11)
|
|
3120
|
+
|
|
3121
|
+
___
|
|
3122
|
+
|
|
3123
|
+
### showModal
|
|
3124
|
+
|
|
3125
|
+
▸ **showModal**(`extensionId`, `props?`, `onClose?`): () => `void`
|
|
3126
|
+
|
|
3127
|
+
Shows the provided extension component in a modal dialog.
|
|
3128
|
+
|
|
3129
|
+
#### Parameters
|
|
3130
|
+
|
|
3131
|
+
| Name | Type | Description |
|
|
3132
|
+
| :------ | :------ | :------ |
|
|
3133
|
+
| `extensionId` | `string` | The id of the extension to show. |
|
|
3134
|
+
| `props` | `Record`<`string`, `any`\> | The optional props to provide to the extension. |
|
|
3135
|
+
| `onClose` | () => `void` | The optional notification to receive when the modal is closed. |
|
|
3136
|
+
|
|
3137
|
+
#### Returns
|
|
3138
|
+
|
|
3139
|
+
`fn`
|
|
3140
|
+
|
|
3141
|
+
The dispose function to force closing the modal dialog.
|
|
3142
|
+
|
|
3143
|
+
▸ (): `void`
|
|
3144
|
+
|
|
3145
|
+
##### Returns
|
|
3146
|
+
|
|
3147
|
+
`void`
|
|
3148
|
+
|
|
3149
|
+
#### Defined in
|
|
3150
|
+
|
|
3151
|
+
[packages/framework/esm-styleguide/src/modals/index.tsx:163](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/modals/index.tsx#L163)
|
|
3152
|
+
|
|
3153
|
+
___
|
|
3154
|
+
|
|
3155
|
+
### showNotification
|
|
3156
|
+
|
|
3157
|
+
▸ **showNotification**(`notification`): `void`
|
|
3158
|
+
|
|
3159
|
+
Displays an inline notification in the UI.
|
|
3160
|
+
|
|
3161
|
+
#### Parameters
|
|
3162
|
+
|
|
3163
|
+
| Name | Type | Description |
|
|
3164
|
+
| :------ | :------ | :------ |
|
|
3165
|
+
| `notification` | `NotificationDescriptor` | The description of the notification to display. |
|
|
3166
|
+
|
|
3167
|
+
#### Returns
|
|
3168
|
+
|
|
3169
|
+
`void`
|
|
3170
|
+
|
|
3171
|
+
#### Defined in
|
|
3172
|
+
|
|
3173
|
+
[packages/framework/esm-styleguide/src/notifications/index.tsx:40](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/notifications/index.tsx#L40)
|
|
3174
|
+
|
|
3175
|
+
___
|
|
3176
|
+
|
|
3177
|
+
### showToast
|
|
3178
|
+
|
|
3179
|
+
▸ **showToast**(`toast`): `void`
|
|
3180
|
+
|
|
3181
|
+
Displays a toast notification in the UI.
|
|
3182
|
+
|
|
3183
|
+
#### Parameters
|
|
3184
|
+
|
|
3185
|
+
| Name | Type | Description |
|
|
3186
|
+
| :------ | :------ | :------ |
|
|
3187
|
+
| `toast` | `ToastDescriptor` | The description of the toast to display. |
|
|
3188
|
+
|
|
3189
|
+
#### Returns
|
|
3190
|
+
|
|
3191
|
+
`void`
|
|
3192
|
+
|
|
3193
|
+
#### Defined in
|
|
3194
|
+
|
|
3195
|
+
[packages/framework/esm-styleguide/src/toasts/index.tsx:34](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/toasts/index.tsx#L34)
|
|
3196
|
+
|
|
3197
|
+
___
|
|
3198
|
+
|
|
3199
|
+
### subscribeConnectivity
|
|
3200
|
+
|
|
3201
|
+
▸ **subscribeConnectivity**(`cb`): () => `void`
|
|
3202
|
+
|
|
3203
|
+
#### Parameters
|
|
3204
|
+
|
|
3205
|
+
| Name | Type |
|
|
3206
|
+
| :------ | :------ |
|
|
3207
|
+
| `cb` | (`ev`: [`ConnectivityChangedEvent`](interfaces/ConnectivityChangedEvent.md)) => `void` |
|
|
3208
|
+
|
|
3209
|
+
#### Returns
|
|
3210
|
+
|
|
3211
|
+
`fn`
|
|
3212
|
+
|
|
3213
|
+
▸ (): `void`
|
|
3214
|
+
|
|
3215
|
+
##### Returns
|
|
3216
|
+
|
|
3217
|
+
`void`
|
|
3218
|
+
|
|
3219
|
+
#### Defined in
|
|
3220
|
+
|
|
3221
|
+
[packages/framework/esm-globals/src/events.ts:22](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/events.ts#L22)
|
|
3222
|
+
|
|
3223
|
+
___
|
|
3224
|
+
|
|
3225
|
+
### subscribeConnectivityChanged
|
|
3226
|
+
|
|
3227
|
+
▸ **subscribeConnectivityChanged**(`cb`): () => `void`
|
|
3228
|
+
|
|
3229
|
+
#### Parameters
|
|
3230
|
+
|
|
3231
|
+
| Name | Type |
|
|
3232
|
+
| :------ | :------ |
|
|
3233
|
+
| `cb` | (`ev`: [`ConnectivityChangedEvent`](interfaces/ConnectivityChangedEvent.md)) => `void` |
|
|
3234
|
+
|
|
3235
|
+
#### Returns
|
|
3236
|
+
|
|
3237
|
+
`fn`
|
|
3238
|
+
|
|
3239
|
+
▸ (): `void`
|
|
3240
|
+
|
|
3241
|
+
##### Returns
|
|
3242
|
+
|
|
3243
|
+
`void`
|
|
3244
|
+
|
|
3245
|
+
#### Defined in
|
|
3246
|
+
|
|
3247
|
+
[packages/framework/esm-globals/src/events.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/events.ts#L13)
|
|
3248
|
+
|
|
3249
|
+
___
|
|
3250
|
+
|
|
3251
|
+
### subscribeNetworkRequestFailed
|
|
3252
|
+
|
|
3253
|
+
▸ **subscribeNetworkRequestFailed**(`cb`): () => `void`
|
|
3254
|
+
|
|
3255
|
+
#### Parameters
|
|
3256
|
+
|
|
3257
|
+
| Name | Type |
|
|
3258
|
+
| :------ | :------ |
|
|
3259
|
+
| `cb` | (`data`: [`NetworkRequestFailedEvent`](interfaces/NetworkRequestFailedEvent.md)) => `void` |
|
|
3260
|
+
|
|
3261
|
+
#### Returns
|
|
3262
|
+
|
|
3263
|
+
`fn`
|
|
3264
|
+
|
|
3265
|
+
▸ (): `void`
|
|
3266
|
+
|
|
3267
|
+
##### Returns
|
|
3268
|
+
|
|
3269
|
+
`void`
|
|
3270
|
+
|
|
3271
|
+
#### Defined in
|
|
3272
|
+
|
|
3273
|
+
[packages/framework/esm-offline/src/events.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/events.ts#L11)
|
|
3274
|
+
|
|
3275
|
+
___
|
|
3276
|
+
|
|
3277
|
+
### subscribeNotificationShown
|
|
3278
|
+
|
|
3279
|
+
▸ **subscribeNotificationShown**(`cb`): () => `void`
|
|
3280
|
+
|
|
3281
|
+
#### Parameters
|
|
3282
|
+
|
|
3283
|
+
| Name | Type |
|
|
3284
|
+
| :------ | :------ |
|
|
3285
|
+
| `cb` | (`data`: [`ShowNotificationEvent`](interfaces/ShowNotificationEvent.md)) => `void` |
|
|
3286
|
+
|
|
3287
|
+
#### Returns
|
|
3288
|
+
|
|
3289
|
+
`fn`
|
|
3290
|
+
|
|
3291
|
+
▸ (): `void`
|
|
3292
|
+
|
|
3293
|
+
##### Returns
|
|
3294
|
+
|
|
3295
|
+
`void`
|
|
3296
|
+
|
|
3297
|
+
#### Defined in
|
|
3298
|
+
|
|
3299
|
+
[packages/framework/esm-globals/src/events.ts:87](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/events.ts#L87)
|
|
3300
|
+
|
|
3301
|
+
___
|
|
3302
|
+
|
|
3303
|
+
### subscribePrecacheStaticDependencies
|
|
3304
|
+
|
|
3305
|
+
▸ **subscribePrecacheStaticDependencies**(`cb`): () => `void`
|
|
3306
|
+
|
|
3307
|
+
#### Parameters
|
|
3308
|
+
|
|
3309
|
+
| Name | Type |
|
|
3310
|
+
| :------ | :------ |
|
|
3311
|
+
| `cb` | (`data`: [`PrecacheStaticDependenciesEvent`](interfaces/PrecacheStaticDependenciesEvent.md)) => `void` |
|
|
3312
|
+
|
|
3313
|
+
#### Returns
|
|
3314
|
+
|
|
3315
|
+
`fn`
|
|
3316
|
+
|
|
3317
|
+
▸ (): `void`
|
|
3318
|
+
|
|
3319
|
+
##### Returns
|
|
3320
|
+
|
|
3321
|
+
`void`
|
|
3322
|
+
|
|
3323
|
+
#### Defined in
|
|
3324
|
+
|
|
3325
|
+
[packages/framework/esm-globals/src/events.ts:42](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/events.ts#L42)
|
|
3326
|
+
|
|
3327
|
+
___
|
|
3328
|
+
|
|
3329
|
+
### subscribeTo
|
|
3330
|
+
|
|
3331
|
+
▸ **subscribeTo**<`T`, `U`\>(`store`, `select`, `handle`): `Unsubscribe`
|
|
3332
|
+
|
|
3333
|
+
#### Type parameters
|
|
3334
|
+
|
|
3335
|
+
| Name |
|
|
3336
|
+
| :------ |
|
|
3337
|
+
| `T` |
|
|
3338
|
+
| `U` |
|
|
3339
|
+
|
|
3340
|
+
#### Parameters
|
|
3341
|
+
|
|
3342
|
+
| Name | Type |
|
|
3343
|
+
| :------ | :------ |
|
|
3344
|
+
| `store` | `Store`<`T`\> |
|
|
3345
|
+
| `select` | (`state`: `T`) => `U` |
|
|
3346
|
+
| `handle` | (`subState`: `U`) => `void` |
|
|
3347
|
+
|
|
3348
|
+
#### Returns
|
|
3349
|
+
|
|
3350
|
+
`Unsubscribe`
|
|
3351
|
+
|
|
3352
|
+
#### Defined in
|
|
3353
|
+
|
|
3354
|
+
[packages/framework/esm-state/src/state.ts:89](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-state/src/state.ts#L89)
|
|
3355
|
+
|
|
3356
|
+
___
|
|
3357
|
+
|
|
3358
|
+
### subscribeToastShown
|
|
3359
|
+
|
|
3360
|
+
▸ **subscribeToastShown**(`cb`): () => `void`
|
|
3361
|
+
|
|
3362
|
+
#### Parameters
|
|
3363
|
+
|
|
3364
|
+
| Name | Type |
|
|
3365
|
+
| :------ | :------ |
|
|
3366
|
+
| `cb` | (`data`: [`ShowToastEvent`](interfaces/ShowToastEvent.md)) => `void` |
|
|
3367
|
+
|
|
3368
|
+
#### Returns
|
|
3369
|
+
|
|
3370
|
+
`fn`
|
|
3371
|
+
|
|
3372
|
+
▸ (): `void`
|
|
3373
|
+
|
|
3374
|
+
##### Returns
|
|
3375
|
+
|
|
3376
|
+
`void`
|
|
3377
|
+
|
|
3378
|
+
#### Defined in
|
|
3379
|
+
|
|
3380
|
+
[packages/framework/esm-globals/src/events.ts:95](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/events.ts#L95)
|
|
3381
|
+
|
|
3382
|
+
___
|
|
3383
|
+
|
|
3384
|
+
### switchTo
|
|
3385
|
+
|
|
3386
|
+
▸ **switchTo**<`T`\>(`_type`, `link`, `_state?`): `void`
|
|
3387
|
+
|
|
3388
|
+
**`deprecated`** use `navigate` directly
|
|
3389
|
+
|
|
3390
|
+
#### Type parameters
|
|
3391
|
+
|
|
3392
|
+
| Name |
|
|
3393
|
+
| :------ |
|
|
3394
|
+
| `T` |
|
|
3395
|
+
|
|
3396
|
+
#### Parameters
|
|
3397
|
+
|
|
3398
|
+
| Name | Type |
|
|
3399
|
+
| :------ | :------ |
|
|
3400
|
+
| `_type` | [`NavigationContextType`](API.md#navigationcontexttype) |
|
|
3401
|
+
| `link` | `string` |
|
|
3402
|
+
| `_state?` | `T` |
|
|
3403
|
+
|
|
3404
|
+
#### Returns
|
|
3405
|
+
|
|
3406
|
+
`void`
|
|
3407
|
+
|
|
3408
|
+
#### Defined in
|
|
3409
|
+
|
|
3410
|
+
[packages/framework/esm-extensions/src/contexts.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/contexts.ts#L13)
|
|
3411
|
+
|
|
3412
|
+
___
|
|
3413
|
+
|
|
3414
|
+
### syncOfflinePatientData
|
|
3415
|
+
|
|
3416
|
+
▸ **syncOfflinePatientData**(`patientUuid`): `Promise`<`void`\>
|
|
3417
|
+
|
|
3418
|
+
Notifies all registered offline patient handlers that a new patient must be made available offline.
|
|
3419
|
+
|
|
3420
|
+
#### Parameters
|
|
3421
|
+
|
|
3422
|
+
| Name | Type |
|
|
3423
|
+
| :------ | :------ |
|
|
3424
|
+
| `patientUuid` | `string` |
|
|
3425
|
+
|
|
3426
|
+
#### Returns
|
|
3427
|
+
|
|
3428
|
+
`Promise`<`void`\>
|
|
3429
|
+
|
|
3430
|
+
A promise which resolves once all registered handlers have finished synchronizing.
|
|
3431
|
+
|
|
3432
|
+
#### Defined in
|
|
3433
|
+
|
|
3434
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:111](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L111)
|
|
3435
|
+
|
|
3436
|
+
___
|
|
3437
|
+
|
|
3438
|
+
### toDateObjectStrict
|
|
3439
|
+
|
|
3440
|
+
▸ **toDateObjectStrict**(`omrsDateString`): `Date` \| ``null``
|
|
3441
|
+
|
|
3442
|
+
Converts the object to a date object if it is a valid ISO date time string.
|
|
3443
|
+
|
|
3444
|
+
#### Parameters
|
|
3445
|
+
|
|
3446
|
+
| Name | Type |
|
|
3447
|
+
| :------ | :------ |
|
|
3448
|
+
| `omrsDateString` | `string` |
|
|
3449
|
+
|
|
3450
|
+
#### Returns
|
|
3451
|
+
|
|
3452
|
+
`Date` \| ``null``
|
|
3453
|
+
|
|
3454
|
+
#### Defined in
|
|
3455
|
+
|
|
3456
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:60](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L60)
|
|
3457
|
+
|
|
3458
|
+
___
|
|
3459
|
+
|
|
3460
|
+
### toLocationObject
|
|
3461
|
+
|
|
3462
|
+
▸ **toLocationObject**(`openmrsRestForm`): [`Location`](interfaces/Location.md)
|
|
3463
|
+
|
|
3464
|
+
#### Parameters
|
|
3465
|
+
|
|
3466
|
+
| Name | Type |
|
|
3467
|
+
| :------ | :------ |
|
|
3468
|
+
| `openmrsRestForm` | `any` |
|
|
3469
|
+
|
|
3470
|
+
#### Returns
|
|
3471
|
+
|
|
3472
|
+
[`Location`](interfaces/Location.md)
|
|
3473
|
+
|
|
3474
|
+
#### Defined in
|
|
3475
|
+
|
|
3476
|
+
[packages/framework/esm-api/src/shared-api-objects/location.ts:6](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/location.ts#L6)
|
|
3477
|
+
|
|
3478
|
+
___
|
|
3479
|
+
|
|
3480
|
+
### toOmrsDateFormat
|
|
3481
|
+
|
|
3482
|
+
▸ **toOmrsDateFormat**(`date`, `format?`): `string`
|
|
3483
|
+
|
|
3484
|
+
Formats the input as a date string. By default the format "YYYY-MMM-DD" is used.
|
|
3485
|
+
|
|
3486
|
+
#### Parameters
|
|
3487
|
+
|
|
3488
|
+
| Name | Type | Default value |
|
|
3489
|
+
| :------ | :------ | :------ |
|
|
3490
|
+
| `date` | [`DateInput`](API.md#dateinput) | `undefined` |
|
|
3491
|
+
| `format` | `string` | `"YYYY-MMM-DD"` |
|
|
3492
|
+
|
|
3493
|
+
#### Returns
|
|
3494
|
+
|
|
3495
|
+
`string`
|
|
3496
|
+
|
|
3497
|
+
#### Defined in
|
|
3498
|
+
|
|
3499
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:112](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L112)
|
|
3500
|
+
|
|
3501
|
+
___
|
|
3502
|
+
|
|
3503
|
+
### toOmrsDayDateFormat
|
|
3504
|
+
|
|
3505
|
+
▸ **toOmrsDayDateFormat**(`date`): `string`
|
|
3506
|
+
|
|
3507
|
+
Formats the input as a date string using the format "DD - MMM - YYYY".
|
|
3508
|
+
|
|
3509
|
+
#### Parameters
|
|
3510
|
+
|
|
3511
|
+
| Name | Type |
|
|
3512
|
+
| :------ | :------ |
|
|
3513
|
+
| `date` | [`DateInput`](API.md#dateinput) |
|
|
3514
|
+
|
|
3515
|
+
#### Returns
|
|
3516
|
+
|
|
3517
|
+
`string`
|
|
3518
|
+
|
|
3519
|
+
#### Defined in
|
|
3520
|
+
|
|
3521
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:98](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L98)
|
|
3522
|
+
|
|
3523
|
+
___
|
|
3524
|
+
|
|
3525
|
+
### toOmrsIsoString
|
|
3526
|
+
|
|
3527
|
+
▸ **toOmrsIsoString**(`date`, `toUTC?`): `string`
|
|
3528
|
+
|
|
3529
|
+
Formats the input as a date time string using the format "YYYY-MM-DDTHH:mm:ss.SSSZZ".
|
|
3530
|
+
|
|
3531
|
+
#### Parameters
|
|
3532
|
+
|
|
3533
|
+
| Name | Type | Default value |
|
|
3534
|
+
| :------ | :------ | :------ |
|
|
3535
|
+
| `date` | [`DateInput`](API.md#dateinput) | `undefined` |
|
|
3536
|
+
| `toUTC` | `boolean` | `false` |
|
|
3537
|
+
|
|
3538
|
+
#### Returns
|
|
3539
|
+
|
|
3540
|
+
`string`
|
|
3541
|
+
|
|
3542
|
+
#### Defined in
|
|
3543
|
+
|
|
3544
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:71](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L71)
|
|
3545
|
+
|
|
3546
|
+
___
|
|
3547
|
+
|
|
3548
|
+
### toOmrsTimeString
|
|
3549
|
+
|
|
3550
|
+
▸ **toOmrsTimeString**(`date`): `string`
|
|
3551
|
+
|
|
3552
|
+
Formats the input as a time string using the format "HH:mm A".
|
|
3553
|
+
|
|
3554
|
+
#### Parameters
|
|
3555
|
+
|
|
3556
|
+
| Name | Type |
|
|
3557
|
+
| :------ | :------ |
|
|
3558
|
+
| `date` | [`DateInput`](API.md#dateinput) |
|
|
3559
|
+
|
|
3560
|
+
#### Returns
|
|
3561
|
+
|
|
3562
|
+
`string`
|
|
3563
|
+
|
|
3564
|
+
#### Defined in
|
|
3565
|
+
|
|
3566
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:91](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L91)
|
|
3567
|
+
|
|
3568
|
+
___
|
|
3569
|
+
|
|
3570
|
+
### toOmrsTimeString24
|
|
3571
|
+
|
|
3572
|
+
▸ **toOmrsTimeString24**(`date`): `string`
|
|
3573
|
+
|
|
3574
|
+
Formats the input as a time string using the format "HH:mm".
|
|
3575
|
+
|
|
3576
|
+
#### Parameters
|
|
3577
|
+
|
|
3578
|
+
| Name | Type |
|
|
3579
|
+
| :------ | :------ |
|
|
3580
|
+
| `date` | [`DateInput`](API.md#dateinput) |
|
|
3581
|
+
|
|
3582
|
+
#### Returns
|
|
3583
|
+
|
|
3584
|
+
`string`
|
|
3585
|
+
|
|
3586
|
+
#### Defined in
|
|
3587
|
+
|
|
3588
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:84](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L84)
|
|
3589
|
+
|
|
3590
|
+
___
|
|
3591
|
+
|
|
3592
|
+
### toOmrsYearlessDateFormat
|
|
3593
|
+
|
|
3594
|
+
▸ **toOmrsYearlessDateFormat**(`date`): `string`
|
|
3595
|
+
|
|
3596
|
+
Formats the input as a date string using the format "DD-MMM".
|
|
3597
|
+
|
|
3598
|
+
#### Parameters
|
|
3599
|
+
|
|
3600
|
+
| Name | Type |
|
|
3601
|
+
| :------ | :------ |
|
|
3602
|
+
| `date` | [`DateInput`](API.md#dateinput) |
|
|
3603
|
+
|
|
3604
|
+
#### Returns
|
|
3605
|
+
|
|
3606
|
+
`string`
|
|
3607
|
+
|
|
3608
|
+
#### Defined in
|
|
3609
|
+
|
|
3610
|
+
[packages/framework/esm-utils/src/omrs-dates.ts:105](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L105)
|
|
3611
|
+
|
|
3612
|
+
___
|
|
3613
|
+
|
|
3614
|
+
### toVisitTypeObject
|
|
3615
|
+
|
|
3616
|
+
▸ **toVisitTypeObject**(`openmrsRestForm`): [`VisitType`](interfaces/VisitType.md)
|
|
3617
|
+
|
|
3618
|
+
#### Parameters
|
|
3619
|
+
|
|
3620
|
+
| Name | Type |
|
|
3621
|
+
| :------ | :------ |
|
|
3622
|
+
| `openmrsRestForm` | `any` |
|
|
3623
|
+
|
|
3624
|
+
#### Returns
|
|
3625
|
+
|
|
3626
|
+
[`VisitType`](interfaces/VisitType.md)
|
|
3627
|
+
|
|
3628
|
+
#### Defined in
|
|
3629
|
+
|
|
3630
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-type.ts:6](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-type.ts#L6)
|
|
3631
|
+
|
|
3632
|
+
___
|
|
3633
|
+
|
|
3634
|
+
### translateFrom
|
|
3635
|
+
|
|
3636
|
+
▸ **translateFrom**(`moduleName`, `key`, `fallback?`): `string`
|
|
3637
|
+
|
|
3638
|
+
#### Parameters
|
|
3639
|
+
|
|
3640
|
+
| Name | Type |
|
|
3641
|
+
| :------ | :------ |
|
|
3642
|
+
| `moduleName` | `string` |
|
|
3643
|
+
| `key` | `string` |
|
|
3644
|
+
| `fallback?` | `string` |
|
|
3645
|
+
|
|
3646
|
+
#### Returns
|
|
3647
|
+
|
|
3648
|
+
`string`
|
|
3649
|
+
|
|
3650
|
+
#### Defined in
|
|
3651
|
+
|
|
3652
|
+
[packages/framework/esm-utils/src/translate.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/translate.ts#L3)
|
|
3653
|
+
|
|
3654
|
+
___
|
|
3655
|
+
|
|
3656
|
+
### unregisterExtensionSlot
|
|
3657
|
+
|
|
3658
|
+
▸ **unregisterExtensionSlot**(`moduleName`, `slotName`): `void`
|
|
3659
|
+
|
|
3660
|
+
#### Parameters
|
|
3661
|
+
|
|
3662
|
+
| Name | Type |
|
|
3663
|
+
| :------ | :------ |
|
|
3664
|
+
| `moduleName` | `string` |
|
|
3665
|
+
| `slotName` | `string` |
|
|
3666
|
+
|
|
3667
|
+
#### Returns
|
|
3668
|
+
|
|
3669
|
+
`void`
|
|
3670
|
+
|
|
3671
|
+
#### Defined in
|
|
3672
|
+
|
|
3673
|
+
[packages/framework/esm-extensions/src/extensions.ts:245](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/extensions.ts#L245)
|
|
3674
|
+
|
|
3675
|
+
___
|
|
3676
|
+
|
|
3677
|
+
### update
|
|
3678
|
+
|
|
3679
|
+
▸ **update**<`T`\>(`obj`, `__namedParameters`, `value`): `T`
|
|
3680
|
+
|
|
3681
|
+
#### Type parameters
|
|
3682
|
+
|
|
3683
|
+
| Name | Type |
|
|
3684
|
+
| :------ | :------ |
|
|
3685
|
+
| `T` | extends `Record`<`string`, `any`\> |
|
|
3686
|
+
|
|
3687
|
+
#### Parameters
|
|
3688
|
+
|
|
3689
|
+
| Name | Type |
|
|
3690
|
+
| :------ | :------ |
|
|
3691
|
+
| `obj` | `T` |
|
|
3692
|
+
| `__namedParameters` | `string`[] |
|
|
3693
|
+
| `value` | `any` |
|
|
3694
|
+
|
|
3695
|
+
#### Returns
|
|
3696
|
+
|
|
3697
|
+
`T`
|
|
3698
|
+
|
|
3699
|
+
#### Defined in
|
|
3700
|
+
|
|
3701
|
+
[packages/framework/esm-state/src/update.ts:1](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-state/src/update.ts#L1)
|
|
3702
|
+
|
|
3703
|
+
___
|
|
3704
|
+
|
|
3705
|
+
### updateExtensionStore
|
|
3706
|
+
|
|
3707
|
+
▸ **updateExtensionStore**<`U`\>(`updater`): `void`
|
|
3708
|
+
|
|
3709
|
+
#### Type parameters
|
|
3710
|
+
|
|
3711
|
+
| Name | Type |
|
|
3712
|
+
| :------ | :------ |
|
|
3713
|
+
| `U` | extends keyof [`ExtensionStore`](interfaces/ExtensionStore.md) |
|
|
3714
|
+
|
|
3715
|
+
#### Parameters
|
|
3716
|
+
|
|
3717
|
+
| Name | Type |
|
|
3718
|
+
| :------ | :------ |
|
|
3719
|
+
| `updater` | (`state`: [`ExtensionStore`](interfaces/ExtensionStore.md)) => [`MaybeAsync`](API.md#maybeasync)<`Pick`<[`ExtensionStore`](interfaces/ExtensionStore.md), `U`\>\> |
|
|
3720
|
+
|
|
3721
|
+
#### Returns
|
|
3722
|
+
|
|
3723
|
+
`void`
|
|
3724
|
+
|
|
3725
|
+
#### Defined in
|
|
3726
|
+
|
|
3727
|
+
[packages/framework/esm-extensions/src/store.ts:86](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L86)
|
|
3728
|
+
|
|
3729
|
+
___
|
|
3730
|
+
|
|
3731
|
+
### updateVisit
|
|
3732
|
+
|
|
3733
|
+
▸ **updateVisit**(`uuid`, `payload`, `abortController`): `Observable`<`any`\>
|
|
3734
|
+
|
|
3735
|
+
#### Parameters
|
|
3736
|
+
|
|
3737
|
+
| Name | Type |
|
|
3738
|
+
| :------ | :------ |
|
|
3739
|
+
| `uuid` | `string` |
|
|
3740
|
+
| `payload` | [`UpdateVisitPayload`](API.md#updatevisitpayload) |
|
|
3741
|
+
| `abortController` | `AbortController` |
|
|
3742
|
+
|
|
3743
|
+
#### Returns
|
|
3744
|
+
|
|
3745
|
+
`Observable`<`any`\>
|
|
3746
|
+
|
|
3747
|
+
#### Defined in
|
|
3748
|
+
|
|
3749
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:69](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-utils.ts#L69)
|
|
3750
|
+
|
|
3751
|
+
___
|
|
3752
|
+
|
|
3753
|
+
### useAssignedExtensionIds
|
|
3754
|
+
|
|
3755
|
+
▸ **useAssignedExtensionIds**(`extensionSlotName`): `string`[]
|
|
3756
|
+
|
|
3757
|
+
Gets the assigned extension ids for a given extension slot name.
|
|
3758
|
+
Does not consider if offline or online.
|
|
3759
|
+
|
|
3760
|
+
#### Parameters
|
|
3761
|
+
|
|
3762
|
+
| Name | Type | Description |
|
|
3763
|
+
| :------ | :------ | :------ |
|
|
3764
|
+
| `extensionSlotName` | `string` | The name of the slot to get the assigned IDs for. |
|
|
3765
|
+
|
|
3766
|
+
#### Returns
|
|
3767
|
+
|
|
3768
|
+
`string`[]
|
|
3769
|
+
|
|
3770
|
+
#### Defined in
|
|
3771
|
+
|
|
3772
|
+
[packages/framework/esm-react-utils/src/useAssignedExtensionIds.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useAssignedExtensionIds.ts#L11)
|
|
3773
|
+
|
|
3774
|
+
___
|
|
3775
|
+
|
|
3776
|
+
### useAttachedExtensionIds
|
|
3777
|
+
|
|
3778
|
+
▸ **useAttachedExtensionIds**(`extensionSlotName`): `string`[]
|
|
3779
|
+
|
|
3780
|
+
Gets the assigned extension ids for the given slot.
|
|
3781
|
+
|
|
3782
|
+
#### Parameters
|
|
3783
|
+
|
|
3784
|
+
| Name | Type |
|
|
3785
|
+
| :------ | :------ |
|
|
3786
|
+
| `extensionSlotName` | `string` |
|
|
3787
|
+
|
|
3788
|
+
#### Returns
|
|
3789
|
+
|
|
3790
|
+
`string`[]
|
|
3791
|
+
|
|
3792
|
+
#### Defined in
|
|
3793
|
+
|
|
3794
|
+
[packages/framework/esm-react-utils/src/useAttachedExtensionIds.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useAttachedExtensionIds.ts#L11)
|
|
3795
|
+
|
|
3796
|
+
___
|
|
3797
|
+
|
|
3798
|
+
### useBodyScrollLock
|
|
3799
|
+
|
|
3800
|
+
▸ **useBodyScrollLock**(`active`): `void`
|
|
3801
|
+
|
|
3802
|
+
#### Parameters
|
|
3803
|
+
|
|
3804
|
+
| Name | Type |
|
|
3805
|
+
| :------ | :------ |
|
|
3806
|
+
| `active` | `boolean` |
|
|
3807
|
+
|
|
3808
|
+
#### Returns
|
|
3809
|
+
|
|
3810
|
+
`void`
|
|
3811
|
+
|
|
3812
|
+
#### Defined in
|
|
3813
|
+
|
|
3814
|
+
[packages/framework/esm-react-utils/src/useBodyScrollLock.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useBodyScrollLock.ts#L3)
|
|
3815
|
+
|
|
3816
|
+
___
|
|
3817
|
+
|
|
3818
|
+
### useConfig
|
|
3819
|
+
|
|
3820
|
+
▸ **useConfig**(): `Object`
|
|
3821
|
+
|
|
3822
|
+
Use this React Hook to obtain your module's configuration.
|
|
3823
|
+
|
|
3824
|
+
#### Returns
|
|
3825
|
+
|
|
3826
|
+
`Object`
|
|
3827
|
+
|
|
3828
|
+
| Name | Type | Description |
|
|
3829
|
+
| :------ | :------ | :------ |
|
|
3830
|
+
| `constructor` | `Function` | The initial value of Object.prototype.constructor is the standard built-in Object constructor. |
|
|
3831
|
+
| `hasOwnProperty` | (`v`: `PropertyKey`) => `boolean` | - |
|
|
3832
|
+
| `isPrototypeOf` | (`v`: `Object`) => `boolean` | - |
|
|
3833
|
+
| `propertyIsEnumerable` | (`v`: `PropertyKey`) => `boolean` | - |
|
|
3834
|
+
| `toLocaleString` | () => `string` | - |
|
|
3835
|
+
| `toString` | () => `string` | - |
|
|
3836
|
+
| `valueOf` | () => `Object` | - |
|
|
3837
|
+
|
|
3838
|
+
#### Defined in
|
|
3839
|
+
|
|
3840
|
+
[packages/framework/esm-react-utils/src/useConfig.ts:104](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useConfig.ts#L104)
|
|
3841
|
+
|
|
3842
|
+
___
|
|
3843
|
+
|
|
3844
|
+
### useConnectedExtensions
|
|
3845
|
+
|
|
3846
|
+
▸ **useConnectedExtensions**(`extensionSlotName`): [`ExtensionRegistration`](interfaces/ExtensionRegistration.md)[]
|
|
3847
|
+
|
|
3848
|
+
Gets the assigned extension for a given extension slot name.
|
|
3849
|
+
Considers if offline or online.
|
|
3850
|
+
|
|
3851
|
+
#### Parameters
|
|
3852
|
+
|
|
3853
|
+
| Name | Type | Description |
|
|
3854
|
+
| :------ | :------ | :------ |
|
|
3855
|
+
| `extensionSlotName` | `string` | The name of the slot to get the assigned extensions for. |
|
|
3856
|
+
|
|
3857
|
+
#### Returns
|
|
3858
|
+
|
|
3859
|
+
[`ExtensionRegistration`](interfaces/ExtensionRegistration.md)[]
|
|
3860
|
+
|
|
3861
|
+
#### Defined in
|
|
3862
|
+
|
|
3863
|
+
[packages/framework/esm-react-utils/src/useConnectedExtensions.ts:31](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useConnectedExtensions.ts#L31)
|
|
3864
|
+
|
|
3865
|
+
___
|
|
3866
|
+
|
|
3867
|
+
### useConnectivity
|
|
3868
|
+
|
|
3869
|
+
▸ **useConnectivity**(): `boolean`
|
|
3870
|
+
|
|
3871
|
+
#### Returns
|
|
3872
|
+
|
|
3873
|
+
`boolean`
|
|
3874
|
+
|
|
3875
|
+
#### Defined in
|
|
3876
|
+
|
|
3877
|
+
[packages/framework/esm-react-utils/src/useConnectivity.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useConnectivity.ts#L4)
|
|
3878
|
+
|
|
3879
|
+
___
|
|
3880
|
+
|
|
3881
|
+
### useCurrentPatient
|
|
3882
|
+
|
|
3883
|
+
▸ **useCurrentPatient**(`patientUuid?`): [`boolean`, `NullablePatient`, [`PatientUuid`](API.md#patientuuid), `Error` \| ``null``]
|
|
3884
|
+
|
|
3885
|
+
#### Parameters
|
|
3886
|
+
|
|
3887
|
+
| Name | Type |
|
|
3888
|
+
| :------ | :------ |
|
|
3889
|
+
| `patientUuid` | [`PatientUuid`](API.md#patientuuid) |
|
|
3890
|
+
|
|
3891
|
+
#### Returns
|
|
3892
|
+
|
|
3893
|
+
[`boolean`, `NullablePatient`, [`PatientUuid`](API.md#patientuuid), `Error` \| ``null``]
|
|
3894
|
+
|
|
3895
|
+
#### Defined in
|
|
3896
|
+
|
|
3897
|
+
[packages/framework/esm-react-utils/src/useCurrentPatient.ts:79](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useCurrentPatient.ts#L79)
|
|
3898
|
+
|
|
3899
|
+
___
|
|
3900
|
+
|
|
3901
|
+
### useExtension
|
|
3902
|
+
|
|
3903
|
+
▸ **useExtension**<`TRef`\>(`state?`): [`RefObject`<`TRef`\>, [`ExtensionData`](interfaces/ExtensionData.md) \| `undefined`]
|
|
3904
|
+
|
|
3905
|
+
#### Type parameters
|
|
3906
|
+
|
|
3907
|
+
| Name | Type |
|
|
3908
|
+
| :------ | :------ |
|
|
3909
|
+
| `TRef` | extends `HTMLElement` |
|
|
3910
|
+
|
|
3911
|
+
#### Parameters
|
|
3912
|
+
|
|
3913
|
+
| Name | Type |
|
|
3914
|
+
| :------ | :------ |
|
|
3915
|
+
| `state?` | `Record`<`string`, `any`\> |
|
|
3916
|
+
|
|
3917
|
+
#### Returns
|
|
3918
|
+
|
|
3919
|
+
[`RefObject`<`TRef`\>, [`ExtensionData`](interfaces/ExtensionData.md) \| `undefined`]
|
|
3920
|
+
|
|
3921
|
+
#### Defined in
|
|
3922
|
+
|
|
3923
|
+
[packages/framework/esm-react-utils/src/useExtension.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useExtension.ts#L5)
|
|
3924
|
+
|
|
3925
|
+
___
|
|
3926
|
+
|
|
3927
|
+
### useExtensionSlot
|
|
3928
|
+
|
|
3929
|
+
▸ **useExtensionSlot**(`extensionSlotName`): `Object`
|
|
3930
|
+
|
|
3931
|
+
#### Parameters
|
|
3932
|
+
|
|
3933
|
+
| Name | Type |
|
|
3934
|
+
| :------ | :------ |
|
|
3935
|
+
| `extensionSlotName` | `string` |
|
|
3936
|
+
|
|
3937
|
+
#### Returns
|
|
3938
|
+
|
|
3939
|
+
`Object`
|
|
3940
|
+
|
|
3941
|
+
| Name | Type |
|
|
3942
|
+
| :------ | :------ |
|
|
3943
|
+
| `extensionSlotModuleName` | `string` |
|
|
3944
|
+
| `extensionSlotName` | `string` |
|
|
3945
|
+
| `extensions` | [`ExtensionRegistration`](interfaces/ExtensionRegistration.md)[] |
|
|
3946
|
+
|
|
3947
|
+
#### Defined in
|
|
3948
|
+
|
|
3949
|
+
[packages/framework/esm-react-utils/src/useExtensionSlot.ts:9](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useExtensionSlot.ts#L9)
|
|
3950
|
+
|
|
3951
|
+
___
|
|
3952
|
+
|
|
3953
|
+
### useExtensionSlotConfig
|
|
3954
|
+
|
|
3955
|
+
▸ **useExtensionSlotConfig**(`extensionSlotName`): [`ExtensionSlotConfigObject`](interfaces/ExtensionSlotConfigObject.md)
|
|
3956
|
+
|
|
3957
|
+
#### Parameters
|
|
3958
|
+
|
|
3959
|
+
| Name | Type |
|
|
3960
|
+
| :------ | :------ |
|
|
3961
|
+
| `extensionSlotName` | `string` |
|
|
3962
|
+
|
|
3963
|
+
#### Returns
|
|
3964
|
+
|
|
3965
|
+
[`ExtensionSlotConfigObject`](interfaces/ExtensionSlotConfigObject.md)
|
|
3966
|
+
|
|
3967
|
+
#### Defined in
|
|
3968
|
+
|
|
3969
|
+
[packages/framework/esm-react-utils/src/useExtensionSlotConfig.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useExtensionSlotConfig.ts#L16)
|
|
3970
|
+
|
|
3971
|
+
___
|
|
3972
|
+
|
|
3973
|
+
### useExtensionSlotMeta
|
|
3974
|
+
|
|
3975
|
+
▸ **useExtensionSlotMeta**(`extensionSlotName`): `Object`
|
|
3976
|
+
|
|
3977
|
+
Extract meta data from all extension for a given extension slot.
|
|
3978
|
+
|
|
3979
|
+
#### Parameters
|
|
3980
|
+
|
|
3981
|
+
| Name | Type |
|
|
3982
|
+
| :------ | :------ |
|
|
3983
|
+
| `extensionSlotName` | `string` |
|
|
3984
|
+
|
|
3985
|
+
#### Returns
|
|
3986
|
+
|
|
3987
|
+
`Object`
|
|
3988
|
+
|
|
3989
|
+
#### Defined in
|
|
3990
|
+
|
|
3991
|
+
[packages/framework/esm-react-utils/src/useExtensionSlotMeta.ts:8](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useExtensionSlotMeta.ts#L8)
|
|
3992
|
+
|
|
3993
|
+
___
|
|
3994
|
+
|
|
3995
|
+
### useExtensionStore
|
|
3996
|
+
|
|
3997
|
+
▸ `Const` **useExtensionStore**(): `T`
|
|
3998
|
+
|
|
3999
|
+
#### Returns
|
|
4000
|
+
|
|
4001
|
+
`T`
|
|
4002
|
+
|
|
4003
|
+
#### Defined in
|
|
4004
|
+
|
|
4005
|
+
[packages/framework/esm-react-utils/src/useExtensionStore.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useExtensionStore.ts#L4)
|
|
4006
|
+
|
|
4007
|
+
▸ `Const` **useExtensionStore**(`actions`): `T` & [`BoundActions`](API.md#boundactions)
|
|
4008
|
+
|
|
4009
|
+
#### Parameters
|
|
4010
|
+
|
|
4011
|
+
| Name | Type |
|
|
4012
|
+
| :------ | :------ |
|
|
4013
|
+
| `actions` | [`Actions`](API.md#actions) |
|
|
4014
|
+
|
|
4015
|
+
#### Returns
|
|
4016
|
+
|
|
4017
|
+
`T` & [`BoundActions`](API.md#boundactions)
|
|
4018
|
+
|
|
4019
|
+
#### Defined in
|
|
4020
|
+
|
|
4021
|
+
[packages/framework/esm-react-utils/src/useExtensionStore.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useExtensionStore.ts#L4)
|
|
4022
|
+
|
|
4023
|
+
▸ `Const` **useExtensionStore**(`actions?`): `T` & [`BoundActions`](API.md#boundactions)
|
|
4024
|
+
|
|
4025
|
+
#### Parameters
|
|
4026
|
+
|
|
4027
|
+
| Name | Type |
|
|
4028
|
+
| :------ | :------ |
|
|
4029
|
+
| `actions?` | [`Actions`](API.md#actions) |
|
|
4030
|
+
|
|
4031
|
+
#### Returns
|
|
4032
|
+
|
|
4033
|
+
`T` & [`BoundActions`](API.md#boundactions)
|
|
4034
|
+
|
|
4035
|
+
#### Defined in
|
|
4036
|
+
|
|
4037
|
+
[packages/framework/esm-react-utils/src/useExtensionStore.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useExtensionStore.ts#L4)
|
|
4038
|
+
|
|
4039
|
+
___
|
|
4040
|
+
|
|
4041
|
+
### useForceUpdate
|
|
4042
|
+
|
|
4043
|
+
▸ **useForceUpdate**(): () => `void`
|
|
4044
|
+
|
|
4045
|
+
#### Returns
|
|
4046
|
+
|
|
4047
|
+
`fn`
|
|
4048
|
+
|
|
4049
|
+
▸ (): `void`
|
|
4050
|
+
|
|
4051
|
+
##### Returns
|
|
4052
|
+
|
|
4053
|
+
`void`
|
|
4054
|
+
|
|
4055
|
+
#### Defined in
|
|
4056
|
+
|
|
4057
|
+
[packages/framework/esm-react-utils/src/useForceUpdate.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useForceUpdate.ts#L3)
|
|
4058
|
+
|
|
4059
|
+
___
|
|
4060
|
+
|
|
4061
|
+
### useLayoutType
|
|
4062
|
+
|
|
4063
|
+
▸ **useLayoutType**(): [`LayoutType`](API.md#layouttype)
|
|
4064
|
+
|
|
4065
|
+
#### Returns
|
|
4066
|
+
|
|
4067
|
+
[`LayoutType`](API.md#layouttype)
|
|
4068
|
+
|
|
4069
|
+
#### Defined in
|
|
4070
|
+
|
|
4071
|
+
[packages/framework/esm-react-utils/src/useLayoutType.ts:22](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useLayoutType.ts#L22)
|
|
4072
|
+
|
|
4073
|
+
___
|
|
4074
|
+
|
|
4075
|
+
### useLocations
|
|
4076
|
+
|
|
4077
|
+
▸ **useLocations**(): [`Location`](interfaces/Location.md)[]
|
|
4078
|
+
|
|
4079
|
+
#### Returns
|
|
4080
|
+
|
|
4081
|
+
[`Location`](interfaces/Location.md)[]
|
|
4082
|
+
|
|
4083
|
+
#### Defined in
|
|
4084
|
+
|
|
4085
|
+
[packages/framework/esm-react-utils/src/useLocations.tsx:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useLocations.tsx#L4)
|
|
4086
|
+
|
|
4087
|
+
___
|
|
4088
|
+
|
|
4089
|
+
### useNavigationContext
|
|
4090
|
+
|
|
4091
|
+
▸ **useNavigationContext**(`context`): `void`
|
|
4092
|
+
|
|
4093
|
+
**`deprecated`** Don't use this anymore.
|
|
4094
|
+
|
|
4095
|
+
#### Parameters
|
|
4096
|
+
|
|
4097
|
+
| Name | Type |
|
|
4098
|
+
| :------ | :------ |
|
|
4099
|
+
| `context` | [`NavigationContext`](interfaces/NavigationContext.md) |
|
|
4100
|
+
|
|
4101
|
+
#### Returns
|
|
4102
|
+
|
|
4103
|
+
`void`
|
|
4104
|
+
|
|
4105
|
+
#### Defined in
|
|
4106
|
+
|
|
4107
|
+
[packages/framework/esm-react-utils/src/useNavigationContext.ts:10](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useNavigationContext.ts#L10)
|
|
4108
|
+
|
|
4109
|
+
___
|
|
4110
|
+
|
|
4111
|
+
### useOnClickOutside
|
|
4112
|
+
|
|
4113
|
+
▸ **useOnClickOutside**<`T`\>(`handler`, `active?`): `RefObject`<`T`\>
|
|
4114
|
+
|
|
4115
|
+
#### Type parameters
|
|
4116
|
+
|
|
4117
|
+
| Name | Type |
|
|
4118
|
+
| :------ | :------ |
|
|
4119
|
+
| `T` | extends `HTMLElement``HTMLElement` |
|
|
4120
|
+
|
|
4121
|
+
#### Parameters
|
|
4122
|
+
|
|
4123
|
+
| Name | Type | Default value |
|
|
4124
|
+
| :------ | :------ | :------ |
|
|
4125
|
+
| `handler` | (`event`: `Event`) => `void` | `undefined` |
|
|
4126
|
+
| `active` | `boolean` | `true` |
|
|
4127
|
+
|
|
4128
|
+
#### Returns
|
|
4129
|
+
|
|
4130
|
+
`RefObject`<`T`\>
|
|
4131
|
+
|
|
4132
|
+
#### Defined in
|
|
4133
|
+
|
|
4134
|
+
[packages/framework/esm-react-utils/src/useOnClickOutside.tsx:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useOnClickOutside.tsx#L3)
|
|
4135
|
+
|
|
4136
|
+
___
|
|
4137
|
+
|
|
4138
|
+
### usePagination
|
|
4139
|
+
|
|
4140
|
+
▸ **usePagination**<`T`\>(`data?`, `resultsPerPage?`): `Object`
|
|
4141
|
+
|
|
4142
|
+
#### Type parameters
|
|
4143
|
+
|
|
4144
|
+
| Name |
|
|
4145
|
+
| :------ |
|
|
4146
|
+
| `T` |
|
|
4147
|
+
|
|
4148
|
+
#### Parameters
|
|
4149
|
+
|
|
4150
|
+
| Name | Type | Default value |
|
|
4151
|
+
| :------ | :------ | :------ |
|
|
4152
|
+
| `data` | `T`[] | `[]` |
|
|
4153
|
+
| `resultsPerPage` | `number` | `undefined` |
|
|
4154
|
+
|
|
4155
|
+
#### Returns
|
|
4156
|
+
|
|
4157
|
+
`Object`
|
|
4158
|
+
|
|
4159
|
+
| Name | Type |
|
|
4160
|
+
| :------ | :------ |
|
|
4161
|
+
| `currentPage` | `number` |
|
|
4162
|
+
| `paginated` | `boolean` |
|
|
4163
|
+
| `results` | `T`[] |
|
|
4164
|
+
| `showNextButton` | `boolean` |
|
|
4165
|
+
| `showPreviousButton` | `boolean` |
|
|
4166
|
+
| `totalPages` | `number` |
|
|
4167
|
+
| `goTo` | (`page`: `number`) => `void` |
|
|
4168
|
+
| `goToNext` | () => `void` |
|
|
4169
|
+
| `goToPrevious` | () => `void` |
|
|
4170
|
+
|
|
4171
|
+
#### Defined in
|
|
4172
|
+
|
|
4173
|
+
[packages/framework/esm-react-utils/src/usePagination.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/usePagination.ts#L5)
|
|
4174
|
+
|
|
4175
|
+
___
|
|
4176
|
+
|
|
4177
|
+
### useSessionUser
|
|
4178
|
+
|
|
4179
|
+
▸ **useSessionUser**(): ``null`` \| [`SessionUser`](interfaces/SessionUser.md)
|
|
4180
|
+
|
|
4181
|
+
#### Returns
|
|
4182
|
+
|
|
4183
|
+
``null`` \| [`SessionUser`](interfaces/SessionUser.md)
|
|
4184
|
+
|
|
4185
|
+
#### Defined in
|
|
4186
|
+
|
|
4187
|
+
[packages/framework/esm-react-utils/src/useSessionUser.tsx:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useSessionUser.tsx#L4)
|
|
4188
|
+
|
|
4189
|
+
___
|
|
4190
|
+
|
|
4191
|
+
### useStore
|
|
4192
|
+
|
|
4193
|
+
▸ **useStore**<`T`\>(`store`): `T`
|
|
4194
|
+
|
|
4195
|
+
#### Type parameters
|
|
4196
|
+
|
|
4197
|
+
| Name |
|
|
4198
|
+
| :------ |
|
|
4199
|
+
| `T` |
|
|
4200
|
+
|
|
4201
|
+
#### Parameters
|
|
4202
|
+
|
|
4203
|
+
| Name | Type |
|
|
4204
|
+
| :------ | :------ |
|
|
4205
|
+
| `store` | `Store`<`T`\> |
|
|
4206
|
+
|
|
4207
|
+
#### Returns
|
|
4208
|
+
|
|
4209
|
+
`T`
|
|
4210
|
+
|
|
4211
|
+
#### Defined in
|
|
4212
|
+
|
|
4213
|
+
[packages/framework/esm-react-utils/src/useStore.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useStore.ts#L4)
|
|
4214
|
+
|
|
4215
|
+
▸ **useStore**<`T`\>(`store`, `actions`): `T` & [`BoundActions`](API.md#boundactions)
|
|
4216
|
+
|
|
4217
|
+
#### Type parameters
|
|
4218
|
+
|
|
4219
|
+
| Name |
|
|
4220
|
+
| :------ |
|
|
4221
|
+
| `T` |
|
|
4222
|
+
|
|
4223
|
+
#### Parameters
|
|
4224
|
+
|
|
4225
|
+
| Name | Type |
|
|
4226
|
+
| :------ | :------ |
|
|
4227
|
+
| `store` | `Store`<`T`\> |
|
|
4228
|
+
| `actions` | [`Actions`](API.md#actions) |
|
|
4229
|
+
|
|
4230
|
+
#### Returns
|
|
4231
|
+
|
|
4232
|
+
`T` & [`BoundActions`](API.md#boundactions)
|
|
4233
|
+
|
|
4234
|
+
#### Defined in
|
|
4235
|
+
|
|
4236
|
+
[packages/framework/esm-react-utils/src/useStore.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useStore.ts#L5)
|
|
4237
|
+
|
|
4238
|
+
___
|
|
4239
|
+
|
|
4240
|
+
### useStoreState
|
|
4241
|
+
|
|
4242
|
+
▸ **useStoreState**<`T`, `U`\>(`store`, `select`): `U`
|
|
4243
|
+
|
|
4244
|
+
#### Type parameters
|
|
4245
|
+
|
|
4246
|
+
| Name |
|
|
4247
|
+
| :------ |
|
|
4248
|
+
| `T` |
|
|
4249
|
+
| `U` |
|
|
4250
|
+
|
|
4251
|
+
#### Parameters
|
|
4252
|
+
|
|
4253
|
+
| Name | Type |
|
|
4254
|
+
| :------ | :------ |
|
|
4255
|
+
| `store` | `Store`<`T`\> |
|
|
4256
|
+
| `select` | (`state`: `T`) => `U` |
|
|
4257
|
+
|
|
4258
|
+
#### Returns
|
|
4259
|
+
|
|
4260
|
+
`U`
|
|
4261
|
+
|
|
4262
|
+
#### Defined in
|
|
4263
|
+
|
|
4264
|
+
[packages/framework/esm-react-utils/src/useStoreState.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useStoreState.ts#L5)
|
|
4265
|
+
|
|
4266
|
+
___
|
|
4267
|
+
|
|
4268
|
+
### useVisit
|
|
4269
|
+
|
|
4270
|
+
▸ **useVisit**(`patientUuid`): `Object`
|
|
4271
|
+
|
|
4272
|
+
#### Parameters
|
|
4273
|
+
|
|
4274
|
+
| Name | Type |
|
|
4275
|
+
| :------ | :------ |
|
|
4276
|
+
| `patientUuid` | `string` |
|
|
4277
|
+
|
|
4278
|
+
#### Returns
|
|
4279
|
+
|
|
4280
|
+
`Object`
|
|
4281
|
+
|
|
4282
|
+
| Name | Type |
|
|
4283
|
+
| :------ | :------ |
|
|
4284
|
+
| `currentVisit` | ``null`` \| [`Visit`](interfaces/Visit.md) |
|
|
4285
|
+
| `error` | ``null`` |
|
|
4286
|
+
|
|
4287
|
+
#### Defined in
|
|
4288
|
+
|
|
4289
|
+
[packages/framework/esm-react-utils/src/useVisit.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useVisit.ts#L11)
|
|
4290
|
+
|
|
4291
|
+
___
|
|
4292
|
+
|
|
4293
|
+
### useVisitTypes
|
|
4294
|
+
|
|
4295
|
+
▸ **useVisitTypes**(): [`VisitType`](interfaces/VisitType.md)[]
|
|
4296
|
+
|
|
4297
|
+
#### Returns
|
|
4298
|
+
|
|
4299
|
+
[`VisitType`](interfaces/VisitType.md)[]
|
|
4300
|
+
|
|
4301
|
+
#### Defined in
|
|
4302
|
+
|
|
4303
|
+
[packages/framework/esm-react-utils/src/useVisitTypes.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useVisitTypes.ts#L4)
|
|
4304
|
+
|
|
4305
|
+
___
|
|
4306
|
+
|
|
4307
|
+
### userHasAccess
|
|
4308
|
+
|
|
4309
|
+
▸ **userHasAccess**(`requiredPrivilege`, `user`): `undefined` \| [`Privilege`](interfaces/Privilege.md)
|
|
4310
|
+
|
|
4311
|
+
#### Parameters
|
|
4312
|
+
|
|
4313
|
+
| Name | Type |
|
|
4314
|
+
| :------ | :------ |
|
|
4315
|
+
| `requiredPrivilege` | `string` |
|
|
4316
|
+
| `user` | [`LoggedInUser`](interfaces/LoggedInUser.md) |
|
|
4317
|
+
|
|
4318
|
+
#### Returns
|
|
4319
|
+
|
|
4320
|
+
`undefined` \| [`Privilege`](interfaces/Privilege.md)
|
|
4321
|
+
|
|
4322
|
+
#### Defined in
|
|
4323
|
+
|
|
4324
|
+
[packages/framework/esm-api/src/shared-api-objects/current-user.ts:130](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-user.ts#L130)
|
|
4325
|
+
|
|
4326
|
+
___
|
|
4327
|
+
|
|
4328
|
+
### validator
|
|
4329
|
+
|
|
4330
|
+
▸ **validator**(`validationFunction`, `message`): [`Validator`](API.md#validator)
|
|
4331
|
+
|
|
4332
|
+
#### Parameters
|
|
4333
|
+
|
|
4334
|
+
| Name | Type |
|
|
4335
|
+
| :------ | :------ |
|
|
4336
|
+
| `validationFunction` | [`ValidatorFunction`](API.md#validatorfunction) |
|
|
4337
|
+
| `message` | `string` |
|
|
4338
|
+
|
|
4339
|
+
#### Returns
|
|
4340
|
+
|
|
4341
|
+
[`Validator`](API.md#validator)
|
|
4342
|
+
|
|
4343
|
+
#### Defined in
|
|
4344
|
+
|
|
4345
|
+
[packages/framework/esm-config/src/validators/validator.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/validators/validator.ts#L3)
|
|
4346
|
+
|
|
4347
|
+
___
|
|
4348
|
+
|
|
4349
|
+
## Workspace Functions
|
|
4350
|
+
|
|
4351
|
+
### getNewWorkspaceItem
|
|
4352
|
+
|
|
4353
|
+
▸ **getNewWorkspaceItem**(): `Observable`<[`WorkspaceItem`](interfaces/WorkspaceItem.md)\>
|
|
4354
|
+
|
|
4355
|
+
#### Returns
|
|
4356
|
+
|
|
4357
|
+
`Observable`<[`WorkspaceItem`](interfaces/WorkspaceItem.md)\>
|
|
4358
|
+
|
|
4359
|
+
#### Defined in
|
|
4360
|
+
|
|
4361
|
+
[packages/framework/esm-api/src/workspace/workspace.resource.tsx:19](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/workspace/workspace.resource.tsx#L19)
|
|
4362
|
+
|
|
4363
|
+
___
|
|
4364
|
+
|
|
4365
|
+
### newWorkspaceItem
|
|
4366
|
+
|
|
4367
|
+
▸ **newWorkspaceItem**(`item`): `void`
|
|
4368
|
+
|
|
4369
|
+
#### Parameters
|
|
4370
|
+
|
|
4371
|
+
| Name | Type |
|
|
4372
|
+
| :------ | :------ |
|
|
4373
|
+
| `item` | [`WorkspaceItem`](interfaces/WorkspaceItem.md) |
|
|
4374
|
+
|
|
4375
|
+
#### Returns
|
|
4376
|
+
|
|
4377
|
+
`void`
|
|
4378
|
+
|
|
4379
|
+
#### Defined in
|
|
4380
|
+
|
|
4381
|
+
[packages/framework/esm-api/src/workspace/workspace.resource.tsx:10](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/workspace/workspace.resource.tsx#L10)
|