@civicactions/cmsds-open-data-components 3.6.0-rc.3 → 3.6.0-rc.4

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 CHANGED
@@ -19,7 +19,6 @@ import {restrictToVerticalAxis as $hgUW1$restrictToVerticalAxis} from "@dnd-kit/
19
19
  import {CSS as $hgUW1$CSS} from "@dnd-kit/utilities";
20
20
  import $hgUW1$reactdatepicker from "react-datepicker";
21
21
  import "react-datepicker/dist/react-datepicker.css";
22
- import {usePopper as $hgUW1$usePopper} from "react-popper";
23
22
 
24
23
  // Components
25
24
 
@@ -1731,7 +1730,6 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
1731
1730
 
1732
1731
 
1733
1732
 
1734
-
1735
1733
  const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl, additionalParams = {})=>{
1736
1734
  const [dataset, setDataset] = (0, $hgUW1$useState)({
1737
1735
  title: "",
@@ -3470,7 +3468,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
3470
3468
  });
3471
3469
  const [highlightRow, setHighlightRow] = (0, $hgUW1$useState)(null);
3472
3470
  (0, $hgUW1$useEffect)(()=>{
3473
- if (!columnOrder.length) setColumnOrder(table_columns.map((c)=>c.accessorKey));
3471
+ if (columnOrder && !columnOrder.length) setColumnOrder(table_columns.map((c)=>c.accessorKey));
3474
3472
  }, [
3475
3473
  columnOrder
3476
3474
  ]);
@@ -4148,7 +4146,7 @@ function $ee4ad47aa483e5b5$var$updateQueryForDatastore(condition) {
4148
4146
  if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
4149
4147
  return cond;
4150
4148
  }
4151
- const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, includeSearchParams: includeSearchParams = true, customColumns: customColumns, isModal: isModal = false })=>{
4149
+ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, isModal: isModal = false })=>{
4152
4150
  const { conditions: conditions, schema: schema, setConditions: setConditions } = resource;
4153
4151
  const fields = Object.keys(schema[id].fields);
4154
4152
  const [queryConditions, setQueryConditions] = (0, $hgUW1$useState)([]);
@@ -4205,16 +4203,14 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, includ
4205
4203
  };
4206
4204
  });
4207
4205
  const updateBrowserURL = (newConditions)=>{
4208
- if (includeSearchParams) {
4209
- const url = new URL(window.location.href);
4210
- const urlString = (0, $hgUW1$qs).stringify({
4211
- conditions: newConditions
4212
- }, {
4213
- encodeValuesOnly: true,
4214
- addQueryPrefix: true
4215
- });
4216
- window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
4217
- }
4206
+ const url = new URL(window.location.href);
4207
+ const urlString = (0, $hgUW1$qs).stringify({
4208
+ conditions: newConditions
4209
+ }, {
4210
+ encodeValuesOnly: true,
4211
+ addQueryPrefix: true
4212
+ });
4213
+ window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
4218
4214
  };
4219
4215
  const submitConditions = (e)=>{
4220
4216
  // only update the data conditions when "Apply filters" is pressed
@@ -4421,6 +4417,40 @@ var $39bc4d98030a5599$export$2e2bcd8739ae039 = $39bc4d98030a5599$var$DataTableSt
4421
4417
 
4422
4418
 
4423
4419
 
4420
+
4421
+
4422
+
4423
+ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution, dataset: dataset, resource: resource, customDescription: customDescription, updateAriaLive: updateAriaLive })=>{
4424
+ const [description, setDescription] = (0, $hgUW1$useState)("");
4425
+ if (!distribution && !dataset?.identifier) return null;
4426
+ (0, $hgUW1$useEffect)(()=>{
4427
+ let newDescription = "";
4428
+ if (customDescription) newDescription = customDescription(dataset, distribution, resource);
4429
+ else {
4430
+ if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
4431
+ else if (dataset.description) newDescription = dataset.description;
4432
+ }
4433
+ if (description !== newDescription && updateAriaLive) updateAriaLive(newDescription);
4434
+ setDescription(newDescription);
4435
+ }, [
4436
+ resource,
4437
+ distribution,
4438
+ dataset,
4439
+ customDescription
4440
+ ]);
4441
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4442
+ className: "ds-u-measure--wide ds-u-margin-bottom--7",
4443
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4444
+ className: "ds-u-margin-top--0 dc-c-metadata-description",
4445
+ dangerouslySetInnerHTML: {
4446
+ __html: (0, $hgUW1$dompurify).sanitize(description)
4447
+ }
4448
+ })
4449
+ });
4450
+ };
4451
+ var $2bd73bb95b0c04ed$export$2e2bcd8739ae039 = $2bd73bb95b0c04ed$var$DatasetDescription;
4452
+
4453
+
4424
4454
  const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl, additionalParams)=>{
4425
4455
  const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
4426
4456
  queryKey: [
@@ -4438,7 +4468,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl, additionalPa
4438
4468
  dataDictionaryLoading: isPending
4439
4469
  };
4440
4470
  };
