@truedat/dd 7.3.2 → 7.3.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/dd",
3
- "version": "7.3.2",
3
+ "version": "7.3.3",
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.2",
37
+ "@truedat/test": "7.3.3",
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.2",
92
- "@truedat/core": "7.3.2",
93
- "@truedat/df": "7.3.2",
91
+ "@truedat/auth": "7.3.3",
92
+ "@truedat/core": "7.3.3",
93
+ "@truedat/df": "7.3.3",
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": "3a5d8fc5160ffabc1ef86251883070331045f738"
118
+ "gitHead": "23b3cc6b8c2749a173f779390866b715d653d377"
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 = ({ setDownloading }) => {
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
- <SystemCreateOption />
28
- <Dropdown.Divider />
29
- <StructuresDownloadOption setDownloading={setDownloading} />
30
- <StructuresEditableDownloadOption setDownloading={setDownloading} />
31
- {bulkUpload ? (
32
- <StructuresUploadOption canAutoPublish={!!autoPublish} />
33
- ) : null}
34
- {bulkUploadDomains ? <StructuresDomainsUploadOption /> : null}
35
- <Dropdown.Divider />
36
- <StructuresUpdateOption />
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
  >