@civicactions/cmsds-open-data-components 3.11.0-alpha.3 → 4.0.0-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 +21 -16
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +1 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1827,7 +1827,7 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1827
1827
|
children: `${numTotalRows.toLocaleString()}`
|
|
1828
1828
|
}),
|
|
1829
1829
|
' ',
|
|
1830
|
-
"
|
|
1830
|
+
"rows"
|
|
1831
1831
|
]
|
|
1832
1832
|
});
|
|
1833
1833
|
};
|
|
@@ -2584,6 +2584,15 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2584
2584
|
}, [
|
|
2585
2585
|
columnOrder
|
|
2586
2586
|
]);
|
|
2587
|
+
// Update cards state when columnVisibility changes
|
|
2588
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
2589
|
+
setCards((prevCards)=>prevCards.map((card)=>({
|
|
2590
|
+
...card,
|
|
2591
|
+
visible: columnVisibility[card.id] !== false
|
|
2592
|
+
})));
|
|
2593
|
+
}, [
|
|
2594
|
+
columnVisibility
|
|
2595
|
+
]);
|
|
2587
2596
|
const sensors = (0, $hgUW1$useSensors)((0, $hgUW1$useSensor)($5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor, {
|
|
2588
2597
|
activationConstraint: {
|
|
2589
2598
|
distance: 5
|
|
@@ -2800,7 +2809,7 @@ function $a35cf16d1488f54e$export$1147582dfae658c6(columns, schema) {
|
|
|
2800
2809
|
accessor: column
|
|
2801
2810
|
}));
|
|
2802
2811
|
}
|
|
2803
|
-
const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false,
|
|
2812
|
+
const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopyLinkButton: showCopyLinkButton = true, showDataTableToolbar: showDataTableToolbar = true, showDownloadFilteredDataButton: showDownloadFilteredDataButton = true, showDownloadFullDataButton: showDownloadFullDataButton = true, showStoredQueryDownloadButton: showStoredQueryDownloadButton = false })=>{
|
|
2804
2813
|
const { id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
|
|
2805
2814
|
const { page: page, setPage: setPage, tableDensity: tableDensity } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
|
|
2806
2815
|
const defaultPageSize = 10;
|
|
@@ -2824,7 +2833,6 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFul
|
|
|
2824
2833
|
tablePadding: tableDensity === 'normal' ? 'ds-u-padding-y--2' : tableDensity === 'compact' ? 'ds-u-padding-y--1' : 'ds-u-padding-y--3',
|
|
2825
2834
|
loading: resource.loading,
|
|
2826
2835
|
isModal: isModal,
|
|
2827
|
-
closeFullScreenModal: closeFullScreenModal,
|
|
2828
2836
|
downloadURL: downloadURL,
|
|
2829
2837
|
unfilteredDownloadURL: distribution.data.downloadURL,
|
|
2830
2838
|
setPage: setPage,
|
|
@@ -2860,26 +2868,26 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFul
|
|
|
2860
2868
|
var $a35cf16d1488f54e$export$2e2bcd8739ae039 = $a35cf16d1488f54e$var$DatasetTable;
|
|
2861
2869
|
|
|
2862
2870
|
|
|
2863
|
-
const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal
|
|
2864
|
-
const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(
|
|
2871
|
+
const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
2872
|
+
const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(isModal);
|
|
2865
2873
|
if (isModal) return null;
|
|
2866
2874
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2867
2875
|
className: "dkan-fullscreen-data-table-wrapper",
|
|
2868
2876
|
children: [
|
|
2869
2877
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
|
|
2870
|
-
"aria-label":
|
|
2878
|
+
"aria-label": modalOpen ? 'Close Full Screen dialog' : 'Full Screen mode - Opens in a dialog',
|
|
2871
2879
|
className: "dkan-filter-dataset-toolbar-button ds-u-color--primary ds-u-text-decoration--underline ds-u-font-size--sm ds-u-padding-x--2 ds-u-margin--0 ds-u-border--0 ds-u-fill--transparent",
|
|
2872
2880
|
onClick: ()=>{
|
|
2873
|
-
if (
|
|
2881
|
+
if (modalOpen) setModalOpen(false);
|
|
2874
2882
|
else setModalOpen(true);
|
|
2875
2883
|
},
|
|
2876
2884
|
children: [
|
|
2877
2885
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2878
|
-
className: `fa ${
|
|
2886
|
+
className: `fa ${modalOpen ? 'fa-compress' : 'fa-expand'} ds-u-margin-right--1`
|
|
2879
2887
|
}),
|
|
2880
2888
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2881
2889
|
className: "ds-u-display--none ds-u-lg-display--inline-block",
|
|
2882
|
-
children:
|
|
2890
|
+
children: modalOpen ? "Exit Full Screen" : "Full Screen"
|
|
2883
2891
|
})
|
|
2884
2892
|
]
|
|
2885
2893
|
}),
|
|
@@ -2891,8 +2899,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal, closeFull
|
|
|
2891
2899
|
onExit: ()=>setModalOpen(false),
|
|
2892
2900
|
className: "dkan-full-screen-dataset-dialog",
|
|
2893
2901
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $a35cf16d1488f54e$export$2e2bcd8739ae039), {
|
|
2894
|
-
isModal: true
|
|
2895
|
-
closeFullScreenModal: ()=>setModalOpen(false)
|
|
2902
|
+
isModal: true
|
|
2896
2903
|
})
|
|
2897
2904
|
})
|
|
2898
2905
|
})
|
|
@@ -3520,7 +3527,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
3520
3527
|
});
|
|
3521
3528
|
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3522
3529
|
};
|
|
3523
|
-
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal,
|
|
3530
|
+
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
3524
3531
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
3525
3532
|
const intCount = count ? count : 0;
|
|
3526
3533
|
const hiddenColumns = Object.keys(columnVisibility).filter((key)=>columnVisibility[key] === false).length;
|
|
@@ -3573,8 +3580,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3573
3580
|
}),
|
|
3574
3581
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $dae856e97a09bcd6$export$2e2bcd8739ae039), {}),
|
|
3575
3582
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $16bd41951b91f02d$export$2e2bcd8739ae039), {
|
|
3576
|
-
isModal: isModal
|
|
3577
|
-
closeFullScreenModal: closeFullScreenModal
|
|
3583
|
+
isModal: isModal
|
|
3578
3584
|
})
|
|
3579
3585
|
]
|
|
3580
3586
|
})
|
|
@@ -3632,7 +3638,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3632
3638
|
var $85f8ff1ff89899c7$export$2e2bcd8739ae039 = $85f8ff1ff89899c7$var$DataTableToolbar;
|
|
3633
3639
|
|
|
3634
3640
|
|
|
3635
|
-
const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sortTransform, tablePadding: tablePadding, canResize: canResize, loading: loading = false, isModal: isModal,
|
|
3641
|
+
const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sortTransform, tablePadding: tablePadding, canResize: canResize, loading: loading = false, isModal: isModal, downloadURL: downloadURL, unfilteredDownloadURL: unfilteredDownloadURL, setPage: setPage, showCopyLinkButton: showCopyLinkButton, showDataTableToolbar: showDataTableToolbar, showDownloadFilteredDataButton: showDownloadFilteredDataButton, showDownloadFullDataButton: showDownloadFullDataButton, showStoredQueryDownloadButton: showStoredQueryDownloadButton })=>{
|
|
3636
3642
|
const { id: id, resource: resource, datasetTableControls: datasetTableControls, dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
|
|
3637
3643
|
const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
|
|
3638
3644
|
const { conditions: conditions } = resource;
|
|
@@ -3720,7 +3726,6 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3720
3726
|
columns: table.getAllLeafColumns(),
|
|
3721
3727
|
defaultColumnOrder: defaultColumnOrder,
|
|
3722
3728
|
isModal: isModal,
|
|
3723
|
-
closeFullScreenModal: closeFullScreenModal,
|
|
3724
3729
|
resource: resource,
|
|
3725
3730
|
datasetTableControls: datasetTableControls,
|
|
3726
3731
|
columnVisibility: columnVisibility,
|