4441
- 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, disableTableControls: disableTableControls = false })=>{
4471
+ 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, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive })=>{
4442
4472
  const options = location.search ? {
4443
4473
  ...(0, $hgUW1$qs).parse(location.search, {
4444
4474
  ignoreQueryPrefix: true
@@ -4554,14 +4584,12 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
4554
4584
  }),
4555
4585
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4556
4586
  className: "ds-l-md-col--9",
4557
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4558
- className: "ds-u-measure--wide ds-u-margin-bottom--7",
4559
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4560
- className: "dc-c-metadata-description ds-u-margin--0",
4561
- dangerouslySetInnerHTML: {
4562
- __html: (0, $hgUW1$dompurify).sanitize(dataset.description)
4563
- }
4564
- })
4587
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
4588
+ distribution: distribution,
4589
+ dataset: dataset,
4590
+ resource: resource,
4591
+ customDescription: customDescription,
4592
+ updateAriaLive: updateAriaLive
4565
4593
  })
4566
4594
  })
4567
4595
  ]
@@ -4620,7 +4648,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
4620
4648
  metadataMapping: metadataMapping
4621
4649
  })
4622
4650
  }),
4623
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
4651
+ !hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
4624
4652
  id: "data-dictionary",
4625
4653
  tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
4626
4654
  className: "ds-u-color--primary",
@@ -5627,8 +5655,6 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
5627
5655
 
5628
5656
 
5629
5657
 
