@openmrs/esm-framework 3.1.10-pre.92 → 3.1.11-pre.597

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +2 -8
  2. package/dist/openmrs-esm-framework.js +2 -21
  3. package/dist/openmrs-esm-framework.js.LICENSE.txt +16 -0
  4. package/dist/openmrs-esm-framework.js.map +1 -1
  5. package/docs/API.md +4381 -0
  6. package/docs/classes/OpenmrsFetchError.md +186 -0
  7. package/docs/enums/Type.md +85 -0
  8. package/docs/enums/VisitMode.md +41 -0
  9. package/docs/enums/VisitStatus.md +30 -0
  10. package/docs/interfaces/AppState.md +3 -0
  11. package/docs/interfaces/BreadcrumbRegistration.md +30 -0
  12. package/docs/interfaces/BreadcrumbSettings.md +70 -0
  13. package/docs/interfaces/CancelLoading.md +17 -0
  14. package/docs/interfaces/ClearDynamicRoutesMessage.md +29 -0
  15. package/docs/interfaces/ComponentConfig.md +30 -0
  16. package/docs/interfaces/ComponentDecoratorOptions.md +52 -0
  17. package/docs/interfaces/ComponentDefinition.md +101 -0
  18. package/docs/interfaces/Config.md +182 -0
  19. package/docs/interfaces/ConfigObject.md +182 -0
  20. package/docs/interfaces/ConfigSchema.md +45 -0
  21. package/docs/interfaces/ConfigStore.md +34 -0
  22. package/docs/interfaces/ConfigurableLinkProps.md +25 -0
  23. package/docs/interfaces/ConnectivityChangedEvent.md +19 -0
  24. package/docs/interfaces/CurrentPatientOptions.md +27 -0
  25. package/docs/interfaces/CurrentUserOptions.md +27 -0
  26. package/docs/interfaces/CurrentUserWithResponseOption.md +29 -0
  27. package/docs/interfaces/CurrentUserWithoutResponseOption.md +29 -0
  28. package/docs/interfaces/ExtensionComponentDefinition.md +153 -0
  29. package/docs/interfaces/ExtensionData.md +41 -0
  30. package/docs/interfaces/ExtensionDetails.md +81 -0
  31. package/docs/interfaces/ExtensionInfo.md +140 -0
  32. package/docs/interfaces/ExtensionInstance.md +19 -0
  33. package/docs/interfaces/ExtensionMeta.md +7 -0
  34. package/docs/interfaces/ExtensionProps.md +44 -0
  35. package/docs/interfaces/ExtensionRegistration.md +98 -0
  36. package/docs/interfaces/ExtensionSlotBaseProps.md +54 -0
  37. package/docs/interfaces/ExtensionSlotConfig.md +52 -0
  38. package/docs/interfaces/ExtensionSlotConfigObject.md +41 -0
  39. package/docs/interfaces/ExtensionSlotConfigsStore.md +32 -0
  40. package/docs/interfaces/ExtensionSlotConfigureValueObject.md +7 -0
  41. package/docs/interfaces/ExtensionSlotInfo.md +50 -0
  42. package/docs/interfaces/ExtensionSlotInstance.md +51 -0
  43. package/docs/interfaces/ExtensionStore.md +34 -0
  44. package/docs/interfaces/FHIRCode.md +30 -0
  45. package/docs/interfaces/FHIRRequestObj.md +41 -0
  46. package/docs/interfaces/FHIRResource.md +46 -0
  47. package/docs/interfaces/FetchHeaders.md +7 -0
  48. package/docs/interfaces/FetchResponse.md +285 -0
  49. package/docs/interfaces/ImplementerToolsConfigStore.md +19 -0
  50. package/docs/interfaces/ImportMap.md +19 -0
  51. package/docs/interfaces/LegacyAppExtensionDefinition.md +170 -0
  52. package/docs/interfaces/Lifecycle.md +68 -0
  53. package/docs/interfaces/Location.md +41 -0
  54. package/docs/interfaces/LoggedInUser.md +133 -0
  55. package/docs/interfaces/LoggedInUserFetchResponse.md +281 -0
  56. package/docs/interfaces/MessageServiceWorkerResult.md +47 -0
  57. package/docs/interfaces/ModernAppExtensionDefinition.md +196 -0
  58. package/docs/interfaces/NavigateOptions.md +19 -0
  59. package/docs/interfaces/NavigationContext.md +50 -0
  60. package/docs/interfaces/NetworkRequestFailedEvent.md +49 -0
  61. package/docs/interfaces/NewVisitPayload.md +74 -0
  62. package/docs/interfaces/OfflinePatientArgs.md +34 -0
  63. package/docs/interfaces/OfflinePatientDataSyncHandler.md +52 -0
  64. package/docs/interfaces/OfflinePatientDataSyncState.md +99 -0
  65. package/docs/interfaces/OfflinePatientDataSyncStore.md +37 -0
  66. package/docs/interfaces/OfflineSynchronizationStore.md +27 -0
  67. package/docs/interfaces/OmrsServiceWorkerEvent.md +31 -0
  68. package/docs/interfaces/OmrsServiceWorkerMessage.md +35 -0
  69. package/docs/interfaces/OnImportMapChangedMessage.md +40 -0
  70. package/docs/interfaces/OnlyThePatient.md +29 -0
  71. package/docs/interfaces/OpenmrsReactComponentProps.md +19 -0
  72. package/docs/interfaces/OpenmrsReactComponentState.md +41 -0
  73. package/docs/interfaces/OpenmrsResource.md +34 -0
  74. package/docs/interfaces/PageDefinition.md +149 -0
  75. package/docs/interfaces/PatientWithFullResponse.md +29 -0
  76. package/docs/interfaces/Person.md +41 -0
  77. package/docs/interfaces/PrecacheStaticDependenciesEvent.md +3 -0
  78. package/docs/interfaces/Privilege.md +41 -0
  79. package/docs/interfaces/QueueItemDescriptor.md +52 -0
  80. package/docs/interfaces/RegisterDynamicRouteMessage.md +51 -0
  81. package/docs/interfaces/ResourceLoader.md +23 -0
  82. package/docs/interfaces/RetryOptions.md +83 -0
  83. package/docs/interfaces/Role.md +41 -0
  84. package/docs/interfaces/SessionLocation.md +41 -0
  85. package/docs/interfaces/SessionUser.md +92 -0
  86. package/docs/interfaces/ShowNotificationEvent.md +63 -0
  87. package/docs/interfaces/ShowToastEvent.md +52 -0
  88. package/docs/interfaces/SpaConfig.md +77 -0
  89. package/docs/interfaces/SyncItem.md +92 -0
  90. package/docs/interfaces/SyncProcessOptions.md +69 -0
  91. package/docs/interfaces/UnauthenticatedUser.md +52 -0
  92. package/docs/interfaces/User.md +107 -0
  93. package/docs/interfaces/UserHasAccessProps.md +19 -0
  94. package/docs/interfaces/Visit.md +111 -0
  95. package/docs/interfaces/VisitItem.md +52 -0
  96. package/docs/interfaces/VisitType.md +41 -0
  97. package/docs/interfaces/WorkspaceItem.md +74 -0
  98. package/mock.tsx +253 -0
  99. package/package.json +15 -12
  100. package/src/index.ts +3 -1
  101. package/tsconfig.json +1 -0
  102. package/typedoc.json +7 -0
  103. package/webpack.config.js +4 -10
  104. package/src/set-public-path.ts +0 -3
  105. package/src/types.ts +0 -19
