@truedat/audit 6.16.1 → 7.0.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": "6.16.1",
3
+ "version": "7.0.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": "6.15.2",
37
+ "@truedat/test": "7.0.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": "6.16.1",
88
- "@truedat/core": "6.15.2",
87
+ "@truedat/auth": "7.0.0",
88
+ "@truedat/core": "7.0.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": "717d91b523c2e29e373791fef9c12b3a561449b7"
110
+ "gitHead": "ed0cd1a5e055b34afea0942cc461e1ecc9218dd1"
111
111
  }
@@ -2,20 +2,10 @@ 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";
6
5
  import ShareLinkForm from "./ShareLinkForm";
7
6
 
8
- export const ShareLinkPopup = ({
9
- title,
10
- url,
11
- name,
12
- description,
13
- saving,
14
- icon,
15
- popupType,
16
- }) => {
7
+ export const ShareLinkPopup = ({ title, url, name, description, saving }) => {
17
8
  const [open, setOpen] = useState(false);
18
- const { formatMessage } = useIntl();
19
9
  useEffect(() => {
20
10
  if (saving === false) {
21
11
  setOpen(false);
@@ -43,19 +33,8 @@ export const ShareLinkPopup = ({
43
33
  trigger={
44
34
  <Button
45
35
  basic
46
- icon={
47
- <Icon
48
- name={formatMessage({
49
- id: `shareLink.${icon}.icon`,
50
- defaultMessage: "share alternate",
51
- })}
52
- />
53
- }
36
+ icon={<Icon name="share alternate" />}
54
37
  className="button icon group-actions"
55
- data-tooltip={formatMessage({
56
- id: `shareLink.${popupType}.popUpMessage`,
57
- defaultMessage: "Sharing",
58
- })}
59
38
  />
60
39
  }
61
40
  />
@@ -68,7 +47,6 @@ ShareLinkPopup.propTypes = {
68
47
  name: PropTypes.string,
69
48
  description: PropTypes.string,
70
49
  saving: PropTypes.bool,
71
- popupType: PropTypes.string,
72
50
  };
73
51
 
74
52
  export const mapStateToProps = ({ notificationSaving: saving }) => ({ saving });
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { render } from "@truedat/test/render";
2
+ import { shallow } from "enzyme";
3
3
  import { ShareLinkPopup } from "../ShareLinkPopup";
4
4
 
5
5
  describe("<ShareLinkPopup />", () => {
@@ -7,11 +7,11 @@ describe("<ShareLinkPopup />", () => {
7
7
  title: "title",
8
8
  url: "url",
9
9
  name: "foo",
10
- description: "desc",
10
+ description: "desc"
11
11
  };
12
12
 
13
13
  it("matches the latest snapshot", () => {
14
- const { container } = render(<ShareLinkPopup {...props} />);
15
- expect(container).toMatchSnapshot();
14
+ const wrapper = shallow(<ShareLinkPopup {...props} />);
15
+ expect(wrapper).toMatchSnapshot();
16
16
  });
17
17
  });
@@ -1,15 +1,40 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<ShareLinkPopup /> matches the latest snapshot 1`] = `
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"
4
+ <Popup
5
+ basic={true}
6
+ content={
7
+ <Memo(Connect(ShareLinkForm))
8
+ description="desc"
9
+ name="foo"
10
+ title="title"
11
+ url="url"
12
12
  />
13
- </button>
14
- </div>
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
+ />
15
40
  `;