@truedat/dq 4.51.2 → 4.51.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.51.3] 2022-09-16
4
+
5
+ ### Changed
6
+
7
+ - [TD-4794] Replace `DomainDropdownSelector` and `DomainMenuSelector` with
8
+ common `DomainSelector`
9
+
3
10
  ## [4.51.0] 2022-09-13
4
11
 
5
12
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dq",
3
- "version": "4.51.2",
3
+ "version": "4.51.3",
4
4
  "description": "Truedat Web Data Quality Module",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.16.4",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "4.47.9",
37
+ "@truedat/test": "4.51.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",
@@ -93,8 +93,8 @@
93
93
  },
94
94
  "dependencies": {
95
95
  "@apollo/client": "^3.6.4",
96
- "@truedat/core": "4.51.2",
97
- "@truedat/df": "4.51.2",
96
+ "@truedat/core": "4.51.3",
97
+ "@truedat/df": "4.51.3",
98
98
  "graphql": "^15.5.3",
99
99
  "path-to-regexp": "^1.7.0",
100
100
  "prop-types": "^15.8.1",
@@ -114,5 +114,5 @@
114
114
  "react-dom": ">= 16.8.6 < 17",
115
115
  "semantic-ui-react": ">= 0.88.2 < 2.1"
116
116
  },
117
- "gitHead": "9bdc76f3ee59a6e28fb2312e26d0cba2807f069b"
117
+ "gitHead": "69d6cf8f7379eb2ef5744a4fdd357a7dd662b115"
118
118
  }
