@openmrs/esm-framework 6.3.1-pre.3199 → 6.3.1-pre.3207

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.
Files changed (35) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/openmrs-esm-framework.js +2 -2
  3. package/dist/openmrs-esm-framework.js.map +1 -1
  4. package/docs/classes/OpenmrsFetchError.md +4 -4
  5. package/docs/functions/convertToLocaleCalendar.md +1 -1
  6. package/docs/functions/formatDate.md +1 -1
  7. package/docs/functions/formatDatetime.md +1 -1
  8. package/docs/functions/formatDuration.md +3 -3
  9. package/docs/functions/formatPartialDate.md +1 -1
  10. package/docs/functions/formatTime.md +1 -1
  11. package/docs/functions/getDefaultCalendar.md +1 -1
  12. package/docs/functions/isOmrsDateStrict.md +1 -1
  13. package/docs/functions/isOmrsDateToday.md +1 -1
  14. package/docs/functions/makeUrl.md +1 -1
  15. package/docs/functions/openmrsFetch.md +1 -1
  16. package/docs/functions/openmrsObservableFetch.md +1 -1
  17. package/docs/functions/parseDate.md +1 -1
  18. package/docs/functions/registerDefaultCalendar.md +1 -1
  19. package/docs/functions/toDateObjectStrict.md +1 -1
  20. package/docs/functions/toOmrsIsoString.md +1 -1
  21. package/docs/interfaces/FetchConfig.md +3 -3
  22. package/docs/interfaces/FetchError.md +3 -3
  23. package/docs/interfaces/FetchHeaders.md +1 -1
  24. package/docs/interfaces/FetchResponseJson.md +1 -1
  25. package/docs/interfaces/OpenmrsDateRangePickerProps.md +783 -0
  26. package/docs/type-aliases/DateInput.md +1 -1
  27. package/docs/type-aliases/FormatDateMode.md +1 -1
  28. package/docs/type-aliases/FormatDateOptions.md +10 -10
  29. package/docs/variables/OpenmrsDateRangePicker.md +9 -0
  30. package/docs/variables/fhirBaseUrl.md +1 -1
  31. package/docs/variables/restBaseUrl.md +1 -1
  32. package/docs/variables/sessionEndpoint.md +1 -1
  33. package/mock-jest.tsx +31 -1
  34. package/mock.tsx +31 -1
  35. package/package.json +20 -20
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Class: OpenmrsFetchError
4
4
 
5
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:301](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L301)
5
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:304](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L304)
6
6
 
7
7
  ## Extends
8
8
 
@@ -18,7 +18,7 @@ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:301](https://github
18
18
 
19
19
  > **new OpenmrsFetchError**(`url`, `response`, `responseBody`, `requestStacktrace`): `OpenmrsFetchError`
20
20
 
21
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:302](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L302)
21
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:305](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L305)
22
22
 
23
23
  #### Parameters
24
24
 
@@ -120,7 +120,7 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces
120
120
 
121
121
  > **response**: `Response`
122
122
 
123
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:310](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L310)
123
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:313](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L313)
124
124
 
125
125
  #### Implementation of
126
126
 
@@ -132,7 +132,7 @@ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:310](https://github
132
132
 
133
133
  > **responseBody**: `null` \| `string` \| [`FetchResponseJson`](../interfaces/FetchResponseJson.md)
134
134
 
135
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:311](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L311)
135
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:314](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L314)
136
136
 
137
137
  #### Implementation of
138
138
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **convertToLocaleCalendar**(`date`, `locale`): `CalendarDate` \| `CalendarDateTime` \| `ZonedDateTime`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:146
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:145
8
8
 
9
9
  Converts a calendar date to the equivalent locale calendar date.
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **formatDate**(`date`, `options?`): `string`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:126
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:125
8
8
 
9
9
  Formats the input date according to the current locale and the
10
10
  given options.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **formatDatetime**(`date`, `options?`): `string`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:141
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:140
8
8
 
9
9
  Formats the input into a string showing the date and time, according
10
10
  to the current locale. The `mode` parameter is as described for
@@ -2,9 +2,9 @@
2
2
 
3
3
  # Function: formatDuration()
4
4
 
5
- > **formatDuration**(`duration`, `options?`): `any`
5
+ > **formatDuration**(`duration`, `options?`): `string`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:154
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:153
8
8
 
9
9
  Formats the input duration according to the current locale.
10
10
 
@@ -24,6 +24,6 @@ Optional options for formatting.
24
24
 
25
25
  ## Returns
26
26
 
