@openmrs/esm-framework 10.0.1-pre.5539 → 10.0.1-pre.5545

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 (175) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/deprecated.d.ts +63 -0
  3. package/dist/deprecated.d.ts.map +1 -0
  4. package/dist/deprecated.js +65 -0
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/internal.d.ts +1 -1
  9. package/dist/internal.d.ts.map +1 -1
  10. package/dist/internal.js +1 -1
  11. package/docs/API.md +0 -47
  12. package/docs/classes/OpenmrsFetchError.md +4 -4
  13. package/docs/enumerations/VisitMode.md +4 -4
  14. package/docs/enumerations/VisitStatus.md +3 -3
  15. package/docs/functions/attach.md +1 -1
  16. package/docs/functions/clearCurrentUser.md +1 -1
  17. package/docs/functions/createErrorHandler.md +1 -1
  18. package/docs/functions/detach.md +1 -1
  19. package/docs/functions/detachAll.md +1 -1
  20. package/docs/functions/fetchCurrentPatient.md +5 -15
  21. package/docs/functions/getAssignedExtensions.md +1 -1
  22. package/docs/functions/getCoreTranslation.md +1 -1
  23. package/docs/functions/getCurrentUser.md +31 -41
  24. package/docs/functions/getDynamicOfflineDataEntries.md +11 -10
  25. package/docs/functions/getExtensionNameFromId.md +1 -1
  26. package/docs/functions/getExtensionStore.md +1 -1
  27. package/docs/functions/getLocations.md +3 -3
  28. package/docs/functions/getLoggedInUser.md +1 -1
  29. package/docs/functions/getSessionLocation.md +1 -1
  30. package/docs/functions/getSessionStore.md +1 -1
  31. package/docs/functions/getSynchronizationItems.md +11 -9
  32. package/docs/functions/getVisitStore.md +1 -1
  33. package/docs/functions/getVisitTypes.md +15 -8
  34. package/docs/functions/getVisitsForPatient.md +1 -1
  35. package/docs/functions/isVersionSatisfied.md +1 -1
  36. package/docs/functions/makeUrl.md +1 -1
  37. package/docs/functions/messageOmrsServiceWorker.md +13 -11
  38. package/docs/functions/openmrsFetch.md +1 -1
  39. package/docs/functions/refetchCurrentUser.md +4 -4
  40. package/docs/functions/renderExtension.md +1 -1
  41. package/docs/functions/reportError.md +1 -1
  42. package/docs/functions/saveVisit.md +1 -1
  43. package/docs/functions/setCurrentVisit.md +1 -1
  44. package/docs/functions/setSessionLocation.md +1 -1
  45. package/docs/functions/setUserLanguage.md +1 -1
  46. package/docs/functions/setUserProperties.md +1 -1
  47. package/docs/functions/setupDynamicOfflineDataHandler.md +17 -9
  48. package/docs/functions/setupOfflineSync.md +17 -24
  49. package/docs/functions/subscribeActionableNotificationShown.md +1 -1
  50. package/docs/functions/subscribeNotificationShown.md +1 -1
  51. package/docs/functions/subscribePrecacheStaticDependencies.md +11 -4
  52. package/docs/functions/subscribeSnackbarShown.md +1 -1
  53. package/docs/functions/subscribeToastShown.md +1 -1
  54. package/docs/functions/toLocationObject.md +1 -1
  55. package/docs/functions/toVisitTypeObject.md +1 -1
  56. package/docs/functions/updateVisit.md +1 -1
  57. package/docs/functions/useConnectivity.md +6 -16
  58. package/docs/functions/useLocations.md +1 -1
  59. package/docs/functions/useVisitTypes.md +1 -1
  60. package/docs/functions/userHasAccess.md +1 -1
  61. package/docs/interfaces/AssignedExtension.md +8 -24
  62. package/docs/interfaces/CancelLoading.md +2 -2
  63. package/docs/interfaces/ConnectedExtension.md +6 -6
  64. package/docs/interfaces/CurrentPatientOptions.md +2 -2
  65. package/docs/interfaces/DisplayConditionsConfigObject.md +0 -20
  66. package/docs/interfaces/ExtensionRegistration.md +3 -19
  67. package/docs/interfaces/ExtensionSlotConfig.md +5 -5
  68. package/docs/interfaces/ExtensionSlotConfigureValueObject.md +1 -1
  69. package/docs/interfaces/ExtensionSlotProps.md +2 -2
  70. package/docs/interfaces/ExtensionSlotState.md +3 -3
  71. package/docs/interfaces/ExtensionStore.md +2 -2
  72. package/docs/interfaces/FeatureFlagDefinition.md +4 -4
  73. package/docs/interfaces/FetchConfig.md +3 -3
  74. package/docs/interfaces/FetchError.md +3 -3
  75. package/docs/interfaces/FetchHeaders.md +1 -1
  76. package/docs/interfaces/FetchResponseJson.md +1 -1
  77. package/docs/interfaces/ImportMap.md +2 -2
  78. package/docs/interfaces/OnlyThePatient.md +2 -2
  79. package/docs/interfaces/OpenmrsAppRoutes.md +13 -13
  80. package/docs/interfaces/OpenmrsRoutes.md +3 -3
  81. package/docs/interfaces/PatientWithFullResponse.md +2 -2
  82. package/docs/interfaces/ResourceLoader.md +2 -2
  83. package/docs/interfaces/ShowActionableNotificationEvent.md +7 -7
  84. package/docs/interfaces/ShowNotificationEvent.md +6 -6
  85. package/docs/interfaces/ShowSnackbarEvent.md +9 -9
  86. package/docs/interfaces/ShowToastEvent.md +6 -6
  87. package/docs/interfaces/SpaConfig.md +5 -21
  88. package/docs/interfaces/VisitItem.md +5 -5
  89. package/docs/interfaces/VisitStoreState.md +3 -3
  90. package/docs/interfaces/WorkspaceDefinition2.md +5 -5
  91. package/docs/interfaces/WorkspaceGroupDefinition.md +3 -3
  92. package/docs/interfaces/WorkspaceGroupDefinition2.md +6 -6
  93. package/docs/interfaces/WorkspaceWindowDefinition2.md +7 -7
  94. package/docs/type-aliases/ConfigValue.md +1 -1
  95. package/docs/type-aliases/CurrentPatient.md +1 -1
  96. package/docs/type-aliases/ExtensionDefinition.md +10 -30
  97. package/docs/type-aliases/ExtensionSlotCustomState.md +1 -1
  98. package/docs/type-aliases/LoadedSessionStore.md +3 -3
  99. package/docs/type-aliases/ModalDefinition.md +3 -3
  100. package/docs/type-aliases/NameUse.md +1 -1
  101. package/docs/type-aliases/PageDefinition.md +1 -13
  102. package/docs/type-aliases/PatientUuid.md +1 -1
  103. package/docs/type-aliases/ProvidedConfig.md +3 -3
  104. package/docs/type-aliases/SessionStore.md +1 -1
  105. package/docs/type-aliases/SpaEnvironment.md +1 -1
  106. package/docs/type-aliases/UnloadedSessionStore.md +3 -3
  107. package/docs/type-aliases/Validator.md +1 -1
  108. package/docs/type-aliases/ValidatorFunction.md +1 -1
  109. package/docs/type-aliases/WorkspaceDefinition.md +10 -10
  110. package/docs/type-aliases/WorkspaceWindowState.md +1 -1
  111. package/docs/variables/defaultVisitCustomRepresentation.md +1 -1
  112. package/docs/variables/fhirBaseUrl.md +1 -1
  113. package/docs/variables/restBaseUrl.md +1 -1
  114. package/docs/variables/sessionEndpoint.md +1 -1
  115. package/docs/variables/visitTypesUrl.md +9 -0
  116. package/mock-jest.tsx +12 -4
  117. package/mock.tsx +12 -4
  118. package/package.json +19 -21
  119. package/src/deprecated.ts +87 -0
  120. package/src/index.ts +1 -1
  121. package/src/internal.ts +1 -1
  122. package/tsconfig.typedoc.json +0 -2
  123. package/docs/functions/beginEditSynchronizationItem.md +0 -22
  124. package/docs/functions/canBeginEditSynchronizationItemsOfType.md +0 -22
  125. package/docs/functions/deleteSynchronizationItem.md +0 -21
  126. package/docs/functions/generateOfflineUuid.md +0 -13
  127. package/docs/functions/getCurrentOfflineMode.md +0 -11
  128. package/docs/functions/getDynamicOfflineDataEntriesFor.md +0 -34
  129. package/docs/functions/getDynamicOfflineDataHandlers.md +0 -13
  130. package/docs/functions/getFullSynchronizationItems.md +0 -27
  131. package/docs/functions/getFullSynchronizationItemsFor.md +0 -33
  132. package/docs/functions/getOfflinePatientDataStore.md +0 -15
  133. package/docs/functions/getSynchronizationItem.md +0 -27
  134. package/docs/functions/isOfflineUuid.md +0 -19
  135. package/docs/functions/isOnline.md +0 -27
  136. package/docs/functions/openmrsObservableFetch.md +0 -55
  137. package/docs/functions/putDynamicOfflineData.md +0 -28
  138. package/docs/functions/putDynamicOfflineDataFor.md +0 -34
  139. package/docs/functions/queueSynchronizationItem.md +0 -39
  140. package/docs/functions/registerOfflinePatientHandler.md +0 -25
  141. package/docs/functions/removeDynamicOfflineData.md +0 -28
  142. package/docs/functions/removeDynamicOfflineDataFor.md +0 -34
  143. package/docs/functions/subscribeConnectivity.md +0 -21
  144. package/docs/functions/subscribeConnectivityChanged.md +0 -21
  145. package/docs/functions/syncAllDynamicOfflineData.md +0 -27
  146. package/docs/functions/syncDynamicOfflineData.md +0 -33
  147. package/docs/functions/syncOfflinePatientData.md +0 -21
  148. package/docs/interfaces/ClearDynamicRoutesMessage.md +0 -21
  149. package/docs/interfaces/ConnectivityChangedEvent.md +0 -13
  150. package/docs/interfaces/DynamicOfflineData.md +0 -60
  151. package/docs/interfaces/DynamicOfflineDataHandler.md +0 -98
  152. package/docs/interfaces/DynamicOfflineDataSyncState.md +0 -65
  153. package/docs/interfaces/MessageServiceWorkerResult.md +0 -35
  154. package/docs/interfaces/OfflineModeResult.md +0 -29
  155. package/docs/interfaces/OfflinePatientArgs.md +0 -25
  156. package/docs/interfaces/OfflinePatientDataSyncHandler.md +0 -35
  157. package/docs/interfaces/OfflinePatientDataSyncState.md +0 -61
  158. package/docs/interfaces/OfflinePatientDataSyncStore.md +0 -25
  159. package/docs/interfaces/OmrsServiceWorkerMessage.md +0 -25
  160. package/docs/interfaces/OnImportMapChangedMessage.md +0 -29
  161. package/docs/interfaces/PrecacheStaticDependenciesEvent.md +0 -5
  162. package/docs/interfaces/QueueItemDescriptor.md +0 -50
  163. package/docs/interfaces/RegisterDynamicRouteMessage.md +0 -45
  164. package/docs/interfaces/SyncItem.md +0 -79
  165. package/docs/interfaces/SyncProcessOptions.md +0 -53
  166. package/docs/type-aliases/KnownOmrsServiceWorkerMessages.md +0 -7
  167. package/docs/type-aliases/OfflineMode.md +0 -7
  168. package/docs/type-aliases/OmrsOfflineCachingStrategy.md +0 -12
  169. package/docs/type-aliases/OmrsOfflineHttpHeaderNames.md +0 -7
  170. package/docs/type-aliases/OmrsOfflineHttpHeaders.md +0 -44
  171. package/docs/variables/getStartedVisit.md +0 -9
  172. package/docs/variables/offlineUuidPrefix.md +0 -7
  173. package/docs/variables/omrsOfflineCachingStrategyHttpHeaderName.md +0 -7
  174. package/docs/variables/omrsOfflineResponseBodyHttpHeaderName.md +0 -7
  175. package/docs/variables/omrsOfflineResponseStatusHttpHeaderName.md +0 -7
