@nnc-digital/nnc-design-system 0.4.24 → 0.4.25
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/build/index.esm.js +5 -3
- package/build/index.esm.js.map +1 -1
- package/build/index.js +5 -3
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -4507,11 +4507,13 @@ var BinCollection = function (_a) {
|
|
|
4507
4507
|
}
|
|
4508
4508
|
return sortedTitles.map(function (title, index) {
|
|
4509
4509
|
var apiTitlesForThisType = Object.keys(calendarEvents).filter(function (apiTitle) { return formatTitle(apiTitle) === title; });
|
|
4510
|
+
var dates = apiTitlesForThisType.flatMap(function (apiTitle) { return calendarEvents[apiTitle]; })
|
|
4511
|
+
.map(function (date) { return new Date(date).toISOString().split('T')[0]; })
|
|
4512
|
+
.filter(function (date, index, array) { return array.indexOf(date) === index; })
|
|
4513
|
+
.sort(function (a, b) { return new Date(a).getTime() - new Date(b).getTime(); });
|
|
4510
4514
|
return (React.createElement(React.Fragment, { key: "".concat(title, "-").concat(index) },
|
|
4511
4515
|
React.createElement(Heading, { level: 3, text: title }),
|
|
4512
|
-
|
|
4513
|
-
.sort(function (a, b) { return new Date(a).getTime() - new Date(b).getTime(); })
|
|
4514
|
-
.map(function (date) { return (React.createElement("p", null, date.toLocaleDateString('en-GB', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }))); })));
|
|
4516
|
+
dates.map(function (date, index) { return (React.createElement("p", { key: index }, new Date(date).toLocaleDateString('en-GB', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }))); })));
|
|
4515
4517
|
});
|
|
4516
4518
|
})()),
|
|
4517
4519
|
Object.keys(calendarEvents).length > 0 && (React.createElement(FormButton, { size: "small", type: "button", "aria-label": "Reset", text: "Find a different address", onClick: resetForm }))));
|