northants-design-system 0.4.7 → 0.4.8
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 +18 -14
- package/build/index.esm.js.map +1 -1
- package/build/index.js +18 -14
- package/build/index.js.map +1 -1
- package/build/library/directory/DirectoryDocumentList/DirectoryDocumentList.types.d.ts +4 -0
- package/build/library/directory/DirectoryServiceList/DirectoryServiceList.types.d.ts +4 -0
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -29893,17 +29893,17 @@ var RadioCheckboxInput = function (_a) {
|
|
|
29893
29893
|
};
|
|
29894
29894
|
|
|
29895
29895
|
var DirectoryServiceList = function (_a) {
|
|
29896
|
-
var directoryPath = _a.directoryPath, shortListPath = _a.shortListPath, services = _a.services, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.postcode, postcode = _c === void 0 ? '' : _c, setPostcode = _a.setPostcode, _d = _a.totalResults, totalResults = _d === void 0 ? 0 : _d, _e = _a.pageNumber, pageNumber = _e === void 0 ? 1 : _e, setPageNumber = _a.setPageNumber, _f = _a.perPage, perPage = _f === void 0 ? 5 : _f, _g = _a.extractLength, extractLength = _g === void 0 ? 300 : _g, _h = _a.categories, categories = _h === void 0 ? [] : _h, setCategories = _a.setCategories, _j = _a.minimumAge, minimumAge = _j === void 0 ? undefined : _j, setMinimumAge = _a.setMinimumAge, _k = _a.maximumAge, maximumAge = _k === void 0 ? undefined : _k, setMaximumAge = _a.setMaximumAge, _l = _a.mapCenter, mapCenter = _l === void 0 ? '52.23555414368587,-0.8957390701320571' : _l, _m = _a.mapZoom, mapZoom = _m === void 0 ? 9 : _m, _o = _a.isLoading, isLoading = _o === void 0 ? false : _o, _p = _a.ageInMonths, ageInMonths = _p === void 0 ? false : _p, _q = _a.hasDocuments, hasDocuments = _q === void 0 ? false : _q;
|
|
29897
|
-
var
|
|
29898
|
-
var
|
|
29899
|
-
var
|
|
29900
|
-
var
|
|
29901
|
-
var
|
|
29902
|
-
var
|
|
29903
|
-
var
|
|
29904
|
-
var
|
|
29896
|
+
var directoryPath = _a.directoryPath, shortListPath = _a.shortListPath, services = _a.services, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.postcode, postcode = _c === void 0 ? '' : _c, setPostcode = _a.setPostcode, _d = _a.totalResults, totalResults = _d === void 0 ? 0 : _d, _e = _a.pageNumber, pageNumber = _e === void 0 ? 1 : _e, setPageNumber = _a.setPageNumber, _f = _a.perPage, perPage = _f === void 0 ? 5 : _f, _g = _a.extractLength, extractLength = _g === void 0 ? 300 : _g, _h = _a.categories, categories = _h === void 0 ? [] : _h, setCategories = _a.setCategories, _j = _a.minimumAge, minimumAge = _j === void 0 ? undefined : _j, setMinimumAge = _a.setMinimumAge, _k = _a.maximumAge, maximumAge = _k === void 0 ? undefined : _k, setMaximumAge = _a.setMaximumAge, _l = _a.mapCenter, mapCenter = _l === void 0 ? '52.23555414368587,-0.8957390701320571' : _l, _m = _a.mapZoom, mapZoom = _m === void 0 ? 9 : _m, _o = _a.isLoading, isLoading = _o === void 0 ? false : _o, _p = _a.ageInMonths, ageInMonths = _p === void 0 ? false : _p, _q = _a.hasDocuments, hasDocuments = _q === void 0 ? false : _q, _r = _a.isError, isError = _r === void 0 ? false : _r;
|
|
29897
|
+
var _s = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-accordion"), []), accordions = _s[0], setAccordions = _s[1];
|
|
29898
|
+
var _t = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-accordion-all"), true), openAll = _t[0], setOpenAll = _t[1];
|
|
29899
|
+
var _u = useLocalStorage("".concat(directoryPath.replace(/\//g, ''), "-show-map"), false), showMap = _u[0], setShowMap = _u[1];
|
|
29900
|
+
var _v = useState(false), showFilters = _v[0], setShowFilters = _v[1];
|
|
29901
|
+
var _w = useDirectoryShortListContext(), _x = _w.favourites, favourites = _x.favourites; _x.setFavourites; _w.toggleFavourites; _w.isFavourite;
|
|
29902
|
+
var _y = useState(false), notServer = _y[0], setNotServer = _y[1];
|
|
29903
|
+
var _z = useState(search), searchTerm = _z[0], setSearchTerm = _z[1];
|
|
29904
|
+
var _0 = useState(postcode), postcodeSearch = _0[0], setPostcodeSearch = _0[1];
|
|
29905
29905
|
var themeContext = useContext(ThemeContext);
|
|
29906
|
-
var
|
|
29906
|
+
var _1 = useState(false), filtersActive = _1[0], setFiltersActive = _1[1];
|
|
29907
29907
|
useEffect(function () {
|
|
29908
29908
|
setNotServer(true);
|
|
29909
29909
|
setFiltersActive(hasActiveFilters());
|
|
@@ -30078,7 +30078,9 @@ var DirectoryServiceList = function (_a) {
|
|
|
30078
30078
|
category.options.map(function (taxonomy) { return (React.createElement(Category$2, { key: taxonomy.id },
|
|
30079
30079
|
React.createElement(RadioCheckboxInput, { name: taxonomy.vocabulary, value: taxonomy.id, label: taxonomy.name, singleSelection: category.singleSelection, checked: taxonomy.checked, onChange: function (e) { return optionChecked(e, categoryIndex, category.singleSelection); } }))); }))))); })))))),
|
|
30080
30080
|
React.createElement(Column, { small: "full", medium: "two-thirds", large: "two-thirds" },
|
|
30081
|
-
React.createElement(Row$1, null,
|
|
30081
|
+
React.createElement(Row$1, null, isError ? (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
30082
|
+
React.createElement(AlertBannerService, null,
|
|
30083
|
+
React.createElement("p", null, "Sorry, there was a problem fetching results. Please try again later.")))) : isLoading ? (React.createElement(LoadingContainer$1, null,
|
|
30082
30084
|
React.createElement(LoadingSpinner, null),
|
|
30083
30085
|
React.createElement("p", null, "Loading"))) : (React.createElement(React.Fragment, null,
|
|
30084
30086
|
React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
@@ -31757,8 +31759,8 @@ const LoadingContainer = styled.div`
|
|
|
31757
31759
|
`;
|
|
31758
31760
|
|
|
31759
31761
|
var DirectoryDocumentList = function (_a) {
|
|
31760
|
-
var directoryPath = _a.directoryPath, documents = _a.documents, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.totalResults, totalResults = _c === void 0 ? 0 : _c, _d = _a.pageNumber, pageNumber = _d === void 0 ? 1 : _d, setPageNumber = _a.setPageNumber, _e = _a.perPage, perPage = _e === void 0 ? 10 : _e, categories = _a.categories, setCategories = _a.setCategories, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f;
|
|
31761
|
-
var
|
|
31762
|
+
var directoryPath = _a.directoryPath, documents = _a.documents, _b = _a.search, search = _b === void 0 ? '' : _b, setSearch = _a.setSearch, _c = _a.totalResults, totalResults = _c === void 0 ? 0 : _c, _d = _a.pageNumber, pageNumber = _d === void 0 ? 1 : _d, setPageNumber = _a.setPageNumber, _e = _a.perPage, perPage = _e === void 0 ? 10 : _e, categories = _a.categories, setCategories = _a.setCategories, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.isError, isError = _g === void 0 ? false : _g;
|
|
31763
|
+
var _h = useState(search), searchTerm = _h[0], setSearchTerm = _h[1];
|
|
31762
31764
|
var submitSearch = function (e) {
|
|
31763
31765
|
e.preventDefault();
|
|
31764
31766
|
setSearch(searchTerm);
|
|
@@ -31821,7 +31823,9 @@ var DirectoryDocumentList = function (_a) {
|
|
|
31821
31823
|
React.createElement(RadioCheckboxInput, { name: taxonomy.vocabulary, value: taxonomy.id, label: taxonomy.name, singleSelection: category.singleSelection, checked: taxonomy.checked, onChange: function (e) { return optionChecked(e, categoryIndex, category.singleSelection); } }))); })))); }))),
|
|
31822
31824
|
React.createElement(Column, { small: "full", medium: "two-thirds", large: "two-thirds" },
|
|
31823
31825
|
React.createElement(Row$1, null,
|
|
31824
|
-
|
|
31826
|
+
isError ? (React.createElement(Column, { small: "full", medium: "full", large: "full" },
|
|
31827
|
+
React.createElement(AlertBannerService, null,
|
|
31828
|
+
React.createElement("p", null, "Sorry, there was a problem fetching results. Please try again later.")))) : isLoading ? (React.createElement(LoadingContainer, null,
|
|
31825
31829
|
React.createElement(LoadingSpinner, null),
|
|
31826
31830
|
React.createElement("p", null, "Loading"))) : (React.createElement(React.Fragment, null,
|
|
31827
31831
|
React.createElement(Column, { small: "full", medium: "full", large: "full" }, (documents === null || documents === void 0 ? void 0 : documents.length) > 0 ? (React.createElement(ResultInfo, null,
|