@truedat/bg 5.17.1 → 5.17.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/bg",
3
- "version": "5.17.1",
3
+ "version": "5.17.2",
4
4
  "description": "Truedat Web Business Glossary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -86,9 +86,9 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "5.17.1",
90
- "@truedat/df": "5.17.1",
91
- "@truedat/lm": "5.17.1",
89
+ "@truedat/core": "5.17.2",
90
+ "@truedat/df": "5.17.2",
91
+ "@truedat/lm": "5.17.2",
92
92
  "decode-uri-component": "^0.2.2",
93
93
  "file-saver": "^2.0.5",
94
94
  "moment": "^2.29.4",
@@ -111,5 +111,5 @@
111
111
  "react-dom": ">= 16.8.6 < 17",
112
112
  "semantic-ui-react": ">= 2.0.3 < 2.2"
113
113
  },
114
- "gitHead": "6e0fe4ca06e36b5625ab3c20aaf940dba237d34f"
114
+ "gitHead": "1120a6efa4dfec423696957c5e72d752c9db284f"
115
115
  }
@@ -1,5 +1,7 @@
1
1
  import _ from "lodash/fp";
2
2
  import { createSelector } from "reselect";
3
+ import React from "react";
4
+ import { FormattedMessage } from "react-intl";
3
5
  import { accentInsensitivePathOrder } from "@truedat/core/services/sort";
4
6
  import { getPrimaryActions, getSecondaryActions } from "./getDomainActions";
5
7
  import { getDomainGroups } from "./getDomainGroups";
@@ -152,7 +154,22 @@ const getDomainSelectorOptions = createSelector([getDomains], (domains) => {
152
154
  _.filter(hasNoParentIn(domains)),
153
155
  _.sortBy(accentInsensitivePathOrder("name"))
154
156
  )(domains);
155
- return reduceTaxonomy(domains)(roots, 0);
157
+ const emptyDomain = _.contains("")(domains)
158
+ ? [
159
+ {
160
+ external_id: null,
161
+ id: 0,
162
+ name: <FormattedMessage id={`filter.empty`} />,
163
+ parent_id: null,
164
+ ancestors: [],
165
+ descendents: [],
166
+ children: [],
167
+ level: 0,
168
+ },
169
+ ]
170
+ : [];
171
+
172
+ return _.concat(emptyDomain, reduceTaxonomy(domains)(roots, 0));
156
173
  });
157
174
 
158
175
  export {