@civicactions/cmsds-open-data-components 3.6.2-alpha.1 → 3.6.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,9 +11,25 @@ In the root folder for this project, run `npm run watch` to build local code. En
11
11
 
12
12
  ## Publishing new versions
13
13
 
14
+ ### Clear out caches and previous build
15
+
16
+ Before running a build, it is recommended to clear out the old build and cache files to avoid publishing a stale build
17
+
18
+ Run ```rm -rf dist/``` to delete the previous build
19
+ Run ```rm -rf .parcel-cache/``` to clear out the parcel build caches
20
+
21
+ ### Create a new release
22
+
14
23
  Run ```npm run build``` to create a production version of the library before publishing to npm.
15
24
  Run ```npm publish``` to publish to npm
16
25
 
26
+ ### Create and alpha/testing release
27
+
28
+ When creating an alpha release or any other release intended for testing purposes, add a tag to the publish command. This will prevent the the testing release from showing up as the latest release in NPM.
29
+
30
+ After running ```npm run build```,
31
+ Run ```npm publish --tag <tag name>``` example (npm publish --tag "alpha")
32
+
17
33
  ## Testing
18
34
 
19
35
  Jest tests can be run using:
package/dist/main.js CHANGED
@@ -2,7 +2,7 @@ import "./main.css";
2
2
  import {jsxs as $hgUW1$jsxs, jsx as $hgUW1$jsx, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
3
3
  import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useMemo as $hgUW1$useMemo, useContext as $hgUW1$useContext, useCallback as $hgUW1$useCallback} from "react";
4
4
  import {NavLink as $hgUW1$NavLink, useNavigate as $hgUW1$useNavigate, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams, Link as $hgUW1$Link} from "react-router-dom";
5
- import {Button as $hgUW1$Button, Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Spinner as $hgUW1$Spinner, Dropdown as $hgUW1$Dropdown, Alert as $hgUW1$Alert, Pagination as $hgUW1$Pagination, Choice as $hgUW1$Choice, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, Table as $hgUW1$Table, TableBody as $hgUW1$TableBody, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableHead as $hgUW1$TableHead, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
5
+ import {Button as $hgUW1$Button, Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Spinner as $hgUW1$Spinner, Dropdown as $hgUW1$Dropdown, Alert as $hgUW1$Alert, Pagination as $hgUW1$Pagination, Choice as $hgUW1$Choice, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, Table as $hgUW1$Table, TableBody as $hgUW1$TableBody, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, TableHead as $hgUW1$TableHead, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
6
6
  import {useMediaQuery as $hgUW1$useMediaQuery} from "react-responsive";
7
7
  import $hgUW1$qs from "qs";
8
8
  import $hgUW1$swaggeruireact from "swagger-ui-react";
@@ -2321,6 +2321,24 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
2321
2321
  maxWidth: 768
2322
2322
  });
2323
2323
  const rows = (0, $5644ebd2c3dbfd7b$export$eea3a12df15499ca)(metadataMapping, dataset);
2324
+ const tooltips = [
2325
+ {
2326
+ label: "modified",
2327
+ title: "The date the dataset was last updated."
2328
+ },
2329
+ {
2330
+ label: "released",
2331
+ title: "The date the most recent dataset was made available to the public."
2332
+ },
2333
+ {
2334
+ label: "issued",
2335
+ title: "The date the dataset was first published and made available to the public."
2336
+ },
2337
+ {
2338
+ label: "publisher",
2339
+ title: "The entity responsible for publishing the dataset."
2340
+ }
2341
+ ];
2324
2342
  return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
2325
2343
  children: [
2326
2344
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7357cc0f79f9c514$export$2e2bcd8739ae039), {
@@ -2341,19 +2359,38 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
2341
2359
  stackableBreakpoint: "md",
2342
2360
  warningDisabled: true,
2343
2361
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableBody), {
2344
- children: rows.map((r)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
2362
+ children: rows.map((r)=>{
2363
+ const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
2364
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
2345
2365
  children: [
2346
- md ? "" : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
2366
+ md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
2347
2367
  component: "th",
2348
2368
  className: "ds-u-font-weight--bold",
2349
- children: r.label
2369
+ children: [
2370
+ r.label,
2371
+ tooltip && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2372
+ className: "ds-u-font-weight--normal",
2373
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
2374
+ title: tooltip.title,
2375
+ // @ts-ignore
2376
+ style: {
2377
+ border: "none",
2378
+ background: "none"
2379
+ },
2380
+ maxWidth: "400px",
2381
+ placement: "auto",
2382
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
2383
+ })
2384
+ })
2385
+ ]
2350
2386
  }),
2351
2387
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
2352
2388
  stackedTitle: r.label,
2353
2389
  children: r.value
2354
2390
  })
2355
2391
  ]
2356
- }, `${r.label}_${dataset.identifier}`))
2392
+ }, `${r.label}_${dataset.identifier}`);
2393
+ })
2357
2394
  })
2358
2395
  })
2359
2396
  ]