@truedat/cx 5.15.0 → 5.15.2

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/cx",
3
- "version": "5.15.0",
3
+ "version": "5.15.2",
4
4
  "description": "Truedat Web Connectors",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -91,7 +91,7 @@
91
91
  },
92
92
  "dependencies": {
93
93
  "@apollo/client": "^3.7.1",
94
- "@truedat/core": "5.15.0",
94
+ "@truedat/core": "5.15.2",
95
95
  "lodash": "^4.17.21",
96
96
  "match-sorter": "^6.3.1",
97
97
  "moment": "^2.29.4",
@@ -112,5 +112,5 @@
112
112
  "react-dom": ">= 16.8.6 < 17",
113
113
  "semantic-ui-react": ">= 2.0.3 < 2.2"
114
114
  },
115
- "gitHead": "93bcd66804df32821aa0d563b863774554a39047"
115
+ "gitHead": "c1454a0ebd579263c17b3abea9715fc1ca3cf9ae"
116
116
  }
@@ -29,7 +29,7 @@ export const SOURCE_CONFIG = gql`
29
29
 
30
30
  export const SOURCE_LATEST_EVENT = gql`
31
31
  fragment SourceLatestEvent on Source {
32
- events(limit: 1) {
32
+ latestEvent {
33
33
  id
34
34
  type
35
35
  message
@@ -27,11 +27,10 @@ export const HeaderRow = () => {
27
27
  );
28
28
  };
29
29
 
30
- export const SourceRow = ({ active, externalId, id, type, events }) => {
31
- const event = _.head(events);
30
+ export const SourceRow = ({ active, externalId, id, type, latestEvent }) => {
32
31
  const disabled = !active;
33
- const positive = event?.type === "SUCCEEDED";
34
- const negative = event?.type === "FAILED";
32
+ const positive = latestEvent?.type === "SUCCEEDED";
33
+ const negative = latestEvent?.type === "FAILED";
35
34
  return (
36
35
  <Table.Row>
37
36
  <Table.Cell>
@@ -42,13 +41,13 @@ export const SourceRow = ({ active, externalId, id, type, events }) => {
42
41
  {active ? null : <FormattedMessage id="source.disabled" />}
43
42
  </Table.Cell>
44
43
  <Table.Cell disabled={disabled} positive={positive} negative={negative}>
45
- <DateTime value={event?.insertedAt} />
44
+ <DateTime value={latestEvent?.insertedAt} />
46
45
  </Table.Cell>
47
46
  <Table.Cell disabled={disabled} positive={positive} negative={negative}>
48
- {event?.type}
47
+ {latestEvent?.type}
49
48
  </Table.Cell>
50
49
  <Table.Cell disabled={disabled} positive={positive} negative={negative}>
51
- {_.truncate({ length: 90 })(event?.message)}
50
+ {_.truncate({ length: 90 })(latestEvent?.message)}
52
51
  </Table.Cell>
53
52
  </Table.Row>
54
53
  );
@@ -59,7 +58,7 @@ SourceRow.propTypes = {
59
58
  externalId: PropTypes.string,
60
59
  id: PropTypes.number,
61
60
  type: PropTypes.string,
62
- events: PropTypes.arrayOf(PropTypes.object),
61
+ latestEvent: PropTypes.object,
63
62
  };
64
63
 
65
64
  export const SourcesTable = ({ sources }) => {
@@ -37,7 +37,7 @@ describe("<Sources />", () => {
37
37
  externalId: "aaaa",
38
38
  active: true,
39
39
  type: "sourceType1",
40
- events: [event],
40
+ latestEvent: event,
41
41
  };
42
42
  const source2 = {
43
43
  __typename: "Source",
@@ -45,7 +45,7 @@ describe("<Sources />", () => {
45
45
  externalId: "bbbb",
46
46
  active: true,
47
47
  type: "sourceType2",
48
- events: [event],
48
+ latestEvent: event,
49
49
  };
50
50
  const sources = [source1, source2];
51
51
  const sourcesMock = {