@civicactions/cmsds-open-data-components 4.1.0-alpha.10 → 4.1.0-alpha.12

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
@@ -1,7 +1,7 @@
1
1
  import "./main.css";
2
2
  import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
3
3
  import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Dropdown as $hgUW1$Dropdown, Pagination as $hgUW1$Pagination, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Choice as $hgUW1$Choice, Table as $hgUW1$Table, TableHead as $hgUW1$TableHead, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableBody as $hgUW1$TableBody, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, ExternalLinkIcon as $hgUW1$ExternalLinkIcon, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
4
- import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useContext as $hgUW1$useContext, useCallback as $hgUW1$useCallback, useMemo as $hgUW1$useMemo} from "react";
4
+ import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useContext as $hgUW1$useContext, useMemo as $hgUW1$useMemo, useCallback as $hgUW1$useCallback} from "react";
5
5
  import {NavLink as $hgUW1$NavLink, Link as $hgUW1$Link, useNavigate as $hgUW1$useNavigate, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams} from "react-router-dom";
6
6
  import $hgUW1$qs from "qs";
7
7
  import $hgUW1$axios from "axios";
@@ -9,24 +9,24 @@ import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryCli
9
9
  import {useMediaQuery as $hgUW1$useMediaQuery} from "react-responsive";
10
10
  import $hgUW1$dompurify from "dompurify";
11
11
  import $hgUW1$lodashtruncate from "lodash.truncate";
12
- import $hgUW1$swaggeruireact from "swagger-ui-react";
13
- import "swagger-ui-react/swagger-ui.css";
14
- import {List as $hgUW1$List, Map as $hgUW1$Map} from "immutable";
15
12
  import $hgUW1$proptypes from "prop-types";
16
- import {createColumnHelper as $hgUW1$createColumnHelper, useReactTable as $hgUW1$useReactTable, getCoreRowModel as $hgUW1$getCoreRowModel, getSortedRowModel as $hgUW1$getSortedRowModel, flexRender as $hgUW1$flexRender, getFilteredRowModel as $hgUW1$getFilteredRowModel, getPaginationRowModel as $hgUW1$getPaginationRowModel} from "@tanstack/react-table";
17
13
  import {KeyboardSensor as $hgUW1$KeyboardSensor, PointerSensor as $hgUW1$PointerSensor, useSensors as $hgUW1$useSensors, useSensor as $hgUW1$useSensor, DndContext as $hgUW1$DndContext, closestCenter as $hgUW1$closestCenter} from "@dnd-kit/core";
18
14
  import {sortableKeyboardCoordinates as $hgUW1$sortableKeyboardCoordinates, arrayMove as $hgUW1$arrayMove, SortableContext as $hgUW1$SortableContext, verticalListSortingStrategy as $hgUW1$verticalListSortingStrategy, useSortable as $hgUW1$useSortable} from "@dnd-kit/sortable";
19
15
  import {restrictToVerticalAxis as $hgUW1$restrictToVerticalAxis} from "@dnd-kit/modifiers";
20
16
  import {CSS as $hgUW1$CSS} from "@dnd-kit/utilities";
17
+ import {createColumnHelper as $hgUW1$createColumnHelper, useReactTable as $hgUW1$useReactTable, getCoreRowModel as $hgUW1$getCoreRowModel, getSortedRowModel as $hgUW1$getSortedRowModel, flexRender as $hgUW1$flexRender, getFilteredRowModel as $hgUW1$getFilteredRowModel, getPaginationRowModel as $hgUW1$getPaginationRowModel} from "@tanstack/react-table";
21
18
  import $hgUW1$reactdatepicker from "react-datepicker";
22
19
  import "react-datepicker/dist/react-datepicker.css";
20
+ import $hgUW1$swaggeruireact from "swagger-ui-react";
21
+ import {SpanOpenAPIVersion as $hgUW1$SpanOpenAPIVersion, SpanVersionStamp as $hgUW1$SpanVersionStamp} from "@civicactions/swagger-ui-layout";
22
+ import "swagger-ui-react/swagger-ui.css";
23
23
 
24
24
  // Components
25
25
 
26
26
 
27
27
  function $e49d4387bed21287$export$2e2bcd8739ae039() {
28
28
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
29
- className: "ds-u-padding-top--3 ds-u-margin-bottom--2",
29
+ className: "ds-u-padding-top--3",
30
30
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
31
31
  bordered: true,
32
32
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
@@ -911,10 +911,10 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
911
911
  })
912
912
  };
913
913
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
914
- className: "dataset-date-item ds-l-sm-col--auto ds-l-col--12 ds-u-padding--0",
914
+ className: `dataset-date-item${boldLabel ? ' bold-label' : ''}`,
915
915
  children: [
916
916
  /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
917
- className: `dataset-date-item-label ${boldLabel ? 'ds-u-font-weight--bold' : ''}`,
917
+ className: "dataset-data-item-label",
918
918
  children: [
919
919
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
920
920
  children: dateText[type]
@@ -927,7 +927,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
927
927
  }),
928
928
  displayTooltips === true && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
929
929
  "aria-label": dateText[type],
930
- className: "ds-c-tooltip__trigger-icon ds-u-display--inline ds-u-padding-left--0 ds-uw-padding-right--0 ds-u-font-weight--normal",
930
+ className: "ds-c-tooltip__trigger-icon ds-u-display--inline ds-u-padding-left--0 ds-uw-padding-right--0",
931
931
  title: tooltipContent[type],
932
932
  placement: "top",
933
933
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
@@ -938,24 +938,31 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
938
938
  var $17711e94d2ce0ee4$export$2e2bcd8739ae039 = $17711e94d2ce0ee4$var$DatasetDateItem;
939
939
 
940
940
 
941
-
942
941
  const $20de4fedf33d4f9a$var$DatasetDate = (props)=>{
943
- const { date: date, modifiedBoldLabel: modifiedBoldLabel = false, releasedBoldLabel: releasedBoldLabel = false, refreshBoldLabel: refreshBoldLabel = false, displayTooltips: displayTooltips = true } = props;
942
+ const { date: date, updatedBoldLabel: updatedBoldLabel = false, releasedBoldLabel: releasedBoldLabel = false, refreshBoldLabel: refreshBoldLabel = false, displayTooltips: displayTooltips = true } = props;
943
+ const { modified: modified, released: released, refresh: refresh } = date;
944
944
  // Create an array of date items to render
945
945
  const dateItems = [];
946
- Object.entries(date).forEach(([key, value])=>{
947
- if (value) {
948
- const bold = key === "modified" && modifiedBoldLabel || key === "released" && releasedBoldLabel || key === "refresh" && refreshBoldLabel;
949
- dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
950
- type: key,
951
- displayTooltips: displayTooltips,
952
- date: value,
953
- boldLabel: bold
954
- }, key));
955
- }
956
- });
946
+ if (modified) dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
947
+ displayTooltips: displayTooltips,
948
+ type: "modified",
949
+ date: modified,
950
+ boldLabel: updatedBoldLabel
951
+ }, "modified"));
952
+ if (released) dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
953
+ displayTooltips: displayTooltips,
954
+ type: "released",
955
+ date: released,
956
+ boldLabel: releasedBoldLabel
957
+ }, "released"));
958
+ if (refresh) dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
959
+ displayTooltips: displayTooltips,
960
+ type: "refresh",
961
+ date: refresh,
962
+ boldLabel: refreshBoldLabel
963
+ }, "refresh"));
957
964
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
958
- className: "dataset-date ds-u-display--flex ds-u-flex-wrap--wrap ds-u-font-size--sm ds-u-align-items--start",
965
+ className: "dataset-date",
959
966
  children: dateItems.map((item, index)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$react).Fragment, {
960
967
  children: [
961
968
  item,
@@ -1427,7 +1434,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
1427
1434
  const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
1428
1435
  defaultSort: 'modified',
1429
1436
  defaultOrder: 'desc'
1430
- }, pageTitle: pageTitle = 'Dataset Explorer', categoriesTitle: categoriesTitle = 'Categories', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false, showDateDetails: showDateDetails = false, showTopics: showTopics = false, topicSlugFunction: topicSlugFunction } = props;
1437
+ }, pageTitle: pageTitle = 'Dataset Explorer', categoriesTitle: categoriesTitle = 'Categories', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false, showDateDetails: showDateDetails = false, showTopics: showTopics = false, topicSlugFunction: topicSlugFunction, children: children } = props;
1431
1438
  const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
