@civicactions/cmsds-open-data-components 4.0.2-alpha.1 → 4.0.4-alpha.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/dist/main.js +33 -13
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -5519,8 +5519,23 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5519
5519
|
|
|
5520
5520
|
|
|
5521
5521
|
|
|
5522
|
-
|
|
5523
|
-
|
|
5522
|
+
|
|
5523
|
+
|
|
5524
|
+
|
|
5525
|
+
|
|
5526
|
+
|
|
5527
|
+
const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution, rootUrl: rootUrl })=>{
|
|
5528
|
+
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5529
|
+
const { data: resource } = (0, $hgUW1$useQuery)({
|
|
5530
|
+
queryKey: [
|
|
5531
|
+
"resource-information",
|
|
5532
|
+
distribution.identifier
|
|
5533
|
+
],
|
|
5534
|
+
queryFn: ()=>(0, $hgUW1$axios).get(`${rootUrl}/datastore/query/${distribution.identifier}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({
|
|
5535
|
+
results: false,
|
|
5536
|
+
schema: false
|
|
5537
|
+
}, ACA))}`).then((res)=>res.data)
|
|
5538
|
+
});
|
|
5524
5539
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5525
5540
|
className: "dc-c-resource-info-table ds-l-col--12 ds-u-padding-left--0 ds-u-margin-y--2",
|
|
5526
5541
|
children: [
|
|
@@ -5540,7 +5555,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ resource: resource })=>{
|
|
|
5540
5555
|
}),
|
|
5541
5556
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5542
5557
|
className: "ds-u-font-weight--bold",
|
|
5543
|
-
children:
|
|
5558
|
+
children: resource?.count ? Number(resource.count).toLocaleString() : ""
|
|
5544
5559
|
})
|
|
5545
5560
|
]
|
|
5546
5561
|
}),
|
|
@@ -5554,7 +5569,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ resource: resource })=>{
|
|
|
5554
5569
|
}),
|
|
5555
5570
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5556
5571
|
className: "ds-u-font-weight--bold",
|
|
5557
|
-
children:
|
|
5572
|
+
children: resource?.query?.properties?.length?.toLocaleString()
|
|
5558
5573
|
})
|
|
5559
5574
|
]
|
|
5560
5575
|
})
|
|
@@ -5569,7 +5584,7 @@ var $0958733ee130fc44$export$2e2bcd8739ae039 = $0958733ee130fc44$var$ResourceInf
|
|
|
5569
5584
|
|
|
5570
5585
|
|
|
5571
5586
|
|
|
5572
|
-
const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource: resource, title: title })=>{
|
|
5587
|
+
const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource: resource, rootUrl: rootUrl, title: title })=>{
|
|
5573
5588
|
const sm = (0, $hgUW1$useMediaQuery)({
|
|
5574
5589
|
minWidth: 0,
|
|
5575
5590
|
maxWidth: 767
|
|
@@ -5631,7 +5646,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5631
5646
|
})
|
|
5632
5647
|
}),
|
|
5633
5648
|
fileFormat === "csv" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $0958733ee130fc44$export$2e2bcd8739ae039), {
|
|
5634
|
-
|
|
5649
|
+
rootUrl: rootUrl,
|
|
5650
|
+
distribution: dist
|
|
5635
5651
|
})
|
|
5636
5652
|
]
|
|
5637
5653
|
}, dist.identifier);
|
|
@@ -5646,7 +5662,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5646
5662
|
var $7357cc0f79f9c514$export$2e2bcd8739ae039 = $7357cc0f79f9c514$var$Resource;
|
|
5647
5663
|
|
|
5648
5664
|
|
|
5649
|
-
const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: resource, distributions: distributions, metadataMapping: metadataMapping })=>{
|
|
5665
|
+
const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: resource, distributions: distributions, metadataMapping: metadataMapping, rootUrl: rootUrl })=>{
|
|
5650
5666
|
const md = (0, $hgUW1$useMediaQuery)({
|
|
5651
5667
|
minWidth: 0,
|
|
5652
5668
|
maxWidth: 768
|
|
@@ -5675,7 +5691,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5675
5691
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $7357cc0f79f9c514$export$2e2bcd8739ae039), {
|
|
5676
5692
|
distributions: distributions,
|
|
5677
5693
|
resource: resource,
|
|
5678
|
-
title: dataset.title
|
|
5694
|
+
title: dataset.title,
|
|
5695
|
+
rootUrl: rootUrl
|
|
5679
5696
|
}),
|
|
5680
5697
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5681
5698
|
className: "dc-c-additional-info-table ds-u-margin-bottom--6 ds-u-padding-left--0 ds-l-lg-col--7 ds-l-md-col--9 ds-l-col--12",
|
|
@@ -6277,7 +6294,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6277
6294
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
6278
6295
|
else if (dataset.description) newDescription = dataset.description;
|
|
6279
6296
|
}
|
|
6280
|
-
if (description !== newDescription && updateAriaLive) updateAriaLive(newDescription);
|
|
6297
|
+
if (typeof newDescription === "string" && description !== newDescription && updateAriaLive) updateAriaLive(newDescription);
|
|
6281
6298
|
setDescription(newDescription);
|
|
6282
6299
|
}, [
|
|
6283
6300
|
resource,
|
|
@@ -6289,9 +6306,11 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6289
6306
|
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
6290
6307
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6291
6308
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6309
|
+
children: typeof description === "string" ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6310
|
+
dangerouslySetInnerHTML: {
|
|
6311
|
+
__html: (0, $hgUW1$dompurify).sanitize(description)
|
|
6312
|
+
}
|
|
6313
|
+
}) : description
|
|
6295
6314
|
})
|
|
6296
6315
|
});
|
|
6297
6316
|
};
|
|
@@ -6498,7 +6517,8 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6498
6517
|
resource: resource,
|
|
6499
6518
|
dataset: dataset,
|
|
6500
6519
|
distributions: distributions,
|
|
6501
|
-
metadataMapping: metadataMapping
|
|
6520
|
+
metadataMapping: metadataMapping,
|
|
6521
|
+
rootUrl: rootUrl
|
|
6502
6522
|
})
|
|
6503
6523
|
}),
|
|
6504
6524
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|