gatsby-theme-q3 4.5.11 → 4.5.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/CHANGELOG.md +261 -244
  2. package/lib/components/AccountPublicGateway.js +0 -7
  3. package/lib/components/AdminLoader.js +0 -6
  4. package/lib/components/AdminPrivateGateway.js +1 -10
  5. package/lib/components/AdminPublicGateway.js +1 -10
  6. package/lib/components/AdminRouter.js +1 -11
  7. package/lib/components/BlogArchiveTemplate.js +0 -12
  8. package/lib/components/BlogTemplate.js +0 -22
  9. package/lib/components/FormBox.js +0 -6
  10. package/lib/components/FormBoxContent.js +0 -7
  11. package/lib/components/FormBoxNotice.js +0 -7
  12. package/lib/components/IsBrowserReady.js +0 -6
  13. package/lib/components/PageWrapper.js +0 -6
  14. package/lib/components/PublicTemplate.js +2 -17
  15. package/lib/components/Redirect.js +0 -6
  16. package/lib/components/RedirectToIndex.js +0 -6
  17. package/lib/components/RichText.js +0 -26
  18. package/lib/components/SearchEngine.js +0 -18
  19. package/lib/components/ShareButton.js +0 -16
  20. package/lib/components/Wrapper.js +1 -6
  21. package/lib/components/__tests__/SearchEngine.test.js +0 -1
  22. package/lib/components/__tests__/withAuthenticate.test.js +0 -11
  23. package/lib/components/__tests__/withSuccessOp.test.js +0 -7
  24. package/lib/components/index.js +0 -16
  25. package/lib/components/useSiteMetaData.js +0 -6
  26. package/lib/components/utils.js +0 -11
  27. package/lib/components/withAuthenticate.js +1 -10
  28. package/lib/components/withPublicTemplate.js +0 -5
  29. package/lib/components/withSuccessOp.js +1 -13
  30. package/lib/pages/404.js +0 -9
  31. package/lib/pages/login.js +0 -14
  32. package/lib/pages/password-change.js +0 -15
  33. package/lib/pages/password-reset.js +0 -11
  34. package/lib/pages/reverify.js +0 -15
  35. package/lib/pages/verify.js +0 -14
  36. package/package.json +3 -3
@@ -4,18 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.toOp = exports.hasOp = exports.authenticate = exports.OP = void 0;
7
-
8
7
  var _axios = _interopRequireDefault(require("axios"));
9
-
10
8
  var _gatsby = require("gatsby");
11
-
12
9
  var _q3UiPermissions = require("q3-ui-permissions");
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  const OP = '?op=success';
17
12
  exports.OP = OP;
18
-
19
13
  const authenticate = (credentials, redirectPath = '/') => _axios.default.post('/authenticate', credentials).then(({
20
14
  data
21
15
  }) => {
@@ -23,13 +17,8 @@ const authenticate = (credentials, redirectPath = '/') => _axios.default.post('/
23
17
  window.location.replace(redirectPath);
24
18
  return data;
25
19
  });
26
-
27
20
  exports.authenticate = authenticate;
28
-
29
21
  const hasOp = search => search && search.includes(OP);
30
-
31
22
  exports.hasOp = hasOp;
32
-
33
23
  const toOp = pathname => () => (0, _gatsby.navigate)(`${pathname}${OP}`);
34
-
35
24
  exports.toOp = toOp;
@@ -4,22 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _router = require("@reach/router");
11
-
12
9
  var _useSiteMetaData = _interopRequireDefault(require("./useSiteMetaData"));
13
-
14
10
  var _utils = require("./utils");
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _extends() { _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; }; return _extends.apply(this, arguments); }
19
-
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
20
13
  var _default = Component => props => {
21
14
  var _useLocation, _useLocation$state;
22
-
23
15
  const {
24
16
  appDirectory
25
17
  } = (0, _useSiteMetaData.default)();
@@ -28,5 +20,4 @@ var _default = Component => props => {
28
20
  authenticate: formValues => (0, _utils.authenticate)(formValues, redirectionPath)
29
21
  }));
30
22
  };
31
-
32
23
  exports.default = _default;