5630
-
5631
-
5632
5658
  const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePadding, tablePadding: tablePadding })=>{
5633
5659
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5634
5660
  className: "ds-u-display--flex",
@@ -5784,122 +5810,96 @@ var $ec9e1550b0b034d0$export$2e2bcd8739ae039 = $ec9e1550b0b034d0$var$SettingsIco
5784
5810
 
5785
5811
 
5786
5812
 
5787
- const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding, id: id, distribution: distribution, includeFiltered: includeFiltered, includeDensity: includeDensity, includeDownload: includeDownload, resource: resource, tablePadding: tablePadding, downloadUrl: downloadUrl })=>{
5813
+ const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding, includeDensity: includeDensity, includeDownload: includeDownload, resource: resource, tablePadding: tablePadding, downloadUrl: downloadUrl })=>{
5788
5814
  const md = (0, $hgUW1$useMediaQuery)({
5789
5815
  minWidth: 0,
5790
5816
  maxWidth: 768
5791
5817
  });
5792
5818
  const { limit: limit, offset: offset, count: count, setLimit: setLimit, setOffset: setOffset } = resource;
5793
5819
  const intCount = count ? parseInt(count) : 0;
5794
- const [referenceElement, setReferenceElement] = (0, $hgUW1$useState)(null);
5795
- const [popperElement, setPopperElement] = (0, $hgUW1$useState)(null);
5796
- const [arrowElement, setArrowElement] = (0, $hgUW1$useState)(null);
5797
- const { styles: styles, attributes: attributes } = (0, $hgUW1$usePopper)(referenceElement, popperElement, {
5798
- modifiers: [
5799
- {
5800
- name: "arrow",
5801
- options: {
5802
- element: arrowElement
5803
- }
5804
- }
5805
- ]
5806
- });
5807
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5820
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5808
5821
  className: "dc-c-resource-header",
5809
- children: [
5810
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5811
- className: "ds-l-row",
5812
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5813
- className: "ds-l-col--12",
5814
- children: includeFiltered && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
5815
- className: "ds-c-button ds-c-button--solid",
5816
- to: `/dataset/${id}/data`,
5817
- children: "View and filter data"
5818
- })
5819
- })
5820
- }),
5821
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5822
- className: "ds-l-row ds-u-align-items--center",
5823
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5824
- className: "ds-l-col--12 ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center",
5825
- children: [
5826
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5827
- className: "ds-u-font-weight--bold ds-u-margin-bottom--2",
5828
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
5829
- totalRows: parseInt(intCount),
5830
- limit: parseInt(limit),
5831
- offset: parseInt(offset)
5832
- })
5833
- }),
5834
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5835
- className: "dc-c-resource-header--buttons",
5836
- children: [
5837
- includeDownload && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
5838
- children: [
5839
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
5840
- size: "small",
5841
- className: "ds-u-text-align--left ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1",
5842
- href: downloadUrl,
5843
- children: [
5844
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e973bc477cdc2dc7$export$2e2bcd8739ae039), {}),
5845
- !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5846
- className: "ds-u-font-weight--semibold ds-u-margin-left--1",
5847
- children: "Download filtered data (CSV)"
5848
- })
5849
- ]
5850
- }),
5851
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
5852
- onOpen: ()=>{
5853
- navigator.clipboard.writeText(window.location.href);
5854
- },
5855
- className: "ds-c-button ds-c-button--small ds-u-text-align--left ds-u-margin-right--1 display-settings-font",
5856
- placement: "bottom",
5857
- dialog: true,
5858
- ariaLabel: "Copy link to filtered data",
5859
- title: "Link copied to clipboard",
5860
- children: [
5861
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7ec5423a30aa3f61$export$2e2bcd8739ae039), {}),
5862
- !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5863
- className: "ds-u-font-weight--semibold ds-u-margin-left--1",
5864
- children: "Copy link to filtered data"
5865
- })
5866
- ]
5867
- })
5868
- ]
5869
- }),
5870
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
5871
- className: "ds-c-button ds-c-button--small ds-u-text-align--left display-settings-font",
5872
- placement: "bottom",
5873
- dialog: true,
5874
- ariaLabel: "Display settings",
5875
- title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5876
- className: "dc-c-display-settings",
5822
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5823
+ className: "ds-l-row ds-u-align-items--center",
5824
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5825
+ className: "ds-l-col--12 ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-margin-bottom--2",
5826
+ children: [
5827
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5828
+ className: "ds-u-font-weight--bold",
5829
+ children: !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
5830
+ totalRows: parseInt(intCount),
5831
+ limit: parseInt(limit),
5832
+ offset: parseInt(offset)
5833
+ })
5834
+ }),
5835
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5836
+ className: "dc-c-resource-header--buttons",
5837
+ children: [
5838
+ includeDownload && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
5839
+ children: [
5840
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
5841
+ size: "small",
5842
+ className: "ds-u-text-align--left ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1",
5843
+ href: downloadUrl,
5877
5844
  children: [
5878
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7848c69a021266f7$export$2e2bcd8739ae039), {
5879
- limit: limit,
5880
- setLimit: setLimit,
5881
- setOffset: setOffset
5882
- }),
5883
- includeDensity && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $1e012d1e3b534af0$export$2e2bcd8739ae039), {
5884
- setTablePadding: setTablePadding,
5885
- tablePadding: tablePadding
5845
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e973bc477cdc2dc7$export$2e2bcd8739ae039), {}),
5846
+ !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5847
+ className: "ds-u-font-weight--semibold ds-u-margin-left--1",
5848
+ children: "Download filtered data (CSV)"
5886
5849
  })
5887
5850
  ]
5888
5851
  }),
5852
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
5853
+ onOpen: ()=>{
5854
+ navigator.clipboard.writeText(window.location.href);
5855
+ },
5856
+ className: "ds-c-button ds-c-button--small ds-u-text-align--left ds-u-margin-right--1 display-settings-font",
5857
+ placement: "bottom",
5858
+ dialog: true,
5859
+ ariaLabel: "Copy link to filtered data",
5860
+ title: "Link copied to clipboard",
5861
+ children: [
5862
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7ec5423a30aa3f61$export$2e2bcd8739ae039), {}),
5863
+ !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5864
+ className: "ds-u-font-weight--semibold ds-u-margin-left--1",
5865
+ children: "Copy link to filtered data"
5866
+ })
5867
+ ]
5868
+ })
5869
+ ]
5870
+ }),
5871
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
5872
+ className: "ds-c-button ds-c-button--small ds-u-text-align--left display-settings-font",
5873
+ placement: "bottom",
5874
+ dialog: true,
5875
+ ariaLabel: "Display settings",
5876
+ title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5877
+ className: "dc-c-display-settings",
5889
5878
  children: [
5890
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $ec9e1550b0b034d0$export$2e2bcd8739ae039), {}),
5891
- !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5892
- className: "ds-u-font-weight--semibold ds-u-margin-left--1",
5893
- children: "Display settings"
5879
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7848c69a021266f7$export$2e2bcd8739ae039), {
5880
+ limit: Number(limit),
5881
+ setLimit: setLimit,
5882
+ setOffset: setOffset
5883
+ }),
5884
+ includeDensity && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $1e012d1e3b534af0$export$2e2bcd8739ae039), {
5885
+ setTablePadding: setTablePadding,
5886
+ tablePadding: tablePadding
5894
5887
  })
