@truedat/bg 4.56.9 → 4.58.1

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 CHANGED
@@ -1,6 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## [4.56.9] 2022-11-12
3
+ ## [4.58.0] 2022-12-15
4
+
5
+ ### Added
6
+
7
+ - [TD-3919] Add concept subscopes routes and defaultFilters
8
+
9
+ ## [4.56.9] 2022-12-12
4
10
 
5
11
  ### Added
6
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/bg",
3
- "version": "4.56.9",
3
+ "version": "4.58.1",
4
4
  "description": "Truedat Web Business Glossary",
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": "4.56.9",
37
+ "@truedat/test": "4.58.1",
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",
@@ -86,8 +86,8 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "4.56.9",
90
- "@truedat/df": "4.56.9",
89
+ "@truedat/core": "4.58.1",
90
+ "@truedat/df": "4.58.1",
91
91
  "file-saver": "^2.0.5",
92
92
  "moment": "^2.29.4",
93
93
  "path-to-regexp": "^1.7.0",
@@ -108,5 +108,5 @@
108
108
  "react-dom": ">= 16.8.6 < 17",
109
109
  "semantic-ui-react": ">= 2.0.3 < 2.2"
110
110
  },
111
- "gitHead": "da9a49da6d48b51faf603abff56ff7b1b6c5e413"
111
+ "gitHead": "f1d6fab3f573f3f3ee9e0e6060d2761d452ca804"
112
112
  }
@@ -10,6 +10,7 @@ import {
10
10
  CONCEPTS_BULK_UPDATE,
11
11
  CONCEPTS_NEW,
12
12
  CONCEPTS_PENDING,
13
+ CONCEPTS_SUBSCOPED,
13
14
  CONCEPT_EDIT,
14
15
  CONCEPT_VERSION,
15
16
  } from "@truedat/core/routes";
@@ -42,6 +43,9 @@ export const ConceptRoutes = ({ concept, conceptLoaded, templatesLoaded }) => {
42
43
  "business_glossary_view",
43
44
  "business_glossary_management",
44
45
  ]);
46
+ const pendingConceptsDefaultFilters = {
47
+ status: ["pending_approval", "draft", "rejected"],
48
+ };
45
49
  return (
46
50
  <>
47
51
  <Route
@@ -51,15 +55,9 @@ export const ConceptRoutes = ({ concept, conceptLoaded, templatesLoaded }) => {
51
55
  authorized ? (
52
56
  <>
53
57
  <ConceptFiltersLoader
54
- defaultFilters={{
55
- status: ["pending_approval", "draft", "rejected"],
56
- }}
57
- />
58
- <ConceptsLoader
59
- defaultFilters={{
60
- status: ["pending_approval", "draft", "rejected"],
61
- }}
58
+ defaultFilters={pendingConceptsDefaultFilters}
62
59
  />
60
+ <ConceptsLoader defaultFilters={pendingConceptsDefaultFilters} />
63
61
  <ConceptUserFiltersLoader />
64
62
  <Concepts
65
63
  header="concepts.header.manage"
@@ -74,10 +72,43 @@ export const ConceptRoutes = ({ concept, conceptLoaded, templatesLoaded }) => {
74
72
  )
75
73
  }
76
74
  />
75
+
76
+ <Route
77
+ exact
78
+ path={CONCEPTS_SUBSCOPED}
79
+ render={(props) => {
80
+ const subscope = _.prop("match.params.subscope")(props);
81
+ const defaultFilters = {
82
+ status: ["published"],
83
+ ...(subscope ? { "template.subscope": [subscope] } : {}),
84
+ };
85
+
86
+ return authorized ? (
87
+ <>
88
+ <ConceptFiltersLoader defaultFilters={defaultFilters} />
89
+ <ConceptsLoader defaultFilters={defaultFilters} />
90
+ <ConceptUserFiltersLoader />
91
+ <Concepts
92
+ header="concepts.header.manage"
93
+ subheader="concepts.subheader.manage"
94
+ icon="tags"
95
+ />
96
+ </>
97
+ ) : (
98
+ <Unauthorized />
99
+ );
100
+ }}
101
+ />
102
+
77
103
  <Route
78
104
  path={CONCEPTS}
79
105
  render={() => (
80
- <ConceptsLoader defaultFilters={{ status: ["published"] }} />
106
+ <ConceptsLoader
107
+ defaultFilters={{
108
+ status: ["published"],
109
+ "template.subscope": "",
110
+ }}
111
+ />
81
112
  )}
82
113
  />
83
114
  <Route
@@ -91,7 +122,10 @@ export const ConceptRoutes = ({ concept, conceptLoaded, templatesLoaded }) => {
91
122
  render={() => (
92
123
  <>
93
124
  <ConceptFiltersLoader
94
- defaultFilters={{ status: ["published"] }}
125
+ defaultFilters={{
126
+ status: ["published"],
127
+ "template.subscope": "",
128
+ }}
95
129
  />
96
130
  <ConceptUserFiltersLoader />
97
131
  <Concepts
@@ -7,7 +7,7 @@ import { Table, Header, Icon } from "semantic-ui-react";
7
7
  import { FormattedMessage } from "react-intl";
8
8
  import { withRouter } from "react-router";
9
9
  import { getSortInfo, sortColumn } from "@truedat/core/services/sort";
10
- import { CONCEPTS } from "@truedat/core/routes";
10
+ import { CONCEPTS_PENDING } from "@truedat/core/routes";
11
11
  import { sortConcepts } from "../routines";
12
12
  import { getConceptsRows, getConceptColumns } from "../selectors";
13
13
  import ConceptRow from "./ConceptRow";
@@ -51,9 +51,7 @@ export class ConceptsTable extends React.Component {
51
51
 
52
52
  const pathname = _.prop("pathname")(location);
53
53
  const conceptColumns = columns.filter(
54
- (column) =>
55
- (pathname === CONCEPTS && column.name != "status") ||
56
- pathname !== CONCEPTS
54
+ (column) => pathname === CONCEPTS_PENDING || column.name != "status"
57
55
  );
58
56
 
59
57
  return (
@@ -87,11 +87,6 @@ exports[`<ConceptsPanel /> matches latest snapshot 1`] = `
87
87
  >
88
88
  Domain
89
89
  </th>
90
- <th
91
- class="two wide"
92
- >
93
- Status
94
- </th>
95
90
  <th
96
91
  class="one wide"
97
92
  >
@@ -125,11 +120,6 @@ exports[`<ConceptsPanel /> matches latest snapshot 1`] = `
125
120
  >
126
121
  domain
127
122
  </td>
128
- <td
129
- class=""
130
- >
131
- Published
132
- </td>
133
123
  <td
134
124
  class="center aligned"
135
125
  >
@@ -26,18 +26,6 @@ exports[`<ConceptsTable /> matches the latest snapshot 1`] = `
26
26
  onClick={[Function]}
27
27
  sorted="ascending"
28
28
  />
29
- <TableHeaderCell
30
- as="th"
31
- className="disabled"
32
- content={
33
- <Memo(MemoizedFormattedMessage)
34
- id="concepts.props.status"
35
- />
36
- }
37
- key="1"
38
- onClick={[Function]}
39
- sorted="ascending"
40
- />
41
29
  </TableRow>
42
30
  </TableHeader>
43
31
  <TableBody
@@ -49,9 +37,6 @@ exports[`<ConceptsTable /> matches the latest snapshot 1`] = `
49
37
  Object {
50
38
  "name": "name",
51
39
  },
52
- Object {
53
- "name": "status",
54
- },
55
40
  ]
56
41
  }
57
42
  concept={