@truedat/ie 8.6.7 → 8.7.1

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.
Files changed (74) hide show
  1. package/package.json +3 -3
  2. package/src/ingests/api.js +1 -1
  3. package/src/ingests/components/EventRow.js +1 -1
  4. package/src/ingests/components/IngestActions.js +1 -1
  5. package/src/ingests/components/IngestArchiveLoader.js +1 -1
  6. package/src/ingests/components/IngestCompleteness.js +2 -2
  7. package/src/ingests/components/IngestDetails.js +1 -1
  8. package/src/ingests/components/IngestDuplicate.js +5 -5
  9. package/src/ingests/components/IngestEdit.js +3 -3
  10. package/src/ingests/components/IngestExecutionsLoader.js +2 -2
  11. package/src/ingests/components/IngestFiltersDefault.js +1 -1
  12. package/src/ingests/components/IngestFiltersLoader.js +2 -2
  13. package/src/ingests/components/IngestFiltersPublished.js +1 -1
  14. package/src/ingests/components/IngestForm.js +3 -3
  15. package/src/ingests/components/IngestRoutes.js +3 -3
  16. package/src/ingests/components/IngestSelectedFiltersDefault.js +2 -2
  17. package/src/ingests/components/IngestSelectedFiltersPending.js +2 -2
  18. package/src/ingests/components/IngestSelectedFiltersPublished.js +4 -4
  19. package/src/ingests/components/IngestsLoader.js +2 -2
  20. package/src/ingests/components/IngestsSelector.js +1 -1
  21. package/src/ingests/components/IngestsTable.js +5 -5
  22. package/src/ingests/components/RichTextEditor.js +3 -3
  23. package/src/ingests/components/__tests__/IngestArchiveLoader.spec.js +3 -3
  24. package/src/ingests/components/__tests__/IngestForm.spec.js +1 -1
  25. package/src/ingests/components/__tests__/IngestLoader.spec.js +3 -3
  26. package/src/ingests/components/__tests__/IngestRoutes.spec.js +1 -1
  27. package/src/ingests/components/__tests__/IngestSelectedFilters.spec.js +1 -1
  28. package/src/ingests/reducers/__tests__/ingest.spec.js +4 -4
  29. package/src/ingests/reducers/__tests__/ingestActions.spec.js +5 -5
  30. package/src/ingests/reducers/__tests__/ingestActiveFilters.spec.js +11 -11
  31. package/src/ingests/reducers/__tests__/ingestArchive.spec.js +5 -5
  32. package/src/ingests/reducers/__tests__/ingestArchiveLoading.spec.js +2 -2
  33. package/src/ingests/reducers/__tests__/ingestCount.spec.js +3 -3
  34. package/src/ingests/reducers/__tests__/ingestExecutions.spec.js +5 -5
  35. package/src/ingests/reducers/__tests__/ingestExecutionsLoading.spec.js +6 -2
  36. package/src/ingests/reducers/__tests__/ingestFilters.spec.js +2 -2
  37. package/src/ingests/reducers/__tests__/ingestFiltersLoading.spec.js +2 -2
  38. package/src/ingests/reducers/__tests__/ingestQuery.spec.js +6 -6
  39. package/src/ingests/reducers/__tests__/ingestSelectedFilter.spec.js +9 -9
  40. package/src/ingests/reducers/__tests__/ingests.spec.js +4 -4
  41. package/src/ingests/reducers/__tests__/ingestsActions.spec.js +3 -3
  42. package/src/ingests/reducers/__tests__/ingestsDownloading.spec.js +2 -2
  43. package/src/ingests/reducers/__tests__/previousIngestQuery.spec.js +2 -2
  44. package/src/ingests/reducers/ingestActiveFilters.js +1 -1
  45. package/src/ingests/reducers/ingestArchive.js +2 -2
  46. package/src/ingests/reducers/ingestExecutions.js +2 -2
  47. package/src/ingests/reducers/ingestFilters.js +1 -1
  48. package/src/ingests/reducers/ingestRedirect.js +3 -3
  49. package/src/ingests/reducers/ingestSelectedFilter.js +1 -1
  50. package/src/ingests/relations/components/IngestRelationsRoutes.js +2 -2
  51. package/src/ingests/relations/components/IngestToIngestForm.js +1 -1
  52. package/src/ingests/relations/components/IngestToStructureForm.js +2 -2
  53. package/src/ingests/relations/components/__tests__/IngestRelationsRoutes.spec.js +2 -2
  54. package/src/ingests/relations/selectors/getIngestLinks.js +7 -7
  55. package/src/ingests/relations/selectors/getRelations.js +4 -4
  56. package/src/ingests/routines.js +3 -3
  57. package/src/ingests/sagas/__tests__/downloadIngests.spec.js +1 -1
  58. package/src/ingests/sagas/__tests__/fetchIngests.spec.js +3 -3
  59. package/src/ingests/sagas/downloadIngests.js +1 -1
  60. package/src/ingests/sagas/fetchIngestFilters.js +2 -2
  61. package/src/ingests/sagas/index.js +2 -2
  62. package/src/ingests/sagas/ingestAction.js +2 -2
  63. package/src/ingests/sagas/ingestLinkAction.js +2 -2
  64. package/src/ingests/selectors/__tests__/mapSelectedFilterStateToPropsByStatus.spec.js +2 -2
  65. package/src/ingests/selectors/getIngestAvailableFilters.js +2 -2
  66. package/src/ingests/selectors/getIngestColumns.js +2 -2
  67. package/src/ingests/selectors/getIngestFilterTypes.js +1 -1
  68. package/src/ingests/selectors/getIngestSelectedFilterActiveValues.js +1 -1
  69. package/src/ingests/selectors/getIngestSelectedFilterValues.js +2 -2
  70. package/src/ingests/selectors/getIngestSelectedFilters.js +1 -1
  71. package/src/ingests/selectors/getTemplateFields.js +1 -1
  72. package/src/ingests/selectors/getTemplateGroups.js +1 -1
  73. package/src/ingests/selectors/mapSelectedFilterStateToPropsByStatus.js +2 -2
  74. package/src/messages/index.js +1 -1
