@panneau/form-auth 3.0.223 → 3.0.224

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.
Files changed (2) hide show
  1. package/package.json +9 -6
  2. package/lib/index.js +0 -670
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/form-auth",
3
- "version": "3.0.223",
3
+ "version": "3.0.224",
4
4
  "description": "Basic forgot password form",
5
5
  "keywords": [
6
6
  "javascript"
@@ -25,8 +25,11 @@
25
25
  }
26
26
  ],
27
27
  "license": "ISC",
28
- "main": "lib/index.js",
28
+ "type": "module",
29
29
  "module": "es/index.js",
30
+ "exports": {
31
+ ".": "./es/index.js"
32
+ },
30
33
  "files": [
31
34
  "lib",
32
35
  "es",
@@ -47,9 +50,9 @@
47
50
  "dependencies": {
48
51
  "@babel/runtime": "^7.12.5",
49
52
  "@folklore/fetch": "^0.1.17",
50
- "@panneau/core": "^3.0.223",
51
- "@panneau/element-link": "^3.0.223",
52
- "@panneau/form": "^3.0.223",
53
+ "@panneau/core": "^3.0.224",
54
+ "@panneau/element-link": "^3.0.224",
55
+ "@panneau/form": "^3.0.224",
53
56
  "classnames": "^2.5.1",
54
57
  "lodash": "^4.17.21",
55
58
  "prop-types": "^15.7.2",
@@ -58,5 +61,5 @@
58
61
  "publishConfig": {
59
62
  "access": "public"
60
63
  },
61
- "gitHead": "14196bd955b0e44cbc214e00f3189b3216f3fa53"
64
+ "gitHead": "c95bd465867c4c7d112bf0ed66036574cc05c627"
62
65
  }
package/lib/index.js DELETED
@@ -1,670 +0,0 @@
1
- 'use strict';
2
-
3
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
4
- var core = require('@panneau/core');
5
- var Form = require('@panneau/form');
6
- var PropTypes = require('prop-types');
7
- var React = require('react');
8
- var reactIntl = require('react-intl');
9
- var Link = require('@panneau/element-link');
10
- var fetch = require('@folklore/fetch');
11
-
12
- var _excluded$8 = ["action", "fields", "size", "currentPasswordLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
13
- var propTypes$8 = {
14
- action: PropTypes.string,
15
- fields: core.PropTypes.fields,
16
- size: PropTypes.string,
17
- currentPasswordLabel: core.PropTypes.label,
18
- passwordLabel: core.PropTypes.label,
19
- passwordConfirmationLabel: core.PropTypes.label,
20
- submitButtonLabel: core.PropTypes.label
21
- };
22
- var defaultProps$8 = {
23
- action: '/user/password',
24
- fields: null,
25
- size: 'lg',
26
- currentPasswordLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
27
- id: "8LSb8C",
28
- defaultMessage: [{
29
- "type": 0,
30
- "value": "Current password"
31
- }]
32
- }),
33
- passwordLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
34
- id: "XJ1dc3",
35
- defaultMessage: [{
36
- "type": 0,
37
- "value": "New password"
38
- }]
39
- }),
40
- passwordConfirmationLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
41
- id: "DUbv+u",
42
- defaultMessage: [{
43
- "type": 0,
44
- "value": "Confirm your new password"
45
- }]
46
- }),
47
- submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
48
- id: "XW9IKQ",
49
- defaultMessage: [{
50
- "type": 0,
51
- "value": "Update password"
52
- }]
53
- })
54
- };
55
- var ChangePassword = function ChangePassword(_ref) {
56
- var action = _ref.action,
57
- fields = _ref.fields,
58
- size = _ref.size,
59
- currentPasswordLabel = _ref.currentPasswordLabel,
60
- passwordLabel = _ref.passwordLabel,
61
- passwordConfirmationLabel = _ref.passwordConfirmationLabel,
62
- submitButtonLabel = _ref.submitButtonLabel,
63
- props = _objectWithoutProperties(_ref, _excluded$8);
64
- return /*#__PURE__*/React.createElement(Form, Object.assign({
65
- action: action,
66
- method: "PUT",
67
- fields: fields || [{
68
- name: 'current_password',
69
- type: 'password',
70
- size: size,
71
- label: currentPasswordLabel
72
- }, {
73
- name: 'password',
74
- type: 'password',
75
- size: size,
76
- label: passwordLabel
77
- }, {
78
- name: 'password_confirmation',
79
- type: 'password',
80
- size: size,
81
- label: passwordConfirmationLabel
82
- }],
83
- submitButtonLabel: submitButtonLabel
84
- }, props));
85
- };
86
- ChangePassword.propTypes = propTypes$8;
87
- ChangePassword.defaultProps = defaultProps$8;
88
- var ChangePassword$1 = ChangePassword;
89
-
90
- var _excluded$7 = ["action", "fields", "size", "passwordLabel", "submitButtonLabel"];
91
- var propTypes$7 = {
92
- action: PropTypes.string,
93
- fields: core.PropTypes.fields,
94
- size: PropTypes.string,
95
- passwordLabel: core.PropTypes.label,
96
- submitButtonLabel: core.PropTypes.label
97
- };
98
- var defaultProps$7 = {
99
- action: '/user/confirm-password',
100
- fields: null,
101
- size: 'lg',
102
- passwordLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
103
- id: "B1h3gd",
104
- defaultMessage: [{
105
- "type": 0,
106
- "value": "Please enter your password to continue"
107
- }]
108
- }),
109
- submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
110
- id: "QUAHwy",
111
- defaultMessage: [{
112
- "type": 0,
113
- "value": "Continue"
114
- }]
115
- })
116
- };
117
- var ConfirmPassword = function ConfirmPassword(_ref) {
118
- var action = _ref.action,
119
- fields = _ref.fields,
120
- size = _ref.size,
121
- passwordLabel = _ref.passwordLabel,
122
- submitButtonLabel = _ref.submitButtonLabel,
123
- props = _objectWithoutProperties(_ref, _excluded$7);
124
- return /*#__PURE__*/React.createElement(Form, Object.assign({
125
- action: action,
126
- fields: fields || [{
127
- name: 'password',
128
- type: 'password',
129
- size: size,
130
- label: passwordLabel
131
- }],
132
- submitButtonLabel: submitButtonLabel
133
- }, props));
134
- };
135
- ConfirmPassword.propTypes = propTypes$7;
136
- ConfirmPassword.defaultProps = defaultProps$7;
137
- var ConfirmPassword$1 = ConfirmPassword;
138
-
139
- var _excluded$6 = ["action", "fields", "emailLabel", "submitButtonLabel", "size", "withLoginLink", "loginLink", "loginLabel"];
140
- var propTypes$6 = {
141
- action: PropTypes.string,
142
- fields: core.PropTypes.fields,
143
- size: PropTypes.string,
144
- emailLabel: core.PropTypes.label,
145
- submitButtonLabel: core.PropTypes.label,
146
- withLoginLink: PropTypes.bool,
147
- loginLink: PropTypes.string,
148
- loginLabel: core.PropTypes.label
149
- };
150
- var defaultProps$6 = {
151
- action: '/forgot-password',
152
- fields: null,
153
- size: 'lg',
154
- emailLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
155
- id: "LI0Gz4",
156
- defaultMessage: [{
157
- "type": 0,
158
- "value": "Email"
159
- }]
160
- }),
161
- submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
162
- id: "12Px0g",
163
- defaultMessage: [{
164
- "type": 0,
165
- "value": "Send reset link"
166
- }]
167
- }),
168
- withLoginLink: true,
169
- loginLink: '/login',
170
- loginLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
171
- id: "tPeIKO",
172
- defaultMessage: [{
173
- "type": 0,
174
- "value": "Go back to login"
175
- }]
176
- })
177
- };
178
- var ForgotPassword = function ForgotPassword(_ref) {
179
- var action = _ref.action,
180
- fields = _ref.fields,
181
- emailLabel = _ref.emailLabel,
182
- submitButtonLabel = _ref.submitButtonLabel,
183
- size = _ref.size,
184
- withLoginLink = _ref.withLoginLink,
185
- loginLink = _ref.loginLink,
186
- loginLabel = _ref.loginLabel,
187
- props = _objectWithoutProperties(_ref, _excluded$6);
188
- return /*#__PURE__*/React.createElement(Form, Object.assign({
189
- action: action,
190
- fields: fields || [{
191
- name: 'email',
192
- type: 'email',
193
- size: size,
194
- label: emailLabel
195
- }],
196
- submitButtonLabel: submitButtonLabel,
197
- actions: withLoginLink ? /*#__PURE__*/React.createElement(Link, {
198
- href: loginLink,
199
- className: "py-2 px-4"
200
- }, loginLabel) : null
201
- }, props));
202
- };
203
- ForgotPassword.propTypes = propTypes$6;
204
- ForgotPassword.defaultProps = defaultProps$6;
205
- var ForgotPassword$1 = ForgotPassword;
206
-
207
- var _excluded$5 = ["action", "postForm", "fields", "size", "emailLabel", "passwordLabel", "submitButtonLabel", "withForgotPassword", "forgotPasswordLink", "forgotPasswordLabel"];
208
- var propTypes$5 = {
209
- action: PropTypes.string,
210
- postForm: PropTypes.func,
211
- fields: core.PropTypes.fields,
212
- size: PropTypes.string,
213
- emailLabel: core.PropTypes.label,
214
- passwordLabel: core.PropTypes.label,
215
- submitButtonLabel: core.PropTypes.label,
216
- withForgotPassword: PropTypes.bool,
217
- forgotPasswordLink: PropTypes.string,
218
- forgotPasswordLabel: core.PropTypes.label
219
- };
220
- var defaultProps$5 = {
221
- action: '/login',
222
- postForm: null,
223
- fields: null,
224
- size: 'lg',
225
- emailLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
226
- id: "LI0Gz4",
227
- defaultMessage: [{
228
- "type": 0,
229
- "value": "Email"
230
- }]
231
- }),
232
- passwordLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
233
- id: "4yfet+",
234
- defaultMessage: [{
235
- "type": 0,
236
- "value": "Password"
237
- }]
238
- }),
239
- submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
240
- id: "g6qbbX",
241
- defaultMessage: [{
242
- "type": 0,
243
- "value": "Log in"
244
- }]
245
- }),
246
- withForgotPassword: false,
247
- forgotPasswordLink: '/forgot-password',
248
- forgotPasswordLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
249
- id: "ZBNqY2",
250
- defaultMessage: [{
251
- "type": 0,
252
- "value": "Forgot your password?"
253
- }]
254
- })
255
- };
256
- var Login = function Login(_ref) {
257
- var action = _ref.action,
258
- postForm = _ref.postForm,
259
- fields = _ref.fields,
260
- size = _ref.size,
261
- emailLabel = _ref.emailLabel,
262
- passwordLabel = _ref.passwordLabel,
263
- submitButtonLabel = _ref.submitButtonLabel,
264
- withForgotPassword = _ref.withForgotPassword,
265
- forgotPasswordLink = _ref.forgotPasswordLink,
266
- forgotPasswordLabel = _ref.forgotPasswordLabel,
267
- props = _objectWithoutProperties(_ref, _excluded$5);
268
- return /*#__PURE__*/React.createElement(Form, Object.assign({
269
- action: action,
270
- postForm: postForm,
271
- fields: fields || [{
272
- name: 'email',
273
- type: 'email',
274
- size: size,
275
- label: emailLabel
276
- }, {
277
- name: 'password',
278
- type: 'password',
279
- size: size,
280
- label: passwordLabel
281
- }],
282
- submitButtonLabel: submitButtonLabel,
283
- actions: withForgotPassword ? /*#__PURE__*/React.createElement(Link, {
284
- href: forgotPasswordLink,
285
- className: "py-2 px-4"
286
- }, forgotPasswordLabel) : null
287
- }, props));
288
- };
289
- Login.propTypes = propTypes$5;
290
- Login.defaultProps = defaultProps$5;
291
- var Login$1 = Login;
292
-
293
- var _excluded$4 = ["action", "fields", "size", "nameLabel", "emailLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel", "withLoginLink", "loginLink", "loginLabel"];
294
- var propTypes$4 = {
295
- action: PropTypes.string,
296
- fields: core.PropTypes.fields,
297
- size: PropTypes.string,
298
- nameLabel: core.PropTypes.label,
299
- emailLabel: core.PropTypes.label,
300
- passwordLabel: core.PropTypes.label,
301
- passwordConfirmationLabel: core.PropTypes.label,
302
- submitButtonLabel: core.PropTypes.label,
303
- withLoginLink: PropTypes.bool,
304
- loginLink: PropTypes.string,
305
- loginLabel: core.PropTypes.label
306
- };
307
- var defaultProps$4 = {
308
- action: '/register',
309
- fields: null,
310
- size: 'lg',
311
- nameLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
312
- id: "UUv8FR",
313
- defaultMessage: [{
314
- "type": 0,
315
- "value": "Name"
316
- }]
317
- }),
318
- emailLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
319
- id: "LI0Gz4",
320
- defaultMessage: [{
321
- "type": 0,
322
- "value": "Email"
323
- }]
324
- }),
325
- passwordLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
326
- id: "4yfet+",
327
- defaultMessage: [{
328
- "type": 0,
329
- "value": "Password"
330
- }]
331
- }),
332
- passwordConfirmationLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
333
- id: "VhJUeW",
334
- defaultMessage: [{
335
- "type": 0,
336
- "value": "Confirm your password"
337
- }]
338
- }),
339
- submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
340
- id: "PQX/ph",
341
- defaultMessage: [{
342
- "type": 0,
343
- "value": "Create account"
344
- }]
345
- }),
346
- withLoginLink: true,
347
- loginLink: '/login',
348
- loginLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
349
- id: "wa783M",
350
- defaultMessage: [{
351
- "type": 0,
352
- "value": "Already have an account? Go to login"
353
- }]
354
- })
355
- };
356
- var Register = function Register(_ref) {
357
- var action = _ref.action,
358
- fields = _ref.fields,
359
- size = _ref.size,
360
- nameLabel = _ref.nameLabel,
361
- emailLabel = _ref.emailLabel,
362
- passwordLabel = _ref.passwordLabel,
363
- passwordConfirmationLabel = _ref.passwordConfirmationLabel,
364
- submitButtonLabel = _ref.submitButtonLabel,
365
- withLoginLink = _ref.withLoginLink,
366
- loginLink = _ref.loginLink,
367
- loginLabel = _ref.loginLabel,
368
- props = _objectWithoutProperties(_ref, _excluded$4);
369
- return /*#__PURE__*/React.createElement(Form, Object.assign({
370
- action: action,
371
- fields: fields || [{
372
- name: 'name',
373
- type: 'text',
374
- size: size,
375
- label: nameLabel
376
- }, {
377
- name: 'email',
378
- type: 'email',
379
- size: size,
380
- label: emailLabel
381
- }, {
382
- name: 'password',
383
- type: 'password',
384
- size: size,
385
- label: passwordLabel
386
- }, {
387
- name: 'password_confirmation',
388
- type: 'password',
389
- size: size,
390
- label: passwordConfirmationLabel
391
- }],
392
- submitButtonLabel: submitButtonLabel,
393
- actions: withLoginLink ? /*#__PURE__*/React.createElement(Link, {
394
- href: loginLink,
395
- className: "py-2 px-4"
396
- }, loginLabel) : null
397
- }, props));
398
- };
399
- Register.propTypes = propTypes$4;
400
- Register.defaultProps = defaultProps$4;
401
- var Register$1 = Register;
402
-
403
- var _excluded$3 = ["action", "fields", "size", "emailLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
404
- var propTypes$3 = {
405
- action: PropTypes.string,
406
- fields: core.PropTypes.fields,
407
- size: PropTypes.string,
408
- emailLabel: core.PropTypes.label,
409
- passwordLabel: core.PropTypes.label,
410
- passwordConfirmationLabel: core.PropTypes.label,
411
- submitButtonLabel: core.PropTypes.label
412
- };
413
- var defaultProps$3 = {
414
- action: '/reset-password',
415
- fields: null,
416
- size: 'lg',
417
- emailLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
418
- id: "LI0Gz4",
419
- defaultMessage: [{
420
- "type": 0,
421
- "value": "Email"
422
- }]
423
- }),
424
- passwordLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
425
- id: "4yfet+",
426
- defaultMessage: [{
427
- "type": 0,
428
- "value": "Password"
429
- }]
430
- }),
431
- passwordConfirmationLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
432
- id: "VhJUeW",
433
- defaultMessage: [{
434
- "type": 0,
435
- "value": "Confirm your password"
436
- }]
437
- }),
438
- submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
439
- id: "zwks3g",
440
- defaultMessage: [{
441
- "type": 0,
442
- "value": "Save new password"
443
- }]
444
- })
445
- };
446
- var ResetPassword = function ResetPassword(_ref) {
447
- var action = _ref.action,
448
- fields = _ref.fields,
449
- size = _ref.size,
450
- emailLabel = _ref.emailLabel,
451
- passwordLabel = _ref.passwordLabel,
452
- passwordConfirmationLabel = _ref.passwordConfirmationLabel,
453
- submitButtonLabel = _ref.submitButtonLabel,
454
- props = _objectWithoutProperties(_ref, _excluded$3);
455
- return /*#__PURE__*/React.createElement(Form, Object.assign({
456
- action: action,
457
- fields: fields || [{
458
- name: 'email',
459
- type: 'email',
460
- size: size,
461
- label: emailLabel,
462
- readOnly: true
463
- }, {
464
- name: 'password',
465
- type: 'password',
466
- size: size,
467
- label: passwordLabel
468
- }, {
469
- name: 'password_confirmation',
470
- type: 'password',
471
- size: size,
472
- label: passwordConfirmationLabel
473
- }],
474
- submitButtonLabel: submitButtonLabel
475
- }, props));
476
- };
477
- ResetPassword.propTypes = propTypes$3;
478
- ResetPassword.defaultProps = defaultProps$3;
479
- var ResetPassword$1 = ResetPassword;
480
-
481
- var _excluded$2 = ["action", "fields", "size", "codeLabel", "submitButtonLabel"];
482
- var propTypes$2 = {
483
- action: PropTypes.string,
484
- fields: core.PropTypes.fields,
485
- size: PropTypes.string,
486
- codeLabel: core.PropTypes.label,
487
- submitButtonLabel: core.PropTypes.label
488
- };
489
- var defaultProps$2 = {
490
- action: '/two-factor-challenge',
491
- fields: null,
492
- size: 'lg',
493
- codeLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
494
- id: "22Ld5M",
495
- defaultMessage: [{
496
- "type": 0,
497
- "value": "Enter the code from your authenticator app to continue"
498
- }]
499
- }),
500
- submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
501
- id: "QUAHwy",
502
- defaultMessage: [{
503
- "type": 0,
504
- "value": "Continue"
505
- }]
506
- })
507
- };
508
- var TwoFactorChallenge = function TwoFactorChallenge(_ref) {
509
- var action = _ref.action,
510
- fields = _ref.fields,
511
- size = _ref.size,
512
- codeLabel = _ref.codeLabel,
513
- submitButtonLabel = _ref.submitButtonLabel,
514
- props = _objectWithoutProperties(_ref, _excluded$2);
515
- return /*#__PURE__*/React.createElement(Form, Object.assign({
516
- action: action,
517
- fields: fields || [{
518
- name: 'code',
519
- type: 'text',
520
- size: size,
521
- label: codeLabel
522
- }],
523
- submitButtonLabel: submitButtonLabel
524
- }, props));
525
- };
526
- TwoFactorChallenge.propTypes = propTypes$2;
527
- TwoFactorChallenge.defaultProps = defaultProps$2;
528
- var TwoFactorChallenge$1 = TwoFactorChallenge;
529
-
530
- var _excluded$1 = ["action", "fields", "explainationLabel", "submitButtonLabel", "size", "withCancelLink", "cancelLink", "cancelLabel"];
531
- var propTypes$1 = {
532
- action: PropTypes.string,
533
- fields: core.PropTypes.fields,
534
- size: PropTypes.string,
535
- explainationLabel: core.PropTypes.label,
536
- submitButtonLabel: core.PropTypes.label,
537
- withCancelLink: PropTypes.bool,
538
- cancelLink: PropTypes.string,
539
- cancelLabel: core.PropTypes.label
540
- };
541
- var defaultProps$1 = {
542
- action: '/user/two-factor-authentication',
543
- fields: null,
544
- size: 'lg',
545
- explainationLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
546
- id: "5nHK/H",
547
- defaultMessage: [{
548
- "type": 0,
549
- "value": "Do you really wish to disable two factor authentication on your account?"
550
- }]
551
- }),
552
- submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
553
- id: "gWmL5V",
554
- defaultMessage: [{
555
- "type": 0,
556
- "value": "Disable two factor authentication"
557
- }]
558
- }),
559
- withCancelLink: true,
560
- cancelLink: '/home',
561
- cancelLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
562
- id: "U/ye2x",
563
- defaultMessage: [{
564
- "type": 0,
565
- "value": "Cancel"
566
- }]
567
- })
568
- };
569
- var TwoFactorDisable = function TwoFactorDisable(_ref) {
570
- var action = _ref.action;
571
- _ref.fields;
572
- var explainationLabel = _ref.explainationLabel,
573
- submitButtonLabel = _ref.submitButtonLabel;
574
- _ref.size;
575
- var withCancelLink = _ref.withCancelLink,
576
- cancelLink = _ref.cancelLink,
577
- cancelLabel = _ref.cancelLabel,
578
- props = _objectWithoutProperties(_ref, _excluded$1);
579
- var defaultPostForm = React.useCallback(function (act, data) {
580
- return fetch.postJSON(act, data, {
581
- credentials: 'include',
582
- headers: fetch.getCSRFHeaders(),
583
- method: 'DELETE'
584
- });
585
- }, []);
586
- return /*#__PURE__*/React.createElement(Form, Object.assign({
587
- action: action,
588
- submitButtonLabel: submitButtonLabel,
589
- actions: withCancelLink ? /*#__PURE__*/React.createElement(Link, {
590
- className: "py-2 px-4",
591
- href: cancelLink
592
- }, cancelLabel) : null,
593
- postForm: defaultPostForm
594
- }, props), /*#__PURE__*/React.createElement("p", null, explainationLabel));
595
- };
596
- TwoFactorDisable.propTypes = propTypes$1;
597
- TwoFactorDisable.defaultProps = defaultProps$1;
598
- var TwoFactorDisable$1 = TwoFactorDisable;
599
-
600
- var _excluded = ["action", "fields", "explainationLabel", "submitButtonLabel", "size", "withSkipLink", "skipLink", "skipLabel"];
601
- var propTypes = {
602
- action: PropTypes.string,
603
- fields: core.PropTypes.fields,
604
- size: PropTypes.string,
605
- explainationLabel: core.PropTypes.label,
606
- submitButtonLabel: core.PropTypes.label,
607
- withSkipLink: PropTypes.bool,
608
- skipLink: PropTypes.string,
609
- skipLabel: core.PropTypes.label
610
- };
611
- var defaultProps = {
612
- action: '/user/two-factor-authentication',
613
- fields: null,
614
- size: 'lg',
615
- explainationLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
616
- id: "zTiC4D",
617
- defaultMessage: [{
618
- "type": 0,
619
- "value": "Do you wish to enable two factor authentication on your account? You will have to use an authentication app such as Google Authenticator or Microsoft Authenticator in addition to your password to connect."
620
- }]
621
- }),
622
- submitButtonLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
623
- id: "pVHYDd",
624
- defaultMessage: [{
625
- "type": 0,
626
- "value": "Enable two factor authentication"
627
- }]
628
- }),
629
- withSkipLink: true,
630
- skipLink: '/home',
631
- skipLabel: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
632
- id: "li2Qqu",
633
- defaultMessage: [{
634
- "type": 0,
635
- "value": "Skip setup"
636
- }]
637
- })
638
- };
639
- var TwoFactorEnable = function TwoFactorEnable(_ref) {
640
- var action = _ref.action;
641
- _ref.fields;
642
- var explainationLabel = _ref.explainationLabel,
643
- submitButtonLabel = _ref.submitButtonLabel;
644
- _ref.size;
645
- var withSkipLink = _ref.withSkipLink,
646
- skipLink = _ref.skipLink,
647
- skipLabel = _ref.skipLabel,
648
- props = _objectWithoutProperties(_ref, _excluded);
649
- return /*#__PURE__*/React.createElement(Form, Object.assign({
650
- action: action,
651
- submitButtonLabel: submitButtonLabel,
652
- actions: withSkipLink ? /*#__PURE__*/React.createElement(Link, {
653
- className: "py-2 px-4",
654
- href: skipLink
655
- }, skipLabel) : null
656
- }, props), /*#__PURE__*/React.createElement("p", null, explainationLabel));
657
- };
658
- TwoFactorEnable.propTypes = propTypes;
659
- TwoFactorEnable.defaultProps = defaultProps;
660
- var TwoFactorEnable$1 = TwoFactorEnable;
661
-
662
- exports.ChangePassword = ChangePassword$1;
663
- exports.ConfirmPassword = ConfirmPassword$1;
664
- exports.ForgotPassword = ForgotPassword$1;
665
- exports.Login = Login$1;
666
- exports.Register = Register$1;
667
- exports.ResetPassword = ResetPassword$1;
668
- exports.TwoFactorChallenge = TwoFactorChallenge$1;
669
- exports.TwoFactorDisable = TwoFactorDisable$1;
670
- exports.TwoFactorEnable = TwoFactorEnable$1;