5895
5888
  ]
5896
- })
5897
- ]
5898
- })
5899
- ]
5900
- })
5889
+ }),
5890
+ children: [
5891
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $ec9e1550b0b034d0$export$2e2bcd8739ae039), {}),
5892
+ !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5893
+ className: "ds-u-font-weight--semibold ds-u-margin-left--1",
5894
+ children: "Display settings"
5895
+ })
5896
+ ]
5897
+ })
5898
+ ]
5899
+ })
5900
+ ]
5901
5901
  })
5902
- ]
5902
+ })
5903
5903
  });
5904
5904
  };
5905
5905
  var $af099c546cb226c7$export$2e2bcd8739ae039 = $af099c546cb226c7$var$ResourceHeader;
@@ -5940,6 +5940,7 @@ const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id:
5940
5940
  columns: customColumns ? customColumns : $626282d9a03c51d5$export$1147582dfae658c6(resource.columns, resource.schema[id]),
5941
5941
  sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
5942
5942
  tablePadding: tablePadding,
5943
+ loading: resource.loading,
5943
5944
  className: "dc-c-datatable",
5944
5945
  customColumnFilter: $626282d9a03c51d5$var$DefaultColumnFilter
5945
5946
  })
@@ -5955,7 +5956,6 @@ const $072291d44ce1834a$var$ResourceFooter = ({ resource: resource })=>{
5955
5956
  const { limit: limit, values: values, offset: offset, count: count, setOffset: setOffset } = resource;
5956
5957
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5957
5958
  children: values.length > 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
5958
- id: "test-default",
5959
5959
  currentPage: Number(offset) / limit + 1,
5960
5960
  totalPages: Math.ceil(Number(count) / limit),
5961
5961
  onPageChange: (evt, page)=>{
@@ -6178,7 +6178,7 @@ function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
6178
6178
  if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
6179
6179
  return cond;
6180
6180
  }
6181
- const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, includeSearchParams: includeSearchParams = true, customColumns: customColumns })=>{
6181
+ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns })=>{
6182
6182
  const { conditions: conditions, schema: schema, setConditions: setConditions } = resource;
6183
6183
  const fields = Object.keys(schema[id].fields);
6184
6184
  const [queryConditions, setQueryConditions] = (0, $hgUW1$useState)([]);
@@ -6227,16 +6227,14 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, includ
6227
6227
  setConditions(submitConditions);
6228
6228
  setTitleConditions(queryConditions.map((oc)=>Object.assign({}, oc)));
6229
6229
  setConditionsChanged(false);
6230
- if (includeSearchParams) {
6231
- const url = new URL(window.location);
6232
- const urlString = (0, $hgUW1$qs).stringify({
6233
- conditions: submitConditions
6234
- }, {
6235
- encodeValuesOnly: true,
6236
- addQueryPrefix: true
6237
- });
6238
- window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
6239
- }
6230
+ const url = new URL(window.location);
6231
+ const urlString = (0, $hgUW1$qs).stringify({
6232
+ conditions: submitConditions
6233
+ }, {
6234
+ encodeValuesOnly: true,
6235
+ addQueryPrefix: true
6236
+ });
6237
+ window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
6240
6238
  };
6241
6239
  const updateCondition = (index, key, value)=>{
6242
6240
  let newConditions = [
@@ -6306,28 +6304,8 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
6306
6304
 
6307
6305
 
6308
6306
 
6309
- const $de780c924c98fa31$var$FilteredResourceDescription = ({ distribution: distribution, dataset: dataset })=>{
6310
- if (!distribution && !dataset) return null;
6311
- let description = "";
6312
- if (distribution.data && distribution.data.description) description = distribution.data.description;
6313
- else if (dataset.description) description = dataset.description;
6314
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6315
- className: "ds-u-measure--wide ds-u-margin-bottom--7",
6316
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6317
- className: "ds-u-margin-top--0 dc-c-metadata-description",
6318
- dangerouslySetInnerHTML: {
6319
- __html: (0, $hgUW1$dompurify).sanitize(description)
6320
- }
6321
- })
6322
- });
6323
- };
6324
- var $de780c924c98fa31$export$2e2bcd8739ae039 = $de780c924c98fa31$var$FilteredResourceDescription;
6325
-
6326
6307
 
