@openmrs/esm-appointments-app 5.2.2-pre.2628 → 5.2.2-pre.2638

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.
@@ -80,10 +80,10 @@
80
80
  "initial": true,
81
81
  "entry": true,
82
82
  "recorded": false,
83
- "size": 4544764,
83
+ "size": 4545133,
84
84
  "sizes": {
85
85
  "consume-shared": 252,
86
- "javascript": 4523840,
86
+ "javascript": 4524209,
87
87
  "share-init": 252,
88
88
  "runtime": 20420
89
89
  },
@@ -100,7 +100,7 @@
100
100
  "auxiliaryFiles": [
101
101
  "main.js.map"
102
102
  ],
103
- "hash": "2badf0db23be8635",
103
+ "hash": "8ca36fc7fce574c4",
104
104
  "childrenByOrder": {}
105
105
  },
106
106
  {
@@ -396,9 +396,9 @@
396
396
  "initial": false,
397
397
  "entry": false,
398
398
  "recorded": false,
399
- "size": 480471,
399
+ "size": 480840,
400
400
  "sizes": {
401
- "javascript": 480303,
401
+ "javascript": 480672,
402
402
  "consume-shared": 168
403
403
  },
404
404
  "names": [],
@@ -412,7 +412,7 @@
412
412
  "auxiliaryFiles": [
413
413
  "636.js.map"
414
414
  ],
415
- "hash": "d8eef044874f00d6",
415
+ "hash": "29e81b62ef741b77",
416
416
  "childrenByOrder": {}
417
417
  },
418
418
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"}},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"early-appointments-panel","component":"earlyAppointments"}],"version":"5.2.2-pre.2628"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"home-appointments","slot":"homepage-widgets-slot","component":"homeAppointments","order":1},{"name":"clinical-appointments-dashboard-link","slot":"homepage-dashboard-slot","component":"appointmentsDashboardLink","meta":{"name":"appointments","slot":"clinical-appointments-dashboard-slot","title":"Appointments"}},{"component":"root","name":"clinical-appointments-dashboard","slot":"clinical-appointments-dashboard-slot"},{"name":"appointments-calendar-dashboard-link","slot":"calendar-dashboard-slot","component":"appointmentsCalendarDashboardLink"},{"name":"check-in-appointment-modal","slot":"todays-appointment-slot","component":"checkInModal"},{"name":"todays-appointments-dashboard","slot":"todays-appointment-slot","component":"homeAppointments"},{"name":"expected-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"checked-in-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"completed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"missed-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"cancelled-appointments-panel","slot":"scheduled-appointments-panels-slot","component":"appointmentsByStatus"},{"name":"early-appointments-panel","component":"earlyAppointments"}],"version":"5.2.2-pre.2638"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-appointments-app",
3
- "version": "5.2.2-pre.2628",
3
+ "version": "5.2.2-pre.2638",
4
4
  "description": "Appointments front-end module for the OpenMRS SPA",
5
5
  "browser": "dist/openmrs-esm-appointments-app.js",
6
6
  "main": "src/index.ts",
@@ -1,13 +1,13 @@
1
- import React, { useRef, useState } from 'react';
1
+ import React, { useRef } from 'react';
2
+ import dayjs from 'dayjs';
2
3
  import { useTranslation } from 'react-i18next';
4
+ import { DatePicker, DatePickerInput, Dropdown, Layer } from '@carbon/react';
3
5
  import { Location } from '@carbon/react/icons';
4
6
  import { useSession } from '@openmrs/esm-framework';
5
- import AppointmentsIllustration from './appointments-illustration.component';
6
- import styles from './appointments-header.scss';
7
- import { DatePicker, DatePickerInput, Dropdown, Layer } from '@carbon/react';
8
- import dayjs from 'dayjs';
9
7
  import { changeStartDate, useAppointmentDate } from '../helpers';
10
8
  import { useAppointmentServices } from '../hooks/useAppointmentService';
9
+ import AppointmentsIllustration from './appointments-illustration.component';
10
+ import styles from './appointments-header.scss';
11
11
 
12
12
  interface AppointmentHeaderProps {
13
13
  title: string;
@@ -43,7 +43,7 @@ const AppointmentsHeader: React.FC<AppointmentHeaderProps> = ({ title, onChange
43
43
  datePickerType="single">
44
44
  <DatePickerInput
45
45
  style={{ cursor: 'pointer', backgroundColor: 'transparent', border: 'none', maxWidth: '10rem' }}
46
- id="date-picker-calendar-id"
46
+ id="appointment-date-picker"
47
47
  placeholder="DD-MMM-YYYY"
48
48
  labelText=""
49
49
  type="text"
@@ -51,24 +51,23 @@ const AppointmentsHeader: React.FC<AppointmentHeaderProps> = ({ title, onChange
51
51
  />
52
52
  </DatePicker>
53
53
  </div>
54
- {typeof onChange === 'function' && (
55
- <div className={styles.dropdownContainer}>
56
- <Layer>
57
- <Dropdown
58
- aria-label="Select service type"
59
- id="selectServicesDropDown"
60
- items={[{ name: 'All', uuid: '' }, ...serviceTypes]}
61
- itemToString={(item) => (item ? item.name : '')}
62
- label={t('selectServiceType', 'Select service type')}
63
- titleText={t('view', 'View')}
64
- type="inline"
65
- size="sm"
66
- direction="bottom"
67
- onChange={({ selectedItem }) => onChange(selectedItem?.uuid)}
68
- />
69
- </Layer>
70
- </div>
71
- )}
54
+ <div className={styles.dropdownContainer}>
55
+ {typeof onChange === 'function' && (
56
+ <Dropdown
57
+ className={styles.dropdown}
58
+ aria-label="Select service type"
59
+ id="serviceDropdown"
60
+ items={[{ name: 'All', uuid: '' }, ...serviceTypes]}
61
+ itemToString={(item) => (item ? item.name : '')}
62
+ label={t('selectServiceType', 'Select service type')}
63
+ type="inline"
64
+ size="sm"
65
+ direction="bottom"
66
+ titleText={t('view', 'View')}
67
+ onChange={({ selectedItem }) => onChange(selectedItem?.uuid)}
68
+ />
69
+ )}
70
+ </div>
72
71
  </div>
73
72
  </div>
74
73
  );
@@ -46,7 +46,9 @@
46
46
 
47
47
  .dropdownContainer {
48
48
  display: flex;
49
+ align-items: center;
49
50
  justify-content: flex-end;
51
+ margin-top: 0.25rem;
50
52
  }
51
53
 
52
54
  .value {
@@ -70,6 +72,17 @@
70
72
  }
71
73
  }
72
74
 
75
+ .dropdown {
76
+ :global(.cds--list-box__field) {
77
+ width: 14rem;
78
+ overflow: hidden;
79
+ }
80
+
81
+ :global(.cds--dropdown--inline .cds--list-box__menu) {
82
+ left: -4rem;
83
+ }
84
+ }
85
+
73
86
  // Overriding styles for RTL support
74
87
  html[dir='rtl'] {
75
88
  .date-and-location {