@truedat/bg 4.38.7 → 4.40.0
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/concepts/components/ConceptActions.js +1 -0
- package/src/concepts/components/ConceptHeader.js +5 -5
- package/src/concepts/components/ConceptManageDomain.js +87 -0
- package/src/concepts/components/ConceptManageDomainPopup.js +50 -0
- package/src/concepts/components/ConceptTaxonomy.js +11 -3
- package/src/concepts/components/__tests__/ConceptManageDomain.spec.js +43 -0
- package/src/concepts/components/__tests__/ConceptManageDomainPopup.spec.js +36 -0
- package/src/concepts/components/__tests__/__snapshots__/ConceptManageDomain.spec.js.snap +129 -0
- package/src/concepts/components/__tests__/__snapshots__/ConceptManageDomainPopup.spec.js.snap +171 -0
- package/src/concepts/components/__tests__/__snapshots__/ConceptTaxonomy.spec.js.snap +6 -0
- package/src/concepts/reducers/index.js +3 -1
- package/src/concepts/reducers/updatingDomain.js +16 -0
- package/src/messages/en.js +4 -0
- package/src/messages/es.js +4 -0
- package/src/taxonomy/components/DomainsConceptLoader.js +43 -0
- package/src/taxonomy/components/__tests__/DomainsConceptLoader.spec.js +38 -0
- package/src/taxonomy/reducers/__tests__/domainConceptLoading.spec.js +26 -0
- package/src/taxonomy/reducers/__tests__/domainsConcept.spec.js +30 -0
- package/src/taxonomy/reducers/domainsConcept.js +19 -0
- package/src/taxonomy/reducers/domainsConceptLoading.js +12 -0
- package/src/taxonomy/reducers/index.js +4 -0
- package/src/taxonomy/routines.js +2 -0
- package/src/taxonomy/sagas/__tests__/fetchDomainsConcept.spec.js +93 -0
- package/src/taxonomy/sagas/fetchDomainsConcept.js +37 -0
- package/src/taxonomy/sagas/index.js +3 -0
- package/src/taxonomy/selectors/__tests__/getDomainSelectorOptions.spec.js +66 -0
- package/src/taxonomy/selectors/getDomainsConcept.js +176 -0
- package/src/taxonomy/selectors/index.js +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.40.0] 2022-03-27
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- [TD-4491] Simplified `getDomainSelectorOptions` selector
|
|
8
|
+
|
|
9
|
+
## [4.38.8] 2022-02-22
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- [TD-4481] Allow domain change on business concept
|
|
14
|
+
|
|
3
15
|
## [4.37.4] 2022-02-04
|
|
4
16
|
|
|
5
17
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/bg",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.40.0",
|
|
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.14.1",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "4.
|
|
37
|
+
"@truedat/test": "4.39.0",
|
|
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",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
]
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@truedat/core": "4.
|
|
87
|
-
"@truedat/df": "4.
|
|
86
|
+
"@truedat/core": "4.40.0",
|
|
87
|
+
"@truedat/df": "4.40.0",
|
|
88
88
|
"file-saver": "^2.0.5",
|
|
89
89
|
"moment": "^2.24.0",
|
|
90
90
|
"path-to-regexp": "^1.7.0",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"react-dom": ">= 16.8.6 < 17",
|
|
105
105
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "0bd677584da73a5021a5c96f2e5525fde9a1958a"
|
|
108
108
|
}
|
|
@@ -16,12 +16,12 @@ export const ConceptHeader = ({
|
|
|
16
16
|
setConfidentialConcept,
|
|
17
17
|
share,
|
|
18
18
|
domain,
|
|
19
|
-
template
|
|
19
|
+
template,
|
|
20
20
|
}) => {
|
|
21
21
|
const { formatMessage } = useIntl();
|
|
22
22
|
const path = linkTo.CONCEPT_VERSION({
|
|
23
23
|
business_concept_id: _.prop("business_concept_id")(concept),
|
|
24
|
-
id: "current"
|
|
24
|
+
id: "current",
|
|
25
25
|
});
|
|
26
26
|
const name = concept?.name;
|
|
27
27
|
const description = concept?.description;
|
|
@@ -78,15 +78,15 @@ ConceptHeader.propTypes = {
|
|
|
78
78
|
share: PropTypes.bool,
|
|
79
79
|
concept: PropTypes.object,
|
|
80
80
|
domain: PropTypes.object,
|
|
81
|
-
template: PropTypes.object
|
|
81
|
+
template: PropTypes.object,
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
const mapStateToProps = ({ concept, conceptActions, conceptPermissions }) => ({
|
|
85
|
-
share: _.
|
|
85
|
+
share: _.prop("share")(conceptPermissions),
|
|
86
86
|
concept,
|
|
87
87
|
setConfidentialConcept: _.prop("set_confidential")(conceptActions),
|
|
88
88
|
domain: concept.domain || {},
|
|
89
|
-
template: concept.template || {}
|
|
89
|
+
template: concept.template || {},
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
export default connect(mapStateToProps)(ConceptHeader);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import _ from "lodash/fp";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Button, Container, Form, Header } from "semantic-ui-react";
|
|
4
|
+
import { connect } from "react-redux";
|
|
5
|
+
import { useForm, Controller } from "react-hook-form";
|
|
6
|
+
import { useIntl } from "react-intl";
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import DomainDropdownSelector from "../../taxonomy/components/DomainDropdownSelector";
|
|
9
|
+
import { getDomainConceptSelectorOptions } from "../../taxonomy/selectors/getDomainsConcept";
|
|
10
|
+
import { conceptAction } from "../routines";
|
|
11
|
+
|
|
12
|
+
const actionKey = "update_domain";
|
|
13
|
+
|
|
14
|
+
export const ConceptManageDomain = ({
|
|
15
|
+
domainOptions,
|
|
16
|
+
conceptAction,
|
|
17
|
+
action,
|
|
18
|
+
setToDomain,
|
|
19
|
+
}) => {
|
|
20
|
+
const { formatMessage } = useIntl();
|
|
21
|
+
const { handleSubmit, control, formState } = useForm({
|
|
22
|
+
mode: "all",
|
|
23
|
+
defaultValues: {
|
|
24
|
+
setToDomain: _.prop("id")(setToDomain),
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
const { isDirty, isValid } = formState;
|
|
28
|
+
const onSubmit = ({ setToDomain }) => {
|
|
29
|
+
conceptAction({
|
|
30
|
+
action: actionKey,
|
|
31
|
+
...action,
|
|
32
|
+
domain_id: setToDomain,
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Container style={{ width: "400px" }}>
|
|
38
|
+
<Header
|
|
39
|
+
as="h2"
|
|
40
|
+
content={formatMessage({
|
|
41
|
+
id: "concept.changeDomain.header",
|
|
42
|
+
})}
|
|
43
|
+
/>
|
|
44
|
+
<Form onSubmit={handleSubmit(onSubmit)}>
|
|
45
|
+
<Controller
|
|
46
|
+
control={control}
|
|
47
|
+
name="setToDomain"
|
|
48
|
+
render={({ onBlur, onChange, value }, { invalid }) => (
|
|
49
|
+
<DomainDropdownSelector
|
|
50
|
+
domainOptions={domainOptions}
|
|
51
|
+
name="setToDomain"
|
|
52
|
+
clearable={false}
|
|
53
|
+
error={invalid}
|
|
54
|
+
label={formatMessage({ id: "concept.changeDomain.label" })}
|
|
55
|
+
onBlur={onBlur}
|
|
56
|
+
required
|
|
57
|
+
onChange={(_e, { value }) => onChange(value)}
|
|
58
|
+
value={value}
|
|
59
|
+
/>
|
|
60
|
+
)}
|
|
61
|
+
/>
|
|
62
|
+
<div className="actions">
|
|
63
|
+
<Button
|
|
64
|
+
type="submit"
|
|
65
|
+
disabled={!isDirty || !isValid}
|
|
66
|
+
primary
|
|
67
|
+
content={formatMessage({ id: "conceptDomain.actions.update" })}
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</Form>
|
|
71
|
+
</Container>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
ConceptManageDomain.propTypes = {
|
|
76
|
+
domainOptions: PropTypes.array,
|
|
77
|
+
conceptAction: PropTypes.func,
|
|
78
|
+
setToDomain: PropTypes.array,
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const mapStateToProps = (state) => ({
|
|
82
|
+
domainOptions: getDomainConceptSelectorOptions(state),
|
|
83
|
+
action: _.prop(actionKey)(state.conceptActions),
|
|
84
|
+
setToDomain: state.concept.domain,
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export default connect(mapStateToProps, { conceptAction })(ConceptManageDomain);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _ from "lodash/fp";
|
|
2
|
+
import React, { useState, useEffect } from "react";
|
|
3
|
+
import { Button, Icon, Popup } from "semantic-ui-react";
|
|
4
|
+
import { connect } from "react-redux";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import ConceptManageDomain from "./ConceptManageDomain";
|
|
7
|
+
|
|
8
|
+
export const ConceptManageDomainPopup = ({ update_domain, saving }) => {
|
|
9
|
+
const [open, setOpen] = useState(false);
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (saving === false) {
|
|
13
|
+
setOpen(false);
|
|
14
|
+
}
|
|
15
|
+
}, [saving]);
|
|
16
|
+
|
|
17
|
+
return update_domain ? (
|
|
18
|
+
<Popup
|
|
19
|
+
on="click"
|
|
20
|
+
basic
|
|
21
|
+
flowing
|
|
22
|
+
content={<ConceptManageDomain />}
|
|
23
|
+
onOpen={() => setOpen(true)}
|
|
24
|
+
onClose={() => setOpen(false)}
|
|
25
|
+
open={open}
|
|
26
|
+
position="bottom right"
|
|
27
|
+
size="large"
|
|
28
|
+
positionFixed
|
|
29
|
+
trigger={
|
|
30
|
+
<Button
|
|
31
|
+
basic
|
|
32
|
+
icon={<Icon name={"pencil alternate"} />}
|
|
33
|
+
style={{ boxShadow: "none" }}
|
|
34
|
+
/>
|
|
35
|
+
}
|
|
36
|
+
/>
|
|
37
|
+
) : null;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
ConceptManageDomainPopup.propTypes = {
|
|
41
|
+
update_domain: PropTypes.bool,
|
|
42
|
+
saving: PropTypes.bool,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const mapStateToProps = ({
|
|
46
|
+
conceptActions,
|
|
47
|
+
updatingDomain: saving,
|
|
48
|
+
}) => ({ update_domain: _.has("update_domain")(conceptActions), saving });
|
|
49
|
+
|
|
50
|
+
export default connect(mapStateToProps)(ConceptManageDomainPopup);
|
|
@@ -6,6 +6,11 @@ import { List, Header, Segment } from "semantic-ui-react";
|
|
|
6
6
|
import { FormattedMessage } from "react-intl";
|
|
7
7
|
import { getConceptDomainPath } from "../selectors";
|
|
8
8
|
import DomainItem from "../../taxonomy/components/DomainItem";
|
|
9
|
+
import ConceptManageDomainPopup from "./ConceptManageDomainPopup";
|
|
10
|
+
|
|
11
|
+
const DomainsConceptLoader = React.lazy(() =>
|
|
12
|
+
import("../../taxonomy/components/DomainsConceptLoader")
|
|
13
|
+
);
|
|
9
14
|
|
|
10
15
|
export const ConceptTaxonomy = ({ domainPath }) =>
|
|
11
16
|
_.negate(_.isEmpty)(domainPath) && (
|
|
@@ -13,6 +18,9 @@ export const ConceptTaxonomy = ({ domainPath }) =>
|
|
|
13
18
|
<Header as="h3" dividing>
|
|
14
19
|
<FormattedMessage id="concepts.taxonomy" defaultMessage="Taxonomía" />
|
|
15
20
|
</Header>
|
|
21
|
+
<DomainsConceptLoader actions="manage_business_concepts_domain" />
|
|
22
|
+
<ConceptManageDomainPopup conceptAction="concepts.actions.edit" />
|
|
23
|
+
|
|
16
24
|
<List horizontal>
|
|
17
25
|
{_.map.convert({ cap: false })((domain, i) => (
|
|
18
26
|
<DomainItem
|
|
@@ -27,11 +35,11 @@ export const ConceptTaxonomy = ({ domainPath }) =>
|
|
|
27
35
|
);
|
|
28
36
|
|
|
29
37
|
ConceptTaxonomy.propTypes = {
|
|
30
|
-
domainPath: PropTypes.array
|
|
38
|
+
domainPath: PropTypes.array,
|
|
31
39
|
};
|
|
32
40
|
|
|
33
|
-
const mapStateToProps = state => ({
|
|
34
|
-
domainPath: getConceptDomainPath(state)
|
|
41
|
+
const mapStateToProps = (state) => ({
|
|
42
|
+
domainPath: getConceptDomainPath(state),
|
|
35
43
|
});
|
|
36
44
|
|
|
37
45
|
export default connect(mapStateToProps)(ConceptTaxonomy);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { waitFor } from "@testing-library/react";
|
|
3
|
+
import userEvent from "@testing-library/user-event";
|
|
4
|
+
import { render } from "@truedat/test/render";
|
|
5
|
+
import { ConceptManageDomain } from "../ConceptManageDomain";
|
|
6
|
+
|
|
7
|
+
describe("<ConceptManageDomain />", () => {
|
|
8
|
+
// const id = 5;
|
|
9
|
+
const domainOptions = [
|
|
10
|
+
{ id: 1, name: "foo", level: 0 },
|
|
11
|
+
{ id: 2, name: "bar", level: 0 },
|
|
12
|
+
{ id: 3, name: "baz", level: 0 },
|
|
13
|
+
];
|
|
14
|
+
const conceptAction = jest.fn();
|
|
15
|
+
// const saving = false;
|
|
16
|
+
const setToDomain = [{ id: 2, name: "bar" }];
|
|
17
|
+
const props = {
|
|
18
|
+
domainOptions,
|
|
19
|
+
// id,
|
|
20
|
+
conceptAction,
|
|
21
|
+
// saving,
|
|
22
|
+
setToDomain,
|
|
23
|
+
};
|
|
24
|
+
const renderOpts = {
|
|
25
|
+
messages: {
|
|
26
|
+
en: {
|
|
27
|
+
"concept.changeDomain.header": "edit domain",
|
|
28
|
+
"concept.changeDomain.label": "domain",
|
|
29
|
+
"conceptDomain.actions.update": "update",
|
|
30
|
+
"domain.selector.label": "domain",
|
|
31
|
+
"domain.selector.placeholder": "select a domain...",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
it("matches the latest snapshot", () => {
|
|
37
|
+
const { container } = render(
|
|
38
|
+
<ConceptManageDomain {...props} />,
|
|
39
|
+
renderOpts
|
|
40
|
+
);
|
|
41
|
+
expect(container).toMatchSnapshot();
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { mount } from "enzyme";
|
|
3
|
+
import { intl } from "@truedat/test/intl-stub";
|
|
4
|
+
import { ConceptManageDomainPopup } from "../ConceptManageDomainPopup";
|
|
5
|
+
|
|
6
|
+
// workaround for enzyme issue with React.useContext
|
|
7
|
+
// see https://github.com/airbnb/enzyme/issues/2176#issuecomment-532361526
|
|
8
|
+
jest.spyOn(React, "useContext").mockImplementation(() => intl);
|
|
9
|
+
jest.mock("../ConceptManageDomain");
|
|
10
|
+
|
|
11
|
+
describe("<ConceptManageDomainPopup />", () => {
|
|
12
|
+
const props = {
|
|
13
|
+
saving: false,
|
|
14
|
+
update_domain: true,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
it("matches the latest snapshot", () => {
|
|
18
|
+
const wrapper = mount(<ConceptManageDomainPopup {...props} />);
|
|
19
|
+
expect(wrapper).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it("manages open and close popup", () => {
|
|
23
|
+
const wrapper = mount(<ConceptManageDomainPopup {...props} />);
|
|
24
|
+
wrapper.setProps({ saving: true, update_domain: true });
|
|
25
|
+
expect(wrapper.find("Popup").prop("open")).toBeFalsy();
|
|
26
|
+
wrapper.find("Popup").find("Portal").find("Button").simulate("click");
|
|
27
|
+
expect(wrapper.find("Popup").prop("open")).toBeTruthy();
|
|
28
|
+
wrapper.find("Popup").find("Portal").find("Button").simulate("click");
|
|
29
|
+
expect(wrapper.find("Popup").prop("open")).toBeFalsy();
|
|
30
|
+
wrapper.find("Popup").find("Portal").find("Button").simulate("click");
|
|
31
|
+
expect(wrapper.find("Popup").prop("open")).toBeTruthy();
|
|
32
|
+
wrapper.setProps({ saving: false, update_domain: true });
|
|
33
|
+
wrapper.update();
|
|
34
|
+
expect(wrapper.find("Popup").prop("open")).toBeFalsy();
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<ConceptManageDomain /> matches the latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ui container"
|
|
7
|
+
style="width: 400px;"
|
|
8
|
+
>
|
|
9
|
+
<h2
|
|
10
|
+
class="ui header"
|
|
11
|
+
>
|
|
12
|
+
edit domain
|
|
13
|
+
</h2>
|
|
14
|
+
<form
|
|
15
|
+
class="ui form"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
class="required field"
|
|
19
|
+
>
|
|
20
|
+
<label>
|
|
21
|
+
domain
|
|
22
|
+
</label>
|
|
23
|
+
<div
|
|
24
|
+
class="field"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
aria-expanded="false"
|
|
28
|
+
class="ui fluid search selection dropdown"
|
|
29
|
+
name="domain"
|
|
30
|
+
role="combobox"
|
|
31
|
+
>
|
|
32
|
+
<input
|
|
33
|
+
aria-autocomplete="list"
|
|
34
|
+
autocomplete="off"
|
|
35
|
+
class="search"
|
|
36
|
+
tabindex="0"
|
|
37
|
+
type="text"
|
|
38
|
+
value=""
|
|
39
|
+
/>
|
|
40
|
+
<div
|
|
41
|
+
aria-atomic="true"
|
|
42
|
+
aria-live="polite"
|
|
43
|
+
class="divider default text"
|
|
44
|
+
role="alert"
|
|
45
|
+
>
|
|
46
|
+
select a domain...
|
|
47
|
+
</div>
|
|
48
|
+
<i
|
|
49
|
+
aria-hidden="true"
|
|
50
|
+
class="dropdown icon"
|
|
51
|
+
/>
|
|
52
|
+
<div
|
|
53
|
+
class="menu transition"
|
|
54
|
+
role="listbox"
|
|
55
|
+
>
|
|
56
|
+
<div
|
|
57
|
+
aria-checked="false"
|
|
58
|
+
aria-selected="true"
|
|
59
|
+
class="selected item"
|
|
60
|
+
role="option"
|
|
61
|
+
style="pointer-events: all;"
|
|
62
|
+
>
|
|
63
|
+
<div
|
|
64
|
+
class="text"
|
|
65
|
+
style="margin-left: 0px;"
|
|
66
|
+
>
|
|
67
|
+
<i
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
class="icon"
|
|
70
|
+
/>
|
|
71
|
+
foo
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
<div
|
|
75
|
+
aria-checked="false"
|
|
76
|
+
aria-selected="false"
|
|
77
|
+
class="item"
|
|
78
|
+
role="option"
|
|
79
|
+
style="pointer-events: all;"
|
|
80
|
+
>
|
|
81
|
+
<div
|
|
82
|
+
class="text"
|
|
83
|
+
style="margin-left: 0px;"
|
|
84
|
+
>
|
|
85
|
+
<i
|
|
86
|
+
aria-hidden="true"
|
|
87
|
+
class="icon"
|
|
88
|
+
/>
|
|
89
|
+
bar
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div
|
|
93
|
+
aria-checked="false"
|
|
94
|
+
aria-selected="false"
|
|
95
|
+
class="item"
|
|
96
|
+
role="option"
|
|
97
|
+
style="pointer-events: all;"
|
|
98
|
+
>
|
|
99
|
+
<div
|
|
100
|
+
class="text"
|
|
101
|
+
style="margin-left: 0px;"
|
|
102
|
+
>
|
|
103
|
+
<i
|
|
104
|
+
aria-hidden="true"
|
|
105
|
+
class="icon"
|
|
106
|
+
/>
|
|
107
|
+
baz
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div
|
|
115
|
+
class="actions"
|
|
116
|
+
>
|
|
117
|
+
<button
|
|
118
|
+
class="ui primary disabled button"
|
|
119
|
+
disabled=""
|
|
120
|
+
tabindex="-1"
|
|
121
|
+
type="submit"
|
|
122
|
+
>
|
|
123
|
+
update
|
|
124
|
+
</button>
|
|
125
|
+
</div>
|
|
126
|
+
</form>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
`;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<ConceptManageDomainPopup /> matches the latest snapshot 1`] = `
|
|
4
|
+
<ConceptManageDomainPopup
|
|
5
|
+
saving={false}
|
|
6
|
+
update_domain={true}
|
|
7
|
+
>
|
|
8
|
+
<Popup
|
|
9
|
+
basic={true}
|
|
10
|
+
content={<Memo(Connect(ConceptManageDomain)) />}
|
|
11
|
+
disabled={false}
|
|
12
|
+
eventsEnabled={true}
|
|
13
|
+
flowing={true}
|
|
14
|
+
on="click"
|
|
15
|
+
onClose={[Function]}
|
|
16
|
+
onOpen={[Function]}
|
|
17
|
+
open={false}
|
|
18
|
+
pinned={false}
|
|
19
|
+
popperModifiers={Array []}
|
|
20
|
+
position="bottom right"
|
|
21
|
+
positionFixed={true}
|
|
22
|
+
size="large"
|
|
23
|
+
trigger={
|
|
24
|
+
<Button
|
|
25
|
+
as="button"
|
|
26
|
+
basic={true}
|
|
27
|
+
icon={
|
|
28
|
+
<Icon
|
|
29
|
+
as="i"
|
|
30
|
+
name="pencil alternate"
|
|
31
|
+
/>
|
|
32
|
+
}
|
|
33
|
+
style={
|
|
34
|
+
Object {
|
|
35
|
+
"boxShadow": "none",
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/>
|
|
39
|
+
}
|
|
40
|
+
>
|
|
41
|
+
<Portal
|
|
42
|
+
closeOnDocumentClick={true}
|
|
43
|
+
closeOnEscape={true}
|
|
44
|
+
closeOnTriggerClick={true}
|
|
45
|
+
eventPool="default"
|
|
46
|
+
onClose={[Function]}
|
|
47
|
+
onMount={[Function]}
|
|
48
|
+
onOpen={[Function]}
|
|
49
|
+
onUnmount={[Function]}
|
|
50
|
+
open={false}
|
|
51
|
+
openOnTriggerClick={true}
|
|
52
|
+
trigger={
|
|
53
|
+
<Button
|
|
54
|
+
as="button"
|
|
55
|
+
basic={true}
|
|
56
|
+
icon={
|
|
57
|
+
<Icon
|
|
58
|
+
as="i"
|
|
59
|
+
name="pencil alternate"
|
|
60
|
+
/>
|
|
61
|
+
}
|
|
62
|
+
style={
|
|
63
|
+
Object {
|
|
64
|
+
"boxShadow": "none",
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/>
|
|
68
|
+
}
|
|
69
|
+
triggerRef={
|
|
70
|
+
Object {
|
|
71
|
+
"current": <button
|
|
72
|
+
class="ui basic icon button"
|
|
73
|
+
style="box-shadow: none;"
|
|
74
|
+
>
|
|
75
|
+
<i
|
|
76
|
+
aria-hidden="true"
|
|
77
|
+
class="pencil alternate icon"
|
|
78
|
+
/>
|
|
79
|
+
</button>,
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
>
|
|
83
|
+
<Ref
|
|
84
|
+
innerRef={[Function]}
|
|
85
|
+
>
|
|
86
|
+
<RefFindNode
|
|
87
|
+
innerRef={[Function]}
|
|
88
|
+
>
|
|
89
|
+
<Button
|
|
90
|
+
as="button"
|
|
91
|
+
basic={true}
|
|
92
|
+
icon={
|
|
93
|
+
<Icon
|
|
94
|
+
as="i"
|
|
95
|
+
name="pencil alternate"
|
|
96
|
+
/>
|
|
97
|
+
}
|
|
98
|
+
onBlur={[Function]}
|
|
99
|
+
onClick={[Function]}
|
|
100
|
+
onFocus={[Function]}
|
|
101
|
+
onMouseEnter={[Function]}
|
|
102
|
+
onMouseLeave={[Function]}
|
|
103
|
+
style={
|
|
104
|
+
Object {
|
|
105
|
+
"boxShadow": "none",
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
>
|
|
109
|
+
<Ref
|
|
110
|
+
innerRef={
|
|
111
|
+
Object {
|
|
112
|
+
"current": <button
|
|
113
|
+
class="ui basic icon button"
|
|
114
|
+
style="box-shadow: none;"
|
|
115
|
+
>
|
|
116
|
+
<i
|
|
117
|
+
aria-hidden="true"
|
|
118
|
+
class="pencil alternate icon"
|
|
119
|
+
/>
|
|
120
|
+
</button>,
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
>
|
|
124
|
+
<RefFindNode
|
|
125
|
+
innerRef={
|
|
126
|
+
Object {
|
|
127
|
+
"current": <button
|
|
128
|
+
class="ui basic icon button"
|
|
129
|
+
style="box-shadow: none;"
|
|
130
|
+
>
|
|
131
|
+
<i
|
|
132
|
+
aria-hidden="true"
|
|
133
|
+
class="pencil alternate icon"
|
|
134
|
+
/>
|
|
135
|
+
</button>,
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
>
|
|
139
|
+
<button
|
|
140
|
+
className="ui basic icon button"
|
|
141
|
+
onBlur={[Function]}
|
|
142
|
+
onClick={[Function]}
|
|
143
|
+
onFocus={[Function]}
|
|
144
|
+
onMouseEnter={[Function]}
|
|
145
|
+
onMouseLeave={[Function]}
|
|
146
|
+
style={
|
|
147
|
+
Object {
|
|
148
|
+
"boxShadow": "none",
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
>
|
|
152
|
+
<Icon
|
|
153
|
+
as="i"
|
|
154
|
+
name="pencil alternate"
|
|
155
|
+
>
|
|
156
|
+
<i
|
|
157
|
+
aria-hidden="true"
|
|
158
|
+
className="pencil alternate icon"
|
|
159
|
+
onClick={[Function]}
|
|
160
|
+
/>
|
|
161
|
+
</Icon>
|
|
162
|
+
</button>
|
|
163
|
+
</RefFindNode>
|
|
164
|
+
</Ref>
|
|
165
|
+
</Button>
|
|
166
|
+
</RefFindNode>
|
|
167
|
+
</Ref>
|
|
168
|
+
</Portal>
|
|
169
|
+
</Popup>
|
|
170
|
+
</ConceptManageDomainPopup>
|
|
171
|
+
`;
|
|
@@ -11,6 +11,12 @@ exports[`<ConceptTaxonomy /> matches the latest snapshot 1`] = `
|
|
|
11
11
|
id="concepts.taxonomy"
|
|
12
12
|
/>
|
|
13
13
|
</Header>
|
|
14
|
+
<lazy
|
|
15
|
+
actions="manage_business_concepts_domain"
|
|
16
|
+
/>
|
|
17
|
+
<Connect(ConceptManageDomainPopup)
|
|
18
|
+
conceptAction="concepts.actions.edit"
|
|
19
|
+
/>
|
|
14
20
|
<List
|
|
15
21
|
horizontal={true}
|
|
16
22
|
>
|
|
@@ -28,6 +28,7 @@ import { conceptUserFilters } from "./conceptUserFilters";
|
|
|
28
28
|
import { conceptSelectedUserFilter } from "./conceptSelectedUserFilter";
|
|
29
29
|
import { sharedToDomains } from "./sharedToDomains";
|
|
30
30
|
import { savingSharedTo } from "./savingSharedTo";
|
|
31
|
+
import { updatingDomain } from "./updatingDomain";
|
|
31
32
|
|
|
32
33
|
export {
|
|
33
34
|
bulkUpdateLoading,
|
|
@@ -59,7 +60,8 @@ export {
|
|
|
59
60
|
conceptUpdating,
|
|
60
61
|
conceptUserFilters,
|
|
61
62
|
sharedToDomains,
|
|
62
|
-
savingSharedTo
|
|
63
|
+
savingSharedTo,
|
|
64
|
+
updatingDomain,
|
|
63
65
|
};
|
|
64
66
|
|
|
65
67
|
export * from "../relations/reducers";
|