@openmrs/esm-framework 5.7.3-pre.2136 → 5.7.3-pre.2139
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 +5 -5
- package/dist/openmrs-esm-framework.js +1 -1
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +8 -55
- package/package.json +17 -17
package/docs/API.md
CHANGED
|
@@ -227,13 +227,11 @@
|
|
|
227
227
|
|
|
228
228
|
- [age](API.md#age)
|
|
229
229
|
- [canAccessStorage](API.md#canaccessstorage)
|
|
230
|
-
- [daysIntoYear](API.md#daysintoyear)
|
|
231
230
|
- [displayName](API.md#displayname)
|
|
232
231
|
- [formatPatientName](API.md#formatpatientname)
|
|
233
232
|
- [formattedName](API.md#formattedname)
|
|
234
233
|
- [getDefaultsFromConfigSchema](API.md#getdefaultsfromconfigschema)
|
|
235
234
|
- [getPatientName](API.md#getpatientname)
|
|
236
|
-
- [isSameDay](API.md#issameday)
|
|
237
235
|
- [isVersionSatisfied](API.md#isversionsatisfied)
|
|
238
236
|
- [retry](API.md#retry)
|
|
239
237
|
- [selectPreferredName](API.md#selectpreferredname)
|
|
@@ -6519,15 +6517,19 @@ ___
|
|
|
6519
6517
|
|
|
6520
6518
|
### age
|
|
6521
6519
|
|
|
6522
|
-
▸ **age**(`
|
|
6520
|
+
▸ **age**(`birthDate`, `currentDate?`): `string`
|
|
6523
6521
|
|
|
6524
|
-
Gets a human readable and locale supported
|
|
6522
|
+
Gets a human readable and locale supported representation of a person's age, given their birthDate,
|
|
6523
|
+
The representation logic follows the guideline here:
|
|
6524
|
+
https://webarchive.nationalarchives.gov.uk/ukgwa/20160921162509mp_/http://systems.digital.nhs.uk/data/cui/uig/patben.pdf
|
|
6525
|
+
(See Tables 7 and 8)
|
|
6525
6526
|
|
|
6526
6527
|
#### Parameters
|
|
6527
6528
|
|
|
6528
6529
|
| Name | Type | Description |
|
|
6529
6530
|
| :------ | :------ | :------ |
|
|
6530
|
-
| `
|
|
6531
|
+
| `birthDate` | `undefined` \| ``null`` \| `string` \| `number` \| `Date` \| `Dayjs` | The birthDate. |
|
|
6532
|
+
| `currentDate` | `undefined` \| ``null`` \| `string` \| `number` \| `Date` \| `Dayjs` | Optional. If provided, calculates the age of the person at the provided currentDate (instead of now). |
|
|
6531
6533
|
|
|
6532
6534
|
#### Returns
|
|
6533
6535
|
|
|
@@ -6537,7 +6539,7 @@ A human-readable string version of the age.
|
|
|
6537
6539
|
|
|
6538
6540
|
#### Defined in
|
|
6539
6541
|
|
|
6540
|
-
[packages/framework/esm-utils/src/age-helpers.ts:
|
|
6542
|
+
[packages/framework/esm-utils/src/age-helpers.ts:17](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/age-helpers.ts#L17)
|
|
6541
6543
|
|
|
6542
6544
|
___
|
|
6543
6545
|
|
|
@@ -6567,30 +6569,6 @@ True if the WebStorage API object is able to be accessed, false otherwise
|
|
|
6567
6569
|
|
|
6568
6570
|
___
|
|
6569
6571
|
|
|
6570
|
-
### daysIntoYear
|
|
6571
|
-
|
|
6572
|
-
▸ **daysIntoYear**(`date`): `number`
|
|
6573
|
-
|
|
6574
|
-
Gets the number of days in the year of the given date.
|
|
6575
|
-
|
|
6576
|
-
#### Parameters
|
|
6577
|
-
|
|
6578
|
-
| Name | Type | Description |
|
|
6579
|
-
| :------ | :------ | :------ |
|
|
6580
|
-
| `date` | `Date` | The date to compute the days within the year. |
|
|
6581
|
-
|
|
6582
|
-
#### Returns
|
|
6583
|
-
|
|
6584
|
-
`number`
|
|
6585
|
-
|
|
6586
|
-
The number of days.
|
|
6587
|
-
|
|
6588
|
-
#### Defined in
|
|
6589
|
-
|
|
6590
|
-
[packages/framework/esm-utils/src/age-helpers.ts:9](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/age-helpers.ts#L9)
|
|
6591
|
-
|
|
6592
|
-
___
|
|
6593
|
-
|
|
6594
6572
|
### displayName
|
|
6595
6573
|
|
|
6596
6574
|
▸ **displayName**(`patient`): `string`
|
|
@@ -6721,31 +6699,6 @@ The patient's display name or an empty string if name is not present.
|
|
|
6721
6699
|
|
|
6722
6700
|
___
|
|
6723
6701
|
|
|
6724
|
-
### isSameDay
|
|
6725
|
-
|
|
6726
|
-
▸ **isSameDay**(`firstDate`, `secondDate`): `boolean`
|
|
6727
|
-
|
|
6728
|
-
Checks if two dates are representing the same day.
|
|
6729
|
-
|
|
6730
|
-
#### Parameters
|
|
6731
|
-
|
|
6732
|
-
| Name | Type | Description |
|
|
6733
|
-
| :------ | :------ | :------ |
|
|
6734
|
-
| `firstDate` | `Date` | The first date. |
|
|
6735
|
-
| `secondDate` | `Date` | The second date. |
|
|
6736
|
-
|
|
6737
|
-
#### Returns
|
|
6738
|
-
|
|
6739
|
-
`boolean`
|
|
6740
|
-
|
|
6741
|
-
True if both are located on the same day.
|
|
6742
|
-
|
|
6743
|
-
#### Defined in
|
|
6744
|
-
|
|
6745
|
-
[packages/framework/esm-utils/src/age-helpers.ts:25](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/age-helpers.ts#L25)
|
|
6746
|
-
|
|
6747
|
-
___
|
|
6748
|
-
|
|
6749
6702
|
### isVersionSatisfied
|
|
6750
6703
|
|
|
6751
6704
|
▸ **isVersionSatisfied**(`requiredVersion`, `installedVersion`): `boolean`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-framework",
|
|
3
|
-
"version": "5.7.3-pre.
|
|
3
|
+
"version": "5.7.3-pre.2139",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"browser": "dist/openmrs-esm-framework.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@openmrs/esm-api": "5.7.3-pre.
|
|
41
|
-
"@openmrs/esm-config": "5.7.3-pre.
|
|
42
|
-
"@openmrs/esm-context": "5.7.3-pre.
|
|
43
|
-
"@openmrs/esm-dynamic-loading": "5.7.3-pre.
|
|
44
|
-
"@openmrs/esm-error-handling": "5.7.3-pre.
|
|
45
|
-
"@openmrs/esm-extensions": "5.7.3-pre.
|
|
46
|
-
"@openmrs/esm-feature-flags": "5.7.3-pre.
|
|
47
|
-
"@openmrs/esm-globals": "5.7.3-pre.
|
|
48
|
-
"@openmrs/esm-navigation": "5.7.3-pre.
|
|
49
|
-
"@openmrs/esm-offline": "5.7.3-pre.
|
|
50
|
-
"@openmrs/esm-react-utils": "5.7.3-pre.
|
|
51
|
-
"@openmrs/esm-routes": "5.7.3-pre.
|
|
52
|
-
"@openmrs/esm-state": "5.7.3-pre.
|
|
53
|
-
"@openmrs/esm-styleguide": "5.7.3-pre.
|
|
54
|
-
"@openmrs/esm-translations": "5.7.3-pre.
|
|
55
|
-
"@openmrs/esm-utils": "5.7.3-pre.
|
|
40
|
+
"@openmrs/esm-api": "5.7.3-pre.2139",
|
|
41
|
+
"@openmrs/esm-config": "5.7.3-pre.2139",
|
|
42
|
+
"@openmrs/esm-context": "5.7.3-pre.2139",
|
|
43
|
+
"@openmrs/esm-dynamic-loading": "5.7.3-pre.2139",
|
|
44
|
+
"@openmrs/esm-error-handling": "5.7.3-pre.2139",
|
|
45
|
+
"@openmrs/esm-extensions": "5.7.3-pre.2139",
|
|
46
|
+
"@openmrs/esm-feature-flags": "5.7.3-pre.2139",
|
|
47
|
+
"@openmrs/esm-globals": "5.7.3-pre.2139",
|
|
48
|
+
"@openmrs/esm-navigation": "5.7.3-pre.2139",
|
|
49
|
+
"@openmrs/esm-offline": "5.7.3-pre.2139",
|
|
50
|
+
"@openmrs/esm-react-utils": "5.7.3-pre.2139",
|
|
51
|
+
"@openmrs/esm-routes": "5.7.3-pre.2139",
|
|
52
|
+
"@openmrs/esm-state": "5.7.3-pre.2139",
|
|
53
|
+
"@openmrs/esm-styleguide": "5.7.3-pre.2139",
|
|
54
|
+
"@openmrs/esm-translations": "5.7.3-pre.2139",
|
|
55
|
+
"@openmrs/esm-utils": "5.7.3-pre.2139",
|
|
56
56
|
"dayjs": "^1.10.7"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|