cozy-keys-lib 5.0.0 → 6.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": "cozy-keys-lib",
3
- "version": "5.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "Interactions between cozy-keys and a bitwarden server",
5
5
  "browser": "transpiled/index.js",
6
6
  "main": "transpiled/index.node.js",
@@ -49,10 +49,10 @@
49
49
  "babel-plugin-mock-imports": "^1.0.2",
50
50
  "babel-plugin-rewire": "1.2.0",
51
51
  "babel-preset-cozy-app": "^1.6.0",
52
- "cozy-client": "^38.8.0",
52
+ "cozy-client": "^40.5.0",
53
53
  "cozy-flags": "2.8.6",
54
54
  "cozy-intent": "^2.0.2",
55
- "cozy-ui": "^88.1.0",
55
+ "cozy-ui": "^93.1.1",
56
56
  "enzyme": "^3.10.0",
57
57
  "enzyme-adapter-react-16": "^1.14.0",
58
58
  "enzyme-to-json": "3.4.0",
@@ -86,10 +86,10 @@
86
86
  "zxcvbn": "^4.4.2"
87
87
  },
88
88
  "peerDependencies": {
89
- "cozy-client": "^38.8.0",
89
+ "cozy-client": "^40.5.0",
90
90
  "cozy-flags": "^2.8.6",
91
91
  "cozy-intent": "^2.0.2",
92
- "cozy-ui": "^88.1.0",
92
+ "cozy-ui": "^93.1.1",
93
93
  "react": "^16.9.0",
94
94
  "react-dom": "^16.9.0"
95
95
  }
@@ -4,12 +4,79 @@ import React from 'react'
4
4
 
