@openmrs/esm-framework 3.3.2-pre.9 → 4.0.0-pre.0
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 +66 -93
- package/.turbo/turbo-lint.log +2 -0
- package/.turbo/turbo-test.log +451 -0
- package/.turbo/turbo-typescript.log +2 -0
- package/dist/openmrs-esm-framework.js +1 -1
- package/dist/openmrs-esm-framework.js.LICENSE.txt +10 -13
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +61 -40
- package/docs/interfaces/UserHasAccessProps.md +11 -0
- package/jest.config.js +5 -0
- package/package.json +13 -13
- package/src/integration-tests/extension-config.test.tsx +3 -4
package/docs/API.md
CHANGED
|
@@ -141,6 +141,7 @@
|
|
|
141
141
|
|
|
142
142
|
### UI Functions
|
|
143
143
|
|
|
144
|
+
- [isDesktop](API.md#isdesktop)
|
|
144
145
|
- [setLeftNav](API.md#setleftnav)
|
|
145
146
|
- [showModal](API.md#showmodal)
|
|
146
147
|
- [showNotification](API.md#shownotification)
|
|
@@ -494,7 +495,7 @@ ___
|
|
|
494
495
|
|
|
495
496
|
### LayoutType
|
|
496
497
|
|
|
497
|
-
Ƭ **LayoutType**: ``"tablet"`` \| ``"
|
|
498
|
+
Ƭ **LayoutType**: ``"phone"`` \| ``"tablet"`` \| ``"small-desktop"`` \| ``"large-desktop"``
|
|
498
499
|
|
|
499
500
|
#### Defined in
|
|
500
501
|
|
|
@@ -514,17 +515,17 @@ ___
|
|
|
514
515
|
|
|
515
516
|
### UserHasAccess
|
|
516
517
|
|
|
517
|
-
• **UserHasAccess**: `React.FC`<[`UserHasAccessProps`](interfaces/UserHasAccessProps.md)\>
|
|
518
|
+
• `Const` **UserHasAccess**: `React.FC`<[`UserHasAccessProps`](interfaces/UserHasAccessProps.md)\>
|
|
518
519
|
|
|
519
520
|
#### Defined in
|
|
520
521
|
|
|
521
|
-
[packages/framework/esm-react-utils/src/UserHasAccess.tsx:
|
|
522
|
+
[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)
|
|
522
523
|
|
|
523
524
|
___
|
|
524
525
|
|
|
525
526
|
### defaultVisitCustomRepresentation
|
|
526
527
|
|
|
527
|
-
• **defaultVisitCustomRepresentation**: `string`
|
|
528
|
+
• `Const` **defaultVisitCustomRepresentation**: `string`
|
|
528
529
|
|
|
529
530
|
#### Defined in
|
|
530
531
|
|
|
@@ -534,7 +535,7 @@ ___
|
|
|
534
535
|
|
|
535
536
|
### fhir
|
|
536
537
|
|
|
537
|
-
• **fhir**: `FhirClient`
|
|
538
|
+
• `Const` **fhir**: `FhirClient`
|
|
538
539
|
|
|
539
540
|
The `fhir` object is [an instance of fhir.js](https://github.com/FHIR/fhir.js)
|
|
540
541
|
that can be used to call FHIR-compliant OpenMRS APIs. See
|
|
@@ -549,7 +550,7 @@ ___
|
|
|
549
550
|
|
|
550
551
|
### fhirBaseUrl
|
|
551
552
|
|
|
552
|
-
• **fhirBaseUrl**: ``"/ws/fhir2/R4"``
|
|
553
|
+
• `Const` **fhirBaseUrl**: ``"/ws/fhir2/R4"``
|
|
553
554
|
|
|
554
555
|
#### Defined in
|
|
555
556
|
|
|
@@ -559,7 +560,7 @@ ___
|
|
|
559
560
|
|
|
560
561
|
### getStartedVisit
|
|
561
562
|
|
|
562
|
-
• **getStartedVisit**: `BehaviorSubject`<``null`` \| [`VisitItem`](interfaces/VisitItem.md)\>
|
|
563
|
+
• `Const` **getStartedVisit**: `BehaviorSubject`<``null`` \| [`VisitItem`](interfaces/VisitItem.md)\>
|
|
563
564
|
|
|
564
565
|
#### Defined in
|
|
565
566
|
|
|
@@ -569,7 +570,7 @@ ___
|
|
|
569
570
|
|
|
570
571
|
### sessionEndpoint
|
|
571
572
|
|
|
572
|
-
• **sessionEndpoint**: ``"/ws/rest/v1/session"``
|
|
573
|
+
• `Const` **sessionEndpoint**: ``"/ws/rest/v1/session"``
|
|
573
574
|
|
|
574
575
|
#### Defined in
|
|
575
576
|
|
|
@@ -581,7 +582,7 @@ ___
|
|
|
581
582
|
|
|
582
583
|
### validators
|
|
583
584
|
|
|
584
|
-
• **validators**: `Object`
|
|
585
|
+
• `Const` **validators**: `Object`
|
|
585
586
|
|
|
586
587
|
#### Type declaration
|
|
587
588
|
|
|
@@ -601,7 +602,7 @@ ___
|
|
|
601
602
|
|
|
602
603
|
### ConfigurableLink
|
|
603
604
|
|
|
604
|
-
• **ConfigurableLink**: `React.FC`<[`ConfigurableLinkProps`](interfaces/ConfigurableLinkProps.md)\>
|
|
605
|
+
• `Const` **ConfigurableLink**: `React.FC`<[`ConfigurableLinkProps`](interfaces/ConfigurableLinkProps.md)\>
|
|
605
606
|
|
|
606
607
|
A React link component which calls [navigate](API.md#navigate) when clicked
|
|
607
608
|
|
|
@@ -621,7 +622,7 @@ ___
|
|
|
621
622
|
|
|
622
623
|
### offlineUuidPrefix
|
|
623
624
|
|
|
624
|
-
• **offlineUuidPrefix**: ``"OFFLINE+"``
|
|
625
|
+
• `Const` **offlineUuidPrefix**: ``"OFFLINE+"``
|
|
625
626
|
|
|
626
627
|
#### Defined in
|
|
627
628
|
|
|
@@ -631,7 +632,7 @@ ___
|
|
|
631
632
|
|
|
632
633
|
### omrsOfflineCachingStrategyHttpHeaderName
|
|
633
634
|
|
|
634
|
-
• **omrsOfflineCachingStrategyHttpHeaderName**: ``"x-omrs-offline-caching-strategy"``
|
|
635
|
+
• `Const` **omrsOfflineCachingStrategyHttpHeaderName**: ``"x-omrs-offline-caching-strategy"``
|
|
635
636
|
|
|
636
637
|
#### Defined in
|
|
637
638
|
|
|
@@ -641,7 +642,7 @@ ___
|
|
|
641
642
|
|
|
642
643
|
### omrsOfflineResponseBodyHttpHeaderName
|
|
643
644
|
|
|
644
|
-
• **omrsOfflineResponseBodyHttpHeaderName**: ``"x-omrs-offline-response-body"``
|
|
645
|
+
• `Const` **omrsOfflineResponseBodyHttpHeaderName**: ``"x-omrs-offline-response-body"``
|
|
645
646
|
|
|
646
647
|
#### Defined in
|
|
647
648
|
|
|
@@ -651,7 +652,7 @@ ___
|
|
|
651
652
|
|
|
652
653
|
### omrsOfflineResponseStatusHttpHeaderName
|
|
653
654
|
|
|
654
|
-
• **omrsOfflineResponseStatusHttpHeaderName**: ``"x-omrs-offline-response-status"``
|
|
655
|
+
• `Const` **omrsOfflineResponseStatusHttpHeaderName**: ``"x-omrs-offline-response-status"``
|
|
655
656
|
|
|
656
657
|
#### Defined in
|
|
657
658
|
|
|
@@ -663,7 +664,7 @@ ___
|
|
|
663
664
|
|
|
664
665
|
### Extension
|
|
665
666
|
|
|
666
|
-
• **Extension**: `React.FC`<[`ExtensionProps`](interfaces/ExtensionProps.md)\>
|
|
667
|
+
• `Const` **Extension**: `React.FC`<[`ExtensionProps`](interfaces/ExtensionProps.md)\>
|
|
667
668
|
|
|
668
669
|
Represents the position in the DOM where each extension within
|
|
669
670
|
an extension slot is rendered.
|
|
@@ -681,7 +682,7 @@ ___
|
|
|
681
682
|
|
|
682
683
|
### ExtensionSlot
|
|
683
684
|
|
|
684
|
-
• **ExtensionSlot**: `React.FC`<[`ExtensionSlotProps`](API.md#extensionslotprops)\>
|
|
685
|
+
• `Const` **ExtensionSlot**: `React.FC`<[`ExtensionSlotProps`](API.md#extensionslotprops)\>
|
|
685
686
|
|
|
686
687
|
#### Defined in
|
|
687
688
|
|
|
@@ -691,7 +692,7 @@ ___
|
|
|
691
692
|
|
|
692
693
|
### backendDependencies
|
|
693
694
|
|
|
694
|
-
• **backendDependencies**: `Object`
|
|
695
|
+
• `Const` **backendDependencies**: `Object`
|
|
695
696
|
|
|
696
697
|
#### Type declaration
|
|
697
698
|
|
|
@@ -710,7 +711,7 @@ ___
|
|
|
710
711
|
|
|
711
712
|
### LeftNavMenu
|
|
712
713
|
|
|
713
|
-
• **LeftNavMenu**: `ForwardRefExoticComponent`<`SideNavProps` & `RefAttributes`<`HTMLElement`\>\>
|
|
714
|
+
• `Const` **LeftNavMenu**: `ForwardRefExoticComponent`<`Pick`<`SideNavProps`, `string` \| `number` \| `symbol`\> & `RefAttributes`<`HTMLElement`\>\>
|
|
714
715
|
|
|
715
716
|
#### Defined in
|
|
716
717
|
|
|
@@ -1597,7 +1598,7 @@ ___
|
|
|
1597
1598
|
|
|
1598
1599
|
### inRange
|
|
1599
1600
|
|
|
1600
|
-
▸
|
|
1601
|
+
▸ **inRange**(`min`, `max`): [`Validator`](API.md#validator)
|
|
1601
1602
|
|
|
1602
1603
|
Verifies that the value is between the provided minimum and maximum
|
|
1603
1604
|
|
|
@@ -1620,7 +1621,7 @@ ___
|
|
|
1620
1621
|
|
|
1621
1622
|
### isUrl
|
|
1622
1623
|
|
|
1623
|
-
▸
|
|
1624
|
+
▸ **isUrl**(`value`): `string` \| `void`
|
|
1624
1625
|
|
|
1625
1626
|
Verifies that a string contains only the default URL template parameters.
|
|
1626
1627
|
|
|
@@ -1644,7 +1645,7 @@ ___
|
|
|
1644
1645
|
|
|
1645
1646
|
### isUrlWithTemplateParameters
|
|
1646
1647
|
|
|
1647
|
-
▸
|
|
1648
|
+
▸ **isUrlWithTemplateParameters**(`allowedTemplateParameters`): [`Validator`](API.md#validator)
|
|
1648
1649
|
|
|
1649
1650
|
Verifies that a string contains only the default URL template
|
|
1650
1651
|
parameters, plus any specified in `allowedTemplateParameters`.
|
|
@@ -2214,7 +2215,7 @@ ___
|
|
|
2214
2215
|
|
|
2215
2216
|
### getExtensionStore
|
|
2216
2217
|
|
|
2217
|
-
▸
|
|
2218
|
+
▸ **getExtensionStore**(): `Store`<[`ExtensionStore`](interfaces/ExtensionStore.md)\>
|
|
2218
2219
|
|
|
2219
2220
|
This returns a [store](https://github.com/developit/unistore#store)
|
|
2220
2221
|
that modules can use to get information about the state of the
|
|
@@ -2360,7 +2361,7 @@ ___
|
|
|
2360
2361
|
|
|
2361
2362
|
### useExtensionStore
|
|
2362
2363
|
|
|
2363
|
-
▸
|
|
2364
|
+
▸ **useExtensionStore**(): `T`
|
|
2364
2365
|
|
|
2365
2366
|
#### Returns
|
|
2366
2367
|
|
|
@@ -2370,7 +2371,7 @@ ___
|
|
|
2370
2371
|
|
|
2371
2372
|
[packages/framework/esm-react-utils/src/useExtensionStore.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useExtensionStore.ts#L5)
|
|
2372
2373
|
|
|
2373
|
-
▸
|
|
2374
|
+
▸ **useExtensionStore**(`actions`): `T` & [`BoundActions`](API.md#boundactions)
|
|
2374
2375
|
|
|
2375
2376
|
#### Parameters
|
|
2376
2377
|
|
|
@@ -2386,7 +2387,7 @@ ___
|
|
|
2386
2387
|
|
|
2387
2388
|
[packages/framework/esm-react-utils/src/useExtensionStore.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useExtensionStore.ts#L5)
|
|
2388
2389
|
|
|
2389
|
-
▸
|
|
2390
|
+
▸ **useExtensionStore**(`actions?`): `T` & [`BoundActions`](API.md#boundactions)
|
|
2390
2391
|
|
|
2391
2392
|
#### Parameters
|
|
2392
2393
|
|
|
@@ -2408,7 +2409,7 @@ ___
|
|
|
2408
2409
|
|
|
2409
2410
|
### getAsyncExtensionLifecycle
|
|
2410
2411
|
|
|
2411
|
-
▸
|
|
2412
|
+
▸ **getAsyncExtensionLifecycle**<`T`\>(`lazy`, `options`): () => `Promise`<`ReactAppOrParcel`<`any`\>\>
|
|
2412
2413
|
|
|
2413
2414
|
**`deprecated`** Use getAsyncLifecycle instead.
|
|
2414
2415
|
|
|
@@ -2728,7 +2729,7 @@ ___
|
|
|
2728
2729
|
|
|
2729
2730
|
### getFullSynchronizationItems
|
|
2730
2731
|
|
|
2731
|
-
▸ **getFullSynchronizationItems**<`T`\>(`type
|
|
2732
|
+
▸ **getFullSynchronizationItems**<`T`\>(`type?`): `Promise`<[`SyncItem`](interfaces/SyncItem.md)<`T`\>[]\>
|
|
2732
2733
|
|
|
2733
2734
|
Returns all currently queued up sync items of the currently signed in user.
|
|
2734
2735
|
|
|
@@ -2742,7 +2743,7 @@ Returns all currently queued up sync items of the currently signed in user.
|
|
|
2742
2743
|
|
|
2743
2744
|
| Name | Type | Description |
|
|
2744
2745
|
| :------ | :------ | :------ |
|
|
2745
|
-
| `type
|
|
2746
|
+
| `type?` | `string` | The identifying type of the synchronization items to be returned. |
|
|
2746
2747
|
|
|
2747
2748
|
#### Returns
|
|
2748
2749
|
|
|
@@ -2750,13 +2751,13 @@ Returns all currently queued up sync items of the currently signed in user.
|
|
|
2750
2751
|
|
|
2751
2752
|
#### Defined in
|
|
2752
2753
|
|
|
2753
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2754
|
+
[packages/framework/esm-offline/src/sync.ts:345](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L345)
|
|
2754
2755
|
|
|
2755
2756
|
___
|
|
2756
2757
|
|
|
2757
2758
|
### getFullSynchronizationItemsFor
|
|
2758
2759
|
|
|
2759
|
-
▸ **getFullSynchronizationItemsFor**<`T`\>(`userId`, `type
|
|
2760
|
+
▸ **getFullSynchronizationItemsFor**<`T`\>(`userId`, `type?`): `Promise`<[`SyncItem`](interfaces/SyncItem.md)<`T`\>[]\>
|
|
2760
2761
|
|
|
2761
2762
|
Returns all currently queued up sync items of a given user.
|
|
2762
2763
|
|
|
@@ -2771,7 +2772,7 @@ Returns all currently queued up sync items of a given user.
|
|
|
2771
2772
|
| Name | Type | Description |
|
|
2772
2773
|
| :------ | :------ | :------ |
|
|
2773
2774
|
| `userId` | `string` | The ID of the user whose synchronization items should be returned. |
|
|
2774
|
-
| `type
|
|
2775
|
+
| `type?` | `string` | The identifying type of the synchronization items to be returned.. |
|
|
2775
2776
|
|
|
2776
2777
|
#### Returns
|
|
2777
2778
|
|
|
@@ -2779,7 +2780,7 @@ Returns all currently queued up sync items of a given user.
|
|
|
2779
2780
|
|
|
2780
2781
|
#### Defined in
|
|
2781
2782
|
|
|
2782
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2783
|
+
[packages/framework/esm-offline/src/sync.ts:321](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L321)
|
|
2783
2784
|
|
|
2784
2785
|
___
|
|
2785
2786
|
|
|
@@ -2821,13 +2822,13 @@ Returns a queued sync item with the given ID or `undefined` if no such item exis
|
|
|
2821
2822
|
|
|
2822
2823
|
#### Defined in
|
|
2823
2824
|
|
|
2824
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2825
|
+
[packages/framework/esm-offline/src/sync.ts:354](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L354)
|
|
2825
2826
|
|
|
2826
2827
|
___
|
|
2827
2828
|
|
|
2828
2829
|
### getSynchronizationItems
|
|
2829
2830
|
|
|
2830
|
-
▸ **getSynchronizationItems**<`T`\>(`type
|
|
2831
|
+
▸ **getSynchronizationItems**<`T`\>(`type?`): `Promise`<`T`[]\>
|
|
2831
2832
|
|
|
2832
2833
|
Returns the content of all currently queued up sync items of the currently signed in user.
|
|
2833
2834
|
|
|
@@ -2841,7 +2842,7 @@ Returns the content of all currently queued up sync items of the currently signe
|
|
|
2841
2842
|
|
|
2842
2843
|
| Name | Type | Description |
|
|
2843
2844
|
| :------ | :------ | :------ |
|
|
2844
|
-
| `type
|
|
2845
|
+
| `type?` | `string` | The identifying type of the synchronization items to be returned. |
|
|
2845
2846
|
|
|
2846
2847
|
#### Returns
|
|
2847
2848
|
|
|
@@ -2849,7 +2850,7 @@ Returns the content of all currently queued up sync items of the currently signe
|
|
|
2849
2850
|
|
|
2850
2851
|
#### Defined in
|
|
2851
2852
|
|
|
2852
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2853
|
+
[packages/framework/esm-offline/src/sync.ts:336](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L336)
|
|
2853
2854
|
|
|
2854
2855
|
___
|
|
2855
2856
|
|
|
@@ -2939,7 +2940,7 @@ Enqueues a new item in the sync queue and associates the item with the currently
|
|
|
2939
2940
|
|
|
2940
2941
|
#### Defined in
|
|
2941
2942
|
|
|
2942
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2943
|
+
[packages/framework/esm-offline/src/sync.ts:294](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L294)
|
|
2943
2944
|
|
|
2944
2945
|
___
|
|
2945
2946
|
|
|
@@ -3414,6 +3415,26 @@ ___
|
|
|
3414
3415
|
|
|
3415
3416
|
## UI Functions
|
|
3416
3417
|
|
|
3418
|
+
### isDesktop
|
|
3419
|
+
|
|
3420
|
+
▸ **isDesktop**(`layout`): `boolean`
|
|
3421
|
+
|
|
3422
|
+
#### Parameters
|
|
3423
|
+
|
|
3424
|
+
| Name | Type |
|
|
3425
|
+
| :------ | :------ |
|
|
3426
|
+
| `layout` | [`LayoutType`](API.md#layouttype) |
|
|
3427
|
+
|
|
3428
|
+
#### Returns
|
|
3429
|
+
|
|
3430
|
+
`boolean`
|
|
3431
|
+
|
|
3432
|
+
#### Defined in
|
|
3433
|
+
|
|
3434
|
+
[packages/framework/esm-react-utils/src/useLayoutType.ts:40](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useLayoutType.ts#L40)
|
|
3435
|
+
|
|
3436
|
+
___
|
|
3437
|
+
|
|
3417
3438
|
### setLeftNav
|
|
3418
3439
|
|
|
3419
3440
|
▸ **setLeftNav**(`__namedParameters`): `void`
|
|
@@ -3484,7 +3505,7 @@ Displays an inline notification in the UI.
|
|
|
3484
3505
|
|
|
3485
3506
|
#### Defined in
|
|
3486
3507
|
|
|
3487
|
-
[packages/framework/esm-styleguide/src/notifications/index.tsx:
|
|
3508
|
+
[packages/framework/esm-styleguide/src/notifications/index.tsx:40](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/notifications/index.tsx#L40)
|
|
3488
3509
|
|
|
3489
3510
|
___
|
|
3490
3511
|
|
|
@@ -3506,7 +3527,7 @@ Displays a toast notification in the UI.
|
|
|
3506
3527
|
|
|
3507
3528
|
#### Defined in
|
|
3508
3529
|
|
|
3509
|
-
[packages/framework/esm-styleguide/src/toasts/index.tsx:
|
|
3530
|
+
[packages/framework/esm-styleguide/src/toasts/index.tsx:36](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/toasts/index.tsx#L36)
|
|
3510
3531
|
|
|
3511
3532
|
___
|
|
3512
3533
|
|
|
@@ -3612,7 +3633,7 @@ ___
|
|
|
3612
3633
|
|
|
3613
3634
|
#### Defined in
|
|
3614
3635
|
|
|
3615
|
-
[packages/framework/esm-react-utils/src/useLayoutType.ts:
|
|
3636
|
+
[packages/framework/esm-react-utils/src/useLayoutType.ts:26](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useLayoutType.ts#L26)
|
|
3616
3637
|
|
|
3617
3638
|
___
|
|
3618
3639
|
|
|
@@ -6,10 +6,21 @@
|
|
|
6
6
|
|
|
7
7
|
### API Properties
|
|
8
8
|
|
|
9
|
+
- [children](UserHasAccessProps.md#children)
|
|
9
10
|
- [privilege](UserHasAccessProps.md#privilege)
|
|
10
11
|
|
|
11
12
|
## API Properties
|
|
12
13
|
|
|
14
|
+
### children
|
|
15
|
+
|
|
16
|
+
• `Optional` **children**: `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/jest.config.js
CHANGED
|
@@ -6,6 +6,11 @@ module.exports = {
|
|
|
6
6
|
"\\.(s?css)$": "identity-obj-proxy",
|
|
7
7
|
"\\.(svg)$": "<rootDir>/__mocks__/fileMock.js",
|
|
8
8
|
"lodash-es/(.*)": "lodash/$1",
|
|
9
|
+
// See https://jestjs.io/docs/upgrading-to-jest28#packagejson-exports
|
|
10
|
+
// which links to https://github.com/microsoft/accessibility-insights-web/pull/5421#issuecomment-1109168149
|
|
11
|
+
"^dexie$": require.resolve("dexie"),
|
|
12
|
+
"^uuid$": require.resolve("uuid"),
|
|
9
13
|
},
|
|
10
14
|
setupFilesAfterEnv: ["<rootDir>/src/integration-tests/setup-tests.ts"],
|
|
15
|
+
testEnvironment: "jsdom",
|
|
11
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-framework",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-pre.0",
|
|
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": "^
|
|
39
|
-
"@openmrs/esm-breadcrumbs": "^
|
|
40
|
-
"@openmrs/esm-config": "^
|
|
41
|
-
"@openmrs/esm-error-handling": "^
|
|
42
|
-
"@openmrs/esm-extensions": "^
|
|
43
|
-
"@openmrs/esm-globals": "^
|
|
44
|
-
"@openmrs/esm-offline": "^
|
|
45
|
-
"@openmrs/esm-react-utils": "^
|
|
46
|
-
"@openmrs/esm-state": "^
|
|
47
|
-
"@openmrs/esm-styleguide": "^
|
|
48
|
-
"@openmrs/esm-utils": "^
|
|
38
|
+
"@openmrs/esm-api": "^4.0.0-pre.0",
|
|
39
|
+
"@openmrs/esm-breadcrumbs": "^4.0.0-pre.0",
|
|
40
|
+
"@openmrs/esm-config": "^4.0.0-pre.0",
|
|
41
|
+
"@openmrs/esm-error-handling": "^4.0.0-pre.0",
|
|
42
|
+
"@openmrs/esm-extensions": "^4.0.0-pre.0",
|
|
43
|
+
"@openmrs/esm-globals": "^4.0.0-pre.0",
|
|
44
|
+
"@openmrs/esm-offline": "^4.0.0-pre.0",
|
|
45
|
+
"@openmrs/esm-react-utils": "^4.0.0-pre.0",
|
|
46
|
+
"@openmrs/esm-state": "^4.0.0-pre.0",
|
|
47
|
+
"@openmrs/esm-styleguide": "^4.0.0-pre.0",
|
|
48
|
+
"@openmrs/esm-utils": "^4.0.0-pre.0",
|
|
49
49
|
"dayjs": "^1.10.7"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "254a7226212aac82df4434639b2584e24ac240e4"
|
|
52
52
|
}
|
|
@@ -3,8 +3,6 @@ import {
|
|
|
3
3
|
attach,
|
|
4
4
|
registerExtension,
|
|
5
5
|
updateInternalExtensionStore,
|
|
6
|
-
getExtensionInternalStore,
|
|
7
|
-
getExtensionStore,
|
|
8
6
|
} from "../../../esm-extensions";
|
|
9
7
|
import {
|
|
10
8
|
ExtensionSlot,
|
|
@@ -22,7 +20,6 @@ import {
|
|
|
22
20
|
getExtensionSlotsConfigStore,
|
|
23
21
|
} from "../../../esm-config/src";
|
|
24
22
|
import { act, render, screen, waitFor } from "@testing-library/react";
|
|
25
|
-
import { waitForElementToBeRemoved } from "@testing-library/dom";
|
|
26
23
|
|
|
27
24
|
describe("Interaction between configuration and extension systems", () => {
|
|
28
25
|
beforeEach(() => {
|
|
@@ -210,7 +207,9 @@ describe("Interaction between configuration and extension systems", () => {
|
|
|
210
207
|
});
|
|
211
208
|
});
|
|
212
209
|
expect(screen.queryByText("green")).not.toBeInTheDocument();
|
|
213
|
-
|
|
210
|
+
waitFor(() =>
|
|
211
|
+
expect(screen.getByTestId("slot")).toHaveTextContent(/black/)
|
|
212
|
+
);
|
|
214
213
|
});
|
|
215
214
|
|
|
216
215
|
test("Extension config should be available in extension store", async () => {
|