@civicactions/cmsds-open-data-components 3.2.4 → 3.2.5
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 +167 -153
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +5 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1876,6 +1876,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ data: data, columns: columns, setSort
|
|
|
1876
1876
|
maxWidth: cell.column.getSize()
|
|
1877
1877
|
},
|
|
1878
1878
|
className: `${classList} ${tablePadding}`,
|
|
1879
|
+
title: cell.getValue(),
|
|
1879
1880
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
1880
1881
|
});
|
|
1881
1882
|
})
|
|
@@ -2074,7 +2075,7 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
2074
2075
|
const page = offset / limit;
|
|
2075
2076
|
const startTotal = ()=>page * limit + 1;
|
|
2076
2077
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
2077
|
-
className:
|
|
2078
|
+
className: className,
|
|
2078
2079
|
children: [
|
|
2079
2080
|
"Displaying",
|
|
2080
2081
|
" ",
|
|
@@ -2108,120 +2109,149 @@ var $2ed0091f7e32d1e6$export$2e2bcd8739ae039 = $2ed0091f7e32d1e6$var$DataTablePa
|
|
|
2108
2109
|
|
|
2109
2110
|
|
|
2110
2111
|
|
|
2111
|
-
const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource, downloadURL: downloadURL, unfilteredDownloadURL: unfilteredDownloadURL, jsonUrl: jsonUrl })=>{
|
|
2112
|
-
const { limit: limit, offset: offset, count: count, conditions: conditions } = resource;
|
|
2112
|
+
const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource, downloadURL: downloadURL, unfilteredDownloadURL: unfilteredDownloadURL, jsonUrl: jsonUrl, setPage: setPage })=>{
|
|
2113
|
+
const { limit: limit, offset: offset, count: count, conditions: conditions, setLimit: setLimit, setOffset: setOffset } = resource;
|
|
2113
2114
|
const intCount = count ? count : 0;
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
className: "fas fa-copy"
|
|
2147
|
-
}),
|
|
2148
|
-
" Copy link to filtered data"
|
|
2149
|
-
]
|
|
2150
|
-
})
|
|
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",
|
|
2155
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2156
|
-
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2157
|
-
children: [
|
|
2158
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2159
|
-
className: "fas fa-copy"
|
|
2160
|
-
}),
|
|
2161
|
-
" Copy link to filtered data"
|
|
2162
|
-
]
|
|
2163
|
-
})
|
|
2115
|
+
const rowOptions = [
|
|
2116
|
+
10,
|
|
2117
|
+
25,
|
|
2118
|
+
50,
|
|
2119
|
+
100
|
|
2120
|
+
];
|
|
2121
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2122
|
+
className: "ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--between",
|
|
2123
|
+
children: [
|
|
2124
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2125
|
+
className: "dc-c-resource-header--buttons ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end ds-l-col--12 ds-u-margin-top--2 ds-u-padding-x--0",
|
|
2126
|
+
children: [
|
|
2127
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2128
|
+
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-margin-bottom--2",
|
|
2129
|
+
children: conditions && conditions.length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
|
|
2130
|
+
onOpen: ()=>{
|
|
2131
|
+
navigator.clipboard.writeText(window.location.href);
|
|
2132
|
+
},
|
|
2133
|
+
className: "ds-c-button ds-u-text-align--center ds-u-display--inline-block ds-l-col--12",
|
|
2134
|
+
placement: "bottom",
|
|
2135
|
+
dialog: true,
|
|
2136
|
+
ariaLabel: "Copy link to filtered data",
|
|
2137
|
+
title: "Link copied to clipboard",
|
|
2138
|
+
"aria-disabled": !conditions || conditions.length === 0,
|
|
2139
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2140
|
+
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2141
|
+
children: [
|
|
2142
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2143
|
+
className: "fas fa-copy"
|
|
2144
|
+
}),
|
|
2145
|
+
" Copy link to filtered data"
|
|
2146
|
+
]
|
|
2164
2147
|
})
|
|
2165
|
-
}),
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
children:
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
" Download full dataset (CSV)"
|
|
2198
|
-
]
|
|
2199
|
-
})
|
|
2148
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2149
|
+
"aria-disabled": true,
|
|
2150
|
+
"aria-label": "Copy link to filtered data",
|
|
2151
|
+
className: "ds-c-button ds-u-text-align--center ds-u-display--inline-block ds-l-col--12",
|
|
2152
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2153
|
+
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2154
|
+
children: [
|
|
2155
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2156
|
+
className: "fas fa-copy"
|
|
2157
|
+
}),
|
|
2158
|
+
" Copy link to filtered data"
|
|
2159
|
+
]
|
|
2160
|
+
})
|
|
2161
|
+
})
|
|
2162
|
+
}),
|
|
2163
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2164
|
+
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",
|
|
2165
|
+
children: [
|
|
2166
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2167
|
+
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",
|
|
2168
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2169
|
+
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",
|
|
2170
|
+
href: downloadURL,
|
|
2171
|
+
"aria-disabled": !conditions || conditions.length === 0,
|
|
2172
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2173
|
+
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2174
|
+
children: [
|
|
2175
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2176
|
+
className: "fas fa-file-csv"
|
|
2177
|
+
}),
|
|
2178
|
+
" Download filtered data (CSV)"
|
|
2179
|
+
]
|
|
2200
2180
|
})
|
|
2201
2181
|
})
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
]
|
|
2182
|
+
}),
|
|
2183
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2184
|
+
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",
|
|
2185
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2186
|
+
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",
|
|
2187
|
+
href: unfilteredDownloadURL,
|
|
2188
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2189
|
+
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2190
|
+
children: [
|
|
2191
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2192
|
+
className: "fas fa-file-csv"
|
|
2193
|
+
}),
|
|
2194
|
+
" Download full dataset (CSV)"
|
|
2195
|
+
]
|
|
2196
|
+
})
|
|
2218
2197
|
})
|
|
2219
2198
|
})
|
|
2199
|
+
]
|
|
2200
|
+
}),
|
|
2201
|
+
jsonUrl && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2202
|
+
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",
|
|
2203
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2204
|
+
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",
|
|
2205
|
+
href: jsonUrl,
|
|
2206
|
+
"aria-label": "Export to .JSON",
|
|
2207
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2208
|
+
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2209
|
+
children: [
|
|
2210
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2211
|
+
className: "fas fa-file-code"
|
|
2212
|
+
}),
|
|
2213
|
+
" Export to JSON"
|
|
2214
|
+
]
|
|
2215
|
+
})
|
|
2220
2216
|
})
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2217
|
+
})
|
|
2218
|
+
]
|
|
2219
|
+
}),
|
|
2220
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2221
|
+
className: "ds-l-col--12 ds-u-display--flex ds-u-align-items--end ds-u-flex-direction--row-reverse ds-u-sm-flex-direction--row ds-u-padding-x--0 ds-u-margin-bottom--2 ds-u-flex-wrap--wrap",
|
|
2222
|
+
children: [
|
|
2223
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2224
|
+
className: "ds-l-col--12 ds-l-sm-col--8 ds-u-padding-x--0",
|
|
2225
|
+
children: !resource.loading && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
|
|
2226
|
+
totalRows: intCount,
|
|
2227
|
+
limit: limit,
|
|
2228
|
+
offset: offset
|
|
2229
|
+
})
|
|
2230
|
+
}),
|
|
2231
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2232
|
+
className: "ds-l-col--12 ds-l-sm-col--4 ds-u-display--flex ds-u-justify-content--end ds-u-padding-x--0",
|
|
2233
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2234
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
2235
|
+
options: rowOptions.map((row)=>({
|
|
2236
|
+
label: row.toString(),
|
|
2237
|
+
value: row
|
|
2238
|
+
})),
|
|
2239
|
+
size: "medium",
|
|
2240
|
+
label: "Rows per page:",
|
|
2241
|
+
labelClassName: "ds-u-margin-top--0",
|
|
2242
|
+
name: "datatable_rows_per_page",
|
|
2243
|
+
onChange: (e)=>{
|
|
2244
|
+
setLimit(parseInt(e.target.value));
|
|
2245
|
+
setPage(1);
|
|
2246
|
+
setOffset(0);
|
|
2247
|
+
},
|
|
2248
|
+
defaultValue: limit.toString()
|
|
2249
|
+
})
|
|
2250
|
+
})
|
|
2251
|
+
})
|
|
2252
|
+
]
|
|
2253
|
+
})
|
|
2254
|
+
]
|
|
2225
2255
|
});
|
|
2226
2256
|
};
|
|
2227
2257
|
var $6380a4a580b24362$export$2e2bcd8739ae039 = $6380a4a580b24362$var$DataTableHeader;
|
|
@@ -2637,18 +2667,12 @@ function $a35cf16d1488f54e$export$1147582dfae658c6(columns, schema) {
|
|
|
2637
2667
|
accessor: column
|
|
2638
2668
|
}));
|
|
2639
2669
|
}
|
|
2640
|
-
const $a35cf16d1488f54e$var$DatasetTable = ({ id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], jsonUrl: jsonUrl })=>{
|
|
2670
|
+
const $a35cf16d1488f54e$var$DatasetTable = ({ id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], jsonUrl: jsonUrl, dataDictionaryBanner: dataDictionaryBanner })=>{
|
|
2641
2671
|
const defaultPage = 1;
|
|
2642
2672
|
const defaultPageSize = 10;
|
|
2643
2673
|
const [page, setPage] = (0, $hgUW1$useState)(defaultPage);
|
|
2644
2674
|
const customColumnHeaders = (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution.identifier]);
|
|
2645
2675
|
const columns = customColumnHeaders ? customColumnHeaders : $a35cf16d1488f54e$export$1147582dfae658c6(resource.columns, resource.schema[id]);
|
|
2646
|
-
const rowOptions = [
|
|
2647
|
-
10,
|
|
2648
|
-
25,
|
|
2649
|
-
50,
|
|
2650
|
-
100
|
|
2651
|
-
];
|
|
2652
2676
|
const { limit: limit, setLimit: setLimit, setOffset: setOffset } = resource;
|
|
2653
2677
|
const pageSize = limit ? limit : defaultPageSize;
|
|
2654
2678
|
const downloadURL = `${rootUrl}/datastore/query/${id}/0/download?${(0, $hgUW1$qs).stringify({
|
|
@@ -2663,11 +2687,17 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ id: id, distribution: distribution
|
|
|
2663
2687
|
id: distribution.identifier,
|
|
2664
2688
|
customColumns: customColumnHeaders
|
|
2665
2689
|
}),
|
|
2690
|
+
dataDictionaryBanner && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2691
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
2692
|
+
children: 'Click on the "Data Dictionary" tab above for full column definitions'
|
|
2693
|
+
})
|
|
2694
|
+
}),
|
|
2666
2695
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $6380a4a580b24362$export$2e2bcd8739ae039), {
|
|
2667
2696
|
resource: resource,
|
|
2668
2697
|
downloadURL: downloadURL,
|
|
2669
2698
|
unfilteredDownloadURL: distribution.data.downloadURL,
|
|
2670
|
-
jsonUrl: jsonUrl
|
|
2699
|
+
jsonUrl: jsonUrl,
|
|
2700
|
+
setPage: setPage
|
|
2671
2701
|
}),
|
|
2672
2702
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2673
2703
|
className: "ds-u-border-x--1 ds-u-border-bottom--1",
|
|
@@ -2681,39 +2711,21 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ id: id, distribution: distribution
|
|
|
2681
2711
|
loading: resource.loading
|
|
2682
2712
|
})
|
|
2683
2713
|
}),
|
|
2684
|
-
!resource.loading && /*#__PURE__*/ (0, $hgUW1$
|
|
2714
|
+
!resource.loading && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2685
2715
|
className: "ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end ds-u-md-justify-content--between ds-u-margin-top--2 ds-u-align-items--center",
|
|
2686
|
-
children:
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
}),
|
|
2700
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
2701
|
-
options: rowOptions.map((row)=>({
|
|
2702
|
-
label: row.toString(),
|
|
2703
|
-
value: row
|
|
2704
|
-
})),
|
|
2705
|
-
size: "medium",
|
|
2706
|
-
label: "Rows per page:",
|
|
2707
|
-
labelClassName: "ds-u-margin-top--0",
|
|
2708
|
-
name: "datatable_rows_per_page",
|
|
2709
|
-
onChange: (e)=>{
|
|
2710
|
-
setLimit(parseInt(e.target.value));
|
|
2711
|
-
setPage(1);
|
|
2712
|
-
setOffset(0);
|
|
2713
|
-
},
|
|
2714
|
-
defaultValue: limit.toString()
|
|
2715
|
-
})
|
|
2716
|
-
]
|
|
2716
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
2717
|
+
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
2718
|
+
currentPage: page,
|
|
2719
|
+
onPageChange: (evt, page)=>{
|
|
2720
|
+
evt.preventDefault();
|
|
2721
|
+
setOffset((page - 1) * limit);
|
|
2722
|
+
setPage(page);
|
|
2723
|
+
},
|
|
2724
|
+
renderHref: (page)=>{
|
|
2725
|
+
return "";
|
|
2726
|
+
},
|
|
2727
|
+
className: "ds-l-col--12 ds-u-padding-x--0"
|
|
2728
|
+
})
|
|
2717
2729
|
})
|
|
2718
2730
|
]
|
|
2719
2731
|
});
|
|
@@ -3524,7 +3536,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl, additionalPa
|
|
|
3524
3536
|
dataDictionaryLoading: isPending
|
|
3525
3537
|
};
|
|
3526
3538
|
};
|
|
3527
|
-
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalParams: additionalParams, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false })=>{
|
|
3539
|
+
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalParams: additionalParams, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false })=>{
|
|
3528
3540
|
const options = location.search ? {
|
|
3529
3541
|
...(0, $hgUW1$qs).parse(location.search, {
|
|
3530
3542
|
ignoreQueryPrefix: true
|
|
@@ -3608,6 +3620,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
|
|
|
3608
3620
|
distribution,
|
|
3609
3621
|
window.location.hash
|
|
3610
3622
|
]);
|
|
3623
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
3611
3624
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
3612
3625
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
3613
3626
|
content: notFoundContent,
|
|
@@ -3678,7 +3691,8 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
|
|
|
3678
3691
|
distribution: distribution,
|
|
3679
3692
|
resource: resource,
|
|
3680
3693
|
rootUrl: rootUrl,
|
|
3681
|
-
customColumns: customColumns
|
|
3694
|
+
customColumns: customColumns,
|
|
3695
|
+
dataDictionaryBanner: dataDictionaryBanner && displayDataDictionaryTab
|
|
3682
3696
|
})
|
|
3683
3697
|
}),
|
|
3684
3698
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
@@ -3700,7 +3714,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
|
|
|
3700
3714
|
metadataMapping: metadataMapping
|
|
3701
3715
|
})
|
|
3702
3716
|
}),
|
|
3703
|
-
|
|
3717
|
+
displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
3704
3718
|
id: "data-dictionary",
|
|
3705
3719
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
3706
3720
|
className: "ds-u-color--primary",
|
|
@@ -3719,7 +3733,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
|
|
|
3719
3733
|
additionalParams: additionalParams,
|
|
3720
3734
|
csvDownload: dataDictionaryCSV
|
|
3721
3735
|
})
|
|
3722
|
-
})
|
|
3736
|
+
}),
|
|
3723
3737
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
3724
3738
|
id: "api",
|
|
3725
3739
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
@@ -5288,7 +5302,7 @@ const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding
|
|
|
5288
5302
|
className: "ds-l-col--12 ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center",
|
|
5289
5303
|
children: [
|
|
5290
5304
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5291
|
-
className: "ds-u-font-weight--bold",
|
|
5305
|
+
className: "ds-u-font-weight--bold ds-u-margin-bottom--2",
|
|
5292
5306
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
|
|
5293
5307
|
totalRows: parseInt(intCount),
|
|
5294
5308
|
limit: parseInt(limit),
|