cozy-ui-plus 2.1.0 → 2.1.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 +6 -0
- package/dist/Paywall/MaxAccountsByKonnectorPaywall.js +10 -3
- package/dist/Paywall/MaxAccountsPaywall.js +10 -3
- package/dist/Paywall/MaxDaysToCapturePaywall.js +10 -3
- package/dist/Paywall/MaxPapersPaywall.js +10 -3
- package/dist/Paywall/OnlyOfficePaywall.js +10 -3
- package/dist/Paywall/PasswordSharingPaywall.js +10 -3
- package/dist/Paywall/QuotaPaywall.js +10 -3
- package/dist/src/Paywall/OnlyOfficePaywall.d.ts +2 -1
- package/dist/src/Paywall/PasswordSharingPaywall.d.ts +2 -1
- package/dist/src/Paywall/QuotaPaywall.d.ts +2 -1
- package/package.json +2 -2
- package/src/Paywall/MaxAccountsByKonnectorPaywall.jsx +7 -1
- package/src/Paywall/MaxAccountsPaywall.jsx +2 -1
- package/src/Paywall/MaxDaysToCapturePaywall.jsx +2 -1
- package/src/Paywall/MaxPapersPaywall.jsx +2 -1
- package/src/Paywall/OnlyOfficePaywall.jsx +9 -2
- package/src/Paywall/PasswordSharingPaywall.jsx +7 -2
- package/src/Paywall/QuotaPaywall.jsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
## [2.1.1](https://github.com/cozy/cozy-libs/compare/cozy-ui-plus@2.1.0...cozy-ui-plus@2.1.1) (2025-11-05)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **ui-plus:** Now spread props between Paywall and its subcomponents ([a86cf6a](https://github.com/cozy/cozy-libs/commit/a86cf6a353c1d64173226756147a3060f0a41ecc))
|
|
11
|
+
|
|
6
12
|
# [2.1.0](https://github.com/cozy/cozy-libs/compare/cozy-ui-plus@2.0.0...cozy-ui-plus@2.1.0) (2025-11-05)
|
|
7
13
|
|
|
8
14
|
### Features
|
|
@@ -7,6 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
15
|
|
|
12
16
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -15,21 +19,24 @@ var _Paywall = _interopRequireDefault(require("./Paywall"));
|
|
|
15
19
|
|
|
16
20
|
var _withPaywallLocales = _interopRequireDefault(require("./locales/withPaywallLocales"));
|
|
17
21
|
|
|
22
|
+
var _excluded = ["max", "konnectorName", "onClose"];
|
|
23
|
+
|
|
18
24
|
/**
|
|
19
25
|
* Paywall displayed when the user reach the maximum accounts allowed for a konnector
|
|
20
26
|
*/
|
|
21
27
|
var MaxAccountsByKonnectorPaywall = function MaxAccountsByKonnectorPaywall(_ref) {
|
|
22
28
|
var max = _ref.max,
|
|
23
29
|
konnectorName = _ref.konnectorName,
|
|
24
|
-
onClose = _ref.onClose
|
|
25
|
-
|
|
30
|
+
onClose = _ref.onClose,
|
|
31
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_Paywall.default, (0, _extends2.default)({
|
|
26
33
|
variant: "maxAccountsByKonnector",
|
|
27
34
|
contentInterpolation: {
|
|
28
35
|
smart_count: max,
|
|
29
36
|
konnectorName: konnectorName
|
|
30
37
|
},
|
|
31
38
|
onClose: onClose
|
|
32
|
-
});
|
|
39
|
+
}, props));
|
|
33
40
|
};
|
|
34
41
|
|
|
35
42
|
MaxAccountsByKonnectorPaywall.propTypes = {
|
|
@@ -7,6 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
15
|
|
|
12
16
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -15,19 +19,22 @@ var _Paywall = _interopRequireDefault(require("./Paywall"));
|
|
|
15
19
|
|
|
16
20
|
var _withPaywallLocales = _interopRequireDefault(require("./locales/withPaywallLocales"));
|
|
17
21
|
|
|
22
|
+
var _excluded = ["max", "onClose"];
|
|
23
|
+
|
|
18
24
|
/**
|
|
19
25
|
* Paywall displayed when the user reach the maximum accounts allowed for all konnectors
|
|
20
26
|
*/
|
|
21
27
|
var MaxAccountsPaywall = function MaxAccountsPaywall(_ref) {
|
|
22
28
|
var max = _ref.max,
|
|
23
|
-
onClose = _ref.onClose
|
|
24
|
-
|
|
29
|
+
onClose = _ref.onClose,
|
|
30
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_Paywall.default, (0, _extends2.default)({
|
|
25
32
|
variant: "maxAccounts",
|
|
26
33
|
contentInterpolation: {
|
|
27
34
|
smart_count: max
|
|
28
35
|
},
|
|
29
36
|
onClose: onClose
|
|
30
|
-
});
|
|
37
|
+
}, props));
|
|
31
38
|
};
|
|
32
39
|
|
|
33
40
|
MaxAccountsPaywall.propTypes = {
|
|
@@ -7,6 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
15
|
|
|
12
16
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -15,19 +19,22 @@ var _Paywall = _interopRequireDefault(require("./Paywall"));
|
|
|
15
19
|
|
|
16
20
|
var _withPaywallLocales = _interopRequireDefault(require("./locales/withPaywallLocales"));
|
|
17
21
|
|
|
22
|
+
var _excluded = ["days", "onClose"];
|
|
23
|
+
|
|
18
24
|
/**
|
|
19
25
|
* Paywall displayed when the user reach the maximum days allowed of capture geolocated data
|
|
20
26
|
*/
|
|
21
27
|
var MaxDaysToCapturePaywall = function MaxDaysToCapturePaywall(_ref) {
|
|
22
28
|
var days = _ref.days,
|
|
23
|
-
onClose = _ref.onClose
|
|
24
|
-
|
|
29
|
+
onClose = _ref.onClose,
|
|
30
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_Paywall.default, (0, _extends2.default)({
|
|
25
32
|
variant: "maxDaysToCapture",
|
|
26
33
|
contentInterpolation: {
|
|
27
34
|
smart_count: days
|
|
28
35
|
},
|
|
29
36
|
onClose: onClose
|
|
30
|
-
});
|
|
37
|
+
}, props));
|
|
31
38
|
};
|
|
32
39
|
|
|
33
40
|
MaxDaysToCapturePaywall.propTypes = {
|
|
@@ -7,6 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
15
|
|
|
12
16
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -15,6 +19,8 @@ var _Paywall = _interopRequireDefault(require("./Paywall"));
|
|
|
15
19
|
|
|
16
20
|
var _withPaywallLocales = _interopRequireDefault(require("./locales/withPaywallLocales"));
|
|
17
21
|
|
|
22
|
+
var _excluded = ["max", "onClose"];
|
|
23
|
+
|
|
18
24
|
/**
|
|
19
25
|
* Paywall displayed when the user reaches the maximum number of papers created via the Mespapiers application.
|
|
20
26
|
*
|
|
@@ -24,14 +30,15 @@ var _withPaywallLocales = _interopRequireDefault(require("./locales/withPaywallL
|
|
|
24
30
|
*/
|
|
25
31
|
var MaxPapersPaywall = function MaxPapersPaywall(_ref) {
|
|
26
32
|
var max = _ref.max,
|
|
27
|
-
onClose = _ref.onClose
|
|
28
|
-
|
|
33
|
+
onClose = _ref.onClose,
|
|
34
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_Paywall.default, (0, _extends2.default)({
|
|
29
36
|
variant: "maxPapers",
|
|
30
37
|
contentInterpolation: {
|
|
31
38
|
smart_count: max
|
|
32
39
|
},
|
|
33
40
|
onClose: onClose
|
|
34
|
-
});
|
|
41
|
+
}, props));
|
|
35
42
|
};
|
|
36
43
|
|
|
37
44
|
MaxPapersPaywall.propTypes = {
|
|
@@ -7,20 +7,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
15
|
|
|
12
16
|
var _react = _interopRequireDefault(require("react"));
|
|
13
17
|
|
|
14
18
|
var _Paywall = _interopRequireDefault(require("./Paywall"));
|
|
15
19
|
|
|
20
|
+
var _excluded = ["onClose", "isPublic"];
|
|
21
|
+
|
|
16
22
|
var OnlyOfficePaywall = function OnlyOfficePaywall(_ref) {
|
|
17
23
|
var onClose = _ref.onClose,
|
|
18
|
-
isPublic = _ref.isPublic
|
|
19
|
-
|
|
24
|
+
isPublic = _ref.isPublic,
|
|
25
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_Paywall.default, (0, _extends2.default)({
|
|
20
27
|
variant: "onlyOffice",
|
|
21
28
|
onClose: onClose,
|
|
22
29
|
isPublic: isPublic
|
|
23
|
-
});
|
|
30
|
+
}, props));
|
|
24
31
|
};
|
|
25
32
|
/**
|
|
26
33
|
* Paywall displayed when the user is not authorised to access OnlyOffice
|
|
@@ -7,19 +7,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
15
|
|
|
12
16
|
var _react = _interopRequireDefault(require("react"));
|
|
13
17
|
|
|
14
18
|
var _Paywall = _interopRequireDefault(require("./Paywall"));
|
|
15
19
|
|
|
20
|
+
var _excluded = ["onClose"];
|
|
21
|
+
|
|
16
22
|
var PasswordSharingPaywall = function PasswordSharingPaywall(_ref) {
|
|
17
|
-
var onClose = _ref.onClose
|
|
18
|
-
|
|
23
|
+
var onClose = _ref.onClose,
|
|
24
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_Paywall.default, (0, _extends2.default)({
|
|
19
26
|
variant: "passwordSharing",
|
|
20
27
|
onClose: onClose,
|
|
21
28
|
isPublic: false
|
|
22
|
-
});
|
|
29
|
+
}, props));
|
|
23
30
|
};
|
|
24
31
|
/**
|
|
25
32
|
* Paywall displayed when the user is not authorised to share password
|
|
@@ -7,21 +7,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
15
|
|
|
12
16
|
var _react = _interopRequireDefault(require("react"));
|
|
13
17
|
|
|
14
18
|
var _Paywall = _interopRequireDefault(require("./Paywall"));
|
|
15
19
|
|
|
20
|
+
var _excluded = ["onClose"];
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* Paywall displayed when user disk space is full
|
|
18
24
|
*/
|
|
19
25
|
var QuotaPaywall = function QuotaPaywall(_ref) {
|
|
20
|
-
var onClose = _ref.onClose
|
|
21
|
-
|
|
26
|
+
var onClose = _ref.onClose,
|
|
27
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_Paywall.default, (0, _extends2.default)({
|
|
22
29
|
variant: "quota",
|
|
23
30
|
onClose: onClose
|
|
24
|
-
});
|
|
31
|
+
}, props));
|
|
25
32
|
};
|
|
26
33
|
|
|
27
34
|
QuotaPaywall.propTypes = {
|
|
@@ -2,7 +2,8 @@ export default QuotaPaywall;
|
|
|
2
2
|
/**
|
|
3
3
|
* Paywall displayed when user disk space is full
|
|
4
4
|
*/
|
|
5
|
-
declare function QuotaPaywall({ onClose }: {
|
|
5
|
+
declare function QuotaPaywall({ onClose, ...props }: {
|
|
6
|
+
[x: string]: any;
|
|
6
7
|
onClose: any;
|
|
7
8
|
}): JSX.Element;
|
|
8
9
|
declare namespace QuotaPaywall {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui-plus",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Cozy-ui-plus is an extension of cozy-ui and provides components based on cozy-client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"react": "^16 || ^17 || ^18",
|
|
73
73
|
"react-dom": "^16 || ^17 || ^18"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "c53696d649980df8a8780451c87c29bc005cea1e"
|
|
76
76
|
}
|
|
@@ -7,7 +7,12 @@ import withPaywallLocales from './locales/withPaywallLocales'
|
|
|
7
7
|
/**
|
|
8
8
|
* Paywall displayed when the user reach the maximum accounts allowed for a konnector
|
|
9
9
|
*/
|
|
10
|
-
const MaxAccountsByKonnectorPaywall = ({
|
|
10
|
+
const MaxAccountsByKonnectorPaywall = ({
|
|
11
|
+
max,
|
|
12
|
+
konnectorName,
|
|
13
|
+
onClose,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
11
16
|
return (
|
|
12
17
|
<Paywall
|
|
13
18
|
variant="maxAccountsByKonnector"
|
|
@@ -16,6 +21,7 @@ const MaxAccountsByKonnectorPaywall = ({ max, konnectorName, onClose }) => {
|
|
|
16
21
|
konnectorName
|
|
17
22
|
}}
|
|
18
23
|
onClose={onClose}
|
|
24
|
+
{...props}
|
|
19
25
|
/>
|
|
20
26
|
)
|
|
21
27
|
}
|
|
@@ -7,12 +7,13 @@ import withPaywallLocales from './locales/withPaywallLocales'
|
|
|
7
7
|
/**
|
|
8
8
|
* Paywall displayed when the user reach the maximum accounts allowed for all konnectors
|
|
9
9
|
*/
|
|
10
|
-
const MaxAccountsPaywall = ({ max, onClose }) => {
|
|
10
|
+
const MaxAccountsPaywall = ({ max, onClose, ...props }) => {
|
|
11
11
|
return (
|
|
12
12
|
<Paywall
|
|
13
13
|
variant="maxAccounts"
|
|
14
14
|
contentInterpolation={{ smart_count: max }}
|
|
15
15
|
onClose={onClose}
|
|
16
|
+
{...props}
|
|
16
17
|
/>
|
|
17
18
|
)
|
|
18
19
|
}
|
|
@@ -7,12 +7,13 @@ import withPaywallLocales from './locales/withPaywallLocales'
|
|
|
7
7
|
/**
|
|
8
8
|
* Paywall displayed when the user reach the maximum days allowed of capture geolocated data
|
|
9
9
|
*/
|
|
10
|
-
const MaxDaysToCapturePaywall = ({ days, onClose }) => {
|
|
10
|
+
const MaxDaysToCapturePaywall = ({ days, onClose, ...props }) => {
|
|
11
11
|
return (
|
|
12
12
|
<Paywall
|
|
13
13
|
variant="maxDaysToCapture"
|
|
14
14
|
contentInterpolation={{ smart_count: days }}
|
|
15
15
|
onClose={onClose}
|
|
16
|
+
{...props}
|
|
16
17
|
/>
|
|
17
18
|
)
|
|
18
19
|
}
|
|
@@ -11,12 +11,13 @@ import withPaywallLocales from './locales/withPaywallLocales'
|
|
|
11
11
|
* @param {function} onClose - Callback used when the user close the paywall
|
|
12
12
|
* @returns {React.Component} - React component
|
|
13
13
|
*/
|
|
14
|
-
const MaxPapersPaywall = ({ max, onClose }) => {
|
|
14
|
+
const MaxPapersPaywall = ({ max, onClose, ...props }) => {
|
|
15
15
|
return (
|
|
16
16
|
<Paywall
|
|
17
17
|
variant="maxPapers"
|
|
18
18
|
contentInterpolation={{ smart_count: max }}
|
|
19
19
|
onClose={onClose}
|
|
20
|
+
{...props}
|
|
20
21
|
/>
|
|
21
22
|
)
|
|
22
23
|
}
|
|
@@ -3,8 +3,15 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import Paywall from './Paywall'
|
|
5
5
|
|
|
6
|
-
const OnlyOfficePaywall = ({ onClose, isPublic }) => {
|
|
7
|
-
return
|
|
6
|
+
const OnlyOfficePaywall = ({ onClose, isPublic, ...props }) => {
|
|
7
|
+
return (
|
|
8
|
+
<Paywall
|
|
9
|
+
variant="onlyOffice"
|
|
10
|
+
onClose={onClose}
|
|
11
|
+
isPublic={isPublic}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
)
|
|
8
15
|
}
|
|
9
16
|
|
|
10
17
|
/**
|
|
@@ -3,9 +3,14 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import Paywall from './Paywall'
|
|
5
5
|
|
|
6
|
-
const PasswordSharingPaywall = ({ onClose }) => {
|
|
6
|
+
const PasswordSharingPaywall = ({ onClose, ...props }) => {
|
|
7
7
|
return (
|
|
8
|
-
<Paywall
|
|
8
|
+
<Paywall
|
|
9
|
+
variant="passwordSharing"
|
|
10
|
+
onClose={onClose}
|
|
11
|
+
isPublic={false}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
9
14
|
)
|
|
10
15
|
}
|
|
11
16
|
|
|
@@ -6,8 +6,8 @@ import Paywall from './Paywall'
|
|
|
6
6
|
/**
|
|
7
7
|
* Paywall displayed when user disk space is full
|
|
8
8
|
*/
|
|
9
|
-
const QuotaPaywall = ({ onClose }) => {
|
|
10
|
-
return <Paywall variant="quota" onClose={onClose} />
|
|
9
|
+
const QuotaPaywall = ({ onClose, ...props }) => {
|
|
10
|
+
return <Paywall variant="quota" onClose={onClose} {...props} />
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
QuotaPaywall.propTypes = {
|