@civicactions/cmsds-open-data-components 4.1.0-alpha.11 → 4.1.0-alpha.13
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 +4 -3
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -2635,7 +2635,7 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2635
2635
|
]);
|
|
2636
2636
|
// keep state in sync
|
|
2637
2637
|
(0, $hgUW1$useEffect)(()=>{
|
|
2638
|
-
if (columnOrder
|
|
2638
|
+
if (columnOrder?.length) setCards(columnOrder.map((c)=>{
|
|
2639
2639
|
const column = columns.filter((col)=>col.id === c)[0];
|
|
2640
2640
|
return {
|
|
2641
2641
|
id: column.id,
|
|
@@ -3454,8 +3454,9 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
3454
3454
|
const { id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
|
|
3455
3455
|
const { page: page, setPage: setPage, tableDensity: tableDensity } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
|
|
3456
3456
|
const defaultPageSize = 10;
|
|
3457
|
-
const
|
|
3458
|
-
const
|
|
3457
|
+
const schema = resource?.schema?.[distribution?.identifier] ?? resource?.schema?.[id];
|
|
3458
|
+
const isFullColumnDef = Array.isArray(customColumns) && customColumns.some((column)=>column && 'header' in column);
|
|
3459
|
+
const columns = isFullColumnDef ? customColumns : schema && Array.isArray(resource?.columns) ? (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, schema) : $a35cf16d1488f54e$export$1147582dfae658c6(resource.columns, resource.schema[id]);
|
|
3459
3460
|
const { limit: limit, setOffset: setOffset } = resource;
|
|
3460
3461
|
const pageSize = limit ? limit : defaultPageSize;
|
|
3461
3462
|
const downloadURL = `${rootUrl}/datastore/query/${id}/0/download?${(0, $hgUW1$qs).stringify({
|