@@ -1,28 +1,29 @@
1
1
  [O3 Framework](../API.md) / getDynamicOfflineDataEntries
2
2
 
3
- # Function: getDynamicOfflineDataEntries()
3
+ # Function: ~~getDynamicOfflineDataEntries()~~
4
4
 
5
- > **getDynamicOfflineDataEntries**\<`T`\>(`type?`): `Promise`\<`T`[]\>
5
+ > **getDynamicOfflineDataEntries**\<`T`\>(`_type?`): `Promise`\<`T`[]\>
6
6
 
7
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:128](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L128)
8
-
9
- Returns all [DynamicOfflineData](../interfaces/DynamicOfflineData.md) entries which registered for the currently logged in user.
10
- Optionally returns only entries of a given type.
7
+ Defined in: [packages/framework/esm-framework/src/deprecated.ts:39](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/src/deprecated.ts#L39)
11
8
 
12
9
  ## Type Parameters
13
10
 
14
11
  ### T
15
12
 
16
- `T` *extends* [`DynamicOfflineData`](../interfaces/DynamicOfflineData.md)
13
+ `T` = `unknown`
17
14
 
18
15
  ## Parameters
19
16
 
20
- ### type?
17
+ ### \_type?
21
18
 
22
19
  `string`
23
20
 
24
- The type of the entries to be returned. If `undefined`, returns all types.
25
-
26
21
  ## Returns
27
22
 
28
23
  `Promise`\<`T`[]\>
24
+
25
+ ## Deprecated
26
+
27
+ Offline support has been removed from the framework. This is a stub kept only so that
28
+ frontend modules that still read the dynamic offline data registry keep working. It always resolves
29
+ to an empty array, since nothing is registered for offline use any more.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **getExtensionNameFromId**(`extensionId`): `string`
6
6
 
7
- Defined in: [packages/framework/esm-extensions/src/extensions.ts:257](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/extensions.ts#L257)
7
+ Defined in: [packages/framework/esm-extensions/src/extensions.ts:251](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/extensions.ts#L251)
8
8
 
9
9
  Given an extension ID, which is a string uniquely identifying
10
10
  an instance of an extension within an extension slot, this
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **getExtensionStore**(): `StoreApi`\<[`ExtensionStore`](../interfaces/ExtensionStore.md)\>
6
6
 
7
- Defined in: [packages/framework/esm-extensions/src/store.ts:236](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L236)
7
+ Defined in: [packages/framework/esm-extensions/src/store.ts:232](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L232)
8
8
 
9
9
  This returns a store that modules can use to get information about the
10
10
  state of the extension system.
@@ -2,9 +2,9 @@
2
2
 
3
3
  # Function: getLocations()
4
4
 
5
- > **getLocations**(`tagUuidOrName`, `query`): `Observable`\<[`Location`](../interfaces/Location.md)[]\>
5
+ > **getLocations**(`tagUuidOrName`, `query`): `Promise`\<[`Location`](../interfaces/Location.md)[]\>
6
6
 
7
- Defined in: [packages/framework/esm-emr-api/src/location.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/location.ts#L14)
7
+ Defined in: [packages/framework/esm-emr-api/src/location.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/location.ts#L12)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -18,4 +18,4 @@ Defined in: [packages/framework/esm-emr-api/src/location.ts:14](https://github.c
18
18
 
19
19
  ## Returns
20
20
 
21
- `Observable`\<[`Location`](../interfaces/Location.md)[]\>
21
+ `Promise`\<[`Location`](../interfaces/Location.md)[]\>
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **getLoggedInUser**(): `Promise`\<[`LoggedInUser`](../interfaces/LoggedInUser.md)\>
6
6
 
7
- Defined in: [packages/framework/esm-api/src/current-user.ts:291](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L291)
7
+ Defined in: [packages/framework/esm-api/src/current-user.ts:318](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L318)
8
8
 
9
9
  Returns a Promise that resolves with the currently logged-in user object.
10
10
  If the user is already loaded in the session store, the Promise resolves immediately.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **getSessionLocation**(): `Promise`\<`undefined` \| [`SessionLocation`](../interfaces/SessionLocation.md)\>
6
6
 
7
- Defined in: [packages/framework/esm-api/src/current-user.ts:329](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L329)
7
+ Defined in: [packages/framework/esm-api/src/current-user.ts:356](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L356)
8
8
 
9
9
  Returns a Promise that resolves with the current session location, if one is set.
10
10
  The session location represents the physical location where the user is currently
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **getSessionStore**(): `StoreApi`\<[`SessionStore`](../type-aliases/SessionStore.md)\>
6
6
 
7
- Defined in: [packages/framework/esm-api/src/current-user.ts:123](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L123)
7
+ Defined in: [packages/framework/esm-api/src/current-user.ts:141](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L141)
8
8
 
9
9
  Returns the global session store containing the current user's session information.
10
10
  If the session data is stale (older than 1 minute) or not yet loaded, this function
@@ -1,27 +1,29 @@
1
1
  [O3 Framework](../API.md) / getSynchronizationItems
2
2
 
3
- # Function: getSynchronizationItems()
3
+ # Function: ~~getSynchronizationItems()~~
4
4
 
5
- > **getSynchronizationItems**\<`T`\>(`type?`): `Promise`\<`T`[]\>
5
+ > **getSynchronizationItems**\<`T`\>(`_type?`): `Promise`\<`T`[]\>
6
6
 
7
- Defined in: [packages/framework/esm-offline/src/sync.ts:293](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L293)
8
-
9
- Returns the content of all currently queued up sync items of the currently signed in user.
7
+ Defined in: [packages/framework/esm-framework/src/deprecated.ts:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/src/deprecated.ts#L48)
10
8
 
11
9
  ## Type Parameters
12
10
 
13
11
  ### T
14
12
 
15
- `T`
13
+ `T` = `unknown`
16
14
 
17
15
  ## Parameters
18
16
 
19
- ### type?
17
+ ### \_type?
20
18
 
21
19
  `string`
22
20
 
23
- The identifying type of the synchronization items to be returned.
24
-
25
21
  ## Returns
26
22
 
27
23
  `Promise`\<`T`[]\>
24
+
25
+ ## Deprecated
26
+
27
+ Offline support has been removed from the framework. This is a stub kept only so that
28
+ frontend modules that still read the sync queue keep working. It always resolves to an empty array,
29
+ since nothing is queued for synchronization any more.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **getVisitStore**(): `StoreApi`\<[`VisitStoreState`](../interfaces/VisitStoreState.md)\>
6
6
 
7
- Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:68](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L68)
7
+ Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:67](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L67)
8
8
 
9
9
  Returns the global visit store that manages the current visit state. The store
10
10
  contains information about the current patient's visit and provides methods
@@ -2,24 +2,31 @@
2
2
 
3
3
  # Function: getVisitTypes()
4
4
 
5
- > **getVisitTypes**(): `Observable`\<[`VisitType`](../interfaces/VisitType.md)[]\>
5
+ > **getVisitTypes**(`url`): `Promise`\<[`VisitType`](../interfaces/VisitType.md)[]\>
6
6
 
7
- Defined in: [packages/framework/esm-emr-api/src/visit-type.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-type.ts#L29)
7
+ Defined in: [packages/framework/esm-emr-api/src/visit-type.ts:30](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-type.ts#L30)
8
8
 
9
9
  Fetches all available visit types from the OpenMRS REST API.
10
10
 
11
+ ## Parameters
12
+
13
+ ### url
14
+
15
+ `string` = `visitTypesUrl`
16
+
17
+ The endpoint to read from, defaulting to [visitTypesUrl](../variables/visitTypesUrl.md). This exists so that the
18
+ function can be passed straight to SWR as a fetcher, which calls it with the cache key.
19
+
11
20
  ## Returns
12
21
 
13
- `Observable`\<[`VisitType`](../interfaces/VisitType.md)[]\>
22
+ `Promise`\<[`VisitType`](../interfaces/VisitType.md)[]\>
14
23
 
15
- An Observable that emits an array of VisitType objects and then completes.
16
- The Observable will emit exactly one value containing all visit types.
24
+ A Promise that resolves with an array of VisitType objects.
17
25
 
18
26
  ## Example
19
27
 
20
28
  ```ts
21
29
  import { getVisitTypes } from '@openmrs/esm-framework';
22
- getVisitTypes().subscribe((visitTypes) => {
23
- console.log('Available visit types:', visitTypes);
24
- });
30
+ const visitTypes = await getVisitTypes();
31
+ console.log('Available visit types:', visitTypes);
25
32
  ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **getVisitsForPatient**(`patientUuid`, `abortController`, `v?`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\<\{ `results`: [`Visit`](../interfaces/Visit.md)[]; \}\>\>
6
6
 
7
- Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:173](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L173)
7
+ Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:172](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L172)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **isVersionSatisfied**(`requiredVersion`, `installedVersion`): `boolean`
6
6
 
7
- Defined in: [packages/framework/esm-utils/src/version.ts:31](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/version.ts#L31)
7
+ Defined in: [packages/framework/esm-utils/src/version.ts:33](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/version.ts#L33)
8
8
 
9
9
  Checks if an installed version satisfies a required version range using
10
10
  semver comparison. Handles prerelease versions and normalizes version strings.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **makeUrl**(`path`): `string`
6
6
 
7
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:30](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L30)
7
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L29)
8
8
 
9
9
  Append `path` to the OpenMRS SPA base.
10
10
 
@@ -1,23 +1,25 @@
1
1
  [O3 Framework](../API.md) / messageOmrsServiceWorker
2
2
 
3
- # Function: messageOmrsServiceWorker()
3
+ # Function: ~~messageOmrsServiceWorker()~~
4
4
 
5
- > **messageOmrsServiceWorker**(`message`): `Promise`\<[`MessageServiceWorkerResult`](../interfaces/MessageServiceWorkerResult.md)\<`any`\>\>
5
+ > **messageOmrsServiceWorker**(`_message`): `Promise`\<\{ `error`: `string`; `result`: `undefined`; `success`: `false`; \}\>
6
6
 
7
- Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L11)
8
-
9
- Sends the specified message to the application's service worker.
7
+ Defined in: [packages/framework/esm-framework/src/deprecated.ts:59](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/src/deprecated.ts#L59)
10
8
 
11
9
  ## Parameters
12
10
 
13
- ### message
14
-
15
- [`KnownOmrsServiceWorkerMessages`](../type-aliases/KnownOmrsServiceWorkerMessages.md)
11
+ ### \_message
16
12
 
17
- The message to be sent.
13
+ `unknown`
18
14
 
19
15
  ## Returns
20
16
 
21
- `Promise`\<[`MessageServiceWorkerResult`](../interfaces/MessageServiceWorkerResult.md)\<`any`\>\>
17
+ `Promise`\<\{ `error`: `string`; `result`: `undefined`; `success`: `false`; \}\>
18
+
19
+ ## Deprecated
22
20
 
23
- A promise which completes when the message has been successfully processed by the Service Worker.
21
+ The offline service worker has been removed from the framework.
22
+ This is a no-op kept only so that frontend modules that still call
23
+ `messageOmrsServiceWorker` don't throw. It always resolves to an
24
+ unsuccessful result, mirroring the previous "no service worker registered"
25
+ behavior.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **openmrsFetch**\<`T`\>(`path`, `fetchInit`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\<`T`\>\>
6
6
 
7
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:90](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L90)
7
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:89](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L89)
8
8
 
9
9
  The openmrsFetch function is a wrapper around the
10
10
  [browser's built-in fetch function](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch),
@@ -4,11 +4,11 @@
4
4
 
5
5
  > **refetchCurrentUser**(`username?`, `password?`): `Promise`\<[`SessionStore`](../type-aliases/SessionStore.md)\>
6
6
 
7
- Defined in: [packages/framework/esm-api/src/current-user.ts:208](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L208)
7
+ Defined in: [packages/framework/esm-api/src/current-user.ts:223](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L223)
8
8
 
9
9
  The `refetchCurrentUser` function causes a network request to redownload
10
- the user. All subscribers to the current user will be notified of the
11
- new users once the new version of the user object is downloaded.
10
+ the user. All subscribers to the session store will be notified of the
11
+ new user once the new version of the user object is downloaded.
12
12
 
13
13
  ## Parameters
14
14
 
@@ -24,7 +24,7 @@ new users once the new version of the user object is downloaded.
24
24
 
25
25
  `Promise`\<[`SessionStore`](../type-aliases/SessionStore.md)\>
26
26
 
27
- The same observable as returned by [getCurrentUser](getCurrentUser.md).
27
+ A Promise resolving to the updated session store state.
28
28
 
29
29
  ## Example
30
30
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **renderExtension**(`domElement`, `extensionSlotName`, `extensionSlotModuleName`, `extensionId`, `renderFunction`, `additionalProps`): `Promise`\<`null` \| `Parcel`\>
6
6
 
7
- Defined in: [packages/framework/esm-extensions/src/render.ts:375](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/render.ts#L375)
7
+ Defined in: [packages/framework/esm-extensions/src/render.ts:374](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/render.ts#L374)
8
8
 
9
9
  Mounts into a DOM node (representing an extension slot)
10
10
  a lazy-loaded component from *any* frontend module
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **reportError**(`err`): `void`
6
6
 
7
- Defined in: [packages/framework/esm-error-handling/src/index.ts:43](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-error-handling/src/index.ts#L43)
7
+ Defined in: [packages/framework/esm-error-handling/src/index.ts:67](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-error-handling/src/index.ts#L67)
8
8
 
9
9
  Reports an error to the global error handler. The error will be displayed
10
10
  to the user as a toast notification. This function ensures the error is
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **saveVisit**(`payload`, `abortController`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\<[`Visit`](../interfaces/Visit.md)\>\>
6
6
 
7
- Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:127](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L127)
7
+ Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:126](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L126)
8
8
 
9
9
  Creates a new visit by sending a POST request to the OpenMRS REST API.
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **setCurrentVisit**(`patientUuid`, `visitUuid`): `void`
6
6
 
7
- Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:88](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L88)
7
+ Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:87](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L87)
8
8
 
9
9
  Sets the current visit for a patient in the global visit store. This is used
10
10
  to manually specify which visit should be considered "active" for the given patient.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **setSessionLocation**(`locationUuid`, `abortController`): `Promise`\<`any`\>
6
6
 
7
- Defined in: [packages/framework/esm-api/src/current-user.ts:355](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L355)
7
+ Defined in: [packages/framework/esm-api/src/current-user.ts:378](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L378)
8
8
 
9
9
  Sets the session location for the current user. The session location represents
10
10
  the physical location where the user is working (e.g., a clinic or ward).
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **setUserLanguage**(`data`): `void`
6
6
 
7
- Defined in: [packages/framework/esm-api/src/current-user.ts:157](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L157)
7
+ Defined in: [packages/framework/esm-api/src/current-user.ts:172](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L172)
8
8
 
9
9
  Sets the document's language attribute based on the user's locale preference
10
10
  from the session data. This affects the HTML `lang` attribute which is used
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **setUserProperties**(`userUuid`, `userProperties`, `abortController?`): `Promise`\<[`SessionStore`](../type-aliases/SessionStore.md)\>
6
6
 
7
- Defined in: [packages/framework/esm-api/src/current-user.ts:391](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L391)
7
+ Defined in: [packages/framework/esm-api/src/current-user.ts:414](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/current-user.ts#L414)
8
8
 
9
9
  Updates the user properties for a specific user. User properties are key-value
10
10
  pairs that store user-specific settings and preferences. After updating the
@@ -1,22 +1,30 @@
1
1
  [O3 Framework](../API.md) / setupDynamicOfflineDataHandler
2
2
 
3
- # Function: setupDynamicOfflineDataHandler()
3
+ # Function: ~~setupDynamicOfflineDataHandler()~~
4
4
 
5
- > **setupDynamicOfflineDataHandler**(`handler`): `void`
5
+ > **setupDynamicOfflineDataHandler**(`_handler`): `void`
6
6
 
7
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:113](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L113)
8
-
9
- Sets up a handler for synchronizing dynamic offline data.
10
- See [DynamicOfflineDataHandler](../interfaces/DynamicOfflineDataHandler.md) for details.
7
+ Defined in: [packages/framework/esm-framework/src/deprecated.ts:30](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/src/deprecated.ts#L30)
11
8
 
12
9
  ## Parameters
13
10
 
14
- ### handler
11
+ ### \_handler
12
+
13
+ #### id
14
+
15
+ `string`
15
16
 
16
- [`DynamicOfflineDataHandler`](../interfaces/DynamicOfflineDataHandler.md)
17
+ #### type
17
18
 
18
- The handler to be setup.
19
+ `string`
19
20
 
20
21
  ## Returns
21
22
 
22
23
  `void`
24
+
25
+ ## Deprecated
26
+
27
+ Offline support has been removed from the framework. This is a
28
+ no-op kept only so that frontend modules that still call
29
+ `setupDynamicOfflineDataHandler` during registration don't throw. Remove your
30
+ dynamic offline data handlers; their data will no longer be cached for offline use.
@@ -1,49 +1,42 @@
1
1
  [O3 Framework](../API.md) / setupOfflineSync
2
2
 
3
- # Function: setupOfflineSync()
3
+ # Function: ~~setupOfflineSync()~~
4
4
 
5
- > **setupOfflineSync**\<`T`\>(`type`, `dependsOn`, `process`, `options`): `void`
5
+ > **setupOfflineSync**\<`T`\>(`_type`, `_dependsOn`, `_process`, `_options?`): `void`
6
6
 
7
- Defined in: [packages/framework/esm-offline/src/sync.ts:365](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L365)
8
-
9
- Registers a new synchronization handler which is able to synchronize data of a specific type.
7
+ Defined in: [packages/framework/esm-framework/src/deprecated.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/src/deprecated.ts#L15)
10
8
 
11
9
  ## Type Parameters
12
10
 
13
11
  ### T
14
12
 
15
- `T`
13
+ `T` = `unknown`
16
14
 
17
15
  ## Parameters
18
16
 
19
- ### type
17
+ ### \_type
20
18
 
21
19
  `string`
22
20
 
23
- The identifying type of the synchronization items which can be handled by this handler.
24
-
25
- ### dependsOn
21
+ ### \_dependsOn
26
22
 
27
23
  `string`[]
28
24
 
29
- An array of other sync item types which must be synchronized before this handler
30
- can synchronize its own data. Items of these types are effectively dependencies of the data
31
- synchronized by this handler.
32
-
33
- ### process
34
-
35
- `ProcessSyncItem`\<`T`\>
25
+ ### \_process
36
26
 
37
- A function which, when invoked, performs the actual client-server synchronization of the given
38
- `item` (which is the actual data to be synchronized).
27
+ (`item`, `options`) => `Promise`\<`unknown`\>
39
28
 
40
- ### options
29
+ ### \_options?
41
30
 
42
- `SetupOfflineSyncOptions`\<`T`\> = `{}`
43
-
44
- Additional options which can optionally be provided when setting up a synchronization callback
45
- for a specific synchronization item type.
31
+ `unknown`
46
32
 
47
33
  ## Returns
48
34
 
49
35
  `void`
36
+
37
+ ## Deprecated
38
+
39
+ Offline support has been removed from the framework. This is a
40
+ no-op kept only so that frontend modules that still call `setupOfflineSync`
41
+ during registration don't throw. Remove your offline sync handlers; queued
42
+ items will no longer be synchronized.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **subscribeActionableNotificationShown**(`cb`): () => `void`
6
6
 
7
- Defined in: [packages/framework/esm-globals/src/events.ts:115](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L115)
7
+ Defined in: [packages/framework/esm-globals/src/events.ts:72](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L72)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **subscribeNotificationShown**(`cb`): () => `void`
6
6
 
7
- Defined in: [packages/framework/esm-globals/src/events.ts:108](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L108)
7
+ Defined in: [packages/framework/esm-globals/src/events.ts:65](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L65)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -1,14 +1,14 @@
1
1
  [O3 Framework](../API.md) / subscribePrecacheStaticDependencies
2
2
 
3
- # Function: subscribePrecacheStaticDependencies()
3
+ # Function: ~~subscribePrecacheStaticDependencies()~~
4
4
 
5
- > **subscribePrecacheStaticDependencies**(`cb`): () => `void`
5
+ > **subscribePrecacheStaticDependencies**(`_callback`): () => `void`
6
6
 
7
- Defined in: [packages/framework/esm-globals/src/events.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L38)
7
+ Defined in: [packages/framework/esm-framework/src/deprecated.ts:75](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/src/deprecated.ts#L75)
8
8
 
9
9
  ## Parameters
10
10
 
11
- ### cb
11
+ ### \_callback
12
12
 
13
13
  (`data`) => `void`
14
14
 
@@ -19,3 +19,10 @@ Defined in: [packages/framework/esm-globals/src/events.ts:38](https://github.com
19
19
  ### Returns
20
20
 
21
21
  `void`
22
+
23
+ ## Deprecated
24
+
25
+ Offline support has been removed from the framework. This is a
26
+ no-op kept only so that frontend modules that still call
27
+ `subscribePrecacheStaticDependencies` don't throw. The callback is never
28
+ invoked. Returns a no-op unsubscribe function so existing teardown code keeps working.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **subscribeSnackbarShown**(`cb`): () => `void`
6
6
 
7
- Defined in: [packages/framework/esm-globals/src/events.ts:129](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L129)
7
+ Defined in: [packages/framework/esm-globals/src/events.ts:86](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L86)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **subscribeToastShown**(`cb`): () => `void`
6
6
 
7
- Defined in: [packages/framework/esm-globals/src/events.ts:122](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L122)
7
+ Defined in: [packages/framework/esm-globals/src/events.ts:79](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L79)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **toLocationObject**(`openmrsRestForm`): [`Location`](../interfaces/Location.md)
6
6
 
7
- Defined in: [packages/framework/esm-emr-api/src/location.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/location.ts#L7)
7
+ Defined in: [packages/framework/esm-emr-api/src/location.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/location.ts#L5)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **toVisitTypeObject**(`openmrsRestForm`): [`VisitType`](../interfaces/VisitType.md)
6
6
 
7
- Defined in: [packages/framework/esm-emr-api/src/visit-type.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-type.ts#L7)
7
+ Defined in: [packages/framework/esm-emr-api/src/visit-type.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-type.ts#L5)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **updateVisit**(`uuid`, `payload`, `abortController`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\<[`Visit`](../interfaces/Visit.md)\>\>
6
6
 
7
- Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:155](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L155)
7
+ Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:154](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L154)
8
8
 
9
9
  Updates an existing visit by sending a POST request to the OpenMRS REST API.
10
10
 
@@ -1,27 +1,17 @@
1
1
  [O3 Framework](../API.md) / useConnectivity
2
2
 
3
- # Function: useConnectivity()
3
+ # Function: ~~useConnectivity()~~
4
4
 
5
5
  > **useConnectivity**(): `boolean`
6
6
 
7
- Defined in: [packages/framework/esm-react-utils/src/useConnectivity.ts:22](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useConnectivity.ts#L22)
8
-
9
- A React hook that returns the current online/offline status and automatically
10
- updates when connectivity changes. Useful for showing offline indicators or
11
- conditionally rendering UI based on network availability.
7
+ Defined in: [packages/framework/esm-framework/src/deprecated.ts:85](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-framework/src/deprecated.ts#L85)
12
8
 
13
9
  ## Returns
14
10
 
15
11
  `boolean`
16
12
 
17
- `true` if the browser is online, `false` if offline.
18
-
19
- ## Example
13
+ ## Deprecated
20
14
 
21
- ```tsx
22
- import { useConnectivity } from '@openmrs/esm-framework';
23
- function NetworkStatus() {
24
- const isOnline = useConnectivity();
25
- return <span>{isOnline ? 'Online' : 'Offline'}</span>;
26
- }
27
- ```
15
+ Offline support has been removed from the framework. This is a
16
+ no-op kept only so that frontend modules that still call
17
+ `useConnectivity` don't throw.