@truedat/core 4.47.6 → 4.47.9

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": "4.47.6",
3
+ "version": "4.47.9",
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.47.6",
38
+ "@truedat/test": "4.47.9",
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": "07210600d97244d32085d7166595ee030e6bb578"
115
+ "gitHead": "21954b7a0ea8240d2a9e8dc5014372eceed3b047"
116
116
  }
@@ -94,18 +94,17 @@ export const OptionGroup = ({
94
94
  multiple && onChange(dropdown.value);
95
95
  };
96
96
 
97
- const findText = () =>
98
- _.flow(
99
- _.reduce(
100
- (acc, o) =>
101
- _.has("options")(o) ? [...acc, ..._.prop("options")(o)] : [...acc, o],
102
- []
103
- ),
104
- _.find((o) => o.value == value),
105
- _.prop("text")
106
- )(options);
107
-
108
- const text = value && !query && findText();
97
+ const findText = _.flow(
98
+ _.reduce(
99
+ (acc, o) =>
100
+ _.has("options")(o) ? [...acc, ..._.prop("options")(o)] : [...acc, o],
101
+ []
102
+ ),
103
+ _.find((o) => o.value == value),
104
+ _.prop("text")
105
+ );
106
+
107
+ const text = value && !query ? findText(options) : "";
109
108
 
110
109
  const toFlattenedShorthands = (availableOpts) =>
111
110
  availableOpts.flatMap((option, i) => {
@@ -25,6 +25,7 @@ exports[`<OptionGroup /> matches the latest snapshot 1`] = `
25
25
  searchQuery=""
26
26
  selectOnBlur={true}
27
27
  selectOnNavigation={true}
28
+ text=""
28
29
  wrapSelection={true}
29
30
  />
30
31
  </Fragment>
@@ -12,12 +12,14 @@ const guessType = _.flow(
12
12
  );
13
13
 
14
14
  export const getFieldType = ({ data_type_class, type }) =>
15
- _.includes(data_type_class)([
16
- "boolean",
17
- "date",
18
- "number",
19
- "string",
20
- "timestamp",
21
- ])
15
+ type === "reference_dataset_field"
16
+ ? "string"
17
+ : _.includes(data_type_class)([
18
+ "boolean",
19
+ "date",
20
+ "number",
21
+ "string",
22
+ "timestamp",
23
+ ])
22
24
  ? data_type_class
23
25
  : guessType(type);