From a4afab892f095d323031c437782463675ffdcb26 Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Wed, 13 Nov 2024 12:18:43 +0300 Subject: [PATCH] (feat) Add in-patient pictogram Adds in-patient pictogram to the pictogram registry. This will be used in the Bed management app. --- packages/framework/esm-framework/docs/API.md | 28 ++++++++++---- .../src/pictograms/pictogram-registration.ts | 6 ++- .../src/pictograms/pictograms.tsx | 38 +++++++++++-------- 3 files changed, 46 insertions(+), 26 deletions(-) diff --git a/packages/framework/esm-framework/docs/API.md b/packages/framework/esm-framework/docs/API.md index 809015f34..570c28ceb 100644 --- a/packages/framework/esm-framework/docs/API.md +++ b/packages/framework/esm-framework/docs/API.md @@ -1183,7 +1183,7 @@ ___ #### Defined in -[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L48) +[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:36](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L36) ___ @@ -1527,7 +1527,7 @@ ___ #### Defined in -[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:36](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L36) +[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:42](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L42) ___ @@ -1563,6 +1563,16 @@ ___ ___ +### InPatientPictogram + +• `Const` **InPatientPictogram**: `MemoExoticComponent`<`ForwardRefExoticComponent`<[`PictogramProps`](API.md#pictogramprops) & `RefAttributes`<`SVGSVGElement`\>\>\> + +#### Defined in + +[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L48) + +___ + ### InformationFilledIcon • `Const` **InformationFilledIcon**: `MemoExoticComponent`<`ForwardRefExoticComponent`<[`IconProps`](API.md#iconprops) & `RefAttributes`<`SVGSVGElement`\>\>\> @@ -1609,7 +1619,7 @@ ___ #### Defined in -[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:60](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L60) +[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:54](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L54) ___ @@ -1763,7 +1773,7 @@ ___ #### Defined in -[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:42](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L42) +[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:60](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L60) ___ @@ -1791,7 +1801,7 @@ ___ • `Const` **Pictogram**: `MemoExoticComponent`<`ForwardRefExoticComponent`<[`SvgPictogramProps`](API.md#svgpictogramprops) & `RefAttributes`<`SVGSVGElement`\>\>\> -This is a utility type for custom pictograms +This is a utility type for custom pictograms. Please maintain alphabetical order when adding new pictograms for readability. #### Defined in @@ -1885,7 +1895,7 @@ ___ #### Defined in -[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:54](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L54) +[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:72](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L72) ___ @@ -2418,13 +2428,14 @@ ___ ### getLocations -▸ **getLocations**(`tagUuidOrName?`): `Observable`<[`Location`](interfaces/Location.md)[]\> +▸ **getLocations**(`tagUuidOrName?`, `query?`): `Observable`<[`Location`](interfaces/Location.md)[]\> #### Parameters | Name | Type | Default value | | :------ | :------ | :------ | | `tagUuidOrName` | ``null`` \| `string` | `null` | +| `query` | ``null`` \| `string` | `null` | #### Returns @@ -2908,13 +2919,14 @@ ___ ### useLocations -▸ **useLocations**(`tagUuidOrName?`): [`Location`](interfaces/Location.md)[] +▸ **useLocations**(`tagUuidOrName?`, `query?`): [`Location`](interfaces/Location.md)[] #### Parameters | Name | Type | Default value | | :------ | :------ | :------ | | `tagUuidOrName` | ``null`` \| `string` | `null` | +| `query` | ``null`` \| `string` | `null` | #### Returns diff --git a/packages/framework/esm-styleguide/src/pictograms/pictogram-registration.ts b/packages/framework/esm-styleguide/src/pictograms/pictogram-registration.ts index c081591cb..8f859eabe 100644 --- a/packages/framework/esm-styleguide/src/pictograms/pictogram-registration.ts +++ b/packages/framework/esm-styleguide/src/pictograms/pictogram-registration.ts @@ -1,10 +1,11 @@ import { addSvg } from '../svg-utils'; +import appointments from './svgs/Appointments-2.svg'; import home from './svgs/Facility-2.svg'; +import inPatient from './svgs/in-patient.svg'; import laboratory from './svgs/Labs.svg'; -import appointments from './svgs/Appointments-2.svg'; import patientLists from './svgs/Patient Management_Patients.svg'; -import serviceQueues from './svgs/service-queues.svg'; import patientRegistration from './svgs/registration.svg'; +import serviceQueues from './svgs/service-queues.svg'; export function setupPictograms() { addSvg('omrs-pict-home', home); @@ -13,4 +14,5 @@ export function setupPictograms() { addSvg('omrs-pict-appointments', appointments); addSvg('omrs-pict-service-queues', serviceQueues); addSvg('omrs-pict-registration', patientRegistration); + addSvg('omrs-pict-in-patient', inPatient); } diff --git a/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx b/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx index cf499e5c1..a96de688e 100644 --- a/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx +++ b/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx @@ -15,7 +15,7 @@ export type SvgPictogramProps = { }; /** - * This is a utility type for custom pictograms + * This is a utility type for custom pictograms. Please maintain alphabetical order when adding new pictograms for readability. */ export const Pictogram = memo( forwardRef(function Pictogram({ pictogram, pictogramProps }, ref) { @@ -33,27 +33,21 @@ export const Pictogram = memo( }), ); -export const HomePictogram = memo( - forwardRef(function HomePictogram(props, ref) { - return ; - }), -); - -export const PatientListsPictogram = memo( - forwardRef(function PatientListsPictogram(props, ref) { - return ; - }), -); - export const AppointmentsPictogram = memo( forwardRef(function AppointmentsPictogram(props, ref) { return ; }), ); -export const ServiceQueuesPictogram = memo( - forwardRef(function ServiceQueuesPictogram(props, ref) { - return ; +export const HomePictogram = memo( + forwardRef(function HomePictogram(props, ref) { + return ; + }), +); + +export const InPatientPictogram = memo( + forwardRef(function InPatientPictogram(props, ref) { + return ; }), ); @@ -63,8 +57,20 @@ export const LaboratoryPictogram = memo( }), ); +export const PatientListsPictogram = memo( + forwardRef(function PatientListsPictogram(props, ref) { + return ; + }), +); + export const RegistrationPictogram = memo( forwardRef(function RegistrationPictogram(props, ref) { return ; }), ); + +export const ServiceQueuesPictogram = memo( + forwardRef(function ServiceQueuesPictogram(props, ref) { + return ; + }), +);