6327
-
6328
-
6329
-
6330
- const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset, distIndex: distIndex, location: location, additionalParams: additionalParams, customColumns: customColumns, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, rootUrl: rootUrl })=>{
6308
+ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset, distIndex: distIndex, location: location, additionalParams: additionalParams, customColumns: customColumns, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, customDescription: customDescription, rootUrl: rootUrl, updateAriaLive: updateAriaLive })=>{
6331
6309
  const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
6332
6310
  let apiDocs = (0, $hgUW1$useRef)();
6333
6311
  let distribution = {};
@@ -6393,9 +6371,12 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
6393
6371
  }),
6394
6372
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6395
6373
  className: "ds-l-md-col--9",
6396
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $de780c924c98fa31$export$2e2bcd8739ae039), {
6374
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
6397
6375
  distribution: distribution,
6398
- dataset: dataset
6376
+ dataset: dataset,
6377
+ resource: resource,
6378
+ customDescription: customDescription,
6379
+ updateAriaLive: updateAriaLive
6399
6380
  })
6400
6381
  }),
6401
6382
  Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
@@ -6420,32 +6401,19 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
6420
6401
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
6421
6402
  includeDensity: true,
6422
6403
  setTablePadding: setTablePadding,
6423
- distribution: distribution,
6424
6404
  resource: resource,
6425
6405
  downloadUrl: downloadUrl,
6426
6406
  tablePadding: tablePadding,
6427
6407
  includeDownload: true
6428
6408
  }),
6429
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $ebda441784d176a5$export$2e2bcd8739ae039).Provider, {
6430
- value: {
6431
- columnOrder: [],
6432
- setColumnOrder: ()=>{},
6433
- columnVisibility: {},
6434
- setColumnVisibility: ()=>{},
6435
- page: 1,
6436
- setPage: ()=>{}
6437
- },
6438
- children: [
6439
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $626282d9a03c51d5$export$2e2bcd8739ae039), {
6440
- id: distribution.identifier,
6441
- tablePadding: tablePadding,
6442
- columnSettings: columnSettings,
6443
- columnWidths: columnWidths
6444
- }),
6445
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $072291d44ce1834a$export$2e2bcd8739ae039), {
6446
- resource: resource
6447
- })
6448
- ]
6409
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $626282d9a03c51d5$export$2e2bcd8739ae039), {
6410
+ id: distribution.identifier,
6411
+ tablePadding: tablePadding,
6412
+ columnSettings: columnSettings,
6413
+ columnWidths: columnWidths
6414
+ }),
6415
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $072291d44ce1834a$export$2e2bcd8739ae039), {
6416
+ resource: resource
6449
6417
  })
6450
6418
  ]
6451
6419
  })
@@ -6478,7 +6446,7 @@ var $dd6eb2b30d7ad75d$export$2e2bcd8739ae039 = $dd6eb2b30d7ad75d$var$FilteredRes
6478
6446
 
6479
6447
 
6480
6448
 
6481
- const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, location: location, apiDocPage: apiDocPage, additionalParams: additionalParams, customColumns: customColumns, setDatasetTitle: setDatasetTitle, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, rootUrl: rootUrl })=>{
6449
+ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, location: location, apiDocPage: apiDocPage, additionalParams: additionalParams, customColumns: customColumns, setDatasetTitle: setDatasetTitle, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, customDescription: customDescription, rootUrl: rootUrl, updateAriaLive: updateAriaLive })=>{
6482
6450
  const [ready, setReady] = (0, $hgUW1$useState)(false);
6483
6451
  const [error, setError] = (0, $hgUW1$useState)(false);
6484
6452
  const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl, additionalParams);
@@ -6541,7 +6509,9 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
6541
6509
  columnSettings: columnSettings,
6542
6510
  columnWidths: columnWidths,
6543
6511
  customTitle: customTitle,
6544
- rootUrl: rootUrl
6512
+ customDescription: customDescription,
6513
+ rootUrl: rootUrl,
6514
+ updateAriaLive: updateAriaLive
6545
6515
  })
6546
6516
  })
6547
6517
  });