@ministryofjustice/frontend 8.0.0-beta.1 → 8.0.0
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 +5 -3
- package/moj/all.bundle.js.map +1 -1
- package/moj/all.bundle.mjs +5 -3
- 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 +4 -2
- package/moj/components/date-picker/date-picker.bundle.js.map +1 -1
- package/moj/components/date-picker/date-picker.bundle.mjs +4 -2
- package/moj/components/date-picker/date-picker.bundle.mjs.map +1 -1
- package/moj/components/date-picker/date-picker.mjs +4 -2
- package/moj/components/date-picker/date-picker.mjs.map +1 -1
- package/moj/components/domain-specific/probation/header/README.md +3 -1
- package/moj/components/domain-specific/probation/header/template.njk +2 -2
- package/moj/components/header/_header.scss +4 -0
- package/moj/components/header/_header.scss.map +1 -1
- package/moj/components/pagination/_pagination.scss +8 -105
- package/moj/components/pagination/_pagination.scss.map +1 -1
- package/moj/components/pagination/template.njk +55 -28
- package/moj/core/_moj-frontend-properties.scss +1 -1
- package/moj/core/_moj-frontend-properties.scss.map +1 -1
- package/moj/moj-frontend.min.css +1 -1
- package/moj/moj-frontend.min.css.map +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
|
@@ -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 = '8.0.0
|
|
344
|
+
const version = '8.0.0';
|
|
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
|
-
|
|
1315
|
-
|
|
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,6 +1338,8 @@ 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
|
|
1341
1343
|
if (this.minDate && this.minDate > date) {
|
|
1342
1344
|
return true;
|
|
1343
1345
|
}
|