1432
1439
  const sortOptions = [
1433
1440
  {
@@ -1645,6 +1652,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
1645
1652
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1646
1653
  className: "ds-l-col--12",
1647
1654
  children: [
1655
+ children,
1648
1656
  introText ? introText : null,
1649
1657
  showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1650
1658
  className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
@@ -2389,630 +2397,6 @@ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetList
2389
2397
 
2390
2398
 
2391
2399
 
2392
- const $5b656f0283afa250$var$SpanOpenAPIVersion = function(system) {
2393
- return {
2394
- wrapComponents: {
2395
- OpenAPIVersion: (Original, system)=>(props)=>{
2396
- const classList = "version version-stamp version-stamp--openapi version-stamp--span";
2397
- let { oasVersion: oasVersion } = props;
2398
- if (typeof system.specSelectors?.isOAS31 === "function") {
2399
- if (system.specSelectors.isOAS31()) return /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2400
- className: classList,
2401
- children: "OAS 3.1"
2402
- });
2403
- }
2404
- if (typeof system.specSelectors?.isOAS30 === "function") {
2405
- if (system.specSelectors.isOAS30()) return /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2406
- className: classList,
2407
- children: "OAS 3.0"
2408
- });
2409
- }
2410
- return /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2411
- className: classList,
2412
- children: oasVersion
2413
- });
2414
- }
2415
- }
2416
- };
2417
- };
2418
- var $5b656f0283afa250$export$2e2bcd8739ae039 = $5b656f0283afa250$var$SpanOpenAPIVersion;
2419
-
2420
-
2421
-
2422
- const $ffd9c403a1c2fc39$var$SpanVersionStamp = function(system) {
2423
- return {
2424
- wrapComponents: {
2425
- VersionStamp: (Original, system)=>(props)=>{
2426
- const classList = "version version-stamp version-stamp--span";
2427
- const { version: version } = props;
2428
- return /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2429
- className: classList,
2430
- children: version
2431
- });
2432
- }
2433
- }
2434
- };
2435
- };
2436
- var $ffd9c403a1c2fc39$export$2e2bcd8739ae039 = $ffd9c403a1c2fc39$var$SpanVersionStamp;
2437
-
2438
-
2439
-
2440
-
2441
-
2442
- const $d42ff6af4a8dee64$var$ApiDocsInfo = ({ url: url, getComponent: getComponent, isDatasetDocs: isDatasetDocs, showRowLimitNotice: showRowLimitNotice, docsURL: docsURL })=>{
2443
- const VersionStamp = getComponent("VersionStamp");
2444
- const OpenAPIVersion = getComponent("OpenAPIVersion");
2445
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2446
- className: "ds-l-row",
2447
- children: [
2448
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2449
- className: "ds-l-col--12 ds-l-md-col--9",
2450
- children: [
2451
- /*#__PURE__*/ (0, $hgUW1$jsxs)("h2", {
2452
- className: "ds-text-heading--2xl ds-u-sm-display--inline-block",
2453
- children: [
2454
- "Try the API",
2455
- isDatasetDocs ? " for this dataset" : ''
2456
- ]
2457
- }),
2458
- /*#__PURE__*/ (0, $hgUW1$jsx)(VersionStamp, {}),
2459
- /*#__PURE__*/ (0, $hgUW1$jsx)(OpenAPIVersion, {}),
2460
- isDatasetDocs ? /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
2461
- children: "The Open Data API provides programmatic access to this dataset including the ability to filter, query, and aggregate data."
2462
- }) : '',
2463
- showRowLimitNotice && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e49d4387bed21287$export$2e2bcd8739ae039), {})
2464
- ]
2465
- }),
2466
- isDatasetDocs ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2467
- className: "ds-l-col--12 ds-l-md-col--3 ds-u-font-weight--bold ds-u-margin-top--2 ds-u-md-text-align--right",
2468
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
2469
- href: docsURL,
2470
- className: "ds-u-display--flex ds-u-align-items--center ds-u-margin-bottom--1 ds-u-color--primary",
2471
- style: {
2472
- whiteSpace: 'nowrap'
2473
- },
2474
- children: [
2475
- "View API documentation",
2476
- /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
2477
- xmlns: "http://www.w3.org/2000/svg",
2478
- viewBox: "0 0 11 16",
2479
- width: "11",
2480
- height: "16",
2481
- "aria-hidden": "true",
2482
- role: "presentation",
2483
- className: "ds-u-margin-left--1",
2484
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
2485
- fill: "currentColor",
2486
- "fill-rule": "evenodd",
2487
- "clip-rule": "evenodd",
2488
- d: "M9.70403 7.07623L3.01151 0.388634C2.76291 0.130188 2.4577 0.000349045 2.08664 0.000349045C1.91391 -0.00377464 1.74226 0.0286551 1.58296 0.0956049C1.42367 0.162493 1.28034 0.262364 1.16239 0.388634L0.381515 1.15905C0.129223 1.41134 0 1.72025 0 2.0833C0 2.4402 0.126146 2.7528 0.381515 3.01863L5.37014 8.00048L0.381515 12.9891C0.129223 13.2414 0 13.5509 0 13.914C0 14.2696 0.126146 14.5829 0.381515 14.8493L1.16178 15.6185C1.41407 15.8708 1.72297 16 2.08603 16C2.44908 16 2.7586 15.8739 3.0109 15.6185L9.70403 8.93581C9.95571 8.66936 10.0855 8.35677 10.0855 8.00048C10.0855 7.63743 9.9594 7.32791 9.70403 7.07623Z"
2489
- })
2490
- })
2491
- ]
2492
- })
2493
- }) : '',
2494
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2495
- className: "ds-l-col--12 ds-u-margin-y--1",
2496
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
2497
- href: url,
2498
- className: "ds-u-color--primary",
2499
- children: "OpenAPI Specification (JSON)"
2500
- })
2501
- })
2502
- ]
2503
- });
2504
- };
2505
- var $d42ff6af4a8dee64$export$2e2bcd8739ae039 = $d42ff6af4a8dee64$var$ApiDocsInfo;
2506
-
2507
-
2508
-
2509
-
2510
- const $eb1276da361453f7$var$OperationCompWrapperInner = (props)=>{
2511
- const { Original: Original, onTryoutClick: onTryoutClick } = props;
2512
- (0, $hgUW1$useEffect)(()=>{
2513
- if (!onTryoutClick) return;
2514
- const timer = setTimeout(()=>onTryoutClick(), 2000);
2515
- return ()=>clearTimeout(timer);
2516
- }, [
2517
- onTryoutClick
2518
- ]);
2519
- return /*#__PURE__*/ (0, $hgUW1$jsx)(Original, {
2520
- ...props
2521
- });
2522
- };
2523
- var $eb1276da361453f7$export$2e2bcd8739ae039 = $eb1276da361453f7$var$OperationCompWrapperInner;
2524
-
2525
-
2526
-
2527
-
2528
- const $c9215d4ba59490d9$var$OperationTag = ({ children: children, tag: tag, tagObj: tagObj })=>{
2529
- const [show, toggleShow] = (0, $hgUW1$useState)(true);
2530
- const tagDescription = tagObj.getIn([
2531
- "tagDetails",
2532
- "description"
2533
- ], null);
2534
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2535
- className: "OperationTag",
2536
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2537
- className: `
2538
- toggle-block toggle-block-container
2539
- ${show ? ' open' : ' closed'}
2540
- ${show ? ' ds-u-padding-bottom--0 ds-u-margin-bottom--4' : ''}
2541
- `,
2542
- children: [
2543
- /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
2544
- className: "toggle-block-title ds-u-margin-y--1 ds-u-display--flex ds-u-justify-content--start ds-u-font-size--lg",
2545
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
2546
- type: "button",
2547
- onClick: ()=>{
2548
- toggleShow(!show);
2549
- },
2550
- "aria-expanded": show,
2551
- className: "toggle-block-title-button ds-u-display--flex ds-u-align-items--center ds-u-text-align--left ds-u-fill--transparent ds-u-border--0 ds-u-padding--0",
2552
- children: [
2553
- show ? /* Chevron down */ /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
2554
- xmlns: "http://www.w3.org/2000/svg",
2555
- viewBox: "0 0 512 512",
2556
- width: "20",
2557
- height: "20",
2558
- "aria-hidden": "true",
2559
- role: "presentation",
2560
- className: "OperationTag__chevron-down",
2561
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
2562
- fill: "currentColor",
2563
- d: "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"
2564
- })
2565
- }) : /* Chevron up */ /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
2566
- xmlns: "http://www.w3.org/2000/svg",
2567
- viewBox: "0 0 512 512",
2568
- width: "20",
2569
- height: "20",
2570
- "aria-hidden": "true",
2571
- role: "presentation",
2572
- className: "OperationTag__chevron-up",
2573
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
2574
- fill: "currentColor",
2575
- d: "M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"
2576
- })
2577
- }),
2578
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2579
- className: "toggle-block-title-text ds-u-display--flex ds-u-align-items--center ds-u-padding-left--4",
2580
- children: tag
2581
- }),
2582
- tagDescription ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2583
- className: "toggle-block-title-description ds-u-font-size--sm ds-u-font-weight--normal ds-u-margin-left--2",
2584
- children: tagDescription
2585
- }) : null
2586
- ]
2587
- })
2588
- }),
2589
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2590
- className: `
2591
- toggle-block-panel ds-u-padding-left--4
2592
- ${show ? ' open' : ' closed'}
2593
- ${show ? ' ds-u-display--block' : 'ds-u-display--none'}
2594
- `,
2595
- children: children
2596
- })
2597
- ]
2598
- })
2599
- });
2600
- };
2601
- var $c9215d4ba59490d9$export$2e2bcd8739ae039 = $c9215d4ba59490d9$var$OperationTag;
2602
-
2603
-
2604
-
2605
- const $6724506e656710f6$var$OperationSummary = ({ toggleShown: toggleShown, operationProps: operationProps, tryItOutButtonClassNames: tryItOutButtonClassNames = '', copyToClipboardButtonClassNames: copyToClipboardButtonClassNames = '' })=>{
2606
- const { path: path, isShown: isShown, operationId: operationId, tag: tag, method: method, summary: summary } = operationProps.toJS();
2607
- const readablePath = path.replace(/\//g, '\u200b/');
2608
- const handleCopyToClipboard = ()=>{
2609
- navigator.clipboard.writeText(readablePath);
2610
- };
2611
- const handleTryItOutOnClick = (e)=>{
2612
- toggleShown(e);
2613
- };
2614
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2615
- className: "OperationSummary ds-u-display--flex ds-u-flex-direction--column ds-u-lg-flex-direction--row",
2616
- children: [
2617
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2618
- className: "OperationSummary__path-container ds-u-display--flex ds-u-align-items--center ds-u-flex-direction--column ds-u-md-flex-direction--row ds-u-fill--white ds-u-radius",
2619
- children: [
2620
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2621
- className: "OperationSummary__method ds-u-display--flex ds-u-align-items--center ds-u-justify-content--center ds-u-color--white ds-u-radius ds-u-text-transform--uppercase ds-u-font-weight--bold ds-u-font-size--md ds-u-padding--1 ds-u-margin--05",
2622
- children: method
2623
- }),
2624
- /*#__PURE__*/ (0, $hgUW1$jsx)("input", {
2625
- "aria-label": `${tag} ${operationId}`,
2626
- className: "OperationSummary__path-container_path-input ds-u-border--0 ds-u-padding-y--1 ds-u-padding-x--2 ds-u-font-size--sm ds-u-md-margin-y--0 ds-u-margin-y--1",
2627
- readOnly: true,
2628
- value: readablePath
2629
- }),
2630
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2631
- className: "OperationSummary__summary ds-u-font-size--sm ds-u-padding-x--1 ds-u-text-align--left ds-u-md-text-align--right ds-u-md-margin-bottom--0 ds-u-margin-bottom--1",
2632
- children: summary
2633
- }),
2634
- /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
2635
- onClick: handleCopyToClipboard,
2636
- className: copyToClipboardButtonClassNames ? `${copyToClipboardButtonClassNames}` : 'ds-u-display--flex ds-u-align-items--center ds-u-justify-content--center ds-u-padding--0 ds-u-margin--05 ds-u-radius OperationSummary__path-container_copy-btn ds-u-color--primary',
2637
- "aria-label": `Copy ${tag} ${operationId} to clipboard`,
2638
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
2639
- xmlns: "http://www.w3.org/2000/svg",
2640
- viewBox: "0 0 448 512",
2641
- width: "16",
2642
- height: "16",
2643
- "aria-hidden": "true",
2644
- role: "presentation",
2645
- className: "OperationSummary__copy-icon",
2646
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
2647
- fill: "currentColor",
2648
- d: "M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"
2649
- })
2650
- })
2651
- })
2652
- ]
2653
- }),
2654
- /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
2655
- className: tryItOutButtonClassNames ? `${tryItOutButtonClassNames}` : 'ds-c-button ds-u-lg-margin-left--2 ds-u-margin-top--2 ds-u-lg-margin-top--0 OperationSummary__try-it-out-btn ds-u-display--flex ds-u-align-items--center',
2656
- onClick: handleTryItOutOnClick,
2657
- "aria-label": `Try it out - ${tag} ${operationId}`,
2658
- "aria-expanded": isShown,
2659
- children: [
2660
- /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
2661
- xmlns: "http://www.w3.org/2000/svg",
2662
- viewBox: "0 0 16 11",
2663
- width: "16",
2664
- height: "11",
2665
- "aria-hidden": "true",
2666
- role: "presentation",
2667
- style: {
2668
- transform: isShown ? 'rotate(180deg)' : 'none',
2669
- top: '0px'
2670
- },
2671
- className: "ds-u-margin-right--05",
2672
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
2673
- fill: "currentColor",
2674
- "fill-rule": "evenodd",
2675
- "clip-rule": "evenodd",
2676
- d: "M8.92377 9.70403L15.6114 3.01151C15.8698 2.76291 15.9997 2.4577 15.9997 2.08664C16.0038 1.91391 15.9713 1.74226 15.9044 1.58296C15.8375 1.42367 15.7376 1.28034 15.6114 1.16239L14.841 0.381515C14.5887 0.129223 14.2798 0 13.9167 0C13.5598 0 13.2472 0.126146 12.9814 0.381515L7.99952 5.37014L3.0109 0.381515C2.7586 0.129223 2.44908 0 2.08603 0C1.73036 0 1.41715 0.126146 1.1507 0.381515L0.381515 1.16178C0.129223 1.41407 0 1.72297 0 2.08603C0 2.44908 0.126146 2.7586 0.381515 3.0109L7.06419 9.70403C7.33063 9.95571 7.64323 10.0855 7.99952 10.0855C8.36257 10.0855 8.67209 9.9594 8.92377 9.70403Z"
2677
- })
2678
- }),
2679
- "Try it out"
2680
- ]
2681
- })
2682
- ]
2683
- });
2684
- };
2685
- var $6724506e656710f6$export$2e2bcd8739ae039 = $6724506e656710f6$var$OperationSummary;
2686
-
2687
-
2688
-
2689
-
2690
- const $103b83f479373ff7$var$ExecuteButton = (props)=>{
2691
- const { specSelectors: specSelectors, specActions: specActions, oas3Selectors: oas3Selectors, oas3Actions: oas3Actions, operation: operation, path: path, method: method, onExecute: onExecute, disabled: disabled, className: className = '' } = props;
2692
- const pathMethod = [
2693
- path,
2694
- method
2695
- ];
2696
- const handleValidateParameters = ()=>{
2697
- specActions.validateParams(pathMethod);
2698
- return specSelectors.validateBeforeExecute(pathMethod);
2699
- };
2700
- const handleValidateRequestBody = ()=>{
2701
- const validationErrors = {
2702
- missingBodyValue: false,
2703
- missingRequiredKeys: []
2704
- };
2705
- oas3Actions.clearRequestBodyValidateError({
2706
- path: path,
2707
- method: method
2708
- });
2709
- const oas3RequiredRequestBodyContentType = specSelectors.getOAS3RequiredRequestBodyContentType(pathMethod);
2710
- const oas3RequestBodyValue = oas3Selectors.requestBodyValue(path, method);
2711
- const oas3ValidateBeforeExecuteSuccess = oas3Selectors.validateBeforeExecute(path, method);
2712
- const oas3RequestContentType = oas3Selectors.requestContentType(path, method);
2713
- if (!oas3ValidateBeforeExecuteSuccess) {
2714
- validationErrors.missingBodyValue = true;
2715
- oas3Actions.setRequestBodyValidateError({
2716
- path: path,
2717
- method: method,
2718
- validationErrors: validationErrors
2719
- });
2720
- return false;
2721
- }
2722
- if (!oas3RequiredRequestBodyContentType) return true;
2723
- const missingRequiredKeys = oas3Selectors.validateShallowRequired({
2724
- oas3RequiredRequestBodyContentType: oas3RequiredRequestBodyContentType,
2725
- oas3RequestContentType: oas3RequestContentType,
2726
- oas3RequestBodyValue: oas3RequestBodyValue
2727
- });
2728
- if (!missingRequiredKeys || missingRequiredKeys.length < 1) return true;
2729
- missingRequiredKeys.forEach((key)=>validationErrors.missingRequiredKeys.push(key));
2730
- oas3Actions.setRequestBodyValidateError({
2731
- path: path,
2732
- method: method,
2733
- validationErrors: validationErrors
2734
- });
2735
- return false;
2736
- };
2737
- const handleClick = ()=>{
2738
- const paramsResult = handleValidateParameters();
2739
- const requestBodyResult = handleValidateRequestBody();
2740
- const isPass = paramsResult && requestBodyResult;
2741
- if (isPass) {
2742
- onExecute?.();
2743
- specActions.execute({
2744
- operation: operation,
2745
- path: path,
2746
- method: method
2747
- });
2748
- } else {
2749
- specActions.clearValidateParams(pathMethod);
2750
- setTimeout(()=>{
2751
- specActions.validateParams(pathMethod);
2752
- }, 40);
2753
- }
2754
- };
2755
- return /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
2756
- type: "button",
2757
- className: className.trim() || 'btn execute opblock-control__btn',
2758
- onClick: handleClick,
2759
- disabled: disabled,
2760
- children: "Execute"
2761
- });
2762
- };
2763
- var $103b83f479373ff7$export$2e2bcd8739ae039 = $103b83f479373ff7$var$ExecuteButton;
2764
-
2765
-
2766
-
2767
-
2768
- const $cebc70517f6ef693$var$ClearButton = (props)=>{
2769
- const { specActions: specActions, path: path, method: method, className: className = '' } = props;
2770
- const handleClick = ()=>{
2771
- specActions.clearResponse(path, method);
2772
- specActions.clearRequest(path, method);
2773
- };
2774
- return /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
2775
- type: "button",
2776
- className: className.trim() || 'btn btn-clear opblock-control__btn',
2777
- onClick: handleClick,
2778
- children: "Clear"
2779
- });
2780
- };
2781
- var $cebc70517f6ef693$export$2e2bcd8739ae039 = $cebc70517f6ef693$var$ClearButton;
2782
-
2783
-
2784
-
2785
-
2786
-
2787
- const $decc8bd0f6e8880f$var$Models = ({ specSelectors: specSelectors, getComponent: getComponent, layoutSelectors: layoutSelectors, layoutActions: layoutActions, specActions: specActions, getConfigs: getConfigs })=>{
2788
- const getSchemaBasePath = (0, $hgUW1$useCallback)(()=>{
2789
- const isOAS3 = specSelectors.isOAS3();
2790
- return isOAS3 ? [
2791
- 'components',
2792
- 'schemas'
2793
- ] : [
2794
- 'definitions'
2795
- ];
2796
- }, [
2797
- specSelectors
2798
- ]);
2799
- const getCollapsedContent = (0, $hgUW1$useCallback)((_name)=>' ', []);
2800
- const handleToggle = (0, $hgUW1$useCallback)((name, isExpanded)=>{
2801
- const specPathBase = getSchemaBasePath();
2802
- layoutActions.show([
2803
- ...specPathBase,
2804
- name
2805
- ], isExpanded);
2806
- if (isExpanded) specActions.requestResolvedSubtree([
2807
- ...specPathBase,
2808
- name
2809
- ]);
2810
- }, [
2811
- getSchemaBasePath,
2812
- layoutActions,
2813
- specActions
2814
- ]);
2815
- const onLoadModels = (0, $hgUW1$useCallback)((ref)=>{
2816
- if (ref) layoutActions.readyToScroll(getSchemaBasePath(), ref);
2817
- }, [
2818
- getSchemaBasePath,
2819
- layoutActions
2820
- ]);
2821
- const onLoadModel = (0, $hgUW1$useCallback)((ref)=>{
2822
- if (ref) {
2823
- const name = ref.getAttribute('data-name');
2824
- if (name) layoutActions.readyToScroll([
2825
- ...getSchemaBasePath(),
2826
- name
2827
- ], ref);
2828
- }
2829
- }, [
2830
- getSchemaBasePath,
2831
- layoutActions
2832
- ]);
2833
- const definitions = specSelectors.definitions();
2834
- const { docExpansion: docExpansion, defaultModelsExpandDepth: defaultModelsExpandDepth = 0 } = getConfigs();
2835
- if (!definitions.size || defaultModelsExpandDepth < 0) return null;
2836
- const specPathBase = getSchemaBasePath();
2837
- const showModels = layoutSelectors.isShown(specPathBase, defaultModelsExpandDepth > 0 && docExpansion !== 'none');
2838
- const isOAS3 = specSelectors.isOAS3();
2839
- const ModelWrapper = getComponent('ModelWrapper');
2840
- const Collapse = getComponent('Collapse');
2841
- const ModelCollapse = getComponent('ModelCollapse');
2842
- const JumpToPath = getComponent('JumpToPath');
2843
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
2844
- className: "ApiDocsModels",
2845
- ref: onLoadModels,
2846
- children: [
2847
- /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
2848
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2849
- children: isOAS3 ? 'Schemas' : 'Models'
2850
- })
2851
- }),
2852
- /*#__PURE__*/ (0, $hgUW1$jsx)(Collapse, {
2853
- isOpened: showModels,
2854
- children: definitions.entrySeq().map(([name])=>{
2855
- const fullPath = [
2856
- ...specPathBase,
2857
- name
2858
- ];
2859
- const specPath = (0, $hgUW1$List)(fullPath);
2860
- const schemaValue = specSelectors.specResolvedSubtree(fullPath);
2861
- const rawSchemaValue = specSelectors.specJson().getIn(fullPath);
2862
- const schema = (0, $hgUW1$Map).isMap(schemaValue) ? schemaValue : (0, $hgUW1$Map)();
2863
- const rawSchema = (0, $hgUW1$Map).isMap(rawSchemaValue) ? rawSchemaValue : (0, $hgUW1$Map)();
2864
- const displayName = String(schema.get('title') ?? rawSchema.get('title') ?? name);
2865
- const isShown = layoutSelectors.isShown(fullPath, false);
2866
- if (isShown && schema.size === 0 && rawSchema.size > 0) specActions.requestResolvedSubtree(fullPath);
2867
- const content = /*#__PURE__*/ (0, $hgUW1$jsx)(ModelWrapper, {
2868
- name: name,
2869
- expandDepth: defaultModelsExpandDepth,
2870
- schema: schema || (0, $hgUW1$Map)(),
2871
- displayName: displayName,
2872
- fullPath: fullPath,
2873
- specPath: specPath,
2874
- getComponent: getComponent,
2875
- specSelectors: specSelectors,
2876
- getConfigs: getConfigs,
2877
- layoutSelectors: layoutSelectors,
2878
- layoutActions: layoutActions,
2879
- includeReadOnly: true,
2880
- includeWriteOnly: true
2881
- });
2882
- const title = /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2883
- className: "model-box",
2884
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2885
- className: "model model-title",
2886
- children: displayName
2887
- })
2888
- });
2889
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2890
- id: `model-${name}`,
2891
- className: "model-container",
2892
- "data-name": name,
2893
- ref: onLoadModel,
2894
- children: [
2895
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2896
- className: "models-jump-to-path",
2897
- children: /*#__PURE__*/ (0, $hgUW1$jsx)(JumpToPath, {
2898
- specPath: specPath
2899
- })
2900
- }),
2901
- /*#__PURE__*/ (0, $hgUW1$jsx)(ModelCollapse, {
2902
- classes: "model-box",
2903
- collapsedContent: getCollapsedContent(name),
2904
- onToggle: handleToggle,
2905
- title: title,
2906
- displayName: displayName,
2907
- modelName: name,
2908
- specPath: specPath,
2909
- layoutSelectors: layoutSelectors,
2910
- layoutActions: layoutActions,
2911
- hideSelfOnExpand: true,
2912
- expanded: defaultModelsExpandDepth > 0 && isShown,
2913
- children: content
2914
- })
2915
- ]
2916
- }, `models-section-${name}`);
2917
- }).toArray()
2918
- })
2919
- ]
2920
- });
2921
- };
2922
- var $decc8bd0f6e8880f$export$2e2bcd8739ae039 = $decc8bd0f6e8880f$var$Models;
2923
-
2924
-
2925
- const $30bfb3d671300bcd$var$ApiDocsSwaggerUIPlugin = ({ docsURL: docsURL = '', showRowLimitNotice: showRowLimitNotice = false, isDatasetDocs: isDatasetDocs = false, buttonClassNames: buttonClassNames = {} })=>(system)=>{
2926
- return {
2927
- wrapComponents: {
2928
- App: (Original)=>(props)=>/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2929
- id: "api-docs-swagger-ui-plugin",
2930
- className: "ds-l-container",
2931
- children: /*#__PURE__*/ (0, $hgUW1$jsx)(Original, {
2932
- ...props
2933
- })
2934
- }),
2935
- parameters: (Original)=>(props)=>/*#__PURE__*/ (0, $hgUW1$jsx)(Original, {
2936
- ...props,
2937
- allowTryItOut: true,
2938
- tryItOutEnabled: true
2939
- }),
2940
- operation: (Original)=>(props)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $eb1276da361453f7$export$2e2bcd8739ae039), {
2941
- ...props,
2942
- Original: Original
2943
- }),
2944
- execute: (Original)=>(props)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $103b83f479373ff7$export$2e2bcd8739ae039), {
2945
- ...props,
2946
- className: buttonClassNames.executeButton ?? 'ds-c-button ds-c-button--solid execute-button'
2947
- }),
2948
- clear: (Original)=>(props)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $cebc70517f6ef693$export$2e2bcd8739ae039), {
2949
- ...props,
2950
- className: buttonClassNames.clearButton ?? 'ds-c-button ds-u-margin-left--2 clear-button'
2951
- }),
2952
- VersionStamp: (Original, system)=>()=>{
2953
- const version = system.specSelectors.version();
2954
- return /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2955
- className: "version version-stamp version-stamp--span",
2956
- children: version
2957
- });
2958
- }
2959
- },
2960
- components: {
2961
- info: (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $d42ff6af4a8dee64$export$2e2bcd8739ae039), {
2962
- ...props,
2963
- isDatasetDocs: isDatasetDocs,
2964
- docsURL: docsURL,
2965
- showRowLimitNotice: showRowLimitNotice,
2966
- buttonClassNames: buttonClassNames
2967
- }),
2968
- OperationTag: (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $c9215d4ba59490d9$export$2e2bcd8739ae039), {
2969
- ...props
2970
- }),
2971
- OperationSummary: (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $6724506e656710f6$export$2e2bcd8739ae039), {
2972
- ...props,
2973
- tryItOutButtonClassNames: buttonClassNames.tryItOutButton ?? '',
2974
- copyToClipboardButtonClassNames: buttonClassNames.copyToClipboardButton ?? ''
2975
- }),
2976
- Models: (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $decc8bd0f6e8880f$export$2e2bcd8739ae039), {
2977
- ...props
2978
- }),
2979
- OperationSummaryMethod: ()=>null,
2980
- TryItOutButton: ()=>null
2981
- }
2982
- };
2983
- };
2984
- var $30bfb3d671300bcd$export$2e2bcd8739ae039 = $30bfb3d671300bcd$var$ApiDocsSwaggerUIPlugin;
2985
-
2986
-
2987
-
2988
-
2989
- const $2276c8c929d6a6d3$var$ApiDocumentation = ({ endpoint: endpoint, docsURL: docsURL, showRowLimitNotice: showRowLimitNotice, swaggerButtonClassNames: swaggerButtonClassNames = {} })=>{
2990
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2991
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
2992
- url: endpoint,
2993
- plugins: [
2994
- (0, $5b656f0283afa250$export$2e2bcd8739ae039),
2995
- (0, $ffd9c403a1c2fc39$export$2e2bcd8739ae039),
2996
- (0, $30bfb3d671300bcd$export$2e2bcd8739ae039)({
2997
- docsURL: docsURL,
2998
- showRowLimitNotice: showRowLimitNotice,
2999
- isDatasetDocs: true,
3000
- buttonClassNames: swaggerButtonClassNames
3001
- })
3002
- ]
3003
- })
3004
- });
3005
- };
3006
- var $2276c8c929d6a6d3$export$2e2bcd8739ae039 = $2276c8c929d6a6d3$var$ApiDocumentation;
3007
-
3008
-
3009
-
3010
-
3011
-
3012
-
3013
-
3014
-
3015
-
3016
2400
  const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = 'data-table-results' })=>{
3017
2401
  const numTotalRows = totalRows;
3018
2402
  if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
@@ -3062,428 +2446,420 @@ var $2ed0091f7e32d1e6$export$2e2bcd8739ae039 = $2ed0091f7e32d1e6$var$DataTablePa
3062
2446
 
3063
2447
 
3064
2448
 
3065
- const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePadding, tablePadding: tablePadding })=>{
3066
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3067
- className: "ds-u-display--flex",
3068
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
3069
- options: [
3070
- {
3071
- label: 'Tight',
3072
- value: 'ds-u-padding-y--0'
3073
- },
3074
- {
3075
- label: 'Normal',
3076
- value: 'ds-u-padding-y--1'
3077
- },
3078
- {
3079
- label: 'Expanded',
3080
- value: 'ds-u-padding-y--2'
3081
- }
3082
- ],
3083
- label: "Display density:",
3084
- labelClassName: "ds-u-margin-top--0",
3085
- name: "datatable_display_density",
3086
- onChange: (e)=>setTablePadding(e.target.value),
3087
- defaultValue: tablePadding
3088
- })
3089
- });
3090
- };
3091
- $1e012d1e3b534af0$var$DataTableDensity.propTypes = {
3092
- setTablePadding: (0, $hgUW1$proptypes).func.isRequired
3093
- };
3094
- var $1e012d1e3b534af0$export$2e2bcd8739ae039 = $1e012d1e3b534af0$var$DataTableDensity;
3095
-
3096
-
3097
-
3098
2449
 
3099
2450
 
3100
2451
 
3101
- const $7848c69a021266f7$var$DataTableRowChanger = ({ limit: limit, rowOptions: rowOptions = [
3102
- 10,
3103
- 25,
3104
- 50,
3105
- 100
3106
- ], setLimit: setLimit })=>{
3107
- const rowOptionsFormatted = rowOptions.map((row)=>({
3108
- label: row.toString(),
3109
- value: row.toString()
3110
- }));
3111
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3112
- className: "ds-u-display--flex",
3113
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
3114
- options: rowOptionsFormatted,
3115
- label: "Rows per page:",
3116
- labelClassName: "ds-u-margin-top--0",
3117
- name: "datatable_rows_per_page",
3118
- onChange: (e)=>setLimit(e.target.value),
3119
- defaultValue: limit.toString()
3120
- })
3121
- });
3122
- };
3123
- $7848c69a021266f7$var$DataTableRowChanger.propTypes = {
3124
- rowOptions: (0, $hgUW1$proptypes).arrayOf((0, $hgUW1$proptypes).number),
3125
- setLimit: (0, $hgUW1$proptypes).func.isRequired,
3126
- limit: (0, $hgUW1$proptypes).number
3127
- };
3128
- var $7848c69a021266f7$export$2e2bcd8739ae039 = $7848c69a021266f7$var$DataTableRowChanger;
3129
2452
 
3130
2453
 
3131
2454
 
3132
2455
 
