@civicactions/cmsds-open-data-components 3.2.2-alpha.1 → 3.2.2
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 +52 -15
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -2108,11 +2108,11 @@ var $2ed0091f7e32d1e6$export$2e2bcd8739ae039 = $2ed0091f7e32d1e6$var$DataTablePa
|
|
|
2108
2108
|
|
|
2109
2109
|
|
|
2110
2110
|
|
|
2111
|
-
const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource, downloadURL: downloadURL, jsonUrl: jsonUrl })=>{
|
|
2112
|
-
const { limit: limit, offset: offset, count: count } = resource;
|
|
2111
|
+
const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource, downloadURL: downloadURL, unfilteredDownloadURL: unfilteredDownloadURL, jsonUrl: jsonUrl })=>{
|
|
2112
|
+
const { limit: limit, offset: offset, count: count, conditions: conditions } = resource;
|
|
2113
2113
|
const intCount = count ? count : 0;
|
|
2114
2114
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2115
|
-
className: "ds-l-row ds-u-align-items--center
|
|
2115
|
+
className: "ds-l-row ds-u-align-items--center",
|
|
2116
2116
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2117
2117
|
className: "ds-l-col--12 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--between ds-u-align-items--center",
|
|
2118
2118
|
children: [
|
|
@@ -2125,11 +2125,11 @@ const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource, downloadURL
|
|
|
2125
2125
|
})
|
|
2126
2126
|
}),
|
|
2127
2127
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2128
|
-
className: "dc-c-resource-header--buttons ds-l-col--12 ds-
|
|
2128
|
+
className: "dc-c-resource-header--buttons ds-l-col--12 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end ds-u-padding-x--0",
|
|
2129
2129
|
children: [
|
|
2130
2130
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2131
|
-
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-margin-bottom--2
|
|
2132
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
|
|
2131
|
+
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-margin-bottom--2",
|
|
2132
|
+
children: conditions.length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
|
|
2133
2133
|
onOpen: ()=>{
|
|
2134
2134
|
navigator.clipboard.writeText(window.location.href);
|
|
2135
2135
|
},
|
|
@@ -2138,6 +2138,7 @@ const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource, downloadURL
|
|
|
2138
2138
|
dialog: true,
|
|
2139
2139
|
ariaLabel: "Copy link to filtered data",
|
|
2140
2140
|
title: "Link copied to clipboard",
|
|
2141
|
+
"aria-disabled": conditions.length === 0,
|
|
2141
2142
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2142
2143
|
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2143
2144
|
children: [
|
|
@@ -2147,24 +2148,59 @@ const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource, downloadURL
|
|
|
2147
2148
|
" Copy link to filtered data"
|
|
2148
2149
|
]
|
|
2149
2150
|
})
|
|
2150
|
-
})
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2155
|
-
className: "ds-u-text-align--center ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1 ds-u-display--inline-block ds-l-col--12",
|
|
2156
|
-
href: downloadURL,
|
|
2151
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2152
|
+
"aria-disabled": true,
|
|
2153
|
+
"aria-label": "Copy link to filtered data",
|
|
2154
|
+
className: "ds-c-button ds-u-text-align--center ds-u-display--inline-block ds-l-col--12",
|
|
2157
2155
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2158
2156
|
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2159
2157
|
children: [
|
|
2160
2158
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2161
|
-
className: "fas fa-
|
|
2159
|
+
className: "fas fa-copy"
|
|
2162
2160
|
}),
|
|
2163
|
-
"
|
|
2161
|
+
" Copy link to filtered data"
|
|
2164
2162
|
]
|
|
2165
2163
|
})
|
|
2166
2164
|
})
|
|
2167
2165
|
}),
|
|
2166
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2167
|
+
className: "ds-l-col--12 ds-l-md-col--auto ds-u-padding-x--0 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end",
|
|
2168
|
+
children: [
|
|
2169
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2170
|
+
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-sm-margin-left--2 ds-u-margin-bottom--2",
|
|
2171
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2172
|
+
className: "ds-u-text-align--center ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1 ds-u-display--inline-block ds-l-col--12",
|
|
2173
|
+
href: downloadURL,
|
|
2174
|
+
"aria-disabled": conditions.length === 0,
|
|
2175
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2176
|
+
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2177
|
+
children: [
|
|
2178
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2179
|
+
className: "fas fa-file-csv"
|
|
2180
|
+
}),
|
|
2181
|
+
" Download filtered data (CSV)"
|
|
2182
|
+
]
|
|
2183
|
+
})
|
|
2184
|
+
})
|
|
2185
|
+
}),
|
|
2186
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2187
|
+
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-sm-margin-left--2 ds-u-margin-bottom--2",
|
|
2188
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2189
|
+
className: "ds-u-text-align--center ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1 ds-u-display--inline-block ds-l-col--12",
|
|
2190
|
+
href: unfilteredDownloadURL,
|
|
2191
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2192
|
+
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2193
|
+
children: [
|
|
2194
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2195
|
+
className: "fas fa-file-csv"
|
|
2196
|
+
}),
|
|
2197
|
+
" Download full dataset (CSV)"
|
|
2198
|
+
]
|
|
2199
|
+
})
|
|
2200
|
+
})
|
|
2201
|
+
})
|
|
2202
|
+
]
|
|
2203
|
+
}),
|
|
2168
2204
|
jsonUrl && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2169
2205
|
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-margin-left--2 ds-u-margin-top--2 ds-u-sm-margin-top--0",
|
|
2170
2206
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
@@ -2630,6 +2666,7 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ id: id, distribution: distribution
|
|
|
2630
2666
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $6380a4a580b24362$export$2e2bcd8739ae039), {
|
|
2631
2667
|
resource: resource,
|
|
2632
2668
|
downloadURL: downloadURL,
|
|
2669
|
+
unfilteredDownloadURL: distribution.data.downloadURL,
|
|
2633
2670
|
jsonUrl: jsonUrl
|
|
2634
2671
|
}),
|
|
2635
2672
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|