@nnc-digital/nnc-design-system 1.0.0-beta18 → 1.0.0-beta19

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.js CHANGED
@@ -31637,8 +31637,15 @@ var RadioCheckboxInput = function (_a) {
31637
31637
  React__default.default.createElement(CategoryInputLabel, { "$isChecked": checked, htmlFor: id, "$singleSelection": singleSelection }, label))));
31638
31638
  };
31639
31639
 
31640
+ var NoResultsTemplate = function (_a) {
31641
+ var _b = _a.contentType, contentType = _b === void 0 ? 'results' : _b;
31642
+ return (React__default.default.createElement("div", { dangerouslySetInnerHTML: {
31643
+ __html: "\n <p>\n <span>We couldn't find any ".concat(contentType, " on our directory that match your search.</span>\n </p>\n <p>\n <span>You can try again with a different search term or remove the postcode to view ").concat(contentType === 'events' ? 'events' : 'support', " available across all of North Northamptonshire.</span>\n </p>\n <p>\n <span>You might also find what you need in one of our popular support categories:</span>\n </p>\n <ul>\n <li data-list-item-id=\"e22c4dc39c92119d26e70c62385849b39\">\n <a href=\"https://www.northnorthants.gov.uk/directory/support-offer?page=1&amp;provider_category=204\"><span>Children and families</span></a>\n </li>\n <li data-list-item-id=\"e4433aae6c1c132dc567a0033d721f23a\">\n <a href=\"https://www.northnorthants.gov.uk/directory/support-offer?page=1&amp;provider_category=126\"><span>Community groups</span></a>\n </li>\n <li data-list-item-id=\"e8258a989ae79b013fa3ddb0757487755\">\n <a href=\"https://www.northnorthants.gov.uk/directory/support-offer?page=1&amp;provider_category=162\"><span>Food support</span></a>\n </li>\n <li data-list-item-id=\"e2a5c68c4edd91b64635095e52910c320\">\n <a href=\"https://www.northnorthants.gov.uk/directory/support-offer?page=1&amp;provider_category=135\"><span>Housing</span></a>\n </li>\n <li data-list-item-id=\"e13fe4ab6d0899849a45a12873b28cdc7\">\n <a href=\"https://www.northnorthants.gov.uk/directory/support-offer?page=1&amp;provider_category=195\"><span>Mental health and wellbeing</span></a>\n </li>\n <li data-list-item-id=\"eb6c0dce58edbff50832aa0b10a7583d1\">\n <a href=\"https://www.northnorthants.gov.uk/directory/support-offer?page=1&amp;provider_category=141\"><span>Money, benefits and debt</span></a>\n </li>\n <li data-list-item-id=\"e4d9919952839158bd6c8428d3f1618d9\">\n <a href=\"https://www.northnorthants.gov.uk/directory/support-offer?page=1&amp;provider_category=147\"><span>Physical health and disabilities</span></a>\n </li>\n <li data-list-item-id=\"e75ec6e837465b16129ecb4e684de5916\">\n <a href=\"https://www.northnorthants.gov.uk/directory/support-offer?page=1&amp;provider_category=198\"><span>Sports, leisure and wellbeing</span></a>\n </li>\n <li data-list-item-id=\"e041fb0b546f99e164806e88766dafde2\">\n <a href=\"https://www.northnorthants.gov.uk/directory/support-offer?page=1&amp;provider_category=150\"><span>Work, education and volunteering</span></a>\n </li>\n </ul>\n ")
31644
+ } }));
31645
+ };
31646
+
31640
31647
  var DirectoryServiceList = function (_a) {
31641
- var directoryPath = _a.directoryPath, shortListPath = _a.shortListPath, services = _a.services, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.proximity, proximity = _c === void 0 ? 2 : _c, _d = _a.showPostcodeSearch, showPostcodeSearch = _d === void 0 ? true : _d, _e = _a.postcode, postcode = _e === void 0 ? '' : _e, setPostcode = _a.setPostcode, _f = _a.totalResults, totalResults = _f === void 0 ? 0 : _f, _g = _a.pageNumber, pageNumber = _g === void 0 ? 1 : _g, setPageNumber = _a.setPageNumber, _h = _a.perPage, perPage = _h === void 0 ? 5 : _h, _j = _a.extractLength, extractLength = _j === void 0 ? 300 : _j, _k = _a.categories, categories = _k === void 0 ? [] : _k, setCategories = _a.setCategories, _l = _a.minimumAge, minimumAge = _l === void 0 ? undefined : _l, setMinimumAge = _a.setMinimumAge, _m = _a.maximumAge, maximumAge = _m === void 0 ? undefined : _m, setMaximumAge = _a.setMaximumAge, _o = _a.mapCenter, mapCenter = _o === void 0 ? '52.40410666556486,-0.7237065995821512' : _o, _p = _a.mapZoom, mapZoom = _p === void 0 ? 9 : _p, _q = _a.isLoading, isLoading = _q === void 0 ? false : _q, _r = _a.ageInMonths, ageInMonths = _r === void 0 ? false : _r, _s = _a.hasDocuments, hasDocuments = _s === void 0 ? false : _s, _t = _a.isError, isError = _t === void 0 ? false : _t;
31648
+ var directoryPath = _a.directoryPath, shortListPath = _a.shortListPath, services = _a.services, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.proximity, proximity = _c === void 0 ? 2 : _c, _d = _a.showPostcodeSearch, showPostcodeSearch = _d === void 0 ? true : _d, _e = _a.postcode, postcode = _e === void 0 ? '' : _e, setPostcode = _a.setPostcode, _f = _a.totalResults, totalResults = _f === void 0 ? 0 : _f, _g = _a.pageNumber, pageNumber = _g === void 0 ? 1 : _g, setPageNumber = _a.setPageNumber, _h = _a.perPage, perPage = _h === void 0 ? 5 : _h, _j = _a.extractLength, extractLength = _j === void 0 ? 300 : _j, _k = _a.categories, categories = _k === void 0 ? [] : _k, setCategories = _a.setCategories, _l = _a.minimumAge, minimumAge = _l === void 0 ? undefined : _l, setMinimumAge = _a.setMinimumAge, _m = _a.maximumAge, maximumAge = _m === void 0 ? undefined : _m, setMaximumAge = _a.setMaximumAge, _o = _a.mapCenter, mapCenter = _o === void 0 ? '52.40410666556486,-0.7237065995821512' : _o, _p = _a.mapZoom, mapZoom = _p === void 0 ? 9 : _p, _q = _a.isLoading, isLoading = _q === void 0 ? false : _q, _r = _a.ageInMonths, ageInMonths = _r === void 0 ? false : _r, _s = _a.hasDocuments, hasDocuments = _s === void 0 ? false : _s, _t = _a.isError, isError = _t === void 0 ? false : _t, noResultsContent = _a.noResultsContent;
31642
31649
  var _u = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-accordion"), []), accordions = _u[0], setAccordions = _u[1];
31643
31650
  var _v = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-accordion-all"), true), openAll = _v[0], setOpenAll = _v[1];
31644
31651
  var _w = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-show-map"), false), showMap = _w[0], setShowMap = _w[1];
@@ -31839,7 +31846,7 @@ var DirectoryServiceList = function (_a) {
31839
31846
  " to ",
31840
31847
  to,
31841
31848
  " out of ",
31842
- totalResults.toLocaleString())) : (React__default.default.createElement(ResultInfo$1, null, "No results found")),
31849
+ totalResults.toLocaleString())) : (React__default.default.createElement(ResultInfo$1, null, noResultsContent ? (React__default.default.createElement("div", { dangerouslySetInnerHTML: { __html: noResultsContent } })) : (React__default.default.createElement(NoResultsTemplate, { contentType: "results" })))),
31843
31850
  React__default.default.createElement(FavouritesContainer, null,
31844
31851
  (services === null || services === void 0 ? void 0 : services.length) > 0 && (React__default.default.createElement(MapToggle, { type: "button", size: "large", onClick: function (e) { return setShowMap(!showMap); } }, showMap ? "Hide Map" : "Show Map")),
31845
31852
  React__default.default.createElement(Favourites, { href: shortListPath },
@@ -34049,7 +34056,7 @@ var Event = function (_a) {
34049
34056
  });
34050
34057
 
34051
34058
  var EventList = function (_a) {
34052
- var eventsPath = _a.eventsPath, shortListPath = _a.shortListPath, events = _a.events, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.proximity, proximity = _c === void 0 ? 2 : _c, _d = _a.showPostcodeSearch, showPostcodeSearch = _d === void 0 ? true : _d, _e = _a.postcode, postcode = _e === void 0 ? '' : _e, setPostcode = _a.setPostcode, _f = _a.totalResults, totalResults = _f === void 0 ? 0 : _f, _g = _a.pageNumber, pageNumber = _g === void 0 ? 1 : _g, setPageNumber = _a.setPageNumber, _h = _a.perPage, perPage = _h === void 0 ? 5 : _h, _j = _a.extractLength, extractLength = _j === void 0 ? 300 : _j, _k = _a.eventTypes, eventTypes = _k === void 0 ? [] : _k, setEventTypes = _a.setEventTypes, _l = _a.audiences, audiences = _l === void 0 ? [] : _l, setAudiences = _a.setAudiences, selectedMonth = _a.selectedMonth, setSelectedMonth = _a.setSelectedMonth, selectedYear = _a.selectedYear, setSelectedYear = _a.setSelectedYear, _m = _a.mapCenter, mapCenter = _m === void 0 ? '52.40410666556486,-0.7237065995821512' : _m, _o = _a.mapZoom, mapZoom = _o === void 0 ? 9 : _o, _p = _a.isLoading, isLoading = _p === void 0 ? false : _p, _q = _a.isError, isError = _q === void 0 ? false : _q; _a.hideOldEvents;
34059
+ var eventsPath = _a.eventsPath, shortListPath = _a.shortListPath, events = _a.events, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.proximity, proximity = _c === void 0 ? 2 : _c, _d = _a.showPostcodeSearch, showPostcodeSearch = _d === void 0 ? true : _d, _e = _a.postcode, postcode = _e === void 0 ? '' : _e, setPostcode = _a.setPostcode, _f = _a.totalResults, totalResults = _f === void 0 ? 0 : _f, _g = _a.pageNumber, pageNumber = _g === void 0 ? 1 : _g, setPageNumber = _a.setPageNumber, _h = _a.perPage, perPage = _h === void 0 ? 5 : _h, _j = _a.extractLength, extractLength = _j === void 0 ? 300 : _j, _k = _a.eventTypes, eventTypes = _k === void 0 ? [] : _k, setEventTypes = _a.setEventTypes, _l = _a.audiences, audiences = _l === void 0 ? [] : _l, setAudiences = _a.setAudiences, selectedMonth = _a.selectedMonth, setSelectedMonth = _a.setSelectedMonth, selectedYear = _a.selectedYear, setSelectedYear = _a.setSelectedYear, _m = _a.mapCenter, mapCenter = _m === void 0 ? '52.40410666556486,-0.7237065995821512' : _m, _o = _a.mapZoom, mapZoom = _o === void 0 ? 9 : _o, _p = _a.isLoading, isLoading = _p === void 0 ? false : _p, _q = _a.isError, isError = _q === void 0 ? false : _q; _a.hideOldEvents; var noResultsContent = _a.noResultsContent;
34053
34060
  var _s = useLocalStorage("".concat(eventsPath.replace(/\//g, ''), "-accordion"), []), accordions = _s[0], setAccordions = _s[1];
34054
34061
  var _t = useLocalStorage("".concat(eventsPath.replace(/\//g, ''), "-accordion-all"), true), openAll = _t[0], setOpenAll = _t[1];
34055
34062
  var _u = useLocalStorage("".concat(eventsPath.replace(/\//g, ''), "-show-map"), false), showMap = _u[0], setShowMap = _u[1];
@@ -34293,7 +34300,7 @@ var EventList = function (_a) {
34293
34300
  " to ",
34294
34301
  to,
34295
34302
  " out of ",
34296
- totalResults.toLocaleString())) : (React__default.default.createElement(ResultInfo$1, null, "No events found")),
34303
+ totalResults.toLocaleString())) : (React__default.default.createElement(ResultInfo$1, null, noResultsContent ? (React__default.default.createElement("div", { dangerouslySetInnerHTML: { __html: noResultsContent } })) : (React__default.default.createElement(NoResultsTemplate, { contentType: "events" })))),
34297
34304
  React__default.default.createElement(FavouritesContainer, null,
34298
34305
  (events === null || events === void 0 ? void 0 : events.length) > 0 && (React__default.default.createElement(MapToggle, { type: "button", size: "large", onClick: function (e) { return setShowMap(!showMap); } }, showMap ? "Hide Map" : "Show Map")),
34299
34306
  React__default.default.createElement(Favourites, { href: shortListPath },