@truedat/lm 4.48.7 → 4.48.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.48.8] 2022-07-18
4
+
5
+ ### Changed
6
+
7
+ - [TD-5001] Use `columnPredicate` helper from `@truedat/core`
8
+
3
9
  ## [4.43.3] 2022-05-04
4
10
 
5
11
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/lm",
3
- "version": "4.48.7",
3
+ "version": "4.48.8",
4
4
  "description": "Truedat Link Manager",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -87,7 +87,7 @@
87
87
  ]
88
88
  },
89
89
  "dependencies": {
90
- "@truedat/core": "4.48.7",
90
+ "@truedat/core": "4.48.8",
91
91
  "path-to-regexp": "^1.7.0",
92
92
  "prop-types": "^15.8.1",
93
93
  "react-graph-vis": "1.0.5",
@@ -105,5 +105,5 @@
105
105
  "react-dom": ">= 16.8.6 < 17",
106
106
  "semantic-ui-react": ">= 0.88.2 < 2.1"
107
107
  },
108
- "gitHead": "f4a20ecf51eb101c2c25facfec48ee8cd0e621a3"
108
+ "gitHead": "e49b195088068688520a1cb02c64127e140615e6"
109
109
  }
@@ -3,7 +3,7 @@ import React from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { Table, Header, Grid } from "semantic-ui-react";
5
5
  import { FormattedMessage } from "react-intl";
6
- import { columnDecorator } from "@truedat/core/services";
6
+ import { columnDecorator, columnPredicate } from "@truedat/core/services";
7
7
 
8
8
  const Row = ({ columns, link }) => (
9
9
  <Table.Row>
@@ -63,16 +63,8 @@ Links.propTypes = {
63
63
  links: PropTypes.array,
64
64
  };
65
65
 
66
- const columnPredicate = (column) => {
67
- const { fieldSelector, name } = column || {};
68
- return _.isFunction(fieldSelector)
69
- ? fieldSelector
70
- : _.path(_.defaultTo(name)(fieldSelector));
71
- };
72
-
73
- const filterColumns = (columns, links) => {
74
- return _.filter((column) => _.any(columnPredicate(column))(links))(columns);
75
- };
66
+ const filterColumns = (columns, links) =>
67
+ _.filter((c) => _.any(columnPredicate(c))(links))(columns);
76
68
 
77
69
  export const LinksPane = ({ groups, sourceType, targetType, linksActions }) => (
78
70
  <Grid>