@truedat/df 6.10.2 → 6.10.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/df",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.3",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@apollo/client": "^3.7.1",
|
|
90
|
-
"@truedat/auth": "6.10.
|
|
91
|
-
"@truedat/core": "6.10.
|
|
90
|
+
"@truedat/auth": "6.10.3",
|
|
91
|
+
"@truedat/core": "6.10.3",
|
|
92
92
|
"decode-uri-component": "^0.2.2",
|
|
93
93
|
"path-to-regexp": "^1.7.0",
|
|
94
94
|
"prop-types": "^15.8.1",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"react-dom": ">= 16.8.6 < 17",
|
|
110
110
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "a1cf73b088952f0488a80001bef16a45f40b3829"
|
|
113
113
|
}
|
|
@@ -203,8 +203,32 @@ describe("utils: applyTemplate", () => {
|
|
|
203
203
|
});
|
|
204
204
|
});
|
|
205
205
|
|
|
206
|
+
it("applyTemplate should not apply empty values", () => {
|
|
207
|
+
const o = {
|
|
208
|
+
fixed: { value: "foo", origin: "user" },
|
|
209
|
+
erase: { value: {}, text: "text" },
|
|
210
|
+
};
|
|
211
|
+
const result = applyTemplate(template)(o);
|
|
212
|
+
expect(result).toEqual({
|
|
213
|
+
fixed: { value: "foo", origin: "user" },
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
|
|
206
217
|
it("applyTemplateWithoutDefaults should not apply default values", () => {
|
|
207
|
-
const o = {
|
|
218
|
+
const o = {
|
|
219
|
+
role: { value: "u1", origin: "user" },
|
|
220
|
+
};
|
|
221
|
+
const result = applyTemplateWithoutDefaults(template)(o);
|
|
222
|
+
expect(result).toEqual({
|
|
223
|
+
role: { value: "u1", origin: "user" },
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it("applyTemplateWithoutDefaults should not apply empty values", () => {
|
|
228
|
+
const o = {
|
|
229
|
+
role: { value: "u1", origin: "user" },
|
|
230
|
+
erase: { value: {}, text: "text" },
|
|
231
|
+
};
|
|
208
232
|
const result = applyTemplateWithoutDefaults(template)(o);
|
|
209
233
|
expect(result).toEqual({
|
|
210
234
|
role: { value: "u1", origin: "user" },
|
|
@@ -31,7 +31,8 @@ export const applyTemplateWithoutDefaults =
|
|
|
31
31
|
filterValues(templateContent),
|
|
32
32
|
filterDepends(templateContent),
|
|
33
33
|
filterSwitches(templateContent),
|
|
34
|
-
(content) => filterDomains(templateContent)(content, domainId)
|
|
34
|
+
(content) => filterDomains(templateContent)(content, domainId),
|
|
35
|
+
_.pickBy((value) => !_.isEmpty(value.value))
|
|
35
36
|
)(content);
|
|
36
37
|
};
|
|
37
38
|
|