@civicactions/cmsds-open-data-components 3.1.7-alpha.1 → 3.1.8-alpha.1
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 +12 -9
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1304,7 +1304,7 @@ var $b4aa9c66f2e86959$export$2e2bcd8739ae039 = $b4aa9c66f2e86959$var$useMetastor
|
|
|
1304
1304
|
|
|
1305
1305
|
|
|
1306
1306
|
|
|
1307
|
-
const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, additionalParams = {})=>{
|
|
1307
|
+
const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, additionalParams = {}, enabledParam = true)=>{
|
|
1308
1308
|
const keys = options.keys ? options.keys : true;
|
|
1309
1309
|
const { prepareColumns: prepareColumns } = options;
|
|
1310
1310
|
const [values, setValues] = (0, $hgUW1$useState)([]);
|
|
@@ -1337,7 +1337,8 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
1337
1337
|
],
|
|
1338
1338
|
queryFn: ()=>{
|
|
1339
1339
|
return fetch(`${rootUrl}/datastore/query/${id}?${additionalParamsString}`).then((res)=>res.json());
|
|
1340
|
-
}
|
|
1340
|
+
},
|
|
1341
|
+
enabled: enabledParam && id !== null && id != ""
|
|
1341
1342
|
});
|
|
1342
1343
|
(0, $hgUW1$useEffect)(()=>{
|
|
1343
1344
|
if (data) {
|
|
@@ -2451,8 +2452,8 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = (props)=>{
|
|
|
2451
2452
|
};
|
|
2452
2453
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2453
2454
|
className: "dc-query-builder ds-u-margin-bottom--3",
|
|
2454
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
2455
|
-
|
|
2455
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2456
|
+
className: "ds-c-accordion ds-c-accordion--bordered",
|
|
2456
2457
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
2457
2458
|
heading: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bef7bff2823feea2$export$2e2bcd8739ae039), {
|
|
2458
2459
|
schema: schema[id],
|
|
@@ -2959,6 +2960,7 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
2959
2960
|
|
|
2960
2961
|
|
|
2961
2962
|
|
|
2963
|
+
|
|
2962
2964
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, count: count, pageSize: pageSize })=>{
|
|
2963
2965
|
const [pagination, setPagination] = (0, $hgUW1$useState)({
|
|
2964
2966
|
pageIndex: 1,
|
|
@@ -3137,11 +3139,12 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
3137
3139
|
"dictionary" + datasetDictionaryEndpoint
|
|
3138
3140
|
],
|
|
3139
3141
|
queryFn: ()=>{
|
|
3140
|
-
return
|
|
3142
|
+
return (0, $hgUW1$axios).get(`${datasetDictionaryEndpoint}?${(0, $hgUW1$qs).stringify(additionalParams, {
|
|
3141
3143
|
arrayFormat: "comma",
|
|
3142
3144
|
encode: false
|
|
3143
|
-
})}`).then((res)=>res.
|
|
3144
|
-
}
|
|
3145
|
+
})}`).then((res)=>res.data).catch((error)=>console.error(error));
|
|
3146
|
+
},
|
|
3147
|
+
enabled: datasetDictionaryEndpoint !== undefined
|
|
3145
3148
|
});
|
|
3146
3149
|
const datasetDictionary = data && data.data && data.data.fields && data.data.fields.length ? data.data.fields : null;
|
|
3147
3150
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -5475,8 +5478,8 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, includ
|
|
|
5475
5478
|
};
|
|
5476
5479
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5477
5480
|
className: "dc-query-builder ds-u-margin-bottom--3",
|
|
5478
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
5479
|
-
|
|
5481
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5482
|
+
className: "ds-c-accordion ds-c-accordion--bordered",
|
|
5480
5483
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
5481
5484
|
heading: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bef7bff2823feea2$export$2e2bcd8739ae039), {
|
|
5482
5485
|
schema: schema[id],
|