@truedat/bg 7.1.5 → 7.1.7

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/bg",
3
- "version": "7.1.5",
3
+ "version": "7.1.7",
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": "7.1.5",
37
+ "@truedat/test": "7.1.7",
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,9 +86,9 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "7.1.5",
90
- "@truedat/df": "7.1.5",
91
- "@truedat/lm": "7.1.5",
89
+ "@truedat/core": "7.1.7",
90
+ "@truedat/df": "7.1.7",
91
+ "@truedat/lm": "7.1.7",
92
92
  "decode-uri-component": "^0.2.2",
93
93
  "file-saver": "^2.0.5",
94
94
  "moment": "^2.29.4",
@@ -111,5 +111,5 @@
111
111
  "react-dom": ">= 16.8.6 < 17",
112
112
  "semantic-ui-react": ">= 2.0.3 < 2.2"
113
113
  },
114
- "gitHead": "70b7033a85426aac68147bffa65c44ad754441bc"
114
+ "gitHead": "080df9a1d6c8a4464e10b974875b6d00db751616"
115
115
  }
@@ -0,0 +1,33 @@
1
+ import _ from "lodash/fp";
2
+ import React from "react";
3
+ import PropTypes from "prop-types";
4
+ import { Link } from "react-router-dom";
5
+ import { linkTo } from "@truedat/core/routes";
6
+ import ArrayDecorator from "@truedat/core/components/ArrayDecorator";
7
+
8
+ export const ConceptsLinkDecorator = (concepts) => {
9
+ if (_.isEmpty(concepts)) return null;
10
+
11
+ const [{ id, name }, ...remainingConcepts] = concepts;
12
+ const remainingNames = remainingConcepts.map(({ name }) => name);
13
+
14
+ return (
15
+ <>
16
+ <Link
17
+ to={linkTo.CONCEPT_VERSION({
18
+ business_concept_id: id,
19
+ id: "current",
20
+ })}
21
+ >
22
+ {name}
23
+ </Link>
24
+ {ArrayDecorator(0, ", ")(remainingNames)}
25
+ </>
26
+ );
27
+ };
28
+
29
+ ConceptsLinkDecorator.propTypes = {
30
+ concepts: PropTypes.array,
31
+ };
32
+
33
+ export default ConceptsLinkDecorator;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { render } from "@truedat/test/render";
3
+ import { ConceptsLinkDecorator } from "../ConceptsLinkDecorator";
4
+
5
+ describe("<ConceptsLinkDecorator />", () => {
6
+ const concepts = [
7
+ { id: 1, name: "concept1" },
8
+ { id: 2, name: "concept2" },
9
+ { id: 3, name: "concept3" },
10
+ ];
11
+ it("matches the latest snapshot", () => {
12
+ const { container } = render(<>{ConceptsLinkDecorator(concepts)}</>);
13
+ expect(container).toMatchSnapshot();
14
+ });
15
+ });
@@ -0,0 +1,20 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<ConceptsLinkDecorator /> matches the latest snapshot 1`] = `
4
+ <div>
5
+ <a
6
+ href="/concepts/1/versions/current"
7
+ >
8
+ concept1
9
+ </a>
10
+ <div>
11
+
12
+ <div
13
+ class="ui label"
14
+ >
15
+ +
16
+ 2
17
+ </div>
18
+ </div>
19
+ </div>
20
+ `;
@@ -1,5 +1,5 @@
1
- import ConceptRoutes from "./ConceptRoutes";
1
+ export { default as ConceptRoutes } from "./ConceptRoutes";
2
2
 
3
- export { ConceptRoutes };
3
+ export { ConceptsLinkDecorator } from "./ConceptsLinkDecorator";
4
4
 
5
5
  export * from "../relations/components";
@@ -11,8 +11,10 @@ import {
11
11
  IMPLEMENTATION_NEW,
12
12
  IMPLEMENTATION_NEW_RAW,
13
13
  } from "@truedat/core/routes";
14
- import { getBusinessConceptsLinksToImplementationsColumns } from "@truedat/dq/selectors";
15
- import { getConceptImplementationLinks } from "../selectors";
14
+ import {
15
+ getConceptImplementationLinks,
16
+ getBusinessConceptsLinksToImplementationsColumns,
17
+ } from "../selectors";
16
18
 
17
19
  const RuleImplementationsTable = React.lazy(() =>
18
20
  import("@truedat/dq/components/RuleImplementationsTable")
@@ -3,6 +3,7 @@ import React, { Suspense } from "react";
3
3
  import { render } from "@truedat/test/render";
4
4
  import en from "../../../../messages/en";
5
5
  import { ConceptImplementationLinks } from "../ConceptImplementationLinks";
6
+ import { getBusinessConceptsLinksToImplementationsColumns } from "../../selectors";
6
7
 
7
8
  jest.mock("react-router-dom", () => ({
8
9
  ...jest.requireActual("react-router-dom"),
@@ -12,6 +13,8 @@ jest.mock("react-router-dom", () => ({
12
13
  }),
13
14
  }));
14
15
 
16
+ const columns = getBusinessConceptsLinksToImplementationsColumns({});
17
+
15
18
  const messages = {
16
19
  en: {
17
20
  ...en,
@@ -38,6 +41,7 @@ describe("<ConceptImplementationLinks />", () => {
38
41
  ["group", [{ implementation_key: "foo", id: "1" }]],
39
42
  ["deleted", []],
40
43
  ],
44
+ columns,
41
45
  };
42
46
  const renderOpts = { messages };
43
47
  const { container } = render(
@@ -56,6 +60,7 @@ describe("<ConceptImplementationLinks />", () => {
56
60
  ["group", [{ implementation_key: "foo", id: "1" }]],
57
61
  ["deleted", []],
58
62
  ],
63
+ columns,
59
64
  createRawImplementation: { method: "POST" },
60
65
  createLinkImplementation: { method: "POST" },
61
66
  createImplementation: { method: "POST" },
@@ -76,6 +81,7 @@ describe("<ConceptImplementationLinks />", () => {
76
81
  ["○", [{ implementation_key: "foo", id: "1" }]],
77
82
  ["deleted", [{ implementation_key: "bar", id: "2" }]],
78
83
  ],
84
+ columns,
79
85
  createRawImplementation: { method: "POST" },
80
86
  createLinkImplementation: { method: "POST" },
81
87
  createImplementation: { method: "POST" },
@@ -96,6 +102,7 @@ describe("<ConceptImplementationLinks />", () => {
96
102
  createRawImplementation: { method: "POST" },
97
103
  createLinkImplementation: { method: "POST" },
98
104
  createImplementation: { method: "POST" },
105
+ columns,
99
106
  };
100
107
  const { container } = render(
101
108
  <Suspense fallback={null}>
@@ -38,130 +38,106 @@ exports[`<ConceptImplementationLinks /> show create implementations buttons when
38
38
  >
