@openmrs/esm-framework 3.4.1-pre.109 → 3.4.1-pre.117

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/docs/API.md CHANGED
@@ -102,6 +102,7 @@
102
102
 
103
103
  ### Navigation Functions
104
104
 
105
+ - [ConfigurableLink](API.md#configurablelink)
105
106
  - [interpolateString](API.md#interpolatestring)
106
107
  - [interpolateUrl](API.md#interpolateurl)
107
108
  - [navigate](API.md#navigate)
@@ -113,20 +114,29 @@
113
114
  - [deleteSynchronizationItem](API.md#deletesynchronizationitem)
114
115
  - [generateOfflineUuid](API.md#generateofflineuuid)
115
116
  - [getCurrentOfflineMode](API.md#getcurrentofflinemode)
117
+ - [getDynamicOfflineDataEntries](API.md#getdynamicofflinedataentries)
118
+ - [getDynamicOfflineDataEntriesFor](API.md#getdynamicofflinedataentriesfor)
119
+ - [getDynamicOfflineDataHandlers](API.md#getdynamicofflinedatahandlers)
116
120
  - [getFullSynchronizationItems](API.md#getfullsynchronizationitems)
117
121
  - [getFullSynchronizationItemsFor](API.md#getfullsynchronizationitemsfor)
118
122
  - [getOfflinePatientDataStore](API.md#getofflinepatientdatastore)
119
123
  - [getSynchronizationItem](API.md#getsynchronizationitem)
120
124
  - [getSynchronizationItems](API.md#getsynchronizationitems)
121
125
  - [isOfflineUuid](API.md#isofflineuuid)
122
- - [loadPersistedPatientDataSyncState](API.md#loadpersistedpatientdatasyncstate)
123
126
  - [messageOmrsServiceWorker](API.md#messageomrsserviceworker)
127
+ - [putDynamicOfflineData](API.md#putdynamicofflinedata)
128
+ - [putDynamicOfflineDataFor](API.md#putdynamicofflinedatafor)
124
129
  - [queueSynchronizationItem](API.md#queuesynchronizationitem)
125
130
  - [registerOfflinePatientHandler](API.md#registerofflinepatienthandler)
131
+ - [removeDynamicOfflineData](API.md#removedynamicofflinedata)
132
+ - [removeDynamicOfflineDataFor](API.md#removedynamicofflinedatafor)
133
+ - [setupDynamicOfflineDataHandler](API.md#setupdynamicofflinedatahandler)
126
134
  - [setupOfflineSync](API.md#setupofflinesync)
127
135
  - [subscribeConnectivity](API.md#subscribeconnectivity)
128
136
  - [subscribeConnectivityChanged](API.md#subscribeconnectivitychanged)
129
137
  - [subscribePrecacheStaticDependencies](API.md#subscribeprecachestaticdependencies)
138
+ - [syncAllDynamicOfflineData](API.md#syncalldynamicofflinedata)
139
+ - [syncDynamicOfflineData](API.md#syncdynamicofflinedata)
130
140
  - [syncOfflinePatientData](API.md#syncofflinepatientdata)
131
141
  - [useConnectivity](API.md#useconnectivity)
132
142
 
@@ -280,6 +290,22 @@ ___
280
290
 
281
291
  ___
282
292
 
293
+ ## Navigation Type aliases
294
+
295
+ ### TemplateParams
296
+
297
+ Ƭ **TemplateParams**: `Object`
298
+
299
+ #### Index signature
300
+
301
+ ▪ [key: `string`]: `string`
302
+
303
+ #### Defined in
304
+
305
+ [packages/framework/esm-config/src/navigation/navigate.ts:10](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/navigate.ts#L10)
306
+
307
+ ___
308
+
283
309
  ## Offline Type aliases
284
310
 
285
311
  ### KnownOmrsServiceWorkerMessages
@@ -599,26 +625,6 @@ ___
599
625
 
600
626
  ___
601
627
 
602
- ## Navigation Variables
603
-
604
- ### ConfigurableLink
605
-
606
- • **ConfigurableLink**: `React.FC`<[`ConfigurableLinkProps`](interfaces/ConfigurableLinkProps.md)\>
607
-
608
- A React link component which calls [navigate](API.md#navigate) when clicked
609
-
610
- **`param`** The target path or URL. Supports interpolation. See [navigate](API.md#navigate)
611
-
612
- **`param`** Inline elements within the link
613
-
614
- **`param`** Any other valid props for an <a> tag except `href` and `onClick`
615
-
616
- #### Defined in
617
-
618
- [packages/framework/esm-react-utils/src/ConfigurableLink.tsx:32](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ConfigurableLink.tsx#L32)
619
-
620
- ___
621
-
622
628
  ## Offline Variables
623
629
 
624
630
  ### offlineUuidPrefix
@@ -716,7 +722,7 @@ ___
716
722
 
717
723
  #### Defined in
718
724
 
719
- [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)
725
+ [packages/framework/esm-styleguide/src/left-nav/index.tsx:32](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/left-nav/index.tsx#L32)
720
726
 
721
727
  ## API Functions
722
728
 
@@ -1750,6 +1756,8 @@ When time is included, it is appended with a comma and a space. This
1750
1756
  agrees with the output of `Date.prototype.toLocaleString` for *most*
1751
1757
  locales.
1752
1758
 
1759
+ TODO: Shouldn't throw on null input
1760
+
1753
1761
  #### Parameters
1754
1762
 
1755
1763
  | Name | Type |
@@ -1763,7 +1771,7 @@ locales.
1763
1771
 
1764
1772
  #### Defined in
1765
1773
 
1766
- [packages/framework/esm-utils/src/omrs-dates.ts:182](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L182)
1774
+ [packages/framework/esm-utils/src/omrs-dates.ts:184](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L184)
1767
1775
 
1768
1776
  ___
1769
1777
 
@@ -1792,7 +1800,7 @@ output of `Date.prototype.toLocaleString` for *most* locales.
1792
1800
 
1793
1801
  #### Defined in
1794
1802
 
1795
- [packages/framework/esm-utils/src/omrs-dates.ts:249](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L249)
1803
+ [packages/framework/esm-utils/src/omrs-dates.ts:251](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L251)
1796
1804
 
1797
1805
  ___
1798
1806
 
@@ -1815,7 +1823,7 @@ Formats the input as a time, according to the current locale.
1815
1823
 
1816
1824
  #### Defined in
1817
1825
 
1818
- [packages/framework/esm-utils/src/omrs-dates.ts:233](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L233)
1826
+ [packages/framework/esm-utils/src/omrs-dates.ts:235](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-utils/src/omrs-dates.ts#L235)
1819
1827
 
1820
1828
  ___
1821
1829
 
@@ -2577,6 +2585,28 @@ ___
2577
2585
 
2578
2586
  ## Navigation Functions
2579
2587
 
2588
+ ### ConfigurableLink
2589
+
2590
+ ▸ **ConfigurableLink**(`__namedParameters`): `Element`
2591
+
2592
+ A React link component which calls [navigate](API.md#navigate) when clicked
2593
+
2594
+ #### Parameters
2595
+
2596
+ | Name | Type |
2597
+ | :------ | :------ |
2598
+ | `__namedParameters` | [`ConfigurableLinkProps`](interfaces/ConfigurableLinkProps.md) |
2599
+
2600
+ #### Returns
2601
+
2602
+ `Element`
2603
+
2604
+ #### Defined in
2605
+
2606
+ [packages/framework/esm-react-utils/src/ConfigurableLink.tsx:38](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/ConfigurableLink.tsx#L38)
2607
+
2608
+ ___
2609
+
2580
2610
  ### interpolateString
2581
2611
 
2582
2612
  ▸ **interpolateString**(`template`, `params`): `string`
@@ -2600,7 +2630,7 @@ navigate({
2600
2630
  | Name | Type | Description |
2601
2631
  | :------ | :------ | :------ |
2602
2632
  | `template` | `string` | With optional params wrapped in `${ }` |
2603
- | `params` | `object` | Values to interpolate into the string template |
2633
+ | `params` | `Object` | Values to interpolate into the string template |
2604
2634
 
2605
2635
  #### Returns
2606
2636
 
@@ -2608,13 +2638,13 @@ navigate({
2608
2638
 
2609
2639
  #### Defined in
2610
2640
 
2611
- [packages/framework/esm-config/src/navigation/interpolate-string.ts:41](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/interpolate-string.ts#L41)
2641
+ [packages/framework/esm-config/src/navigation/interpolate-string.ts:46](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/interpolate-string.ts#L46)
2612
2642
 
2613
2643
  ___
2614
2644
 
2615
2645
  ### interpolateUrl
2616
2646
 
2617
- ▸ **interpolateUrl**(`template`): `string`
2647
+ ▸ **interpolateUrl**(`template`, `additionalParams?`): `string`
2618
2648
 
2619
2649
  Interpolates a string with openmrsBase and openmrsSpaBase.
2620
2650
 
@@ -2626,6 +2656,7 @@ parameters in configurable URLs.
2626
2656
  | Name | Type | Description |
2627
2657
  | :------ | :------ | :------ |
2628
2658
  | `template` | `string` | A string to interpolate |
2659
+ | `additionalParams?` | `Object` | Additional values to interpolate into the string template |
2629
2660
 
2630
2661
  #### Returns
2631
2662
 
@@ -2633,7 +2664,7 @@ parameters in configurable URLs.
2633
2664
 
2634
2665
  #### Defined in
2635
2666
 
2636
- [packages/framework/esm-config/src/navigation/interpolate-string.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/interpolate-string.ts#L15)
2667
+ [packages/framework/esm-config/src/navigation/interpolate-string.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/interpolate-string.ts#L16)
2637
2668
 
2638
2669
  ___
2639
2670
 
@@ -2645,7 +2676,7 @@ Calls `location.assign` for non-SPA paths and [navigateToUrl](https://single-spa
2645
2676
 
2646
2677
  Example usage:
2647
2678
  ```js
2648
- const config = getConfig();
2679
+ const config = useConfig();
2649
2680
  const submitHandler = () => {
2650
2681
  navigate({ to: config.links.submitSuccess });
2651
2682
  };
@@ -2655,7 +2686,7 @@ const submitHandler = () => {
2655
2686
 
2656
2687
  | Name | Type | Description |
2657
2688
  | :------ | :------ | :------ |
2658
- | `to` | [`NavigateOptions`](interfaces/NavigateOptions.md) | The target path or URL. Supports templating with 'openmrsBase' and 'openmrsSpaBase'. For example, `${openmrsSpaBase}/home` will resolve to `/openmrs/spa/home` for implementations using the standard OpenMRS and SPA base paths. |
2689
+ | `to` | [`NavigateOptions`](interfaces/NavigateOptions.md) | The target path or URL. Supports templating with 'openmrsBase', 'openmrsSpaBase', and any additional template parameters defined in `templateParams`. For example, `${openmrsSpaBase}/home` will resolve to `/openmrs/spa/home` for implementations using the standard OpenMRS and SPA base paths. If `templateParams` contains `{ foo: "bar" }`, then the URL `${openmrsBase}/${foo}` will become `/openmrs/bar`. |
2659
2690
 
2660
2691
  #### Returns
2661
2692
 
@@ -2663,7 +2694,7 @@ const submitHandler = () => {
2663
2694
 
2664
2695
  #### Defined in
2665
2696
 
2666
- [packages/framework/esm-config/src/navigation/navigate.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/navigate.ts#L29)
2697
+ [packages/framework/esm-config/src/navigation/navigate.ts:35](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/navigation/navigate.ts#L35)
2667
2698
 
2668
2699
  ___
2669
2700
 
@@ -2688,7 +2719,7 @@ If this is not possible, throws an error.
2688
2719
 
2689
2720
  #### Defined in
2690
2721
 
2691
- [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)
2722
+ [packages/framework/esm-offline/src/sync.ts:357](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L357)
2692
2723
 
2693
2724
  ___
2694
2725
 
@@ -2711,7 +2742,7 @@ registered synchronization handlers.
2711
2742
 
2712
2743
  #### Defined in
2713
2744
 
2714
- [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)
2745
+ [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)
2715
2746
 
2716
2747
  ___
2717
2748
 
@@ -2733,7 +2764,7 @@ Deletes a queued up sync item with the given ID.
2733
2764
 
2734
2765
  #### Defined in
2735
2766
 
2736
- [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)
2767
+ [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)
2737
2768
 
2738
2769
  ___
2739
2770
 
@@ -2767,6 +2798,69 @@ ___
2767
2798
 
2768
2799
  ___
2769
2800
 
2801
+ ### getDynamicOfflineDataEntries
2802
+
2803
+ ▸ **getDynamicOfflineDataEntries**(`type?`): `Promise`<[`DynamicOfflineData`](interfaces/DynamicOfflineData.md)[]\>
2804
+
2805
+ Returns all [DynamicOfflineData](interfaces/DynamicOfflineData.md) entries which registered for the currently logged in user.
2806
+ Optionally returns only entries of a given type.
2807
+
2808
+ #### Parameters
2809
+
2810
+ | Name | Type | Description |
2811
+ | :------ | :------ | :------ |
2812
+ | `type?` | `string` | The type of the entries to be returned. If `undefined`, returns all types. |
2813
+
2814
+ #### Returns
2815
+
2816
+ `Promise`<[`DynamicOfflineData`](interfaces/DynamicOfflineData.md)[]\>
2817
+
2818
+ #### Defined in
2819
+
2820
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:131](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L131)
2821
+
2822
+ ___
2823
+
2824
+ ### getDynamicOfflineDataEntriesFor
2825
+
2826
+ ▸ **getDynamicOfflineDataEntriesFor**(`userId`, `type?`): `Promise`<[`DynamicOfflineData`](interfaces/DynamicOfflineData.md)[]\>
2827
+
2828
+ Returns all [DynamicOfflineData](interfaces/DynamicOfflineData.md) entries which registered for the given user.
2829
+ Optionally returns only entries of a given type.
2830
+
2831
+ #### Parameters
2832
+
2833
+ | Name | Type | Description |
2834
+ | :------ | :------ | :------ |
2835
+ | `userId` | `string` | The ID of the user whose entries are to be retrieved. |
2836
+ | `type?` | `string` | The type of the entries to be returned. If `undefined`, returns all types. |
2837
+
2838
+ #### Returns
2839
+
2840
+ `Promise`<[`DynamicOfflineData`](interfaces/DynamicOfflineData.md)[]\>
2841
+
2842
+ #### Defined in
2843
+
2844
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:144](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L144)
2845
+
2846
+ ___
2847
+
2848
+ ### getDynamicOfflineDataHandlers
2849
+
2850
+ ▸ **getDynamicOfflineDataHandlers**(): [`DynamicOfflineDataHandler`](interfaces/DynamicOfflineDataHandler.md)[]
2851
+
2852
+ Returns all handlers which have been setup using the [setupDynamicOfflineDataHandler](API.md#setupdynamicofflinedatahandler) function.
2853
+
2854
+ #### Returns
2855
+
2856
+ [`DynamicOfflineDataHandler`](interfaces/DynamicOfflineDataHandler.md)[]
2857
+
2858
+ #### Defined in
2859
+
2860
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:105](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L105)
2861
+
2862
+ ___
2863
+
2770
2864
  ### getFullSynchronizationItems
2771
2865
 
2772
2866
  ▸ **getFullSynchronizationItems**<`T`\>(`type?`): `Promise`<[`SyncItem`](interfaces/SyncItem.md)<`T`\>[]\>
@@ -2791,7 +2885,7 @@ Returns all currently queued up sync items of the currently signed in user.
2791
2885
 
2792
2886
  #### Defined in
2793
2887
 
2794
- [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)
2888
+ [packages/framework/esm-offline/src/sync.ts:325](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L325)
2795
2889
 
2796
2890
  ___
2797
2891
 
@@ -2820,7 +2914,7 @@ Returns all currently queued up sync items of a given user.
2820
2914
 
2821
2915
  #### Defined in
2822
2916
 
2823
- [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)
2917
+ [packages/framework/esm-offline/src/sync.ts:301](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L301)
2824
2918
 
2825
2919
  ___
2826
2920
 
@@ -2828,13 +2922,15 @@ ___
2828
2922
 
2829
2923
  ▸ **getOfflinePatientDataStore**(): `Store`<[`OfflinePatientDataSyncStore`](interfaces/OfflinePatientDataSyncStore.md)\>
2830
2924
 
2925
+ **`deprecated`** Will be removed once all modules have been migrated to the new dynamic offline data API.
2926
+
2831
2927
  #### Returns
2832
2928
 
2833
2929
  `Store`<[`OfflinePatientDataSyncStore`](interfaces/OfflinePatientDataSyncStore.md)\>
2834
2930
 
2835
2931
  #### Defined in
2836
2932
 
2837
- [packages/framework/esm-offline/src/offline-patient-data.ts:86](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L86)
2933
+ [packages/framework/esm-offline/src/offline-patient-data.ts:45](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L45)
2838
2934
 
2839
2935
  ___
2840
2936
 
@@ -2862,7 +2958,7 @@ Returns a queued sync item with the given ID or `undefined` if no such item exis
2862
2958
 
2863
2959
  #### Defined in
2864
2960
 
2865
- [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)
2961
+ [packages/framework/esm-offline/src/sync.ts:334](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L334)
2866
2962
 
2867
2963
  ___
2868
2964
 
@@ -2890,7 +2986,7 @@ Returns the content of all currently queued up sync items of the currently signe
2890
2986
 
2891
2987
  #### Defined in
2892
2988
 
2893
- [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)
2989
+ [packages/framework/esm-offline/src/sync.ts:316](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L316)
2894
2990
 
2895
2991
  ___
2896
2992
 
@@ -2916,41 +3012,76 @@ Checks whether the given string has the format of an offline UUID generated by [
2916
3012
 
2917
3013
  ___
2918
3014
 
2919
- ### loadPersistedPatientDataSyncState
3015
+ ### messageOmrsServiceWorker
2920
3016
 
2921
- ▸ **loadPersistedPatientDataSyncState**(): `Promise`<`void`\>
3017
+ ▸ **messageOmrsServiceWorker**(`message`): `Promise`<[`MessageServiceWorkerResult`](interfaces/MessageServiceWorkerResult.md)<`any`\>\>
3018
+
3019
+ Sends the specified message to the application's service worker.
3020
+
3021
+ #### Parameters
3022
+
3023
+ | Name | Type | Description |
3024
+ | :------ | :------ | :------ |
3025
+ | `message` | [`KnownOmrsServiceWorkerMessages`](API.md#knownomrsserviceworkermessages) | The message to be sent. |
2922
3026
 
2923
3027
  #### Returns
2924
3028
 
2925
- `Promise`<`void`\>
3029
+ `Promise`<[`MessageServiceWorkerResult`](interfaces/MessageServiceWorkerResult.md)<`any`\>\>
3030
+
3031
+ A promise which completes when the message has been successfully processed by the Service Worker.
2926
3032
 
2927
3033
  #### Defined in
2928
3034
 
2929
- [packages/framework/esm-offline/src/offline-patient-data.ts:200](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L200)
3035
+ [packages/framework/esm-offline/src/service-worker-messaging.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-messaging.ts#L11)
2930
3036
 
2931
3037
  ___
2932
3038
 
2933
- ### messageOmrsServiceWorker
3039
+ ### putDynamicOfflineData
2934
3040
 
2935
- ▸ **messageOmrsServiceWorker**(`message`): `Promise`<[`MessageServiceWorkerResult`](interfaces/MessageServiceWorkerResult.md)<`any`\>\>
3041
+ ▸ **putDynamicOfflineData**(`type`, `identifier`): `Promise`<`void`\>
2936
3042
 
2937
- Sends the specified message to the application's service worker.
3043
+ Declares that dynamic offline data of the given [type](interfaces/FetchResponse.md#type) with the given [identifier](interfaces/FHIRResource.md#identifier)
3044
+ should be made available offline for the currently logged in user.
2938
3045
 
2939
3046
  #### Parameters
2940
3047
 
2941
3048
  | Name | Type | Description |
2942
3049
  | :------ | :------ | :------ |
2943
- | `message` | [`KnownOmrsServiceWorkerMessages`](API.md#knownomrsserviceworkermessages) | The message to be sent. |
3050
+ | `type` | `string` | The type of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
3051
+ | `identifier` | `string` | The identifier of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
2944
3052
 
2945
3053
  #### Returns
2946
3054
 
2947
- `Promise`<[`MessageServiceWorkerResult`](interfaces/MessageServiceWorkerResult.md)<`any`\>\>
3055
+ `Promise`<`void`\>
2948
3056
 
2949
- A promise which completes when the message has been successfully processed by the Service Worker.
3057
+ #### Defined in
3058
+
3059
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:162](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L162)
3060
+
3061
+ ___
3062
+
3063
+ ### putDynamicOfflineDataFor
3064
+
3065
+ ▸ **putDynamicOfflineDataFor**(`userId`, `type`, `identifier`): `Promise`<`void`\>
3066
+
3067
+ Declares that dynamic offline data of the given [type](interfaces/FetchResponse.md#type) with the given [identifier](interfaces/FHIRResource.md#identifier)
3068
+ should be made available offline for the user with the given ID.
3069
+
3070
+ #### Parameters
3071
+
3072
+ | Name | Type | Description |
3073
+ | :------ | :------ | :------ |
3074
+ | `userId` | `string` | The ID of the user for whom the dynamic offline data should be made available. |
3075
+ | `type` | `string` | The type of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
3076
+ | `identifier` | `string` | The identifier of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
3077
+
3078
+ #### Returns
3079
+
3080
+ `Promise`<`void`\>
2950
3081
 
2951
3082
  #### Defined in
2952
3083
 
2953
- [packages/framework/esm-offline/src/service-worker-messaging.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/service-worker-messaging.ts#L11)
3084
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:177](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L177)
2954
3085
 
2955
3086
  ___
2956
3087
 
@@ -2980,7 +3111,7 @@ Enqueues a new item in the sync queue and associates the item with the currently
2980
3111
 
2981
3112
  #### Defined in
2982
3113
 
2983
- [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)
3114
+ [packages/framework/esm-offline/src/sync.ts:274](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L274)
2984
3115
 
2985
3116
  ___
2986
3117
 
@@ -2988,25 +3119,94 @@ ___
2988
3119
 
2989
3120
  ▸ **registerOfflinePatientHandler**(`identifier`, `handler`): `void`
2990
3121
 
2991
- Attempts to add the specified patient handler registration to the list of offline patient handlers.
3122
+ **`deprecated`** Will be removed once all modules have been migrated to the new dynamic offline data API.
3123
+
3124
+ #### Parameters
3125
+
3126
+ | Name | Type |
3127
+ | :------ | :------ |
3128
+ | `identifier` | `string` |
3129
+ | `handler` | [`OfflinePatientDataSyncHandler`](interfaces/OfflinePatientDataSyncHandler.md) |
3130
+
3131
+ #### Returns
3132
+
3133
+ `void`
3134
+
3135
+ #### Defined in
3136
+
3137
+ [packages/framework/esm-offline/src/offline-patient-data.ts:51](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L51)
3138
+
3139
+ ___
3140
+
3141
+ ### removeDynamicOfflineData
3142
+
3143
+ ▸ **removeDynamicOfflineData**(`type`, `identifier`): `Promise`<`void`\>
3144
+
3145
+ Declares that dynamic offline data of the given [type](interfaces/FetchResponse.md#type) with the given [identifier](interfaces/FHIRResource.md#identifier)
3146
+ no longer needs to be available offline for the currently logged in user.
2992
3147
 
2993
3148
  #### Parameters
2994
3149
 
2995
3150
  | Name | Type | Description |
2996
3151
  | :------ | :------ | :------ |
2997
- | `identifier` | `string` | A key which uniquely identifies the registration. |
2998
- | `handler` | [`OfflinePatientDataSyncHandler`](interfaces/OfflinePatientDataSyncHandler.md) | The patient handler registration to be registered. |
3152
+ | `type` | `string` | The type of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
3153
+ | `identifier` | `string` | The identifier of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
2999
3154
 
3000
3155
  #### Returns
3001
3156
 
3002
- `void`
3157
+ `Promise`<`void`\>
3158
+
3159
+ #### Defined in
3160
+
3161
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:213](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L213)
3162
+
3163
+ ___
3164
+
3165
+ ### removeDynamicOfflineDataFor
3166
+
3167
+ ▸ **removeDynamicOfflineDataFor**(`userId`, `type`, `identifier`): `Promise`<`void`\>
3168
+
3169
+ Declares that dynamic offline data of the given [type](interfaces/FetchResponse.md#type) with the given [identifier](interfaces/FHIRResource.md#identifier)
3170
+ no longer needs to be available offline for the user with the given ID.
3171
+
3172
+ #### Parameters
3173
+
3174
+ | Name | Type | Description |
3175
+ | :------ | :------ | :------ |
3176
+ | `userId` | `string` | The ID of the user who doesn't require the specified offline data. |
3177
+ | `type` | `string` | The type of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
3178
+ | `identifier` | `string` | The identifier of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
3179
+
3180
+ #### Returns
3003
3181
 
3004
- `true` if the registration was successfully made; `false` if another registration with
3005
- the same identifier has already been registered before.
3182
+ `Promise`<`void`\>
3006
3183
 
3007
3184
  #### Defined in
3008
3185
 
3009
- [packages/framework/esm-offline/src/offline-patient-data.ts:97](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L97)
3186
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:228](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L228)
3187
+
3188
+ ___
3189
+
3190
+ ### setupDynamicOfflineDataHandler
3191
+
3192
+ ▸ **setupDynamicOfflineDataHandler**(`handler`): `void`
3193
+
3194
+ Sets up a handler for synchronizing dynamic offline data.
3195
+ See [DynamicOfflineDataHandler](interfaces/DynamicOfflineDataHandler.md) for details.
3196
+
3197
+ #### Parameters
3198
+
3199
+ | Name | Type | Description |
3200
+ | :------ | :------ | :------ |
3201
+ | `handler` | [`DynamicOfflineDataHandler`](interfaces/DynamicOfflineDataHandler.md) | The handler to be setup. |
3202
+
3203
+ #### Returns
3204
+
3205
+ `void`
3206
+
3207
+ #### Defined in
3208
+
3209
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:114](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L114)
3010
3210
 
3011
3211
  ___
3012
3212
 
@@ -3037,7 +3237,7 @@ Registers a new synchronization handler which is able to synchronize data of a s
3037
3237
 
3038
3238
  #### Defined in
3039
3239
 
3040
- [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)
3240
+ [packages/framework/esm-offline/src/sync.ts:392](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/sync.ts#L392)
3041
3241
 
3042
3242
  ___
3043
3243
 
@@ -3119,11 +3319,58 @@ ___
3119
3319
 
3120
3320
  ___
3121
3321
 
3322
+ ### syncAllDynamicOfflineData
3323
+
3324
+ ▸ **syncAllDynamicOfflineData**(`type`, `abortSignal?`): `Promise`<`void`\>
3325
+
3326
+ Synchronizes all offline data entries of the given [type](interfaces/FetchResponse.md#type) for the currently logged in user.
3327
+
3328
+ #### Parameters
3329
+
3330
+ | Name | Type | Description |
3331
+ | :------ | :------ | :------ |
3332
+ | `type` | `string` | The type of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
3333
+ | `abortSignal?` | `AbortSignal` | An {@link AbortSignal} which can be used to cancel the operation. |
3334
+
3335
+ #### Returns
3336
+
3337
+ `Promise`<`void`\>
3338
+
3339
+ #### Defined in
3340
+
3341
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:262](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L262)
3342
+
3343
+ ___
3344
+
3345
+ ### syncDynamicOfflineData
3346
+
3347
+ ▸ **syncDynamicOfflineData**(`type`, `identifier`, `abortSignal?`): `Promise`<`void`\>
3348
+
3349
+ Synchronizes a single offline data entry of the given [type](interfaces/FetchResponse.md#type) for the currently logged in user.
3350
+
3351
+ #### Parameters
3352
+
3353
+ | Name | Type | Description |
3354
+ | :------ | :------ | :------ |
3355
+ | `type` | `string` | The type of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
3356
+ | `identifier` | `string` | The identifier of the offline data. See [DynamicOfflineData](interfaces/DynamicOfflineData.md) for details. |
3357
+ | `abortSignal?` | `AbortSignal` | An {@link AbortSignal} which can be used to cancel the operation. |
3358
+
3359
+ #### Returns
3360
+
3361
+ `Promise`<`void`\>
3362
+
3363
+ #### Defined in
3364
+
3365
+ [packages/framework/esm-offline/src/dynamic-offline-data.ts:280](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/dynamic-offline-data.ts#L280)
3366
+
3367
+ ___
3368
+
3122
3369
  ### syncOfflinePatientData
3123
3370
 
3124
3371
  ▸ **syncOfflinePatientData**(`patientUuid`): `Promise`<`void`\>
3125
3372
 
3126
- Notifies all registered offline patient handlers that a new patient must be made available offline.
3373
+ **`deprecated`** Will be removed once all modules have been migrated to the new dynamic offline data API.
3127
3374
 
3128
3375
  #### Parameters
3129
3376
 
@@ -3135,11 +3382,9 @@ Notifies all registered offline patient handlers that a new patient must be made
3135
3382
 
3136
3383
  `Promise`<`void`\>
3137
3384
 
3138
- A promise which resolves once all registered handlers have finished synchronizing.
3139
-
3140
3385
  #### Defined in
3141
3386
 
3142
- [packages/framework/esm-offline/src/offline-patient-data.ts:112](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L112)
3387
+ [packages/framework/esm-offline/src/offline-patient-data.ts:71](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-offline/src/offline-patient-data.ts#L71)
3143
3388
 
3144
3389
  ___
3145
3390
 
@@ -3471,7 +3716,7 @@ ___
3471
3716
 
3472
3717
  #### Defined in
3473
3718
 
3474
- [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)
3719
+ [packages/framework/esm-styleguide/src/left-nav/index.tsx:20](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/left-nav/index.tsx#L20)
3475
3720
 
3476
3721
  ___
3477
3722
 
@@ -3619,7 +3864,7 @@ ___
3619
3864
 
3620
3865
  #### Defined in
3621
3866
 
3622
- [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)
3867
+ [packages/framework/esm-styleguide/src/left-nav/index.tsx:24](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-styleguide/src/left-nav/index.tsx#L24)
3623
3868
 
3624
3869
  ___
3625
3870