cozy-sharing 4.3.0 → 4.4.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/CHANGELOG.md CHANGED
@@ -3,6 +3,39 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.4.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@4.4.0...cozy-sharing@4.4.1) (2022-07-11)
7
+
8
+ **Note:** Version bump only for package cozy-sharing
9
+
10
+
11
+
12
+
13
+
14
+ # 4.4.0 (2022-07-05)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * Lint issue ([8523d7a](https://github.com/cozy/cozy-libs/commit/8523d7accbe7ee83b6a2fe7abf4cc629fcd76e61))
20
+
21
+
22
+ ### Features
23
+
24
+ * All oauth methods to handle reconection case ([b1a6033](https://github.com/cozy/cozy-libs/commit/b1a6033b393b1732d985807328ea83e1c87e5373))
25
+ * **sharing:** Add `react-router` to devDeps & peerDeps ([baf1359](https://github.com/cozy/cozy-libs/commit/baf1359c72c1644bc01fab8873267178c00bd9fa))
26
+
27
+
28
+
29
+
30
+
31
+ ## 4.3.1 (2022-06-24)
32
+
33
+ **Note:** Version bump only for package cozy-sharing
34
+
35
+
36
+
37
+
38
+
6
39
  # 4.3.0 (2022-06-03)
7
40
 
8
41
 
@@ -78,7 +78,7 @@ var SharingBannerCozyToCozy = function SharingBannerCozyToCozy(_ref2) {
78
78
  action: action
79
79
  };
80
80
  return /*#__PURE__*/React.createElement(Banner, {
81
- bgcolor: 'var(--defaultBackgroundColor)',
81
+ bgcolor: "var(--defaultBackgroundColor)",
82
82
  text: /*#__PURE__*/React.createElement(PublicBannerCozyToCozyContent, {
83
83
  isSharingShortcutCreated: isSharingShortcutCreated,
84
84
  sharing: sharing
@@ -106,7 +106,7 @@ var SharingBannerByLinkText = function SharingBannerByLinkText() {
106
106
  var knowMore = /*#__PURE__*/React.createElement("a", {
107
107
  href: "https://cozy.io",
108
108
  target: "_blank",
109
- className: 'u-link',
109
+ className: "u-link",
110
110
  rel: "noopener noreferrer"
111
111
  }, t('Share.banner.know_more'));
112
112
  return /*#__PURE__*/React.createElement("span", {
@@ -123,7 +123,7 @@ var SharingBannerByLink = function SharingBannerByLink(_ref3) {
123
123
  t = _useI18n4.t;
124
124
 
125
125
  return /*#__PURE__*/React.createElement(Banner, {
126
- bgcolor: 'var(--defaultBackgroundColor)',
126
+ bgcolor: "var(--defaultBackgroundColor)",
127
127
  text: /*#__PURE__*/React.createElement(SharingBannerByLinkText, null),
128
128
  buttonOne: /*#__PURE__*/React.createElement(ButtonLink, {
129
129
  theme: "text",
@@ -36,7 +36,7 @@ describe('PublicBanner', function () {
36
36
  var _render = render( /*#__PURE__*/React.createElement(SharingBannerCozyToCozy, {
37
37
  sharing: sharing,
38
38
  isSharingShortcutCreated: true,
39
- discoveryLink: 'discoveryLink',
39
+ discoveryLink: "discoveryLink",
40
40
  onClose: function onClose() {}
41
41
  })),
42
42
  container = _render.container; // Then
@@ -21,7 +21,7 @@ var mockStore = createStore(function () {
21
21
  export var TestI18n = function TestI18n(_ref) {
22
22
  var children = _ref.children;
23
23
  return /*#__PURE__*/React.createElement(I18n, {
24
- lang: 'en',
24
+ lang: "en",
25
25
  dictRequire: function dictRequire() {
26
26
  return langEn;
27
27
  }
@@ -9,7 +9,7 @@ describe('ShareAutosuggest', function () {
9
9
 
10
10
  var _render = render( /*#__PURE__*/React.createElement(ShareAutosuggest, {
11
11
  contactsAndGroups: [],
12
- placeholder: 'myPlaceHolder',
12
+ placeholder: "myPlaceHolder",
13
13
  onPick: onPick,
14
14
  onFocus: onFocus,
15
15
  recipients: [],
@@ -281,7 +281,7 @@ var ShareByLink = /*#__PURE__*/function (_React$Component) {
281
281
  busy: loading,
282
282
  label: t("".concat(documentType, ".share.shareByLink.create"))
283
283
  })), checked && /*#__PURE__*/React.createElement(CompositeRow, {
284
- className: 'u-ph-0',
284
+ className: "u-ph-0",
285
285
  primaryText: /*#__PURE__*/React.createElement(Typography, {
286
286
  onClick: this.copyLinkToClipboard,
287
287
  className: "u-c-pointer",
@@ -81,7 +81,7 @@ var SharingContent = function SharingContent(_ref) {
81
81
  sharing: sharing,
82
82
  sharingDesc: sharingDesc
83
83
  }), showWhoHasAccess && /*#__PURE__*/React.createElement(WhoHasAccess, {
84
- className: 'u-mt-1',
84
+ className: "u-mt-1",
85
85
  document: document,
86
86
  documentType: documentType,
87
87
  isOwner: isOwner,
@@ -13,7 +13,7 @@ import { useSafeState } from '../helpers/hooks';
13
13
 
14
14
  var LoadingContent = function LoadingContent() {
15
15
  return /*#__PURE__*/React.createElement("div", {
16
- className: 'u-ta-center'
16
+ className: "u-ta-center"
17
17
  }, /*#__PURE__*/React.createElement(Spinner, {
18
18
  size: "xxlarge",
19
19
  loadingType: "sharing"
@@ -98,7 +98,7 @@ var ShareTypeSelect = function ShareTypeSelect(_ref) {
98
98
  _onChange(option.value);
99
99
  },
100
100
  options: options,
101
- menuPosition: 'fixed'
101
+ menuPosition: "fixed"
102
102
  }));
103
103
  };
104
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-sharing",
3
- "version": "4.3.0",
3
+ "version": "4.4.1",
4
4
  "description": "Provides sharing login for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -28,8 +28,8 @@
28
28
  "@cozy/minilog": "^1.0.0",
29
29
  "classnames": "^2.2.6",
30
30
  "copy-text-to-clipboard": "^2.1.1",
31
- "cozy-device-helper": "^2.2.0",
32
- "cozy-doctypes": "^1.83.8",
31
+ "cozy-device-helper": "^2.2.1",
32
+ "cozy-doctypes": "^1.84.0",
33
33
  "lodash": "^4.17.19",
34
34
  "react-autosuggest": "^9.4.3",
35
35
  "react-tooltip": "^3.11.1",
@@ -48,7 +48,8 @@
48
48
  "enzyme-to-json": "3.6.2",
49
49
  "jest": "26.6.3",
50
50
  "react": "16.12.0",
51
- "react-dom": "16.13.0"
51
+ "react-dom": "16.13.0",
52
+ "react-router": "^5.0.1"
52
53
  },
53
54
  "peerDependencies": {
54
55
  "@material-ui/core": "4",
@@ -56,10 +57,11 @@
56
57
  "cozy-realtime": "^3.11.0",
57
58
  "cozy-ui": "^45.1.0",
58
59
  "prop-types": "^15.7.2",
59
- "react": "^16.12.0"
60
+ "react": "^16.12.0",
61
+ "react-router": "^5.0.1"
60
62
  },
61
63
  "sideEffects": [
62
64
  "*.css"
63
65
  ],
64
- "gitHead": "4843413949bb3581d7142f59bd282bba0db3dc58"
66
+ "gitHead": "cde54ed59980a5a87d267afa2a3b2ac695893fa9"
65
67
  }
@@ -88,7 +88,7 @@ const SharingBannerCozyToCozy = ({
88
88
  }
89
89
  return (
90
90
  <Banner
91
- bgcolor={'var(--defaultBackgroundColor)'}
91
+ bgcolor="var(--defaultBackgroundColor)"
92
92
  text={
93
93
  <PublicBannerCozyToCozyContent
94
94
  isSharingShortcutCreated={isSharingShortcutCreated}
@@ -122,7 +122,7 @@ const SharingBannerByLinkText = () => {
122
122
  <a
123
123
  href="https://cozy.io"
124
124
  target="_blank"
125
- className={'u-link'}
125
+ className="u-link"
126
126
  rel="noopener noreferrer"
127
127
  >
128
128
  {t('Share.banner.know_more')}
@@ -139,7 +139,7 @@ const SharingBannerByLink = ({ onClose }) => {
139
139
  const { t } = useI18n()
140
140
  return (
141
141
  <Banner
142
- bgcolor={'var(--defaultBackgroundColor)'}
142
+ bgcolor="var(--defaultBackgroundColor)"
143
143
  text={<SharingBannerByLinkText />}
144
144
  buttonOne={
145
145
  <ButtonLink
@@ -32,7 +32,7 @@ describe('PublicBanner', () => {
32
32
  <SharingBannerCozyToCozy
33
33
  sharing={sharing}
34
34
  isSharingShortcutCreated={true}
35
- discoveryLink={'discoveryLink'}
35
+ discoveryLink="discoveryLink"
36
36
  onClose={() => {}}
37
37
  />
38
38
  )
@@ -22,7 +22,7 @@ const mockStore = createStore(() => ({
22
22
 
23
23
  export const TestI18n = ({ children }) => {
24
24
  return (
25
- <I18n lang={'en'} dictRequire={() => langEn}>
25
+ <I18n lang="en" dictRequire={() => langEn}>
26
26
  {children}
27
27
  </I18n>
28
28
  )
@@ -10,7 +10,7 @@ describe('ShareAutosuggest', () => {
10
10
  const { getByPlaceholderText } = render(
11
11
  <ShareAutosuggest
12
12
  contactsAndGroups={[]}
13
- placeholder={'myPlaceHolder'}
13
+ placeholder="myPlaceHolder"
14
14
  onPick={onPick}
15
15
  onFocus={onFocus}
16
16
  recipients={[]}
@@ -137,7 +137,7 @@ class ShareByLink extends React.Component {
137
137
  </div>
138
138
  {checked && (
139
139
  <CompositeRow
140
- className={'u-ph-0'}
140
+ className="u-ph-0"
141
141
  primaryText={
142
142
  <Typography
143
143
  onClick={this.copyLinkToClipboard}
@@ -72,7 +72,7 @@ const SharingContent = ({
72
72
  )}
73
73
  {showWhoHasAccess && (
74
74
  <WhoHasAccess
75
- className={'u-mt-1'}
75
+ className="u-mt-1"
76
76
  document={document}
77
77
  documentType={documentType}
78
78
  isOwner={isOwner}
@@ -11,7 +11,7 @@ import { useSafeState } from '../helpers/hooks'
11
11
  */
12
12
  const LoadingContent = () => {
13
13
  return (
14
- <div className={'u-ta-center'}>
14
+ <div className="u-ta-center">
15
15
  <Spinner size="xxlarge" loadingType="sharing" />
16
16
  </div>
17
17
  )
@@ -58,7 +58,7 @@ const ShareTypeSelect = ({ options, onChange }) => (
58
58
  onChange(option.value)
59
59
  }}
60
60
  options={options}
61
- menuPosition={'fixed'}
61
+ menuPosition="fixed"
62
62
  />
63
63
  </div>
64
64
  )
package/test/AppLike.jsx CHANGED
@@ -8,7 +8,7 @@ import langEn from '../locales/en.json'
8
8
 
9
9
  const AppLike = ({ children, client }) => (
10
10
  <BreakpointsProvider>
11
- <I18n lang={'en'} dictRequire={() => langEn}>
11
+ <I18n lang="en" dictRequire={() => langEn}>
12
12
  <CozyProvider client={client || createMockClient({})}>
13
13
  {children}
14
14
  </CozyProvider>