cozy-ui 131.2.0 → 132.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.
@@ -0,0 +1,2 @@
1
+ export default SvgFileTypeSharedDrive;
2
+ declare function SvgFileTypeSharedDrive(props: any): JSX.Element;
@@ -0,0 +1,54 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/file-type-shared-drive.svg` to regenerate;
3
+ import React from 'react';
4
+
5
+ function SvgFileTypeSharedDrive(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ viewBox: "0 0 96 78",
8
+ fill: "none"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ fillRule: "evenodd",
11
+ clipRule: "evenodd",
12
+ d: "M48 9.75h38.4c5.28 0 9.6 4.386 9.6 9.75v48.75c0 5.364-4.32 9.75-9.6 9.75H9.6C4.32 78 0 73.614 0 68.25l.048-58.5C.048 4.386 4.32 0 9.6 0h28.8L48 9.75z",
13
+ fill: "url(#file-type-shared-drive_svg__paint0_linear_13714_2236)"
14
+ }), /*#__PURE__*/React.createElement("path", {
15
+ d: "M56.673 62.55H39.176c-4.772 0-8.749-3.976-8.749-8.748V36.305c0-4.772 3.977-8.748 8.749-8.748h3.976c.955 0 1.591.636 1.591 1.59 0 .955-.636 1.59-1.59 1.59h-3.977c-3.022 0-5.567 2.546-5.567 5.568v17.497c0 3.022 2.545 5.567 5.567 5.567h17.497c3.022 0 5.567-2.545 5.567-5.567v-2.386c0-.955.636-1.59 1.59-1.59.955 0 1.591.635 1.591 1.59v2.386c0 4.772-3.977 8.748-8.748 8.748zM42.039 51.416c-.636 0-1.273-.477-1.59-1.114-.319-1.113-.478-2.386-.478-3.658 0-6.999 5.726-12.725 12.725-12.725h3.181v-4.772c0-.636.319-1.272.955-1.431.636-.319 1.272-.16 1.75.318l9.543 9.543c.636.637.636 1.591 0 2.227l-9.544 9.544c-.477.477-1.113.636-1.75.318-.636-.159-.954-.795-.954-1.431v-4.772h-3.18c-4.296 0-7.954 2.704-9.227 6.84-.158.636-.795 1.113-1.431 1.113z",
16
+ fill: "#8DBCFF"
17
+ }), /*#__PURE__*/React.createElement("path", {
18
+ d: "M56.673 61.55H39.176c-4.772 0-8.749-3.976-8.749-8.748V35.305c0-4.772 3.977-8.748 8.749-8.748h3.976c.955 0 1.591.636 1.591 1.59 0 .955-.636 1.59-1.59 1.59h-3.977c-3.022 0-5.567 2.546-5.567 5.568v17.497c0 3.022 2.545 5.567 5.567 5.567h17.497c3.022 0 5.567-2.545 5.567-5.567v-2.386c0-.955.636-1.59 1.59-1.59.955 0 1.591.635 1.591 1.59v2.386c0 4.772-3.977 8.748-8.748 8.748zM42.039 50.416c-.636 0-1.273-.477-1.59-1.114-.319-1.113-.478-2.386-.478-3.658 0-6.999 5.726-12.725 12.725-12.725h3.181v-4.772c0-.636.319-1.272.955-1.431.636-.319 1.272-.16 1.75.318l9.543 9.543c.636.637.636 1.591 0 2.227l-9.544 9.544c-.477.477-1.113.636-1.75.318-.636-.159-.954-.795-.954-1.431v-4.772h-3.18c-4.296 0-7.954 2.704-9.227 6.84-.158.636-.795 1.113-1.431 1.113z",
19
+ fill: "url(#file-type-shared-drive_svg__paint1_linear_13714_2236)"
20
+ }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
21
+ id: "file-type-shared-drive_svg__paint0_linear_13714_2236",
22
+ x1: 48,
23
+ y1: 0,
24
+ x2: 48,
25
+ y2: 94.5,
26
+ gradientUnits: "userSpaceOnUse"
27
+ }, /*#__PURE__*/React.createElement("stop", {
28
+ offset: 0.044,
29
+ stopColor: "#1D7AFF"
30
+ }), /*#__PURE__*/React.createElement("stop", {
31
+ offset: 0.13,
32
+ stopColor: "#7CB2FF"
33
+ }), /*#__PURE__*/React.createElement("stop", {
34
+ offset: 0.617,
35
+ stopColor: "#76AFFF"
36
+ }), /*#__PURE__*/React.createElement("stop", {
37
+ offset: 1,
38
+ stopColor: "#4290FF"
39
+ })), /*#__PURE__*/React.createElement("linearGradient", {
40
+ id: "file-type-shared-drive_svg__paint1_linear_13714_2236",
41
+ x1: 49.092,
42
+ y1: 11.943,
43
+ x2: 49.447,
44
+ y2: 68.954,
45
+ gradientUnits: "userSpaceOnUse"
46
+ }, /*#__PURE__*/React.createElement("stop", {
47
+ stopColor: "#76AFFF"
48
+ }), /*#__PURE__*/React.createElement("stop", {
49
+ offset: 0.781,
50
+ stopColor: "#1D7AFF"
51
+ }))));
52
+ }
53
+
54
+ export default SvgFileTypeSharedDrive;
@@ -0,0 +1,2 @@
1
+ export default SvgFileTypeSharedDriveGrey;
2
+ declare function SvgFileTypeSharedDriveGrey(props: any): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/file-type-shared-drive-grey.svg` to regenerate;
3
+ import React from 'react';
4
+
5
+ function SvgFileTypeSharedDriveGrey(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ viewBox: "0 0 16 13",
8
+ fill: "none"
9
+ }, props), /*#__PURE__*/React.createElement("g", {
10
+ clipPath: "url(#file-type-shared-drive-grey_svg__clip0_13717_2258)"
11
+ }, /*#__PURE__*/React.createElement("path", {
12
+ fillRule: "evenodd",
13
+ clipRule: "evenodd",
14
+ d: "M14.4 1.62H8L6.4 0H1.6C.72 0 0 .73 0 1.62v9.75c0 .89.71 1.62 1.59 1.62h12.8c.88 0 1.6-.73 1.6-1.62V3.25c0-.89-.72-1.62-1.6-1.62l.01-.01zM11.09 8.9c0 .93-.77 1.7-1.7 1.7H6c-.93 0-1.7-.77-1.7-1.7V5.51c0-.93.77-1.7 1.7-1.7h.77c.19 0 .31.12.31.31s-.12.31-.31.31H6c-.59 0-1.08.49-1.08 1.08V8.9c0 .59.49 1.08 1.08 1.08h3.39c.59 0 1.08-.49 1.08-1.08v-.46c0-.19.12-.31.31-.31s.31.12.31.31v.46zm.52-2.71L9.76 8.04c-.09.09-.22.12-.34.06-.12-.03-.19-.15-.19-.28v-.93h-.62c-.83 0-1.54.52-1.79 1.33a.3.3 0 01-.28.22c-.13 0-.25-.09-.31-.22-.06-.22-.09-.46-.09-.71 0-1.36 1.11-2.47 2.47-2.47h.62v-.93c0-.12.06-.25.19-.28.12-.06.25-.03.34.06l1.85 1.85c.12.12.12.31 0 .43v.02z",
15
+ fill: "#A6A6A6"
16
+ })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
17
+ id: "file-type-shared-drive-grey_svg__clip0_13717_2258"
18
+ }, /*#__PURE__*/React.createElement("path", {
19
+ fill: "#fff",
20
+ d: "M0 0h16v13H0z"
21
+ }))));
22
+ }
23
+
24
+ export default SvgFileTypeSharedDriveGrey;
@@ -12,7 +12,6 @@ import React, { useEffect, useState } from 'react';
12
12
  import { useInstanceInfo } from 'cozy-client';
