@openmrs/esm-framework 3.4.1-pre.132 → 3.4.1-pre.146
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 +25 -14
- package/docs/classes/OpenmrsFetchError.md +4 -4
- package/docs/interfaces/ExtensionSlotBaseProps.md +16 -3
- package/docs/interfaces/FHIRRequestObj.md +5 -3
- package/docs/interfaces/FHIRRequestOptions.md +43 -0
- package/docs/interfaces/FetchResponseJson.md +7 -0
- package/docs/interfaces/OldExtensionSlotBaseProps.md +67 -0
- package/docs/interfaces/UserHasAccessProps.md +11 -0
- package/package.json +13 -13
- package/src/integration-tests/extension-config.test.tsx +7 -16
package/docs/API.md
CHANGED
|
@@ -388,11 +388,11 @@ ___
|
|
|
388
388
|
|
|
389
389
|
### ExtensionSlotProps
|
|
390
390
|
|
|
391
|
-
Ƭ **ExtensionSlotProps**: [`ExtensionSlotBaseProps`](interfaces/ExtensionSlotBaseProps.md) & `React.HTMLAttributes`<`HTMLDivElement`\>
|
|
391
|
+
Ƭ **ExtensionSlotProps**: [`OldExtensionSlotBaseProps`](interfaces/OldExtensionSlotBaseProps.md) \| [`ExtensionSlotBaseProps`](interfaces/ExtensionSlotBaseProps.md) & `React.HTMLAttributes`<`HTMLDivElement`\>
|
|
392
392
|
|
|
393
393
|
#### Defined in
|
|
394
394
|
|
|
395
|
-
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:
|
|
395
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:58](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L58)
|
|
396
396
|
|
|
397
397
|
___
|
|
398
398
|
|
|
@@ -545,7 +545,7 @@ ___
|
|
|
545
545
|
|
|
546
546
|
#### Defined in
|
|
547
547
|
|
|
548
|
-
[packages/framework/esm-react-utils/src/UserHasAccess.tsx:
|
|
548
|
+
[packages/framework/esm-react-utils/src/UserHasAccess.tsx:10](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/UserHasAccess.tsx#L10)
|
|
549
549
|
|
|
550
550
|
___
|
|
551
551
|
|
|
@@ -561,16 +561,27 @@ ___
|
|
|
561
561
|
|
|
562
562
|
### fhir
|
|
563
563
|
|
|
564
|
-
• **fhir**: `
|
|
564
|
+
• **fhir**: `Object`
|
|
565
565
|
|
|
566
|
-
The `fhir` object is
|
|
566
|
+
The `fhir` object is replicates the API from [fhir.js](https://github.com/FHIR/fhir.js)
|
|
567
567
|
that can be used to call FHIR-compliant OpenMRS APIs. See
|
|
568
568
|
[the docs for fhir.js](https://github.com/FHIR/fhir.js) for more info
|
|
569
569
|
and example usage.
|
|
570
570
|
|
|
571
|
+
This object should be considered deprecated and may be removed from a future version
|
|
572
|
+
of the framework.
|
|
573
|
+
|
|
574
|
+
**`deprecated`**
|
|
575
|
+
|
|
576
|
+
#### Type declaration
|
|
577
|
+
|
|
578
|
+
| Name | Type |
|
|
579
|
+
| :------ | :------ |
|
|
580
|
+
| `read` | <T\>(`options`: [`FHIRRequestOptions`](interfaces/FHIRRequestOptions.md)) => `Promise`<{ `config`: [`FHIRRequestObj`](interfaces/FHIRRequestObj.md) ; `data`: `T` ; `headers`: `Headers` ; `status`: `number` }\> |
|
|
581
|
+
|
|
571
582
|
#### Defined in
|
|
572
583
|
|
|
573
|
-
[packages/framework/esm-api/src/fhir.ts:
|
|
584
|
+
[packages/framework/esm-api/src/fhir.ts:45](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L45)
|
|
574
585
|
|
|
575
586
|
___
|
|
576
587
|
|
|
@@ -600,7 +611,7 @@ ___
|
|
|
600
611
|
|
|
601
612
|
#### Defined in
|
|
602
613
|
|
|
603
|
-
[packages/framework/esm-api/src/openmrs-fetch.ts:
|
|
614
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:7](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L7)
|
|
604
615
|
|
|
605
616
|
___
|
|
606
617
|
|
|
@@ -703,7 +714,7 @@ ___
|
|
|
703
714
|
|
|
704
715
|
#### Defined in
|
|
705
716
|
|
|
706
|
-
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:
|
|
717
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:68](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L68)
|
|
707
718
|
|
|
708
719
|
___
|
|
709
720
|
|
|
@@ -752,18 +763,18 @@ ___
|
|
|
752
763
|
|
|
753
764
|
### fetchCurrentPatient
|
|
754
765
|
|
|
755
|
-
▸ **fetchCurrentPatient**(`patientUuid`, `contentOverrides?`): `Promise`<{ `data`: `Patient` }\> \| `Promise`<``null``\>
|
|
766
|
+
▸ **fetchCurrentPatient**(`patientUuid`, `contentOverrides?`): `Promise`<{ `config`: [`FHIRRequestObj`](interfaces/FHIRRequestObj.md) ; `data`: `Patient` ; `headers`: `Headers` ; `status`: `number` }\> \| `Promise`<``null``\>
|
|
756
767
|
|
|
757
768
|
#### Parameters
|
|
758
769
|
|
|
759
770
|
| Name | Type |
|
|
760
771
|
| :------ | :------ |
|
|
761
772
|
| `patientUuid` | [`PatientUuid`](API.md#patientuuid) |
|
|
762
|
-
| `contentOverrides?` | `Partial`<
|
|
773
|
+
| `contentOverrides?` | `Partial`<[`FHIRRequestOptions`](interfaces/FHIRRequestOptions.md)\> |
|
|
763
774
|
|
|
764
775
|
#### Returns
|
|
765
776
|
|
|
766
|
-
`Promise`<{ `data`: `Patient` }\> \| `Promise`<``null``\>
|
|
777
|
+
`Promise`<{ `config`: [`FHIRRequestObj`](interfaces/FHIRRequestObj.md) ; `data`: `Patient` ; `headers`: `Headers` ; `status`: `number` }\> \| `Promise`<``null``\>
|
|
767
778
|
|
|
768
779
|
#### Defined in
|
|
769
780
|
|
|
@@ -967,7 +978,7 @@ makeUrl('/foo/bar');
|
|
|
967
978
|
|
|
968
979
|
#### Defined in
|
|
969
980
|
|
|
970
|
-
[packages/framework/esm-api/src/openmrs-fetch.ts:
|
|
981
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:19](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L19)
|
|
971
982
|
|
|
972
983
|
___
|
|
973
984
|
|
|
@@ -1034,7 +1045,7 @@ free up memory and network resources and to prevent race conditions.
|
|
|
1034
1045
|
|
|
1035
1046
|
#### Defined in
|
|
1036
1047
|
|
|
1037
|
-
[packages/framework/esm-api/src/openmrs-fetch.ts:
|
|
1048
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:72](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L72)
|
|
1038
1049
|
|
|
1039
1050
|
___
|
|
1040
1051
|
|
|
@@ -1085,7 +1096,7 @@ To cancel the network request, simply call `subscription.unsubscribe();`
|
|
|
1085
1096
|
|
|
1086
1097
|
#### Defined in
|
|
1087
1098
|
|
|
1088
|
-
[packages/framework/esm-api/src/openmrs-fetch.ts:
|
|
1099
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:243](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L243)
|
|
1089
1100
|
|
|
1090
1101
|
___
|
|
1091
1102
|
|
|
@@ -53,7 +53,7 @@ Error.constructor
|
|
|
53
53
|
|
|
54
54
|
#### Defined in
|
|
55
55
|
|
|
56
|
-
[packages/framework/esm-api/src/openmrs-fetch.ts:
|
|
56
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:281](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L281)
|
|
57
57
|
|
|
58
58
|
## API Properties
|
|
59
59
|
|
|
@@ -63,17 +63,17 @@ Error.constructor
|
|
|
63
63
|
|
|
64
64
|
#### Defined in
|
|
65
65
|
|
|
66
|
-
[packages/framework/esm-api/src/openmrs-fetch.ts:
|
|
66
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:294](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L294)
|
|
67
67
|
|
|
68
68
|
___
|
|
69
69
|
|
|
70
70
|
### responseBody
|
|
71
71
|
|
|
72
|
-
• **responseBody**: ``null`` \| `string` \| `FetchResponseJson`
|
|
72
|
+
• **responseBody**: ``null`` \| `string` \| [`FetchResponseJson`](../interfaces/FetchResponseJson.md)
|
|
73
73
|
|
|
74
74
|
#### Defined in
|
|
75
75
|
|
|
76
|
-
[packages/framework/esm-api/src/openmrs-fetch.ts:
|
|
76
|
+
[packages/framework/esm-api/src/openmrs-fetch.ts:295](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-fetch.ts#L295)
|
|
77
77
|
|
|
78
78
|
___
|
|
79
79
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
### Properties
|
|
8
8
|
|
|
9
9
|
- [extensionSlotName](ExtensionSlotBaseProps.md#extensionslotname)
|
|
10
|
+
- [name](ExtensionSlotBaseProps.md#name)
|
|
10
11
|
- [state](ExtensionSlotBaseProps.md#state)
|
|
11
12
|
|
|
12
13
|
### Methods
|
|
@@ -17,7 +18,19 @@
|
|
|
17
18
|
|
|
18
19
|
### extensionSlotName
|
|
19
20
|
|
|
20
|
-
• **extensionSlotName**: `string`
|
|
21
|
+
• `Optional` **extensionSlotName**: `string`
|
|
22
|
+
|
|
23
|
+
**`deprecated`** Use `name`
|
|
24
|
+
|
|
25
|
+
#### Defined in
|
|
26
|
+
|
|
27
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:45](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L45)
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### name
|
|
32
|
+
|
|
33
|
+
• **name**: `string`
|
|
21
34
|
|
|
22
35
|
#### Defined in
|
|
23
36
|
|
|
@@ -31,7 +44,7 @@ ___
|
|
|
31
44
|
|
|
32
45
|
#### Defined in
|
|
33
46
|
|
|
34
|
-
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:
|
|
47
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:47](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L47)
|
|
35
48
|
|
|
36
49
|
## Methods
|
|
37
50
|
|
|
@@ -51,4 +64,4 @@ ___
|
|
|
51
64
|
|
|
52
65
|
#### Defined in
|
|
53
66
|
|
|
54
|
-
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:
|
|
67
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:46](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L46)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: FHIRRequestObj
|
|
4
4
|
|
|
5
|
+
**`deprecated`**
|
|
6
|
+
|
|
5
7
|
## Table of contents
|
|
6
8
|
|
|
7
9
|
### API Properties
|
|
@@ -18,7 +20,7 @@
|
|
|
18
20
|
|
|
19
21
|
#### Defined in
|
|
20
22
|
|
|
21
|
-
[packages/framework/esm-api/src/fhir.ts:
|
|
23
|
+
[packages/framework/esm-api/src/fhir.ts:73](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L73)
|
|
22
24
|
|
|
23
25
|
___
|
|
24
26
|
|
|
@@ -28,7 +30,7 @@ ___
|
|
|
28
30
|
|
|
29
31
|
#### Defined in
|
|
30
32
|
|
|
31
|
-
[packages/framework/esm-api/src/fhir.ts:
|
|
33
|
+
[packages/framework/esm-api/src/fhir.ts:72](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L72)
|
|
32
34
|
|
|
33
35
|
___
|
|
34
36
|
|
|
@@ -38,4 +40,4 @@ ___
|
|
|
38
40
|
|
|
39
41
|
#### Defined in
|
|
40
42
|
|
|
41
|
-
[packages/framework/esm-api/src/fhir.ts:
|
|
43
|
+
[packages/framework/esm-api/src/fhir.ts:71](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L71)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / FHIRRequestOptions
|
|
2
|
+
|
|
3
|
+
# Interface: FHIRRequestOptions
|
|
4
|
+
|
|
5
|
+
**`deprecated`**
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### API Properties
|
|
10
|
+
|
|
11
|
+
- [headers](FHIRRequestOptions.md#headers)
|
|
12
|
+
- [patient](FHIRRequestOptions.md#patient)
|
|
13
|
+
- [type](FHIRRequestOptions.md#type)
|
|
14
|
+
|
|
15
|
+
## API Properties
|
|
16
|
+
|
|
17
|
+
### headers
|
|
18
|
+
|
|
19
|
+
• `Optional` **headers**: [`FetchHeaders`](FetchHeaders.md)
|
|
20
|
+
|
|
21
|
+
#### Defined in
|
|
22
|
+
|
|
23
|
+
[packages/framework/esm-api/src/fhir.ts:66](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L66)
|
|
24
|
+
|
|
25
|
+
___
|
|
26
|
+
|
|
27
|
+
### patient
|
|
28
|
+
|
|
29
|
+
• **patient**: `string`
|
|
30
|
+
|
|
31
|
+
#### Defined in
|
|
32
|
+
|
|
33
|
+
[packages/framework/esm-api/src/fhir.ts:65](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L65)
|
|
34
|
+
|
|
35
|
+
___
|
|
36
|
+
|
|
37
|
+
### type
|
|
38
|
+
|
|
39
|
+
• **type**: `ResourceName`
|
|
40
|
+
|
|
41
|
+
#### Defined in
|
|
42
|
+
|
|
43
|
+
[packages/framework/esm-api/src/fhir.ts:64](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/fhir.ts#L64)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / OldExtensionSlotBaseProps
|
|
2
|
+
|
|
3
|
+
# Interface: OldExtensionSlotBaseProps
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [extensionSlotName](OldExtensionSlotBaseProps.md#extensionslotname)
|
|
10
|
+
- [name](OldExtensionSlotBaseProps.md#name)
|
|
11
|
+
- [state](OldExtensionSlotBaseProps.md#state)
|
|
12
|
+
|
|
13
|
+
### Methods
|
|
14
|
+
|
|
15
|
+
- [select](OldExtensionSlotBaseProps.md#select)
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
### extensionSlotName
|
|
20
|
+
|
|
21
|
+
• **extensionSlotName**: `string`
|
|
22
|
+
|
|
23
|
+
**`deprecated`** Use `name`
|
|
24
|
+
|
|
25
|
+
#### Defined in
|
|
26
|
+
|
|
27
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:53](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L53)
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### name
|
|
32
|
+
|
|
33
|
+
• `Optional` **name**: `string`
|
|
34
|
+
|
|
35
|
+
#### Defined in
|
|
36
|
+
|
|
37
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:51](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L51)
|
|
38
|
+
|
|
39
|
+
___
|
|
40
|
+
|
|
41
|
+
### state
|
|
42
|
+
|
|
43
|
+
• `Optional` **state**: `Record`<`string`, `any`\>
|
|
44
|
+
|
|
45
|
+
#### Defined in
|
|
46
|
+
|
|
47
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:55](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L55)
|
|
48
|
+
|
|
49
|
+
## Methods
|
|
50
|
+
|
|
51
|
+
### select
|
|
52
|
+
|
|
53
|
+
▸ `Optional` **select**(`extensions`): [`ConnectedExtension`](ConnectedExtension.md)[]
|
|
54
|
+
|
|
55
|
+
#### Parameters
|
|
56
|
+
|
|
57
|
+
| Name | Type |
|
|
58
|
+
| :------ | :------ |
|
|
59
|
+
| `extensions` | [`ConnectedExtension`](ConnectedExtension.md)[] |
|
|
60
|
+
|
|
61
|
+
#### Returns
|
|
62
|
+
|
|
63
|
+
[`ConnectedExtension`](ConnectedExtension.md)[]
|
|
64
|
+
|
|
65
|
+
#### Defined in
|
|
66
|
+
|
|
67
|
+
[packages/framework/esm-react-utils/src/ExtensionSlot.tsx:54](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ExtensionSlot.tsx#L54)
|
|
@@ -6,10 +6,21 @@
|
|
|
6
6
|
|
|
7
7
|
### API Properties
|
|
8
8
|
|
|
9
|
+
- [fallback](UserHasAccessProps.md#fallback)
|
|
9
10
|
- [privilege](UserHasAccessProps.md#privilege)
|
|
10
11
|
|
|
11
12
|
## API Properties
|
|
12
13
|
|
|
14
|
+
### fallback
|
|
15
|
+
|
|
16
|
+
• `Optional` **fallback**: `ReactNode`
|
|
17
|
+
|
|
18
|
+
#### Defined in
|
|
19
|
+
|
|
20
|
+
[packages/framework/esm-react-utils/src/UserHasAccess.tsx:7](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/UserHasAccess.tsx#L7)
|
|
21
|
+
|
|
22
|
+
___
|
|
23
|
+
|
|
13
24
|
### privilege
|
|
14
25
|
|
|
15
26
|
• **privilege**: `string`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-framework",
|
|
3
|
-
"version": "3.4.1-pre.
|
|
3
|
+
"version": "3.4.1-pre.146",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"browser": "dist/openmrs-esm-framework.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@openmrs/esm-api": "^3.4.1-pre.
|
|
39
|
-
"@openmrs/esm-breadcrumbs": "^3.4.1-pre.
|
|
40
|
-
"@openmrs/esm-config": "^3.4.1-pre.
|
|
41
|
-
"@openmrs/esm-error-handling": "^3.4.1-pre.
|
|
42
|
-
"@openmrs/esm-extensions": "^3.4.1-pre.
|
|
43
|
-
"@openmrs/esm-globals": "^3.4.1-pre.
|
|
44
|
-
"@openmrs/esm-offline": "^3.4.1-pre.
|
|
45
|
-
"@openmrs/esm-react-utils": "^3.4.1-pre.
|
|
46
|
-
"@openmrs/esm-state": "^3.4.1-pre.
|
|
47
|
-
"@openmrs/esm-styleguide": "^3.4.1-pre.
|
|
48
|
-
"@openmrs/esm-utils": "^3.4.1-pre.
|
|
38
|
+
"@openmrs/esm-api": "^3.4.1-pre.146",
|
|
39
|
+
"@openmrs/esm-breadcrumbs": "^3.4.1-pre.146",
|
|
40
|
+
"@openmrs/esm-config": "^3.4.1-pre.146",
|
|
41
|
+
"@openmrs/esm-error-handling": "^3.4.1-pre.146",
|
|
42
|
+
"@openmrs/esm-extensions": "^3.4.1-pre.146",
|
|
43
|
+
"@openmrs/esm-globals": "^3.4.1-pre.146",
|
|
44
|
+
"@openmrs/esm-offline": "^3.4.1-pre.146",
|
|
45
|
+
"@openmrs/esm-react-utils": "^3.4.1-pre.146",
|
|
46
|
+
"@openmrs/esm-state": "^3.4.1-pre.146",
|
|
47
|
+
"@openmrs/esm-styleguide": "^3.4.1-pre.146",
|
|
48
|
+
"@openmrs/esm-utils": "^3.4.1-pre.146",
|
|
49
49
|
"dayjs": "^1.10.7"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "778740715dc4112e140f372d75da1b57523babc6"
|
|
52
52
|
}
|
|
@@ -55,7 +55,7 @@ describe("Interaction between configuration and extension systems", () => {
|
|
|
55
55
|
moduleName: "esm-flintstone",
|
|
56
56
|
featureName: "The Flintstones",
|
|
57
57
|
disableTranslations: true,
|
|
58
|
-
})(() => <ExtensionSlot data-testid="slot"
|
|
58
|
+
})(() => <ExtensionSlot data-testid="slot" name="A slot" />);
|
|
59
59
|
render(<App />);
|
|
60
60
|
await waitFor(() => expect(screen.getByText("Betty")).toBeInTheDocument());
|
|
61
61
|
const slot = screen.getByTestId("slot");
|
|
@@ -93,14 +93,8 @@ describe("Interaction between configuration and extension systems", () => {
|
|
|
93
93
|
disableTranslations: true,
|
|
94
94
|
})(() => (
|
|
95
95
|
<>
|
|
96
|
-
<ExtensionSlot
|
|
97
|
-
|
|
98
|
-
extensionSlotName="Flintstone slot"
|
|
99
|
-
/>
|
|
100
|
-
<ExtensionSlot
|
|
101
|
-
data-testid="future-slot"
|
|
102
|
-
extensionSlotName="Future slot"
|
|
103
|
-
/>
|
|
96
|
+
<ExtensionSlot data-testid="flintstone-slot" name="Flintstone slot" />
|
|
97
|
+
<ExtensionSlot data-testid="future-slot" name="Future slot" />
|
|
104
98
|
</>
|
|
105
99
|
));
|
|
106
100
|
render(<App />);
|
|
@@ -140,10 +134,7 @@ describe("Interaction between configuration and extension systems", () => {
|
|
|
140
134
|
disableTranslations: true,
|
|
141
135
|
})(() => (
|
|
142
136
|
<>
|
|
143
|
-
<ExtensionSlot
|
|
144
|
-
data-testid="flintstone-slot"
|
|
145
|
-
extensionSlotName="Flintstone slot"
|
|
146
|
-
/>
|
|
137
|
+
<ExtensionSlot data-testid="flintstone-slot" name="Flintstone slot" />
|
|
147
138
|
</>
|
|
148
139
|
));
|
|
149
140
|
render(<App />);
|
|
@@ -161,7 +152,7 @@ describe("Interaction between configuration and extension systems", () => {
|
|
|
161
152
|
moduleName: "esm-slaghoople",
|
|
162
153
|
featureName: "The Slaghooples",
|
|
163
154
|
disableTranslations: true,
|
|
164
|
-
})(() => <ExtensionSlot data-testid="slot"
|
|
155
|
+
})(() => <ExtensionSlot data-testid="slot" name="A slot" />);
|
|
165
156
|
render(<App />);
|
|
166
157
|
await waitFor(() => expect(screen.getByText("Pearl")).toBeInTheDocument());
|
|
167
158
|
act(() => {
|
|
@@ -188,7 +179,7 @@ describe("Interaction between configuration and extension systems", () => {
|
|
|
188
179
|
moduleName: "esm-quarry",
|
|
189
180
|
featureName: "The Flintstones",
|
|
190
181
|
disableTranslations: true,
|
|
191
|
-
})(() => <ExtensionSlot data-testid="slot"
|
|
182
|
+
})(() => <ExtensionSlot data-testid="slot" name="A slot" />);
|
|
192
183
|
render(<App />);
|
|
193
184
|
await waitFor(() =>
|
|
194
185
|
expect(screen.getByText(/Mr. Slate/)).toBeInTheDocument()
|
|
@@ -221,7 +212,7 @@ describe("Interaction between configuration and extension systems", () => {
|
|
|
221
212
|
const store = useExtensionStore();
|
|
222
213
|
return (
|
|
223
214
|
<div>
|
|
224
|
-
<ExtensionSlot data-testid="slot"
|
|
215
|
+
<ExtensionSlot data-testid="slot" name="A slot" />
|
|
225
216
|
{store.slots["A slot"].assignedExtensions.map((e) => (
|
|
226
217
|
<div key={e.name}>{JSON.stringify(e.config)}</div>
|
|
227
218
|
))}
|