5
5
  function SvgIconCozySecurity(props) {
6
6
  return (
7
- <svg width={96} height={64} {...props}>
8
- <path
9
- fill="#FFF"
10
- fillRule="evenodd"
11
- d="M80 32c8.837 0 16 7.163 16 16s-7.163 16-16 16-16-7.163-16-16 7.163-16 16-16zm0 8c-2.206 0-4 1.794-4 4v2h-1c-.552 0-1 .456-1 .995v8.01c0 .55.456.995 1.002.995h9.996c.553 0 1.002-.456 1.002-.995v-8.01A.995.995 0 0085 46h-1v-2c0-2.206-1.795-4-4-4zm0 8.5c.826 0 1.5.672 1.5 1.5 0 .552-.305 1.032-.75 1.29v2.46a.751.751 0 01-1.5 0v-2.46A1.49 1.49 0 0178.5 50a1.5 1.5 0 011.5-1.5zM47.755 0c4.455 0 8.665 1.689 11.85 4.762 2.779 2.679 4.507 6.147 4.97 9.9 8.201.724 14.74 7.229 15.374 15.339L80 30c-9.941 0-18 8.059-18 18H32.946C23.6 48 16 40.507 16 31.297c0-4.393 1.716-8.542 4.833-11.681a16.942 16.942 0 0110.096-4.903c.452-3.772 2.185-7.26 4.975-9.95C39.09 1.689 43.298 0 47.754 0zM80 42c1.103 0 2 1.121 2 2.5V46h-4v-1.5c0-1.379.897-2.5 2-2.5zM55.386 28a1.132 1.132 0 00-1.113 1.154c.011.203.02.3.056.51.04.227.096.46.172.692-3.7 3.16-9.297 3.168-13.007.023.165-.49.233-.942.233-1.234a1.13 1.13 0 00-1.104-1.143 1.136 1.136 0 00-1.157 1.1c0 .11-.04.36-.135.618-.153.419-.41.771-.802 1.017a1.136 1.136 0 00-.333 1.597 1.127 1.127 0 001.538.323 4.21 4.21 0 00.505-.375C42.426 34.054 45.163 35 47.986 35c2.83 0 5.573-.95 7.764-2.73.16.141.332.27.517.387a1.134 1.134 0 001.307-1.848l-.101-.073-.077-.048a1.9 1.9 0 01-.546-.589 2.312 2.312 0 01-.316-1.003A1.128 1.128 0 0055.386 28z"
12
- />
7
+ <svg viewBox="0 0 104 104" fill="none" {...props}>
8
+ <g filter="url(#icon-connect_svg__filter0_ddd_8318_41471)">
9
+ <rect x={16} y={12} width={72} height={72} rx={36} fill="#fff" />
10
+ <path
11
+ d="M28 50.5c0 7.364 5.97 13.333 13.333 13.333h21.334C70.03 63.833 76 57.863 76 50.5c0-6.53-4.693-11.962-10.89-13.11C63.962 31.193 58.53 26.5 52 26.5c-6.53 0-11.962 4.693-13.11 10.89C32.693 38.538 28 43.97 28 50.5z"
12
+ fill="#B3D3FF"
13
+ />
14
+ <path
15
+ fillRule="evenodd"
16
+ clipRule="evenodd"
17
+ d="M54 50.584A5.001 5.001 0 0052 41a5 5 0 00-2 9.584V55a2 2 0 104 0v-4.416z"
18
+ fill="#297EF2"
19
+ />
20
+ </g>
21
+ <defs>
22
+ <filter
23
+ id="icon-connect_svg__filter0_ddd_8318_41471"
24
+ x={0}
25
+ y={0}
26
+ width={104}
27
+ height={104}
28
+ filterUnits="userSpaceOnUse"
29
+ colorInterpolationFilters="sRGB"
30
+ >
31
+ <feFlood floodOpacity={0} result="BackgroundImageFix" />
32
+ <feColorMatrix
33
+ in="SourceAlpha"
34
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
35
+ result="hardAlpha"
36
+ />
37
+ <feOffset dy={4} />
38
+ <feGaussianBlur stdDeviation={8} />
39
+ <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" />
40
+ <feBlend
41
+ in2="BackgroundImageFix"
42
+ result="effect1_dropShadow_8318_41471"
43
+ />
44
+ <feColorMatrix
45
+ in="SourceAlpha"
46
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
47
+ result="hardAlpha"
48
+ />
49
+ <feOffset dy={2} />
50
+ <feGaussianBlur stdDeviation={2} />
51
+ <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0" />
52
+ <feBlend
53
+ in2="effect1_dropShadow_8318_41471"
54
+ result="effect2_dropShadow_8318_41471"
55
+ />
56
+ <feColorMatrix
57
+ in="SourceAlpha"
58
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
59
+ result="hardAlpha"
60
+ />
61
+ <feMorphology
62
+ radius={0.5}
63
+ operator="dilate"
64
+ in="SourceAlpha"
65
+ result="effect3_dropShadow_8318_41471"
66
+ />
67
+ <feOffset />
68
+ <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0" />
69
+ <feBlend
70
+ in2="effect2_dropShadow_8318_41471"
71
+ result="effect3_dropShadow_8318_41471"
72
+ />
73
+ <feBlend
74
+ in="SourceGraphic"
75
+ in2="effect3_dropShadow_8318_41471"
76
+ result="shape"
77
+ />
78
+ </filter>
79
+ </defs>
13
80
  </svg>
14
81
  )
15
82
  }
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react'
2
2
  import TextField from 'cozy-ui/transpiled/react/TextField'
3
3
  import InputAdornment from '@material-ui/core/InputAdornment'
4
- import { useI18n } from 'cozy-ui/transpiled/react/I18n'
4
+ import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
5
5
  import Icon from 'cozy-ui/transpiled/react/Icon'
6
6
  import EyeIcon from 'cozy-ui/transpiled/react/Icons/Eye'
7
7
  import EyeClosedIcon from 'cozy-ui/transpiled/react/Icons/EyeClosed'
@@ -6,11 +6,11 @@ import PropTypes from 'prop-types'
6
6
  import { useClient } from 'cozy-client'
7
7
  import flag from 'cozy-flags'
8
8
  import Typography from 'cozy-ui/transpiled/react/Typography'