13
13
  import { buildPremiumLink } from 'cozy-client/dist/models/instance';
14
14
  import { isFlagshipApp } from 'cozy-device-helper';
15
- import flag from 'cozy-flags';
16
15
  import { useWebviewIntent } from 'cozy-intent';
17
16
  import { makeType } from "cozy-ui/transpiled/react/Paywall/helpers";
18
17
  import withPaywallLocales from "cozy-ui/transpiled/react/Paywall/locales/withPaywallLocales";
@@ -32,6 +31,7 @@ var Paywall = function Paywall(_ref) {
32
31
  var variant = _ref.variant,
33
32
  onClose = _ref.onClose,
34
33
  isPublic = _ref.isPublic,
34
+ isIapEnabled = _ref.isIapEnabled,
35
35
  contentInterpolation = _ref.contentInterpolation;
36
36
  var instanceInfo = useInstanceInfo();
37
37
 
@@ -113,7 +113,7 @@ var Paywall = function Paywall(_ref) {
113
113
  })),
114
114
  onClose: onClose
115
115
  });
116
- var canOpenPremiumLink = !isFlagshipApp() || isFlagshipApp() && !!flag('flagship.iap.enabled') && isFlagshipAppIapAvailable;
116
+ var canOpenPremiumLink = !isFlagshipApp() || isFlagshipApp() && isIapEnabled && isFlagshipAppIapAvailable;
117
117
  var link = buildPremiumLink(instanceInfo);
