@civicactions/cmsds-open-data-components 3.2.1 → 3.2.2-alpha.1

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
@@ -159,6 +159,58 @@ var $f57121650539d8c5$export$2e2bcd8739ae039 = $f57121650539d8c5$var$NavBar;
159
159
 
160
160
 
161
161
 
162
+ class $c49454ea7d1c4579$var$ErrorBoundary extends (0, $hgUW1$react).Component {
163
+ constructor(props){
164
+ super(props);
165
+ this.state = {
166
+ hasError: false,
167
+ error: undefined
168
+ };
169
+ }
170
+ static getDerivedStateFromError(error) {
171
+ // Update state so the next render will show the fallback UI.
172
+ return {
173
+ hasError: true,
174
+ error: error
175
+ };
176
+ }
177
+ componentDidCatch(error, info) {
178
+ // TODO report to logging solution
179
+ console.error({
180
+ error: error,
181
+ info: info
182
+ });
183
+ }
184
+ render() {
185
+ if (this.props.component) {
186
+ if (this.state.hasError) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
187
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
188
+ children: "We're sorry, the site has encountered an unexpected error."
189
+ })
190
+ });
191
+ return this.props.children;
192
+ }
193
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
194
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
195
+ className: "ds-l-container",
196
+ children: [
197
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
198
+ className: "ds-text-heading--2xl",
199
+ children: "Error"
200
+ }),
201
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
202
+ children: "We're sorry, the site has encountered an unexpected error."
203
+ })
204
+ ]
205
+ })
206
+ });
207
+ }
208
+ }
209
+ var $c49454ea7d1c4579$export$2e2bcd8739ae039 = $c49454ea7d1c4579$var$ErrorBoundary;
210
+
211
+
212
+
213
+
162
214
 
163
215
 
164
216
 
@@ -1844,6 +1896,10 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ data: data, columns: columns, setSort
1844
1896
  "aria-live": "assertive",
1845
1897
  "aria-atomic": "true",
1846
1898
  children: ariaLiveFeedback
1899
+ }),
1900
+ !loading && table.getRowModel().rows.length === 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
1901
+ variation: "warn",
1902
+ children: "No results found for the current filters"
1847
1903
  })
1848
1904
  ]
1849
1905
  });
@@ -2408,7 +2464,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = (props)=>{
2408
2464
  ]);
2409
2465
  };
2410
2466
  (0, $hgUW1$react).useEffect(()=>{
2411
- if (conditions.length) addCondition(conditions);
2467
+ if (conditions && conditions.length) addCondition(conditions);
2412
2468
  else addCondition(null);
2413
2469
  setTitleConditions(conditions);
2414
2470
  }, []);
@@ -3136,6 +3192,10 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
3136
3192
  "aria-live": "assertive",
3137
3193
  "aria-atomic": "true",
3138
3194
  children: ariaLiveFeedback
3195
+ }),
3196
+ table.getRowModel().rows.length === 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
3197
+ variation: "warn",
3198
+ children: "No results found for the current filters"
3139
3199
  })
3140
3200
  ]
3141
3201
  }),
@@ -5964,5 +6024,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
5964
6024
 
5965
6025
 
5966
6026
 
5967
- export {$f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $a5a6a06d249c33b8$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $789279954d8eff7f$export$2e2bcd8739ae039 as ApiDocumentation, $af099c546cb226c7$export$2e2bcd8739ae039 as ResourceHeader, $626282d9a03c51d5$export$2e2bcd8739ae039 as ResourcePreview, $072291d44ce1834a$export$2e2bcd8739ae039 as ResourceFooter, $ec3e23baa005dc03$export$2e2bcd8739ae039 as Breadcrumb, $bd76a91923d7e8a7$export$2e2bcd8739ae039 as TransformedDate, $d98f94c79ddf4e0e$export$2e2bcd8739ae039 as DataTable, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $f61ecf9f84951a61$export$2e2bcd8739ae039 as FilteredResource, $bef7bff2823feea2$export$2e2bcd8739ae039 as QueryTitle, $7264a673914aa746$export$2b9377795161999 as buildOperatorOptions, $7264a673914aa746$export$e284ae5d89467c8f as convertUTCToLocalDate, $7264a673914aa746$export$6b5e57d20078142b as cleanText, $7264a673914aa746$export$8049e8f40a9bdfb8 as buildCustomColHeaders, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText};
6027
+ export {$f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $a5a6a06d249c33b8$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $789279954d8eff7f$export$2e2bcd8739ae039 as ApiDocumentation, $af099c546cb226c7$export$2e2bcd8739ae039 as ResourceHeader, $626282d9a03c51d5$export$2e2bcd8739ae039 as ResourcePreview, $072291d44ce1834a$export$2e2bcd8739ae039 as ResourceFooter, $ec3e23baa005dc03$export$2e2bcd8739ae039 as Breadcrumb, $bd76a91923d7e8a7$export$2e2bcd8739ae039 as TransformedDate, $d98f94c79ddf4e0e$export$2e2bcd8739ae039 as DataTable, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $f61ecf9f84951a61$export$2e2bcd8739ae039 as FilteredResource, $bef7bff2823feea2$export$2e2bcd8739ae039 as QueryTitle, $7264a673914aa746$export$2b9377795161999 as buildOperatorOptions, $7264a673914aa746$export$e284ae5d89467c8f as convertUTCToLocalDate, $7264a673914aa746$export$6b5e57d20078142b as cleanText, $7264a673914aa746$export$8049e8f40a9bdfb8 as buildCustomColHeaders, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText};
5968
6028
  //# sourceMappingURL=main.js.map