@@ -12,7 +12,7 @@ describe("reducers: ingestCount", () => {
12
12
 
13
13
  it("should handle the clearIngests.TRIGGER action", () => {
14
14
  expect(ingestCount(fooState, { type: clearIngests.TRIGGER })).toEqual(
15
- initialState
15
+ initialState,
16
16
  );
17
17
  });
18
18
 
@@ -22,8 +22,8 @@ describe("reducers: ingestCount", () => {
22
22
  expect(
23
23
  ingestCount(fooState, {
24
24
  type: fetchIngests.SUCCESS,
25
- payload: { headers }
26
- })
25
+ payload: { headers },
26
+ }),
27
27
  ).toEqual(count);
28
28
  });
29
29
 
@@ -12,7 +12,7 @@ describe("reducers: ingestExecutions", () => {
12
12
 
13
13
  it("should handle the fetchIngestExecutions.REQUEST action", () => {
14
14
  expect(
15
- ingestExecutions(fooState, { type: fetchIngestExecutions.REQUEST })
15
+ ingestExecutions(fooState, { type: fetchIngestExecutions.REQUEST }),
16
16
  ).toEqual(initialState);
17
17
  });
18
18
 
@@ -21,14 +21,14 @@ describe("reducers: ingestExecutions", () => {
21
21
  {
22
22
  status: "status",
23
23
  start_timestamp: "2018-06-27T07:32:53.154377Z",
24
- end_timestamp: "2018-06-27T07:32:53.154377Z"
25
- }
24
+ end_timestamp: "2018-06-27T07:32:53.154377Z",
25
+ },
26
26
  ];
27
27
  expect(
28
28
  ingestExecutions(fooState, {
29
29
  type: fetchIngestExecutions.SUCCESS,
30
- payload: { data: { data } }
31
- })
30
+ payload: { data: { data } },
31
+ }),
32
32
  ).toEqual(data);
33
33
  });
34
34
 
