@openmrs/esm-framework 3.2.1-pre.1081 → 3.2.1-pre.1086

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