@truedat/dd 4.35.2 → 4.35.6
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 +12 -0
- package/package.json +5 -5
- package/src/components/DictionaryRoutes.js +1 -1
- package/src/components/StructureSelector.js +1 -1
- package/src/components/StructureTypesTable.js +17 -6
- package/src/components/__tests__/__snapshots__/GrantRequest.spec.js.snap +4 -4
- package/src/components/__tests__/__snapshots__/StructureSelector.spec.js.snap +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.35.4] 2021-12-20
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- [TD-4356] Improve structure types view performance by doing optional the metadata fields column
|
|
8
|
+
|
|
9
|
+
## [4.35.3] 2021-12-20
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- [TD-4369] 504 error on /api/data_structure_types call
|
|
14
|
+
|
|
3
15
|
## [4.35.1] 2021-12-18
|
|
4
16
|
|
|
5
17
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "4.35.
|
|
3
|
+
"version": "4.35.6",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@truedat/auth": "4.35.
|
|
88
|
-
"@truedat/core": "4.35.
|
|
89
|
-
"@truedat/df": "4.35.
|
|
87
|
+
"@truedat/auth": "4.35.6",
|
|
88
|
+
"@truedat/core": "4.35.6",
|
|
89
|
+
"@truedat/df": "4.35.6",
|
|
90
90
|
"lodash": "^4.17.21",
|
|
91
91
|
"path-to-regexp": "^1.7.0",
|
|
92
92
|
"prop-types": "^15.7.2",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"react-dom": ">= 16.8.6 < 17",
|
|
108
108
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "f1ef56cbd38f392369f0a1d2c83c0d8bc6b58e60"
|
|
111
111
|
}
|
|
@@ -35,7 +35,7 @@ export const StructureSelector = ({
|
|
|
35
35
|
return (
|
|
36
36
|
<Segment>
|
|
37
37
|
<StructuresLoader pageSize={pageSize} defaultFilters={defaultFilters} />
|
|
38
|
-
<StructureTypesLoader />
|
|
38
|
+
<StructureTypesLoader liteRequest={true} />
|
|
39
39
|
<StructureFiltersLoader defaultFilters={defaultFilters} />
|
|
40
40
|
<StructuresSearch />
|
|
41
41
|
<StructureSelectedFilters />
|
|
@@ -33,6 +33,7 @@ export const StructureTypeRow = ({
|
|
|
33
33
|
translation,
|
|
34
34
|
metadata_fields,
|
|
35
35
|
metadata_views,
|
|
36
|
+
hasMetadataFields,
|
|
36
37
|
}) => (
|
|
37
38
|
<Table.Row>
|
|
38
39
|
<Table.Cell>
|
|
@@ -49,7 +50,9 @@ export const StructureTypeRow = ({
|
|
|
49
50
|
<Table.Cell>
|
|
50
51
|
{_.flow(_.map("name"), _.join(", "))(metadata_views)}
|
|
51
52
|
</Table.Cell>
|
|
52
|
-
|
|
53
|
+
{hasMetadataFields && (
|
|
54
|
+
<Table.Cell className="text-right">{metadata_fields?.length}</Table.Cell>
|
|
55
|
+
)}
|
|
53
56
|
</Table.Row>
|
|
54
57
|
);
|
|
55
58
|
|
|
@@ -64,6 +67,8 @@ StructureTypeRow.propTypes = {
|
|
|
64
67
|
|
|
65
68
|
export const StructureTypesTable = ({ structureTypes, loading }) => {
|
|
66
69
|
const { formatMessage } = useIntl();
|
|
70
|
+
const hasMetadataFields =
|
|
71
|
+
_.filter("metadata_fields")(structureTypes).length > 0;
|
|
67
72
|
return loading ? null : (
|
|
68
73
|
<Table basic definition>
|
|
69
74
|
<Table.Header>
|
|
@@ -78,15 +83,21 @@ export const StructureTypesTable = ({ structureTypes, loading }) => {
|
|
|
78
83
|
<Table.HeaderCell
|
|
79
84
|
content={formatMessage({ id: "structureType.metadataViews" })}
|
|
80
85
|
/>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
{hasMetadataFields && (
|
|
87
|
+
<Table.HeaderCell
|
|
88
|
+
className="text-right"
|
|
89
|
+
content={formatMessage({ id: "structureType.metadataFields" })}
|
|
90
|
+
/>
|
|
91
|
+
)}
|
|
85
92
|
</Table.Row>
|
|
86
93
|
</Table.Header>
|
|
87
94
|
<Table.Body>
|
|
88
95
|
{structureTypes.map((props, key) => (
|
|
89
|
-
<StructureTypeRow
|
|
96
|
+
<StructureTypeRow
|
|
97
|
+
key={key}
|
|
98
|
+
{...props}
|
|
99
|
+
hasMetadataFields={hasMetadataFields}
|
|
100
|
+
/>
|
|
90
101
|
))}
|
|
91
102
|
</Table.Body>
|
|
92
103
|
</Table>
|
|
@@ -378,7 +378,7 @@ exports[`<GrantRequest /> matches the latest snapshot with approve actions 1`] =
|
|
|
378
378
|
role="listitem"
|
|
379
379
|
>
|
|
380
380
|
<div
|
|
381
|
-
class="header"
|
|
381
|
+
class="header dynamic-field-header"
|
|
382
382
|
>
|
|
383
383
|
bar
|
|
384
384
|
</div>
|
|
@@ -386,7 +386,7 @@ exports[`<GrantRequest /> matches the latest snapshot with approve actions 1`] =
|
|
|
386
386
|
class="description"
|
|
387
387
|
>
|
|
388
388
|
<div
|
|
389
|
-
|
|
389
|
+
class="default-value"
|
|
390
390
|
>
|
|
391
391
|
baz
|
|
392
392
|
</div>
|
|
@@ -644,7 +644,7 @@ exports[`<GrantRequest /> matches the latest snapshot with failed status 1`] = `
|
|
|
644
644
|
role="listitem"
|
|
645
645
|
>
|
|
646
646
|
<div
|
|
647
|
-
class="header"
|
|
647
|
+
class="header dynamic-field-header"
|
|
648
648
|
>
|
|
649
649
|
bar
|
|
650
650
|
</div>
|
|
@@ -652,7 +652,7 @@ exports[`<GrantRequest /> matches the latest snapshot with failed status 1`] = `
|
|
|
652
652
|
class="description"
|
|
653
653
|
>
|
|
654
654
|
<div
|
|
655
|
-
|
|
655
|
+
class="default-value"
|
|
656
656
|
>
|
|
657
657
|
baz
|
|
658
658
|
</div>
|
|
@@ -5,7 +5,9 @@ exports[`<StructureSelector /> matches the latest snapshot 1`] = `
|
|
|
5
5
|
<Connect(StructuresLoader)
|
|
6
6
|
pageSize={7}
|
|
7
7
|
/>
|
|
8
|
-
<Connect(StructureTypesLoader)
|
|
8
|
+
<Connect(StructureTypesLoader)
|
|
9
|
+
liteRequest={true}
|
|
10
|
+
/>
|
|
9
11
|
<Connect(FiltersLoader) />
|
|
10
12
|
<Connect(StructuresSearch) />
|
|
11
13
|
<injectIntl(Connect(SelectedFilters)) />
|