3133
- const $e973bc477cdc2dc7$var$DownloadIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
3134
- width: "15px",
3135
- height: "15px",
3136
- viewBox: "0 0 384 512",
3137
- version: "1.1",
3138
- xmlns: "http://www.w3.org/2000/svg",
3139
- xmlnsXlink: "http://www.w3.org/1999/xlink",
2456
+ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility: updateVisibility })=>{
2457
+ const { attributes: attributes, listeners: listeners, setNodeRef: setNodeRef, transform: transform, transition: transition, isDragging: isDragging } = (0, $hgUW1$useSortable)({
2458
+ id: id
2459
+ });
2460
+ const style = {
2461
+ transform: (0, $hgUW1$CSS).Transform.toString(transform),
2462
+ transition: transition,
2463
+ opacity: isDragging ? 0.7 : 1,
2464
+ zIndex: isDragging ? 1 : 0,
2465
+ position: 'relative',
2466
+ background: 'white',
2467
+ touchAction: 'none'
2468
+ };
2469
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
2470
+ className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
2471
+ ref: setNodeRef,
2472
+ style: style,
2473
+ ...listeners,
2474
+ ...attributes,
2475
+ tabIndex: -1,
2476
+ onPointerUp: (e)=>{
2477
+ // Small hack to get around a chrome / webkit rendering bug = force chrome to repaint the checkbox
2478
+ // For whatever reason the way dnd-kit handles events doesn't work well with chrome
2479
+ // Without this code checkboxes can end up visually out of sync with app state until a repaint is forced
2480
+ // this code forces the repaint without user interaction
2481
+ const target = e.target;
2482
+ if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
2483
+ target.parentNode.querySelector('input').checked = visible;
2484
+ }, 1);
2485
+ },
3140
2486
  children: [
3141
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
3142
- children: "Download Icon"
2487
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
2488
+ type: "checkbox",
2489
+ label: id,
2490
+ name: id + "_visibility",
2491
+ checked: visible,
2492
+ className: "ds-l-col--10 ds-u-margin-top--0 ds-u-margin-y--1 ds-u-padding-x--3",
2493
+ labelClassName: "dc-truncate",
2494
+ value: "",
2495
+ onChange: ()=>{
2496
+ updateVisibility(id, !visible);
2497
+ }
3143
2498
  }),
