@openmrs/esm-styleguide 5.7.3-pre.2184 → 5.7.3-pre.2185

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.
@@ -52,4 +52,4 @@ WARNING in webpack performance recommendations:
52
52
  You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
53
53
  For more info visit https://webpack.js.org/guides/code-splitting/
54
54
 
55
- webpack 5.88.0 compiled with 3 warnings in 26933 ms
55
+ webpack 5.88.0 compiled with 3 warnings in 26222 ms
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-styleguide",
3
- "version": "5.7.3-pre.2184",
3
+ "version": "5.7.3-pre.2185",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The styleguide for OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-styleguide.js",
@@ -64,12 +64,12 @@
64
64
  "rxjs": "6.x"
65
65
  },
66
66
  "devDependencies": {
67
- "@openmrs/esm-error-handling": "5.7.3-pre.2184",
68
- "@openmrs/esm-extensions": "5.7.3-pre.2184",
69
- "@openmrs/esm-navigation": "5.7.3-pre.2184",
70
- "@openmrs/esm-react-utils": "5.7.3-pre.2184",
71
- "@openmrs/esm-state": "5.7.3-pre.2184",
72
- "@openmrs/esm-translations": "5.7.3-pre.2184",
67
+ "@openmrs/esm-error-handling": "5.7.3-pre.2185",
68
+ "@openmrs/esm-extensions": "5.7.3-pre.2185",
69
+ "@openmrs/esm-navigation": "5.7.3-pre.2185",
70
+ "@openmrs/esm-react-utils": "5.7.3-pre.2185",
71
+ "@openmrs/esm-state": "5.7.3-pre.2185",
72
+ "@openmrs/esm-translations": "5.7.3-pre.2185",
73
73
  "@types/geopattern": "^1.2.9",
74
74
  "autoprefixer": "^9.8.8",
75
75
  "css-minimizer-webpack-plugin": "^1.2.0",
@@ -5,9 +5,9 @@ import { InlineLoading } from '@carbon/react';
5
5
  import { type CoreTranslationKey, getCoreTranslation } from '@openmrs/esm-translations';
6
6
  import { ConfigurableLink, usePatient } from '@openmrs/esm-react-utils';
7
7
  import { parseDate } from '@openmrs/esm-utils';
8
- import { useRelationships } from './useRelationships';
9
8
  import { usePatientContactAttributes } from './usePatientAttributes';
10
9
  import { usePatientListsForPatient } from './usePatientListsForPatient';
10
+ import { useRelationships } from './useRelationships';
11
11
  import styles from './patient-banner-contact-details.module.scss';
12
12
 
13
13
  interface ContactDetailsProps {
@@ -43,15 +43,15 @@ const PatientLists: React.FC<{ patientUuid: string }> = ({ patientUuid }) => {
43
43
  }
44
44
  return <li>--</li>;
45
45
  })()}
46
- <li style={{ marginTop: '1rem' }}>
47
- <ConfigurableLink to={`${window.spaBase}/home/patient-lists`}>
48
- {cohorts.length > 3
49
- ? getCoreTranslation('seeMoreLists', 'See {{count}} more lists', {
50
- count: cohorts?.length - 3,
51
- })
52
- : ''}
53
- </ConfigurableLink>
54
- </li>
46
+ {cohorts.length > 3 && (
47
+ <li className={styles.link}>
48
+ <ConfigurableLink to={`${window.spaBase}/home/patient-lists`}>
49
+ {getCoreTranslation('seeMoreLists', 'See {{count}} more lists', {
50
+ count: cohorts?.length - 3,
51
+ })}
52
+ </ConfigurableLink>
53
+ </li>
54
+ )}
55
55
  </ul>
56
56
  )}
57
57
  </>
@@ -61,7 +61,7 @@ const PatientLists: React.FC<{ patientUuid: string }> = ({ patientUuid }) => {
61
61
  const Address: React.FC<{ patientId: string }> = ({ patientId }) => {
62
62
  const { patient, isLoading } = usePatient(patientId);
63
63
  const address = patient?.address?.find((a) => a.use === 'home');
64
- const getAddressKey = (url) => url.split('#')[1];
64
+ const getAddressKey = (url: string) => url.split('#')[1];
65
65
 
66
66
  if (isLoading) {
67
67
  return <InlineLoading description={`${getCoreTranslation('loading', 'Loading')} ...`} role="progressbar" />;
@@ -73,12 +73,16 @@ const Address: React.FC<{ patientId: string }> = ({ patientId }) => {
73
73
  <ul>
74
74
  {address ? (
75
75
  Object.entries(address)
76
- .filter(([key]) => key !== 'id')
76
+ .filter(([key]) => key !== 'id' && key !== 'use')
77
77
  .map(([key, value]) =>
78
78
  key === 'extension' ? (
79
79
  address.extension?.[0]?.extension?.map((add, i) => (
80
80
  <li key={`address-${key}-${i}`}>
81
- {getCoreTranslation(getAddressKey(add.url), getAddressKey(add.url))}: {add.valueString}
81
+ {getCoreTranslation(
82
+ getAddressKey(add.url) as CoreTranslationKey,
83
+ getAddressKey(add.url) as CoreTranslationKey,
84
+ )}
85
+ : {add.valueString}
82
86
  </li>
83
87
  ))
84
88
  ) : (