@truedat/core 4.52.5 → 4.52.7

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.52.7] 2022-10-10
4
+
5
+ ### Fixed
6
+
7
+ - [TD-5237] Data type class is not being used to filter operators
8
+
3
9
  ## [4.52.4] 2022-09-30
4
10
 
5
11
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/core",
3
- "version": "4.52.5",
3
+ "version": "4.52.7",
4
4
  "description": "Truedat Web Core",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -35,7 +35,7 @@
35
35
  "@testing-library/jest-dom": "^5.16.4",
36
36
  "@testing-library/react": "^12.0.0",
37
37
  "@testing-library/user-event": "^13.2.1",
38
- "@truedat/test": "4.52.0",
38
+ "@truedat/test": "4.52.7",
39
39
  "babel-jest": "^28.1.0",
40
40
  "babel-plugin-dynamic-import-node": "^2.3.3",
41
41
  "babel-plugin-lodash": "^3.3.4",
@@ -112,5 +112,5 @@
112
112
  "react-dom": ">= 16.8.6 < 17",
113
113
  "semantic-ui-react": ">= 0.88.2 < 2.1"
114
114
  },
115
- "gitHead": "6dd96a3f576251beb2a3a9d6259b1bf187635f1b"
115
+ "gitHead": "0969c6e83518ac57a03583122d63884457f0bb8c"
116
116
  }
@@ -5,7 +5,9 @@ describe("services: getFieldType", () => {
5
5
  test.each(["boolean", "date", "number", "string", "timestamp"])(
6
6
  "should return data_type_class if it has value %s",
7
7
  (data_type_class) =>
8
- expect(getFieldType({ data_type_class })).toBe(data_type_class)
8
+ expect(getFieldType({ metadata: { data_type_class } })).toBe(
9
+ data_type_class
10
+ )
9
11
  );
10
12
 
11
13
  test.each([
@@ -11,15 +11,15 @@ const guessType = _.flow(
11
11
  ])
12
12
  );
13
13
 
14
- export const getFieldType = ({ data_type_class, type }) =>
14
+ export const getFieldType = ({ metadata, type }) =>
15
15
  type === "reference_dataset_field"
16
16
  ? "string"
17
- : _.includes(data_type_class)([
17
+ : _.includes(metadata?.data_type_class)([
18
18
  "boolean",
19
19
  "date",
20
20
  "number",
21
21
  "string",
22
22
  "timestamp",
23
23
  ])
24
- ? data_type_class
24
+ ? metadata?.data_type_class
25
25
  : guessType(type);