@openmrs/esm-framework 3.2.0 → 3.2.1-pre.1010
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/dist/openmrs-esm-framework.js +1 -1
- package/dist/openmrs-esm-framework.js.LICENSE.txt +2 -0
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +1460 -1737
- package/docs/classes/OpenmrsFetchError.md +32 -27
- package/docs/enums/Type.md +11 -0
- package/docs/enums/VisitMode.md +5 -5
- package/docs/enums/VisitStatus.md +4 -4
- package/docs/interfaces/AssignedExtension.md +74 -0
- package/docs/interfaces/Config.md +1 -1
- package/docs/interfaces/ConfigSchema.md +3 -3
- package/docs/interfaces/ConnectedExtension.md +3 -106
- package/docs/interfaces/CurrentPatientOptions.md +3 -3
- package/docs/interfaces/ExtensionInfo.md +8 -8
- package/docs/interfaces/ExtensionInstance.md +1 -1
- package/docs/interfaces/ExtensionInternalStore.md +34 -0
- package/docs/interfaces/ExtensionProps.md +2 -2
- package/docs/interfaces/ExtensionRegistration.md +7 -9
- package/docs/interfaces/ExtensionSlotConfig.md +4 -4
- package/docs/interfaces/ExtensionSlotConfigObject.md +9 -3
- package/docs/interfaces/ExtensionSlotInfo.md +23 -9
- package/docs/interfaces/ExtensionSlotState.md +30 -0
- package/docs/interfaces/ExtensionStore.md +2 -17
- package/docs/interfaces/FHIRRequestObj.md +5 -5
- package/docs/interfaces/FHIRResource.md +5 -5
- package/docs/interfaces/OfflineModeResult.md +41 -0
- package/docs/interfaces/OfflineSynchronizationStore.md +4 -1
- package/docs/interfaces/OnlyThePatient.md +3 -3
- package/docs/interfaces/PatientWithFullResponse.md +3 -3
- package/docs/interfaces/QueueItemDescriptor.md +9 -4
- package/docs/interfaces/SyncItem.md +19 -9
- package/docs/interfaces/SyncProcessOptions.md +7 -5
- package/docs/interfaces/VisitItem.md +6 -6
- package/mock.tsx +25 -6
- package/package.json +13 -13
- package/src/integration-tests/extension-config.test.tsx +4 -10
- package/docs/interfaces/ConfigStore.md +0 -34
- package/docs/interfaces/ExtensionDetails.md +0 -81
- package/docs/interfaces/ExtensionSlotConfigsStore.md +0 -32
- package/docs/interfaces/ExtensionSlotInstance.md +0 -51
- package/docs/interfaces/ImplementerToolsConfigStore.md +0 -19
- package/docs/interfaces/WorkspaceItem.md +0 -74
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
#### Defined in
|
|
21
21
|
|
|
22
|
-
[packages/framework/esm-config/src/types.ts:
|
|
22
|
+
[packages/framework/esm-config/src/types.ts:40](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L40)
|
|
23
23
|
|
|
24
24
|
___
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ ___
|
|
|
29
29
|
|
|
30
30
|
#### Defined in
|
|
31
31
|
|
|
32
|
-
[packages/framework/esm-config/src/types.ts:
|
|
32
|
+
[packages/framework/esm-config/src/types.ts:43](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L43)
|
|
33
33
|
|
|
34
34
|
___
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ ___
|
|
|
39
39
|
|
|
40
40
|
#### Defined in
|
|
41
41
|
|
|
42
|
-
[packages/framework/esm-config/src/types.ts:
|
|
42
|
+
[packages/framework/esm-config/src/types.ts:42](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L42)
|
|
43
43
|
|
|
44
44
|
___
|
|
45
45
|
|
|
@@ -49,4 +49,4 @@ ___
|
|
|
49
49
|
|
|
50
50
|
#### Defined in
|
|
51
51
|
|
|
52
|
-
[packages/framework/esm-config/src/types.ts:
|
|
52
|
+
[packages/framework/esm-config/src/types.ts:41](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L41)
|
|
@@ -16,9 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
• `Optional` **add**: `string`[]
|
|
18
18
|
|
|
19
|
+
Additional extension IDs to assign to this slot, in addition to those `attach`ed in code.
|
|
20
|
+
|
|
19
21
|
#### Defined in
|
|
20
22
|
|
|
21
|
-
[packages/framework/esm-config/src/types.ts:
|
|
23
|
+
[packages/framework/esm-config/src/types.ts:52](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L52)
|
|
22
24
|
|
|
23
25
|
___
|
|
24
26
|
|
|
@@ -26,9 +28,11 @@ ___
|
|
|
26
28
|
|
|
27
29
|
• `Optional` **order**: `string`[]
|
|
28
30
|
|
|
31
|
+
Overrides the default ordering of extensions.
|
|
32
|
+
|
|
29
33
|
#### Defined in
|
|
30
34
|
|
|
31
|
-
[packages/framework/esm-config/src/types.ts:
|
|
35
|
+
[packages/framework/esm-config/src/types.ts:56](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L56)
|
|
32
36
|
|
|
33
37
|
___
|
|
34
38
|
|
|
@@ -36,6 +40,8 @@ ___
|
|
|
36
40
|
|
|
37
41
|
• `Optional` **remove**: `string`[]
|
|
38
42
|
|
|
43
|
+
Extension IDs which were `attach`ed to the slot but which should not be assigned.
|
|
44
|
+
|
|
39
45
|
#### Defined in
|
|
40
46
|
|
|
41
|
-
[packages/framework/esm-config/src/types.ts:
|
|
47
|
+
[packages/framework/esm-config/src/types.ts:54](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/types.ts#L54)
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
### Properties
|
|
8
8
|
|
|
9
9
|
- [attachedIds](ExtensionSlotInfo.md#attachedids)
|
|
10
|
-
- [
|
|
10
|
+
- [config](ExtensionSlotInfo.md#config)
|
|
11
|
+
- [moduleName](ExtensionSlotInfo.md#modulename)
|
|
11
12
|
- [name](ExtensionSlotInfo.md#name)
|
|
12
13
|
|
|
13
14
|
## Properties
|
|
@@ -16,26 +17,39 @@
|
|
|
16
17
|
|
|
17
18
|
• **attachedIds**: `string`[]
|
|
18
19
|
|
|
19
|
-
The set of extension IDs which have been attached to this slot
|
|
20
|
-
This is essentially a complete history of `attach` calls to this specific slot.
|
|
20
|
+
The set of extension IDs which have been attached to this slot using `attach`.
|
|
21
21
|
However, not all of these extension IDs should be rendered.
|
|
22
22
|
`assignedIds` is the set defining those.
|
|
23
23
|
|
|
24
24
|
#### Defined in
|
|
25
25
|
|
|
26
|
-
[packages/framework/esm-extensions/src/store.ts:
|
|
26
|
+
[packages/framework/esm-extensions/src/store.ts:56](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L56)
|
|
27
27
|
|
|
28
28
|
___
|
|
29
29
|
|
|
30
|
-
###
|
|
30
|
+
### config
|
|
31
31
|
|
|
32
|
-
• **
|
|
32
|
+
• **config**: ``null`` \| [`ExtensionSlotConfigObject`](ExtensionSlotConfigObject.md)
|
|
33
33
|
|
|
34
|
-
The
|
|
34
|
+
The configuration provided for this extension slot. `null` if not yet loaded.
|
|
35
35
|
|
|
36
36
|
#### Defined in
|
|
37
37
|
|
|
38
|
-
[packages/framework/esm-extensions/src/store.ts:
|
|
38
|
+
[packages/framework/esm-extensions/src/store.ts:58](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L58)
|
|
39
|
+
|
|
40
|
+
___
|
|
41
|
+
|
|
42
|
+
### moduleName
|
|
43
|
+
|
|
44
|
+
• `Optional` **moduleName**: `string`
|
|
45
|
+
|
|
46
|
+
The module in which the extension slot exists. Undefined if the slot
|
|
47
|
+
hasn't been registered yet (but it has been attached or assigned to
|
|
48
|
+
an extension.
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[packages/framework/esm-extensions/src/store.ts:48](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L48)
|
|
39
53
|
|
|
40
54
|
___
|
|
41
55
|
|
|
@@ -47,4 +61,4 @@ The name under which the extension slot has been registered.
|
|
|
47
61
|
|
|
48
62
|
#### Defined in
|
|
49
63
|
|
|
50
|
-
[packages/framework/esm-extensions/src/store.ts:
|
|
64
|
+
[packages/framework/esm-extensions/src/store.ts:50](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L50)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / ExtensionSlotState
|
|
2
|
+
|
|
3
|
+
# Interface: ExtensionSlotState
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [assignedExtensions](ExtensionSlotState.md#assignedextensions)
|
|
10
|
+
- [moduleName](ExtensionSlotState.md#modulename)
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### assignedExtensions
|
|
15
|
+
|
|
16
|
+
• **assignedExtensions**: [`AssignedExtension`](AssignedExtension.md)[]
|
|
17
|
+
|
|
18
|
+
#### Defined in
|
|
19
|
+
|
|
20
|
+
[packages/framework/esm-extensions/src/store.ts:67](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L67)
|
|
21
|
+
|
|
22
|
+
___
|
|
23
|
+
|
|
24
|
+
### moduleName
|
|
25
|
+
|
|
26
|
+
• **moduleName**: `string`
|
|
27
|
+
|
|
28
|
+
#### Defined in
|
|
29
|
+
|
|
30
|
+
[packages/framework/esm-extensions/src/store.ts:66](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L66)
|
|
@@ -6,29 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
### Properties
|
|
8
8
|
|
|
9
|
-
- [extensions](ExtensionStore.md#extensions)
|
|
10
9
|
- [slots](ExtensionStore.md#slots)
|
|
11
10
|
|
|
12
11
|
## Properties
|
|
13
12
|
|
|
14
|
-
### extensions
|
|
15
|
-
|
|
16
|
-
• **extensions**: `Record`<`string`, [`ExtensionInfo`](ExtensionInfo.md)\>
|
|
17
|
-
|
|
18
|
-
Extensions indexed by name
|
|
19
|
-
|
|
20
|
-
#### Defined in
|
|
21
|
-
|
|
22
|
-
[packages/framework/esm-extensions/src/store.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L38)
|
|
23
|
-
|
|
24
|
-
___
|
|
25
|
-
|
|
26
13
|
### slots
|
|
27
14
|
|
|
28
|
-
• **slots**: `Record`<`string`, [`
|
|
29
|
-
|
|
30
|
-
Slots indexed by name
|
|
15
|
+
• **slots**: `Record`<`string`, [`ExtensionSlotState`](ExtensionSlotState.md)\>
|
|
31
16
|
|
|
32
17
|
#### Defined in
|
|
33
18
|
|
|
34
|
-
[packages/framework/esm-extensions/src/store.ts:
|
|
19
|
+
[packages/framework/esm-extensions/src/store.ts:62](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-extensions/src/store.ts#L62)
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Table of contents
|
|
6
6
|
|
|
7
|
-
### Properties
|
|
7
|
+
### API Properties
|
|
8
8
|
|
|
9
9
|
- [headers](FHIRRequestObj.md#headers)
|
|
10
10
|
- [method](FHIRRequestObj.md#method)
|
|
11
11
|
- [url](FHIRRequestObj.md#url)
|
|
12
12
|
|
|
13
|
-
## Properties
|
|
13
|
+
## API Properties
|
|
14
14
|
|
|
15
15
|
### headers
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
#### Defined in
|
|
20
20
|
|
|
21
|
-
[packages/framework/esm-api/src/fhir.ts:
|
|
21
|
+
[packages/framework/esm-api/src/fhir.ts:53](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L53)
|
|
22
22
|
|
|
23
23
|
___
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ ___
|
|
|
28
28
|
|
|
29
29
|
#### Defined in
|
|
30
30
|
|
|
31
|
-
[packages/framework/esm-api/src/fhir.ts:
|
|
31
|
+
[packages/framework/esm-api/src/fhir.ts:52](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L52)
|
|
32
32
|
|
|
33
33
|
___
|
|
34
34
|
|
|
@@ -38,4 +38,4 @@ ___
|
|
|
38
38
|
|
|
39
39
|
#### Defined in
|
|
40
40
|
|
|
41
|
-
[packages/framework/esm-api/src/fhir.ts:
|
|
41
|
+
[packages/framework/esm-api/src/fhir.ts:51](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L51)
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
|
|
19
19
|
| Name | Type |
|
|
20
20
|
| :------ | :------ |
|
|
21
|
-
| `code` | `
|
|
21
|
+
| `code` | { `coding`: [`FHIRCode`](FHIRCode.md)[] } |
|
|
22
22
|
| `code.coding` | [`FHIRCode`](FHIRCode.md)[] |
|
|
23
23
|
| `effectiveDateTime` | `Date` |
|
|
24
|
-
| `encounter` | `
|
|
24
|
+
| `encounter` | { `reference`: `string` ; `type`: `string` } |
|
|
25
25
|
| `encounter.reference` | `string` |
|
|
26
26
|
| `encounter.type` | `string` |
|
|
27
27
|
| `id` | `string` |
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
| `referenceRange` | `any` |
|
|
30
30
|
| `resourceType` | `string` |
|
|
31
31
|
| `status` | `string` |
|
|
32
|
-
| `subject` | `
|
|
32
|
+
| `subject` | { `display`: `string` ; `identifier`: { `id`: `string` ; `system`: `string` ; `use`: `string` ; `value`: `string` } ; `reference`: `string` ; `type`: `string` } |
|
|
33
33
|
| `subject.display` | `string` |
|
|
34
|
-
| `subject.identifier` | `
|
|
34
|
+
| `subject.identifier` | { `id`: `string` ; `system`: `string` ; `use`: `string` ; `value`: `string` } |
|
|
35
35
|
| `subject.identifier.id` | `string` |
|
|
36
36
|
| `subject.identifier.system` | `string` |
|
|
37
37
|
| `subject.identifier.use` | `string` |
|
|
38
38
|
| `subject.identifier.value` | `string` |
|
|
39
39
|
| `subject.reference` | `string` |
|
|
40
40
|
| `subject.type` | `string` |
|
|
41
|
-
| `valueQuantity` | `
|
|
41
|
+
| `valueQuantity` | { `value`: `number` } |
|
|
42
42
|
| `valueQuantity.value` | `number` |
|
|
43
43
|
|
|
44
44
|
#### Defined in
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / OfflineModeResult
|
|
2
|
+
|
|
3
|
+
# Interface: OfflineModeResult
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [active](OfflineModeResult.md#active)
|
|
10
|
+
- [current](OfflineModeResult.md#current)
|
|
11
|
+
- [notAvailable](OfflineModeResult.md#notavailable)
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### active
|
|
16
|
+
|
|
17
|
+
• **active**: `boolean`
|
|
18
|
+
|
|
19
|
+
#### Defined in
|
|
20
|
+
|
|
21
|
+
[packages/framework/esm-offline/src/mode.ts:41](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/mode.ts#L41)
|
|
22
|
+
|
|
23
|
+
___
|
|
24
|
+
|
|
25
|
+
### current
|
|
26
|
+
|
|
27
|
+
• **current**: [`OfflineMode`](../API.md#offlinemode)
|
|
28
|
+
|
|
29
|
+
#### Defined in
|
|
30
|
+
|
|
31
|
+
[packages/framework/esm-offline/src/mode.ts:39](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/mode.ts#L39)
|
|
32
|
+
|
|
33
|
+
___
|
|
34
|
+
|
|
35
|
+
### notAvailable
|
|
36
|
+
|
|
37
|
+
• **notAvailable**: `boolean`
|
|
38
|
+
|
|
39
|
+
#### Defined in
|
|
40
|
+
|
|
41
|
+
[packages/framework/esm-offline/src/mode.ts:40](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/mode.ts#L40)
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: OfflineSynchronizationStore
|
|
4
4
|
|
|
5
|
+
Represents the data inside the global offline synchronization store.
|
|
6
|
+
Provides information about a currently ongoing synchronization.
|
|
7
|
+
|
|
5
8
|
## Table of contents
|
|
6
9
|
|
|
7
10
|
### Properties
|
|
@@ -24,4 +27,4 @@
|
|
|
24
27
|
|
|
25
28
|
#### Defined in
|
|
26
29
|
|
|
27
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
30
|
+
[packages/framework/esm-offline/src/sync.ts:93](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L93)
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
## Table of contents
|
|
12
12
|
|
|
13
|
-
### Properties
|
|
13
|
+
### API Properties
|
|
14
14
|
|
|
15
15
|
- [includeConfig](OnlyThePatient.md#includeconfig)
|
|
16
16
|
|
|
17
|
-
## Properties
|
|
17
|
+
## API Properties
|
|
18
18
|
|
|
19
19
|
### includeConfig
|
|
20
20
|
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
|
|
27
27
|
#### Defined in
|
|
28
28
|
|
|
29
|
-
[packages/framework/esm-api/src/shared-api-objects/current-patient.ts:
|
|
29
|
+
[packages/framework/esm-api/src/shared-api-objects/current-patient.ts:20](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-patient.ts#L20)
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
## Table of contents
|
|
12
12
|
|
|
13
|
-
### Properties
|
|
13
|
+
### API Properties
|
|
14
14
|
|
|
15
15
|
- [includeConfig](PatientWithFullResponse.md#includeconfig)
|
|
16
16
|
|
|
17
|
-
## Properties
|
|
17
|
+
## API Properties
|
|
18
18
|
|
|
19
19
|
### includeConfig
|
|
20
20
|
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
|
|
27
27
|
#### Defined in
|
|
28
28
|
|
|
29
|
-
[packages/framework/esm-api/src/shared-api-objects/current-patient.ts:
|
|
29
|
+
[packages/framework/esm-api/src/shared-api-objects/current-patient.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/current-patient.ts#L16)
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: QueueItemDescriptor
|
|
4
4
|
|
|
5
|
+
Contains information about the sync item which has been provided externally by the caller
|
|
6
|
+
who added the item to the queue.
|
|
7
|
+
This information is all optional, but, when provided while enqueuing the item, can be used in other
|
|
8
|
+
locations to better represent the sync item, e.g. in the UI.
|
|
9
|
+
|
|
5
10
|
## Table of contents
|
|
6
11
|
|
|
7
12
|
### Properties
|
|
@@ -19,7 +24,7 @@
|
|
|
19
24
|
|
|
20
25
|
#### Defined in
|
|
21
26
|
|
|
22
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
27
|
+
[packages/framework/esm-offline/src/sync.ts:31](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L31)
|
|
23
28
|
|
|
24
29
|
___
|
|
25
30
|
|
|
@@ -29,7 +34,7 @@ ___
|
|
|
29
34
|
|
|
30
35
|
#### Defined in
|
|
31
36
|
|
|
32
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
37
|
+
[packages/framework/esm-offline/src/sync.ts:36](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L36)
|
|
33
38
|
|
|
34
39
|
___
|
|
35
40
|
|
|
@@ -39,7 +44,7 @@ ___
|
|
|
39
44
|
|
|
40
45
|
#### Defined in
|
|
41
46
|
|
|
42
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
47
|
+
[packages/framework/esm-offline/src/sync.ts:30](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L30)
|
|
43
48
|
|
|
44
49
|
___
|
|
45
50
|
|
|
@@ -49,4 +54,4 @@ ___
|
|
|
49
54
|
|
|
50
55
|
#### Defined in
|
|
51
56
|
|
|
52
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
57
|
+
[packages/framework/esm-offline/src/sync.ts:35](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L35)
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
[@openmrs/esm-framework](../API.md) / SyncItem
|
|
2
2
|
|
|
3
|
-
# Interface: SyncItem
|
|
3
|
+
# Interface: SyncItem<T\>
|
|
4
|
+
|
|
5
|
+
Defines an item queued up in the offline synchronization queue.
|
|
6
|
+
A `SyncItem` contains both meta information about the item in the sync queue, as well as the
|
|
7
|
+
actual data to be synchronized (i.e. the item's `content`).
|
|
8
|
+
|
|
9
|
+
## Type parameters
|
|
10
|
+
|
|
11
|
+
| Name | Type |
|
|
12
|
+
| :------ | :------ |
|
|
13
|
+
| `T` | `any` |
|
|
4
14
|
|
|
5
15
|
## Table of contents
|
|
6
16
|
|
|
@@ -18,11 +28,11 @@
|
|
|
18
28
|
|
|
19
29
|
### content
|
|
20
30
|
|
|
21
|
-
• **content**: `
|
|
31
|
+
• **content**: `T`
|
|
22
32
|
|
|
23
33
|
#### Defined in
|
|
24
34
|
|
|
25
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
35
|
+
[packages/framework/esm-offline/src/sync.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L14)
|
|
26
36
|
|
|
27
37
|
___
|
|
28
38
|
|
|
@@ -32,7 +42,7 @@ ___
|
|
|
32
42
|
|
|
33
43
|
#### Defined in
|
|
34
44
|
|
|
35
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
45
|
+
[packages/framework/esm-offline/src/sync.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L15)
|
|
36
46
|
|
|
37
47
|
___
|
|
38
48
|
|
|
@@ -42,7 +52,7 @@ ___
|
|
|
42
52
|
|
|
43
53
|
#### Defined in
|
|
44
54
|
|
|
45
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
55
|
+
[packages/framework/esm-offline/src/sync.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L16)
|
|
46
56
|
|
|
47
57
|
___
|
|
48
58
|
|
|
@@ -52,7 +62,7 @@ ___
|
|
|
52
62
|
|
|
53
63
|
#### Defined in
|
|
54
64
|
|
|
55
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
65
|
+
[packages/framework/esm-offline/src/sync.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L11)
|
|
56
66
|
|
|
57
67
|
___
|
|
58
68
|
|
|
@@ -69,7 +79,7 @@ ___
|
|
|
69
79
|
|
|
70
80
|
#### Defined in
|
|
71
81
|
|
|
72
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
82
|
+
[packages/framework/esm-offline/src/sync.ts:17](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L17)
|
|
73
83
|
|
|
74
84
|
___
|
|
75
85
|
|
|
@@ -79,7 +89,7 @@ ___
|
|
|
79
89
|
|
|
80
90
|
#### Defined in
|
|
81
91
|
|
|
82
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
92
|
+
[packages/framework/esm-offline/src/sync.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L13)
|
|
83
93
|
|
|
84
94
|
___
|
|
85
95
|
|
|
@@ -89,4 +99,4 @@ ___
|
|
|
89
99
|
|
|
90
100
|
#### Defined in
|
|
91
101
|
|
|
92
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
102
|
+
[packages/framework/esm-offline/src/sync.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L12)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SyncProcessOptions<T\>
|
|
4
4
|
|
|
5
|
+
Additional data which can be used for synchronizing data in a [ProcessSyncItem](../API.md#processsyncitem) function.
|
|
6
|
+
|
|
5
7
|
## Type parameters
|
|
6
8
|
|
|
7
9
|
| Name |
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
|
|
27
29
|
#### Defined in
|
|
28
30
|
|
|
29
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
31
|
+
[packages/framework/esm-offline/src/sync.ts:54](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L54)
|
|
30
32
|
|
|
31
33
|
___
|
|
32
34
|
|
|
@@ -36,7 +38,7 @@ ___
|
|
|
36
38
|
|
|
37
39
|
#### Defined in
|
|
38
40
|
|
|
39
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
41
|
+
[packages/framework/esm-offline/src/sync.ts:58](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L58)
|
|
40
42
|
|
|
41
43
|
___
|
|
42
44
|
|
|
@@ -46,7 +48,7 @@ ___
|
|
|
46
48
|
|
|
47
49
|
#### Defined in
|
|
48
50
|
|
|
49
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
51
|
+
[packages/framework/esm-offline/src/sync.ts:56](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L56)
|
|
50
52
|
|
|
51
53
|
___
|
|
52
54
|
|
|
@@ -56,7 +58,7 @@ ___
|
|
|
56
58
|
|
|
57
59
|
#### Defined in
|
|
58
60
|
|
|
59
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
61
|
+
[packages/framework/esm-offline/src/sync.ts:57](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L57)
|
|
60
62
|
|
|
61
63
|
___
|
|
62
64
|
|
|
@@ -66,4 +68,4 @@ ___
|
|
|
66
68
|
|
|
67
69
|
#### Defined in
|
|
68
70
|
|
|
69
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
71
|
+
[packages/framework/esm-offline/src/sync.ts:55](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L55)
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
## Table of contents
|
|
6
6
|
|
|
7
|
-
### Properties
|
|
7
|
+
### API Properties
|
|
8
8
|
|
|
9
9
|
- [anythingElse](VisitItem.md#anythingelse)
|
|
10
10
|
- [mode](VisitItem.md#mode)
|
|
11
11
|
- [status](VisitItem.md#status)
|
|
12
12
|
- [visitData](VisitItem.md#visitdata)
|
|
13
13
|
|
|
14
|
-
## Properties
|
|
14
|
+
## API Properties
|
|
15
15
|
|
|
16
16
|
### anythingElse
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
#### Defined in
|
|
21
21
|
|
|
22
|
-
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:
|
|
22
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:84](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-utils.ts#L84)
|
|
23
23
|
|
|
24
24
|
___
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ ___
|
|
|
29
29
|
|
|
30
30
|
#### Defined in
|
|
31
31
|
|
|
32
|
-
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:
|
|
32
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:81](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-utils.ts#L81)
|
|
33
33
|
|
|
34
34
|
___
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ ___
|
|
|
39
39
|
|
|
40
40
|
#### Defined in
|
|
41
41
|
|
|
42
|
-
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:
|
|
42
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:83](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-utils.ts#L83)
|
|
43
43
|
|
|
44
44
|
___
|
|
45
45
|
|
|
@@ -49,4 +49,4 @@ ___
|
|
|
49
49
|
|
|
50
50
|
#### Defined in
|
|
51
51
|
|
|
52
|
-
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:
|
|
52
|
+
[packages/framework/esm-api/src/shared-api-objects/visit-utils.ts:82](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/shared-api-objects/visit-utils.ts#L82)
|
package/mock.tsx
CHANGED
|
@@ -199,11 +199,20 @@ export const detachAll = jest.fn();
|
|
|
199
199
|
|
|
200
200
|
export const switchTo = jest.fn();
|
|
201
201
|
|
|
202
|
-
export const ExtensionSlot =
|
|
202
|
+
export const ExtensionSlot = jest
|
|
203
|
+
.fn()
|
|
204
|
+
.mockImplementation(({ children }) => <>{children}</>);
|
|
203
205
|
|
|
204
206
|
export const Extension = jest.fn().mockImplementation((props: any) => <slot />);
|
|
205
207
|
|
|
206
|
-
export const
|
|
208
|
+
export const getExtensionStore = () =>
|
|
209
|
+
getGlobalStore("extensions", { slots: {} });
|
|
210
|
+
|
|
211
|
+
export const getExtensionInternalStore = () =>
|
|
212
|
+
getGlobalStore("extensions-internal", {
|
|
213
|
+
slots: {},
|
|
214
|
+
extensions: {},
|
|
215
|
+
});
|
|
207
216
|
|
|
208
217
|
/* esm-react-utils */
|
|
209
218
|
|
|
@@ -232,6 +241,8 @@ export const useExtensionSlot = jest.fn(() => ({
|
|
|
232
241
|
extensionIdsToRender: [],
|
|
233
242
|
}));
|
|
234
243
|
|
|
244
|
+
export const useExtensionSlotMeta = jest.fn(() => ({}));
|
|
245
|
+
|
|
235
246
|
export const UserHasAccess = jest.fn().mockImplementation((props: any) => {
|
|
236
247
|
return props.children;
|
|
237
248
|
});
|
|
@@ -241,10 +252,11 @@ export const createUseStore = (store: Store<any>) => (actions) => {
|
|
|
241
252
|
return { ...state, ...actions };
|
|
242
253
|
};
|
|
243
254
|
|
|
244
|
-
export const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
255
|
+
export const useExtensionInternalStore = createUseStore(
|
|
256
|
+
getExtensionInternalStore()
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
export const useExtensionStore = createUseStore(getExtensionStore());
|
|
248
260
|
|
|
249
261
|
export const useStore = (store: Store<any>, actions) => {
|
|
250
262
|
const state = store.getState();
|
|
@@ -257,6 +269,13 @@ export const usePagination = jest.fn().mockImplementation(() => ({
|
|
|
257
269
|
results: [],
|
|
258
270
|
}));
|
|
259
271
|
|
|
272
|
+
export const useVisit = jest.fn().mockReturnValue({
|
|
273
|
+
error: null,
|
|
274
|
+
mutate: jest.fn(),
|
|
275
|
+
isValidating: true,
|
|
276
|
+
currentVisit: null,
|
|
277
|
+
});
|
|
278
|
+
|
|
260
279
|
export const useVisitTypes = jest.fn(() => []);
|
|
261
280
|
|
|
262
281
|
/* esm-styleguide */
|