@@ -117,12 +117,8 @@ export const ExecutionGroup = ({ executionGroup }) => {
117
117
 
118
118
  ExecutionGroup.propTypes = {
119
119
  executionGroup: PropTypes.object,
120
- executionGroupLoading: PropTypes.bool,
121
120
  };
122
121
 
123
- export const mapStateToProps = ({ executionGroup, executionGroupLoading }) => ({
124
- executionGroup,
125
- executionGroupLoading,
126
- });
122
+ export const mapStateToProps = ({ executionGroup }) => ({ executionGroup });
127
123
 
128
124
  export default connect(mapStateToProps)(ExecutionGroup);
@@ -49,9 +49,6 @@ import RuleSubscriptionLoader from "./RuleSubscriptionLoader";
49
49
  const TemplatesLoader = React.lazy(() =>
50
50
  import("@truedat/df/templates/components/TemplatesLoader")
51
51
  );
52
- const DomainsLoader = React.lazy(() =>
53
- import("@truedat/bg/taxonomy/components/DomainsLoader")
54
- );
55
52
  const EventsLoader = React.lazy(() =>
56
53
  import("@truedat/audit/components/EventsLoader")
57
54
  );
@@ -72,12 +69,11 @@ const ImplementationEventsLoader = () => {
72
69
  };
73
70
 
74
71
  export const ImplementationsRoutes = ({
75
- structuresAliasesLoading,
76
- systemsLoading,
77
- ruleImplementationLoaded,
78
- ruleImplementation,
79
72
  implementationStructures,
80
73
  implementationStructuresLoaded,
74
+ ruleImplementationLoaded,
75
+ structuresAliasesLoading,
76
+ systemsLoading,
81
77
  }) => {
82
78
  const authorized = useAuthorized();
83
79
  const { rule_result_id: ruleResultId } = useParams();
@@ -88,13 +84,6 @@ export const ImplementationsRoutes = ({
88
84
  path={IMPLEMENTATION_NEW}
89
85
  render={() => (
90
86
  <>
91
- <DomainsLoader
92
- actions={[
93
- "manage_ruleless_implementations",
94
- "manage_quality_rule_implementations",
95
- ]}
96
- filter="all"
97
- />
98
87
  {!structuresAliasesLoading && !systemsLoading ? (
99
88
  <NewRuleImplementation />
100
89
  ) : null}
@@ -106,13 +95,6 @@ export const ImplementationsRoutes = ({
106
95
  path={IMPLEMENTATION_NEW_RAW}
107
96
  render={() => (
108
97
  <>
109
- <DomainsLoader
110
- actions={[
111
- "manage_ruleless_implementations",
112
- "manage_raw_quality_rule_implementations",
113
- ]}
114
- filter="all"
115
- />
116
98
  <TemplatesLoader scope="ri" />
117
99
  {!structuresAliasesLoading && !systemsLoading ? (
118
100
  <NewRuleImplementation implementationType="raw" />
@@ -165,17 +147,6 @@ export const ImplementationsRoutes = ({
165
147
  path={IMPLEMENTATION_CLONE}
166
148
  render={() => (
167
149
  <>
168
- {!ruleImplementation?.rule_id ? (
169
- <DomainsLoader
170
- actions={[
171
- "manage_ruleless_implementations",
172
- ruleImplementation?.implementation_type === "raw"
173
- ? "manage_raw_quality_rule_implementations"
174
- : "manage_quality_rule_implementations",
175
- ]}
176
- filter="all"
177
- />
178
- ) : null}
179
150
  {ruleImplementationLoaded ? (
180
151
  <ImplementationStructuresLoader
181
152
  structureIds={implementationStructures}
@@ -194,17 +165,6 @@ export const ImplementationsRoutes = ({
194
165
  path={IMPLEMENTATION_EDIT}
195
166
  render={() => (
196
167
  <>
197
- {!ruleImplementation?.rule_id ? (
198
- <DomainsLoader
199
- actions={[
200
- "manage_ruleless_implementations",
201
- ruleImplementation?.implementation_type === "raw"
202
- ? "manage_raw_quality_rule_implementations"
203
- : "manage_quality_rule_implementations",
204
- ]}
205
- filter="all"
206
- />
207
- ) : null}
208
168
  {ruleImplementationLoaded ? (
209
169
  <ImplementationStructuresLoader
210
170
  structureIds={implementationStructures}
@@ -385,24 +345,20 @@ export const ImplementationsRoutes = ({
385
345
  };
386
346
 
387
347
  ImplementationsRoutes.propTypes = {
388
- structuresAliasesLoading: PropTypes.bool,
389
- systemsLoading: PropTypes.bool,
390
- ruleImplementationLoaded: PropTypes.bool,
391
- ruleImplementation: PropTypes.object,
392
348
  implementationStructures: PropTypes.array,
393
349
  implementationStructuresLoaded: PropTypes.bool,
350
+ ruleImplementationLoaded: PropTypes.bool,
351
+ structuresAliasesLoading: PropTypes.bool,
352
+ systemsLoading: PropTypes.bool,
394
353
  };
395
354
 
396
355
  export const mapStateToProps = (state) => ({
397
- ..._.pick([
398
- "structuresAliasesLoading",
399
- "systemsLoading",
400
- "ruleImplementation",
401
- ])(state),
402
- ruleImplementationLoaded:
403
- !state.ruleImplementationLoading && !_.isEmpty(state.ruleImplementation),
404
356
  implementationStructures: getImplementationStructures(state),
405
357
  implementationStructuresLoaded: getImplementationStructuresLoaded(state),
358
+ ruleImplementationLoaded:
359
+ !state.ruleImplementationLoading && !_.isEmpty(state.ruleImplementation),
360
+ structuresAliasesLoading: state.structuresAliasesLoading,
361
+ systemsLoading: state.systemsLoading,
406
362
  });
407
363
 
408
364
  export default connect(mapStateToProps)(ImplementationsRoutes);
@@ -7,10 +7,6 @@ import { Container, Header, Icon, Segment } from "semantic-ui-react";
7
7
  import { createRule } from "../routines";
8
8
  import RuleForm from "./RuleForm";
9
9
 
10
- const DomainsLoader = React.lazy(() =>
11
- import("@truedat/bg/taxonomy/components/DomainsLoader")
12
- );
13
-
14
10
  export const ConceptRuleForm = ({ createRule, concept }) => {
15
11
  if (!concept?.business_concept_id) return null;
16
12
  return <RuleForm concept={concept} onSubmit={createRule} />;
@@ -31,7 +27,6 @@ export const NewRule = ({ createRule, concept }) => {
31
27
  <FormattedMessage id="rules.actions.create" />
32
28
  </Header.Content>
33
29
  </Header>
34
- <DomainsLoader actions="manage_quality_rule" />
35
30
  {business_concept_id ? (
36
31
  <ConceptRuleForm concept={concept} createRule={createRule} />
37
32
  ) : (
@@ -16,12 +16,11 @@ import {
16
16
  Popup,
17
17
  Icon,
18
18
  } from "semantic-ui-react";
19
- import { HistoryBackButton, RichTextEditor } from "@truedat/core/components";
20
- import { getDomainSelectorOptions } from "@truedat/bg/selectors";
21
-
22
- const DomainDropdownSelector = React.lazy(() =>
23
- import("@truedat/bg/taxonomy/components/DomainDropdownSelector")
24
- );
19
+ import {
20
+ DomainSelector,
21
+ HistoryBackButton,
22
+ RichTextEditor,
23
+ } from "@truedat/core/components";
25
24
 
26
25
  const ConceptSelector = React.lazy(() =>
27
26
  import("@truedat/bg/concepts/relations/components/ConceptSelector")
@@ -80,12 +79,12 @@ export class RuleForm extends React.Component {
80
79
  activeSelection: false,
81
80
  concept: null,
82
81
  domain_id: null,
82
+ domainsLoading: true,
83
83
  name: "",
84
84
  description: null,
85
85
  df_name: "",
86
86
  df_content: {},
87
87
  template: null,
88
- templatesLoading: true,
89
88
  };
90
89
 
91
90
  componentDidMount() {
@@ -102,7 +101,7 @@ export class RuleForm extends React.Component {
102
101
  } else if (!_.isEmpty(concept)) {
103
102
  this.setState({
104
103
  business_concept_id: concept?.business_concept_id,
105
- domain_id: concept?.domain_id,
104
+ domain_id: concept?.domain?.id,
106
105
  concept,
107
106
  });
108
107
  }
@@ -154,8 +153,8 @@ export class RuleForm extends React.Component {
154
153
  const rule = _.omit([
155
154
  "activeSelection",
156
155
  "concept",
156
+ "domainsLoading",
157
157
  "template",
158
- "templatesLoading",
159
158
  "valid",
160
159
  ])(this.state);
161
160
 
@@ -174,11 +173,9 @@ export class RuleForm extends React.Component {
174
173
  };
175
174
 
176
175
  handleDomainSelected = (e, { value }) => {
177
- const domain_id = value;
178
- const { editMode } = this.props;
179
-
176
+ const domain_id = value ? _.toInteger(value) : null;
180
177
  this.setState(
181
- editMode
178
+ this.props.editMode
182
179
  ? { concept: null, business_concept_id: null, domain_id }
183
180
  : { domain_id }
184
181
  );
@@ -189,6 +186,10 @@ export class RuleForm extends React.Component {
189
186
  this.setState({ activeSelection: !activeSelection });
190
187
  };
191
188
 
189
+ handleDomainsLoaded = () => {
190
+ this.setState({ domainsLoading: false });
191
+ };
192
+
192
193
  generateValidationMessages = () => {
193
194
  const rule = this.state;
194
195
  const {
@@ -213,9 +214,9 @@ export class RuleForm extends React.Component {
213
214
  isSubmitting,
214
215
  intl: { formatMessage },
215
216
  } = this.props;
216
- const { valid, ...rule } = this.state;
217
- const { domain_id } = rule;
218
- const { concept, domainOptions } = this.props;
217
+ const { valid, domainsLoading, ...rule } = this.state;
218
+ const domain_id = rule?.domain_id;
219
+ const { concept } = this.props;
219
220
  const messages = this.generateValidationMessages();
220
221
  const hasDomainSelected = !!domain_id;
221
222
  const defaultFilters = hasDomainSelected
@@ -224,7 +225,11 @@ export class RuleForm extends React.Component {
224
225
 
225
226
  return (
226
227
  <>
227
- <Form onSubmit={this.handleSubmit} className="rule-form">
228
+ <Form
229
+ loading={domainsLoading}
230
+ onSubmit={this.handleSubmit}
231
+ className="rule-form"
232
+ >
228
233
  <Form.Field className="rule-form__field-right">
229
234
  <Radio
230
235
  name="active"
@@ -265,17 +270,13 @@ export class RuleForm extends React.Component {
265
270
  messages={_.prop("domain")(messages)}
266
271
  required
267
272
  >
268
- <DomainDropdownSelector
269
- name="domain"
270
- domainOptions={
271
- domainOptions
272
- ? getDomainSelectorOptions({ domains: domainOptions })
273
- : null
274
- }
275
- hideLabel
276
- invalid={!_.isFinite(this.state.domain_id)}
273
+ <DomainSelector
274
+ action="manageQualityRule"
275
+ labels
277
276
  onChange={this.handleDomainSelected}
278
- value={this.state.domain_id}
277
+ onLoad={this.handleDomainsLoaded}
278
+ required
279
+ value={domain_id}
279
280
  />
280
281
  </FieldLabelWrapping>
281
282
  {_.isEmpty(concept) && (
@@ -356,7 +357,6 @@ export class RuleForm extends React.Component {
356
357
 
357
358
  RuleForm.propTypes = {
358
359
  concept: PropTypes.object,
359
- domainOptions: PropTypes.array,
360
360
  editMode: PropTypes.bool,
361
361
  intl: PropTypes.object,
362
362
  isSubmitting: PropTypes.bool,
@@ -365,10 +365,9 @@ RuleForm.propTypes = {
365
365
  rule: PropTypes.object,
366
366
  };
367
367
 
368
- const mapStateToProps = (state) => ({
369
- isSubmitting: state.ruleCreating || state.ruleUpdating,
370
- concept: state.concept,
371
- domainOptions: _.pathOr(null, "conceptRulesActions.domain_ids")(state),
368
+ const mapStateToProps = ({ ruleCreating, ruleUpdating, concept }) => ({
369
+ isSubmitting: ruleCreating || ruleUpdating,
370
+ concept,
372
371
  });
373
372
 
374
373
  export default compose(
@@ -27,9 +27,6 @@ import RuleLoader from "./RuleLoader";
27
27
  import RuleProperties from "./RuleProperties";
28
28
  import RuleSubscriptionLoader from "./RuleSubscriptionLoader";
29
29
 
30
- const DomainsLoader = React.lazy(() =>
31
- import("@truedat/bg/taxonomy/components/DomainsLoader")
32
- );
33
30
  const DynamicFormViewer = React.lazy(() =>
34
31
  import("@truedat/df/components/DynamicFormViewer")
35
32
  );
@@ -83,16 +80,7 @@ export const RuleRoutes = ({
83
80
  </>
84
81
  )}
85
82
  />
86
- <Route
87
- exact
88
- path={RULE_EDIT}
89
- render={() => (
90
- <>
91
- <DomainsLoader actions="manage_quality_rule" />
92
- <EditRule />
93
- </>
94
- )}
95
- />
83
+ <Route exact path={RULE_EDIT} render={() => <EditRule />} />
96
84
  <Route
97
85
  exact
98
86
  path={RULE_EVENTS}
@@ -7,9 +7,6 @@ import RuleRoutes from "./RuleRoutes";
7
7
  import Rules from "./Rules";
8
8
  import RulesLoader from "./RulesLoader";
9
9
 
10
- const DomainsLoader = React.lazy(() =>
11
- import("@truedat/bg/taxonomy/components/DomainsLoader")
12
- );
13
10
  const UserSearchFiltersLoader = React.lazy(() =>
14
11
  import("@truedat/dd/components/UserSearchFiltersLoader")
15
12
  );
@@ -17,7 +17,13 @@ import {
17
17
 
18
18
  const domainActions = ["publishImplementation", "manageSegments"];
19
19
  const domains = [
20
- { id: "2", name: "Truedat", parentId: "", actions: domainActions },
20
+ {
21
+ id: "2",
22
+ externalId: "td",
23
+ name: "Truedat",
24
+ parentId: "",
25
+ actions: domainActions,
26
+ },
21
27
  ];
22
28
  const requestVariables = {
23
29
  action: "manageRulelessImplementations",
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { waitFor } from "@testing-library/react";
3
3
  import { render } from "@truedat/test/render";
4
4
  import userEvent from "@testing-library/user-event";
5
- import { multipleTemplatesMock } from "@truedat/test/mocks";
5
+ import { domainsMock, multipleTemplatesMock } from "@truedat/test/mocks";
6
6
  import RuleForm from "../RuleForm";
7
7
  import { globalState } from "./__fixtures__/RuleForm";
8
8
 
@@ -19,7 +19,10 @@ const state = {
19
19
  };
20
20
 
21
21
  const renderOpts = {
22
- mocks: [multipleTemplatesMock({ scope: "dq", domainIds: [1] })],
22
+ mocks: [
23
+ domainsMock({ action: "manageQualityRule" }),
24
+ multipleTemplatesMock({ scope: "dq", domainIds: [1] }),
25
+ ],
23
26
  state,
24
27
  fallback: "lazy",
25
28
  };
@@ -53,11 +56,14 @@ describe("<RuleForm />", () => {
53
56
 
54
57
  it("enables save button after name and domain are specified", async () => {
55
58
  const props = { onSubmit: jest.fn() };
56
- const { getByRole } = render(<RuleForm {...props} />, renderOpts);
59
+ const { getByRole, findByText } = render(
60
+ <RuleForm {...props} />,
61
+ renderOpts
62
+ );
57
63
  await waitFor(() =>
58
64
  expect(getByRole("button", { name: /save/i })).toBeDisabled()
59
65
  );
60
- userEvent.click(getByRole("option", { name: "domain1" }));
66
+ userEvent.click(await findByText("barDomain"));
61
67
  userEvent.type(getByRole("textbox", { name: /rule name/i }), "rule1");
62
68
  await waitFor(() => {
63
69
  expect(getByRole("button", { name: /save/i })).not.toBeDisabled();
@@ -68,16 +74,22 @@ describe("<RuleForm />", () => {
68
74
  const onSubmit = jest.fn();
69
75
 
70
76
  const renderOpts = {
71
- mocks: [multipleTemplatesMock({ scope: "dq", domainIds: [1] })],
77
+ mocks: [
78
+ domainsMock({ action: "manageQualityRule" }),
79
+ multipleTemplatesMock({ scope: "dq", domainIds: [1] }),
80
+ ],
72
81
  state: globalState,
73
82
  fallback: "lazy",
74
83
  };
75
84
 
76
- const { getByRole } = render(<RuleForm onSubmit={onSubmit} />, renderOpts);
85
+ const { getByRole, findByText } = render(
86
+ <RuleForm onSubmit={onSubmit} />,
87
+ renderOpts
88
+ );
77
89
  await waitFor(() =>
78
90
  expect(getByRole("button", { name: /save/i })).toBeDisabled()
79
91
  );
80
- userEvent.click(getByRole("option", { name: "ARQ" }));
92
+ userEvent.click(await findByText("barDomain"));
81
93
  const ruleNameTextbox = getByRole("textbox", { name: /rule name/i });
82
94
  userEvent.paste(ruleNameTextbox, "rule1");
83
95
  expect(ruleNameTextbox).toHaveValue("rule1");
@@ -95,7 +107,7 @@ describe("<RuleForm />", () => {
95
107
  description: {},
96
108
  df_content: {},
97
109
  df_name: undefined,
98
- domain_id: 1,
110
+ domain_id: 2,
99
111
  name: "rule1",
100
112
  },
101
113
  });
@@ -2,6 +2,7 @@ export const globalState = {
2
2
  ruleCreating: false,
3
3
  ruleUpdating: false,
4
4
  conceptRulesActions: {
5
+ create: "/api/rules/123/foo",
5
6
  domain_ids: [
6
7
  {
7
8
  external_id: "ARQUITECTURA",
@@ -20,7 +20,7 @@ exports[`<NewRule /> matches the latest snapshot (with concept) 1`] = `
20
20
  </div>
21
21
  </h2>
22
22
  <form
23
- class="ui form rule-form"
23
+ class="ui loading form rule-form"
24
24
  >
25
25
  <div
26
26
  class="field rule-form__field-right"
@@ -212,53 +212,12 @@ exports[`<NewRule /> matches the latest snapshot (with concept) 1`] = `
212
212
  <span>
213
213
  *
214
214
  </span>
215
- </label>
216
- <div
217
- class="field"
218
- >
219
215
  <div
220
- class="field"
216
+ class="ui left pointing label"
221
217
  >
222
- <div
223
- aria-expanded="false"
224
- class="ui fluid search selection dropdown"
225
- name="domain"
226
- role="combobox"
227
- >
228
- <input
229
- aria-autocomplete="list"
230
- autocomplete="off"
231
- class="search"
232
- tabindex="0"
233
- type="text"
234
- value=""
235
- />
236
- <div
237
- aria-atomic="true"
238
- aria-live="polite"
239
- class="divider text"
240
- role="alert"
241
- >
242
- Select a domain...
243
- </div>
244
- <i
245
- aria-hidden="true"
246
- class="dropdown icon clear"
247
- />
248
- <div
249
- aria-multiselectable="false"
250
- class="menu transition"
251
- role="listbox"
252
- >
253
- <div
254
- class="message"
255
- >
256
- No results found.
257
- </div>
258
- </div>
259
- </div>
218
+ Required field is empty
260
219
  </div>
261
- </div>
220
+ </label>
262
221
  </div>
263
222
  <div
264
223
  class="required field"
@@ -195,60 +195,90 @@ exports[`<RuleForm /> matches the latest snapshot (edit mode) 1`] = `
195
195
  <span>
196
196
  *
197
197
  </span>
198
+ <div
199
+ class="ui left pointing label"
200
+ >
201
+ Required field is empty
202
+ </div>
198
203
  </label>
199
204
  <div
200
- class="field"
205
+ class="required field"
201
206
  >
202
207
  <div
203
- class="field"
208
+ aria-expanded="false"
209
+ aria-multiselectable="false"
210
+ class="ui floating dropdown"
211
+ required=""
212
+ role="listbox"
213
+ tabindex="0"
204
214
  >
215
+ <label>
216
+ Select a domain...
217
+ </label>
218
+ <i
219
+ aria-hidden="true"
220
+ class="dropdown icon"
221
+ />
205
222
  <div
206
- aria-expanded="false"
207
- class="ui fluid search selection dropdown"
208
- name="domain"
209
- role="combobox"
223
+ class="menu transition"
210
224
  >
211
- <input
212
- aria-autocomplete="list"
213
- autocomplete="off"
214
- class="search"
215
- tabindex="0"
216
- type="text"
217
- value=""
218
- />
219
225
  <div
220
- aria-atomic="true"
221
- aria-live="polite"
222
- class="divider text"
223
- role="alert"
226
+ class="ui left icon input search"
224
227
  >
225
- domain1
228
+ <input
229
+ type="text"
230
+ />
231
+ <i
232
+ aria-hidden="true"
233
+ class="search icon"
234
+ />
226
235
  </div>
227
- <i
228
- aria-hidden="true"
229
- class="dropdown icon"
230
- />
231
236
  <div
232
- aria-multiselectable="false"
233
- class="menu transition"
234
- role="listbox"
237
+ class="scrolling menu transition"
235
238
  >
236
239
  <div
237
- aria-checked="true"
238
- aria-selected="true"
239
- class="active selected item"
240
+ aria-selected="false"
241
+ class="item"
242
+ role="option"
243
+ >
244
+ <div
245
+ style="margin-left: 0px;"
246
+ >
247
+ <i
248
+ aria-hidden="true"
249
+ class="plus icon"
250
+ />
251
+ barDomain
252
+ </div>
253
+ </div>
254
+ <div
255
+ aria-selected="false"
256
+ class="item"
257
+ role="option"
258
+ >
259
+ <div
260
+ style="margin-left: 0px;"
261
+ >
262
+ <i
263
+ aria-hidden="true"
264
+ class="icon"
265
+ />
266
+ bazDomain
267
+ </div>
268
+ </div>
269
+ <div
270
+ aria-selected="false"
271
+ class="item"
240
272
  role="option"
241
- style="pointer-events: all;"
242
273
  >
243
274
  <div
244
- class="text"
245
275
  style="margin-left: 0px;"
246
276
  >
247
277
  <i
248
278
  aria-hidden="true"
249
279
  class="icon"
250
280
  />
251
- domain1
281
+ fooDomain
252
282
  </div>
253
283
  </div>
254
284
  </div>
@@ -257,7 +287,7 @@ exports[`<RuleForm /> matches the latest snapshot (edit mode) 1`] = `
257
287
  </div>
258
288
  </div>
259
289
  <div
260
- class="ui segment"
290
+ class="ui disabled segment"
261
291
  >
262
292
  <div
263
293
  class="inline fields"
@@ -346,81 +376,6 @@ exports[`<RuleForm /> matches the latest snapshot (edit mode) 1`] = `
346
376
  </div>
347
377
  </div>
348
378
  </div>
349
- <div
350
- class="required field"
351
- >
352
- <label>
353
- Template
354
- <div
355
- class="ui left pointing label"
356
- >
357
- Empty required field
358
- </div>
359
- </label>
360
- <div
361
- class="field"
362
- >
363
- <div
364
- aria-busy="false"
365
- aria-expanded="false"
366
- class="ui search selection dropdown"
367
- name="template"
368
- role="combobox"
369
- >
370
- <input
371
- aria-autocomplete="list"
372
- autocomplete="off"
373
- class="search"
374
- tabindex="0"
375
- type="text"
376
- value=""
377
- />
378
- <div
379
- aria-atomic="true"
380
- aria-live="polite"
381
- class="divider default text"
382
- role="alert"
383
- >
384
- Select a template...
385
- </div>
386
- <i
387
- aria-hidden="true"
388
- class="dropdown icon"
389
- />
390
- <div
391
- class="menu transition"
392
- role="listbox"
393
- >
394
- <div
395
- aria-checked="false"
396
- aria-selected="true"
397
- class="selected item"
398
- role="option"
399
- style="pointer-events: all;"
400
- >
401
- <span
402
- class="text"
403
- >
404
- template1
405
- </span>
406
- </div>
407
- <div
408
- aria-checked="false"
409
- aria-selected="false"
410
- class="item"
411
- role="option"
412
- style="pointer-events: all;"
413
- >
414
- <span
415
- class="text"
416
- >
417
- template2
418
- </span>
419
- </div>
420
- </div>
421
- </div>
422
- </div>
423
- </div>
424
379
  <div
425
380
  class="actions"
426
381
  >
@@ -640,60 +595,90 @@ exports[`<RuleForm /> matches the latest snapshot 1`] = `
640
595
  <span>
641
596
  *
642
597
  </span>
598
+ <div
599
+ class="ui left pointing label"
600
+ >
601
+ Required field is empty
602
+ </div>
643
603
  </label>
644
604
  <div
645
- class="field"
605
+ class="required field"
646
606
  >
647
607
  <div
648
- class="field"
608
+ aria-expanded="false"
609
+ aria-multiselectable="false"
610
+ class="ui floating dropdown"
611
+ required=""
612
+ role="listbox"
613
+ tabindex="0"
649
614
  >
615
+ <label>
616
+ Select a domain...
617
+ </label>
618
+ <i
619
+ aria-hidden="true"
620
+ class="dropdown icon"
621
+ />
650
622
  <div
651
- aria-expanded="false"
652
- class="ui fluid search selection dropdown"
653
- name="domain"
654
- role="combobox"
623
+ class="menu transition"
655
624
  >
656
- <input
657
- aria-autocomplete="list"
658
- autocomplete="off"
659
- class="search"
660
- tabindex="0"
661
- type="text"
662
- value=""
663
- />
664
625
  <div
665
- aria-atomic="true"
666
- aria-live="polite"
667
- class="divider text"
668
- role="alert"
626
+ class="ui left icon input search"
669
627
  >
670
- domain1
628
+ <input
629
+ type="text"
630
+ />
631
+ <i
632
+ aria-hidden="true"
633
+ class="search icon"
634
+ />
671
635
  </div>
672
- <i
673
- aria-hidden="true"
674
- class="dropdown icon"
675
- />
676
636
  <div
677
- aria-multiselectable="false"
678
- class="menu transition"
679
- role="listbox"
637
+ class="scrolling menu transition"
680
638
  >
681
639
  <div
682
- aria-checked="true"
683
- aria-selected="true"
684
- class="active selected item"
640
+ aria-selected="false"
641
+ class="item"
642
+ role="option"
643
+ >
644
+ <div
645
+ style="margin-left: 0px;"
646
+ >
647
+ <i
648
+ aria-hidden="true"
649
+ class="plus icon"
650
+ />
651
+ barDomain
652
+ </div>
653
+ </div>
654
+ <div
655
+ aria-selected="false"
656
+ class="item"
657
+ role="option"
658
+ >
659
+ <div
660
+ style="margin-left: 0px;"
661
+ >
662
+ <i
663
+ aria-hidden="true"
664
+ class="icon"
665
+ />
666
+ bazDomain
667
+ </div>
668
+ </div>
669
+ <div
670
+ aria-selected="false"
671
+ class="item"
685
672
  role="option"
686
- style="pointer-events: all;"
687
673
  >
688
674
  <div
689
- class="text"
690
675
  style="margin-left: 0px;"
691
676
  >
692
677
  <i
693
678
  aria-hidden="true"
694
679
  class="icon"
695
680
  />
696
- domain1
681
+ fooDomain
697
682
  </div>
698
683
  </div>
699
684
  </div>
@@ -702,7 +687,7 @@ exports[`<RuleForm /> matches the latest snapshot 1`] = `
702
687
  </div>
703
688
  </div>
704
689
  <div
705
- class="ui segment"
690
+ class="ui disabled segment"
706
691
  >
707
692
  <div
708
693
  class="inline fields"
@@ -791,81 +776,6 @@ exports[`<RuleForm /> matches the latest snapshot 1`] = `
791
776
  </div>
792
777
  </div>
793
778
  </div>
794
- <div
795
- class="required field"
796
- >
797
- <label>
798
- Template
799
- <div
800
- class="ui left pointing label"
801
- >
802
- Empty required field
803
- </div>
804
- </label>
805
- <div
806
- class="field"
807
- >
808
- <div
809
- aria-busy="false"
810
- aria-expanded="false"
811
- class="ui search selection dropdown"
812
- name="template"
813
- role="combobox"
814
- >
815
- <input
816
- aria-autocomplete="list"
817
- autocomplete="off"
818
- class="search"
819
- tabindex="0"
820
- type="text"
821
- value=""
822
- />
823
- <div
824
- aria-atomic="true"
825
- aria-live="polite"
826
- class="divider default text"
827
- role="alert"
828
- >
829
- Select a template...
830
- </div>
831
- <i
832
- aria-hidden="true"
833
- class="dropdown icon"
834
- />
835
- <div
836
- class="menu transition"
837
- role="listbox"
838
- >
839
- <div
840
- aria-checked="false"
841
- aria-selected="true"
842
- class="selected item"
843
- role="option"
844
- style="pointer-events: all;"
845
- >
846
- <span
847
- class="text"
848
- >
849
- template1
850
- </span>
851
- </div>
852
- <div
853
- aria-checked="false"
854
- aria-selected="false"
855
- class="item"
856
- role="option"
857
- style="pointer-events: all;"
858
- >
859
- <span
860
- class="text"
861
- >
862
- template2
863
- </span>
864
- </div>
865
- </div>
866
- </div>
867
- </div>
868
- </div>
869
779
  <div
870
780
  class="actions"
871
781
  >
@@ -24,6 +24,9 @@ exports[`<RuleRow /> matches the latest snapshot 1`] = `
24
24
  >
25
25
 
26
26
  </td>
27
+ <td
28
+ class=""
29
+ />
27
30
  </tr>
28
31
  </tbody>
29
32
  </table>
@@ -54,6 +57,9 @@ exports[`<RuleRow /> row prints column fields 1`] = `
54
57
  >
55
58
 
56
59
  </td>
60
+ <td
61
+ class=""
62
+ />
57
63
  <td
58
64
  class=""
59
65
  >
@@ -57,6 +57,19 @@ exports[`<Rules /> matches the latest snapshot 1`] = `
57
57
  sorted={null}
58
58
  width={3}
59
59
  />
60
+ <TableHeaderCell
61
+ as="th"
62
+ className=""
63
+ content={
64
+ <Memo(MemoizedFormattedMessage)
65
+ id="quality.updated_at"
66
+ />
67
+ }
68
+ key="3"
69
+ onClick={[Function]}
70
+ sorted={null}
71
+ width={3}
72
+ />
60
73
  </TableRow>
61
74
  </TableHeader>
62
75
  <TableBody
@@ -90,6 +103,13 @@ exports[`<Rules /> matches the latest snapshot 1`] = `
90
103
  },
91
104
  "width": 3,
92
105
  },
106
+ Object {
107
+ "name": "updated_at",
108
+ "sort": Object {
109
+ "name": "updated_at",
110
+ },
111
+ "width": 3,
112
+ },
93
113
  ]
94
114
  }
95
115
  key="0"
@@ -132,6 +152,13 @@ exports[`<Rules /> matches the latest snapshot 1`] = `
132
152
  },
133
153
  "width": 3,
134
154
  },
155
+ Object {
156
+ "name": "updated_at",
157
+ "sort": Object {
158
+ "name": "updated_at",
159
+ },
160
+ "width": 3,
161
+ },
135
162
  ]
136
163
  }
137
164
  key="1"
@@ -7,6 +7,7 @@ import InformationForm from "../InformationForm";
7
7
  const domains = [
8
8
  {
9
9
  id: "123",
10
+ externalId: "123",
10
11
  name: "foo",
11
12
  parentId: "",
12
13
  actions: ["publishImplementation", "manageSegments"],
@@ -8,6 +8,7 @@ import RuleImplementationForm from "../RuleImplementationForm";
8
8
  const domains = [
9
9
  {
10
10
  id: "123",
11
+ externalId: "123",
11
12
  name: "foo",
12
13
  parentId: "",
13
14
  actions: ["publishImplementation", "manageSegments"],
@@ -18,6 +18,7 @@ export const conceptRulesActions = (
18
18
  const actions = _.propOr({}, "_actions")(payload);
19
19
  return {
20
20
  ...actions,
21
+ // TODO: Why??
21
22
  domain_ids: _.flow(
22
23
  _.pathOr([], "domain_ids"),
23
24
  _.map((domain) => {
@@ -17,6 +17,7 @@ const pickFields = _.pick([
17
17
  "minimum",
18
18
  "name",
19
19
  "result_type",
20
+ "updated_at",
20
21
  ]);
21
22
 
22
23
  const rules = (state = initialState, { type, payload }) => {
@@ -48,6 +48,11 @@ export const defaultRuleColumns = () => [
48
48
  sort: { name: "current_business_concept_version.name.raw" },
49
49
  width: 3,
50
50
  },
51
+ {
52
+ name: "updated_at",
53
+ width: 3,
54
+ sort: { name: "updated_at" },
55
+ },
51
56
  ];
52
57
 
53
58
  export const optionalRuleColumns = [