39
39
  group
40
40
  </h3>
41
- <table
42
- class="ui sortable table"
41
+ <div
42
+ class="implementations-table-overflow"
43
43
  >
44
- <thead
45
- class=""
44
+ <table
45
+ class="ui sortable table"
46
46
  >
47
- <tr
47
+ <thead
48
48
  class=""
49
49
  >
50
- <th
51
- class="two wide"
52
- >
53
- Implementation
54
- </th>
55
- <th
56
- class="two wide"
57
- >
58
- Rule
59
- </th>
60
- <th
61
- class="two wide"
62
- >
63
- Status
64
- </th>
65
- <th
66
- class="two wide"
67
- >
68
- Concepts
69
- </th>
70
- <th
71
- class="two wide"
72
- >
73
- Last execution
74
- </th>
75
- <th
76
- class="two wide"
77
- >
78
- Result Type
79
- </th>
80
- <th
81
- class="one wide"
82
- >
83
- Minimum
84
- </th>
85
- <th
86
- class="one wide"
87
- >
88
- Goal
89
- </th>
90
- <th
91
- class="two wide"
92
- >
93
- Result
94
- </th>
95
- <th
96
- class="ascending sorted disabled"
97
- >
98
- Inserted At
99
- </th>
100
- <th
101
- class="ascending sorted disabled"
50
+ <tr
51
+ class=""
102
52
  >
