@panneau/form-auth 4.0.78 → 4.0.79
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/dist/index.js +107 -90
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { FormattedMessage } from 'react-intl';
|
|
3
|
-
import
|
|
3
|
+
import { useFormComponent, useFormDefinition } from '@panneau/core/contexts';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
import Link from '@panneau/element-link';
|
|
6
|
-
import { useFormDefinition } from '@panneau/core/contexts';
|
|
7
6
|
import { postJSON, getCSRFHeaders } from '@folklore/fetch';
|
|
8
7
|
|
|
9
8
|
function ChangePassword(t0) {
|
|
10
|
-
const $ = c(
|
|
9
|
+
const $ = c(23);
|
|
11
10
|
let props;
|
|
12
11
|
let t1;
|
|
13
12
|
let t2;
|
|
@@ -53,6 +52,7 @@ function ChangePassword(t0) {
|
|
|
53
52
|
const passwordLabel = t5 === undefined ? null : t5;
|
|
54
53
|
const passwordConfirmationLabel = t6 === undefined ? null : t6;
|
|
55
54
|
const submitButtonLabel = t7 === undefined ? null : t7;
|
|
55
|
+
const FormComponent = useFormComponent("normal");
|
|
56
56
|
let t8;
|
|
57
57
|
if ($[9] !== currentPasswordLabel || $[10] !== fields || $[11] !== passwordConfirmationLabel || $[12] !== passwordLabel || $[13] !== size) {
|
|
58
58
|
t8 = fields || [{
|
|
@@ -97,27 +97,28 @@ function ChangePassword(t0) {
|
|
|
97
97
|
t9 = $[16];
|
|
98
98
|
}
|
|
99
99
|
let t10;
|
|
100
|
-
if ($[17] !==
|
|
101
|
-
t10 = /*#__PURE__*/jsx(
|
|
100
|
+
if ($[17] !== FormComponent || $[18] !== action || $[19] !== props || $[20] !== t8 || $[21] !== t9) {
|
|
101
|
+
t10 = /*#__PURE__*/jsx(FormComponent, {
|
|
102
102
|
action: action,
|
|
103
103
|
method: "PUT",
|
|
104
104
|
fields: t8,
|
|
105
105
|
submitButtonLabel: t9,
|
|
106
106
|
...props
|
|
107
107
|
});
|
|
108
|
-
$[17] =
|
|
109
|
-
$[18] =
|
|
110
|
-
$[19] =
|
|
111
|
-
$[20] =
|
|
112
|
-
$[21] =
|
|
108
|
+
$[17] = FormComponent;
|
|
109
|
+
$[18] = action;
|
|
110
|
+
$[19] = props;
|
|
111
|
+
$[20] = t8;
|
|
112
|
+
$[21] = t9;
|
|
113
|
+
$[22] = t10;
|
|
113
114
|
} else {
|
|
114
|
-
t10 = $[
|
|
115
|
+
t10 = $[22];
|
|
115
116
|
}
|
|
116
117
|
return t10;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
function ConfirmPassword(t0) {
|
|
120
|
-
const $ = c(
|
|
121
|
+
const $ = c(19);
|
|
121
122
|
let props;
|
|
122
123
|
let t1;
|
|
123
124
|
let t2;
|
|
@@ -153,6 +154,7 @@ function ConfirmPassword(t0) {
|
|
|
153
154
|
const size = t3 === undefined ? "lg" : t3;
|
|
154
155
|
const passwordLabel = t4 === undefined ? null : t4;
|
|
155
156
|
const submitButtonLabel = t5 === undefined ? null : t5;
|
|
157
|
+
const FormComponent = useFormComponent("normal");
|
|
156
158
|
let t6;
|
|
157
159
|
if ($[7] !== fields || $[8] !== passwordLabel || $[9] !== size) {
|
|
158
160
|
t6 = fields || [{
|
|
@@ -181,26 +183,27 @@ function ConfirmPassword(t0) {
|
|
|
181
183
|
t7 = $[12];
|
|
182
184
|
}
|
|
183
185
|
let t8;
|
|
184
|
-
if ($[13] !==
|
|
185
|
-
t8 = /*#__PURE__*/jsx(
|
|
186
|
+
if ($[13] !== FormComponent || $[14] !== action || $[15] !== props || $[16] !== t6 || $[17] !== t7) {
|
|
187
|
+
t8 = /*#__PURE__*/jsx(FormComponent, {
|
|
186
188
|
action: action,
|
|
187
189
|
fields: t6,
|
|
188
190
|
submitButtonLabel: t7,
|
|
189
191
|
...props
|
|
190
192
|
});
|
|
191
|
-
$[13] =
|
|
192
|
-
$[14] =
|
|
193
|
-
$[15] =
|
|
194
|
-
$[16] =
|
|
195
|
-
$[17] =
|
|
193
|
+
$[13] = FormComponent;
|
|
194
|
+
$[14] = action;
|
|
195
|
+
$[15] = props;
|
|
196
|
+
$[16] = t6;
|
|
197
|
+
$[17] = t7;
|
|
198
|
+
$[18] = t8;
|
|
196
199
|
} else {
|
|
197
|
-
t8 = $[
|
|
200
|
+
t8 = $[18];
|
|
198
201
|
}
|
|
199
202
|
return t8;
|
|
200
203
|
}
|
|
201
204
|
|
|
202
205
|
function ForgotPassword(t0) {
|
|
203
|
-
const $ = c(
|
|
206
|
+
const $ = c(27);
|
|
204
207
|
let props;
|
|
205
208
|
let t1;
|
|
206
209
|
let t2;
|
|
@@ -251,6 +254,7 @@ function ForgotPassword(t0) {
|
|
|
251
254
|
const withLoginLink = t6 === undefined ? true : t6;
|
|
252
255
|
const loginLink = t7 === undefined ? "/login" : t7;
|
|
253
256
|
const loginLabel = t8 === undefined ? null : t8;
|
|
257
|
+
const FormComponent = useFormComponent("normal");
|
|
254
258
|
let t9;
|
|
255
259
|
if ($[10] !== emailLabel || $[11] !== fields || $[12] !== size) {
|
|
256
260
|
t9 = fields || [{
|
|
@@ -295,28 +299,29 @@ function ForgotPassword(t0) {
|
|
|
295
299
|
t11 = $[19];
|
|
296
300
|
}
|
|
297
301
|
let t12;
|
|
298
|
-
if ($[20] !==
|
|
299
|
-
t12 = /*#__PURE__*/jsx(
|
|
302
|
+
if ($[20] !== FormComponent || $[21] !== action || $[22] !== props || $[23] !== t10 || $[24] !== t11 || $[25] !== t9) {
|
|
303
|
+
t12 = /*#__PURE__*/jsx(FormComponent, {
|
|
300
304
|
action: action,
|
|
301
305
|
fields: t9,
|
|
302
306
|
submitButtonLabel: t10,
|
|
303
307
|
actions: t11,
|
|
304
308
|
...props
|
|
305
309
|
});
|
|
306
|
-
$[20] =
|
|
307
|
-
$[21] =
|
|
308
|
-
$[22] =
|
|
309
|
-
$[23] =
|
|
310
|
-
$[24] =
|
|
311
|
-
$[25] =
|
|
310
|
+
$[20] = FormComponent;
|
|
311
|
+
$[21] = action;
|
|
312
|
+
$[22] = props;
|
|
313
|
+
$[23] = t10;
|
|
314
|
+
$[24] = t11;
|
|
315
|
+
$[25] = t9;
|
|
316
|
+
$[26] = t12;
|
|
312
317
|
} else {
|
|
313
|
-
t12 = $[
|
|
318
|
+
t12 = $[26];
|
|
314
319
|
}
|
|
315
320
|
return t12;
|
|
316
321
|
}
|
|
317
322
|
|
|
318
323
|
function Login(t0) {
|
|
319
|
-
const $ = c(
|
|
324
|
+
const $ = c(26);
|
|
320
325
|
let props;
|
|
321
326
|
let t1;
|
|
322
327
|
let t2;
|
|
@@ -362,6 +367,7 @@ function Login(t0) {
|
|
|
362
367
|
const withForgotPassword = t5 === undefined ? false : t5;
|
|
363
368
|
const forgotPasswordLink = t6 === undefined ? "/forgot-password" : t6;
|
|
364
369
|
const forgotPasswordLabel = t7 === undefined ? null : t7;
|
|
370
|
+
const FormComponent = useFormComponent("normal");
|
|
365
371
|
const {
|
|
366
372
|
fields
|
|
367
373
|
} = useFormDefinition("login") || {};
|
|
@@ -400,8 +406,8 @@ function Login(t0) {
|
|
|
400
406
|
t10 = $[16];
|
|
401
407
|
}
|
|
402
408
|
let t11;
|
|
403
|
-
if ($[17] !==
|
|
404
|
-
t11 = /*#__PURE__*/jsx(
|
|
409
|
+
if ($[17] !== FormComponent || $[18] !== action || $[19] !== postForm || $[20] !== props || $[21] !== size || $[22] !== t10 || $[23] !== t8 || $[24] !== t9) {
|
|
410
|
+
t11 = /*#__PURE__*/jsx(FormComponent, {
|
|
405
411
|
action: action,
|
|
406
412
|
postForm: postForm,
|
|
407
413
|
submitButtonLabel: t8,
|
|
@@ -410,22 +416,23 @@ function Login(t0) {
|
|
|
410
416
|
fields: t10,
|
|
411
417
|
...props
|
|
412
418
|
});
|
|
413
|
-
$[17] =
|
|
414
|
-
$[18] =
|
|
415
|
-
$[19] =
|
|
416
|
-
$[20] =
|
|
417
|
-
$[21] =
|
|
418
|
-
$[22] =
|
|
419
|
-
$[23] =
|
|
420
|
-
$[24] =
|
|
419
|
+
$[17] = FormComponent;
|
|
420
|
+
$[18] = action;
|
|
421
|
+
$[19] = postForm;
|
|
422
|
+
$[20] = props;
|
|
423
|
+
$[21] = size;
|
|
424
|
+
$[22] = t10;
|
|
425
|
+
$[23] = t8;
|
|
426
|
+
$[24] = t9;
|
|
427
|
+
$[25] = t11;
|
|
421
428
|
} else {
|
|
422
|
-
t11 = $[
|
|
429
|
+
t11 = $[25];
|
|
423
430
|
}
|
|
424
431
|
return t11;
|
|
425
432
|
}
|
|
426
433
|
|
|
427
434
|
function Register(t0) {
|
|
428
|
-
const $ = c(
|
|
435
|
+
const $ = c(33);
|
|
429
436
|
let props;
|
|
430
437
|
let t1;
|
|
431
438
|
let t10;
|
|
@@ -491,6 +498,7 @@ function Register(t0) {
|
|
|
491
498
|
const withLoginLink = t9 === undefined ? true : t9;
|
|
492
499
|
const loginLink = t10 === undefined ? "/login" : t10;
|
|
493
500
|
const loginLabel = t11 === undefined ? null : t11;
|
|
501
|
+
const FormComponent = useFormComponent("normal");
|
|
494
502
|
let t12;
|
|
495
503
|
if ($[13] !== emailLabel || $[14] !== fields || $[15] !== nameLabel || $[16] !== passwordConfirmationLabel || $[17] !== passwordLabel || $[18] !== size) {
|
|
496
504
|
t12 = fields || [{
|
|
@@ -559,28 +567,29 @@ function Register(t0) {
|
|
|
559
567
|
t14 = $[25];
|
|
560
568
|
}
|
|
561
569
|
let t15;
|
|
562
|
-
if ($[26] !==
|
|
563
|
-
t15 = /*#__PURE__*/jsx(
|
|
570
|
+
if ($[26] !== FormComponent || $[27] !== action || $[28] !== props || $[29] !== t12 || $[30] !== t13 || $[31] !== t14) {
|
|
571
|
+
t15 = /*#__PURE__*/jsx(FormComponent, {
|
|
564
572
|
action: action,
|
|
565
573
|
fields: t12,
|
|
566
574
|
submitButtonLabel: t13,
|
|
567
575
|
actions: t14,
|
|
568
576
|
...props
|
|
569
577
|
});
|
|
570
|
-
$[26] =
|
|
571
|
-
$[27] =
|
|
572
|
-
$[28] =
|
|
573
|
-
$[29] =
|
|
574
|
-
$[30] =
|
|
575
|
-
$[31] =
|
|
578
|
+
$[26] = FormComponent;
|
|
579
|
+
$[27] = action;
|
|
580
|
+
$[28] = props;
|
|
581
|
+
$[29] = t12;
|
|
582
|
+
$[30] = t13;
|
|
583
|
+
$[31] = t14;
|
|
584
|
+
$[32] = t15;
|
|
576
585
|
} else {
|
|
577
|
-
t15 = $[
|
|
586
|
+
t15 = $[32];
|
|
578
587
|
}
|
|
579
588
|
return t15;
|
|
580
589
|
}
|
|
581
590
|
|
|
582
591
|
function ResetPassword(t0) {
|
|
583
|
-
const $ = c(
|
|
592
|
+
const $ = c(23);
|
|
584
593
|
let props;
|
|
585
594
|
let t1;
|
|
586
595
|
let t2;
|
|
@@ -626,6 +635,7 @@ function ResetPassword(t0) {
|
|
|
626
635
|
const passwordLabel = t5 === undefined ? null : t5;
|
|
627
636
|
const passwordConfirmationLabel = t6 === undefined ? null : t6;
|
|
628
637
|
const submitButtonLabel = t7 === undefined ? null : t7;
|
|
638
|
+
const FormComponent = useFormComponent("normal");
|
|
629
639
|
let t8;
|
|
630
640
|
if ($[9] !== emailLabel || $[10] !== fields || $[11] !== passwordConfirmationLabel || $[12] !== passwordLabel || $[13] !== size) {
|
|
631
641
|
t8 = fields || [{
|
|
@@ -671,26 +681,27 @@ function ResetPassword(t0) {
|
|
|
671
681
|
t9 = $[16];
|
|
672
682
|
}
|
|
673
683
|
let t10;
|
|
674
|
-
if ($[17] !==
|
|
675
|
-
t10 = /*#__PURE__*/jsx(
|
|
684
|
+
if ($[17] !== FormComponent || $[18] !== action || $[19] !== props || $[20] !== t8 || $[21] !== t9) {
|
|
685
|
+
t10 = /*#__PURE__*/jsx(FormComponent, {
|
|
676
686
|
action: action,
|
|
677
687
|
fields: t8,
|
|
678
688
|
submitButtonLabel: t9,
|
|
679
689
|
...props
|
|
680
690
|
});
|
|
681
|
-
$[17] =
|
|
682
|
-
$[18] =
|
|
683
|
-
$[19] =
|
|
684
|
-
$[20] =
|
|
685
|
-
$[21] =
|
|
691
|
+
$[17] = FormComponent;
|
|
692
|
+
$[18] = action;
|
|
693
|
+
$[19] = props;
|
|
694
|
+
$[20] = t8;
|
|
695
|
+
$[21] = t9;
|
|
696
|
+
$[22] = t10;
|
|
686
697
|
} else {
|
|
687
|
-
t10 = $[
|
|
698
|
+
t10 = $[22];
|
|
688
699
|
}
|
|
689
700
|
return t10;
|
|
690
701
|
}
|
|
691
702
|
|
|
692
703
|
function TwoFactorChallenge(t0) {
|
|
693
|
-
const $ = c(
|
|
704
|
+
const $ = c(19);
|
|
694
705
|
let props;
|
|
695
706
|
let t1;
|
|
696
707
|
let t2;
|
|
@@ -726,6 +737,7 @@ function TwoFactorChallenge(t0) {
|
|
|
726
737
|
const size = t3 === undefined ? "lg" : t3;
|
|
727
738
|
const codeLabel = t4 === undefined ? null : t4;
|
|
728
739
|
const submitButtonLabel = t5 === undefined ? null : t5;
|
|
740
|
+
const FormComponent = useFormComponent("normal");
|
|
729
741
|
let t6;
|
|
730
742
|
if ($[7] !== codeLabel || $[8] !== fields || $[9] !== size) {
|
|
731
743
|
t6 = fields || [{
|
|
@@ -754,26 +766,27 @@ function TwoFactorChallenge(t0) {
|
|
|
754
766
|
t7 = $[12];
|
|
755
767
|
}
|
|
756
768
|
let t8;
|
|
757
|
-
if ($[13] !==
|
|
758
|
-
t8 = /*#__PURE__*/jsx(
|
|
769
|
+
if ($[13] !== FormComponent || $[14] !== action || $[15] !== props || $[16] !== t6 || $[17] !== t7) {
|
|
770
|
+
t8 = /*#__PURE__*/jsx(FormComponent, {
|
|
759
771
|
action: action,
|
|
760
772
|
fields: t6,
|
|
761
773
|
submitButtonLabel: t7,
|
|
762
774
|
...props
|
|
763
775
|
});
|
|
764
|
-
$[13] =
|
|
765
|
-
$[14] =
|
|
766
|
-
$[15] =
|
|
767
|
-
$[16] =
|
|
768
|
-
$[17] =
|
|
776
|
+
$[13] = FormComponent;
|
|
777
|
+
$[14] = action;
|
|
778
|
+
$[15] = props;
|
|
779
|
+
$[16] = t6;
|
|
780
|
+
$[17] = t7;
|
|
781
|
+
$[18] = t8;
|
|
769
782
|
} else {
|
|
770
|
-
t8 = $[
|
|
783
|
+
t8 = $[18];
|
|
771
784
|
}
|
|
772
785
|
return t8;
|
|
773
786
|
}
|
|
774
787
|
|
|
775
788
|
function TwoFactorDisable(t0) {
|
|
776
|
-
const $ = c(
|
|
789
|
+
const $ = c(27);
|
|
777
790
|
let props;
|
|
778
791
|
let t1;
|
|
779
792
|
let t2;
|
|
@@ -822,6 +835,7 @@ function TwoFactorDisable(t0) {
|
|
|
822
835
|
const withCancelLink = t6 === undefined ? true : t6;
|
|
823
836
|
const cancelLink = t7 === undefined ? "/home" : t7;
|
|
824
837
|
const cancelLabel = t8 === undefined ? null : t8;
|
|
838
|
+
const FormComponent = useFormComponent("normal");
|
|
825
839
|
const defaultPostForm = _temp;
|
|
826
840
|
let t9;
|
|
827
841
|
if ($[10] !== submitButtonLabel) {
|
|
@@ -870,8 +884,8 @@ function TwoFactorDisable(t0) {
|
|
|
870
884
|
t12 = $[19];
|
|
871
885
|
}
|
|
872
886
|
let t13;
|
|
873
|
-
if ($[20] !==
|
|
874
|
-
t13 = /*#__PURE__*/jsx(
|
|
887
|
+
if ($[20] !== FormComponent || $[21] !== action || $[22] !== props || $[23] !== t10 || $[24] !== t12 || $[25] !== t9) {
|
|
888
|
+
t13 = /*#__PURE__*/jsx(FormComponent, {
|
|
875
889
|
action: action,
|
|
876
890
|
submitButtonLabel: t9,
|
|
877
891
|
actions: t10,
|
|
@@ -879,14 +893,15 @@ function TwoFactorDisable(t0) {
|
|
|
879
893
|
...props,
|
|
880
894
|
children: t12
|
|
881
895
|
});
|
|
882
|
-
$[20] =
|
|
883
|
-
$[21] =
|
|
884
|
-
$[22] =
|
|
885
|
-
$[23] =
|
|
886
|
-
$[24] =
|
|
887
|
-
$[25] =
|
|
896
|
+
$[20] = FormComponent;
|
|
897
|
+
$[21] = action;
|
|
898
|
+
$[22] = props;
|
|
899
|
+
$[23] = t10;
|
|
900
|
+
$[24] = t12;
|
|
901
|
+
$[25] = t9;
|
|
902
|
+
$[26] = t13;
|
|
888
903
|
} else {
|
|
889
|
-
t13 = $[
|
|
904
|
+
t13 = $[26];
|
|
890
905
|
}
|
|
891
906
|
return t13;
|
|
892
907
|
}
|
|
@@ -899,7 +914,7 @@ function _temp(act, data) {
|
|
|
899
914
|
}
|
|
900
915
|
|
|
901
916
|
function TwoFactorEnable(t0) {
|
|
902
|
-
const $ = c(
|
|
917
|
+
const $ = c(27);
|
|
903
918
|
let props;
|
|
904
919
|
let t1;
|
|
905
920
|
let t2;
|
|
@@ -948,6 +963,7 @@ function TwoFactorEnable(t0) {
|
|
|
948
963
|
const withSkipLink = t6 === undefined ? true : t6;
|
|
949
964
|
const skipLink = t7 === undefined ? "/home" : t7;
|
|
950
965
|
const skipLabel = t8 === undefined ? null : t8;
|
|
966
|
+
const FormComponent = useFormComponent("normal");
|
|
951
967
|
let t9;
|
|
952
968
|
if ($[10] !== submitButtonLabel) {
|
|
953
969
|
t9 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
|
|
@@ -995,22 +1011,23 @@ function TwoFactorEnable(t0) {
|
|
|
995
1011
|
t12 = $[19];
|
|
996
1012
|
}
|
|
997
1013
|
let t13;
|
|
998
|
-
if ($[20] !==
|
|
999
|
-
t13 = /*#__PURE__*/jsx(
|
|
1014
|
+
if ($[20] !== FormComponent || $[21] !== action || $[22] !== props || $[23] !== t10 || $[24] !== t12 || $[25] !== t9) {
|
|
1015
|
+
t13 = /*#__PURE__*/jsx(FormComponent, {
|
|
1000
1016
|
action: action,
|
|
1001
1017
|
submitButtonLabel: t9,
|
|
1002
1018
|
actions: t10,
|
|
1003
1019
|
...props,
|
|
1004
1020
|
children: t12
|
|
1005
1021
|
});
|
|
1006
|
-
$[20] =
|
|
1007
|
-
$[21] =
|
|
1008
|
-
$[22] =
|
|
1009
|
-
$[23] =
|
|
1010
|
-
$[24] =
|
|
1011
|
-
$[25] =
|
|
1022
|
+
$[20] = FormComponent;
|
|
1023
|
+
$[21] = action;
|
|
1024
|
+
$[22] = props;
|
|
1025
|
+
$[23] = t10;
|
|
1026
|
+
$[24] = t12;
|
|
1027
|
+
$[25] = t9;
|
|
1028
|
+
$[26] = t13;
|
|
1012
1029
|
} else {
|
|
1013
|
-
t13 = $[
|
|
1030
|
+
t13 = $[26];
|
|
1014
1031
|
}
|
|
1015
1032
|
return t13;
|
|
1016
1033
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/form-auth",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.79",
|
|
4
4
|
"description": "Basic forgot password form",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"@folklore/fetch": "^0.1.21",
|
|
51
51
|
"@panneau/core": "^4.0.78",
|
|
52
52
|
"@panneau/element-link": "^4.0.78",
|
|
53
|
-
"@panneau/form": "^4.0.
|
|
53
|
+
"@panneau/form": "^4.0.79",
|
|
54
|
+
"@panneau/form-normal": "^4.0.78",
|
|
54
55
|
"classnames": "^2.5.1",
|
|
55
56
|
"lodash": "^4.17.21",
|
|
56
57
|
"react-intl": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^10.0.0"
|
|
@@ -66,5 +67,5 @@
|
|
|
66
67
|
"publishConfig": {
|
|
67
68
|
"access": "public"
|
|
68
69
|
},
|
|
69
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "f5fa020cfbbf641bc4a03a34c7069b273895b029"
|
|
70
71
|
}
|