@@ -4,14 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _PublicTemplate = _interopRequireDefault(require("./PublicTemplate"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  const withPublicTemplate = Component => props => /*#__PURE__*/_react.default.createElement(_PublicTemplate.default, props, /*#__PURE__*/_react.default.createElement(Component, props));
15
-
16
11
  var _default = withPublicTemplate;
17
12
  exports.default = _default;
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _q3UiLocale = require("q3-ui-locale");
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _gatsby = require("gatsby");
15
-
16
11
  var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
17
-
18
12
  var _FormBoxNotice = _interopRequireDefault(require("./FormBoxNotice"));
19
-
20
13
  var _utils = require("./utils");
21
-
22
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
24
- function _extends() { _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; }; return _extends.apply(this, arguments); }
25
-
15
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
26
16
  const withSuccessOp = (Component, msg) => {
27
17
  const SuccessOpMessage = props => {
28
18
  const {
@@ -46,7 +36,6 @@ const withSuccessOp = (Component, msg) => {
46
36
  onSuccess: (0, _utils.toOp)(pathname)
47
37
  }));
48
38
  };
49
-
50
39
  SuccessOpMessage.propTypes = {
51
40
  location: _propTypes.default.shape({
52
41
  search: _propTypes.default.string,
@@ -55,6 +44,5 @@ const withSuccessOp = (Component, msg) => {
55
44
  };
56
45
  return SuccessOpMessage;
57
46
  };
58
-
59
47
  var _default = withSuccessOp;
60
48
  exports.default = _default;
package/lib/pages/404.js CHANGED
@@ -4,21 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _q3UiAssets = _interopRequireDefault(require("q3-ui-assets"));
11
-
12
9
  var _Box = _interopRequireDefault(require("@material-ui/core/Box"));
13
-
14
10
  var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
15
-
16
11
  var _wrapper = _interopRequireDefault(require("q3-ui/lib/wrapper"));
17
-
18
12
  var _gatsby = require("gatsby");
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
14
  const NotFound = () => /*#__PURE__*/_react.default.createElement(_wrapper.default, {
23
15
  backgroundColor: "transparent"
24
16
  }, /*#__PURE__*/_react.default.createElement(_q3UiAssets.default, {
@@ -35,6 +27,5 @@ const NotFound = () => /*#__PURE__*/_react.default.createElement(_wrapper.defaul
35
27
  size: "large"
36
28
  }, "Go home"))
37
29
  }));
38
-
39
30
  var _default = NotFound;
40
31
  exports.default = _default;
@@ -4,33 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _gatsby = require("gatsby");
11
-
12
9
  var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
13
-
14
10
  var _q3UiLocale = require("q3-ui-locale");
15
-
16
11
  var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
17
-
18
12
  var _Divider = _interopRequireDefault(require("@material-ui/core/Divider"));
19
-
20
13
  var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
21
-
22
14
  var _Box = _interopRequireDefault(require("@material-ui/core/Box"));
23
-
24
15
  var _builders = require("q3-ui-forms/lib/builders");
25
-
26
16
  var _FormBox = _interopRequireDefault(require("../components/FormBox"));
27
-
28
17
  var _withAuthenticate = _interopRequireDefault(require("../components/withAuthenticate"));
29
-
30
18
  var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
31
-
32
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
-
34
20
  const Login = (0, _withPublicTemplate.default)((0, _withAuthenticate.default)(({
35
21
  authenticate
36
22
  }) => {
@@ -4,31 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _queryString = _interopRequireDefault(require("query-string"));
13
-
14
10
  var _lodash = require("lodash");
15
-
16
11
  var _axios = _interopRequireDefault(require("axios"));
17
-
18
12
  var _presets = require("q3-ui-forms/lib/presets");
19
-
20
13
  var _builders = require("q3-ui-forms/lib/builders");
21
-
22
14
  var _FormBoxContent = _interopRequireDefault(require("../components/FormBoxContent"));
23
-
24
15
  var _FormBox = _interopRequireDefault(require("../components/FormBox"));
25
-
26
16
  var _withSuccessOp = _interopRequireDefault(require("../components/withSuccessOp"));
27
-
28
17
  var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
29
-
30
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
-
32
19
  const PasswordChange = ({
33
20
  onSuccess,
34
21
  location
@@ -39,7 +26,6 @@ const PasswordChange = ({
39
26
  } = _queryString.default.parse((0, _lodash.get)(location, 'search', ''), {
40
27
  decode: false
41
28
  });
42
-
43
29
  return /*#__PURE__*/_react.default.createElement(_FormBox.default, {
44
30
  renderBottom: /*#__PURE__*/_react.default.createElement(_builders.Form, {
45
31
  onSubmit: passwords => _axios.default.post('/password-change', passwords).then(onSuccess),
@@ -60,7 +46,6 @@ const PasswordChange = ({
60
46
  })
61
47
  });
62
48
  };
63
-
64
49
  PasswordChange.propTypes = {
65
50
  onSuccess: _propTypes.default.func.isRequired,
66
51
  location: _propTypes.default.shape({
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _axios = _interopRequireDefault(require("axios"));
13
-
14
10
  var _builders = require("q3-ui-forms/lib/builders");
15
-
16
11
  var _FormBox = _interopRequireDefault(require("../components/FormBox"));
17
-
18
12
  var _FormBoxContent = _interopRequireDefault(require("../components/FormBoxContent"));
19
-
20
13
  var _withSuccessOp = _interopRequireDefault(require("../components/withSuccessOp"));
21
-
22
14
  var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
23
-
24
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
-
26
16
  const PasswordReset = ({
27
17
  onSuccess
28
18
  }) => /*#__PURE__*/_react.default.createElement(_FormBox.default, {
@@ -41,7 +31,6 @@ const PasswordReset = ({
41
31
  description: "passwordReset"
42
32
  })
43
33
  });
44
-
45
34
  PasswordReset.propTypes = {
46
35
  onSuccess: _propTypes.default.func.isRequired
47
36
  };
@@ -4,33 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _q3UiLocale = require("q3-ui-locale");
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _gatsby = require("gatsby");
15
-
16
11
  var _axios = _interopRequireDefault(require("axios"));
17
-
18
12
  var _builders = require("q3-ui-forms/lib/builders");
19
-
20
13
  var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
21
-
22
14
  var _FormBox = _interopRequireDefault(require("../components/FormBox"));
23
-
24
15
  var _FormBoxContent = _interopRequireDefault(require("../components/FormBoxContent"));
25
-
26
16
  var _FormBoxNotice = _interopRequireDefault(require("../components/FormBoxNotice"));
27
-
28
17
  var _utils = require("../components/utils");
29
-
30
18
  var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
31
-
32
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
-
34
20
  const Reverify = ({
35
21
  location: {
36
22
  search,
@@ -66,7 +52,6 @@ const Reverify = ({
66
52
  })
67
53
  });
68
54
  };
69
-
70
55
  Reverify.propTypes = {
71
56
  location: _propTypes.default.shape({
72
57
  search: _propTypes.default.string,
@@ -4,31 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _queryString = _interopRequireDefault(require("query-string"));
11
-
12
9
  var _router = require("@reach/router");
13
-
14
10
  var _lodash = require("lodash");
15
-
16
11
  var _axios = _interopRequireDefault(require("axios"));
17
-
18
12
  var _presets = require("q3-ui-forms/lib/presets");
19
-
20
13
  var _builders = require("q3-ui-forms/lib/builders");
21
-
22
14
  var _FormBoxContent = _interopRequireDefault(require("../components/FormBoxContent"));
23
-
24
15
  var _FormBox = _interopRequireDefault(require("../components/FormBox"));
25
-
26
16
  var _withAuthenticate = _interopRequireDefault(require("../components/withAuthenticate"));
27
-
28
17
  var _withPublicTemplate = _interopRequireDefault(require("../components/withPublicTemplate"));
29
-
30
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
-
32
19
  const Verify = (0, _withPublicTemplate.default)((0, _withAuthenticate.default)(({
33
20
  authenticate,
34
21
  ...props
@@ -40,7 +27,6 @@ const Verify = (0, _withPublicTemplate.default)((0, _withAuthenticate.default)((
40
27
  } = _queryString.default.parse((0, _lodash.get)(props, 'location.search', ''), {
41
28
  decode: false
42
29
  });
43
-
44
30
  return /*#__PURE__*/_react.default.createElement(_FormBox.default, {
45
31
  renderBottom: /*#__PURE__*/_react.default.createElement(_builders.Form, {
46
32
  onSubmit: passwords => _axios.default.post('/verify', passwords).then(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-theme-q3",
3
- "version": "4.5.11",
3
+ "version": "4.5.13",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
@@ -28,7 +28,7 @@
28
28
  "gatsby-plugin-robots-txt": "^1.6.14",
29
29
  "gatsby-plugin-sharp": "^4.2.0",
30
30
  "gatsby-plugin-sitemap": "^5.2.0",
31
- "gatsby-theme-q3-mui": "^4.5.11",
31
+ "gatsby-theme-q3-mui": "^4.5.13",
32
32
  "gatsby-transformer-sharp": "^4.2.0",
33
33
  "lodash": "^4.17.20",
34
34
  "process": "^0.11.10",
@@ -42,5 +42,5 @@
42
42
  "transform-loader": "^0.2.4",
43
43
  "yarn": "^1.22.17"
44
44
  },
45
- "gitHead": "2b7cae739ceedaee09d9a9ed7dc7bea8177588f2"
45
+ "gitHead": "1e0b1662e1d58b78c8cc8ca6a455cd56007cfa33"
46
46
  }