gatsby-theme-q3 4.5.12 → 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 -252
  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,43 +4,24 @@ 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 _lodash = require("lodash");
13
-
14
10
  var _router = require("@reach/router");
15
-
16
11
  var _moment = _interopRequireDefault(require("moment"));
17
-
18
12
  var _gatsbyImage = _interopRequireDefault(require("gatsby-image"));
19
-
20
13
  var _Box = _interopRequireDefault(require("@material-ui/core/Box"));
21
-
22
14
  var _Container = _interopRequireDefault(require("@material-ui/core/Container"));
23
-
24
15
  var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
25
-
26
16
  var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
27
-
28
17
  var _Today = _interopRequireDefault(require("@material-ui/icons/Today"));
29
-
30
18
  var _breadcrumbs = _interopRequireDefault(require("q3-ui/lib/breadcrumbs"));
31
-
32
19
  var _wrapper = _interopRequireDefault(require("q3-ui/lib/wrapper"));
33
-
34
20
  var _pagination = _interopRequireDefault(require("q3-ui/lib/pagination"));
35
-
36
21
  var _RichText = _interopRequireDefault(require("./RichText"));
37
-
38
22
  var _ShareButton = _interopRequireDefault(require("./ShareButton"));
39
-
40
23
  var _SearchEngine = _interopRequireDefault(require("./SearchEngine"));
41
-
42
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
43
-
44
25
  const BlogTemplateSharePublication = ({
45
26
  publishedOn
46
27
  }) => /*#__PURE__*/_react.default.createElement(_Grid.default, {
@@ -61,14 +42,12 @@ const BlogTemplateSharePublication = ({
61
42
  }), /*#__PURE__*/_react.default.createElement(_ShareButton.default, {
62
43
  platform: "Email"
63
44
  }))));
64
-
65
45
  BlogTemplateSharePublication.propTypes = {
66
46
  publishedOn: _propTypes.default.string
67
47
  };
68
48
  BlogTemplateSharePublication.defaultProps = {
69
49
  publishedOn: null
70
50
  };
71
-
72
51
  const BlogTemplate = ({
73
52
  current,
74
53
  prev,
@@ -112,7 +91,6 @@ const BlogTemplate = ({
112
91
  onNext: () => (0, _router.navigate)(next.to),
113
92
  onPrev: () => (0, _router.navigate)(prev.to)
114
93
  }))));
