@panneau/form-auth 1.0.0-alpha.244 → 1.0.0-alpha.245

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 CHANGED
@@ -324,11 +324,12 @@ var Register = function Register(_ref) {
324
324
  Register.propTypes = propTypes$4;
325
325
  Register.defaultProps = defaultProps$4;
326
326
 
327
- var _excluded$3 = ["action", "fields", "size", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
327
+ var _excluded$3 = ["action", "fields", "size", "currentPasswordLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
328
328
  var propTypes$3 = {
329
329
  action: PropTypes.string,
330
330
  fields: PropTypes$1.fields,
331
331
  size: PropTypes.string,
332
+ currentPasswordLabel: PropTypes$1.label,
332
333
  passwordLabel: PropTypes$1.label,
333
334
  passwordConfirmationLabel: PropTypes$1.label,
334
335
  submitButtonLabel: PropTypes$1.label
@@ -337,6 +338,13 @@ var defaultProps$3 = {
337
338
  action: '/reset-password',
338
339
  fields: null,
339
340
  size: 'lg',
341
+ currentPasswordLabel: /*#__PURE__*/React.createElement(FormattedMessage, {
342
+ id: "8LSb8C",
343
+ defaultMessage: [{
344
+ "type": 0,
345
+ "value": "Current password"
346
+ }]
347
+ }),
340
348
  passwordLabel: /*#__PURE__*/React.createElement(FormattedMessage, {
341
349
  id: "4yfet+",
342
350
  defaultMessage: [{
@@ -364,6 +372,7 @@ var ResetPassword = function ResetPassword(_ref) {
364
372
  var action = _ref.action,
365
373
  fields = _ref.fields,
366
374
  size = _ref.size,
375
+ currentPasswordLabel = _ref.currentPasswordLabel,
367
376
  passwordLabel = _ref.passwordLabel,
368
377
  passwordConfirmationLabel = _ref.passwordConfirmationLabel,
369
378
  submitButtonLabel = _ref.submitButtonLabel,
@@ -372,6 +381,11 @@ var ResetPassword = function ResetPassword(_ref) {
372
381
  return /*#__PURE__*/React.createElement(Form, Object.assign({
373
382
  action: action,
374
383
  fields: fields || [{
384
+ name: 'current_password',
385
+ type: 'password',
386
+ size: size,
387
+ label: currentPasswordLabel
388
+ }, {
375
389
  name: 'password',
376
390
  type: 'password',
377
391
  size: size,
package/lib/index.js CHANGED
@@ -335,11 +335,12 @@ var Register = function Register(_ref) {
335
335
  Register.propTypes = propTypes$4;
336
336
  Register.defaultProps = defaultProps$4;
337
337
 
338
- var _excluded$3 = ["action", "fields", "size", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
338
+ var _excluded$3 = ["action", "fields", "size", "currentPasswordLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
339
339
  var propTypes$3 = {
340
340
  action: PropTypes__default["default"].string,
341
341
  fields: core.PropTypes.fields,
342
342
  size: PropTypes__default["default"].string,
343
+ currentPasswordLabel: core.PropTypes.label,
343
344
  passwordLabel: core.PropTypes.label,
344
345
  passwordConfirmationLabel: core.PropTypes.label,
345
346
  submitButtonLabel: core.PropTypes.label
@@ -348,6 +349,13 @@ var defaultProps$3 = {
348
349
  action: '/reset-password',
349
350
  fields: null,
350
351
  size: 'lg',
352
+ currentPasswordLabel: /*#__PURE__*/React__default["default"].createElement(reactIntl.FormattedMessage, {
353
+ id: "8LSb8C",
354
+ defaultMessage: [{
355
+ "type": 0,
356
+ "value": "Current password"
357
+ }]
358
+ }),
351
359
  passwordLabel: /*#__PURE__*/React__default["default"].createElement(reactIntl.FormattedMessage, {
352
360
  id: "4yfet+",
353
361
  defaultMessage: [{
@@ -375,6 +383,7 @@ var ResetPassword = function ResetPassword(_ref) {
375
383
  var action = _ref.action,
376
384
  fields = _ref.fields,
377
385
  size = _ref.size,
386
+ currentPasswordLabel = _ref.currentPasswordLabel,
378
387
  passwordLabel = _ref.passwordLabel,
379
388
  passwordConfirmationLabel = _ref.passwordConfirmationLabel,
380
389
  submitButtonLabel = _ref.submitButtonLabel,
@@ -383,6 +392,11 @@ var ResetPassword = function ResetPassword(_ref) {
383
392
  return /*#__PURE__*/React__default["default"].createElement(Form__default["default"], Object.assign({
384
393
  action: action,
385
394
  fields: fields || [{
395
+ name: 'current_password',
396
+ type: 'password',
397
+ size: size,
398
+ label: currentPasswordLabel
399
+ }, {
386
400
  name: 'password',
387
401
  type: 'password',
388
402
  size: size,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-auth",
3
- "version": "1.0.0-alpha.244",
3
+ "version": "1.0.0-alpha.245",
4
4
  "description": "Basic forgot password form",
5
5
  "keywords": [
6
6
  "javascript"
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "40423ad8eeecd026bf1d9e571ad5f18b68431869"
61
+ "gitHead": "9d948c9236716fbb3e1d2dbb36bb392ccaee63a6"
62
62
  }