@truedat/dd 5.9.6 → 5.9.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dd",
3
- "version": "5.9.6",
3
+ "version": "5.9.8",
4
4
  "description": "Truedat Web Data Dictionary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.16.5",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "5.9.6",
37
+ "@truedat/test": "5.9.7",
38
38
  "babel-jest": "^28.1.0",
39
39
  "babel-plugin-dynamic-import-node": "^2.3.3",
40
40
  "babel-plugin-lodash": "^3.3.4",
@@ -88,9 +88,9 @@
88
88
  },
89
89
  "dependencies": {
90
90
  "@apollo/client": "^3.7.1",
91
- "@truedat/auth": "5.9.6",
92
- "@truedat/core": "5.9.6",
93
- "@truedat/df": "5.9.6",
91
+ "@truedat/auth": "5.9.8",
92
+ "@truedat/core": "5.9.8",
93
+ "@truedat/df": "5.9.8",
94
94
  "lodash": "^4.17.21",
95
95
  "moment": "^2.29.4",
96
96
  "path-to-regexp": "^1.7.0",
@@ -115,5 +115,5 @@
115
115
  "react-dom": ">= 16.8.6 < 17",
116
116
  "semantic-ui-react": ">= 2.0.3 < 2.2"
117
117
  },
118
- "gitHead": "9f323fd84b59cac49e60b9cf0e441efc192465de"
118
+ "gitHead": "ea466759ff38b111f12c743f430779586c28f37d"
119
119
  }
@@ -7,6 +7,7 @@ import { useParams, useLocation } from "react-router-dom";
7
7
  import searchImage from "assets/searching.png";
8
8
  import { FormattedMessage, useIntl } from "react-intl";
9
9
  import { saveNavFilter as saveNavFilterRoutine } from "../routines";
10
+ import { isBucketFilter } from "../utils/bucketNav";
10
11
  import FilteredNav from "./FilteredNav";
11
12
  import StructureCrumbs from "./StructureCrumbs";
12
13
  import StructureGrantCart from "./StructureGrantCart";
@@ -14,12 +15,6 @@ import StructureSummary from "./StructureSummary";
14
15
  import StructureTabPaneRoutes from "./StructureTabPaneRoutes";
15
16
  import StructureTabRoutes from "./StructureTabRoutes";
16
17
 
17
- const isBucketFilter = _.flow(
18
- Object.keys,
19
- // Both metadata and mutable_metadata are "metadata"
20
- _.any((entry) => entry.startsWith("metadata", "note"))
21
- );
22
-
23
18
  const EmptyImage = () => (
24
19
  <div
25
20
  style={{
@@ -10,7 +10,7 @@ import { CardGroupsAccordion } from "@truedat/core/components";
10
10
  import { linkTo } from "@truedat/core/routes";
11
11
 
12
12
  const moveMissingBucketToTheEnd = (buckets) =>
13
- _.sortBy(({ key }) => (key === "_missing" ? 1 : 0))(buckets);
13
+ _.sortBy(({ key }) => (key === "_missing" || key === "" ? 1 : 0))(buckets);
14
14
 
15
15
  const orderBuckets = (buckets) =>
16
16
  _.flow(
@@ -59,8 +59,14 @@ export const CatalogCustomViewCard = ({
59
59
  return (
60
60
  <Card link as={Link} to={`${linkTo.BUCKET_VIEW()}?${queryParams}`}>
61
61
  <Card.Content className="extra-bottom-padding">
62
- <Card.Header style={name === "_missing" ? { color: "grey" } : null}>
63
- {name === "_missing" ? formatMessage({ id: "missingBucket" }) : name}
62
+ <Card.Header
63
+ style={name === "_missing" || name === "" ? { color: "grey" } : null}
64
+ >
65
+ {name === "_missing"
66
+ ? formatMessage({ id: "missingBucket" })
67
+ : name === ""
68
+ ? formatMessage({ id: "emptyBucket" })
69
+ : name}
64
70
  </Card.Header>
65
71
  {structures_count && (
66
72
  <CatalogCustomViewCardPopup
@@ -6,12 +6,7 @@ import { useHistory } from "react-router-dom";
6
6
  import PropTypes from "prop-types";
7
7
  import { List } from "semantic-ui-react";
8
8
  import { STRUCTURES, linkTo } from "@truedat/core/routes";
9
-
10
- const isBucketFilter = _.flow(
11
- Object.keys,
12
- // Both metadata and mutable_metadata are "metadata"
13
- _.any((entry) => entry.startsWith("metadata", "note"))
14
- );
9
+ import { isBucketFilter } from "../utils/bucketNav";
15
10
 
16
11
  const filterParams = _.flow(
17
12
  Object.entries,
@@ -1,14 +1,9 @@
1
1
  import _ from "lodash/fp";
2
2
  import { createSelector } from "reselect";
3
+ import { isBucketFilter } from "../utils/bucketNav";
3
4
 
4
5
  const defaultName = "..";
5
6
 
6
- const isBucketFilter = _.flow(
7
- Object.keys,
8
- // Both metadata and mutable_metadata are "metadata"
9
- _.any((entry) => entry.startsWith("metadata", "note"))
10
- );
11
-
12
7
  const rootNavItem = (structure) =>
13
8
  _.flow(
14
9
  _.propOr({}, "system"),
@@ -0,0 +1,9 @@
1
+ import _ from "lodash/fp";
2
+
3
+ export const isBucketFilter = _.flow(
4
+ Object.keys,
5
+ // Both metadata and mutable_metadata are "metadata"
6
+ _.some((key) =>
7
+ ["metadata", "note"].some((searchedKey) => key.startsWith(searchedKey))
8
+ )
9
+ );