3144
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
3145
- stroke: "none",
3146
- strokeWidth: "1",
3147
- fill: "none",
3148
- fillRule: "evenodd",
3149
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
3150
- fill: "#112E51",
3151
- fillRule: "nonzero",
3152
- d: "M384 128h-128V0L384 128zM256 160H384v304c0 26.51-21.49 48-48 48h-288C21.49 512 0 490.5 0 464v-416C0 21.49 21.49 0 48 0H224l.0039 128C224 145.7 238.3 160 256 160zM255 295L216 334.1V232c0-13.25-10.75-24-24-24S168 218.8 168 232v102.1L128.1 295C124.3 290.3 118.2 288 112 288S99.72 290.3 95.03 295c-9.375 9.375-9.375 24.56 0 33.94l80 80c9.375 9.375 24.56 9.375 33.94 0l80-80c9.375-9.375 9.375-24.56 0-33.94S264.4 285.7 255 295z"
2499
+ /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
2500
+ className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && 'grabbed'}`,
2501
+ "aria-label": `Reorder ${id} column`,
2502
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2503
+ className: "fa fa-sort"
3153
2504
  })
3154
2505
  })
3155
2506
  ]
3156
2507
  });
3157
- var $e973bc477cdc2dc7$export$2e2bcd8739ae039 = $e973bc477cdc2dc7$var$DownloadIcon;
3158
-
2508
+ };
2509
+ var $5fe94aeb50e0798b$export$2e2bcd8739ae039 = $5fe94aeb50e0798b$var$Card;
3159
2510
 
3160
2511
 
3161
2512
 
3162
- const $7ec5423a30aa3f61$var$CopyIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
3163
- width: "15px",
3164
- height: "15px",
3165
- viewBox: "0 0 512 512",
3166
- version: "1.1",
3167
- xmlns: "http://www.w3.org/2000/svg",
3168
- xmlnsXlink: "http://www.w3.org/1999/xlink",
3169
- children: [
3170
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
3171
- children: "Copy Icon"
3172
- }),
3173
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
3174
- stroke: "none",
3175
- strokeWidth: "1",
3176
- fill: "none",
3177
- fillRule: "evenodd",
3178
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
3179
- fill: "#112E51",
3180
- fillRule: "nonzero",
3181
- d: "M384 96L384 0h-112c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48H464c26.51 0 48-21.49 48-48V128h-95.1C398.4 128 384 113.6 384 96zM416 0v96h96L416 0zM192 352V128h-144c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48L288 416h-32C220.7 416 192 387.3 192 352z"
3182
- })
3183
- })
3184
- ]
3185
- });
3186
- var $7ec5423a30aa3f61$export$2e2bcd8739ae039 = $7ec5423a30aa3f61$var$CopyIcon;
3187
2513
 
3188
2514
 
2515
+ const $43a30d745a7bbc86$var$DataTableContext = /*#__PURE__*/ (0, $hgUW1$createContext)({
2516
+ id: null
2517
+ });
2518
+ var $43a30d745a7bbc86$export$2e2bcd8739ae039 = $43a30d745a7bbc86$var$DataTableContext;
3189
2519
 
3190
2520
 
3191
- const $ec9e1550b0b034d0$var$SettingsIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
3192
- width: "15px",
3193
- height: "15px",
3194
- // viewBox="0 0 15 15"
3195
- viewBox: "0 0 512 512",
3196
- version: "1.1",
3197
- xmlns: "http://www.w3.org/2000/svg",
3198
- xmlnsXlink: "http://www.w3.org/1999/xlink",
3199
- children: [
3200
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
3201
- children: "Settings Icon"
3202
- }),
3203
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
3204
- stroke: "none",
3205
- strokeWidth: "1",
3206
- fill: "none",
3207
- fillRule: "evenodd",
3208
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
3209
- fill: "#112E51",
3210
- fillRule: "nonzero",
3211
- d: "M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"
3212
- })
3213
- })
3214
- ]
2521
+ // Create a defaults object for reusability
2522
+ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
2523
+ columnOrder: [],
2524
+ setColumnOrder: ()=>{},
2525
+ columnVisibility: {},
2526
+ setColumnVisibility: ()=>{},
2527
+ page: 1,
2528
+ setPage: ()=>{},
2529
+ tableDensity: 'normal',
2530
+ setTableDensity: ()=>{}
2531
+ };
2532
+ const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
2533
+ // Define our reusable provider component
2534
+ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=>{
2535
+ // Set up all of the state
2536
+ const { id: id, datasetTableControls: datasetTableControls } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
2537
+ // a wrapper component to keep column state synced between full screen and regular modes
2538
+ const localStorageData = id ? JSON.parse(localStorage.getItem(id)) : null;
2539
+ const [page, setPage] = (0, $hgUW1$useState)(1);
2540
+ const [columnOrder, setColumnOrder] = (0, $hgUW1$useState)(()=>{
2541
+ if (datasetTableControls && localStorageData) return localStorageData.tableColumnOrder;
2542
+ else return [];
3215
2543
  });
3216
- var $ec9e1550b0b034d0$export$2e2bcd8739ae039 = $ec9e1550b0b034d0$var$SettingsIcon;
2544
+ const [columnVisibility, setColumnVisibility] = (0, $hgUW1$useState)(()=>{
2545
+ if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
2546
+ else return {};
2547
+ });
2548
+ const [tableDensity, setTableDensity] = (0, $hgUW1$useState)('normal');
2549
+ const providerValue = {
2550
+ columnOrder: columnOrder,
2551
+ setColumnOrder: setColumnOrder,
2552
+ columnVisibility: columnVisibility,
2553
+ setColumnVisibility: setColumnVisibility,
2554
+ page: page,
2555
+ setPage: setPage,
2556
+ tableDensity: tableDensity,
2557
+ setTableDensity: setTableDensity
2558
+ };
2559
+ return /*#__PURE__*/ (0, $hgUW1$jsx)($ee0d4d4f34048447$export$f814ea079e65d8fe.Provider, {
2560
+ value: providerValue,
2561
+ children: children
2562
+ });
2563
+ };
2564
+ const $ee0d4d4f34048447$export$67f91330d613e8f4 = ({ children: children, value: value = $ee0d4d4f34048447$var$DataTableActionsContextDefaults })=>/*#__PURE__*/ (0, $hgUW1$jsx)($ee0d4d4f34048447$export$f814ea079e65d8fe.Provider, {
2565
+ value: value,
2566
+ children: children
2567
+ });
2568
+ var $ee0d4d4f34048447$export$2e2bcd8739ae039 = $ee0d4d4f34048447$var$DataTableActionsProvider;
3217
2569
 
3218
2570
 
3219
2571
 
3220
- const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding, includeDensity: includeDensity, includeDownload: includeDownload, resource: resource, tablePadding: tablePadding, downloadUrl: downloadUrl })=>{
3221
- const md = (0, $hgUW1$useMediaQuery)({
3222
- minWidth: 0,
3223
- maxWidth: 768
3224
- });
3225
- const { limit: limit, offset: offset, count: count, setLimit: setLimit, setOffset: setOffset } = resource;
3226
- const intCount = count ? parseInt(count) : 0;
3227
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3228
- className: "dc-c-resource-header",
3229
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3230
- className: "ds-l-row ds-u-align-items--center",
3231
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3232
- className: "ds-l-col--12 ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-margin-bottom--2",
3233
- children: [
3234
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3235
- className: "ds-u-font-weight--bold",
3236
- children: !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
3237
- totalRows: parseInt(intCount),
3238
- limit: parseInt(limit),
3239
- offset: parseInt(offset)
3240
- })
3241
- }),
3242
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3243
- className: "dc-c-resource-header--buttons",
3244
- children: [
3245
- includeDownload && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
3246
- children: [
3247
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
3248
- size: "small",
3249
- className: "ds-u-text-align--left ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1",
3250
- href: downloadUrl,
3251
- children: [
3252
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e973bc477cdc2dc7$export$2e2bcd8739ae039), {}),
3253
- !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3254
- className: "ds-u-font-weight--semibold ds-u-margin-left--1",
3255
- children: "Download filtered data (CSV)"
3256
- })
3257
- ]
3258
- }),
3259
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
3260
- onOpen: ()=>{
3261
- navigator.clipboard.writeText(window.location.href);
3262
- },
3263
- className: "ds-c-button ds-c-button--small ds-u-text-align--left ds-u-margin-right--1 display-settings-font",
3264
- placement: "bottom",
3265
- dialog: true,
3266
- ariaLabel: "Copy link to filtered data",
3267
- title: "Link copied to clipboard",
3268
- children: [
3269
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7ec5423a30aa3f61$export$2e2bcd8739ae039), {}),
3270
- !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3271
- className: "ds-u-font-weight--semibold ds-u-margin-left--1",
3272
- children: "Copy link to filtered data"
3273
- })
3274
- ]
3275
- })
3276
- ]
3277
- }),
3278
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
3279
- className: "ds-c-button ds-c-button--small ds-u-text-align--left display-settings-font",
3280
- placement: "bottom",
3281
- dialog: true,
3282
- ariaLabel: "Display settings",
3283
- title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3284
- className: "dc-c-display-settings",
3285
- children: [
3286
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7848c69a021266f7$export$2e2bcd8739ae039), {
3287
- limit: Number(limit),
3288
- setLimit: setLimit,
3289
- setOffset: setOffset
3290
- }),
3291
- includeDensity && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $1e012d1e3b534af0$export$2e2bcd8739ae039), {
3292
- setTablePadding: setTablePadding,
3293
- tablePadding: tablePadding
3294
- })
3295
- ]
3296
- }),
3297
- children: [
3298
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $ec9e1550b0b034d0$export$2e2bcd8739ae039), {}),
3299
- !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3300
- className: "ds-u-font-weight--semibold ds-u-margin-left--1",
3301
- children: "Display settings"
3302
- })
3303
- ]
3304
- })
3305
- ]
3306
- })
3307
- ]
3308
- })
3309
- })
3310
- });
3311
- };
3312
- var $af099c546cb226c7$export$2e2bcd8739ae039 = $af099c546cb226c7$var$ResourceHeader;
3313
-
3314
-
3315
-
3316
-
3317
-
3318
- function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
3319
- let newQuery = [];
3320
- sortArray.forEach((s)=>{
3321
- return newQuery.push({
3322
- property: s.id,
3323
- order: s.desc ? 'desc' : 'asc'
3324
- });
3325
- });
3326
- return newQuery;
2572
+ /**
2573
+ * Workaround for CMS Design System nested dialog issue.
2574
+ * When a nested dialog closes, the design system removes scroll lock
2575
+ * even if a parent dialog is still open. This restores it.
2576
+ */ function $15650910340b2c71$export$73fce4ded5ef1c2() {
2577
+ setTimeout(()=>{
2578
+ if (document.querySelector('.dkan-fullscreen-data-table-wrapper .ds-c-dialog-wrap.open')) {
2579
+ document.body.classList.add('ds--dialog-open');
2580
+ document.body.style.setProperty('--body_top--dialog-open', '-0px');
2581
+ }
2582
+ }, 0);
3327
2583
  }
3328
2584
 
3329
2585
 
3330
- // Example custom column headers, where only effective date has an ! at the end
3331
- // [
3332
- // {schema: 'date', cell: ({ value }) => localeDate(value),},
3333
- // {accessor: 'effective_date',cell: ({ value }) => localeDate(value) + '!',},
3334
- // ]
3335
- function $7264a673914aa746$export$8049e8f40a9bdfb8(customHeaders, columns, schema) {
3336
- return columns.map((column)=>{
3337
- const customAccessorIndex = customHeaders.findIndex((header)=>header.accessor === column);
3338
- const customSchemaIndex = customHeaders.findIndex((header)=>header.schema === schema.fields[column].mysql_type);
3339
- let newColumn = {};
3340
- // If specific accessor is passed, this will override a general mysql_type Cell rewrite.
3341
- if (customAccessorIndex > -1) {
3342
- newColumn.header = schema && schema.fields[column].description ? schema.fields[column].description : column;
3343
- newColumn.accessor = column;
3344
- newColumn.cell = customHeaders[customAccessorIndex].cell;
3345
- } else {
3346
- newColumn.header = schema && schema.fields[column].description ? schema.fields[column].description : column;
3347
- newColumn.accessor = column;
3348
- if (customSchemaIndex > -1) newColumn.cell = customHeaders[customSchemaIndex].cell;
2586
+ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$KeyboardSensor) {
2587
+ // Custom function to exclude checkbox from keyboard dragging
2588
+ static activators = [
2589
+ {
2590
+ eventName: 'onKeyDown',
2591
+ handler: ({ nativeEvent: event })=>{
2592
+ // prevent scrolling the list
2593
+ const isCheckbox = [
2594
+ "input",
2595
+ "checkbox"
2596
+ ].indexOf(event.target.tagName.toLowerCase()) !== -1;
2597
+ if (event.key === " " && !isCheckbox) event.preventDefault();
2598
+ // only activate on a space or return press
2599
+ if ([
2600
+ " ",
2601
+ "Enter"
2602
+ ].indexOf(event.key) === -1) return false;
2603
+ if (!isCheckbox) return true;
2604
+ return false;
2605
+ }
3349
2606
  }
3350
- return newColumn;
3351
- });
3352
- }
3353
- function $7264a673914aa746$export$e284ae5d89467c8f(date) {
3354
- if (!date) return date;
3355
- date = new Date(date);
3356
- date = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
3357
- return date;
3358
- }
3359
- function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
3360
- let newValue = value;
3361
- if (Array.isArray(newValue)) newValue = newValue.join(',');
3362
- // return newValue.replace(/(^\%+|\%+$)/gm, '');
3363
- return newValue;
3364
- }
3365
- const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
3366
- {
3367
- label: 'Is',
3368
- value: '='
3369
- },
3370
- {
3371
- label: 'Starts With',
3372
- value: 'starts with'
3373
- },
3374
- {
3375
- label: 'Contains',
3376
- value: 'contains'
3377
- },
3378
- {
3379
- label: 'Is Not',
3380
- value: '<>'
3381
- },
3382
- {
3383
- label: 'Or',
3384
- value: 'in'
3385
- },
3386
- {
3387
- label: 'Is',
3388
- value: '='
3389
- },
3390
- {
3391
- label: 'Is Not',
3392
- value: '<>'
3393
- },
3394
- {
3395
- label: 'Greater Than',
3396
- value: '>'
3397
- },
3398
- {
3399
- label: 'Less Than',
3400
- value: '<'
3401
- },
3402
- {
3403
- label: 'Is Empty',
3404
- value: 'is_empty'
3405
- },
3406
- {
3407
- label: 'Not Empty',
3408
- value: 'not_empty'
3409
- }
3410
- ];
3411
- function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
3412
- const operator = $7264a673914aa746$export$5f89a5ae87bc48e1.find((op)=>op.value === operatorValue);
3413
- return operator ? operator.label : operatorValue; // Return original value if not found
2607
+ ];
3414
2608
  }
3415
- function $7264a673914aa746$export$2b9377795161999(type, enableEmptyFilters = false) {
3416
- const emptyOptions = enableEmptyFilters ? [
3417
- {
3418
- label: 'Is Empty',
3419
- value: 'is_empty'
3420
- },
2609
+ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$PointerSensor) {
2610
+ // Custom function to stop accidental checkbox clicks on pointer activation
2611
+ static activators = [
3421
2612
  {
3422
- label: 'Not Empty',
3423
- value: 'not_empty'
2613
+ eventName: 'onPointerDown',
2614
+ handler: ({ nativeEvent: event })=>{
2615
+ if (event.target.tagName.toLowerCase() === "input") return false;
2616
+ if (event.target.tagName.toLowerCase() === "label") event.target.blur();
2617
+ return true;
2618
+ }
3424
2619
  }
3425
- ] : [];
3426
- switch(type){
3427
- case 'text':
3428
- case 'string':
3429
- return [
3430
- {
3431
- label: 'Is',
3432
- value: '='
3433
- },
3434
- {
3435
- label: 'Starts With',
3436
- value: 'starts with'
3437
- },
3438
- {
3439
- label: 'Contains',
3440
- value: 'contains'
3441
- },
3442
- {
3443
- label: 'Is Not',
3444
- value: '<>'
3445
- },
3446
- {
3447
- label: 'Or',
3448
- value: 'in'
3449
- },
3450
- ...emptyOptions
3451
- ];
3452
- case 'date':
3453
- return [
3454
- {
3455
- label: 'Is',
3456
- value: '='
3457
- },
3458
- {
3459
- label: 'Is Not',
3460
- value: '<>'
3461
- },
3462
- {
3463
- label: 'Greater Than',
3464
- value: '>'
3465
- },
3466
- {
3467
- label: 'Less Than',
3468
- value: '<'
3469
- },
3470
- ...emptyOptions
3471
- ];
3472
- default:
3473
- // These 2 should be safe for all data types
3474
- return [
3475
- {
3476
- label: 'Is',
3477
- value: '='
3478
- },
3479
- {
3480
- label: 'Is Not',
3481
- value: '<>'
3482
- },
3483
- ...emptyOptions
3484
- ];
3485
- }
2620
+ ];
3486
2621
  }
2622
+ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, defaultColumnOrder: defaultColumnOrder })=>{
2623
+ const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, setColumnVisibility: setColumnVisibility, columnVisibility: contextColumnVisibility } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
2624
+ const columnVisibility = contextColumnVisibility || {};
2625
+ const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
2626
+ // maintain card state separately from table state - only sync states when the Save button is pressed
2627
+ const [cards, setCards] = (0, $hgUW1$useState)(columns.map((c)=>{
2628
+ return {
2629
+ id: c.id,
2630
+ visible: c.getIsVisible()
2631
+ };
2632
+ }));
2633
+ const cardOrder = (0, $hgUW1$useMemo)(()=>cards.map(({ id: id })=>id), [
2634
+ cards
2635
+ ]);
2636
+ // keep state in sync
2637
+ (0, $hgUW1$useEffect)(()=>{
2638
+ if (columnOrder.length) setCards(columnOrder.map((c)=>{
2639
+ const column = columns.filter((col)=>col.id === c)[0];
2640
+ return {
2641
+ id: column.id,
2642
+ visible: column.getIsVisible()
2643
+ };
2644
+ }));
2645
+ }, [
2646
+ columnOrder
2647
+ ]);
2648
+ // Update cards state when columnVisibility changes
2649
+ (0, $hgUW1$useEffect)(()=>{
2650
+ setCards((prevCards)=>prevCards.map((card)=>({
2651
+ ...card,
2652
+ visible: columnVisibility[card.id] !== false
2653
+ })));
2654
+ }, [
2655
+ columnVisibility
2656
+ ]);
2657
+ const sensors = (0, $hgUW1$useSensors)((0, $hgUW1$useSensor)($5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor, {
2658
+ activationConstraint: {
2659
+ distance: 5
2660
+ }
2661
+ }), (0, $hgUW1$useSensor)($5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor, {
2662
+ coordinateGetter: (0, $hgUW1$sortableKeyboardCoordinates)
2663
+ }));
2664
+ const cardHiddenColumns = cards.filter((c)=>c.visible === false).length;
2665
+ const updateVisibility = (0, $hgUW1$useCallback)((id, newVisibility)=>{
2666
+ setCards(cards.map((card)=>{
2667
+ if (card.id === id) return {
2668
+ ...card,
2669
+ visible: newVisibility
2670
+ };
2671
+ return card;
2672
+ }));
2673
+ });
2674
+ function handleDragEnd(e) {
2675
+ const { active: active, over: over } = e;
2676
+ if (active.id !== over.id) {
2677
+ const oldIndex = cardOrder.indexOf(active.id);
2678
+ const newIndex = cardOrder.indexOf(over.id);
2679
+ let newCards = (0, $hgUW1$arrayMove)(cards, oldIndex, newIndex);
2680
+ setCards(newCards);
2681
+ }
2682
+ }
2683
+ const resetCards = ()=>{
2684
+ setCards(columns.map((c)=>{
2685
+ return {
2686
+ id: c.id,
2687
+ visible: c.getIsVisible()
2688
+ };
2689
+ }));
2690
+ };
2691
+ const hiddenColumns = Object.keys(columnVisibility).filter((key)=>columnVisibility[key] === false).length;
2692
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2693
+ className: "dkan-manage-columns-wrapper",
2694
+ children: [
2695
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
2696
+ "aria-haspopup": "dialog",
2697
+ 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",
2698
+ onClick: ()=>{
2699
+ setModalOpen(true);
2700
+ },
2701
+ children: [
2702
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
2703
+ className: "fa fa-columns ds-u-margin-right--1"
2704
+ }),
2705
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
2706
+ children: [
2707
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2708
+ className: "dkan-dataset-toolbar-button-label",
2709
+ children: "Manage Columns"
2710
+ }),
2711
+ hiddenColumns ? ` (${hiddenColumns})` : ''
2712
+ ]
2713
+ })
2714
+ ]
2715
+ }),
2716
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2717
+ className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
2718
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
2719
+ heading: "Manage columns",
2720
+ isOpen: modalOpen,
2721
+ ariaCloseLabel: "Close dialog",
2722
+ onExit: ()=>{
2723
+ setModalOpen(false);
2724
+ resetCards();
2725
+ (0, $15650910340b2c71$export$73fce4ded5ef1c2)();
2726
+ },
2727
+ className: "dkan-manage-columns-dialog",
2728
+ actions: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2729
+ className: "ds-u-display--flex ds-u-justify-content--between ds-u-flex-wrap--wrap ds-u-padding-x--3 ds-u-padding-bottom--1 ds-u-sm-padding-bottom--3",
2730
+ children: [
2731
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2732
+ className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0",
2733
+ children: [
2734
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2735
+ variation: "solid",
2736
+ className: "ds-l-col--6 ds-l-sm-col--auto",
2737
+ onClick: ()=>{
2738
+ setModalOpen(false);
2739
+ // update table state
2740
+ // Visibility
2741
+ // This code is building a new columnVisibility state object from the card state and doing a single setState on the table
2742
+ // vs doing a setState on every changed column individually
2743
+ const newColumnVisibility = Object.fromEntries(cards.map((c)=>Object.values(c)));
2744
+ setColumnVisibility(newColumnVisibility);
2745
+ // Card order
2746
+ const newCardOrder = cards.map((c)=>{
2747
+ return c.id;
2748
+ });
2749
+ setColumnOrder(newCardOrder);
2750
+ // save to localStorage
2751
+ const localStorageData = {
2752
+ tableColumnOrder: newCardOrder,
2753
+ tableColumnVisibility: newColumnVisibility
2754
+ };
2755
+ localStorage.setItem(id, JSON.stringify(localStorageData));
2756
+ (0, $15650910340b2c71$export$73fce4ded5ef1c2)();
2757
+ },
2758
+ children: "Save"
2759
+ }),
2760
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2761
+ variation: "ghost",
2762
+ className: "ds-l-col--6 ds-l-sm-col--auto",
2763
+ onClick: ()=>{
2764
+ setModalOpen(false);
2765
+ resetCards();
2766
+ (0, $15650910340b2c71$export$73fce4ded5ef1c2)();
2767
+ },
2768
+ children: "Cancel"
2769
+ })
2770
+ ]
2771
+ }),
2772
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2773
+ className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-padding-top--1 ds-u-sm-padding-y--0",
2774
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2775
+ variation: "ghost",
2776
+ className: "ds-l-col--6 ds-l-sm-col--auto",
2777
+ onClick: ()=>{
2778
+ // reset to default column order and set all cards to visible
2779
+ // do not save this to the table state until the "Save" button is clicked
2780
+ setCards(defaultColumnOrder.map((column)=>{
2781
+ const card = cards.filter((c)=>c.id === column)[0];
2782
+ return {
2783
+ ...card,
2784
+ visible: true
2785
+ };
2786
+ }));
2787
+ },
2788
+ children: "Reset Columns"
2789
+ })
2790
+ })
2791
+ ]
2792
+ }),
2793
+ children: [
2794
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
2795
+ id: "reorder-help",
2796
+ className: "ds-u-padding-x--3",
2797
+ children: "Activate the reorder button and use the arrow keys to reorder the list or use your mouse to drag/reorder. Press escape to cancel the reordering."
2798
+ }),
2799
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
2800
+ checked: cardHiddenColumns === 0,
2801
+ type: "checkbox",
2802
+ onChange: ()=>{
2803
+ setCards(cards.map((c)=>{
2804
+ return {
2805
+ ...c,
2806
+ visible: cardHiddenColumns !== 0
2807
+ };
2808
+ }));
2809
+ },
2810
+ className: "ds-u-padding-x--3",
2811
+ name: "",
2812
+ value: "",
2813
+ label: "Select all",
2814
+ hint: cardHiddenColumns && cardHiddenColumns + " columns hidden"
2815
+ }),
2816
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2817
+ className: "ds-u-display--flex ds-u-justify-content--between ds-u-font-weight--bold ds-u-padding-y--2 ds-u-padding-x--3 ds-u-border-y--1 ds-u-margin-top--2",
2818
+ children: [
2819
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2820
+ children: "Display column"
2821
+ }),
2822
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2823
+ children: "Reorder"
2824
+ })
2825
+ ]
2826
+ }),
2827
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$DndContext), {
2828
+ collisionDetection: (0, $hgUW1$closestCenter),
2829
+ modifiers: [
2830
+ (0, $hgUW1$restrictToVerticalAxis)
2831
+ ],
2832
+ sensors: sensors,
2833
+ onDragEnd: handleDragEnd,
2834
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$SortableContext), {
2835
+ items: cardOrder,
2836
+ strategy: (0, $hgUW1$verticalListSortingStrategy),
2837
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
2838
+ className: "dkan-manage-columns-list",
2839
+ children: cards.map((card)=>{
2840
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5fe94aeb50e0798b$export$2e2bcd8739ae039), {
2841
+ id: card.id,
2842
+ visible: card.visible,
2843
+ updateVisibility: updateVisibility
2844
+ }, card.id);
2845
+ })
2846
+ })
2847
+ })
2848
+ })
2849
+ ]
2850
+ })
2851
+ })
2852
+ ]
2853
+ });
2854
+ };
2855
+ var $5d9e2ce238d53d29$export$2e2bcd8739ae039 = $5d9e2ce238d53d29$var$ManageColumns;
2856
+
2857
+
2858
+
2859
+
2860
+
2861
+
2862
+
3487
2863
 
3488
2864
 
3489
2865
 
@@ -3599,459 +2975,470 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
3599
2975
  return /*#__PURE__*/ (0, $hgUW1$jsx)("th", {
3600
2976
  key: header.id,
3601
2977
  style: {
3602
- width: header.getSize()
3603
- },
3604
- title: header.column.columnDef.header,
3605
- className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
3606
- "aria-sort": header.column.getIsSorted() === 'asc' ? 'ascending' : header.column.getIsSorted() === 'desc' ? 'descending' : 'none',
3607
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3608
- onClick: header.column.getToggleSortingHandler(),
3609
- className: "ds-u-display--flex",
3610
- children: [
3611
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3612
- children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
3613
- }),
3614
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3615
- className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ''
3616
- })
3617
- ]
3618
- })
3619
- });
3620
- })
3621
- }, headerGroup.id))
3622
- });
3623
- };
3624
- var $23763e27eda0e8d7$export$2e2bcd8739ae039 = $23763e27eda0e8d7$var$FixedSizeTHead;
3625
-
3626
-
3627
-
3628
-
3629
- const $43a30d745a7bbc86$var$DataTableContext = /*#__PURE__*/ (0, $hgUW1$createContext)({
3630
- id: null
3631
- });
3632
- var $43a30d745a7bbc86$export$2e2bcd8739ae039 = $43a30d745a7bbc86$var$DataTableContext;
3633
-
3634
-
3635
-
3636
-
3637
-
3638
- // Create a defaults object for reusability
3639
- const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
3640
- columnOrder: [],
3641
- setColumnOrder: ()=>{},
3642
- columnVisibility: {},
3643
- setColumnVisibility: ()=>{},
3644
- page: 1,
3645
- setPage: ()=>{},
3646
- tableDensity: 'normal',
3647
- setTableDensity: ()=>{}
3648
- };
3649
- const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
3650
- // Define our reusable provider component
3651
- const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=>{
3652
- // Set up all of the state
3653
- const { id: id, datasetTableControls: datasetTableControls } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
3654
- // a wrapper component to keep column state synced between full screen and regular modes
3655
- const localStorageData = id ? JSON.parse(localStorage.getItem(id)) : null;
3656
- const [page, setPage] = (0, $hgUW1$useState)(1);
3657
- const [columnOrder, setColumnOrder] = (0, $hgUW1$useState)(()=>{
3658
- if (datasetTableControls && localStorageData) return localStorageData.tableColumnOrder;
3659
- else return [];
3660
- });
3661
- const [columnVisibility, setColumnVisibility] = (0, $hgUW1$useState)(()=>{
3662
- if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
3663
- else return {};
3664
- });
3665
- const [tableDensity, setTableDensity] = (0, $hgUW1$useState)('normal');
3666
- const providerValue = {
3667
- columnOrder: columnOrder,
3668
- setColumnOrder: setColumnOrder,
3669
- columnVisibility: columnVisibility,
3670
- setColumnVisibility: setColumnVisibility,
3671
- page: page,
3672
- setPage: setPage,
3673
- tableDensity: tableDensity,
3674
- setTableDensity: setTableDensity
3675
- };
3676
- return /*#__PURE__*/ (0, $hgUW1$jsx)($ee0d4d4f34048447$export$f814ea079e65d8fe.Provider, {
3677
- value: providerValue,
3678
- children: children
3679
- });
3680
- };
3681
- const $ee0d4d4f34048447$export$67f91330d613e8f4 = ({ children: children, value: value = $ee0d4d4f34048447$var$DataTableActionsContextDefaults })=>/*#__PURE__*/ (0, $hgUW1$jsx)($ee0d4d4f34048447$export$f814ea079e65d8fe.Provider, {
3682
- value: value,
3683
- children: children
3684
- });
3685
- var $ee0d4d4f34048447$export$2e2bcd8739ae039 = $ee0d4d4f34048447$var$DataTableActionsProvider;
3686
-
3687
-
3688
-
3689
-
3690
-
3691
-
3692
-
3693
-
3694
-
3695
-
3696
-
3697
-
3698
-
3699
-
3700
-
3701
-
3702
-
3703
- const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility: updateVisibility })=>{
3704
- const { attributes: attributes, listeners: listeners, setNodeRef: setNodeRef, transform: transform, transition: transition, isDragging: isDragging } = (0, $hgUW1$useSortable)({
3705
- id: id
3706
- });
3707
- const style = {
3708
- transform: (0, $hgUW1$CSS).Transform.toString(transform),
3709
- transition: transition,
3710
- opacity: isDragging ? 0.7 : 1,
3711
- zIndex: isDragging ? 1 : 0,
3712
- position: 'relative',
3713
- background: 'white',
3714
- touchAction: 'none'
3715
- };
3716
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
3717
- className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
3718
- ref: setNodeRef,
3719
- style: style,
3720
- ...listeners,
3721
- ...attributes,
3722
- tabIndex: -1,
3723
- onPointerUp: (e)=>{
3724
- // Small hack to get around a chrome / webkit rendering bug = force chrome to repaint the checkbox
3725
- // For whatever reason the way dnd-kit handles events doesn't work well with chrome
3726
- // Without this code checkboxes can end up visually out of sync with app state until a repaint is forced
3727
- // this code forces the repaint without user interaction
3728
- const target = e.target;
3729
- if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
3730
- target.parentNode.querySelector('input').checked = visible;
3731
- }, 1);
3732
- },
3733
- children: [
3734
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
3735
- type: "checkbox",
3736
- label: id,
3737
- name: id + "_visibility",
3738
- checked: visible,
3739
- className: "ds-l-col--10 ds-u-margin-top--0 ds-u-margin-y--1 ds-u-padding-x--3",
3740
- labelClassName: "dc-truncate",
3741
- value: "",
3742
- onChange: ()=>{
3743
- updateVisibility(id, !visible);
3744
- }
3745
- }),
3746
- /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
3747
- className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && 'grabbed'}`,
3748
- "aria-label": `Reorder ${id} column`,
3749
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3750
- className: "fa fa-sort"
3751
- })
3752
- })
3753
- ]
3754
- });
3755
- };
3756
- var $5fe94aeb50e0798b$export$2e2bcd8739ae039 = $5fe94aeb50e0798b$var$Card;
3757
-
3758
-
3759
-
3760
-
3761
- /**
3762
- * Workaround for CMS Design System nested dialog issue.
3763
- * When a nested dialog closes, the design system removes scroll lock
3764
- * even if a parent dialog is still open. This restores it.
3765
- */ function $15650910340b2c71$export$73fce4ded5ef1c2() {
3766
- setTimeout(()=>{
3767
- if (document.querySelector('.dkan-fullscreen-data-table-wrapper .ds-c-dialog-wrap.open')) {
3768
- document.body.classList.add('ds--dialog-open');
3769
- document.body.style.setProperty('--body_top--dialog-open', '-0px');
3770
- }
3771
- }, 0);
3772
- }
3773
-
3774
-
3775
- class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$KeyboardSensor) {
3776
- // Custom function to exclude checkbox from keyboard dragging
3777
- static activators = [
3778
- {
3779
- eventName: 'onKeyDown',
3780
- handler: ({ nativeEvent: event })=>{
3781
- // prevent scrolling the list
3782
- const isCheckbox = [
3783
- "input",
3784
- "checkbox"
3785
- ].indexOf(event.target.tagName.toLowerCase()) !== -1;
3786
- if (event.key === " " && !isCheckbox) event.preventDefault();
3787
- // only activate on a space or return press
3788
- if ([
3789
- " ",
3790
- "Enter"
3791
- ].indexOf(event.key) === -1) return false;
3792
- if (!isCheckbox) return true;
3793
- return false;
3794
- }
3795
- }
3796
- ];
3797
- }
3798
- class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$PointerSensor) {
3799
- // Custom function to stop accidental checkbox clicks on pointer activation
3800
- static activators = [
3801
- {
3802
- eventName: 'onPointerDown',
3803
- handler: ({ nativeEvent: event })=>{
3804
- if (event.target.tagName.toLowerCase() === "input") return false;
3805
- if (event.target.tagName.toLowerCase() === "label") event.target.blur();
3806
- return true;
3807
- }
3808
- }
3809
- ];
3810
- }
3811
- const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, defaultColumnOrder: defaultColumnOrder })=>{
3812
- const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, setColumnVisibility: setColumnVisibility, columnVisibility: contextColumnVisibility } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
3813
- const columnVisibility = contextColumnVisibility || {};
3814
- const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
3815
- // maintain card state separately from table state - only sync states when the Save button is pressed
3816
- const [cards, setCards] = (0, $hgUW1$useState)(columns.map((c)=>{
3817
- return {
3818
- id: c.id,
3819
- visible: c.getIsVisible()
3820
- };
3821
- }));
3822
- const cardOrder = (0, $hgUW1$useMemo)(()=>cards.map(({ id: id })=>id), [
3823
- cards
3824
- ]);
3825
- // keep state in sync
2978
+ width: header.getSize()
2979
+ },
2980
+ title: header.column.columnDef.header,
2981
+ className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
2982
+ "aria-sort": header.column.getIsSorted() === 'asc' ? 'ascending' : header.column.getIsSorted() === 'desc' ? 'descending' : 'none',
2983
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2984
+ onClick: header.column.getToggleSortingHandler(),
2985
+ className: "ds-u-display--flex",
2986
+ children: [
2987
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2988
+ children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
2989
+ }),
2990
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2991
+ className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ''
2992
+ })
2993
+ ]
2994
+ })
2995
+ });
2996
+ })
2997
+ }, headerGroup.id))
2998
+ });
2999
+ };
3000
+ var $23763e27eda0e8d7$export$2e2bcd8739ae039 = $23763e27eda0e8d7$var$FixedSizeTHead;
3001
+
3002
+
3003
+
3004
+
3005
+
3006
+
3007
+ 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, showInfoShareContainer: showInfoShareContainer = true, showTableResults: showTableResults = true, showFilterDatasetButton: showFilterDatasetButton = true, showManageColumnsButton: showManageColumnsButton = true, showDisplaySettingsButton: showDisplaySettingsButton = true, showFullScreenButton: showFullScreenButton = true })=>{
3008
+ const { id: id, resource: resource, datasetTableControls: datasetTableControls, dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
3009
+ const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
3010
+ const { conditions: conditions } = resource;
3011
+ const data = resource.values;
3012
+ const [sorting, setSorting] = (0, $hgUW1$useState)([]);
3013
+ const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
3014
+ const columnHelper = (0, $hgUW1$createColumnHelper)();
3015
+ const table_columns = columns.map((col)=>{
3016
+ if (col.cell) return columnHelper.accessor(col.accessor, {
3017
+ header: col.header,
3018
+ cell: col.cell
3019
+ });
3020
+ return columnHelper.accessor(col.accessor, {
3021
+ header: col.header
3022
+ });
3023
+ });
3024
+ const [highlightRow, setHighlightRow] = (0, $hgUW1$useState)(null);
3826
3025
  (0, $hgUW1$useEffect)(()=>{
3827
- if (columnOrder.length) setCards(columnOrder.map((c)=>{
3828
- const column = columns.filter((col)=>col.id === c)[0];
3829
- return {
3830
- id: column.id,
3831
- visible: column.getIsVisible()
3832
- };
3833
- }));
3026
+ if (columnOrder && !columnOrder.length) setColumnOrder(table_columns.map((c)=>c.accessorKey));
3834
3027
  }, [
3835
3028
  columnOrder
3836
3029
  ]);
3837
- // Update cards state when columnVisibility changes
3030
+ const sortElement = (isSorted, onClickFn)=>{
3031
+ if (isSorted === 'asc') return 'dc-c-sort--asc';
3032
+ if (isSorted === 'desc') return 'dc-c-sort--desc';
3033
+ return 'dc-c-sort--default';
3034
+ };
3035
+ const filters = [];
3036
+ const table = (0, $hgUW1$useReactTable)({
3037
+ data: data,
3038
+ columns: table_columns,
3039
+ manualSorting: true,
3040
+ state: {
3041
+ columnOrder: columnOrder,
3042
+ columnVisibility: columnVisibility,
3043
+ sorting: sorting
3044
+ },
3045
+ columnResizeMode: 'onChange',
3046
+ onSortingChange: setSorting,
3047
+ onColumnOrderChange: setColumnOrder,
3048
+ onColumnVisibilityChange: setColumnVisibility,
3049
+ getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
3050
+ getSortedRowModel: (0, $hgUW1$getSortedRowModel)(),
3051
+ debugTable: false
3052
+ });
3838
3053
  (0, $hgUW1$useEffect)(()=>{
3839
- setCards((prevCards)=>prevCards.map((card)=>({
3840
- ...card,
3841
- visible: columnVisibility[card.id] !== false
3842
- })));
3054
+ const normalizedSort = sortTransform ? sortTransform(sorting) : filters;
3055
+ resource.setSort(normalizedSort);
3843
3056
  }, [
3844
- columnVisibility
3057
+ sorting
3845
3058
  ]);
3846
- const sensors = (0, $hgUW1$useSensors)((0, $hgUW1$useSensor)($5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor, {
3847
- activationConstraint: {
3848
- distance: 5
3849
- }
3850
- }), (0, $hgUW1$useSensor)($5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor, {
3851
- coordinateGetter: (0, $hgUW1$sortableKeyboardCoordinates)
3852
- }));
3853
- const cardHiddenColumns = cards.filter((c)=>c.visible === false).length;
3854
- const updateVisibility = (0, $hgUW1$useCallback)((id, newVisibility)=>{
3855
- setCards(cards.map((card)=>{
3856
- if (card.id === id) return {
3857
- ...card,
3858
- visible: newVisibility
3859
- };
3860
- return card;
3861
- }));
3862
- });
3863
- function handleDragEnd(e) {
3864
- const { active: active, over: over } = e;
3865
- if (active.id !== over.id) {
3866
- const oldIndex = cardOrder.indexOf(active.id);
3867
- const newIndex = cardOrder.indexOf(over.id);
3868
- let newCards = (0, $hgUW1$arrayMove)(cards, oldIndex, newIndex);
3869
- setCards(newCards);
3870
- }
3871
- }
3872
- const resetCards = ()=>{
3873
- setCards(columns.map((c)=>{
3874
- return {
3875
- id: c.id,
3876
- visible: c.getIsVisible()
3877
- };
3878
- }));
3059
+ const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
3060
+ const tableWrapperWidth = ()=>{
3061
+ if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
3062
+ return 'auto';
3879
3063
  };
3880
- const hiddenColumns = Object.keys(columnVisibility).filter((key)=>columnVisibility[key] === false).length;
3881
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3882
- className: "dkan-manage-columns-wrapper",
3064
+ (0, $hgUW1$useEffect)(()=>{
3065
+ setHighlightRow(null);
3066
+ }, [
3067
+ data
3068
+ ]);
3069
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
3883
3070
  children: [
3884
- /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
3885
- "aria-haspopup": "dialog",
3886
- 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",
3887
- onClick: ()=>{
3888
- setModalOpen(true);
3889
- },
3071
+ showDataTableToolbar && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
3890
3072
  children: [
3891
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3892
- className: "fa fa-columns ds-u-margin-right--1"
3073
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3074
+ className: "ds-u-margin-bottom--3",
3075
+ children: showDownloadFullDataButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3076
+ className: "ds-c-button ds-c-button--solid ds-l-col--12 ds-l-md-col--auto",
3077
+ href: unfilteredDownloadURL,
3078
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3079
+ className: "ds-u-font-weight--bold ds-u-font-size--md ds-u-margin-x--0 ds-u-padding--0",
3080
+ children: [
3081
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3082
+ className: "fas fa-file-csv"
3083
+ }),
3084
+ " Download full dataset (CSV)"
3085
+ ]
3086
+ })
3087
+ })
3893
3088
  }),
