@ministryofjustice/frontend 5.1.4 → 5.1.5
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/moj/all.bundle.js +12 -9
- package/moj/all.bundle.js.map +1 -1
- package/moj/all.bundle.mjs +12 -9
- package/moj/all.bundle.mjs.map +1 -1
- package/moj/common/moj-frontend-version.mjs +1 -1
- package/moj/components/date-picker/date-picker.bundle.js +9 -6
- package/moj/components/date-picker/date-picker.bundle.js.map +1 -1
- package/moj/components/date-picker/date-picker.bundle.mjs +9 -6
- package/moj/components/date-picker/date-picker.bundle.mjs.map +1 -1
- package/moj/components/date-picker/date-picker.mjs +9 -6
- package/moj/components/date-picker/date-picker.mjs.map +1 -1
- package/moj/components/sortable-table/sortable-table.bundle.js +2 -2
- package/moj/components/sortable-table/sortable-table.bundle.js.map +1 -1
- package/moj/components/sortable-table/sortable-table.bundle.mjs +2 -2
- package/moj/components/sortable-table/sortable-table.bundle.mjs.map +1 -1
- package/moj/components/sortable-table/sortable-table.mjs +2 -2
- package/moj/components/sortable-table/sortable-table.mjs.map +1 -1
- package/moj/core/_moj-frontend-properties.scss +1 -1
- package/moj/moj-frontend.min.css +1 -1
- package/moj/moj-frontend.min.js +1 -1
- package/moj/moj-frontend.min.js.map +1 -1
- package/package.json +1 -1
package/moj/all.bundle.mjs
CHANGED
|
@@ -312,7 +312,7 @@ function createAll(Component, config, createAllOptions) {
|
|
|
312
312
|
*
|
|
313
313
|
* {@link https://github.com/ministryofjustice/moj-frontend/releases}
|
|
314
314
|
*/
|
|
315
|
-
const version = '5.1.
|
|
315
|
+
const version = '5.1.5';
|
|
316
316
|
|
|
317
317
|
class AddAnother extends Component {
|
|
318
318
|
/**
|
|
@@ -1099,7 +1099,9 @@ class DatePicker extends ConfigurableComponent {
|
|
|
1099
1099
|
event.stopPropagation();
|
|
1100
1100
|
}
|
|
1101
1101
|
});
|
|
1102
|
-
document.body.addEventListener('mouseup', event =>
|
|
1102
|
+
document.body.addEventListener('mouseup', event => {
|
|
1103
|
+
this.backgroundClick(event);
|
|
1104
|
+
});
|
|
1103
1105
|
|
|
1104
1106
|
// populates calendar with initial dates, avoids Wave errors about null buttons
|
|
1105
1107
|
this.updateCalendar();
|
|
@@ -1125,9 +1127,10 @@ class DatePicker extends ConfigurableComponent {
|
|
|
1125
1127
|
for (let j = 0; j < 7; j++) {
|
|
1126
1128
|
// create cell (day)
|
|
1127
1129
|
const $cell = document.createElement('td');
|
|
1130
|
+
$row.appendChild($cell);
|
|
1128
1131
|
const $dateButton = document.createElement('button');
|
|
1132
|
+
$dateButton.setAttribute('type', 'button');
|
|
1129
1133
|
$cell.appendChild($dateButton);
|
|
1130
|
-
$row.appendChild($cell);
|
|
1131
1134
|
const calendarDay = new DSCalendarDay($dateButton, dayCount, i, j, this);
|
|
1132
1135
|
this.calendarDays.push(calendarDay);
|
|
1133
1136
|
dayCount++;
|
|
@@ -1159,7 +1162,7 @@ class DatePicker extends ConfigurableComponent {
|
|
|
1159
1162
|
dialogTemplate(titleId) {
|
|
1160
1163
|
return `<div class="moj-datepicker__dialog-header">
|
|
1161
1164
|
<div class="moj-datepicker__dialog-navbuttons">
|
|
1162
|
-
<button class="moj-datepicker__button moj-js-datepicker-prev-year">
|
|
1165
|
+
<button type="button" class="moj-datepicker__button moj-js-datepicker-prev-year">
|
|
1163
1166
|
<span class="govuk-visually-hidden">Previous year</span>
|
|
1164
1167
|
<svg width="44" height="40" viewBox="0 0 44 40" fill="none" fill="none" focusable="false" aria-hidden="true" role="img">
|
|
1165
1168
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.1643 20L28.9572 14.2071L27.5429 12.7929L20.3358 20L27.5429 27.2071L28.9572 25.7929L23.1643 20Z" fill="currentColor"/>
|
|
@@ -1167,7 +1170,7 @@ class DatePicker extends ConfigurableComponent {
|
|
|
1167
1170
|
</svg>
|
|
1168
1171
|
</button>
|
|
1169
1172
|
|
|
1170
|
-
<button class="moj-datepicker__button moj-js-datepicker-prev-month">
|
|
1173
|
+
<button type="button" class="moj-datepicker__button moj-js-datepicker-prev-month">
|
|
1171
1174
|
<span class="govuk-visually-hidden">Previous month</span>
|
|
1172
1175
|
<svg width="44" height="40" viewBox="0 0 44 40" fill="none" focusable="false" aria-hidden="true" role="img">
|
|
1173
1176
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.5729 20L25.7865 14.2071L24.5137 12.7929L18.0273 20L24.5137 27.2071L25.7865 25.7929L20.5729 20Z" fill="currentColor"/>
|
|
@@ -1178,14 +1181,14 @@ class DatePicker extends ConfigurableComponent {
|
|
|
1178
1181
|
<h2 id="${titleId}" class="moj-datepicker__dialog-title moj-js-datepicker-month-year" aria-live="polite">June 2020</h2>
|
|
1179
1182
|
|
|
1180
1183
|
<div class="moj-datepicker__dialog-navbuttons">
|
|
1181
|
-
<button class="moj-datepicker__button moj-js-datepicker-next-month">
|
|
1184
|
+
<button type="button" class="moj-datepicker__button moj-js-datepicker-next-month">
|
|
1182
1185
|
<span class="govuk-visually-hidden">Next month</span>
|
|
1183
1186
|
<svg width="44" height="40" viewBox="0 0 44 40" fill="none" focusable="false" aria-hidden="true" role="img">
|
|
1184
1187
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.4271 20L18.2135 14.2071L19.4863 12.7929L25.9727 20L19.4863 27.2071L18.2135 25.7929L23.4271 20Z" fill="currentColor"/>
|
|
1185
1188
|
</svg>
|
|
1186
1189
|
</button>
|
|
1187
1190
|
|
|
1188
|
-
<button class="moj-datepicker__button moj-js-datepicker-next-year">
|
|
1191
|
+
<button type="button" class="moj-datepicker__button moj-js-datepicker-next-year">
|
|
1189
1192
|
<span class="govuk-visually-hidden">Next year</span>
|
|
1190
1193
|
<svg width="44" height="40" viewBox="0 0 44 40" fill="none" fill="none" focusable="false" aria-hidden="true" role="img">
|
|
1191
1194
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.8357 20L15.0428 14.2071L16.4571 12.7929L23.6642 20L16.4571 27.2071L15.0428 25.7929L20.8357 20Z" fill="currentColor"/>
|
|
@@ -3118,10 +3121,10 @@ class SortableTable extends ConfigurableComponent {
|
|
|
3118
3121
|
this.$upArrow = `<svg width="22" height="22" focusable="false" aria-hidden="true" role="img" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3119
3122
|
<path d="M6.5625 15.5L11 6.63125L15.4375 15.5H6.5625Z" fill="currentColor"/>
|
|
3120
3123
|
</svg>`;
|
|
3121
|
-
this.$downArrow = `<svg width="22" height="22" focusable="false" aria-hidden="true" role="img"
|
|
3124
|
+
this.$downArrow = `<svg width="22" height="22" focusable="false" aria-hidden="true" role="img" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3122
3125
|
<path d="M15.4375 7L11 15.8687L6.5625 7L15.4375 7Z" fill="currentColor"/>
|
|
3123
3126
|
</svg>`;
|
|
3124
|
-
this.$upDownArrow = `<svg width="22" height="22" focusable="false" aria-hidden="true" role="img"
|
|
3127
|
+
this.$upDownArrow = `<svg width="22" height="22" focusable="false" aria-hidden="true" role="img" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3125
3128
|
<path d="M8.1875 9.5L10.9609 3.95703L13.7344 9.5H8.1875Z" fill="currentColor"/>
|
|
3126
3129
|
<path d="M13.7344 12.0781L10.9609 17.6211L8.1875 12.0781H13.7344Z" fill="currentColor"/>
|
|
3127
3130
|
</svg>`;
|