@openmrs/esm-framework 3.2.1-pre.1149 → 3.2.1-pre.1160
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 +37 -9
- package/dist/openmrs-esm-framework.js +1 -1
- package/dist/openmrs-esm-framework.js.LICENSE.txt +8 -0
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +120 -24
- package/mock.tsx +4 -2
- package/package.json +13 -13
- package/webpack.config.js +9 -1
package/docs/API.md
CHANGED
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
- [useLocations](API.md#uselocations)
|
|
27
27
|
- [usePatient](API.md#usepatient)
|
|
28
28
|
- [useSession](API.md#usesession)
|
|
29
|
-
- [useSessionUser](API.md#usesessionuser)
|
|
30
29
|
- [useVisit](API.md#usevisit)
|
|
31
30
|
- [useVisitTypes](API.md#usevisittypes)
|
|
32
31
|
- [userHasAccess](API.md#userhasaccess)
|
|
@@ -111,6 +110,8 @@
|
|
|
111
110
|
- [deleteSynchronizationItem](API.md#deletesynchronizationitem)
|
|
112
111
|
- [generateOfflineUuid](API.md#generateofflineuuid)
|
|
113
112
|
- [getCurrentOfflineMode](API.md#getcurrentofflinemode)
|
|
113
|
+
- [getFullSynchronizationItems](API.md#getfullsynchronizationitems)
|
|
114
|
+
- [getFullSynchronizationItemsFor](API.md#getfullsynchronizationitemsfor)
|
|
114
115
|
- [getOfflinePatientDataStore](API.md#getofflinepatientdatastore)
|
|
115
116
|
- [getSynchronizationItem](API.md#getsynchronizationitem)
|
|
116
117
|
- [getSynchronizationItems](API.md#getsynchronizationitems)
|
|
@@ -138,11 +139,13 @@
|
|
|
138
139
|
|
|
139
140
|
### UI Functions
|
|
140
141
|
|
|
142
|
+
- [setLeftNav](API.md#setleftnav)
|
|
141
143
|
- [showModal](API.md#showmodal)
|
|
142
144
|
- [showNotification](API.md#shownotification)
|
|
143
145
|
- [showToast](API.md#showtoast)
|
|
144
146
|
- [subscribeNotificationShown](API.md#subscribenotificationshown)
|
|
145
147
|
- [subscribeToastShown](API.md#subscribetoastshown)
|
|
148
|
+
- [unsetLeftNav](API.md#unsetleftnav)
|
|
146
149
|
- [useBodyScrollLock](API.md#usebodyscrolllock)
|
|
147
150
|
- [useLayoutType](API.md#uselayouttype)
|
|
148
151
|
- [useOnClickOutside](API.md#useonclickoutside)
|
|
@@ -655,6 +658,18 @@ ___
|
|
|
655
658
|
|
|
656
659
|
[packages/framework/esm-api/src/openmrs-backend-dependencies.ts:1](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-api/src/openmrs-backend-dependencies.ts#L1)
|
|
657
660
|
|
|
661
|
+
___
|
|
662
|
+
|
|
663
|
+
## UI Variables
|
|
664
|
+
|
|
665
|
+
### LeftNavMenu
|
|
666
|
+
|
|
667
|
+
• **LeftNavMenu**: `ForwardRefExoticComponent`<`SideNavProps` & `RefAttributes`<`HTMLElement`\>\>
|
|
668
|
+
|
|
669
|
+
#### Defined in
|
|
670
|
+
|
|
671
|
+
[packages/framework/esm-styleguide/src/left-nav/index.tsx:30](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/left-nav/index.tsx#L30)
|
|
672
|
+
|
|
658
673
|
## API Functions
|
|
659
674
|
|
|
660
675
|
### fetchCurrentPatient
|
|
@@ -1195,22 +1210,6 @@ ___
|
|
|
1195
1210
|
|
|
1196
1211
|
___
|
|
1197
1212
|
|
|
1198
|
-
### useSessionUser
|
|
1199
|
-
|
|
1200
|
-
▸ `Const` **useSessionUser**(): ``null`` \| [`Session`](interfaces/Session.md)
|
|
1201
|
-
|
|
1202
|
-
**`deprecated`**
|
|
1203
|
-
|
|
1204
|
-
#### Returns
|
|
1205
|
-
|
|
1206
|
-
``null`` \| [`Session`](interfaces/Session.md)
|
|
1207
|
-
|
|
1208
|
-
#### Defined in
|
|
1209
|
-
|
|
1210
|
-
[packages/framework/esm-react-utils/src/useSessionUser.tsx:21](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useSessionUser.tsx#L21)
|
|
1211
|
-
|
|
1212
|
-
___
|
|
1213
|
-
|
|
1214
1213
|
### useVisit
|
|
1215
1214
|
|
|
1216
1215
|
▸ **useVisit**(`patientUuid`): `VisitReturnType`
|
|
@@ -2564,7 +2563,7 @@ If this is not possible, throws an error.
|
|
|
2564
2563
|
|
|
2565
2564
|
#### Defined in
|
|
2566
2565
|
|
|
2567
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2566
|
+
[packages/framework/esm-offline/src/sync.ts:377](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L377)
|
|
2568
2567
|
|
|
2569
2568
|
___
|
|
2570
2569
|
|
|
@@ -2587,7 +2586,7 @@ registered synchronization handlers.
|
|
|
2587
2586
|
|
|
2588
2587
|
#### Defined in
|
|
2589
2588
|
|
|
2590
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2589
|
+
[packages/framework/esm-offline/src/sync.ts:367](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L367)
|
|
2591
2590
|
|
|
2592
2591
|
___
|
|
2593
2592
|
|
|
@@ -2609,7 +2608,7 @@ Deletes a queued up sync item with the given ID.
|
|
|
2609
2608
|
|
|
2610
2609
|
#### Defined in
|
|
2611
2610
|
|
|
2612
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2611
|
+
[packages/framework/esm-offline/src/sync.ts:397](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L397)
|
|
2613
2612
|
|
|
2614
2613
|
___
|
|
2615
2614
|
|
|
@@ -2643,6 +2642,63 @@ ___
|
|
|
2643
2642
|
|
|
2644
2643
|
___
|
|
2645
2644
|
|
|
2645
|
+
### getFullSynchronizationItems
|
|
2646
|
+
|
|
2647
|
+
▸ **getFullSynchronizationItems**<`T`\>(`type`): `Promise`<[`SyncItem`](interfaces/SyncItem.md)<`T`\>[]\>
|
|
2648
|
+
|
|
2649
|
+
Returns all currently queued up sync items of the currently signed in user.
|
|
2650
|
+
|
|
2651
|
+
#### Type parameters
|
|
2652
|
+
|
|
2653
|
+
| Name |
|
|
2654
|
+
| :------ |
|
|
2655
|
+
| `T` |
|
|
2656
|
+
|
|
2657
|
+
#### Parameters
|
|
2658
|
+
|
|
2659
|
+
| Name | Type | Description |
|
|
2660
|
+
| :------ | :------ | :------ |
|
|
2661
|
+
| `type` | `string` | The identifying type of the synchronization items to be returned. |
|
|
2662
|
+
|
|
2663
|
+
#### Returns
|
|
2664
|
+
|
|
2665
|
+
`Promise`<[`SyncItem`](interfaces/SyncItem.md)<`T`\>[]\>
|
|
2666
|
+
|
|
2667
|
+
#### Defined in
|
|
2668
|
+
|
|
2669
|
+
[packages/framework/esm-offline/src/sync.ts:347](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L347)
|
|
2670
|
+
|
|
2671
|
+
___
|
|
2672
|
+
|
|
2673
|
+
### getFullSynchronizationItemsFor
|
|
2674
|
+
|
|
2675
|
+
▸ **getFullSynchronizationItemsFor**<`T`\>(`userId`, `type`): `Promise`<[`SyncItem`](interfaces/SyncItem.md)<`T`\>[]\>
|
|
2676
|
+
|
|
2677
|
+
Returns all currently queued up sync items of a given user.
|
|
2678
|
+
|
|
2679
|
+
#### Type parameters
|
|
2680
|
+
|
|
2681
|
+
| Name |
|
|
2682
|
+
| :------ |
|
|
2683
|
+
| `T` |
|
|
2684
|
+
|
|
2685
|
+
#### Parameters
|
|
2686
|
+
|
|
2687
|
+
| Name | Type | Description |
|
|
2688
|
+
| :------ | :------ | :------ |
|
|
2689
|
+
| `userId` | `string` | The ID of the user whose synchronization items should be returned. |
|
|
2690
|
+
| `type` | `string` | The identifying type of the synchronization items to be returned.. |
|
|
2691
|
+
|
|
2692
|
+
#### Returns
|
|
2693
|
+
|
|
2694
|
+
`Promise`<[`SyncItem`](interfaces/SyncItem.md)<`T`\>[]\>
|
|
2695
|
+
|
|
2696
|
+
#### Defined in
|
|
2697
|
+
|
|
2698
|
+
[packages/framework/esm-offline/src/sync.ts:320](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L320)
|
|
2699
|
+
|
|
2700
|
+
___
|
|
2701
|
+
|
|
2646
2702
|
### getOfflinePatientDataStore
|
|
2647
2703
|
|
|
2648
2704
|
▸ **getOfflinePatientDataStore**(): `Store`<[`OfflinePatientDataSyncStore`](interfaces/OfflinePatientDataSyncStore.md)\>
|
|
@@ -2681,7 +2737,7 @@ Returns a queued sync item with the given ID or `undefined` if no such item exis
|
|
|
2681
2737
|
|
|
2682
2738
|
#### Defined in
|
|
2683
2739
|
|
|
2684
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2740
|
+
[packages/framework/esm-offline/src/sync.ts:356](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L356)
|
|
2685
2741
|
|
|
2686
2742
|
___
|
|
2687
2743
|
|
|
@@ -2689,7 +2745,7 @@ ___
|
|
|
2689
2745
|
|
|
2690
2746
|
▸ **getSynchronizationItems**<`T`\>(`type`): `Promise`<`T`[]\>
|
|
2691
2747
|
|
|
2692
|
-
Returns all currently queued up sync items of the currently signed in user.
|
|
2748
|
+
Returns the content of all currently queued up sync items of the currently signed in user.
|
|
2693
2749
|
|
|
2694
2750
|
#### Type parameters
|
|
2695
2751
|
|
|
@@ -2709,7 +2765,7 @@ Returns all currently queued up sync items of the currently signed in user.
|
|
|
2709
2765
|
|
|
2710
2766
|
#### Defined in
|
|
2711
2767
|
|
|
2712
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2768
|
+
[packages/framework/esm-offline/src/sync.ts:338](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L338)
|
|
2713
2769
|
|
|
2714
2770
|
___
|
|
2715
2771
|
|
|
@@ -2856,7 +2912,7 @@ Registers a new synchronization handler which is able to synchronize data of a s
|
|
|
2856
2912
|
|
|
2857
2913
|
#### Defined in
|
|
2858
2914
|
|
|
2859
|
-
[packages/framework/esm-offline/src/sync.ts:
|
|
2915
|
+
[packages/framework/esm-offline/src/sync.ts:412](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L412)
|
|
2860
2916
|
|
|
2861
2917
|
___
|
|
2862
2918
|
|
|
@@ -3274,6 +3330,26 @@ ___
|
|
|
3274
3330
|
|
|
3275
3331
|
## UI Functions
|
|
3276
3332
|
|
|
3333
|
+
### setLeftNav
|
|
3334
|
+
|
|
3335
|
+
▸ **setLeftNav**(`__namedParameters`): `void`
|
|
3336
|
+
|
|
3337
|
+
#### Parameters
|
|
3338
|
+
|
|
3339
|
+
| Name | Type |
|
|
3340
|
+
| :------ | :------ |
|
|
3341
|
+
| `__namedParameters` | `Object` |
|
|
3342
|
+
|
|
3343
|
+
#### Returns
|
|
3344
|
+
|
|
3345
|
+
`void`
|
|
3346
|
+
|
|
3347
|
+
#### Defined in
|
|
3348
|
+
|
|
3349
|
+
[packages/framework/esm-styleguide/src/left-nav/index.tsx:18](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/left-nav/index.tsx#L18)
|
|
3350
|
+
|
|
3351
|
+
___
|
|
3352
|
+
|
|
3277
3353
|
### showModal
|
|
3278
3354
|
|
|
3279
3355
|
▸ **showModal**(`extensionId`, `props?`, `onClose?`): () => `void`
|
|
@@ -3402,6 +3478,26 @@ ___
|
|
|
3402
3478
|
|
|
3403
3479
|
___
|
|
3404
3480
|
|
|
3481
|
+
### unsetLeftNav
|
|
3482
|
+
|
|
3483
|
+
▸ **unsetLeftNav**(`name`): `void`
|
|
3484
|
+
|
|
3485
|
+
#### Parameters
|
|
3486
|
+
|
|
3487
|
+
| Name | Type |
|
|
3488
|
+
| :------ | :------ |
|
|
3489
|
+
| `name` | `any` |
|
|
3490
|
+
|
|
3491
|
+
#### Returns
|
|
3492
|
+
|
|
3493
|
+
`void`
|
|
3494
|
+
|
|
3495
|
+
#### Defined in
|
|
3496
|
+
|
|
3497
|
+
[packages/framework/esm-styleguide/src/left-nav/index.tsx:22](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/left-nav/index.tsx#L22)
|
|
3498
|
+
|
|
3499
|
+
___
|
|
3500
|
+
|
|
3405
3501
|
### useBodyScrollLock
|
|
3406
3502
|
|
|
3407
3503
|
▸ **useBodyScrollLock**(`active`): `void`
|
package/mock.tsx
CHANGED
|
@@ -237,8 +237,6 @@ export const usePatient = jest.fn(() => ({
|
|
|
237
237
|
|
|
238
238
|
export const useSession = jest.fn(() => null);
|
|
239
239
|
|
|
240
|
-
export const useSessionUser = jest.fn(() => null);
|
|
241
|
-
|
|
242
240
|
export const useLayoutType = jest.fn(() => "desktop");
|
|
243
241
|
|
|
244
242
|
export const useExtensionSlot = jest.fn(() => ({
|
|
@@ -299,3 +297,7 @@ export const useVisitTypes = jest.fn(() => []);
|
|
|
299
297
|
export const showNotification = jest.fn();
|
|
300
298
|
export const showToast = jest.fn();
|
|
301
299
|
export const showModal = jest.fn();
|
|
300
|
+
|
|
301
|
+
export const LeftNavMenu = jest.fn();
|
|
302
|
+
export const setLeftNav = jest.fn();
|
|
303
|
+
export const unsetLeftNav = jest.fn();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-framework",
|
|
3
|
-
"version": "3.2.1-pre.
|
|
3
|
+
"version": "3.2.1-pre.1160",
|
|
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.2.1-pre.
|
|
39
|
-
"@openmrs/esm-breadcrumbs": "^3.2.1-pre.
|
|
40
|
-
"@openmrs/esm-config": "^3.2.1-pre.
|
|
41
|
-
"@openmrs/esm-error-handling": "^3.2.1-pre.
|
|
42
|
-
"@openmrs/esm-extensions": "^3.2.1-pre.
|
|
43
|
-
"@openmrs/esm-globals": "^3.2.1-pre.
|
|
44
|
-
"@openmrs/esm-offline": "^3.2.1-pre.
|
|
45
|
-
"@openmrs/esm-react-utils": "^3.2.1-pre.
|
|
46
|
-
"@openmrs/esm-state": "^3.2.1-pre.
|
|
47
|
-
"@openmrs/esm-styleguide": "^3.2.1-pre.
|
|
48
|
-
"@openmrs/esm-utils": "^3.2.1-pre.
|
|
38
|
+
"@openmrs/esm-api": "^3.2.1-pre.1160",
|
|
39
|
+
"@openmrs/esm-breadcrumbs": "^3.2.1-pre.1160",
|
|
40
|
+
"@openmrs/esm-config": "^3.2.1-pre.1160",
|
|
41
|
+
"@openmrs/esm-error-handling": "^3.2.1-pre.1160",
|
|
42
|
+
"@openmrs/esm-extensions": "^3.2.1-pre.1160",
|
|
43
|
+
"@openmrs/esm-globals": "^3.2.1-pre.1160",
|
|
44
|
+
"@openmrs/esm-offline": "^3.2.1-pre.1160",
|
|
45
|
+
"@openmrs/esm-react-utils": "^3.2.1-pre.1160",
|
|
46
|
+
"@openmrs/esm-state": "^3.2.1-pre.1160",
|
|
47
|
+
"@openmrs/esm-styleguide": "^3.2.1-pre.1160",
|
|
48
|
+
"@openmrs/esm-utils": "^3.2.1-pre.1160",
|
|
49
49
|
"dayjs": "^1.10.7"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "a34508fb8c153ebfbf13c97b9f386907f44d3b1e"
|
|
52
52
|
}
|
package/webpack.config.js
CHANGED
|
@@ -19,10 +19,18 @@ module.exports = (env) => ({
|
|
|
19
19
|
exclude: /(node_modules|bower_components)/,
|
|
20
20
|
use: "swc-loader",
|
|
21
21
|
},
|
|
22
|
+
{
|
|
23
|
+
test: /\.s?css$/,
|
|
24
|
+
use: [
|
|
25
|
+
{ loader: require.resolve("style-loader") },
|
|
26
|
+
{ loader: require.resolve("css-loader") },
|
|
27
|
+
{ loader: require.resolve("sass-loader") },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
22
30
|
],
|
|
23
31
|
},
|
|
24
32
|
resolve: {
|
|
25
|
-
extensions: [".ts", ".js", ".tsx", ".jsx"],
|
|
33
|
+
extensions: [".ts", ".js", ".tsx", ".jsx", ".scss"],
|
|
26
34
|
},
|
|
27
35
|
plugins: [
|
|
28
36
|
new SystemJSPublicPathWebpackPlugin(),
|