@openmrs/esm-framework 6.2.1-pre.2796 → 6.2.1-pre.2805
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
@@ -82,6 +82,7 @@
|
|
82
82
|
- [convertToLocaleCalendar](API.md#converttolocalecalendar)
|
83
83
|
- [formatDate](API.md#formatdate)
|
84
84
|
- [formatDatetime](API.md#formatdatetime)
|
85
|
+
- [formatPartialDate](API.md#formatpartialdate)
|
85
86
|
- [formatTime](API.md#formattime)
|
86
87
|
- [getDefaultCalendar](API.md#getdefaultcalendar)
|
87
88
|
- [isOmrsDateStrict](API.md#isomrsdatestrict)
|
@@ -379,7 +380,7 @@ ___
|
|
379
380
|
|
380
381
|
#### Defined in
|
381
382
|
|
382
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
383
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:25](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L25)
|
383
384
|
|
384
385
|
___
|
385
386
|
|
@@ -389,7 +390,7 @@ ___
|
|
389
390
|
|
390
391
|
#### Defined in
|
391
392
|
|
392
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
393
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:168](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L168)
|
393
394
|
|
394
395
|
___
|
395
396
|
|
@@ -413,7 +414,7 @@ ___
|
|
413
414
|
|
414
415
|
#### Defined in
|
415
416
|
|
416
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
417
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:170](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L170)
|
417
418
|
|
418
419
|
___
|
419
420
|
|
@@ -4037,7 +4038,7 @@ CalendarDate
|
|
4037
4038
|
|
4038
4039
|
#### Defined in
|
4039
4040
|
|
4040
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4041
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:407](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L407)
|
4041
4042
|
|
4042
4043
|
___
|
4043
4044
|
|
@@ -4076,7 +4077,7 @@ locales.
|
|
4076
4077
|
|
4077
4078
|
#### Defined in
|
4078
4079
|
|
4079
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4080
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:296](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L296)
|
4080
4081
|
|
4081
4082
|
___
|
4082
4083
|
|
@@ -4105,7 +4106,46 @@ output of `Date.prototype.toLocaleString` for *most* locales.
|
|
4105
4106
|
|
4106
4107
|
#### Defined in
|
4107
4108
|
|
4108
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4109
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:399](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L399)
|
4110
|
+
|
4111
|
+
___
|
4112
|
+
|
4113
|
+
### formatPartialDate
|
4114
|
+
|
4115
|
+
▸ **formatPartialDate**(`dateString`, `options?`): ``null`` \| `string`
|
4116
|
+
|
4117
|
+
Formats the string representing a date, including partial representations of dates, according to the current
|
4118
|
+
locale and the given options.
|
4119
|
+
|
4120
|
+
Default options:
|
4121
|
+
- mode: "standard",
|
4122
|
+
- time: "for today",
|
4123
|
+
- day: true,
|
4124
|
+
- month: true,
|
4125
|
+
- year: true
|
4126
|
+
- noToday: false
|
4127
|
+
|
4128
|
+
If the date is today then "Today" is produced (in the locale language).
|
4129
|
+
This behavior can be disabled with `noToday: true`.
|
4130
|
+
|
4131
|
+
When time is included, it is appended with a comma and a space. This
|
4132
|
+
agrees with the output of `Date.prototype.toLocaleString` for *most*
|
4133
|
+
locales.
|
4134
|
+
|
4135
|
+
#### Parameters
|
4136
|
+
|
4137
|
+
| Name | Type |
|
4138
|
+
| :------ | :------ |
|
4139
|
+
| `dateString` | `string` |
|
4140
|
+
| `options` | `Partial`<[`FormatDateOptions`](API.md#formatdateoptions)\> |
|
4141
|
+
|
4142
|
+
#### Returns
|
4143
|
+
|
4144
|
+
``null`` \| `string`
|
4145
|
+
|
4146
|
+
#### Defined in
|
4147
|
+
|
4148
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:235](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L235)
|
4109
4149
|
|
4110
4150
|
___
|
4111
4151
|
|
@@ -4128,7 +4168,7 @@ Formats the input as a time, according to the current locale.
|
|
4128
4168
|
|
4129
4169
|
#### Defined in
|
4130
4170
|
|
4131
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4171
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:383](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L383)
|
4132
4172
|
|
4133
4173
|
___
|
4134
4174
|
|
@@ -4150,7 +4190,7 @@ Retrieves the default calendar for the specified locale if any.
|
|
4150
4190
|
|
4151
4191
|
#### Defined in
|
4152
4192
|
|
4153
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4193
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:162](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L162)
|
4154
4194
|
|
4155
4195
|
___
|
4156
4196
|
|
@@ -4173,7 +4213,7 @@ The format should be YYYY-MM-DDTHH:mm:ss.SSSZZ
|
|
4173
4213
|
|
4174
4214
|
#### Defined in
|
4175
4215
|
|
4176
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4216
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:33](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L33)
|
4177
4217
|
|
4178
4218
|
___
|
4179
4219
|
|
@@ -4193,7 +4233,7 @@ ___
|
|
4193
4233
|
|
4194
4234
|
#### Defined in
|
4195
4235
|
|
4196
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4236
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:62](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L62)
|
4197
4237
|
|
4198
4238
|
___
|
4199
4239
|
|
@@ -4216,7 +4256,7 @@ Uses `dayjs(dateString)`.
|
|
4216
4256
|
|
4217
4257
|
#### Defined in
|
4218
4258
|
|
4219
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4259
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:95](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L95)
|
4220
4260
|
|
4221
4261
|
___
|
4222
4262
|
|
@@ -4244,7 +4284,7 @@ registerDefaultCalendar('en', 'buddhist') // sets the default calendar for the '
|
|
4244
4284
|
|
4245
4285
|
#### Defined in
|
4246
4286
|
|
4247
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4287
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:153](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L153)
|
4248
4288
|
|
4249
4289
|
___
|
4250
4290
|
|
@@ -4267,7 +4307,7 @@ Otherwise returns null.
|
|
4267
4307
|
|
4268
4308
|
#### Defined in
|
4269
4309
|
|
4270
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4310
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:70](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L70)
|
4271
4311
|
|
4272
4312
|
___
|
4273
4313
|
|
@@ -4290,7 +4330,7 @@ Formats the input to OpenMRS ISO format: "YYYY-MM-DDTHH:mm:ss.SSSZZ".
|
|
4290
4330
|
|
4291
4331
|
#### Defined in
|
4292
4332
|
|
4293
|
-
[packages/framework/esm-utils/src/dates/date-util.ts:
|
4333
|
+
[packages/framework/esm-utils/src/dates/date-util.ts:81](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L81)
|
4294
4334
|
|
4295
4335
|
___
|
4296
4336
|
|
@@ -4902,7 +4942,7 @@ export function MyComponent() {
|
|
4902
4942
|
|
4903
4943
|
#### Defined in
|
4904
4944
|
|
4905
|
-
[packages/framework/esm-react-utils/src/useFeatureFlag.ts:
|
4945
|
+
[packages/framework/esm-react-utils/src/useFeatureFlag.ts:18](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useFeatureFlag.ts#L18)
|
4906
4946
|
|
4907
4947
|
___
|
4908
4948
|
|
@@ -7753,8 +7793,8 @@ https://webarchive.nationalarchives.gov.uk/ukgwa/20160921162509mp_/http://system
|
|
7753
7793
|
|
7754
7794
|
| Name | Type | Description |
|
7755
7795
|
| :------ | :------ | :------ |
|
7756
|
-
| `birthDate` | `
|
7757
|
-
| `currentDate` | `
|
7796
|
+
| `birthDate` | `ConfigType` | The birthDate. If birthDate is null, returns null. |
|
7797
|
+
| `currentDate` | `ConfigType` | Optional. If provided, calculates the age of the person at the provided currentDate (instead of now). |
|
7758
7798
|
|
7759
7799
|
#### Returns
|
7760
7800
|
|
@@ -7764,7 +7804,7 @@ A human-readable string version of the age.
|
|
7764
7804
|
|
7765
7805
|
#### Defined in
|
7766
7806
|
|
7767
|
-
[packages/framework/esm-utils/src/age-helpers.ts:
|
7807
|
+
[packages/framework/esm-utils/src/age-helpers.ts:22](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/age-helpers.ts#L22)
|
7768
7808
|
|
7769
7809
|
___
|
7770
7810
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@openmrs/esm-framework",
|
3
|
-
"version": "6.2.1-pre.
|
3
|
+
"version": "6.2.1-pre.2805",
|
4
4
|
"license": "MPL-2.0",
|
5
5
|
"browser": "dist/openmrs-esm-framework.js",
|
6
6
|
"main": "src/index.ts",
|
@@ -37,23 +37,23 @@
|
|
37
37
|
"access": "public"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@openmrs/esm-api": "6.2.1-pre.
|
41
|
-
"@openmrs/esm-config": "6.2.1-pre.
|
42
|
-
"@openmrs/esm-context": "6.2.1-pre.
|
43
|
-
"@openmrs/esm-dynamic-loading": "6.2.1-pre.
|
44
|
-
"@openmrs/esm-error-handling": "6.2.1-pre.
|
45
|
-
"@openmrs/esm-expression-evaluator": "6.2.1-pre.
|
46
|
-
"@openmrs/esm-extensions": "6.2.1-pre.
|
47
|
-
"@openmrs/esm-feature-flags": "6.2.1-pre.
|
48
|
-
"@openmrs/esm-globals": "6.2.1-pre.
|
49
|
-
"@openmrs/esm-navigation": "6.2.1-pre.
|
50
|
-
"@openmrs/esm-offline": "6.2.1-pre.
|
51
|
-
"@openmrs/esm-react-utils": "6.2.1-pre.
|
52
|
-
"@openmrs/esm-routes": "6.2.1-pre.
|
53
|
-
"@openmrs/esm-state": "6.2.1-pre.
|
54
|
-
"@openmrs/esm-styleguide": "6.2.1-pre.
|
55
|
-
"@openmrs/esm-translations": "6.2.1-pre.
|
56
|
-
"@openmrs/esm-utils": "6.2.1-pre.
|
40
|
+
"@openmrs/esm-api": "6.2.1-pre.2805",
|
41
|
+
"@openmrs/esm-config": "6.2.1-pre.2805",
|
42
|
+
"@openmrs/esm-context": "6.2.1-pre.2805",
|
43
|
+
"@openmrs/esm-dynamic-loading": "6.2.1-pre.2805",
|
44
|
+
"@openmrs/esm-error-handling": "6.2.1-pre.2805",
|
45
|
+
"@openmrs/esm-expression-evaluator": "6.2.1-pre.2805",
|
46
|
+
"@openmrs/esm-extensions": "6.2.1-pre.2805",
|
47
|
+
"@openmrs/esm-feature-flags": "6.2.1-pre.2805",
|
48
|
+
"@openmrs/esm-globals": "6.2.1-pre.2805",
|
49
|
+
"@openmrs/esm-navigation": "6.2.1-pre.2805",
|
50
|
+
"@openmrs/esm-offline": "6.2.1-pre.2805",
|
51
|
+
"@openmrs/esm-react-utils": "6.2.1-pre.2805",
|
52
|
+
"@openmrs/esm-routes": "6.2.1-pre.2805",
|
53
|
+
"@openmrs/esm-state": "6.2.1-pre.2805",
|
54
|
+
"@openmrs/esm-styleguide": "6.2.1-pre.2805",
|
55
|
+
"@openmrs/esm-translations": "6.2.1-pre.2805",
|
56
|
+
"@openmrs/esm-utils": "6.2.1-pre.2805",
|
57
57
|
"dayjs": "^1.10.7"
|
58
58
|
},
|
59
59
|
"peerDependencies": {
|