@truedat/dd 7.3.2 → 7.3.4
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 +6 -6
- package/src/components/PendingStructureNotes.js +4 -2
- package/src/components/StructuresEditableDownloadOption.js +6 -1
- package/src/components/StructuresOptions.js +26 -10
- package/src/components/StructuresView.js +1 -1
- package/src/components/__tests__/__snapshots__/PendingStructureNotes.spec.js.snap +30 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.5",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "7.3.
|
|
37
|
+
"@truedat/test": "7.3.4",
|
|
38
38
|
"babel-jest": "^28.1.0",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@apollo/client": "^3.7.1",
|
|
91
|
-
"@truedat/auth": "7.3.
|
|
92
|
-
"@truedat/core": "7.3.
|
|
93
|
-
"@truedat/df": "7.3.
|
|
91
|
+
"@truedat/auth": "7.3.4",
|
|
92
|
+
"@truedat/core": "7.3.4",
|
|
93
|
+
"@truedat/df": "7.3.4",
|
|
94
94
|
"lodash": "^4.17.21",
|
|
95
95
|
"moment": "^2.29.4",
|
|
96
96
|
"path-to-regexp": "^1.7.0",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"react-dom": ">= 16.8.6 < 17",
|
|
116
116
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "681c0d026b5477fadf9b53fe5242cfb0ed11d973"
|
|
119
119
|
}
|
|
@@ -17,11 +17,12 @@ import translations from "../utils/structureCustomTranslations";
|
|
|
17
17
|
import PendingStructureNotesPagination from "./PendingStructureNotesPagination";
|
|
18
18
|
import PendingStructureNotesLabelResults from "./PendingStructureNotesLabelResults";
|
|
19
19
|
import PendingStructureNotesTable from "./PendingStructureNotesTable";
|
|
20
|
+
import StructuresOptions from "./StructuresOptions";
|
|
20
21
|
|
|
21
22
|
export const PendingStructureNotesContent = () => {
|
|
22
23
|
const { formatMessage } = useIntl();
|
|
23
|
-
const { loading } = useSearchContext();
|
|
24
|
-
|
|
24
|
+
const { searchData, loading } = useSearchContext();
|
|
25
|
+
const actions = _.propOr({}, "_actions")(searchData);
|
|
25
26
|
return (
|
|
26
27
|
<Segment>
|
|
27
28
|
<Header as="h2">
|
|
@@ -40,6 +41,7 @@ export const PendingStructureNotesContent = () => {
|
|
|
40
41
|
</Header.Content>
|
|
41
42
|
</Header>
|
|
42
43
|
|
|
44
|
+
<StructuresOptions {...actions} pendingStructureNotes={true} />
|
|
43
45
|
<SearchWidget />
|
|
44
46
|
<Dimmer.Dimmable dimmed={loading}>
|
|
45
47
|
<Dimmer active={loading} inverted>
|
|
@@ -7,7 +7,10 @@ import { useIntl } from "react-intl";
|
|
|
7
7
|
import { useSearchContext } from "@truedat/core/search/SearchContext";
|
|
8
8
|
import { useDataStructureDownload } from "../hooks/useStructures";
|
|
9
9
|
|
|
10
|
-
export const StructuresEditableDownloadOption = ({
|
|
10
|
+
export const StructuresEditableDownloadOption = ({
|
|
11
|
+
setDownloading,
|
|
12
|
+
pendingStructureNotes,
|
|
13
|
+
}) => {
|
|
11
14
|
const { formatMessage, locale } = useIntl();
|
|
12
15
|
const {
|
|
13
16
|
searchData,
|
|
@@ -49,6 +52,7 @@ export const StructuresEditableDownloadOption = ({ setDownloading }) => {
|
|
|
49
52
|
...searchParams,
|
|
50
53
|
structure_url_schema: window.location.origin + STRUCTURE,
|
|
51
54
|
download_type: "editable",
|
|
55
|
+
note_type: pendingStructureNotes ? "non_published" : "published",
|
|
52
56
|
})
|
|
53
57
|
}
|
|
54
58
|
disabled={isDisabled || structuresDownloading}
|
|
@@ -59,6 +63,7 @@ export const StructuresEditableDownloadOption = ({ setDownloading }) => {
|
|
|
59
63
|
|
|
60
64
|
StructuresEditableDownloadOption.propTypes = {
|
|
61
65
|
setDownloading: PropTypes.func,
|
|
66
|
+
pendingStructureNotes: PropTypes.bool,
|
|
62
67
|
};
|
|
63
68
|
|
|
64
69
|
export default StructuresEditableDownloadOption;
|
|
@@ -12,6 +12,7 @@ export const StructuresOptions = ({
|
|
|
12
12
|
autoPublish,
|
|
13
13
|
bulkUpload,
|
|
14
14
|
bulkUploadDomains,
|
|
15
|
+
pendingStructureNotes,
|
|
15
16
|
}) => {
|
|
16
17
|
const [downloading, setDownloading] = useState(false);
|
|
17
18
|
return (
|
|
@@ -24,16 +25,30 @@ export const StructuresOptions = ({
|
|
|
24
25
|
disabled={downloading}
|
|
25
26
|
>
|
|
26
27
|
<Dropdown.Menu>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
{pendingStructureNotes ? (
|
|
29
|
+
<>
|
|
30
|
+
<StructuresEditableDownloadOption
|
|
31
|
+
setDownloading={setDownloading}
|
|
32
|
+
pendingStructureNotes
|
|
33
|
+
/>
|
|
34
|
+
{bulkUpload ? (
|
|
35
|
+
<StructuresUploadOption canAutoPublish={!!autoPublish} />
|
|
36
|
+
) : null}
|
|
37
|
+
</>
|
|
38
|
+
) : (
|
|
39
|
+
<>
|
|
40
|
+
<SystemCreateOption />
|
|
41
|
+
<Dropdown.Divider />
|
|
42
|
+
<StructuresDownloadOption setDownloading={setDownloading} />
|
|
43
|
+
<StructuresEditableDownloadOption setDownloading={setDownloading} />
|
|
44
|
+
{bulkUpload ? (
|
|
45
|
+
<StructuresUploadOption canAutoPublish={!!autoPublish} />
|
|
46
|
+
) : null}
|
|
47
|
+
{bulkUploadDomains ? <StructuresDomainsUploadOption /> : null}
|
|
48
|
+
<Dropdown.Divider />
|
|
49
|
+
<StructuresUpdateOption />
|
|
50
|
+
</>
|
|
51
|
+
)}
|
|
37
52
|
</Dropdown.Menu>
|
|
38
53
|
</Dropdown>
|
|
39
54
|
);
|
|
@@ -43,6 +58,7 @@ StructuresOptions.propTypes = {
|
|
|
43
58
|
autoPublish: PropTypes.object,
|
|
44
59
|
bulkUpload: PropTypes.object,
|
|
45
60
|
bulkUploadDomains: PropTypes.object,
|
|
61
|
+
pendingStructureNotes: PropTypes.bool,
|
|
46
62
|
};
|
|
47
63
|
|
|
48
64
|
export default StructuresOptions;
|
|
@@ -74,7 +74,7 @@ export const StructuresViewContent = ({ embedded, customView }) => {
|
|
|
74
74
|
<>
|
|
75
75
|
{!customView ? (
|
|
76
76
|
<>
|
|
77
|
-
<StructuresOptions {...actions} />
|
|
77
|
+
<StructuresOptions {...actions} pendingStructureNotes={false} />
|
|
78
78
|
<SearchWidget dateFilter searchField="last_change_at" />
|
|
79
79
|
</>
|
|
80
80
|
) : null}
|
|
@@ -23,6 +23,36 @@ exports[`<PendingStructureNotes /> matches the latest snapshot 1`] = `
|
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
</h2>
|
|
26
|
+
<div
|
|
27
|
+
aria-busy="false"
|
|
28
|
+
aria-disabled="false"
|
|
29
|
+
aria-expanded="false"
|
|
30
|
+
class="ui floating dropdown button icon group-actions button-update"
|
|
31
|
+
role="listbox"
|
|
32
|
+
tabindex="0"
|
|
33
|
+
>
|
|
34
|
+
<i
|
|
35
|
+
aria-hidden="true"
|
|
36
|
+
class="ellipsis vertical icon"
|
|
37
|
+
/>
|
|
38
|
+
<div
|
|
39
|
+
class="menu transition left"
|
|
40
|
+
>
|
|
41
|
+
<div
|
|
42
|
+
aria-disabled="false"
|
|
43
|
+
class="item"
|
|
44
|
+
role="option"
|
|
45
|
+
>
|
|
46
|
+
<i
|
|
47
|
+
aria-hidden="true"
|
|
48
|
+
class="download icon"
|
|
49
|
+
/>
|
|
50
|
+
<span>
|
|
51
|
+
structures.actions.editableDownload.tooltip
|
|
52
|
+
</span>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
26
56
|
<div
|
|
27
57
|
class="ui action left icon input"
|
|
28
58
|
>
|