@panneau/form-auth 1.0.0-alpha.237 → 1.0.0-alpha.238
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 +15 -14
- package/lib/index.js +15 -14
- package/package.json +7 -5
package/es/index.js
CHANGED
|
@@ -4,17 +4,18 @@ import Form from '@panneau/form';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { FormattedMessage } from 'react-intl';
|
|
7
|
+
import { Link } from 'react-router-dom';
|
|
7
8
|
|
|
8
9
|
var _excluded$2 = ["action", "fields", "emailLabel", "submitButtonLabel", "size", "withLoginLink", "loginLink", "loginLabel"];
|
|
9
10
|
var propTypes$2 = {
|
|
10
11
|
action: PropTypes.string.isRequired,
|
|
11
12
|
fields: PropTypes$1.fields,
|
|
12
13
|
size: PropTypes.string,
|
|
13
|
-
emailLabel: PropTypes$1.
|
|
14
|
-
submitButtonLabel: PropTypes$1.
|
|
14
|
+
emailLabel: PropTypes$1.label,
|
|
15
|
+
submitButtonLabel: PropTypes$1.label,
|
|
15
16
|
withLoginLink: PropTypes.bool,
|
|
16
17
|
loginLink: PropTypes.string,
|
|
17
|
-
loginLabel: PropTypes$1.
|
|
18
|
+
loginLabel: PropTypes$1.label
|
|
18
19
|
};
|
|
19
20
|
var defaultProps$2 = {
|
|
20
21
|
fields: null,
|
|
@@ -64,9 +65,9 @@ var ForgotPassword = function ForgotPassword(_ref) {
|
|
|
64
65
|
label: emailLabel
|
|
65
66
|
}],
|
|
66
67
|
submitButtonLabel: submitButtonLabel,
|
|
67
|
-
actions: withLoginLink ? /*#__PURE__*/React.createElement(
|
|
68
|
+
actions: withLoginLink ? /*#__PURE__*/React.createElement(Link, {
|
|
68
69
|
className: "py-2 px-5",
|
|
69
|
-
|
|
70
|
+
to: loginLink
|
|
70
71
|
}, loginLabel) : null
|
|
71
72
|
}, props));
|
|
72
73
|
};
|
|
@@ -79,12 +80,12 @@ var propTypes$1 = {
|
|
|
79
80
|
action: PropTypes.string,
|
|
80
81
|
fields: PropTypes$1.fields,
|
|
81
82
|
size: PropTypes.string,
|
|
82
|
-
emailLabel: PropTypes$1.
|
|
83
|
-
passwordLabel: PropTypes$1.
|
|
84
|
-
submitButtonLabel: PropTypes$1.
|
|
83
|
+
emailLabel: PropTypes$1.label,
|
|
84
|
+
passwordLabel: PropTypes$1.label,
|
|
85
|
+
submitButtonLabel: PropTypes$1.label,
|
|
85
86
|
withForgotPassword: PropTypes.bool,
|
|
86
87
|
forgotPasswordLink: PropTypes.string,
|
|
87
|
-
forgotPasswordLabel: PropTypes$1.
|
|
88
|
+
forgotPasswordLabel: PropTypes$1.label
|
|
88
89
|
};
|
|
89
90
|
var defaultProps$1 = {
|
|
90
91
|
action: '/login',
|
|
@@ -148,9 +149,9 @@ var LoginForm = function LoginForm(_ref) {
|
|
|
148
149
|
label: passwordLabel
|
|
149
150
|
}],
|
|
150
151
|
submitButtonLabel: submitButtonLabel,
|
|
151
|
-
actions: withForgotPassword ? /*#__PURE__*/React.createElement(
|
|
152
|
+
actions: withForgotPassword ? /*#__PURE__*/React.createElement(Link, {
|
|
152
153
|
className: "py-2 px-5",
|
|
153
|
-
|
|
154
|
+
to: forgotPasswordLink
|
|
154
155
|
}, forgotPasswordLabel) : null
|
|
155
156
|
}, props));
|
|
156
157
|
};
|
|
@@ -163,9 +164,9 @@ var propTypes = {
|
|
|
163
164
|
action: PropTypes.string.isRequired,
|
|
164
165
|
fields: PropTypes$1.fields,
|
|
165
166
|
size: PropTypes.string,
|
|
166
|
-
passwordLabel: PropTypes$1.
|
|
167
|
-
passwordConfirmationLabel: PropTypes$1.
|
|
168
|
-
submitButtonLabel: PropTypes$1.
|
|
167
|
+
passwordLabel: PropTypes$1.label,
|
|
168
|
+
passwordConfirmationLabel: PropTypes$1.label,
|
|
169
|
+
submitButtonLabel: PropTypes$1.label
|
|
169
170
|
};
|
|
170
171
|
var defaultProps = {
|
|
171
172
|
fields: null,
|
package/lib/index.js
CHANGED
|
@@ -8,6 +8,7 @@ var Form = require('@panneau/form');
|
|
|
8
8
|
var PropTypes = require('prop-types');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
var reactIntl = require('react-intl');
|
|
11
|
+
var reactRouterDom = require('react-router-dom');
|
|
11
12
|
|
|
12
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
14
|
|
|
@@ -21,11 +22,11 @@ var propTypes$2 = {
|
|
|
21
22
|
action: PropTypes__default["default"].string.isRequired,
|
|
22
23
|
fields: core.PropTypes.fields,
|
|
23
24
|
size: PropTypes__default["default"].string,
|
|
24
|
-
emailLabel: core.PropTypes.
|
|
25
|
-
submitButtonLabel: core.PropTypes.
|
|
25
|
+
emailLabel: core.PropTypes.label,
|
|
26
|
+
submitButtonLabel: core.PropTypes.label,
|
|
26
27
|
withLoginLink: PropTypes__default["default"].bool,
|
|
27
28
|
loginLink: PropTypes__default["default"].string,
|
|
28
|
-
loginLabel: core.PropTypes.
|
|
29
|
+
loginLabel: core.PropTypes.label
|
|
29
30
|
};
|
|
30
31
|
var defaultProps$2 = {
|
|
31
32
|
fields: null,
|
|
@@ -75,9 +76,9 @@ var ForgotPassword = function ForgotPassword(_ref) {
|
|
|
75
76
|
label: emailLabel
|
|
76
77
|
}],
|
|
77
78
|
submitButtonLabel: submitButtonLabel,
|
|
78
|
-
actions: withLoginLink ? /*#__PURE__*/React__default["default"].createElement(
|
|
79
|
+
actions: withLoginLink ? /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
79
80
|
className: "py-2 px-5",
|
|
80
|
-
|
|
81
|
+
to: loginLink
|
|
81
82
|
}, loginLabel) : null
|
|
82
83
|
}, props));
|
|
83
84
|
};
|
|
@@ -90,12 +91,12 @@ var propTypes$1 = {
|
|
|
90
91
|
action: PropTypes__default["default"].string,
|
|
91
92
|
fields: core.PropTypes.fields,
|
|
92
93
|
size: PropTypes__default["default"].string,
|
|
93
|
-
emailLabel: core.PropTypes.
|
|
94
|
-
passwordLabel: core.PropTypes.
|
|
95
|
-
submitButtonLabel: core.PropTypes.
|
|
94
|
+
emailLabel: core.PropTypes.label,
|
|
95
|
+
passwordLabel: core.PropTypes.label,
|
|
96
|
+
submitButtonLabel: core.PropTypes.label,
|
|
96
97
|
withForgotPassword: PropTypes__default["default"].bool,
|
|
97
98
|
forgotPasswordLink: PropTypes__default["default"].string,
|
|
98
|
-
forgotPasswordLabel: core.PropTypes.
|
|
99
|
+
forgotPasswordLabel: core.PropTypes.label
|
|
99
100
|
};
|
|
100
101
|
var defaultProps$1 = {
|
|
101
102
|
action: '/login',
|
|
@@ -159,9 +160,9 @@ var LoginForm = function LoginForm(_ref) {
|
|
|
159
160
|
label: passwordLabel
|
|
160
161
|
}],
|
|
161
162
|
submitButtonLabel: submitButtonLabel,
|
|
162
|
-
actions: withForgotPassword ? /*#__PURE__*/React__default["default"].createElement(
|
|
163
|
+
actions: withForgotPassword ? /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
163
164
|
className: "py-2 px-5",
|
|
164
|
-
|
|
165
|
+
to: forgotPasswordLink
|
|
165
166
|
}, forgotPasswordLabel) : null
|
|
166
167
|
}, props));
|
|
167
168
|
};
|
|
@@ -174,9 +175,9 @@ var propTypes = {
|
|
|
174
175
|
action: PropTypes__default["default"].string.isRequired,
|
|
175
176
|
fields: core.PropTypes.fields,
|
|
176
177
|
size: PropTypes__default["default"].string,
|
|
177
|
-
passwordLabel: core.PropTypes.
|
|
178
|
-
passwordConfirmationLabel: core.PropTypes.
|
|
179
|
-
submitButtonLabel: core.PropTypes.
|
|
178
|
+
passwordLabel: core.PropTypes.label,
|
|
179
|
+
passwordConfirmationLabel: core.PropTypes.label,
|
|
180
|
+
submitButtonLabel: core.PropTypes.label
|
|
180
181
|
};
|
|
181
182
|
var defaultProps = {
|
|
182
183
|
fields: null,
|
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.238",
|
|
4
4
|
"description": "Basic forgot password form",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -41,19 +41,21 @@
|
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "^16.8.0 || ^17.0.0",
|
|
44
|
-
"react-dom": "^16.8.0 || ^17.0.0"
|
|
44
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
45
|
+
"react-router-dom": "^5.0.0 || ^6.2.1"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
48
|
"@babel/runtime": "^7.12.5",
|
|
48
49
|
"@panneau/core": "^1.0.0-alpha.237",
|
|
49
|
-
"@panneau/form": "^1.0.0-alpha.
|
|
50
|
+
"@panneau/form": "^1.0.0-alpha.238",
|
|
50
51
|
"classnames": "^2.2.6",
|
|
51
52
|
"lodash": "^4.17.21",
|
|
52
53
|
"prop-types": "^15.7.2",
|
|
53
|
-
"react-intl": "^5.15.8"
|
|
54
|
+
"react-intl": "^5.15.8",
|
|
55
|
+
"react-router-dom": "^5.2.0 || ^6.2.1"
|
|
54
56
|
},
|
|
55
57
|
"publishConfig": {
|
|
56
58
|
"access": "public"
|
|
57
59
|
},
|
|
58
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "5880be043483f24d405a1805b70019c25b96573d"
|
|
59
61
|
}
|