9
- import useBreakpoints from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
10
- import { useI18n } from 'cozy-ui/transpiled/react/I18n'
9
+ import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
10
+ import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
11
11
  import Button from 'cozy-ui/transpiled/react/deprecated/Button'
12
12
  import Icon from 'cozy-ui/transpiled/react/Icon'
13
- import CozyTheme from 'cozy-ui/transpiled/react/CozyTheme'
13
+ import CozyTheme from 'cozy-ui/transpiled/react/providers/CozyTheme'
14
14
  import { IllustrationDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
15
15
  import KeychainIcon from 'cozy-ui/transpiled/react/Icons/Keychain'
16
16
  import { useWebviewIntent } from 'cozy-intent'
@@ -117,7 +117,7 @@ const UnlockForm = props => {
117
117
  {canAuthWithOIDC ? (
118
118
  <Icon icon={KeychainIcon} size={64} className="u-mb-half" />
119
119
  ) : (
120
- <CloudIcon className="u-mb-half" />
120
+ <CloudIcon className="u-mb-half" size={104} />
121
121
  )}
122
122
  <Typography variant="h3" gutterBottom>
123
123
  {canAuthWithOIDC ? t('unlock.title-oidc') : t('unlock.title')}
@@ -2,8 +2,8 @@ import React from 'react'
2
2
  import UnlockForm from './UnlockForm'
3
3
  import { render, fireEvent, act, waitFor } from '@testing-library/react'
4
4
  import CozyClient, { CozyProvider } from 'cozy-client'
5
- import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints'
6
- import I18n from 'cozy-ui/transpiled/react/I18n'
5
+ import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
6
+ import I18n from 'cozy-ui/transpiled/react/providers/I18n'
7
7
  import { VaultProvider, useVaultClient } from './VaultContext'
8
8
  import en from '../locales/en.json'
9
9
 
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
3
3
 
4
4
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
5
5
  import Overlay from 'cozy-ui/transpiled/react/deprecated/Overlay'
6
- import withLocales from 'cozy-ui/transpiled/react/I18n/withLocales'
6
+ import withLocales from 'cozy-ui/transpiled/react/providers/I18n/withLocales'
7
7
 
8
8
  import localesEn from '../locales/en.json'
9
9
  import localesFr from '../locales/fr.json'
@@ -4,12 +4,80 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  import React from 'react';
5
5
  function SvgIconCozySecurity(props) {
6
6
  return /*#__PURE__*/React.createElement("svg", _extends({
7
- width: 96,
8
- height: 64
9
- }, props), /*#__PURE__*/React.createElement("path", {
10
- fill: "#FFF",
7
+ viewBox: "0 0 104 104",
8
+ fill: "none"
9
+ }, props), /*#__PURE__*/React.createElement("g", {
10
+ filter: "url(#icon-connect_svg__filter0_ddd_8318_41471)"
11
+ }, /*#__PURE__*/React.createElement("rect", {
12
+ x: 16,
13
+ y: 12,
14
+ width: 72,
15
+ height: 72,
16
+ rx: 36,
17
+ fill: "#fff"
18
+ }), /*#__PURE__*/React.createElement("path", {
19
+ d: "M28 50.5c0 7.364 5.97 13.333 13.333 13.333h21.334C70.03 63.833 76 57.863 76 50.5c0-6.53-4.693-11.962-10.89-13.11C63.962 31.193 58.53 26.5 52 26.5c-6.53 0-11.962 4.693-13.11 10.89C32.693 38.538 28 43.97 28 50.5z",
20
+ fill: "#B3D3FF"
21
+ }), /*#__PURE__*/React.createElement("path", {
11
22
  fillRule: "evenodd",
12
- d: "M80 32c8.837 0 16 7.163 16 16s-7.163 16-16 16-16-7.163-16-16 7.163-16 16-16zm0 8c-2.206 0-4 1.794-4 4v2h-1c-.552 0-1 .456-1 .995v8.01c0 .55.456.995 1.002.995h9.996c.553 0 1.002-.456 1.002-.995v-8.01A.995.995 0 0085 46h-1v-2c0-2.206-1.795-4-4-4zm0 8.5c.826 0 1.5.672 1.5 1.5 0 .552-.305 1.032-.75 1.29v2.46a.751.751 0 01-1.5 0v-2.46A1.49 1.49 0 0178.5 50a1.5 1.5 0 011.5-1.5zM47.755 0c4.455 0 8.665 1.689 11.85 4.762 2.779 2.679 4.507 6.147 4.97 9.9 8.201.724 14.74 7.229 15.374 15.339L80 30c-9.941 0-18 8.059-18 18H32.946C23.6 48 16 40.507 16 31.297c0-4.393 1.716-8.542 4.833-11.681a16.942 16.942 0 0110.096-4.903c.452-3.772 2.185-7.26 4.975-9.95C39.09 1.689 43.298 0 47.754 0zM80 42c1.103 0 2 1.121 2 2.5V46h-4v-1.5c0-1.379.897-2.5 2-2.5zM55.386 28a1.132 1.132 0 00-1.113 1.154c.011.203.02.3.056.51.04.227.096.46.172.692-3.7 3.16-9.297 3.168-13.007.023.165-.49.233-.942.233-1.234a1.13 1.13 0 00-1.104-1.143 1.136 1.136 0 00-1.157 1.1c0 .11-.04.36-.135.618-.153.419-.41.771-.802 1.017a1.136 1.136 0 00-.333 1.597 1.127 1.127 0 001.538.323 4.21 4.21 0 00.505-.375C42.426 34.054 45.163 35 47.986 35c2.83 0 5.573-.95 7.764-2.73.16.141.332.27.517.387a1.134 1.134 0 001.307-1.848l-.101-.073-.077-.048a1.9 1.9 0 01-.546-.589 2.312 2.312 0 01-.316-1.003A1.128 1.128 0 0055.386 28z"
13
- }));
23
+ clipRule: "evenodd",
24
+ d: "M54 50.584A5.001 5.001 0 0052 41a5 5 0 00-2 9.584V55a2 2 0 104 0v-4.416z",
25
+ fill: "#297EF2"
26
+ })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("filter", {
27
+ id: "icon-connect_svg__filter0_ddd_8318_41471",
28
+ x: 0,
29
+ y: 0,
30
+ width: 104,
31
+ height: 104,
32
+ filterUnits: "userSpaceOnUse",
33
+ colorInterpolationFilters: "sRGB"
34
+ }, /*#__PURE__*/React.createElement("feFlood", {
35
+ floodOpacity: 0,
36
+ result: "BackgroundImageFix"
37
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
38
+ in: "SourceAlpha",
39
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
40
+ result: "hardAlpha"
41
+ }), /*#__PURE__*/React.createElement("feOffset", {
42
+ dy: 4
43
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
44
+ stdDeviation: 8
45
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
46
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"
47
+ }), /*#__PURE__*/React.createElement("feBlend", {
48
+ in2: "BackgroundImageFix",
49
+ result: "effect1_dropShadow_8318_41471"
50
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
51
+ in: "SourceAlpha",
52
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
53
+ result: "hardAlpha"
54
+ }), /*#__PURE__*/React.createElement("feOffset", {
55
+ dy: 2
56
+ }), /*#__PURE__*/React.createElement("feGaussianBlur", {
57
+ stdDeviation: 2
58
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
59
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"
60
+ }), /*#__PURE__*/React.createElement("feBlend", {
61
+ in2: "effect1_dropShadow_8318_41471",
62
+ result: "effect2_dropShadow_8318_41471"
63
+ }), /*#__PURE__*/React.createElement("feColorMatrix", {
64
+ in: "SourceAlpha",
65
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
66
+ result: "hardAlpha"
67
+ }), /*#__PURE__*/React.createElement("feMorphology", {
68
+ radius: 0.5,
69
+ operator: "dilate",
70
+ in: "SourceAlpha",
71
+ result: "effect3_dropShadow_8318_41471"
72
+ }), /*#__PURE__*/React.createElement("feOffset", null), /*#__PURE__*/React.createElement("feColorMatrix", {
73
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"
74
+ }), /*#__PURE__*/React.createElement("feBlend", {
75
+ in2: "effect2_dropShadow_8318_41471",
76
+ result: "effect3_dropShadow_8318_41471"
77
+ }), /*#__PURE__*/React.createElement("feBlend", {
78
+ in: "SourceGraphic",
79
+ in2: "effect3_dropShadow_8318_41471",
80
+ result: "shape"
81
+ }))));
14
82
  }
