@truedat/audit 7.0.7 → 7.1.0

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": "7.0.7",
3
+ "version": "7.1.0",
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": "7.0.7",
37
+ "@truedat/test": "7.1.0",
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": "7.0.7",
88
- "@truedat/core": "7.0.7",
87
+ "@truedat/auth": "7.1.0",
88
+ "@truedat/core": "7.1.0",
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": "f780d02b3356b69c61023b14b61400ffb779e33d"
110
+ "gitHead": "cb08380da04c7286e694540bc24d32f01a728dfc"
111
111
  }
@@ -2,10 +2,20 @@ import React, { useState, useEffect } from "react";
2
2
  import { connect } from "react-redux";
3
3
  import { Button, Icon, Popup } from "semantic-ui-react";
4
4
  import PropTypes from "prop-types";
5
+ import { useIntl } from "react-intl";
5
6
  import ShareLinkForm from "./ShareLinkForm";
6
7
 
7
- export const ShareLinkPopup = ({ title, url, name, description, saving }) => {
8
+ export const ShareLinkPopup = ({
9
+ title,
10
+ url,
11
+ name,
12
+ description,
13
+ saving,
14
+ icon,
15
+ popupType,
16
+ }) => {
8
17
  const [open, setOpen] = useState(false);
18
+ const { formatMessage } = useIntl();
9
19
  useEffect(() => {
10
20
  if (saving === false) {
11
21
  setOpen(false);
@@ -33,8 +43,19 @@ export const ShareLinkPopup = ({ title, url, name, description, saving }) => {
33
43
  trigger={
34
44
  <Button
35
45
  basic
36
- icon={<Icon name="share alternate" />}
46
+ icon={
47
+ <Icon
48
+ name={formatMessage({
49
+ id: `shareLink.${icon}.icon`,
50
+ defaultMessage: "share alternate",
51
+ })}
52
+ />
53
+ }
37
54
  className="button icon group-actions"
55
+ data-tooltip={formatMessage({
56
+ id: `shareLink.${popupType}.popUpMessage`,
57
+ defaultMessage: "Sharing",
58
+ })}
38
59
  />
39
60
  }
40
61
  />
@@ -47,6 +68,7 @@ ShareLinkPopup.propTypes = {
47
68
  name: PropTypes.string,
48
69
  description: PropTypes.string,
49
70
  saving: PropTypes.bool,
71
+ popupType: PropTypes.string,
50
72
  };
51
73
 
52
74
  export const mapStateToProps = ({ notificationSaving: saving }) => ({ saving });
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { shallow } from "enzyme";
2
+ import { render } from "@truedat/test/render";
3
3
  import { ShareLinkPopup } from "../ShareLinkPopup";
4
4
 
5
5
  describe("<ShareLinkPopup />", () => {
@@ -11,7 +11,7 @@ describe("<ShareLinkPopup />", () => {
11
11
  };
12
12
 
13
13
  it("matches the latest snapshot", () => {
14
- const wrapper = shallow(<ShareLinkPopup {...props} />);
15
- expect(wrapper).toMatchSnapshot();
14
+ const { container } = render(<ShareLinkPopup {...props} />);
15
+ expect(container).toMatchSnapshot();
16
16
  });
17
17
  });
@@ -1,40 +1,15 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<ShareLinkPopup /> matches the latest snapshot 1`] = `
4
- <Popup
5
- basic={true}
6
- content={
7
- <Memo(Connect(ShareLinkForm))
8
- description="desc"
9
- name="foo"
10
- title="title"
11
- url="url"
4
+ <div>
5
+ <button
6
+ class="ui basic icon button button icon group-actions"
7
+ data-tooltip="Sharing"
8
+ >
9
+ <i
10
+ aria-hidden="true"
11
+ class="share alternate icon"
12
12
  />
13
- }
14
- disabled={false}
15
- eventsEnabled={true}
16
- flowing={true}
17
- on="click"
18
- onClose={[Function]}
19
- onOpen={[Function]}
20
- open={false}
21
- pinned={false}
22
- popperModifiers={[]}
23
- position="bottom right"
24
- positionFixed={true}
25
- size="large"
26
- trigger={
27
- <Button
28
- as="button"
29
- basic={true}
30
- className="button icon group-actions"
31
- icon={
32
- <Icon
33
- as="i"
34
- name="share alternate"
35
- />
36
- }
37
- />
38
- }
39
- />
13
+ </button>
14
+ </div>
40
15
  `;
@@ -50,6 +50,7 @@ exports[`<Subscription /> matches the latest snapshot 1`] = `
50
50
  class="right aligned four wide column"
51
51
  >
52
52
  <div
53
+ aria-disabled="false"
53
54
  aria-expanded="false"
54
55
  class="ui floating dropdown button icon group-actions"
55
56
  role="listbox"
@@ -140,6 +141,7 @@ exports[`<SubscriptionHeader /> matches the latest snapshot 1`] = `
140
141
  class="right aligned four wide column"
141
142
  >
142
143
  <div
144
+ aria-disabled="false"
143
145
  aria-expanded="false"
144
146
  class="ui floating dropdown button icon group-actions"
145
147
  role="listbox"
@@ -17,6 +17,7 @@ exports[`<ModalDelete /> matches the latest snapshot 1`] = `
17
17
  exports[`<SubscriptionActions /> matches the latest snapshot 1`] = `
18
18
  <div>
19
19
  <div
20
+ aria-disabled="false"
20
21
  aria-expanded="false"
21
22
  class="ui floating dropdown button icon group-actions"
22
23
  role="listbox"