103
- Updated At
104
- </th>
105
- </tr>
106
- </thead>
107
- <tbody
108
- class=""
109
- >
110
- <tr
53
+ <th
54
+ class="two wide ascending sorted disabled"
55
+ >
56
+ Implementation
57
+ </th>
58
+ <th
59
+ class="two wide ascending sorted disabled"
60
+ >
61
+ Rule
62
+ </th>
63
+ <th
64
+ class="two wide ascending sorted disabled"
65
+ >
66
+ Status
67
+ </th>
68
+ <th
69
+ class="two wide ascending sorted disabled"
70
+ >
71
+ Last execution
72
+ </th>
73
+ <th
74
+ class="two wide ascending sorted disabled"
75
+ >
76
+ Result Type
77
+ </th>
78
+ <th
79
+ class="one wide ascending sorted disabled"
80
+ >
81
+ Minimum
82
+ </th>
83
+ <th
84
+ class="one wide ascending sorted disabled"
85
+ >
86
+ Goal
87
+ </th>
88
+ <th
89
+ class="two wide ascending sorted disabled"
90
+ >
91
+ Result
92
+ </th>
93
+ </tr>
94
+ </thead>
95
+ <tbody
111
96
  class=""
112
97
  >
113
- <td
98
+ <tr
114
99
  class=""
115
100
  >
116
- <a
117
- href="/implementations/1"
101
+ <td
102
+ class=""
118
103
  >
119
- foo
120
- </a>
121
- </td>
122
- <td
123
- class=""
124
- />
125
- <td
126
- class=""
127
- >
128
- ruleImplementation.status.undefined
129
- </td>
130
- <td
131
- class=""
132
- >
133
- <div>
134
-
135
- </div>
136
- </td>
137
- <td
138
- class=""
139
- />
140
- <td
141
- class=""
142
- />
143
- <td
144
- class="right aligned"
145
- >
146
- undefined%
147
- </td>
148
- <td
149
- class="right aligned"
150
- >
151
- undefined%
152
- </td>
153
- <td
154
- class="center aligned"
155
- />
156
- <td
157
- class=""
158
- />
159
- <td
160
- class=""
161
- />
162
- </tr>
163
- </tbody>
164
- </table>
104
+ <a
105
+ href="/implementations/1"
106
+ >
107
+ foo
108
+ </a>
109
+ </td>
110
+ <td
111
+ class=""
112
+ />
113
+ <td
114
+ class=""
115
+ >
116
+ ruleImplementation.status.undefined
117
+ </td>
118
+ <td
119
+ class=""
120
+ />
121
+ <td
122
+ class=""
123
+ />
124
+ <td
125
+ class="right aligned"
126
+ >
127
+ undefined%
128
+ </td>
129
+ <td
130
+ class="right aligned"
131
+ >
132
+ undefined%
133
+ </td>
134
+ <td
135
+ class="center aligned"
136
+ />
137
+ </tr>
138
+ </tbody>
139
+ </table>
140
+ </div>
165
141
  </div>
166
142
  </div>
167
143
  </div>
