@truedat/dq 8.12.2 → 8.12.4

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/dq",
3
- "version": "8.12.2",
3
+ "version": "8.12.4",
4
4
  "description": "Truedat Web Data Quality Module",
5
5
  "sideEffects": false,
6
6
  "module": "src/index.js",
@@ -59,7 +59,7 @@
59
59
  "@testing-library/jest-dom": "^6.6.3",
60
60
  "@testing-library/react": "^16.3.0",
61
61
  "@testing-library/user-event": "^14.6.1",
62
- "@truedat/test": "8.12.2",
62
+ "@truedat/test": "8.12.4",
63
63
  "identity-obj-proxy": "^3.0.0",
64
64
  "jest": "^29.7.0",
65
65
  "redux-saga-test-plan": "^4.0.6"
@@ -92,5 +92,5 @@
92
92
  "semantic-ui-react": "^3.0.0-beta.2",
93
93
  "swr": "^2.3.3"
94
94
  },
95
- "gitHead": "b0000f1b2727cad43ce3c3eb2fa29681488dd2ec"
95
+ "gitHead": "d5bc1af84c4d828bdec676b0da58385cf0d6015f"
96
96
  }
@@ -1,7 +1,9 @@
1
1
  import { render, waitForLoad } from "@truedat/test/render";
2
- import { domainsMock } from "@truedat/test/mocks";
2
+ import { domainsMock, multipleTemplatesMock } from "@truedat/test/mocks";
3
3
  import { EditRule } from "../EditRule";
4
4
 
