@truedat/core 7.10.3 → 7.10.4

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/core",
3
- "version": "7.10.3",
3
+ "version": "7.10.4",
4
4
  "description": "Truedat Web Core",
5
5
  "sideEffects": false,
6
6
  "module": "src/index.js",
@@ -48,7 +48,7 @@
48
48
  "@testing-library/jest-dom": "^6.6.3",
49
49
  "@testing-library/react": "^16.3.0",
50
50
  "@testing-library/user-event": "^14.6.1",
51
- "@truedat/test": "7.10.3",
51
+ "@truedat/test": "7.10.4",
52
52
  "identity-obj-proxy": "^3.0.0",
53
53
  "jest": "^29.7.0",
54
54
  "redux-saga-test-plan": "^4.0.6"
@@ -85,5 +85,5 @@
85
85
  "slate-react": "^0.22.10",
86
86
  "swr": "^2.3.3"
87
87
  },
88
- "gitHead": "1233e6ea0f6fa0c7d7483ae79df7e79a2733bc53"
88
+ "gitHead": "0dcedbfaed3964ee02a3d2c175e0f96e2fbc9316"
89
89
  }
package/src/routes.js CHANGED
@@ -242,6 +242,7 @@ export const STRUCTURE_STRUCTURE_LINKS_NEW =
242
242
  "/structures/:id/structureLinks/new";
243
243
  export const STRUCTURE_LINKS = "/structures/:id/links";
244
244
  export const STRUCTURE_LINKS_NEW = "/structures/:id/links/new";
245
+ export const STRUCTURE_LINKS_CONCEPTS_SUGGEST = "/structures/:id/links/suggest";
245
246
  export const STRUCTURE_MEMBERS = "/structures/:id/members";
246
247
  export const STRUCTURE_MEMBERS_NEW = "/structures/:id/members/new";
247
248
  export const STRUCTURE_METADATA = "/structures/:id/metadata";
@@ -472,6 +473,7 @@ const routes = {
472
473
  STRUCTURE_STRUCTURE_LINKS_NEW,
473
474
  STRUCTURE_LINKS,
474
475
  STRUCTURE_LINKS_NEW,
476
+ STRUCTURE_LINKS_CONCEPTS_SUGGEST,
475
477
  STRUCTURE_MEMBERS_NEW,
476
478
  STRUCTURE_MEMBERS,
477
479
  STRUCTURE_METADATA,
@@ -33,6 +33,6 @@ describe("selectors: makeTagOptionsSelector", () => {
33
33
  { value: 1, text: "ingest.relatedTo.dataStructure" },
34
34
  ]);
35
35
  const res2 = getTagOptions({ relationTags: relationTags2 });
36
- expect(res2).toBe(res1);
36
+ expect(res2).toEqual(res1);
37
37
  });
38
38
  });
@@ -1,18 +1,18 @@
1
1
  import _ from "lodash/fp";
2
- import { createSelector, createSelectorCreator, lruMemoize } from "reselect";
2
+ import { createSelectorCreator, lruMemoize } from "reselect";
3
3
 
4
4
  const tagsToOptions = _.map(({ id: value, value: { label, type } }) => ({
5
5
  value,
6
6
  text: _.defaultTo(type)(label),
7
7
  }));
8
8
 
9
- export const makeTagOptionsSelector = (targetType) => {
10
- const getTagOptions = createSelector(
9
+ const createDeepSelector = createSelectorCreator(lruMemoize, _.isEqual);
10
+
11
+ export const makeTagOptionsSelector = (targetType) =>
12
+ createDeepSelector(
11
13
  _.prop("relationTags"),
12
- _.flow(_.filter(_.pathEq("value.target_type", targetType)), tagsToOptions)
13
- );
14
- return createSelectorCreator(lruMemoize, _.isEqual)(
15
- getTagOptions,
16
- _.identity
14
+ _.flow(
15
+ _.filter(_.pathEq("value.target_type", targetType)),
16
+ tagsToOptions
17
+ )
17
18
  );
18
- };