@civicactions/cmsds-open-data-components 2.0.4 → 2.0.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/dist/main.js +7 -3
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/lib/assets/icons/close.js +0 -4
- package/lib/assets/icons/copy.js +0 -4
- package/lib/assets/icons/download.js +0 -4
- package/lib/assets/icons/settings.js +2 -5
- package/lib/assets/metadataMapping.js +0 -9
- package/lib/commands/index.js +0 -2
- package/lib/commands/templates/footer.js +0 -2
- package/lib/components/ApiDocumentation/index.js +0 -6
- package/lib/components/Breadcrumb/index.js +2 -8
- package/lib/components/DataTableDensity/datatabledensity.test.js +0 -5
- package/lib/components/DataTableDensity/index.js +1 -7
- package/lib/components/DataTableRowChanger/datatablerowchanger.test.js +0 -5
- package/lib/components/DataTableRowChanger/index.js +2 -8
- package/lib/components/DatasetAdditionalInformation/index.js +4 -17
- package/lib/components/DatasetDownloads/datasetdownloads.test.js +0 -5
- package/lib/components/DatasetDownloads/index.js +1 -6
- package/lib/components/DatasetSearchFacets/dataset_search_facets.test.js +0 -14
- package/lib/components/DatasetSearchFacets/index.js +10 -26
- package/lib/components/DatasetSearchListItem/datasetsearchlistitem.test.js +1 -9
- package/lib/components/DatasetSearchListItem/index.js +6 -17
- package/lib/components/DatasetTags/datasettags.test.js +0 -5
- package/lib/components/DatasetTags/index.js +0 -6
- package/lib/components/Hero/index.js +8 -18
- package/lib/components/ManageColumns/index.js +3 -13
- package/lib/components/NavLink/index.js +2 -11
- package/lib/components/NavLink/navlink.test.js +0 -6
- package/lib/components/Pagination/index.js +4 -46
- package/lib/components/Pagination/pagination.test.js +367 -478
- package/lib/components/ResourceConditionField/ResourceConditionalField.test.js +1 -5
- package/lib/components/ResourceConditionField/index.js +30 -62
- package/lib/components/ResourceFilter/index.js +10 -39
- package/lib/components/ResourceFilter/resourcefilter.test.js +234 -297
- package/lib/components/ResourceFooter/index.js +4 -11
- package/lib/components/ResourceHeader/index.js +30 -54
- package/lib/components/ResourceInformation/index.js +1 -6
- package/lib/components/ResourcePreview/index.js +13 -30
- package/lib/components/SearchModal/index.js +11 -28
- package/lib/components/SubMenu/index.js +5 -20
- package/lib/components/TransformedDate/index.js +1 -7
- package/lib/components/useAddLoginLink/index.js +3 -13
- package/lib/components/useScrollToTop/index.js +1 -6
- package/lib/templates/APIPage/index.js +1 -6
- package/lib/templates/Dataset/DatasetBody.js +12 -42
- package/lib/templates/Dataset/index.js +7 -26
- package/lib/templates/DatasetSearch/datasetsearch.test.js +50 -70
- package/lib/templates/DatasetSearch/index.js +43 -83
- package/lib/templates/DrupalPage/index.js +6 -13
- package/lib/templates/FilteredResource/FilteredResourceBody.js +15 -43
- package/lib/templates/FilteredResource/QueryBuilder.js +17 -59
- package/lib/templates/FilteredResource/QueryRow.js +20 -43
- package/lib/templates/FilteredResource/QueryTitle.js +2 -18
- package/lib/templates/FilteredResource/functions.js +5 -17
- package/lib/templates/FilteredResource/index.js +16 -36
- package/lib/templates/Footer/footer.test.js +2 -7
- package/lib/templates/Footer/index.js +11 -23
- package/lib/templates/PageNotFound/index.js +1 -5
- package/lib/templates/header/index.js +17 -26
- package/lib/templates/mobile_header/index.js +22 -42
- package/package.json +3 -2
- package/lib/components/NavBar/index.js +0 -55
- package/lib/index.js +0 -247
package/dist/main.js
CHANGED
|
@@ -9,6 +9,7 @@ import "swagger-ui-react/swagger-ui.css";
|
|
|
9
9
|
import $hgUW1$qs from "qs";
|
|
10
10
|
import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
|
|
11
11
|
import $hgUW1$axios from "axios";
|
|
12
|
+
import $hgUW1$dompurify from "dompurify";
|
|
12
13
|
import $hgUW1$reacttexttruncate from "react-text-truncate";
|
|
13
14
|
import {createColumnHelper as $hgUW1$createColumnHelper, useReactTable as $hgUW1$useReactTable, getCoreRowModel as $hgUW1$getCoreRowModel, getSortedRowModel as $hgUW1$getSortedRowModel, flexRender as $hgUW1$flexRender} from "@tanstack/react-table";
|
|
14
15
|
import {useMediaQuery as $hgUW1$useMediaQuery} from "react-responsive";
|
|
@@ -257,6 +258,7 @@ var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryPr
|
|
|
257
258
|
|
|
258
259
|
|
|
259
260
|
|
|
261
|
+
|
|
260
262
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date , options: options })=>{
|
|
261
263
|
const rawDate = new Date(date);
|
|
262
264
|
let modifiedDate = "";
|
|
@@ -279,7 +281,7 @@ var $bd76a91923d7e8a7$export$2e2bcd8739ae039 = $bd76a91923d7e8a7$var$Transformed
|
|
|
279
281
|
|
|
280
282
|
const $dc6d3aaf3e07417b$var$dangerousDescriptionElement = ({ children: children })=>/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
281
283
|
dangerouslySetInnerHTML: {
|
|
282
|
-
__html: children
|
|
284
|
+
__html: (0, $hgUW1$dompurify).sanitize(children)
|
|
283
285
|
}
|
|
284
286
|
});
|
|
285
287
|
const $dc6d3aaf3e07417b$var$DatasetSearchListItem = ({ item: item , updateFacets: updateFacets })=>{
|
|
@@ -874,6 +876,7 @@ var $68d79598b83f3382$export$2e2bcd8739ae039 = $68d79598b83f3382$var$useMetastor
|
|
|
874
876
|
|
|
875
877
|
|
|
876
878
|
|
|
879
|
+
|
|
877
880
|
async function $0e7628cf73c71646$export$55f990b5477765d6(id, rootUrl, options, additionalParams) {
|
|
878
881
|
const { keys: keys , limit: limit , offset: offset , conditions: conditions , sort: sort , groupings: groupings , prepareColumns: prepareColumns , properties: properties , setValues: setValues , setCount: setCount , setColumns: setColumns , setLoading: setLoading , setSchema: setSchema } = options;
|
|
879
882
|
if (!id) // TODO: Throw error
|
|
@@ -2027,7 +2030,7 @@ const $766b8e351dd607f5$var$DatasetBody = ({ rootUrl: rootUrl , id: id , dataset
|
|
|
2027
2030
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
2028
2031
|
className: "dc-c-metadata-description",
|
|
2029
2032
|
dangerouslySetInnerHTML: {
|
|
2030
|
-
__html: dataset.description
|
|
2033
|
+
__html: (0, $hgUW1$dompurify).sanitize(dataset.description)
|
|
2031
2034
|
}
|
|
2032
2035
|
}),
|
|
2033
2036
|
resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -4016,6 +4019,7 @@ var $ec3e23baa005dc03$export$2e2bcd8739ae039 = $ec3e23baa005dc03$var$Breadcrumb;
|
|
|
4016
4019
|
|
|
4017
4020
|
|
|
4018
4021
|
|
|
4022
|
+
|
|
4019
4023
|
|
|
4020
4024
|
|
|
4021
4025
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
@@ -4406,7 +4410,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id , dataset: dataset
|
|
|
4406
4410
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4407
4411
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
4408
4412
|
dangerouslySetInnerHTML: {
|
|
4409
|
-
__html: distribution.data.description
|
|
4413
|
+
__html: (0, $hgUW1$dompurify).sanitize(distribution.data.description)
|
|
4410
4414
|
}
|
|
4411
4415
|
}),
|
|
4412
4416
|
resource.columns && Object.keys(resource.schema).length && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|