@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.
- package/.turbo/turbo-build.log +1 -1
- package/dist/deprecated.d.ts +63 -0
- package/dist/deprecated.d.ts.map +1 -0
- package/dist/deprecated.js +65 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -1
- package/docs/API.md +0 -47
- package/docs/classes/OpenmrsFetchError.md +4 -4
- package/docs/enumerations/VisitMode.md +4 -4
- package/docs/enumerations/VisitStatus.md +3 -3
- package/docs/functions/attach.md +1 -1
- package/docs/functions/clearCurrentUser.md +1 -1
- package/docs/functions/createErrorHandler.md +1 -1
- package/docs/functions/detach.md +1 -1
- package/docs/functions/detachAll.md +1 -1
- package/docs/functions/fetchCurrentPatient.md +5 -15
- package/docs/functions/getAssignedExtensions.md +1 -1
- package/docs/functions/getCoreTranslation.md +1 -1
- package/docs/functions/getCurrentUser.md +31 -41
- package/docs/functions/getDynamicOfflineDataEntries.md +11 -10
- package/docs/functions/getExtensionNameFromId.md +1 -1
- package/docs/functions/getExtensionStore.md +1 -1
- package/docs/functions/getLocations.md +3 -3
- package/docs/functions/getLoggedInUser.md +1 -1
- package/docs/functions/getSessionLocation.md +1 -1
- package/docs/functions/getSessionStore.md +1 -1
- package/docs/functions/getSynchronizationItems.md +11 -9
- package/docs/functions/getVisitStore.md +1 -1
- package/docs/functions/getVisitTypes.md +15 -8
- package/docs/functions/getVisitsForPatient.md +1 -1
- package/docs/functions/isVersionSatisfied.md +1 -1
- package/docs/functions/makeUrl.md +1 -1
- package/docs/functions/messageOmrsServiceWorker.md +13 -11
- package/docs/functions/openmrsFetch.md +1 -1
- package/docs/functions/refetchCurrentUser.md +4 -4
- package/docs/functions/renderExtension.md +1 -1
- package/docs/functions/reportError.md +1 -1
- package/docs/functions/saveVisit.md +1 -1
- package/docs/functions/setCurrentVisit.md +1 -1
- package/docs/functions/setSessionLocation.md +1 -1
- package/docs/functions/setUserLanguage.md +1 -1
- package/docs/functions/setUserProperties.md +1 -1
- package/docs/functions/setupDynamicOfflineDataHandler.md +17 -9
- package/docs/functions/setupOfflineSync.md +17 -24
- package/docs/functions/subscribeActionableNotificationShown.md +1 -1
- package/docs/functions/subscribeNotificationShown.md +1 -1
- package/docs/functions/subscribePrecacheStaticDependencies.md +11 -4
- package/docs/functions/subscribeSnackbarShown.md +1 -1
- package/docs/functions/subscribeToastShown.md +1 -1
- package/docs/functions/toLocationObject.md +1 -1
- package/docs/functions/toVisitTypeObject.md +1 -1
- package/docs/functions/updateVisit.md +1 -1
- package/docs/functions/useConnectivity.md +6 -16
- package/docs/functions/useLocations.md +1 -1
- package/docs/functions/useVisitTypes.md +1 -1
- package/docs/functions/userHasAccess.md +1 -1
- package/docs/interfaces/AssignedExtension.md +8 -24
- package/docs/interfaces/CancelLoading.md +2 -2
- package/docs/interfaces/ConnectedExtension.md +6 -6
- package/docs/interfaces/CurrentPatientOptions.md +2 -2
- package/docs/interfaces/DisplayConditionsConfigObject.md +0 -20
- package/docs/interfaces/ExtensionRegistration.md +3 -19
- package/docs/interfaces/ExtensionSlotConfig.md +5 -5
- package/docs/interfaces/ExtensionSlotConfigureValueObject.md +1 -1
- package/docs/interfaces/ExtensionSlotProps.md +2 -2
- package/docs/interfaces/ExtensionSlotState.md +3 -3
- package/docs/interfaces/ExtensionStore.md +2 -2
- package/docs/interfaces/FeatureFlagDefinition.md +4 -4
- package/docs/interfaces/FetchConfig.md +3 -3
- package/docs/interfaces/FetchError.md +3 -3
- package/docs/interfaces/FetchHeaders.md +1 -1
- package/docs/interfaces/FetchResponseJson.md +1 -1
- package/docs/interfaces/ImportMap.md +2 -2
- package/docs/interfaces/OnlyThePatient.md +2 -2
- package/docs/interfaces/OpenmrsAppRoutes.md +13 -13
- package/docs/interfaces/OpenmrsRoutes.md +3 -3
- package/docs/interfaces/PatientWithFullResponse.md +2 -2
- package/docs/interfaces/ResourceLoader.md +2 -2
- package/docs/interfaces/ShowActionableNotificationEvent.md +7 -7
- package/docs/interfaces/ShowNotificationEvent.md +6 -6
- package/docs/interfaces/ShowSnackbarEvent.md +9 -9
- package/docs/interfaces/ShowToastEvent.md +6 -6
- package/docs/interfaces/SpaConfig.md +5 -21
- package/docs/interfaces/VisitItem.md +5 -5
- package/docs/interfaces/VisitStoreState.md +3 -3
- package/docs/interfaces/WorkspaceDefinition2.md +5 -5
- package/docs/interfaces/WorkspaceGroupDefinition.md +3 -3
- package/docs/interfaces/WorkspaceGroupDefinition2.md +6 -6
- package/docs/interfaces/WorkspaceWindowDefinition2.md +7 -7
- package/docs/type-aliases/ConfigValue.md +1 -1
- package/docs/type-aliases/CurrentPatient.md +1 -1
- package/docs/type-aliases/ExtensionDefinition.md +10 -30
- package/docs/type-aliases/ExtensionSlotCustomState.md +1 -1
- package/docs/type-aliases/LoadedSessionStore.md +3 -3
- package/docs/type-aliases/ModalDefinition.md +3 -3
- package/docs/type-aliases/NameUse.md +1 -1
- package/docs/type-aliases/PageDefinition.md +1 -13
- package/docs/type-aliases/PatientUuid.md +1 -1
- package/docs/type-aliases/ProvidedConfig.md +3 -3
- package/docs/type-aliases/SessionStore.md +1 -1
- package/docs/type-aliases/SpaEnvironment.md +1 -1
- package/docs/type-aliases/UnloadedSessionStore.md +3 -3
- package/docs/type-aliases/Validator.md +1 -1
- package/docs/type-aliases/ValidatorFunction.md +1 -1
- package/docs/type-aliases/WorkspaceDefinition.md +10 -10
- package/docs/type-aliases/WorkspaceWindowState.md +1 -1
- package/docs/variables/defaultVisitCustomRepresentation.md +1 -1
- package/docs/variables/fhirBaseUrl.md +1 -1
- package/docs/variables/restBaseUrl.md +1 -1
- package/docs/variables/sessionEndpoint.md +1 -1
- package/docs/variables/visitTypesUrl.md +9 -0
- package/mock-jest.tsx +12 -4
- package/mock.tsx +12 -4
- package/package.json +19 -21
- package/src/deprecated.ts +87 -0
- package/src/index.ts +1 -1
- package/src/internal.ts +1 -1
- package/tsconfig.typedoc.json +0 -2
- package/docs/functions/beginEditSynchronizationItem.md +0 -22
- package/docs/functions/canBeginEditSynchronizationItemsOfType.md +0 -22
- package/docs/functions/deleteSynchronizationItem.md +0 -21
- package/docs/functions/generateOfflineUuid.md +0 -13
- package/docs/functions/getCurrentOfflineMode.md +0 -11
- package/docs/functions/getDynamicOfflineDataEntriesFor.md +0 -34
- package/docs/functions/getDynamicOfflineDataHandlers.md +0 -13
- package/docs/functions/getFullSynchronizationItems.md +0 -27
- package/docs/functions/getFullSynchronizationItemsFor.md +0 -33
- package/docs/functions/getOfflinePatientDataStore.md +0 -15
- package/docs/functions/getSynchronizationItem.md +0 -27
- package/docs/functions/isOfflineUuid.md +0 -19
- package/docs/functions/isOnline.md +0 -27
- package/docs/functions/openmrsObservableFetch.md +0 -55
- package/docs/functions/putDynamicOfflineData.md +0 -28
- package/docs/functions/putDynamicOfflineDataFor.md +0 -34
- package/docs/functions/queueSynchronizationItem.md +0 -39
- package/docs/functions/registerOfflinePatientHandler.md +0 -25
- package/docs/functions/removeDynamicOfflineData.md +0 -28
- package/docs/functions/removeDynamicOfflineDataFor.md +0 -34
- package/docs/functions/subscribeConnectivity.md +0 -21
- package/docs/functions/subscribeConnectivityChanged.md +0 -21
- package/docs/functions/syncAllDynamicOfflineData.md +0 -27
- package/docs/functions/syncDynamicOfflineData.md +0 -33
- package/docs/functions/syncOfflinePatientData.md +0 -21
- package/docs/interfaces/ClearDynamicRoutesMessage.md +0 -21
- package/docs/interfaces/ConnectivityChangedEvent.md +0 -13
- package/docs/interfaces/DynamicOfflineData.md +0 -60
- package/docs/interfaces/DynamicOfflineDataHandler.md +0 -98
- package/docs/interfaces/DynamicOfflineDataSyncState.md +0 -65
- package/docs/interfaces/MessageServiceWorkerResult.md +0 -35
- package/docs/interfaces/OfflineModeResult.md +0 -29
- package/docs/interfaces/OfflinePatientArgs.md +0 -25
- package/docs/interfaces/OfflinePatientDataSyncHandler.md +0 -35
- package/docs/interfaces/OfflinePatientDataSyncState.md +0 -61
- package/docs/interfaces/OfflinePatientDataSyncStore.md +0 -25
- package/docs/interfaces/OmrsServiceWorkerMessage.md +0 -25
- package/docs/interfaces/OnImportMapChangedMessage.md +0 -29
- package/docs/interfaces/PrecacheStaticDependenciesEvent.md +0 -5
- package/docs/interfaces/QueueItemDescriptor.md +0 -50
- package/docs/interfaces/RegisterDynamicRouteMessage.md +0 -45
- package/docs/interfaces/SyncItem.md +0 -79
- package/docs/interfaces/SyncProcessOptions.md +0 -53
- package/docs/type-aliases/KnownOmrsServiceWorkerMessages.md +0 -7
- package/docs/type-aliases/OfflineMode.md +0 -7
- package/docs/type-aliases/OmrsOfflineCachingStrategy.md +0 -12
- package/docs/type-aliases/OmrsOfflineHttpHeaderNames.md +0 -7
- package/docs/type-aliases/OmrsOfflineHttpHeaders.md +0 -44
- package/docs/variables/getStartedVisit.md +0 -9
- package/docs/variables/offlineUuidPrefix.md +0 -7
- package/docs/variables/omrsOfflineCachingStrategyHttpHeaderName.md +0 -7
- package/docs/variables/omrsOfflineResponseBodyHttpHeaderName.md +0 -7
- package/docs/variables/omrsOfflineResponseStatusHttpHeaderName.md +0 -7
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / queueSynchronizationItem
|
|
2
|
-
|
|
3
|
-
# Function: queueSynchronizationItem()
|
|
4
|
-
|
|
5
|
-
> **queueSynchronizationItem**\<`T`\>(`type`, `content`, `descriptor?`): `Promise`\<`number`\>
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:261](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L261)
|
|
8
|
-
|
|
9
|
-
Enqueues a new item in the sync queue and associates the item with the currently signed in user.
|
|
10
|
-
|
|
11
|
-
## Type Parameters
|
|
12
|
-
|
|
13
|
-
### T
|
|
14
|
-
|
|
15
|
-
`T`
|
|
16
|
-
|
|
17
|
-
## Parameters
|
|
18
|
-
|
|
19
|
-
### type
|
|
20
|
-
|
|
21
|
-
`string`
|
|
22
|
-
|
|
23
|
-
The identifying type of the synchronization item.
|
|
24
|
-
|
|
25
|
-
### content
|
|
26
|
-
|
|
27
|
-
`T`
|
|
28
|
-
|
|
29
|
-
The actual data to be synchronized.
|
|
30
|
-
|
|
31
|
-
### descriptor?
|
|
32
|
-
|
|
33
|
-
[`QueueItemDescriptor`](../interfaces/QueueItemDescriptor.md)
|
|
34
|
-
|
|
35
|
-
An optional descriptor providing additional metadata about the sync item.
|
|
36
|
-
|
|
37
|
-
## Returns
|
|
38
|
-
|
|
39
|
-
`Promise`\<`number`\>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / registerOfflinePatientHandler
|
|
2
|
-
|
|
3
|
-
# Function: ~~registerOfflinePatientHandler()~~
|
|
4
|
-
|
|
5
|
-
> **registerOfflinePatientHandler**(`identifier`, `handler`): `void`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:45](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L45)
|
|
8
|
-
|
|
9
|
-
## Parameters
|
|
10
|
-
|
|
11
|
-
### identifier
|
|
12
|
-
|
|
13
|
-
`string`
|
|
14
|
-
|
|
15
|
-
### handler
|
|
16
|
-
|
|
17
|
-
[`OfflinePatientDataSyncHandler`](../interfaces/OfflinePatientDataSyncHandler.md)
|
|
18
|
-
|
|
19
|
-
## Returns
|
|
20
|
-
|
|
21
|
-
`void`
|
|
22
|
-
|
|
23
|
-
## Deprecated
|
|
24
|
-
|
|
25
|
-
Will be removed once all modules have been migrated to the new dynamic offline data API.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / removeDynamicOfflineData
|
|
2
|
-
|
|
3
|
-
# Function: removeDynamicOfflineData()
|
|
4
|
-
|
|
5
|
-
> **removeDynamicOfflineData**(`type`, `identifier`): `Promise`\<`void`\>
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:201](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L201)
|
|
8
|
-
|
|
9
|
-
Declares that dynamic offline data of the given [type](#removedynamicofflinedata) with the given [identifier](#removedynamicofflinedata)
|
|
10
|
-
no longer needs to be available offline for the currently logged in user.
|
|
11
|
-
|
|
12
|
-
## Parameters
|
|
13
|
-
|
|
14
|
-
### type
|
|
15
|
-
|
|
16
|
-
`string`
|
|
17
|
-
|
|
18
|
-
The type of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
|
|
19
|
-
|
|
20
|
-
### identifier
|
|
21
|
-
|
|
22
|
-
`string`
|
|
23
|
-
|
|
24
|
-
The identifier of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
|
|
25
|
-
|
|
26
|
-
## Returns
|
|
27
|
-
|
|
28
|
-
`Promise`\<`void`\>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / removeDynamicOfflineDataFor
|
|
2
|
-
|
|
3
|
-
# Function: removeDynamicOfflineDataFor()
|
|
4
|
-
|
|
5
|
-
> **removeDynamicOfflineDataFor**(`userId`, `type`, `identifier`): `Promise`\<`void`\>
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:213](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L213)
|
|
8
|
-
|
|
9
|
-
Declares that dynamic offline data of the given [type](#removedynamicofflinedatafor) with the given [identifier](#removedynamicofflinedatafor)
|
|
10
|
-
no longer needs to be available offline for the user with the given ID.
|
|
11
|
-
|
|
12
|
-
## Parameters
|
|
13
|
-
|
|
14
|
-
### userId
|
|
15
|
-
|
|
16
|
-
`string`
|
|
17
|
-
|
|
18
|
-
The ID of the user who doesn't require the specified offline data.
|
|
19
|
-
|
|
20
|
-
### type
|
|
21
|
-
|
|
22
|
-
`string`
|
|
23
|
-
|
|
24
|
-
The type of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
|
|
25
|
-
|
|
26
|
-
### identifier
|
|
27
|
-
|
|
28
|
-
`string`
|
|
29
|
-
|
|
30
|
-
The identifier of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
|
|
31
|
-
|
|
32
|
-
## Returns
|
|
33
|
-
|
|
34
|
-
`Promise`\<`void`\>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / subscribeConnectivity
|
|
2
|
-
|
|
3
|
-
# Function: subscribeConnectivity()
|
|
4
|
-
|
|
5
|
-
> **subscribeConnectivity**(`cb`): () => `void`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-globals/src/events.ts:24](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L24)
|
|
8
|
-
|
|
9
|
-
## Parameters
|
|
10
|
-
|
|
11
|
-
### cb
|
|
12
|
-
|
|
13
|
-
(`ev`) => `void`
|
|
14
|
-
|
|
15
|
-
## Returns
|
|
16
|
-
|
|
17
|
-
> (): `void`
|
|
18
|
-
|
|
19
|
-
### Returns
|
|
20
|
-
|
|
21
|
-
`void`
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / subscribeConnectivityChanged
|
|
2
|
-
|
|
3
|
-
# Function: subscribeConnectivityChanged()
|
|
4
|
-
|
|
5
|
-
> **subscribeConnectivityChanged**(`cb`): () => `void`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-globals/src/events.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L13)
|
|
8
|
-
|
|
9
|
-
## Parameters
|
|
10
|
-
|
|
11
|
-
### cb
|
|
12
|
-
|
|
13
|
-
(`ev`) => `void`
|
|
14
|
-
|
|
15
|
-
## Returns
|
|
16
|
-
|
|
17
|
-
> (): `void`
|
|
18
|
-
|
|
19
|
-
### Returns
|
|
20
|
-
|
|
21
|
-
`void`
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / syncAllDynamicOfflineData
|
|
2
|
-
|
|
3
|
-
# Function: syncAllDynamicOfflineData()
|
|
4
|
-
|
|
5
|
-
> **syncAllDynamicOfflineData**(`type`, `abortSignal?`): `Promise`\<`void`\>
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:241](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L241)
|
|
8
|
-
|
|
9
|
-
Synchronizes all offline data entries of the given [type](#syncalldynamicofflinedata) for the currently logged in user.
|
|
10
|
-
|
|
11
|
-
## Parameters
|
|
12
|
-
|
|
13
|
-
### type
|
|
14
|
-
|
|
15
|
-
`string`
|
|
16
|
-
|
|
17
|
-
The type of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
|
|
18
|
-
|
|
19
|
-
### abortSignal?
|
|
20
|
-
|
|
21
|
-
`AbortSignal`
|
|
22
|
-
|
|
23
|
-
An `AbortSignal` which can be used to cancel the operation.
|
|
24
|
-
|
|
25
|
-
## Returns
|
|
26
|
-
|
|
27
|
-
`Promise`\<`void`\>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / syncDynamicOfflineData
|
|
2
|
-
|
|
3
|
-
# Function: syncDynamicOfflineData()
|
|
4
|
-
|
|
5
|
-
> **syncDynamicOfflineData**(`type`, `identifier`, `abortSignal?`): `Promise`\<`void`\>
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:254](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L254)
|
|
8
|
-
|
|
9
|
-
Synchronizes a single offline data entry of the given [type](#syncdynamicofflinedata) for the currently logged in user.
|
|
10
|
-
|
|
11
|
-
## Parameters
|
|
12
|
-
|
|
13
|
-
### type
|
|
14
|
-
|
|
15
|
-
`string`
|
|
16
|
-
|
|
17
|
-
The type of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
|
|
18
|
-
|
|
19
|
-
### identifier
|
|
20
|
-
|
|
21
|
-
`string`
|
|
22
|
-
|
|
23
|
-
The identifier of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
|
|
24
|
-
|
|
25
|
-
### abortSignal?
|
|
26
|
-
|
|
27
|
-
`AbortSignal`
|
|
28
|
-
|
|
29
|
-
An `AbortSignal` which can be used to cancel the operation.
|
|
30
|
-
|
|
31
|
-
## Returns
|
|
32
|
-
|
|
33
|
-
`Promise`\<`void`\>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / syncOfflinePatientData
|
|
2
|
-
|
|
3
|
-
# Function: ~~syncOfflinePatientData()~~
|
|
4
|
-
|
|
5
|
-
> **syncOfflinePatientData**(`patientUuid`): `Promise`\<`void`\>
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:62](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L62)
|
|
8
|
-
|
|
9
|
-
## Parameters
|
|
10
|
-
|
|
11
|
-
### patientUuid
|
|
12
|
-
|
|
13
|
-
`string`
|
|
14
|
-
|
|
15
|
-
## Returns
|
|
16
|
-
|
|
17
|
-
`Promise`\<`void`\>
|
|
18
|
-
|
|
19
|
-
## Deprecated
|
|
20
|
-
|
|
21
|
-
Will be removed once all modules have been migrated to the new dynamic offline data API.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / ClearDynamicRoutesMessage
|
|
2
|
-
|
|
3
|
-
# Interface: ClearDynamicRoutesMessage
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:33](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L33)
|
|
6
|
-
|
|
7
|
-
## Extends
|
|
8
|
-
|
|
9
|
-
- [`OmrsServiceWorkerMessage`](OmrsServiceWorkerMessage.md)\<`"clearDynamicRoutes"`\>
|
|
10
|
-
|
|
11
|
-
## Properties
|
|
12
|
-
|
|
13
|
-
### type
|
|
14
|
-
|
|
15
|
-
> **type**: `"clearDynamicRoutes"`
|
|
16
|
-
|
|
17
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:26](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L26)
|
|
18
|
-
|
|
19
|
-
#### Inherited from
|
|
20
|
-
|
|
21
|
-
[`OmrsServiceWorkerMessage`](OmrsServiceWorkerMessage.md).[`type`](OmrsServiceWorkerMessage.md#type)
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / ConnectivityChangedEvent
|
|
2
|
-
|
|
3
|
-
# Interface: ConnectivityChangedEvent
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-globals/src/events.ts:1](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L1)
|
|
6
|
-
|
|
7
|
-
## Properties
|
|
8
|
-
|
|
9
|
-
### online
|
|
10
|
-
|
|
11
|
-
> **online**: `boolean`
|
|
12
|
-
|
|
13
|
-
Defined in: [packages/framework/esm-globals/src/events.ts:2](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L2)
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / DynamicOfflineData
|
|
2
|
-
|
|
3
|
-
# Interface: DynamicOfflineData
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:44](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L44)
|
|
6
|
-
|
|
7
|
-
Represents the registration of a single dynamic offline data entry.
|
|
8
|
-
|
|
9
|
-
## Properties
|
|
10
|
-
|
|
11
|
-
### id?
|
|
12
|
-
|
|
13
|
-
> `optional` **id**: `number`
|
|
14
|
-
|
|
15
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L48)
|
|
16
|
-
|
|
17
|
-
The internal ID of the data entry, as assigned by the IndexedDB where it is stored.
|
|
18
|
-
|
|
19
|
-
***
|
|
20
|
-
|
|
21
|
-
### identifier
|
|
22
|
-
|
|
23
|
-
> **identifier**: `string`
|
|
24
|
-
|
|
25
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:58](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L58)
|
|
26
|
-
|
|
27
|
-
The externally provided identifier of the data entry.
|
|
28
|
-
This is typically the ID of the resource as assigned by a remote API.
|
|
29
|
-
|
|
30
|
-
***
|
|
31
|
-
|
|
32
|
-
### syncState?
|
|
33
|
-
|
|
34
|
-
> `optional` **syncState**: [`DynamicOfflineDataSyncState`](DynamicOfflineDataSyncState.md)
|
|
35
|
-
|
|
36
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:67](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L67)
|
|
37
|
-
|
|
38
|
-
If this entry has already been synced, returns the result of that last sync attempt.
|
|
39
|
-
Otherwise this is `undefined`.
|
|
40
|
-
|
|
41
|
-
***
|
|
42
|
-
|
|
43
|
-
### type
|
|
44
|
-
|
|
45
|
-
> **type**: `string`
|
|
46
|
-
|
|
47
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:53](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L53)
|
|
48
|
-
|
|
49
|
-
The underlying type used for categorizing the data entry.
|
|
50
|
-
Examples could be `"patient"` or `"form"`.
|
|
51
|
-
|
|
52
|
-
***
|
|
53
|
-
|
|
54
|
-
### users
|
|
55
|
-
|
|
56
|
-
> **users**: `string`[]
|
|
57
|
-
|
|
58
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:62](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L62)
|
|
59
|
-
|
|
60
|
-
The UUIDs of the users who need this data entry available offline.
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / DynamicOfflineDataHandler
|
|
2
|
-
|
|
3
|
-
# Interface: DynamicOfflineDataHandler
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:10](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L10)
|
|
6
|
-
|
|
7
|
-
A handler for synchronizing dynamically declared offline data.
|
|
8
|
-
Can be setup using the [setupDynamicOfflineDataHandler](../functions/setupDynamicOfflineDataHandler.md) function.
|
|
9
|
-
|
|
10
|
-
## Properties
|
|
11
|
-
|
|
12
|
-
### displayName?
|
|
13
|
-
|
|
14
|
-
> `optional` **displayName**: `string`
|
|
15
|
-
|
|
16
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:24](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L24)
|
|
17
|
-
|
|
18
|
-
A human-readable string representing the handler.
|
|
19
|
-
If provided, the handler can be rendered in the UI using that string.
|
|
20
|
-
|
|
21
|
-
***
|
|
22
|
-
|
|
23
|
-
### id
|
|
24
|
-
|
|
25
|
-
> **id**: `string`
|
|
26
|
-
|
|
27
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L14)
|
|
28
|
-
|
|
29
|
-
A string uniquely identifying the handler.
|
|
30
|
-
|
|
31
|
-
***
|
|
32
|
-
|
|
33
|
-
### type
|
|
34
|
-
|
|
35
|
-
> **type**: `string`
|
|
36
|
-
|
|
37
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:19](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L19)
|
|
38
|
-
|
|
39
|
-
The type of offline data handled by this handler.
|
|
40
|
-
See [DynamicOfflineData.type](DynamicOfflineData.md#type) for details.
|
|
41
|
-
|
|
42
|
-
## Methods
|
|
43
|
-
|
|
44
|
-
### isSynced()
|
|
45
|
-
|
|
46
|
-
> **isSynced**(`identifier`, `abortSignal?`): `Promise`\<`boolean`\>
|
|
47
|
-
|
|
48
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:32](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L32)
|
|
49
|
-
|
|
50
|
-
Evaluates whether the given offline data is correctly synced at this point in time from the perspective
|
|
51
|
-
of this single handler.
|
|
52
|
-
If `false`, the handler would have to (re-)sync the data in order for offline mode to properly work.
|
|
53
|
-
|
|
54
|
-
#### Parameters
|
|
55
|
-
|
|
56
|
-
##### identifier
|
|
57
|
-
|
|
58
|
-
`string`
|
|
59
|
-
|
|
60
|
-
The identifier of the offline data. See [DynamicOfflineData](DynamicOfflineData.md) for details.
|
|
61
|
-
|
|
62
|
-
##### abortSignal?
|
|
63
|
-
|
|
64
|
-
`AbortSignal`
|
|
65
|
-
|
|
66
|
-
An `AbortSignal` which can be used to cancel the operation.
|
|
67
|
-
|
|
68
|
-
#### Returns
|
|
69
|
-
|
|
70
|
-
`Promise`\<`boolean`\>
|
|
71
|
-
|
|
72
|
-
***
|
|
73
|
-
|
|
74
|
-
### sync()
|
|
75
|
-
|
|
76
|
-
> **sync**(`identifier`, `abortSignal?`): `Promise`\<`void`\>
|
|
77
|
-
|
|
78
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L38)
|
|
79
|
-
|
|
80
|
-
Synchronizes the given offline data.
|
|
81
|
-
|
|
82
|
-
#### Parameters
|
|
83
|
-
|
|
84
|
-
##### identifier
|
|
85
|
-
|
|
86
|
-
`string`
|
|
87
|
-
|
|
88
|
-
The identifier of the offline data. See [DynamicOfflineData](DynamicOfflineData.md) for details.
|
|
89
|
-
|
|
90
|
-
##### abortSignal?
|
|
91
|
-
|
|
92
|
-
`AbortSignal`
|
|
93
|
-
|
|
94
|
-
An `AbortSignal` which can be used to cancel the operation.
|
|
95
|
-
|
|
96
|
-
#### Returns
|
|
97
|
-
|
|
98
|
-
`Promise`\<`void`\>
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / DynamicOfflineDataSyncState
|
|
2
|
-
|
|
3
|
-
# Interface: DynamicOfflineDataSyncState
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:73](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L73)
|
|
6
|
-
|
|
7
|
-
Represents the result of syncing a given [DynamicOfflineData](DynamicOfflineData.md) entry.
|
|
8
|
-
|
|
9
|
-
## Properties
|
|
10
|
-
|
|
11
|
-
### erroredHandlers
|
|
12
|
-
|
|
13
|
-
> **erroredHandlers**: `string`[]
|
|
14
|
-
|
|
15
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:89](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L89)
|
|
16
|
-
|
|
17
|
-
The IDs of the handlers which failed to synchronize their data.
|
|
18
|
-
|
|
19
|
-
***
|
|
20
|
-
|
|
21
|
-
### errors
|
|
22
|
-
|
|
23
|
-
> **errors**: `object`[]
|
|
24
|
-
|
|
25
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:93](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L93)
|
|
26
|
-
|
|
27
|
-
A collection of the errors caught while synchronizing, per handler.
|
|
28
|
-
|
|
29
|
-
#### handlerId
|
|
30
|
-
|
|
31
|
-
> **handlerId**: `string`
|
|
32
|
-
|
|
33
|
-
#### message
|
|
34
|
-
|
|
35
|
-
> **message**: `string`
|
|
36
|
-
|
|
37
|
-
***
|
|
38
|
-
|
|
39
|
-
### succeededHandlers
|
|
40
|
-
|
|
41
|
-
> **succeededHandlers**: `string`[]
|
|
42
|
-
|
|
43
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:85](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L85)
|
|
44
|
-
|
|
45
|
-
The IDs of the handlers which successfully synchronized their data.
|
|
46
|
-
|
|
47
|
-
***
|
|
48
|
-
|
|
49
|
-
### syncedBy
|
|
50
|
-
|
|
51
|
-
> **syncedBy**: `string`
|
|
52
|
-
|
|
53
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:81](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L81)
|
|
54
|
-
|
|
55
|
-
The ID of the user who has triggered the data synchronization.
|
|
56
|
-
|
|
57
|
-
***
|
|
58
|
-
|
|
59
|
-
### syncedOn
|
|
60
|
-
|
|
61
|
-
> **syncedOn**: `Date`
|
|
62
|
-
|
|
63
|
-
Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:77](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L77)
|
|
64
|
-
|
|
65
|
-
The time when the entry has been synced the last time.
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / MessageServiceWorkerResult
|
|
2
|
-
|
|
3
|
-
# Interface: MessageServiceWorkerResult\<T\>
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:46](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L46)
|
|
6
|
-
|
|
7
|
-
## Type Parameters
|
|
8
|
-
|
|
9
|
-
### T
|
|
10
|
-
|
|
11
|
-
`T`
|
|
12
|
-
|
|
13
|
-
## Properties
|
|
14
|
-
|
|
15
|
-
### error?
|
|
16
|
-
|
|
17
|
-
> `optional` **error**: `string`
|
|
18
|
-
|
|
19
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:49](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L49)
|
|
20
|
-
|
|
21
|
-
***
|
|
22
|
-
|
|
23
|
-
### result?
|
|
24
|
-
|
|
25
|
-
> `optional` **result**: `T`
|
|
26
|
-
|
|
27
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L48)
|
|
28
|
-
|
|
29
|
-
***
|
|
30
|
-
|
|
31
|
-
### success
|
|
32
|
-
|
|
33
|
-
> **success**: `boolean`
|
|
34
|
-
|
|
35
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:47](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L47)
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OfflineModeResult
|
|
2
|
-
|
|
3
|
-
# Interface: OfflineModeResult
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/mode.ts:36](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/mode.ts#L36)
|
|
6
|
-
|
|
7
|
-
## Properties
|
|
8
|
-
|
|
9
|
-
### active
|
|
10
|
-
|
|
11
|
-
> **active**: `boolean`
|
|
12
|
-
|
|
13
|
-
Defined in: [packages/framework/esm-offline/src/mode.ts:39](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/mode.ts#L39)
|
|
14
|
-
|
|
15
|
-
***
|
|
16
|
-
|
|
17
|
-
### current
|
|
18
|
-
|
|
19
|
-
> **current**: [`OfflineMode`](../type-aliases/OfflineMode.md)
|
|
20
|
-
|
|
21
|
-
Defined in: [packages/framework/esm-offline/src/mode.ts:37](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/mode.ts#L37)
|
|
22
|
-
|
|
23
|
-
***
|
|
24
|
-
|
|
25
|
-
### notAvailable
|
|
26
|
-
|
|
27
|
-
> **notAvailable**: `boolean`
|
|
28
|
-
|
|
29
|
-
Defined in: [packages/framework/esm-offline/src/mode.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/mode.ts#L38)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OfflinePatientArgs
|
|
2
|
-
|
|
3
|
-
# Interface: ~~OfflinePatientArgs~~
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:28](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L28)
|
|
6
|
-
|
|
7
|
-
## Deprecated
|
|
8
|
-
|
|
9
|
-
Will be removed once all modules have been migrated to the new dynamic offline data API.
|
|
10
|
-
|
|
11
|
-
## Properties
|
|
12
|
-
|
|
13
|
-
### ~~patientUuid~~
|
|
14
|
-
|
|
15
|
-
> **patientUuid**: `string`
|
|
16
|
-
|
|
17
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L29)
|
|
18
|
-
|
|
19
|
-
***
|
|
20
|
-
|
|
21
|
-
### ~~signal~~
|
|
22
|
-
|
|
23
|
-
> **signal**: `AbortSignal`
|
|
24
|
-
|
|
25
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:30](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L30)
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OfflinePatientDataSyncHandler
|
|
2
|
-
|
|
3
|
-
# Interface: ~~OfflinePatientDataSyncHandler~~
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:22](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L22)
|
|
6
|
-
|
|
7
|
-
## Deprecated
|
|
8
|
-
|
|
9
|
-
Will be removed once all modules have been migrated to the new dynamic offline data API.
|
|
10
|
-
|
|
11
|
-
## Properties
|
|
12
|
-
|
|
13
|
-
### ~~displayName~~
|
|
14
|
-
|
|
15
|
-
> `readonly` **displayName**: `string`
|
|
16
|
-
|
|
17
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:23](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L23)
|
|
18
|
-
|
|
19
|
-
## Methods
|
|
20
|
-
|
|
21
|
-
### ~~onOfflinePatientAdded()~~
|
|
22
|
-
|
|
23
|
-
> **onOfflinePatientAdded**(`args`): `Promise`\<`void`\>
|
|
24
|
-
|
|
25
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:24](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L24)
|
|
26
|
-
|
|
27
|
-
#### Parameters
|
|
28
|
-
|
|
29
|
-
##### args
|
|
30
|
-
|
|
31
|
-
[`OfflinePatientArgs`](OfflinePatientArgs.md)
|
|
32
|
-
|
|
33
|
-
#### Returns
|
|
34
|
-
|
|
35
|
-
`Promise`\<`void`\>
|