@panneau/form-auth 1.0.0-alpha.240 → 1.0.0-alpha.241
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/es/index.js +52 -1
- package/lib/index.js +52 -0
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -6,6 +6,57 @@ import React from 'react';
|
|
|
6
6
|
import { FormattedMessage } from 'react-intl';
|
|
7
7
|
import { Link } from 'react-router-dom';
|
|
8
8
|
|
|
9
|
+
var _excluded$5 = ["action", "fields", "size", "passwordLabel", "submitButtonLabel"];
|
|
10
|
+
var propTypes$5 = {
|
|
11
|
+
action: PropTypes.string,
|
|
12
|
+
fields: PropTypes$1.fields,
|
|
13
|
+
size: PropTypes.string,
|
|
14
|
+
passwordLabel: PropTypes$1.label,
|
|
15
|
+
submitButtonLabel: PropTypes$1.label
|
|
16
|
+
};
|
|
17
|
+
var defaultProps$5 = {
|
|
18
|
+
action: '/user/confirm-password',
|
|
19
|
+
fields: null,
|
|
20
|
+
size: 'lg',
|
|
21
|
+
passwordLabel: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
22
|
+
id: "B1h3gd",
|
|
23
|
+
defaultMessage: [{
|
|
24
|
+
"type": 0,
|
|
25
|
+
"value": "Please enter your password to continue"
|
|
26
|
+
}]
|
|
27
|
+
}),
|
|
28
|
+
submitButtonLabel: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
29
|
+
id: "RRwdkV",
|
|
30
|
+
defaultMessage: [{
|
|
31
|
+
"type": 0,
|
|
32
|
+
"value": "Contnue"
|
|
33
|
+
}]
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var ConfirmPassword = function ConfirmPassword(_ref) {
|
|
38
|
+
var action = _ref.action,
|
|
39
|
+
fields = _ref.fields,
|
|
40
|
+
size = _ref.size,
|
|
41
|
+
passwordLabel = _ref.passwordLabel,
|
|
42
|
+
submitButtonLabel = _ref.submitButtonLabel,
|
|
43
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
44
|
+
|
|
45
|
+
return /*#__PURE__*/React.createElement(Form, Object.assign({
|
|
46
|
+
action: action,
|
|
47
|
+
fields: fields || [{
|
|
48
|
+
name: 'password',
|
|
49
|
+
type: 'password',
|
|
50
|
+
size: size,
|
|
51
|
+
label: passwordLabel
|
|
52
|
+
}],
|
|
53
|
+
submitButtonLabel: submitButtonLabel
|
|
54
|
+
}, props));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
ConfirmPassword.propTypes = propTypes$5;
|
|
58
|
+
ConfirmPassword.defaultProps = defaultProps$5;
|
|
59
|
+
|
|
9
60
|
var _excluded$4 = ["action", "fields", "emailLabel", "submitButtonLabel", "size", "withLoginLink", "loginLink", "loginLabel"];
|
|
10
61
|
var propTypes$4 = {
|
|
11
62
|
action: PropTypes.string,
|
|
@@ -401,4 +452,4 @@ var TwoFactor = function TwoFactor(_ref) {
|
|
|
401
452
|
TwoFactor.propTypes = propTypes;
|
|
402
453
|
TwoFactor.defaultProps = defaultProps;
|
|
403
454
|
|
|
404
|
-
export { ForgotPassword, Login, Register, ResetPassword, TwoFactor };
|
|
455
|
+
export { ConfirmPassword, ForgotPassword, Login, Register, ResetPassword, TwoFactor };
|
package/lib/index.js
CHANGED
|
@@ -17,6 +17,57 @@ var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
|
|
|
17
17
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
18
18
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
19
|
|
|
20
|
+
var _excluded$5 = ["action", "fields", "size", "passwordLabel", "submitButtonLabel"];
|
|
21
|
+
var propTypes$5 = {
|
|
22
|
+
action: PropTypes__default["default"].string,
|
|
23
|
+
fields: core.PropTypes.fields,
|
|
24
|
+
size: PropTypes__default["default"].string,
|
|
25
|
+
passwordLabel: core.PropTypes.label,
|
|
26
|
+
submitButtonLabel: core.PropTypes.label
|
|
27
|
+
};
|
|
28
|
+
var defaultProps$5 = {
|
|
29
|
+
action: '/user/confirm-password',
|
|
30
|
+
fields: null,
|
|
31
|
+
size: 'lg',
|
|
32
|
+
passwordLabel: /*#__PURE__*/React__default["default"].createElement(reactIntl.FormattedMessage, {
|
|
33
|
+
id: "B1h3gd",
|
|
34
|
+
defaultMessage: [{
|
|
35
|
+
"type": 0,
|
|
36
|
+
"value": "Please enter your password to continue"
|
|
37
|
+
}]
|
|
38
|
+
}),
|
|
39
|
+
submitButtonLabel: /*#__PURE__*/React__default["default"].createElement(reactIntl.FormattedMessage, {
|
|
40
|
+
id: "RRwdkV",
|
|
41
|
+
defaultMessage: [{
|
|
42
|
+
"type": 0,
|
|
43
|
+
"value": "Contnue"
|
|
44
|
+
}]
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var ConfirmPassword = function ConfirmPassword(_ref) {
|
|
49
|
+
var action = _ref.action,
|
|
50
|
+
fields = _ref.fields,
|
|
51
|
+
size = _ref.size,
|
|
52
|
+
passwordLabel = _ref.passwordLabel,
|
|
53
|
+
submitButtonLabel = _ref.submitButtonLabel,
|
|
54
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$5);
|
|
55
|
+
|
|
56
|
+
return /*#__PURE__*/React__default["default"].createElement(Form__default["default"], Object.assign({
|
|
57
|
+
action: action,
|
|
58
|
+
fields: fields || [{
|
|
59
|
+
name: 'password',
|
|
60
|
+
type: 'password',
|
|
61
|
+
size: size,
|
|
62
|
+
label: passwordLabel
|
|
63
|
+
}],
|
|
64
|
+
submitButtonLabel: submitButtonLabel
|
|
65
|
+
}, props));
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
ConfirmPassword.propTypes = propTypes$5;
|
|
69
|
+
ConfirmPassword.defaultProps = defaultProps$5;
|
|
70
|
+
|
|
20
71
|
var _excluded$4 = ["action", "fields", "emailLabel", "submitButtonLabel", "size", "withLoginLink", "loginLink", "loginLabel"];
|
|
21
72
|
var propTypes$4 = {
|
|
22
73
|
action: PropTypes__default["default"].string,
|
|
@@ -412,6 +463,7 @@ var TwoFactor = function TwoFactor(_ref) {
|
|
|
412
463
|
TwoFactor.propTypes = propTypes;
|
|
413
464
|
TwoFactor.defaultProps = defaultProps;
|
|
414
465
|
|
|
466
|
+
exports.ConfirmPassword = ConfirmPassword;
|
|
415
467
|
exports.ForgotPassword = ForgotPassword;
|
|
416
468
|
exports.Login = Login;
|
|
417
469
|
exports.Register = Register;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/form-auth",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.241",
|
|
4
4
|
"description": "Basic forgot password form",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "8f58a72c8bfeaca5418c85c53f78434e454a27de"
|
|
61
61
|
}
|