@@ -183,130 +159,106 @@ exports[`<ConceptImplementationLinks /> show implementations with groups 1`] = `
183
159
  >
184
160
  Link to Implementation
185
161
  </h3>
186
- <table
187
- class="ui sortable table"
162
+ <div
163
+ class="implementations-table-overflow"
188
164
  >
189
- <thead
190
- class=""
165
+ <table
166
+ class="ui sortable table"
191
167
  >
192
- <tr
168
+ <thead
193
169
  class=""
194
170
  >
195
- <th
196
- class="two wide"
197
- >
198
- Implementation
199
- </th>
200
- <th
201
- class="two wide"
202
- >
203
- Rule
204
- </th>
205
- <th
206
- class="two wide"
207
- >
208
- Status
209
- </th>
210
- <th
211
- class="two wide"
212
- >
213
- Concepts
214
- </th>
215
- <th
216
- class="two wide"
217
- >
218
- Last execution
219
- </th>
220
- <th
221
- class="two wide"
222
- >
223
- Result Type
224
- </th>
225
- <th
226
- class="one wide"
227
- >
228
- Minimum
229
- </th>
230
- <th
231
- class="one wide"
232
- >
233
- Goal
234
- </th>
235
- <th
236
- class="two wide"
237
- >
238
- Result
239
- </th>
240
- <th
241
- class="ascending sorted disabled"
242
- >
243
- Inserted At
244
- </th>
245
- <th
246
- class="ascending sorted disabled"
171
+ <tr
172
+ class=""
247
173
  >
248
- Updated At
249
- </th>
250
- </tr>
251
- </thead>
252
- <tbody
253
- class=""
254
- >
255
- <tr
174
+ <th
175
+ class="two wide ascending sorted disabled"
176
+ >
177
+ Implementation
178
+ </th>
179
+ <th
180
+ class="two wide ascending sorted disabled"
181
+ >
182
+ Rule
183
+ </th>
184
+ <th
185
+ class="two wide ascending sorted disabled"
186
+ >
187
+ Status
188
+ </th>
189
+ <th
190
+ class="two wide ascending sorted disabled"
191
+ >
192
+ Last execution
193
+ </th>
194
+ <th
195
+ class="two wide ascending sorted disabled"
196
+ >
197
+ Result Type
198
+ </th>
199
+ <th
200
+ class="one wide ascending sorted disabled"
201
+ >
202
+ Minimum
203
+ </th>
204
+ <th
205
+ class="one wide ascending sorted disabled"
206
+ >
207
+ Goal
208
+ </th>
209
+ <th
210
+ class="two wide ascending sorted disabled"
211
+ >
212
+ Result
213
+ </th>
214
+ </tr>
215
+ </thead>
216
+ <tbody
256
217
  class=""
257
218
  >
258
- <td
219
+ <tr
259
220
  class=""
260
221
  >
261
- <a
262
- href="/implementations/1"
222
+ <td
223
+ class=""
263
224
  >
264
- foo
265
- </a>
266
- </td>
267
- <td
268
- class=""
269
- />
270
- <td
271
- class=""
272
- >
273
- ruleImplementation.status.undefined
274
- </td>
275
- <td
276
- class=""
277
- >
278
- <div>
279
-
280
- </div>
281
- </td>
282
- <td
283
- class=""
284
- />
285
- <td
286
- class=""
287
- />
288
- <td
289
- class="right aligned"
290
- >
291
- undefined%
292
- </td>
293
- <td
294
- class="right aligned"
295
- >
296
- undefined%
297
- </td>
298
- <td
299
- class="center aligned"
300
- />
301
- <td
302
- class=""
303
- />
304
- <td
305
- class=""
306
- />
307
- </tr>
308
- </tbody>
309
- </table>
225
+ <a
226
+ href="/implementations/1"
227
+ >
228
+ foo
229
+ </a>
230
+ </td>
231
+ <td
232
+ class=""
233
+ />
234
+ <td
235
+ class=""
236
+ >
237
+ ruleImplementation.status.undefined
238
+ </td>
239
+ <td
240
+ class=""
241
+ />
242
+ <td
243
+ class=""
244
+ />
245
+ <td
246
+ class="right aligned"
247
+ >
248
+ undefined%
249
+ </td>
250
+ <td
251
+ class="right aligned"
252
+ >
253
+ undefined%
254
+ </td>
255
+ <td
256
+ class="center aligned"
257
+ />
258
+ </tr>
259
+ </tbody>
260
+ </table>
261
+ </div>
310
262
  </div>
311
263
  <div
312
264
  class="ui vertical segment"
@@ -316,130 +268,106 @@ exports[`<ConceptImplementationLinks /> show implementations with groups 1`] = `
316
268
  >
317
269
  Deleted Implementations
318
270
  </h3>
319
- <table
320
- class="ui sortable table"
271
+ <div
272
+ class="implementations-table-overflow"
321
273
  >
322
- <thead
323
- class=""
274
+ <table
275
+ class="ui sortable table"
324
276
  >
325
- <tr
277
+ <thead
326
278
  class=""
327
279
  >
328
- <th
329
- class="two wide"
330
- >
331
- Implementation
332
- </th>
333
- <th
334
- class="two wide"
335
- >
336
- Rule
337
- </th>
338
- <th
339
- class="two wide"
340
- >
341
- Status
342
- </th>
343
- <th
344
- class="two wide"
345
- >
346
- Concepts
347
- </th>
348
- <th
349
- class="two wide"
350
- >
351
- Last execution
352
- </th>
353
- <th
354
- class="two wide"
355
- >
356
- Result Type
357
- </th>
358
- <th
359
- class="one wide"
360
- >
361
- Minimum
362
- </th>
363
- <th
364
- class="one wide"
365
- >
366
- Goal
367
- </th>
368
- <th
369
- class="two wide"
370
- >
371
- Result
372
- </th>
373
- <th
374
- class="ascending sorted disabled"
375
- >
376
- Inserted At
377
- </th>
378
- <th
379
- class="ascending sorted disabled"
280
+ <tr
281
+ class=""
380
282
  >
