@truedat/qx 6.13.1 → 6.13.3

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/qx",
3
- "version": "6.13.1",
3
+ "version": "6.13.3",
4
4
  "description": "Truedat Web Quality Experience package",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -84,7 +84,7 @@
84
84
  ]
85
85
  },
86
86
  "dependencies": {
87
- "@truedat/core": "6.13.1",
87
+ "@truedat/core": "6.13.3",
88
88
  "prop-types": "^15.8.1",
89
89
  "react-hook-form": "^7.45.4",
90
90
  "react-intl": "^5.20.10",
@@ -97,5 +97,5 @@
97
97
  "react-dom": ">= 16.8.6 < 17",
98
98
  "semantic-ui-react": ">= 2.0.3 < 2.2"
99
99
  },
100
- "gitHead": "3803d8c4a416f1e1f56d88989c6c7503a08467d8"
100
+ "gitHead": "2665e3bb640febd00aa49dd06e37b4d391164e74"
101
101
  }
@@ -1,6 +1,3 @@
1
- import React from "react";
2
- import { render } from "@truedat/test/render";
3
-
4
1
  import {
5
2
  calculateGroupByFieldId,
6
3
  reduceQueryableFields,
@@ -127,7 +124,13 @@ describe("reduceQueryableFields", () => {
127
124
  {
128
125
  type: "select",
129
126
  properties: {
130
- fields: [{ id: 3, alias: "field2" }],
127
+ fields: [
128
+ {
129
+ id: 3,
130
+ alias: "field2",
131
+ expression: { value: { type: "string" } },
132
+ },
133
+ ],
131
134
  },
132
135
  alias: "qrySelect",
133
136
  id: 6,
@@ -140,6 +143,7 @@ describe("reduceQueryableFields", () => {
140
143
  id: 3,
141
144
  name: "field2",
142
145
  parent_id: 6,
146
+ type: "string",
143
147
  },
144
148
  ];
145
149
  expect(reduceQueryableFields(formatMessage)(queryables)).toStrictEqual(
@@ -164,8 +168,16 @@ describe("reduceQueryableFields", () => {
164
168
  {
165
169
  type: "group_by",
166
170
  properties: {
167
- group_fields: [{ id: 3, alias: "field2" }],
168
- aggregate_fields: [{ id: 4, alias: "field4" }],
171
+ group_fields: [
172
+ {
173
+ id: 3,
174
+ alias: "field2",
175
+ expression: { value: { type: "number" } },
176
+ },
177
+ ],
178
+ aggregate_fields: [
179
+ { id: 4, alias: "field4", expression: { value: { type: "any" } } },
180
+ ],
169
181
  },
170
182
  id: 6,
171
183
  },
@@ -177,6 +189,7 @@ describe("reduceQueryableFields", () => {
177
189
  id: 3,
178
190
  name: "field2",
179
191
  parent_id: 6,
192
+ type: "number",
180
193
  },
181
194
  {
182
195
  alias: "dataViews.form.queryable.group_by",
@@ -184,6 +197,7 @@ describe("reduceQueryableFields", () => {
184
197
  id: 4,
185
198
  name: "field4",
186
199
  parent_id: 6,
200
+ type: "any",
187
201
  },
188
202
  ];
189
203
  expect(reduceQueryableFields(formatMessage)(queryables)).toStrictEqual(
@@ -26,10 +26,11 @@ const queryableToFields =
26
26
  (formatMessage) =>
27
27
  ({ type, properties, alias, id: parent_id }) => {
28
28
  const selectFieldsMap = _.map.convert({ cap: false })((field) => ({
29
- ...field,
29
+ id: field.id,
30
30
  alias: alias || formatMessage({ id: `dataViews.form.queryable.${type}` }),
31
31
  name: field.alias,
32
32
  parent_id,
33
+ type: _.prop("expression.value.type")(field),
33
34
  color: getColorById(parent_id),
34
35
  }));
35
36
 
@@ -85,8 +85,6 @@ export default function QualityControlEditor({
85
85
 
86
86
  const formData = watch();
87
87
 
88
- console.log("formData", formData);
89
-
90
88
  const {
91
89
  resource,
92
90
  name,