@@ -10,13 +10,17 @@ describe("reducers: ingestExecutionsLoading", () => {
10
10
 
11
11
  it("should be true after receiving the fetchIngestExecutions.TRIGGER action", () => {
12
12
  expect(
13
- ingestExecutionsLoading(fooState, { type: fetchIngestExecutions.TRIGGER })
13
+ ingestExecutionsLoading(fooState, {
14
+ type: fetchIngestExecutions.TRIGGER,
15
+ }),
14
16
  ).toBe(true);
15
17
  });
16
18
 
17
19
  it("should be false after receiving the fetchIngestExecutions.FULFILL action", () => {
18
20
  expect(
19
- ingestExecutionsLoading(fooState, { type: fetchIngestExecutions.FULFILL })
21
+ ingestExecutionsLoading(fooState, {
22
+ type: fetchIngestExecutions.FULFILL,
23
+ }),
20
24
  ).toBe(false);
21
25
  });
22
26
 
@@ -12,7 +12,7 @@ describe("reducers: ingestFilters", () => {
12
12
 
13
13
  it("should handle the clearIngestFilters.TRIGGER action", () => {
14
14
  expect(
15
- ingestFilters(fooState, { type: clearIngestFilters.TRIGGER })
15
+ ingestFilters(fooState, { type: clearIngestFilters.TRIGGER }),
16
16
  ).toEqual(initialState);
17
17
  });
18
18
 
@@ -22,7 +22,7 @@ describe("reducers: ingestFilters", () => {
22
22
  ingestFilters(fooState, {
23
23
  type: fetchIngestFilters.SUCCESS,
24
24
  payload: { data },
25
- })
25
+ }),
26
26
  ).toEqual({ filter1: { values: ["value1", "value2"] } });
27
27
  });
28
28
 
@@ -12,13 +12,13 @@ describe("reducers: ingestFiltersLoading", () => {
12
12
 
13
13
  it("should handle the fetchIngestFilters.REQUEST action", () => {
14
14
  expect(
15
- ingestFiltersLoading(fooState, { type: fetchIngestFilters.REQUEST })
15
+ ingestFiltersLoading(fooState, { type: fetchIngestFilters.REQUEST }),
16
16
  ).toEqual(true);
17
17
  });
18
18
 
19
19
  it("should handle the fetchIngestFilters.FULFILL action", () => {
20
20
  expect(
21
- ingestFiltersLoading(fooState, { type: fetchIngestFilters.FULFILL })
21
+ ingestFiltersLoading(fooState, { type: fetchIngestFilters.FULFILL }),
22
22
  ).toEqual(false);
23
23
  });
24
24
 
@@ -18,7 +18,7 @@ describe("reducers: ingestQuery", () => {
18
18
  const activePage = 123;
19
19
  const payload = { activePage };
20
20
  expect(
21
- ingestQuery(fooState, { type: selectIngestPage.TRIGGER, payload })
21
+ ingestQuery(fooState, { type: selectIngestPage.TRIGGER, payload }),
22
22
  ).toEqual({ ...fooState, page: activePage });
23
23
  });
24
24
 
@@ -27,7 +27,7 @@ describe("reducers: ingestQuery", () => {
27
27
  {
28
28
  ...fooState,
29
29
  page: 1,
30
- }
30
+ },
31
31
  );
32
32
  });
33
33
 
@@ -36,14 +36,14 @@ describe("reducers: ingestQuery", () => {
36
36
  it("should set the query from the payload", () => {
37
37
  const payload = { query };
38
38
  expect(
39
- ingestQuery(fooState, { type: searchIngests.TRIGGER, payload })
39
+ ingestQuery(fooState, { type: searchIngests.TRIGGER, payload }),
40
40
  ).toMatchObject({ query });
41
41
  });
42
42
 
43
43
  it("when query is not empty it should order by relevance", () => {
44
44
  const payload = { query };
45
45
  expect(
46
- ingestQuery(fooState, { type: searchIngests.TRIGGER, payload })
46
+ ingestQuery(fooState, { type: searchIngests.TRIGGER, payload }),
47
47
  ).toMatchObject({
48
48
  query,
49
49
  sort: [{ _score: "desc" }],
@@ -53,7 +53,7 @@ describe("reducers: ingestQuery", () => {
53
53
  it("when query is empty it should order by name", () => {
54
54
  const payload = { query: "" };
55
55
  expect(
56
- ingestQuery(fooState, { type: searchIngests.TRIGGER, payload })
56
+ ingestQuery(fooState, { type: searchIngests.TRIGGER, payload }),
57
57
  ).toMatchObject({
58
58
  query: "",
59
59
  sort: [{ "name.raw": "asc" }],
@@ -65,7 +65,7 @@ describe("reducers: ingestQuery", () => {
65
65
  it("should set sort from payload and set page to 1", () => {
66
66
  const payload = [{ name2: "asc" }];
67
67
  expect(
68
- ingestQuery(fooState, { type: sortIngests.TRIGGER, payload })
68
+ ingestQuery(fooState, { type: sortIngests.TRIGGER, payload }),
69
69
  ).toMatchObject({ sort: [{ name2: "asc" }], page: 1 });
70
70
  });
71
71
  });
@@ -4,7 +4,7 @@ import {
4
4
  closeIngestFilter,
5
5
  openIngestFilter,
6
6
  removeIngestFilter,
7
- resetIngestFilters
7
+ resetIngestFilters,
8
8
  } from "../../routines";
9
9
  import { ingestSelectedFilter } from "..";
10
10
 
@@ -21,14 +21,14 @@ describe("reducers: ingestSelectedFilter", () => {
21
21
  expect(
22
22
  ingestSelectedFilter(fooState, {
23
23
  type: addIngestFilter.TRIGGER,
24
- payload
25
- })
24
+ payload,
25
+ }),
26
26
  ).toEqual(filter);
27
27
  });
28
28
 
29
29
  it("should handle the closeIngestFilter.TRIGGER action", () => {
30
30
  expect(
31
- ingestSelectedFilter(fooState, { type: closeIngestFilter.TRIGGER })
31
+ ingestSelectedFilter(fooState, { type: closeIngestFilter.TRIGGER }),
32
32
  ).toEqual(initialState);
33
33
  });
34
34
 
@@ -38,8 +38,8 @@ describe("reducers: ingestSelectedFilter", () => {
38
38
  expect(
39
39
  ingestSelectedFilter(fooState, {
40
40
  type: openIngestFilter.TRIGGER,
41
- payload
42
- })
41
+ payload,
42
+ }),
43
43
  ).toEqual(filter);
44
44
  });
45
45
 
@@ -49,14 +49,14 @@ describe("reducers: ingestSelectedFilter", () => {
49
49
  expect(
50
50
  ingestSelectedFilter(fooState, {
51
51
  type: removeIngestFilter.TRIGGER,
52
- payload
53
- })
52
+ payload,
53
+ }),
54
54
  ).toEqual(initialState);
55
55
  });
56
56
 
57
57
  it("should handle the resetIngestFilters.TRIGGER action", () => {
58
58
  expect(
59
- ingestSelectedFilter(fooState, { type: resetIngestFilters.TRIGGER })
59
+ ingestSelectedFilter(fooState, { type: resetIngestFilters.TRIGGER }),
60
60
  ).toEqual(initialState);
61
61
  });
62
62
 
@@ -12,13 +12,13 @@ describe("reducers: ingest", () => {
12
12
 
13
13
  it("should handle the clearIngests.TRIGGER action", () => {
14
14
  expect(ingests(fooState, { type: clearIngests.TRIGGER })).toEqual(
15
- initialState
15
+ initialState,
16
16
  );
17
17
  });
18
18
 
19
19
  it("should handle the fetchIngests.FAILURE action", () => {
20
20
  expect(ingests(fooState, { type: fetchIngests.FAILURE })).toEqual(
21
- initialState
21
+ initialState,
22
22
  );
23
23
  });
24
24
 
@@ -29,8 +29,8 @@ describe("reducers: ingest", () => {
29
29
  expect(
30
30
  ingests(fooState, {
31
31
  type: fetchIngests.SUCCESS,
32
- payload: { data, headers }
33
- })
32
+ payload: { data, headers },
33
+ }),
34
34
  ).toEqual(collection);
35
35
  });
36
36
 
@@ -11,7 +11,7 @@ describe("reducers: ingestsActions", () => {
11
11
 
12
12
  it("should be an empty object after receiving the fetchIngests.REQUEST action", () => {
13
13
  expect(
14
- ingestsActions(fooState, { type: fetchIngests.REQUEST, payload })
14
+ ingestsActions(fooState, { type: fetchIngests.REQUEST, payload }),
15
15
  ).toEqual({});
16
16
  });
17
17
 
@@ -20,7 +20,7 @@ describe("reducers: ingestsActions", () => {
20
20
  const data = { _actions };
21
21
  const payload = { data };
22
22
  expect(
23
- ingestsActions(fooState, { type: fetchIngests.SUCCESS, payload })
23
+ ingestsActions(fooState, { type: fetchIngests.SUCCESS, payload }),
24
24
  ).toMatchObject(_actions);
25
25
  });
26
26
 
@@ -28,7 +28,7 @@ describe("reducers: ingestsActions", () => {
28
28
  const data = [{ id: 1 }];
29
29
  const payload = { data };
30
30
  expect(
31
- ingestsActions(fooState, { type: fetchIngests.SUCCESS, payload })
31
+ ingestsActions(fooState, { type: fetchIngests.SUCCESS, payload }),
32
32
  ).toEqual({});
33
33
  });
34
34
 
@@ -10,13 +10,13 @@ describe("reducers: ingestsDownloading", () => {
10
10
 
11
11
  it("should be true after receiving the downloadIngests.TRIGGER action", () => {
12
12
  expect(
13
- ingestsDownloading(fooState, { type: downloadIngests.TRIGGER })
13
+ ingestsDownloading(fooState, { type: downloadIngests.TRIGGER }),
14
14
  ).toBe(true);
15
15
  });
16
16
 
17
17
  it("should be false after receiving the downloadIngests.FULFILL action", () => {
18
18
  expect(
19
- ingestsDownloading(fooState, { type: downloadIngests.FULFILL })
19
+ ingestsDownloading(fooState, { type: downloadIngests.FULFILL }),
20
20
  ).toBe(false);
21
21
  });
22
22
 
@@ -14,10 +14,10 @@ describe("reducers: previousIngestQuery", () => {
14
14
  filters: { status: ["published"] },
15
15
  page: 0,
16
16
  size: 20,
17
- query: "some query"
17
+ query: "some query",
18
18
  };
19
19
  expect(
20
- previousIngestQuery(fooState, { type: fetchIngests.TRIGGER, payload })
20
+ previousIngestQuery(fooState, { type: fetchIngests.TRIGGER, payload }),
21
21
  ).toEqual(payload);
22
22
  });
23
23
  });
@@ -11,7 +11,7 @@ export const initialState = {};
11
11
 
12
12
  export const ingestActiveFilters = (
13
13
  state = initialState,
14
- { type, payload }
14
+ { type, payload },
15
15
  ) => {
16
16
  switch (type) {
17
17
  case addIngestFilter.TRIGGER: {
@@ -8,7 +8,7 @@ const pickFields = _.pick([
8
8
  "last_change_at",
9
9
  "last_change_by",
10
10
  "status",
11
- "version"
11
+ "version",
12
12
  ]);
13
13
 
14
14
  const ingestArchive = (state = initialState, { type, payload }) => {
@@ -21,7 +21,7 @@ const ingestArchive = (state = initialState, { type, payload }) => {
21
21
  return _.flow(
22
22
  _.propOr([], "data"),
23
23
  _.map(pickFields),
24
- _.orderBy(["version"], ["desc"])
24
+ _.orderBy(["version"], ["desc"]),
25
25
  )(payload);
26
26
  default:
27
27
  return state;
@@ -10,7 +10,7 @@ const pickFields = _.pick([
10
10
  "file_name",
11
11
  "file_size",
12
12
  "description",
13
- "records"
13
+ "records",
14
14
  ]);
15
15
 
16
16
  const ingestExecutions = (state = initialState, { type, payload }) => {
@@ -24,7 +24,7 @@ const ingestExecutions = (state = initialState, { type, payload }) => {
24
24
  _.propOr({}, "data"),
25
25
  _.propOr([], "data"),
26
26
  _.map(pickFields),
27
- _.orderBy(["start_timestamp"], ["desc"])
27
+ _.orderBy(["start_timestamp"], ["desc"]),
28
28
  )(payload);
29
29
  default:
30
30
  return state;
@@ -11,7 +11,7 @@ const ingestFilters = (state = initialState, { type, payload }) => {
11
11
  return _.flow(
12
12
  _.propOr({}, "data.data"),
13
13
  _.omit(["ingest_id", "domain", "domain_id", "current", "in_progress"]),
14
- _.omitBy(_.flow(_.getOr([], "values"), _.isEmpty))
14
+ _.omitBy(_.flow(_.getOr([], "values"), _.isEmpty)),
15
15
  )(payload);
16
16
  default:
17
17
  return state;
@@ -7,7 +7,7 @@ const initialState = "";
7
7
 
8
8
  export const ingestRedirect = (
9
9
  state = initialState,
10
- { type, payload, meta }
10
+ { type, payload, meta },
11
11
  ) => {
12
12
  switch (type) {
13
13
  case clearRedirect.TRIGGER:
@@ -16,8 +16,8 @@ export const ingestRedirect = (
16
16
  return _.propEq("method", "DELETE")(meta)
17
17
  ? INGESTS
18
18
  : _.includes(_.prop("action")(meta))(["version", "update", "create"])
19
- ? linkTo.INGEST(_.prop("data")(payload))
20
- : state;
19
+ ? linkTo.INGEST(_.prop("data")(payload))
20
+ : state;
21
21
  default:
22
22
  return state;
23
23
  }
@@ -3,7 +3,7 @@ import {
3
3
  closeIngestFilter,
4
4
  openIngestFilter,
5
5
  removeIngestFilter,
6
- resetIngestFilters
6
+ resetIngestFilters,
7
7
  } from "../routines";
8
8
 
9
9
  /** @type {string} */
@@ -17,11 +17,11 @@ import IngestToStructureForm from "./IngestToStructureForm";
17
17
  import IngestToIngestForm from "./IngestToIngestForm";
18
18
 
19
19
  const RelationsLoader = React.lazy(
20
- () => import("@truedat/lm/components/RelationsLoader")
20
+ () => import("@truedat/lm/components/RelationsLoader"),
21
21
  );
22
22
 
23
23
  const StructureTypesLoader = React.lazy(
24
- () => import("@truedat/dd/components/StructureTypesLoader")
24
+ () => import("@truedat/dd/components/StructureTypesLoader"),
25
25
  );
26
26
 
27
27
  export const IngestRelationsRoutes = ({ ingestId, ingestLoaded }) =>
@@ -14,7 +14,7 @@ import { linkTo } from "@truedat/core/routes";
14
14
  import IngestsSelector from "../../components/IngestsSelector";
15
15
 
16
16
  const TagTypeSelector = lazy(
17
- () => import("@truedat/lm/components/TagTypeSelector")
17
+ () => import("@truedat/lm/components/TagTypeSelector"),
18
18
  );
19
19
 
20
20
  export class IngestToIngestForm extends Component {
@@ -13,10 +13,10 @@ import {
13
13
  import { makeTagOptionsSelector } from "@truedat/core/selectors";
14
14
 
15
15
  const StructureSelector = lazy(
16
- () => import("@truedat/dd/components/StructureSelector")
16
+ () => import("@truedat/dd/components/StructureSelector"),
17
17
  );
18
18
  const TagTypeSelector = lazy(
19
- () => import("@truedat/lm/components/TagTypeSelector")
19
+ () => import("@truedat/lm/components/TagTypeSelector"),
20
20
  );
21
21
 
22
22
  export class IngestToStructureForm extends Component {
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
2
  import { render, waitForLoad } from "@truedat/test/render";
3
- import { IngestRelationsRoutes } from "../IngestRelationsRoutes";
4
3
  import {
5
4
  INGEST_RELATIONS_INGESTS,
6
5
  INGEST_RELATIONS_INGESTS_NEW,
7
6
  INGEST_RELATIONS_STRUCTURES,
8
7
  INGEST_RELATIONS_STRUCTURES_NEW,
9
8
  } from "@truedat/core/routes";
9
+ import { IngestRelationsRoutes } from "../IngestRelationsRoutes";
10
10
 
11
11
  // Mock all child components
12
12
  jest.mock("../../../components/IngestsLoader", () => () => (
@@ -78,7 +78,7 @@ describe("<IngestRelationsRoutes />", () => {
78
78
 
79
79
  it("renders nothing when ingest is not loaded", async () => {
80
80
  const rendered = render(
81
- <IngestRelationsRoutes ingestId={123} ingestLoaded={false} />
81
+ <IngestRelationsRoutes ingestId={123} ingestLoaded={false} />,
82
82
  );
83
83
  await waitForLoad(rendered);
84
84
  expect(rendered.container).toMatchSnapshot();
@@ -65,14 +65,14 @@ const withDeletedAttribute = (ingestLinks, columns) =>
65
65
  textAlign: "center",
66
66
  width: 2,
67
67
  }
68
- : c
68
+ : c,
69
69
  )(columns)
70
70
  : columns;
71
71
 
72
72
  const mapColumns = (ingestLinks, columns) =>
73
73
  _.flow(
74
74
  (cols) => withActions(ingestLinks, cols),
75
- (cols) => withDeletedAttribute(ingestLinks, cols)
75
+ (cols) => withDeletedAttribute(ingestLinks, cols),
76
76
  )(columns);
77
77
 
78
78
  const withHeaders = (pair, columns) => [
@@ -91,7 +91,7 @@ const addStructureType = (link, structureTypes) => {
91
91
  const orderedLinks = (links) =>
92
92
  _.flow(
93
93
  _.filter(_.propEq("resource_type", "data_structure")),
94
- _.sortBy(accentInsensitivePathOrder("name"))
94
+ _.sortBy(accentInsensitivePathOrder("name")),
95
95
  )(links);
96
96
  const ingestLinks = (links, columns) =>
97
97
  _.flow(
@@ -100,12 +100,12 @@ const ingestLinks = (links, columns) =>
100
100
  _.groupBy(_.pathOr("\uffee")("tags[0]")),
101
101
  _.toPairs,
102
102
  _.sortBy(([k]) => k),
103
- _.map((pair) => withHeaders(pair, columns))
103
+ _.map((pair) => withHeaders(pair, columns)),
104
104
  )(links);
105
105
  const ingestDeletedLinks = (links, columns) => {
106
106
  const deleted = _.flow(
107
107
  orderedLinks,
108
- _.filter(({ deleted_at }) => _.negate(_.isEmpty)(deleted_at))
108
+ _.filter(({ deleted_at }) => _.negate(_.isEmpty)(deleted_at)),
109
109
  )(links);
110
110
  return _.isEmpty(deleted) ? [] : [withHeaders(["deleted", deleted], columns)];
111
111
  };
@@ -113,11 +113,11 @@ export const getIngestLinks = createSelector(
113
113
  [getLinks, getColumns, getStructureTypes],
114
114
  (links, columns, structureTypes) => {
115
115
  const linksWithDataStructureType = _.map((link) =>
116
- addStructureType(link, structureTypes)
116
+ addStructureType(link, structureTypes),
117
117
  )(links);
118
118
  return [
119
119
  ...ingestLinks(linksWithDataStructureType, columns),
120
120
  ...ingestDeletedLinks(linksWithDataStructureType, columns),
121
121
  ];
122
- }
122
+ },
123
123
  );
@@ -24,9 +24,9 @@ export const getDataStructureRelations = createSelector(
24
24
  ...relation,
25
25
  relationPath: linkTo.STRUCTURE({ id: linkedId }),
26
26
  };
27
- })
27
+ }),
28
28
  )(relations);
29
- }
29
+ },
30
30
  );
31
31
 
32
32
  export const getIngestRelations = createSelector(
@@ -45,7 +45,7 @@ export const getIngestRelations = createSelector(
45
45
  ...relation,
46
46
  relationPath: linkTo.INGEST({ id: linkedId }),
47
47
  };
48
- })
48
+ }),
49
49
  )(relations);
50
- }
50
+ },
51
51
  );
@@ -14,17 +14,17 @@ export const fetchIngests = createRoutine("FETCH_INGESTS");
14
14
  export const fetchIngestExecutions = createRoutine("FETCH_INGEST_EXECUTIONS");
15
15
  export const selectIngestPage = createRoutine("SELECT_INGEST_PAGE");
16
16
  export const addIngestSelectedFilter = createRoutine(
17
- "ADD_INGEST_SELECTED_FILTER"
17
+ "ADD_INGEST_SELECTED_FILTER",
18
18
  );
19
19
  export const removeIngestSelectedFilter = createRoutine(
20
- "REMOVE_INGEST_SELECTED_FILTER"
20
+ "REMOVE_INGEST_SELECTED_FILTER",
21
21
  );
22
22
 
23
23
  export const openIngestFilter = createRoutine("OPEN_INGEST_FILTER");
24
24
  export const closeIngestFilter = createRoutine("CLOSE_INGEST_FILTER");
25
25
  export const removeIngestFilter = createRoutine("REMOVE_INGEST_FILTER");
26
26
  export const toggleIngestFilterValue = createRoutine(
27
- "TOGGLE_INGEST_FILTER_VALUE"
27
+ "TOGGLE_INGEST_FILTER_VALUE",
28
28
  );
29
29
  export const searchIngests = createRoutine("SEARCH_INGESTS");
30
30
  export const resetIngestFilters = createRoutine("RESET_INGEST_FILTERS");
@@ -3,7 +3,7 @@ import { apiJsonPost, JSON_OPTS } from "@truedat/core/services/api";
3
3
  import {
4
4
  downloadIngestsRequestSaga,
5
5
  downloadIngestsSaga,
6
- saveFile
6
+ saveFile,
7
7
  } from "../downloadIngests";
8
8
  import { downloadIngests } from "../../routines";
9
9
  import { API_INGEST_VERSIONS_CSV } from "../../api";
@@ -29,11 +29,11 @@ describe("sagas: fetchIngestsSaga", () => {
29
29
  const data = {
30
30
  collection: [
31
31
  { id: 1, name: "Ingest 1", description: "desc1" },
32
- { id: 2, name: "Ingest 2", description: "desc2" }
33
- ]
32
+ { id: 2, name: "Ingest 2", description: "desc2" },
33
+ ],
34
34
  };
35
35
  const headers = {
36
- "x-total-count": "123"
36
+ "x-total-count": "123",
37
37
  };
38
38
 
39
39
  it("should put a success action when a response is returned", () => {
@@ -7,7 +7,7 @@ import { getPreviousIngestQuery } from "../selectors";
7
7
 
8
8
  export function saveFile(data) {
9
9
  const blob = new Blob([String.fromCharCode(0xfeff), data], {
10
- type: "text/csv;charset=utf-8"
10
+ type: "text/csv;charset=utf-8",
11
11
  });
12
12
  FileSaver.saveAs(blob, "ingests.csv");
13
13
  }
@@ -11,8 +11,8 @@ export function* fetchIngestFiltersSaga(payload) {
11
11
  const body = {
12
12
  filters: {
13
13
  status: ["pending_approval", "draft", "rejected", "published"],
14
- ..._.propOr({}, "payload.filters")(payload)
15
- }
14
+ ..._.propOr({}, "payload.filters")(payload),
15
+ },
16
16
  };
17
17
  const { data } = yield call(apiJsonPost, url, body, JSON_OPTS);
18
18
  yield put(fetchIngestFilters.success({ data }));
@@ -14,7 +14,7 @@ export {
14
14
  fetchIngestRequestSaga,
15
15
  fetchIngestsRequestSaga,
16
16
  fetchIngestExecutionsRequestSaga,
17
- ingestLinkActionRequestSaga
17
+ ingestLinkActionRequestSaga,
18
18
  };
19
19
 
20
20
  export default [
@@ -25,5 +25,5 @@ export default [
25
25
  fetchIngestRequestSaga(),
26
26
  fetchIngestsRequestSaga(),
27
27
  fetchIngestExecutionsRequestSaga(),
28
- ingestLinkActionRequestSaga()
28
+ ingestLinkActionRequestSaga(),
29
29
  ];
@@ -5,7 +5,7 @@ import {
5
5
  apiJsonPatch,
6
6
  apiJsonPost,
7
7
  apiJsonPut,
8
- JSON_OPTS
8
+ JSON_OPTS,
9
9
  } from "@truedat/core/services/api";
10
10
  import { ingestAction } from "../routines";
11
11
 
@@ -14,7 +14,7 @@ const methodFromVerb = {
14
14
  DELETE: apiJsonDelete,
15
15
  PATCH: apiJsonPatch,
16
16
  POST: apiJsonPost,
17
- PUT: apiJsonPut
17
+ PUT: apiJsonPut,
18
18
  };
19
19
 
20
20
  export function* ingestActionSaga({ payload }) {
@@ -5,7 +5,7 @@ import {
5
5
  apiJsonPatch,
6
6
  apiJsonPost,
7
7
  apiJsonPut,
8
- JSON_OPTS
8
+ JSON_OPTS,
9
9
  } from "@truedat/core/services/api";
10
10
  import { ingestLinkAction } from "../routines";
11
11
 
@@ -14,7 +14,7 @@ const methodFromVerb = {
14
14
  DELETE: apiJsonDelete,
15
15
  PATCH: apiJsonPatch,
16
16
  POST: apiJsonPost,
17
- PUT: apiJsonPut
17
+ PUT: apiJsonPut,
18
18
  };
19
19
 
20
20
  export function* ingestLinkActionSaga({ payload }) {