381
- Updated At
382
- </th>
383
- </tr>
384
- </thead>
385
- <tbody
386
- class=""
387
- >
388
- <tr
283
+ <th
284
+ class="two wide ascending sorted disabled"
285
+ >
286
+ Implementation
287
+ </th>
288
+ <th
289
+ class="two wide ascending sorted disabled"
290
+ >
291
+ Rule
292
+ </th>
293
+ <th
294
+ class="two wide ascending sorted disabled"
295
+ >
296
+ Status
297
+ </th>
298
+ <th
299
+ class="two wide ascending sorted disabled"
300
+ >
301
+ Last execution
302
+ </th>
303
+ <th
304
+ class="two wide ascending sorted disabled"
305
+ >
306
+ Result Type
307
+ </th>
308
+ <th
309
+ class="one wide ascending sorted disabled"
310
+ >
311
+ Minimum
312
+ </th>
313
+ <th
314
+ class="one wide ascending sorted disabled"
315
+ >
316
+ Goal
317
+ </th>
318
+ <th
319
+ class="two wide ascending sorted disabled"
320
+ >
321
+ Result
322
+ </th>
323
+ </tr>
324
+ </thead>
325
+ <tbody
389
326
  class=""
390
327
  >
391
- <td
328
+ <tr
392
329
  class=""
393
330
  >
394
- <a
395
- href="/implementations/2"
331
+ <td
332
+ class=""
396
333
  >
397
- bar
398
- </a>
399
- </td>
400
- <td
401
- class=""
402
- />
403
- <td
404
- class=""
405
- >
406
- ruleImplementation.status.undefined
407
- </td>
408
- <td
409
- class=""
410
- >
411
- <div>
412
-
413
- </div>
414
- </td>
415
- <td
416
- class=""
417
- />
418
- <td
419
- class=""
420
- />
421
- <td
422
- class="right aligned"
423
- >
424
- undefined%
425
- </td>
426
- <td
427
- class="right aligned"
428
- >
429
- undefined%
430
- </td>
431
- <td
432
- class="center aligned"
433
- />
434
- <td
435
- class=""
436
- />
437
- <td
438
- class=""
439
- />
440
- </tr>
441
- </tbody>
442
- </table>
334
+ <a
335
+ href="/implementations/2"
336
+ >
337
+ bar
338
+ </a>
339
+ </td>
340
+ <td
341
+ class=""
342
+ />
343
+ <td
344
+ class=""
345
+ >
346
+ ruleImplementation.status.undefined
347
+ </td>
348
+ <td
349
+ class=""
350
+ />
351
+ <td
352
+ class=""
353
+ />
354
+ <td
355
+ class="right aligned"
356
+ >
357
+ undefined%
358
+ </td>
359
+ <td
360
+ class="right aligned"
361
+ >
362
+ undefined%
363
+ </td>
364
+ <td
365
+ class="center aligned"
366
+ />
367
+ </tr>
368
+ </tbody>
369
+ </table>
370
+ </div>
443
371
  </div>
444
372
  </div>
445
373
  </div>
