@truedat/audit 6.14.0 → 6.14.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/audit",
3
- "version": "6.14.0",
3
+ "version": "6.14.1",
4
4
  "description": "Truedat Web Audit Module",
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": "6.8.6",
37
+ "@truedat/test": "6.14.1",
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",
@@ -84,8 +84,8 @@
84
84
  ]
85
85
  },
86
86
  "dependencies": {
87
- "@truedat/auth": "6.14.0",
88
- "@truedat/core": "6.14.0",
87
+ "@truedat/auth": "6.14.1",
88
+ "@truedat/core": "6.14.1",
89
89
  "moment": "^2.29.4",
90
90
  "path-to-regexp": "^1.7.0",
91
91
  "prop-types": "^15.8.1",
@@ -107,5 +107,5 @@
107
107
  "react-dom": ">= 16.8.6 < 17",
108
108
  "semantic-ui-react": ">= 2.0.3 < 2.2"
109
109
  },
110
- "gitHead": "c93d6ae539fb9ecb3d43b63db5199726246d2024"
110
+ "gitHead": "13f8e92c333acf539f9978ea94db03174130cfb0"
111
111
  }
@@ -10,7 +10,7 @@ import {
10
10
  Label,
11
11
  Table,
12
12
  } from "semantic-ui-react";
13
- import { FormattedMessage } from "react-intl";
13
+ import { FormattedMessage, useIntl } from "react-intl";
14
14
  import { connect } from "react-redux";
15
15
  import SubscriptionCrumbs from "./SubscriptionCrumbs";
16
16
  import SubscriptionActions from "./SubscriptionActions";
@@ -27,22 +27,31 @@ const fieldValue = (value, field) => {
27
27
  if (_.has("values.fixed_tuple")(field)) return fromTuple(field, value);
28
28
  };
29
29
 
30
- export const SubscriptionHeader = ({ header, subheader }) => (
31
- <Grid>
32
- <Grid.Column width={12}>
33
- <Header as="h2">
34
- <Icon circular name="check" />
35
- <Header.Content>
36
- {header}
37
- <Header.Subheader>{subheader}</Header.Subheader>
38
- </Header.Content>
39
- </Header>
40
- </Grid.Column>
41
- <Grid.Column width={4} textAlign="right">
42
- <SubscriptionActions />
43
- </Grid.Column>
44
- </Grid>
45
- );
30
+ export const SubscriptionHeader = ({ header, subheader }) => {
31
+ const { formatMessage } = useIntl();
32
+ return (
33
+ <Grid>
34
+ <Grid.Column width={12}>
35
+ <Header as="h2">
36
+ <Icon
37
+ circular
38
+ name={formatMessage({
39
+ id: "subscriptions.header.icon",
40
+ defaultMessage: "check",
41
+ })}
42
+ />
43
+ <Header.Content>
44
+ {header}
45
+ <Header.Subheader>{subheader}</Header.Subheader>
46
+ </Header.Content>
47
+ </Header>
48
+ </Grid.Column>
49
+ <Grid.Column width={4} textAlign="right">
50
+ <SubscriptionActions />
51
+ </Grid.Column>
52
+ </Grid>
53
+ );
54
+ };
46
55
 
47
56
  SubscriptionHeader.propTypes = {
48
57
  header: PropTypes.string,
@@ -43,7 +43,7 @@ export const SubscriptionEdit = ({
43
43
  <Container as={Segment}>
44
44
  <Header
45
45
  as="h2"
46
- icon="check"
46
+ icon={formatMessage({id: "subscriptions.header.icon",defaultMessage: "check" })}
47
47
  content={formatMessage({ id: "subscriptions.actions.edit" })}
48
48
  />
49
49
  <SubscriptionForm subscription={subscription} onSubmit={onSubmit} />
@@ -24,7 +24,10 @@ export const SubscriptionNew = ({
24
24
  <Container as={Segment}>
25
25
  <Header
26
26
  as="h2"
27
- icon="check"
27
+ icon={formatMessage({
28
+ id: "subscriptions.header.icon",
29
+ defaultMessage: "check",
30
+ })}
28
31
  content={formatMessage({ id: "subscriptions.actions.create" })}
29
32
  />
30
33
  <SubscriptionForm
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
4
4
  import { connect } from "react-redux";
5
5
  import { useForm, Controller } from "react-hook-form";
6
6
  import { useHistory, Link } from "react-router-dom";
7
- import { FormattedMessage } from "react-intl";
7
+ import { FormattedMessage, useIntl } from "react-intl";
8
8
  import { SUBSCRIPTION_NEW, linkTo } from "@truedat/core/routes";
9
9
  import {
10
10
  Header,
@@ -33,23 +33,32 @@ const RESOURCE_TYPES = [
33
33
  "source",
34
34
  ];
35
35
 
36
- export const SubscriptionsHeader = () => (
37
- <Header as="h2" className="subscription-header">
38
- <Button
39
- primary
40
- as={Link}
41
- to={SUBSCRIPTION_NEW}
42
- content={<FormattedMessage id="subscriptions.actions.create" />}
43
- />
44
- <Icon circular name="check" />
45
- <Header.Content>
46
- <FormattedMessage id="subscriptions.header" />
47
- <Header.Subheader>
48
- <FormattedMessage id="subscriptions.subheader" />
49
- </Header.Subheader>
50
- </Header.Content>
51
- </Header>
52
- );
36
+ export const SubscriptionsHeader = () => {
37
+ const { formatMessage } = useIntl();
38
+ return (
39
+ <Header as="h2" className="subscription-header">
40
+ <Button
41
+ primary
42
+ as={Link}
43
+ to={SUBSCRIPTION_NEW}
44
+ content={<FormattedMessage id="subscriptions.actions.create" />}
45
+ />
46
+ <Icon
47
+ circular
48
+ name={formatMessage({
49
+ id: "subscriptions.header.icon",
50
+ defaultMessage: "check",
51
+ })}
52
+ />
53
+ <Header.Content>
54
+ <FormattedMessage id="subscriptions.header" />
55
+ <Header.Subheader>
56
+ <FormattedMessage id="subscriptions.subheader" />
57
+ </Header.Subheader>
58
+ </Header.Content>
59
+ </Header>
60
+ );
61
+ };
53
62
 
54
63
  export const Subscriptions = ({
55
64
  subscriptions,