3894
- /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3089
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $85f8ff1ff89899c7$export$2e2bcd8739ae039), {
3090
+ id: id,
3091
+ columns: table.getAllLeafColumns(),
3092
+ defaultColumnOrder: defaultColumnOrder,
3093
+ isModal: isModal,
3094
+ resource: resource,
3095
+ datasetTableControls: datasetTableControls,
3096
+ columnVisibility: columnVisibility,
3097
+ setColumnVisibility: setColumnVisibility,
3098
+ showTableResults: showTableResults,
3099
+ showFilterDatasetButton: showFilterDatasetButton,
3100
+ showManageColumnsButton: showManageColumnsButton,
3101
+ showDisplaySettingsButton: showDisplaySettingsButton,
3102
+ showFullScreenButton: showFullScreenButton,
3103
+ showInfoShareContainer: showInfoShareContainer
3104
+ }),
3105
+ showInfoShareContainer && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3106
+ className: "ds-u-display--flex ds-l-col--12 ds-l-md-col--11 ds-u-justify-content--between ds-u-padding--0 ds-u-margin-y--2 ds-u-md-margin-y--3 ds-u-flex-direction--column ds-u-md-flex-direction--row",
3895
3107
  children: [
3896
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3897
- className: "dkan-dataset-toolbar-button-label",
3898
- children: "Manage Columns"
3108
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3109
+ className: "dkan-data-table-info-container ds-u-padding-right--0 ds-u-md-padding-right--4",
3110
+ children: [
3111
+ dataDictionaryBanner && !isModal && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3112
+ className: "ds-u-margin-bottom--3",
3113
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
3114
+ children: 'Click on the "Data Dictionary" tab above for full column definitions'
3115
+ })
3116
+ }),
3117
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
3118
+ className: "ds-u-margin--0",
3119
+ children: "Activate the column resize button and use the right and left arrow keys to resize a column or use your mouse to drag/resize. Press escape to cancel the resizing."
3120
+ })
3121
+ ]
3899
3122
  }),
3900
- hiddenColumns ? ` (${hiddenColumns})` : ''
3123
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3124
+ className: "dkan-data-table-share-container ds-l-col--auto ds-u-padding--0 ds-u-margin-bottom--2 ds-u-md-margin-bottom--0",
3125
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
3126
+ className: "ds-c-button ds-c-button--solid dkan-data-table-share-button ds-u-display--flex ds-u-align-items--center ds-u-padding-x--3 ds-u-padding-y--1 ds-u-font-weight--bold ds-l-col--12 ds-l-md-col--auto ds-u-justify-content--center",
3127
+ activeClassName: "dkan-data-table-share-tooltip-open",
3128
+ dialog: true,
3129
+ offset: [
3130
+ 0,
3131
+ 5
3132
+ ],
3133
+ "aria-haspopup": "dialog",
3134
+ placement: "bottom-start",
3135
+ maxWidth: "320px",
3136
+ title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3137
+ className: "dc-c-resource-header--buttons ds-u-display--flex ds-u-flex-direction--column ds-l-col--12 ds-u-padding-x--0",
3138
+ children: [
3139
+ showCopyLinkButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
3140
+ children: conditions && conditions.length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
3141
+ onOpen: ()=>{
3142
+ navigator.clipboard.writeText(window.location.href);
3143
+ },
3144
+ className: "ds-c-button ds-u-text-align--center ds-l-col--12 ds-u-padding-x--2 ds-u-margin-x--0 ds-u-margin-bottom--1",
3145
+ placement: "bottom",
3146
+ dialog: true,
3147
+ ariaLabel: "Copy link to filtered data",
3148
+ title: "Link copied to clipboard",
3149
+ "aria-disabled": !conditions || conditions.length === 0,
3150
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3151
+ className: "ds-u-font-weight--normal ds-u-font-size--md ds-u-margin-x--0 ds-u-padding--0",
3152
+ children: [
3153
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3154
+ className: "fas fa-copy"
3155
+ }),
3156
+ " Copy link to filtered data"
3157
+ ]
3158
+ })
3159
+ }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3160
+ "aria-disabled": true,
3161
+ "aria-label": "Copy link to filtered data",
3162
+ className: "ds-c-button ds-u-text-align--center ds-l-col--12 ds-u-padding-x--2 ds-u-margin-x--0 ds-u-margin-bottom--1",
3163
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3164
+ className: "ds-u-font-weight--normal ds-u-font-size--md ds-u-padding--0",
3165
+ children: [
3166
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3167
+ className: "fas fa-copy"
3168
+ }),
3169
+ " Copy link to filtered data"
3170
+ ]
3171
+ })
3172
+ })
3173
+ }),
3174
+ (showDownloadFilteredDataButton || showStoredQueryDownloadButton) && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3175
+ className: "ds-l-col--12 ds-u-padding-x--0 ds-u-margin-x--0",
3176
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3177
+ className: "ds-u-text-align--center ds-u-display--inline-block ds-l-col--12 ds-u-padding-x--2 ds-u-margin-x--0 ds-u-margin-bottom--1",
3178
+ href: conditions && conditions.length ? downloadURL : null,
3179
+ "aria-disabled": !conditions || conditions.length === 0,
3180
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3181
+ className: "ds-u-font-weight--normal ds-u-font-size--md ds-u-padding--0",
3182
+ children: [
3183
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3184
+ className: "fas fa-file-csv"
3185
+ }),
3186
+ " ",
3187
+ showDownloadFilteredDataButton ? `Download filtered data (CSV)` : `Download stored query data (CSV)`
3188
+ ]
3189
+ })
3190
+ })
3191
+ })
3192
+ ]
3193
+ }),
3194
+ children: [
3195
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3196
+ className: "far fa-share-alt"
3197
+ }),
3198
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3199
+ className: "ds-u-margin-x--05",
3200
+ children: "Share"
3201
+ }),
3202
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3203
+ className: "fa fa-chevron-down"
3204
+ }),
3205
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3206
+ className: "fa fa-chevron-up"
3207
+ })
3208
+ ]
3209
+ })
3210
+ })
3901
3211
  ]
3902
3212
  })
3903
3213
  ]
3904
3214
  }),
3905
3215
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3906
- className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
3907
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
3908
- heading: "Manage columns",
3909
- isOpen: modalOpen,
3910
- ariaCloseLabel: "Close dialog",
3911
- onExit: ()=>{
3912
- setModalOpen(false);
3913
- resetCards();
3914
- (0, $15650910340b2c71$export$73fce4ded5ef1c2)();
3216
+ className: `dc-c-datatable-wrapper ds-u-border-x--1 ds-u-border-bottom--1${showInfoShareContainer ? '' : ' ds-u-margin-top--3'}`,
3217
+ tabIndex: 0,
3218
+ ref: dataTableWrapperElement,
3219
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("table", {
3220
+ style: {
3221
+ width: canResize ? table.getCenterTotalSize() : "100%",
3222
+ minWidth: tableWrapperWidth()
3915
3223
  },
3916
- className: "dkan-manage-columns-dialog",
3917
- actions: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3918
- className: "ds-u-display--flex ds-u-justify-content--between ds-u-flex-wrap--wrap ds-u-padding-x--3 ds-u-padding-bottom--1 ds-u-sm-padding-bottom--3",
3919
- children: [
3920
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3921
- className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0",
3922
- children: [
3923
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3924
- variation: "solid",
3925
- className: "ds-l-col--6 ds-l-sm-col--auto",
3926
- onClick: ()=>{
3927
- setModalOpen(false);
3928
- // update table state
3929
- // Visibility
3930
- // This code is building a new columnVisibility state object from the card state and doing a single setState on the table
3931
- // vs doing a setState on every changed column individually
3932
- const newColumnVisibility = Object.fromEntries(cards.map((c)=>Object.values(c)));
3933
- setColumnVisibility(newColumnVisibility);
3934
- // Card order
3935
- const newCardOrder = cards.map((c)=>{
3936
- return c.id;
3937
- });
3938
- setColumnOrder(newCardOrder);
3939
- // save to localStorage
3940
- const localStorageData = {
3941
- tableColumnOrder: newCardOrder,
3942
- tableColumnVisibility: newColumnVisibility
3943
- };
3944
- localStorage.setItem(id, JSON.stringify(localStorageData));
3945
- (0, $15650910340b2c71$export$73fce4ded5ef1c2)();
3946
- },
3947
- children: "Save"
3948
- }),
3949
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3950
- variation: "ghost",
3951
- className: "ds-l-col--6 ds-l-sm-col--auto",
3952
- onClick: ()=>{
3953
- setModalOpen(false);
3954
- resetCards();
3955
- (0, $15650910340b2c71$export$73fce4ded5ef1c2)();
3956
- },
3957
- children: "Cancel"
3958
- })
3959
- ]
3960
- }),
3961
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3962
- className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-padding-top--1 ds-u-sm-padding-y--0",
3963
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3964
- variation: "ghost",
3965
- className: "ds-l-col--6 ds-l-sm-col--auto",
3966
- onClick: ()=>{
3967
- // reset to default column order and set all cards to visible
3968
- // do not save this to the table state until the "Save" button is clicked
3969
- setCards(defaultColumnOrder.map((column)=>{
3970
- const card = cards.filter((c)=>c.id === column)[0];
3971
- return {
3972
- ...card,
3973
- visible: true
3974
- };
3975
- }));
3976
- },
3977
- children: "Reset Columns"
3978
- })
3979
- })
3980
- ]
3981
- }),
3224
+ className: "dc-c-datatable",
3982
3225
  children: [
3983
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
3984
- id: "reorder-help",
3985
- className: "ds-u-padding-x--3",
3986
- children: "Activate the reorder button and use the arrow keys to reorder the list or use your mouse to drag/reorder. Press escape to cancel the reordering."
3987
- }),
3988
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
3989
- checked: cardHiddenColumns === 0,
3990
- type: "checkbox",
3991
- onChange: ()=>{
3992
- setCards(cards.map((c)=>{
3993
- return {
3994
- ...c,
3995
- visible: cardHiddenColumns !== 0
3996
- };
3997
- }));
3998
- },
3999
- className: "ds-u-padding-x--3",
4000
- name: "",
4001
- value: "",
4002
- label: "Select all",
4003
- hint: cardHiddenColumns && cardHiddenColumns + " columns hidden"
4004
- }),
4005
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4006
- className: "ds-u-display--flex ds-u-justify-content--between ds-u-font-weight--bold ds-u-padding-y--2 ds-u-padding-x--3 ds-u-border-y--1 ds-u-margin-top--2",
4007
- children: [
4008
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4009
- children: "Display column"
4010
- }),
4011
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4012
- children: "Reorder"
4013
- })
4014
- ]
3226
+ canResize ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $96d341d082bffec5$export$2e2bcd8739ae039), {
3227
+ table: table,
3228
+ sortElement: sortElement
3229
+ }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $23763e27eda0e8d7$export$2e2bcd8739ae039), {
3230
+ table: table,
3231
+ sortElement: sortElement
4015
3232
  }),
4016
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$DndContext), {
4017
- collisionDetection: (0, $hgUW1$closestCenter),
4018
- modifiers: [
4019
- (0, $hgUW1$restrictToVerticalAxis)
4020
- ],
4021
- sensors: sensors,
4022
- onDragEnd: handleDragEnd,
4023
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$SortableContext), {
4024
- items: cardOrder,
4025
- strategy: (0, $hgUW1$verticalListSortingStrategy),
4026
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
4027
- className: "dkan-manage-columns-list",
4028
- children: cards.map((card)=>{
4029
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5fe94aeb50e0798b$export$2e2bcd8739ae039), {
4030
- id: card.id,
4031
- visible: card.visible,
4032
- updateVisibility: updateVisibility
4033
- }, card.id);
3233
+ loading ? /*#__PURE__*/ (0, $hgUW1$jsx)("tbody", {}) : /*#__PURE__*/ (0, $hgUW1$jsx)("tbody", {
3234
+ children: table.getRowModel().rows.map((row, index)=>{
3235
+ const even = (index + 1) % 2 === 0;
3236
+ const highlight = highlightRow === row.id;
3237
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("tr", {
3238
+ className: `${highlight ? "dc-c-datatable--highlight-row" : even && "dc-c-datatable--even-row"}`,
3239
+ onClick: ()=>setHighlightRow(row.id),
3240
+ children: row.getVisibleCells().map((cell)=>{
3241
+ let classList = "dc-truncate ds-u-padding-x--1";
3242
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("td", {
3243
+ key: cell.id,
3244
+ style: {
3245
+ maxWidth: cell.column.getSize()
3246
+ },
3247
+ className: `${classList} ${tablePadding}`,
3248
+ title: cell.getValue(),
3249
+ children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
3250
+ });
4034
3251
  })
4035
- })
3252
+ }, row.id);
4036
3253
  })
4037
3254
  })
4038
3255
  ]
4039
3256
  })
3257
+ }),
3258
+ loading && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
3259
+ "aria-valuetext": "Dataset loading",
3260
+ role: "status",
3261
+ className: "ds-u-margin--3"
3262
+ }),
3263
+ !loading && table.getRowModel().rows.length === 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
3264
+ variation: "warn",
3265
+ children: "No results found for the current filters"
4040
3266
  })
4041
3267
  ]
4042
3268
  });
4043
3269
  };
4044
- var $5d9e2ce238d53d29$export$2e2bcd8739ae039 = $5d9e2ce238d53d29$var$ManageColumns;
4045
-
4046
-
4047
-
4048
-
4049
-
4050
-
3270
+ var $d98f94c79ddf4e0e$export$2e2bcd8739ae039 = $d98f94c79ddf4e0e$var$DataTable;
4051
3271
 
4052
3272
 
3273
+ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
3274
+ let newQuery = [];
3275
+ sortArray.forEach((s)=>{
3276
+ return newQuery.push({
3277
+ property: s.id,
3278
+ order: s.desc ? 'desc' : 'asc'
3279
+ });
3280
+ });
3281
+ return newQuery;
3282
+ }
4053
3283
 
4054
3284
 
3285
+ // Example custom column headers, where only effective date has an ! at the end
3286
+ // [
3287
+ // {schema: 'date', cell: ({ value }) => localeDate(value),},
3288
+ // {accessor: 'effective_date',cell: ({ value }) => localeDate(value) + '!',},
3289
+ // ]
3290
+ function $7264a673914aa746$export$8049e8f40a9bdfb8(customHeaders, columns, schema) {
3291
+ return columns.map((column)=>{
3292
+ const customAccessorIndex = customHeaders.findIndex((header)=>header.accessor === column);
3293
+ const customSchemaIndex = customHeaders.findIndex((header)=>header.schema === schema.fields[column].mysql_type);
3294
+ let newColumn = {};
3295
+ // If specific accessor is passed, this will override a general mysql_type Cell rewrite.
3296
+ if (customAccessorIndex > -1) {
3297
+ newColumn.header = schema && schema.fields[column].description ? schema.fields[column].description : column;
3298
+ newColumn.accessor = column;
3299
+ newColumn.cell = customHeaders[customAccessorIndex].cell;
3300
+ } else {
3301
+ newColumn.header = schema && schema.fields[column].description ? schema.fields[column].description : column;
3302
+ newColumn.accessor = column;
3303
+ if (customSchemaIndex > -1) newColumn.cell = customHeaders[customSchemaIndex].cell;
3304
+ }
3305
+ return newColumn;
3306
+ });
3307
+ }
3308
+ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
3309
+ if (!date) return date;
3310
+ date = new Date(date);
3311
+ date = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
3312
+ return date;
3313
+ }
3314
+ function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
3315
+ let newValue = value;
3316
+ if (Array.isArray(newValue)) newValue = newValue.join(',');
3317
+ // return newValue.replace(/(^\%+|\%+$)/gm, '');
3318
+ return newValue;
3319
+ }
3320
+ const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
3321
+ {
3322
+ label: 'Is',
3323
+ value: '='
3324
+ },
3325
+ {
3326
+ label: 'Starts With',
3327
+ value: 'starts with'
3328
+ },
3329
+ {
3330
+ label: 'Contains',
3331
+ value: 'contains'
3332
+ },
3333
+ {
3334
+ label: 'Is Not',
3335
+ value: '<>'
3336
+ },
3337
+ {
3338
+ label: 'Or',
3339
+ value: 'in'
3340
+ },
3341
+ {
3342
+ label: 'Is',
3343
+ value: '='
3344
+ },
3345
+ {
3346
+ label: 'Is Not',
3347
+ value: '<>'
3348
+ },
3349
+ {
3350
+ label: 'Greater Than',
3351
+ value: '>'
3352
+ },
3353
+ {
3354
+ label: 'Less Than',
3355
+ value: '<'
3356
+ },
3357
+ {
3358
+ label: 'Is Empty',
3359
+ value: 'is_empty'
3360
+ },
3361
+ {
3362
+ label: 'Not Empty',
3363
+ value: 'not_empty'
3364
+ }
3365
+ ];
3366
+ function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
3367
+ const operator = $7264a673914aa746$export$5f89a5ae87bc48e1.find((op)=>op.value === operatorValue);
3368
+ return operator ? operator.label : operatorValue; // Return original value if not found
3369
+ }
3370
+ function $7264a673914aa746$export$2b9377795161999(type, enableEmptyFilters = false) {
3371
+ const emptyOptions = enableEmptyFilters ? [
3372
+ {
3373
+ label: 'Is Empty',
3374
+ value: 'is_empty'
3375
+ },
3376
+ {
3377
+ label: 'Not Empty',
3378
+ value: 'not_empty'
3379
+ }
3380
+ ] : [];
3381
+ switch(type){
3382
+ case 'text':
3383
+ case 'string':
3384
+ return [
3385
+ {
3386
+ label: 'Is',
3387
+ value: '='
3388
+ },
3389
+ {
3390
+ label: 'Starts With',
3391
+ value: 'starts with'
3392
+ },
3393
+ {
3394
+ label: 'Contains',
3395
+ value: 'contains'
3396
+ },
3397
+ {
3398
+ label: 'Is Not',
3399
+ value: '<>'
3400
+ },
3401
+ {
3402
+ label: 'Or',
3403
+ value: 'in'
3404
+ },
3405
+ ...emptyOptions
3406
+ ];
3407
+ case 'date':
3408
+ return [
3409
+ {
3410
+ label: 'Is',
3411
+ value: '='
3412
+ },
3413
+ {
3414
+ label: 'Is Not',
3415
+ value: '<>'
3416
+ },
3417
+ {
3418
+ label: 'Greater Than',
3419
+ value: '>'
3420
+ },
3421
+ {
3422
+ label: 'Less Than',
3423
+ value: '<'
3424
+ },
3425
+ ...emptyOptions
3426
+ ];
3427
+ default:
3428
+ // These 2 should be safe for all data types
3429
+ return [
3430
+ {
3431
+ label: 'Is',
3432
+ value: '='
3433
+ },
3434
+ {
3435
+ label: 'Is Not',
3436
+ value: '<>'
3437
+ },
3438
+ ...emptyOptions
3439
+ ];
3440
+ }
3441
+ }
4055
3442
 
