@truedat/bg 4.28.4 → 4.28.8

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,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.28.7] 2021-09-20
4
+
5
+ ### Fixed
6
+
7
+ - [TD-3780] Missing `updateDomain` saga export
8
+
9
+ ## [4.28.5] 2021-09-16
10
+
11
+ ### Fixed
12
+
13
+ - [TD-4073] Handle default value in domain dropdown selector
14
+
3
15
  ## [4.26.0] 2021-07-27
4
16
 
5
17
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/bg",
3
- "version": "4.28.4",
3
+ "version": "4.28.8",
4
4
  "description": "Truedat Web Business Glossary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -16,8 +16,8 @@
16
16
  "scripts": {
17
17
  "clean": "rimraf yarn-error.log",
18
18
  "debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
19
- "test": "jest --coverage",
20
- "test:watch": "jest --watch",
19
+ "test": "TZ=UTC jest --coverage",
20
+ "test:watch": "TZ=UTC jest --watch",
21
21
  "eslint": "eslint src/**",
22
22
  "eslint:fix": "eslint --fix src/**"
23
23
  },
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.14.1",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "4.28.4",
37
+ "@truedat/test": "4.28.8",
38
38
  "babel-jest": "^27.0.6",
39
39
  "babel-plugin-dynamic-import-node": "^2.3.3",
40
40
  "babel-plugin-lodash": "^3.3.4",
@@ -81,8 +81,8 @@
81
81
  ]
82
82
  },
83
83
  "dependencies": {
84
- "@truedat/core": "4.28.4",
85
- "@truedat/df": "4.28.4",
84
+ "@truedat/core": "4.28.8",
85
+ "@truedat/df": "4.28.8",
86
86
  "file-saver": "^2.0.5",
87
87
  "moment": "^2.24.0",
88
88
  "path-to-regexp": "^1.7.0",
@@ -102,5 +102,5 @@
102
102
  "react-dom": ">= 16.8.6 < 17",
103
103
  "semantic-ui-react": ">= 0.88.2 < 2.1"
104
104
  },
105
- "gitHead": "c00da6ddc499bca47a5a0e108c8ec94988293907"
105
+ "gitHead": "33a7f73dd4ffbd31d1df270c8453c3a876412990"
106
106
  }
@@ -32,17 +32,18 @@ const toDomainOption = ({ id, canOpen, handleOpen, open, name, level }) => {
32
32
  };
33
33
 
34
34
  export const DomainDropdownSelector = ({
35
+ clearable = true,
35
36
  disabled,
36
37
  domainOptions: options,
37
38
  hideLabel,
38
39
  invalid,
39
40
  onChange,
40
- value: externalValue,
41
+ value: defaultValue,
41
42
  }) => {
42
43
  const [query, setQuery] = useState();
43
44
  const [open, setOpen] = useState([]);
44
45
  const [displayed, setDisplayed] = useState([]);
45
- const [value, setValue] = useState(externalValue);
46
+ const [value, setValue] = useState(defaultValue);
46
47
  const { formatMessage } = useIntl();
47
48
 
48
49
  useEffect(() => {
@@ -55,6 +56,12 @@ export const DomainDropdownSelector = ({
55
56
  }
56
57
  }, [value, options]);
57
58
 
59
+ useEffect(() => {
60
+ if (!_.isNil(defaultValue) && value !== defaultValue) {
61
+ setValue(defaultValue);
62
+ }
63
+ }, [value, defaultValue]);
64
+
58
65
  const displayAll = () => {
59
66
  const ids = _.map("id")(options);
60
67
  setOpen(ids);
@@ -134,7 +141,7 @@ export const DomainDropdownSelector = ({
134
141
  </label>
135
142
  )}
136
143
  <Form.Dropdown
137
- clearable
144
+ clearable={clearable}
138
145
  disabled={disabled}
139
146
  fluid
140
147
  name="domain"
@@ -159,6 +166,7 @@ export const DomainDropdownSelector = ({
159
166
  };
160
167
 
161
168
  DomainDropdownSelector.propTypes = {
169
+ clearable: PropTypes.bool,
162
170
  disabled: PropTypes.bool,
163
171
  domainOptions: PropTypes.array,
164
172
  hideLabel: PropTypes.bool,
@@ -2,6 +2,7 @@ import { addDomainMemberRequestSaga } from "./addDomainMember";
2
2
  import { createDomainRequestSaga } from "./createDomain";
3
3
  import { deleteDomainMemberRequestSaga } from "./deleteDomainMember";
4
4
  import { updateDomainMemberRequestSaga } from "./updateDomainMember";
5
+ import { updateDomainRequestSaga } from "./updateDomain";
5
6
  import { deleteDomainRequestSaga } from "./deleteDomain";
6
7
  import { fetchDomainConceptChildrenRequestSaga } from "./fetchDomainConceptChildren";
7
8
  import { fetchDomainMembersRequestSaga } from "./fetchDomainMembers";
@@ -13,6 +14,7 @@ export {
13
14
  createDomainRequestSaga,
14
15
  deleteDomainMemberRequestSaga,
15
16
  updateDomainMemberRequestSaga,
17
+ updateDomainRequestSaga,
16
18
  deleteDomainRequestSaga,
17
19
  fetchDomainConceptChildrenRequestSaga,
18
20
  fetchDomainMembersRequestSaga,
@@ -25,6 +27,7 @@ export default [
25
27
  createDomainRequestSaga(),
26
28
  deleteDomainMemberRequestSaga(),
27
29
  updateDomainMemberRequestSaga(),
30
+ updateDomainRequestSaga(),
28
31
  deleteDomainRequestSaga(),
29
32
  fetchDomainConceptChildrenRequestSaga(),
30
33
  fetchDomainMembersRequestSaga(),