15
83
  export default SvgIconCozySecurity;
@@ -5,7 +5,7 @@ var _excluded = ["hidden"];
5
5
  import React, { useState } from 'react';
6
6
  import TextField from 'cozy-ui/transpiled/react/TextField';
7
7
  import InputAdornment from '@material-ui/core/InputAdornment';
8
- import { useI18n } from 'cozy-ui/transpiled/react/I18n';
8
+ import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
9
9
  import Icon from 'cozy-ui/transpiled/react/Icon';
10
10
  import EyeIcon from 'cozy-ui/transpiled/react/Icons/Eye';
11
11
  import EyeClosedIcon from 'cozy-ui/transpiled/react/Icons/EyeClosed';
@@ -8,11 +8,11 @@ import PropTypes from 'prop-types';
8
8
  import { useClient } from 'cozy-client';
9
9
  import flag from 'cozy-flags';
10
10
  import Typography from 'cozy-ui/transpiled/react/Typography';
11
- import useBreakpoints from 'cozy-ui/transpiled/react/hooks/useBreakpoints';
12
- import { useI18n } from 'cozy-ui/transpiled/react/I18n';
11
+ import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
12
+ import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
13
13
  import Button from 'cozy-ui/transpiled/react/deprecated/Button';
14
14
  import Icon from 'cozy-ui/transpiled/react/Icon';
