@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.
- package/.turbo/turbo-build.log +1 -1
- package/dist/openmrs-esm-framework.js +2 -2
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/classes/OpenmrsFetchError.md +4 -4
- package/docs/functions/convertToLocaleCalendar.md +1 -1
- package/docs/functions/formatDate.md +1 -1
- package/docs/functions/formatDatetime.md +1 -1
- package/docs/functions/formatDuration.md +3 -3
- package/docs/functions/formatPartialDate.md +1 -1
- package/docs/functions/formatTime.md +1 -1
- package/docs/functions/getDefaultCalendar.md +1 -1
- package/docs/functions/isOmrsDateStrict.md +1 -1
- package/docs/functions/isOmrsDateToday.md +1 -1
- package/docs/functions/makeUrl.md +1 -1
- package/docs/functions/openmrsFetch.md +1 -1
- package/docs/functions/openmrsObservableFetch.md +1 -1
- package/docs/functions/parseDate.md +1 -1
- package/docs/functions/registerDefaultCalendar.md +1 -1
- package/docs/functions/toDateObjectStrict.md +1 -1
- package/docs/functions/toOmrsIsoString.md +1 -1
- package/docs/interfaces/FetchConfig.md +3 -3
- package/docs/interfaces/FetchError.md +3 -3
- package/docs/interfaces/FetchHeaders.md +1 -1
- package/docs/interfaces/FetchResponseJson.md +1 -1
- package/docs/interfaces/OpenmrsDateRangePickerProps.md +783 -0
- package/docs/type-aliases/DateInput.md +1 -1
- package/docs/type-aliases/FormatDateMode.md +1 -1
- package/docs/type-aliases/FormatDateOptions.md +10 -10
- package/docs/variables/OpenmrsDateRangePicker.md +9 -0
- package/docs/variables/fhirBaseUrl.md +1 -1
- package/docs/variables/restBaseUrl.md +1 -1
- package/docs/variables/sessionEndpoint.md +1 -1
- package/mock-jest.tsx +31 -1
- package/mock.tsx +31 -1
- 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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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?`): `
|
|
5
|
+
> **formatDuration**(`duration`, `options?`): `string`
|
|
6
6
|
|
|
7
|
-
Defined in: packages/framework/esm-utils/dist/dates/date-util.d.ts:
|
|
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
|
-
`
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
> **makeUrl**(`path`): `string`
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/framework/esm-api/src/openmrs-fetch.ts:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|