115
-
116
94
  BlogTemplate.propTypes = {
117
95
  current: _propTypes.default.shape({
118
96
  title: _propTypes.default.string,
@@ -4,15 +4,10 @@ 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 _Box = _interopRequireDefault(require("@material-ui/core/Box"));
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  const FormBox = ({
17
12
  renderBottom,
18
13
  renderTop
@@ -24,7 +19,6 @@ const FormBox = ({
24
19
  }, renderTop, /*#__PURE__*/_react.default.createElement(_Box.default, {
25
20
  mt: 1
26
21
  }, renderBottom));
27
-
28
22
  FormBox.propTypes = {
29
23
  renderBottom: _propTypes.default.node.isRequired,
30
24
  renderTop: _propTypes.default.node.isRequired
@@ -4,17 +4,11 @@ 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 _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
12
  const FormBoxContent = ({
19
13
  title,
20
14
  description
@@ -30,7 +24,6 @@ const FormBoxContent = ({
30
24
  gutterBottom: true
31
25
  }, t(`descriptions:${description}`)));
32
26
  };
33
-
34
27
  FormBoxContent.propTypes = {
35
28
  title: _propTypes.default.string.isRequired,
36
29
  description: _propTypes.default.string.isRequired
@@ -4,17 +4,11 @@ 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 _FormBox = _interopRequireDefault(require("./FormBox"));
13
-
14
10
  var _FormBoxContent = _interopRequireDefault(require("./FormBoxContent"));
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
12
  const FormBoxNotice = ({
19
13
  children,
20
14
  ...rest
@@ -22,7 +16,6 @@ const FormBoxNotice = ({
22
16
  renderTop: /*#__PURE__*/_react.default.createElement(_FormBoxContent.default, rest),
23
17
  renderBottom: children
24
18
  });
25
-
26
19
  FormBoxNotice.defaultProps = {
27
20
  children: null
28
21
  };
@@ -4,21 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
-
10
8
  var _q3UiHelpers = require("q3-ui-helpers");
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  const {
15
11
  isBrowserReady
16
12
  } = _q3UiHelpers.browser;
17
-
18
13
  const IsBrowserReady = ({
19
14
  children
20
15
  }) => isBrowserReady() ? children : null;
21
-
22
16
  IsBrowserReady.propTypes = {
23
17
  children: _propTypes.default.node.isRequired
24
18
  };
@@ -4,19 +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 _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _SearchEngine = _interopRequireDefault(require("./SearchEngine"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  const PageWrapper = ({
17
12
  children
18
13
  }) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_SearchEngine.default, null), children);
19
-
20
14
  PageWrapper.defaultProps = {
21
15
  children: null
22
16
  };
@@ -4,29 +4,17 @@ 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 _core = require("@material-ui/core");
13
-
14
10
  var _lab = require("@material-ui/lab");
15
-
16
11
  var _gatsby = require("gatsby");
17
-
18
12
  var _q3UiLocale = require("q3-ui-locale");
19
-
20
13
  var _lodash = require("lodash");
21
-
22
14
  var _BackgroundStyle = _interopRequireDefault(require("q3-admin/lib/components/BackgroundStyle"));
23
-
24
15
  var _AdminPublicGateway = _interopRequireDefault(require("./AdminPublicGateway"));
25
-
26
16
  var _useSiteMetaData = _interopRequireDefault(require("./useSiteMetaData"));
27
-
28
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
-
30
18
  const useStyle = (0, _core.makeStyles)(theme => ({
31
19
  logo: ({
32
20
  invertLogo = false
@@ -74,7 +62,6 @@ const useStyle = (0, _core.makeStyles)(theme => ({
74
62
  minHeight: '55vh'
75
63
  })
76
64
  }));
77
-
78
65
  const Copyright = () => {
79
66
  const {
80
67
  brand
@@ -83,9 +70,9 @@ const Copyright = () => {
83
70
  display: "inline-block",
84
71
  mx: 1
85
72
  }, "\xA9", new Date().getFullYear(), " ", brand) : null;
86
- }; // eslint-disable-next-line
87
-
73
+ };
88
74
 
75
+ // eslint-disable-next-line
89
76
  const TextLink = ({
90
77
  href,
91
78
  text
@@ -101,7 +88,6 @@ const TextLink = ({
101
88
  target: "_blank"
102
89
  }, t(text))) : null;
103
90
  };
104
-
105
91
  const PublicTemplate = ({
106
92
  children,
107
93
  ...rest
@@ -187,7 +173,6 @@ const PublicTemplate = ({
187
173
  text: "cancellationPolicy"
188
174
  })))));
189
175
  };
190
-
191
176
  PublicTemplate.defaultProps = {
192
177
  children: null
193
178
  };
@@ -4,13 +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 _gatsby = require("gatsby");
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  // eslint-disable-next-line
15
11
  const Redirect = ({
16
12
  to
@@ -18,9 +14,7 @@ const Redirect = ({
18
14
  _react.default.useEffect(() => {
19
15
  (0, _gatsby.navigate)(to);
20
16
  }, []);
21
-
22
17
  return null;
23
18
  };
24
-
25
19
  var _default = Redirect;
26
20
  exports.default = _default;
@@ -4,18 +4,12 @@ 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 _Redirect = _interopRequireDefault(require("./Redirect"));
11
-
12
9
  var _useSiteMetaData = _interopRequireDefault(require("./useSiteMetaData"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  const IndexPage = () => /*#__PURE__*/_react.default.createElement(_Redirect.default, {
17
12
  to: (0, _useSiteMetaData.default)().appDirectory
18
13
  });
19
-
20
14
  var _default = IndexPage;
21
15
  exports.default = _default;
@@ -4,45 +4,25 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderRichText = exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _lodash = require("lodash");
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _gatsby = require("gatsby");
15
-
16
11
  var _Card = _interopRequireDefault(require("@material-ui/core/Card"));
17
-
18
12
  var _CardContent = _interopRequireDefault(require("@material-ui/core/CardContent"));
19
-
20
13
  var _Box = _interopRequireDefault(require("@material-ui/core/Box"));
21
-
22
14
  var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
23
-
24
15
  var _List = _interopRequireDefault(require("@material-ui/core/List"));
25
-
26
16
  var _ListItem = _interopRequireDefault(require("@material-ui/core/ListItem"));
27
-
28
17
  var _CardActionArea = _interopRequireDefault(require("@material-ui/core/CardActionArea"));
29
-
30
18
  var _ListItemIcon = _interopRequireDefault(require("@material-ui/core/ListItemIcon"));
31
-
32
19
  var _Divider = _interopRequireDefault(require("@material-ui/core/Divider"));
33
-
34
20
  var _CheckCircle = _interopRequireDefault(require("@material-ui/icons/CheckCircle"));
35
-
36
21
  var _richTextReactRenderer = require("@contentful/rich-text-react-renderer");
37
-
38
22
  var _richTextTypes = require("@contentful/rich-text-types");
39
-
40
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41
-
42
24
  const isImage = v => v === 'image';
43
-
44
25
  const getGroup = v => typeof v === 'string' ? v.split('/')[0] : '';
45
-
46
26
  const imageRender = (node, locale) => {
47
27
  const {
48
28
  title,
@@ -58,12 +38,9 @@ const imageRender = (node, locale) => {
58
38
  src: file[locale].url
59
39
  }) : null;
60
40
  };
61
-
62
41
  const renderRichText = (json, locale = 'en-CA', sitemap = {}) => {
63
42
  if (!json || !Object.keys(json).length) return null;
64
-
65
43
  const getFromSitemap = node => (0, _lodash.get)(sitemap, (0, _lodash.get)(node, 'data.target.sys.contentful_id'));
66
-
67
44
  return (0, _richTextReactRenderer.documentToReactComponents)(json, {
68
45
  renderMark: {
69
46
  [_richTextTypes.MARKS.BOLD]: text => /*#__PURE__*/_react.default.createElement("strong", null, text),
@@ -132,9 +109,7 @@ const renderRichText = (json, locale = 'en-CA', sitemap = {}) => {
132
109
  }
133
110
  });
134
111
  };
135
-
136
112
  exports.renderRichText = renderRichText;
137
-
138
113
  const RichText = ({
139
114
  json,
140
115
  locale
@@ -154,7 +129,6 @@ const RichText = ({
154
129
  return acc;
155
130
  }, {})));
156
131
  };
157
-
158
132
  RichText.propTypes = {
159
133
  // eslint-disable-next-line
160
134
  json: _propTypes.default.object,
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getStartUrl = exports.generateMetaTitleOptions = exports.generateMetaDescriptionOptions = exports.generateManifest = exports.generateIcons = exports.generateBrand = exports.default = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _lodash = require("lodash");
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _reactHelmet = require("react-helmet");
15
-
16
11
  var _q3UiHelpers = require("q3-ui-helpers");
17
-
18
12
  var _useSiteMetaData = _interopRequireDefault(require("./useSiteMetaData"));
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
14
  const withContent = output => content => content && (0, _lodash.isFunction)(output) ? output(content) : [];
23
-
24
15
  const getStartUrl = () => _q3UiHelpers.browser.isBrowserReady() ? (0, _lodash.get)(window, 'location.host') : '';
25
-
26
16
  exports.getStartUrl = getStartUrl;
27
17
  const generateMetaDescriptionOptions = withContent(content => [{
28
18
  name: 'description',
@@ -43,19 +33,14 @@ const generateMetaTitleOptions = withContent(content => [{
43
33
  content
44
34
  }]);
45
35
  exports.generateMetaTitleOptions = generateMetaTitleOptions;
46
-
47
36
  const generateBrand = xs => xs ? `%s | ${xs}` : undefined;
48
-
49
37
  exports.generateBrand = generateBrand;
50
-
51
38
  const generateIcons = (site = {}) => site !== null && site !== void 0 && site.favicon ? [{
52
39
  src: site.favicon,
53
40
  sizes: '512x512',
54
41
  type: 'image/png'
55
42
  }] : [];
56
-
57
43
  exports.generateIcons = generateIcons;
58
-
59
44
  const generateManifest = (site = {}) => ({
60
45
  background_color: site.color,
61
46
  description: site.description,
@@ -66,9 +51,7 @@ const generateManifest = (site = {}) => ({
66
51
  short_name: site.brand,
67
52
  theme_color: site.color
68
53
  });
69
-
70
54
  exports.generateManifest = generateManifest;
71
-
72
55
  const SEO = ({
73
56
  description,
74
57
  lang,
@@ -100,7 +83,6 @@ const SEO = ({
100
83
  href: site.favicon
101
84
  }));
102
85
  };
103
-
104
86
  SEO.defaultProps = {
105
87
  lang: 'en',
106
88
  meta: [],
@@ -4,19 +4,12 @@ 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 _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
13
-
14
10
  var _q3UiHelpers = require("q3-ui-helpers");
15
-
16
11
  var _reactShare = require("react-share");
17
-
18
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
13
  const EMAIL = 'Email';
21
14
  const FACEBOOK = 'Facebook';
22
15
  const LINKEDIN = 'LinkedIn';
@@ -24,7 +17,6 @@ const TWITTER = 'Twitter';
24
17
  const {
25
18
  isBrowserReady
26
19
  } = _q3UiHelpers.browser;
27
-
28
20
  const getPlatformByName = name => {
29
21
  switch (name) {
30
22
  case FACEBOOK:
@@ -32,25 +24,21 @@ const getPlatformByName = name => {
32
24
  Button: _reactShare.FacebookShareButton,
33
25
  Icon: _reactShare.FacebookIcon
34
26
  };
35
-
36
27
  case EMAIL:
37
28
  return {
38
29
  Button: _reactShare.EmailShareButton,
39
30
  Icon: _reactShare.EmailIcon
40
31
  };
41
-
42
32
  case TWITTER:
43
33
  return {
44
34
  Button: _reactShare.TwitterShareButton,
45
35
  Icon: _reactShare.TwitterIcon
46
36
  };
47
-
48
37
  case LINKEDIN:
49
38
  return {
50
39
  Button: _reactShare.LinkedinShareButton,
51
40
  Icon: _reactShare.LinkedinIcon
52
41
  };
53
-
54
42
  default:
55
43
  return {
56
44
  Button: () => null,
@@ -58,16 +46,13 @@ const getPlatformByName = name => {
58
46
  };
59
47
  }
60
48
  };
61
-
62
49
  const ShareButton = ({
63
50
  platform
64
51
  }) => {
65
52
  const [url, setUrl] = _react.default.useState();
66
-
67
53
  _react.default.useEffect(() => {
68
54
  if (isBrowserReady()) setUrl(window.location.href);
69
55
  }, []);
70
-
71
56
  const {
72
57
  Button,
73
58
  Icon
@@ -84,7 +69,6 @@ const ShareButton = ({
84
69
  round: true
85
70
  }))) : null;
86
71
  };
87
-
88
72
  ShareButton.propTypes = {
89
73
  platform: _propTypes.default.oneOf([FACEBOOK, TWITTER, LINKEDIN, EMAIL]).isRequired
90
74
  };
@@ -4,20 +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 _q3UiPermissions = _interopRequireDefault(require("q3-ui-permissions"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  /* eslint-disable import/no-extraneous-dependencies */
12
+
17
13
  const Wrapper = ({
18
14
  children
19
15
  }) => /*#__PURE__*/_react.default.createElement(_q3UiPermissions.default, null, children);
20
-
21
16
  Wrapper.propTypes = {
22
17
  children: _propTypes.default.node.isRequired
23
18
  };
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _SearchEngine = require("../SearchEngine");
4
-
5
4
  jest.mock('q3-ui-locale', () => ({
6
5
  browser: {
7
6
  isBrowserReady: jest.fn()
@@ -1,17 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  var _react = _interopRequireDefault(require("react"));
4
-
5
4
  var _router = require("@reach/router");
6
-
7
5
  var _withAuthenticate = _interopRequireDefault(require("../withAuthenticate"));
8
-
9
6
  var _utils = require("../utils");
10
-
11
7
  var _useSiteMetaData = _interopRequireDefault(require("../useSiteMetaData"));
12
-
13
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
-
15
9
  jest.mock('@reach/router', () => ({
16
10
  useLocation: jest.fn()
17
11
  }));
@@ -19,20 +13,16 @@ jest.mock('../useSiteMetaData');
19
13
  jest.mock('../utils', () => ({
20
14
  authenticate: jest.fn()
21
15
  }));
22
-
23
16
  const runAuthenticate = () => {
24
17
  const Component = () => /*#__PURE__*/_react.default.createElement("div", null);
25
-
26
18
  const Instance = (0, _withAuthenticate.default)(Component);
27
19
  global.shallow( /*#__PURE__*/_react.default.createElement(Instance, null)).props().authenticate();
28
20
  };
29
-
30
21
  describe('withAuthenticate', () => {
31
22
  it('should redirect to default directory', () => {
32
23
  _useSiteMetaData.default.mockReturnValue({
33
24
  appDirectory: '/app'
34
25
  });
35
-
36
26
  runAuthenticate();
37
27
  expect(_utils.authenticate).toHaveBeenCalledWith(undefined, '/app');
38
28
  });
@@ -42,7 +32,6 @@ describe('withAuthenticate', () => {
42
32
  gatekeeper: '/app/users'
43
33
  }
44
34
  });
45
-
46
35
  runAuthenticate();
47
36
  expect(_utils.authenticate).toHaveBeenCalledWith(undefined, '/app/users');
48
37
  });
@@ -1,22 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var _react = _interopRequireDefault(require("react"));
4
-
5
4
  var _gatsby = require("gatsby");
6
-
7
5
  var _FormBoxNotice = _interopRequireDefault(require("../FormBoxNotice"));
8
-
9
6
  var _withSuccessOp = _interopRequireDefault(require("../withSuccessOp"));
10
-
11
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
8
  jest.mock('gatsby', () => ({
14
9
  navigate: jest.fn(),
15
10
  Link: () => /*#__PURE__*/_react.default.createElement("div", null)
16
11
  }));
17
-
18
12
  const Box = () => /*#__PURE__*/_react.default.createElement("div", null);
19
-
20
13
  const Component = (0, _withSuccessOp.default)(Box, 'testing');
21
14
  describe('withSuccessOp', () => {
22
15
  it('should not render notice', () => {
@@ -87,35 +87,19 @@ Object.defineProperty(exports, "renderRichText", {
87
87
  return _RichText.renderRichText;
88
88
  }
89
89
  });
90
-
91
90
  var _AdminLoader = _interopRequireDefault(require("./AdminLoader"));
92
-
93
91
  var _AdminPrivateGateway = _interopRequireDefault(require("./AdminPrivateGateway"));
94
-
95
92
  var _AdminPublicGateway = _interopRequireDefault(require("./AdminPublicGateway"));
96
-
97
93
  var _AdminRouter = _interopRequireDefault(require("./AdminRouter"));
98
-
99
94
  var _BlogTemplate = _interopRequireDefault(require("./BlogTemplate"));
100
-
101
95
  var _FormBox = _interopRequireDefault(require("./FormBox"));
102
-
103
96
  var _PageWrapper = _interopRequireDefault(require("./PageWrapper"));
104
-
105
97
  var _PublicTemplate = _interopRequireDefault(require("./PublicTemplate"));
106
-
107
98
  var _Redirect = _interopRequireDefault(require("./Redirect"));
108
-
109
99
  var _RedirectToIndex = _interopRequireDefault(require("./RedirectToIndex"));
110
-
111
100
  var _RichText = _interopRequireWildcard(require("./RichText"));
112
-
113
101
  var _SearchEngine = _interopRequireDefault(require("./SearchEngine"));
114
-
115
102
  var _Wrapper = _interopRequireDefault(require("./Wrapper"));
116
-
117
103
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
118
-
119
104
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
120
-
121
105
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _lodash = require("lodash");
9
-
10
8
  var _gatsby = require("gatsby");
11
-
12
9
  var _useRunTime = _interopRequireDefault(require("gatsby-theme-q3-mui/src/components/useRunTime"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  var _default = (defaultValues = {}) => {
17
12
  const output = (0, _lodash.merge)((0, _lodash.get)((0, _gatsby.useStaticQuery)((0, _gatsby.graphql)`
18
13
  query {
@@ -32,5 +27,4 @@ var _default = (defaultValues = {}) => {
32
27
  });
33
28
  return output;
34
29
  };
35
-
36
30
  exports.default = _default;