15
- import CozyTheme from 'cozy-ui/transpiled/react/CozyTheme';
15
+ import CozyTheme from 'cozy-ui/transpiled/react/providers/CozyTheme';
16
16
  import { IllustrationDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
17
17
  import KeychainIcon from 'cozy-ui/transpiled/react/Icons/Keychain';
18
18
  import { useWebviewIntent } from 'cozy-intent';
@@ -115,7 +115,8 @@ var UnlockForm = function UnlockForm(props) {
115
115
  size: 64,
116
116
  className: "u-mb-half"
117
117
  }) : /*#__PURE__*/React.createElement(CloudIcon, {
118
- className: "u-mb-half"
118
+ className: "u-mb-half",
119
+ size: 104
119
120
  }), /*#__PURE__*/React.createElement(Typography, {
120
121
  variant: "h3",
121
122
  gutterBottom: true
@@ -4,8 +4,8 @@ import React from 'react';
4
4
  import UnlockForm from './UnlockForm';
5
5
  import { render, fireEvent, act, waitFor } from '@testing-library/react';
6
6
  import CozyClient, { CozyProvider } from 'cozy-client';
7
- import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints';
8
- import I18n from 'cozy-ui/transpiled/react/I18n';
7
+ import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints';
8
+ import I18n from 'cozy-ui/transpiled/react/providers/I18n';
9
9
  import { VaultProvider, useVaultClient } from './VaultContext';
10
10
  import en from '../locales/en.json';
11
11
  jest.mock('./VaultContext', function () {
@@ -5,7 +5,7 @@ import React, { useContext, useState, useEffect } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
7
7
  import Overlay from 'cozy-ui/transpiled/react/deprecated/Overlay';
8
- import withLocales from 'cozy-ui/transpiled/react/I18n/withLocales';
8
+ import withLocales from 'cozy-ui/transpiled/react/providers/I18n/withLocales';
9
9
  import localesEn from '../locales/en.json';
10
10
  import localesFr from '../locales/fr.json';
11
11
  import { VaultContext } from './VaultContext';