@civicactions/cmsds-open-data-components 4.0.9-alpha.1 → 4.0.9
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 +5 -9
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/main.js
CHANGED
|
@@ -5210,15 +5210,13 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5210
5210
|
if (!requireConditions) enabled = true;
|
|
5211
5211
|
if (conditions && conditions.length) enabled = true;
|
|
5212
5212
|
}
|
|
5213
|
-
// Change whether distribution API or dataset API is used based on option
|
|
5214
|
-
const queryID = options.useDatasetAPI ? params.datasetID + "/0" : id;
|
|
5215
5213
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
5216
5214
|
queryKey: [
|
|
5217
5215
|
"datastore" + id + paramsString
|
|
5218
5216
|
],
|
|
5219
5217
|
queryFn: ()=>{
|
|
5220
5218
|
setCount(null);
|
|
5221
|
-
return fetch(`${rootUrl}/datastore/query/${
|
|
5219
|
+
return fetch(`${rootUrl}/datastore/query/${id}?${paramsString}`).then((res)=>res.json());
|
|
5222
5220
|
},
|
|
5223
5221
|
enabled: enabled
|
|
5224
5222
|
});
|
|
@@ -5232,7 +5230,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5232
5230
|
count: true,
|
|
5233
5231
|
schema: true
|
|
5234
5232
|
};
|
|
5235
|
-
return fetch(`${rootUrl}/datastore/query/${
|
|
5233
|
+
return fetch(`${rootUrl}/datastore/query/${id}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(unfilteredParams, ACA))}`).then((res)=>res.json());
|
|
5236
5234
|
}
|
|
5237
5235
|
});
|
|
5238
5236
|
(0, $hgUW1$useEffect)(()=>{
|
|
@@ -6345,7 +6343,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6345
6343
|
dataDictionaryLoading: isPending
|
|
6346
6344
|
};
|
|
6347
6345
|
};
|
|
6348
|
-
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false
|
|
6346
|
+
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false })=>{
|
|
6349
6347
|
const options = location.search ? {
|
|
6350
6348
|
...(0, $hgUW1$qs).parse(location.search, {
|
|
6351
6349
|
ignoreQueryPrefix: true
|
|
@@ -6364,10 +6362,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6364
6362
|
if (distributions.length) distribution = distributions[0];
|
|
6365
6363
|
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
6366
6364
|
...options,
|
|
6367
|
-
limit: defaultPageSize
|
|
6368
|
-
useDatasetAPI: useDatasetAPI
|
|
6369
|
-
}, {
|
|
6370
|
-
datasetID: id // pass datasetID into additional params to enable dataset API option in useDatastore
|
|
6365
|
+
limit: defaultPageSize
|
|
6371
6366
|
});
|
|
6372
6367
|
const siteWideDataDictionary = dataDictionaryUrl ? $a0f13962e513caa1$var$getDataDictionary(rootUrl + dataDictionaryUrl).dataDictionary : null;
|
|
6373
6368
|
// compare schema fields with siteWideDataDictionary to display commonalities for now
|
|
@@ -6433,6 +6428,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6433
6428
|
window.location.hash
|
|
6434
6429
|
]);
|
|
6435
6430
|
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6431
|
+
const formatType = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6436
6432
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6437
6433
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6438
6434
|
content: notFoundContent,
|