forked from lynndylanhurley/redux-auth
-
Notifications
You must be signed in to change notification settings - Fork 4
/
material-ui-theme.js
3474 lines (2595 loc) · 145 KB
/
material-ui-theme.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ButtonLoader = exports.TokenBridge = exports.DestroyAccountButton = exports.UpdatePasswordForm = exports.OAuthSignInButton = exports.RequestPasswordResetForm = exports.SignOutButton = exports.EmailSignUpForm = exports.EmailSignInForm = exports.AuthGlobals = undefined;
var _AuthGlobals2 = __webpack_require__(115);
var _AuthGlobals3 = _interopRequireDefault(_AuthGlobals2);
var _EmailSignInForm2 = __webpack_require__(146);
var _EmailSignInForm3 = _interopRequireDefault(_EmailSignInForm2);
var _EmailSignUpForm2 = __webpack_require__(148);
var _EmailSignUpForm3 = _interopRequireDefault(_EmailSignUpForm2);
var _SignOutButton2 = __webpack_require__(150);
var _SignOutButton3 = _interopRequireDefault(_SignOutButton2);
var _RequestPasswordResetForm2 = __webpack_require__(151);
var _RequestPasswordResetForm3 = _interopRequireDefault(_RequestPasswordResetForm2);
var _OAuthSignInButton2 = __webpack_require__(152);
var _OAuthSignInButton3 = _interopRequireDefault(_OAuthSignInButton2);
var _UpdatePasswordForm2 = __webpack_require__(153);
var _UpdatePasswordForm3 = _interopRequireDefault(_UpdatePasswordForm2);
var _DestroyAccountButton2 = __webpack_require__(154);
var _DestroyAccountButton3 = _interopRequireDefault(_DestroyAccountButton2);
var _TokenBridge2 = __webpack_require__(34);
var _TokenBridge3 = _interopRequireDefault(_TokenBridge2);
var _ButtonLoader2 = __webpack_require__(141);
var _ButtonLoader3 = _interopRequireDefault(_ButtonLoader2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.AuthGlobals = _AuthGlobals3.default;
exports.EmailSignInForm = _EmailSignInForm3.default;
exports.EmailSignUpForm = _EmailSignUpForm3.default;
exports.SignOutButton = _SignOutButton3.default;
exports.RequestPasswordResetForm = _RequestPasswordResetForm3.default;
exports.OAuthSignInButton = _OAuthSignInButton3.default;
exports.UpdatePasswordForm = _UpdatePasswordForm3.default;
exports.DestroyAccountButton = _DestroyAccountButton3.default;
exports.TokenBridge = _TokenBridge3.default;
exports.ButtonLoader = _ButtonLoader3.default;
/***/ },
/* 1 */,
/* 2 */
/***/ function(module, exports) {
module.exports = require("react");
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
if (false) {
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
Symbol.for &&
Symbol.for('react.element')) ||
0xeac7;
var isValidElement = function(object) {
return typeof object === 'object' &&
object !== null &&
object.$$typeof === REACT_ELEMENT_TYPE;
};
// By explicitly using `prop-types` you are opting into new development behavior.
// http://fb.me/prop-types-in-prod
var throwOnDirectAccess = true;
module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
} else {
// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb.me/prop-types-in-prod
module.exports = __webpack_require__(4)();
}
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var emptyFunction = __webpack_require__(5);
var invariant = __webpack_require__(6);
var ReactPropTypesSecret = __webpack_require__(7);
module.exports = function() {
function shim(props, propName, componentName, location, propFullName, secret) {
if (secret === ReactPropTypesSecret) {
// It is still safe when called from React.
return;
}
invariant(
false,
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
'Use PropTypes.checkPropTypes() to call them. ' +
'Read more at http://fb.me/use-check-prop-types'
);
};
shim.isRequired = shim;
function getShim() {
return shim;
};
// Important!
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
var ReactPropTypes = {
array: shim,
bool: shim,
func: shim,
number: shim,
object: shim,
string: shim,
symbol: shim,
any: shim,
arrayOf: getShim,
element: shim,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim,
exact: getShim
};
ReactPropTypes.checkPropTypes = emptyFunction;
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
/***/ },
/* 5 */
/***/ function(module, exports) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
function makeEmptyFunction(arg) {
return function () {
return arg;
};
}
/**
* This function accepts and discards inputs; it has no side effects. This is
* primarily useful idiomatically for overridable function endpoints which
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
*/
var emptyFunction = function emptyFunction() {};
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function () {
return this;
};
emptyFunction.thatReturnsArgument = function (arg) {
return arg;
};
module.exports = emptyFunction;
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var validateFormat = function validateFormat(format) {};
if (false) {
validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
};
}
function invariant(condition, format, a, b, c, d, e, f) {
validateFormat(format);
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
module.exports = invariant;
/***/ },
/* 7 */
/***/ function(module, exports) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
/***/ },
/* 8 */,
/* 9 */
/***/ function(module, exports) {
module.exports = require("react-redux");
/***/ },
/* 10 */
/***/ function(module, exports) {
module.exports = require("redux-auth");
/***/ },
/* 11 */,
/* 12 */,
/* 13 */,
/* 14 */
/***/ function(module, exports) {
module.exports = require("immutable");
/***/ },
/* 15 */,
/* 16 */,
/* 17 */,
/* 18 */,
/* 19 */,
/* 20 */,
/* 21 */,
/* 22 */,
/* 23 */,
/* 24 */,
/* 25 */,
/* 26 */,
/* 27 */,
/* 28 */,
/* 29 */,
/* 30 */,
/* 31 */,
/* 32 */
/***/ function(module, exports) {
module.exports = require("react-loader");
/***/ },
/* 33 */,
/* 34 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = __webpack_require__(2);
var _react2 = _interopRequireDefault(_react);
var _reactRedux = __webpack_require__(9);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var TokenBridge = function (_React$Component) {
_inherits(TokenBridge, _React$Component);
function TokenBridge() {
_classCallCheck(this, TokenBridge);
return _possibleConstructorReturn(this, (TokenBridge.__proto__ || Object.getPrototypeOf(TokenBridge)).apply(this, arguments));
}
_createClass(TokenBridge, [{
key: "render",
value: function render() {
return _react2.default.createElement("script", { id: "token-bridge",
type: "application/json",
dangerouslySetInnerHTML: { __html: this.props.initialCredentials } });
}
}]);
return TokenBridge;
}(_react2.default.Component);
exports.default = (0, _reactRedux.connect)(function (_ref) {
var auth = _ref.auth;
var headers = auth.getIn(["server", "headers"]);
return {
initialCredentials: headers && JSON.stringify({
user: auth.getIn(["server", "user"]),
mustResetPassword: auth.getIn(["server", "mustResetPassword"]),
firstTimeLogin: auth.getIn(["server", "firstTimeLogin"]),
currentEndpointKey: auth.getIn(["configure", "currentEndpointKey"]),
defaultEndpointKey: auth.getIn(["configure", "defaultEndpointKey"]),
headers: headers
})
};
})(TokenBridge);
/***/ },
/* 35 */,
/* 36 */,
/* 37 */,
/* 38 */,
/* 39 */,
/* 40 */,
/* 41 */,
/* 42 */,
/* 43 */,
/* 44 */,
/* 45 */,
/* 46 */,
/* 47 */,
/* 48 */,
/* 49 */,
/* 50 */,
/* 51 */,
/* 52 */,
/* 53 */,
/* 54 */,
/* 55 */,
/* 56 */,
/* 57 */,
/* 58 */,
/* 59 */,
/* 60 */,
/* 61 */,
/* 62 */,
/* 63 */,
/* 64 */,
/* 65 */,
/* 66 */,
/* 67 */,
/* 68 */,
/* 69 */,
/* 70 */,
/* 71 */,
/* 72 */,
/* 73 */,
/* 74 */,
/* 75 */,
/* 76 */,
/* 77 */,
/* 78 */,
/* 79 */,
/* 80 */,
/* 81 */,
/* 82 */,
/* 83 */,
/* 84 */,
/* 85 */,
/* 86 */,
/* 87 */,
/* 88 */,
/* 89 */,
/* 90 */,
/* 91 */,
/* 92 */,
/* 93 */,
/* 94 */,
/* 95 */,
/* 96 */,
/* 97 */,
/* 98 */,
/* 99 */,
/* 100 */,
/* 101 */,
/* 102 */,
/* 103 */,
/* 104 */,
/* 105 */,
/* 106 */,
/* 107 */,
/* 108 */,
/* 109 */,
/* 110 */,
/* 111 */,
/* 112 */,
/* 113 */,
/* 114 */,
/* 115 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = __webpack_require__(2);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(3);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _EmailSignInSuccessModal = __webpack_require__(116);
var _EmailSignInSuccessModal2 = _interopRequireDefault(_EmailSignInSuccessModal);
var _EmailSignInErrorModal = __webpack_require__(124);
var _EmailSignInErrorModal2 = _interopRequireDefault(_EmailSignInErrorModal);
var _OAuthSignInSuccessModal = __webpack_require__(125);
var _OAuthSignInSuccessModal2 = _interopRequireDefault(_OAuthSignInSuccessModal);
var _OAuthSignInErrorModal = __webpack_require__(126);
var _OAuthSignInErrorModal2 = _interopRequireDefault(_OAuthSignInErrorModal);
var _EmailSignUpSuccessModal = __webpack_require__(127);
var _EmailSignUpSuccessModal2 = _interopRequireDefault(_EmailSignUpSuccessModal);
var _EmailSignUpErrorModal = __webpack_require__(128);
var _EmailSignUpErrorModal2 = _interopRequireDefault(_EmailSignUpErrorModal);
var _SignOutSuccessModal = __webpack_require__(129);
var _SignOutSuccessModal2 = _interopRequireDefault(_SignOutSuccessModal);
var _SignOutErrorModal = __webpack_require__(130);
var _SignOutErrorModal2 = _interopRequireDefault(_SignOutErrorModal);
var _FirstTimeLoginSuccessModal = __webpack_require__(131);
var _FirstTimeLoginSuccessModal2 = _interopRequireDefault(_FirstTimeLoginSuccessModal);
var _FirstTimeLoginErrorModal = __webpack_require__(132);
var _FirstTimeLoginErrorModal2 = _interopRequireDefault(_FirstTimeLoginErrorModal);
var _RequestPasswordResetErrorModal = __webpack_require__(133);
var _RequestPasswordResetErrorModal2 = _interopRequireDefault(_RequestPasswordResetErrorModal);
var _RequestPasswordResetSuccessModal = __webpack_require__(134);
var _RequestPasswordResetSuccessModal2 = _interopRequireDefault(_RequestPasswordResetSuccessModal);
var _UpdatePasswordErrorModal = __webpack_require__(135);
var _UpdatePasswordErrorModal2 = _interopRequireDefault(_UpdatePasswordErrorModal);
var _UpdatePasswordSuccessModal = __webpack_require__(136);
var _UpdatePasswordSuccessModal2 = _interopRequireDefault(_UpdatePasswordSuccessModal);
var _DestroyAccountErrorModal = __webpack_require__(137);
var _DestroyAccountErrorModal2 = _interopRequireDefault(_DestroyAccountErrorModal);
var _DestroyAccountSuccessModal = __webpack_require__(138);
var _DestroyAccountSuccessModal2 = _interopRequireDefault(_DestroyAccountSuccessModal);
var _PasswordResetSuccessModal = __webpack_require__(139);
var _PasswordResetSuccessModal2 = _interopRequireDefault(_PasswordResetSuccessModal);
var _TokenBridge = __webpack_require__(34);
var _TokenBridge2 = _interopRequireDefault(_TokenBridge);
var _reactRedux = __webpack_require__(9);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var AuthGlobals = function (_React$Component) {
_inherits(AuthGlobals, _React$Component);
function AuthGlobals() {
_classCallCheck(this, AuthGlobals);
return _possibleConstructorReturn(this, (AuthGlobals.__proto__ || Object.getPrototypeOf(AuthGlobals)).apply(this, arguments));
}
_createClass(AuthGlobals, [{
key: "render",
value: function render() {
var showEmailSignInSuccess = this.props.emailSignInSuccessEnabled && this.props.auth.getIn(["ui", "emailSignInSuccessModalVisible"]);
var showEmailSignInError = this.props.emailSignInErrorEnabled && this.props.auth.getIn(["ui", "emailSignInErrorModalVisible"]);
var showEmailSignUpSuccess = this.props.emailSignUpSuccessEnabled && this.props.auth.getIn(["ui", "emailSignUpSuccessModalVisible"]);
var showEmailSignUpError = this.props.emailSignUpErrorEnabled && this.props.auth.getIn(["ui", "emailSignUpErrorModalVisible"]);
var showSignOutSuccess = this.props.signOutSuccessEnabled && this.props.auth.getIn(["ui", "signOutSuccessModalVisible"]);
var showSignOutError = this.props.signOutErrorEnabled && this.props.auth.getIn(["ui", "signOutErrorModalVisible"]);
var showFirstTimeLoginSuccess = this.props.firstTimeLoginSuccessEnabled && this.props.auth.getIn(["ui", "firstTimeLoginSuccessModalVisible"]);
var showFirstTimeLoginError = this.props.firstTimeLoginErrorEnabled && this.props.auth.getIn(["ui", "firstTimeLoginErrorModalVisible"]);
var showRequestPasswordResetError = this.props.requestPasswordResetErrorEnabled && this.props.auth.getIn(["ui", "requestPasswordResetErrorModalVisible"]);
var showRequestPasswordResetSuccess = this.props.requestPasswordResetSuccessEnabled && this.props.auth.getIn(["ui", "requestPasswordResetSuccessModalVisible"]);
var showOAuthSignInSuccess = this.props.oAuthSignInSuccessEnabled && this.props.auth.getIn(["ui", "oAuthSignInSuccessModalVisible"]);
var showOAuthSignInError = this.props.oAuthSignInErrorEnabled && this.props.auth.getIn(["ui", "oAuthSignInErrorModalVisible"]);
var updatePasswordSuccess = this.props.updatePasswordSuccessEnabled && this.props.auth.getIn(["ui", "updatePasswordSuccessModalVisible"]);
var updatePasswordError = this.props.updatePasswordErrorEnabled && this.props.auth.getIn(["ui", "updatePasswordErrorModalVisible"]);
var destroyAccountSuccess = this.props.destroyAccountSuccessEnabled && this.props.auth.getIn(["ui", "destroyAccountSuccessModalVisible"]);
var destroyAccountError = this.props.destroyAccountErrorEnabled && this.props.auth.getIn(["ui", "destroyAccountErrorModalVisible"]);
var passwordResetSuccess = this.props.passwordResetSuccessEnabled && this.props.auth.getIn(["ui", "passwordResetSuccessModalVisible"]);
//let passwordResetError = (
//this.props.passwordResetErrorEnabled &&
//this.props.auth.getIn(["ui", "passwordResetErrorModalVisible"])
//);
return _react2.default.createElement(
"div",
{ id: "auth-modals" },
_react2.default.createElement(_EmailSignInSuccessModal2.default, { show: showEmailSignInSuccess }),
_react2.default.createElement(_EmailSignInErrorModal2.default, { show: showEmailSignInError }),
_react2.default.createElement(_OAuthSignInSuccessModal2.default, { show: showOAuthSignInSuccess }),
_react2.default.createElement(_OAuthSignInErrorModal2.default, { show: showOAuthSignInError }),
_react2.default.createElement(_EmailSignUpSuccessModal2.default, { show: showEmailSignUpSuccess }),
_react2.default.createElement(_EmailSignUpErrorModal2.default, { show: showEmailSignUpError }),
_react2.default.createElement(_SignOutSuccessModal2.default, { show: showSignOutSuccess }),
_react2.default.createElement(_SignOutErrorModal2.default, { show: showSignOutError }),
_react2.default.createElement(_FirstTimeLoginSuccessModal2.default, { show: showFirstTimeLoginSuccess }),
_react2.default.createElement(_FirstTimeLoginErrorModal2.default, { show: showFirstTimeLoginError }),
_react2.default.createElement(_RequestPasswordResetErrorModal2.default, { show: showRequestPasswordResetError }),
_react2.default.createElement(_RequestPasswordResetSuccessModal2.default, { show: showRequestPasswordResetSuccess }),
_react2.default.createElement(_UpdatePasswordErrorModal2.default, { show: updatePasswordError }),
_react2.default.createElement(_UpdatePasswordSuccessModal2.default, { show: updatePasswordSuccess }),
_react2.default.createElement(_DestroyAccountErrorModal2.default, { show: destroyAccountError }),
_react2.default.createElement(_DestroyAccountSuccessModal2.default, { show: destroyAccountSuccess }),
_react2.default.createElement(_PasswordResetSuccessModal2.default, { show: passwordResetSuccess }),
_react2.default.createElement(_TokenBridge2.default, null)
);
}
}]);
return AuthGlobals;
}(_react2.default.Component);
AuthGlobals.propTypes = {
signOutSuccessEnabled: _propTypes2.default.bool,
signOutErrorEnabled: _propTypes2.default.bool,
emailSignInSuccessEnabled: _propTypes2.default.bool,
emailSignInErrorEnabled: _propTypes2.default.bool,
oAuthSignInSuccessEnabled: _propTypes2.default.bool,
oAuthSignInErrorEnabled: _propTypes2.default.bool,
emailSignUpSuccessEnabled: _propTypes2.default.bool,
emailSignUpErrorEnabled: _propTypes2.default.bool,
firstTimeLoginSuccessEnabled: _propTypes2.default.bool,
firstTimeLoginErrorEnabled: _propTypes2.default.bool,
requestPasswordResetErrorEnabled: _propTypes2.default.bool,
requestPasswordResetSuccessEnabled: _propTypes2.default.bool,
updatePasswordErrorEnabled: _propTypes2.default.bool,
updatePasswordSuccessEnabled: _propTypes2.default.bool,
destroyAccountErrorEnabled: _propTypes2.default.bool,
destroyAccountSuccessEnabled: _propTypes2.default.bool,
passwordResetSuccessEnabled: _propTypes2.default.bool,
passwordResetErrorEnabled: _propTypes2.default.bool
};
AuthGlobals.defaultProps = {
signOutSuccessEnabled: true,
signOutErrorEnabled: true,
emailSignInSuccessEnabled: true,
emailSignInErrorEnabled: true,
oAuthSignInSuccessEnabled: true,
oAuthSignInErrorEnabled: true,
emailSignUpSuccessEnabled: true,
emailSignUpErrorEnabled: true,
firstTimeLoginSuccessEnabled: true,
firstTimeLoginErrorEnabled: true,
requestPasswordResetErrorEnabled: true,
requestPasswordResetSuccessEnabled: true,
updatePasswordErrorEnabled: true,
updatePasswordSuccessEnabled: true,
destroyAccountErrorEnabled: true,
destroyAccountSuccessEnabled: true,
passwordResetSuccessEnabled: true,
passwordResetErrorEnabled: true
};
exports.default = (0, _reactRedux.connect)(function (_ref) {
var auth = _ref.auth;
return { auth: auth };
})(AuthGlobals);
/***/ },
/* 116 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = __webpack_require__(2);
var _react2 = _interopRequireDefault(_react);
var _Modal = __webpack_require__(117);
var _Modal2 = _interopRequireDefault(_Modal);
var _reactRedux = __webpack_require__(9);
var _ui = __webpack_require__(10);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var EmailSignInSuccessModal = function (_React$Component) {
_inherits(EmailSignInSuccessModal, _React$Component);
function EmailSignInSuccessModal() {
_classCallCheck(this, EmailSignInSuccessModal);
return _possibleConstructorReturn(this, (EmailSignInSuccessModal.__proto__ || Object.getPrototypeOf(EmailSignInSuccessModal)).apply(this, arguments));
}
_createClass(EmailSignInSuccessModal, [{
key: "render",
value: function render() {
return _react2.default.createElement(
_Modal2.default,
_extends({}, this.props, {
title: "Welcome Back",
closeAction: _ui.hideEmailSignInSuccessModal,
containerClass: "email-sign-in-success-modal" }),
_react2.default.createElement(
"p",
null,
"You are now signed in as ",
this.props.auth.getIn(["user", "attributes", "email"]),
"."
)
);
}
}]);
return EmailSignInSuccessModal;
}(_react2.default.Component);
exports.default = (0, _reactRedux.connect)(function (_ref) {
var auth = _ref.auth;
return { auth: auth };
})(EmailSignInSuccessModal);
/***/ },
/* 117 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = __webpack_require__(2);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(3);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Dialog = __webpack_require__(118);
var _Dialog2 = _interopRequireDefault(_Dialog);
var _FlatButton = __webpack_require__(119);
var _FlatButton2 = _interopRequireDefault(_FlatButton);
var _ErrorList = __webpack_require__(120);
var _ErrorList2 = _interopRequireDefault(_ErrorList);
var _reactRedux = __webpack_require__(9);
var _MuiThemeProvider = __webpack_require__(123);
var _MuiThemeProvider2 = _interopRequireDefault(_MuiThemeProvider);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var BaseModal = function (_React$Component) {
_inherits(BaseModal, _React$Component);
function BaseModal() {
_classCallCheck(this, BaseModal);
return _possibleConstructorReturn(this, (BaseModal.__proto__ || Object.getPrototypeOf(BaseModal)).apply(this, arguments));
}
_createClass(BaseModal, [{
key: "close",
value: function close() {
this.props.dispatch(this.props.closeAction());
}
}, {
key: "getEndpoint",
value: function getEndpoint() {
return this.props.endpoint || this.props.auth.getIn(["configure", "currentEndpointKey"]) || this.props.auth.getIn(["configure", "defaultEndpointKey"]);
}
}, {
key: "getErrorList",
value: function getErrorList() {
var _props$errorAddr = _toArray(this.props.errorAddr),
base = _props$errorAddr[0],
rest = _props$errorAddr.slice(1);
return _react2.default.createElement(_ErrorList2.default, { errors: this.props.auth.getIn([base, this.getEndpoint()].concat(_toConsumableArray(rest))) });
}
}, {
key: "render",
value: function render() {
var body = this.props.errorAddr ? this.getErrorList() : this.props.children;
return _react2.default.createElement(
_MuiThemeProvider2.default,
null,
_react2.default.createElement(
_Dialog2.default,
{
open: this.props.show,
contentClassName: "redux-auth-modal " + this.props.containerClass,
title: this.props.title,
actions: [_react2.default.createElement(
_FlatButton2.default,
{
key: "close",
className: this.props.containerClass + "-close",
onClick: this.close.bind(this) },
this.props.closeBtnLabel
)].concat(_toConsumableArray(this.props.actions)) },
body
)
);
}
}]);
return BaseModal;
}(_react2.default.Component);
BaseModal.propTypes = {
show: _propTypes2.default.bool,
errorAddr: _propTypes2.default.array,
closeBtnLabel: _propTypes2.default.string,
actions: _propTypes2.default.array,
closeAction: _propTypes2.default.func
};
BaseModal.defaultProps = {
show: false,
errorAddr: null,
closeBtnLabel: "Ok",
actions: []
};
exports.default = (0, _reactRedux.connect)(function (_ref) {
var auth = _ref.auth;
return { auth: auth };
})(BaseModal);
/***/ },
/* 118 */
/***/ function(module, exports) {
module.exports = require("material-ui/Dialog");
/***/ },
/* 119 */
/***/ function(module, exports) {
module.exports = require("material-ui/FlatButton");
/***/ },
/* 120 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = __webpack_require__(2);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(3);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _colors = __webpack_require__(121);
var Colors = _interopRequireWildcard(_colors);
var _error = __webpack_require__(122);
var _error2 = _interopRequireDefault(_error);
var _immutable = __webpack_require__(14);
var _immutable2 = _interopRequireDefault(_immutable);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var ErrorList = function (_React$Component) {
_inherits(ErrorList, _React$Component);
function ErrorList() {