@@ -0,0 +1,23 @@
1
+ import {
2
+ getBusinessConceptsLinksToImplementationsColumns,
3
+ defaultBusinessConceptsLinksToImplementationsColumns,
4
+ } from "..";
5
+
6
+ describe("selectors: getBusinessConceptsLinksToImplementationsColumns", () => {
7
+ it("should return custom businessConceptsLinksToImplementationsColumns when present", () => {
8
+ const businessConceptsLinksToImplementationsColumns = [{ name: "test" }];
9
+ const res = getBusinessConceptsLinksToImplementationsColumns({
10
+ businessConceptsLinksToImplementationsColumns,
11
+ });
12
+ expect(res).toHaveLength(1);
13
+ expect(res).toEqual(businessConceptsLinksToImplementationsColumns);
14
+ });
15
+
16
+ it("should return default getBusinessConceptsLinksToImplementationsColumns when no customized", () => {
17
+ const res = getBusinessConceptsLinksToImplementationsColumns({});
18
+
19
+ expect(res).toHaveLength(
20
+ defaultBusinessConceptsLinksToImplementationsColumns.length
21
+ );
22
+ });
23
+ });
@@ -0,0 +1,107 @@
1
+ import _ from "lodash/fp";
2
+ import React from "react";
3
+ import { createSelector } from "reselect";
4
+ import { FormattedMessage } from "react-intl";
5
+ import { Link } from "react-router-dom";
6
+ import DateTime from "@truedat/core/components/DateTime";
7
+ import { formatNumber } from "@truedat/core/services/format";
8
+ import { linkTo } from "@truedat/core/routes";
9
+ import RuleLink from "@truedat/dq/components/RuleLink";
10
+ import RuleResultDecorator from "@truedat/dq/components/RuleResultDecorator";
11
+ import RuleImplementationLink from "@truedat/dq/components/RuleImplementationLink";
12
+
13
+ const translateDecorator = (id) =>
14
+ id ? <FormattedMessage id={id} defaultMessage={id} /> : null;
15
+
16
+ const resultTypeDecorator = (result, result_type, resultType) =>
17
+ _.defaultTo(result_type)(resultType) === "errors_number"
18
+ ? formatNumber(result)
19
+ : `${result}%`;
20
+
21
+ export const defaultBusinessConceptsLinksToImplementationsColumns = [
22
+ {
23
+ name: "implementation_key",
24
+ fieldSelector: _.pick(["id", "implementation_key", "rule_id"]),
25
+ fieldDecorator: RuleImplementationLink,
26
+ width: 2,
27
+ },
28
+ {
29
+ name: "rule",
30
+ fieldSelector: ({ rule, rule_id: id }) => ({ id, name: rule?.name }),
31
+ fieldDecorator: RuleLink,
32
+ width: 2,
33
+ },
34
+ {
35
+ name: "status",
36
+ fieldSelector: ({ status }) =>
37
+ translateDecorator(`ruleImplementation.status.${status}`),
38
+ width: 2,
39
+ },
40
+ {
41
+ name: "last_execution_at",
42
+ fieldSelector: ({ execution_result_info }) => ({
43
+ value: execution_result_info?.date,
44
+ }),
45
+ fieldDecorator: DateTime,
46
+ width: 2,
47
+ },
48
+ {
49
+ name: "result_type",
50
+ fieldDecorator: (value) =>
51
+ _.isNil(value)
52
+ ? null
53
+ : translateDecorator(`ruleImplementations.props.result_type.${value}`),
54
+ width: 2,
55
+ },
56
+ {
57
+ name: "minimum",
58
+ fieldSelector: _.pick(["minimum", "result_type"]),
59
+ fieldDecorator: (field) =>
60
+ resultTypeDecorator(field.minimum, field.result_type),
61
+ textAlign: "right",
62
+ width: 1,
63
+ },
64
+ {
65
+ name: "goal",
66
+ fieldSelector: _.pick(["goal", "result_type"]),
67
+ fieldDecorator: (field) =>
68
+ resultTypeDecorator(field.goal, field.result_type),
69
+ textAlign: "right",
70
+ width: 1,
71
+ },
72
+ {
73
+ name: "result",
74
+ fieldSelector: (ruleImplementation) => ({
75
+ ruleResult: ruleImplementation?.execution_result_info,
76
+ ruleImplementation,
77
+ }),
78
+ fieldDecorator: RuleResultDecorator,
79
+ textAlign: "center",
80
+ width: 2,
81
+ },
82
+ {
83
+ name: "related_by",
84
+ fieldSelector: _.pick(["business_concept_id", "business_concept_name"]),
85
+ fieldDecorator: ({ business_concept_id, business_concept_name }) => {
86
+ return _.isEmpty(business_concept_id) ? (
87
+ <></>
88
+ ) : (
89
+ <Link
90
+ to={linkTo.CONCEPT_VERSION({
91
+ business_concept_id: business_concept_id,
92
+ id: "current",
93
+ })}
94
+ >
95
+ {business_concept_name}
96
+ </Link>
97
+ );
98
+ },
99
+ hideOn: (implementations) =>
100
+ !_.some("business_concept_id")(implementations),
101
+ },
102
+ ];
103
+
104
+ export const getBusinessConceptsLinksToImplementationsColumns = createSelector(
105
+ _.prop("businessConceptsLinksToImplementationsColumns"),
106
+ _.defaultTo(defaultBusinessConceptsLinksToImplementationsColumns)
107
+ );
@@ -6,3 +6,8 @@ export {
6
6
  } from "./getConceptRelations";
7
7
  export { getConceptLinks } from "./getConceptLinks";
8
8
  export { getConceptImplementationLinks } from "./getConceptImplementationLinks";
9
+
10
+ export {
11
+ getBusinessConceptsLinksToImplementationsColumns,
12
+ defaultBusinessConceptsLinksToImplementationsColumns,
13
+ } from "./getBusinessConceptsLinksToImplementationsColumns";