@@ -0,0 +1,47 @@
1
+ [@openmrs/esm-framework](../API.md) / MessageServiceWorkerResult
2
+
3
+ # Interface: MessageServiceWorkerResult<T\>
4
+
5
+ ## Type parameters
6
+
7
+ | Name |
8
+ | :------ |
9
+ | `T` |
10
+
11
+ ## Table of contents
12
+
13
+ ### Properties
14
+
15
+ - [error](MessageServiceWorkerResult.md#error)
16
+ - [result](MessageServiceWorkerResult.md#result)
17
+ - [success](MessageServiceWorkerResult.md#success)
18
+
19
+ ## Properties
20
+
21
+ ### error
22
+
23
+ • `Optional` **error**: `string`
24
+
25
+ #### Defined in
26
+
27
+ [packages/framework/esm-offline/src/service-worker-messaging.ts:51](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-messaging.ts#L51)
28
+
29
+ ___
30
+
31
+ ### result
32
+
33
+ • `Optional` **result**: `T`
34
+
35
+ #### Defined in
36
+
37
+ [packages/framework/esm-offline/src/service-worker-messaging.ts:50](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-messaging.ts#L50)
38
+
39
+ ___
40
+
41
+ ### success
42
+
43
+ • **success**: `boolean`
44
+
45
+ #### Defined in
46
+
47
+ [packages/framework/esm-offline/src/service-worker-messaging.ts:49](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-messaging.ts#L49)
@@ -0,0 +1,196 @@
1
+ [@openmrs/esm-framework](../API.md) / ModernAppExtensionDefinition
2
+
3
+ # Interface: ModernAppExtensionDefinition
4
+
5
+ ## Hierarchy
6
+
7
+ - [`ExtensionComponentDefinition`](ExtensionComponentDefinition.md)
8
+
9
+ ↳ **`ModernAppExtensionDefinition`**
10
+
11
+ ## Table of contents
12
+
13
+ ### Properties
14
+
15
+ - [appName](ModernAppExtensionDefinition.md#appname)
16
+ - [id](ModernAppExtensionDefinition.md#id)
17
+ - [meta](ModernAppExtensionDefinition.md#meta)
18
+ - [offline](ModernAppExtensionDefinition.md#offline)
19
+ - [online](ModernAppExtensionDefinition.md#online)
20
+ - [order](ModernAppExtensionDefinition.md#order)
21
+ - [privilege](ModernAppExtensionDefinition.md#privilege)
22
+ - [resources](ModernAppExtensionDefinition.md#resources)
23
+ - [slot](ModernAppExtensionDefinition.md#slot)
24
+ - [slots](ModernAppExtensionDefinition.md#slots)
25
+
26
+ ### Methods
27
+
28
+ - [load](ModernAppExtensionDefinition.md#load)
29
+
30
+ ## Properties
31
+
32
+ ### appName
33
+
34
+ • **appName**: `string`
35
+
36
+ The module/app that defines the component
37
+
38
+ #### Inherited from
39
+
40
+ [ExtensionComponentDefinition](ExtensionComponentDefinition.md).[appName](ExtensionComponentDefinition.md#appname)
41
+
42
+ #### Defined in
43
+
44
+ [packages/framework/esm-globals/src/types.ts:86](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L86)
45
+
46
+ ___
47
+
48
+ ### id
49
+
50
+ • **id**: `string`
51
+
52
+ The ID of the extension to register.
53
+
54
+ #### Defined in
55
+
56
+ [packages/framework/esm-globals/src/types.ts:125](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L125)
57
+
58
+ ___
59
+
60
+ ### meta
61
+
62
+ • `Optional` **meta**: `Record`<`string`, `any`\>
63
+
64
+ The meta data used for reflection by other components.
65
+
66
+ #### Inherited from
67
+
68
+ [ExtensionComponentDefinition](ExtensionComponentDefinition.md).[meta](ExtensionComponentDefinition.md#meta)
69
+
70
+ #### Defined in
71
+
72
+ [packages/framework/esm-globals/src/types.ts:113](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L113)
73
+
74
+ ___
75
+
76
+ ### offline
77
+
78
+ • `Optional` **offline**: `boolean` \| `object`
79
+
80
+ Defines the offline support / properties of the component.
81
+
82
+ #### Inherited from
83
+
84
+ [ExtensionComponentDefinition](ExtensionComponentDefinition.md).[offline](ExtensionComponentDefinition.md#offline)
85
+
86
+ #### Defined in
87
+
88
+ [packages/framework/esm-globals/src/types.ts:98](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L98)
89
+
90
+ ___
91
+
92
+ ### online
93
+
94
+ • `Optional` **online**: `boolean` \| `object`
95
+
96
+ Defines the online support / properties of the component.
97
+
98
+ #### Inherited from
99
+
100
+ [ExtensionComponentDefinition](ExtensionComponentDefinition.md).[online](ExtensionComponentDefinition.md#online)
101
+
102
+ #### Defined in
103
+
104
+ [packages/framework/esm-globals/src/types.ts:94](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L94)
105
+
106
+ ___
107
+
108
+ ### order
109
+
110
+ • `Optional` **order**: `number`
111
+
112
+ Specifies a preferred order number, if any.
113
+
114
+ #### Inherited from
115
+
116
+ [ExtensionComponentDefinition](ExtensionComponentDefinition.md).[order](ExtensionComponentDefinition.md#order)
117
+
118
+ #### Defined in
119
+
120
+ [packages/framework/esm-globals/src/types.ts:117](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L117)
121
+
122
+ ___
123
+
124
+ ### privilege
125
+
126
+ • `Optional` **privilege**: `string`
127
+
128
+ Defines the access privilege required for this component, if any.
129
+
130
+ #### Inherited from
131
+
132
+ [ExtensionComponentDefinition](ExtensionComponentDefinition.md).[privilege](ExtensionComponentDefinition.md#privilege)
133
+
134
+ #### Defined in
135
+
136
+ [packages/framework/esm-globals/src/types.ts:102](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L102)
137
+
138
+ ___
139
+
140
+ ### resources
141
+
142
+ • `Optional` **resources**: `Record`<`string`, [`ResourceLoader`](ResourceLoader.md)<`any`\>\>
143
+
144
+ Defines resources that are loaded when the component should mount.
145
+
146
+ #### Inherited from
147
+
148
+ [ExtensionComponentDefinition](ExtensionComponentDefinition.md).[resources](ExtensionComponentDefinition.md#resources)
149
+
150
+ #### Defined in
151
+
152
+ [packages/framework/esm-globals/src/types.ts:106](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L106)
153
+
154
+ ___
155
+
156
+ ### slot
157
+
158
+ • `Optional` **slot**: `string`
159
+
160
+ The slot of the extension to optionally attach to.
161
+
162
+ #### Defined in
163
+
164
+ [packages/framework/esm-globals/src/types.ts:129](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L129)
165
+
166
+ ___
167
+
168
+ ### slots
169
+
170
+ • `Optional` **slots**: `string`[]
171
+
172
+ The slots of the extension to optionally attach to.
173
+
174
+ #### Defined in
175
+
176
+ [packages/framework/esm-globals/src/types.ts:133](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L133)
177
+
178
+ ## Methods
179
+
180
+ ### load
181
+
182
+ ▸ **load**(): `Promise`<`any`\>
183
+
184
+ Defines a function to use for actually loading the component's lifecycle.
185
+
186
+ #### Returns
187
+
188
+ `Promise`<`any`\>
189
+
190
+ #### Inherited from
191
+
192
+ [ExtensionComponentDefinition](ExtensionComponentDefinition.md).[load](ExtensionComponentDefinition.md#load)
193
+
194
+ #### Defined in
195
+
196
+ [packages/framework/esm-globals/src/types.ts:90](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-globals/src/types.ts#L90)
@@ -0,0 +1,19 @@
1
+ [@openmrs/esm-framework](../API.md) / NavigateOptions
2
+
3
+ # Interface: NavigateOptions
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [to](NavigateOptions.md#to)
10
+
11
+ ## Properties
12
+
13
+ ### to
14
+
15
+ • **to**: `string`
16
+
17
+ #### Defined in
18
+
19
+ [packages/framework/esm-config/src/navigation/navigate.ts:10](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/navigate.ts#L10)
@@ -0,0 +1,50 @@
1
+ [@openmrs/esm-framework](../API.md) / NavigationContext
2
+
3
+ # Interface: NavigationContext
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [type](NavigationContext.md#type)
10
+
11
+ ### Methods
12
+
13
+ - [handler](NavigationContext.md#handler)
14
+
15
+ ## Properties
16
+
17
+ ### type
18
+
19
+ • **type**: [`NavigationContextType`](../API.md#navigationcontexttype)
20
+
21
+ #### Defined in
22
+
23
+ [packages/framework/esm-extensions/src/contexts.ts:6](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/contexts.ts#L6)
24
+
25
+ ## Methods
26
+
27
+ ### handler
28
+
29
+ ▸ **handler**<`T`\>(`link`, `state`): `boolean`
30
+
31
+ #### Type parameters
32
+
33
+ | Name | Type |
34
+ | :------ | :------ |
35
+ | `T` | `any` |
36
+
37
+ #### Parameters
38
+
39
+ | Name | Type |
40
+ | :------ | :------ |
41
+ | `link` | `string` |
42
+ | `state` | `T` |
43
+
44
+ #### Returns
45
+
46
+ `boolean`
47
+
48
+ #### Defined in
49
+
50
+ [packages/framework/esm-extensions/src/contexts.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/contexts.ts#L7)
@@ -0,0 +1,49 @@
1
+ [@openmrs/esm-framework](../API.md) / NetworkRequestFailedEvent
2
+
3
+ # Interface: NetworkRequestFailedEvent
4
+
5
+ ## Hierarchy
6
+
7
+ - [`OmrsServiceWorkerEvent`](OmrsServiceWorkerEvent.md)<``"networkRequestFailed"``\>
8
+
9
+ ↳ **`NetworkRequestFailedEvent`**
10
+
11
+ ## Table of contents
12
+
13
+ ### Properties
14
+
15
+ - [request](NetworkRequestFailedEvent.md#request)
16
+ - [type](NetworkRequestFailedEvent.md#type)
17
+
18
+ ## Properties
19
+
20
+ ### request
21
+
22
+ • **request**: `Object`
23
+
24
+ #### Type declaration
25
+
26
+ | Name | Type |
27
+ | :------ | :------ |
28
+ | `body` | `string` |
29
+ | `headers` | `Record`<`string`, `string`\> |
30
+ | `method` | `string` |
31
+ | `url` | `string` |
32
+
33
+ #### Defined in
34
+
35
+ [packages/framework/esm-offline/src/service-worker-events.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-events.ts#L7)
36
+
37
+ ___
38
+
39
+ ### type
40
+
41
+ • **type**: ``"networkRequestFailed"``
42
+
43
+ #### Inherited from
44
+
45
+ [OmrsServiceWorkerEvent](OmrsServiceWorkerEvent.md).[type](OmrsServiceWorkerEvent.md#type)
46
+
47
+ #### Defined in
48
+
49
+ [packages/framework/esm-offline/src/service-worker-events.ts:2](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-events.ts#L2)
@@ -0,0 +1,74 @@
1
+ [@openmrs/esm-framework](../API.md) / NewVisitPayload
2
+
3
+ # Interface: NewVisitPayload
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [location](NewVisitPayload.md#location)
10
+ - [patient](NewVisitPayload.md#patient)
11
+ - [startDatetime](NewVisitPayload.md#startdatetime)
12
+ - [stopDatetime](NewVisitPayload.md#stopdatetime)
13
+ - [uuid](NewVisitPayload.md#uuid)
14
+ - [visitType](NewVisitPayload.md#visittype)
15
+
16
+ ## Properties
17
+
18
+ ### location
19
+
20
+ • **location**: `string`
21
+
22
+ #### Defined in
23
+
24
+ [packages/framework/esm-api/src/types/visit-resource.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/visit-resource.ts#L5)
25
+
26
+ ___
27
+
28
+ ### patient
29
+
30
+ • `Optional` **patient**: `string`
31
+
32
+ #### Defined in
33
+
34
+ [packages/framework/esm-api/src/types/visit-resource.ts:6](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/visit-resource.ts#L6)
35
+
36
+ ___
37
+
38
+ ### startDatetime
39
+
40
+ • **startDatetime**: `Date`
41
+
42
+ #### Defined in
43
+
44
+ [packages/framework/esm-api/src/types/visit-resource.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/visit-resource.ts#L7)
45
+
46
+ ___
47
+
48
+ ### stopDatetime
49
+
50
+ • `Optional` **stopDatetime**: `Date`
51
+
52
+ #### Defined in
53
+
54
+ [packages/framework/esm-api/src/types/visit-resource.ts:9](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/visit-resource.ts#L9)
55
+
56
+ ___
57
+
58
+ ### uuid
59
+
60
+ • `Optional` **uuid**: `string`
61
+
62
+ #### Defined in
63
+
64
+ [packages/framework/esm-api/src/types/visit-resource.ts:4](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/visit-resource.ts#L4)
65
+
66
+ ___
67
+
68
+ ### visitType
69
+
70
+ • **visitType**: `string`
71
+
72
+ #### Defined in
73
+
74
+ [packages/framework/esm-api/src/types/visit-resource.ts:8](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/types/visit-resource.ts#L8)
@@ -0,0 +1,34 @@
1
+ [@openmrs/esm-framework](../API.md) / OfflinePatientArgs
2
+
3
+ # Interface: OfflinePatientArgs
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [patientUuid](OfflinePatientArgs.md#patientuuid)
10
+ - [signal](OfflinePatientArgs.md#signal)
11
+
12
+ ## Properties
13
+
14
+ ### patientUuid
15
+
16
+ • **patientUuid**: `string`
17
+
18
+ The UUID of the patient that should be made available offline.
19
+
20
+ #### Defined in
21
+
22
+ [packages/framework/esm-offline/src/offline-patient-data.ts:70](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L70)
23
+
24
+ ___
25
+
26
+ ### signal
27
+
28
+ • **signal**: `AbortSignal`
29
+
30
+ An {@link AbortSignal} which notifies about the cancellation of the operation.
31
+
32
+ #### Defined in
33
+
34
+ [packages/framework/esm-offline/src/offline-patient-data.ts:74](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L74)
@@ -0,0 +1,52 @@
1
+ [@openmrs/esm-framework](../API.md) / OfflinePatientDataSyncHandler
2
+
3
+ # Interface: OfflinePatientDataSyncHandler
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [displayName](OfflinePatientDataSyncHandler.md#displayname)
10
+
11
+ ### Methods
12
+
13
+ - [onOfflinePatientAdded](OfflinePatientDataSyncHandler.md#onofflinepatientadded)
14
+
15
+ ## Properties
16
+
17
+ ### displayName
18
+
19
+ • `Readonly` **displayName**: `string`
20
+
21
+ A name of the handler registration which can be displayed to the user.
22
+ This is ideally translated.
23
+
24
+ #### Defined in
25
+
26
+ [packages/framework/esm-offline/src/offline-patient-data.ts:55](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L55)
27
+
28
+ ## Methods
29
+
30
+ ### onOfflinePatientAdded
31
+
32
+ ▸ **onOfflinePatientAdded**(`args`): `Promise`<`void`\>
33
+
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
+ #### Parameters
38
+
39
+ | Name | Type | Description |
40
+ | :------ | :------ | :------ |
41
+ | `args` | [`OfflinePatientArgs`](OfflinePatientArgs.md) | Arguments which provide data about the patient to be made available offline. |
42
+
43
+ #### Returns
44
+
45
+ `Promise`<`void`\>
46
+
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
+ #### Defined in
51
+
52
+ [packages/framework/esm-offline/src/offline-patient-data.ts:63](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L63)
@@ -0,0 +1,99 @@
1
+ [@openmrs/esm-framework](../API.md) / OfflinePatientDataSyncState
2
+
3
+ # Interface: OfflinePatientDataSyncState
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [errors](OfflinePatientDataSyncState.md#errors)
10
+ - [failedHandlers](OfflinePatientDataSyncState.md#failedhandlers)
11
+ - [syncedHandlers](OfflinePatientDataSyncState.md#syncedhandlers)
12
+ - [syncingHandlers](OfflinePatientDataSyncState.md#syncinghandlers)
13
+ - [timestamp](OfflinePatientDataSyncState.md#timestamp)
14
+
15
+ ### Methods
16
+
17
+ - [abort](OfflinePatientDataSyncState.md#abort)
18
+
19
+ ## Properties
20
+
21
+ ### errors
22
+
23
+ • `Readonly` **errors**: `Record`<`string`, `string`\>
24
+
25
+ A set of error messages associated with the identifers of the failed handlers.
26
+
27
+ #### Defined in
28
+
29
+ [packages/framework/esm-offline/src/offline-patient-data.ts:41](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L41)
30
+
31
+ ___
32
+
33
+ ### failedHandlers
34
+
35
+ • `Readonly` **failedHandlers**: `string`[]
36
+
37
+ A list of the data sync handler registration identifiers which failed to synchronize the
38
+ patient's data.
39
+
40
+ #### Defined in
41
+
42
+ [packages/framework/esm-offline/src/offline-patient-data.ts:37](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L37)
43
+
44
+ ___
45
+
46
+ ### syncedHandlers
47
+
48
+ • `Readonly` **syncedHandlers**: `string`[]
49
+
50
+ A list of the data sync handler registration identifiers which successfully synchronized the
51
+ patient's data.
52
+
53
+ #### Defined in
54
+
55
+ [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)
56
+
57
+ ___
58
+
59
+ ### syncingHandlers
60
+
61
+ • `Readonly` **syncingHandlers**: `string`[]
62
+
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
+ #### Defined in
67
+
68
+ [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)
69
+
70
+ ___
71
+
72
+ ### timestamp
73
+
74
+ • `Readonly` **timestamp**: `Date`
75
+
76
+ The time when this state snapshot was initially created.
77
+
78
+ #### Defined in
79
+
80
+ [packages/framework/esm-offline/src/offline-patient-data.ts:22](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L22)
81
+
82
+ ## Methods
83
+
84
+ ### abort
85
+
86
+ ▸ **abort**(): `boolean`
87
+
88
+ Aborts the process of downloading data.
89
+
90
+ #### Returns
91
+
92
+ `boolean`
93
+
94
+ `true` if the cancellation could be triggered (that is, if there were any syncing handlers);
95
+ `false` if not.
96
+
97
+ #### Defined in
98
+
99
+ [packages/framework/esm-offline/src/offline-patient-data.ts:47](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L47)
@@ -0,0 +1,37 @@
1
+ [@openmrs/esm-framework](../API.md) / OfflinePatientDataSyncStore
2
+
3
+ # Interface: OfflinePatientDataSyncStore
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [handlers](OfflinePatientDataSyncStore.md#handlers)
10
+ - [offlinePatientDataSyncState](OfflinePatientDataSyncStore.md#offlinepatientdatasyncstate)
11
+
12
+ ## Properties
13
+
14
+ ### handlers
15
+
16
+ • **handlers**: `Record`<`string`, [`OfflinePatientDataSyncHandler`](OfflinePatientDataSyncHandler.md)\>
17
+
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
+ #### Defined in
23
+
24
+ [packages/framework/esm-offline/src/offline-patient-data.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L15)
25
+
26
+ ___
27
+
28
+ ### offlinePatientDataSyncState
29
+
30
+ • **offlinePatientDataSyncState**: `Record`<`string`, [`OfflinePatientDataSyncState`](OfflinePatientDataSyncState.md)\>
31
+
32
+ For each patient ID of the patients whose data is currently made available offline, provides
33
+ the current data synchronizaton state.
34
+
35
+ #### Defined in
36
+
37
+ [packages/framework/esm-offline/src/offline-patient-data.ts:9](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L9)
@@ -0,0 +1,27 @@
1
+ [@openmrs/esm-framework](../API.md) / OfflineSynchronizationStore
2
+
3
+ # Interface: OfflineSynchronizationStore
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [synchronization](OfflineSynchronizationStore.md#synchronization)
10
+
11
+ ## Properties
12
+
13
+ ### synchronization
14
+
15
+ • `Optional` **synchronization**: `Object`
16
+
17
+ #### Type declaration
18
+
19
+ | Name | Type |
20
+ | :------ | :------ |
21
+ | `abortController` | `AbortController` |
22
+ | `pendingCount` | `number` |
23
+ | `totalCount` | `number` |
24
+
25
+ #### Defined in
26
+
27
+ [packages/framework/esm-offline/src/sync.ts:68](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L68)