@openmrs/esm-framework 4.0.1-pre.224 → 4.0.1-pre.232
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 +8 -8
- package/dist/openmrs-esm-framework.js +1 -1
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +633 -100
- package/docs/classes/OpenmrsFetchError.md +6 -0
- package/docs/enums/Type.md +9 -9
- package/docs/enums/VisitMode.md +3 -3
- package/docs/enums/VisitStatus.md +2 -2
- package/docs/interfaces/AssignedExtension.md +2 -0
- package/docs/interfaces/BreadcrumbSettings.md +18 -0
- package/docs/interfaces/ComponentDefinition.md +13 -0
- package/docs/interfaces/Config.md +17 -3
- package/docs/interfaces/ConfigObject.md +17 -3
- package/docs/interfaces/ConnectedExtension.md +2 -0
- package/docs/interfaces/DynamicOfflineData.md +15 -0
- package/docs/interfaces/DynamicOfflineDataHandler.md +21 -4
- package/docs/interfaces/DynamicOfflineDataSyncState.md +12 -0
- package/docs/interfaces/ExtensionDefinition.md +25 -0
- package/docs/interfaces/ExtensionSlotBaseProps.md +2 -0
- package/docs/interfaces/ExtensionSlotConfigObject.md +6 -0
- package/docs/interfaces/FHIRRequestObj.md +2 -0
- package/docs/interfaces/FHIRRequestOptions.md +2 -0
- package/docs/interfaces/OfflinePatientArgs.md +2 -0
- package/docs/interfaces/OfflinePatientDataSyncHandler.md +2 -0
- package/docs/interfaces/OfflinePatientDataSyncState.md +2 -0
- package/docs/interfaces/OfflinePatientDataSyncStore.md +2 -0
- package/docs/interfaces/OldExtensionSlotBaseProps.md +2 -0
- package/docs/interfaces/PageDefinition.md +17 -0
- package/docs/interfaces/QueueItemDescriptor.md +5 -0
- package/docs/interfaces/RetryOptions.md +15 -4
- package/docs/interfaces/SpaConfig.md +14 -0
- package/docs/interfaces/SyncItem.md +4 -0
- package/docs/interfaces/SyncProcessOptions.md +2 -0
- package/mock.tsx +7 -4
- package/package.json +13 -13
|
@@ -153,6 +153,8 @@ node_modules/@types/node/globals.d.ts:142
|
|
|
153
153
|
|
|
154
154
|
▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
155
155
|
|
|
156
|
+
Create .stack property on a target object
|
|
157
|
+
|
|
156
158
|
#### Parameters
|
|
157
159
|
|
|
158
160
|
| Name | Type |
|
|
@@ -178,6 +180,10 @@ ___
|
|
|
178
180
|
|
|
179
181
|
▸ `Static` `Optional` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
180
182
|
|
|
183
|
+
Optional override for formatting stack traces
|
|
184
|
+
|
|
185
|
+
**`see`** https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces
|
|
186
|
+
|
|
181
187
|
#### Parameters
|
|
182
188
|
|
|
183
189
|
| Name | Type |
|
package/docs/enums/Type.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
### Array
|
|
22
22
|
|
|
23
|
-
• **Array**
|
|
23
|
+
• **Array**
|
|
24
24
|
|
|
25
25
|
#### Defined in
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ ___
|
|
|
30
30
|
|
|
31
31
|
### Boolean
|
|
32
32
|
|
|
33
|
-
• **Boolean**
|
|
33
|
+
• **Boolean**
|
|
34
34
|
|
|
35
35
|
#### Defined in
|
|
36
36
|
|
|
@@ -40,7 +40,7 @@ ___
|
|
|
40
40
|
|
|
41
41
|
### ConceptUuid
|
|
42
42
|
|
|
43
|
-
• **ConceptUuid**
|
|
43
|
+
• **ConceptUuid**
|
|
44
44
|
|
|
45
45
|
#### Defined in
|
|
46
46
|
|
|
@@ -50,7 +50,7 @@ ___
|
|
|
50
50
|
|
|
51
51
|
### Number
|
|
52
52
|
|
|
53
|
-
• **Number**
|
|
53
|
+
• **Number**
|
|
54
54
|
|
|
55
55
|
#### Defined in
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@ ___
|
|
|
60
60
|
|
|
61
61
|
### Object
|
|
62
62
|
|
|
63
|
-
• **Object**
|
|
63
|
+
• **Object**
|
|
64
64
|
|
|
65
65
|
#### Defined in
|
|
66
66
|
|
|
@@ -70,7 +70,7 @@ ___
|
|
|
70
70
|
|
|
71
71
|
### PatientIdentifierTypeUuid
|
|
72
72
|
|
|
73
|
-
• **PatientIdentifierTypeUuid**
|
|
73
|
+
• **PatientIdentifierTypeUuid**
|
|
74
74
|
|
|
75
75
|
#### Defined in
|
|
76
76
|
|
|
@@ -80,7 +80,7 @@ ___
|
|
|
80
80
|
|
|
81
81
|
### PersonAttributeTypeUuid
|
|
82
82
|
|
|
83
|
-
• **PersonAttributeTypeUuid**
|
|
83
|
+
• **PersonAttributeTypeUuid**
|
|
84
84
|
|
|
85
85
|
#### Defined in
|
|
86
86
|
|
|
@@ -90,7 +90,7 @@ ___
|
|
|
90
90
|
|
|
91
91
|
### String
|
|
92
92
|
|
|
93
|
-
• **String**
|
|
93
|
+
• **String**
|
|
94
94
|
|
|
95
95
|
#### Defined in
|
|
96
96
|
|
|
@@ -100,7 +100,7 @@ ___
|
|
|
100
100
|
|
|
101
101
|
### UUID
|
|
102
102
|
|
|
103
|
-
• **UUID**
|
|
103
|
+
• **UUID**
|
|
104
104
|
|
|
105
105
|
#### Defined in
|
|
106
106
|
|
package/docs/enums/VisitMode.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
### EDITVISIT
|
|
16
16
|
|
|
17
|
-
• **EDITVISIT**
|
|
17
|
+
• **EDITVISIT**
|
|
18
18
|
|
|
19
19
|
#### Defined in
|
|
20
20
|
|
|
@@ -24,7 +24,7 @@ ___
|
|
|
24
24
|
|
|
25
25
|
### LOADING
|
|
26
26
|
|
|
27
|
-
• **LOADING**
|
|
27
|
+
• **LOADING**
|
|
28
28
|
|
|
29
29
|
#### Defined in
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ ___
|
|
|
34
34
|
|
|
35
35
|
### NEWVISIT
|
|
36
36
|
|
|
37
|
-
• **NEWVISIT**
|
|
37
|
+
• **NEWVISIT**
|
|
38
38
|
|
|
39
39
|
#### Defined in
|
|
40
40
|
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
• **config**: ``null`` \| [`ConfigObject`](ConfigObject.md)
|
|
22
22
|
|
|
23
|
+
The extension's config. Note that this will be `null` until the slot is mounted.
|
|
24
|
+
|
|
23
25
|
#### Defined in
|
|
24
26
|
|
|
25
27
|
[packages/framework/esm-extensions/src/store.ts:80](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L80)
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
|
|
18
18
|
• `Optional` **matcher**: `string` \| `RegExp`
|
|
19
19
|
|
|
20
|
+
A string or RegEx that determines whether the breadcrumb should be displayed.
|
|
21
|
+
It is tested against the current location's path.
|
|
22
|
+
|
|
23
|
+
If `matcher` is a string, it can contain route parameters. e.g. `/foo/:bar`.
|
|
24
|
+
|
|
25
|
+
Can be omitted; the value of `path` is used as the default value.
|
|
26
|
+
|
|
20
27
|
#### Defined in
|
|
21
28
|
|
|
22
29
|
[packages/framework/esm-breadcrumbs/src/types.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-breadcrumbs/src/types.ts#L16)
|
|
@@ -27,6 +34,13 @@ ___
|
|
|
27
34
|
|
|
28
35
|
• `Optional` **parent**: `string`
|
|
29
36
|
|
|
37
|
+
The breadcrumb's parent breadcrumb. Supply the path of the breadcrumb here, e.g.,
|
|
38
|
+
if we are currently in "/foo/bar", you could provide "/foo" to get the breadcrumb
|
|
39
|
+
associated with the path "/foo".
|
|
40
|
+
|
|
41
|
+
If a path is missing for some reason, the closest matching one will be taken as
|
|
42
|
+
parent.
|
|
43
|
+
|
|
30
44
|
#### Defined in
|
|
31
45
|
|
|
32
46
|
[packages/framework/esm-breadcrumbs/src/types.ts:25](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-breadcrumbs/src/types.ts#L25)
|
|
@@ -37,6 +51,8 @@ ___
|
|
|
37
51
|
|
|
38
52
|
• **path**: `string`
|
|
39
53
|
|
|
54
|
+
Gets the path of breadcrumb for navigation purposes.
|
|
55
|
+
|
|
40
56
|
#### Defined in
|
|
41
57
|
|
|
42
58
|
[packages/framework/esm-breadcrumbs/src/types.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-breadcrumbs/src/types.ts#L7)
|
|
@@ -47,6 +63,8 @@ ___
|
|
|
47
63
|
|
|
48
64
|
• **title**: `string` \| (`params`: `any`) => `string` \| (`params`: `any`) => `Promise`<`string`\>
|
|
49
65
|
|
|
66
|
+
The title of the breadcrumb.
|
|
67
|
+
|
|
50
68
|
#### Defined in
|
|
51
69
|
|
|
52
70
|
[packages/framework/esm-breadcrumbs/src/types.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-breadcrumbs/src/types.ts#L29)
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
|
|
31
31
|
• **appName**: `string`
|
|
32
32
|
|
|
33
|
+
The module/app that defines the component
|
|
34
|
+
|
|
33
35
|
#### Defined in
|
|
34
36
|
|
|
35
37
|
[packages/framework/esm-globals/src/types.ts:99](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L99)
|
|
@@ -40,6 +42,8 @@ ___
|
|
|
40
42
|
|
|
41
43
|
• `Optional` **offline**: `boolean` \| `object`
|
|
42
44
|
|
|
45
|
+
Defines the offline support / properties of the component.
|
|
46
|
+
|
|
43
47
|
#### Defined in
|
|
44
48
|
|
|
45
49
|
[packages/framework/esm-globals/src/types.ts:111](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L111)
|
|
@@ -50,6 +54,8 @@ ___
|
|
|
50
54
|
|
|
51
55
|
• `Optional` **online**: `boolean` \| `object`
|
|
52
56
|
|
|
57
|
+
Defines the online support / properties of the component.
|
|
58
|
+
|
|
53
59
|
#### Defined in
|
|
54
60
|
|
|
55
61
|
[packages/framework/esm-globals/src/types.ts:107](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L107)
|
|
@@ -60,6 +66,9 @@ ___
|
|
|
60
66
|
|
|
61
67
|
• `Optional` **privilege**: `string` \| `string`[]
|
|
62
68
|
|
|
69
|
+
Defines the access privilege(s) required for this component, if any.
|
|
70
|
+
If more than one privilege is provided, the user must have all specified permissions.
|
|
71
|
+
|
|
63
72
|
#### Defined in
|
|
64
73
|
|
|
65
74
|
[packages/framework/esm-globals/src/types.ts:116](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L116)
|
|
@@ -70,6 +79,8 @@ ___
|
|
|
70
79
|
|
|
71
80
|
• `Optional` **resources**: `Record`<`string`, [`ResourceLoader`](ResourceLoader.md)<`any`\>\>
|
|
72
81
|
|
|
82
|
+
Defines resources that are loaded when the component should mount.
|
|
83
|
+
|
|
73
84
|
#### Defined in
|
|
74
85
|
|
|
75
86
|
[packages/framework/esm-globals/src/types.ts:120](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L120)
|
|
@@ -80,6 +91,8 @@ ___
|
|
|
80
91
|
|
|
81
92
|
▸ **load**(): `Promise`<`any`\>
|
|
82
93
|
|
|
94
|
+
Defines a function to use for actually loading the component's lifecycle.
|
|
95
|
+
|
|
83
96
|
#### Returns
|
|
84
97
|
|
|
85
98
|
`Promise`<`any`\>
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
|
|
34
34
|
• **constructor**: `Function`
|
|
35
35
|
|
|
36
|
+
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
37
|
+
|
|
36
38
|
#### Inherited from
|
|
37
39
|
|
|
38
40
|
Object.constructor
|
|
@@ -47,11 +49,13 @@ node_modules/typescript/lib/lib.es5.d.ts:124
|
|
|
47
49
|
|
|
48
50
|
▸ **hasOwnProperty**(`v`): `boolean`
|
|
49
51
|
|
|
52
|
+
Determines whether an object has a property with the specified name.
|
|
53
|
+
|
|
50
54
|
#### Parameters
|
|
51
55
|
|
|
52
56
|
| Name | Type | Description |
|
|
53
57
|
| :------ | :------ | :------ |
|
|
54
|
-
| `v` | `PropertyKey` |
|
|
58
|
+
| `v` | `PropertyKey` | A property name. |
|
|
55
59
|
|
|
56
60
|
#### Returns
|
|
57
61
|
|
|
@@ -71,11 +75,13 @@ ___
|
|
|
71
75
|
|
|
72
76
|
▸ **isPrototypeOf**(`v`): `boolean`
|
|
73
77
|
|
|
78
|
+
Determines whether an object exists in another object's prototype chain.
|
|
79
|
+
|
|
74
80
|
#### Parameters
|
|
75
81
|
|
|
76
82
|
| Name | Type | Description |
|
|
77
83
|
| :------ | :------ | :------ |
|
|
78
|
-
| `v` | `Object` |
|
|
84
|
+
| `v` | `Object` | Another object whose prototype chain is to be checked. |
|
|
79
85
|
|
|
80
86
|
#### Returns
|
|
81
87
|
|
|
@@ -95,11 +101,13 @@ ___
|
|
|
95
101
|
|
|
96
102
|
▸ **propertyIsEnumerable**(`v`): `boolean`
|
|
97
103
|
|
|
104
|
+
Determines whether a specified property is enumerable.
|
|
105
|
+
|
|
98
106
|
#### Parameters
|
|
99
107
|
|
|
100
108
|
| Name | Type | Description |
|
|
101
109
|
| :------ | :------ | :------ |
|
|
102
|
-
| `v` | `PropertyKey` |
|
|
110
|
+
| `v` | `PropertyKey` | A property name. |
|
|
103
111
|
|
|
104
112
|
#### Returns
|
|
105
113
|
|
|
@@ -119,6 +127,8 @@ ___
|
|
|
119
127
|
|
|
120
128
|
▸ **toLocaleString**(): `string`
|
|
121
129
|
|
|
130
|
+
Returns a date converted to a string using the current locale.
|
|
131
|
+
|
|
122
132
|
#### Returns
|
|
123
133
|
|
|
124
134
|
`string`
|
|
@@ -137,6 +147,8 @@ ___
|
|
|
137
147
|
|
|
138
148
|
▸ **toString**(): `string`
|
|
139
149
|
|
|
150
|
+
Returns a string representation of an object.
|
|
151
|
+
|
|
140
152
|
#### Returns
|
|
141
153
|
|
|
142
154
|
`string`
|
|
@@ -155,6 +167,8 @@ ___
|
|
|
155
167
|
|
|
156
168
|
▸ **valueOf**(): `Object`
|
|
157
169
|
|
|
170
|
+
Returns the primitive value of the specified object.
|
|
171
|
+
|
|
158
172
|
#### Returns
|
|
159
173
|
|
|
160
174
|
`Object`
|
|
@@ -44,6 +44,8 @@ ___
|
|
|
44
44
|
|
|
45
45
|
• **constructor**: `Function`
|
|
46
46
|
|
|
47
|
+
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
|
|
48
|
+
|
|
47
49
|
#### Inherited from
|
|
48
50
|
|
|
49
51
|
Object.constructor
|
|
@@ -58,11 +60,13 @@ node_modules/typescript/lib/lib.es5.d.ts:124
|
|
|
58
60
|
|
|
59
61
|
▸ **hasOwnProperty**(`v`): `boolean`
|
|
60
62
|
|
|
63
|
+
Determines whether an object has a property with the specified name.
|
|
64
|
+
|
|
61
65
|
#### Parameters
|
|
62
66
|
|
|
63
67
|
| Name | Type | Description |
|
|
64
68
|
| :------ | :------ | :------ |
|
|
65
|
-
| `v` | `PropertyKey` |
|
|
69
|
+
| `v` | `PropertyKey` | A property name. |
|
|
66
70
|
|
|
67
71
|
#### Returns
|
|
68
72
|
|
|
@@ -82,11 +86,13 @@ ___
|
|
|
82
86
|
|
|
83
87
|
▸ **isPrototypeOf**(`v`): `boolean`
|
|
84
88
|
|
|
89
|
+
Determines whether an object exists in another object's prototype chain.
|
|
90
|
+
|
|
85
91
|
#### Parameters
|
|
86
92
|
|
|
87
93
|
| Name | Type | Description |
|
|
88
94
|
| :------ | :------ | :------ |
|
|
89
|
-
| `v` | `Object` |
|
|
95
|
+
| `v` | `Object` | Another object whose prototype chain is to be checked. |
|
|
90
96
|
|
|
91
97
|
#### Returns
|
|
92
98
|
|
|
@@ -106,11 +112,13 @@ ___
|
|
|
106
112
|
|
|
107
113
|
▸ **propertyIsEnumerable**(`v`): `boolean`
|
|
108
114
|
|
|
115
|
+
Determines whether a specified property is enumerable.
|
|
116
|
+
|
|
109
117
|
#### Parameters
|
|
110
118
|
|
|
111
119
|
| Name | Type | Description |
|
|
112
120
|
| :------ | :------ | :------ |
|
|
113
|
-
| `v` | `PropertyKey` |
|
|
121
|
+
| `v` | `PropertyKey` | A property name. |
|
|
114
122
|
|
|
115
123
|
#### Returns
|
|
116
124
|
|
|
@@ -130,6 +138,8 @@ ___
|
|
|
130
138
|
|
|
131
139
|
▸ **toLocaleString**(): `string`
|
|
132
140
|
|
|
141
|
+
Returns a date converted to a string using the current locale.
|
|
142
|
+
|
|
133
143
|
#### Returns
|
|
134
144
|
|
|
135
145
|
`string`
|
|
@@ -148,6 +158,8 @@ ___
|
|
|
148
158
|
|
|
149
159
|
▸ **toString**(): `string`
|
|
150
160
|
|
|
161
|
+
Returns a string representation of an object.
|
|
162
|
+
|
|
151
163
|
#### Returns
|
|
152
164
|
|
|
153
165
|
`string`
|
|
@@ -166,6 +178,8 @@ ___
|
|
|
166
178
|
|
|
167
179
|
▸ **valueOf**(): `Object`
|
|
168
180
|
|
|
181
|
+
Returns the primitive value of the specified object.
|
|
182
|
+
|
|
169
183
|
#### Returns
|
|
170
184
|
|
|
171
185
|
`Object`
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
• **config**: ``null`` \| [`ConfigObject`](ConfigObject.md)
|
|
19
19
|
|
|
20
|
+
The extension's config. Note that this will be `null` until the slot is mounted.
|
|
21
|
+
|
|
20
22
|
#### Defined in
|
|
21
23
|
|
|
22
24
|
[packages/framework/esm-extensions/src/store.ts:90](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L90)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: DynamicOfflineData
|
|
4
4
|
|
|
5
|
+
Represents the registration of a single dynamic offline data entry.
|
|
6
|
+
|
|
5
7
|
## Table of contents
|
|
6
8
|
|
|
7
9
|
### Offline Properties
|
|
@@ -18,6 +20,8 @@
|
|
|
18
20
|
|
|
19
21
|
• `Optional` **id**: `number`
|
|
20
22
|
|
|
23
|
+
The internal ID of the data entry, as assigned by the IndexedDB where it is stored.
|
|
24
|
+
|
|
21
25
|
#### Defined in
|
|
22
26
|
|
|
23
27
|
[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)
|
|
@@ -28,6 +32,9 @@ ___
|
|
|
28
32
|
|
|
29
33
|
• **identifier**: `string`
|
|
30
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
|
+
|
|
31
38
|
#### Defined in
|
|
32
39
|
|
|
33
40
|
[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)
|
|
@@ -38,6 +45,9 @@ ___
|
|
|
38
45
|
|
|
39
46
|
• `Optional` **syncState**: [`DynamicOfflineDataSyncState`](DynamicOfflineDataSyncState.md)
|
|
40
47
|
|
|
48
|
+
If this entry has already been synced, returns the result of that last sync attempt.
|
|
49
|
+
Otherwise this is `undefined`.
|
|
50
|
+
|
|
41
51
|
#### Defined in
|
|
42
52
|
|
|
43
53
|
[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)
|
|
@@ -48,6 +58,9 @@ ___
|
|
|
48
58
|
|
|
49
59
|
• **type**: `string`
|
|
50
60
|
|
|
61
|
+
The underlying type used for categorizing the data entry.
|
|
62
|
+
Examples could be `"patient"` or `"form"`.
|
|
63
|
+
|
|
51
64
|
#### Defined in
|
|
52
65
|
|
|
53
66
|
[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)
|
|
@@ -58,6 +71,8 @@ ___
|
|
|
58
71
|
|
|
59
72
|
• **users**: `string`[]
|
|
60
73
|
|
|
74
|
+
The UUIDs of the users who need this data entry available offline.
|
|
75
|
+
|
|
61
76
|
#### Defined in
|
|
62
77
|
|
|
63
78
|
[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)
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: DynamicOfflineDataHandler
|
|
4
4
|
|
|
5
|
+
A handler for synchronizing dynamically declared offline data.
|
|
6
|
+
Can be setup using the [setupDynamicOfflineDataHandler](../API.md#setupdynamicofflinedatahandler) function.
|
|
7
|
+
|
|
5
8
|
## Table of contents
|
|
6
9
|
|
|
7
10
|
### Offline Properties
|
|
@@ -21,6 +24,9 @@
|
|
|
21
24
|
|
|
22
25
|
• `Optional` **displayName**: `string`
|
|
23
26
|
|
|
27
|
+
A human-readable string representing the handler.
|
|
28
|
+
If provided, the handler can be rendered in the UI using that string.
|
|
29
|
+
|
|
24
30
|
#### Defined in
|
|
25
31
|
|
|
26
32
|
[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)
|
|
@@ -31,6 +37,8 @@ ___
|
|
|
31
37
|
|
|
32
38
|
• **id**: `string`
|
|
33
39
|
|
|
40
|
+
A string uniquely identifying the handler.
|
|
41
|
+
|
|
34
42
|
#### Defined in
|
|
35
43
|
|
|
36
44
|
[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)
|
|
@@ -41,6 +49,9 @@ ___
|
|
|
41
49
|
|
|
42
50
|
• **type**: `string`
|
|
43
51
|
|
|
52
|
+
The type of offline data handled by this handler.
|
|
53
|
+
See [DynamicOfflineData.type](DynamicOfflineData.md#type) for details.
|
|
54
|
+
|
|
44
55
|
#### Defined in
|
|
45
56
|
|
|
46
57
|
[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)
|
|
@@ -51,12 +62,16 @@ ___
|
|
|
51
62
|
|
|
52
63
|
▸ **isSynced**(`identifier`, `abortSignal?`): `Promise`<`boolean`\>
|
|
53
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
|
+
|
|
54
69
|
#### Parameters
|
|
55
70
|
|
|
56
71
|
| Name | Type | Description |
|
|
57
72
|
| :------ | :------ | :------ |
|
|
58
|
-
| `identifier` | `string` |
|
|
59
|
-
| `abortSignal?` | `AbortSignal` |
|
|
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. |
|
|
60
75
|
|
|
61
76
|
#### Returns
|
|
62
77
|
|
|
@@ -72,12 +87,14 @@ ___
|
|
|
72
87
|
|
|
73
88
|
▸ **sync**(`identifier`, `abortSignal?`): `Promise`<`void`\>
|
|
74
89
|
|
|
90
|
+
Synchronizes the given offline data.
|
|
91
|
+
|
|
75
92
|
#### Parameters
|
|
76
93
|
|
|
77
94
|
| Name | Type | Description |
|
|
78
95
|
| :------ | :------ | :------ |
|
|
79
|
-
| `identifier` | `string` |
|
|
80
|
-
| `abortSignal?` | `AbortSignal` |
|
|
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. |
|
|
81
98
|
|
|
82
99
|
#### Returns
|
|
83
100
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: DynamicOfflineDataSyncState
|
|
4
4
|
|
|
5
|
+
Represents the result of syncing a given [DynamicOfflineData](DynamicOfflineData.md) entry.
|
|
6
|
+
|
|
5
7
|
## Table of contents
|
|
6
8
|
|
|
7
9
|
### Offline Properties
|
|
@@ -18,6 +20,8 @@
|
|
|
18
20
|
|
|
19
21
|
• **erroredHandlers**: `string`[]
|
|
20
22
|
|
|
23
|
+
The IDs of the handlers which failed to synchronize their data.
|
|
24
|
+
|
|
21
25
|
#### Defined in
|
|
22
26
|
|
|
23
27
|
[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)
|
|
@@ -28,6 +32,8 @@ ___
|
|
|
28
32
|
|
|
29
33
|
• **errors**: { `handlerId`: `string` ; `message`: `string` }[]
|
|
30
34
|
|
|
35
|
+
A collection of the errors caught while synchronizing, per handler.
|
|
36
|
+
|
|
31
37
|
#### Defined in
|
|
32
38
|
|
|
33
39
|
[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)
|
|
@@ -38,6 +44,8 @@ ___
|
|
|
38
44
|
|
|
39
45
|
• **succeededHandlers**: `string`[]
|
|
40
46
|
|
|
47
|
+
The IDs of the handlers which successfully synchronized their data.
|
|
48
|
+
|
|
41
49
|
#### Defined in
|
|
42
50
|
|
|
43
51
|
[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)
|
|
@@ -48,6 +56,8 @@ ___
|
|
|
48
56
|
|
|
49
57
|
• **syncedBy**: `string`
|
|
50
58
|
|
|
59
|
+
The ID of the user who has triggered the data synchronization.
|
|
60
|
+
|
|
51
61
|
#### Defined in
|
|
52
62
|
|
|
53
63
|
[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)
|
|
@@ -58,6 +68,8 @@ ___
|
|
|
58
68
|
|
|
59
69
|
• **syncedOn**: `Date`
|
|
60
70
|
|
|
71
|
+
The time when the entry has been synced the last time.
|
|
72
|
+
|
|
61
73
|
#### Defined in
|
|
62
74
|
|
|
63
75
|
[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)
|