@widergy/react-social-auth 2.2.0 → 3.0.0
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/CHANGELOG.md +20 -0
- package/dist/components/ActiveDirectory/index.js +56 -117
- package/dist/components/ActiveDirectory/utils.js +3 -3
- package/dist/components/Apple/index.js +45 -66
- package/dist/components/Apple/utils.js +13 -34
- package/dist/components/Button/index.js +21 -17
- package/dist/components/ButtonContainer/index.js +15 -26
- package/dist/components/Facebook/index.js +46 -47
- package/dist/components/Google/components/GoogleButton/index.js +21 -23
- package/dist/components/Google/index.js +20 -21
- package/dist/components/Microsoft/index.js +27 -24
- package/dist/components/Microsoft/styles.module.scss +7 -2
- package/dist/components/Twitter/errors.js +38 -84
- package/dist/components/Twitter/index.js +42 -64
- package/dist/components/Twitter/utils.js +42 -83
- package/dist/components/utils.js +1 -1
- package/dist/constants/buttonSizes.js +2 -4
- package/dist/index.js +8 -8
- package/dist/scss/variables/_colors.scss +4 -4
- package/package.json +29 -69
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,31 +7,22 @@ exports.default = void 0;
|
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _propTypes = require("prop-types");
|
|
10
9
|
var _energyUi = require("@widergy/energy-ui");
|
|
11
|
-
function _getRequireWildcardCache(
|
|
12
|
-
function _interopRequireWildcard(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
triggerOnMount = _ref.triggerOnMount;
|
|
24
|
-
var ref = (0, _react.useRef)();
|
|
25
|
-
var _useState = (0, _react.useState)(false),
|
|
26
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
-
triggered = _useState2[0],
|
|
28
|
-
setTriggered = _useState2[1];
|
|
29
|
-
(0, _react.useEffect)(function () {
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
const ButtonContainer = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
tooltipContent,
|
|
17
|
+
triggerOnMount
|
|
18
|
+
} = _ref;
|
|
19
|
+
const ref = (0, _react.useRef)();
|
|
20
|
+
const [triggered, setTriggered] = (0, _react.useState)(false);
|
|
21
|
+
(0, _react.useEffect)(() => {
|
|
30
22
|
if (triggerOnMount && !triggered && ref.current) {
|
|
31
|
-
|
|
23
|
+
const buttonElement = ref.current.getElementsByTagName('button');
|
|
32
24
|
if (buttonElement && buttonElement.length) {
|
|
33
|
-
setTimeout(
|
|
34
|
-
return buttonElement[0].click();
|
|
35
|
-
}, 400);
|
|
25
|
+
setTimeout(() => buttonElement[0].click(), 400);
|
|
36
26
|
}
|
|
37
27
|
setTriggered(true);
|
|
38
28
|
}
|
|
@@ -54,5 +44,4 @@ ButtonContainer.propTypes = {
|
|
|
54
44
|
tooltipContent: _propTypes.string,
|
|
55
45
|
triggerOnMount: _propTypes.bool
|
|
56
46
|
};
|
|
57
|
-
var _default = ButtonContainer;
|
|
58
|
-
exports.default = _default;
|
|
47
|
+
var _default = exports.default = ButtonContainer;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _facebookLoginRenderProps = _interopRequireDefault(require("react-facebook-login/dist/facebook-login-render-props"));
|
|
9
9
|
var _propTypes = require("prop-types");
|
|
10
10
|
var _buttonSizes = require("../../constants/buttonSizes");
|
|
@@ -14,28 +14,23 @@ var _utils = require("../utils");
|
|
|
14
14
|
var _facebookIcon = _interopRequireDefault(require("./assets/facebookIcon.svg"));
|
|
15
15
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
triggerOnMount = _ref.triggerOnMount;
|
|
35
|
-
var _ref2 = config || {},
|
|
36
|
-
appId = _ref2.appId,
|
|
37
|
-
callback = _ref2.callback,
|
|
38
|
-
fields = _ref2.fields;
|
|
17
|
+
const Facebook = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
classNames = {},
|
|
20
|
+
config,
|
|
21
|
+
email,
|
|
22
|
+
label,
|
|
23
|
+
size = _buttonSizes.SMALL,
|
|
24
|
+
tooltipContent,
|
|
25
|
+
triggerOnMount
|
|
26
|
+
} = _ref;
|
|
27
|
+
const {
|
|
28
|
+
appId,
|
|
29
|
+
callback,
|
|
30
|
+
fields
|
|
31
|
+
} = config || {};
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line no-console
|
|
39
34
|
if (!(0, _utils.isValidId)(appId)) console.error('El id de Facebook es inválido');
|
|
40
35
|
return (0, _utils.isValidId)(appId) ? /*#__PURE__*/_react.default.createElement(_ButtonContainer.default, {
|
|
41
36
|
className: classNames.container,
|
|
@@ -48,29 +43,34 @@ var Facebook = function Facebook(_ref) {
|
|
|
48
43
|
cookie: true,
|
|
49
44
|
disableMobileRedirect: true,
|
|
50
45
|
fields: fields,
|
|
51
|
-
render:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
46
|
+
render: renderProps => /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
47
|
+
classNames: {
|
|
48
|
+
container: "".concat(_stylesModule.default.buttonContainer, " ").concat(classNames.buttonContainer)
|
|
49
|
+
},
|
|
50
|
+
email: email,
|
|
51
|
+
emailLabelProps: {
|
|
52
|
+
colorTheme: 'light'
|
|
53
|
+
},
|
|
54
|
+
Icon: _ref2 => {
|
|
55
|
+
let {
|
|
56
|
+
className
|
|
57
|
+
} = _ref2;
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement("img", {
|
|
59
|
+
alt: "Logo de Facebook",
|
|
60
|
+
className: className,
|
|
61
|
+
src: _facebookIcon.default
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
label: label,
|
|
65
|
+
mainLabelProps: {
|
|
66
|
+
...(size === _buttonSizes.LARGE ? {
|
|
67
67
|
colorTheme: 'light'
|
|
68
|
-
} : {})
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
})) :
|
|
68
|
+
} : {})
|
|
69
|
+
},
|
|
70
|
+
onClick: renderProps.onClick,
|
|
71
|
+
size: size
|
|
72
|
+
})
|
|
73
|
+
})) : null;
|
|
74
74
|
};
|
|
75
75
|
Facebook.propTypes = {
|
|
76
76
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
@@ -85,5 +85,4 @@ Facebook.propTypes = {
|
|
|
85
85
|
tooltipContent: _propTypes.string,
|
|
86
86
|
triggerOnMount: _propTypes.bool
|
|
87
87
|
};
|
|
88
|
-
var _default = Facebook;
|
|
89
|
-
exports.default = _default;
|
|
88
|
+
var _default = exports.default = Facebook;
|
|
@@ -12,21 +12,16 @@ var _googleIcon = _interopRequireDefault(require("../../assets/googleIcon.svg"))
|
|
|
12
12
|
var _buttonSizes = require("../../../../constants/buttonSizes");
|
|
13
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
label = _ref.label,
|
|
26
|
-
size = _ref.size,
|
|
27
|
-
successCallback = _ref.successCallback,
|
|
28
|
-
email = _ref.email;
|
|
29
|
-
var login = (0, _google.useGoogleLogin)({
|
|
15
|
+
const GoogleButton = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
classNames = {},
|
|
18
|
+
failureCallback,
|
|
19
|
+
label,
|
|
20
|
+
size,
|
|
21
|
+
successCallback,
|
|
22
|
+
email
|
|
23
|
+
} = _ref;
|
|
24
|
+
const login = (0, _google.useGoogleLogin)({
|
|
30
25
|
onError: failureCallback,
|
|
31
26
|
onSuccess: successCallback
|
|
32
27
|
});
|
|
@@ -35,8 +30,10 @@ var GoogleButton = function GoogleButton(_ref) {
|
|
|
35
30
|
container: "".concat(_stylesModule.default.buttonContainer, " ").concat(classNames.buttonContainer)
|
|
36
31
|
},
|
|
37
32
|
email: email,
|
|
38
|
-
Icon:
|
|
39
|
-
|
|
33
|
+
Icon: _ref2 => {
|
|
34
|
+
let {
|
|
35
|
+
className
|
|
36
|
+
} = _ref2;
|
|
40
37
|
return /*#__PURE__*/_react.default.createElement("img", {
|
|
41
38
|
alt: "Logo de Google",
|
|
42
39
|
className: className,
|
|
@@ -44,10 +41,12 @@ var GoogleButton = function GoogleButton(_ref) {
|
|
|
44
41
|
});
|
|
45
42
|
},
|
|
46
43
|
label: label,
|
|
47
|
-
mainLabelProps:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
mainLabelProps: {
|
|
45
|
+
...(size === _buttonSizes.LARGE ? {
|
|
46
|
+
colorTheme: 'dark',
|
|
47
|
+
shade: '01'
|
|
48
|
+
} : {})
|
|
49
|
+
},
|
|
51
50
|
onClick: login,
|
|
52
51
|
size: size
|
|
53
52
|
});
|
|
@@ -60,5 +59,4 @@ GoogleButton.propTypes = {
|
|
|
60
59
|
size: _propTypes.string,
|
|
61
60
|
successCallback: _propTypes.bool
|
|
62
61
|
};
|
|
63
|
-
var _default = GoogleButton;
|
|
64
|
-
exports.default = _default;
|
|
62
|
+
var _default = exports.default = GoogleButton;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
8
|
var _google = require("@react-oauth/google");
|
|
10
9
|
var _propTypes = require("prop-types");
|
|
11
10
|
var _buttonSizes = require("../../constants/buttonSizes");
|
|
@@ -13,22 +12,23 @@ var _ButtonContainer = _interopRequireDefault(require("../ButtonContainer"));
|
|
|
13
12
|
var _utils = require("../utils");
|
|
14
13
|
var _GoogleButton = _interopRequireDefault(require("./components/GoogleButton"));
|
|
15
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
const Google = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
classNames = {},
|
|
18
|
+
config,
|
|
19
|
+
email,
|
|
20
|
+
label,
|
|
21
|
+
size = _buttonSizes.SMALL,
|
|
22
|
+
tooltipContent,
|
|
23
|
+
triggerOnMount
|
|
24
|
+
} = _ref;
|
|
25
|
+
const {
|
|
26
|
+
clientId,
|
|
27
|
+
failureCallback,
|
|
28
|
+
successCallback
|
|
29
|
+
} = config || {};
|
|
30
|
+
|
|
31
|
+
// eslint-disable-next-line no-console
|
|
32
32
|
if (!(0, _utils.isValidId)(clientId)) console.error('El id de Google es inválido');
|
|
33
33
|
return (0, _utils.isValidId)(clientId) ? /*#__PURE__*/_react.default.createElement(_google.GoogleOAuthProvider, {
|
|
34
34
|
clientId: clientId
|
|
@@ -44,7 +44,7 @@ var Google = function Google(_ref) {
|
|
|
44
44
|
label: label,
|
|
45
45
|
size: size,
|
|
46
46
|
successCallback: successCallback
|
|
47
|
-
}))) :
|
|
47
|
+
}))) : null;
|
|
48
48
|
};
|
|
49
49
|
Google.propTypes = {
|
|
50
50
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
@@ -59,5 +59,4 @@ Google.propTypes = {
|
|
|
59
59
|
tooltipContent: _propTypes.string,
|
|
60
60
|
triggerOnMount: _propTypes.bool
|
|
61
61
|
};
|
|
62
|
-
var _default = Google;
|
|
63
|
-
exports.default = _default;
|
|
62
|
+
var _default = exports.default = Google;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -15,27 +14,30 @@ var _utils = require("../utils");
|
|
|
15
14
|
var _microsoftIcon = _interopRequireDefault(require("./assets/microsoftIcon.svg"));
|
|
16
15
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
17
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
classNames =
|
|
23
|
-
config
|
|
24
|
-
email
|
|
25
|
-
label
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
clientId
|
|
32
|
-
loginHandler
|
|
33
|
-
redirectUrl
|
|
34
|
-
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
const Microsoft = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
classNames = {},
|
|
22
|
+
config,
|
|
23
|
+
email,
|
|
24
|
+
label,
|
|
25
|
+
size = _buttonSizes.SMALL,
|
|
26
|
+
tooltipContent,
|
|
27
|
+
triggerOnMount
|
|
28
|
+
} = _ref;
|
|
29
|
+
const {
|
|
30
|
+
clientId,
|
|
31
|
+
loginHandler,
|
|
32
|
+
redirectUrl
|
|
33
|
+
} = config || {};
|
|
34
|
+
const Image = /*#__PURE__*/_react.default.createElement("img", {
|
|
35
35
|
alt: "Logo de Microsoft",
|
|
36
36
|
className: _stylesModule.default.icon,
|
|
37
37
|
src: _microsoftIcon.default
|
|
38
38
|
});
|
|
39
|
+
|
|
40
|
+
// eslint-disable-next-line no-console
|
|
39
41
|
if (!(0, _utils.isValidId)(clientId)) console.error('El id de Microsoft es inválido');
|
|
40
42
|
return (0, _utils.isValidId)(clientId) ? /*#__PURE__*/_react.default.createElement(_ButtonContainer.default, {
|
|
41
43
|
className: "".concat(_stylesModule.default.container, " ").concat(classNames.container),
|
|
@@ -43,20 +45,22 @@ var Microsoft = function Microsoft(_ref) {
|
|
|
43
45
|
tooltipContent: tooltipContent,
|
|
44
46
|
triggerOnMount: triggerOnMount
|
|
45
47
|
}, /*#__PURE__*/_react.default.createElement(_reactMsLogin.default, {
|
|
46
|
-
btnContent: size === _buttonSizes.LARGE ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, Image, /*#__PURE__*/_react.default.createElement(
|
|
48
|
+
btnContent: size === _buttonSizes.LARGE ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, Image, /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
+
className: _stylesModule.default.textsContainer
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
47
51
|
className: "".concat(_stylesModule.default.label, " ").concat(classNames.label),
|
|
48
52
|
colorTheme: "light"
|
|
49
53
|
}, label), email && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
50
54
|
className: "".concat(_stylesModule.default.label, " ").concat(classNames.label),
|
|
51
55
|
colorTheme: "light"
|
|
52
|
-
}, email)) : /*#__PURE__*/_react.default.createElement("div", {
|
|
56
|
+
}, email))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
53
57
|
className: _stylesModule.default.smallButtonWrapper
|
|
54
58
|
}, Image),
|
|
55
59
|
clientId: clientId,
|
|
56
|
-
cssClass: "".concat(_stylesModule.default.button, " ").concat(size === _buttonSizes.SMALL ? _stylesModule.default.smallContainer : ''),
|
|
60
|
+
cssClass: "".concat(_stylesModule.default.button, " ").concat(classNames.buttonContainer, " ").concat(size === _buttonSizes.SMALL ? _stylesModule.default.smallContainer : ''),
|
|
57
61
|
handleLogin: loginHandler,
|
|
58
62
|
redirectUri: redirectUrl
|
|
59
|
-
}), size === _buttonSizes.SMALL && label && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, null, label)) :
|
|
63
|
+
}), size === _buttonSizes.SMALL && label && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, null, label)) : null;
|
|
60
64
|
};
|
|
61
65
|
Microsoft.propTypes = {
|
|
62
66
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
@@ -71,5 +75,4 @@ Microsoft.propTypes = {
|
|
|
71
75
|
tooltipContent: _propTypes.string,
|
|
72
76
|
triggerOnMount: _propTypes.bool
|
|
73
77
|
};
|
|
74
|
-
var _default = Microsoft;
|
|
75
|
-
exports.default = _default;
|
|
78
|
+
var _default = exports.default = Microsoft;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
outline: 0;
|
|
14
14
|
padding: 8px 12px;
|
|
15
15
|
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
17
|
+
color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
18
18
|
width: 100%;
|
|
19
19
|
|
|
20
20
|
&:hover {
|
|
@@ -51,3 +51,8 @@
|
|
|
51
51
|
padding: 8px !important;
|
|
52
52
|
width: 48px;
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
.textsContainer {
|
|
56
|
+
margin: 0 auto;
|
|
57
|
+
text-align: left;
|
|
58
|
+
}
|
|
@@ -1,100 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.RequestTokenParseError = exports.RequestTokenError = exports.PopupClosedByUserError = exports.NoHashOrQueryParamsError = exports.GetAuthTokenFailure = void 0;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
16
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
17
|
-
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
18
|
-
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
19
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
-
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
21
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
22
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23
|
-
var RequestTokenError = /*#__PURE__*/function (_Error) {
|
|
24
|
-
_inherits(RequestTokenError, _Error);
|
|
25
|
-
var _super = _createSuper(RequestTokenError);
|
|
26
|
-
function RequestTokenError(error) {
|
|
27
|
-
var _this;
|
|
28
|
-
_classCallCheck(this, RequestTokenError);
|
|
29
|
-
_this = _super.call(this);
|
|
30
|
-
_this.message = 'Unable to retrieve OAuth Token';
|
|
31
|
-
_this.name = 'Fatal Error';
|
|
32
|
-
_this.stack = '';
|
|
33
|
-
_this.error = error;
|
|
34
|
-
return _this;
|
|
7
|
+
class RequestTokenError extends Error {
|
|
8
|
+
constructor(error) {
|
|
9
|
+
super();
|
|
10
|
+
this.message = 'Unable to retrieve OAuth Token';
|
|
11
|
+
this.name = 'Fatal Error';
|
|
12
|
+
this.stack = '';
|
|
13
|
+
this.error = error;
|
|
35
14
|
}
|
|
36
|
-
|
|
37
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
15
|
+
}
|
|
38
16
|
exports.RequestTokenError = RequestTokenError;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_this2.message = 'Unable to parse JSON from response';
|
|
47
|
-
_this2.name = 'Fatal Error';
|
|
48
|
-
_this2.stack = '';
|
|
49
|
-
_this2.error = error;
|
|
50
|
-
return _this2;
|
|
17
|
+
class RequestTokenParseError extends Error {
|
|
18
|
+
constructor(error) {
|
|
19
|
+
super();
|
|
20
|
+
this.message = 'Unable to parse JSON from response';
|
|
21
|
+
this.name = 'Fatal Error';
|
|
22
|
+
this.stack = '';
|
|
23
|
+
this.error = error;
|
|
51
24
|
}
|
|
52
|
-
|
|
53
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
25
|
+
}
|
|
54
26
|
exports.RequestTokenParseError = RequestTokenParseError;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
_this3 = _super3.call(this);
|
|
62
|
-
_this3.message = 'Popup has been closed by user';
|
|
63
|
-
_this3.name = 'Info';
|
|
64
|
-
_this3.stack = '';
|
|
65
|
-
return _this3;
|
|
27
|
+
class PopupClosedByUserError extends Error {
|
|
28
|
+
constructor() {
|
|
29
|
+
super();
|
|
30
|
+
this.message = 'Popup has been closed by user';
|
|
31
|
+
this.name = 'Info';
|
|
32
|
+
this.stack = '';
|
|
66
33
|
}
|
|
67
|
-
|
|
68
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
34
|
+
}
|
|
69
35
|
exports.PopupClosedByUserError = PopupClosedByUserError;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
_this4.message = "Unable to retrieve Authorization Token from ".concat(url, "\n OAuth Verifier: ").concat(verifier, " \n OAuth Token: ").concat(token, " ");
|
|
78
|
-
_this4.name = 'Fatal Error';
|
|
79
|
-
_this4.stack = '';
|
|
80
|
-
_this4.error = error;
|
|
81
|
-
return _this4;
|
|
36
|
+
class GetAuthTokenFailure extends Error {
|
|
37
|
+
constructor(error, url, verifier, token) {
|
|
38
|
+
super();
|
|
39
|
+
this.message = "Unable to retrieve Authorization Token from ".concat(url, "\n OAuth Verifier: ").concat(verifier, " \n OAuth Token: ").concat(token, " ");
|
|
40
|
+
this.name = 'Fatal Error';
|
|
41
|
+
this.stack = '';
|
|
42
|
+
this.error = error;
|
|
82
43
|
}
|
|
83
|
-
|
|
84
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
44
|
+
}
|
|
85
45
|
exports.GetAuthTokenFailure = GetAuthTokenFailure;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
_this5 = _super5.call(this);
|
|
93
|
-
_this5.message = "OAuth redirect has occurred but no query or hash parameters were found.\n They were either not set during the redirect, or were removed\u2014typically by a\n routing library\u2014before Twitter react component could read it.";
|
|
94
|
-
_this5.name = 'Fatal Error';
|
|
95
|
-
_this5.stack = '';
|
|
96
|
-
return _this5;
|
|
46
|
+
class NoHashOrQueryParamsError extends Error {
|
|
47
|
+
constructor() {
|
|
48
|
+
super();
|
|
49
|
+
this.message = "OAuth redirect has occurred but no query or hash parameters were found.\n They were either not set during the redirect, or were removed\u2014typically by a\n routing library\u2014before Twitter react component could read it.";
|
|
50
|
+
this.name = 'Fatal Error';
|
|
51
|
+
this.stack = '';
|
|
97
52
|
}
|
|
98
|
-
|
|
99
|
-
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
53
|
+
}
|
|
100
54
|
exports.NoHashOrQueryParamsError = NoHashOrQueryParamsError;
|