4056
3443
 
4057
3444
 
@@ -4063,11 +3450,11 @@ function $a35cf16d1488f54e$export$1147582dfae658c6(columns, schema) {
4063
3450
  accessor: column
4064
3451
  }));
4065
3452
  }
4066
- const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopyLinkButton: showCopyLinkButton = true, showDataTableToolbar: showDataTableToolbar = true, showDownloadFilteredDataButton: showDownloadFilteredDataButton = true, showDownloadFullDataButton: showDownloadFullDataButton = true, showStoredQueryDownloadButton: showStoredQueryDownloadButton = false })=>{
3453
+ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopyLinkButton: showCopyLinkButton = true, showDataTableToolbar: showDataTableToolbar = true, showDownloadFilteredDataButton: showDownloadFilteredDataButton = true, showDownloadFullDataButton: showDownloadFullDataButton = true, showStoredQueryDownloadButton: showStoredQueryDownloadButton = false, showTableResults: showTableResults = true, showFilterDatasetButton: showFilterDatasetButton = true, showManageColumnsButton: showManageColumnsButton = true, showDisplaySettingsButton: showDisplaySettingsButton = true, showFullScreenButton: showFullScreenButton = true, showInfoShareContainer: showInfoShareContainer = true })=>{
4067
3454
  const { id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
4068
3455
  const { page: page, setPage: setPage, tableDensity: tableDensity } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
4069
3456
  const defaultPageSize = 10;
4070
- const customColumnHeaders = (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution.identifier]);
3457
+ const customColumnHeaders = customColumns ? (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution.identifier]) : null;
4071
3458
  const columns = customColumnHeaders ? customColumnHeaders : $a35cf16d1488f54e$export$1147582dfae658c6(resource.columns, resource.schema[id]);
4072
3459
  const { limit: limit, setOffset: setOffset } = resource;
4073
3460
  const pageSize = limit ? limit : defaultPageSize;
@@ -4082,7 +3469,7 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
4082
3469
  className: isModal ? 'dkan-datatable-fullscreen-mode' : '',
4083
3470
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
4084
3471
  canResize: true,
4085
- columns: columns,
3472
+ columns: customColumns ? customColumns : $a35cf16d1488f54e$export$1147582dfae658c6(resource.columns, resource.schema[id]),
4086
3473
  sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
4087
3474
  tablePadding: tableDensity === 'normal' ? 'ds-u-padding-y--2' : tableDensity === 'compact' ? 'ds-u-padding-y--1' : 'ds-u-padding-y--3',
4088
3475
  loading: resource.loading,
@@ -4094,7 +3481,13 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
4094
3481
  showDataTableToolbar: showDataTableToolbar,
4095
3482
  showDownloadFilteredDataButton: showDownloadFilteredDataButton,
4096
3483
  showDownloadFullDataButton: showDownloadFullDataButton,
4097
- showStoredQueryDownloadButton: showStoredQueryDownloadButton
3484
+ showStoredQueryDownloadButton: showStoredQueryDownloadButton,
3485
+ showTableResults: showTableResults,
3486
+ showFilterDatasetButton: showFilterDatasetButton,
3487
+ showManageColumnsButton: showManageColumnsButton,
3488
+ showDisplaySettingsButton: showDisplaySettingsButton,
3489
+ showFullScreenButton: showFullScreenButton,
3490
+ showInfoShareContainer: showInfoShareContainer
4098
3491
  })
4099
3492
  }),
4100
3493
  !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
@@ -4130,7 +3523,7 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
4130
3523
  var $a35cf16d1488f54e$export$2e2bcd8739ae039 = $a35cf16d1488f54e$var$DatasetTable;
4131
3524
 
4132
3525
 
4133
- const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
3526
+ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal, showTableResults: showTableResults = true, showFilterDatasetButton: showFilterDatasetButton = true, showManageColumnsButton: showManageColumnsButton = true, showDisplaySettingsButton: showDisplaySettingsButton = true, showFullScreenButton: showFullScreenButton = true, showInfoShareContainer: showInfoShareContainer = true })=>{
4134
3527
  const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(isModal);
4135
3528
  if (isModal) return null;
4136
3529
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
@@ -4162,7 +3555,13 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
4162
3555
  ariaCloseLabel: "Close dialog",
4163
3556
  className: "dkan-full-screen-dataset-dialog",
4164
3557
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $a35cf16d1488f54e$export$2e2bcd8739ae039), {
4165
- isModal: true
3558
+ isModal: true,
3559
+ showTableResults: showTableResults,
3560
+ showFilterDatasetButton: showFilterDatasetButton,
3561
+ showManageColumnsButton: showManageColumnsButton,
3562
+ showDisplaySettingsButton: showDisplaySettingsButton,
3563
+ showFullScreenButton: showFullScreenButton,
3564
+ showInfoShareContainer: showInfoShareContainer
4166
3565
  })
4167
3566
  })
4168
3567
  })
@@ -4677,6 +4076,10 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
4677
4076
  placement: "bottom-start",
4678
4077
  maxWidth: "350px",
4679
4078
  "aria-haspopup": "dialog",
4079
+ // @ts-ignore
4080
+ // 'strategy' is not a valid prop for Tooltip but it does get passed on to Popper.js which tells
4081
+ // it to position the tooltip relative to the viewport instead of the dialog’s containing block
4082
+ strategy: "fixed",
4680
4083
  title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4681
4084
  className: "ds-u-display--flex ds-u-flex-direction--column",
4682
4085
  children: [
@@ -4825,8 +4228,8 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
4825
4228
  });
4826
4229
  window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
4827
4230
  };
4828
- const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
4829
- const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
4231
+ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility, showTableResults: showTableResults = true, showFilterDatasetButton: showFilterDatasetButton = true, showManageColumnsButton: showManageColumnsButton = true, showDisplaySettingsButton: showDisplaySettingsButton = true, showFullScreenButton: showFullScreenButton = true, showInfoShareContainer: showInfoShareContainer = true })=>{
4232
+ const { limit: limit, offset: offset, count: count, conditions: conditions = [], setConditions: setConditions } = resource;
4830
4233
  const intCount = count ? count : 0;
4831
4234
  const hiddenColumns = Object.keys(columnVisibility).filter((key)=>columnVisibility[key] === false).length;
4832
4235
  const resetColumnVisibility = ()=>{
@@ -4858,9 +4261,9 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
4858
4261
  role: "region",
4859
4262
  "aria-label": "toolbar",
4860
4263
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4861
- className: "ds-l-col--12 ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-flex-wrap--wrap ds-u-padding-x--0 ds-u-padding-y--2",
4264
+ className: `ds-l-col--12 ds-u-display--flex ds-u-align-items--center ds-u-flex-wrap--wrap ds-u-padding-x--0 ds-u-padding-y--2${showTableResults ? ' ds-u-justify-content--between' : ' ds-u-justify-content--end'}`,
4862
4265
  children: [
4863
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4266
+ showTableResults && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4864
4267
  className: "ds-u-padding-x--2",
4865
4268
  children: !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
4866
4269
  totalRows: intCount,
@@ -4872,22 +4275,28 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
4872
4275
  datasetTableControls && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4873
4276
  className: "dkan-data-table-toolbar-controls ds-u-display--flex ds-u-flex-wrap--wrap ds-u-align-items--center ds-l-md-col--auto ds-l-col--12 ds-u-padding-x--2 ds-u-padding-top--2 ds-u-md-padding-top--0",
4874
4277
  children: [
4875
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6f4318b1e14124e5$export$2e2bcd8739ae039), {}),
4876
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5d9e2ce238d53d29$export$2e2bcd8739ae039), {
4278
+ showFilterDatasetButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6f4318b1e14124e5$export$2e2bcd8739ae039), {}),
4279
+ showManageColumnsButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5d9e2ce238d53d29$export$2e2bcd8739ae039), {
4877
4280
  id: id,
4878
4281
  columns: columns,
4879
4282
  defaultColumnOrder: defaultColumnOrder
4880
4283
  }),
4881
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $dae856e97a09bcd6$export$2e2bcd8739ae039), {}),
4882
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $16bd41951b91f02d$export$2e2bcd8739ae039), {
4883
- isModal: isModal
4284
+ showDisplaySettingsButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $dae856e97a09bcd6$export$2e2bcd8739ae039), {}),
4285
+ showFullScreenButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $16bd41951b91f02d$export$2e2bcd8739ae039), {
4286
+ isModal: isModal,
4287
+ showTableResults: showTableResults,
4288
+ showFilterDatasetButton: showFilterDatasetButton,
4289
+ showManageColumnsButton: showManageColumnsButton,
4290
+ showDisplaySettingsButton: showDisplaySettingsButton,
4291
+ showFullScreenButton: showFullScreenButton,
4292
+ showInfoShareContainer: showInfoShareContainer
4884
4293
  })
4885
4294
  ]
4886
4295
  })
4887
4296
  ]
4888
4297
  })
4889
4298
  }),
4890
- Array.isArray(conditions) && (conditions.length > 0 || hiddenColumns > 0) && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4299
+ (showFilterDatasetButton || showManageColumnsButton) && Array.isArray(conditions) && (conditions.length > 0 || hiddenColumns > 0) && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4891
4300
  className: "ds-u-fill--white ds-u-padding-x--0 ds-u-md-padding-x--2 ds-u-padding-top--2",
4892
4301
  children: [
4893
4302
  /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
@@ -4934,268 +4343,296 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
4934
4343
  })
4935
4344
  ]
4936
4345
  });
4937
- };
4938
- var $85f8ff1ff89899c7$export$2e2bcd8739ae039 = $85f8ff1ff89899c7$var$DataTableToolbar;
4346
+ };
4347
+ var $85f8ff1ff89899c7$export$2e2bcd8739ae039 = $85f8ff1ff89899c7$var$DataTableToolbar;
4348
+
4349
+
4350
+
4351
+
4352
+
4353
+
4354
+
4355
+
4356
+
4357
+
4358
+ const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint })=>{
4359
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4360
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
4361
+ url: endpoint,
4362
+ plugins: [
4363
+ (0, $hgUW1$SpanOpenAPIVersion),
4364
+ (0, $hgUW1$SpanVersionStamp)
4365
+ ]
4366
+ })
4367
+ });
4368
+ };
4369
+ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocumentation;
4370
+
4371
+
4372
+
4373
+
4374
+
4375
+
4376
+
4377
+
4378
+
4379
+
4380
+
4381
+ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePadding, tablePadding: tablePadding })=>{
4382
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4383
+ className: "ds-u-display--flex",
4384
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
4385
+ options: [
4386
+ {
4387
+ label: 'Tight',
4388
+ value: 'ds-u-padding-y--0'
4389
+ },
4390
+ {
4391
+ label: 'Normal',
4392
+ value: 'ds-u-padding-y--1'
4393
+ },
4394
+ {
4395
+ label: 'Expanded',
4396
+ value: 'ds-u-padding-y--2'
4397
+ }
4398
+ ],
4399
+ label: "Display density:",
4400
+ labelClassName: "ds-u-margin-top--0",
4401
+ name: "datatable_display_density",
4402
+ onChange: (e)=>setTablePadding(e.target.value),
4403
+ defaultValue: tablePadding
4404
+ })
4405
+ });
4406
+ };
4407
+ $1e012d1e3b534af0$var$DataTableDensity.propTypes = {
4408
+ setTablePadding: (0, $hgUW1$proptypes).func.isRequired
4409
+ };
4410
+ var $1e012d1e3b534af0$export$2e2bcd8739ae039 = $1e012d1e3b534af0$var$DataTableDensity;
4411
+
4412
+
4413
+
4414
+
4415
+
4416
+
4417
+ const $7848c69a021266f7$var$DataTableRowChanger = ({ limit: limit, rowOptions: rowOptions = [
4418
+ 10,
4419
+ 25,
4420
+ 50,
4421
+ 100
4422
+ ], setLimit: setLimit })=>{
4423
+ const rowOptionsFormatted = rowOptions.map((row)=>({
4424
+ label: row.toString(),
4425
+ value: row.toString()
4426
+ }));
4427
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4428
+ className: "ds-u-display--flex",
4429
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
4430
+ options: rowOptionsFormatted,
4431
+ label: "Rows per page:",
4432
+ labelClassName: "ds-u-margin-top--0",
4433
+ name: "datatable_rows_per_page",
4434
+ onChange: (e)=>setLimit(e.target.value),
4435
+ defaultValue: limit.toString()
4436
+ })
4437
+ });
4438
+ };
4439
+ $7848c69a021266f7$var$DataTableRowChanger.propTypes = {
4440
+ rowOptions: (0, $hgUW1$proptypes).arrayOf((0, $hgUW1$proptypes).number),
4441
+ setLimit: (0, $hgUW1$proptypes).func.isRequired,
4442
+ limit: (0, $hgUW1$proptypes).number
4443
+ };
4444
+ var $7848c69a021266f7$export$2e2bcd8739ae039 = $7848c69a021266f7$var$DataTableRowChanger;
4445
+
4446
+
4447
+
4448
+
4449
+ const $e973bc477cdc2dc7$var$DownloadIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
4450
+ width: "15px",
4451
+ height: "15px",
4452
+ viewBox: "0 0 384 512",
4453
+ version: "1.1",
4454
+ xmlns: "http://www.w3.org/2000/svg",
4455
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
4456
+ children: [
4457
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
4458
+ children: "Download Icon"
4459
+ }),
4460
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
4461
+ stroke: "none",
4462
+ strokeWidth: "1",
4463
+ fill: "none",
4464
+ fillRule: "evenodd",
4465
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
4466
+ fill: "#112E51",
4467
+ fillRule: "nonzero",
4468
+ d: "M384 128h-128V0L384 128zM256 160H384v304c0 26.51-21.49 48-48 48h-288C21.49 512 0 490.5 0 464v-416C0 21.49 21.49 0 48 0H224l.0039 128C224 145.7 238.3 160 256 160zM255 295L216 334.1V232c0-13.25-10.75-24-24-24S168 218.8 168 232v102.1L128.1 295C124.3 290.3 118.2 288 112 288S99.72 290.3 95.03 295c-9.375 9.375-9.375 24.56 0 33.94l80 80c9.375 9.375 24.56 9.375 33.94 0l80-80c9.375-9.375 9.375-24.56 0-33.94S264.4 285.7 255 295z"
4469
+ })
4470
+ })
4471
+ ]
4472
+ });
4473
+ var $e973bc477cdc2dc7$export$2e2bcd8739ae039 = $e973bc477cdc2dc7$var$DownloadIcon;
4474
+
4475
+
4476
+
4477
+
4478
+ const $7ec5423a30aa3f61$var$CopyIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
4479
+ width: "15px",
4480
+ height: "15px",
4481
+ viewBox: "0 0 512 512",
4482
+ version: "1.1",
4483
+ xmlns: "http://www.w3.org/2000/svg",
4484
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
4485
+ children: [
4486
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
4487
+ children: "Copy Icon"
4488
+ }),
4489
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
4490
+ stroke: "none",
4491
+ strokeWidth: "1",
4492
+ fill: "none",
4493
+ fillRule: "evenodd",
4494
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
4495
+ fill: "#112E51",
4496
+ fillRule: "nonzero",
4497
+ d: "M384 96L384 0h-112c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48H464c26.51 0 48-21.49 48-48V128h-95.1C398.4 128 384 113.6 384 96zM416 0v96h96L416 0zM192 352V128h-144c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48L288 416h-32C220.7 416 192 387.3 192 352z"
4498
+ })
4499
+ })
4500
+ ]
4501
+ });
4502
+ var $7ec5423a30aa3f61$export$2e2bcd8739ae039 = $7ec5423a30aa3f61$var$CopyIcon;
4939
4503
 
4940
4504
 
4941
- 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 })=>{
4942
- const { id: id, resource: resource, datasetTableControls: datasetTableControls, dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
4943
- const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
4944
- const { conditions: conditions } = resource;
4945
- const data = resource.values;
4946
- const [sorting, setSorting] = (0, $hgUW1$useState)([]);
4947
- const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
4948
- const columnHelper = (0, $hgUW1$createColumnHelper)();
4949
- const table_columns = columns.map((col)=>{
4950
- if (col.cell) return columnHelper.accessor(col.accessor, {
4951
- header: col.header,
4952
- cell: col.cell
4953
- });
4954
- return columnHelper.accessor(col.accessor, {
4955
- header: col.header
4956
- });
4505
+
4506
+
4507
+ const $ec9e1550b0b034d0$var$SettingsIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
4508
+ width: "15px",
4509
+ height: "15px",
4510
+ // viewBox="0 0 15 15"
4511
+ viewBox: "0 0 512 512",
4512
+ version: "1.1",
4513
+ xmlns: "http://www.w3.org/2000/svg",
4514
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
4515
+ children: [
4516
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
4517
+ children: "Settings Icon"
4518
+ }),
4519
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
4520
+ stroke: "none",
4521
+ strokeWidth: "1",
4522
+ fill: "none",
4523
+ fillRule: "evenodd",
4524
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
4525
+ fill: "#112E51",
4526
+ fillRule: "nonzero",
4527
+ d: "M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"
4528
+ })
4529
+ })
4530
+ ]
4957
4531
  });
4958
- const [highlightRow, setHighlightRow] = (0, $hgUW1$useState)(null);
4959
- (0, $hgUW1$useEffect)(()=>{
4960
- if (columnOrder && !columnOrder.length) setColumnOrder(table_columns.map((c)=>c.accessorKey));
4961
- }, [
4962
- columnOrder
4963
- ]);
4964
- const sortElement = (isSorted, onClickFn)=>{
4965
- if (isSorted === 'asc') return 'dc-c-sort--asc';
4966
- if (isSorted === 'desc') return 'dc-c-sort--desc';
4967
- return 'dc-c-sort--default';
4968
- };
4969
- const filters = [];
4970
- const table = (0, $hgUW1$useReactTable)({
4971
- data: data,
4972
- columns: table_columns,
4973
- manualSorting: true,
4974
- state: {
4975
- columnOrder: columnOrder,
4976
- columnVisibility: columnVisibility,
4977
- sorting: sorting
4978
- },
4979
- columnResizeMode: 'onChange',
4980
- onSortingChange: setSorting,
4981
- onColumnOrderChange: setColumnOrder,
4982
- onColumnVisibilityChange: setColumnVisibility,
4983
- getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
4984
- getSortedRowModel: (0, $hgUW1$getSortedRowModel)(),
4985
- debugTable: false
4532
+ var $ec9e1550b0b034d0$export$2e2bcd8739ae039 = $ec9e1550b0b034d0$var$SettingsIcon;
4533
+
4534
+
4535
+
4536
+ const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding, includeDensity: includeDensity, includeDownload: includeDownload, resource: resource, tablePadding: tablePadding, downloadUrl: downloadUrl })=>{
4537
+ const md = (0, $hgUW1$useMediaQuery)({
4538
+ minWidth: 0,
4539
+ maxWidth: 768
4986
4540
  });
4987
- (0, $hgUW1$useEffect)(()=>{
4988
- const normalizedSort = sortTransform ? sortTransform(sorting) : filters;
4989
- resource.setSort(normalizedSort);
4990
- }, [
4991
- sorting
4992
- ]);
4993
- const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
4994
- const tableWrapperWidth = ()=>{
4995
- if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
4996
- return 'auto';
4997
- };
4998
- (0, $hgUW1$useEffect)(()=>{
4999
- setHighlightRow(null);
5000
- }, [
5001
- data
5002
- ]);
5003
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
5004
- children: [
5005
- showDataTableToolbar && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
4541
+ const { limit: limit, offset: offset, count: count, setLimit: setLimit, setOffset: setOffset } = resource;
4542
+ const intCount = count ? parseInt(count) : 0;
4543
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4544
+ className: "dc-c-resource-header",
4545
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4546
+ className: "ds-l-row ds-u-align-items--center",
4547
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4548
+ className: "ds-l-col--12 ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-margin-bottom--2",
5006
4549
  children: [
5007
4550
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5008
- className: "ds-u-margin-bottom--3",
5009
- children: showDownloadFullDataButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
5010
- className: "ds-c-button ds-c-button--solid ds-l-col--12 ds-l-md-col--auto",
5011
- href: unfilteredDownloadURL,
5012
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
5013
- className: "ds-u-font-weight--bold ds-u-font-size--md ds-u-margin-x--0 ds-u-padding--0",
5014
- children: [
5015
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
5016
- className: "fas fa-file-csv"
5017
- }),
5018
- " Download full dataset (CSV)"
5019
- ]
5020
- })
4551
+ className: "ds-u-font-weight--bold",
4552
+ children: !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
4553
+ totalRows: parseInt(intCount),
4554
+ limit: parseInt(limit),
4555
+ offset: parseInt(offset)
5021
4556
  })