5
+ jest.mock("@truedat/core/hooks/useUserFilters");
6
+
5
7
  jest.mock("@truedat/bg/concepts/hooks/useConcepts", () => {
6
8
  const originalModule = jest.requireActual(
7
9
  "@truedat/bg/concepts/hooks/useConcepts",
@@ -40,7 +42,10 @@ describe("<EditRule />", () => {
40
42
  const props = { rule, updateRule };
41
43
 
42
44
  const renderOpts = {
43
- mocks: [domainsMock({ action: "manageQualityRule" })],
45
+ mocks: [
46
+ domainsMock({ action: "manageQualityRule" }),
47
+ multipleTemplatesMock({ scope: "dq", domainIds: null }),
48
+ ],
44
49
  };
45
50
 
46
51
  it("matches the latest snapshot", async () => {
@@ -1,6 +1,8 @@
1
1
  import { render, waitForLoad } from "@truedat/test/render";
2
2
  import { ImplementationStructuresNew } from "../ImplementationStructuresNew";
3
3
 
4
+ jest.mock("@truedat/core/hooks/useUserFilters");
5
+
4
6
  jest.mock("@truedat/core/routes", () => ({
5
7
  linkTo: {
6
8
  IMPLEMENTATION_STRUCTURES: jest.fn(
@@ -31,6 +31,8 @@ const renderOpts = {
31
31
  };
32
32
 
33
33
  describe("<MoveImplementation />", () => {
34
+ beforeEach(() => jest.useRealTimers());
35
+
34
36
  it("matches snapshot with two options", async () => {
35
37
  const props = {
36
38
  implementation: { id: 123, rule_id: "1" },
@@ -48,6 +50,7 @@ describe("<MoveImplementation />", () => {
48
50
  });
49
51
 
50
52
  it("calls foo with onSubmit", async () => {
53
+ const user = userEvent.setup();
51
54
  const props = {
52
55
  implementation: { id: 123, rule_id: "1" },
53
56
  saving: false,
@@ -64,7 +67,7 @@ describe("<MoveImplementation />", () => {
64
67
  expect(getByRole("button", { name: "save" })).toBeDisabled(),
65
68
  );
66
69
 
67
- userEvent.click(await findByRole("option", { name: "bar" }));
70
+ await user.click(await findByRole("option", { name: "bar" }));
68
71
 
69
72
  // Submit button should now be enabled
70
73
  await waitFor(() =>
@@ -72,7 +75,7 @@ describe("<MoveImplementation />", () => {
72
75
  );
73
76
 
74
77
  // Submit
75
- userEvent.click(await findByRole("button", { name: "save" }));
78
+ await user.click(await findByRole("button", { name: "save" }));
76
79
 
77
80
  await waitFor(() =>
78
81
  expect(props.updateRuleImplementation).toHaveBeenCalledWith({
@@ -60,6 +60,8 @@ const domainMock = {
60
60
  };
61
61
 
62
62
  describe("<NewBasicRuleImplementation />", () => {
63
+ beforeEach(() => jest.useRealTimers());
64
+
63
65
  const createRuleImplementation = jest.fn();
64
66
  const updateRuleImplementation = jest.fn();
65
67
 
@@ -90,6 +92,8 @@ describe("<NewBasicRuleImplementation />", () => {
90
92
  });
91
93
 
92
94
  describe("<NewBasicRuleImplementation> NewBasicRuleImplementation doSubmit", () => {
95
+ beforeEach(() => jest.useRealTimers());
96
+
93
97
  const dispatch = jest.fn();
94
98
 
95
99
  const renderOpts = {
@@ -1,6 +1,8 @@
1
1
  import { render } from "@truedat/test/render";
2
2
  import { RawContent } from "../RawContent";
3
3
 
4
+ jest.mock("@truedat/bg/hooks/useDomains");
5
+
4
6
  describe("<RawContent />", () => {
5
7
  const content = {
6
8
  source: { external_id: "external_id_source" },
@@ -34,9 +34,11 @@ const renderOpts = {
34
34
  };
35
35
 
36
36
  describe("<RemediationPlan />", () => {
37
+ beforeEach(() => jest.useRealTimers());
38
+
37
39
  it("matches the latest snapshot", async () => {
38
40
  const rendered = render(<RemediationPlan />, renderOpts);
39
- await waitForLoad(rendered);
41
+ await waitForLoad(rendered, /loading/i, { timeout: 5000 });
40
42
  expect(rendered.container).toMatchSnapshot();
41
43
  });
42
44
 
@@ -62,10 +64,11 @@ describe("<RemediationPlan />", () => {
62
64
  });
63
65
 
64
66
  it("Remediation form is shown if edit button is clicked", async () => {
67
+ const user = userEvent.setup();
65
68
  const rendered = render(<RemediationPlan />, renderOpts);
66
69
  await waitForLoad(rendered);
67
70
 
68
- userEvent.click(rendered.getByText(/edit/i));
71
+ await user.click(rendered.getByText(/edit/i));
69
72
 
70
73
  await waitFor(() => {
71
74
  expect(
@@ -4,6 +4,9 @@ import { domainsMock, multipleTemplatesMock } from "@truedat/test/mocks";
4
4
  import RuleForm from "../RuleForm";
5
5
  import { globalState } from "./__fixtures__/RuleForm";
6
6
 
7
+ jest.mock("@truedat/core/hooks/useUserFilters");
8
+ jest.mock("@truedat/bg/hooks/useDomains");
9
+
7
10
  const data = {
8
11
  data: [
9
12
  {
@@ -113,7 +116,9 @@ describe("<RuleForm />", () => {
113
116
  const renderOpts = {
114
117
  mocks: [
115
118
  domainsMock({ action: "manageQualityRule" }),
119
+ multipleTemplatesMock({ scope: "dq", domainIds: null }),
116
120
  multipleTemplatesMock({ scope: "dq", domainIds: [1] }),
121
+ multipleTemplatesMock({ scope: "dq", domainIds: [2] }),
117
122
  ],
118
123
  state: globalState,
119
124
  };
@@ -1,6 +1,8 @@
1
1
  import { render, waitForLoad } from "@truedat/test/render";
2
2
  import { RuleImplementationProperties } from "../RuleImplementationProperties";
3
3
 
4
+ jest.mock("@truedat/bg/hooks/useDomains");
5
+
4
6
  describe("<RuleImplementationProperties />", () => {
5
7
  const props = {
6
8
  rule: {
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
+ import { Route, Routes } from "react-router";
2
3
  import { render, waitForLoad } from "@truedat/test/render";
3
- import { useAuthorized } from "@truedat/core/hooks/useAuthorized";
4
4
  import {
5
5
  IMPLEMENTATION_RESULT_DETAILS,
6
6
  IMPLEMENTATION_RESULT_SEGMENTS_RESULTS,
@@ -9,10 +9,6 @@ import {
9
9
  import { RuleResultsRoutes } from "../RuleResultsRoutes";
10
10
  import { IMPLEMENTATION_RESULT_QUERY } from "../../api/queries";
11
11
 
12
- jest.mock("@truedat/core/hooks/useAuthorized", () => ({
13
- useAuthorized: jest.fn(() => true),
14
- }));
15
-
16
12
  // Mock child components
17
13
  jest.mock("../RuleResult", () => ({ children }) => (
18
14
  <div>RuleResult{children}</div>
@@ -57,52 +53,41 @@ describe("<RuleResultsRoutes />", () => {
57
53
  },
58
54
  ];
59
55
 
60
- const renderOpts = { mocks };
56
+ const renderRoute = (path) =>
57
+ render(
58
+ <Routes>
59
+ <Route
60
+ path="/implementations/:implementation_id/results/:rule_result_id/*"
61
+ element={<RuleResultsRoutes />}
62
+ />
63
+ </Routes>,
64
+ { routes: [path.replace(":implementation_id", "456")], mocks },
65
+ );
61
66
 
62
67
  it("renders correctly with default route", async () => {
63
- const rendered = render(<RuleResultsRoutes />, {
64
- routes: [IMPLEMENTATION_RESULT_DETAILS.replace(":rule_result_id", "123")],
65
- renderOpts,
66
- });
68
+ const rendered = renderRoute(
69
+ IMPLEMENTATION_RESULT_DETAILS.replace(":rule_result_id", "123"),
70
+ );
67
71
  await waitForLoad(rendered);
72
+ expect(rendered.getByText("RuleResultDetails")).toBeInTheDocument();
68
73
  expect(rendered.container).toMatchSnapshot();
69
74
  });
70
75
 
71
76
  it("renders correctly with segments results route", async () => {
72
- const rendered = render(<RuleResultsRoutes />, {
73
- routes: [
74
- IMPLEMENTATION_RESULT_SEGMENTS_RESULTS.replace(
75
- ":rule_result_id",
76
- "123",
77
- ),
78
- ],
79
- renderOpts,
80
- });
77
+ const rendered = renderRoute(
78
+ IMPLEMENTATION_RESULT_SEGMENTS_RESULTS.replace(":rule_result_id", "123"),
79
+ );
81
80
  await waitForLoad(rendered);
81
+ expect(rendered.getByText("RuleResultSegments")).toBeInTheDocument();
82
82
  expect(rendered.container).toMatchSnapshot();
83
83
  });
84
84
 
85
85
  it("renders correctly with remediation plan route", async () => {
86
- const rendered = render(<RuleResultsRoutes />, {
87
- routes: [
88
- IMPLEMENTATION_RESULT_REMEDIATION_PLAN.replace(
89
- ":rule_result_id",
90
- "123",
91
- ),
92
- ],
93
- renderOpts,
94
- });
95
- await waitForLoad(rendered);
96
- expect(rendered.container).toMatchSnapshot();
97
- });
98
-
99
- it("renders unauthorized component when not authorized", async () => {
100
- useAuthorized.mockReturnValueOnce(false);
101
- const rendered = render(<RuleResultsRoutes />, {
102
- routes: [IMPLEMENTATION_RESULT_DETAILS.replace(":rule_result_id", "123")],
103
- renderOpts,
104
- });
86
+ const rendered = renderRoute(
87
+ IMPLEMENTATION_RESULT_REMEDIATION_PLAN.replace(":rule_result_id", "123"),
88
+ );
105
89
  await waitForLoad(rendered);
90
+ expect(rendered.getByText("RuleResultRemediations")).toBeInTheDocument();
106
91
  expect(rendered.container).toMatchSnapshot();
107
92
  });
108
93
  });
@@ -1,6 +1,15 @@
1
1
  import { render, waitForLoad } from "@truedat/test/render";
2
2
  import { RuleResultSegmentRow } from "../RuleResultSegmentRow";
3
3
 
4
+ const renderRow = (props) =>
5
+ render(
6
+ <table>
7
+ <tbody>
8
+ <RuleResultSegmentRow {...props} />
9
+ </tbody>
10
+ </table>,
11
+ );
12
+
4
13
  describe("<RuleResultSegmentRow />", () => {
5
14
  it("renders customColumns values when passed", async () => {
6
15
  const props = {
@@ -29,7 +38,7 @@ describe("<RuleResultSegmentRow />", () => {
29
38
  },
30
39
  };
31
40
 
32
- const rendered = render(<RuleResultSegmentRow {...props} />);
41
+ const rendered = renderRow(props);
33
42
  await waitForLoad(rendered);
34
43
 
35
44
  expect(rendered.getByText(/1/i)).toBeInTheDocument();
@@ -53,7 +62,7 @@ describe("<RuleResultSegmentRow />", () => {
53
62
  },
54
63
  };
55
64
 
56
- const rendered = render(<RuleResultSegmentRow {...props} />);
65
+ const rendered = renderRow(props);
57
66
  await waitForLoad(rendered);
58
67
 
59
68
  const icon = rendered.container.querySelector("i.green.icon");
@@ -73,7 +82,7 @@ describe("<RuleResultSegmentRow />", () => {
73
82
  },
74
83
  };
75
84
 
76
- const rendered = render(<RuleResultSegmentRow {...props} />);
85
+ const rendered = renderRow(props);
77
86
  await waitForLoad(rendered);
78
87
 
79
88
  const icon = rendered.container.querySelector("i.red.icon");
@@ -93,7 +102,7 @@ describe("<RuleResultSegmentRow />", () => {
93
102
  date: "2019-08-12T02:00:00Z",
94
103
  };
95
104
 
96
- const rendered = render(<RuleResultSegmentRow {...props} />);
105
+ const rendered = renderRow(props);
97
106
  await waitForLoad(rendered);
98
107
 
99
108
  const icon = rendered.container.querySelector("i.yellow.icon");
@@ -115,7 +124,7 @@ describe("<RuleResultSegmentRow />", () => {
115
124
  deleteRuleResult: jest.fn(),
116
125
  };
117
126
 
118
- const rendered = render(<RuleResultSegmentRow {...props} />);
127
+ const rendered = renderRow(props);
119
128
  await waitForLoad(rendered);
120
129
 
121
130
  const deleteButton = rendered.container.querySelector(".trash");
@@ -137,7 +146,7 @@ describe("<RuleResultSegmentRow />", () => {
137
146
  deleteRuleResult: jest.fn(),
138
147
  };
139
148
 
140
- const rendered = render(<RuleResultSegmentRow {...props} />);
149
+ const rendered = renderRow(props);
141
150
  await waitForLoad(rendered);
142
151
 
143
152
  const deleteButton = rendered.container.querySelector("button");
@@ -3,6 +3,8 @@ import { render } from "@truedat/test/render";
3
3
  import { RuleRow } from "../RuleRow";
4
4
  import { defaultRuleColumns } from "../../selectors";
5
5
 
6
+ jest.mock("@truedat/bg/hooks/useDomains");
7
+
6
8
  const renderOpts = {
7
9
  messages: {
8
10
  en: {
@@ -30,6 +30,8 @@ const renderOpts = {
30
30
  };
31
31
 
32
32
  describe("<RuleSelectionForm />", () => {
33
+ beforeEach(() => jest.useRealTimers());
34
+
33
35
  it("matches snapshot with two options", async () => {
34
36
  const { container, findByRole } = render(
35
37
  <RuleSelectionForm value="1" />,
@@ -41,6 +43,7 @@ describe("<RuleSelectionForm />", () => {
41
43
  });
42
44
 
43
45
  it("calls foo with onSubmit", async () => {
46
+ const user = userEvent.setup();
44
47
  const onSubmit = jest.fn();
45
48
 
46
49
  // Submit button should initially be disabled
@@ -53,7 +56,7 @@ describe("<RuleSelectionForm />", () => {
53
56
  expect(getByRole("button", { name: "save" })).toBeDisabled(),
54
57
  );
55
58
 
56
- userEvent.click(await findByRole("option", { name: "bar" }));
59
+ await user.click(await findByRole("option", { name: "bar" }));
57
60
 
58
61
  // Submit button should now be enabled
59
62
  await waitFor(() =>
@@ -61,7 +64,7 @@ describe("<RuleSelectionForm />", () => {
61
64
  );
62
65
 
63
66
  // Submit
64
- userEvent.click(await findByRole("button", { name: "save" }));
67
+ await user.click(await findByRole("button", { name: "save" }));
65
68
 
66
69
  await waitFor(() =>
67
70
  expect(onSubmit).toHaveBeenCalledWith({ rule_id: "2" }),
@@ -1,7 +1,10 @@
1
+ import { fireEvent } from "@testing-library/react";
1
2
  import { render, waitForLoad } from "@truedat/test/render";
2
3
  import { Rules } from "../Rules";
3
4
  import { ruleColumnsSelector } from "../../selectors";
4
5
 
6
+ jest.mock("@truedat/bg/hooks/useDomains");
7
+
5
8
  jest.mock("../RuleSelectedFilters", () => ({
6
9
  __esModule: true,
7
10
  default: () => (
@@ -92,7 +95,7 @@ describe("<Rules />", () => {
92
95
  await waitForLoad(rendered);
93
96
 
94
97
  const headerCells = rendered.container.querySelectorAll("th");
95
- headerCells[0].click();
98
+ fireEvent.click(headerCells[0]);
96
99
  expect(sortRules).toHaveBeenCalled();
97
100
  });
98
101
  });
@@ -2,6 +2,8 @@ import { render } from "@truedat/test/render";
2
2
  import messages from "@truedat/dq/messages";
3
3
  import TaxonomySummary from "../TaxonomySummary";
4
4
 
5
+ jest.mock("@truedat/bg/hooks/useDomains");
6
+
5
7
  describe("<TaxonomySummary />", () => {
6
8
  const ruleImplementation = {
7
9
  data_structures: [
@@ -375,6 +375,81 @@ exports[`<EditRule /> matches the latest snapshot 1`] = `
375
375
  </div>
376
376
  </div>
377
377
  </div>
378
+ <div
379
+ class="required field"
380
+ >
381
+ <label>
382
+ template.selector.label
383
+ <div
384
+ class="ui left pointing label"
385
+ >
386
+ template.form.validation.empty_required
387
+ </div>
388
+ </label>
389
+ <div
390
+ class="field"
391
+ >
392
+ <div
393
+ aria-busy="false"
394
+ aria-expanded="false"
395
+ class="ui search selection dropdown"
396
+ name="template"
397
+ role="combobox"
398
+ >
399
+ <input
400
+ aria-autocomplete="list"
401
+ autocomplete="off"
402
+ class="search"
403
+ tabindex="0"
404
+ type="text"
405
+ value=""
406
+ />
407
+ <div
408
+ aria-atomic="true"
409
+ aria-live="polite"
410
+ class="divider default text"
411
+ role="alert"
412
+ >
413
+ template.selector.placeholder
414
+ </div>
415
+ <i
416
+ aria-hidden="true"
417
+ class="dropdown icon"
418
+ />
419
+ <div
420
+ class="menu transition"
421
+ role="listbox"
422
+ >
423
+ <div
424
+ aria-checked="false"
425
+ aria-selected="true"
426
+ class="selected item"
427
+ role="option"
428
+ style="pointer-events: all;"
429
+ >
430
+ <span
431
+ class="text"
432
+ >
433
+ template1
434
+ </span>
435
+ </div>
436
+ <div
437
+ aria-checked="false"
438
+ aria-selected="false"
439
+ class="item"
440
+ role="option"
441
+ style="pointer-events: all;"
442
+ >
443
+ <span
444
+ class="text"
445
+ >
446
+ template2
447
+ </span>
448
+ </div>
449
+ </div>
450
+ </div>
451
+ </div>
452
+ </div>
378
453
  <div
379
454
  class="actions"
380
455
  >
@@ -1,9 +1,58 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<RuleResultsRoutes /> renders correctly with default route 1`] = `<div />`;
3
+ exports[`<RuleResultsRoutes /> renders correctly with default route 1`] = `
4
+ <div>
5
+ <div
6
+ class="ui segment"
7
+ >
8
+ <div>
9
+ ImplementationCrumbs
10
+ </div>
11
+ <div>
12
+ RuleResult
13
+ <div>
14
+ RuleResultDetails
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ `;
4
20
 
5
- exports[`<RuleResultsRoutes /> renders correctly with remediation plan route 1`] = `<div />`;
21
+ exports[`<RuleResultsRoutes /> renders correctly with remediation plan route 1`] = `
22
+ <div>
23
+ <div
24
+ class="ui segment"
25
+ >
26
+ <div>
27
+ ImplementationCrumbs
28
+ </div>
29
+ <div>
30
+ RuleResult
31
+ <div>
32
+ RuleResultRemediations
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ `;
6
38
 
7
- exports[`<RuleResultsRoutes /> renders correctly with segments results route 1`] = `<div />`;
8
-
9
- exports[`<RuleResultsRoutes /> renders unauthorized component when not authorized 1`] = `<div />`;
39
+ exports[`<RuleResultsRoutes /> renders correctly with segments results route 1`] = `
40
+ <div>
41
+ <div
42
+ class="ui segment"
43
+ >
44
+ <div>
45
+ ImplementationCrumbs
46
+ </div>
47
+ <div>
48
+ RuleResult
49
+ <div>
50
+ RuleResultSegmentsLoader
51
+ </div>
52
+ <div>
53
+ RuleResultSegments
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ `;
@@ -1,5 +1,4 @@
1
1
  import _ from "lodash/fp";
2
- import { createSelector } from "reselect";
3
2
  import DateTime from "@truedat/core/components/DateTime";
4
3
  import RuleEventDecorator from "../components/RuleEventDecorator";
5
4
  import RuleImplementationResultsLink from "../components/RuleImplementationResultsLink";
@@ -42,9 +41,5 @@ export const defaultExecutionGroupColumns = [
42
41
  },
43
42
  ];
44
43
 
45
- const getColumns = (state) => state.executionGroupColumns;
46
-
47
- export const getExecutionGroupColumns = createSelector(
48
- [getColumns],
49
- _.defaultTo(defaultExecutionGroupColumns),
50
- );
44
+ export const getExecutionGroupColumns = (state) =>
45
+ state.executionGroupColumns ?? defaultExecutionGroupColumns;
@@ -2,8 +2,8 @@ import _ from "lodash/fp";
2
2
  import { createSelector } from "reselect";
3
3
 
4
4
  const getRuleImplementation = (state) => state.ruleImplementation;
5
- const getStructureFields = (state) => _.keys(state.structuresFields);
6
- const getStructureSiblings = (state) => _.keys(state.structuresSiblings);
5
+ const getStructureFields = (state) => state.structuresFields;
6
+ const getStructureSiblings = (state) => state.structuresSiblings;
7
7
 
8
8
  export const getDatasetStructures = createSelector(
9
9
  [getRuleImplementation],
@@ -39,7 +39,10 @@ export const getValidationStructures = createSelector(
39
39
  export const getStructures = createSelector(
40
40
  [getStructureSiblings, getStructureFields],
41
41
  (structuresSiblings, structuresFields) =>
42
- _.flow(_.concat(structuresSiblings), _.uniq)(structuresFields),
42
+ _.flow(
43
+ _.concat(_.keys(structuresSiblings)),
44
+ _.uniq,
45
+ )(_.keys(structuresFields)),
43
46
  );
44
47
  export const getImplementationStructures = createSelector(
45
48
  [getDatasetStructures, getValidationStructures],
@@ -1,5 +1,4 @@
1
1
  import _ from "lodash/fp";
2
- import { createSelector } from "reselect";
3
2
  import { FormattedMessage } from "react-intl";
4
3
  import DateTime from "@truedat/core/components/DateTime";
5
4
  import { formatNumber } from "@truedat/core/services/format";
@@ -91,9 +90,5 @@ export const defaultImplementationToRulesColumns = [
91
90
  },
92
91
  ];
93
92
 
94
- const getColumns = (state) => state.ruleImplementationToRulesColumns;
95
-
96
- export const getLinkedImplementationsToRulesColumns = createSelector(
97
- [getColumns],
98
- (columns) => _.defaultTo(defaultImplementationToRulesColumns)(columns),
99
- );
93
+ export const getLinkedImplementationsToRulesColumns = (state) =>
94
+ state.ruleImplementationToRulesColumns ?? defaultImplementationToRulesColumns;
@@ -1,5 +1,4 @@
1
1
  import _ from "lodash/fp";
2
- import { createSelector } from "reselect";
3
2
  import { FormattedMessage } from "react-intl";
4
3
  import DateTime from "@truedat/core/components/DateTime";
5
4
  import { formatNumber } from "@truedat/core/services/format";
@@ -105,9 +104,5 @@ export const defaultImplementationColumns = [
105
104
  },
106
105
  ];
107
106
 
108
- const getColumns = (state) => state.ruleImplementationColumns;
109
-
110
- export const getRuleImplementationColumns = createSelector(
111
- [getColumns],
112
- _.defaultTo(defaultImplementationColumns),
113
- );
107
+ export const getRuleImplementationColumns = (state) =>
108
+ state.ruleImplementationColumns ?? defaultImplementationColumns;
@@ -1,7 +1,6 @@
1
1
  import _ from "lodash/fp";
2
2
  import { Label } from "semantic-ui-react";
3
3
  import { FormattedMessage } from "react-intl";
4
- import { createSelector } from "reselect";
5
4
  import { DomainTooltip } from "@truedat/bg/taxonomy/components/DomainPath";
6
5
  import RuleLink from "../components/RuleLink";
7
6
 
@@ -83,8 +82,7 @@ export const optionalRuleColumns = [
83
82
  },
84
83
  ];
85
84
 
86
- export const ruleColumnsSelector = createSelector(
87
- _.prop("rulesColumns"),
88
- defaultRuleColumns,
89
- (rulesColumns, defaults) => _.defaultTo(defaults)(rulesColumns),
90
- );
85
+ const defaultColumns = defaultRuleColumns();
86
+
87
+ export const ruleColumnsSelector = (state) =>
88
+ state.rulesColumns ?? defaultColumns;