@openmrs/esm-framework 3.4.1-pre.96 → 4.0.0-pre.1
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 +69 -95
- package/.turbo/turbo-lint.log +2 -0
- package/.turbo/turbo-test.log +451 -0
- package/.turbo/turbo-typescript.log +2 -0
- package/dist/openmrs-esm-framework.js +1 -1
- package/dist/openmrs-esm-framework.js.LICENSE.txt +23 -13
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +371 -95
- package/docs/interfaces/ConfigurableLinkProps.md +12 -1
- package/docs/interfaces/DynamicOfflineData.md +78 -0
- package/docs/interfaces/DynamicOfflineDataHandler.md +105 -0
- package/docs/interfaces/DynamicOfflineDataSyncState.md +75 -0
- package/docs/interfaces/ErrorStateProps.md +30 -0
- package/docs/interfaces/FHIRCode.md +13 -2
- package/docs/interfaces/FHIRResource.md +3 -0
- package/docs/interfaces/NavigateOptions.md +12 -1
- package/docs/interfaces/OfflinePatientArgs.md +4 -6
- package/docs/interfaces/OfflinePatientDataSyncHandler.md +7 -14
- package/docs/interfaces/OfflinePatientDataSyncState.md +8 -24
- package/docs/interfaces/OfflinePatientDataSyncStore.md +3 -8
- package/docs/interfaces/QueueItemDescriptor.md +4 -4
- package/docs/interfaces/SyncItem.md +7 -7
- package/docs/interfaces/SyncProcessOptions.md +5 -5
- package/docs/interfaces/UserHasAccessProps.md +22 -0
- package/jest.config.js +5 -0
- package/mock.tsx +1 -0
- package/package.json +13 -13
- package/src/integration-tests/extension-config.test.tsx +3 -4
|
@@ -12,14 +12,25 @@
|
|
|
12
12
|
|
|
13
13
|
### Navigation Properties
|
|
14
14
|
|
|
15
|
+
- [templateParams](ConfigurableLinkProps.md#templateparams)
|
|
15
16
|
- [to](ConfigurableLinkProps.md#to)
|
|
16
17
|
|
|
17
18
|
## Navigation Properties
|
|
18
19
|
|
|
20
|
+
### templateParams
|
|
21
|
+
|
|
22
|
+
• `Optional` **templateParams**: [`TemplateParams`](../API.md#templateparams)
|
|
23
|
+
|
|
24
|
+
#### Defined in
|
|
25
|
+
|
|
26
|
+
[packages/framework/esm-react-utils/src/ConfigurableLink.tsx:27](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ConfigurableLink.tsx#L27)
|
|
27
|
+
|
|
28
|
+
___
|
|
29
|
+
|
|
19
30
|
### to
|
|
20
31
|
|
|
21
32
|
• **to**: `string`
|
|
22
33
|
|
|
23
34
|
#### Defined in
|
|
24
35
|
|
|
25
|
-
[packages/framework/esm-react-utils/src/ConfigurableLink.tsx:
|
|
36
|
+
[packages/framework/esm-react-utils/src/ConfigurableLink.tsx:26](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ConfigurableLink.tsx#L26)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / DynamicOfflineData
|
|
2
|
+
|
|
3
|
+
# Interface: DynamicOfflineData
|
|
4
|
+
|
|
5
|
+
Represents the registration of a single dynamic offline data entry.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Offline Properties
|
|
10
|
+
|
|
11
|
+
- [id](DynamicOfflineData.md#id)
|
|
12
|
+
- [identifier](DynamicOfflineData.md#identifier)
|
|
13
|
+
- [syncState](DynamicOfflineData.md#syncstate)
|
|
14
|
+
- [type](DynamicOfflineData.md#type)
|
|
15
|
+
- [users](DynamicOfflineData.md#users)
|
|
16
|
+
|
|
17
|
+
## Offline Properties
|
|
18
|
+
|
|
19
|
+
### id
|
|
20
|
+
|
|
21
|
+
• `Optional` **id**: `number`
|
|
22
|
+
|
|
23
|
+
The internal ID of the data entry, as assigned by the IndexedDB where it is stored.
|
|
24
|
+
|
|
25
|
+
#### Defined in
|
|
26
|
+
|
|
27
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:48](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L48)
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### identifier
|
|
32
|
+
|
|
33
|
+
• **identifier**: `string`
|
|
34
|
+
|
|
35
|
+
The externally provided identifier of the data entry.
|
|
36
|
+
This is typically the ID of the resource as assigned by a remote API.
|
|
37
|
+
|
|
38
|
+
#### Defined in
|
|
39
|
+
|
|
40
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:58](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L58)
|
|
41
|
+
|
|
42
|
+
___
|
|
43
|
+
|
|
44
|
+
### syncState
|
|
45
|
+
|
|
46
|
+
• `Optional` **syncState**: [`DynamicOfflineDataSyncState`](DynamicOfflineDataSyncState.md)
|
|
47
|
+
|
|
48
|
+
If this entry has already been synced, returns the result of that last sync attempt.
|
|
49
|
+
Otherwise this is `undefined`.
|
|
50
|
+
|
|
51
|
+
#### Defined in
|
|
52
|
+
|
|
53
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:67](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L67)
|
|
54
|
+
|
|
55
|
+
___
|
|
56
|
+
|
|
57
|
+
### type
|
|
58
|
+
|
|
59
|
+
• **type**: `string`
|
|
60
|
+
|
|
61
|
+
The underlying type used for categorizing the data entry.
|
|
62
|
+
Examples could be `"patient"` or `"form"`.
|
|
63
|
+
|
|
64
|
+
#### Defined in
|
|
65
|
+
|
|
66
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:53](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L53)
|
|
67
|
+
|
|
68
|
+
___
|
|
69
|
+
|
|
70
|
+
### users
|
|
71
|
+
|
|
72
|
+
• **users**: `string`[]
|
|
73
|
+
|
|
74
|
+
The UUIDs of the users who need this data entry available offline.
|
|
75
|
+
|
|
76
|
+
#### Defined in
|
|
77
|
+
|
|
78
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:62](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L62)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / DynamicOfflineDataHandler
|
|
2
|
+
|
|
3
|
+
# Interface: DynamicOfflineDataHandler
|
|
4
|
+
|
|
5
|
+
A handler for synchronizing dynamically declared offline data.
|
|
6
|
+
Can be setup using the [setupDynamicOfflineDataHandler](../API.md#setupdynamicofflinedatahandler) function.
|
|
7
|
+
|
|
8
|
+
## Table of contents
|
|
9
|
+
|
|
10
|
+
### Offline Properties
|
|
11
|
+
|
|
12
|
+
- [displayName](DynamicOfflineDataHandler.md#displayname)
|
|
13
|
+
- [id](DynamicOfflineDataHandler.md#id)
|
|
14
|
+
- [type](DynamicOfflineDataHandler.md#type)
|
|
15
|
+
|
|
16
|
+
### Methods
|
|
17
|
+
|
|
18
|
+
- [isSynced](DynamicOfflineDataHandler.md#issynced)
|
|
19
|
+
- [sync](DynamicOfflineDataHandler.md#sync)
|
|
20
|
+
|
|
21
|
+
## Offline Properties
|
|
22
|
+
|
|
23
|
+
### displayName
|
|
24
|
+
|
|
25
|
+
• `Optional` **displayName**: `string`
|
|
26
|
+
|
|
27
|
+
A human-readable string representing the handler.
|
|
28
|
+
If provided, the handler can be rendered in the UI using that string.
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:24](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L24)
|
|
33
|
+
|
|
34
|
+
___
|
|
35
|
+
|
|
36
|
+
### id
|
|
37
|
+
|
|
38
|
+
• **id**: `string`
|
|
39
|
+
|
|
40
|
+
A string uniquely identifying the handler.
|
|
41
|
+
|
|
42
|
+
#### Defined in
|
|
43
|
+
|
|
44
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L14)
|
|
45
|
+
|
|
46
|
+
___
|
|
47
|
+
|
|
48
|
+
### type
|
|
49
|
+
|
|
50
|
+
• **type**: `string`
|
|
51
|
+
|
|
52
|
+
The type of offline data handled by this handler.
|
|
53
|
+
See [DynamicOfflineData.type](DynamicOfflineData.md#type) for details.
|
|
54
|
+
|
|
55
|
+
#### Defined in
|
|
56
|
+
|
|
57
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:19](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L19)
|
|
58
|
+
|
|
59
|
+
## Methods
|
|
60
|
+
|
|
61
|
+
### isSynced
|
|
62
|
+
|
|
63
|
+
▸ **isSynced**(`identifier`, `abortSignal?`): `Promise`<`boolean`\>
|
|
64
|
+
|
|
65
|
+
Evaluates whether the given offline data is correctly synced at this point in time from the perspective
|
|
66
|
+
of this single handler.
|
|
67
|
+
If `false`, the handler would have to (re-)sync the data in order for offline mode to properly work.
|
|
68
|
+
|
|
69
|
+
#### Parameters
|
|
70
|
+
|
|
71
|
+
| Name | Type | Description |
|
|
72
|
+
| :------ | :------ | :------ |
|
|
73
|
+
| `identifier` | `string` | The identifier of the offline data. See [DynamicOfflineData](DynamicOfflineData.md) for details. |
|
|
74
|
+
| `abortSignal?` | `AbortSignal` | An {@link AbortSignal} which can be used to cancel the operation. |
|
|
75
|
+
|
|
76
|
+
#### Returns
|
|
77
|
+
|
|
78
|
+
`Promise`<`boolean`\>
|
|
79
|
+
|
|
80
|
+
#### Defined in
|
|
81
|
+
|
|
82
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:32](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L32)
|
|
83
|
+
|
|
84
|
+
___
|
|
85
|
+
|
|
86
|
+
### sync
|
|
87
|
+
|
|
88
|
+
▸ **sync**(`identifier`, `abortSignal?`): `Promise`<`void`\>
|
|
89
|
+
|
|
90
|
+
Synchronizes the given offline data.
|
|
91
|
+
|
|
92
|
+
#### Parameters
|
|
93
|
+
|
|
94
|
+
| Name | Type | Description |
|
|
95
|
+
| :------ | :------ | :------ |
|
|
96
|
+
| `identifier` | `string` | The identifier of the offline data. See [DynamicOfflineData](DynamicOfflineData.md) for details. |
|
|
97
|
+
| `abortSignal?` | `AbortSignal` | An {@link AbortSignal} which can be used to cancel the operation. |
|
|
98
|
+
|
|
99
|
+
#### Returns
|
|
100
|
+
|
|
101
|
+
`Promise`<`void`\>
|
|
102
|
+
|
|
103
|
+
#### Defined in
|
|
104
|
+
|
|
105
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L38)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / DynamicOfflineDataSyncState
|
|
2
|
+
|
|
3
|
+
# Interface: DynamicOfflineDataSyncState
|
|
4
|
+
|
|
5
|
+
Represents the result of syncing a given [DynamicOfflineData](DynamicOfflineData.md) entry.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Offline Properties
|
|
10
|
+
|
|
11
|
+
- [erroredHandlers](DynamicOfflineDataSyncState.md#erroredhandlers)
|
|
12
|
+
- [errors](DynamicOfflineDataSyncState.md#errors)
|
|
13
|
+
- [succeededHandlers](DynamicOfflineDataSyncState.md#succeededhandlers)
|
|
14
|
+
- [syncedBy](DynamicOfflineDataSyncState.md#syncedby)
|
|
15
|
+
- [syncedOn](DynamicOfflineDataSyncState.md#syncedon)
|
|
16
|
+
|
|
17
|
+
## Offline Properties
|
|
18
|
+
|
|
19
|
+
### erroredHandlers
|
|
20
|
+
|
|
21
|
+
• **erroredHandlers**: `string`[]
|
|
22
|
+
|
|
23
|
+
The IDs of the handlers which failed to synchronize their data.
|
|
24
|
+
|
|
25
|
+
#### Defined in
|
|
26
|
+
|
|
27
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:89](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L89)
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### errors
|
|
32
|
+
|
|
33
|
+
• **errors**: { `handlerId`: `string` ; `message`: `string` }[]
|
|
34
|
+
|
|
35
|
+
A collection of the errors caught while synchronizing, per handler.
|
|
36
|
+
|
|
37
|
+
#### Defined in
|
|
38
|
+
|
|
39
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:93](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L93)
|
|
40
|
+
|
|
41
|
+
___
|
|
42
|
+
|
|
43
|
+
### succeededHandlers
|
|
44
|
+
|
|
45
|
+
• **succeededHandlers**: `string`[]
|
|
46
|
+
|
|
47
|
+
The IDs of the handlers which successfully synchronized their data.
|
|
48
|
+
|
|
49
|
+
#### Defined in
|
|
50
|
+
|
|
51
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:85](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L85)
|
|
52
|
+
|
|
53
|
+
___
|
|
54
|
+
|
|
55
|
+
### syncedBy
|
|
56
|
+
|
|
57
|
+
• **syncedBy**: `string`
|
|
58
|
+
|
|
59
|
+
The ID of the user who has triggered the data synchronization.
|
|
60
|
+
|
|
61
|
+
#### Defined in
|
|
62
|
+
|
|
63
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:81](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L81)
|
|
64
|
+
|
|
65
|
+
___
|
|
66
|
+
|
|
67
|
+
### syncedOn
|
|
68
|
+
|
|
69
|
+
• **syncedOn**: `Date`
|
|
70
|
+
|
|
71
|
+
The time when the entry has been synced the last time.
|
|
72
|
+
|
|
73
|
+
#### Defined in
|
|
74
|
+
|
|
75
|
+
[packages/framework/esm-offline/src/dynamic-offline-data.ts:77](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L77)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / ErrorStateProps
|
|
2
|
+
|
|
3
|
+
# Interface: ErrorStateProps
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [error](ErrorStateProps.md#error)
|
|
10
|
+
- [headerTitle](ErrorStateProps.md#headertitle)
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### error
|
|
15
|
+
|
|
16
|
+
• **error**: `any`
|
|
17
|
+
|
|
18
|
+
#### Defined in
|
|
19
|
+
|
|
20
|
+
[packages/framework/esm-styleguide/src/error-state/error-state.component.tsx:8](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/error-state/error-state.component.tsx#L8)
|
|
21
|
+
|
|
22
|
+
___
|
|
23
|
+
|
|
24
|
+
### headerTitle
|
|
25
|
+
|
|
26
|
+
• **headerTitle**: `string`
|
|
27
|
+
|
|
28
|
+
#### Defined in
|
|
29
|
+
|
|
30
|
+
[packages/framework/esm-styleguide/src/error-state/error-state.component.tsx:9](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/error-state/error-state.component.tsx#L9)
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
### Properties
|
|
8
8
|
|
|
9
9
|
- [code](FHIRCode.md#code)
|
|
10
|
+
- [display](FHIRCode.md#display)
|
|
10
11
|
- [system](FHIRCode.md#system)
|
|
11
12
|
|
|
12
13
|
## Properties
|
|
@@ -17,7 +18,17 @@
|
|
|
17
18
|
|
|
18
19
|
#### Defined in
|
|
19
20
|
|
|
20
|
-
[packages/framework/esm-api/src/types/fhir-resource.ts:
|
|
21
|
+
[packages/framework/esm-api/src/types/fhir-resource.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/fhir-resource.ts#L29)
|
|
22
|
+
|
|
23
|
+
___
|
|
24
|
+
|
|
25
|
+
### display
|
|
26
|
+
|
|
27
|
+
• `Optional` **display**: `string`
|
|
28
|
+
|
|
29
|
+
#### Defined in
|
|
30
|
+
|
|
31
|
+
[packages/framework/esm-api/src/types/fhir-resource.ts:31](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/fhir-resource.ts#L31)
|
|
21
32
|
|
|
22
33
|
___
|
|
23
34
|
|
|
@@ -27,4 +38,4 @@ ___
|
|
|
27
38
|
|
|
28
39
|
#### Defined in
|
|
29
40
|
|
|
30
|
-
[packages/framework/esm-api/src/types/fhir-resource.ts:
|
|
41
|
+
[packages/framework/esm-api/src/types/fhir-resource.ts:30](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/fhir-resource.ts#L30)
|
|
@@ -38,8 +38,11 @@
|
|
|
38
38
|
| `subject.identifier.value` | `string` |
|
|
39
39
|
| `subject.reference` | `string` |
|
|
40
40
|
| `subject.type` | `string` |
|
|
41
|
+
| `valueCodeableConcept` | { `coding`: [`FHIRCode`](FHIRCode.md)[] } |
|
|
42
|
+
| `valueCodeableConcept.coding` | [`FHIRCode`](FHIRCode.md)[] |
|
|
41
43
|
| `valueQuantity` | { `value`: `number` } |
|
|
42
44
|
| `valueQuantity.value` | `number` |
|
|
45
|
+
| `valueString` | `string` |
|
|
43
46
|
|
|
44
47
|
#### Defined in
|
|
45
48
|
|
|
@@ -6,14 +6,25 @@
|
|
|
6
6
|
|
|
7
7
|
### Navigation Properties
|
|
8
8
|
|
|
9
|
+
- [templateParams](NavigateOptions.md#templateparams)
|
|
9
10
|
- [to](NavigateOptions.md#to)
|
|
10
11
|
|
|
11
12
|
## Navigation Properties
|
|
12
13
|
|
|
14
|
+
### templateParams
|
|
15
|
+
|
|
16
|
+
• `Optional` **templateParams**: [`TemplateParams`](../API.md#templateparams)
|
|
17
|
+
|
|
18
|
+
#### Defined in
|
|
19
|
+
|
|
20
|
+
[packages/framework/esm-config/src/navigation/navigate.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/navigate.ts#L14)
|
|
21
|
+
|
|
22
|
+
___
|
|
23
|
+
|
|
13
24
|
### to
|
|
14
25
|
|
|
15
26
|
• **to**: `string`
|
|
16
27
|
|
|
17
28
|
#### Defined in
|
|
18
29
|
|
|
19
|
-
[packages/framework/esm-config/src/navigation/navigate.ts:
|
|
30
|
+
[packages/framework/esm-config/src/navigation/navigate.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/navigate.ts#L13)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: OfflinePatientArgs
|
|
4
4
|
|
|
5
|
+
**`deprecated`** Will be removed once all modules have been migrated to the new dynamic offline data API.
|
|
6
|
+
|
|
5
7
|
## Table of contents
|
|
6
8
|
|
|
7
9
|
### Offline Properties
|
|
@@ -15,11 +17,9 @@
|
|
|
15
17
|
|
|
16
18
|
• **patientUuid**: `string`
|
|
17
19
|
|
|
18
|
-
The UUID of the patient that should be made available offline.
|
|
19
|
-
|
|
20
20
|
#### Defined in
|
|
21
21
|
|
|
22
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
22
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:32](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L32)
|
|
23
23
|
|
|
24
24
|
___
|
|
25
25
|
|
|
@@ -27,8 +27,6 @@ ___
|
|
|
27
27
|
|
|
28
28
|
• **signal**: `AbortSignal`
|
|
29
29
|
|
|
30
|
-
An {@link AbortSignal} which notifies about the cancellation of the operation.
|
|
31
|
-
|
|
32
30
|
#### Defined in
|
|
33
31
|
|
|
34
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
32
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:33](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L33)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: OfflinePatientDataSyncHandler
|
|
4
4
|
|
|
5
|
+
**`deprecated`** Will be removed once all modules have been migrated to the new dynamic offline data API.
|
|
6
|
+
|
|
5
7
|
## Table of contents
|
|
6
8
|
|
|
7
9
|
### Offline Properties
|
|
@@ -18,12 +20,9 @@
|
|
|
18
20
|
|
|
19
21
|
• `Readonly` **displayName**: `string`
|
|
20
22
|
|
|
21
|
-
A name of the handler registration which can be displayed to the user.
|
|
22
|
-
This is ideally translated.
|
|
23
|
-
|
|
24
23
|
#### Defined in
|
|
25
24
|
|
|
26
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
25
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:26](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L26)
|
|
27
26
|
|
|
28
27
|
## Methods
|
|
29
28
|
|
|
@@ -31,22 +30,16 @@ This is ideally translated.
|
|
|
31
30
|
|
|
32
31
|
▸ **onOfflinePatientAdded**(`args`): `Promise`<`void`\>
|
|
33
32
|
|
|
34
|
-
A function which is invoked when a patient is added to the app's offline patient cache.
|
|
35
|
-
Signals to the handler that the patient's data must be made available offline.
|
|
36
|
-
|
|
37
33
|
#### Parameters
|
|
38
34
|
|
|
39
|
-
| Name | Type |
|
|
40
|
-
| :------ | :------ |
|
|
41
|
-
| `args` | [`OfflinePatientArgs`](OfflinePatientArgs.md) |
|
|
35
|
+
| Name | Type |
|
|
36
|
+
| :------ | :------ |
|
|
37
|
+
| `args` | [`OfflinePatientArgs`](OfflinePatientArgs.md) |
|
|
42
38
|
|
|
43
39
|
#### Returns
|
|
44
40
|
|
|
45
41
|
`Promise`<`void`\>
|
|
46
42
|
|
|
47
|
-
A promise which should resolve if all data could be cached and reject when there was an issue
|
|
48
|
-
caching the data.
|
|
49
|
-
|
|
50
43
|
#### Defined in
|
|
51
44
|
|
|
52
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
45
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:27](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L27)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: OfflinePatientDataSyncState
|
|
4
4
|
|
|
5
|
+
**`deprecated`** Will be removed once all modules have been migrated to the new dynamic offline data API.
|
|
6
|
+
|
|
5
7
|
## Table of contents
|
|
6
8
|
|
|
7
9
|
### Offline Properties
|
|
@@ -22,11 +24,9 @@
|
|
|
22
24
|
|
|
23
25
|
• `Readonly` **errors**: `Record`<`string`, `string`\>
|
|
24
26
|
|
|
25
|
-
A set of error messages associated with the identifers of the failed handlers.
|
|
26
|
-
|
|
27
27
|
#### Defined in
|
|
28
28
|
|
|
29
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
29
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:20](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L20)
|
|
30
30
|
|
|
31
31
|
___
|
|
32
32
|
|
|
@@ -34,12 +34,9 @@ ___
|
|
|
34
34
|
|
|
35
35
|
• `Readonly` **failedHandlers**: `string`[]
|
|
36
36
|
|
|
37
|
-
A list of the data sync handler registration identifiers which failed to synchronize the
|
|
38
|
-
patient's data.
|
|
39
|
-
|
|
40
37
|
#### Defined in
|
|
41
38
|
|
|
42
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
39
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:19](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L19)
|
|
43
40
|
|
|
44
41
|
___
|
|
45
42
|
|
|
@@ -47,12 +44,9 @@ ___
|
|
|
47
44
|
|
|
48
45
|
• `Readonly` **syncedHandlers**: `string`[]
|
|
49
46
|
|
|
50
|
-
A list of the data sync handler registration identifiers which successfully synchronized the
|
|
51
|
-
patient's data.
|
|
52
|
-
|
|
53
47
|
#### Defined in
|
|
54
48
|
|
|
55
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
49
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:18](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L18)
|
|
56
50
|
|
|
57
51
|
___
|
|
58
52
|
|
|
@@ -60,12 +54,9 @@ ___
|
|
|
60
54
|
|
|
61
55
|
• `Readonly` **syncingHandlers**: `string`[]
|
|
62
56
|
|
|
63
|
-
A list of the data sync handler registration identifiers which are still in the process
|
|
64
|
-
of synchronizing the patient's data.
|
|
65
|
-
|
|
66
57
|
#### Defined in
|
|
67
58
|
|
|
68
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
59
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:17](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L17)
|
|
69
60
|
|
|
70
61
|
___
|
|
71
62
|
|
|
@@ -73,11 +64,9 @@ ___
|
|
|
73
64
|
|
|
74
65
|
• `Readonly` **timestamp**: `Date`
|
|
75
66
|
|
|
76
|
-
The time when this state snapshot was initially created.
|
|
77
|
-
|
|
78
67
|
#### Defined in
|
|
79
68
|
|
|
80
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
69
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L16)
|
|
81
70
|
|
|
82
71
|
## Methods
|
|
83
72
|
|
|
@@ -85,15 +74,10 @@ The time when this state snapshot was initially created.
|
|
|
85
74
|
|
|
86
75
|
▸ **abort**(): `boolean`
|
|
87
76
|
|
|
88
|
-
Aborts the process of downloading data.
|
|
89
|
-
|
|
90
77
|
#### Returns
|
|
91
78
|
|
|
92
79
|
`boolean`
|
|
93
80
|
|
|
94
|
-
`true` if the cancellation could be triggered (that is, if there were any syncing handlers);
|
|
95
|
-
`false` if not.
|
|
96
|
-
|
|
97
81
|
#### Defined in
|
|
98
82
|
|
|
99
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
83
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:21](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L21)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: OfflinePatientDataSyncStore
|
|
4
4
|
|
|
5
|
+
**`deprecated`** Will be removed once all modules have been migrated to the new dynamic offline data API.
|
|
6
|
+
|
|
5
7
|
## Table of contents
|
|
6
8
|
|
|
7
9
|
### Offline Properties
|
|
@@ -15,13 +17,9 @@
|
|
|
15
17
|
|
|
16
18
|
• **handlers**: `Record`<`string`, [`OfflinePatientDataSyncHandler`](OfflinePatientDataSyncHandler.md)\>
|
|
17
19
|
|
|
18
|
-
Holds the list of currently registered handlers which deal with patients that should be available offline.
|
|
19
|
-
The key is a unique identifier which, once defined, should never change as it gives identity to
|
|
20
|
-
the handler registration.
|
|
21
|
-
|
|
22
20
|
#### Defined in
|
|
23
21
|
|
|
24
|
-
[packages/framework/esm-offline/src/offline-patient-data.ts:
|
|
22
|
+
[packages/framework/esm-offline/src/offline-patient-data.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L11)
|
|
25
23
|
|
|
26
24
|
___
|
|
27
25
|
|
|
@@ -29,9 +27,6 @@ ___
|
|
|
29
27
|
|
|
30
28
|
• **offlinePatientDataSyncState**: `Record`<`string`, [`OfflinePatientDataSyncState`](OfflinePatientDataSyncState.md)\>
|
|
31
29
|
|
|
32
|
-
For each patient ID of the patients whose data is currently made available offline, provides
|
|
33
|
-
the current data synchronizaton state.
|
|
34
|
-
|
|
35
30
|
#### Defined in
|
|
36
31
|
|
|
37
32
|
[packages/framework/esm-offline/src/offline-patient-data.ts:10](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L10)
|
|
@@ -24,7 +24,7 @@ locations to better represent the sync item, e.g. in the UI.
|
|
|
24
24
|
|
|
25
25
|
#### Defined in
|
|
26
26
|
|
|
27
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
27
|
+
[packages/framework/esm-offline/src/sync.ts:33](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L33)
|
|
28
28
|
|
|
29
29
|
___
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ ___
|
|
|
34
34
|
|
|
35
35
|
#### Defined in
|
|
36
36
|
|
|
37
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
37
|
+
[packages/framework/esm-offline/src/sync.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L38)
|
|
38
38
|
|
|
39
39
|
___
|
|
40
40
|
|
|
@@ -44,7 +44,7 @@ ___
|
|
|
44
44
|
|
|
45
45
|
#### Defined in
|
|
46
46
|
|
|
47
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
47
|
+
[packages/framework/esm-offline/src/sync.ts:32](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L32)
|
|
48
48
|
|
|
49
49
|
___
|
|
50
50
|
|
|
@@ -54,4 +54,4 @@ ___
|
|
|
54
54
|
|
|
55
55
|
#### Defined in
|
|
56
56
|
|
|
57
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
57
|
+
[packages/framework/esm-offline/src/sync.ts:37](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L37)
|