118
118
  var type = makeType(instanceInfo, isPublic, link);
119
119
 
@@ -157,11 +157,15 @@ Paywall.propTypes = {
157
157
  /** Whether paywall is display in a public context */
158
158
  isPublic: PropTypes.bool,
159
159
 
160
+ /** Whether the IAP is enabled */
161
+ isIapEnabled: PropTypes.bool,
162
+
160
163
  /** Translation interpolation for the content of the paywall */
161
164
  contentInterpolation: PropTypes.object
162
165
  };
163
166
  Paywall.defaultProps = {
164
167
  isPublic: false,
168
+ isIapEnabled: false,
165
169
  contentInterpolation: {}
166
170
  };
167
171
  export default withPaywallLocales(Paywall);
@@ -1 +1 @@
1
- export function getThemesList(): any;
1
+ export function getThemesList(noHealth: any): any;
@@ -1,7 +1,6 @@
1
1
  import { themesList } from 'cozy-client/dist/models/document/documentTypeData';
2
- import flag from 'cozy-flags';
3
- export var getThemesList = function getThemesList() {
4
- return flag('hide.healthTheme.enabled') ? themesList.filter(function (theme) {
2
+ export var getThemesList = function getThemesList(noHealth) {
3
+ return noHealth ? themesList.filter(function (theme) {
5
4
  return theme.label !== 'health';
6
5
  }) : themesList;
7
6
  };
@@ -10,10 +10,10 @@ import CarIcon from "cozy-ui/transpiled/react/Icons/Car";
10
10
  import ChessIcon from "cozy-ui/transpiled/react/Icons/Chess";
11
11
  import DotsIcon from "cozy-ui/transpiled/react/Icons/Dots";
12
12
  import HeartIcon from "cozy-ui/transpiled/react/Icons/Heart";
13
+ import HomeIcon from "cozy-ui/transpiled/react/Icons/Home";
13
14
  import PeopleIcon from "cozy-ui/transpiled/react/Icons/People";
14
15
  import TeamIcon from "cozy-ui/transpiled/react/Icons/Team";
15
16
  import WorkIcon from "cozy-ui/transpiled/react/Icons/Work";
16
- import HomeIcon from "cozy-ui/transpiled/react/Icons/Home";
17
17
  import QualificationItem from "cozy-ui/transpiled/react/QualificationItem";
18
18
  import { useI18n } from "cozy-ui/transpiled/react/providers/I18n";
19
19
  var IconByName = {
@@ -32,8 +32,9 @@ var IconByName = {
32
32
  var QualificationGrid = function QualificationGrid(_ref) {
33
33
  var noUndefined = _ref.noUndefined,
34
34
  noOthers = _ref.noOthers,
35
+ noHealth = _ref.noHealth,
35
36
  onClick = _ref.onClick;
36
- var themesList = getThemesList();
37
+ var themesList = getThemesList(noHealth);
37
38
 
38
39
  var _useI18n = useI18n(),
39
40
  t = _useI18n.t;
@@ -82,6 +83,7 @@ var QualificationGrid = function QualificationGrid(_ref) {
82
83
  QualificationGrid.defaultProps = {
83
84
  noUndefined: false,
84
85
  noOthers: false,
86
+ noHealth: false,
85
87
  onClick: function onClick() {}
86
88
  };
87
89
  QualificationGrid.propTypes = {
@@ -91,6 +93,9 @@ QualificationGrid.propTypes = {
91
93
  /** Remove `others` theme */
92
94
  noOthers: PropTypes.bool,
93
95
 
96
+ /** Remove `health` theme */
97
+ noHealth: PropTypes.bool,
98
+
94
99
  /** Triggered when an item is clicked */
95
100
  onClick: PropTypes.func
96
101
  };