5022
4557
  }),
5023
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $85f8ff1ff89899c7$export$2e2bcd8739ae039), {
5024
- id: id,
5025
- columns: table.getAllLeafColumns(),
5026
- defaultColumnOrder: defaultColumnOrder,
5027
- isModal: isModal,
5028
- resource: resource,
5029
- datasetTableControls: datasetTableControls,
5030
- columnVisibility: columnVisibility,
5031
- setColumnVisibility: setColumnVisibility
5032
- }),
5033
4558
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5034
- className: "ds-u-display--flex ds-l-col--12 ds-l-md-col--11 ds-u-justify-content--between ds-u-padding--0 ds-u-margin-y--2 ds-u-md-margin-y--3 ds-u-flex-direction--column ds-u-md-flex-direction--row",
4559
+ className: "dc-c-resource-header--buttons",
5035
4560
  children: [
5036
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5037
- className: "dkan-data-table-info-container ds-u-padding-right--0 ds-u-md-padding-right--4",
4561
+ includeDownload && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
5038
4562
  children: [
5039
- dataDictionaryBanner && !isModal && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5040
- className: "ds-u-margin-bottom--3",
5041
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
5042
- children: 'Click on the "Data Dictionary" tab above for full column definitions'
5043
- })
5044
- }),
5045
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
5046
- className: "ds-u-margin--0",
5047
- children: "Activate the column resize button and use the right and left arrow keys to resize a column or use your mouse to drag/resize. Press escape to cancel the resizing."
5048
- })
5049
- ]
5050
- }),
5051
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5052
- className: "dkan-data-table-share-container ds-l-col--auto ds-u-padding--0 ds-u-margin-bottom--2 ds-u-md-margin-bottom--0",
5053
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
5054
- className: "ds-c-button ds-c-button--solid dkan-data-table-share-button ds-u-display--flex ds-u-align-items--center ds-u-padding-x--3 ds-u-padding-y--1 ds-u-font-weight--bold ds-l-col--12 ds-l-md-col--auto ds-u-justify-content--center",
5055
- activeClassName: "dkan-data-table-share-tooltip-open",
5056
- dialog: true,
5057
- offset: [
5058
- 0,
5059
- 5
5060
- ],
5061
- "aria-haspopup": "dialog",
5062
- placement: "bottom-start",
5063
- maxWidth: "320px",
5064
- title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5065
- className: "dc-c-resource-header--buttons ds-u-display--flex ds-u-flex-direction--column ds-l-col--12 ds-u-padding-x--0",
4563
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
4564
+ size: "small",
4565
+ className: "ds-u-text-align--left ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1",
4566
+ href: downloadUrl,
5066
4567
  children: [
5067
- showCopyLinkButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
5068
- children: conditions && conditions.length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
5069
- onOpen: ()=>{
5070
- navigator.clipboard.writeText(window.location.href);
5071
- },
5072
- className: "ds-c-button ds-u-text-align--center ds-l-col--12 ds-u-padding-x--2 ds-u-margin-x--0 ds-u-margin-bottom--1",
5073
- placement: "bottom",
5074
- dialog: true,
5075
- ariaLabel: "Copy link to filtered data",
5076
- title: "Link copied to clipboard",
5077
- "aria-disabled": !conditions || conditions.length === 0,
5078
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
5079
- className: "ds-u-font-weight--normal ds-u-font-size--md ds-u-margin-x--0 ds-u-padding--0",
5080
- children: [
5081
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
5082
- className: "fas fa-copy"
5083
- }),
5084
- " Copy link to filtered data"
5085
- ]
5086
- })
5087
- }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
5088
- "aria-disabled": true,
5089
- "aria-label": "Copy link to filtered data",
5090
- className: "ds-c-button ds-u-text-align--center ds-l-col--12 ds-u-padding-x--2 ds-u-margin-x--0 ds-u-margin-bottom--1",
5091
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
5092
- className: "ds-u-font-weight--normal ds-u-font-size--md ds-u-padding--0",
5093
- children: [
5094
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
5095
- className: "fas fa-copy"
5096
- }),
5097
- " Copy link to filtered data"
5098
- ]
5099
- })
5100
- })
5101
- }),
5102
- (showDownloadFilteredDataButton || showStoredQueryDownloadButton) && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5103
- className: "ds-l-col--12 ds-u-padding-x--0 ds-u-margin-x--0",
5104
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
5105
- className: "ds-u-text-align--center ds-u-display--inline-block ds-l-col--12 ds-u-padding-x--2 ds-u-margin-x--0 ds-u-margin-bottom--1",
5106
- href: conditions && conditions.length ? downloadURL : null,
5107
- "aria-disabled": !conditions || conditions.length === 0,
5108
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
5109
- className: "ds-u-font-weight--normal ds-u-font-size--md ds-u-padding--0",
5110
- children: [
5111
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
5112
- className: "fas fa-file-csv"
5113
- }),
5114
- " ",
5115
- showDownloadFilteredDataButton ? `Download filtered data (CSV)` : `Download stored query data (CSV)`
5116
- ]
5117
- })
5118
- })
4568
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e973bc477cdc2dc7$export$2e2bcd8739ae039), {}),
4569
+ !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4570
+ className: "ds-u-font-weight--semibold ds-u-margin-left--1",
4571
+ children: "Download filtered data (CSV)"
5119
4572
  })
5120
4573
  ]
5121
4574
  }),
5122
- children: [
5123
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
5124
- className: "far fa-share-alt"
5125
- }),
5126
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5127
- className: "ds-u-margin-x--05",
5128
- children: "Share"
5129
- }),
5130
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
5131
- className: "fa fa-chevron-down"
4575
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
4576
+ onOpen: ()=>{
4577
+ navigator.clipboard.writeText(window.location.href);
4578
+ },
4579
+ className: "ds-c-button ds-c-button--small ds-u-text-align--left ds-u-margin-right--1 display-settings-font",
4580
+ placement: "bottom",
4581
+ dialog: true,
4582
+ ariaLabel: "Copy link to filtered data",
4583
+ title: "Link copied to clipboard",
4584
+ children: [
4585
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7ec5423a30aa3f61$export$2e2bcd8739ae039), {}),
4586
+ !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4587
+ className: "ds-u-font-weight--semibold ds-u-margin-left--1",
4588
+ children: "Copy link to filtered data"
4589
+ })
4590
+ ]
4591
+ })
4592
+ ]
4593
+ }),
4594
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
4595
+ className: "ds-c-button ds-c-button--small ds-u-text-align--left display-settings-font",
4596
+ placement: "bottom",
4597
+ dialog: true,
4598
+ ariaLabel: "Display settings",
4599
+ title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4600
+ className: "dc-c-display-settings",
4601
+ children: [
4602
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7848c69a021266f7$export$2e2bcd8739ae039), {
4603
+ limit: Number(limit),
4604
+ setLimit: setLimit,
4605
+ setOffset: setOffset
5132
4606
  }),
5133
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
5134
- className: "fa fa-chevron-up"
4607
+ includeDensity && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $1e012d1e3b534af0$export$2e2bcd8739ae039), {
4608
+ setTablePadding: setTablePadding,
4609
+ tablePadding: tablePadding
5135
4610
  })
5136
4611
  ]
5137
- })
4612
+ }),
4613
+ children: [
4614
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $ec9e1550b0b034d0$export$2e2bcd8739ae039), {}),
4615
+ !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4616
+ className: "ds-u-font-weight--semibold ds-u-margin-left--1",
4617
+ children: "Display settings"
4618
+ })
4619
+ ]
5138
4620
  })
5139
4621
  ]
5140
4622
  })
5141
4623
  ]
5142
- }),
5143
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5144
- className: "dc-c-datatable-wrapper ds-u-border-x--1 ds-u-border-bottom--1",
5145
- tabIndex: 0,
5146
- ref: dataTableWrapperElement,
5147
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("table", {
5148
- style: {
5149
- width: canResize ? table.getCenterTotalSize() : "100%",
5150
- minWidth: tableWrapperWidth()
5151
- },
5152
- className: "dc-c-datatable",
5153
- children: [
5154
- canResize ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $96d341d082bffec5$export$2e2bcd8739ae039), {
5155
- table: table,
5156
- sortElement: sortElement
5157
- }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $23763e27eda0e8d7$export$2e2bcd8739ae039), {
5158
- table: table,
5159
- sortElement: sortElement
5160
- }),
5161
- loading ? /*#__PURE__*/ (0, $hgUW1$jsx)("tbody", {}) : /*#__PURE__*/ (0, $hgUW1$jsx)("tbody", {
5162
- children: table.getRowModel().rows.map((row, index)=>{
5163
- const even = (index + 1) % 2 === 0;
5164
- const highlight = highlightRow === row.id;
5165
- return /*#__PURE__*/ (0, $hgUW1$jsx)("tr", {
5166
- className: `${highlight ? "dc-c-datatable--highlight-row" : even && "dc-c-datatable--even-row"}`,
5167
- onClick: ()=>setHighlightRow(row.id),
5168
- children: row.getVisibleCells().map((cell)=>{
5169
- let classList = "dc-truncate ds-u-padding-x--1";
5170
- return /*#__PURE__*/ (0, $hgUW1$jsx)("td", {
5171
- key: cell.id,
5172
- style: {
5173
- maxWidth: cell.column.getSize()
5174
- },
5175
- className: `${classList} ${tablePadding}`,
5176
- title: cell.getValue(),
5177
- children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
5178
- });
5179
- })
5180
- }, row.id);
5181
- })
5182
- })
5183
- ]
5184
- })
5185
- }),
5186
- loading && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
5187
- "aria-valuetext": "Dataset loading",
5188
- role: "status",
5189
- className: "ds-u-margin--3"
5190
- }),
5191
- !loading && table.getRowModel().rows.length === 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
5192
- variation: "warn",
5193
- children: "No results found for the current filters"
5194
4624
  })
5195
- ]
4625
+ })
5196
4626
  });
5197
4627
  };
5198
- var $d98f94c79ddf4e0e$export$2e2bcd8739ae039 = $d98f94c79ddf4e0e$var$DataTable;
4628
+ var $af099c546cb226c7$export$2e2bcd8739ae039 = $af099c546cb226c7$var$ResourceHeader;
4629
+
4630
+
4631
+
4632
+
4633
+
4634
+
4635
+
5199
4636
 
5200
4637
 
5201
4638
 
@@ -5218,21 +4655,30 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
5218
4655
  value: filterValue || ''
5219
4656
  });
5220
4657
  }
5221
- const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
4658
+ const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true, showDataTableToolbar: showDataTableToolbar = false, showInfoShareContainer: showInfoShareContainer = true, showTableResults: showTableResults = true, showFilterDatasetButton: showFilterDatasetButton = true, showManageColumnsButton: showManageColumnsButton = true, showDisplaySettingsButton: showDisplaySettingsButton = true, showFullScreenButton: showFullScreenButton = true })=>{
5222
4659
  const { resource: resource, customColumns: customColumns } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
4660
+ const { tableDensity: tableDensity } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
5223
4661
  const customColumnHeaders = customColumns ? (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[id]) : null;
5224
4662
  const columns = customColumnHeaders ? customColumnHeaders : $626282d9a03c51d5$export$1147582dfae658c6(resource.columns, resource.schema[id]);
5225
4663
  if (Object.keys(resource).length && columns.length && resource.schema) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5226
4664
  id: "resource-preview",
5227
- className: "ds-u-overflow--auto ds-u-border-x--1 ds-u-border-bottom--1",
4665
+ className: "ds-u-overflow--auto",
5228
4666
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
5229
4667
  canResize: canResize,
5230
4668
  columns: customColumns ? customColumns : $626282d9a03c51d5$export$1147582dfae658c6(resource.columns, resource.schema[id]),
5231
4669
  sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
5232
- tablePadding: tablePadding,
4670
+ tablePadding: typeof tablePadding === 'function' ? tablePadding(tableDensity) : tablePadding,
5233
4671
  loading: resource.loading,
5234
4672
  className: "dc-c-datatable",
5235
- customColumnFilter: $626282d9a03c51d5$var$DefaultColumnFilter
4673
+ customColumnFilter: $626282d9a03c51d5$var$DefaultColumnFilter,
4674
+ showDataTableToolbar: showDataTableToolbar,
4675
+ showInfoShareContainer: showInfoShareContainer,
4676
+ showTableResults: showTableResults,
4677
+ showFilterDatasetButton: showFilterDatasetButton,
4678
+ showManageColumnsButton: showManageColumnsButton,
4679
+ showDisplaySettingsButton: showDisplaySettingsButton,
4680
+ showFullScreenButton: showFullScreenButton,
4681
+ isModal: false
5236
4682
  })
5237
4683
  });
5238
4684
  else return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {});
@@ -5472,9 +4918,7 @@ var $5644ebd2c3dbfd7b$export$2e2bcd8739ae039 = $5644ebd2c3dbfd7b$var$DatasetAddi
5472
4918
 
5473
4919
 
5474
4920
 
5475
-
5476
-
5477
- const $6fd40f23575fa7f0$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: rootUrl, showRowLimitNotice: showRowLimitNotice = false, swaggerButtonClassNames: swaggerButtonClassNames = {} })=>{
4921
+ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: rootUrl, showRowLimitNotice: showRowLimitNotice = false })=>{
5478
4922
  let params = {
5479
4923
  authentication: hideAuth ? false : undefined
5480
4924
  };
@@ -5483,7 +4927,7 @@ const $6fd40f23575fa7f0$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
5483
4927
  children: [
5484
4928
  showRowLimitNotice && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e49d4387bed21287$export$2e2bcd8739ae039), {}),
5485
4929
  /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
5486
- className: "ds-l-container ds-u-padding--0 ds-u-margin-top--5",
4930
+ className: "ds-l-container",
5487
4931
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
5488
4932
  url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
5489
4933
  addQueryPrefix: true
@@ -5491,19 +4935,15 @@ const $6fd40f23575fa7f0$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
5491
4935
  docExpansion: 'list',
5492
4936
  defaultModelsExpandDepth: -1,
5493
4937
  plugins: [
5494
- (0, $5b656f0283afa250$export$2e2bcd8739ae039),
5495
- (0, $ffd9c403a1c2fc39$export$2e2bcd8739ae039),
5496
- (0, $30bfb3d671300bcd$export$2e2bcd8739ae039)({
5497
- showRowLimitNotice: showRowLimitNotice,
5498
- buttonClassNames: swaggerButtonClassNames
5499
- })
4938
+ (0, $hgUW1$SpanOpenAPIVersion),
4939
+ (0, $hgUW1$SpanVersionStamp)
5500
4940
  ]
5501
4941
  })
5502
4942
  })
5503
4943
  ]
5504
4944
  });
5505
4945
  };
5506
- var $6fd40f23575fa7f0$export$2e2bcd8739ae039 = $6fd40f23575fa7f0$var$APIPage;
4946
+ var $c96c4b9ef7203c1f$export$2e2bcd8739ae039 = $c96c4b9ef7203c1f$var$APIPage;
5507
4947
 
5508
4948
 
5509
4949
 
@@ -6295,7 +5735,6 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
6295
5735
 
6296
5736
 
6297
5737
 
6298
-
6299
5738
 
6300
5739
  const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution, rootUrl: rootUrl })=>{
6301
5740
  const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
@@ -6435,7 +5874,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
6435
5874
  var $7357cc0f79f9c514$export$2e2bcd8739ae039 = $7357cc0f79f9c514$var$Resource;
6436
5875
 
6437
5876
 
6438
- const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: resource, distributions: distributions, metadataMapping: metadataMapping, rootUrl: rootUrl, showTags: showTags })=>{
5877
+ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: resource, distributions: distributions, metadataMapping: metadataMapping, rootUrl: rootUrl })=>{
6439
5878
  const md = (0, $hgUW1$useMediaQuery)({
6440
5879
  minWidth: 0,
6441
5880
  maxWidth: 768
@@ -6467,36 +5906,11 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
6467
5906
  title: dataset.title,
6468
5907
  rootUrl: rootUrl
6469
5908
  }),
6470
- showTags ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6471
- className: "ds-u-margin-top--3",
6472
- children: [
6473
- /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
6474
- className: "ds-text-heading--2xl",
6475
- children: "Tags"
6476
- }),
6477
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6478
- className: "ds-u-display--flex ds-u-flex-direction--row ds-u-justify-content--start ds-u-flex-wrap--wrap",
6479
- children: dataset.keyword?.map((tag)=>/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6480
- className: "ds-c-tag ds-u-fill--gray-lighter ds-u-display--inline-block ds-u-padding--1 ds-u-radius ds-u-margin-right--2 ds-u-margin-bottom--2",
6481
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
6482
- to: `/search?keyword=${tag.data}`,
6483
- "aria-label": `${tag.data} tag - Opens a new search with this filter`,
6484
- className: "ds-u-color--base",
6485
- children: [
6486
- " ",
6487
- tag.data,
6488
- " "
6489
- ]
6490
- })
6491
- }, tag.identifier))
6492
- })
6493
- ]
6494
- }) : '',
6495
5909
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6496
- className: "dc-c-additional-info-table ds-u-margin-bottom--6 ds-u-margin-top--3 ds-u-padding-left--0 ds-l-lg-col--7 ds-l-md-col--9 ds-l-col--12",
5910
+ className: "dc-c-additional-info-table ds-u-margin-bottom--6 ds-u-padding-left--0 ds-l-lg-col--7 ds-l-md-col--9 ds-l-col--12",
6497
5911
  children: [
6498
5912
  /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
6499
- className: "ds-text-heading--2xl",
5913
+ className: "ds-text-heading--2xl ds-text-heading--2xl",
6500
5914
  children: "Additional Information"
6501
5915
  }),