27
- `any`
27
+ `string`
28
28
 
29
29
  The formatted duration string.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **formatPartialDate**(`dateString`, `options?`): `null` \| `string`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:106
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:105
8
8
 
9
9
  Formats the string representing a date, including partial representations of dates, according to the current
10
10
  locale and the given options.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **formatTime**(`date`): `string`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:131
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:130
8
8
 
9
9
  Formats the input as a time, according to the current locale.
10
10
  12-hour or 24-hour clock depends on locale.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **getDefaultCalendar**(`locale`): `undefined` \| `CalendarIdentifier`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:50
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:49
8
8
 
9
9
  Retrieves the default calendar for the specified locale if any.
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **isOmrsDateStrict**(`omrsPayloadString`): `boolean`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:13
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:12
8
8
 
9
9
  This function checks whether a date string is the OpenMRS ISO format.
10
10
  The format should be YYYY-MM-DDTHH:mm:ss.SSSZZ
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **isOmrsDateToday**(`date`): `boolean`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:18
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:17
8
8
 
9
9
  ## Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **makeUrl**(`path`): `string`
6
6
 
7
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:22](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L22)
7
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:23](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L23)
8
8
 
9
9
  Append `path` to the OpenMRS SPA base.
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **openmrsFetch**\<`T`\>(`path`, `fetchInit`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\<`T`\>\>
6
6
 
7
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:82](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L82)
7
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:83](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L83)
8
8
 
9
9
  The openmrsFetch function is a wrapper around the
10
10
  [browser's built-in fetch function](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch),
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **openmrsObservableFetch**\<`T`\>(`url`, `fetchInit`): `Observable`\<[`FetchResponse`](../interfaces/FetchResponse.md)\<`T`\>\>
6
6
 
7
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:269](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L269)
7
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:272](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L272)
8
8
 
9
9
  The openmrsObservableFetch function is a wrapper around openmrsFetch
10
10
  that returns an [Observable](https://rxjs-dev.firebaseapp.com/guide/observable)
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **parseDate**(`dateString`): `Date`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:32
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:31
8
8
 
9
9
  Utility function to parse an arbitrary string into a date.
10
10
  Uses `dayjs(dateString)`.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **registerDefaultCalendar**(`locale`, `calendar`): `void`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:44
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:43
8
8
 
9
9
  Provides the name of the calendar to associate, as a default, with the given base locale.
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **toDateObjectStrict**(`omrsDateString`): `null` \| `Date`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:23
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:22
8
8
 
9
9
  Converts the object to a date object if it is an OpenMRS ISO date time string.
10
10
  Otherwise returns null.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **toOmrsIsoString**(`date`, `toUTC?`): `string`
6
6
 
7
- Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:27
7
+ Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:26
8
8
 
9
9
  Formats the input to OpenMRS ISO format: "YYYY-MM-DDTHH:mm:ss.SSSZZ".
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: FetchConfig
4
4
 
5
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:314](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L314)
5
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:317](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L317)
6
6
 
7
7
  ## Extends
8
8
 
@@ -14,7 +14,7 @@ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:314](https://github
14
14
 
15
15
  > `optional` **body**: `string` \| `FetchBody`
16
16
 
17
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:316](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L316)
17
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:319](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L319)
18
18
 
19
19
  ***
20
20
 
@@ -50,7 +50,7 @@ A string indicating whether credentials will be sent with the request always, ne
50
50
 
51
51
  > `optional` **headers**: [`FetchHeaders`](FetchHeaders.md)
52
52
 
53
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:315](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L315)
53
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:318](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L318)
54
54
 
55
55
  ***
56
56
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: FetchError
4
4
 
5
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:333](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L333)
5
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:336](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L336)
6
6
 
7
7
  ## Properties
8
8
 
@@ -10,7 +10,7 @@ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:333](https://github
10
10
 
11
11
  > **response**: `Response`
12
12
 
13
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:334](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L334)
13
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:337](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L337)
14
14
 
15
15
  ***
16
16
 
@@ -18,4 +18,4 @@ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:334](https://github
18
18
 
19
19
  > **responseBody**: `null` \| `ResponseBody`
20
20
 
21
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:335](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L335)
21
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:338](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L338)
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: FetchHeaders
4
4
 
5
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:321](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L321)
5
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:324](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L324)
6
6
 
7
7
  ## Indexable
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: FetchResponseJson
4
4
 
5
- Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:329](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L329)
5
+ Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:332](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/openmrs-fetch.ts#L332)
6
6
 
7
7
  ## Indexable
8
8