@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,61 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OfflinePatientDataSyncState
|
|
2
|
-
|
|
3
|
-
# Interface: ~~OfflinePatientDataSyncState~~
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L12)
|
|
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
|
-
### ~~errors~~
|
|
14
|
-
|
|
15
|
-
> `readonly` **errors**: `Record`\<`string`, `string`\>
|
|
16
|
-
|
|
17
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:17](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L17)
|
|
18
|
-
|
|
19
|
-
***
|
|
20
|
-
|
|
21
|
-
### ~~failedHandlers~~
|
|
22
|
-
|
|
23
|
-
> `readonly` **failedHandlers**: `string`[]
|
|
24
|
-
|
|
25
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L16)
|
|
26
|
-
|
|
27
|
-
***
|
|
28
|
-
|
|
29
|
-
### ~~syncedHandlers~~
|
|
30
|
-
|
|
31
|
-
> `readonly` **syncedHandlers**: `string`[]
|
|
32
|
-
|
|
33
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L15)
|
|
34
|
-
|
|
35
|
-
***
|
|
36
|
-
|
|
37
|
-
### ~~syncingHandlers~~
|
|
38
|
-
|
|
39
|
-
> `readonly` **syncingHandlers**: `string`[]
|
|
40
|
-
|
|
41
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L14)
|
|
42
|
-
|
|
43
|
-
***
|
|
44
|
-
|
|
45
|
-
### ~~timestamp~~
|
|
46
|
-
|
|
47
|
-
> `readonly` **timestamp**: `Date`
|
|
48
|
-
|
|
49
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L13)
|
|
50
|
-
|
|
51
|
-
## Methods
|
|
52
|
-
|
|
53
|
-
### ~~abort()~~
|
|
54
|
-
|
|
55
|
-
> **abort**(): `boolean`
|
|
56
|
-
|
|
57
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:18](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L18)
|
|
58
|
-
|
|
59
|
-
#### Returns
|
|
60
|
-
|
|
61
|
-
`boolean`
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OfflinePatientDataSyncStore
|
|
2
|
-
|
|
3
|
-
# Interface: ~~OfflinePatientDataSyncStore~~
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:6](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L6)
|
|
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
|
-
### ~~handlers~~
|
|
14
|
-
|
|
15
|
-
> **handlers**: `Record`\<`string`, [`OfflinePatientDataSyncHandler`](OfflinePatientDataSyncHandler.md)\>
|
|
16
|
-
|
|
17
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:8](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L8)
|
|
18
|
-
|
|
19
|
-
***
|
|
20
|
-
|
|
21
|
-
### ~~offlinePatientDataSyncState~~
|
|
22
|
-
|
|
23
|
-
> **offlinePatientDataSyncState**: `Record`\<`string`, [`OfflinePatientDataSyncState`](OfflinePatientDataSyncState.md)\>
|
|
24
|
-
|
|
25
|
-
Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L7)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OmrsServiceWorkerMessage
|
|
2
|
-
|
|
3
|
-
# Interface: OmrsServiceWorkerMessage\<MessageTypeTypeIdentifier\>
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:25](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L25)
|
|
6
|
-
|
|
7
|
-
## Extended by
|
|
8
|
-
|
|
9
|
-
- [`OnImportMapChangedMessage`](OnImportMapChangedMessage.md)
|
|
10
|
-
- [`ClearDynamicRoutesMessage`](ClearDynamicRoutesMessage.md)
|
|
11
|
-
- [`RegisterDynamicRouteMessage`](RegisterDynamicRouteMessage.md)
|
|
12
|
-
|
|
13
|
-
## Type Parameters
|
|
14
|
-
|
|
15
|
-
### MessageTypeTypeIdentifier
|
|
16
|
-
|
|
17
|
-
`MessageTypeTypeIdentifier` *extends* `string`
|
|
18
|
-
|
|
19
|
-
## Properties
|
|
20
|
-
|
|
21
|
-
### type
|
|
22
|
-
|
|
23
|
-
> **type**: `MessageTypeTypeIdentifier`
|
|
24
|
-
|
|
25
|
-
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)
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OnImportMapChangedMessage
|
|
2
|
-
|
|
3
|
-
# Interface: OnImportMapChangedMessage
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L29)
|
|
6
|
-
|
|
7
|
-
## Extends
|
|
8
|
-
|
|
9
|
-
- [`OmrsServiceWorkerMessage`](OmrsServiceWorkerMessage.md)\<`"onImportMapChanged"`\>
|
|
10
|
-
|
|
11
|
-
## Properties
|
|
12
|
-
|
|
13
|
-
### importMap
|
|
14
|
-
|
|
15
|
-
> **importMap**: [`ImportMap`](ImportMap.md)
|
|
16
|
-
|
|
17
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:30](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L30)
|
|
18
|
-
|
|
19
|
-
***
|
|
20
|
-
|
|
21
|
-
### type
|
|
22
|
-
|
|
23
|
-
> **type**: `"onImportMapChanged"`
|
|
24
|
-
|
|
25
|
-
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)
|
|
26
|
-
|
|
27
|
-
#### Inherited from
|
|
28
|
-
|
|
29
|
-
[`OmrsServiceWorkerMessage`](OmrsServiceWorkerMessage.md).[`type`](OmrsServiceWorkerMessage.md#type)
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / PrecacheStaticDependenciesEvent
|
|
2
|
-
|
|
3
|
-
# Interface: PrecacheStaticDependenciesEvent
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-globals/src/events.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L29)
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / QueueItemDescriptor
|
|
2
|
-
|
|
3
|
-
# Interface: QueueItemDescriptor
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:31](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L31)
|
|
6
|
-
|
|
7
|
-
Contains information about the sync item which has been provided externally by the caller
|
|
8
|
-
who added the item to the queue.
|
|
9
|
-
This information is all optional, but, when provided while enqueuing the item, can be used in other
|
|
10
|
-
locations to better represent the sync item, e.g. in the UI.
|
|
11
|
-
|
|
12
|
-
## Properties
|
|
13
|
-
|
|
14
|
-
### dependencies?
|
|
15
|
-
|
|
16
|
-
> `optional` **dependencies**: `object`[]
|
|
17
|
-
|
|
18
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:33](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L33)
|
|
19
|
-
|
|
20
|
-
#### id
|
|
21
|
-
|
|
22
|
-
> **id**: `string`
|
|
23
|
-
|
|
24
|
-
#### type
|
|
25
|
-
|
|
26
|
-
> **type**: `string`
|
|
27
|
-
|
|
28
|
-
***
|
|
29
|
-
|
|
30
|
-
### displayName?
|
|
31
|
-
|
|
32
|
-
> `optional` **displayName**: `string`
|
|
33
|
-
|
|
34
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L38)
|
|
35
|
-
|
|
36
|
-
***
|
|
37
|
-
|
|
38
|
-
### id?
|
|
39
|
-
|
|
40
|
-
> `optional` **id**: `string`
|
|
41
|
-
|
|
42
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:32](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L32)
|
|
43
|
-
|
|
44
|
-
***
|
|
45
|
-
|
|
46
|
-
### patientUuid?
|
|
47
|
-
|
|
48
|
-
> `optional` **patientUuid**: `string`
|
|
49
|
-
|
|
50
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:37](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L37)
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / RegisterDynamicRouteMessage
|
|
2
|
-
|
|
3
|
-
# Interface: RegisterDynamicRouteMessage
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:35](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L35)
|
|
6
|
-
|
|
7
|
-
## Extends
|
|
8
|
-
|
|
9
|
-
- [`OmrsServiceWorkerMessage`](OmrsServiceWorkerMessage.md)\<`"registerDynamicRoute"`\>
|
|
10
|
-
|
|
11
|
-
## Properties
|
|
12
|
-
|
|
13
|
-
### pattern?
|
|
14
|
-
|
|
15
|
-
> `optional` **pattern**: `string`
|
|
16
|
-
|
|
17
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:36](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L36)
|
|
18
|
-
|
|
19
|
-
***
|
|
20
|
-
|
|
21
|
-
### strategy?
|
|
22
|
-
|
|
23
|
-
> `optional` **strategy**: [`OmrsOfflineCachingStrategy`](../type-aliases/OmrsOfflineCachingStrategy.md)
|
|
24
|
-
|
|
25
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L38)
|
|
26
|
-
|
|
27
|
-
***
|
|
28
|
-
|
|
29
|
-
### type
|
|
30
|
-
|
|
31
|
-
> **type**: `"registerDynamicRoute"`
|
|
32
|
-
|
|
33
|
-
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)
|
|
34
|
-
|
|
35
|
-
#### Inherited from
|
|
36
|
-
|
|
37
|
-
[`OmrsServiceWorkerMessage`](OmrsServiceWorkerMessage.md).[`type`](OmrsServiceWorkerMessage.md#type)
|
|
38
|
-
|
|
39
|
-
***
|
|
40
|
-
|
|
41
|
-
### url?
|
|
42
|
-
|
|
43
|
-
> `optional` **url**: `string`
|
|
44
|
-
|
|
45
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:37](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L37)
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / SyncItem
|
|
2
|
-
|
|
3
|
-
# Interface: SyncItem\<T\>
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L12)
|
|
6
|
-
|
|
7
|
-
Defines an item queued up in the offline synchronization queue.
|
|
8
|
-
A `SyncItem` contains both meta information about the item in the sync queue, as well as the
|
|
9
|
-
actual data to be synchronized (i.e. the item's `content`).
|
|
10
|
-
|
|
11
|
-
## Type Parameters
|
|
12
|
-
|
|
13
|
-
### T
|
|
14
|
-
|
|
15
|
-
`T` = `any`
|
|
16
|
-
|
|
17
|
-
## Properties
|
|
18
|
-
|
|
19
|
-
### content
|
|
20
|
-
|
|
21
|
-
> **content**: `T`
|
|
22
|
-
|
|
23
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L16)
|
|
24
|
-
|
|
25
|
-
***
|
|
26
|
-
|
|
27
|
-
### createdOn
|
|
28
|
-
|
|
29
|
-
> **createdOn**: `Date`
|
|
30
|
-
|
|
31
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:17](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L17)
|
|
32
|
-
|
|
33
|
-
***
|
|
34
|
-
|
|
35
|
-
### descriptor
|
|
36
|
-
|
|
37
|
-
> **descriptor**: [`QueueItemDescriptor`](QueueItemDescriptor.md)
|
|
38
|
-
|
|
39
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:18](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L18)
|
|
40
|
-
|
|
41
|
-
***
|
|
42
|
-
|
|
43
|
-
### id?
|
|
44
|
-
|
|
45
|
-
> `optional` **id**: `number`
|
|
46
|
-
|
|
47
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L13)
|
|
48
|
-
|
|
49
|
-
***
|
|
50
|
-
|
|
51
|
-
### lastError?
|
|
52
|
-
|
|
53
|
-
> `optional` **lastError**: `object`
|
|
54
|
-
|
|
55
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:19](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L19)
|
|
56
|
-
|
|
57
|
-
#### message?
|
|
58
|
-
|
|
59
|
-
> `optional` **message**: `string`
|
|
60
|
-
|
|
61
|
-
#### name?
|
|
62
|
-
|
|
63
|
-
> `optional` **name**: `string`
|
|
64
|
-
|
|
65
|
-
***
|
|
66
|
-
|
|
67
|
-
### type
|
|
68
|
-
|
|
69
|
-
> **type**: `string`
|
|
70
|
-
|
|
71
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L15)
|
|
72
|
-
|
|
73
|
-
***
|
|
74
|
-
|
|
75
|
-
### userId
|
|
76
|
-
|
|
77
|
-
> **userId**: `string`
|
|
78
|
-
|
|
79
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L14)
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / SyncProcessOptions
|
|
2
|
-
|
|
3
|
-
# Interface: SyncProcessOptions\<T\>
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:52](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L52)
|
|
6
|
-
|
|
7
|
-
Additional data which can be used for synchronizing data in a ProcessSyncItem function.
|
|
8
|
-
|
|
9
|
-
## Type Parameters
|
|
10
|
-
|
|
11
|
-
### T
|
|
12
|
-
|
|
13
|
-
`T`
|
|
14
|
-
|
|
15
|
-
## Properties
|
|
16
|
-
|
|
17
|
-
### abort
|
|
18
|
-
|
|
19
|
-
> **abort**: `AbortController`
|
|
20
|
-
|
|
21
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:53](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L53)
|
|
22
|
-
|
|
23
|
-
***
|
|
24
|
-
|
|
25
|
-
### dependencies
|
|
26
|
-
|
|
27
|
-
> **dependencies**: `any`[]
|
|
28
|
-
|
|
29
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:57](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L57)
|
|
30
|
-
|
|
31
|
-
***
|
|
32
|
-
|
|
33
|
-
### index
|
|
34
|
-
|
|
35
|
-
> **index**: `number`
|
|
36
|
-
|
|
37
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:55](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L55)
|
|
38
|
-
|
|
39
|
-
***
|
|
40
|
-
|
|
41
|
-
### items
|
|
42
|
-
|
|
43
|
-
> **items**: `T`[]
|
|
44
|
-
|
|
45
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:56](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L56)
|
|
46
|
-
|
|
47
|
-
***
|
|
48
|
-
|
|
49
|
-
### userId
|
|
50
|
-
|
|
51
|
-
> **userId**: `string`
|
|
52
|
-
|
|
53
|
-
Defined in: [packages/framework/esm-offline/src/sync.ts:54](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L54)
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / KnownOmrsServiceWorkerMessages
|
|
2
|
-
|
|
3
|
-
# Type Alias: KnownOmrsServiceWorkerMessages
|
|
4
|
-
|
|
5
|
-
> **KnownOmrsServiceWorkerMessages** = [`OnImportMapChangedMessage`](../interfaces/OnImportMapChangedMessage.md) \| [`ClearDynamicRoutesMessage`](../interfaces/ClearDynamicRoutesMessage.md) \| [`RegisterDynamicRouteMessage`](../interfaces/RegisterDynamicRouteMessage.md)
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:41](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L41)
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OfflineMode
|
|
2
|
-
|
|
3
|
-
# Type Alias: OfflineMode
|
|
4
|
-
|
|
5
|
-
> **OfflineMode** = `"on"` \| `"off"` \| `"unavailable"`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/mode.ts:34](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/mode.ts#L34)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OmrsOfflineCachingStrategy
|
|
2
|
-
|
|
3
|
-
# Type Alias: OmrsOfflineCachingStrategy
|
|
4
|
-
|
|
5
|
-
> **OmrsOfflineCachingStrategy** = `"network-only-or-cache-only"` \| `"network-first"`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-http-headers.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-http-headers.ts#L15)
|
|
8
|
-
|
|
9
|
-
* `cache-or-network`: The default strategy, equal to the absence of this header.
|
|
10
|
-
The SW attempts to resolve the request via the network, but falls back to the cache if required.
|
|
11
|
-
The service worker decides the strategy to be used.
|
|
12
|
-
* `network-first`: See https://developers.google.com/web/tools/workbox/modules/workbox-strategies#network_first_network_falling_back_to_cache.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OmrsOfflineHttpHeaderNames
|
|
2
|
-
|
|
3
|
-
# Type Alias: OmrsOfflineHttpHeaderNames
|
|
4
|
-
|
|
5
|
-
> **OmrsOfflineHttpHeaderNames** = keyof [`OmrsOfflineHttpHeaders`](OmrsOfflineHttpHeaders.md)
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-http-headers.ts:40](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-http-headers.ts#L40)
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OmrsOfflineHttpHeaders
|
|
2
|
-
|
|
3
|
-
# Type Alias: OmrsOfflineHttpHeaders
|
|
4
|
-
|
|
5
|
-
> **OmrsOfflineHttpHeaders** = `object`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-http-headers.ts:21](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-http-headers.ts#L21)
|
|
8
|
-
|
|
9
|
-
Defines the keys of the custom headers which can be appended to an HTTP request.
|
|
10
|
-
HTTP requests with these headers are handled in a special way by the SPA's service worker.
|
|
11
|
-
|
|
12
|
-
## Properties
|
|
13
|
-
|
|
14
|
-
### x-omrs-offline-caching-strategy?
|
|
15
|
-
|
|
16
|
-
> `optional` **x-omrs-offline-caching-strategy**: [`OmrsOfflineCachingStrategy`](OmrsOfflineCachingStrategy.md)
|
|
17
|
-
|
|
18
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-http-headers.ts:37](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-http-headers.ts#L37)
|
|
19
|
-
|
|
20
|
-
Instructs the service worker to use a specific caching strategy for this request.
|
|
21
|
-
|
|
22
|
-
***
|
|
23
|
-
|
|
24
|
-
### x-omrs-offline-response-body?
|
|
25
|
-
|
|
26
|
-
> `optional` **x-omrs-offline-response-body**: `string`
|
|
27
|
-
|
|
28
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-http-headers.ts:27](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-http-headers.ts#L27)
|
|
29
|
-
|
|
30
|
-
If the client is offline and the request cannot be read from the cache (i.e. if there is no way
|
|
31
|
-
to receive any kind of data for this request), the service worker will return a response with
|
|
32
|
-
the body in this header.
|
|
33
|
-
|
|
34
|
-
***
|
|
35
|
-
|
|
36
|
-
### x-omrs-offline-response-status?
|
|
37
|
-
|
|
38
|
-
> `optional` **x-omrs-offline-response-status**: `` `${number}` ``
|
|
39
|
-
|
|
40
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-http-headers.ts:33](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-http-headers.ts#L33)
|
|
41
|
-
|
|
42
|
-
If the client is offline and the request cannot be read from the cache (i.e. if there is no way
|
|
43
|
-
to receive any kind of data for this request), the service worker will return a response with
|
|
44
|
-
the status code defined in this header.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / getStartedVisit
|
|
2
|
-
|
|
3
|
-
# Variable: ~~getStartedVisit~~
|
|
4
|
-
|
|
5
|
-
> `const` **getStartedVisit**: `BehaviorSubject`\<`null` \| [`VisitItem`](../interfaces/VisitItem.md)\>
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:190](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L190)
|
|
8
|
-
|
|
9
|
-
## Deprecated
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / offlineUuidPrefix
|
|
2
|
-
|
|
3
|
-
# Variable: offlineUuidPrefix
|
|
4
|
-
|
|
5
|
-
> `const` **offlineUuidPrefix**: `"OFFLINE+"` = `'OFFLINE+'`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/uuid-support.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/uuid-support.ts#L4)
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / omrsOfflineCachingStrategyHttpHeaderName
|
|
2
|
-
|
|
3
|
-
# Variable: omrsOfflineCachingStrategyHttpHeaderName
|
|
4
|
-
|
|
5
|
-
> `const` **omrsOfflineCachingStrategyHttpHeaderName**: `"x-omrs-offline-caching-strategy"` = `'x-omrs-offline-caching-strategy'`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-http-headers.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-http-headers.ts#L5)
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / omrsOfflineResponseBodyHttpHeaderName
|
|
2
|
-
|
|
3
|
-
# Variable: omrsOfflineResponseBodyHttpHeaderName
|
|
4
|
-
|
|
5
|
-
> `const` **omrsOfflineResponseBodyHttpHeaderName**: `"x-omrs-offline-response-body"` = `'x-omrs-offline-response-body'`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-http-headers.ts:3](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-http-headers.ts#L3)
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / omrsOfflineResponseStatusHttpHeaderName
|
|
2
|
-
|
|
3
|
-
# Variable: omrsOfflineResponseStatusHttpHeaderName
|
|
4
|
-
|
|
5
|
-
> `const` **omrsOfflineResponseStatusHttpHeaderName**: `"x-omrs-offline-response-status"` = `'x-omrs-offline-response-status'`
|
|
6
|
-
|
|
7
|
-
Defined in: [packages/framework/esm-offline/src/service-worker-http-headers.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-http-headers.ts#L4)
|