6502
5916
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Table), {
@@ -6554,15 +5968,54 @@ var $364dc44850cd8f7f$export$2e2bcd8739ae039 = $364dc44850cd8f7f$var$DatasetOver
6554
5968
 
6555
5969
 
6556
5970
 
6557
- const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: apiUrl, showRowLimitNotice: showRowLimitNotice = false, swaggerButtonClassNames: swaggerButtonClassNames = {} })=>{
5971
+
5972
+ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: apiUrl, showRowLimitNotice: showRowLimitNotice = false })=>{
6558
5973
  const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
6559
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
6560
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2276c8c929d6a6d3$export$2e2bcd8739ae039), {
6561
- endpoint: `${rootUrl}/metastore/schemas/dataset/items/${id}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
6562
- docsURL: apiUrl,
6563
- showRowLimitNotice: showRowLimitNotice,
6564
- swaggerButtonClassNames: swaggerButtonClassNames
6565
- })
5974
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
5975
+ children: [
5976
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5977
+ className: "ds-u-display--flex ds-u-flex-wrap--wrap",
5978
+ children: [
5979
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5980
+ className: "ds-l-col--12 ds-l-md-col--9 ds-u-padding-left--0",
5981
+ children: [
5982
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
5983
+ className: "ds-text-heading--2xl",
5984
+ children: "Try the API"
5985
+ }),
5986
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
5987
+ children: "The Open Data API (ODA) provides programmatic access to this dataset including the ability to filter, query, and aggregate data."
5988
+ }),
5989
+ showRowLimitNotice && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e49d4387bed21287$export$2e2bcd8739ae039), {})
5990
+ ]
5991
+ }),
5992
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5993
+ className: "ds-l-col--12 ds-l-md-col--3 ds-u-font-weight--bold ds-u-margin-top--2 ds-u-padding-left--0 ds-u-md-padding-left--2",
5994
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
5995
+ href: apiUrl,
5996
+ children: [
5997
+ "View API",
5998
+ ' ',
5999
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
6000
+ style: {
6001
+ whiteSpace: 'nowrap'
6002
+ },
6003
+ children: [
6004
+ "specification ",
6005
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
6006
+ className: "fa fa-arrow-right ds-u-font-weight--bold"
6007
+ })
6008
+ ]
6009
+ })
6010
+ ]
6011
+ })
6012
+ })
6013
+ ]
6014
+ }),
6015
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $789279954d8eff7f$export$2e2bcd8739ae039), {
6016
+ endpoint: `${rootUrl}/metastore/schemas/dataset/items/${id}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`
6017
+ })
6018
+ ]
6566
6019
  });
6567
6020
  };
6568
6021
  var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
@@ -6581,7 +6034,10 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
6581
6034
 
6582
6035
 
6583
6036
 
6584
- const $1253cd791a90b9cc$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
6037
+
6038
+
6039
+
6040
+ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
6585
6041
  const [sorting, setSorting] = (0, $hgUW1$useState)([]);
6586
6042
  const mobile = (0, $hgUW1$useMediaQuery)({
6587
6043
  minWidth: 0,
@@ -6752,7 +6208,7 @@ const $1253cd791a90b9cc$var$DataDictionaryTable = ({ tableColumns: tableColumns,
6752
6208
  ]
6753
6209
  });
6754
6210
  };
6755
- var $1253cd791a90b9cc$export$2e2bcd8739ae039 = $1253cd791a90b9cc$var$DataDictionaryTable;
6211
+ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDictionaryTable;
6756
6212
 
6757
6213
 
6758
6214
  const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
@@ -6771,7 +6227,7 @@ const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary:
6771
6227
  header: 'Format'
6772
6228
  })
6773
6229
  ];
6774
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $1253cd791a90b9cc$export$2e2bcd8739ae039), {
6230
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
6775
6231
  tableColumns: tableColumns,
6776
6232
  tableData: datasetDictionary,
6777
6233
  pageSize: pageSize
@@ -6787,12 +6243,7 @@ var $a24829b27758fe6c$export$2e2bcd8739ae039 = $a24829b27758fe6c$var$SitewideDat
6787
6243
 
6788
6244
 
6789
6245
 
6790
-
6791
-
6792
-
6793
-
6794
-
6795
- const $c08f91c7fd0895d8$var$DatasetDictionaryTable = ({ datasetDictionaryEndpoint: datasetDictionaryEndpoint, pageSize: pageSize, showDownloadButton: showDownloadButton })=>{
6246
+ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
6796
6247
  const [titleFilter, setTitleFilter] = (0, $hgUW1$useState)("");
6797
6248
  const [typeFilter, setTypeFilter] = (0, $hgUW1$useState)("all");
6798
6249
  const columnFilters = (0, $hgUW1$useMemo)(()=>[
@@ -6808,18 +6259,6 @@ const $c08f91c7fd0895d8$var$DatasetDictionaryTable = ({ datasetDictionaryEndpoin
6808
6259
  titleFilter,
6809
6260
  typeFilter
6810
6261
  ]);
6811
- const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
6812
- const { data: data } = (0, $hgUW1$useQuery)({
6813
- queryKey: [
6814
- "dictionary" + datasetDictionaryEndpoint
6815
- ],
6816
- queryFn: ()=>{
6817
- return (0, $hgUW1$axios).get(`${datasetDictionaryEndpoint}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>console.error(error));
6818
- },
6819
- enabled: datasetDictionaryEndpoint !== undefined
6820
- });
6821
- const datasetDictionary = data && data.data && data.data.fields && data.data.fields.length ? data.data.fields : null;
6822
- if (!datasetDictionary) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {});
6823
6262
  const tableData = datasetDictionary.map((item)=>{
6824
6263
  return {
6825
6264
  titleResizable: item.title,
@@ -6895,38 +6334,6 @@ const $c08f91c7fd0895d8$var$DatasetDictionaryTable = ({ datasetDictionaryEndpoin
6895
6334
  ];
6896
6335
  return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
6897
6336
  children: [
6898
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6899
- className: "ds-u-margin-bottom--1 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end",
6900
- children: [
6901
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
6902
- className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4",
6903
- onClick: ()=>window.open(datasetDictionaryEndpoint),
6904
- type: "button",
6905
- children: [
6906
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
6907
- className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
6908
- }),
6909
- " View Dictionary JSON"
6910
- ]
6911
- }),
6912
- showDownloadButton && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6913
- className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-margin-top--2 ds-u-sm-margin-top--0 ds-u-padding--0 ds-u-sm-padding-left--2",
6914
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
6915
- href: datasetDictionaryEndpoint + "/csv",
6916
- className: "ds-c-button",
6917
- style: {
6918
- width: '100%'
6919
- },
6920
- children: [
6921
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
6922
- className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
6923
- }),
6924
- "Download Dictionary CSV"
6925
- ]
6926
- })
6927
- })
6928
- ]
6929
- }),
6930
6337
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6931
6338
  className: "dc-query-builder ds-u-margin-bottom--3",
6932
6339
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
@@ -6973,7 +6380,7 @@ const $c08f91c7fd0895d8$var$DatasetDictionaryTable = ({ datasetDictionaryEndpoin
6973
6380
  })
6974
6381
  })
6975
6382
  }),
6976
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $1253cd791a90b9cc$export$2e2bcd8739ae039), {
6383
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
6977
6384
  tableColumns: tableColumns,
6978
6385
  tableData: tableData,
6979
6386
  pageSize: pageSize,
@@ -6982,51 +6389,24 @@ const $c08f91c7fd0895d8$var$DatasetDictionaryTable = ({ datasetDictionaryEndpoin
6982
6389
  ]
6983
6390
  });
6984
6391
  };
6985
- var $c08f91c7fd0895d8$export$2e2bcd8739ae039 = $c08f91c7fd0895d8$var$DatasetDictionaryTable;
6392
+ var $a6e312940f7003ef$export$2e2bcd8739ae039 = $a6e312940f7003ef$var$DatasetDictionaryTable;
6986
6393
 
6987
6394
 
6988
6395
 
6989
6396
 
6990
6397
 
6991
- const $78457092a09654a6$var$DatasetDictionaryPDF = ({ datasetDictionaryEndpoint: datasetDictionaryEndpoint })=>{
6992
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
6993
- children: [
6994
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6995
- className: "ds-u-margin-bottom--1 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end",
6996
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6997
- className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-margin-top--2 ds-u-sm-margin-top--0 ds-u-padding--0 ds-u-sm-padding-left--2",
6998
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
6999
- href: datasetDictionaryEndpoint,
7000
- target: "_blank",
7001
- rel: "noopener noreferrer",
7002
- className: "ds-c-button",
7003
- children: [
7004
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
7005
- className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
7006
- }),
7007
- " Download Dictionary PDF"
7008
- ]
7009
- })
7010
- })
7011
- }),
7012
- !window.location.host.includes('cms.gov') && datasetDictionaryEndpoint ? // We can not iframe the data dictionary file on a domain other than https://*.cms.gov
7013
- // because there is a Content Security Policy directive set
7014
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
7015
- children: "The data dictionary file can not be displayed at this time."
7016
- }) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
7017
- className: "data-dictionary-iframe-container ds-u-margin-top--3",
7018
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("iframe", {
7019
- src: datasetDictionaryEndpoint,
7020
- className: "data-dictionary-iframe"
7021
- })
7022
- })
7023
- ]
6398
+ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datasetDictionaryEndpoint, datasetSitewideDictionary: datasetSitewideDictionary, title: title, pageSize: pageSize = 20, csvDownload: csvDownload })=>{
6399
+ const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
6400
+ const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
6401
+ queryKey: [
6402
+ "dictionary" + datasetDictionaryEndpoint
6403
+ ],
6404
+ queryFn: ()=>{
6405
+ return (0, $hgUW1$axios).get(`${datasetDictionaryEndpoint}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>console.error(error));
6406
+ },
6407
+ enabled: datasetDictionaryEndpoint !== undefined
7024
6408
  });
7025
- };
7026
- var $78457092a09654a6$export$2e2bcd8739ae039 = $78457092a09654a6$var$DatasetDictionaryPDF;
7027
-
7028
-
7029
- const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datasetDictionaryEndpoint, datasetSitewideDictionary: datasetSitewideDictionary, datasetDictionaryFileType: datasetDictionaryFileType, title: title, pageSize: pageSize = 20, csvDownload: csvDownload })=>{
6409
+ const datasetDictionary = data && data.data && data.data.fields && data.data.fields.length ? data.data.fields : null;
7030
6410
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
7031
6411
  "data-testid": "dataset-dictionary-tab",
7032
6412
  children: [
@@ -7034,13 +6414,45 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
7034
6414
  className: "ds-text-heading--2xl ds-u-margin-y--3",
7035
6415
  children: title
7036
6416
  }),
7037
- datasetDictionaryFileType === 'application/vnd.tableschema+json' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c08f91c7fd0895d8$export$2e2bcd8739ae039), {
7038
- datasetDictionaryEndpoint: datasetDictionaryEndpoint,
7039
- pageSize: pageSize,
7040
- showDownloadButton: csvDownload
7041
- }),
7042
- datasetDictionaryFileType === 'application/pdf' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $78457092a09654a6$export$2e2bcd8739ae039), {
7043
- datasetDictionaryEndpoint: datasetDictionaryEndpoint
6417
+ datasetDictionary && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
6418
+ children: [
6419
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6420
+ className: "ds-u-margin-bottom--1 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end",
6421
+ children: [
6422
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
6423
+ className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4",
6424
+ onClick: ()=>window.open(datasetDictionaryEndpoint),
6425
+ type: "button",
6426
+ children: [
6427
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
6428
+ className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
6429
+ }),
6430
+ " View Dictionary JSON"
6431
+ ]
6432
+ }),
6433
+ csvDownload && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6434
+ className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-margin-top--2 ds-u-sm-margin-top--0 ds-u-padding--0 ds-u-sm-padding-left--2",
6435
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
6436
+ href: datasetDictionaryEndpoint + "/csv",
6437
+ className: "ds-c-button",
6438
+ style: {
6439
+ width: '100%'
6440
+ },
6441
+ children: [
6442
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
6443
+ className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
6444
+ }),
6445
+ "Download Dictionary CSV"
6446
+ ]
6447
+ })
6448
+ })
6449
+ ]
6450
+ }),
6451
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $a6e312940f7003ef$export$2e2bcd8739ae039), {
6452
+ datasetDictionary: datasetDictionary,
6453
+ pageSize: pageSize
6454
+ })
6455
+ ]
7044
6456
  }),
7045
6457
  datasetSitewideDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $a24829b27758fe6c$export$2e2bcd8739ae039), {
7046
6458
  datasetDictionary: datasetSitewideDictionary,
@@ -7112,55 +6524,6 @@ var $2bd73bb95b0c04ed$export$2e2bcd8739ae039 = $2bd73bb95b0c04ed$var$DatasetDesc
7112
6524
 
7113
6525
 
7114
6526
 
7115
-
7116
-
7117
-
7118
-
7119
- const $cc87dcd0a050cf52$var$TopicInformation = ({ topicDetails: topicDetails, theme: theme })=>{
7120
- const topic = topicDetails.filter((topic)=>{
7121
- return topic.identifier === theme[0].identifier;
7122
- });
7123
- const topicChips = [
7124
- {
7125
- text: 'Topic Details',
7126
- href: `/topics/${topic[0].url}`
7127
- },
7128
- {
7129
- text: 'Archived Data',
7130
- href: `/archived-data/${topic[0].url}`
7131
- }
7132
- ];
7133
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
7134
- className: "ds-l-col--12",
7135
- children: [
7136
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
7137
- className: "ds-u-margin-y--1 ds-u-font-weight--bold",
7138
- children: [
7139
- /*#__PURE__*/ (0, $hgUW1$jsx)("img", {
7140
- src: `data:image/svg+xml;utf8,${encodeURIComponent(topic[0].topic_icon)}`,
7141
- alt: "",
7142
- style: {
7143
- height: '2rem'
7144
- }
7145
- }),
7146
- " ",
7147
- theme[0].data
7148
- ]
7149
- }),
7150
- topicChips.map((chip)=>/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
7151
- className: "ds-u-display--inline-block ds-u-fill--primary ds-u-radius--pill ds-u-padding-x--2 ds-u-padding-y--05 ds-u-margin-right--1 ds-u-font-size--sm",
7152
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
7153
- to: chip.href,
7154
- className: "ds-u-color--white",
7155
- children: chip.text
7156
- })
7157
- }, chip.text))
7158
- ]
7159
- });
7160
- };
7161
- var $cc87dcd0a050cf52$export$2e2bcd8739ae039 = $cc87dcd0a050cf52$var$TopicInformation;
7162
-
7163
-
7164
6527
  const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
7165
6528
  const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
7166
6529
  const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
@@ -7179,8 +6542,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
7179
6542
  dataDictionaryLoading: isPending
7180
6543
  };
7181
6544
  };
7182
- const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, 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, showRowLimitNotice: showRowLimitNotice = false, enableEmptyFilters: enableEmptyFilters = false, tabHrefPrepend: tabHrefPrepend = '', showDateDetails: showDateDetails = false, topicDetails: topicDetails = [], showTagsOnOverview: showTagsOnOverview = false, swaggerButtonClassNames: swaggerButtonClassNames = {} })=>{
7183
- const tabHref = `/dataset/${id}`;
6545
+ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, 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, showRowLimitNotice: showRowLimitNotice = false, enableEmptyFilters: enableEmptyFilters = false })=>{
7184
6546
  const options = location.search ? {
7185
6547
  ...(0, $hgUW1$qs).parse(location.search, {
7186
6548
  ignoreQueryPrefix: true
@@ -7188,10 +6550,6 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7188
6550
  } : {
7189
6551
  conditions: []
7190
6552
  };
7191
- const dataDictionaryTypes = [
7192
- 'application/vnd.tableschema+json',
7193
- 'application/pdf'
7194
- ];
7195
6553
  const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
7196
6554
  const title = dataset.title ? dataset.title : '';
7197
6555
  const metadataMapping = {
@@ -7270,12 +6628,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7270
6628
  distribution,
7271
6629
  window.location.hash
7272
6630
  ]);
7273
- const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && dataDictionaryTypes.includes(distribution.data.describedByType) || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
7274
- const date = {
7275
- modified: dataset.modified,
7276
- released: dataset.released,
7277
- refresh: dataset.nextUpdateDate
7278
- };
6631
+ const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === 'application/vnd.tableschema+json' || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
7279
6632
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
7280
6633
  children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
7281
6634
  content: notFoundContent,
@@ -7293,22 +6646,14 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7293
6646
  children: title
7294
6647
  })
7295
6648
  }),
7296
- topicDetails.length && dataset.theme ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cc87dcd0a050cf52$export$2e2bcd8739ae039), {
7297
- topicDetails: topicDetails,
7298
- theme: dataset.theme
7299
- }) : '',
7300
6649
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
7301
- className: 'ds-l-md-col--12 ds-u-margin-y--2',
7302
- children: showDateDetails ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $20de4fedf33d4f9a$export$2e2bcd8739ae039), {
7303
- date: date,
7304
- modifiedBoldLabel: true,
7305
- displayTooltips: true
7306
- }) : /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
7307
- className: "ds-u-margin--0 ds-u-font-weight--bold",
6650
+ className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
6651
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
6652
+ className: "ds-u-margin--0",
7308
6653
  children: [
7309
6654
  "Updated ",
7310
6655
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
7311
- date: date.modified
6656
+ date: dataset.modified
7312
6657
  })
7313
6658
  ]
7314
6659
  })
@@ -7346,7 +6691,6 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7346
6691
  "Data Table"
7347
6692
  ]
7348
6693
  }),
7349
- tabHref: `${tabHrefPrepend}${tabHref}#data-table`,
7350
6694
  className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
7351
6695
  children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
7352
6696
  value: {
@@ -7375,15 +6719,13 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7375
6719
  "Overview"
7376
6720
  ]
7377
6721
  }),
7378
- tabHref: `${tabHrefPrepend}${tabHref}#overview`,
7379
6722
  className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
7380
6723
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
7381
6724
  resource: resource,
7382
6725
  dataset: dataset,
7383
6726
  distributions: distributions,
7384
6727
  metadataMapping: metadataMapping,
7385
- rootUrl: rootUrl,
7386
- showTags: showTagsOnOverview
6728
+ rootUrl: rootUrl
7387
6729
  })
7388
6730
  }),
7389
6731
  !hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
@@ -7397,12 +6739,10 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7397
6739
  "Data Dictionary"
7398
6740
  ]
7399
6741
  }),
7400
- tabHref: `${tabHrefPrepend}${tabHref}#data-dictionary`,
7401
6742
  className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
7402
6743
  children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
7403
6744
  datasetSitewideDictionary: datasetSitewideDictionary,
7404
6745
  datasetDictionaryEndpoint: distribution.data.describedBy,
7405
- datasetDictionaryFileType: distribution.data.describedByType,
7406
6746
  title: "Data Dictionary",
7407
6747
  csvDownload: dataDictionaryCSV
7408
6748
  }) : /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
@@ -7420,14 +6760,12 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7420
6760
  "API"
7421
6761
  ]
7422
6762
  }),
7423
- tabHref: `${tabHrefPrepend}${tabHref}#api`,
7424
6763
  className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
7425
6764
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
7426
6765
  id: id,
7427
6766
  rootUrl: rootUrl,
7428
6767
  apiUrl: apiPageUrl,
7429
- showRowLimitNotice: showRowLimitNotice,
7430
- swaggerButtonClassNames: swaggerButtonClassNames
6768
+ showRowLimitNotice: showRowLimitNotice
7431
6769
  })
7432
6770
  })
7433
6771
  ]
@@ -8988,5 +8326,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
8988
8326
 
8989
8327
 
8990
8328
 
8991
- export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $10bc3aae21fc1572$export$2e2bcd8739ae039 as DatasetListSubmenu, $e011250e8a3bd5e5$export$2e2bcd8739ae039 as DatasetSearchFacets, $2276c8c929d6a6d3$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, $bdb071ea3a6d3466$export$2e2bcd8739ae039 as SearchInput, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText, $6fd40f23575fa7f0$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $550bcc185f420ff5$export$2e2bcd8739ae039 as DatasetList, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $b9af6ce5e2c06331$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $8b67b7ee3fcfb629$export$2e2bcd8739ae039 as StoredQueryPage, $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, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $43a30d745a7bbc86$export$2e2bcd8739ae039 as DataTableContext, $ee0d4d4f34048447$export$2e2bcd8739ae039 as DataTableActionsProvider, $844981eac9b63865$export$eccc29c8d0ff408 as ACAContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6d5c0212e738499b$export$34e95918366a058e as acaToParams, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping};
8329
+ export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $85f8ff1ff89899c7$export$2e2bcd8739ae039 as DataTableToolbar, $10bc3aae21fc1572$export$2e2bcd8739ae039 as DatasetListSubmenu, $e011250e8a3bd5e5$export$2e2bcd8739ae039 as DatasetSearchFacets, $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, $bdb071ea3a6d3466$export$2e2bcd8739ae039 as SearchInput, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $550bcc185f420ff5$export$2e2bcd8739ae039 as DatasetList, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $b9af6ce5e2c06331$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $8b67b7ee3fcfb629$export$2e2bcd8739ae039 as StoredQueryPage, $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, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $43a30d745a7bbc86$export$2e2bcd8739ae039 as DataTableContext, $ee0d4d4f34048447$export$2e2bcd8739ae039 as DataTableActionsProvider, $844981eac9b63865$export$eccc29c8d0ff408 as ACAContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6d5c0212e738499b$export$34e95918366a058e as acaToParams, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping};
8992
8330
  //# sourceMappingURL=main.js.map