@ministryofjustice/frontend 7.1.0 → 8.0.0-beta.1

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.
@@ -341,7 +341,7 @@ function createAll(Component, config, scopeOrOptions) {
341
341
  *
342
342
  * {@link https://github.com/ministryofjustice/moj-frontend/releases}
343
343
  */
344
- const version = '7.1.0';
344
+ const version = '8.0.0-beta.1';
345
345
 
346
346
  class AddAnother extends Component {
347
347
  /**
@@ -1311,8 +1311,8 @@ class DatePicker extends ConfigurableComponent {
1311
1311
  }
1312
1312
  setExcludedDays() {
1313
1313
  if (this.config.excludedDays) {
1314
- // lowercase and arrange dayLabels to put indexOf sunday == 0 for comparison
1315
- // with getDay() function
1314
+ /* lowercase and arrange dayLabels to put indexOf sunday == 0 for comparison
1315
+ with getDay() function */
1316
1316
  const weekDays = this.dayLabels.map(item => item.toLowerCase());
1317
1317
  if (this.config.weekStartDay === 'monday') {
1318
1318
  weekDays.unshift(weekDays.pop());
@@ -1338,8 +1338,6 @@ class DatePicker extends ConfigurableComponent {
1338
1338
  * @returns {boolean}
1339
1339
  */
1340
1340
  isExcludedDate(date) {
1341
- // This comparison does not work correctly - it will exclude the mindate itself
1342
- // see: https://github.com/ministryofjustice/moj-frontend/issues/923
1343
1341
  if (this.minDate && this.minDate > date) {
1344
1342
  return true;
1345
1343
  }
@@ -1871,9 +1869,11 @@ class PdsHeader extends Component {
1871
1869
  $servicesToggle.removeAttribute('hidden');
1872
1870
  this.closeTabs([[$userToggle, $userMenu], [$servicesToggle, $servicesMenu]]);
1873
1871
  $userToggle.addEventListener('click', _event => {
1872
+ this.closeTabs([[$servicesToggle, $servicesMenu]]);
1874
1873
  this.toggleMenu($userToggle, $userMenu);
1875
1874
  });
1876
1875
  $servicesToggle.addEventListener('click', _event => {
1876
+ this.closeTabs([[$userToggle, $userMenu]]);
1877
1877
  this.toggleMenu($servicesToggle, $servicesMenu);
1878
1878
  });
1879
1879
  }